/* ==========================================================================
   Making Way — "The Chart Room" stylesheet
   Parchment ground, ink navy, brass and oxblood; Cormorant Garamond display
   over Karla body. Layout: a centred 1120px column with generous section
   rhythm; decorative depth contours and a compass rose drawn from charts.
   ========================================================================== */

/* Fonts, hosted on this site (SIL Open Font License; see assets/fonts/). No requests go to Google. */
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/cormorant-garamond-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 500; font-display: swap; src: url("../fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 600; font-display: swap; src: url("../fonts/cormorant-garamond-latin-600-italic.woff2") format("woff2"); }
@font-face { font-family: "Karla"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/karla-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Karla"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/karla-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Karla"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/karla-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Karla"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/karla-latin-700-normal.woff2") format("woff2"); }

:root {
  /* Colour */
  --parchment: #F3ECDD;      /* page ground */
  --sand: #EBE2CE;           /* alternate section ground */
  --paper: #FAF5EA;          /* cards */
  --tan: #DDD0B4;            /* portrait / image placeholders */
  --ink: #14233A;            /* primary text, dark sections */
  --ink-deep: #0F1C2F;       /* footer */
  --ink-soft: #2B3A52;       /* body copy */
  --muted: #4A5568;          /* captions, meta */
  --brass: #C9A45C;          /* accent on dark grounds */
  --brass-text: #7A5A1C;     /* brass for text on light grounds (AA) */
  --oxblood: #7A2E22;        /* primary action */
  --oxblood-dark: #5C2018;
  --sea-green: #2E5A3A;      /* "available now" status */
  --on-ink: #F3ECDD;
  --on-ink-soft: #D9D2C2;
  --line: rgba(20, 35, 58, 0.16);
  --line-strong: rgba(20, 35, 58, 0.32);
  --line-on-ink: rgba(201, 164, 92, 0.4);
  --field-border: #767F8C;   /* form field edges: 3.9:1 on white */
  --focus: #14233A;          /* keyboard focus ring on light grounds */

  /* Type */
  --font-display: "Cormorant Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-body: "Karla", "Helvetica Neue", Arial, sans-serif;
  --fs-hero: clamp(3rem, 1.9rem + 5.2vw, 6.5rem);
  --fs-h1: clamp(2.75rem, 1.9rem + 3.9vw, 5.5rem);
  --fs-h2: clamp(2.1rem, 1.6rem + 2.1vw, 3.5rem);
  --fs-h3: clamp(1.55rem, 1.35rem + 0.8vw, 2.1rem);
  --fs-lead: clamp(1.125rem, 1.04rem + 0.35vw, 1.25rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9rem;
  --fs-label: 0.8rem;

  /* Space & layout */
  --gutter: clamp(16px, 5vw, 80px);
  --wrap: 1120px;
  --section: clamp(64px, 8vw, 112px);
  --radius: 2px;

  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
img { display: block; height: auto; }
a { color: var(--oxblood); }
a:hover { color: var(--oxblood-dark); }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.section--ink, .site-footer, .challenge, .skip-link { --focus: var(--brass); }
main:focus { outline: none; }
[hidden] { display: none !important; }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--ink); color: var(--on-ink); padding: 12px 18px; font-weight: 700;
}
.skip-link:focus { top: 16px; color: var(--on-ink); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Layout helpers ---------- */
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.wrap--narrow { width: min(720px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.stack-sm, .stack, .stack-lg { display: flex; flex-direction: column; }
.stack-sm { gap: 12px; }
.stack { gap: 22px; }
.stack-lg { gap: 40px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.split--reverse { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split--top { align-items: start; }
.split--7-4 { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
.split--5-6 { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.split--4-7 { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }

.section { padding-block: var(--section); position: relative; }
.section--sand { background: var(--sand); }
.section--ink { background: var(--ink); color: var(--on-ink); overflow: hidden; }
.section--ink a:not(.btn) { color: var(--brass); }
.section--ink a:not(.btn):hover { color: var(--on-ink); }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }
.section--flush-top { padding-top: 0; }
.bordered-bottom { border-bottom: 1px solid var(--line); }

/* ---------- Type ---------- */
.display, .h1, .h2, .h3 { font-family: var(--font-display); font-weight: 600; }
.display { font-size: var(--fs-hero); line-height: 0.92; letter-spacing: -0.015em; }
.h1 { font-size: var(--fs-h1); line-height: 0.96; letter-spacing: -0.01em; }
.h2 { font-size: var(--fs-h2); line-height: 1.04; }
.h3 { font-size: var(--fs-h3); line-height: 1.1; }
.subhead {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.75rem); line-height: 1.1; color: var(--brass-text);
}
.lead { font-size: var(--fs-lead); line-height: 1.6; color: var(--ink-soft); max-width: 36em; }
.prose { color: var(--ink-soft); max-width: 38em; }
.prose > * + * { margin-top: 1.1em; }
.section--ink .lead, .section--ink .prose { color: var(--on-ink-soft); }
.eyebrow {
  font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--brass-text); line-height: 1.4;
}
.section--ink .eyebrow { color: var(--brass); }
.meta { font-size: var(--fs-small); color: var(--muted); }
.status { font-size: var(--fs-label); font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.status--available { color: var(--sea-green); }
.question { font-family: var(--font-display); font-style: italic; font-size: 1.3rem; line-height: 1.4; color: var(--brass-text); }
.center { text-align: center; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 40px; }
.section-head--ruled { align-items: baseline; border-bottom: 2px solid var(--ink); padding-bottom: 16px; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0.85em 1.5em; border: 1px solid transparent; border-radius: var(--radius);
  font: 700 0.97rem/1.2 var(--font-body); letter-spacing: 0.02em; text-decoration: none; cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn--primary { background: var(--oxblood); color: #FBF6EC; }
.btn--primary:hover { background: var(--oxblood-dark); color: #FBF6EC; }
.btn--ink { background: var(--ink); color: var(--on-ink); }
.btn--ink:hover { background: #1F3354; color: var(--on-ink); }
.btn--outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--outline:hover { background: var(--ink); color: var(--on-ink); }
.btn--brass { background: var(--brass); color: var(--ink); }
.btn--brass:hover { background: #D8B872; color: var(--ink); }
.btn--light { background: #FBF6EC; color: var(--oxblood); }
.btn--light:hover { background: #fff; color: var(--oxblood-dark); }
.btn--ghost { border-color: rgba(243, 236, 221, 0.6); color: var(--on-ink); background: transparent; }
.btn--ghost:hover { background: rgba(243, 236, 221, 0.1); color: var(--on-ink); }
.btn--sm { min-height: 44px; padding: 0.7em 1.15em; font-size: 0.9rem; }

.link-arrow {
  font-weight: 700; color: var(--ink); text-decoration: underline;
  text-underline-offset: 6px; text-decoration-thickness: 1px;
}
.link-arrow:hover { color: var(--oxblood); }
.section--ink .link-arrow { color: var(--brass); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(243, 236, 221, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.2) blur(6px);
}
.site-header__inner { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand__name { font-family: var(--font-display); font-size: 1.85rem; font-weight: 700; letter-spacing: 0.01em; }
.site-nav { display: flex; align-items: center; gap: 36px; }
.site-nav__list { display: flex; gap: 32px; list-style: none; }
.site-nav__list a {
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem;
  padding-block: 8px; border-bottom: 2px solid transparent;
}
.site-nav__list a:hover { border-bottom-color: var(--line-strong); color: var(--ink); }
.site-nav__list a[aria-current="page"] { border-bottom-color: var(--brass); }
.nav-toggle { display: none; }

@media (max-width: 960px) {
  .site-header__inner { min-height: 72px; }
  .brand__name { font-size: 1.6rem; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px;
    background: transparent; border: 1px solid var(--line-strong); border-radius: var(--radius);
    font: 700 0.9rem var(--font-body); color: var(--ink); cursor: pointer;
  }
  .nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
    display: block; width: 18px; height: 2px; background: currentColor; position: relative; transition: transform 0.2s ease;
  }
  .nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle__bars::before { top: -6px; }
  .nav-toggle__bars::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 20px;
    padding: 16px var(--gutter) 28px; background: var(--parchment); border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px rgba(20, 35, 58, 0.12);
  }
  .js .site-nav:not(.is-open) { display: none; }
  .site-nav__list { flex-direction: column; gap: 0; }
  .site-nav__list a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .site-nav__list a[aria-current="page"] { border-bottom-color: var(--line); box-shadow: inset 3px 0 0 var(--brass); padding-left: 14px; }
  .site-nav__cta { align-self: flex-start; }
}

/* ---------- Decorative chart elements ---------- */
.has-contours { position: relative; overflow: hidden; }
.has-contours::before {
  content: ""; position: absolute; pointer-events: none;
  width: min(760px, 90vw); aspect-ratio: 1; right: -12%; top: -14%;
  background: url("../img/contours.svg") center / contain no-repeat; opacity: 0.9;
}
.has-contours > * { position: relative; }
.compass-bg { position: absolute; pointer-events: none; width: 420px; max-width: 70%; opacity: 0.9; color: var(--brass); }
.compass-bg--bl { left: -120px; bottom: -150px; }
.compass-bg--tr { right: -120px; top: -130px; }

.coords {
  display: flex; align-items: center; gap: 24px; min-height: 56px;
  border-block: 1px solid rgba(20, 35, 58, 0.2);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.24em; color: var(--muted); text-transform: uppercase;
}
.coords__ticks {
  flex: 1; height: 8px; min-width: 24px;
  background-image: repeating-linear-gradient(90deg, rgba(20, 35, 58, 0.35) 0 1px, transparent 1px 24px);
}
@media (max-width: 640px) {
  .coords { gap: 12px; letter-spacing: 0.14em; font-size: 0.68rem; }
  .coords__hide-sm { display: none; }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(56px, 8vw, 104px) clamp(64px, 8vw, 112px); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: center; }
.hero__copy { display: flex; flex-direction: column; gap: 26px; }
.page-hero { padding-block: clamp(56px, 7vw, 96px); border-bottom: 1px solid var(--line); }
.page-hero__copy { max-width: 880px; display: flex; flex-direction: column; gap: 22px; }
.breadcrumb { font-size: var(--fs-small); font-weight: 600; color: var(--muted); margin-bottom: 40px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--line-strong); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--ink); }
.section--ink .breadcrumb, .section--ink .breadcrumb a { color: #B8C0CC; }
.section--ink .breadcrumb [aria-current] { color: var(--on-ink); }

/* ---------- Book covers (typographic stand-ins until cover art is dropped in) ---------- */
.cover {
  --w: 300px;
  width: var(--w); max-width: 100%; aspect-ratio: 2 / 3; flex-shrink: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(var(--w) * 0.11) calc(var(--w) * 0.1);
  background: var(--ink); color: var(--on-ink);
  box-shadow: 0 26px 56px rgba(20, 35, 58, 0.3);
  font-size: calc(var(--w) * 0.04);
}
.cover--two { background: #2A3C58; color: #E9DFC8; }
.cover__series, .cover__author { text-transform: uppercase; }
.cover__series { font: 700 max(9px, 0.95em) / 1 var(--font-body); letter-spacing: 0.28em; color: var(--brass); display: flex; flex-direction: column; gap: 1.3em; }
.cover__series::after { content: ""; height: 1px; background: rgba(201, 164, 92, 0.5); }
.cover__title { font-family: var(--font-display); font-weight: 600; font-size: 3.1em; line-height: 1.02; }
.cover__author { font-size: max(9px, 1em); letter-spacing: 0.2em; color: var(--brass); }
.cover__rose { align-self: center; width: 42%; color: var(--brass); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover--image { padding: 0; }
.cover-stack {
  position: relative; width: 420px; max-width: 100%; aspect-ratio: 420 / 560; margin-inline: auto;
  container-type: inline-size;
}
.cover-stack .cover { position: absolute; font-size: 2.6cqi; padding: 7cqi 6.5cqi; }
.cover-stack .cover--two { width: 64%; right: 0; top: 0; }
.cover-stack .cover--one { width: 72%; left: 0; bottom: 0; }
/* Real cover art: dropped into assets/img/covers/, swapped in by build.py */
.cover.cover--image { padding: 0; background: var(--ink); }
.cover--image > :not(img) { display: none; }
/* Real covers keep their own proportions, so nothing is cropped */
.cover.cover--image { aspect-ratio: auto; height: auto; }
.cover--image img { height: auto; border: 1px solid var(--line); }
.badge {
  display: inline-block; background: var(--brass); color: var(--ink);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; padding: 8px 12px;
}
.cover-stack .badge { position: absolute; right: 8%; top: -14px; z-index: 2; }
.cover-frame { position: relative; display: flex; justify-content: center; }
.cover-frame .badge { position: absolute; top: -14px; right: calc(50% - 150px); }

/* ---------- Cards ---------- */
.card { background: var(--paper); border: 1px solid var(--line); padding: clamp(24px, 3vw, 40px); }
.link-card { display: flex; flex-direction: column; gap: 10px; color: var(--ink); text-decoration: none; transition: border-color 0.15s ease, transform 0.15s ease; }
.link-card:hover { color: var(--ink); border-color: var(--line-strong); transform: translateY(-2px); }
.book-card { display: flex; gap: 28px; align-items: flex-start; }
.book-card > .stack { flex: 1; min-width: 0; }
.book-card .cover { --w: 150px; box-shadow: 0 10px 24px rgba(20, 35, 58, 0.22); }
.book-card .cover__title { font-size: 2.95em; }
.feature { display: flex; flex-direction: column; gap: 14px; border-top: 2px solid var(--ink); padding-top: 22px; }
.feature p { color: var(--ink-soft); }

/* ---------- Crew ---------- */
.crew-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 40px 24px; }
.crew-grid--six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.crew-card__inner { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; color: var(--ink); text-decoration: none; }
a.crew-card__inner:hover { color: var(--ink); }
a.crew-card__inner:hover .portrait { border-color: var(--ink); transform: translateY(-2px); }
.crew-card__name { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; line-height: 1.1; }
.crew-card__line { font-size: var(--fs-small); line-height: 1.45; color: var(--muted); max-width: 16em; }
.portrait {
  width: 148px; max-width: 100%; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--tan); border: 1px solid var(--line-strong);
  font-family: var(--font-display); font-size: 2.8rem; font-weight: 600; color: var(--ink);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait--lg { width: 132px; flex-shrink: 0; }
.portrait--profile {
  width: 100%; aspect-ratio: 4 / 5; border-radius: 0; font-size: clamp(6rem, 12vw, 10rem); color: #B9A983;
}
.narrator { display: flex; gap: 28px; align-items: flex-start; color: var(--ink); text-decoration: none; }
.narrator:hover { color: var(--ink); border-color: var(--line-strong); }
.narrator p { color: var(--ink-soft); }
.narrator .question { color: var(--brass-text); }

.segmented { display: inline-flex; border: 1px solid var(--ink); border-radius: var(--radius); }
.segmented button {
  min-height: 46px; padding: 0 22px; border: 0; background: transparent; color: var(--ink);
  font: 700 0.95rem var(--font-body); cursor: pointer;
}
.segmented button[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.notice { display: flex; align-items: center; gap: 12px; font-size: 0.95rem; color: var(--muted); }

/* Profile page */
.profile__name { font-family: var(--font-display); font-weight: 600; font-size: clamp(4rem, 2.5rem + 5vw, 6rem); line-height: 0.92; }
.profile__fullname { font-family: var(--font-display); font-style: italic; font-size: 1.6rem; color: var(--muted); margin-top: -8px; }
.challenge { background: var(--ink); color: var(--on-ink); padding: clamp(24px, 3vw, 36px); display: flex; flex-direction: column; gap: 12px; }
.challenge .eyebrow { color: var(--brass); }
.challenge p:last-child { font-family: var(--font-display); font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.9rem); line-height: 1.3; }
.aside-rule { border-left: 2px solid var(--brass); padding-left: 24px; display: flex; flex-direction: column; gap: 8px; }
.aside-rule p:last-child { font-family: var(--font-display); font-style: italic; font-size: 1.5rem; line-height: 1.4; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 40px; }
.pager a { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); }
.pager a:last-child { align-items: flex-end; text-align: right; }
.pager__label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.18em; color: var(--muted); }
.pager__name { font-family: var(--font-display); font-size: 1.75rem; font-weight: 600; }

/* ---------- Lessons ---------- */
.lesson-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px; align-items: start; }
.lesson-card {
  background: var(--paper); border: 1px solid var(--line); padding: 28px;
  display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 110px;
}
.lesson-card:target { border-color: var(--brass); box-shadow: 0 0 0 2px var(--brass); }
.lesson-card__title { font-family: var(--font-display); font-size: 1.75rem; font-weight: 600; line-height: 1.1; }
.lesson-card__maxim { font-family: var(--font-display); font-style: italic; font-size: 1.2rem; line-height: 1.4; color: var(--ink-soft); }
.lesson-card__more summary {
  cursor: pointer; font-weight: 700; font-size: 0.93rem; color: var(--oxblood); list-style: none;
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
}
.lesson-card__more summary::-webkit-details-marker { display: none; }
.lesson-card__more summary::after { content: "+"; font-size: 1.2rem; line-height: 1; }
.lesson-card__more[open] summary::after { content: "–"; }
.lesson-card__body { display: flex; flex-direction: column; gap: 14px; padding-top: 6px; border-top: 1px solid var(--line); font-size: 0.98rem; color: var(--ink-soft); }
.lesson-card__body > :first-child { margin-top: 14px; }
.lesson-card__quote { margin: 0; font-family: var(--font-display); font-size: 1.35rem; font-style: italic; color: var(--ink); }

.dialogue { display: flex; flex-direction: column; gap: 14px; }
.dialogue p { display: flex; flex-direction: column; gap: 2px; }
.dialogue__speaker { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brass-text); }
.section--ink .dialogue { border-left: 1px solid var(--line-on-ink); padding-left: clamp(24px, 4vw, 48px); font-size: 1.15rem; color: #E9E1CF; }
.section--ink .dialogue__speaker { color: var(--brass); }
.dialogue__final { font-family: var(--font-display); font-size: 1.8rem; line-height: 1.25; color: #FBF6EC; }

/* ---------- Reading / excerpt ---------- */
.excerpt { font-family: var(--font-display); font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.6rem); line-height: 1.6; color: #1E2D45; }
.dropcap::first-letter {
  float: left; font-size: 4.1em; line-height: 0.82; font-weight: 700; padding: 0.08em 0.12em 0 0; color: var(--oxblood);
}
.placeholder {
  border: 1px dashed var(--line-strong); padding: 16px 20px; color: var(--muted);
  font-family: var(--font-body); font-size: 0.95rem; text-align: center;
}
.text-lines { display: flex; flex-direction: column; gap: 14px; }
.text-lines span { height: 14px; background: rgba(20, 35, 58, 0.09); }
.chapter-title { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; padding-block: 56px 48px; }
.chapter-title__rule { width: 120px; height: 1px; background: var(--ink); }
.chapter-text {
  max-width: 680px; padding-bottom: clamp(48px, 6vw, 80px);
  display: flex; flex-direction: column; gap: 1.1em;
  font-family: var(--font-display); font-size: clamp(1.2rem, 1.1rem + 0.45vw, 1.42rem); line-height: 1.7; color: #1E2D45;
}
.chapter-text p { margin: 0; text-indent: 1.5em; }
.chapter-text p.dropcap { text-indent: 0; }
.chapter-text ul { margin: 0; padding-left: 2.5em; display: flex; flex-direction: column; gap: 0.4em; font-style: italic; }
.chapter-text sup { font-size: 0.6em; }
.inscription {
  margin: 0.6em auto; padding: 1.4em 2.2em; text-align: center;
  border: 1px solid var(--line-strong); background: var(--paper);
  font-variant: small-caps; letter-spacing: 0.08em; line-height: 1.5;
}
.inscription p { text-indent: 0; }
.excerpt-note { font-family: var(--font-body); font-size: 0.95rem; font-style: italic; color: var(--muted); text-indent: 0 !important; text-align: center; }
.chapter-text__end { text-align: center; color: var(--brass-text); letter-spacing: 1em; text-indent: 0 !important; }
.pager--chapters { border-top: 1px solid var(--line); }
.chapter-links { list-style: none; display: flex; flex-direction: column; gap: 12px; min-width: min(100%, 320px); }
.chapter-link {
  display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; text-decoration: none;
  border: 1px solid var(--line-on-ink); color: var(--on-ink) !important; transition: background-color 0.15s ease;
}
.chapter-link:hover { background: rgba(243, 236, 221, 0.08); }
.chapter-link__title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; line-height: 1.15; }

/* ---------- Stats / lists ---------- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding-block: 24px; border-block: 1px solid var(--line-strong); }
.stats dt { order: 2; font-size: var(--fs-small); color: var(--muted); }
.stats dd { order: 1; margin: 0; font-family: var(--font-display); font-size: 2.6rem; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stats div { display: flex; flex-direction: column; gap: 4px; }
.details-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding-top: 22px; border-top: 1px solid var(--line-strong); }
.details-list div { display: flex; flex-direction: column; gap: 4px; }
.details-list dt { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.details-list dd { margin: 0; }
.timeline { list-style: none; }
.timeline li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; padding-block: 20px; border-top: 1px solid var(--line-strong); }
.timeline li:first-child { border-top: 2px solid var(--ink); }
.timeline li:last-child { border-bottom: 1px solid var(--line-strong); }
.timeline__when { font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.plain-list { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.plain-list strong { font-weight: 700; }
.place-list { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
.place-list li { padding-block: 12px; border-bottom: 1px solid var(--line-on-ink); font-family: var(--font-display); font-size: 1.35rem; }
.glossary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 64px; margin: 0; }
.glossary div { padding-block: 20px; border-bottom: 1px solid var(--line-strong); display: flex; flex-direction: column; gap: 6px; }
.glossary dt { font-family: var(--font-display); font-size: 1.75rem; font-weight: 700; }
.glossary dd { margin: 0; color: var(--ink-soft); }
.reviews { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.review { margin: 0; display: flex; flex-direction: column; gap: 18px; border-top: 2px solid var(--ink); padding-top: 24px; }
.review blockquote { margin: 0; font-family: var(--font-display); font-size: 1.6rem; line-height: 1.35; }
.review--placeholder blockquote { color: #7E8897; }
.review figcaption { font-size: var(--fs-small); font-weight: 700; color: var(--muted); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .inline-form__label { font-size: 0.9rem; font-weight: 700; }
.input, .select, .textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  border: 1px solid var(--field-border); border-radius: var(--radius); background: #FFFFFF; color: var(--ink);
  font: 400 1rem var(--font-body);
}
.textarea { min-height: 180px; resize: vertical; line-height: 1.5; }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--ink); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: #9B2C1F; border-width: 2px; }
.checkbox { display: flex; align-items: center; gap: 12px; color: var(--ink-soft); }
.checkbox input { width: 20px; height: 20px; accent-color: var(--ink); }
.inline-form { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 480px; }
.inline-form__row { display: flex; gap: 8px; }
.inline-form__row .input { flex: 1; min-width: 0; }
.form-status { font-size: 0.9rem; font-weight: 600; min-height: 1.4em; }
.form-status[data-state="error"] { color: #9B2C1F; }
/* Spam trap: hidden from people, filled in only by bots. */
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-form { display: flex; flex-direction: column; gap: 24px; }
.policy h2 { margin-top: 1.8em; }
.policy h2:first-child { margin-top: 0; }
.policy ul { padding-left: 1.4em; display: flex; flex-direction: column; gap: 0.3em; }
.site-footer__bottom a { text-decoration: underline; text-underline-offset: 3px; margin-left: 0.6em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #D9CFB8; padding-block: 64px; }
.site-footer a { color: #D9CFB8; text-decoration: none; }
.site-footer a:hover { color: var(--on-ink); text-decoration: underline; }
.site-footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; padding-bottom: 32px; border-bottom: 1px solid rgba(217, 207, 184, 0.2); }
.site-footer__brand { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--on-ink) !important; }
.site-footer__nav { list-style: none; display: flex; flex-wrap: wrap; gap: 12px 30px; font-weight: 600; font-size: 0.95rem; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 0.9rem; }
.site-footer__motto { font-family: var(--font-display); font-style: italic; font-size: 1.1rem; }

/* ---------- Home-specific ---------- */
.home-lesson { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.home-lesson .lesson-name { font-family: var(--font-display); font-size: clamp(4rem, 3rem + 4vw, 5.5rem); font-weight: 600; line-height: 0.95; }
.home-lesson .lesson-maxim { font-family: var(--font-display); font-style: italic; font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.75rem); line-height: 1.3; color: #E3D6B8; }
.author-photo {
  max-width: 480px; margin-inline: auto;
  width: 100%; aspect-ratio: 4 / 5; background: #D8CAAB; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.2em; color: var(--muted);
}
.author-photo img { width: 100%; height: 100%; object-fit: cover; }
.chart-figure { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.chart-figure svg { display: block; width: 100%; height: auto; background: #EFE5CF; border: 1px solid var(--line-strong); }
.chart-figure figcaption { font-size: 0.85rem; color: var(--muted); }
.vessel { border: 1px solid var(--line-on-ink); padding: clamp(28px, 3vw, 40px); display: flex; flex-direction: column; gap: 14px; }
.vessel__name { font-family: var(--font-display); font-size: 3rem; font-weight: 700; letter-spacing: 0.06em; line-height: 1; }
.vessel p { color: var(--on-ink-soft); }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.gallery__item { aspect-ratio: 4 / 3; background: #D8CAAB; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.2em; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .book-card { flex-direction: column; }
}
@media (max-width: 960px) {
  .hero__grid, .split, .split--reverse, .split--7-4, .split--5-6, .split--4-7, .home-lesson { grid-template-columns: minmax(0, 1fr); }
  .split--reverse > :first-child { order: 2; }
  .grid-3, .reviews { grid-template-columns: minmax(0, 1fr); }
  .crew-grid--six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cover-stack { width: 340px; }
}
@media (max-width: 720px) {
  .grid-2, .glossary, .place-list { grid-template-columns: minmax(0, 1fr); }
  .narrator { flex-direction: column; }
  .details-list, .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .inline-form__row { flex-direction: column; }
  .crew-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 16px; }
  .crew-grid--six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portrait { width: 128px; font-size: 2.4rem; }
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .pager__name { font-size: 1.4rem; }
  .cover-stack { width: 290px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
