/* Carving Ogham. One look across the site: peat, moss, birch bark and lichen gold.
   Dark glass floats over the 3D scenes. Pale bark holds anything meant to be read.
   All styling lives here: the CSP forbids inline styles. */

@font-face { font-family: Alegreya; font-weight: 400; font-style: normal; font-display: swap; src: url(/assets/fonts/alegreya-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2010-2027; }
@font-face { font-family: Alegreya; font-weight: 400; font-style: italic; font-display: swap; src: url(/assets/fonts/alegreya-latin-400-italic.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2010-2027; }
@font-face { font-family: Alegreya; font-weight: 500; font-style: normal; font-display: swap; src: url(/assets/fonts/alegreya-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2010-2027; }
@font-face { font-family: Alegreya; font-weight: 400; font-style: normal; font-display: swap; src: url(/assets/fonts/alegreya-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-024F; }
@font-face { font-family: Alegreya; font-weight: 400; font-style: italic; font-display: swap; src: url(/assets/fonts/alegreya-latin-ext-400-italic.woff2) format('woff2'); unicode-range: U+0100-024F; }
@font-face { font-family: Alegreya; font-weight: 500; font-style: normal; font-display: swap; src: url(/assets/fonts/alegreya-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-024F; }
@font-face { font-family: 'Alegreya Sans'; font-weight: 400; font-display: swap; src: url(/assets/fonts/alegreya-sans-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2010-2027; }
@font-face { font-family: 'Alegreya Sans'; font-weight: 500; font-display: swap; src: url(/assets/fonts/alegreya-sans-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2010-2027; }
@font-face { font-family: 'Alegreya Sans'; font-weight: 400; font-display: swap; src: url(/assets/fonts/alegreya-sans-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-024F; }
@font-face { font-family: 'Alegreya Sans'; font-weight: 500; font-display: swap; src: url(/assets/fonts/alegreya-sans-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-024F; }
@font-face { font-family: 'Noto Sans Ogham'; font-display: swap; src: url(/assets/fonts/noto-sans-ogham-ogham-400-normal.woff2) format('woff2'); unicode-range: U+1680-169F; }

:root {
  --peat: #12160f;
  --peat-2: #1b2118;
  --peat-3: #262e22;
  --moss: #2f3b1e;
  --moss-2: #4c5d2b;
  --lichen: #e5c26e;
  --lichen-2: #f0d48c;
  --parch: #f3ecd8;
  --parch-2: #dcd7c3;
  --parch-3: #b8b49f;
  --bark: #e9eadf;
  --bark-2: #f4f4ec;
  --ink: #1c231d;
  --ink-2: #414b41;
  --rule: #aeb2a0;
  --glass: rgba(10, 14, 10, 0.78);
  --glass-2: rgba(10, 14, 10, 0.56);
  --gold-ink: #6b5213;
  --gold-mark: #8a6d1d;
  --forest: #26321c;
  --forest-ink: #26321c;
  --forest-line: #26321c;
  --forest-hover: #36452a;
  --on-forest: #f3f3e8;
  --wash: rgba(38, 50, 28, 0.08);
  --walk-bg: rgba(233, 234, 223, 0.97);
  --rule-2: #c8cbbb;
  --ghost-line: #55604f;
  --right-bg: #dbe3bc;
  --right-line: #4c5d2b;
  --wrong-bg: #eadfd2;
  --wrong-line: #8a5a3c;
  --serif: Alegreya, Georgia, 'Times New Roman', serif;
  --sans: 'Alegreya Sans', 'Gill Sans', 'Trebuchet MS', sans-serif;
  --ogham: 'Noto Sans Ogham', var(--sans);
  --gutter: clamp(16px, 3vw, 48px);
  --topbar: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

/* Dark text panels. The values are set on the reading surfaces only, so the glass
   over the 3D scenes, the buttons on it and the scenes themselves never change. */
:root[data-theme='dark'] :is(.wood-panel, .walk, .old, .test-card, .prose) {
  --bark: #171b14;
  --bark-2: #232920;
  --ink: #ece8d8;
  --ink-2: #b9b8a6;
  --rule: #6f7764;
  --rule-2: #3a4134;
  --gold-ink: #e5c26e;
  --gold-mark: #e5c26e;
  --forest: #3f4f2a;
  --forest-ink: #cdd8a8;
  --forest-line: #8d9a6a;
  --forest-hover: #4f6135;
  --on-forest: #f3f3e8;
  --wash: rgba(205, 216, 168, 0.1);
  --walk-bg: rgba(23, 27, 20, 0.97);
  --ghost-line: #8d9a6a;
  --right-bg: #2f3d1e;
  --right-line: #9db364;
  --wrong-bg: #3d2b1f;
  --wrong-line: #c08d68;
}
/* A soft change when the button is pressed, and only then. */
.theme-fading :is(.wood-panel, .walk, .old, .test-card, .prose),
.theme-fading :is(.wood-panel, .walk, .old, .test-card, .prose) * { transition: background-color 0.4s, color 0.4s, border-color 0.4s, fill 0.4s; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--peat); }
body { margin: 0; min-height: 100vh; min-height: 100svh; background: var(--peat); color: var(--parch); font: 400 18px/1.45 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; line-height: 1.08; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-underline-offset: 0.16em; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; }
:focus-visible { outline: 2px solid var(--lichen); outline-offset: 2px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 100; padding: 10px 16px; background: var(--lichen); color: var(--ink); }
.skip:focus { top: 12px; }

/* ---- top bar ---- */
.topbar { position: fixed; inset: 0 0 auto; z-index: 40; display: flex; align-items: center; gap: 12px; min-height: var(--topbar); padding: 0 var(--gutter); background: linear-gradient(to bottom, rgba(8, 11, 8, 0.74), rgba(8, 11, 8, 0)); }
.brand { display: flex; align-items: baseline; gap: 10px; min-height: 44px; padding-top: 8px; text-decoration: none; color: var(--parch); margin-right: auto; }
.brand-ogham { font: 24px/1 var(--ogham); letter-spacing: 1px; color: var(--lichen); }
.brand-name { font: 500 22px/1 var(--serif); }
.nav-wide { display: flex; gap: 2px; }
.nav-wide a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; text-decoration: none; font-size: 17px; color: var(--parch); text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55); }
.nav-wide a:hover { color: var(--lichen-2); }
.nav-wide a[aria-current] { color: var(--lichen); box-shadow: inset 0 -2px 0 var(--lichen); }
.nav-menu { display: none; position: relative; }
.nav-menu summary { display: flex; align-items: center; min-height: 44px; padding: 0 14px; list-style: none; border: 1px solid rgba(243, 236, 216, 0.5); border-radius: 22px; cursor: pointer; background: var(--glass-2); }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu ul { position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; padding: 8px; background: var(--peat-2); border: 1px solid var(--peat-3); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); }
.nav-menu a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; text-decoration: none; }
.nav-menu a[aria-current] { color: var(--lichen); }
.nav-menu .nav-legal { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--peat-3); }
.sound-toggle { min-height: 44px; padding: 0 14px; margin-left: 4px; border: 1px solid rgba(243, 236, 216, 0.5); border-radius: 22px; background: var(--glass-2); font-size: 16px; white-space: nowrap; }
.sound-toggle[aria-pressed='true'] { border-color: var(--lichen); color: var(--lichen); }
.theme-toggle { display: none; flex: none; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; margin-left: 4px; border: 1px solid rgba(243, 236, 216, 0.5); border-radius: 50%; background: var(--glass-2); color: var(--parch); transition: border-color 0.3s, color 0.3s; }
.js .theme-toggle { display: flex; }
.theme-toggle:hover { border-color: var(--lichen); color: var(--lichen); }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.theme-sun, [data-theme='dark'] .theme-moon { display: none; }
[data-theme='dark'] .theme-sun { display: block; }
@media (max-width: 1080px) { .nav-wide { display: none; } .nav-menu { display: block; } }
/* The Wood is the one page with both Wind and the theme button, so phones need a tighter bar. */
@media (max-width: 480px) {
  .page-wood .topbar { gap: 6px; }
  .page-wood .nav-menu summary, .page-wood .sound-toggle { padding: 0 10px; }
  .page-wood .sound-toggle, .page-wood .theme-toggle { margin-left: 0; }
}
@media (max-width: 374px) { .page-wood .brand-ogham { display: none; } }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border: 1px solid transparent; border-radius: 3px; font: 500 17px/1.1 var(--sans); text-decoration: none; text-align: center; transition: background-color 0.2s, color 0.2s, border-color 0.2s; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-gold { background: var(--lichen); color: #20190a; }
.btn-gold:hover:not(:disabled) { background: var(--lichen-2); }
.btn-solid { background: var(--forest); color: var(--on-forest); }
.btn-solid:hover:not(:disabled) { background: var(--forest-hover); }
.btn-line { border-color: var(--forest-line); color: var(--forest-ink); }
.btn-line:hover { background: var(--wash); }
.btn-ghost { border-color: rgba(243, 236, 216, 0.55); color: var(--parch); background: rgba(10, 14, 10, 0.3); }
.btn-ghost:hover:not(:disabled) { border-color: var(--parch); background: rgba(10, 14, 10, 0.5); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.linkish { min-height: 44px; padding: 0; border: 0; background: none; text-decoration: underline; text-underline-offset: 0.18em; color: inherit; }
.tab { min-height: 44px; padding: 0 16px; border: 1px solid rgba(243, 236, 216, 0.4); background: var(--glass-2); border-radius: 22px; color: var(--parch); }
.tab[aria-selected='true'] { background: var(--parch); color: var(--ink); border-color: var(--parch); }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 16px; }
.field > span { color: var(--parch-2); }
.field input, .field select { min-height: 46px; padding: 0 12px; border: 1px solid rgba(243, 236, 216, 0.45); border-radius: 3px; background: rgba(6, 9, 6, 0.6); color: var(--parch); font-size: 18px; width: 100%; }
.field select option { background: var(--peat-2); }
.eyebrow { font-size: 15px; letter-spacing: 0.03em; color: inherit; opacity: 0.86; }

/* ---- letter marks ---- */
.glyph line { stroke-linecap: round; }
.glyph .edge { stroke: currentColor; stroke-width: 2.4; opacity: 0.55; }
.glyph .cut { stroke: currentColor; stroke-width: 4.4; }
.glyph .notch { stroke: currentColor; stroke-width: 6.5; }
.glyph-lg { width: 76px; height: 128px; flex: 0 0 76px; }
.glyph-xs { width: 16px; height: 28px; }
.glyph-xs .edge { stroke-width: 1.6; }
.glyph-xs .cut { stroke-width: 2.6; }
.glyph-xs .notch { stroke-width: 3.6; }
.glyph-sm { width: 30px; height: 56px; }
.glyph-sm .edge { stroke-width: 1.5; }
.glyph-sm .cut { stroke-width: 3; }
.glyph-sm .notch { stroke-width: 4.2; }
.glyph-grid { width: 58px; height: 104px; flex: 0 0 58px; color: var(--parch); }
.dot-s { display: inline-block; flex: none; width: 11px; height: 11px; margin-right: 7px; border: 1.6px solid var(--lichen); border-radius: 50%; vertical-align: -0.05em; }
.dot-tree { background: var(--lichen); }
.dot-maybe { background: linear-gradient(90deg, var(--lichen) 50%, transparent 50%); }
.dot-trad { background: transparent; }

/* ---- 3D scene and stills ---- */
.scene, .poster { position: fixed; inset: 0; width: 100%; height: 100%; }
.scene { display: block; opacity: 0; transition: opacity 1.4s ease; touch-action: pan-y; }
.scene-ready .scene { opacity: 1; }
.no-scene .scene { display: none; }
.poster { background-size: cover; background-position: 28% center; background-color: var(--peat); }
.poster-birch { background-image: url(/assets/img/birch.2ce4cc4a82.jpg); }
.poster-stone { background-image: url(/assets/img/stone.a01931d2eb.jpg); }
.has-scene::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 1; background: radial-gradient(ellipse at 40% 45%, transparent 55%, rgba(5, 8, 5, 0.34) 100%); }
.wood { position: relative; z-index: 5; }

body.has-backdrop { background: transparent; }
.has-backdrop .topbar { position: absolute; }
.backdrop { position: fixed; inset: 0; z-index: -1; background-size: cover; background-position: center; }
.backdrop::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 14, 10, 0.7), rgba(10, 14, 10, 0.86)); }
.backdrop-birch { background-image: url(/assets/img/birch.2ce4cc4a82.jpg); }
.backdrop-moss { background-image: url(/assets/img/birch.2ce4cc4a82.jpg); filter: saturate(0.7) brightness(0.7); }

/* ---- the first tale ---- */
.page-tale { overflow: hidden; }
.tale { position: fixed; z-index: 5; left: var(--gutter); bottom: max(28px, calc(var(--safe-b) + 16px)); width: min(600px, calc(100vw - var(--gutter) * 2)); pointer-events: none; }
.tale-step { padding: clamp(20px, 3vw, 34px); background: var(--glass); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); pointer-events: auto; animation: rise 0.9s ease both; }
.tale-step h1 { font-size: clamp(66px, 10vw, 112px); line-height: 0.95; }
.tale-step h2 { font-size: clamp(36px, 5vw, 52px); margin-bottom: 12px; }
.kicker { color: var(--lichen); font-size: 17px; margin-bottom: 6px; }
.kicker[aria-hidden] { font: 30px/1 var(--ogham); letter-spacing: 2px; }
.lede { font: 400 clamp(21px, 2.4vw, 26px)/1.28 var(--serif); margin: 12px 0; }
.tale-copy { font: 400 clamp(18px, 1.9vw, 21px)/1.36 var(--serif); margin: 0 0 12px; color: #e8e2cd; }
.tale-step .actions { margin-top: 18px; }
.tale-step-carve { background: var(--glass-2); }
.tale-prompt { font-size: clamp(25px, 3vw, 34px) !important; margin-bottom: 14px !important; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---- the wood ---- */
.wood-panel { position: fixed; z-index: 6; top: 0; right: 0; bottom: 0; width: min(46vw, 660px); padding: calc(var(--topbar) + 12px) clamp(26px, 3.4vw, 52px) 118px; overflow-y: auto; background: var(--bark); color: var(--ink); overscroll-behavior: contain; scrollbar-color: var(--rule) transparent; }
.js .letter { display: none; }
.js .letter.is-active { display: block; animation: settle 1.1s ease both; }
html:not(.js) .letter { padding-bottom: 42px; margin-bottom: 42px; border-bottom: 3px solid var(--rule); }
@keyframes settle { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.letter .eyebrow { color: var(--ink-2); margin-bottom: 8px; }
.letter-head { display: flex; gap: 22px; align-items: center; }
.letter-head .glyph { color: var(--ink); }
.letter-name { font-size: clamp(60px, 6vw, 84px); line-height: 0.95; outline: none; }
.said { margin: 3px 0 8px; font: italic 400 21px/1.2 var(--serif); color: var(--gold-ink); }
.said em { font-style: italic; }
.facts { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; font-size: 16px; }
.facts dt { font-size: 13px; letter-spacing: 0.04em; color: var(--ink-2); }
.facts dd { margin: 0; font-weight: 500; }
.hook { margin: 14px 0 0; font: italic 400 22px/1.25 var(--serif); color: var(--forest-ink); }
.sec { border-top: 1px solid var(--rule); padding-top: 12px; margin-top: 16px; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; margin-bottom: 9px; }
.sec-head h3 { font-size: 25px; }
.src { font-size: 14px; line-height: 1.2; color: var(--ink-2); text-align: right; flex: 0 1 46%; }
.know { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.know-item p { font-size: 16px; line-height: 1.28; margin-top: 6px; }
.sketch { width: 100%; height: auto; color: var(--ink); fill: none; }
.sketch .l { stroke: currentColor; stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.sketch .l2 { stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.sketch .lt { stroke: currentColor; stroke-width: 0.9; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.sketch .lf { stroke: currentColor; stroke-width: 1.3; fill: var(--bark-2); stroke-linejoin: round; }
.sketch .thick { stroke: currentColor; stroke-width: 4.5; fill: none; stroke-linecap: round; }
.sketch .dot { fill: currentColor; stroke: none; }
.kennings { font: italic 400 21px/1.28 var(--serif); }
.pairing { display: flex; align-items: flex-start; margin-top: 8px; font-size: 16px; line-height: 1.3; color: var(--ink-2); }
.pairing .dot-s { margin-top: 4px; border-color: var(--gold-mark); }
.pairing .dot-tree { background: var(--gold-mark); }
.pairing .dot-maybe { background: linear-gradient(90deg, var(--gold-mark) 50%, transparent 50%); }
.tale-text { font: 400 19px/1.36 var(--serif); }
.tale-text a { color: var(--forest-ink); font-family: var(--sans); font-weight: 500; white-space: nowrap; }
.sit-text { font: 400 20px/1.34 var(--serif); margin-bottom: 8px; }
.sit-sec .actions { margin-top: 18px; }
.pairing-note { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 16px; line-height: 1.35; color: var(--ink-2); }
.pairing-note a { color: var(--forest-ink); }

.walk { position: fixed; z-index: 7; right: 0; bottom: 0; width: min(46vw, 660px); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 8px 12px calc(8px + var(--safe-b)); background: var(--walk-bg); color: var(--ink); border-top: 1px solid var(--rule); }
.walk-btn { min-height: 46px; padding: 0 12px; border: 1px solid var(--forest-line); border-radius: 3px; background: transparent; font-size: 16px; font-weight: 500; white-space: nowrap; }
.walk-next { background: var(--forest); border-color: var(--forest); color: var(--on-forest); }
.marks { display: flex; justify-content: center; overflow: hidden; }
.marks a { display: flex; align-items: center; justify-content: center; width: 17px; height: 44px; color: var(--ink-2); opacity: 0.55; text-decoration: none; }
.marks a:hover { opacity: 1; }
.marks a.on { opacity: 1; color: var(--gold-mark); box-shadow: inset 0 -3px 0 var(--gold-mark); }
.marks li:nth-child(5n):not(:last-child) { margin-right: 4px; }
.marks .glyph-xs { width: 12px; height: 26px; }
.wood-caption { position: fixed; z-index: 4; left: var(--gutter); bottom: 22px; width: min(calc(54vw - var(--gutter) * 2), 640px); padding: 16px 22px 18px; background: rgba(18, 17, 10, 0.72); color: var(--parch); pointer-events: none; transition: opacity 0.9s; }
.walking .wood-caption { opacity: 0; }
.cap-title { font-size: 15px; letter-spacing: 0.03em; color: var(--parch-2); margin-bottom: 3px; }
.cap-text { font: 400 clamp(19px, 1.7vw, 24px)/1.26 var(--serif); }
.noscript { position: fixed; z-index: 50; left: 12px; right: 12px; top: 70px; padding: 12px 16px; background: var(--bark); color: var(--ink); }
@media (max-width: 1099px) { .wood-caption { display: none; } }
.page-wood .topbar { right: min(46vw, 660px); }
.page-wood .nav-wide a { font-size: 16px; padding: 0 8px; }
.walking .marks a { pointer-events: auto; }

html:not(.js) .wood-panel { position: relative; width: auto; max-width: 760px; margin: 0 auto; }
html:not(.js) .walk { display: none; }
html:not(.js) .page-wood .topbar { right: 0; }
html:not(.js) .scene { display: none; }

.page-wood .nav-wide { display: none; }
.page-wood .nav-menu { display: block; }
.letter { scroll-margin-top: calc(var(--topbar) + 12px); }
@media (max-width: 899px) {
  .page-wood .topbar { right: 0; position: absolute; }
  .wood-panel { position: relative; width: 100%; margin-top: 50vh; margin-top: 50svh; padding: 22px 18px 110px; overflow: visible; box-shadow: 0 -18px 36px rgba(5, 8, 5, 0.3); }
  .walk { width: 100%; padding-inline: 8px; }
  .walk-btn { padding: 0 9px; font-size: 15px; }
  .marks { display: none; }
  .walk { grid-template-columns: 1fr 1.6fr; }
  .know { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .know-item { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; align-items: center; }
  .know-item p { margin: 0; }
  .letter-name { font-size: 58px; }
  .sec-head h3 { font-size: 23px; }
  .src { flex-basis: 40%; }
  .scene { touch-action: pan-y; }
}

/* ---- sitting ---- */
.sit-overlay { position: fixed !important; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: 24px; background: radial-gradient(ellipse at center, rgba(6, 9, 6, 0.3), rgba(6, 9, 6, 0.68)); animation: fade 1.6s ease both; text-align: center; }
.sitting .wood-panel, .sitting .walk, .sitting .topbar, .sitting .wood-caption { opacity: 0; pointer-events: none; transition: opacity 1.2s; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sit-inner { width: min(620px, 100%); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.breath { position: relative; width: 170px; height: 170px; border: 1.5px solid rgba(243, 236, 216, 0.3); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.breath-core { width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle, rgba(240, 212, 140, 0.55), rgba(240, 212, 140, 0.1) 70%, transparent); transform: scale(0.6); }
.breath-sm { width: 76px; height: 76px; flex: 0 0 76px; }
.sit-phase { font: 400 32px/1.1 var(--serif); }
.sit-line { min-height: 5.4em; font: 400 clamp(20px, 3vw, 26px)/1.32 var(--serif); opacity: 0; transition: opacity 0.9s ease; text-shadow: 0 1px 16px rgba(0, 0, 0, 0.7); }
.sit-line.show { opacity: 1; }
.sit-time { color: var(--parch-2); font-variant-numeric: tabular-nums; }

/* ---- the stone ---- */
.page-stone, .page-old { overflow: hidden; }
.stone { position: fixed; inset: 0; z-index: 5; pointer-events: none; }
.stone-tabs { position: absolute; left: var(--gutter); top: calc(var(--topbar) + 8px); display: flex; gap: 8px; pointer-events: auto; flex-wrap: wrap; }
.stone-note { position: absolute; left: var(--gutter); top: calc(var(--topbar) + 66px); width: min(300px, 44vw); padding: 10px 14px; background: var(--glass); font-size: 16px; line-height: 1.32; }
.stone-panel { position: absolute; left: var(--gutter); right: var(--gutter); bottom: max(16px, var(--safe-b)); display: grid; grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) minmax(0, 1.7fr); gap: 14px 28px; align-items: start; padding: 20px 26px; background: var(--glass); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); pointer-events: auto; }
.stone-name { font-size: clamp(46px, 5vw, 66px); line-height: 1; }
.stone-detail { font-size: 17px; line-height: 1.32; color: var(--parch-2); }
.stone-climb { display: flex; gap: 16px; align-items: flex-start; }
.stone-climb .breath-core { transform: scale(0.42); opacity: 0.55; transition: transform 0.7s ease, opacity 0.7s ease; }
.stone-climb .breath-core.breathing { transition: none; }
.climb-ticks { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.climb-ticks line { stroke: rgba(243, 236, 216, 0.38); stroke-width: 2; stroke-linecap: round; vector-effect: non-scaling-stroke; transition: stroke 0.5s ease; }
.climb-ticks line.lit { stroke: var(--lichen); }
.climb-words { min-width: 0; }
.climb-sit { display: inline-flex; align-items: center; min-height: 32px; margin-top: 2px; line-height: 1.2; color: var(--lichen); }
@media (pointer: coarse) { .climb-sit { min-height: 44px; } }
.breath-word { font: 400 25px/1.12 var(--serif); margin-bottom: 4px; }
.stone-ladder { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 12px; grid-row: 1 / span 2; grid-column: 3; }
.ladder-title { font-size: 14px; color: var(--parch-2); margin-bottom: 2px; }
.ladder-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ladder-btn { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; min-height: 66px; padding: 3px 0; border: 0; background: none; color: var(--parch-2); }
.ladder-btn span { display: none; }
.ladder-btn:hover { color: var(--parch); }
.ladder-btn[aria-pressed='true'] { color: var(--lichen); box-shadow: inset 0 -2px 0 var(--lichen); }
.ladder-btn.done { color: var(--parch); }
.stone-actions { display: flex; flex-wrap: wrap; gap: 8px; grid-column: 1 / span 2; }
.name-panel { grid-template-columns: minmax(0, 1fr); }
.name-change { display: none; }
@media (min-width: 1041px) {
  .name-panel { right: auto; width: 420px; top: calc(var(--topbar) + 62px); bottom: 16px; align-content: start; overflow-y: auto; }
  [data-stone-mode='name'] .stone-note { display: none; }
}
@media (max-width: 1040px) {
  .name-panel.carving .name-form, .name-panel.carving .name-notes { display: none; }
  .name-panel.carving .name-change { display: inline-flex; }
}
.name-form { display: flex; flex-direction: column; gap: 10px; }
.name-private { font-size: 15px; color: var(--parch-2); }
.name-letters { display: flex; flex-wrap: wrap; gap: 2px 3px; align-items: flex-end; margin: 6px 0; min-height: 66px; }
.name-letters li { display: flex; flex-direction: column; align-items: center; font-size: 14px; color: var(--parch-2); }
.name-letters li.space { width: 12px; }
.name-letters li.cut { color: var(--lichen); }
.name-letters .glyph-sm { color: currentColor; }
.name-notes { font-size: 15px; line-height: 1.3; color: var(--parch-2); }
.name-actions { grid-column: 1 / -1; }
.name-status { grid-column: 1 / -1; min-height: 1.1em; }
@media (max-width: 1040px) {
  .stone-panel { grid-template-columns: 1fr 1fr; padding: 14px 16px; gap: 10px 16px; }
  .stone-ladder { grid-column: 1 / -1; grid-row: auto; }
  .stone-note { display: none; }
  .stone-actions { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .stone-panel { left: 0; right: 0; bottom: 0; padding: 10px 12px calc(10px + var(--safe-b)); gap: 8px 10px; max-height: 56vh; overflow-y: auto; }
  .stone-name { font-size: 38px; }
  .stone-detail { font-size: 15px; }
  .breath-sm { width: 54px; height: 54px; flex-basis: 54px; }
  .breath-word { font-size: 19px; }
  .stone-climb { gap: 8px; }
  .climb-sit { font-size: 15px; }
  .stone-ladder { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 10px; }
  .ladder-btn { min-height: 46px; }
  .ladder-btn .glyph-sm { width: 22px; height: 40px; }
  .stone-tabs { top: calc(var(--topbar) - 6px); }
  .tab { min-height: 40px; padding: 0 12px; font-size: 16px; }
  .stone-actions .btn { flex: 1 1 auto; min-height: 44px; padding: 0 10px; font-size: 15px; }
  .name-panel { grid-template-columns: minmax(0, 1fr); }
}

/* ---- all letters ---- */
.letters { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: clamp(24px, 3.2vw, 48px); padding: calc(var(--topbar) + 26px) var(--gutter) 40px; max-width: 1560px; margin: 0 auto; min-height: 100svh; }
.letters-intro h1 { font-size: clamp(46px, 5vw, 66px); line-height: 1; margin-bottom: 16px; }
.gestures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 18px 0 12px; }
.gesture { text-align: center; font-size: 14px; color: var(--parch-2); }
.gesture svg { width: 100%; height: auto; color: var(--lichen); }
.gesture .edge { stroke: var(--parch-3); stroke-width: 2; }
.gesture .cut { stroke: var(--lichen); stroke-width: 4; stroke-linecap: round; }
.gesture .notch { stroke: var(--lichen); stroke-width: 7; stroke-linecap: round; }
.reading-tip { font-size: 17px; line-height: 1.34; color: var(--parch-2); margin-bottom: 16px; }
.legend { display: flex; flex-direction: column; gap: 7px; font-size: 16px; line-height: 1.26; color: var(--parch-2); margin-bottom: 18px; }
.legend p { display: flex; align-items: flex-start; }
.legend .dot-s { margin-top: 4px; }
.legend-note { display: block !important; color: var(--parch); }
.letters-grid { display: flex; flex-direction: column; gap: 0; }
.fam { display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid rgba(243, 236, 216, 0.22); }
.fam-head h2 { font-size: 23px; line-height: 1.1; margin-bottom: 3px; }
.fam-head p { font-size: 15px; color: var(--parch-2); }
.fam-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.cell { display: flex; gap: 6px; align-items: center; min-height: 112px; padding: 3px; text-decoration: none; border-radius: 3px; transition: background-color 0.2s; }
.fam { transition: opacity 0.25s; }
.fam.dim { opacity: 0.28; }
.cell:hover { background: rgba(243, 236, 216, 0.09); }
.cell:hover .glyph-grid { color: var(--lichen); }
.cell-body { display: flex; flex-direction: column; min-width: 0; }
.cell-name { font: 400 20px/1.08 var(--serif); }
.cell-sound { font-size: 16px; color: var(--lichen); margin: 1px 0; }
.cell-tree { display: flex; align-items: center; font-size: 15px; line-height: 1.12; color: var(--parch-2); }
.cell-tree .dot-s { width: 9px; height: 9px; margin-right: 5px; }
@media (max-width: 1180px) {
  .letters { grid-template-columns: minmax(0, 1fr); }
  .letters-intro { max-width: 640px; }
  .fam { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .fam-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* ---- test yourself ---- */
.test { max-width: 1120px; margin: 0 auto; padding: calc(var(--topbar) + 20px) var(--gutter) 40px; }
.test-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 20px; margin-bottom: 16px; }
.test-head h1 { font-size: clamp(38px, 4.4vw, 56px); margin-right: auto; width: 100%; }
.test-modes { display: flex; flex-wrap: wrap; gap: 6px; }
.field-inline { flex-direction: row; align-items: center; gap: 8px; margin-left: auto; }
.field-inline select { width: auto; }
.test-card { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 1.5fr); gap: 16px clamp(20px, 3vw, 40px); padding: clamp(18px, 3vw, 34px); background: var(--bark); color: var(--ink); }
.test-card .eyebrow { color: var(--ink-2); }
.test-q { font-size: clamp(50px, 6vw, 80px); line-height: 1; margin: 2px 0 6px; }
.test-q.small { font: italic 400 clamp(28px, 3.4vw, 38px)/1.16 var(--serif); }
.test-sub { font: 400 20px/1.3 var(--serif); color: var(--ink-2); }
.test-show { margin-top: 10px; }
.test-show .glyph { width: 120px; height: 200px; color: var(--ink); }
.test-show .glyph .edge { stroke-width: 3; }
.pad-wrap { display: flex; gap: 14px; justify-content: center; }
.pad-fig { margin: 0; flex: 1 1 0; min-width: 0; max-width: 340px; }
.pad-fig figcaption { font-size: 15px; color: var(--ink-2); text-align: center; margin-top: 4px; }
.pad { position: relative; aspect-ratio: 4 / 5; border-radius: 2px; overflow: hidden; background: #6d6a62 url(/assets/img/stone-tile.6b9b5fa0ef.jpg) center / cover; box-shadow: inset 0 0 44px rgba(10, 8, 4, 0.5); }
.pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.pad::before { content: ''; position: absolute; left: calc(50% - 1.5px); top: 0; bottom: 0; width: 3px; background: linear-gradient(90deg, rgba(255, 250, 235, 0.42), rgba(12, 10, 6, 0.62)); }
.pad-hint { position: absolute; left: 0; right: 0; top: 46%; text-align: center; color: rgba(255, 250, 235, 0.84); pointer-events: none; font: 400 21px/1 var(--serif); text-shadow: 0 1px 6px #000; transition: opacity 0.3s; }
.pad-hint.gone { opacity: 0; }
.pad-still svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pad-still .edge { display: none; }
.pad-still .cut, .pad-still .notch { stroke: #1a140e; stroke-width: 2.4; }
.pad-still .notch { stroke-width: 3.2; }
.choices { grid-column: 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choice { display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 8px 14px; border: 1px solid var(--rule); border-radius: 3px; background: var(--bark-2); text-align: left; font: 400 23px/1.1 var(--serif); color: var(--ink); }
.choice:hover:not(:disabled) { border-color: var(--ink); }
.choice:disabled { cursor: default; }
.choice .glyph { width: 40px; height: 66px; flex: none; color: var(--ink); }
.choice small { display: block; font: 400 15px/1.2 var(--sans); color: var(--ink-2); }
.choice.right { background: var(--right-bg); border-color: var(--right-line); }
.choice.wrong { background: var(--wrong-bg); border-color: var(--wrong-line); }
.test-verdict { grid-column: 1 / -1; min-height: 1.4em; font: 400 21px/1.3 var(--serif); }
.test-actions { grid-column: 1 / -1; justify-content: flex-end; }
.test-card .btn-ghost { color: var(--ink); border-color: var(--ghost-line); background: transparent; }
.test-card .btn-ghost:hover:not(:disabled) { background: var(--wash); border-color: var(--ink); }
.test-card .btn-gold { background: var(--forest); color: var(--on-forest); }
.test-card .btn-gold:hover:not(:disabled) { background: var(--forest-hover); }
.grove { margin-top: 18px; padding: 18px 22px; background: var(--glass); }
.grove-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-bottom: 6px; }
.grove-head h2 { font-size: 27px; }
.grove-head p { color: var(--parch-2); font-size: 17px; }
.grove-marks { display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); gap: 2px; margin-bottom: 6px; }
.grove-marks li { display: flex; flex-direction: column; align-items: center; color: rgba(243, 236, 216, 0.32); }
.grove-marks .tree-mark { width: 100%; max-width: 40px; height: auto; min-height: 44px; }
.grove-marks li.seen { color: rgba(240, 212, 140, 0.68); }
.grove-marks li.rooted { color: var(--lichen); }
.grove-marks .label { font-size: 12px; white-space: nowrap; }
.grove .linkish { font-size: 15px; color: var(--parch-2); margin-right: 14px; }
.grove .name-private { display: inline; }
@media (max-width: 860px) {
  .test-card { grid-template-columns: minmax(0, 1fr); }
  .choices { grid-column: 1; }
  .field-inline { margin-left: 0; }
  .grove-marks { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .grove-marks .label { display: none; }
  .test-show .glyph { width: 90px; height: 150px; }
}
@media (max-width: 520px) {
  .choices { grid-template-columns: minmax(0, 1fr); }
  .pad-wrap { gap: 8px; }
}

/* ---- old stones ---- */
.old { position: fixed; z-index: 6; top: 0; right: 0; bottom: 0; width: min(44vw, 620px); overflow-y: auto; background: var(--bark); color: var(--ink); padding: calc(var(--topbar) + 12px) clamp(22px, 3vw, 46px) 30px; overscroll-behavior: contain; }
.page-old .topbar { right: min(44vw, 620px); }
.page-old .nav-wide { display: none; }
.page-old .nav-menu { display: block; }
.old h1 { font-size: clamp(36px, 3.8vw, 50px); margin-bottom: 8px; }
.old-intro { font: 400 19px/1.34 var(--serif); margin-bottom: 14px; }
.stone-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; margin-bottom: 14px; }
.stone-pick { display: flex; gap: 9px; align-items: center; width: 100%; min-height: 58px; padding: 6px 10px; text-align: left; border: 1px solid var(--rule); border-radius: 3px; background: var(--bark-2); font-size: 15px; line-height: 1.16; color: var(--ink); }
.stone-pick:hover { border-color: var(--ink); }
.stone-pick[aria-pressed='true'] { background: var(--forest); color: var(--on-forest); border-color: var(--forest); }
.stone-pick strong { font: 500 18px/1.1 var(--serif); }
.stone-pick-num { font: 500 24px/1 var(--serif); opacity: 0.7; }
.stone-pick.done .stone-pick-num { color: var(--gold-mark); }
.reading { border-top: 1px solid var(--rule); padding-top: 12px; }
.reading .eyebrow { color: var(--ink-2); }
.reading h2 { font-size: 36px; margin-bottom: 6px; }
.old-about { font: 400 18px/1.34 var(--serif); margin-bottom: 12px; }
.old-reading { min-height: 1.5em; margin-bottom: 10px; font: 500 26px/1.24 var(--serif); letter-spacing: 0.06em; overflow-wrap: anywhere; color: var(--forest-ink); }
.old-reading .pending { color: var(--rule); }
.old-reading .wb { display: inline-block; width: 0.6em; }
.old-prompt { font-size: 17px; margin-bottom: 8px; }
.old-choices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.old-choices .choice { flex-direction: column; justify-content: center; gap: 2px; min-height: 104px; padding: 6px 4px; text-align: center; font-size: 18px; }
.old-choices .choice .glyph { width: 32px; height: 54px; }
.reading .test-verdict { font-size: 18px; margin: 8px 0 0; }
.old-meaning { font: italic 500 28px/1.18 var(--serif); margin-bottom: 8px; color: var(--forest-ink); }
.old-words { font-size: 17px; line-height: 1.34; margin-bottom: 8px; }
.old-note { font-size: 15px; line-height: 1.34; color: var(--ink-2); margin-bottom: 8px; }
.old-source { font-size: 16px; margin-bottom: 14px; }
.old .btn-gold { background: var(--forest); color: var(--on-forest); }
.old .btn-gold:hover:not(:disabled) { background: var(--forest-hover); }
@media (max-width: 899px) {
  .page-old { overflow: auto; }
  .old { position: relative; width: 100%; margin-top: 54vh; margin-top: 54svh; padding: 20px 18px 40px; overflow: visible; }
  .page-old .topbar { right: 0; position: absolute; }
}

/* ---- reading pages ---- */
.prose-page { position: relative; max-width: 900px; margin: 0 auto; padding: calc(var(--topbar) + 34px) var(--gutter) 50px; }
.prose-head h1 { font-size: clamp(54px, 7vw, 86px); line-height: 0.98; margin-bottom: 14px; }
.prose-head .lede { max-width: 680px; }
.prose { padding: clamp(20px, 3vw, 40px); background: var(--bark); color: var(--ink); font: 400 20px/1.42 var(--serif); }
.prose p { margin-bottom: 14px; }
.prose h2 { font-size: clamp(28px, 3.4vw, 38px); margin: 26px 0 10px; scroll-margin-top: calc(var(--topbar) + 8px); }
.prose a { color: var(--forest-ink); }
.prose .dot-s { border-color: var(--gold-mark); }
.prose .dot-tree { background: var(--gold-mark); }
.prose .dot-maybe { background: linear-gradient(90deg, var(--gold-mark) 50%, transparent 50%); }
.data-table { width: 100%; border-collapse: collapse; margin: 14px 0 18px; font: 400 17px/1.25 var(--sans); }
.data-table caption { text-align: left; font-weight: 500; margin-bottom: 6px; }
.data-table th, .data-table td { padding: 6px 8px; text-align: left; border-bottom: 1px solid var(--rule-2); vertical-align: top; }
.data-table thead th { font-weight: 500; color: var(--ink-2); font-size: 15px; }
.data-table tbody th { font: 500 18px/1.2 var(--serif); }
.source-list { list-style: disc; padding-left: 20px; }
.source-list li { margin-bottom: 8px; font-size: 18px; }

/* ---- text written in ogham ----
   The serif is for the borrowed punctuation, and for words as they turn. */
.og-text { font-family: 'Noto Sans Ogham', var(--serif); }
.w { display: inline-block; min-width: 1.5em; white-space: nowrap; text-align: center; }
.og-start::before { content: '\169B'; }
.og-end::after { content: '\169C'; }
.w.is-en::before, .w.is-en::after { content: none; }
.js .og-text .w { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.og-text a { color: inherit; text-decoration: none; }
.og-text a .w { text-decoration: underline dotted; text-underline-offset: 0.3em; }
.prose-head .w.is-en, .prose-head .w.is-turning { color: var(--lichen); }
.og-body .w.is-en, .og-body .w.is-turning { color: var(--gold-ink); }
.og-all .w.is-en { color: inherit; }
.og-text a .w.is-en { text-decoration: underline; }
@media (hover: hover) {
  .js .og-text .w:hover { color: var(--lichen); }
  .js .og-body .w:hover { color: var(--gold-ink); }
}
.og-page h1 { font-size: clamp(38px, 6vw, 64px); }
.og-page .lede.og-text { font-size: clamp(20px, 2.2vw, 24px); line-height: 1.7; }
.og-actions { margin: 20px 0 26px; }
.og-hint { font-size: 17px; color: var(--parch-2); }
.og-body { font-size: 23px; line-height: 2; word-spacing: 0.15em; }
.og-body p { margin-bottom: 18px; }
.og-body h2 { line-height: 1.5; }
.og-all .og-body { font-size: 20px; line-height: 1.42; word-spacing: normal; }
.og-all .og-body h2 { line-height: 1.08; }
.og-all .w { display: inline; white-space: normal; text-decoration: none; }
.og-all .og-text a { text-decoration: underline; }
.og-all .prose-head .lede { line-height: 1.28; }
.og-body > h2:first-child { margin-top: 0; }
.og-english { margin-top: 18px; }
.og-english .eyebrow { margin-bottom: 4px; }
.og-english > h2:first-of-type { margin-top: 0; }
.og-key { margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--rule-2); font: 400 17px/1.35 var(--sans); }
.lost { min-height: 62vh; display: flex; flex-direction: column; justify-content: center; }
.lost h1 { font-size: clamp(50px, 7vw, 80px); }

/* ---- the tales ----
   Each tale is told over its own scene: the dark wood, with the things of the
   story drawn into it in lichen gold. The scene is wider than a phone, so it
   slides to keep its gold motif (at --fx across the scene) in view. */
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.backdrop-story, .backdrop-tales { background-image: url(/assets/img/birch.2ce4cc4a82.jpg); }
.backdrop-story { filter: saturate(0.75); }
.backdrop-story::after { background: linear-gradient(180deg, rgba(8, 11, 8, 0.58), rgba(8, 11, 8, 0.78) 65%, rgba(8, 11, 8, 0.9)); }
.backdrop-tales::after { background: linear-gradient(180deg, rgba(8, 11, 8, 0.66), rgba(8, 11, 8, 0.9)); }
.story-scene, .tales-wood { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; --w: max(100vw, 177.78vh); }
.scene-art { position: absolute; bottom: 0; width: var(--w); aspect-ratio: 16 / 9; height: auto; left: clamp(calc(100vw - var(--w)), calc(50vw - var(--fx, 0.5) * var(--w)), 0px); }
.story-first-writing, .story-ring, .story-four-rods { --fx: 0.74; }
.story-shield { --fx: 0.67; }
.story-silver-branch { --fx: 0.72; }
.story-secret-harp { --fx: 0.73; }
.story-baile { --fx: 0.56; }
.story-mad-king { --fx: 0.74; }
/* a little colour of their own: frost, night, dawn */
.story-ring .backdrop-story, .story-shield .backdrop-story { filter: saturate(0.35) hue-rotate(40deg) brightness(0.95); }
.story-four-rods .backdrop-story, .story-mad-king .backdrop-story { filter: saturate(0.5) brightness(0.6) hue-rotate(30deg); }
.story-silver-branch .backdrop-story, .story-first-writing .backdrop-story { filter: sepia(0.25) saturate(0.85); }
.story-well .backdrop-story { filter: saturate(0.9) hue-rotate(-8deg); }

/* scene layers */
.scene-art .tr path.b { fill: none; stroke: currentColor; stroke-linecap: round; }
.scene-art .tr path.l, .scene-art .tr path.al { fill: currentColor; }
.scene-art .tr path.s { fill: none; stroke: currentColor; stroke-width: 1.3; }
.scene-art .tr path.fruit { fill: var(--lichen); opacity: 0.55; }
.scene-art .far { color: #2c3727; opacity: 0.55; }
.scene-art .mid { color: #0f150d; }
.scene-art .near { color: #040604; }
.scene-art .twig { color: #0b0f09; }
.birch .bark { fill: none; stroke: #c3c6b6; }
.birch .mark { fill: none; stroke: #161a13; stroke-width: 3.5; stroke-linecap: round; }
.birch.far { opacity: 0.32; }
.birch.far .twig { color: #2c3727; }
.birch.mid { opacity: 0.55; }
.birch.mid .bark { stroke: #a9ad9c; }
.birch.near .bark { stroke: #8e9283; }
.ground { fill: #050705; }
.ground-soft { fill: #0a0e09; }
.snowfield { fill: #6d7871; opacity: 0.55; }
.drift { fill: #8b958e; opacity: 0.32; }
.water { fill: #18222a; opacity: 0.9; }
.fork { fill: none; stroke: #050705; stroke-width: 7; stroke-linecap: round; }
.far-hill { fill: #182017; opacity: 0.9; }
.snowcap { fill: #3d4743; opacity: 0.75; }
.hill-mid { fill: #0c110b; }
.sid { fill: #131b11; }
.sid-door { fill: #e5c26e; opacity: 0.45; }
.sid-light { animation: breathe 6s ease-in-out infinite; }
.moon { fill: #ebe6cf; opacity: 0.75; filter: url(#t-glow); }
.moon-big { opacity: 0.62; }
.madman { fill: #050705; stroke: #050705; stroke-width: 2; stroke-linejoin: round; }
.madbough { fill: none; stroke: #050705; stroke-width: 9; stroke-linecap: round; }
.star { fill: #f3ecd8; opacity: 0.6; animation: twinkle 5s ease-in-out infinite; }
.star-1 { animation-delay: -1.7s; } .star-2 { animation-delay: -3.3s; opacity: 0.35; }
.sea { fill: #0e1619; opacity: 0.75; }
.sea-line { fill: none; stroke: #9db0b0; stroke-width: 1.4; opacity: 0.22; animation: shimmer 7s ease-in-out infinite; }
.mound { fill: #070a06; }
.stone { fill: #3b4238; }
.rock { fill: #11170f; }
.fire { animation: flicker 2.6s ease-in-out infinite; }
.rampart { fill: none; stroke: #2a3326; stroke-width: 3; }
.house { fill: #d7dcd5; opacity: 0.18; }
.thatch { fill: none; stroke: #f4f4ec; stroke-width: 3; opacity: 0.35; }
.road { fill: none; stroke: #7b7f6a; stroke-width: 9; opacity: 0.2; }
.cress { fill: none; stroke: #6f8a4a; stroke-width: 3; opacity: 0.6; }
.stream { fill: none; stroke: #7e9da2; stroke-width: 4; opacity: 0.28; }
.mist { animation: drift 46s ease-in-out infinite alternate; }
.halo { animation: breathe 8s ease-in-out infinite; }
.snow { animation: fall 16s linear infinite; }
.snow-b { animation-duration: 26s; opacity: 0.5; }
.snow-b .flake, .snow-b { --drop: 180px; }
.snow-a { --drop: 240px; opacity: 0.75; }
.flake { fill: #eef0ea; }
.mote { fill: var(--lichen-2); opacity: 0; animation: mote 13s ease-in-out infinite; transform-box: fill-box; }
.mote-1 { animation-delay: -3s; } .mote-2 { animation-delay: -6.5s; } .mote-3 { animation-delay: -9.8s; }
.wing { fill: #f4f4ec; opacity: 0; animation: wing 18s ease-in-out infinite; }
.wing-1 { animation-delay: -4.5s; } .wing-2 { animation-delay: -9s; } .wing-3 { animation-delay: -13.5s; }
.flutter { transform-box: fill-box; transform-origin: 50% 0; animation: flutter 0.7s ease-in-out infinite alternate; }
.flutter-1 { animation-duration: 0.55s; animation-delay: -0.2s; } .flutter-2 { animation-duration: 0.83s; animation-delay: -0.4s; }
.sway { transform-box: fill-box; transform-origin: 50% 0; animation: sway 9s ease-in-out infinite alternate; }
.sway-slow { transform-box: fill-box; transform-origin: 0 100%; animation: sway-slow 12s ease-in-out infinite alternate; }
.ripple { fill: none; stroke: var(--lichen); stroke-width: 1.4; opacity: 0; transform-box: fill-box; transform-origin: center; animation: ripple 7s ease-out infinite; }
.ripple-1 { animation-delay: -3.5s; }
.nut { fill: var(--lichen); opacity: 0; animation: nutfall 10s ease-in infinite; }
.nut-1 { animation-delay: -2s; } .nut-2 { animation-delay: -4s; } .nut-3 { animation-delay: -6s; } .nut-4 { animation-delay: -8s; }
.g-string { animation: shimmer 4s ease-in-out infinite; }
.string-1 { animation-delay: -1.3s; } .string-2 { animation-delay: -2.6s; }
@keyframes drift { from { transform: translateX(-140px); } to { transform: translateX(140px); } }
@keyframes breathe { 0%, 100% { opacity: 0.7; } 50% { opacity: 1; } }
@keyframes twinkle { 0%, 100% { opacity: 0.65; } 50% { opacity: 0.2; } }
@keyframes shimmer { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@keyframes flicker { 0%, 100% { opacity: 0.8; } 30% { opacity: 1; } 60% { opacity: 0.6; } }
@keyframes fall { from { transform: translateY(0); } to { transform: translateY(var(--drop)); } }
@keyframes mote { 0% { opacity: 0; transform: translateY(30px); } 30%, 70% { opacity: 0.75; } 100% { opacity: 0; transform: translateY(-90px); } }
@keyframes wing { 0% { opacity: 0; transform: translate(60px, 40px) rotate(0deg); } 25%, 70% { opacity: 0.55; } 100% { opacity: 0; transform: translate(-160px, -120px) rotate(40deg); } }
@keyframes flutter { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
@keyframes sway { from { transform: skewX(-2.2deg); } to { transform: skewX(2.2deg); } }
@keyframes sway-slow { from { transform: rotate(-1.4deg); } to { transform: rotate(1.4deg); } }
@keyframes ripple { 0% { opacity: 0.7; transform: scale(0.35); } 100% { opacity: 0; transform: scale(1.5); } }
@keyframes nutfall { 0% { opacity: 0; transform: translateY(0); } 10% { opacity: 1; } 55% { opacity: 1; transform: translateY(300px); } 60%, 100% { opacity: 0; transform: translateY(305px); } }

/* the gold things, in scenes and as emblems */
.gold { color: var(--lichen); filter: url(#t-glow); }
.gold .g-line { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.gold .g-line.thin { opacity: 0.7; }
.gold .g-rod { fill: none; stroke: #ddd7bf; stroke-linecap: round; }
.scene-four-rods .gold .g-rod, .emblem-four-rods .g-rod { stroke: #b98d52; }
.gold .g-stone { fill: #2c322b; }
.gold .g-edge { fill: none; stroke: #7a8072; }
.gold .g-disc { fill: rgba(8, 11, 8, 0.6); }
.gold .g-box { fill: rgba(229, 194, 110, 0.14); }
.gold .g-leaf { fill: rgba(229, 194, 110, 0.2); stroke: currentColor; stroke-width: 1.2; }
.gold .g-nut, .gold .g-apple { fill: currentColor; }
.gold .g-silver { fill: none; stroke: #e2e6e2; stroke-linecap: round; }
.gold .g-silver-leaf { fill: rgba(226, 230, 226, 0.22); stroke: #e2e6e2; stroke-width: 1; }
.gold .g-string { stroke: currentColor; }
.gold .g-figure { fill: #070906; stroke: currentColor; stroke-width: 1.6; }
.scene-grove .gold, .scene-grove .halo { display: none; }

/* one tale */
.story { position: relative; }
.story-head { min-height: 100vh; min-height: 100svh; max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; justify-content: flex-end; padding: calc(var(--topbar) + 40px) var(--gutter) clamp(40px, 9vh, 100px); }
.story-crumb { font-size: 16px; letter-spacing: 0.03em; color: var(--parch-2); text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8); }
.story-crumb a { color: var(--lichen); text-decoration: none; }
.story-crumb a:hover { text-decoration: underline; }
.story-head h1 { max-width: 11ch; margin: 10px 0 18px; font-size: clamp(54px, 8.4vw, 118px); line-height: 0.93; text-wrap: balance; text-shadow: 0 2px 34px rgba(0, 0, 0, 0.7); }
.story-line { max-width: 31ch; font: italic 400 clamp(21px, 2.3vw, 27px)/1.32 var(--serif); color: #ede7d3; text-shadow: 0 1px 18px rgba(0, 0, 0, 0.85); }
.story-told { margin-top: 14px; font-size: 15px; color: var(--parch-3); text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8); }
.story-begin { align-self: flex-start; display: inline-flex; flex-direction: column; align-items: center; gap: 8px; min-height: 44px; margin-top: 28px; color: var(--lichen); font-size: 16px; letter-spacing: 0.08em; text-decoration: none; }
.story-begin::after { content: ''; width: 1.5px; height: 38px; background: linear-gradient(var(--lichen), transparent); animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

.story-body { position: relative; max-width: 820px; margin: 0 auto; padding: clamp(40px, 6vw, 70px) clamp(20px, 6vw, 92px) 40px; background: linear-gradient(90deg, rgba(7, 10, 7, 0), rgba(7, 10, 7, 0.88) 11%, rgba(7, 10, 7, 0.88) 89%, rgba(7, 10, 7, 0)); }
.story-part { scroll-margin-top: 20px; }
.story-part h2 { margin: 0 0 22px; font: italic 500 clamp(27px, 3.1vw, 36px)/1.1 var(--serif); color: var(--lichen); text-align: center; }
.story-part p { margin: 0 0 1.05em; font: 400 clamp(20px, 1.85vw, 22.5px)/1.62 var(--serif); color: #e8e2ce; }
.story-part p.opening::first-letter { float: left; margin: 0.05em 0.12em 0 0; font: 500 4.4em/0.8 var(--serif); color: var(--lichen); }
.story-mark { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 54px 0 24px; color: var(--lichen); opacity: 0.85; }
.story-mark::before, .story-mark::after { content: ''; width: min(110px, 22vw); height: 1px; background: linear-gradient(90deg, transparent, rgba(229, 194, 110, 0.55)); }
.story-mark::after { transform: scaleX(-1); }
.story-mark .glyph-sm { width: 22px; height: 42px; }
.story-end { margin: 46px 0 6px; text-align: center; font: 26px/1 var(--ogham); letter-spacing: 3px; color: var(--lichen); opacity: 0.8; }

.story-notes { max-width: 820px; margin: 0 auto; padding: 30px clamp(20px, 6vw, 92px) 34px; background: rgba(7, 10, 7, 0.94); border-top: 1px solid rgba(229, 194, 110, 0.3); color: var(--parch-2); }
.story-notes h2 { margin: 28px 0 10px; font-size: 28px; color: var(--parch); }
.story-notes h3 { margin: 20px 0 8px; font: 500 17px/1.2 var(--sans); color: var(--parch); }
.story-notes p { margin-bottom: 12px; font-size: 18px; line-height: 1.5; }
.notes-letter { display: flex; gap: 20px; align-items: center; }
.notes-letter .glyph { color: var(--lichen); }
.notes-letter .eyebrow { color: var(--parch-2); }
.notes-letter-name { margin: 2px 0 10px; font: 500 34px/1.1 var(--serif); color: var(--parch); }
.notes-letter-name span:last-child { font: 400 18px/1 var(--sans); color: var(--parch-2); margin-left: 6px; }
.notes-letter .btn { min-height: 44px; padding: 0 16px; font-size: 16px; }
.notes-sources { list-style: disc; padding-left: 20px; font-size: 16px; line-height: 1.4; }
.notes-sources li { margin-bottom: 6px; }
.notes-sources a { color: var(--lichen-2); }

.story-next { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; max-width: 1000px; margin: 40px auto 0; padding: 0 var(--gutter); }
.next-card { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 64px; padding: 14px 16px 18px; text-align: center; text-decoration: none; background: var(--glass); border: 1px solid rgba(229, 194, 110, 0.16); transition: border-color 0.3s, transform 0.3s; }
.next-card:hover { border-color: rgba(229, 194, 110, 0.55); transform: translateY(-3px); }
.next-all { justify-content: center; padding: 14px 22px; }
.next-dir { font-size: 14px; letter-spacing: 0.04em; color: var(--parch-2); }
.next-art .emblem { width: 96px; height: 102px; }
.next-title { font: 500 22px/1.15 var(--serif); }
.next-all .next-dir { color: var(--lichen); font-size: 16px; }

/* the list of tales: a grove of staves */
.tales { position: relative; max-width: 1240px; margin: 0 auto; padding: calc(var(--topbar) + 40px) var(--gutter) 30px; }
.tales-head { max-width: 760px; margin-bottom: clamp(30px, 5vw, 56px); }
.tales-ogham { font: 34px/1 var(--ogham); letter-spacing: 4px; color: var(--lichen); }
.tales-head h1 { margin: 10px 0 16px; font-size: clamp(66px, 11vw, 140px); line-height: 0.88; text-shadow: 0 2px 34px rgba(0, 0, 0, 0.7); }
.tales-head .lede { max-width: 640px; text-shadow: 0 1px 16px rgba(0, 0, 0, 0.8); }
.tales-intro { font-size: 18px; line-height: 1.4; color: var(--parch-2); }
.grove-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px clamp(16px, 2.4vw, 32px); align-items: start; }
.grove-item:nth-child(3n + 2) { margin-top: 60px; }
.grove-item:nth-child(3n) { margin-top: 26px; }
.tale-card { position: relative; display: flex; flex-direction: column; min-height: 540px; padding: 20px 24px 24px 66px; overflow: hidden; color: var(--parch); text-decoration: none; background: repeating-linear-gradient(90deg, rgba(243, 236, 216, 0.014) 0 2px, transparent 2px 11px), linear-gradient(180deg, rgba(16, 21, 14, 0.9), rgba(7, 10, 7, 0.95)); border: 1px solid rgba(229, 194, 110, 0.15); transition: border-color 0.4s, transform 0.4s, box-shadow 0.4s; }
.tale-card::before { content: ''; position: absolute; left: 38px; top: 20px; bottom: 20px; width: 1.5px; background: rgba(229, 194, 110, 0.3); transition: background-color 0.4s; }
.tale-card:hover { border-color: rgba(229, 194, 110, 0.5); transform: translateY(-5px); box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45); }
.tale-card:hover::before { background: var(--lichen); }
.tc-stave { position: absolute; left: 24px; bottom: 22px; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--lichen); }
.tc-stave .glyph-sm { width: 30px; height: 56px; }
.tc-stave .glyph .edge { opacity: 0; }
.tc-stave span { writing-mode: vertical-rl; transform: rotate(180deg); font: 500 17px/1 var(--serif); letter-spacing: 0.08em; }
.tc-num { font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--parch-3); }
.tc-art { display: block; margin: 4px 0 12px; }
.tc-art .emblem { width: 100%; height: 230px; transition: transform 0.6s ease; }
.tale-card:hover .emblem { transform: scale(1.04); }
.tc-use { font-size: 15px; color: var(--lichen); }
.tc-title { margin: 6px 0 10px; font: 500 clamp(27px, 2.4vw, 33px)/1.04 var(--serif); }
.tc-line { flex: 1; font: 400 18px/1.42 var(--serif); color: #d8d2be; }
.tc-go { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; font-size: 16px; color: var(--lichen); }
.tc-go::after { content: ''; width: 26px; height: 1.5px; background: currentColor; transition: width 0.4s; }
.tale-card:hover .tc-go::after { width: 46px; }
.retold { max-width: 760px; margin: 50px 0 0; font-size: 16px; line-height: 1.45; color: var(--parch-2); }
.retold a { color: var(--lichen-2); }
@media (max-width: 1020px) {
  .grove-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grove-item:nth-child(n) { margin-top: 0; }
  .grove-item:nth-child(2n) { margin-top: 44px; }
}
@media (max-width: 640px) {
  .grove-list { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .grove-item:nth-child(n) { margin-top: 0; }
  .tale-card { min-height: 0; padding: 18px 18px 22px 58px; }
  .tale-card::before { left: 32px; }
  .tc-stave { left: 18px; }
  .tc-art .emblem { height: 190px; }
  .story-head { justify-content: space-between; padding-bottom: 30px; }
  .story-head h1 { margin-top: 14px; }
  .story-body { padding: 36px 20px 30px; background: rgba(7, 10, 7, 0.86); }
  .story-notes { padding: 24px 20px 28px; }
  .notes-letter { align-items: flex-start; }
  .notes-letter .glyph-lg { width: 52px; height: 88px; flex-basis: 52px; }
  .story-next { grid-template-columns: 1fr 1fr; }
  .next-all { grid-column: 1 / -1; grid-row: 2; }
}

/* ---- footer ---- */
.foot { position: relative; margin-top: 30px; color: var(--parch-2); }
.foot-trees { width: 100%; height: 90px; }
.foot-trees path { fill: none; stroke: #4c5d2b; stroke-width: 0.9; stroke-linecap: round; }
.foot-body { background: #0b0e09; padding: 16px var(--gutter) calc(22px + var(--safe-b)); border-top: 1px solid #2b3324; }
.foot-ogham { font: 22px/1 var(--ogham); color: var(--lichen); margin-bottom: 8px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 18px; margin-bottom: 8px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 40px; }
.foot-note { max-width: 760px; font-size: 15px; line-height: 1.34; color: var(--parch-3); }
.foot-copy { margin-top: 10px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---- small footers on the scene pages ---- */
.panel-foot { margin-top: 34px; padding-top: 14px; border-top: 1px solid var(--rule); color: var(--ink-2); }
.panel-foot-ogham { font: 18px/1 var(--ogham); color: var(--forest-ink); opacity: 0.7; margin-bottom: 4px; }
.panel-foot-links { display: flex; flex-wrap: wrap; gap: 0 18px; }
.panel-foot-links a { display: inline-flex; align-items: center; min-height: 40px; font-size: 15px; color: var(--forest-ink); }
.panel-foot-copy { font-size: 14px; color: var(--ink-2); }

.legal-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0 14px; font-size: 13px; color: var(--parch-3); }
.legal-line ul { display: flex; gap: 0 12px; }
.legal-line a { display: inline-flex; align-items: center; min-height: 32px; color: var(--parch-2); text-decoration: none; }
.legal-line a:hover, .legal-line a:focus-visible { color: var(--lichen-2); text-decoration: underline; }
@media (pointer: coarse) { .legal-line a { min-height: 44px; } }
.tale-legal { margin-top: 6px; padding: 0 4px; pointer-events: auto; color: var(--parch-2); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 14px rgba(0, 0, 0, 0.75); }
.tale-legal a { color: var(--parch); }
.stone-legal { grid-column: 3; justify-self: end; align-self: end; }
.name-panel .stone-legal { grid-column: 1 / -1; }
@media (max-width: 1040px) { .stone-legal { grid-column: 1 / -1; justify-self: start; } }
