/* brand.css of the design kit, in the layer xoong-standard (tools/kit-css.mjs) */
@layer xoong-standard {
/*
 * Xoong Dev: site styles. Plain CSS, no build step, no inline styles (strict CSP).
 * Brand tokens first (Calm is the default; Ember under [data-palette="ember"]); they also feed the framework's own --xo-* tokens so the live demo matches.
 * Guide: brand.html
 */
:root {
  color-scheme: light dark;

  /* Palette: "Ember" is the pot on the stove. Every colour has a light and a dark value. */


  --font:  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono:  ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --radius: 12px;
  --wrap: none;      /* fluid: the page fills the window; reading text keeps its own measure */
  --gutter: clamp(1rem, 2.4vw, 2.5rem);

  /* the framework's tokens, themed */
  --xo-font: var(--font);
  --xo-font-mono: var(--mono);
  --xo-radius: 8px;
  --xo-color-bg: var(--bg);
  --xo-color-surface: var(--surface);
  --xo-color-text: var(--text);
  --xo-color-muted: var(--muted);
  --xo-color-border: var(--line);
  --xo-color-accent: var(--ember-deep);
  --xo-color-accent-text: light-dark(#fff, #1c1512);

  /* Mist (default): the palette IS the Rainlet tokens (css/mist-tokens.css, loaded first). These lines only give the xoong names to them. */
  --ember:        var(--accent);                 /* brand fill / accent */
  --ember-deep:   var(--accent);                 /* links, focus ring, current item */
  --ember-soft:   var(--accent-tint);
  --soot:         #1f2a33;                       /* Mist ink: tooltip, dark window (fixed, also in dark) */
  --rice:         #ffffff;
  --surface:      var(--card);
  --broth:        var(--sunken);
  --muted:        var(--text-3);
  --herb:         var(--ok);
  --sesame:       var(--warn);
  --glow:         var(--accent-tint);
  --dots:         var(--line);
  --glow-2:       var(--accent-tint);
  --shadow: var(--shadow-sm);
  --f-brand:      "Be Vietnam Pro", var(--font);  /* self-hosted, css/fonts.css; the interface stays on the system font */
}
/* Calm: clay and sage on warm paper (the previous default). <html data-palette="calm"> */
:root[data-palette="calm"] {
  --ember:        light-dark(#df8a6a, #e8977a);
  --ember-deep:   light-dark(#9a4d33, #eeaa90);
  --ember-soft:   light-dark(#f7e6dc, #33231d);
  --soot:         #2b2623;
  --rice:         #f7f3ea;
  --bg:           light-dark(#f7f4ec, #171513);
  --surface:      light-dark(#fffdf8, #201d1a);
  --broth:        light-dark(#eee8da, #29251f);
  --text:         light-dark(#2b2623, #eee8dc);
  --muted:        light-dark(#675f56, #a39b8f);
  --line:         light-dark(#e3dccb, #38332c);
  --line-strong:  light-dark(#8a8176, #7d7569);   /* borders of controls: 3:1 on bg/surface */
  --danger:       light-dark(#b42318, #ff9d94);
  --herb:         light-dark(#5b8a6b, #8cc3a0);
  --sesame:       light-dark(#e6c783, #e9cf8e);
  --glow:         light-dark(#f1dccd, #3a2a22);
  --dots:         light-dark(#e6dfcd, #2a2621);
  --glow-2:       light-dark(#efe3d3, #2f241d);
  --shadow: light-dark(0 1px 0 #fff inset, 0 1px 0 #ffffff0d inset), light-dark(0 18px 40px -26px #4a3a2e44, 0 18px 40px -26px #000a);
  --primary: var(--ember-deep); --primary-text: light-dark(#fff, #2b2623); --accent-strong: var(--ember-deep);
  --text-2: color-mix(in srgb, var(--text) 82%, var(--bg)); --shadow-sm: none; --shadow-float: 0 12px 32px color-mix(in srgb, var(--text) 18%, transparent), 0 2px 6px color-mix(in srgb, var(--text) 10%, transparent);
}
/* Ember: the same system with the heat turned up. <html data-palette="ember"> */
:root[data-palette="ember"] {
  --ember:        light-dark(#ff5b22, #ff7a45);
  --ember-deep:   light-dark(#b93a0a, #ff9068);   /* text-safe ember on the page background */
  --ember-soft:   light-dark(#ffe3d3, #3a1f14);
  --soot:         #1c1512;
  --rice:         #fff3e2;
  --bg:           light-dark(#fff8ee, #15110f);   /* rice / soot */
  --surface:      light-dark(#ffffff, #1f1916);
  --broth:        light-dark(#ffefd6, #2a211c);
  --text:         light-dark(#1c1512, #f6ebdd);
  --muted:        light-dark(#6b5d52, #aa9b8c);
  --line:         light-dark(#ecdcc5, #3a2f28);
  --line-strong:  light-dark(#8f8071, #85766a);
  --danger:       light-dark(#b42318, #ff9d94);
  --herb:         light-dark(#2f8f57, #6fcf8e);
  --sesame:       light-dark(#e8a317, #f5c04a);
  --glow:         light-dark(#ffd2b8, #4a2112);
  --dots:         light-dark(#e9d3b6, #2f2620);
  --glow-2:       light-dark(#ffdcc7, #3a1d11);
  --shadow: light-dark(0 1px 0 #fff inset, 0 1px 0 #ffffff0d inset), light-dark(0 18px 40px -22px #7a3a1a55, 0 18px 40px -22px #000a);
  --primary: var(--ember-deep); --primary-text: light-dark(#fff, #1c1512); --accent-strong: var(--ember-deep);
  --text-2: color-mix(in srgb, var(--text) 82%, var(--bg)); --shadow-sm: none; --shadow-float: 0 12px 32px color-mix(in srgb, var(--text) 18%, transparent), 0 2px 6px color-mix(in srgb, var(--text) 10%, transparent);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"]  { color-scheme: dark; }

.palette-toggle { font: 600 .85rem/1 var(--font); color: var(--text); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: .5rem .85rem; cursor: pointer; display: inline-flex; align-items: center; gap: .45rem; }
.palette-toggle:hover { background: var(--broth); }
.palette-toggle::before { content: ""; width: .8rem; height: .8rem; border-radius: 50%; background: linear-gradient(90deg, #ff5b22 50%, #df8a6a 50%); border: 1px solid var(--soot); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font: 1.0625rem/1.65 var(--font); color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
a { color: var(--ember-deep); text-underline-offset: .2em; text-decoration-thickness: 1.5px; }
a:hover { color: var(--ember); }
:focus-visible { outline: 3px solid var(--ember-deep); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--ember); color: #fff; }

h1, h2, h3 { font-weight: 800; letter-spacing: -.03em; line-height: 1.12; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: .6rem; }
h3 { font-size: 1.2rem; letter-spacing: -.02em; }
p { margin: 0 0 1rem; text-wrap: pretty; }
code, kbd { font-family: var(--mono); font-size: .88em; }
:not(pre) > code { background: var(--broth); padding: .12em .42em; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow { font: 700 .78rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ember-deep); margin-bottom: .9rem; display: block; }
.lede { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); max-width: 38rem; }

/* ---------- header ---------- */
header.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
header.top .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 4rem; flex-wrap: wrap; padding-block: .4rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand img, .brand svg { width: 2rem; height: 2rem; display: block; }
.word { font-weight: 800; font-size: 1.3rem; letter-spacing: -.045em; }
header.top nav { display: flex; gap: .25rem; margin-left: auto; align-items: center; flex-wrap: wrap; }
header.top nav a { color: var(--text); text-decoration: none; padding: .4rem .8rem; border-radius: 999px; font-weight: 600; font-size: .95rem; }
header.top nav a:hover { background: var(--broth); color: var(--text); }
header.top nav a[aria-current="page"] { background: var(--ember-soft); color: var(--ember-deep); }
header.top nav a.gh { border: 1px solid var(--line); margin-left: .35rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; font: 700 1rem/1 var(--font);
  padding: .95rem 1.4rem; border-radius: 999px; text-decoration: none; cursor: pointer;
  border: 2px solid var(--text); color: var(--text); background: transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); color: var(--text); box-shadow: none; }
.btn.primary { background: var(--ember); border-color: var(--soot); color: var(--soot); box-shadow: none; }
.btn.primary:hover { color: var(--soot); box-shadow: none; }
.btn.primary:active { transform: translateY(2px); box-shadow: none; }
.actions { display: flex; gap: .9rem; flex-wrap: wrap; margin-top: 1.8rem; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(3rem, 7vw, 5.5rem);
  background:
    radial-gradient(60rem 28rem at 85% -10%, var(--glow) 0, transparent 60%),
    radial-gradient(circle at 1px 1px, var(--dots) 1.2px, transparent 1.4px) 0 0 / 22px 22px;
  border-bottom: 1px solid var(--line);
}
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.hero h1 { font-size: clamp(2.8rem, 7.2vw, 5.4rem); letter-spacing: -.055em; line-height: .98; }
.hero h1 em { font-style: normal; color: var(--ember); display: inline-block; position: relative; }
.hero h1 em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .02em; height: .13em; border-radius: 99px;
  background: var(--sesame); opacity: .85; z-index: -1;
}
.hero .lede { margin-top: 1.4rem; }
.pills { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1.6rem; padding: 0; list-style: none; }
.pills li { font: 600 .8rem/1 var(--mono); padding: .45rem .7rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); }
.pills b { color: var(--ember-deep); }

.stage { position: relative; }
.pot-badge { position: absolute; right: -.4rem; top: -5.2rem; width: clamp(6rem, 13vw, 8.5rem); z-index: 2; filter: drop-shadow(0 10px 14px #7a3a1a40); transform: rotate(6deg); }
.pot-badge svg { width: 100%; height: auto; display: block; overflow: visible; }

/* the steam: two chevrons rising and fading, like `<` and `>` leaving the lid */
.m-ink  { fill: var(--text); }
.m-body { fill: var(--ember); }
.m-hi   { stroke: var(--bg); }
.m-steam { fill: none; stroke: var(--text); stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; }
.mark.steam .m-steam { animation: steam 3.6s ease-in-out infinite; }
.mark.steam .m-steam.r { animation-delay: 1.2s; }
.mark { display: block; overflow: visible; flex: none; }
@keyframes steam { 0% { transform: translateY(5px); opacity: 0; } 25% { opacity: 1; } 70% { opacity: 1; } 100% { transform: translateY(-5px); opacity: 0; } }

/* ---------- code window ---------- */
.window { background: var(--soot); color: #f6ebdd; border-radius: var(--radius); border: 2px solid var(--soot); box-shadow: none; overflow: hidden; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .window { border-color: #4a3b32; background: #0f0b09; } }
.window .bar { display: flex; align-items: center; gap: .4rem; padding: .7rem 1rem; background: #2a201b; font: 600 .78rem/1 var(--mono); color: #b8a898; }
.window .bar i { width: .7rem; height: .7rem; border-radius: 50%; background: #ff5b22; }
.window .bar i:nth-child(2) { background: #f5c04a; } .window .bar i:nth-child(3) { background: #6fcf8e; }
.window .bar span { margin-left: .6rem; }
pre { margin: 0; overflow-x: auto; font: .92rem/1.7 var(--mono); }
.window pre { padding: 1.2rem 1.3rem 1.4rem; }
pre code { font: inherit; background: none; padding: 0; }
.t-tag { color: #ff9068; } .t-attr { color: #f5c04a; } .t-str { color: #8fe0a8; } .t-mute { color: #8d7f72; } .t-key { color: #ff9068; }
.cursor { display: inline-block; width: .55em; height: 1.1em; background: var(--ember); vertical-align: -.2em; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
pre.plain { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; margin: 1rem 0 1.4rem; box-shadow: var(--shadow); }

/* ---------- sections ---------- */
section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.head { max-width: 40rem; margin-bottom: 2.4rem; }
.head p { color: var(--muted); font-size: 1.15rem; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; padding: 0; list-style: none; margin: 0; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem 1.5rem 1.6rem;
  box-shadow: var(--shadow); transition: transform .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--ember); }
.card .no { font: 800 .8rem/1 var(--mono); color: var(--ember-deep); background: var(--ember-soft); border-radius: 999px; padding: .35rem .6rem; display: inline-block; margin-bottom: 1rem; }
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--muted); margin: 0; font-size: 1rem; }

.band { background: var(--soot); color: var(--rice); padding: clamp(2.5rem, 6vw, 4rem) 0; }
.band .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: left; }
.band strong { display: block; font: 800 clamp(2.4rem, 5vw, 3.6rem)/1 var(--font); letter-spacing: -.05em; color: var(--ember); }
.band span { color: #cdbfb0; font-size: .95rem; }

.recipe { counter-reset: step; display: grid; gap: 1.1rem; padding: 0; list-style: none; margin: 0; }
.recipe li { counter-increment: step; display: grid; grid-template-columns: 3.4rem 1fr; gap: 1.2rem; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.5rem; box-shadow: var(--shadow); }
.recipe li::before { content: counter(step); display: grid; place-items: center; width: 3.4rem; height: 3.4rem; border-radius: 50%; background: var(--ember); color: var(--soot); border: 2px solid var(--soot); font: 800 1.4rem/1 var(--font); box-shadow: none; }
.recipe h3 { margin-bottom: .3rem; }
.recipe p { margin: 0; color: var(--muted); }
.recipe pre { margin-top: .8rem; }

.cta { text-align: center; }
.cta .box { background: var(--ember); color: var(--soot); border: 2px solid var(--soot); border-radius: calc(var(--radius) * 1.6); padding: clamp(2rem, 6vw, 4rem) 1.5rem; box-shadow: none; }
.cta h2 { font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -.05em; }
.cta p { max-width: 32rem; margin: .8rem auto 0; font-size: 1.15rem; }
.cta .actions { justify-content: center; }
.cta .btn { border-color: var(--soot); color: var(--soot); }
.cta .btn.primary { background: var(--soot); color: var(--rice); }
.cta .btn.primary:hover { color: var(--rice); }

/* ---------- inner pages ---------- */
.page-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 1.5rem; border-bottom: 1px solid var(--line); background: radial-gradient(50rem 16rem at 90% -20%, var(--glow-2), transparent 65%); }
.page-head h1 { font-size: clamp(2.3rem, 6vw, 4rem); letter-spacing: -.05em; }
.page-head .lede { margin-top: .8rem; }
.prose { max-width: 46rem; padding: 2.5rem 0 1rem; }
.prose h2 { margin-top: 2.6rem; }
.prose h2:first-child { margin-top: 0; }
.note { padding: .8rem 1.1rem; margin: 0 0 1.6rem; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--sesame); border-radius: var(--radius); }
.demo { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; margin: 1.2rem 0; box-shadow: var(--shadow); overflow-x: auto; }

/* ---------- brand page ---------- */
.logo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
.tile { border: 1px solid var(--line); border-radius: var(--radius); min-height: 14rem; display: grid; place-items: center; padding: 2rem; position: relative; box-shadow: var(--shadow); }
.tile small { position: absolute; left: 1rem; bottom: .8rem; font: 600 .74rem/1 var(--mono);  }
.tile.on-rice { background: #fff8ee; color: #1c1512; }
.tile.on-soot { background: #1c1512; color: #fff3e2; }
.tile.on-ember { background: #ff5b22; color: #1c1512; }
.tile.on-broth { background: #ffe3d3; color: #1c1512; }
.tile > img { width: 7.5rem; height: 7.5rem; }
.lockup { display: inline-flex; align-items: center; gap: .9rem; }
.lockup img { width: 4.2rem; height: 4.2rem; }
.lockup .word { font-size: 3rem; }
.tile.on-soot .word, .tile.on-rice .word, .tile.on-ember .word, .tile.on-broth .word { color: inherit; }
.tile.on-ember .word i { color: #fff3e2; }
.sizes { display: flex; align-items: end; gap: 1rem; }
.sizes img { display: block; }
.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding: 0; margin: 0; list-style: none; }
.swatches li { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.swatches .swatch-chip { height: 6.5rem; display: block; }
.swatches .info { padding: .8rem 1rem 1rem; font-size: .9rem; line-height: 1.45; }
.swatches b { display: block; font-size: 1.05rem; }
.swatches code { font-size: .8rem; background: none; padding: 0; color: var(--muted); }
.swatches p { margin: .3rem 0 0; color: var(--muted); font-size: .85rem; }
.c-ember { background: #ff5b22; } .c-soot { background: #1c1512; } .c-rice { background: #fff8ee; border-bottom: 1px solid var(--line); }
.c-broth { background: #ffe3d3; } .c-sesame { background: #f5b82e; } .c-herb { background: #2f8f57; } .c-deep { background: #b93a0a; } .c-smoke { background: #6b5d52; }
.type-row { display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; padding: 1.1rem 0; border-top: 1px solid var(--line); align-items: baseline; }
.type-row small { font: 600 .78rem/1.4 var(--mono); color: var(--muted); }
.t-display { font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 800; letter-spacing: -.055em; line-height: 1; }
.t-mono { font-family: var(--mono); font-size: 1.1rem; }
.dodont { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
.dodont .card .no.bad { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, var(--surface)); }
.dodont ul { margin: .4rem 0 0; padding-left: 1.2rem; color: var(--muted); }
.dl { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1rem; }
.dl .btn { padding: .7rem 1.1rem; font-size: .92rem; }

/* ---------- footer ---------- */
footer.foot { border-top: 1px solid var(--line); padding: 2.5rem 0 3rem; color: var(--muted); font-size: .95rem; }
footer.foot .wrap { display: flex; gap: 1.2rem 2rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
footer.foot .brand { gap: .5rem; } footer.foot .brand img { width: 1.6rem; height: 1.6rem; } footer.foot .word { font-size: 1.1rem; }
footer.foot nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }
footer.foot nav a { color: var(--muted); }
footer.foot p { margin: 0; }

@media (max-width: 62rem) {
  .hero .wrap { grid-template-columns: 1fr; }
  .stage { margin-top: 3.5rem; }
  .pot-badge { right: .5rem; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .band .wrap { grid-template-columns: repeat(2, 1fr); }
  .swatches { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 40rem) {
  .grid, .logo-grid, .dodont { grid-template-columns: 1fr; }
  header.top nav { margin-left: 0; }
  header.top nav a.gh { display: none; }
  .type-row { grid-template-columns: 1fr; gap: .2rem; }
  .recipe li { grid-template-columns: 1fr; }
  .lockup .word { font-size: 2.2rem; } .lockup img { width: 3rem; height: 3rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .m-steam { opacity: 1; }
}

/* ---------- sample docs page (the sidebar layout the xoong site uses, in brand) ---------- */
.docs { display: grid; grid-template-columns: 15rem minmax(0, 1fr); max-width: var(--wrap); margin: 0 auto; }
.docs nav.side { position: sticky; top: 4rem; align-self: start; padding: 1.5rem 1rem 2rem 1.25rem; }
.docs nav.side h2 { margin: 1.2rem 0 .3rem; font: 700 .72rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.docs nav.side h2:first-child { margin-top: 0; }
.docs nav.side a { display: block; padding: .3rem .7rem; border-radius: 8px; color: var(--text); text-decoration: none; font-size: .95rem; }
.docs nav.side a:hover { background: var(--broth); }
.docs nav.side a[aria-current="page"] { background: var(--ember-soft); color: var(--ember-deep); font-weight: 700; }
.docs article { min-width: 0; max-width: 46rem; padding: 2rem 1.5rem 4rem; }
.docs article h1 { font-size: clamp(2rem, 5vw, 2.8rem); letter-spacing: -.05em; margin-bottom: .6rem; }
.docs article h2 { margin-top: 2.4rem; padding-top: .6rem; border-top: 1px solid var(--line); }
.callout { margin: 1.2rem 0; padding: .7rem 1.1rem; border-radius: 0 var(--radius) var(--radius) 0; border-left: 4px solid var(--ember); background: var(--ember-soft); }
.callout.note { border-color: var(--sesame); background: light-dark(#fbf0d2, #33290f); }
.tabs { margin: 1.2rem 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.tabs .tablist { display: flex; gap: 0; padding: 0 .5rem; background: var(--broth); border-bottom: 1px solid var(--line); }
.tabs .tab { padding: .6rem 1rem; font: 600 .9rem/1 var(--font); color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; }
.tabs .tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--ember-deep); }
.tabs pre { padding: 1rem 1.2rem; background: none; color: var(--text); }
.tabs .t-tag { color: var(--ember-deep); } .tabs .t-attr { color: light-dark(#7a5a12, #f5c04a); } .tabs .t-str { color: light-dark(#2f6f48, #8fe0a8); }
table.data { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .95rem; }
table.data th, table.data td { padding: .55rem .8rem; text-align: left; border-bottom: 1px solid var(--line); }
table.data th { color: var(--muted); font-weight: 600; }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; }
.pager a { display: grid; padding: .7rem 1.1rem; min-width: 9rem; border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; }
.pager a:hover { border-color: var(--ember); }
.pager small { color: var(--muted); } .pager a:last-child { text-align: right; margin-left: auto; }
@media (max-width: 52rem) { .docs { grid-template-columns: minmax(0, 1fr); } .docs nav.side { position: static; border-bottom: 1px solid var(--line); } }
.c-embdeep { background: #b93a0a; } .c-deep { background: #9a4d33; } .c-herb { background: #5b8a6b; } .c-sesame { background: #e6c783; } .c-paper { background: #f7f4ec; border-bottom: 1px solid var(--line); } .c-clay { background: #df8a6a; } .c-soot { background: #2b2623; } .c-ember { background: #ff5b22; }
.tile.on-rice { background: #f7f4ec; color: #2b2623; } .tile.on-soot { background: #2b2623; color: #f7f3ea; } .tile.on-ember { background: #df8a6a; color: #2b2623; } .tile.on-broth { background: #f7e6dc; color: #2b2623; }

/* ============ STATES (states.html, 404.html) ============ */
/* cards: hover lifts, focus-within rings, active presses */
.card { transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
a.card { display: block; color: inherit; text-decoration: none; }
.card:hover { transform: translateY(-4px); border-color: var(--ember-deep); }
.card:focus-within, a.card:focus-visible { border-color: var(--ember-deep); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ember-deep) 28%, transparent); }
a.card:active { transform: translateY(-1px); box-shadow: none; }

/* tabs: hover, focus, active, selected */
.tabs .tab:hover { color: var(--text); background: color-mix(in srgb, var(--text) 6%, transparent); }
.tabs .tab:active { background: color-mix(in srgb, var(--text) 12%, transparent); }
.tabs .tab:focus-visible { outline-offset: -3px; }

/* carousel: cards with arrows, dots or thumbnails, counter */
.carousel { position: relative; margin: 1rem 0; }
.carousel .track { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: .4rem .2rem 1rem; scrollbar-width: none; }
.carousel .track > * { flex: 0 0 calc((100% - 2rem) / 3); scroll-snap-align: start; }
.carousel .arrow { position: absolute; top: calc(50% - 1.6rem); width: 2.8rem; height: 2.8rem; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--text); background: var(--surface); color: var(--text); font: 800 1.2rem/1 var(--font); cursor: pointer; box-shadow: none; transition: transform .15s ease, box-shadow .15s ease; }
.carousel .arrow.prev { left: -1.2rem; } .carousel .arrow.next { right: -1.2rem; }
.carousel .arrow:hover { transform: translateY(-2px); box-shadow: none; }
.carousel .arrow:active { transform: translateY(2px); box-shadow: none; }
.carousel .arrow[disabled] { opacity: .4; cursor: not-allowed; box-shadow: none; }
.carousel .meta { display: flex; align-items: center; justify-content: center; gap: 1rem; }
.carousel .dots { display: flex; gap: .5rem; padding: 0; margin: 0; list-style: none; }
.carousel .dots button { width: .9rem; height: .9rem; padding: 0; border-radius: 50%; border: 2px solid var(--line-strong); background: transparent; cursor: pointer; }
.carousel .dots button:hover { border-color: var(--ember-deep); }
.carousel .dots button[aria-current="true"] { background: var(--ember-deep); border-color: var(--ember-deep); width: 1.6rem; border-radius: 99px; }
.carousel .count { font: 700 .85rem/1 var(--mono); color: var(--muted); }
.thumbs { display: flex; gap: .6rem; justify-content: center; padding: 0; margin: .8rem 0 0; list-style: none; }
.thumbs button { width: 4.2rem; height: 3rem; padding: 0; border: 2px solid var(--line-strong); border-radius: 8px; background: var(--broth); cursor: pointer; opacity: .75; }
.thumbs button:hover { opacity: 1; border-color: var(--ember-deep); }
.thumbs button[aria-current="true"] { opacity: 1; border-color: var(--ember-deep); box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ember-deep); }

/* data demo states */
.state { display: grid; justify-items: center; gap: .6rem; text-align: center; padding: 2.2rem 1.2rem; border: 2px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.state h3 { font-size: 1.25rem; margin: 0; }
.state p { margin: 0; color: var(--muted); max-width: 26rem; }
.state .art { width: 5.5rem; height: 5.5rem; }
.state.error { border-style: solid; border-color: var(--danger); }
.state.error h3 { color: var(--danger); }
.state .row-actions { display: flex; gap: .6rem; margin-top: .6rem; flex-wrap: wrap; justify-content: center; }
.state code { background: var(--broth); }
.skeleton { display: grid; gap: .6rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.skeleton i { display: block; height: 1rem; border-radius: 6px; background: linear-gradient(90deg, var(--broth) 25%, color-mix(in srgb, var(--broth) 55%, var(--surface)) 50%, var(--broth) 75%) 0 0/200% 100%; animation: shimmer 1.4s linear infinite; }
.skeleton i:nth-child(2) { width: 80%; } .skeleton i:nth-child(3) { width: 55%; }
@keyframes shimmer { to { background-position: -200% 0; } }
/* empty/error pot art: the mark with the lid off or a cracked handle, colours from the palette */
.art .m-ink { fill: var(--text); } .art .m-body { fill: var(--ember); }
.art .empty-body { fill: none; stroke: var(--text); stroke-width: 3; stroke-dasharray: 4 5; stroke-linecap: round; }

/* mobile docs sidebar: a "Menu" disclosure, then a full-width list */
.docs-menu { display: none; }
@media (max-width: 52rem) {
  .docs nav.side { display: none; }
  .docs-menu { display: block; background: var(--bg); border-bottom: 1px solid var(--line); }
  .docs-menu summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1.25rem; font-weight: 700; cursor: pointer; min-height: 2.75rem; }
  .docs-menu summary::-webkit-details-marker { display: none; }
  .docs-menu summary::after { content: "▾"; transition: transform .2s ease; }
  .docs-menu[open] summary::after { transform: rotate(180deg); }
  .docs-menu .here { color: var(--ember-deep); }
  .docs-menu nav { padding: 0 1.25rem 1rem; display: grid; gap: .1rem; max-height: 70vh; overflow-y: auto; }
  .docs-menu h2 { margin: 1rem 0 .3rem; font: 700 .72rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
  .docs-menu a { display: block; padding: .65rem .75rem; border-radius: 8px; color: var(--text); text-decoration: none; min-height: 2.75rem; }
  .docs-menu a[aria-current="page"] { background: var(--ember-soft); color: var(--ember-deep); font-weight: 700; }
  .carousel .track > * { flex-basis: 85%; }
  .carousel .arrow.prev { left: .2rem; } .carousel .arrow.next { right: .2rem; }
}

/* 404 */
.lost { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 3rem 1.25rem; background: radial-gradient(40rem 20rem at 50% 0, var(--glow), transparent 70%); }
.lost .big { font: 800 clamp(5rem, 22vw, 11rem)/.9 var(--font); letter-spacing: -.07em; display: flex; align-items: center; justify-content: center; gap: .05em; }
.lost .big .mark { width: .85em; height: .85em; }
.lost h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 1rem 0 .5rem; }
.lost p { color: var(--muted); max-width: 30rem; margin: 0 auto 1.5rem; }
.lost .actions { justify-content: center; margin-top: 0; }
.lost .path { font-family: var(--mono); background: var(--broth); padding: .15em .5em; border-radius: 6px; }

/* ---- polish round 1 ---- */
.hero .wrap > *, .band .wrap > *, .grid > *, .recipe li > * { min-width: 0; }
.grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.lede, .head p { max-width: 42rem; }
@media (max-width: 62rem) { .hero .wrap { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 40rem) {
  header.top nav { flex-wrap: nowrap; overflow-x: auto; width: 100%; margin-left: 0; scrollbar-width: none; }
  header.top nav a[href="index.html"] { display: none; }
  .window pre, pre { max-width: 100%; }
}

.c-blue { background: #0b63ce; } .c-blue-strong { background: #084c9e; } .c-ink { background: #1f2a33; } .c-page { background: #f5f7f8; border-bottom: 1px solid var(--line); }
.c-white { background: #ffffff; border-bottom: 1px solid var(--line); } .c-tint { background: #e8f1fc; } .c-line { background: #e2e8ec; } .c-clay { background: #df8a6a; }
.tile .lockup-img { width: min(100%, 15rem); height: auto; display: block; } .tile.on-rice { background: #fff; color: #1f2a33; } .tile.on-soot { background: #1e2e38; color: #fff; } .tile.on-broth { background: #e8f1fc; color: #1f2a33; }

}
