/* Nugget documentation, public documentation.
   Built in the application's own shell, as approved in design/docs-changelog
   on 19 Oct 2026: the 224px sidebar on the grey canvas, the white page with
   its 48px header, the segmented control, soft pills, the app's Heroicons and
   the stationary grain. Zinc only, hairlines over boxes. */

@font-face { font-family: Inter; src: url("/assets/inter-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Inter; src: url("/assets/inter-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: Inter; src: url("/assets/inter-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/assets/jetbrains-mono-400.ttf") format("truetype"); font-weight: 400; font-display: swap; }

:root {
  color-scheme: light;
  --canvas: #f5f5f5;
  --panel: #fff;
  --sunk: #fafafa;
  --soft: #f4f4f5;
  --hair: #f4f4f5;
  --line: #e4e4e7;
  --line-2: #d4d4d8;
  --ink: #18181b;
  --ink-2: #27272a;
  --body: #52525b;
  --read: #3f3f46;
  --mid: #71717a;
  --mute: #a1a1aa;
  --faint: #d4d4d8;
  --primary: #18181b;
  --on-primary: #fff;
  --nav-active: rgb(228 228 231 / .25);
  --nav-hover: rgb(228 228 231 / .4);
  --seg-on: #fff;
  --seg-ring: inset 0 0 0 1px #e4e4e7;
  --pill: #f4f4f5;
  --pill-ink: #52525b;
  --pill-new: #e4e4e7;
  --pill-new-ink: #3f3f46;
  --kbd: #a1a1aa;
  --scrim: rgb(24 24 27 / .2);
  --shadow-menu: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
  --shadow-dialog: 0 25px 50px -12px rgb(0 0 0 / .25);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --header: 56px;
}
:root[data-theme=dark] {
  color-scheme: dark;
  --canvas: #09090b;
  --panel: #18181b;
  --sunk: rgb(39 39 42 / .4);
  --soft: #27272a;
  --hair: #27272a;
  --line: #3f3f46;
  --line-2: #52525b;
  --ink: #f4f4f5;
  --ink-2: #e4e4e7;
  --body: #d4d4d8;
  --read: #d4d4d8;
  --mid: #a1a1aa;
  --mute: #71717a;
  --faint: #52525b;
  --primary: #f4f4f5;
  --on-primary: #18181b;
  --nav-active: rgb(39 39 42 / .3);
  --nav-hover: rgb(39 39 42 / .6);
  --seg-on: #3f3f46;
  --seg-ring: none;
  --pill: #27272a;
  --pill-ink: #d4d4d8;
  --pill-new: #3f3f46;
  --pill-new-ink: #e4e4e7;
  --kbd: #71717a;
  --scrim: rgb(0 0 0 / .4);
  --shadow-menu: 0 10px 15px -3px rgb(0 0 0 / .5), 0 4px 6px -4px rgb(0 0 0 / .5);
  --shadow-dialog: 0 25px 50px -12px rgb(0 0 0 / .6);
}

* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header) + 16px); }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 13px/1.5 Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; display: inline-flex; align-items: center; gap: 8px; text-align: left; }
:is(a, button, [tabindex]):focus-visible { outline: 2px solid var(--mid); outline-offset: 2px; border-radius: 6px; }
input:focus, input:focus-visible { outline: none; }
[hidden] { display: none !important; }
svg.icon { width: 16px; height: 16px; flex: none; display: block; }
span[data-icon] { display: inline-flex; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 16px; top: -80px; z-index: 70; background: var(--primary); color: var(--on-primary); padding: 10px 16px; border-radius: 6px; font-size: 13px; }
.skip:focus { top: 10px; }
kbd {
  display: inline-flex; align-items: center; height: 18px; padding: 0 5px;
  font: 500 10.5px/1 Inter, sans-serif; color: var(--kbd);
  border: 1px solid var(--line); border-radius: 4px; font-variant-numeric: tabular-nums;
}
body.locked { overflow: hidden; }

/* The app's stationary grain: one fixed layer over every surface. */
body::after { content: ""; position: fixed; inset: -50%; z-index: 9999; pointer-events: none; background: url("/assets/grain.webp"); background-size: 200px 200px; opacity: 0.14; }
:root[data-theme=light] body::after { filter: invert(1); opacity: 0.08; }

/* ── shell ─────────────────────────────────────────────────────── */

.shell { display: flex; min-height: 100dvh; }
.sidebar {
  position: sticky; top: 0; flex: none; width: 224px; height: 100dvh;
  display: flex; flex-direction: column; padding-left: 8px; background: var(--canvas);
}
.page { flex: 1; min-width: 0; min-height: 100dvh; display: flex; flex-direction: column; background: var(--panel); border-radius: 16px 0 0 16px; }

.brand-row { height: 44px; margin: 16px 8px 0; padding: 0 10px; display: flex; align-items: center; gap: 6px; flex: none; }
.brand { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.brand > svg { height: 14px; width: auto; color: var(--ink); }
.brand-name { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.brand-label { font-size: 14px; color: var(--mute); }
.sheet-close { display: none; margin-left: auto; }

.side-tools { padding: 4px 8px 0; display: grid; gap: 12px; flex: none; }
.find {
  width: 100%; height: 32px; padding: 0 8px 0 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel);
  font-size: 12.5px; color: var(--mute); transition: border-color .15s, color .15s;
}
.find:hover { border-color: var(--line-2); color: var(--mid); }
.find svg.icon { width: 14px; height: 14px; }
.find kbd { margin-left: auto; }
:root[data-theme=dark] .find { border-color: #27272a; }

/* Segmented control, as lib/segmented.ts in the app. */
.seg { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 10px; background: var(--soft); max-width: 100%; }
.seg > a, .seg > button {
  height: 28px; padding: 0 12px; border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 12.5px; font-weight: 500; color: var(--mid); white-space: nowrap; transition: color .15s, background .15s;
}
.seg > a:hover, .seg > button:hover { color: var(--ink-2); }
.seg > [aria-current=true], .seg > [aria-pressed=true] { background: var(--seg-on); color: var(--ink); box-shadow: var(--seg-ring); }
.side-tools .seg { display: flex; }
.side-tools .seg > a { flex: 1; }
.seg-count { font-size: 12px; font-weight: 400; color: var(--mute); font-variant-numeric: tabular-nums; }

.side-nav { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 8px 16px; scrollbar-width: thin; }
.nav-group + .nav-group { padding-top: 16px; }
.nav-label { padding: 0 10px 4px; font-size: 11.5px; font-weight: 500; color: var(--mute); }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px; margin-bottom: 2px; border-radius: 8px;
  font-size: 13.5px; font-weight: 500; color: var(--mid); transition: background .15s, color .15s;
}
.nav-item svg.icon { width: 17px; height: 17px; }
.nav-item > span:not([data-icon]) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item small { font-size: 11px; color: var(--mute); font-variant-numeric: tabular-nums; }
.nav-item:hover { background: var(--nav-hover); color: var(--ink); }
.nav-item[aria-current=page] { background: var(--nav-active); color: var(--ink); font-weight: 600; }
.side-foot { flex: none; margin: 0 8px; padding: 8px 0 12px; border-top: 1px solid rgb(228 228 231 / .7); }
:root[data-theme=dark] .side-foot { border-top-color: #27272a; }
.side-foot .nav-item { font-weight: 400; margin-bottom: 0; }
.side-foot .nav-item[aria-current=page] { font-weight: 500; }

/* Page header: 48px of content beneath the panel's 8px top edge. */
.header {
  position: sticky; top: 0; z-index: 20; height: var(--header); padding: 8px 24px 0;
  display: flex; align-items: center; gap: 12px;
  background: var(--panel); border-bottom: 1px solid var(--hair); border-radius: 16px 0 0 0;
}
.menu-button { display: none; margin-left: -8px; }
.crumbs { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font-size: 13px; white-space: nowrap; }
.crumb-title { font-weight: 600; color: var(--ink-2); flex: none; }
.crumb-dot { color: var(--faint); flex: none; }
.crumb-meta { font-size: 11.5px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.tools { display: flex; align-items: center; gap: 4px; flex: none; }
.text-button { height: 28px; padding: 0 8px; border-radius: 6px; display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 500; color: var(--mid); transition: background .15s, color .15s; }
.text-button:hover { background: var(--soft); color: var(--ink); }
.text-button svg.icon { width: 14px; height: 14px; }
.tool-sep { width: 1px; height: 16px; background: var(--line); margin: 0 6px; }
.icon-button { width: 28px; height: 28px; border-radius: 6px; justify-content: center; color: var(--mid); transition: background .15s, color .15s, transform .12s var(--ease-out); }
.icon-button:hover { background: var(--soft); color: var(--ink-2); }
.icon-button:active { transform: scale(.94); }
.icon-button svg.icon { width: 15px; height: 15px; }
.phone-search { display: none; }
.when-light, .when-dark { display: inline-flex; }
:root[data-theme=light] .when-dark, :root[data-theme=dark] .when-light { display: none; }
.open-app {
  height: 28px; margin-left: 4px; padding: 0 10px; border-radius: 6px; display: inline-flex; align-items: center;
  background: var(--primary); color: var(--on-primary); font-size: 12px; font-weight: 500; white-space: nowrap; transition: opacity .15s;
}
.open-app:hover { opacity: .88; }

main { flex: 1; padding: 0 32px 72px; outline: none; }
.layout { max-width: 1000px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 72px; }
.reading { min-width: 0; max-width: 700px; padding-top: 44px; overflow-wrap: anywhere; }

/* ── article ───────────────────────────────────────────────────── */

h1 { font-size: 26px; line-height: 1.2; font-weight: 600; letter-spacing: -0.025em; color: var(--ink); }
.lede { margin-top: 10px; max-width: 60ch; font-size: 15px; line-height: 1.6; color: var(--mid); }
.article-section { margin-top: 44px; }
.article-section h2 { font-size: 17px; line-height: 1.4; font-weight: 600; letter-spacing: -0.015em; }
.article-section h2 a { position: relative; }
.article-section h2 a::after { content: '#'; position: absolute; left: calc(100% + 8px); color: var(--faint); font-weight: 400; opacity: 0; transition: opacity .15s; }
.article-section h2 a:hover::after { opacity: 1; }
.article-section > p { margin-top: 12px; font-size: 14px; line-height: 1.75; color: var(--read); }
.steps { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.steps li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 14px; line-height: 1.7; color: var(--read); }
.step-number { width: 22px; height: 22px; margin-top: 1px; border-radius: 6px; display: grid; place-items: center; background: var(--soft); color: var(--mid); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bullets { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.bullets li { position: relative; padding-left: 18px; font-size: 14px; line-height: 1.7; color: var(--read); }
.bullets li::before { content: ""; position: absolute; left: 4px; top: 11px; width: 4px; height: 4px; border-radius: 50%; background: var(--faint); }
.more-link { margin-top: 14px; }
.more-link a { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 500; color: var(--ink); }
.more-link a > span:first-child { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-2); }
.more-link svg.icon { width: 14px; height: 14px; color: var(--mute); transition: transform .2s var(--ease-out), color .15s; }
.more-link a:hover svg.icon { transform: translateX(2px); color: var(--ink); }

.note { margin-top: 20px; display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 12px; padding: 14px 16px; border: 1px solid var(--hair); background: var(--sunk); border-radius: 10px; }
.note svg.icon { margin-top: 2px; color: var(--mute); }
.note strong { display: block; font-size: 13px; font-weight: 600; }
.note p { margin-top: 2px; font-size: 13.5px; line-height: 1.7; color: var(--read); }

.table-wrap { margin-top: 18px; border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; }
:root[data-theme=dark] :is(.table-wrap, .code-wrap, .rows, .path, .pagination a) { border-color: #27272a; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 8px 14px; background: var(--sunk); border-bottom: 1px solid var(--hair); font-size: 11px; font-weight: 500; color: var(--mid); white-space: nowrap; }
td { padding: 10px 14px; border-top: 1px solid var(--hair); font-size: 13px; line-height: 1.6; color: var(--body); vertical-align: top; min-width: 120px; }
tr:first-child td { border-top: 0; }
td:first-child { color: var(--ink-2); font-weight: 500; }

.code-wrap { margin-top: 18px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--sunk); }
.code-label { height: 36px; padding: 0 6px 0 14px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--hair); font-size: 11.5px; color: var(--mid); }
pre { margin: 0; padding: 14px 16px; overflow: auto; font: 12.5px/1.75 "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--body); tab-size: 2; }

.rows { margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 14px; gap: 12px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--hair); transition: background .12s; }
.row:first-child { border-top: 0; }
.row:hover { background: var(--sunk); }
.row-text strong { display: block; font-size: 13.5px; font-weight: 500; color: var(--ink); }
.row-text small { display: block; margin-top: 1px; font-size: 12.5px; line-height: 1.55; color: var(--mid); }
.row > span:last-child svg.icon { width: 14px; height: 14px; color: var(--faint); transition: transform .2s var(--ease-out), color .15s; }
.row:hover > span:last-child svg.icon { transform: translateX(2px); color: var(--mid); }
.tile { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; background: var(--soft); color: var(--mid); }
.tile svg.icon { width: 15px; height: 15px; }

.pagination { margin-top: 56px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pagination a { display: block; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; transition: border-color .15s, background .15s; }
.pagination a:hover { border-color: var(--line-2); background: var(--sunk); }
.pagination a.next { grid-column: 2; text-align: right; }
.pagination small { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--mute); }
.pagination a.next small { justify-content: flex-end; }
.pagination small svg.icon { width: 12px; height: 12px; }
.pagination a > span { display: block; margin-top: 2px; font-size: 13.5px; font-weight: 500; color: var(--ink); }

.page-foot { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--hair); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--mute); }
.page-foot a:hover { color: var(--ink); }

/* On this page, and Jump to on the changelog. */
.contents { padding-top: 48px; }
.contents-inner { position: sticky; top: calc(var(--header) + 24px); }
.contents-label { margin-bottom: 10px; font-size: 11.5px; font-weight: 500; color: var(--mute); }
#toc { position: relative; display: flex; flex-direction: column; }
#toc::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--line); }
:root[data-theme=dark] #toc::before { background: #27272a; }
#toc a { position: relative; padding: 5px 0 5px 14px; font-size: 12.5px; line-height: 1.45; color: var(--mid); transition: color .15s; }
#toc a:hover { color: var(--ink); }
#toc a[aria-current=true] { color: var(--ink); font-weight: 500; }
#toc a[aria-current=true]::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 2px; border-radius: 1px; background: var(--mid); }
.toc-month { padding: 12px 0 4px 14px; font-size: 11.5px; font-weight: 500; color: var(--mute); }
.toc-month:first-child { padding-top: 0; }

/* ── docs home ─────────────────────────────────────────────────── */

.home { max-width: 1000px; margin: 0 auto; padding-top: 48px; }
.home-search {
  margin-top: 24px; width: 100%; max-width: 480px; height: 40px; padding: 0 10px 0 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
  font-size: 13.5px; color: var(--mute); gap: 10px; transition: border-color .15s;
}
.home-search:hover { border-color: var(--line-2); }
.home-search kbd { margin-left: auto; }
:root[data-theme=dark] .home-search { border-color: #3f3f46; }
.paths { margin-top: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.path { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; transition: border-color .15s, background .15s; }
.path:hover { border-color: var(--line-2); background: var(--sunk); }
.path .tile { width: 32px; height: 32px; border-radius: 8px; }
.path strong { display: block; font-size: 14px; font-weight: 600; }
.path p { margin-top: 3px; font-size: 13px; line-height: 1.6; color: var(--mid); }
.path-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12.5px; font-weight: 500; }
.path-more > span:first-child { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-2); }
.path-more svg.icon { width: 14px; height: 14px; color: var(--mute); transition: transform .2s var(--ease-out); }
.path:hover .path-more svg.icon { transform: translateX(2px); color: var(--ink); }

.band { margin-top: 44px; }
.band-head { display: flex; align-items: baseline; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--hair); }
.band-head h2 { font-size: 13px; font-weight: 600; }
.band-head > span { font-size: 11.5px; color: var(--mute); }
.band-head a { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--mid); }
.band-head a:hover { color: var(--ink); }
.band-head svg.icon { width: 12px; height: 12px; }
.index { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 28px; }
.index a { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--hair); }
.index svg.icon { width: 16px; height: 16px; margin-top: 1px; color: var(--mute); transition: color .15s; }
.index a:hover svg.icon { color: var(--ink); }
.index strong { display: block; font-size: 13.5px; font-weight: 500; }
.index small { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.55; color: var(--mid); }
.latest a { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--hair); }
.latest time { font-size: 12px; color: var(--mute); font-variant-numeric: tabular-nums; }
.latest strong { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.latest a:hover strong { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-2); }
.area { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--mid); white-space: nowrap; }
.area svg.icon { width: 14px; height: 14px; color: var(--mute); }

/* ── changelog ─────────────────────────────────────────────────── */

.filters { margin-top: 24px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.area-wrap { position: relative; margin-left: auto; }
.select {
  min-width: 148px; height: 32px; padding: 0 10px; justify-content: space-between; gap: 6px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--panel);
  font-size: 12.5px; color: var(--ink-2); transition: background .15s, border-color .15s;
}
.select:hover { background: var(--sunk); }
.select[aria-expanded=true] { border-color: var(--line-2); }
.select svg.icon { width: 14px; height: 14px; color: var(--mute); }
.area-menu {
  position: absolute; right: 0; top: 100%; z-index: 40; width: 220px; max-height: 320px; overflow: auto;
  margin-top: 4px; padding: 4px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--panel); box-shadow: var(--shadow-menu); animation: menu-in .14s var(--ease-out);
}
.menu-item { width: 100%; justify-content: space-between; gap: 10px; padding: 6px 8px; border-radius: 2px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.menu-item:is(:hover, :focus-visible) { background: var(--soft); outline: none; }
.menu-item[aria-checked=true] { color: var(--ink); font-weight: 500; }
.menu-item .area { color: inherit; font-size: 12.5px; gap: 8px; }
.menu-item .area svg.icon { color: var(--mid); }
.menu-item small { font-size: 11.5px; color: var(--mute); font-variant-numeric: tabular-nums; }

.days { margin-top: 28px; }
.day { display: grid; grid-template-columns: 152px minmax(0, 1fr); gap: 24px; padding: 28px 0; border-top: 1px solid var(--hair); }
.day:first-child, .day.first { border-top: 0; padding-top: 4px; }
.when { position: sticky; top: calc(var(--header) + 20px); align-self: start; }
.when h2 { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.when p { margin-top: 2px; font-size: 12px; color: var(--mute); font-variant-numeric: tabular-nums; }
.changes { display: grid; gap: 22px; min-width: 0; }
.change-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 6px; font-size: 11px; font-weight: 500; line-height: 1; white-space: nowrap; background: var(--pill); color: var(--pill-ink); }
.pill-new { background: var(--pill-new); color: var(--pill-new-ink); }
.change h3 { margin-top: 8px; font-size: 14px; line-height: 1.45; font-weight: 600; letter-spacing: -0.005em; }
.change p { margin-top: 4px; max-width: 62ch; font-size: 13.5px; line-height: 1.7; color: var(--read); }
.more { margin-top: 8px; padding-top: 24px; border-top: 1px solid var(--hair); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--mute); }
.button { height: 28px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); font-size: 12px; font-weight: 500; color: var(--body); transition: background .15s, color .15s; }
.button:hover { background: var(--sunk); color: var(--ink); }
.filter-empty { padding: 48px 0; text-align: center; }
.filter-empty strong { display: block; font-size: 13.5px; font-weight: 500; }
.filter-empty p { margin-top: 4px; font-size: 12.5px; color: var(--mid); }
.link-button { margin-top: 12px; font-size: 12px; color: var(--mid); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-2); }
.link-button:hover { color: var(--ink); }

/* ── search ────────────────────────────────────────────────────── */

.search-overlay { position: fixed; inset: 0; z-index: 50; background: var(--scrim); padding: 88px 16px 24px; overflow: auto; animation: fade .2s var(--ease-out); }
.search-dialog { max-width: 600px; margin: 0 auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-dialog); animation: pop .2s var(--ease-out); }
:root[data-theme=dark] .search-dialog { border-color: #27272a; }
.search-input-row { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 16px; border-bottom: 1px solid var(--hair); color: var(--mute); }
.search-input-row input { flex: 1; min-width: 0; border: 0; background: none; font-size: 15px; color: var(--ink); }
.search-input-row input::placeholder { color: var(--mute); }
.search-input-row input::-webkit-search-cancel-button { display: none; }
.results { max-height: min(420px, 60vh); overflow: auto; padding: 6px; }
.results-group { padding: 10px 10px 4px; font-size: 11.5px; font-weight: 500; color: var(--mute); }
.result { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px 10px; border-radius: 6px; }
.result:is(:hover, :focus) { background: var(--soft); outline: none; }
.result strong { display: block; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result p { margin-top: 1px; font-size: 12px; color: var(--mid); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result mark { background: none; color: var(--ink); font-weight: 600; }
.empty { padding: 32px 12px; text-align: center; font-size: 13.5px; font-weight: 500; }
.empty p { margin-top: 4px; color: var(--mid); font-size: 12.5px; font-weight: 400; }
.search-footer { display: flex; justify-content: space-between; gap: 12px; padding: 9px 16px; border-top: 1px solid var(--hair); font-size: 11.5px; color: var(--mute); }
.search-keys { display: inline-flex; align-items: center; gap: 4px; }

.toast { position: fixed; right: 20px; bottom: 20px; z-index: 60; max-width: 360px; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow-menu); font-size: 12.5px; color: var(--ink-2); animation: toast-in .26s var(--ease-out); }
.toast:empty { display: none; }
.scrim { position: fixed; inset: 0; z-index: 25; background: var(--scrim); animation: fade .2s var(--ease-out); }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.98); opacity: 0; } }
@keyframes menu-in { from { transform: translateY(-3px); opacity: 0; } }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

/* ── responsive ────────────────────────────────────────────────── */

@media (max-width: 1279px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .contents { display: none; }
}
@media (max-width: 1080px) { .index { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

@media (max-width: 860px) {
  .sidebar {
    position: fixed; z-index: 30; inset: 0 auto 0 0; width: min(300px, 86vw); height: 100dvh;
    box-shadow: 8px 0 24px -16px rgb(0 0 0 / .25);
    transform: translateX(-100%); visibility: hidden; transition: transform .26s var(--ease-out), visibility .26s;
  }
  /* Visible at once when opening so focus can move into the sheet; hidden only after it has slid away. */
  .sidebar.open { transform: none; visibility: visible; transition: transform .26s var(--ease-out), visibility 0s; }
  .sheet-close { display: inline-flex; }
  .page { border-radius: 0; }
  .header { padding: 0 16px; border-radius: 0; }
  .menu-button, .phone-search { display: inline-flex; }
  .tools .text-button, .tool-sep { display: none; }
  main { padding: 0 16px 56px; }
  .reading { padding-top: 28px; }
  h1 { font-size: 23px; }
  .home { padding-top: 28px; }
  .home-search kbd, .search-keys { display: none; }
  .paths, .index, .pagination { grid-template-columns: 1fr; }
  .pagination a.next { grid-column: 1; }
  .latest a { grid-template-columns: minmax(0, 1fr) auto; row-gap: 2px; }
  .latest time { grid-column: 1 / -1; }
  .area-wrap { margin-left: 0; }
  .area-menu { left: 0; right: auto; }
  .filters .seg-count { display: none; }
  .days { margin-top: 12px; }
  .day { grid-template-columns: 1fr; gap: 14px; padding: 22px 0; }
  .when { position: static; display: flex; align-items: baseline; gap: 8px; }
  .when p { margin-top: 0; }
  .search-overlay { padding: 12px; }
  .toast { left: 16px; right: 16px; bottom: 16px; max-width: none; }
}
@media (max-width: 420px) { .crumb-dot, .crumb-meta { display: none; } }
@media (max-width: 767px) {
  :root[data-theme=dark] body::after { background-size: 150px 150px; opacity: 0.06; }
}

/* Progressive enhancement keeps articles and navigation usable without scripts. */
html:not(.enhanced) :is(#menu, #menu-close, #theme, [data-open-search], #copy, [data-copy-code], [data-filters]) { display: none; }
@media (max-width: 860px) {
  html:not(.enhanced) .shell { flex-direction: column; }
  html:not(.enhanced) .sidebar { position: static; width: auto; height: auto; transform: none; visibility: visible; box-shadow: none; }
  html:not(.enhanced) .side-nav { overflow: visible; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
