/* Folio Hush static site stylesheet
 * Palette matched directly to FolioTheme.swift & BookCoverView.swift:
 *   Light: Canvas #F7F3EB, Band #EFE9DC, Surface #FFFDFA, Ink #1D1B18,
 *          Secondary #544E45, Accent #1F5A46, Gold #85570B
 *   Dark:  Canvas #151412, Band #1B1916, Surface #22201C, Ink #F4EFE6,
 *          Secondary #BCB3A4, Accent #6ECBA8, Gold #E7BC66
 */

:root {
  color-scheme: light dark;
  --canvas: #F7F3EB;
  --band: #EFE9DC;
  --surface: #FFFDFA;
  --well: #E9E1D2;
  --ink: #1D1B18;
  --ink-secondary: #544E45;
  --line: #D7CEBD;
  --line-strong: #C3B7A2;
  --accent: #1F5A46;
  --accent-hover: #174736;
  --accent-soft: #E2EEE8;
  --on-accent: #FFFFFF;
  --gold: #85570B;
  --gold-soft: #F3E9D3;
  --danger: #A82424;
  --danger-soft: #F9E8E6;

  --glow-warm: rgba(230, 206, 170, 0.44);
  --glow-library: rgba(188, 214, 200, 0.40);
  --card-shadow: 0 3px 14px rgba(29, 27, 24, 0.055);
  --window-shadow:
    0 22px 48px rgba(29, 27, 24, 0.13),
    0 4px 14px rgba(29, 27, 24, 0.06);
  --rim-highlight: rgba(255, 255, 255, 0.72);
  --chrome-bg: #F3EDE0;
  --chrome-dot: #CFC5B2;
  --shelf-top: #DED4C1;
  --shelf-bottom: #C2B399;

  --font-serif: ui-serif, "New York", "Iowan Old Style", Georgia, Cambria, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --radius: 18px;
  --radius-sm: 12px;
  --max-width: 66rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #151412;
    --band: #1B1916;
    --surface: #22201C;
    --well: #2C2924;
    --ink: #F4EFE6;
    --ink-secondary: #BCB3A4;
    --line: #3F3A32;
    --line-strong: #534C42;
    --accent: #6ECBA8;
    --accent-hover: #84D6B7;
    --accent-soft: #1B332A;
    --on-accent: #0E1A15;
    --gold: #E7BC66;
    --gold-soft: #342A18;
    --danger: #F28484;
    --danger-soft: #3A211F;

    --glow-warm: rgba(74, 52, 34, 0.40);
    --glow-library: rgba(28, 56, 46, 0.42);
    --card-shadow: 0 6px 22px rgba(0, 0, 0, 0.34);
    --window-shadow:
      0 24px 52px rgba(0, 0, 0, 0.52),
      0 4px 16px rgba(0, 0, 0, 0.32);
    --rim-highlight: rgba(255, 248, 236, 0.07);
    --chrome-bg: #292621;
    --chrome-dot: #575046;
    --shelf-top: #50493F;
    --shelf-bottom: #342F29;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: #8A806F;
    --line-strong: #6A6152;
    --glow-warm: transparent;
    --glow-library: transparent;
  }
}

@media (prefers-color-scheme: dark) and (prefers-contrast: more) {
  :root {
    --line: #7B7266;
    --line-strong: #9B9183;
  }
}

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

html {
  font-size: 100%;
  background: var(--canvas);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1.25rem;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 1.03125rem;
  line-height: 1.62;
  color: var(--ink);
  background-color: var(--canvas);
  background-image:
    radial-gradient(640px 420px at 10% 0%, var(--glow-warm), transparent 72%),
    radial-gradient(680px 460px at 92% 18%, var(--glow-library), transparent 72%);
  background-repeat: no-repeat;
  overflow-wrap: break-word;
}

img, svg, picture {
  max-width: 100%;
  height: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.75rem 1.05rem;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  left: 0.75rem;
  top: 0.75rem;
  border-radius: 10px;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1.5px;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

main:focus {
  outline: none;
}

.wrap {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-inline: 1.35rem;
}

/* Preview / fixture banner */
.preview-banner {
  background: var(--danger-soft);
  border-bottom: 1px solid var(--danger);
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.45;
  padding: 0.6rem 0;
  overflow-wrap: anywhere;
}

.preview-banner strong {
  color: var(--danger);
}

.preview-banner code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1.25rem;
  padding-block: 0.9rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1.26rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  min-width: 0;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--line);
  display: block;
  flex: 0 0 auto;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.15rem;
  min-width: 0;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 500;
  padding: 0.28rem 0.1rem;
  border-bottom: 2px solid transparent;
  transition: color 0.14s ease, border-color 0.14s ease;
}

.site-nav a:hover {
  color: var(--accent);
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

main {
  flex: 1 0 auto;
}

/* Typography */
.kicker {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.15rem, 1.5rem + 2.8vw, 3.35rem);
  margin: 0 0 0.85rem;
}

h2 {
  font-size: clamp(1.5rem, 1.25rem + 1.1vw, 2.05rem);
  margin: 0 0 1.25rem;
}

h3 {
  font-size: 1.12rem;
  line-height: 1.3;
  margin: 0 0 0.3rem;
}

p {
  margin: 0 0 1rem;
}

ul, ol {
  margin: 0 0 1.2rem;
  padding-left: 1.35rem;
}

li {
  margin-bottom: 0.45rem;
}

code {
  font-family: var(--font-mono);
  font-size: 0.87em;
  background: var(--well);
  color: var(--ink);
  padding: 0.12em 0.38em;
  border-radius: 6px;
  overflow-wrap: anywhere;
}

.lead {
  font-size: clamp(1.06rem, 1rem + 0.35vw, 1.2rem);
  line-height: 1.58;
  color: var(--ink-secondary);
  max-width: 30rem;
  margin-bottom: 0;
}

/* Buttons */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.55rem;
}

.hero-actions-center {
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.65rem 1.35rem;
  border-radius: 13px;
  font-weight: 600;
  font-size: 0.96rem;
  text-decoration: none;
  border: 1px solid var(--accent);
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.95rem 0 0;
  font-size: 0.92rem;
  color: var(--ink-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
}

/* Section 1: Hero */
.hero-band {
  padding: clamp(2.4rem, 5vw, 4.4rem) 0 clamp(2.6rem, 5vw, 4.4rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 2.25rem 3rem;
  align-items: center;
}

.hero-copy,
.hero-visual {
  min-width: 0;
}

/* Crafted Folio Hush App Window Mockup */
.app-window {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--window-shadow), inset 0 1px 0 var(--rim-highlight);
  width: 100%;
}

.app-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.72rem 1rem;
  background: var(--chrome-bg);
  border-bottom: 1px solid var(--line);
}

.chrome-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  flex: 0 0 auto;
}

.chrome-dots .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--chrome-dot);
}

.chrome-tabs {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.18rem;
  border-radius: 999px;
  background: var(--well);
  border: 1px solid var(--line);
  min-width: 0;
}

.chrome-tab {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-secondary);
  padding: 0.16rem 0.56rem;
  border-radius: 999px;
  line-height: 1.3;
  white-space: nowrap;
}

.chrome-tab.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.app-body {
  padding: 1.1rem 1.1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.cover-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.bk-card {
  min-width: 0;
}

.bk-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 3px 9px 9px 3px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.18),
    0 2px 5px rgba(0, 0, 0, 0.10);
  display: flex;
  flex-direction: column;
}

.bk-hinge {
  position: absolute;
  inset: 0 auto 0 0;
  width: 10%;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.30),
    rgba(0, 0, 0, 0.05) 45%,
    rgba(255, 255, 255, 0.22) 72%,
    transparent
  );
  z-index: 2;
  pointer-events: none;
}

.bk-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(0.62rem, 0.5rem + 0.35vw, 0.8rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  display: block;
}

.bk-author {
  font-family: var(--font-sans);
  font-size: clamp(0.46rem, 0.42rem + 0.16vw, 0.56rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
  opacity: 0.85;
}

/* Cover 1: Forest Editorial Band */
.bk-forest {
  background: linear-gradient(170deg, #245D47, #113528);
  justify-content: space-between;
  padding: 11% 0 10%;
}

.bk-crest {
  width: 11px;
  height: 11px;
  margin-left: 18%;
  border-radius: 50%;
  border: 1.5px solid rgba(246, 241, 231, 0.78);
  position: relative;
}

.bk-crest::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: rgba(246, 241, 231, 0.78);
}

.bk-plate {
  background: #F6F1E7;
  color: #1D1B18;
  padding: 11% 10% 11% 17%;
  border-top: 1.5px solid rgba(31, 90, 70, 0.45);
  border-bottom: 1.5px solid rgba(31, 90, 70, 0.45);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.bk-plate .bk-author {
  color: #4D473F;
}

.bk-tag {
  align-self: flex-end;
  margin-right: 10%;
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #F6F1E7;
  background: rgba(255, 255, 255, 0.16);
  padding: 0.1rem 0.34rem;
  border-radius: 999px;
}

/* Cover 2: Vermilion Archway */
.bk-vermilion {
  background: linear-gradient(165deg, #C7422A, #862217);
  color: #FCF2E3;
  padding: 13% 11% 11% 16%;
  justify-content: space-between;
  align-items: center;
  text-align: center;
}

.bk-arch {
  width: 100%;
  flex: 1;
  margin-bottom: 8%;
  border-radius: 999px 999px 4px 4px;
  border: 1.25px solid rgba(252, 242, 227, 0.72);
  background: linear-gradient(180deg, rgba(252, 242, 227, 0.20), rgba(252, 242, 227, 0.04));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.35rem 0.2rem;
}

.bk-diamond {
  width: 8px;
  height: 8px;
  transform: rotate(45deg);
  background: #FCF2E3;
  opacity: 0.9;
}

/* Cover 3: Cobalt Swiss Grid */
.bk-cobalt {
  background: #F6F1E7;
  color: #1D1B18;
}

.bk-swiss-top {
  height: 48%;
  background: #20468C;
  position: relative;
  overflow: hidden;
  border-bottom: 1.5px solid rgba(246, 241, 231, 0.65);
}

.bk-swiss-orb {
  position: absolute;
  width: 66%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #122859;
  left: 12%;
  bottom: -24%;
}

.bk-swiss-rule {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 46%;
  width: 1px;
  background: rgba(246, 241, 231, 0.38);
}

.bk-swiss-foot {
  flex: 1;
  padding: 11% 10% 10% 17%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bk-swiss-foot .bk-author {
  color: #4D473F;
}

/* Cover 4: Burnished Ochre Framed Edition */
.bk-ochre {
  background: linear-gradient(165deg, #CA9229, #926215);
  color: #1F180B;
  padding: 11% 10% 11% 16%;
}

.bk-frame {
  flex: 1;
  border: 1.25px solid rgba(31, 24, 11, 0.45);
  border-radius: 3px;
  padding: 12% 8%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
}

.bk-label {
  font-size: 0.46rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  opacity: 0.78;
}

.bk-rule {
  width: 55%;
  height: 1px;
  background: rgba(31, 24, 11, 0.45);
}

/* Cover 5: Oxblood Classic Rule */
.bk-oxblood {
  background: linear-gradient(165deg, #74222C, #471119);
  color: #F6E6C9;
  padding: 14% 11% 14% 17%;
}

.bk-classic {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
}

.bk-rule-double {
  width: 78%;
  height: 4px;
  border-top: 1px solid rgba(246, 230, 201, 0.65);
  border-bottom: 1px solid rgba(246, 230, 201, 0.35);
}

/* Cover 6: Warm Linen Sage Plate */
.bk-linen {
  background: linear-gradient(170deg, #F1E9DA, #DDD0B9);
  color: #1D1B18;
  padding: 13% 11% 11% 16%;
  justify-content: space-between;
  align-items: center;
  text-align: center;
}

.bk-inset {
  width: 100%;
  flex: 1;
  margin-bottom: 9%;
  border-radius: 4px;
  background: #1F5A46;
  color: #F7F3EB;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
}

.bk-linen .bk-author {
  color: #4D473F;
}

/* Bottom reading bar inside window */
.app-dock {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.78rem;
  border-radius: 12px;
  background: var(--band);
  border: 1px solid var(--line);
}

.dock-swatch {
  width: 16px;
  height: 22px;
  border-radius: 2px 4px 4px 2px;
  background: linear-gradient(180deg, #245D47, #113528);
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex: 0 0 auto;
}

.dock-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.dock-title {
  font-family: var(--font-serif);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
}

.dock-track {
  display: block;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: var(--well);
  overflow: hidden;
}

.dock-fill {
  display: block;
  width: 71%;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}

.dock-pages {
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink-secondary);
  white-space: nowrap;
  flex: 0 0 auto;
}

/* Section 2: How it works (soft tonal band) */
.section-band {
  background: var(--band);
  border-block: 1px solid var(--line);
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.steps-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
}

.step-card {
  margin: 0;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.35rem 1.4rem;
  box-shadow: var(--card-shadow), inset 0 1px 0 var(--rim-highlight);
}

.step-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.95rem;
}

.step-num {
  font-family: var(--font-serif);
  font-size: 0.92rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink-secondary);
  letter-spacing: 0.04em;
}

.tile-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  flex: 0 0 auto;
}

.tile-icon-accent {
  background: var(--accent-soft);
  color: var(--accent);
}

.tile-icon-gold {
  background: var(--gold-soft);
  color: var(--gold);
}

.step-card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink-secondary);
}

/* Section 3: Asymmetric Spotlight (canvas) */
.spotlight-band {
  padding: clamp(2.6rem, 5vw, 4.25rem) 0;
}

.spotlight-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.25rem 3.25rem;
  align-items: center;
}

.spotlight-stage {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.35rem 1.35rem 1rem;
  box-shadow: var(--card-shadow), inset 0 1px 0 var(--rim-highlight);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.15rem;
}

.reading-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  background: var(--band);
  border: 1px solid var(--line);
}

.reading-thumb {
  position: relative;
  width: 42px;
  height: 60px;
  border-radius: 3px 6px 6px 3px;
  background: linear-gradient(170deg, #245D47, #113528);
  flex: 0 0 auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.16);
}

.thumb-hinge {
  position: absolute;
  inset: 0 auto 0 0;
  width: 14%;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.32), transparent);
}

.thumb-plate {
  width: 100%;
  height: 36%;
  background: #F6F1E7;
}

.reading-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

.reading-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 0.5rem;
}

.reading-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.reading-stars {
  display: inline-flex;
  align-items: center;
}

.star-on {
  fill: var(--gold);
}

.star-off {
  fill: var(--line-strong);
}

.reading-sub {
  font-size: 0.82rem;
  color: var(--ink-secondary);
}

.reading-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.15rem;
}

.reading-pill {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
}

.shelf-svg {
  width: 100%;
  max-width: 340px;
  height: auto;
  display: block;
}

.shelf-top { stop-color: var(--shelf-top); }
.shelf-bottom { stop-color: var(--shelf-bottom); }

.spotlight-copy {
  min-width: 0;
}

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

.quiet-item {
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.05rem 0;
  border-top: 1px solid var(--line);
}

.quiet-item:last-child {
  border-bottom: 1px solid var(--line);
}

.quiet-item > div {
  min-width: 0;
}

.quiet-item p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink-secondary);
}

/* Section 4: Compact Details block (flush above footer) */
.details-band {
  background: var(--band);
  border-top: 1px solid var(--line);
  padding: clamp(2.25rem, 4.5vw, 3.25rem) 0;
}

.details-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.45rem 1.55rem;
  box-shadow: var(--card-shadow), inset 0 1px 0 var(--rim-highlight);
}

.details-head {
  display: flex;
  align-items: center;
  gap: 1.05rem;
}

.details-icon {
  flex: 0 0 auto;
}

.details-icon img {
  width: 60px;
  height: 60px;
  border-radius: 15px;
  border: 1px solid var(--line);
  display: block;
}

.details-intro {
  min-width: 0;
}

.details-intro h2 {
  margin: 0;
  font-size: clamp(1.3rem, 2vw, 1.55rem);
}

.compat-copy {
  margin: 0.3rem 0 0;
  color: var(--ink-secondary);
  font-size: 0.95rem;
  max-width: 42rem;
}

.meta-list {
  display: grid;
  grid-template-columns: 0.78fr 0.88fr 1.2fr 1.12fr 1.65fr;
  gap: 0.95rem 1.25rem;
  margin: 1.25rem 0 0;
  padding: 1.15rem 0 0;
  border-top: 1px solid var(--line);
}

.meta-list > div {
  min-width: 0;
}

.meta-list dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-secondary);
  font-weight: 700;
}

.meta-list dd {
  margin: 0.2rem 0 0;
  font-weight: 600;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.meta-list a[href^="mailto:"] {
  overflow-wrap: anywhere;
}

/* Legal / Support / 404 reading wrapper */
.doc-wrap {
  padding-block: clamp(2.2rem, 4.5vw, 3.25rem) clamp(2.8rem, 5vw, 4rem);
}

article.legal {
  max-width: 45rem;
}

article.legal h1 {
  font-size: clamp(1.9rem, 3.5vw, 2.55rem);
  margin-bottom: 0.65rem;
}

article.legal h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  margin: 2.15rem 0 0.75rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--line);
}

article.legal h3 {
  margin: 1.25rem 0 0.35rem;
}

article.legal .page-meta {
  font-size: 0.94rem;
  color: var(--ink-secondary);
  margin-bottom: 1.55rem;
}

/* 404 card */
.folio-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.25rem 1.65rem;
  box-shadow: var(--card-shadow), inset 0 1px 0 var(--rim-highlight);
}

.not-found {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto;
}

.not-found-icon {
  margin-bottom: 0.85rem;
}

.not-found-copy {
  max-width: 30rem;
  margin: 0 auto 1.35rem;
  color: var(--ink-secondary);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 1.5rem 0;
  font-size: 0.92rem;
  color: var(--ink-secondary);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem 1.5rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.15rem;
  min-width: 0;
}

.footer-links a {
  color: var(--ink-secondary);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Responsive breakpoints */
@media (max-width: 960px) {
  .meta-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .meta-list > div:last-child {
    grid-column: span 2;
  }
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.9rem;
  }

  .spotlight-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.85rem;
  }
}

@media (max-width: 700px) {
  .steps-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .meta-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .meta-list > div:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .wrap {
    padding-inline: 1rem;
  }

  .app-chrome {
    padding: 0.6rem 0.75rem;
  }

  .app-body {
    padding: 0.8rem 0.75rem 0.75rem;
    gap: 0.75rem;
  }

  .cover-grid {
    gap: 0.55rem;
  }

  .chrome-tab {
    font-size: 0.66rem;
    padding: 0.14rem 0.44rem;
  }

  .app-dock {
    padding: 0.52rem 0.65rem;
    gap: 0.5rem;
  }

  .spotlight-stage {
    padding: 1rem 0.95rem 0.8rem;
  }

  .reading-card {
    padding: 0.72rem 0.78rem;
    gap: 0.72rem;
  }

  .details-panel {
    padding: 1.2rem 1.1rem;
  }

  .details-head {
    align-items: flex-start;
  }

  .details-icon img {
    width: 52px;
    height: 52px;
    border-radius: 13px;
  }
}

@media (max-width: 390px) {
  .chrome-dots {
    display: none;
  }

  .app-chrome {
    justify-content: center;
  }
}

@media (max-width: 345px) {
  .cover-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }

  .bk-title {
    font-size: 0.74rem;
  }

  .bk-author {
    font-size: 0.5rem;
  }

  .meta-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
