/* Svarog Books theme: design tokens and components (from the approved prototype). */
/* Layout: a quiet storefront. Big sans statements, the book as the object on stage,
   alternating plain and deep "gallery" bands, one Svarog-orange accent used sparingly. */
:root {
  --bg: oklch(0.992 0.002 50);
  --bg-alt: oklch(0.962 0.004 50);
  --band: oklch(0.19 0.008 45);
  --band-fg: oklch(0.96 0.004 60);
  --band-muted: oklch(0.72 0.01 55);
  --fg: oklch(0.21 0.01 45);
  --muted: oklch(0.5 0.012 50);
  --line: oklch(0.89 0.005 50);
  --accent: oklch(0.65 0.175 38);
  --accent-ink: oklch(0.55 0.17 36);
  --on-accent: oklch(0.99 0.004 60);
  --nav: oklch(0.992 0.002 50 / 0.78);
  --shadow: 0 1px 2px oklch(0.2 0.02 45 / 0.08), 0 18px 40px -12px oklch(0.2 0.02 45 / 0.28);
  --shadow-hero: 0 2px 4px oklch(0.2 0.02 45 / 0.08), 0 40px 80px -24px oklch(0.25 0.04 40 / 0.45);

  --sans: "Onest", "Helvetica Neue", Arial, sans-serif;
  --serif: "Literata", Georgia, "Times New Roman", serif;

  --step--1: clamp(0.8rem, 0.78rem + 0.1vw, 0.86rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.08rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.45vw, 1.45rem);
  --step-2: clamp(1.6rem, 1.3rem + 1.4vw, 2.4rem);
  --step-3: clamp(2.2rem, 1.5rem + 3.2vw, 4.4rem);
  --step-4: clamp(2.6rem, 1.4rem + 5.4vw, 6.2rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --wrap: 1180px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: oklch(0.155 0.006 45);
    --bg-alt: oklch(0.2 0.007 45);
    --band: oklch(0.235 0.008 45);
    --band-fg: oklch(0.96 0.004 60);
    --band-muted: oklch(0.74 0.01 55);
    --fg: oklch(0.95 0.004 60);
    --muted: oklch(0.7 0.01 55);
    --line: oklch(0.3 0.008 45);
    --accent: oklch(0.7 0.165 40);
    --accent-ink: oklch(0.76 0.14 42);
    --on-accent: oklch(0.17 0.01 40);
    --nav: oklch(0.155 0.006 45 / 0.74);
    --shadow: 0 1px 2px oklch(0 0 0 / 0.3), 0 18px 40px -12px oklch(0 0 0 / 0.6);
    --shadow-hero: 0 2px 4px oklch(0 0 0 / 0.3), 0 40px 90px -24px oklch(0 0 0 / 0.75);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: oklch(0.155 0.006 45);
  --bg-alt: oklch(0.2 0.007 45);
  --band: oklch(0.235 0.008 45);
  --band-fg: oklch(0.96 0.004 60);
  --band-muted: oklch(0.74 0.01 55);
  --fg: oklch(0.95 0.004 60);
  --muted: oklch(0.7 0.01 55);
  --line: oklch(0.3 0.008 45);
  --accent: oklch(0.7 0.165 40);
  --accent-ink: oklch(0.76 0.14 42);
  --on-accent: oklch(0.17 0.01 40);
  --nav: oklch(0.155 0.006 45 / 0.74);
  --shadow: 0 1px 2px oklch(0 0 0 / 0.3), 0 18px 40px -12px oklch(0 0 0 / 0.6);
  --shadow-hero: 0 2px 4px oklch(0 0 0 / 0.3), 0 40px 90px -24px oklch(0 0 0 / 0.75);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--fg);
  font-family: var(--sans); font-size: var(--step-0); line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--nav); }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--nav); backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px); border-bottom: 1px solid color-mix(in oklch, var(--line) 70%, transparent); }
.nav .wrap { display: flex; align-items: center; gap: 28px; height: 52px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -0.01em; font-size: 0.98rem; white-space: nowrap; }
.brand svg { width: 22px; height: 22px; fill: var(--accent); flex: none; }
.links { display: flex; gap: 26px; margin-left: auto; font-size: 0.86rem; color: var(--muted); }
.links a { text-decoration: none; transition: color .2s; }
.links a:hover { color: var(--fg); }
.tools { display: flex; align-items: center; gap: 6px; margin-left: 10px; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; border: 0; background: transparent; color: var(--fg); cursor: pointer; transition: background-color .2s; position: relative; }
.icon-btn:hover { background: var(--bg-alt); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn .badge { position: absolute; top: 4px; right: 3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-size: 10px; font-weight: 600; line-height: 16px; text-align: center; font-variant-numeric: tabular-nums; }
.theme-ico-moon { display: none; }
:root[data-theme="dark"] .theme-ico-sun { display: none; }
:root[data-theme="dark"] .theme-ico-moon { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-ico-sun { display: none; } :root:not([data-theme="light"]) .theme-ico-moon { display: block; } }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(48px, 8vw, 104px) clamp(56px, 8vw, 112px); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.eyebrow { font-size: var(--step--1); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); }
.hero h1 { font-size: var(--step-4); line-height: 0.98; letter-spacing: -0.035em; font-weight: 700; margin-top: 18px; }
.hero h1 em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em; }
.hero .lede { margin-top: 24px; font-size: var(--step-1); line-height: 1.45; color: var(--muted); max-width: 34ch; }
.cta { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; margin-top: 36px; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 24px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 0.95rem; text-decoration: none; border: 0; cursor: pointer; transition: transform .25s var(--ease), background-color .2s; }
.btn:hover { transform: translateY(-1px); background: var(--accent-ink); }
.link-arrow { color: var(--accent-ink); font-weight: 500; text-decoration: none; }
.link-arrow::after { content: " ›"; transition: margin .25s var(--ease); }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }

.stage { position: relative; display: grid; justify-items: center; }
.stage .halo { position: absolute; inset: 8% -10% -6%; background: radial-gradient(closest-side, color-mix(in oklch, var(--accent) 16%, transparent), transparent 72%); z-index: 0; }
.stage figure { margin: 0; position: relative; z-index: 1; width: min(100%, 340px); }
.stage img { border-radius: 4px 10px 10px 4px; box-shadow: var(--shadow-hero); aspect-ratio: 492 / 780; object-fit: cover; width: 100%; transform: rotate(-2.5deg); transition: transform .8s var(--ease); }
.stage figure:hover img { transform: rotate(0deg) translateY(-6px); }
.stage figcaption { margin-top: 28px; display: grid; gap: 2px; text-align: center; }
.stage figcaption b { font-family: var(--serif); font-weight: 500; font-size: 1.1rem; }
.stage figcaption span { color: var(--muted); font-size: 0.9rem; }

/* ---------- Shelf ---------- */
section { scroll-margin-top: 64px; }
.shelf { background: var(--bg-alt); padding-block: clamp(64px, 9vw, 120px); transition: background-color .4s var(--ease); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px 40px; }
.section-head h2 { font-size: var(--step-3); line-height: 1.02; letter-spacing: -0.03em; font-weight: 700; max-width: 16ch; }
.section-head p { color: var(--muted); max-width: 40ch; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: color-mix(in oklch, var(--fg) 7%, transparent); margin-top: 36px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg button { border: 0; background: transparent; color: var(--fg); font: inherit; font-size: 0.86rem; font-weight: 500; height: 34px; padding: 0 16px; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: background-color .25s var(--ease), box-shadow .25s; }
.seg button[aria-pressed="true"] { background: var(--bg); box-shadow: 0 1px 3px oklch(0.2 0.02 45 / 0.16); }
.seg button .n { color: var(--muted); font-variant-numeric: tabular-nums; margin-left: 4px; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(156px, 18vw, 210px); gap: clamp(18px, 2.4vw, 32px); overflow-x: auto; padding-block: 36px 12px; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.book { scroll-snap-align: start; display: grid; gap: 14px; text-decoration: none; min-width: 0; }
.book .cover { aspect-ratio: 492 / 780; border-radius: 3px 7px 7px 3px; overflow: hidden; box-shadow: var(--shadow); transition: transform .45s var(--ease), box-shadow .45s var(--ease); background: var(--line); }
.book .cover img { width: 100%; height: 100%; object-fit: cover; }
.book:hover .cover { transform: translateY(-6px); }
.book .meta { display: grid; gap: 3px; min-width: 0; }
.book .lang { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.book .t { font-family: var(--serif); font-weight: 500; font-size: 1.02rem; line-height: 1.25; overflow-wrap: anywhere; }
.book .a { font-size: 0.86rem; color: var(--muted); }
.book .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.book .price { font-weight: 600; font-variant-numeric: tabular-nums; }
.book .buy { font-size: 0.8rem; font-weight: 600; color: var(--accent-ink); border: 1px solid color-mix(in oklch, var(--accent) 45%, transparent); border-radius: 999px; padding: 4px 12px; background: transparent; cursor: pointer; transition: background-color .2s, color .2s; }
.book .buy:hover, .book .buy.added { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.book[hidden] { display: none !important; }

/* ---------- Classics band ---------- */
.classics { background: var(--band); color: var(--band-fg); padding-block: clamp(72px, 10vw, 136px); }
.classics .eyebrow { color: color-mix(in oklch, var(--accent) 80%, var(--band-fg)); }
.classics h2 { font-size: var(--step-3); line-height: 1.02; letter-spacing: -0.03em; font-weight: 700; margin-top: 14px; max-width: 18ch; }
.classics .intro { color: var(--band-muted); max-width: 52ch; margin-top: 20px; font-size: var(--step-1); line-height: 1.45; }
.timeline { list-style: none; padding: 0; margin: clamp(48px, 7vw, 88px) 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); position: relative; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 13px; height: 1px; background: color-mix(in oklch, var(--band-fg) 18%, transparent); }
.timeline li { display: grid; gap: 18px; align-content: start; min-width: 0; }
.timeline .yr { font-size: 1.6rem; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; background: var(--band); padding-right: 12px; justify-self: start; position: relative; line-height: 1; }
.timeline a { text-decoration: none; display: grid; gap: 14px; }
.timeline img { aspect-ratio: 492 / 780; object-fit: cover; width: 100%; border-radius: 3px 7px 7px 3px; box-shadow: 0 24px 48px -16px oklch(0 0 0 / 0.6); transition: transform .45s var(--ease); }
.timeline a:hover img { transform: translateY(-6px); }
.timeline b { font-family: var(--serif); font-weight: 500; font-size: 1.08rem; }
.timeline span { color: var(--band-muted); font-size: 0.88rem; }

/* ---------- Series ---------- */
.series { padding-block: clamp(72px, 10vw, 136px); overflow-x: clip; }
.series .wrap { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(40px, 7vw, 96px); align-items: center; }
.series h2 { font-size: var(--step-3); line-height: 1.02; letter-spacing: -0.03em; font-weight: 700; margin-top: 14px; }
.series p.body { color: var(--muted); margin-top: 20px; max-width: 46ch; }
.vols { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.vols li { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) auto; gap: 16px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.vols .v { color: var(--muted); font-size: 0.82rem; font-weight: 500; }
.vols .t { font-family: var(--serif); font-size: 1.05rem; }
.vols .p { font-variant-numeric: tabular-nums; font-weight: 600; }
.fan { position: relative; height: clamp(340px, 42vw, 500px); }
.fan img { position: absolute; width: 46%; aspect-ratio: 492 / 780; object-fit: cover; border-radius: 3px 8px 8px 3px; box-shadow: var(--shadow-hero); top: 50%; left: 50%; transition: transform .7s var(--ease); }
.fan img:nth-child(1) { transform: translate(-112%, -50%) rotate(-7deg); }
.fan img:nth-child(2) { transform: translate(-50%, -54%); z-index: 2; }
.fan img:nth-child(3) { transform: translate(12%, -50%) rotate(7deg); }
.fan:hover img:nth-child(1) { transform: translate(-122%, -50%) rotate(-9deg); }
.fan:hover img:nth-child(3) { transform: translate(22%, -50%) rotate(9deg); }

/* ---------- Voice ---------- */
.voice { background: var(--bg-alt); padding-block: clamp(72px, 10vw, 128px); transition: background-color .4s var(--ease); }
.voice blockquote { margin: 0; font-family: var(--serif); font-size: var(--step-2); line-height: 1.3; letter-spacing: -0.01em; max-width: 30ch; }
.voice blockquote::before { content: "“"; color: var(--accent); }
.voice blockquote::after { content: "”"; color: var(--accent); }
.voice cite { display: block; margin-top: 28px; font-style: normal; font-size: 0.92rem; color: var(--muted); }
.voice cite b { color: var(--fg); font-weight: 600; }

/* ---------- Publish ---------- */
.publish { padding-block: clamp(72px, 10vw, 136px); }
.publish h2 { font-size: var(--step-3); line-height: 1.02; letter-spacing: -0.03em; font-weight: 700; max-width: 15ch; margin-top: 14px; }
.steps { list-style: none; padding: 0; margin: clamp(40px, 6vw, 72px) 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); counter-reset: s; }
.steps li { counter-increment: s; display: grid; gap: 10px; align-content: start; padding-top: 22px; border-top: 1px solid var(--line); }
.steps li::before { content: counter(s); font-size: 0.82rem; font-weight: 600; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.steps h3 { font-size: var(--step-1); font-weight: 600; letter-spacing: -0.015em; }
.steps p { color: var(--muted); }
.channels { margin-top: clamp(40px, 6vw, 64px); display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; color: var(--muted); font-size: 0.9rem; }
.channels b { color: var(--fg); font-weight: 600; letter-spacing: -0.01em; font-size: 1.05rem; }

/* ---------- Facts ---------- */
.facts { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts .wrap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fact { padding-block: 36px; padding-right: 24px; display: grid; gap: 6px; min-width: 0; }
.fact + .fact { padding-left: 24px; border-left: 1px solid var(--line); }
.fact .k { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.fact .v { font-size: var(--step-1); font-weight: 600; letter-spacing: -0.015em; }
.fact .d { color: var(--muted); font-size: 0.92rem; }

/* ---------- Journal ---------- */
.journal { padding-block: clamp(72px, 10vw, 128px); }
.journal h2 { font-size: var(--step-2); letter-spacing: -0.025em; font-weight: 700; }
.posts { list-style: none; padding: 0; margin: 32px 0 0; border-top: 1px solid var(--line); }
.posts a { display: grid; grid-template-columns: 9rem minmax(0, 1fr) auto; gap: 24px; align-items: baseline; padding: 26px 0; border-bottom: 1px solid var(--line); text-decoration: none; transition: padding .35s var(--ease); }
.posts a:hover { padding-left: 8px; }
.posts time { color: var(--muted); font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.posts h3 { font-family: var(--serif); font-weight: 500; font-size: var(--step-1); line-height: 1.3; }
.posts .go { color: var(--accent-ink); font-weight: 500; font-size: 0.9rem; white-space: nowrap; }

/* ---------- Footer ---------- */
footer { background: var(--bg-alt); color: var(--muted); font-size: 0.86rem; padding-block: 56px 40px; transition: background-color .4s var(--ease); }
footer .grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
footer h4 { margin: 0 0 12px; color: var(--fg); font-size: 0.86rem; font-weight: 600; }
footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--fg); }
footer .legal { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.mark { display: flex; gap: 10px; align-items: center; color: var(--fg); font-weight: 600; margin-bottom: 12px; }
.mark svg { width: 20px; height: 20px; fill: var(--accent); }


/* ---------- Load choreography (resting state is fully visible) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .9s var(--ease) both; }
  .d1 { animation-delay: .08s; } .d2 { animation-delay: .16s; } .d3 { animation-delay: .24s; } .d4 { animation-delay: .34s; }
  .stage figure { animation: lift 1.2s var(--ease) .2s both; }
  @keyframes rise { from { transform: translateY(14px); } to { transform: none; } }
  @keyframes lift { from { transform: translateY(28px) scale(.97); } to { transform: none; } }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } html { scroll-behavior: auto; } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .links { display: none; }
  .tools { margin-left: auto; }
  .hero .wrap, .series .wrap { grid-template-columns: minmax(0, 1fr); }
  .stage { order: -1; }
  .stage figure { width: min(46%, 220px); }
  .stage figcaption { margin-top: 18px; }
  .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; }
  .timeline::before { display: none; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .facts .wrap { grid-template-columns: minmax(0, 1fr); }
  .fact + .fact { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  footer .grid { grid-template-columns: 1fr 1fr; }
  .posts a { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .posts .go { display: none; }
  .fan { height: clamp(300px, 80vw, 420px); }
}
@media (max-width: 520px) {
  .vols li { grid-template-columns: 3.4rem minmax(0, 1fr) auto; gap: 10px; }
  footer .grid { grid-template-columns: minmax(0, 1fr); }
}

/* ================= Shared page parts ================= */
.view[hidden] { display: none !important; }
.links a[aria-current="page"] { color: var(--fg); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.82rem; color: var(--muted); margin-bottom: 22px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--fg); }
.crumbs > * + *::before { content: "/"; margin-right: 8px; color: var(--line); }
.page-head { padding-block: clamp(40px, 7vw, 88px) clamp(28px, 4vw, 48px); }
.page-head h1 { font-size: var(--step-3); line-height: 1.02; letter-spacing: -0.03em; font-weight: 700; max-width: 18ch; }
.page-head.tall h1 { font-size: var(--step-4); line-height: 0.98; letter-spacing: -0.035em; }
.page-head .sub { margin-top: 18px; font-size: var(--step-1); color: var(--muted); max-width: 46ch; line-height: 1.45; }
.h-sm { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 16px; }
.h-md { font-size: var(--step-2); font-weight: 700; letter-spacing: -0.025em; margin: 0 0 28px; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.prose { max-width: 66ch; min-width: 0; }
.prose p { margin: 0 0 1.1em; font-size: 1.06rem; line-height: 1.7; }
.prose h2 { font-size: var(--step-1); font-weight: 650; letter-spacing: -0.015em; margin: 2em 0 0.6em; }
.pull { margin: 2em 0; padding: 0; font-family: var(--serif); font-size: var(--step-2); line-height: 1.25; letter-spacing: -0.01em; color: var(--fg); }
.pull::before { content: "“"; color: var(--accent); }
.pull::after { content: "”"; color: var(--accent); }
.meta-line { font-size: 0.85rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ================= Shop ================= */
.shop { padding-block: 0 clamp(64px, 9vw, 120px); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.toolbar .seg { margin-top: 0; }
.selects { display: flex; flex-wrap: wrap; gap: 12px; }
.field-inline { display: inline-flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--muted); }
select, input[type="text"], input[type="email"], textarea {
  font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; min-width: 0;
}
select { padding-right: 30px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 20%, transparent); }
.result-count { margin: 18px 0 0; font-size: 0.85rem; color: var(--muted); }
.grid-books { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 176px), 1fr)); gap: clamp(28px, 3vw, 44px) clamp(18px, 2.4vw, 32px); margin-top: 28px; }
.grid-books.small { grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); margin-top: 0; }
.grid-books .book .t { font-size: 1rem; }
.grid-books.small .book .meta .row { display: none; }
.empty { grid-column: 1 / -1; color: var(--muted); padding: 40px 0; }

/* ================= Book ================= */
.product { padding-block: clamp(28px, 5vw, 56px) clamp(48px, 7vw, 88px); }
.product-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.product-media { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 80px); background: var(--bg-alt); border-radius: 18px; padding: clamp(28px, 5vw, 64px); display: grid; place-items: center; transition: background-color .4s var(--ease); }
.product-media img { width: min(100%, 340px); border-radius: 3px 8px 8px 3px; box-shadow: var(--shadow-hero); }
.product-info { display: grid; gap: 14px; align-content: start; min-width: 0; padding-top: 8px; }
.lang-tag { justify-self: start; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); }
.product-title { font-family: var(--serif); font-weight: 500; font-size: var(--step-3); line-height: 1.02; letter-spacing: -0.02em; }
.product-author { font-size: var(--step-1); color: var(--muted); text-decoration: none; justify-self: start; }
.product-author:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 4px; }
.product-lede { font-family: var(--serif); font-size: 1.12rem; line-height: 1.55; max-width: 48ch; margin-top: 6px; }
.formats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.format { display: grid; gap: 2px; text-align: left; min-width: 132px; padding: 12px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font: inherit; cursor: pointer; transition: border-color .2s, box-shadow .2s, background-color .2s; }
.format b { font-weight: 600; }
.format span { font-size: 0.9rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.format:hover { border-color: var(--muted); }
.format[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.buy-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; height: 46px; }
.qty button { width: 40px; height: 100%; border: 0; background: transparent; color: var(--fg); font-size: 1.1rem; cursor: pointer; }
.qty input { width: 36px; border: 0; padding: 0; text-align: center; background: transparent; font-variant-numeric: tabular-nums; }
.btn-wide { flex: 1 1 220px; justify-content: center; }
.ship-note { font-size: 0.88rem; color: var(--muted); }
.assurances { list-style: none; margin: 8px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); display: grid; gap: 6px; font-size: 0.88rem; color: var(--muted); }
.assurances li::before { content: "✓"; color: var(--accent-ink); margin-right: 10px; font-weight: 600; }
.product-body { padding-block: clamp(40px, 6vw, 80px); border-top: 1px solid var(--line); }
.two-col { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.specs dl, .facts-card dl { margin: 0; display: grid; }
.specs dl > div, .facts-card dl > div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 0.94rem; }
.specs dt, .facts-card dt { color: var(--muted); }
.specs dd, .facts-card dd { margin: 0; overflow-wrap: anywhere; }
.author-band { background: var(--bg-alt); padding-block: clamp(56px, 8vw, 104px); transition: background-color .4s var(--ease); }
.author-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.monogram { width: clamp(96px, 12vw, 148px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: var(--band); color: var(--band-fg); font-family: var(--serif); font-size: clamp(2rem, 4vw, 3rem); }
.author-grid h2 { font-size: var(--step-2); letter-spacing: -0.025em; font-weight: 700; margin-top: 8px; }
.author-grid .body { color: var(--muted); max-width: 58ch; margin: 14px 0 18px; }
.related { padding-block: clamp(56px, 8vw, 104px); }

/* ================= Page (About) ================= */
.page-body { padding-block: clamp(16px, 3vw, 32px) clamp(64px, 9vw, 120px); }
.page-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.8fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.prose .drop { font-size: var(--step-1); line-height: 1.55; }
.facts-card { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 80px); background: var(--bg-alt); border-radius: 18px; padding: 28px; display: grid; gap: 22px; transition: background-color .4s var(--ease); }
.facts-card .btn { justify-self: start; }

/* ================= Journal ================= */
.blog { padding-block: 0 clamp(64px, 9vw, 120px); }
.feature { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; text-decoration: none; padding-bottom: clamp(40px, 6vw, 72px); border-bottom: 1px solid var(--line); }
.feature img, .post-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 16px; transition: transform .6s var(--ease); }
.feature:hover img, .post-card:hover img { transform: scale(1.015); }
.feature-text { display: grid; gap: 14px; }
.feature-text h2 { font-family: var(--serif); font-weight: 500; font-size: var(--step-3); line-height: 1.05; letter-spacing: -0.02em; }
.feature-text p { color: var(--muted); font-size: var(--step-1); line-height: 1.45; }
.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 4vw, 48px); margin-top: clamp(40px, 6vw, 72px); }
.post-card { display: grid; gap: 12px; text-decoration: none; align-content: start; }
.post-card h3 { font-family: var(--serif); font-weight: 500; font-size: var(--step-1); line-height: 1.3; }
.post-card p { color: var(--muted); }

/* ================= Article ================= */
.article { padding-block: clamp(32px, 6vw, 72px) clamp(64px, 9vw, 120px); }
.narrow { max-width: calc(66ch + 40px); }
.article h1 { font-family: var(--serif); font-weight: 500; font-size: var(--step-3); line-height: 1.05; letter-spacing: -0.02em; margin-top: 14px; }
.standfirst { font-size: var(--step-1); color: var(--muted); line-height: 1.45; margin-top: 18px; }
.article-figure { margin: clamp(32px, 5vw, 56px) auto; max-width: 1080px; padding-inline: max(20px, env(safe-area-inset-left, 0px)) max(20px, env(safe-area-inset-right, 0px)); }
.article-figure img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 18px; }
.inline-books { margin-top: 3em; padding-top: 28px; border-top: 1px solid var(--line); }
.article-foot { margin-top: 40px; }

/* ================= Contact ================= */
.contact { padding-block: 0 clamp(64px, 9vw, 120px); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.contact-details { display: grid; gap: 36px; }
.cd-block p { margin: 0 0 6px; }
.big { font-size: var(--step-1); font-weight: 600; letter-spacing: -0.01em; }
.sel { user-select: all; }
.muted { color: var(--muted); font-size: 0.9rem; }
.desks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.desks li { display: grid; gap: 2px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.desks span { color: var(--muted); font-size: 0.9rem; }
.contact-form { display: grid; gap: 16px; background: var(--bg-alt); padding: clamp(22px, 4vw, 36px); border-radius: 20px; transition: background-color .4s var(--ease); }
.contact-form label { display: grid; gap: 6px; font-size: 0.85rem; font-weight: 500; min-width: 0; }
.contact-form input, .contact-form select, .contact-form textarea { width: 100%; font-weight: 400; font-size: 1rem; }
.contact-form textarea { resize: vertical; }
.contact-form .btn { justify-self: start; }
.row-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.opt { color: var(--muted); font-weight: 400; }
.form-status { margin: 0; font-size: 0.9rem; color: var(--muted); min-height: 1.4em; }
.form-status.err { color: var(--accent-ink); }

@media (max-width: 900px) {
  .product-grid, .two-col, .page-grid, .feature, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .product-media, .facts-card { position: static; }
  .post-grid { grid-template-columns: minmax(0, 1fr); }
  .author-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .row-2 { grid-template-columns: minmax(0, 1fr); }
  .toolbar { align-items: stretch; }
  .selects { width: 100%; }
  .selects { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; }
  .field-inline { display: contents; }
  .field-inline select { width: 100%; }
  .grid-books { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
}

.book a { text-decoration: none; }

.menu-btn { display: none; }
@media (max-width: 900px) {
  .menu-btn { display: grid; }
  .nav.open .links { display: grid; position: absolute; left: 0; right: 0; top: 100%; gap: 0; margin: 0; padding: 8px max(20px, env(safe-area-inset-right, 0px)) 16px max(20px, env(safe-area-inset-left, 0px)); background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px -18px oklch(0.2 0.02 45 / 0.35); font-size: 1.05rem; }
  .nav.open .links a { padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--fg); }
  .nav.open .links a:last-child { border-bottom: 0; }
  .product-media img { width: min(56%, 220px); }
  .product-media { padding: 28px; }
}
