/* ------------------------------------------------------------------
   Sakura. Where the reference sets forest green on beige, this sets
   bark on blossom: the light ground is the white at a petal's edge
   with the pink it picks up where petals overlap, and the dark bands
   are the plum-black of a cherry trunk in rain: not a neutral dark.
   Every grey here carries the same pink bias, on purpose.
   ------------------------------------------------------------------ */
/* ------------------------------------------------------------------
   Three palettes, one set of names. Every component in this file reads
   tokens and never a literal, which is why a mode is a block of colours
   here and nothing else anywhere.

   legacy: light pink over wood: warm paper, walnut ink, walnut bands
   night: matte black and dark grey, with the pink taken down to suit
   light: white and pale pink, the bands pink rather than dark
   ------------------------------------------------------------------ */
:root, :root[data-mode="legacy"] {
  --snow:    #fdf8f2;   /* warm paper */
  --blush:   #f9e7e1;   /* pink, over the wood */
  --petal:   #f2d2d7;
  --card:    #fffdf8;
  --bark:    #4a3326;   /* walnut, for the dark bands and the rail */
  --bark-2:  #3a2619;
  --ink:     #43301f;
  --ink-2:   #7a5b45;
  --ink-3:   #a68a72;
  --rose:    #b8506b;
  --line:    rgba(67, 48, 31, .14);
  --line-2:  rgba(67, 48, 31, .24);
  --on-dark:   #fdf3e8;
  --on-dark-2: #ddc4ae;
  --on-dark-3: #b59b85;
  --dark-line: rgba(253, 243, 232, .18);
  --blossom: #f2a8bc;
  --select:  #f7d9c9;
  --e1: 0 1px 2px rgba(67,48,31,.05), 0 8px 24px rgba(67,48,31,.07);
  --e2: 0 2px 4px rgba(67,48,31,.07), 0 20px 48px rgba(67,48,31,.11);
}
:root[data-mode="night"] {
  --snow:    #121213;   /* matte black, not blue-black */
  --blush:   #1a1a1c;
  --petal:   #3d2831;
  --card:    #17181a;
  --bark:    #0c0c0d;
  --bark-2:  #070708;
  --ink:     #eeeef0;
  --ink-2:   #adadb3;
  --ink-3:   #7b7b82;
  --rose:    #cf6d8d;   /* the pink, taken down to sit on black */
  --line:    rgba(255, 255, 255, .11);
  --line-2:  rgba(255, 255, 255, .19);
  --on-dark:   #eeeef0;
  --on-dark-2: #a9a9b0;
  --on-dark-3: #77777e;
  --dark-line: rgba(255, 255, 255, .13);
  --blossom: #e07f9d;
  --select:  #52303c;
  --e1: 0 1px 2px rgba(0,0,0,.5);
  --e2: 0 2px 4px rgba(0,0,0,.5), 0 20px 48px rgba(0,0,0,.6);
}
:root[data-mode="light"] {
  --snow:    #ffffff;
  --blush:   #fdf1f5;
  --petal:   #fbdfe8;
  --card:    #ffffff;
  /* The bands are pale pink here rather than dark, so the whole page
     stays white and pink: which means the text on them goes dark, and
     it does, because they read the same two tokens. */
  --bark:    #fbe4ec;
  --bark-2:  #f7d8e3;
  --ink:     #40222e;
  --ink-2:   #7a5361;
  --ink-3:   #a98795;
  --rose:    #c2557d;
  --line:    rgba(64, 34, 46, .12);
  --line-2:  rgba(64, 34, 46, .20);
  --on-dark:   #40222e;
  --on-dark-2: #70495a;
  --on-dark-3: #86596a;
  --dark-line: rgba(64, 34, 46, .16);
  --blossom: #e2749a;
  --select:  #fbd3e0;
  --e1: 0 1px 2px rgba(64,34,46,.05), 0 8px 24px rgba(194,85,125,.07);
  --e2: 0 2px 4px rgba(64,34,46,.06), 0 20px 48px rgba(194,85,125,.12);
}
:root {
  /* Type and geometry do not change with the palette. */
  --r: 7px;
  --shell: 1240px;
  --serif: "Shippori Mincho B1", ui-serif, Georgia, "Times New Roman", serif;
  --sans: "Zen Kaku Gothic Antique", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "M PLUS 1 Code", ui-monospace, SFMono-Regular, Menlo, monospace;
  --brush: "Yuji Syuku", var(--serif);
  /* Text over a photograph stays light in every mode: the scrim under it
     is dark in every mode too, and it has to be, or the headline goes. */
  --on-photo: #fff4f7;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--snow); color: var(--ink);
       font-family: var(--sans); font-size: 16px; line-height: 1.6;
       -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; font-family: var(--serif); font-weight: 500;
                 letter-spacing: -.015em; text-wrap: balance; }
p { margin: 0; }
.wrap { width: min(var(--shell), 100% - 64px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; border-radius: 4px; }
/* Selected text: what you see the instant before you copy: comes up in
   blossom rather than the browser's blue. Stated twice: one rule with an
   unknown pseudo-element in it is dropped whole by every engine. */
::selection { background: var(--select); color: var(--ink); text-shadow: none; }
::-moz-selection { background: var(--select); color: var(--ink); text-shadow: none; }
.band.dark ::selection, .rail ::selection, .railbar ::selection, .drawer ::selection,
.hero ::selection { background: var(--blossom); color: var(--bark); }
.band.dark ::-moz-selection { background: var(--blossom); color: var(--bark); }

/* ---------------- buttons ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px;
       height: 44px; padding: 0 20px; border-radius: var(--r); border: 1px solid transparent;
       font-size: 14.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
       transition: background .18s ease, color .18s ease, border-color .18s ease; }
.btn .ar { transition: transform .22s cubic-bezier(.2,.8,.3,1); }
.btn:hover .ar { transform: translateX(4px); }
.btn.fill { background: var(--bark); color: var(--on-dark); }
.btn.fill:hover { background: var(--bark-2); }
.btn.line { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.line:hover { background: var(--blush); }
.btn.pale { background: var(--snow); color: var(--ink); }
.btn.pale:hover { background: var(--blush); }
.btn.on-dark { background: transparent; color: var(--on-photo);
              border-color: rgba(255,244,247,.30); }
.btn.on-dark:hover { background: rgba(255,244,247,.14); }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13.5px; gap: 8px; }
.link { display: inline-flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 600;
        color: var(--rose); }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.link .ar { transition: transform .22s cubic-bezier(.2,.8,.3,1); }
.link:hover .ar { transform: translateX(4px); }

/* ---------------- the rail ----------------
   Navigation is a rail, not a bar: a column of icons pinned to the left
   edge on every page, the way the documentation already had it. An icon
   that stands for a group opens its panel beside it; the rest are links.
   ------------------------------------------------------------------ */
.shell { display: grid; grid-template-columns: 58px minmax(0, 1fr); min-height: 100vh; }
.shell > .col { min-width: 0; }
.rail { background: var(--bark); display: flex; flex-direction: column; align-items: stretch;
        gap: 2px; padding: 14px 10px 16px; position: sticky; top: 0; height: 100vh;
        width: 58px; z-index: 60; transition: width .2s cubic-bezier(.2,.8,.3,1); }
/* Collapsed it is a column of icons; hovered or tabbed into, it widens over
   the page and every item says its name. An icon on its own names nothing,
   and a tooltip only tells you after you have already guessed. */
.rail:hover, .rail:focus-within { width: 214px; }
.rail .mark { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 7px;
              color: var(--blossom); margin-bottom: 14px; border-radius: 10px; }
.rail .mark svg { flex: none; width: 30px; height: 30px; margin: 0 -2px; }
.rail .wordmark { font-family: var(--brush); font-size: 19px; color: var(--on-dark); }
.rail .ri { position: relative; display: flex; align-items: center; gap: 12px; height: 38px;
            padding: 0 7px; border-radius: 9px; color: var(--on-dark-3); background: none;
            border: 0; cursor: pointer; width: 100%; text-align: left; font: inherit;
            transition: color .16s ease, background .16s ease; }
.rail .ri svg:first-child { flex: none; }
.rail .ri:hover, .rail .ri[aria-expanded="true"] {
  color: var(--on-dark); background: color-mix(in srgb, var(--on-dark) 11%, transparent); }
/* Where you are. Without this the navigation never answers the first
   question anyone asks it. */
.rail .ri.on { color: var(--on-dark); background: color-mix(in srgb, var(--on-dark) 14%, transparent); font-weight: 600; }
.rail .ri.on::before { content: ""; position: absolute; left: -7px; top: 8px; bottom: 8px;
                       width: 2.5px; border-radius: 0 3px 3px 0; background: var(--blossom); }
.rail .lbl { font-size: 14.5px; font-weight: 500; white-space: nowrap;
             opacity: 0; transition: opacity .16s ease; }
.rail .ri.on .lbl { font-weight: 600; }
.rail:hover .lbl, .rail:focus-within .lbl { opacity: 1; }
.rail .ri .cv { margin-left: auto; opacity: 0; transition: opacity .16s ease; }
.rail:hover .ri .cv, .rail:focus-within .ri .cv { opacity: .5; }
/* The product sits above the rule, the reference below it. */
.rail .sep { height: 1px; margin: 9px 7px; background: color-mix(in srgb, var(--on-dark) 14%, transparent); }
/* The kanji sits at the foot of the column, just above the account, so the
   empty middle reads as breathing room rather than as something missing. */
.rail .gap { flex: 1; display: flex; align-items: flex-end; justify-content: center;
             padding-bottom: 16px; min-height: 40px; }
/* The X mark is drawn as a solid glyph, so it needs a touch less room than
   the stroked icons beside it to sit on the same optical line. */
.rail .ri.x svg { margin: 0 1px; }
.rail .kana { font-family: var(--serif); font-size: 15px; letter-spacing: .34em;
              color: color-mix(in srgb, var(--on-dark) 20%, transparent); writing-mode: vertical-rl; user-select: none; }
.rail .menu { position: relative; }

/* the flyout opens beside the rail, in the light palette */
.pop { position: absolute; left: calc(100% + 12px); top: -8px; z-index: 70;
       min-width: 320px; padding: 10px; background: var(--card); color: var(--ink);
       border: 1px solid var(--line); border-radius: 12px;
       box-shadow: 0 2px 6px rgba(46,18,32,.10), 0 26px 60px rgba(46,18,32,.26); }
.pop h6 { margin: 4px 6px 8px; font: 700 10.5px/1 var(--sans); letter-spacing: .13em;
          text-transform: uppercase; color: var(--ink-3); }
.pop a { display: block; padding: 11px 13px; border-radius: 8px; }
.pop a:hover, .pop a:focus-visible { background: var(--blush); }
.pop a b { display: block; font-size: 14.5px; font-weight: 600; }
.pop a span { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }

/* below the rail width: a strip and a drawer instead */
.railbar { display: none; align-items: center; gap: 12px; background: var(--bark);
           color: var(--on-dark); padding: 10px 20px;
           padding-top: calc(10px + env(safe-area-inset-top, 0px));
           position: sticky; top: 0; z-index: 60; }
.railbar .brand { color: var(--on-dark); margin: 0; margin-right: auto; font-family: var(--brush); }
.burger { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px;
          border: 0; background: none; color: var(--on-dark); cursor: pointer; }
.burger:hover { background: color-mix(in srgb, var(--on-dark) 12%, transparent); }
/* Hidden at rail widths by the cascade, shown by the media query below: and only when the burger has actually opened it. */
.drawer { display: none; background: var(--bark-2); padding: 12px 20px 22px; }
.drawer h6 { margin: 16px 0 4px; font: 700 11px/1 var(--sans); letter-spacing: .12em;
             text-transform: uppercase; color: var(--on-dark-3); }
.drawer a { display: block; padding: 11px 12px; border-radius: var(--r); font-size: 15.5px;
            color: var(--on-dark-2); }
.drawer a.solo { font-weight: 600; color: var(--on-dark); }
.drawer a:hover { background: color-mix(in srgb, var(--on-dark) 10%, transparent); color: var(--on-dark); }

/* ---------------- bands ---------------- */
.band { padding: 104px 0; }
.band.light { background: var(--snow); }
.band.blush { background: var(--blush); }
.band.dark { background: var(--bark); color: var(--on-dark); }
.band.dark h2, .band.dark h3 { color: var(--on-dark); }
.band.dark p { color: var(--on-dark-2); }

h1 { font-size: clamp(42px, 6.6vw, 78px); line-height: 1.02; }
h2 { font-size: clamp(32px, 4.6vw, 54px); line-height: 1.06; }
h3 { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.14; }
.lede { font-size: 17px; color: var(--ink-2); max-width: 48ch; }
.sub { font-size: 15px; color: var(--ink-3); }

/* ---------------- hero ---------------- */
.hero { background: var(--bark); padding: 0 14px 14px; }
.col > .hero:first-of-type { padding-top: 14px; }
.hero .frame { position: relative; overflow: hidden; }
.hero .frame::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, rgba(48,18,30,.88) 0%, rgba(48,18,30,.68) 30%,
                              rgba(48,18,30,.22) 58%, rgba(48,18,30,.02) 76%); }
.hero .over { z-index: 2; }
/* The frame holds whichever of the two lands: the photograph if it is
   there, the drawn grove if it is not. Both fill the same box, so the
   headline sits in the same place either way. */
.hero .frame { background: var(--bark-2); height: clamp(560px, 76vh, 820px); }
.hero canvas, .hero img { display: block; width: 100%; height: 100%;
                          object-fit: cover; object-position: 58% 34%; }
.hero img[hidden] { display: none; }
.hero .over { position: absolute; inset: 0; display: flex; align-items: center; }
.hero .over .wrap { width: min(var(--shell), 100% - 64px); }
.hero h1 { color: var(--on-photo); max-width: 14ch; }
.hero p { color: var(--on-photo); max-width: 34ch; margin-top: 20px; font-size: 17px;
         }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* ---------------- two-column blocks ---------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }
.split > * { min-width: 0; }
.split.tight { gap: 48px; }
.stack { display: grid; gap: 22px; justify-items: start; }
.stack > * { max-width: 100%; }

/* the big link list on the dark band */
.biglist { display: grid; }
.biglist a { display: flex; align-items: center; gap: 22px; padding: 26px 4px;
             border-top: 1px solid var(--dark-line); }
.biglist a:last-child { border-bottom: 1px solid var(--dark-line); }
.biglist a:hover .t { color: var(--blossom); }
/* Title and description are two lines, not one sentence: the span has to
   be told to break, or the description runs on after the title. */
.biglist a > span { min-width: 0; }
.biglist .t { display: block; font-family: var(--serif); font-size: clamp(20px, 2.3vw, 27px);
              font-weight: 500; line-height: 1.2; transition: color .18s ease; }
.biglist .d { display: block; font-size: 13.5px; color: var(--on-dark-3); margin-top: 5px; }
.biglist .ar { margin-left: auto; opacity: .7; transition: transform .22s cubic-bezier(.2,.8,.3,1); }
.biglist a:hover .ar { transform: translateX(5px); opacity: 1; }

/* the plain link list on light */
.rows { display: grid; }
.rows a, .rows div.row { display: flex; align-items: center; gap: 18px; padding: 20px 2px;
                         border-bottom: 1px solid var(--line); }
.rows > *:first-child { border-top: 1px solid var(--line); }
.rows .t { font-family: var(--serif); font-size: 22px; font-weight: 500; }
.rows .ar { margin-left: auto; color: var(--ink-3); }
.rows a:hover .t { color: var(--rose); }

/* ---------------- panels (the interactive-looking cards) ---------------- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 10px;
         padding: 22px; box-shadow: 0 1px 2px rgba(71,32,46,.04), 0 18px 40px rgba(184,68,106,.06); }
.band.dark .panel { background: rgba(255,244,247,.06); border-color: var(--dark-line);
                    box-shadow: none; color: var(--on-dark); }
.field { display: grid; gap: 7px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--rose); }
.field .prov { font-size: 12px; color: var(--ink-3); }
select, textarea, input[type=text] {
  width: 100%; font: inherit; color: var(--ink); background: transparent;
  border: 0; border-bottom: 1px solid var(--line-2); padding: 8px 0; border-radius: 0; }
select { font-family: var(--serif); font-size: 21px; appearance: none;
         background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%),
                           linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
         background-position: right 6px center, right 1px center;
         background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; padding-right: 22px; }
textarea { border: 1px solid var(--line-2); border-radius: var(--r); padding: 14px 16px;
           min-height: 128px; resize: vertical; background: var(--snow); font-size: 15px; }
textarea::placeholder { color: var(--ink-3); }
.panel .foot { display: flex; align-items: center; gap: 14px; margin-top: 16px; flex-wrap: wrap; }
.panel .foot .far { margin-left: auto; }

/* the little architecture diagram */
.dia { display: grid; gap: 0; justify-items: center; }
.dia .node { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: 9px;
             background: rgba(255,244,247,.08); border: 1px solid var(--dark-line);
             font-size: 14.5px; font-weight: 600; }
.dia .node.key { background: var(--petal); color: var(--bark); border-color: transparent; }
.dia .node .ok { display: inline-flex; align-items: center; gap: 6px; padding-left: 12px;
                 margin-left: 2px; border-left: 1px solid rgba(71,32,46,.2); font-weight: 500;
                 font-size: 13.5px; }
.dia .wire { width: 1px; height: 26px; background: var(--dark-line); }
.dia .fan { display: flex; align-items: center; justify-content: center; gap: 0; margin-top: 4px;
             flex-wrap: wrap; max-width: 100%; }
.dia .leaf { width: 150px; max-width: 100%; padding: 16px 14px; border-radius: 9px; background: rgba(255,244,247,.07);
             border: 1px solid var(--dark-line); font-size: 13.5px; }
.dia .leaf:first-child { transform: rotate(-4deg) translateX(14px); }
.dia .leaf:last-child { transform: rotate(4deg) translateX(-14px); }
.dia .leaf.mid { background: var(--petal); color: var(--bark); border-color: transparent;
                 position: relative; z-index: 2; font-weight: 600; }

/* chat card */
.chat { background: var(--card); border-radius: 10px; padding: 18px 20px; color: var(--ink); }
.chat .me { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
.chat .me svg { flex: none; margin-top: 3px; color: var(--ink-3); }
.chat .cols { display: flex; gap: 7px; margin-top: 16px; align-items: flex-end; }
.chat .col { flex: 1; background: var(--blush); border-radius: 5px; padding: 8px 6px;
             font-size: 7.5px; line-height: 1.5; color: var(--ink-3); overflow: hidden; }

/* ---------------- tables ---------------- */
.sheet { border: 1px solid var(--line); border-radius: 10px; background: var(--card);
         overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 780px; }
thead th { text-align: left; font-family: var(--sans); font-size: 12px; font-weight: 600;
           letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3);
           padding: 14px 20px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th.r, td.r { text-align: right; }
tbody td { padding: 15px 20px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--blush); }
td.num { font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums;
         white-space: nowrap; }
.mname { display: flex; align-items: center; gap: 12px; }
.mname .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.mname b { font-weight: 600; white-space: nowrap; }
.mname .id { font: 500 11.5px/1.3 var(--mono); color: var(--ink-3); white-space: nowrap; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px;
       font-size: 12px; font-weight: 600; background: var(--blush); color: var(--ink-2);
       white-space: nowrap; }
.tag.live { color: #2f7d5b; background: rgba(47,125,91,.11); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 20px; }
.f { border: 1px solid var(--line-2); background: transparent; color: var(--ink-2);
     padding: 7px 15px; border-radius: 999px; font-size: 13.5px; font-weight: 500; cursor: pointer; }
.f:hover { background: var(--blush); }
.f.on { background: var(--bark); color: var(--on-dark); border-color: var(--bark); font-weight: 600; }
.filters .far { margin-left: auto; font-size: 13px; color: var(--ink-3); }

/* ---------------- code ---------------- */
.code { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--card); }
.code .bar { display: flex; align-items: center; padding: 11px 16px; font: 500 13px/1 var(--mono);
             color: var(--ink-2); border-bottom: 1px solid var(--line); background: var(--blush); }
.code .bar .far { margin-left: auto; }
.code .bar button { background: none; border: 0; cursor: pointer; color: var(--ink-3);
                    display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; }
.code .bar button:hover { color: var(--ink); background: var(--petal); }
.code pre { margin: 0; padding: 16px; overflow-x: auto; font: 400 13px/1.7 var(--mono); }
.code .k { color: var(--rose); } .code .s { color: #8a6d1f; } .code .c { color: var(--ink-3); }

/* ---------------- tabs ---------------- */
.tabs { display: flex; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer;
               padding: 13px 26px; font-size: 14.5px; font-weight: 600; color: var(--ink-3);
               white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--bark);
                                     background: var(--blush); }

/* ---------------- docs shell ---------------- */
.docs { display: grid; grid-template-columns: 58px 300px minmax(0, 1fr); min-height: 100vh; }
.side { border-right: 1px solid var(--line); padding: 26px 26px 60px; background: var(--snow); }
.toggle { display: inline-flex; padding: 4px; background: var(--blush); border-radius: 9px;
          margin-bottom: 22px; }
.toggle button { border: 0; background: none; cursor: pointer; padding: 7px 16px; border-radius: 7px;
                 font-size: 14px; font-weight: 600; color: var(--ink-2); }
.toggle button[aria-pressed="true"] { background: var(--bark); color: var(--on-dark); }
.side h5 { margin: 26px 0 10px; font-size: 12.5px; font-weight: 700; color: var(--ink);
           font-family: var(--sans); letter-spacing: .01em; }
.side nav { display: grid; gap: 2px; }
.side nav a { padding: 8px 12px; border-radius: var(--r); font-size: 14.5px; color: var(--ink-2); }
.side nav a:hover { background: var(--blush); }
.side nav a.on { background: var(--blush); color: var(--ink); font-weight: 600; }
.doc { padding: 34px 48px 90px; max-width: 900px; }
.crumb { font-size: 13.5px; color: var(--ink-3); margin-bottom: 18px; }
.crumb a:hover { color: var(--rose); }
.doc h1 { font-size: clamp(34px, 4.4vw, 52px); }
.doc .tagline { color: var(--ink-2); margin-top: 12px; font-size: 16.5px; }
.doc h2 { font-size: 27px; margin-top: 44px; }
.doc h3 { font-size: 20px; margin-top: 32px; }
.doc p { margin-top: 14px; color: var(--ink-2); max-width: 68ch; }
.doc ul { margin-top: 14px; color: var(--ink-2); max-width: 68ch; padding-left: 20px; }
.doc li { margin-top: 7px; }
.doc a.in { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2);
            text-underline-offset: 3px; }
.doc a.in:hover { text-decoration-color: var(--rose); color: var(--rose); }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.docnav { display: flex; gap: 20px; margin-top: 56px; padding-top: 22px;
          border-top: 1px solid var(--line); }
.docnav .far { margin-left: auto; text-align: right; }
.docnav span { font-size: 13px; color: var(--ink-3); display: block; }
.docnav b { font-family: var(--serif); font-size: 19px; font-weight: 500; }
.docsearch { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-2);
             border-radius: 9px; padding: 9px 12px; color: var(--ink-3); font-size: 14.5px;
             background: var(--card); max-width: 380px; margin-left: auto; }
.docsearch kbd { margin-left: auto; font: 500 11.5px var(--mono); color: var(--ink-3); }
.docbar { display: flex; align-items: center; gap: 14px; padding: 18px 48px;
          border-bottom: 1px solid var(--line); }
.docbar b { font-family: var(--sans); font-size: 15px; font-weight: 600; }

/* ---------------- staking ---------------- */
.terms { list-style: disc; padding-left: 20px; }
.terms li { margin-top: 12px; font-size: 14.5px; color: var(--ink-2); }
.kv { display: flex; align-items: baseline; gap: 16px; padding: 13px 0;
      border-bottom: 1px solid var(--line); }
.kv span { color: var(--ink-2); font-size: 15px; }
.kv b { margin-left: auto; font-family: var(--mono); font-size: 14.5px; font-weight: 500;
        font-variant-numeric: tabular-nums; }
.callout { background: var(--blush); border: 1px solid var(--line); border-radius: 10px;
           padding: 26px 28px; }

/* ---------------- footer ---------------- */
.foot { background: var(--snow); border-top: 1px solid var(--line); }
.foot .wrap { padding: 66px 0 26px; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; gap: 32px; }
.foot h4 { font-family: var(--sans); font-size: 13.5px; font-weight: 700; margin-bottom: 16px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.foot ul a { font-size: 14px; color: var(--ink-2); }
.foot ul a:hover { color: var(--rose); }
.foot .brand { color: var(--ink); margin: 0; }
/* The spec block: the plain facts of the thing, set as a spec sheet sets them. */
.spec { margin-top: 48px; display: grid; grid-template-columns: repeat(4, 1fr);
        gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 9px;
        overflow: hidden; }
.spec > div { background: var(--snow); padding: 15px 18px; }
.spec dt { font: 600 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
           color: var(--ink-3); margin-bottom: 7px; }
.spec dd { margin: 0; font: 500 12.5px/1.45 var(--mono); color: var(--ink);
           overflow-wrap: anywhere; }
.rule { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line);
        display: flex; align-items: center; gap: 20px; font-size: 13px; color: var(--ink-3); }
.rule .mid { margin-inline: auto; }
.rule a:hover { color: var(--rose); }

/* ---------------- responsive ---------------- */
@media (max-width: 1100px) {
  .docs { grid-template-columns: 58px minmax(0, 1fr); }
  .side { display: none; }
  .docs > .railbar, .docs > .drawer { grid-column: 1 / -1; }
  .doc, .docbar { padding-inline: 32px; }
}
@media (max-width: 940px) {
  .band { padding: 72px 0; }
  .split, .split.tight { grid-template-columns: 1fr; gap: 40px; }
  .foot-grid { grid-template-columns: 1fr 1fr 1fr; }
  .spec { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 800px) {
  .wrap { width: calc(100% - 40px); }
  .hero canvas { height: 440px; }
}
@media (max-width: 760px) {
  /* Under this the rail eats too much of the line length: it becomes a
     strip with a drawer, and the flyouts flatten into it. */
  .shell, .docs { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .railbar { display: flex; }
  .drawer:not([hidden]) { display: block; }
  .shell > .col, .docs > div { min-width: 0; }
}
@media (max-width: 620px) {
  .dia .fan { flex-direction: column; gap: 9px; }
  .dia .leaf { transform: none !important; width: 100%; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .rule { flex-direction: column; align-items: flex-start; gap: 8px; }
  .rule .mid { margin-inline: 0; }
  .docs { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; flex-direction: row; justify-content: flex-start;
          padding: 8px 12px; overflow-x: auto; }
  .rail .gap { margin-top: 0; margin-left: auto; }
  .doc, .docbar { padding-inline: 20px; }
}
@media (max-width: 460px) {
  .wrap { width: calc(100% - 32px); }
  .hide-xs { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------------- the working comparison ---------------- */
.wire-up { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.wire-up input { font-size: 14px; }
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px;
           padding-top: 20px; border-top: 1px solid var(--line); }
.answers .ans { min-width: 0; background: var(--blush); border: 1px solid var(--line);
                border-radius: 9px; padding: 14px 16px; display: flex; flex-direction: column;
                gap: 9px; }
.answers h4 { font-family: var(--sans); font-size: 12.5px; font-weight: 700; color: var(--rose); }
.answers .body { font-size: 13.5px; line-height: 1.6; color: var(--ink-2); white-space: pre-wrap;
                 overflow-wrap: anywhere; max-height: 340px; overflow-y: auto; }
.answers .meta { font: 500 11.5px/1.4 var(--mono); color: var(--ink-3);
                 border-top: 1px solid var(--line); padding-top: 9px; }
.answers .bad { color: #a32d4e; }
@media (max-width: 620px) { .answers { grid-template-columns: 1fr; } }

/* ---------------- the photographic plate ----------------
   One picture, running the full width, carrying a line of copy. It is the
   only place the page raises its voice, so it gets the whole viewport. */
.plate { position: relative; isolation: isolate; }
.plate img { display: block; width: 100%; height: clamp(360px, 52vh, 560px);
             object-fit: cover; object-position: 50% 62%; }
.plate::after { content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(95deg, rgba(58,24,38,.86) 0%, rgba(58,24,38,.62) 34%,
                              rgba(58,24,38,.18) 62%, rgba(58,24,38,.05) 100%); }
.plate-in { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; }
.plate-in .kicker { color: #fbdfe4; }
.plate-in h2 { color: var(--on-photo); margin-top: 14px; }
.plate-in p { color: rgba(255,244,247,.82); max-width: 44ch; margin-top: 16px; font-size: 16.5px; }
@media (max-width: 700px) {
  .plate img { height: 460px; object-position: 58% 60%; }
  .plate::after { background: linear-gradient(180deg, rgba(58,24,38,.45) 0%,
                              rgba(58,24,38,.86) 62%, rgba(58,24,38,.94) 100%); }
  .plate-in { align-items: flex-end; padding-bottom: 34px; }
}

/* ---------------- the mode picker ---------------- */
.modes { display: grid; gap: 2px; margin-top: 4px; }
.modes button { display: flex; align-items: center; gap: 12px; height: 34px; padding: 0 7px;
                border: 0; background: none; border-radius: 9px; cursor: pointer;
                color: var(--on-dark-3); font: inherit; text-align: left; }
.modes button:hover { background: color-mix(in srgb, var(--on-dark) 10%, transparent); color: var(--on-dark); }
.modes button[aria-pressed="true"] { color: var(--on-dark); }
.modes .sw { width: 16px; height: 16px; border-radius: 50%; flex: none; margin-left: 3px;
             box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--on-dark) 28%, transparent); }
.modes button[aria-pressed="true"] .sw { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--on-dark) 50%, transparent),
                                                     0 0 0 2px var(--blossom); }
.modes .lbl { font-size: 13.5px; }
/* Each swatch shows its own palette, not the one in use: otherwise the
   three read identically and choose nothing. */
.sw-legacy { background: linear-gradient(135deg, #fdf8f2 50%, #4a3326 50%); }
.sw-night  { background: linear-gradient(135deg, #1a1a1c 50%, #cf6d8d 50%); }
.sw-light  { background: linear-gradient(135deg, #ffffff 50%, #fbdfe8 50%); }

/* ---------------- the footer's X link ---------------- */
.foot-line { margin-top: 12px; font-size: 13.5px; color: var(--ink-3); }
.foot .x { display: inline-flex; align-items: center; gap: 9px; margin-top: 16px;
           padding: 8px 14px 8px 12px; border: 1px solid var(--line-2); border-radius: 999px;
           font-size: 13.5px; font-weight: 600; color: var(--ink);
           transition: background .16s ease, border-color .16s ease; }
.foot .x:hover { background: var(--blush); border-color: var(--ink-3); }

/* ---------------- the receipt, and the storage audit ---------------- */
.receipt { margin-top: 18px; border: 1px solid var(--line); border-radius: 9px;
           overflow: hidden; background: var(--blush); }
.receipt-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px;
                border-bottom: 1px solid var(--line); font-size: 13px; }
.receipt-head .far { margin-left: auto; }
.receipt pre { margin: 0; padding: 14px; overflow-x: auto; font: 400 12.5px/1.65 var(--mono);
               color: var(--ink-2); max-height: 260px; }
.receipt .sub { padding: 0 14px 14px; }
.receipt code { font: 500 12px var(--mono); color: var(--rose); }

.kept-rows { display: grid; }
.kept-row { display: flex; align-items: baseline; gap: 14px; padding: 13px 0;
            border-bottom: 1px solid var(--line); }
.kept-row:first-child { padding-top: 0; }
.kept-row b { font-size: 14px; font-weight: 600; }
.kept-row .what { font: 500 12px/1.5 var(--mono); color: var(--ink-3); }
.kept-row .val { margin-left: auto; font: 500 12.5px var(--mono); color: var(--ink-2);
                 text-align: right; max-width: 46%; overflow-wrap: anywhere; }
.kept-row.none b { color: var(--ink-3); font-weight: 500; }

/* ---------------- the hero's demonstration ----------------
   You type a line into the photograph and, when you stop, it comes apart
   into blossom and blows away. The page could say "nothing is kept" in a
   paragraph; this lets you do it to yourself, which is the only version
   anyone believes. It is a decoration over a hero that reads perfectly
   without it, and it does not run at all under prefers-reduced-motion.
   -------------------------------------------------------------------- */
.vanish { position: relative; margin-top: 34px; max-width: 30ch; }
/* The petals fly over the whole photograph, not over the field they came
   from: penned into the input's own box they cannot travel far enough to
   read as blowing away. */
.hero .frame #petals { position: absolute; inset: 0; z-index: 4; width: 100%; height: 100%;
                       pointer-events: none; }
.vanish input { width: 100%; background: transparent; border: 0;
                border-bottom: 1px solid rgba(255,244,247,.34); border-radius: 0;
                color: var(--on-photo); font-family: var(--serif); font-weight: 500;
                font-size: clamp(22px, 2.7vw, 30px); line-height: 1.3; padding: 6px 2px 10px;
                caret-color: var(--blossom); }
.vanish input::placeholder { color: rgba(255,244,247,.46); }
.vanish input:focus { outline: none; border-bottom-color: var(--blossom); }
.vanish-note { margin-top: 10px; font: 500 11.5px/1 var(--sans); letter-spacing: .12em;
               text-transform: uppercase; color: rgba(255,244,247,.6);
               transition: color .3s ease; }
.vanish-note.gone { color: var(--blossom); }
@media (prefers-reduced-motion: reduce) { .vanish canvas { display: none; } }
@media (max-width: 760px) { .vanish { max-width: none; } }
