/* MindPalace page chrome, shared by every page (design language v0.4: docs/DESIGN_SYSTEM.md, section 9).
   Load after fonts.css and tokens.css, before components.css and the page's own styles:
   base, type roles, navigation, buttons, footer, sketch notes, reduced motion. */
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:hsl(var(--paper));color:hsl(var(--depth-indigo));font-family:var(--font-text);overflow-x:hidden;-webkit-font-smoothing:antialiased}
a{color:inherit}button{font:inherit;cursor:pointer}
/* the focus ring, one for every control: 2px in --focus (indigo on paper, paper on the night: tokens.css), clear of the control.
   An outline, never a shadow, so it survives forced colours (Windows contrast themes) */
:focus-visible{outline:2px solid hsl(var(--focus));outline-offset:3px;border-radius:6px}

/* type roles (section 5) */
.serif{font-family:var(--font-display);font-weight:var(--title-weight);letter-spacing:-.035em;line-height:1.05}
em.soft{font-style:italic;font-weight:400;color:hsl(var(--lilac))}
.eyebrow{font-size:11px;letter-spacing:.18em;text-transform:uppercase;font-weight:800;color:hsl(var(--ink-soft))}

/* sketch notes: product claims not yet checked against the live product (CLAUDE.md) */
.sketch-note{display:block;margin-top:12px;padding:8px 11px;border:1px dashed #b49a6a;border-radius:8px;background:rgba(255,248,230,.92);color:#6b5122;font-size:12px;line-height:1.5}
.sketch-note b{font-weight:800}
.no-notes .sketch-note{display:none}
.sketch-tag{font-size:10px;letter-spacing:.12em;text-transform:uppercase;font-weight:800;color:#7a6233;border:1px dashed #b49a6a;border-radius:99px;padding:3px 8px}

/* navigation: Product · Our Story · Journal · Book a walkthrough (World Bible, section 7) */
/* anything jumped to lands below the fixed navigation (68px) instead of under it. The bar is solid paper (since 2026-11-10, the review
   of Case Studies v6: "some content appears behind the sticky navigation"; it faded from 98% to 88%, and words showed through it) */
[id]{scroll-margin-top:84px}
.nav{position:fixed;inset:0 0 auto 0;height:68px;display:flex;align-items:center;justify-content:space-between;padding:0 clamp(16px,4vw,56px);z-index:40;background:hsl(var(--paper));border-bottom:1px solid rgba(60,60,80,.07)}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none}
.brand img{height:36px;display:block;margin-left:-8px}
.nav-links{display:flex;align-items:center;gap:26px;font-size:13px;font-weight:650}
.nav-links a:not(.btn){text-decoration:none;color:hsl(var(--ink-soft))}
.nav-links a:not(.btn):hover,.nav-links a[aria-current="page"]{color:hsl(var(--depth-indigo))}
.nav-links a[aria-current="page"]{text-decoration:underline;text-underline-offset:6px;text-decoration-thickness:2px}
/* five page links and the call to action need about 900px beside the logo: below that they fold into the Menu (nav.js); the bar's sketch tag
   needs room of its own and goes below 1100px (the footer still says the page is a sketch) */
@media (max-width:1100px){.nav .sketch-tag{display:none}}
@media (max-width:900px){.nav-links{gap:8px}.nav-links a:not(.btn){display:none}}
@media (max-width:760px){.nav .btn{padding:0 12px;font-size:12px}.sketch-tag{display:none}.brand img{height:30px}}
/* the bar's offer on the narrowest phones reads "Become a partner"; screen readers and analytics keep "Become a design partner" */
@media (max-width:380px){.nav .nav-cta-extra{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}}

/* the phone menu (design/nav.js builds it from the bar's links): a Menu button beside the call to action, a paper sheet
   under the bar with the four pages and the email, a scrim over the page that closes it. Desktop: nothing of it shows. */
.nav-menu{display:none;align-items:center;gap:7px;min-height:44px;padding:0 12px;border-radius:999px;border:1px solid color-mix(in srgb,hsl(var(--depth-indigo)) 40%,white);background:rgba(255,255,255,.62);color:hsl(var(--depth-indigo));font-size:12px;font-weight:700;letter-spacing:.01em}
.nav-menu svg{width:16px;height:16px;display:block}
.nav-menu:hover{background:#fff}
@media (max-width:900px){.nav-menu{display:inline-flex}}
@media (max-width:400px){.nav-menu{padding:0 13px}.nav-menu span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}}
.nav-scrim{position:fixed;inset:68px 0 0 0;background:hsl(var(--night) / .38);touch-action:none}
.nav-sheet{position:fixed;top:68px;left:0;right:0;max-height:calc(100vh - 68px);max-height:calc(100svh - 68px);overflow:auto;overscroll-behavior:contain;padding:4px clamp(16px,4vw,56px) 18px;background:hsl(var(--paper-raised));border-bottom:1px solid hsl(var(--border));box-shadow:0 24px 48px hsl(var(--night-deep) / .18);opacity:0;transform:translateY(-8px);transition:opacity .2s var(--ease),transform .25s var(--ease)}
.nav-sheet.in{opacity:1;transform:none}
.nav-sheet ol{list-style:none;margin:0;padding:0}
.nav-sheet li+li{border-top:1px solid hsl(var(--line))}
.nav-sheet li a{display:flex;align-items:baseline;justify-content:space-between;gap:12px;min-height:56px;padding:14px 2px;font-family:var(--font-display);font-size:24px;line-height:1.2;color:hsl(var(--depth-indigo));text-decoration:none}
.nav-sheet li a:hover,.nav-sheet li a:focus-visible{color:hsl(var(--accent-text))}
.nav-sheet li a[aria-current="page"]::after{content:'You are here';font-family:var(--font-text);font-size:10.5px;letter-spacing:.16em;text-transform:uppercase;font-weight:800;color:hsl(var(--accent-text))}
.nav-sheet-foot{margin:14px 0 0;font-size:14px;font-weight:650;color:hsl(var(--ink-soft))}
.nav-sheet-foot a{color:inherit;text-underline-offset:4px}
html.nav-open{overflow:hidden}
@media (prefers-reduced-motion:reduce){.nav-sheet{opacity:1;transform:none}}

/* buttons: indigo primary (Q3 aside, new pages use indigo) */
.btn{display:inline-flex;align-items:center;gap:9px;min-height:44px;padding:0 20px;border-radius:999px;border:1px solid hsl(var(--depth-indigo));background:hsl(var(--depth-indigo));color:#fff;text-decoration:none;font-size:13px;font-weight:700;transition:transform .2s,background .2s}
.btn:hover{transform:translateY(-1px);background:color-mix(in srgb,hsl(var(--depth-indigo)) 82%,black)}
.btn:active{transform:none;background:color-mix(in srgb,hsl(var(--depth-indigo)) 66%,black)}
.btn.ghost{background:rgba(255,255,255,.62);color:hsl(var(--depth-indigo));border-color:color-mix(in srgb,hsl(var(--depth-indigo)) 40%,white)}
.btn.ghost:hover{background:#fff}
.btn.ghost:active{background:hsl(var(--depth-indigo) / .08)}
/* states, one look on every page: unavailable is quiet paper and says nothing (never green: green means approved); a finished
   action that shows its outcome takes that outcome's mark (.done-reviewed: the sage of "Reviewed by a person") */
.btn:disabled,.btn[aria-disabled="true"]{cursor:default;transform:none;background:hsl(var(--paper-raised));border-color:hsl(var(--border));color:hsl(var(--ink-soft))}
.btn.done-reviewed:disabled{background:hsl(var(--clarity-sage) / .2);border-color:hsl(var(--clarity-sage));color:hsl(var(--depth-indigo))}

/* The footer, "The Palace Grounds" (design/footer.js fills it; docs/FOOTER_V1_DESIGN.md). One drawing whose colours are the
   --grounds-* properties: dusk after a paper page, night after a dark one (data-grounds); then the words on the Palace's
   indigo in paper. Every name is prefixed grounds- so a page's own classes never reach it. */
.grounds{display:block;padding:0;position:relative;background:hsl(var(--night));color:hsl(var(--paper));
  --grounds-sky-top:hsl(var(--paper));--grounds-sky-low:#A79BCB;--grounds-far:#4A3F7A;--grounds-near:hsl(var(--night));--grounds-path:#55497F;--grounds-line:#1B1636;
  --grounds-tree:#2A2550;--grounds-tree2:#3A325E;--grounds-wall:#3E3668;--grounds-wall2:#352D5C;--grounds-cornice:#4F4480;--grounds-dome:#3E4F78;--grounds-door:#2A2550;
  --grounds-lamp:#F1CF7E;--grounds-win:#5A5180;--grounds-glow:0}
.grounds[data-grounds="night"]{--grounds-sky-top:var(--grounds-above,hsl(var(--night)));--grounds-sky-low:#4A3F7A;--grounds-far:#2F2858}
.grounds.grounds-lit{--grounds-win:#F1CF7E;--grounds-glow:1}
.grounds-scene{display:block;width:100%;height:clamp(140px,14vw,180px)}
.grounds-scene .grounds-win{fill:var(--grounds-win);transition:fill 1.2s ease}
.grounds-scene .grounds-glow{opacity:var(--grounds-glow);transition:opacity 1.2s ease}
.grounds-in{max-width:1180px;margin:0 auto;padding:34px clamp(16px,5vw,72px) 8px;display:grid;grid-template-columns:minmax(0,380px) minmax(0,1fr);gap:28px clamp(32px,6vw,96px);align-items:start}
.grounds-brand .brand img{height:30px;margin-left:-6px}
.grounds-brand p{font-size:15px;line-height:1.55;color:hsl(var(--on-night-soft));margin:14px 0 18px;max-width:42ch}
.grounds-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px 18px}
.grounds .btn{background:hsl(var(--on-night));color:hsl(var(--depth-indigo));border-color:hsl(var(--on-night))}
.grounds .btn:hover{background:#fff}
.grounds .btn:active{background:hsl(var(--paper-raised))}
.grounds-mail{font-size:14px;font-weight:650;color:hsl(var(--paper));text-underline-offset:4px}
.grounds-offer{font-size:15px;font-weight:700} /* the offer as words: the bar's button is on every screen (COPY_REVIEW, Part 1, rule 1) */
.grounds-links{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px 24px;padding-top:6px}
.grounds-links .eyebrow{margin:0 0 10px;color:hsl(var(--brass-light))}
.grounds-links ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:9px;font-size:14.5px;line-height:1.4}
.grounds-links a{color:hsl(var(--paper));text-decoration:none}
.grounds-links a:hover,.grounds-links a:focus-visible{text-decoration:underline;text-underline-offset:4px}
.grounds-soft{color:hsl(var(--on-night-soft));font-style:normal}
.grounds-legal{max-width:1180px;margin:26px auto 0;padding:16px clamp(16px,5vw,72px) 30px;border-top:1px solid hsl(var(--on-night) / .14);display:flex;flex-wrap:wrap;gap:10px 22px;align-items:center;font-size:12.5px;color:hsl(var(--on-night-soft))}
.grounds-legal a{color:inherit;text-underline-offset:3px}
.grounds-legal .sketch-tag{margin-left:auto;color:hsl(var(--brass-light));border-color:hsl(var(--brass-light) / .55)}
.grounds-notes{background:none;border:1px dashed hsl(var(--brass-light) / .55);color:hsl(var(--brass-light));border-radius:99px;padding:6px 11px;font-size:12px;font-weight:700;min-height:34px}
@media (max-width:860px){.grounds-in{grid-template-columns:1fr;gap:26px}.grounds-links{grid-template-columns:repeat(2,minmax(0,1fr))}.grounds-legal .sketch-tag{margin-left:0}}
@media (max-width:360px){.grounds-links{grid-template-columns:1fr}}

/* reduced motion shows the finished state (section 8) */
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation:none!important;transition:none!important}}

/* buttons on a night surface (section 9: on night, paper fill and indigo text) */
.on-night .btn{background:hsl(var(--on-night));color:hsl(var(--depth-indigo));border-color:hsl(var(--on-night))}
.on-night .btn:hover{background:#fff}
.on-night .btn:active{background:hsl(var(--paper-raised))}
.on-night .btn.ghost{background:transparent;color:hsl(var(--on-night));border-color:hsl(var(--on-night) / .55)}
.on-night .btn.ghost:hover{background:rgba(255,255,255,.08)}
.on-night .btn.ghost:active{background:rgba(255,255,255,.14)}
.on-night .btn:disabled,.on-night .btn[aria-disabled="true"],.grounds .btn:disabled,.grounds .btn[aria-disabled="true"]{background:transparent;border-color:hsl(var(--on-night) / .28);color:hsl(var(--on-night) / .62)}
.on-night .eyebrow{color:hsl(var(--chalk-light))}

/* the scroll pill: "Scroll ↓" at the foot of a story's picture until the visitor scrolls. One look on every page (indigo words on
   paper, a hairline); where it sits stays with the page. <div class="scroll-hint" id="hint">Scroll ↓</div> */
.scroll-hint{position:absolute;left:50%;bottom:24px;transform:translateX(-50%);z-index:2;font-size:12px;font-weight:700;letter-spacing:.08em;color:hsl(var(--depth-indigo));background:hsl(var(--paper-raised) / .9);border:1px solid hsl(var(--border));padding:9px 14px;border-radius:99px;pointer-events:none}
@media (max-width:760px){.scroll-hint{display:none}}

/* the handoff between pages (design/handoff.js): a colour that spreads, then fades on the next page */
.handoff{position:fixed;inset:0;z-index:1000;pointer-events:none}
/* a hidden button stays hidden, whatever its display (the hidden attribute loses to .btn otherwise) */
.btn[hidden]{display:none}

/* bands: one structure for every reading section on every page (DESIGN_SYSTEM.md 9.1).
   <section class="band on-paper"><div class="band-in">
     <header class="band-head">[<p class="band-n">01</p>]<div class="eyebrow">Name</div><h2>Title</h2><p>One line.</p></header>
     <div class="band-body"> .cards | .rows | .points | .numbered </div></div></section>
   The head sits on the left (it stays in view while the content scrolls), the content on the right; on phones the head
   comes first. Colours come from the page's setting through the role tokens: on paper, bands alternate paper and white
   (.band, .band-alt) with .on-paper; on the Palace's indigo, add .scene-palace and .on-night and they alternate indigo and
   deep indigo. A page can end on .band-night with .band-close (its call to action). Three or more bands open with an
   index: .band-index > .band-wide > .band-toc. */
.band{padding:clamp(72px,8vw,112px) clamp(16px,5vw,72px);background:hsl(var(--surface));color:hsl(var(--text));border-top:1px solid hsl(var(--line))}
.band-alt{background:hsl(var(--surface-alt))}
.band-night{background:linear-gradient(hsl(var(--night-deep)),#1d1844);color:#EAE4F3;border-top-color:rgba(201,161,94,.25)}
.band .eyebrow,.band-n,.band-toc a span{color:hsl(var(--accent-text))}
.band-night .eyebrow,.band-night .band-n{color:hsl(var(--brass-light))}
.band-wide,.band-in{max-width:1180px;margin:0 auto}
.band-in{display:grid;grid-template-columns:minmax(0,340px) minmax(0,1fr);gap:clamp(32px,5vw,80px);align-items:start}
.band h2{font-family:var(--font-display);font-weight:700;line-height:1.08;letter-spacing:-.01em;color:hsl(var(--text));margin:10px 0 12px}
.band-night h2{color:hsl(var(--on-night))}
.band-index h2{font-size:clamp(36px,4.4vw,60px);margin-bottom:28px}
.band-toc{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));border-top:1px solid hsl(var(--line))}
.band-toc li+li{border-left:1px solid hsl(var(--line))}
.band-toc a{display:flex;flex-direction:column;gap:6px;padding:16px 16px 6px;font-family:var(--font-display);font-size:20px;line-height:1.2;color:hsl(var(--text));text-decoration:none}
.band-toc a span,.band-n{font-family:var(--font-mono);font-size:13px;letter-spacing:.18em}
.band-toc a:hover,.band-toc a:focus-visible{color:hsl(var(--accent-text));text-decoration:underline;text-underline-offset:4px}
.band-head{position:sticky;top:96px}
.band-head .band-n{margin:0 0 14px;padding-bottom:12px;border-bottom:2px solid #C9A15E;width:44px}
.band-head h2{font-size:clamp(30px,3.2vw,44px)}
.band-head>p:last-child{margin:0;font-size:17px;line-height:1.6;color:hsl(var(--text-soft))}
.band-night .band-head>p:last-child{color:hsl(var(--on-night-soft))}
.band-body:not(.cards):not(.rows)>*+*{margin-top:28px}
.band-body .cards,.band-body.cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.band .card{background:hsl(var(--surface-raised));border:1px solid hsl(var(--line));border-radius:14px;padding:20px 22px 22px;box-shadow:0 10px 26px hsl(var(--night-deep) / .06)}
.band-night .card{background:transparent;border:1.5px dashed hsl(var(--brass-light) / .5);box-shadow:none}
.band .card h3{font-family:var(--font-display);font-weight:700;font-size:22px;line-height:1.2;color:hsl(var(--text));margin:0 0 8px}
.band .card .who+h3{margin-top:14px}
.band-night .card h3{color:hsl(var(--on-night))}
.band .card p{margin:0;font-size:16px;line-height:1.6;color:hsl(var(--text-soft))}
.band-night .card p{color:#DCD4E8}
.band .rows{display:grid;grid-template-columns:minmax(0,230px) minmax(0,1fr);gap:0 28px;margin:0}
.band .rows dt,.band .rows dd{padding:18px 0;border-top:1px solid hsl(var(--line))}
.band .rows dt:first-of-type,.band .rows dt:first-of-type+dd{border-top:0;padding-top:4px}
.band .rows dt{display:flex;flex-direction:column;align-items:flex-start;gap:8px;font-family:var(--font-display);font-size:21px;line-height:1.2;color:hsl(var(--text))}
.band .rows dd{margin:0;font-size:16.5px;line-height:1.6;color:hsl(var(--text-soft))}
.band .points,.band .numbered{list-style:none;margin:0;padding:0}
.band .points li{position:relative;padding:16px 0 16px 26px;border-top:1px solid hsl(var(--line));font-size:18px;line-height:1.5;color:hsl(var(--text))}
.band .points li::before{content:'';position:absolute;left:2px;top:25px;width:9px;height:9px;border-radius:50%;background:#C9A15E}
.band .numbered{counter-reset:n}
.band .numbered li{display:grid;grid-template-columns:44px minmax(0,1fr);gap:6px;padding:18px 0;border-top:1px solid hsl(var(--line))}
.band .numbered li::before{counter-increment:n;content:counter(n,decimal-leading-zero);font-family:var(--font-mono);font-size:13px;letter-spacing:.12em;color:hsl(var(--accent-text));padding-top:6px}
.band .numbered b{display:block;font-family:var(--font-display);font-weight:700;font-size:22px;line-height:1.2;margin-bottom:4px;color:hsl(var(--text))}
.band .numbered span{font-size:16.5px;line-height:1.6;color:hsl(var(--text-soft))}
.band .points li:first-child,.band .numbered li:first-child{border-top:0;padding-top:4px}
.band .points li:first-child::before{top:13px}
.band-more a{font-size:15px;font-weight:700;color:hsl(var(--text));text-underline-offset:4px}
.band-close{max-width:1180px;margin:clamp(64px,7vw,96px) auto 0;padding-top:clamp(56px,6vw,80px);border-top:1px solid rgba(201,161,94,.3);text-align:center}
.band-close h2{font-size:clamp(38px,5vw,72px);margin:12px 0 14px}
.band-close p{max-width:600px;margin:0 auto 26px;font-size:18px;line-height:1.6;color:#D8D1E5}
.band-close .actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}
@media (max-width:860px){.band-in{grid-template-columns:1fr;gap:28px}.band-head{position:static}}
@media (max-width:600px){.band-toc{grid-template-columns:1fr}.band-toc li+li{border-left:0;border-top:1px solid hsl(var(--line))}.band-toc a{flex-direction:row;align-items:baseline;gap:12px;padding:12px 4px}.band-body .cards,.band-body.cards{grid-template-columns:1fr}.band .rows{grid-template-columns:1fr}.band .rows dd{border-top:0;padding-top:0}}
/* ================= touch targets on phones: every control owns a 44px square (DESIGN_SYSTEM; tools/check-access.mjs). Where a
   control's size is part of the look, an invisible ::after widens what a finger can hit and nothing moves ================= */
@media (max-width:760px){
  .brand{min-height:44px}
  .grounds-links ul{gap:0}
  .grounds-links a,.grounds-mail,.grounds-legal a{display:inline-flex;align-items:center;min-height:44px}
  .grounds-legal a{position:relative}.grounds-legal a::after{content:'';position:absolute;inset:0 -6px}
  .grounds-notes{min-height:44px}
}

/* The words drawn inside a story's picture (since 2026-11-12, the motion pass). As the camera zooms, Chrome re-measures every word of
   the drawing for its new size on screen, on every frame of a scroll: about half of the work of scrolling Product and Our Story at a
   mid-range phone's speed. geometricPrecision spares most of it (at 4x CPU slowdown, scrolling Product on a phone: layout from 52% of
   the main thread to 15%; hiding the words altogether gave 3%, so they were the cost). */
.stage>svg text{text-rendering:geometricPrecision}
