/* ==========================================================================
   dhirenvora.com — design system
   Palette drawn from Ahmedabad's built fabric: exposed brick, sandstone,
   lime-washed bone and graphite. No greens, navies or golds.
   Type: Petrona (display) · Red Hat Text (body) · Red Hat Mono (metadata)
   ========================================================================== */

:root {
  /* Surfaces */
  --bone: #f2ece3;          /* page background */
  --paper: #faf7f2;         /* raised surface */
  --sand: #e6dac8;          /* secondary surface */
  --sand-deep: #d3c3ab;     /* strong divider / tint */

  /* Text */
  --graphite: #1e1c1a;      /* primary text + dark surface */
  --graphite-2: #2c2926;    /* dark surface raised */
  --ink-2: #47423c;         /* secondary text (8.6:1 on bone) */
  --concrete: #675f56;      /* muted text / metadata (5.5:1 on bone) */

  /* Brand */
  --brick: #963f27;         /* primary / CTA (white text 6.7:1) */
  --brick-deep: #74301c;    /* hover / pressed */
  --brick-tint: #f1dfd4;    /* soft accent surface */
  --brick-light: #e7a98c;   /* accent on dark surfaces */
  --slate: #3d4850;         /* secondary — data, diagrams */

  /* Lines, states */
  --line: #d8ccbb;
  --line-dark: #45403a;
  --focus: #b8481f;
  --disabled-bg: #ddd4c7;
  --disabled-ink: #8a8177;
  --ok: #3f5b3a;            /* used only for form success text */
  --err: #9b1c1c;

  /* Type */
  --f-display: "Petrona", "Iowan Old Style", Georgia, serif;
  --f-body: "Red Hat Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Red Hat Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --t-h1: clamp(2.35rem, 1.3rem + 4.2vw, 5rem);
  --t-h2: clamp(1.8rem, 1.25rem + 2.1vw, 3.05rem);
  --t-h3: clamp(1.2rem, 1.08rem + .55vw, 1.55rem);
  --t-intro: clamp(1.12rem, 1.02rem + .45vw, 1.36rem);
  --t-body: 1.0625rem;
  --t-small: .9375rem;
  --t-caption: .8125rem;
  --t-meta: .72rem;

  /* Layout */
  --wrap: 1320px;
  --gutter: clamp(16px, 4vw, 56px);
  --header-h: 76px;
  --radius: 2px;
  --shadow: 0 1px 0 rgba(30, 28, 26, .06), 0 18px 40px -24px rgba(30, 28, 26, .35);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bone);
  color: var(--graphite);
  font-family: var(--f-body);
  font-size: var(--t-body);
  line-height: 1.7;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 500; line-height: 1.08; letter-spacing: -.015em; margin: 0; text-wrap: balance; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; }
figure { margin: 0; }
blockquote { margin: 0; }
::selection { background: var(--brick); color: #fff; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 1px; }
.on-dark :focus-visible, .site-footer :focus-visible, .menu-panel :focus-visible { outline-color: var(--brick-light); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--graphite); color: var(--paper); padding: 10px 16px; text-decoration: none;
  font-weight: 600; transition: top .2s;
}
.skip-link:focus { top: 12px; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Layout primitives ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { max-width: 860px; }
.section { padding-block: clamp(64px, 9vw, 132px); }
.section-tight { padding-block: clamp(44px, 6vw, 84px); }
.on-dark { background: var(--graphite); color: #efe8de; }
.on-dark .meta, .on-dark .eyebrow { color: #b9ada0; }
.on-sand { background: var(--sand); }
.on-paper { background: var(--paper); }
.on-tint { background: var(--brick-tint); }
.hair-top { border-top: 1px solid var(--line); }
.hair-bottom { border-bottom: 1px solid var(--line); }

/* ---------- Typography ---------- */
.h1 { font-size: var(--t-h1); }
.h2 { font-size: var(--t-h2); }
.h3 { font-size: var(--t-h3); line-height: 1.2; }
.intro { font-size: var(--t-intro); line-height: 1.55; color: var(--ink-2); max-width: 44ch; }
.on-dark .intro { color: #d8cec2; }
.prose { max-width: 68ch; }
.prose p { color: var(--ink-2); }
.on-dark .prose p { color: #d9d0c5; }
.prose h3 { margin: 2em 0 .6em; }
.prose strong { color: var(--graphite); font-weight: 600; }
.caption { font-size: var(--t-caption); color: var(--concrete); line-height: 1.5; }
.meta, .eyebrow {
  font-family: var(--f-mono); font-size: var(--t-meta); font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; color: var(--concrete); line-height: 1.5;
}
.eyebrow { display: inline-flex; align-items: center; gap: 12px; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--brick); flex: none; }
.on-dark .eyebrow::before { background: var(--brick-light); }
em.accent, .accent { font-style: italic; color: var(--brick); }
.on-dark .accent { color: var(--brick-light); }
.dropcap::first-letter {
  float: left; font-family: var(--f-display); font-size: 4.6em; line-height: .82;
  padding: .06em .12em 0 0; color: var(--brick); font-weight: 500;
}
.source-note { font-size: var(--t-caption); color: var(--concrete); border-left: 2px solid var(--sand-deep); padding-left: 14px; margin-top: 1.4em; line-height: 1.55; }
.source-note a { color: var(--ink-2); }

a.text-link, .prose a {
  color: var(--brick); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
  transition: color .2s;
}
a.text-link:hover, .prose a:hover { color: var(--brick-deep); }
.on-dark a.text-link, .on-dark .prose a { color: var(--brick-light); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 50px; padding: 0 22px;
  font-family: var(--f-body); font-weight: 600; font-size: .95rem; letter-spacing: .01em;
  text-decoration: none; border: 1px solid transparent; border-radius: var(--radius);
  cursor: pointer; transition: background .2s var(--ease), color .2s, border-color .2s, transform .2s;
}
.btn svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn-primary { background: var(--brick); color: #fff; }
.btn-primary:hover { background: var(--brick-deep); }
.btn-line { border-color: var(--graphite); color: var(--graphite); background: transparent; }
.btn-line:hover { background: var(--graphite); color: var(--paper); }
.on-dark .btn-line { border-color: #cfc4b7; color: #f4eee6; }
.on-dark .btn-line:hover { background: #f4eee6; color: var(--graphite); }
.btn[disabled], .btn[aria-disabled="true"] { background: var(--disabled-bg); color: var(--disabled-ink); border-color: var(--disabled-bg); cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* ==========================================================================
   Header — sticky
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(242, 236, 227, .94);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 10px 30px -26px rgba(30, 28, 26, .6); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); transition: height .25s var(--ease); }
.site-header.is-scrolled .header-inner { height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.brand-mark {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center;
  background: var(--brick); color: #fff; font-family: var(--f-display); font-weight: 600; font-size: 1.02rem; letter-spacing: .02em;
  border-radius: var(--radius);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--f-display); font-size: 1.28rem; font-weight: 600; letter-spacing: -.01em; }
.brand-sub { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--concrete); margin-top: 3px; }

.primary-nav ul { list-style: none; display: flex; align-items: center; gap: clamp(12px, 1.35vw, 24px); }
.primary-nav a {
  position: relative; display: inline-flex; align-items: center; padding: 8px 0;
  text-decoration: none; font-size: .9rem; font-weight: 500; color: var(--ink-2); white-space: nowrap;
  transition: color .2s;
}
.primary-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: var(--brick);
  transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.primary-nav a:hover { color: var(--graphite); }
.primary-nav a:hover::after, .primary-nav a[aria-current="page"]::after { transform: scaleX(1); }
.primary-nav a[aria-current="page"] { color: var(--graphite); font-weight: 600; }
.nav-cta { margin-left: 6px; }
.primary-nav .nav-cta a {
  padding: 9px 16px; background: var(--graphite); color: var(--paper); border-radius: var(--radius);
}
.primary-nav .nav-cta a::after { display: none; }
.primary-nav .nav-cta a:hover, .primary-nav .nav-cta a[aria-current="page"] { background: var(--brick); color: #fff; }

.menu-toggle {
  display: none; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px;
  background: transparent; border: 1px solid var(--graphite); border-radius: var(--radius); cursor: pointer;
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600;
}
.menu-toggle .bars { width: 18px; height: 10px; position: relative; }
.menu-toggle .bars::before, .menu-toggle .bars::after {
  content: ""; position: absolute; left: 0; width: 100%; height: 1.5px; background: currentColor; transition: transform .3s var(--ease), top .3s;
}
.menu-toggle .bars::before { top: 0; }
.menu-toggle .bars::after { top: 8.5px; }
.menu-toggle[aria-expanded="true"] .bars::before { top: 4.25px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars::after { top: 4.25px; transform: rotate(-45deg); }

/* Mobile menu panel */
.menu-panel {
  position: fixed; inset: 0; z-index: 99; background: var(--graphite); color: #efe8de;
  padding: calc(var(--header-h) + 20px) var(--gutter) 40px;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s linear .3s;
}
.menu-panel.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity .3s var(--ease), transform .3s var(--ease); }
.menu-panel ol { list-style: none; counter-reset: m; border-top: 1px solid var(--line-dark); }
.menu-panel li { counter-increment: m; border-bottom: 1px solid var(--line-dark); }
.menu-panel a {
  display: flex; align-items: baseline; gap: 18px; padding: 14px 0; text-decoration: none;
  font-family: var(--f-display); font-size: clamp(1.5rem, 5.5vw, 2.1rem); line-height: 1.15;
}
.menu-panel a::before { content: counter(m, decimal-leading-zero); font-family: var(--f-mono); font-size: .72rem; letter-spacing: .1em; color: #a79b8e; min-width: 22px; }
.menu-panel a[aria-current="page"] { color: var(--brick-light); }
.menu-panel .menu-foot { margin-top: 28px; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: #a79b8e; }
body.menu-open { overflow: hidden; }
body.menu-open .site-header { background: var(--graphite); border-bottom-color: var(--line-dark); }
body.menu-open .site-header .brand-name { color: #f4eee6; }
body.menu-open .site-header .brand-sub { color: #a79b8e; }
body.menu-open .menu-toggle { color: #f4eee6; border-color: #f4eee6; }

@media (max-width: 1180px) {
  .primary-nav { display: none; }
  .menu-toggle { display: inline-flex; }
}
@media (max-width: 420px) {
  .brand-sub { display: none; }
  .brand-name { font-size: 1.12rem; }
}

/* ==========================================================================
   Page masthead (shared pattern with per-page variants)
   ========================================================================== */
.sheet-label { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; padding-block: 18px; border-bottom: 1px solid var(--line); }
.sheet-label .meta b { color: var(--graphite); font-weight: 600; }
.on-dark .sheet-label { border-color: var(--line-dark); }
.on-dark .sheet-label .meta b { color: #f4eee6; }

.breadcrumb { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--sand-deep); }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--brick); }

/* ==========================================================================
   HOME
   ========================================================================== */
.home-hero { padding-top: clamp(32px, 5vw, 64px); padding-bottom: clamp(56px, 7vw, 100px); }
.home-hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(32px, 6vw, 96px); align-items: end; }
.home-hero h1 { font-size: clamp(2.5rem, 1.2rem + 5vw, 5.6rem); line-height: .98; letter-spacing: -.025em; }
.home-hero h1 .line-2 { display: block; color: var(--brick); font-style: italic; font-weight: 400; }
.home-hero .intro { margin-top: 28px; max-width: 40ch; }
.hero-credentials { list-style: none; display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 12px 36px; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); }
.hero-credentials li { display: flex; flex-direction: column; }
.hero-credentials b { font-family: var(--f-display); font-weight: 500; font-size: 1.1rem; }

.portrait-frame { padding-left: 44px; }
.pf-img { position: relative; }
.portrait-frame img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; background: var(--sand); }
.ruler {
  position: absolute; left: -44px; top: 0; bottom: 0; width: 30px;
  border-right: 1px solid var(--graphite);
  background-image: repeating-linear-gradient(to bottom, var(--graphite) 0 1px, transparent 1px 10%);
  background-size: 10px 100%; background-repeat: no-repeat; background-position: right top;
}
.ruler span { position: absolute; right: 14px; font-family: var(--f-mono); font-size: .6rem; letter-spacing: .08em; color: var(--concrete); transform: translateY(-50%); white-space: nowrap; }
.portrait-frame figcaption { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; }

.ledger { border-top: 1px solid var(--graphite); border-bottom: 1px solid var(--graphite); }
.ledger-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ledger-item { padding: 26px 22px 24px; border-left: 1px solid var(--line); }
.ledger-item:first-child { border-left: 0; padding-left: 0; }
.ledger-item .figure { font-family: var(--f-display); font-size: clamp(2rem, 1.4rem + 1.8vw, 3rem); line-height: 1; letter-spacing: -.02em; }
.ledger-item .figure small { font-size: .45em; letter-spacing: 0; margin-left: 3px; color: var(--concrete); }
.ledger-item p { margin-top: 10px; font-size: var(--t-small); color: var(--ink-2); line-height: 1.5; }
.ledger-foot { padding: 12px 0; }

/* Chapter strip: asymmetric storytelling */
.chapters { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 clamp(20px, 3vw, 40px); }
.chapters-head { grid-column: 1 / span 5; }
.chapters-head .intro { margin-top: 22px; }
.chapter-list { grid-column: 7 / span 6; list-style: none; counter-reset: ch; }
.chapter-list li { counter-increment: ch; display: grid; grid-template-columns: 64px 1fr; gap: 18px; padding: 28px 0; border-top: 1px solid var(--line); }
.chapter-list li:last-child { border-bottom: 1px solid var(--line); }
.chapter-list li::before { content: counter(ch, upper-roman); font-family: var(--f-display); font-style: italic; font-size: 1.6rem; color: var(--brick); line-height: 1.1; }
.chapter-list h3 { font-size: var(--t-h3); }
.chapter-list .meta { display: block; margin: 4px 0 10px; }
.chapter-list p { color: var(--ink-2); font-size: var(--t-small); }

/* Feature: quote over split */
.split-quote { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.big-quote { font-family: var(--f-display); font-size: clamp(1.6rem, 1.1rem + 2vw, 2.7rem); line-height: 1.22; letter-spacing: -.01em; font-weight: 400; }
.big-quote::before { content: "\201C"; display: block; font-size: 2.4em; line-height: .6; color: var(--brick-light); margin-bottom: 12px; }
.big-quote-cite { margin-top: 26px; display: block; }

/* Directory: index of the site */
.directory { list-style: none; border-top: 1px solid var(--graphite); }
.directory li { border-bottom: 1px solid var(--line); }
.directory a {
  display: grid; grid-template-columns: 70px minmax(0, 1.1fr) minmax(0, 1.4fr) 40px; gap: 20px; align-items: center;
  padding: 26px 0; text-decoration: none; transition: background .25s, padding .25s var(--ease);
}
.directory a:hover { background: var(--paper); padding-left: 16px; padding-right: 16px; }
.directory .num { font-family: var(--f-mono); font-size: .75rem; color: var(--concrete); letter-spacing: .1em; }
.directory .title { font-family: var(--f-display); font-size: clamp(1.35rem, 1.1rem + 1vw, 2rem); line-height: 1.1; }
.directory .desc { color: var(--ink-2); font-size: var(--t-small); line-height: 1.55; }
.directory .arrow { justify-self: end; width: 22px; height: 22px; color: var(--brick); transition: transform .25s var(--ease); }
.directory a:hover .arrow { transform: translateX(4px); }

/* ==========================================================================
   PROFILE (about)
   ========================================================================== */
.profile-mast { padding-block: clamp(48px, 7vw, 104px) clamp(32px, 4vw, 56px); }
.profile-mast h1 { font-size: clamp(3rem, 1.4rem + 7vw, 8rem); line-height: .9; letter-spacing: -.035em; }
.profile-mast .intro { margin-top: 26px; max-width: 52ch; }
.profile-body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 100px); align-items: start; }
.profile-aside { position: sticky; top: calc(var(--header-h) + 24px); }
.profile-aside img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 28%; }
.facts { margin-top: 22px; border-top: 1px solid var(--graphite); }
.facts div { display: grid; grid-template-columns: 120px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: var(--t-small); line-height: 1.5; }
.facts dt { font-family: var(--f-mono); font-size: var(--t-meta); letter-spacing: .1em; text-transform: uppercase; color: var(--concrete); padding-top: 3px; }
.facts dd { margin: 0; }
.long-read section + section { margin-top: clamp(48px, 6vw, 80px); padding-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--line); }
.long-read h2 { font-size: var(--t-h2); margin-bottom: 24px; }
.long-read .num-label { display: block; margin-bottom: 14px; }
.inline-quote { margin: 32px 0; padding: 26px 0 26px 28px; border-left: 3px solid var(--brick); font-family: var(--f-display); font-size: clamp(1.2rem, 1.05rem + .6vw, 1.5rem); line-height: 1.4; color: var(--graphite); }
.inline-quote cite { display: block; margin-top: 12px; font-family: var(--f-mono); font-style: normal; font-size: var(--t-meta); letter-spacing: .1em; text-transform: uppercase; color: var(--concrete); }

/* ==========================================================================
   JOURNEY — timeline
   ========================================================================== */
.journey-mast { padding-block: clamp(56px, 8vw, 120px) clamp(48px, 6vw, 84px); }
.journey-mast .span-years { font-family: var(--f-display); font-size: clamp(3.4rem, 1.5rem + 9vw, 10rem); line-height: .86; letter-spacing: -.04em; font-weight: 400; color: #f4eee6; }
.journey-mast .span-years i { color: var(--brick-light); font-weight: 300; }
.journey-mast-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: end; }
.era-nav { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.era-nav a { display: inline-block; padding: 8px 14px; border: 1px solid #6a625a; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; border-radius: var(--radius); transition: background .2s, border-color .2s; }
.era-nav a:hover { background: var(--brick); border-color: var(--brick); color: #fff; }

.era { padding-block: clamp(56px, 7vw, 100px); scroll-margin-top: 80px; }
.era + .era { border-top: 1px solid var(--line); }
.era-head { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 5vw, 80px); margin-bottom: clamp(32px, 4vw, 56px); }
.era-head h2 { font-size: var(--t-h2); }
.era-head .intro { max-width: 58ch; }
.timeline { list-style: none; position: relative; margin-left: calc(33.333% + 0px); }
.timeline::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 1px; background: var(--sand-deep); }
.timeline li { position: relative; display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 24px; padding: 0 0 38px 36px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 11px; width: 11px; height: 11px; background: var(--bone); border: 2px solid var(--brick); transform: rotate(45deg); }
.timeline li.major::before { background: var(--brick); }
.timeline .yr { font-family: var(--f-display); font-size: 1.75rem; line-height: 1.1; color: var(--brick); }
.timeline h3 { font-size: 1.25rem; line-height: 1.25; margin-bottom: 8px; }
.timeline p { color: var(--ink-2); font-size: var(--t-small); }
.timeline .caption { margin-top: 8px; }

/* ==========================================================================
   LANDMARKS — work
   ========================================================================== */
.landmark-mast { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 80px); align-items: end; padding-block: clamp(48px, 6vw, 96px) 0; }
.landmark-mast .intro { margin-top: 24px; }
.elevation { width: 100%; height: auto; }
.elevation text { font-family: var(--f-mono); }
.elevation-wrap { border-bottom: 1px solid var(--graphite); }
.elevation-caption { padding: 12px 0 0; }

.case { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 5fr) minmax(0, 4fr); gap: clamp(20px, 3.5vw, 56px); padding-block: clamp(40px, 5vw, 72px); border-top: 1px solid var(--line); }
.case:first-of-type { border-top: 1px solid var(--graphite); }
.case .case-no { font-family: var(--f-display); font-size: clamp(3rem, 2rem + 3vw, 5rem); line-height: .9; color: var(--sand-deep); font-weight: 400; }
.case h3 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.2rem); margin: 10px 0 18px; }
.case .spec { border-top: 1px solid var(--graphite); }
.case .spec div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: var(--t-small); }
.case .spec dt { color: var(--concrete); }
.case .spec dd { margin: 0; text-align: right; font-weight: 600; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 24px; }
.filter-bar button {
  min-height: 40px; padding: 0 16px; border: 1px solid var(--sand-deep); background: transparent; border-radius: 40px; cursor: pointer;
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; transition: background .2s, color .2s, border-color .2s;
}
.filter-bar button:hover { border-color: var(--graphite); }
.filter-bar button[aria-pressed="true"] { background: var(--graphite); color: var(--paper); border-color: var(--graphite); }
.catalogue-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.catalogue { width: 100%; border-collapse: collapse; font-size: var(--t-small); min-width: 560px; }
.catalogue caption { text-align: left; padding-bottom: 12px; }
.catalogue th { text-align: left; font-family: var(--f-mono); font-weight: 500; font-size: var(--t-meta); letter-spacing: .1em; text-transform: uppercase; color: var(--concrete); padding: 12px 14px 12px 0; border-bottom: 1px solid var(--graphite); }
.catalogue td { padding: 14px 14px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.catalogue td:first-child { font-family: var(--f-display); font-size: 1.2rem; color: var(--brick); width: 80px; }
.catalogue tr[hidden] { display: none; }
.tag { display: inline-block; padding: 2px 9px; font-family: var(--f-mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--sand-deep); border-radius: 30px; white-space: nowrap; margin: 0 4px 4px 0; }

/* ==========================================================================
   TOWNSHIPS — documentary
   ========================================================================== */
.doc-mast { position: relative; padding-block: clamp(56px, 8vw, 120px); overflow: hidden; }
.doc-mast-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.schematic { width: 100%; height: auto; }
.schematic text { font-family: var(--f-mono); }
.doc-chapter { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 7fr) minmax(0, 3fr); gap: clamp(20px, 4vw, 64px); padding-block: clamp(48px, 6vw, 88px); border-top: 1px solid var(--line); }
.doc-chapter .chap-mark { font-family: var(--f-mono); font-size: var(--t-meta); letter-spacing: .12em; text-transform: uppercase; color: var(--brick); }
.doc-chapter .chap-mark b { display: block; font-family: var(--f-display); font-size: clamp(2.6rem, 2rem + 2vw, 4rem); letter-spacing: -.02em; font-weight: 400; color: var(--graphite); line-height: 1; margin-top: 8px; text-transform: none; }
.doc-chapter h2 { font-size: clamp(1.6rem, 1.25rem + 1.4vw, 2.4rem); margin-bottom: 22px; }
.margin-note { font-size: var(--t-small); color: var(--ink-2); border-top: 2px solid var(--brick); padding-top: 14px; line-height: 1.55; align-self: start; }
.margin-note .figure { display: block; font-family: var(--f-display); font-size: 2.4rem; line-height: 1; color: var(--graphite); margin: 6px 0 8px; }

/* ==========================================================================
   COMMUNITY — data + narrative
   ========================================================================== */
.comm-mast { padding-block: clamp(56px, 7vw, 108px) clamp(40px, 5vw, 72px); }
.comm-mast h1 { max-width: 16ch; }
.stat-band { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--graphite); }
.stat-band > div { padding: 26px 22px 30px 0; border-right: 1px solid var(--sand-deep); }
.stat-band > div + div { padding-left: 22px; }
.stat-band > div:last-child { border-right: 0; }
.stat-band .figure { font-family: var(--f-display); font-size: clamp(2.2rem, 1.5rem + 2.2vw, 3.6rem); line-height: 1; letter-spacing: -.02em; color: var(--brick); }
.stat-band p { margin-top: 10px; font-size: var(--t-small); line-height: 1.5; color: var(--ink-2); }

.bar-chart { margin-top: 28px; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 220px) minmax(0, 1fr) 70px; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: var(--t-small); }
.bar-track { height: 16px; background: var(--sand); position: relative; }
.bar-fill { position: absolute; inset: 0 auto 0 0; background: var(--slate); }
.bar-fill.brick { background: var(--brick); }
.bar-row .val { text-align: right; font-family: var(--f-mono); font-size: .85rem; }

.narrative-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.alma-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.photo-pair { display: grid; grid-template-columns: 1fr 1.55fr; gap: 14px; align-items: end; }
.photo-pair figure img { width: 100%; object-fit: cover; background: var(--sand); }
.photo-pair .tall img { aspect-ratio: 336 / 595; object-position: 50% 30%; }
.photo-pair .wide img { aspect-ratio: 16 / 9; object-position: 50% 30%; }
.photo-pair figcaption { margin-top: 8px; }

/* ==========================================================================
   PERSPECTIVES — magazine
   ========================================================================== */
.mag-mast { text-align: center; padding-block: clamp(48px, 6vw, 88px) clamp(32px, 4vw, 56px); border-bottom: 3px double var(--graphite); }
.mag-mast .issue { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 28px; margin-bottom: 26px; }
.mag-mast h1 { font-size: clamp(2.6rem, 1.3rem + 6vw, 6.4rem); letter-spacing: -.03em; line-height: .95; }
.mag-mast .intro { margin: 24px auto 0; text-align: center; max-width: 56ch; }
.feature-article { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 6fr) minmax(0, 3fr); gap: clamp(20px, 4vw, 56px); padding-block: clamp(48px, 6vw, 88px); border-bottom: 1px solid var(--line); }
.feature-article .kicker { font-family: var(--f-mono); font-size: var(--t-meta); letter-spacing: .12em; text-transform: uppercase; color: var(--brick); }
.feature-article h2 { font-size: clamp(1.7rem, 1.25rem + 1.6vw, 2.6rem); margin-top: 14px; }
.feature-article .byline { margin-top: 18px; }
.article-body { columns: 2 280px; column-gap: 40px; color: var(--ink-2); }
.article-body p { break-inside: avoid-column; }
.article-body.single { columns: auto; }
.pull { font-family: var(--f-display); font-style: italic; font-size: clamp(1.3rem, 1.1rem + .8vw, 1.75rem); line-height: 1.35; color: var(--brick); border-top: 1px solid var(--graphite); border-bottom: 1px solid var(--graphite); padding: 22px 0; }
.pull cite { display: block; margin-top: 12px; font-style: normal; font-family: var(--f-mono); font-size: var(--t-meta); letter-spacing: .1em; text-transform: uppercase; color: var(--concrete); }
.label-box { display: inline-block; padding: 3px 10px; background: var(--sand); font-family: var(--f-mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 12px; }

/* ==========================================================================
   ARCHIVE — media
   ========================================================================== */
.archive-mast { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; padding-block: clamp(48px, 6vw, 96px) 28px; border-bottom: 1px solid var(--graphite); }
.contact-sheet { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; margin-top: 36px; }
.sheet-item { position: relative; margin: 0; }
.sheet-item button { display: block; width: 100%; padding: 0; border: 0; background: var(--sand); cursor: zoom-in; overflow: hidden; }
.sheet-item img { width: 100%; object-fit: cover; transition: transform .6s var(--ease), filter .4s; }
.sheet-item button:hover img { transform: scale(1.025); }
.sheet-item figcaption { display: flex; gap: 12px; justify-content: space-between; margin-top: 10px; }
.sheet-item.a { grid-column: 1 / span 8; }
.sheet-item.a img { aspect-ratio: 1800 / 1097; object-position: 50% 30%; }
.sheet-item.b { grid-column: 9 / span 4; }
.sheet-item.b img { aspect-ratio: 4 / 5; object-position: 50% 32%; }
.sheet-item.c { grid-column: 1 / span 6; }
.sheet-item.c img { aspect-ratio: 596 / 335; object-position: 50% 30%; }
.sheet-note { grid-column: 7 / span 6; align-self: center; padding: 28px; border: 1px solid var(--line); background: var(--paper); }
.frame-no { position: absolute; top: 10px; left: 10px; z-index: 1; background: rgba(30, 28, 26, .82); color: #f4eee6; font-family: var(--f-mono); font-size: .66rem; letter-spacing: .1em; padding: 3px 8px; pointer-events: none; }

.press-list { list-style: none; border-top: 1px solid var(--graphite); }
.press-list li { display: grid; grid-template-columns: 110px minmax(0, 1fr) minmax(0, 220px); gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.press-list .date { font-family: var(--f-mono); font-size: .8rem; color: var(--brick); letter-spacing: .06em; }
.press-list h3 { font-size: 1.2rem; line-height: 1.3; margin-bottom: 6px; }
.press-list p { font-size: var(--t-small); color: var(--ink-2); }
.press-list .src { font-size: var(--t-caption); color: var(--concrete); text-align: right; }

dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1200px, 94vw); max-height: 92vh; overflow: visible; }
dialog.lightbox::backdrop { background: rgba(20, 18, 16, .9); }
.lightbox img { max-width: 100%; max-height: 80vh; width: auto; margin: 0 auto; object-fit: contain; }
.lightbox p { color: #e9e1d6; text-align: center; margin-top: 14px; font-size: var(--t-small); }
.lightbox-close { position: absolute; top: -48px; right: 0; min-width: 44px; min-height: 44px; background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .5); cursor: pointer; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; padding: 0 12px; }

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 7vw, 120px); padding-block: clamp(56px, 7vw, 112px); align-items: start; }
.contact-grid h1 { font-size: clamp(2.6rem, 1.4rem + 4.6vw, 5.2rem); line-height: .96; letter-spacing: -.03em; }
.contact-lines { margin-top: 40px; border-top: 1px solid var(--graphite); }
.contact-lines div { padding: 16px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 130px 1fr; gap: 16px; }
.contact-lines dt { font-family: var(--f-mono); font-size: var(--t-meta); letter-spacing: .1em; text-transform: uppercase; color: var(--concrete); padding-top: 4px; }
.contact-lines dd { margin: 0; font-size: var(--t-small); line-height: 1.55; }
.contact-lines a { text-decoration: none; border-bottom: 1px solid var(--sand-deep); }
.contact-lines a:hover { border-color: var(--brick); color: var(--brick); }

.enquiry { background: var(--paper); border: 1px solid var(--line); padding: clamp(24px, 4vw, 48px); }
.enquiry h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); margin-bottom: 8px; }
.field { margin-top: 22px; }
.field label, .field legend { display: block; font-family: var(--f-mono); font-size: var(--t-meta); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 8px; font-weight: 500; }
.field .req { color: var(--brick); }
.field input, .field textarea, .field select {
  width: 100%; min-height: 50px; padding: 12px 14px; background: var(--bone); border: 1px solid var(--sand-deep); border-radius: var(--radius);
  font-size: 1rem; transition: border-color .2s, background .2s;
}
.field textarea { min-height: 150px; resize: vertical; line-height: 1.6; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--concrete); }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--brick); background: #fff; box-shadow: 0 0 0 3px rgba(150, 63, 39, .15); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--err); }
.field .err { display: none; margin-top: 6px; font-size: var(--t-caption); color: var(--err); }
.field.has-error .err { display: block; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.chips label { position: relative; margin: 0; text-transform: none; letter-spacing: 0; font-family: var(--f-body); font-size: .9rem; color: var(--graphite); }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--sand-deep); border-radius: 40px; cursor: pointer; transition: background .2s, color .2s; }
.chips input:checked + span { background: var(--graphite); color: var(--paper); border-color: var(--graphite); }
.chips input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.form-status { margin-top: 18px; font-size: var(--t-small); min-height: 1.5em; }
.form-status.ok { color: var(--ok); }
.form-status.bad { color: var(--err); }
.hp { position: absolute; left: -9999px; }

/* ==========================================================================
   CTA band + Footer (architectural title block)
   ========================================================================== */
.cta-band { padding-block: clamp(56px, 7vw, 100px); }
.cta-band-inner { display: grid; grid-template-columns: minmax(0, 1.4fr) auto; gap: 32px; align-items: end; }
.cta-band h2 { font-size: var(--t-h2); max-width: 20ch; }

.site-footer { background: var(--graphite); color: #d9d0c5; padding-top: clamp(56px, 7vw, 96px); }
.footer-top { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); padding-bottom: 48px; }
.footer-name { font-family: var(--f-display); font-size: clamp(2rem, 1.4rem + 2.4vw, 3.4rem); line-height: 1; color: #f4eee6; letter-spacing: -.02em; }
.footer-top p:not(.footer-name) { margin-top: 16px; font-size: var(--t-small); color: #b9ada0; max-width: 42ch; }
.footer-col h2 { font-family: var(--f-mono); font-size: var(--t-meta); letter-spacing: .14em; text-transform: uppercase; color: #a79b8e; font-weight: 500; margin-bottom: 16px; }
.footer-col ul { list-style: none; columns: 2; column-gap: 20px; }
.footer-col li { margin-bottom: 8px; break-inside: avoid; }
.footer-col a { text-decoration: none; font-size: var(--t-small); color: #e6ddd1; transition: color .2s; }
.footer-col a:hover { color: var(--brick-light); }
.footer-col address { font-style: normal; font-size: var(--t-small); line-height: 1.6; }

.title-block { display: grid; grid-template-columns: 2fr 1.2fr 1fr 1.4fr; border: 1px solid var(--line-dark); border-bottom: 0; }
.title-block > div { padding: 14px 16px; border-right: 1px solid var(--line-dark); min-width: 0; }
.title-block > div:last-child { border-right: 0; }
.title-block .meta { color: #8f8478; display: block; margin-bottom: 4px; font-size: .64rem; }
.title-block span:not(.meta) { font-size: .88rem; color: #efe8de; overflow-wrap: anywhere; }
.title-block a { color: #efe8de; text-decoration: none; }
.title-block a:hover { color: var(--brick-light); }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding: 18px 0 28px; border-top: 1px solid var(--line-dark); font-size: var(--t-caption); color: #a79b8e; }
.footer-base a { color: #d9d0c5; }
.footer-base button { background: none; border: 0; padding: 0; color: #d9d0c5; text-decoration: underline; cursor: pointer; font-size: inherit; min-height: 24px; }
.back-top { position: fixed; right: 18px; bottom: 18px; z-index: 50; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--graphite); color: #fff; display: grid; place-items: center; cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .3s, transform .3s, visibility 0s linear .3s, background .2s; box-shadow: var(--shadow); }
.back-top.is-visible { opacity: 1; visibility: visible; transform: none; transition: opacity .3s, transform .3s, background .2s; }
.back-top:hover { background: var(--brick); }
.back-top svg { width: 18px; height: 18px; }

/* ---------- Reveal (progressive; content always visible without JS) ---------- */
.js-reveal .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js-reveal .reveal.is-in { opacity: 1; transform: none; }

/* ---------- 404 ---------- */
.nf { min-height: 60vh; display: grid; align-content: center; padding-block: 80px; }
.nf .code { font-family: var(--f-display); font-size: clamp(5rem, 3rem + 10vw, 12rem); line-height: .85; color: var(--brick); letter-spacing: -.04em; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .ledger-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ledger-item:nth-child(4) { border-left: 0; padding-left: 0; }
  .ledger-item:nth-child(n+4) { border-top: 1px solid var(--line); }
  .case { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
  .case .case-side { grid-column: 2; }
  .feature-article { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
  .feature-article aside.pull-col { grid-column: 2; }
  .doc-chapter { grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); }
  .doc-chapter .margin-note { grid-column: 2; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-top > :first-child { grid-column: 1 / -1; }
  .title-block { grid-template-columns: 1fr 1fr; }
  .title-block > div:nth-child(2) { border-right: 0; }
  .title-block > div:nth-child(-n+2) { border-bottom: 1px solid var(--line-dark); }
}

@media (max-width: 900px) {
  :root { --header-h: 68px; }
  .home-hero-grid, .split-quote, .journey-mast-grid, .landmark-mast, .doc-mast-grid, .narrative-grid, .alma-grid, .contact-grid, .profile-body { grid-template-columns: minmax(0, 1fr); }
  .home-hero-grid .portrait-frame { max-width: 520px; }
  .chapters-head, .chapter-list { grid-column: 1 / -1; }
  .chapter-list { margin-top: 36px; }
  .profile-aside { position: static; max-width: 520px; }
  .era-head { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .timeline { margin-left: 6px; }
  .stat-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-band > div { padding: 22px 16px 24px 0; }
  .stat-band > div:nth-child(2) { border-right: 0; }
  .stat-band > div:nth-child(3) { padding-left: 0; }
  .stat-band > div:nth-child(n+3) { border-top: 1px solid var(--sand-deep); }
  .directory a { grid-template-columns: 44px minmax(0, 1fr) 28px; }
  .directory .desc { grid-column: 2; grid-row: 2; }
  .directory .arrow { grid-row: 1; grid-column: 3; }
  .sheet-item.a, .sheet-item.b, .sheet-item.c, .sheet-note { grid-column: 1 / -1; }
  .sheet-item.b { max-width: 380px; }
  .press-list li { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .press-list .src { text-align: left; }
  .cta-band-inner { grid-template-columns: minmax(0, 1fr); }
  .archive-mast { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .hero-credentials { grid-template-columns: 1fr 1fr; }
  .portrait-frame { padding-left: 34px; }
  .ruler { width: 24px; left: -34px; }
  .ruler span { right: 10px; font-size: .55rem; }
  .ledger-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ledger-item, .ledger-item:first-child { padding: 20px 14px 20px 0; border-left: 0; border-top: 1px solid var(--line); }
  .ledger-item:nth-child(-n+2) { border-top: 0; }
  .ledger-item:nth-child(even) { padding-left: 14px; border-left: 1px solid var(--line); }
  .ledger-item:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .timeline li { grid-template-columns: minmax(0, 1fr); gap: 4px; padding-left: 26px; }
  .case, .feature-article, .doc-chapter { grid-template-columns: minmax(0, 1fr); }
  .case .case-side, .feature-article aside.pull-col, .doc-chapter .margin-note { grid-column: auto; }
  .case .case-no { font-size: 2.6rem; }
  .facts div, .contact-lines div { grid-template-columns: 1fr; gap: 2px; }
  .field-row { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: minmax(0, 1fr) 60px; gap: 6px 12px; }
  .bar-row .bar-track { grid-column: 1 / -1; grid-row: 2; }
  .photo-pair { grid-template-columns: 1fr; }
  .photo-pair .tall { max-width: 300px; }
  .footer-top { grid-template-columns: 1fr; }
  .title-block { grid-template-columns: 1fr; }
  .title-block > div { border-right: 0; border-bottom: 1px solid var(--line-dark); }
  .article-body { columns: auto; }
  .directory a:hover { padding-left: 0; padding-right: 0; background: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .js-reveal .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .menu-panel, .back-top, .site-footer, .cta-band { display: none !important; }
  body { background: #fff; }
}

/* ---------- QA refinements ---------- */
.portrait-frame figcaption { flex-wrap: wrap; row-gap: 4px; }
@media (max-width: 900px) {
  .sheet-item.b { max-width: 320px; }
}
@media (max-width: 640px) {
  .back-top { width: 42px; height: 42px; right: 12px; bottom: 12px; }
}
