/* Naya Pakistan Bazaar: one stylesheet, no external fonts or frameworks.
   Colours come from the crafts: ajrak indigo and madder, kashi turquoise, tilla gold, on paper. */
:root {
  --bg: #f8f4ec;
  --surface: #fffdf8;
  --surface-2: #f1eadc;
  --ink: #1f1a14;
  --muted: #6b6155;
  --line: #e2d9c7;
  --indigo: #1f3a6e;
  --indigo-deep: #142749;
  --madder: #a63a26;
  --kashi: #1d7a82;
  --gold: #a87a22;
  --paper: #f8f4ec;
  --link: #1f3a6e;
  --brand-ink: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(31, 26, 20, .06), 0 8px 28px rgba(31, 26, 20, .07);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #13110e; --surface: #1b1814; --surface-2: #231f1a; --ink: #efe8db; --muted: #a89d8c; --line: #322c24;
    --indigo: #8fa8e0; --indigo-deep: #0f1c36; --madder: #e3826c; --kashi: #6cc3c8; --gold: #e0b860; --paper: #efe8db;
    --link: #a9bdf0; --brand-ink: #13110e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #13110e; --surface: #1b1814; --surface-2: #231f1a; --ink: #efe8db; --muted: #a89d8c; --line: #322c24;
  --indigo: #8fa8e0; --indigo-deep: #0f1c36; --madder: #e3826c; --kashi: #6cc3c8; --gold: #e0b860; --paper: #efe8db;
  --link: #a9bdf0; --brand-ink: #13110e; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.65 var(--sans); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--link); text-underline-offset: .15em; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.hp { position: absolute; left: -9999px; }
.section { padding: 48px 0; }
.section-tight { padding: 28px 0; }
.eyebrow { font: 600 .78rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--madder); margin-bottom: .8em; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 40em; }
.fine { font-size: .85rem; color: var(--muted); }

/* Motif: an ajrak-style repeat, drawn inline (core/_motif.html) so it follows the theme. */
.motif { display: block; width: 100%; color: var(--indigo); }
.motif .m-bg { fill: var(--m-bg); }
.motif .m-fg { fill: var(--m-fg); }
.motif .m-dot { fill: var(--m-dot); }
.motif .m-line { fill: var(--m-line, var(--m-dot)); }
.tone-madder { --m-bg: var(--madder); --m-fg: var(--indigo-deep); --m-dot: #f8f4ec; }
.tone-indigo { --m-bg: var(--indigo-deep); --m-fg: #a63a26; --m-dot: #f8f4ec; }
.tone-kashi { --m-bg: #f4f1ea; --m-fg: #1d5f9a; --m-dot: #2aa0a8; --m-line: #1d5f9a; }
.tone-tilla { --m-bg: #241c12; --m-fg: #c99a3a; --m-dot: #f1d79a; }
.band { height: 22px; overflow: hidden; }
.band .motif { height: 22px; }

/* Header & footer */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name { font: 700 1.2rem/1.1 var(--serif); letter-spacing: -.01em; }
.brand-name small { display: block; font: 500 .7rem/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.site-nav { display: flex; align-items: center; gap: 20px; font-size: .95rem; }
.site-nav a:not(.btn) { color: var(--muted); text-decoration: none; }
.site-nav a:not(.btn):hover, .site-nav a[aria-current="page"] { color: var(--ink); }
@media (max-width: 760px) {
  .site-nav { gap: 14px; font-size: .9rem; }
  .site-nav .nav-extra { display: none; }
}
@media (max-width: 520px) { .site-nav .nav-mid { display: none; } .brand-name small { display: none; } .brand-name { font-size: 1.05rem; } }
.site-footer { background: var(--surface); border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; padding: 36px 0 12px; }
.footer-grid a { display: block; color: var(--muted); text-decoration: none; margin: 4px 0; }
.footer-grid a:hover { color: var(--ink); }
.footer-h { font-weight: 650; color: var(--ink); margin-bottom: .4em; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }
.footer-base { border-top: 1px solid var(--line); padding: 16px 0 28px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 999px;
  border: 1.5px solid transparent; font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn-primary { background: var(--madder); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-small { padding: 8px 14px; font-size: .9rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { color: var(--brand-ink); } }
:root[data-theme="dark"] .btn-primary { color: var(--brand-ink); }

/* Home hero */
.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 5.6vw, 3.8rem); }
.hero h1 em { font-style: italic; color: var(--madder); }
.hero-art { position: relative; aspect-ratio: 1; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); }
.hero-art .motif { height: 100%; }
.hero-art figcaption { position: absolute; left: 12px; bottom: 12px; background: rgba(20, 16, 12, .72); color: #f8f4ec;
  font-size: .8rem; padding: 4px 10px; border-radius: 999px; }
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-art { aspect-ratio: 16 / 7; }
}

/* Story cards */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head h2 { margin: 0; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; color: var(--ink); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card .card-art { height: 120px; }
.card .card-art .motif { height: 100%; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 { margin: 0; font-size: 1.25rem; }
.card-body p { margin: 0; color: var(--muted); font-size: .97rem; }
.card-meta { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--madder); font-weight: 600; }
.card-lead { display: grid; grid-template-columns: 1fr 1.1fr; }
.card-lead .card-art { height: auto; min-height: 260px; }
.card-lead .card-body { padding: 32px; justify-content: center; }
.card-lead h3 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
@media (max-width: 760px) { .card-lead { grid-template-columns: 1fr; } .card-lead .card-art { min-height: 140px; } .card-lead .card-body { padding: 22px; } }

/* Craft atlas */
.crafts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .crafts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .crafts-grid { grid-template-columns: 1fr; } }
.craft { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--kashi); border-radius: 10px; padding: 16px 18px; }
.craft h3 { margin: 0 0 2px; font-size: 1.12rem; }
.craft .place { font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.craft p { margin: 0 0 6px; font-size: .95rem; }
.craft a.more { font-size: .9rem; font-weight: 600; }
.province { margin-top: 36px; }
.province h2 { display: flex; align-items: center; gap: 12px; }
.province h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Maker band */
.maker-band { background: var(--indigo-deep); color: #f8f4ec; border-radius: 22px; overflow: hidden; display: grid; grid-template-columns: 1.4fr 1fr; }
.maker-band .inner { padding: 36px; }
.maker-band h2 { color: #fff; }
.maker-band p { color: #d8d2c4; }
.maker-band .band-art { position: relative; overflow: hidden; min-height: 160px; }
.maker-band .btn-ghost { background: transparent; color: #f8f4ec; border-color: rgba(248, 244, 236, .4); }
@media (max-width: 760px) { .maker-band { grid-template-columns: 1fr; } .maker-band .inner { padding: 24px; } .maker-band .band-art { min-height: 70px; } }

/* Story page */
.story-head { padding: 40px 0 24px; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.story-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .9rem; color: var(--muted); margin-top: 8px; }
.story-art { height: 120px; border-radius: 16px; overflow: hidden; margin: 8px 0 8px; }
.story-art .motif { height: 100%; }
.prose { font-size: 1.08rem; }
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .35em 0; }
.prose blockquote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--madder); font: italic 1.2rem/1.5 var(--serif); color: var(--ink); }
.cite { font-size: .72em; vertical-align: super; text-decoration: none; margin-left: 1px; }
.callout { background: var(--surface-2); border-radius: 12px; padding: 18px 20px; margin: 1.6em 0; }
.callout-title { font-weight: 700; margin-bottom: .4em; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.steps { counter-reset: step; list-style: none; padding: 0 !important; }
.steps li { counter-increment: step; position: relative; padding-left: 48px; margin: 1em 0; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%;
  background: var(--indigo); color: var(--bg); font: 700 .95rem/32px var(--sans); text-align: center; }
.table-wrap { overflow-x: auto; margin: 1.2em 0; }
.table { width: 100%; border-collapse: collapse; font-size: .97rem; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-weight: 650; background: var(--surface-2); }
details { border-bottom: 1px solid var(--line); padding: 12px 0; }
details summary { cursor: pointer; font-weight: 600; }
details p { margin: 10px 0 0; color: var(--muted); }
.sources { font-size: .9rem; color: var(--muted); padding-left: 1.3em; }
.sources li { margin: 4px 0; word-break: break-word; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 28px 0; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.share span { font-weight: 600; margin-right: 4px; }

/* Forms */
.contact-form { display: grid; gap: 6px; margin-top: 18px; }
.field-label { font-weight: 600; margin-top: 10px; }
.field { width: 100%; font: inherit; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
.field:focus { outline: 2px solid var(--kashi); outline-offset: 1px; border-color: transparent; }
.field-error, .form-errors { color: var(--madder); font-size: .92rem; margin: 2px 0 0; }
.contact-form .btn { justify-self: start; margin-top: 14px; }

/* Makers page */
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 24px 0; }
.how > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.how .num { font: 700 2rem/1 var(--serif); color: var(--madder); margin-bottom: 8px; }
@media (max-width: 760px) { .how { grid-template-columns: 1fr; } }
.maker-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* Error pages */
.error-page { padding: 72px 0; text-align: center; }

/* ---------- Motion ----------
   Everything below is decoration: content is visible without JavaScript, and prefers-reduced-motion turns it off. */

/* Drifting pattern: an oversized layer moves exactly one tile, so the loop is seamless. */
.band { position: relative; }
.drift { position: absolute; top: calc(var(--tile) * -1); left: calc(var(--tile) * -1); right: 0; bottom: 0; will-change: transform;
  animation: drift 9s linear infinite; }
.drift-x { top: 0; animation: drift-x 4s linear infinite; }
.drift .motif { height: 100%; }
.band .drift .motif { height: 22px; }
@keyframes drift { to { transform: translate(var(--tile), var(--tile)); } }
@keyframes drift-x { to { transform: translateX(var(--tile)); } }
.band-art .drift { animation-duration: 7s; }

/* Hero: headline lines rise in, and a medallion turns slowly over the pattern. */
.rise { display: block; animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--d, 0) * 110ms); }
.hero h1 .rise { display: inline-block; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero-medallion { position: absolute; top: 50%; left: 50%; width: 34%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%;
  background: #f8f4ec; box-shadow: 0 10px 40px rgba(20, 16, 12, .35); display: grid; place-items: center;
  animation: turn 40s linear infinite, pop .9s .5s cubic-bezier(.2, .9, .3, 1.3) both; }
.hero-medallion svg { width: 70%; height: 70%; }
@media (max-width: 820px) { .hero-medallion { width: auto; height: 64%; top: 50%; left: 74%; } }
@keyframes turn { to { rotate: 360deg; } }
@keyframes pop { from { scale: .4; opacity: 0; } to { scale: 1; opacity: 1; } }

/* Scroll reveal, with staggered children. */
.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-reveal][data-stagger] { opacity: 1; transform: none; }
.js [data-reveal][data-stagger] > * { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1);
  transition-delay: calc(var(--i, 0) * 80ms); }
.js [data-reveal][data-stagger].is-in > * { opacity: 1; transform: none; }

/* Hover: cards lift and their pattern breathes; buttons nudge. */
.card .card-art .motif { transition: transform .6s cubic-bezier(.2, .7, .2, 1); transform-origin: center; }
.card:hover .card-art .motif { transform: scale(1.08) rotate(.6deg); }
.btn { transition: transform .15s ease, box-shadow .15s ease, filter .15s ease, border-color .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.craft { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.craft:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

/* ---------- Home sections ---------- */
.stats { list-style: none; margin: 0; padding: 22px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.stats li { text-align: center; padding: 6px; }
.stats li + li { border-left: 1px solid var(--line); }
.stat-n { display: block; font: 700 clamp(2rem, 4.5vw, 2.8rem)/1 var(--serif); color: var(--madder); font-variant-numeric: tabular-nums; }
.stat-l { display: block; margin-top: 6px; font-size: .9rem; color: var(--muted); }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); } .stats li:nth-child(3) { border-left: 0; } }

.tablist { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.tab { font: 600 .95rem/1 var(--sans); padding: 10px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface);
  color: var(--muted); cursor: pointer; transition: all .2s ease; display: inline-flex; gap: 8px; align-items: center; }
.tab:hover { color: var(--ink); border-color: var(--muted); }
.tab[aria-selected="true"] { background: var(--indigo); border-color: var(--indigo); color: var(--bg); }
.tab-count { font-size: .75rem; background: rgba(127, 127, 127, .18); border-radius: 999px; padding: 3px 7px; }
.tabpanel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.tabpanel[hidden] { display: none; }
.tabpanel .panel-title { grid-column: 1 / -1; margin: 8px 0 0; }
.tabs-live .tabpanel .panel-title { display: none; }
.tabs-live .tabpanel { margin-bottom: 0; }
.tabs-live .tabpanel > * { animation: rise .5s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 70ms); }
@media (max-width: 900px) { .tabpanel { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .tabpanel { grid-template-columns: 1fr; } }

.inside { background: var(--surface-2); }
.inside-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: center; }
@media (max-width: 820px) { .inside-grid { grid-template-columns: 1fr; gap: 20px; } }
.stepper { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: var(--shadow); }
.stepper-bar { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; margin-bottom: 18px; display: none; }
.stepper-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--indigo), var(--madder)); transition: width .45s ease; }
.stepper-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.stepper-list li { display: grid; grid-template-columns: 44px 1fr; gap: 2px 14px; align-items: start; }
.stepper-list li[hidden] { display: none; }
.step-num { grid-row: span 2; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--indigo); color: var(--bg); font: 700 1.1rem/1 var(--serif); }
.stepper-list h3 { margin: 4px 0 0; }
.stepper-list p { margin: 0; color: var(--muted); }
.stepper-controls { display: none; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.stepper-dots { display: flex; gap: 6px; flex: 1; justify-content: center; }
.stepper-dots button { width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 0; background: var(--line); cursor: pointer; transition: all .2s ease; }
.stepper-dots button[aria-current="step"] { background: var(--madder); width: 22px; border-radius: 6px; }
.stepper.is-live .stepper-bar { display: block; }
.stepper.is-live .stepper-controls { display: flex; }
.stepper.is-live .stepper-list li { min-height: 120px; grid-template-columns: 64px 1fr; animation: rise .45s cubic-bezier(.2, .7, .2, 1) both; }
.stepper.is-live .step-num { width: 64px; height: 64px; font-size: 1.6rem; }
.stepper.is-live .stepper-list h3 { font-size: 1.45rem; }
.stepper.is-live .stepper-list p { font-size: 1.05rem; }
[data-step-count] { min-width: 4.5em; text-align: right; }

.tips { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tips li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; position: relative; overflow: hidden; }
.tips li::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--madder), var(--gold)); }
.tip-n { font: 700 1.6rem/1 var(--serif); color: var(--gold); display: block; margin-bottom: 8px; }
.tips h3 { font-size: 1.08rem; margin-bottom: 6px; }
.tips p { margin: 0; color: var(--muted); font-size: .95rem; }
@media (max-width: 900px) { .tips { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tips { grid-template-columns: 1fr; } }

.terms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.term { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; color: var(--ink); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.term:hover { transform: translateY(-2px); border-color: var(--kashi); box-shadow: var(--shadow); }
.term-word { font: 700 1.25rem/1.2 var(--serif); color: var(--kashi); }
.term-def { font-size: .92rem; color: var(--muted); }
@media (max-width: 900px) { .terms { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .terms { grid-template-columns: 1fr; } }

.sister { display: grid; grid-template-columns: 1fr 1.6fr; gap: 28px; padding: 28px; border-radius: 22px; background: var(--surface-2);
  border: 1px solid var(--line); }
.sister-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.sister-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; color: var(--ink); transition: transform .2s ease, box-shadow .2s ease; }
.sister-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.sister-card h3 { font-size: 1.08rem; margin: 0; }
.sister-card p { margin: 0; color: var(--muted); font-size: .92rem; flex: 1; }
@media (max-width: 980px) { .sister { grid-template-columns: 1fr; } }
@media (max-width: 680px) { .sister-cards { grid-template-columns: 1fr; } .sister { padding: 20px; } }

.follow { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 26px 28px;
  border-radius: 18px; border: 1px dashed var(--line); }
.follow h2 { margin-bottom: .2em; }
.follow p { margin: 0; }

/* Story page */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 50; pointer-events: none; }
.read-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--madder), var(--gold)); transform: scaleX(0); transform-origin: left; }
.related-sister { margin: 2em 0; padding: 20px 22px; border-radius: 14px; background: var(--surface-2); }
.related-sister h2 { margin-top: 0; font-size: 1.35rem; }
.related-sister ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.related-sister li { display: grid; gap: 2px; }
.related-sister li a { font-weight: 650; }
.related-sister li span { color: var(--muted); font-size: .95rem; }

/* Glossary */
.az { display: flex; flex-wrap: wrap; gap: 6px; margin: 20px 0 8px; }
.az a { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; font-weight: 650; color: var(--ink); }
.az a:hover { border-color: var(--kashi); color: var(--kashi); }
.az-letter { margin: 1.4em 0 .4em; font-size: 1.6rem; color: var(--madder); scroll-margin-top: 20px; }
.glossary-list { margin: 0; display: grid; gap: 10px; }
.g-item { padding: 14px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); scroll-margin-top: 20px; }
.g-item:target { border-color: var(--kashi); box-shadow: 0 0 0 3px rgba(29, 122, 130, .25); }
.g-item dt { font: 700 1.15rem/1.3 var(--serif); }
.g-item dd { margin: 4px 0 0; }
.g-more { display: inline-block; margin-left: 4px; font-size: .92rem; font-weight: 600; }

/* ---------- Makers ---------- */
.maker-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; color: var(--ink); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.maker-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.maker-photo { aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); position: relative; }
.maker-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.maker-card:hover .maker-photo img { transform: scale(1.05); }
.maker-photo .motif { position: absolute; inset: 0; height: 100%; }
.maker-body { padding: 16px 18px 20px; display: grid; gap: 4px; }
.maker-body h3 { margin: 0; font-size: 1.2rem; }
.maker-body p { margin: 0; color: var(--muted); font-size: .95rem; }

.draft-banner { background: var(--gold); color: #1f1a14; text-align: center; font-weight: 650; padding: 8px 16px; }
.maker-hero { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: start; }
@media (max-width: 860px) { .maker-hero { grid-template-columns: 1fr; gap: 24px; } }
.maker-facts { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.maker-facts li { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: .9rem; color: var(--muted); }
.maker-facts strong { color: var(--ink); font-weight: 650; margin-right: 4px; }
.maker-gallery { display: grid; grid-template-columns: 2fr 1fr; grid-auto-rows: 160px; gap: 10px; }
.maker-gallery .g-photo { border-radius: 14px; overflow: hidden; display: block; position: relative; background: var(--surface-2); }
.maker-gallery .g-photo:first-child { grid-row: span 2; }
.maker-gallery.single { grid-template-columns: 1fr; grid-auto-rows: 340px; }
.maker-gallery.single .g-photo:first-child { grid-row: auto; }
.maker-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.maker-gallery a.g-photo:hover img { transform: scale(1.04); }
.g-empty { grid-column: 1 / -1; grid-row: span 2; }
.g-empty .motif { position: absolute; inset: 0; height: 100%; }
@media (max-width: 560px) { .maker-gallery { grid-auto-rows: 110px; } .maker-gallery.single { grid-auto-rows: 260px; } }
.maker-columns { display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px; margin-top: 40px; }
@media (max-width: 860px) { .maker-columns { grid-template-columns: 1fr; gap: 12px; } }
.maker-side h2 { font-size: 1.25rem; margin-top: 1.4em; }
.side-story { display: grid; gap: 2px; padding: 12px 14px; margin-bottom: 8px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; transition: border-color .2s ease; }
.side-story:hover { border-color: var(--kashi); }
.story-makers { margin: 2em 0; }
.story-maker-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 560px) { .story-maker-list { grid-template-columns: 1fr; } }

/* ---------- Masters ---------- */
.master-seal { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--paper);
  color: var(--madder); font: 700 1.6rem/1 var(--serif); box-shadow: 0 4px 16px rgba(20, 16, 12, .25); }
.master-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.master-card { display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.master-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.master-card .master-seal { width: 46px; height: 46px; font-size: 1.35rem; background: var(--madder); color: var(--paper); margin-bottom: 6px; }
.master-card h3 { margin: 0; }
.master-card p { margin: 0; color: var(--muted); font-size: .95rem; }
@media (max-width: 900px) { .master-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .master-grid { grid-template-columns: 1fr; } }
.master-list { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 860px) { .master-list { grid-template-columns: 1fr; } }
.master { display: grid; grid-template-columns: 120px 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; scroll-margin-top: 20px; }
.master:target { border-color: var(--kashi); box-shadow: 0 0 0 3px rgba(29, 122, 130, .25); }
.master-art { position: relative; min-height: 140px; }
.master-art .motif { position: absolute; inset: 0; height: 100%; }
.master-art .master-seal { position: absolute; top: 50%; left: 50%; translate: -50% -50%; }
.master-body { padding: 18px 20px 20px; display: grid; gap: 6px; align-content: start; }
.master-body h3 { margin: 0; font-size: 1.25rem; }
.master-body p { margin: 0; font-size: .97rem; }
.master-body .more { font-size: .9rem; font-weight: 600; }
@media (max-width: 480px) { .master { grid-template-columns: 1fr; } .master-art { min-height: 70px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js [data-reveal], .js [data-reveal][data-stagger] > * { opacity: 1 !important; transform: none !important; }
}
