/* ===== Heartwood ===== */
:root {
  --paper: #f3ebdb; --paper2: #e8dcc4; --paper3: #dccdb0;
  --ink: #1e1712; --ink2: #4b3d31; --ink3: #7a6a5a;
  --walnut: #17100b; --walnut2: #241913; --walnut3: #33251b;
  --brass: #c19a52; --brass2: #e2c58c; --rust: #a5502e; --blue: #1f3a5c;
  --acc: #a0612e; --acc2: #e8c48c;
  --display: "Fraunces", Georgia, serif; --serif: "Newsreader", Georgia, serif;
  --hand: "Caveat", cursive; --mono: "IBM Plex Mono", ui-monospace, monospace;
  --maxw: 1240px; --ease: cubic-bezier(.2,.7,.2,1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 19px/1.62 var(--serif); font-optical-sizing: auto; -webkit-font-smoothing: antialiased; }
body::after { /* paper grain */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 999; opacity: .09; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .7 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 400; line-height: 1.05; margin: 0; letter-spacing: -.01em; }
.mono { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }
.hand { font-family: var(--hand); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
.eyebrow { font-family: var(--mono); font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: var(--acc); }
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ===== top bar ===== */
#topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: 60px; display: flex; align-items: center; gap: 28px; padding: 0 26px;
  color: var(--paper); transition: background .4s, color .4s, box-shadow .4s; }
#topbar.solid { background: rgba(23,16,11,.92); backdrop-filter: blur(10px); box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 1.32rem/1 var(--display); letter-spacing: .01em; font-variation-settings: "SOFT" 100; }
.brand-rings { width: 30px; height: 30px; fill: none; stroke: var(--brass2); stroke-width: 1.4; }
.brand-rings circle:last-child { fill: var(--brass2); }
#mainnav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
#mainnav a { text-decoration: none; font: 500 .7rem/1 var(--mono); letter-spacing: .15em; text-transform: uppercase; padding: 9px 11px; border-radius: 99px; opacity: .78; white-space: nowrap; transition: all .25s; }
#mainnav a:hover { opacity: 1; background: rgba(255,255,255,.08); }
#mainnav a.on { opacity: 1; background: var(--brass); color: var(--walnut); }
#searchBtn { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: inherit; padding: 7px 12px; border-radius: 99px; font: .78rem var(--mono); }
#searchBtn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
#searchBtn kbd { font: .62rem var(--mono); opacity: .55; border: 1px solid currentColor; padding: 1px 4px; border-radius: 4px; }

/* ===== HERO (home) ===== */
.hero { position: relative; height: 100vh; min-height: 680px; background: var(--walnut); overflow: hidden; color: var(--paper); }
.mosaic { position: absolute; inset: -40px 0; display: flex; flex-direction: column; gap: 14px; transform: rotate(-4deg) scale(1.12); opacity: .62; }
.mrow { display: flex; gap: 14px; width: max-content; animation: drift 120s linear infinite; }
.mrow:nth-child(2) { animation-direction: reverse; animation-duration: 150s; }
.mrow:nth-child(3) { animation-duration: 135s; }
.mrow:nth-child(4) { animation-direction: reverse; animation-duration: 165s; }
.mrow img { height: 25vh; min-height: 170px; width: auto; border-radius: 3px; filter: sepia(.25) saturate(.9) contrast(1.02); background: #2a1e15; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: radial-gradient(ellipse at 30% 55%, rgba(23,16,11,.35), rgba(23,16,11,.93) 70%), linear-gradient(180deg, rgba(23,16,11,.6), transparent 30%, transparent 70%, var(--walnut)); }
.hero-inner { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; padding: 0 7vw; }
.hero h1 { font-size: clamp(4.5rem, 14vw, 13rem); font-weight: 300; font-variation-settings: "SOFT" 100, "opsz" 144; letter-spacing: -.045em; line-height: .86; }
.hero h1 em { font-style: italic; color: var(--brass2); font-weight: 300; }
.hero .lede { font-size: clamp(1.1rem, 1.9vw, 1.55rem); max-width: 36ch; margin: 28px 0 34px; color: #e9dcc6; font-weight: 300; }
.hero-stats { display: flex; gap: 38px; flex-wrap: wrap; margin-top: 10px; }
.hero-stats div { font-family: var(--display); font-size: 2.4rem; line-height: 1; font-weight: 300; }
.hero-stats span { display: block; font: .64rem var(--mono); letter-spacing: .2em; text-transform: uppercase; opacity: .65; margin-top: 6px; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; border-radius: 99px; background: var(--brass); color: var(--walnut); text-decoration: none; font: 500 .74rem var(--mono); letter-spacing: .16em; text-transform: uppercase; border: 0; transition: transform .25s, background .25s; }
.btn:hover { transform: translateY(-2px); background: var(--brass2); }
.btn.ghost { background: transparent; color: inherit; border: 1px solid currentColor; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.scroll-cue { position: absolute; bottom: 28px; left: 50%; z-index: 2; transform: translateX(-50%); font: .62rem var(--mono); letter-spacing: .3em; color: var(--brass2); opacity: .7; text-transform: uppercase; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translate(-50%, 8px); } }

/* ===== Lenses intro ===== */
.lenses { background: var(--walnut); color: var(--paper); padding: 40px 0 120px; }
.lens-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: rgba(255,255,255,.08); border-radius: 6px; overflow: hidden; }
.lens { background: var(--walnut2); padding: 46px 44px; }
.lens h3 { font-size: 2.3rem; font-style: italic; font-weight: 300; margin: 12px 0 14px; }
.lens p { color: #d6c7ae; margin: 0; font-size: 1.05rem; }
.lens.maker { background: var(--walnut3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Cpath d='M22 0H0V22' fill='none' stroke='%23ffffff' stroke-opacity='.05'/%3E%3C/svg%3E"); }
.lens.maker h3 { font-family: var(--hand); font-style: normal; font-size: 2.9rem; color: var(--brass2); }

/* ===== Era galleries (home) ===== */
.era { padding: 110px 0 60px; position: relative; }
.era:nth-child(even) { background: var(--paper2); }
.era-head { display: grid; grid-template-columns: 180px 1fr 1fr; gap: 40px; align-items: end; margin-bottom: 40px; }
.era-num { font: 300 8rem/0.8 var(--display); color: var(--acc); font-variation-settings: "SOFT" 100; font-style: italic; opacity: .9; }
.era-head h2 { font-size: clamp(2.4rem, 4.4vw, 4rem); font-weight: 350; }
.era-head .years { font: .78rem var(--mono); letter-spacing: .18em; color: var(--ink3); margin-top: 10px; }
.era-head p { margin: 0; color: var(--ink2); font-size: 1.04rem; }
.shelf { display: flex; gap: 22px; overflow-x: auto; padding: 8px 32px 30px; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--paper3) transparent; }
.shelf::before, .shelf::after { content: ""; flex: 0 0 max(0px, calc((100vw - var(--maxw)) / 2 - 22px)); }
.plate { flex: 0 0 300px; scroll-snap-align: start; text-decoration: none; color: inherit; position: relative; transition: transform .5s var(--ease); }
.plate:hover { transform: translateY(-6px); }
.plate-img { height: 380px; border-radius: 4px; overflow: hidden; background: var(--paper3); position: relative; box-shadow: 0 18px 40px -22px rgba(40,25,10,.55); }
.plate-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.plate:hover .plate-img img { transform: scale(1.06); }
.plate-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(15,10,6,.75)); }
.plate-num { position: absolute; top: 14px; left: 16px; z-index: 2; font: .66rem var(--mono); letter-spacing: .2em; color: #fff; opacity: .85; }
.plate-years { position: absolute; bottom: 14px; left: 16px; z-index: 2; font: .7rem var(--mono); letter-spacing: .14em; color: var(--acc2); }
.plate-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--acc); z-index: 3; }
.plate h3 { font-size: 1.7rem; margin: 16px 0 6px; font-weight: 400; }
.plate p { margin: 0; font-style: italic; color: var(--ink2); font-size: .98rem; line-height: 1.4; }
.fallback-img { width: 100%; height: 100%; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--acc) 55%, #fff), var(--acc)); }
.fallback-img .leg-svg { height: 72%; width: auto; }

/* ===== Explore tiles ===== */
.explore { background: var(--walnut); color: var(--paper); padding: 120px 0; }
.explore h2 { font-size: clamp(2.6rem, 5vw, 4.4rem); font-weight: 300; margin-bottom: 50px; }
.explore h2 em { color: var(--brass2); }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tile { position: relative; min-height: 230px; padding: 26px; border-radius: 6px; background: var(--walnut2); text-decoration: none; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; border: 1px solid rgba(255,255,255,.07); transition: all .4s var(--ease); }
.tile:hover { background: var(--walnut3); transform: translateY(-4px); border-color: var(--brass); }
.tile.big { grid-column: span 2; grid-row: span 2; }
.tile h3 { font-size: 1.75rem; font-weight: 400; margin: 6px 0; }
.tile p { margin: 0; color: #bcae97; font-size: .95rem; }
.tile .art { position: absolute; top: 18px; right: 18px; opacity: .9; }
.tile.big .art { inset: 20px 20px auto auto; }
.tile .num { font: .66rem var(--mono); letter-spacing: .2em; color: var(--brass); }
.foot { background: #0f0a07; color: #8f826f; padding: 60px 0; font-size: .9rem; }
.foot a { color: var(--brass2); }

/* ===== Generic page head ===== */
.page { padding-top: 60px; min-height: 100vh; }
.phead { background: var(--walnut); color: var(--paper); padding: 90px 0 70px; position: relative; overflow: hidden; }
.phead h1 { font-size: clamp(3rem, 7vw, 6.5rem); font-weight: 300; letter-spacing: -.03em; font-variation-settings: "SOFT" 100; }
.phead h1 em { color: var(--brass2); }
.phead p { max-width: 62ch; color: #d8c9b0; font-size: 1.12rem; margin: 18px 0 0; }
.phead .eyebrow { color: var(--brass); }

/* ===== STYLE CHAPTER ===== */
.sh { position: relative; min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; background: color-mix(in srgb, var(--acc) 22%, var(--walnut)); color: var(--paper); overflow: hidden; }
.sh-img { position: relative; overflow: hidden; background: #000; }
.sh-img img { width: 100%; height: 100%; object-fit: cover; animation: kenburns 28s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1.02) translate(0,0); } to { transform: scale(1.14) translate(-2%, -2%); } }
.sh-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 60%, color-mix(in srgb, var(--acc) 22%, var(--walnut))); }
.sh-img .cap { position: absolute; left: 22px; bottom: 18px; z-index: 2; font: .66rem var(--mono); letter-spacing: .1em; color: #fff; opacity: .8; max-width: 70%; text-shadow: 0 1px 3px #000; }
.sh-text { padding: 120px 6vw 70px 4vw; display: flex; flex-direction: column; justify-content: center; position: relative; }
.sh-text .eyebrow { color: var(--acc2); }
.sh-index { position: absolute; top: 90px; right: 5vw; font: .7rem var(--mono); letter-spacing: .2em; opacity: .6; }
.sh h1 { font-size: clamp(3.2rem, 6.6vw, 7.2rem); font-weight: 300; letter-spacing: -.035em; line-height: .9; margin: 16px 0 10px; font-variation-settings: "SOFT" 100; }
.sh .aka { font-style: italic; opacity: .7; margin-bottom: 26px; }
.sh-years { display: flex; align-items: baseline; gap: 16px; font-family: var(--display); font-size: 3rem; font-weight: 200; color: var(--acc2); line-height: 1; }
.sh-years i { width: 70px; height: 1px; background: currentColor; display: inline-block; transform: translateY(-12px); opacity: .6; }
.sh-region { font: .74rem var(--mono); letter-spacing: .16em; text-transform: uppercase; opacity: .7; margin-top: 12px; }
.sh .tagline { font-family: var(--display); font-style: italic; font-size: 1.7rem; font-weight: 300; margin: 34px 0 18px; line-height: 1.25; color: #fff; }
.sh .summary { color: #e4d6bf; font-size: 1.08rem; max-width: 52ch; margin: 0; }
.sh-strip { display: flex; gap: 8px; margin-top: 34px; }
.sh-strip img { width: 64px; height: 64px; object-fit: cover; border-radius: 3px; cursor: zoom-in; opacity: .8; transition: opacity .2s, transform .2s; }
.sh-strip img:hover { opacity: 1; transform: translateY(-3px); }

.chapnav { position: sticky; top: 60px; z-index: 30; background: rgba(243,235,219,.93); backdrop-filter: blur(8px); border-bottom: 1px solid var(--paper3); }
.chapnav .wrap { display: flex; gap: 6px; align-items: center; overflow-x: auto; height: 52px; }
.chapnav a { font: .68rem var(--mono); letter-spacing: .16em; text-transform: uppercase; text-decoration: none; padding: 8px 12px; border-radius: 99px; white-space: nowrap; color: var(--ink2); }
.chapnav a:hover { background: var(--paper2); }
.chapnav a.on { background: var(--acc); color: #fff; }
.chapnav .cn-title { font: 500 1.05rem var(--display); margin-right: 14px; white-space: nowrap; color: var(--acc); }

.sec { padding: 110px 0; position: relative; }
.sec-h { display: flex; align-items: baseline; gap: 22px; margin-bottom: 46px; }
.sec-h .n { font: 300 4.5rem/0.8 var(--display); color: var(--acc); font-style: italic; }
.sec-h h2 { font-size: clamp(2.2rem, 4vw, 3.4rem); font-weight: 350; }
.sec-h .eyebrow { display: block; margin-bottom: 8px; }

.story { columns: 2 340px; column-gap: 56px; }
.story p { margin: 0 0 1.1em; break-inside: avoid-column; }
.story p:first-child::first-letter { float: left; font: 400 5.6rem/.8 var(--display); color: var(--acc); padding: 6px 12px 0 0; font-variation-settings: "SOFT" 100; }
.story figure { break-inside: avoid; margin: .4em 0 1.4em; }
.story figure img, .inline-fig img { width: 100%; border-radius: 3px; cursor: zoom-in; background: var(--paper2); }
figcaption { font: .66rem/1.45 var(--mono); letter-spacing: .06em; color: var(--ink3); margin-top: 8px; }
.pull { margin: 70px auto; max-width: 900px; text-align: center; font: 300 italic clamp(1.8rem, 3.4vw, 2.8rem)/1.2 var(--display); color: var(--ink); position: relative; }
.pull::before { content: "“"; display: block; font-size: 6rem; line-height: .6; color: var(--acc); opacity: .6; }
.pull cite { display: block; font: .72rem var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--acc); margin-top: 18px; font-style: normal; }

.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 50px; }
.card-fact { padding: 34px 34px 30px; border-radius: 6px; background: var(--paper2); position: relative; }
.card-fact.myth { background: var(--ink); color: var(--paper); }
.card-fact .k { font: .66rem var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--acc); }
.card-fact.myth .k { color: var(--acc2); }
.card-fact p { margin: 12px 0 0; font-size: 1.1rem; }

/* hallmarks */
.dna-wrap { display: grid; grid-template-columns: 330px 1fr; gap: 56px; align-items: start; }
.specimen { position: sticky; top: 140px; background: var(--paper2); border-radius: 6px; padding: 28px 24px 22px; text-align: center; border: 1px solid var(--paper3); }
.specimen .leg-svg { height: 380px; width: auto; margin: 0 auto; }
.specimen h4 { font-size: 1.3rem; margin: 12px 0 6px; }
.specimen p { font-size: .9rem; color: var(--ink2); margin: 0; }
.specimen a { font: .66rem var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--acc); display: inline-block; margin-top: 12px; }
.dna { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--paper3); }
.dna div { padding: 24px 24px 24px 0; border-bottom: 1px solid var(--paper3); counter-increment: dna; }
.dna div:nth-child(odd) { padding-right: 32px; border-right: 1px solid var(--paper3); }
.dna div:nth-child(even) { padding-left: 32px; }
.dna h4 { font-size: 1.3rem; margin-bottom: 6px; display: flex; gap: 10px; align-items: baseline; }
.dna h4::before { content: counter(dna, decimal-leading-zero); font: .66rem var(--mono); color: var(--acc); }
.dna p { margin: 0; color: var(--ink2); font-size: 1rem; }
.spot { margin-top: 44px; background: #fffaf0; border: 1px solid var(--paper3); border-radius: 6px; padding: 30px 34px; box-shadow: 0 16px 40px -30px rgba(60,40,20,.5); }
.spot h3 { font-size: 1.6rem; margin-bottom: 14px; }
.spot ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 30px; }
.spot li { display: flex; gap: 12px; font-size: 1rem; align-items: baseline; }
.spot li::before { content: ""; flex: 0 0 14px; height: 14px; border: 1.5px solid var(--acc); border-radius: 3px; transform: translateY(2px); }

/* gallery */
.gal-sec { background: var(--walnut); color: var(--paper); }
.gal-sec .sec-h .n { color: var(--acc2); }
.gallery { columns: 4 240px; column-gap: 14px; }
.gallery figure { margin: 0 0 14px; break-inside: avoid; cursor: zoom-in; position: relative; border-radius: 3px; overflow: hidden; background: #2a1e15; }
.gallery img { width: 100%; transition: transform .8s var(--ease), filter .4s; }
.gallery figure:hover img { transform: scale(1.04); filter: brightness(1.08); }
.gallery figcaption { position: absolute; inset: auto 0 0 0; padding: 30px 12px 10px; margin: 0; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.8)); opacity: 0; transition: opacity .3s; }
.gallery figure:hover figcaption { opacity: 1; }
.gal-note { font: .7rem var(--mono); color: #9d8f7a; margin-top: 20px; letter-spacing: .06em; }

/* bench */
.bench { background-color: #f6f1e4; background-image: linear-gradient(rgba(70,110,150,.13) 1px, transparent 1px), linear-gradient(90deg, rgba(70,110,150,.13) 1px, transparent 1px), linear-gradient(rgba(70,110,150,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(70,110,150,.06) 1px, transparent 1px); background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px; }
.bench .sec-h h2 { font-family: var(--hand); font-size: clamp(3rem, 6vw, 4.6rem); color: var(--ink); font-weight: 700; }
.bench-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 60px; }
.bench-text p { margin: 0 0 1.1em; }
.bench-text p:first-child::first-line { font-variant: small-caps; letter-spacing: .04em; }
.note { position: relative; background: #fffdf6; border: 1px solid #ddd2bb; padding: 24px 26px; border-radius: 2px; box-shadow: 0 10px 24px -18px rgba(60,40,20,.6); margin-bottom: 26px; }
.note::before { content: ""; position: absolute; top: -9px; left: 40%; width: 90px; height: 20px; background: rgba(214,196,150,.65); transform: rotate(-2deg); }
.note h4 { font-family: var(--hand); font-size: 1.9rem; font-weight: 700; color: var(--acc); margin-bottom: 10px; line-height: 1; }
.woods-row { display: grid; gap: 12px; }
.wchip { display: grid; grid-template-columns: 74px 1fr; gap: 14px; align-items: center; text-decoration: none; }
.wchip .sw { height: 48px; border-radius: 3px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.wchip .sw svg { width: 100%; height: 100%; display: block; }
.wchip b { font: 600 1rem var(--display); display: block; }
.wchip span { font-size: .88rem; color: var(--ink2); line-height: 1.35; display: block; }
.tools-list { list-style: none; padding: 0; margin: 0; font-family: var(--hand); font-size: 1.45rem; line-height: 1.35; }
.tools-list li::before { content: "✓ "; color: var(--acc); }
.finish { font-size: .98rem; }
.joint-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 56px; }
.jcard { background: #fffdf6; border: 1px solid #ddd2bb; border-radius: 4px; padding: 14px 16px 18px; text-decoration: none; transition: transform .3s, box-shadow .3s; }
.jcard:hover { transform: translateY(-4px); box-shadow: 0 16px 30px -20px rgba(60,40,20,.6); }
.jcard canvas { width: 100%; height: 150px; display: block; }
.jcard b { font: 600 1.1rem var(--display); display: block; margin-top: 4px; }
.jcard span { font-size: .88rem; color: var(--ink2); line-height: 1.35; display: block; margin-top: 4px; }
.tech-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 34px; margin-top: 50px; }
.tech-row div { border-top: 2px solid var(--ink); padding: 14px 0 22px; }
.tech-row b { font: 500 1.15rem var(--display); }
.tech-row p { margin: 6px 0 0; font-size: .95rem; color: var(--ink2); }
.sub-h { font: 700 2.2rem var(--hand); margin: 64px 0 0; color: var(--ink); }

/* blueprint project */
.blueprint { background: var(--blue); color: #dbe8f5; border-radius: 6px; padding: 54px 56px; position: relative; overflow: hidden;
  background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px); background-size: 24px 24px; }
.blueprint::after { content: ""; position: absolute; inset: 14px; border: 1px solid rgba(255,255,255,.25); pointer-events: none; }
.bp-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 50px; position: relative; z-index: 1; }
.blueprint h3 { font-size: 2.8rem; font-weight: 300; color: #fff; margin: 10px 0 16px; }
.blueprint .eyebrow { color: #9cc3ea; }
.level { display: flex; gap: 6px; margin: 16px 0; align-items: center; font: .66rem var(--mono); letter-spacing: .18em; }
.level i { width: 26px; height: 8px; border: 1px solid #9cc3ea; border-radius: 2px; }
.level i.on { background: #9cc3ea; }
.blueprint ol { margin: 0; padding: 0; list-style: none; counter-reset: st; }
.blueprint li { counter-increment: st; padding: 12px 0 12px 54px; position: relative; border-bottom: 1px dashed rgba(255,255,255,.22); font-size: 1rem; }
.blueprint li::before { content: counter(st); position: absolute; left: 0; top: 10px; width: 34px; height: 34px; border: 1px solid #9cc3ea; border-radius: 50%; display: grid; place-items: center; font: .8rem var(--mono); }
.bp-leg { margin-top: 20px; height: 260px; }
.bp-leg .leg-svg { height: 100%; width: auto; }
.bp-leg .lg-body, .bp-leg .lg-apron, .bp-leg .lg-alt { fill: none !important; stroke: #cfe2f6 !important; stroke-width: 1.2; }
.bp-leg .lg-shadeLayer { display: none; }

/* people */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.person { padding: 26px; border-radius: 6px; background: var(--paper2); position: relative; }
.person .yrs { font: .66rem var(--mono); letter-spacing: .14em; color: var(--acc); }
.person h4 { font-size: 1.45rem; margin: 6px 0 8px; }
.person p { margin: 0; font-size: .96rem; color: var(--ink2); }
.pieces { margin-top: 60px; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 40px; }
.pieces div { padding: 18px 0; border-top: 1px solid var(--paper3); }
.pieces b { font: 400 1.4rem var(--display); font-style: italic; }
.pieces p { margin: 6px 0 0; color: var(--ink2); font-size: .98rem; }

/* lineage */
.lineage { display: grid; grid-template-columns: 1fr auto 1fr; gap: 30px; align-items: center; }
.lin-col h4 { font: .7rem var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ink3); margin-bottom: 14px; }
.lin-col.right { text-align: right; }
.lin-chip { display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; margin: 0 6px 10px 0; border-radius: 99px; background: var(--paper2); text-decoration: none; font: 500 1rem var(--display); transition: background .2s; }
.lin-col.right .lin-chip { margin: 0 0 10px 6px; }
.lin-chip:hover { background: var(--paper3); }
.lin-chip img, .lin-chip .dot { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--c, var(--acc)); }
.lin-me { width: 190px; height: 190px; border-radius: 50%; display: grid; place-items: center; text-align: center; background: var(--acc); color: #fff; font: 400 1.5rem/1.1 var(--display); padding: 20px; box-shadow: 0 0 0 10px color-mix(in srgb, var(--acc) 25%, transparent), 0 0 0 22px color-mix(in srgb, var(--acc) 10%, transparent); }
.minitime { margin-top: 70px; position: relative; height: 70px; }
.minitime .bar { position: absolute; height: 6px; top: 30px; border-radius: 3px; background: var(--paper3); }
.minitime .bar.me { background: var(--acc); height: 12px; top: 27px; z-index: 2; }
.minitime .tick { position: absolute; top: 48px; font: .62rem var(--mono); color: var(--ink3); transform: translateX(-50%); }
.seeit { margin-top: 60px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.seeit span { padding: 8px 14px; border: 1px solid var(--paper3); border-radius: 99px; font-size: .92rem; }
.seeit b { font: .66rem var(--mono); letter-spacing: .2em; text-transform: uppercase; margin-right: 8px; color: var(--acc); }

.pager { display: grid; grid-template-columns: 1fr 1fr; background: var(--walnut); }
.pager a { padding: 60px 6vw; color: var(--paper); text-decoration: none; position: relative; overflow: hidden; min-height: 240px; display: flex; flex-direction: column; justify-content: flex-end; }
.pager a img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .28; transition: opacity .5s, transform 1s var(--ease); }
.pager a:hover img { opacity: .45; transform: scale(1.05); }
.pager a > * { position: relative; }
.pager a.next { text-align: right; align-items: flex-end; }
.pager h3 { font-size: 2.6rem; font-weight: 300; }
.pager .mono { color: var(--brass2); }

/* ===== Lightbox ===== */
#lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(12,8,5,.95); display: grid; grid-template-columns: 1fr 340px; }
#lightbox[hidden] { display: none; }
.lb-img { display: grid; place-items: center; padding: 40px; position: relative; }
.lb-img img { max-width: 100%; max-height: calc(100vh - 80px); object-fit: contain; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.lb-side { background: var(--walnut2); color: var(--paper); padding: 70px 32px 32px; overflow: auto; }
.lb-side h3 { font-size: 1.8rem; font-weight: 400; margin-bottom: 14px; }
.lb-side dl { margin: 0; font-size: .95rem; }
.lb-side dt { font: .62rem var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--brass); margin-top: 14px; }
.lb-side dd { margin: 3px 0 0; color: #ddd0bb; }
.lb-side a { color: var(--brass2); }
.lb-close, .lb-prev, .lb-next { position: absolute; background: rgba(255,255,255,.08); border: 0; color: #fff; width: 46px; height: 46px; border-radius: 50%; font-size: 1.3rem; }
.lb-close { top: 16px; right: 16px; z-index: 3; }
.lb-prev { left: 16px; top: 50%; } .lb-next { right: 16px; top: 50%; }

/* ===== Search ===== */
#search { position: fixed; inset: 0; z-index: 300; background: rgba(12,8,5,.7); backdrop-filter: blur(6px); display: flex; justify-content: center; padding-top: 12vh; }
#search[hidden] { display: none; }
.search-panel { width: min(680px, 92vw); background: var(--paper); border-radius: 10px; overflow: hidden; box-shadow: 0 40px 90px rgba(0,0,0,.5); align-self: flex-start; }
#searchInput { width: 100%; border: 0; padding: 22px 26px; font: 1.3rem var(--display); background: transparent; outline: none; border-bottom: 1px solid var(--paper3); }
#searchResults { max-height: 60vh; overflow: auto; }
.sr { display: flex; gap: 14px; align-items: center; padding: 12px 26px; text-decoration: none; border-bottom: 1px solid var(--paper2); }
.sr:hover, .sr.sel { background: var(--paper2); }
.sr .k { font: .6rem var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink3); width: 80px; flex: 0 0 80px; }
.sr b { font: 500 1.05rem var(--display); }
.sr span { font-size: .86rem; color: var(--ink2); display: block; }

#tip { position: fixed; z-index: 120; pointer-events: none; background: var(--walnut); color: var(--paper); border-radius: 6px; padding: 10px; width: 230px; box-shadow: 0 20px 50px rgba(0,0,0,.4); font-size: .86rem; }
#tip img { width: 100%; height: 130px; object-fit: cover; border-radius: 3px; margin-bottom: 8px; }
#tip b { font: 500 1.15rem var(--display); display: block; }
#tip span { font: .62rem var(--mono); color: var(--brass2); letter-spacing: .12em; }

/* ===== Styles index ===== */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.chip { border: 1px solid rgba(255,255,255,.25); background: transparent; color: inherit; padding: 8px 14px; border-radius: 99px; font: .68rem var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.chip.on { background: var(--brass); color: var(--walnut); border-color: var(--brass); }
.grid-styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 40px 26px; padding: 70px 0 120px; }
.grid-styles .plate { flex: none; }
.grid-styles .plate-img { height: 340px; }

/* ===== Timeline ===== */
.tl-wrap { overflow-x: auto; background: var(--walnut); color: var(--paper); padding: 30px 0 40px; cursor: grab; }
.tl-wrap:active { cursor: grabbing; }
.tl-controls { display: flex; gap: 10px; align-items: center; padding: 22px 0; flex-wrap: wrap; }
.tl-controls label { font: .7rem var(--mono); letter-spacing: .12em; text-transform: uppercase; display: flex; gap: 8px; align-items: center; }
#tlsvg text { font-family: var(--mono); }
.tl-bar { cursor: pointer; }
.tl-bar rect { transition: opacity .2s; }
.tl-bar:hover rect.b { filter: brightness(1.25); }
.tl-bar text { font: 500 12px var(--display); fill: #fff; pointer-events: none; }
.tl-dim .tl-bar { opacity: .22; } .tl-dim .tl-bar.hl { opacity: 1; }
.tl-edge { fill: none; stroke-width: 1.6; opacity: .5; transition: opacity .2s; }
.tl-dim .tl-edge { opacity: .05; } .tl-dim .tl-edge.hl { opacity: .95; stroke-width: 2.4; }
.tl-legend { display: flex; gap: 20px; flex-wrap: wrap; font: .68rem var(--mono); letter-spacing: .1em; color: var(--ink2); padding: 26px 0 80px; }
.tl-read { padding: 70px 0 30px; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 40px; }
.tl-read div b { font: 400 1.4rem var(--display); display: block; margin-bottom: 8px; }
.tl-read div p { margin: 0; color: var(--ink2); font-size: .98rem; }

/* ===== Legs lineup ===== */
.lineup-wrap { background: #191512; color: var(--paper); padding: 40px 0 80px; position: relative; }
.lineup { display: flex; gap: 0; overflow-x: auto; padding: 0 30px 20px; scroll-snap-type: x proximity;
  background-image: repeating-linear-gradient(180deg, transparent 0 39px, rgba(255,255,255,.12) 39px 40px); background-position: 0 14px; }
.lu { flex: 0 0 132px; text-align: center; cursor: pointer; padding: 14px 6px 10px; border-radius: 6px; scroll-snap-align: start; transition: background .2s; }
.lu:hover, .lu.on { background: rgba(255,255,255,.06); }
.lu .leg-svg { height: 280px; width: auto; transition: transform .4s var(--ease); }
.lu:hover .leg-svg { transform: translateY(-6px); }
.lu b { display: block; font: 500 .9rem/1.2 var(--display); margin-top: 6px; min-height: 2.4em; }
.lu span { font: .58rem var(--mono); letter-spacing: .12em; color: var(--brass); }
.leg-detail { display: grid; grid-template-columns: 300px 1fr; gap: 60px; padding: 70px 0 110px; align-items: center; }
.leg-detail .big { background: var(--paper2); border-radius: 8px; padding: 30px; text-align: center; }
.leg-detail .big .leg-svg { height: 420px; width: auto; }
.leg-detail h2 { font-size: 3.4rem; font-weight: 300; margin: 8px 0 16px; }
.leg-detail p { font-size: 1.2rem; color: var(--ink2); max-width: 56ch; }
.leg-svg .lg-fill .lg-body { fill: var(--lw); }
.leg-svg .lg-fill .lg-alt { fill: color-mix(in srgb, var(--lw) 80%, #000); }
.leg-svg .lg-shadeLayer > :not(.lg-body) { display: none; }
.leg-svg .lg-shadeLayer .lg-body { fill: var(--shade); stroke: none; }
.leg-svg .lg-body { stroke: rgba(0,0,0,.45); stroke-width: 1; }
.lg-apron { fill: color-mix(in srgb, var(--lw) 70%, #000); stroke: rgba(0,0,0,.4); }
.lg-line { fill: none; stroke: rgba(0,0,0,.45); stroke-width: 1.2; }
.lg-hole { fill: rgba(0,0,0,.55); }
.lg-floor { stroke: currentColor; stroke-width: 1; opacity: .35; stroke-dasharray: 3 4; }
.lg-orn { fill: color-mix(in srgb, var(--lw) 60%, #fff); stroke: rgba(0,0,0,.4); }
.lg-orn-g, .lg-gold { fill: #c9a23e; stroke: #6d5212; }
.lg-claw { fill: none; stroke: color-mix(in srgb, var(--lw) 60%, #000); stroke-width: 7; stroke-linecap: round; }
.lg-shadow { fill: rgba(0,0,0,.25); }
.lg-bead { stroke: rgba(255,255,255,.25); stroke-width: 1.5; }
.lg-flute { stroke: rgba(0,0,0,.4); stroke-width: 2; }
.lg-reed { stroke: rgba(255,255,255,.28); stroke-width: 2.4; }
.lg-inlay { fill: none; stroke: #f1e2b6; stroke-width: 1.4; }
.lg-inlay-f { fill: #f1e2b6; }
.lg-ring { fill: none; stroke: color-mix(in srgb, var(--lw) 80%, #000); stroke-width: 9; }
.lg-chamfer { stroke: rgba(255,255,255,.2); stroke-width: 2; }
.lg-incise { stroke: rgba(0,0,0,.6); stroke-width: 1.2; }
.lg-tenon { fill: color-mix(in srgb, var(--lw) 85%, #fff); stroke: rgba(0,0,0,.5); }
.lg-peg, .lg-plug { fill: #1d1410; }
.lg-fleck { fill: none; stroke: rgba(255,235,190,.4); stroke-width: 1.6; }
.lg-grid rect { fill: #e8e1d3; }
.lg-bark { stroke: rgba(0,0,0,.45); stroke-width: 1.6; }
.lg-black { fill: #1b1b1b; } .lg-yellow { fill: #f2c418; }
.lg-chrome-o { fill: none; stroke: #6c757d; stroke-width: 17; stroke-linecap: round; }
.lg-chrome { fill: none; stroke: #e8edf1; stroke-width: 11; stroke-linecap: round; }
.lg-rod { fill: none; stroke: #2a2a2a; stroke-width: 4; }
.lg-crack { stroke: #1d1410; stroke-width: 1.5; }
.lg-iron { fill: #2b2b2e; } .lg-iron-o { fill: none; stroke: #2b2b2e; stroke-width: 3; }
.lg-m1 { fill: #1b1b1b; } .lg-m2 { fill: #f7e8c8; } .lg-m3 { fill: #e94b6b; } .lg-m4 { fill: #2fa7c9; }
.lg-squig { fill: none; stroke: #1b1b1b; stroke-width: 2; }

/* ===== Joinery lab ===== */
.lab { display: grid; grid-template-columns: 270px 1fr; min-height: calc(100vh - 60px); }
.lab-list { background: var(--walnut2); color: var(--paper); padding: 28px 0; overflow: auto; max-height: calc(100vh - 60px); position: sticky; top: 60px; }
.lab-list h5 { font: .62rem var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--brass); margin: 20px 24px 6px; }
.lab-list a { display: block; padding: 7px 24px; text-decoration: none; font: 400 1.02rem var(--display); opacity: .8; border-left: 3px solid transparent; }
.lab-list a:hover { opacity: 1; background: rgba(255,255,255,.04); }
.lab-list a.on { opacity: 1; border-left-color: var(--brass); background: rgba(255,255,255,.07); }
.lab-main { padding: 0 0 80px; }
.stage { background: radial-gradient(ellipse at 50% 40%, #fbf6ea, #e6dac2); height: 62vh; min-height: 420px; position: relative; border-bottom: 1px solid var(--paper3); }
.stage canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.stage canvas:active { cursor: grabbing; }
.stage-ui { position: absolute; left: 24px; right: 24px; bottom: 20px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.stage-ui input[type=range] { width: 220px; accent-color: var(--acc); }
.stage-ui label { font: .66rem var(--mono); letter-spacing: .16em; text-transform: uppercase; display: flex; gap: 10px; align-items: center; color: var(--ink2); }
.stage-ui button { border: 1px solid var(--ink2); background: transparent; border-radius: 99px; padding: 7px 14px; font: .64rem var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.stage-ui button:hover { background: var(--ink); color: var(--paper); }
.parts { position: absolute; top: 20px; right: 24px; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.parts span { display: flex; align-items: center; gap: 8px; font: .7rem var(--mono); background: rgba(255,255,255,.7); padding: 5px 10px; border-radius: 99px; cursor: default; }
.parts i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.stage-hint { position: absolute; top: 22px; left: 24px; font: 700 1.5rem var(--hand); color: var(--ink3); }
.lab-info { padding: 50px 50px 0; display: grid; grid-template-columns: 1.2fr 1fr; gap: 50px; }
.lab-info h1 { font-size: 3.6rem; font-weight: 300; letter-spacing: -.02em; }
.meters { display: flex; gap: 30px; margin: 18px 0 24px; }
.meter { font: .62rem var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink3); }
.meter div { display: flex; gap: 4px; margin-top: 6px; }
.meter i { width: 20px; height: 6px; background: var(--paper3); border-radius: 2px; }
.meter i.on { background: var(--acc); }
.steps { counter-reset: s; padding: 0; list-style: none; }
.steps li { counter-increment: s; padding: 10px 0 10px 44px; position: relative; border-top: 1px solid var(--paper3); }
.steps li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 12px; font: .74rem var(--mono); color: var(--acc); }
.tipbox { background: var(--paper2); border-radius: 6px; padding: 20px 22px; margin-bottom: 14px; }
.tipbox b { font: .64rem var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--acc); display: block; margin-bottom: 6px; }
.tipbox.warn { background: #f4ddd0; }
.tipbox.warn b { color: var(--rust); }
.style-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.style-chips a { text-decoration: none; padding: 5px 12px; border-radius: 99px; background: var(--paper2); font-size: .9rem; border-left: 4px solid var(--c, var(--acc)); }
.style-chips a:hover { background: var(--paper3); }

/* ===== Woods ===== */
.wood-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; padding: 60px 0 110px; }
.board { cursor: pointer; background: #fffaf0; border-radius: 4px; overflow: hidden; box-shadow: 0 14px 34px -24px rgba(50,30,10,.6); transition: transform .35s var(--ease); }
.board:hover { transform: translateY(-5px) rotate(-.4deg); }
.board .sw { height: 150px; position: relative; }
.board .sw svg { width: 100%; height: 100%; display: block; }
.board .sw::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,.18), transparent 30%, rgba(0,0,0,.12)); }
.board .meta { padding: 16px 18px 18px; }
.board b { font: 500 1.35rem var(--display); }
.board i { display: block; font-size: .88rem; color: var(--ink3); }
.board .hard { margin-top: 10px; height: 4px; background: var(--paper3); border-radius: 2px; position: relative; }
.board .hard span { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink2); border-radius: 2px; }
.board .hl { display: flex; justify-content: space-between; font: .6rem var(--mono); color: var(--ink3); margin-top: 5px; letter-spacing: .1em; }
.sortbar { display: flex; gap: 8px; margin-top: 28px; flex-wrap: wrap; }
.modal { position: fixed; inset: 0; z-index: 150; background: rgba(12,8,5,.75); display: grid; place-items: center; padding: 30px; }
.modal-card { background: var(--paper); border-radius: 8px; width: min(960px, 100%); max-height: 90vh; overflow: auto; display: grid; grid-template-columns: 1fr 1.2fr; }
.modal-card .sw { min-height: 100%; } .modal-card .sw svg { width: 100%; height: 100%; display: block; min-height: 420px; }
.modal-card .body { padding: 40px; position: relative; }
.modal-card h2 { font-size: 2.8rem; font-weight: 300; }
.modal-card .x { position: absolute; top: 14px; right: 14px; border: 0; background: var(--paper2); width: 38px; height: 38px; border-radius: 50%; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-size: .95rem; margin: 18px 0; }
.kv dt { font: .62rem var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink3); padding-top: 4px; }
.kv dd { margin: 0; }

/* ===== Techniques ===== */
.tech-fam { padding: 70px 0 10px; }
.tech-fam h2 { font-size: 2.8rem; font-weight: 300; margin-bottom: 30px; display: flex; gap: 18px; align-items: baseline; }
.tech-fam h2 span { font: .7rem var(--mono); letter-spacing: .2em; color: var(--acc); text-transform: uppercase; }
.tech-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
.tcard { background: #fffaf0; border-radius: 6px; padding: 28px; border: 1px solid var(--paper3); }
.tcard h3 { font-size: 1.6rem; margin-bottom: 8px; }
.tcard p { margin: 0 0 12px; font-size: .98rem; color: var(--ink2); }
.tcard ol { padding-left: 20px; margin: 0 0 12px; font-size: .94rem; }
.tcard .hist { font-style: italic; font-size: .92rem; color: var(--ink3); }

/* ===== Quiz ===== */
.quiz { display: grid; grid-template-columns: 1.3fr 1fr; gap: 0; min-height: calc(100vh - 60px); }
.q-media { background: var(--walnut); display: grid; place-items: center; padding: 40px; position: relative; }
.q-media img { max-height: calc(100vh - 160px); max-width: 100%; object-fit: contain; box-shadow: 0 30px 60px rgba(0,0,0,.5); }
.q-media .leg-svg { height: 70vh; width: auto; color: var(--paper); }
.q-side { padding: 60px 50px; display: flex; flex-direction: column; }
.q-modes { display: flex; gap: 6px; margin-bottom: 34px; flex-wrap: wrap; }
.q-modes button { border: 1px solid var(--ink2); background: transparent; border-radius: 99px; padding: 8px 14px; font: .64rem var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.q-modes button.on { background: var(--ink); color: var(--paper); }
.q-side h2 { font-size: 2.6rem; font-weight: 300; margin-bottom: 24px; }
.q-opts { display: grid; gap: 10px; }
.q-opts button { text-align: left; padding: 16px 20px; border: 1px solid var(--paper3); background: #fffaf0; border-radius: 6px; font: 400 1.25rem var(--display); transition: all .2s; display: flex; justify-content: space-between; }
.q-opts button:hover:not(:disabled) { border-color: var(--ink); transform: translateX(4px); }
.q-opts button.right { background: #d9ebd3; border-color: #4f8a45; }
.q-opts button.wrong { background: #f4d6cc; border-color: var(--rust); }
.q-opts button small { font: .6rem var(--mono); color: var(--ink3); letter-spacing: .1em; align-self: center; }
.q-score { display: flex; gap: 30px; margin-top: auto; padding-top: 30px; font: .66rem var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink3); }
.q-score b { display: block; font: 300 2.6rem var(--display); color: var(--ink); letter-spacing: 0; }
.q-reveal { margin-top: 24px; padding: 22px; background: var(--paper2); border-radius: 6px; }
.q-reveal h4 { font-size: 1.4rem; margin-bottom: 6px; }
.q-reveal ul { margin: 10px 0 14px; padding-left: 20px; font-size: .95rem; }
.q-reveal .cap { font: .62rem var(--mono); color: var(--ink3); }
.year-ui { margin-top: 10px; }
.year-ui input { width: 100%; accent-color: var(--acc); }
.year-ui .yv { font: 300 4rem var(--display); text-align: center; }

/* ===== Compare ===== */
.cmp-pick { display: flex; gap: 14px; align-items: center; margin-top: 26px; flex-wrap: wrap; }
.cmp-pick select { font: 1.1rem var(--display); padding: 10px 14px; border-radius: 6px; border: 1px solid rgba(255,255,255,.3); background: var(--walnut2); color: var(--paper); }
.cmp-pick .vs { font: italic 300 2rem var(--display); color: var(--brass2); }
.cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.cmp-col { padding: 0 0 80px; border-right: 1px solid var(--paper3); }
.cmp-col:last-child { border-right: 0; }
.cmp-col .ci { height: 420px; overflow: hidden; background: var(--paper2); }
.cmp-col .ci img { width: 100%; height: 100%; object-fit: cover; }
.cmp-col .cb { padding: 34px 44px; }
.cmp-col h2 { font-size: 3rem; font-weight: 300; }
.cmp-row { padding: 18px 0; border-top: 1px solid var(--paper3); }
.cmp-row h5 { font: .62rem var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--acc); margin: 0 0 8px; }
.cmp-row ul { margin: 0; padding-left: 18px; font-size: .96rem; }
.cmp-row .shared { background: color-mix(in srgb, var(--brass) 35%, transparent); padding: 0 4px; border-radius: 3px; }
.cmp-legs { display: flex; gap: 20px; align-items: flex-end; }
.cmp-legs .leg-svg { height: 220px; width: auto; }

/* ===== Glossary ===== */
.gloss { columns: 2 380px; column-gap: 60px; padding: 50px 0 120px; }
.gloss .letter { font: 300 4rem var(--display); color: var(--acc); break-after: avoid; margin-top: 20px; }
.gloss dl { margin: 0; }
.gloss div.term { break-inside: avoid; padding: 12px 0; border-top: 1px solid var(--paper3); }
.gloss dt { font: 500 1.25rem var(--display); }
.gloss dd { margin: 4px 0 0; color: var(--ink2); font-size: .98rem; }
.gfilter { margin-top: 24px; font: 1.1rem var(--display); padding: 12px 18px; border-radius: 99px; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.06); color: var(--paper); width: min(440px, 100%); outline: none; }

@media (max-width: 1000px) {
  .era-head, .dna-wrap, .bench-grid, .bp-grid, .lab, .lab-info, .quiz, .leg-detail, .sh, .lineage, .modal-card, .tl-read { grid-template-columns: 1fr; }
  .sh-img { height: 55vh; } .specimen { position: static; }
  .tiles { grid-template-columns: 1fr 1fr; } .lens-grid, .duo, .dna, .spot ul, .cmp, .pager { grid-template-columns: 1fr; }
  .dna div:nth-child(odd) { border-right: 0; padding-right: 0; } .dna div:nth-child(even) { padding-left: 0; }
  .lab-list { position: static; max-height: none; } #searchBtn span, #searchBtn kbd { display: none; }
  #lightbox { grid-template-columns: 1fr; } .lb-side { display: none; }
}
.page:has(> .sh:first-child) { padding-top: 0; }
.lb-img img.lb-soft { filter: blur(.4px); }
.lb-msg { color: #d8c9b0; font-size: 1.05rem; max-width: 36ch; text-align: center; line-height: 1.5; }
.lb-msg a { color: var(--brass2); }
