/* Layout and type. Colours only through the variables in theme.css.

   Sizes are the prototype's (`tools/design/prototype/css/`, SPEC Appendix A):
   a 268 px sidebar and a 760 px reading column on a wide screen, the narrow
   layout below 760 px. The screens' rules follow the prototype's
   (`tools/design/prototype/css/app.css`), with its colour literals replaced
   by theme.css's roles. */

/* --- the serif, shipped with the app (SPEC §5.8, SF-SET-5) ---

   Source Serif 4, the variable fonts from Adobe's 4.005 release (OFL, licence
   beside them in src/fonts/). Variable, because the design uses weights 400
   to 700 and the optical-size axis; one file per style instead of eight.
   `font-display: swap`, so text never waits invisible for the font — it
   arrives from the app's own copy (sw.js lists both files), so the swap is
   normally before first paint anyway. */

@font-face {
  font-family: 'Source Serif 4';
  src: url('../fonts/SourceSerif4Variable-Roman.ttf.woff2') format('woff2');
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
}

@font-face {
  font-family: 'Source Serif 4';
  src: url('../fonts/SourceSerif4Variable-Italic.ttf.woff2') format('woff2');
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
}

:root {
  --font-serif: 'Source Serif 4', 'Iowan Old Style', Charter, Georgia, serif;
  --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;

  --radius: 12px;
  --radius-s: 8px;
  --sidebar-w: 268px;
  --content-w: 760px;
}

/* Every button refuses the platform's own drawing. Safari otherwise paints
   its own chrome over a button on iOS — a fault that shows only in WebKit on
   a real device (CasaFluxFE CF-GEN-018, through WeatherStripesFE). One rule
   here, so a new button needs nothing of its own; never widen it to a bare
   `input`. */
button,
input[type='button'],
input[type='submit'],
input[type='reset'] {
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}

.serif {
  font-family: var(--font-serif);
}

.muted {
  color: var(--muted);
}

/* --- the loading screen (index.html #boot, SF-NET-10) --- */

#boot {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: var(--bg);
  color: var(--muted);
}

#boot img {
  width: 96px;
  height: 96px;
  /* iOS's own corner rounding of a home-screen icon, so the two look alike. */
  border-radius: 22.37%;
}

#boot p {
  margin: 0;
  font-size: 0.95rem;
  /* Breathing rather than spinning: a spinner claims progress it cannot
     measure, and this is a wait whose length nobody knows. */
  animation: boot-pulse 1.6s ease-in-out infinite;
}

@keyframes boot-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  #boot p { animation: none; }
}

/* No rule hides #boot once the app has drawn: main.js removes it, and says
   why a `:has()` rule here was not enough in Safari. */

/* --- the shell --- */

#app {
  /* Installed on an iPhone the page runs under the status bar
     (`black-translucent`), so the insets are the app's to clear. */
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.brand {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Read by a screen reader, not shown. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.nowrap {
  white-space: nowrap;
}

/* Wide: the sidebar beside the page. Narrow (below 760 px, SPEC Appendix A):
   no sidebar, a bar at the top, never a tab bar (SF-NAV-1). Both are drawn;
   this decides which shows. */
.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  padding: 22px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar .brand {
  padding: 0 10px 14px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-s);
  color: var(--text-2);
}

.nav-link:hover {
  background: var(--surface-2);
}

.nav-link[aria-current='page'] {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.nav-title {
  flex: 1;
  min-width: 0;
  line-height: 1.25;
}

.nav-title small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.nav-section {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 16px 10px 6px;
}

.nav-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  flex: none;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--surface-2);
}

.nav-icon > .img {
  width: 100%;
  height: 100%;
}

.nav-glyph {
  background: none;
}

.sidebar .spacer {
  flex: 1;
}

.count {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 11px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 12px;
  font-weight: 600;
  display: inline-grid;
  place-items: center;
  font-family: var(--font-ui);
}

.column {
  min-width: 0;
}

.topbar {
  display: none;
}

.page {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 28px 32px 96px;
}

.page-wide {
  max-width: 1040px;
}

.icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 18px;
  display: inline-grid;
  place-items: center;
  color: var(--text-2);
  flex: none;
}

.icon-btn:hover {
  background: var(--surface-2);
}

@media (max-width: 760px) {
  #app {
    padding-top: 0;
  }

  .shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .topbar {
    display: flex;
    align-items: center;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 5;
    padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
  }

  .topbar .brand {
    font-size: 22px;
  }

  .topbar .title {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .page {
    padding: 16px 16px 96px;
  }
}

/* --- pictures and placeholders (SPEC §5.5, SF-IMG-1, SF-IMG-5) ---

   A slot is sized by its frame, never by its picture, so a picture arriving
   or failing moves nothing. The placeholder's tint is the dossier's hue
   (`--h`, set by the code) with theme.css's saturation and lightness. */

.img {
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
  container-type: inline-size;
}

.img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ph {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 90% at 15% 10%, hsl(var(--h) var(--ph-glow)), transparent 60%),
    linear-gradient(135deg, hsl(var(--h) var(--ph-from)), hsl(calc(var(--h) + 40) var(--ph-to)));
  color: hsl(var(--h) var(--ph-ink));
  font-family: var(--font-serif);
  font-weight: 600;
}

.ph-mono {
  font-size: clamp(14px, 30cqi, 64px);
  letter-spacing: -0.03em;
}

.ph-kind .icon {
  width: 34%;
  max-width: 40px;
  height: auto;
  opacity: 0.85;
}

.ph-video .icon,
.is-on .icon {
  fill: currentColor;
}

/* --- the hero and its picker (SPEC §4.3, §7) --- */

.hero {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 21 / 9;
  box-shadow: var(--shadow);
}

.hero > .img {
  position: absolute;
  inset: 0;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, var(--image-scrim));
  pointer-events: none;
}

.hero-text {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 20px;
  z-index: 1;
  color: var(--on-image);
}

.hero-text h1 {
  font-size: 40px;
  line-height: 1.1;
  text-shadow: 0 1px 12px var(--image-text-shadow);
}

.hero-text p {
  margin: 6px 0 0;
  font-size: 15px;
  opacity: 0.9;
  max-width: 60ch;
}

.kind-chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--chip-on-image);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  margin-bottom: 8px;
}

.hero-pick {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  height: 34px;
  padding: 0 12px 0 10px;
  border-radius: 17px;
  background: var(--control-on-image);
  color: var(--on-image);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

@media (max-width: 760px) {
  .hero {
    aspect-ratio: 4 / 3;
  }

  .hero-text {
    left: 16px;
    right: 16px;
    bottom: 14px;
  }

  .hero-text h1 {
    font-size: 30px;
  }

  .hero-text p {
    font-size: 14px;
  }
}

.picker {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 8px;
}

.pick {
  flex: none;
  width: 132px;
  text-align: left;
  font-size: 13px;
  color: var(--text-2);
}

.pick .img {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-s);
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.pick[aria-pressed='true'] .img {
  outline-color: var(--accent);
}

.pick > span {
  display: block;
  margin-top: 6px;
  line-height: 1.25;
}

.picker-empty {
  align-self: center;
  margin: 0 8px;
  font-size: 14px;
}

/* --- sections --- */

.section {
  margin-top: 36px;
}

.section-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-bottom: 12px;
}

.section-head h2 {
  font-size: 24px;
}

.section-head .muted {
  font-size: 14px;
}

.summary {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.6;
  margin: 0;
}

.new-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 1px 6px;
  border-radius: 5px;
  font-family: var(--font-ui);
  white-space: nowrap;
}

/* --- claims (SPEC §4.4) --- */

.question {
  margin-top: 26px;
}

.question h3 {
  font-size: 18px;
  line-height: 1.35;
  color: var(--text-2);
  font-weight: 500;
  font-style: italic;
  margin-bottom: 8px;
}

.claims {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.claims.folded {
  box-shadow: none;
  border-radius: 0;
  background: none;
}

.claim,
.fold {
  border-top: 1px solid var(--line);
}

.claims > :first-child {
  border-top: 0;
}

.claim a {
  display: grid;
  grid-template-columns: 124px 1fr auto;
  gap: 4px 14px;
  align-items: start;
  padding: 14px 16px;
}

.claim a:hover {
  background: color-mix(in srgb, var(--surface-2) 60%, transparent);
}

.claim-empty {
  padding: 14px 16px;
}

.stmt {
  font-size: 16px;
  line-height: 1.4;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
}

.claim .meta {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 13px;
  color: var(--muted);
}

.claim .chev {
  color: var(--muted);
  align-self: center;
  grid-row: 1 / span 2;
  grid-column: 3;
}

.claim.is-old .stmt {
  color: var(--muted);
}

.claim.is-debunked .stmt > span:first-child {
  text-decoration: line-through;
  text-decoration-color: var(--st-debunked);
}

@media (max-width: 760px) {
  .claim a {
    grid-template-columns: 1fr auto;
  }

  .claim .badge,
  .claim .meta,
  .claim .stmt {
    grid-column: 1;
  }

  .claim .chev {
    grid-row: 1 / span 3;
    grid-column: 2;
  }
}

.fold-line {
  display: flex;
  gap: 6px;
  width: 100%;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--muted);
  text-align: left;
}

/* --- badges, origins, grades (SPEC §5.1 to §5.4) --- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-self: start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 3px 8px 3px 7px;
  border-radius: 6px;
  white-space: nowrap;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 13%, transparent);
  font-family: var(--font-ui);
}

.badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c);
}

.badge.is-struck span {
  text-decoration: line-through;
}

.badge-lg {
  font-size: 13px;
  padding: 5px 10px 5px 9px;
}

.st-confirmed { --c: var(--st-confirmed); }
.st-corroborated { --c: var(--st-corroborated); }
.st-rumoured { --c: var(--st-rumoured); }
.st-debunked { --c: var(--st-debunked); }
.st-stale { --c: var(--st-stale); }

.transition {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.transition .badge {
  font-size: 10px;
  padding: 2px 6px 2px 5px;
}

.origins {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-2);
  display: block;
}

.origins b {
  color: var(--text-2);
  font-weight: 600;
}

.grade {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
}

.bar {
  display: inline-flex;
  gap: 2px;
}

.bar i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--grade-off);
  display: block;
}

.bar i.on {
  background: var(--grade-on);
}

.chip {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text-2);
}

/* --- changes (SPEC §5.6) --- */

.changes {
  list-style: none;
  margin: 0;
  padding: 0;
}

.change {
  position: relative;
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.change:first-child {
  border-top: 0;
}

.change .img {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-s);
}

.change .text {
  font-size: 15px;
  line-height: 1.45;
}

.change .when {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
}

.change.is-new .text {
  font-weight: 500;
}

.change.is-new::before {
  content: '';
  position: absolute;
  left: -14px;
  top: 18px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.changes-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 22px 0 4px;
}

.quiet-line {
  margin: 6px 0;
}

.show-older {
  margin-top: 12px;
}

@media (max-width: 760px) {
  .change {
    grid-template-columns: 88px 1fr;
  }

  .change.is-new::before {
    left: -10px;
  }
}

/* --- findings (SPEC §4.5) --- */

.findings {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.finding {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 18px 14px;
}

.finding h3 {
  font-size: 20px;
  line-height: 1.3;
}

.finding .row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.why {
  margin: 8px 0 12px;
  color: var(--text-2);
  font-size: 15px;
}

.why-label {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.source {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.source-text {
  flex: 1;
  min-width: 0;
}

.pointers {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
}

.pointers a {
  flex: none;
  width: 120px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.3;
}

.pointers .img {
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  margin-bottom: 4px;
}

.finding-flag {
  margin-top: 8px;
}

.quiet {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 14px;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--text-2);
}

.quiet p {
  margin: 0;
  font-weight: 600;
}

.quiet small {
  display: block;
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
}

/* --- home and the overview (SPEC §4.1, §4.2) --- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: block;
}

.card > .img {
  aspect-ratio: 16 / 9;
}

.card .body {
  padding: 12px 14px 14px;
}

.card h3 {
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card h3 .count {
  margin-left: auto;
}

.card .kind {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.card .line {
  font-size: 14px;
  color: var(--text-2);
  margin-top: 6px;
  line-height: 1.4;
}

.since-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  background: var(--accent-soft);
  border-radius: var(--radius);
}

.since-strip b {
  font-family: var(--font-serif);
  font-size: 18px;
}

.since-strip .muted {
  font-size: 14px;
}

.since-strip .chev {
  margin-left: auto;
  color: var(--accent);
}

.page-title {
  font-size: 34px;
  line-height: 1.15;
  margin-bottom: 6px;
}

.lede {
  color: var(--muted);
  margin: 0 0 24px;
}

.group {
  margin-top: 28px;
}

.group-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.group-head .nav-icon {
  width: 44px;
  height: 44px;
}

.group-head h2 {
  font-size: 22px;
}

.group-head .muted {
  font-size: 13px;
}

.caught-up {
  text-align: center;
  padding: 36px 0 28px;
}

.caught-up h1 {
  font-size: 30px;
}

.caught-up p {
  color: var(--muted);
  margin: 6px 0 0;
}

.notice {
  padding: 36px 0;
}

.notice a {
  text-decoration: underline;
}

/* --- claim and item pages (SPEC §4.6, §4.7) --- */

.crumbs {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.crumbs a:hover {
  color: var(--text);
}

.detail-title {
  font-size: 30px;
  line-height: 1.25;
  margin: 12px 0 10px;
}

.detail-title.is-debunked {
  text-decoration: line-through;
  text-decoration-color: var(--st-debunked);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
}

.item-meta {
  margin-top: 16px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 14px;
  white-space: nowrap;
}

.btn:hover {
  background: var(--surface-2);
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.btn-primary:hover {
  background: var(--text-2);
}

.btn.is-on {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
}

.btn-quiet {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.flag {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.flag-text {
  font-size: 14px;
  color: var(--muted);
}

.flag-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.flag-note input {
  flex: 1;
  min-width: 200px;
  height: 36px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 0 14px;
  font: inherit;
  font-size: 16px;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 22px;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--line);
}

.tl {
  position: relative;
  padding: 0 0 22px;
}

.tl::before {
  content: '';
  position: absolute;
  left: -21px;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 3px var(--bg);
}

.tl .when {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}

.tl p {
  margin: 6px 0 8px;
  color: var(--text-2);
  font-size: 15px;
}

.tl .mini-item {
  margin-top: 8px;
}

.evidence {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.ev {
  border-top: 1px solid var(--line);
}

.ev:first-child {
  border-top: 0;
}

.item-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  padding: 12px 14px;
  align-items: start;
}

.item-row .img,
.mini-item .img {
  aspect-ratio: 16 / 9;
  border-radius: 6px;
}

.t {
  font-size: 15px;
  line-height: 1.35;
}

.s {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.who {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

.ev-more {
  padding: 10px 14px;
  font-size: 14px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.touch {
  display: block;
  padding: 12px 14px;
}

.touch .s {
  margin: 0 0 4px;
}

.touch-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
}

.mini-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: var(--radius-s);
  background: var(--surface);
  box-shadow: var(--shadow);
  max-width: 460px;
}

.mini-item .t {
  font-size: 14px;
  line-height: 1.3;
}

.mini-item .s {
  font-size: 12px;
}

.item-hero {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.item-summary {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.6;
  margin: 16px 0 0;
}

.favs {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.fav {
  flex: none;
  width: 170px;
  font-size: 13px;
  line-height: 1.3;
  color: var(--text-2);
}

.fav .img {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-s);
  margin-bottom: 6px;
}

/* --- settings (SPEC §4.8) --- */

.settings {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.setting {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.setting .label {
  flex: 1;
  min-width: 160px;
}

.setting .label small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.setting-link .chev {
  color: var(--muted);
}

.segmented {
  display: inline-flex;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}

.segmented button {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-2);
}

.segmented button[aria-pressed='true'] {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

/* The release, in a corner and not a control (SF-SET-3). */
.version {
  margin: 28px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  justify-content: flex-end;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* --- a new version of the app (SF-UPD-1 to SF-UPD-5) --- */

.pill {
  height: 36px;
  padding: 0 16px;
  border-radius: 18px;
  background: var(--surface-2);
  font-size: 14px;
  font-weight: 600;
}

.vd {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--backdrop);
}

.vd[hidden] {
  display: none;
}

.vd-panel {
  max-width: 320px;
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.vd-message {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
}

/* What is about to happen, quieter than the question above it. */
.vd-countdown {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.vd-countdown[hidden] {
  display: none;
}

.vd-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 14px;
}

.vd-actions:empty {
  display: none;
}

.vd-primary {
  background: var(--accent);
  color: var(--on-accent);
}

/* The connection note (SF-NET-7): in the flow under the top, covering nothing,
   taking no input. */
.conn-note {
  margin: 0;
  padding: 6px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-2);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  pointer-events: none;
  user-select: none;
}

.conn-note[hidden] {
  display: none;
}

/* An offline action's confirmation (SPEC §9.3), as the prototype's toast. */
.confirmation {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 40;
  max-width: calc(100% - 32px);
  margin: 0;
  padding: 9px 16px;
  border-radius: 18px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  box-shadow: var(--shadow);
  pointer-events: none;
}

.confirmation[hidden] {
  display: none;
}
