/* ============================================================
   App Notes — section stylesheet
   p1next.com/app-notes/  ·  created 2026-08-03 (Day 46)

   Scope: the App Notes article section ONLY. Loaded after
   css/styles.css and never instead of it — every base token
   (--navy, --gold, --midnight, …) comes from styles.css :root.

   This file exists so a new article is a copy-paste of an
   existing one rather than a redesign. Do not inline these
   rules into a page; extend them here.
   See _research/blog-pattern.md for the authoring contract.
   ============================================================ */

/* ── 1. Byline / meta strip ───────────────────────────────── */
.an-meta {
  max-width: 820px;
  margin: 0 auto 2.5rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid rgba(27, 63, 115, 0.14);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 1rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mid);
}
.an-meta .an-meta-sep { color: rgba(27, 63, 115, 0.35); }
.an-meta time { color: var(--navy); }
.an-meta .an-meta-tag {
  padding: 0.22rem 0.6rem;
  border: 1px solid rgba(200, 153, 63, 0.55);
  border-radius: 99px;
  color: var(--gold);
  letter-spacing: 0.1em;
}

/* ── 2. Monogram mark ─────────────────────────────────────────
   Original, offline-safe brand placeholder. NOT a vendor logo:
   no scraped, hotlinked, or redrawn third-party mark appears
   anywhere in this section. Set the colour with --c.
   Always pair with the tool's name in real text — the monogram
   is decorative and carries aria-hidden.
   ─────────────────────────────────────────────────────────── */
.an-mono {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--c, var(--navy));
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.an-mono.an-mono-lg { width: 62px; height: 62px; border-radius: 14px; font-size: 1.15rem; }
.an-mono.an-mono-sm { width: 34px; height: 34px; border-radius: 8px; font-size: 0.7rem; }
.an-mono.an-mono-ink { color: var(--charcoal); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }

/* ── 2b. Logo slot ────────────────────────────────────────────
   First-class layout element. The real vendor mark is supplied
   by the asset lane at /img/apps/<slug>-logo.svg (png fallback).

   Degradation contract: the monogram is painted by ::before as
   the slot's BACKGROUND and the <img> sits on top of it. If the
   asset 404s, anLogoFail() removes the <img> and the monogram
   is simply revealed — there is never a broken-image icon and
   the slot never collapses. Set colour with --c, letters with
   data-mono. The <img> is decorative (alt="") because the tool
   name is always present in adjacent real text.
   ─────────────────────────────────────────────────────────── */
.an-logo {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--c, var(--navy));
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.an-logo::before {
  content: attr(data-mono);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  color: #fff;
}
.an-logo img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* White plate behind the real mark: vendor guidelines commonly
     require the unmodified mark on a neutral background, and it
     keeps multi-colour marks legible. */
  background: #fff;
  padding: 5px;
  border-radius: inherit;
}
.an-logo.an-logo-lg { width: 68px; height: 68px; border-radius: 15px; }
.an-logo.an-logo-lg::before { font-size: 1.2rem; }
.an-logo.an-logo-lg img { padding: 8px; }
.an-logo.an-logo-sm { width: 34px; height: 34px; border-radius: 8px; }
.an-logo.an-logo-sm::before { font-size: 0.7rem; }
.an-logo.an-logo-sm img { padding: 3px; }
.an-logo.an-logo-ink::before { color: var(--charcoal); }

/* ── 2c. Screenshot slot ──────────────────────────────────────
   Asset lane supplies /img/apps/<slug>-screenshot-01.png (jpg
   fallback). When absent, anShotFail() adds .is-empty, which
   renders a deliberate captioned frame rather than a gap.
   ─────────────────────────────────────────────────────────── */
.an-shot { margin: 0 0 2rem; }
.an-shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(27, 63, 115, 0.16);
  border-radius: 12px;
  background: var(--warm-white);
  box-shadow: 0 10px 30px rgba(13, 27, 42, 0.09);
}
.an-shot figcaption {
  margin-top: 0.7rem;
  font-size: 0.79rem;
  line-height: 1.5;
  color: var(--text-mid);
  font-style: italic;
}
/* Deliberate empty state — reads as a reserved frame, not a fault. */
.an-shot.is-empty::before {
  content: attr(data-pending);
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 190px;
  padding: 1.5rem;
  text-align: center;
  border: 1px dashed rgba(27, 63, 115, 0.28);
  border-radius: 12px;
  background: var(--warm-white);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(74, 74, 90, 0.75);
}
.an-shot.an-shot-wide { max-width: none; }
.an-dark .an-shot img { border-color: rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.04); }
.an-dark .an-shot figcaption { color: rgba(255, 255, 255, 0.62); }
.an-dark .an-shot.is-empty::before { border-color: rgba(255, 255, 255, 0.24); background: rgba(255, 255, 255, 0.04); color: rgba(255, 255, 255, 0.55); }

/* Card thumbnail variant — 16:9 crop at the top of a listing card */
.an-card-shot { margin: -1.6rem -1.5rem 1.25rem; }
.an-card-shot img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 0;
  border-radius: 13px 13px 0 0;
  box-shadow: none;
}
.an-card-shot.is-empty::before {
  min-height: 0;
  aspect-ratio: 16 / 9;
  border: 0;
  border-bottom: 1px dashed rgba(27, 63, 115, 0.22);
  border-radius: 13px 13px 0 0;
}

/* ── 3. Article listing cards ─────────────────────────────── */
.an-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
  margin-top: 2.25rem;
}
.an-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(27, 63, 115, 0.14);
  border-radius: 14px;
  padding: 1.6rem 1.5rem 1.4rem;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.an-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(13, 27, 42, 0.09); border-color: rgba(200, 153, 63, 0.55); }
.an-card-head { display: flex; align-items: center; gap: 13px; margin-bottom: 1rem; }
.an-card-kicker {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 0.15rem;
}
.an-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  line-height: 1.25;
  color: var(--navy);
  margin: 0 0 0.6rem;
}
.an-card p { font-size: 0.9rem; line-height: 1.6; color: var(--text-mid); margin: 0 0 1.1rem; }
.an-card .an-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.an-card .an-read {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--gold);
  text-decoration: none;
}
.an-card .an-read:hover { text-decoration: underline; }
.an-card .an-when { font-family: 'Montserrat', sans-serif; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-mid); }

/* Planned-but-unwritten article */
.an-card.is-planned { background: var(--warm-white); border-style: dashed; }
.an-card.is-planned:hover { transform: none; box-shadow: none; border-color: rgba(27, 63, 115, 0.2); }
.an-card.is-planned h3 { color: var(--text-mid); }
.an-card.is-planned .an-when { color: rgba(74, 74, 90, 0.7); }

/* ── 4. Article body ──────────────────────────────────────── */
.an-body { max-width: 820px; margin: 0 auto; }
.an-body > .section-overline { display: block; margin-top: 2.75rem; }
.an-body > .section-overline:first-child { margin-top: 0; }
.an-body h2 { font-size: 1.9rem; line-height: 1.2; margin: 0.3rem 0 1rem; color: var(--navy); }
.an-body h3 { font-size: 1.3rem; margin: 1.9rem 0 0.7rem; color: var(--navy); }
.an-body p { font-size: 1.02rem; line-height: 1.75; color: var(--text-mid); margin: 0 0 1.15rem; }
.an-body ul, .an-body ol { margin: 0 0 1.5rem 1.25rem; line-height: 1.75; color: var(--text-mid); }
.an-body li { margin-bottom: 0.5rem; }
.an-body strong { color: var(--text-dark); }
.an-body a { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }
.an-body a:hover { color: var(--gold); }
.an-lede { font-size: 1.12rem !important; line-height: 1.7 !important; color: var(--text-dark) !important; }

/* ── 5. Fact table ────────────────────────────────────────── */
.an-table-wrap { overflow-x: auto; margin: 0 0 1.75rem; -webkit-overflow-scrolling: touch; }
.an-table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 0.92rem; }
.an-table th, .an-table td { text-align: left; padding: 0.72rem 0.9rem; border-bottom: 1px solid rgba(27, 63, 115, 0.12); vertical-align: top; }
.an-table th {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--warm-white);
  border-bottom-color: rgba(27, 63, 115, 0.22);
}
.an-table td { color: var(--text-mid); line-height: 1.55; }
.an-table td strong { color: var(--text-dark); }

/* ── 6. Tier + surface card grids (dark sections) ─────────── */
.an-dark { background: var(--midnight); color: #fff; }
.an-dark .section-overline { color: var(--gold-light); }
.an-dark h2, .an-dark h3, .an-dark h4 { color: #fff; }
.an-dark p, .an-dark li { color: rgba(255, 255, 255, 0.82); }
.an-dark strong { color: #fff; }
.an-dark a { color: var(--gold-light); }

.an-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 14px; margin: 2rem 0 0; }
.an-tier {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 1.4rem 1.35rem;
}
.an-tier.is-top { border-color: rgba(200, 153, 63, 0.6); background: rgba(200, 153, 63, 0.09); }
.an-tier-tag { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 0.65rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-light); }
.an-tier h4 { font-family: 'Playfair Display', serif; font-size: 1.12rem; margin: 0.3rem 0 0.5rem; }
.an-tier p { font-size: 0.82rem; line-height: 1.5; margin: 0; }
.an-tier .an-ctx { display: inline-block; margin-top: 0.65rem; font-family: 'Montserrat', sans-serif; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.55); }

.an-surfaces { display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); gap: 2px; margin: 2rem 0 0; }
.an-surface { background: var(--charcoal); padding: 1.65rem 1.55rem; border-top: 3px solid transparent; transition: border-color 0.2s; }
.an-surface:hover { border-top-color: var(--gold); }
.an-surface .an-sf-name { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 0.95rem; color: #fff; }
.an-surface .an-sf-where { font-size: 0.69rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-light); margin: 0.25rem 0 0.6rem; }
.an-surface p { font-size: 0.83rem; line-height: 1.5; margin: 0; }

/* ── 7. Callout ───────────────────────────────────────────── */
.an-callout {
  max-width: 820px;
  margin: 0 auto 1.9rem;
  padding: 1.15rem 1.4rem;
  background: var(--warm-white);
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
}
.an-callout p { margin: 0; font-size: 0.95rem; line-height: 1.65; color: var(--text-mid); }
.an-callout p + p { margin-top: 0.7rem; }
.an-dark .an-callout { background: rgba(255, 255, 255, 0.06); border-left-color: var(--gold-light); }
.an-dark .an-callout p { color: rgba(255, 255, 255, 0.82); }

/* ── 8. Related-articles strip ────────────────────────────── */
.an-related { max-width: 820px; margin: 0 auto; }
.an-related ul { list-style: none; margin: 1.2rem 0 0; padding: 0; display: grid; gap: 10px; }
.an-related li { margin: 0; }
.an-related a {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0.85rem 1.1rem;
  background: #fff;
  border: 1px solid rgba(27, 63, 115, 0.14);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-dark);
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  transition: border-color 0.18s, transform 0.18s;
}
.an-related a:hover { border-color: rgba(200, 153, 63, 0.6); transform: translateX(3px); color: var(--text-dark); }
.an-related .an-rel-note { display: block; font-weight: 400; font-size: 0.77rem; color: var(--text-mid); margin-top: 0.12rem; }

/* ── 9. Coverage chips (tools without an article yet) ─────── */
.an-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 1.5rem; }
.an-chip {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0.7rem 0.85rem;
  background: #fff;
  border: 1px solid rgba(27, 63, 115, 0.12);
  border-radius: 10px;
}
.an-chip .an-chip-name { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 0.86rem; color: var(--text-dark); line-height: 1.25; display: block; }
.an-chip .an-chip-note { font-size: 0.71rem; color: var(--text-mid); line-height: 1.35; display: block; }

/* ── 10. Prototype banner ─────────────────────────────────── */
.an-proto {
  max-width: 820px;
  margin: 2.25rem auto 0;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-mid);
  border-left: 3px solid var(--gold);
  padding: 0.45rem 0 0.45rem 1rem;
}

/* ── 11. Responsive ───────────────────────────────────────── */
@media (max-width: 640px) {
  .an-body h2 { font-size: 1.55rem; }
  .an-body p { font-size: 0.97rem; }
  .an-grid { grid-template-columns: 1fr; }
  .an-meta { font-size: 0.68rem; gap: 0.4rem 0.7rem; }
}
