/* Teca blog: /blog and /blog/<slug>.
   Loaded after /style.css, which gives the page shell (dark glow background,
   grain, topbar lockup, footer). This file adds the landing page's voice on
   top: Instrument Serif headlines set tight, blue uppercase kickers, the white
   "Download for iPhone" pill, glass cards. Dark only, like the app. */

/* body.legal is a one-column grid. A grid column is never narrower than its widest
   content, so the data tables (which scroll sideways inside .table-wrap) would widen
   the whole page past a phone screen. minmax(0, 1fr) keeps the column to the screen. */
body.legal.blog-page { grid-template-columns: minmax(0, 1fr); }

/* Same root as the landing page: 17px, and on iPhone and iPad the Dynamic Type body size.
   Text sizes below are rem, so a reader's larger text setting reaches the article. */
html:has(body.blog-page) { font-size: 17px; }
@media (pointer: coarse) and (hover: none) {
  @supports (font: -apple-system-body) { html:has(body.blog-page) { font: -apple-system-body; } }
}
.blog-page main { min-width: 0; }

.blog-page {
  --text: #E8E6E1;
  --muted: rgba(232,230,225,0.72);
  --faint: rgba(232,230,225,0.56);
  --rule: rgba(255,255,255,0.10);
  --read: 680px;
  color: var(--text);
}

/* Topbar: the landing page's header, a wordmark and one white pill. */
.blog-page .topbar { gap: 8px 16px; }
.blog-nav { display: flex; align-items: center; gap: 4px 14px; }
.blog-nav .back-link { font-size: 0.8235rem; color: var(--muted); }
.blog-nav .back-link[aria-current="page"] { color: var(--text); }
.pill-download {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 16px; border-radius: 999px;
  background: #fff; color: #0E0E10; text-decoration: none;
  font: 600 0.8235rem/1 Geist, ui-sans-serif, system-ui, sans-serif;
  transition: transform 140ms ease;
}
.pill-download:hover { transform: translateY(-1px); }
.pill-download:focus-visible, .blog-page a:focus-visible, .blog-page button:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 3px;
}
/* Phones: one row. The breadcrumb already links the blog, so the nav keeps only the pill. */
@media (max-width: 480px) {
  .blog-nav .back-link { display: none; }
  .pill-download { padding: 0 14px; font-size: 0.7647rem; }
}

/* Thin reading bar under the topbar. Decorative; the page reads the same without it. */
.read-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 30;
  background: var(--blue); transform-origin: 0 50%; transform: scaleX(0);
  pointer-events: none;
}

.kicker {
  margin: 0 0 14px;
  color: var(--blue);
  font: 600 0.7647rem/1.2 Geist, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------- /blog home ---------- */
.blog-home {
  position: relative; z-index: 5;
  width: 100%; max-width: 1040px; margin: 0 auto;
  padding: clamp(24px, 5vw, 56px) var(--gutter) clamp(48px, 8vw, 96px);
}
.blog-home-title {
  font-family: 'Instrument Serif', Georgia, serif; font-weight: 400;
  font-size: clamp(46px, 7vw, 84px); line-height: 0.95; letter-spacing: -0.035em;
  margin: 0; max-width: 14ch; text-wrap: balance;
}
.blog-home-sub {
  margin: 18px 0 0; max-width: 46ch;
  color: var(--muted); font-size: 1.0588rem; line-height: 1.5; text-wrap: pretty;
}
.post-list { list-style: none; margin: clamp(32px, 5vw, 56px) 0 0; padding: 0; display: grid; gap: 16px; }
.post-card {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 0;
  border-radius: 28px; overflow: hidden;
  background: rgba(255,255,255,0.035);
  /* A border, not an inset shadow: the art panel's background would paint over an inset shadow. */
  border: 1px solid rgba(137,180,250,0.18);
  color: inherit; text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease;
}
.post-card:hover { background: rgba(137,180,250,0.05); border-color: rgba(137,180,250,0.38); }
.post-card-art { border-bottom: 1px solid var(--rule); padding: clamp(12px, 2vw, 20px); }
.post-card-art svg { display: block; width: 100%; height: auto; }
.post-card-body { padding: clamp(20px, 3vw, 32px); display: flex; flex-direction: column; gap: 12px; }
.post-card-title {
  margin: 0; font-family: 'Instrument Serif', Georgia, serif; font-weight: 400;
  font-size: clamp(32px, 4vw, 48px); line-height: 1; letter-spacing: -0.02em; text-wrap: balance;
}
.post-card-dek { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.5; max-width: 52ch; }
.post-card-meta { margin: 4px 0 0; color: var(--faint); font-size: 0.8235rem; }
.post-card-cta { margin-top: 6px; color: var(--blue); font-weight: 600; font-size: 0.8824rem; }
@media (min-width: 860px) {
  .post-card { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  .post-card-art { border-bottom: 0; border-right: 1px solid var(--rule); display: grid; place-items: center; }
  .post-card-body { justify-content: center; }
}

/* ---------- Article ---------- */
.article {
  position: relative; z-index: 5;
  width: 100%; max-width: calc(var(--read) + 2 * var(--gutter)); margin: 0 auto;
  padding: clamp(20px, 4vw, 48px) var(--gutter) clamp(40px, 6vw, 72px);
}
.crumbs { margin: 0 0 22px; font-size: 0.8235rem; color: var(--faint); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.article-title {
  font-family: 'Instrument Serif', Georgia, serif; font-weight: 400;
  font-size: clamp(44px, 8vw, 80px); line-height: 0.95; letter-spacing: -0.035em;
  margin: 0; text-wrap: balance;
}
.article-dek {
  margin: 20px 0 0; color: var(--muted);
  font-size: clamp(1.1176rem, 2.4vw, 1.2941rem); line-height: 1.45; text-wrap: pretty;
}
.article-meta {
  display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 22px 0 0; padding: 0; list-style: none;
  color: var(--faint); font-size: 0.8235rem;
}
.article-meta a { color: inherit; display: inline-flex; align-items: center; min-height: 32px; margin: -6px 0; }
.article-meta li + li::before { content: "·"; margin-right: 14px; color: rgba(232,230,225,0.3); }

/* Prose defaults sit inside :where() so they carry no class weight: any component class
   (.pill-download, .soon-row, .article-end…) wins over them without !important. */
/* Body text follows Dynamic Type but stops at 28px, like the landing page's min(rem, px)
   caps; headings grow with it (max() below) so they never end up smaller than the body. */
.article-body { margin-top: clamp(28px, 5vw, 44px); font-size: min(1.0588rem, 28px); line-height: 1.68; color: rgba(232,230,225,0.88); }
:where(.article-body) p { margin: 0 0 20px; text-wrap: pretty; }
:where(.article-body) h2 {
  font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; color: var(--text);
  font-size: max(clamp(32px, 4.4vw, 42px), 1.7rem); line-height: 1.05; letter-spacing: -0.02em;
  margin: clamp(48px, 7vw, 64px) 0 16px; text-wrap: balance; scroll-margin-top: 24px;
}
:where(.article-body) h3 { color: var(--text); font-size: 1.1176rem; font-weight: 600; margin: 28px 0 8px; }
:where(.article-body) a { color: var(--blue); text-decoration: underline; text-decoration-color: rgba(137,180,250,0.4); text-underline-offset: 3px; }
:where(.article-body) a:hover { text-decoration-color: var(--blue); }
:where(.article-body) strong { color: var(--text); font-weight: 600; }
:where(.article-body) :is(ul, ol) { margin: 0 0 20px; padding-left: 22px; }
:where(.article-body) li { margin: 0 0 10px; padding-left: 4px; }
:where(.article-body) li::marker { color: var(--blue); }
/* Glossary terms: dotted underline, same colour as the text around them. The card is
   placed by the page script under the term; it holds a definition and, where useful, a matching source link. */
:where(.article-body) .term { color: inherit; text-decoration: underline dotted rgba(137,180,250,0.75); text-decoration-thickness: 1.5px; text-underline-offset: 4px; cursor: help; }
:where(.article-body) .term:hover { color: var(--text); text-decoration-color: var(--blue); }
.term-pop {
  position: absolute; z-index: 35; width: min(300px, calc(100vw - 24px));
  padding: 14px 16px; border-radius: 16px;
  background: #1B1B22; color: #E8E6E1;
  box-shadow: inset 0 0 0 1px rgba(137,180,250,0.28), 0 18px 50px rgba(0,0,0,0.55);
  font-size: 0.8824rem; line-height: 1.45;
}
.term-pop[hidden] { display: none; }
.term-pop p { margin: 0; }
.term-pop a { display: inline-flex; align-items: center; min-height: 36px; margin-top: 4px; color: var(--blue); font-weight: 600; text-decoration: none; }
.term-pop a:hover { text-decoration: underline; }
sup.cite { font-size: 0.7059rem; line-height: 0; margin-left: 1px; }
sup.cite a { text-decoration: none; font-variant-numeric: tabular-nums; padding: 2px; }

/* The short answer: first thing under the title, for readers and answer engines. */
.short-answer {
  margin: 0 0 8px; padding: clamp(20px, 3vw, 28px);
  border-radius: 24px; background: rgba(137,180,250,0.06);
  box-shadow: inset 0 0 0 1px rgba(137,180,250,0.24);
}
.short-answer .kicker { margin-bottom: 12px; }
.short-answer :is(ul, ol) { margin: 0; padding-left: 22px; }
.short-answer a { color: inherit; text-decoration: none; }
.short-answer a:hover strong { color: var(--blue); }
.short-answer li { margin: 0 0 8px; color: var(--text); }
.short-answer li:last-child { margin-bottom: 0; }

.toc { margin: 28px 0 32px; padding: 18px 0 0; border-top: 1px solid var(--rule); }
.toc-title { margin: 0 0 8px; color: var(--faint); font-size: 0.7647rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; }
.toc ol { margin: 0; padding-left: 22px; columns: 2 220px; column-gap: 28px; font-size: 0.9412rem; }
.toc li { margin: 0 0 6px; break-inside: avoid; }
.toc a { text-decoration: none; color: var(--muted); }
.toc a:hover { color: var(--text); }

/* Figures: drawn in the site's palette, captions say what to look at. */
.figure { margin: 28px 0; }
/* A real app capture, shown at phone scale inside the dark glass frame. */
.app-shot img { display: block; width: 100%; max-width: 402px; height: auto; margin: 0 auto; border-radius: 24px; box-shadow: inset 0 0 0 1px var(--rule), 0 20px 60px rgba(0,0,0,0.45); }
.app-shot figcaption { text-align: center; }
/* Each figure ships twice: drawn wide for desktop and tall for phones, so labels stay
   at 13 px or more instead of shrinking with a 640-wide drawing. The swap sits at 740 px:
   below that the wide drawing would scale its labels under 12 px. */
.fig-narrow { display: none; }
@media (max-width: 740px) {
  .fig-wide { display: none; }
  .fig-narrow { display: block; }
}
/* Between phone and 740px the tall drawing would outgrow the body text; hold it at 420px. */
.fig-narrow svg { max-width: 420px; margin-inline: auto; }
.figure-art {
  border-radius: 24px; background: #111116; box-shadow: inset 0 0 0 1px var(--rule);
  padding: clamp(12px, 2.5vw, 20px);
}
.figure-art svg { display: block; width: 100%; height: auto; }
.figure figcaption { margin: 12px 4px 0; color: var(--faint); font-size: 0.8824rem; line-height: 1.5; }

/* Data tables scroll sideways on narrow phones instead of squeezing. */
.table-note { margin: 24px 0 10px; color: var(--faint); font-size: 0.8824rem; line-height: 1.45; }
/* Short headers and cells keep three columns inside a 335 px phone column; the wrapper
   still scrolls sideways if a longer table ever needs it. */
.table-wrap { margin: 0 0 24px; overflow-x: auto; border-radius: 20px; box-shadow: inset 0 0 0 1px var(--rule); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9412rem; line-height: 1.4; }
.data-table th, .data-table td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
.data-table tr:last-child td { border-bottom: 0; }
.data-table th { color: var(--faint); font-weight: 600; font-size: 0.7647rem; letter-spacing: 0.06em; text-transform: uppercase; }
.data-table td { color: rgba(232,230,225,0.88); }
.data-table .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table td:first-child { color: var(--text); }
.table-foot { margin: -12px 0 24px; color: var(--faint); font-size: 0.8235rem; line-height: 1.45; }

.checklist { list-style: none; padding: 0; counter-reset: step; }
.checklist li { position: relative; padding: 0 0 0 44px; margin: 0 0 16px; min-height: 28px; }
.checklist li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 1px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(137,180,250,0.14); color: var(--blue);
  font: 600 0.8235rem/1 Geist, ui-sans-serif, system-ui, sans-serif; font-variant-numeric: tabular-nums;
}

/* Gear: four plain links, no prices (they change). */
.gear { margin: clamp(40px, 6vw, 56px) 0 0; }
.gear-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 560px) { .gear-list { grid-template-columns: 1fr 1fr; } }
.gear-list li { margin: 0; padding: 0; }
.gear-list a {
  display: flex; flex-direction: column; gap: 4px; height: 100%; min-height: 52px;
  padding: 14px 16px; border-radius: 18px; text-decoration: none; color: inherit;
  background: rgba(255,255,255,0.035); border: 1px solid var(--glass-border);
  transition: border-color 140ms ease, background 140ms ease;
}
.gear-list a:hover { border-color: var(--glass-border-strong); background: rgba(137,180,250,0.05); }
.gear-list strong { color: var(--text); font-size: 1rem; line-height: 1.3; }
.gear-list span { color: var(--muted); font-size: 0.8824rem; line-height: 1.4; }
.gear-list strong::after { content: " ↗"; color: var(--blue); font-weight: 400; }

/* Coming soon: the one product moment in the article.
   The survey prompt reuses this same surface. */
.coming-soon,
button.article-callout {
  border-radius: 28px;
  background: radial-gradient(520px 260px at 90% -20%, rgba(137,180,250,0.20), transparent 70%), rgba(255,255,255,0.04);
  box-shadow: inset 0 0 0 1px rgba(137,180,250,0.30), 0 30px 80px rgba(137,180,250,0.08);
}
.coming-soon {
  margin: clamp(48px, 7vw, 64px) 0 0; padding: clamp(22px, 4vw, 36px);
}
.soon-badge {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px;
  padding: 6px 12px; border-radius: 999px; background: rgba(127,217,165,0.10);
  color: #9FE3BE; font: 600 0.7059rem/1 Geist, ui-sans-serif, system-ui, sans-serif; letter-spacing: 0.12em; text-transform: uppercase;
}
.soon-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 8px rgba(127,217,165,0.8); }
.coming-soon h2 {
  margin: 0; font-size: clamp(32px, 4.6vw, 44px); max-width: 18ch;
}
.coming-soon > p:not([class]) { margin: 14px 0 0; color: var(--muted); max-width: 46ch; }
.soon-row {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none;
}
.soon-row li {
  margin: 0; padding: 8px 12px; border-radius: 12px;
  background: rgba(255,255,255,0.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
  font-size: 0.8824rem; line-height: 1.2; color: var(--text); font-variant-numeric: tabular-nums;
}
.soon-row li b { display: block; margin-bottom: 4px; color: var(--faint); font-size: 0.7059rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.soon-row .fit { color: #9FE3BE; }
@media (max-width: 480px) {
  .soon-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.soon-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 26px 0 0; }
.soon-actions .pill-download { min-height: 52px; padding: 0 24px; font-size: 0.9412rem; }
.soon-fine { margin: 0; color: var(--faint); font-size: 0.8235rem; }

/* FAQ uses <details> so it works with no script. */
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-of-type { border-bottom: 1px solid var(--rule); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 56px; padding: 12px 0; cursor: pointer; list-style: none;
  color: var(--text); font-weight: 600; font-size: 1.0588rem; line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; color: var(--blue); font-size: 1.4118rem; font-weight: 400; transition: transform 160ms ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > p { margin: 0 0 18px; }

.sources { font-size: 0.9412rem; line-height: 1.5; }
.sources ol { padding-left: 26px; }
.sources li { margin: 0 0 12px; scroll-margin-top: 24px; }
.sources li:target { background: rgba(137,180,250,0.08); border-radius: 8px; }
.sources .src-note { display: block; color: var(--faint); font-size: 0.8824rem; }

.article-end { margin: 40px 0 0; padding-top: 22px; border-top: 1px solid var(--rule); color: var(--faint); font-size: 0.8824rem; }
.article-end a { color: var(--blue); }
button.article-callout {
  display: block; width: 100%; margin: 16px 0 0; padding: 18px 20px;
  border: 0; color: var(--text); text-align: left; cursor: pointer;
  font: 600 min(1.0588rem, 22px)/1.35 Geist, ui-sans-serif, system-ui, sans-serif;
}
button.article-callout:hover {
  box-shadow: inset 0 0 0 1px rgba(137,180,250,0.55), 0 30px 80px rgba(137,180,250,0.14);
}
button.article-callout:focus-visible { outline: 2px solid #B4BEFE; outline-offset: 3px; }

@media (max-width: 480px) {
  .article-body { font-size: min(1rem, 27px); }
  :where(.article-body) h2 { margin-top: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .pill-download, .faq summary::after { transition: none; }
}

/* Vinyl preparation examples: actual text wraps, with no SVG labels or connector lines. */
.label-example > img, .packaging-photo > img { display:block; width:100%; height:auto; border-radius:16px; }
.sleeve-note { display:flex; flex-direction:column; gap:12px; margin-top:24px; padding:24px; background:#F4EFE3; color:#23232b; border-radius:14px; font-size:clamp(1rem,2.2vw,1.35rem); line-height:1.45; overflow-wrap:anywhere; }
.figure-eyebrow { display:block; font-size:.78rem; font-weight:500; letter-spacing:.06em; text-transform:uppercase; }
.sleeve-note strong { color:inherit; }
.sleeve-note .figure-eyebrow { color:#575047; }
.packaging-labels { display:grid; grid-template-columns:1fr 1fr; gap:24px; padding:24px 0 4px; }
.packaging-labels > div { display:flex; flex-direction:column; gap:8px; min-width:0; }
.packaging-labels strong { color:var(--accent,#89B4FA); }
.tempo-demo { max-width:640px; margin-inline:auto; padding:clamp(20px,4vw,36px); border:1px solid var(--rule); border-radius:20px; background:#111116; }
.tempo-demo header { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:16px; }
.tempo-demo h3 { margin:12px 0 0; font-family:'Instrument Serif',serif; font-size:2.15rem; line-height:1.1; font-weight:400; }
.estimate-tag { background:rgba(137,180,250,.12); color:#89B4FA; padding:8px 12px; border-radius:8px; font-size:.82rem; white-space:nowrap; }
.tempo-demo .tempo-status { margin:28px 0 20px; font-size:.85rem; color:var(--faint); }
.tempo-demo ol { margin:0; padding:0; list-style:none; display:grid; gap:12px; }
.tempo-demo li { margin:0; display:flex; align-items:center; justify-content:space-between; gap:20px; padding:20px; border:1px solid var(--rule); border-radius:12px; background:#1b1b22; }
.tempo-demo li > div { display:grid; gap:7px; min-width:0; }
.tempo-demo li strong { font-size:1rem; font-weight:500; }
.tempo-demo li div span { color:var(--faint); font-size:.88rem; }
.tempo-value { color:#89B4FA; font-variant-numeric:tabular-nums; white-space:nowrap; }
.tempo-pending { color:var(--faint); font-size:.78rem; white-space:nowrap; }
@media (max-width:420px) { .tempo-demo li { padding:16px 12px; gap:12px; } .packaging-labels { gap:16px; font-size:.95rem; } }

/* Definition-only glossary cards must not retain a previous source link. */
.term-pop a[hidden]{display:none}

/* Track-position lookup: reserve the lower corner for Todd, away from the rows. */
.track-position-demo { position:relative; padding:28px 28px 164px; border:1px solid #353b47; border-radius:20px; background:#181a20; }
.track-position-demo h4 { margin:8px 0 4px; font-size:1.4rem; }
.track-position-demo ol { list-style:none; margin:24px 0 0; padding:0; }
.track-position-demo li { display:flex; align-items:center; gap:24px; padding:16px; margin:6px 0; border-radius:12px; }
.track-position-demo li:first-child { background:#27364e; }
.track-position-demo b { color:#89b4fa; font-variant-numeric:tabular-nums; min-width:36px; }
.track-position-demo .track-position-todd { position:absolute; right:18px; bottom:12px; width:142px; height:142px; object-fit:contain; }
.track-position-demo .track-position-key { position:absolute; left:28px; bottom:52px; max-width:calc(100% - 200px); font-size:.9rem; color:#b5b7c2; }
@media(max-width:480px) {
 .track-position-demo { padding:20px 16px 144px; }
 .track-position-demo li { gap:16px; padding:14px 10px; }
 .track-position-demo .track-position-todd { width:118px; height:118px; right:12px; }
 .track-position-demo .track-position-key { left:26px; max-width:calc(100% - 158px); }
}

/* Featured story remains first; future articles use the ordinary post-card below. */
.featured-badge { align-self:flex-start; padding:6px 11px; border:1px solid rgba(137,180,250,.4); border-radius:999px; color:var(--blue); font-size:.7059rem; font-weight:600; letter-spacing:.09em; text-transform:uppercase; }
.featured-todd { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:0; padding:clamp(28px,4vw,44px) clamp(16px,3vw,32px) clamp(8px,2vw,16px); overflow:visible; }
.featured-todd .todd-bubble { --tail-x:50%; align-self:center; position:relative; z-index:1; max-width:min(340px,100%); margin:0 0 2px; }
.featured-walk-rail { width:min(340px,100%); height:176px; overflow:visible; display:flex; justify-content:flex-start; align-items:flex-start; }
.featured-walker { width:106px; height:106px; margin-top:0; transform-origin:center center; flex:none; }
.featured-walker svg { width:100%; height:100%; overflow:visible; display:block; }
@media (max-width:699px) {
  .featured-todd { padding-top:20px; }
  .featured-walk-rail { height:160px; }
  .featured-walker { width:95px; height:95px; }
}
