/* bruha chrome for the portfolio pages (decision hub_chrome = bruha).
   Loaded after the snapshot CSS. Tokens are copied unchanged from mocks/ritual.html; the same-name tokens the
   snapshot also declares (--ink, --line, --ease, --gutter, --max, --section, --font-*) are re-declared here with
   the literal ritual values, never var(--x) inside --x. */
@font-face{font-family:"TAN Garland";src:url(../../assets/fonts/tan-garland.woff2) format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Inter";src:url(../fonts/inter-variable-latin.woff2) format("woff2");font-weight:100 900;font-style:normal;font-display:swap}

/* ---------- tokens ---------- */
:root{
  --ground:#F1F0EC; --paper:#FBFAF7; --sheet:#FFFFFF;
  --ink:#141413; --ink-2:#48484C; --ink-3:#66666C;
  --silver:#9A9CA3; --line:rgba(20,20,19,.12); --line-strong:rgba(20,20,19,.26);
  --night:#0D0E12; --night-2:#16171C; --night-3:#202128;
  --moon:#ECEAE4; --moon-2:#A9AAB0; --moon-line:rgba(236,234,228,.16);
  --ember:#FF5B23; --ember-ink:#C2410C;
  --font-display:"TAN Garland","Iowan Old Style",Georgia,serif;
  --font-body:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
  --font-mono:"JetBrains Mono",ui-monospace,"SFMono-Regular",Menlo,monospace;
  --r-sm:10px; --r-md:14px; --r-lg:22px; --r-full:999px;
  --ease:cubic-bezier(.16,1,.3,1); --ease-io:cubic-bezier(.65,0,.35,1);
  --gutter:clamp(16px,4vw,56px); --max:1280px;
  --section:clamp(4.5rem,9vw,8rem);
  --shadow-sheet:0 1px 2px rgba(20,20,19,.06),0 18px 40px -18px rgba(20,20,19,.22);
  --z-base:0; --z-nav:30;
  color-scheme:light dark;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --ground:#0E0F12; --paper:#15161A; --ink:#ECEAE4; --ink-2:#BDBEC3; --ink-3:#93949A;
  --silver:#6E7077; --line:rgba(236,234,228,.12); --line-strong:rgba(236,234,228,.26);
  --night:#060709; --ember-ink:#FF7A47;
  --shadow-sheet:0 1px 2px rgba(0,0,0,.4),0 18px 40px -18px rgba(0,0,0,.7);
}}
:root[data-theme="dark"]{
  --ground:#0E0F12; --paper:#15161A; --ink:#ECEAE4; --ink-2:#BDBEC3; --ink-3:#93949A;
  --silver:#6E7077; --line:rgba(236,234,228,.12); --line-strong:rgba(236,234,228,.26);
  --night:#060709; --ember-ink:#FF7A47;
  --shadow-sheet:0 1px 2px rgba(0,0,0,.4),0 18px 40px -18px rgba(0,0,0,.7);
}

/* the homepage grain: the values below are copied from mocks/ritual.html :root and build_pages asserts they still match */
:root{
  --texture-night:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g' filterUnits='userSpaceOnUse' x='0' y='0' width='160' height='160' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='2.4 0 0 0 -.7 2.4 0 0 0 -.7 2.4 0 0 0 -.7 0 0 0 0 .085'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23g)'/%3E%3C/svg%3E"); --texture:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g' filterUnits='userSpaceOnUse' x='0' y='0' width='160' height='160' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='2.4 0 0 0 -.7 2.4 0 0 0 -.7 2.4 0 0 0 -.7 0 0 0 0 .047'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23g)'/%3E%3C/svg%3E"); --texture-size:160px;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--texture:var(--texture-night)}}
:root[data-theme="dark"]{--texture:var(--texture-night)}

/* ---------- snapshot token map (names only the snapshot CSS declares -> ritual tokens) ---------- */
:root{
  --bg:var(--ground);
  --bg-raised:var(--paper);
  --accent:var(--ink);
  --accent-hover:var(--ink-2);
  --accent-ink:var(--ink);
  --accent-field:var(--night);
  --on-accent:var(--moon);
  --on-accent-2:var(--moon-2);
  --radius:var(--r-lg);
}
body::before{display:none}

/* the phone bezel was var(--ink), which turns pale in dark mode; keep it a dark device with a hairline edge */
.Frames__phone{border-color:var(--night);background:var(--night);box-shadow:0 0 0 1px var(--line-strong),0 30px 60px -30px #1111138c}

/* the systems panels hard-code a periwinkle highlight and blue-white inks (#b9ccff, #f5f7ff): moonlight greys here, no blue in the hub's own sections */
.Panel__toneAccent{--p-ink-3:rgba(236,234,228,.55);--p-line:var(--moon-line);--p-rule:rgba(236,234,228,.7);--p-hi:var(--moon);
  box-shadow:var(--highlight-invert),0 0 0 1px rgba(0,0,0,.06),0 30px 60px -36px rgba(0,0,0,.5)}

/* ---------- base ---------- */
html{-webkit-text-size-adjust:100%}
body{background:var(--ground);color:var(--ink);font-family:var(--font-body);font-size:16px;line-height:1.6;-webkit-font-smoothing:antialiased;overflow-x:clip}
:focus-visible{outline:2px solid var(--ink);outline-offset:3px;border-radius:6px}
h1,h2,h3{font-family:var(--font-display);font-weight:400;letter-spacing:-.01em;text-wrap:balance}
/* anchors: the snapshot's html{scroll-padding-top:96px} is the only offset, so no section scroll-margin here
   (the ritual page's section{scroll-margin-top:90px} would land every anchor 90px low on the hub) */
::selection{background:var(--ink);color:var(--ground)}
.mono{font-family:var(--font-mono);font-size:.75rem;letter-spacing:.04em}
.wrap{width:min(var(--max),100% - 2 * var(--gutter));margin-inline:auto}

.skip{position:fixed;left:12px;top:-100px;z-index:calc(var(--z-nav) + 1);padding:.7rem 1.1rem;border-radius:var(--r-full);background:var(--ink);color:var(--ground);font:500 .9rem/1 var(--font-body);text-decoration:none;transition:top 160ms var(--ease)}
.skip:focus{top:12px}
#top[tabindex="-1"]:focus{outline:none}

/* ---------- buttons ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.6rem;min-height:48px;padding:0 1.35rem;border-radius:var(--r-full);
  font:500 .95rem/1 var(--font-body);text-decoration:none;cursor:pointer;border:1px solid transparent;white-space:nowrap;
  transition:background-color 160ms var(--ease),color 160ms var(--ease),border-color 160ms var(--ease),transform 160ms var(--ease)}
.btn:active{transform:scale(.97)}
.btn-primary{background:var(--ink);color:var(--ground)}
.btn-lg{min-height:54px;padding:0 1.6rem;font-size:1rem}
@media (hover:hover) and (pointer:fine){
  .btn-primary:hover{background:color-mix(in oklab,var(--ink),var(--ground) 18%)}
}

/* ---------- floating nav ---------- */
.nav{position:fixed;left:50%;top:calc(14px + env(safe-area-inset-top));transform:translateX(-50%);z-index:var(--z-nav);
  width:min(calc(100% - 24px),760px);display:flex;align-items:center;justify-content:space-between;gap:1rem;
  padding:.4rem .4rem .4rem 1rem;border-radius:var(--r-full);
  background:color-mix(in oklab,var(--paper) 78%,transparent);backdrop-filter:blur(16px) saturate(1.4);-webkit-backdrop-filter:blur(16px) saturate(1.4);
  box-shadow:0 0 0 1px var(--line),0 10px 30px -14px rgba(20,20,19,.3)}
@media (prefers-reduced-transparency:reduce){.nav{background:var(--paper);backdrop-filter:none;-webkit-backdrop-filter:none}}
.wordmark{display:inline-flex;align-items:center;gap:.5rem;text-decoration:none;font-weight:600;font-size:1.02rem;letter-spacing:-.02em;min-height:44px}
.wordmark .os{font-weight:400}
.mark{width:26px;height:26px;color:var(--ink)}
.nav ul{display:none;list-style:none;padding:0;gap:1rem}
.nav ul a{text-decoration:none;font-size:.9rem;color:var(--ink-2)}
.nav ul a:hover,.nav ul a[aria-current="page"]{color:var(--ink)}
.nav .btn{min-height:42px;padding:0 1.05rem;font-size:.88rem}
@media (min-width:820px){.nav ul{display:flex}}

/* ---------- close (ritual close language, no Ember) ----------
   The close and the footer sit on Night with the Night grain on every page that loads this file (user, 2026-10-14: dark on every
   page; the homepage keeps its own curtain footer). One treatment here, no per-page override. */
.close,footer{background:var(--night) var(--texture-night) 0 0/var(--texture-size);color:var(--moon);border-top:1px solid var(--moon-line)}
.close{padding-block:var(--section)}
.close .btn-primary{background:var(--moon);color:var(--night)}
:is(.close,footer) :focus-visible{outline-color:var(--moon)}
.close-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:clamp(1.5rem,4vw,2.5rem);align-items:center}
.close h2{font-size:clamp(2.6rem,1.6rem + 4vw,5rem);line-height:.98;max-width:13ch}
.book-row{display:flex;flex-wrap:wrap;align-items:center;gap:1rem 1.25rem}
.book-note{font-size:.9rem;color:var(--moon-2)}
@media (min-width:920px){.close-grid{grid-template-columns:minmax(0,1fr) auto}}

/* ---------- footer ---------- */
footer{padding-block:2.5rem calc(2.5rem + env(safe-area-inset-bottom))}
.foot{display:flex;flex-wrap:wrap;gap:1.5rem 3rem;justify-content:space-between;align-items:center}
.foot .mark{color:var(--moon)}
.foot p{color:var(--moon-2);font-size:.9rem}
.foot .mono{font-size:.75rem}
/* link columns rendered from pages.json (build_pages.chrome_fill); a row of their own between the wordmark and the disclaimer */
.foot-cols{flex:1 1 100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.5rem}
.foot-h{margin:0 0 .35rem;font:500 .72rem/1.2 var(--font-mono);letter-spacing:.14em;text-transform:uppercase;color:var(--moon-2)}
.foot-cols a{display:flex;align-items:center;width:fit-content;min-height:44px;line-height:1.3;color:var(--moon-2);font-size:.95rem;text-decoration:none;transition:color 150ms ease-out}
@media (min-width:600px){.foot-cols{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (hover:hover) and (pointer:fine){
  .close .btn-primary:hover{background:color-mix(in oklab,var(--moon),var(--night) 18%)}
  .foot-cols a:hover{color:var(--moon)}
}
@media (prefers-reduced-motion:reduce){.foot-cols a{transition:none}}
