/* InkPin site. The page and the interactive demos share the same palette. */
:root {
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r-s: 2px; --r-m: 3px; --r-l: 6px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-fast: 140ms; --t-mid: 260ms;
  --wrap: 1280px;
  --gutter: clamp(20px, 4vw, 40px);
  color-scheme: light;
  --bg: #ffffff; --bg-2: #f1f4f9; --surface: #ffffff; --surface-2: #f8f9fc; --surface-3: #edf0f6;
  --line: #dce2ed; --line-2: #c4cee0;
  --text: #151a25; --text-2: #374254; --text-3: #555f70;
  --accent: #194ccf; --accent-strong: #12399d; --accent-soft: #e9efff; --on-accent: #ffffff;
  --desk: #e1eaff; --desk-line: #aebee7; --paper-dot: #b1c5f0;
  --mark: #fde68a; --mark-text: #18181b;
  --ok: #15803d; --ok-soft: #f0fdf4; --warn: #b45309; --warn-soft: #fffbeb; --err: #b91c1c; --err-soft: #fef2f2;
  --star: #e3a008;
  --shadow-win: 0 0 0 1px rgb(0 0 0 / .06), 0 2px 4px rgb(0 0 0 / .04), 0 10px 28px rgb(0 0 0 / .10);
  --shadow-pop: 0 0 0 1px rgb(0 0 0 / .07), 0 8px 24px rgb(0 0 0 / .14);
  /* Match the app's 2px geometry, selection edge and paper texture. */
  --demo-selected: color-mix(in srgb, var(--accent) 13%, var(--surface));
  --demo-selected-edge: inset 0 0 0 1px color-mix(in srgb, var(--accent) 65%, var(--line)), inset 0 -2px 0 var(--accent);
  --demo-surface: color-mix(in srgb, var(--surface) 91%, var(--desk));
  --demo-dot-cut: polygon(2px 0, calc(100% - 2px) 0, 100% 2px, 100% calc(100% - 2px), calc(100% - 2px) 100%, 2px 100%, 0 calc(100% - 2px), 0 2px);
  --demo-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath d='M1 6h2v2h2v2H3V8H1zM5 6h2V4h2V2h2v2H9v2H7v2H5z'/%3E%3C/svg%3E");
  --demo-paper: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--text) 13%, transparent) .7px, transparent 1px) 0 0 / 14px 14px;
  --demo-wallpaper: radial-gradient(circle, var(--paper-dot) 1px, transparent 1.4px) 0 0 / 12px 12px, var(--desk);
  --ink-bg: #171e31; --ink-text: #fafaff; --ink-text-2: #b5bfd5; --ink-line: #485471; --ink-surface: #212b44;
  /* Note colours (noteAppearance.ts): background + dot. */
  --n-paper: #ffffff; --n-paper-dot: #a1a1aa;
  --n-mint: #f5fbf8; --n-mint-dot: #72bca0;
  --n-rose: #fff8f7; --n-rose-dot: #df9d9a;
  --n-sky: #f6fbff; --n-sky-dot: #7dafe1;
  --n-grape: #fbf8ff; --n-grape-dot: #b69bd6;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111521; --bg-2: #151b2a; --surface: #1b2232; --surface-2: #191f2e; --surface-3: #242e43;
  --line: #2f3b52; --line-2: #45516a;
  --text: #f2f5ff; --text-2: #d4dcef; --text-3: #a8b5cf;
  --accent: #9bb8ff; --accent-strong: #c8d6ff; --accent-soft: #24375c; --on-accent: #101522;
  --desk: #1b2a49; --desk-line: #3d5279; --paper-dot: #41577f;
  --mark: rgb(250 204 21 / .32); --mark-text: #fef9c3;
  --ok: #4ade80; --ok-soft: rgb(34 197 94 / .12); --warn: #fbbf24; --warn-soft: rgb(245 158 11 / .12); --err: #f87171; --err-soft: rgb(239 68 68 / .12);
  --star: #f5b83d;
  --shadow-win: 0 0 0 1px rgb(255 255 255 / .07), 0 10px 30px rgb(0 0 0 / .45);
  --shadow-pop: 0 0 0 1px rgb(255 255 255 / .08), 0 10px 28px rgb(0 0 0 / .5);
  --ink-bg: #0c101a; --ink-text: #fafaff; --ink-text-2: #b5bfd5; --ink-line: #3c4863; --ink-surface: #171e31;
  --n-paper: #232327; --n-mint: color-mix(in srgb, #72bca0 13%, #202024); --n-rose: color-mix(in srgb, #df9d9a 13%, #202024);
  --n-sky: color-mix(in srgb, #7dafe1 13%, #202024); --n-grape: color-mix(in srgb, #b69bd6 13%, #202024);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.7 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
code { font-family: var(--mono); font-size: .88em; }
h1, h2, h3, h4 { margin: 0; color: var(--text); font-weight: 650; }
h1 { font-size: clamp(2rem, 3.3vw, 2.75rem); line-height: 1.2; letter-spacing: -.02em; text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.15rem); line-height: 1.25; letter-spacing: -.012em; }
h3 { font-size: 1.0625rem; line-height: 1.4; }
h4 { font-size: .875rem; color: var(--text-3); font-weight: 600; }
p { margin: 0; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 1.125em; height: 1.125em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fine { font-size: .875rem; line-height: 1.65; color: var(--text-3); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 50; padding: 8px 14px; background: var(--text); color: var(--bg); border-radius: var(--r-s); }
.skip:focus { top: 12px; }
:root[data-theme="light"] .only-dark, :root[data-theme="dark"] .only-light { display: none !important; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--r-m); border: 1px solid transparent; font-weight: 600; font-size: .9375rem; text-decoration: none; cursor: pointer; transition: background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast); }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 3px 3px 0 var(--text); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-quiet { color: var(--text); border-color: var(--line-2); background: var(--surface); }
.btn-quiet:hover { border-color: var(--text-3); }
.btn-small { min-height: 34px; padding: 0 14px; font-size: .875rem; background: var(--text); color: var(--bg); }
.btn-small:hover { opacity: .88; }
.btn:disabled { opacity: .45; cursor: default; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: var(--r-s); background: transparent; color: var(--text-2); cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn.small { width: 30px; height: 30px; }
.icon-btn[aria-expanded="true"], .icon-btn.on { background: var(--accent-soft); color: var(--accent); }
.text-btn { border: 0; background: none; padding: 4px 6px; color: var(--text-3); font-size: .8125rem; cursor: pointer; border-radius: 4px; }
.text-btn:hover { color: var(--text); }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9375rem; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.tag { display: inline-block; padding: 0 7px; border-radius: 4px; background: var(--surface-3); color: var(--text-2); font-size: .75rem; font-weight: 600; line-height: 1.7; margin-right: 4px; }
.seg { display: inline-flex; padding: 3px; border-radius: var(--r-s); background: var(--surface-3); gap: 4px; }
.seg button { border: 1px solid transparent; background: none; padding: 4px 9px; border-radius: var(--r-s); font-size: .8125rem; color: var(--text-3); cursor: pointer; white-space: nowrap; }
.seg button[aria-checked="true"], .seg button[aria-selected="true"] { background: var(--surface); color: var(--accent); border-color: var(--accent); }

/* Header */
.site-head { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; gap: 28px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-weight: 700; font-size: 1.0625rem; text-decoration: none; letter-spacing: -.01em; }
.brand span { white-space: nowrap; }
.head-left { display: flex; align-items: center; gap: 12px; flex: none; }
.log-chip { display: inline-flex; align-items: center; gap: 7px; padding: 3px 9px 3px 4px; border: 1px solid var(--desk-line); color: var(--text-2); font-size: .8125rem; font-weight: 600; text-decoration: none; white-space: nowrap; transition: border-color .15s, background .15s, color .15s; }
.log-chip b { padding: 1px 6px; background: var(--accent-soft); color: var(--accent); font: 600 .75rem/1.5 var(--mono); }
.log-chip:is(:hover, [aria-current="page"]) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.guide-toc em { margin-left: 6px; padding: 0 5px; background: var(--accent-soft); color: var(--accent); font: 600 .7rem/1.6 var(--mono); font-style: normal; }
.changelog h2 { font: 700 clamp(1.6rem, 3vw, 2.1rem)/1.15 var(--mono); letter-spacing: -.02em; }
.changelog .release-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 6px; color: var(--text-3); font-size: .875rem; }
.changelog .release-meta span { color: var(--line-2); }
.head-nav { display: flex; gap: 2px; margin-right: auto; }
.head-nav a { padding: 6px 10px; color: var(--text-2); text-decoration: none; font-size: .875rem; border-radius: 6px; }
.head-nav a:hover { color: var(--text); background: var(--surface-3); }
.head-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.head-actions .btn-small { margin-left: 6px; }
.guide-link { padding: 5px 10px; border: 1px solid transparent; color: var(--text-2); font-size: .875rem; font-weight: 600; text-decoration: none; }
.guide-link:is(:hover, [aria-current="page"]) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* Sections */
.section { padding-block: clamp(64px, 9vw, 120px); }
.section-tint { background: var(--bg-2); }
.section-head { max-width: 46rem; margin-bottom: clamp(28px, 4vw, 44px); }
.section-head p { margin-top: 12px; color: var(--text-2); font-size: 1.0625rem; }
.demo-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; margin-bottom: 10px; flex-wrap: wrap; }
.demo-label { font-size: .8125rem; color: var(--text-3); }
.demo-label::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; background: var(--accent); vertical-align: 1px; }
.demo-bar-actions { display: flex; align-items: center; gap: 4px; }
.demo-note { min-height: 1.6em; margin-top: 10px; font-size: .875rem; color: var(--text-3); }
.plain-list { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; color: var(--text-2); }
.plain-list li { padding-left: 16px; position: relative; }
.plain-list li::before { content: ""; position: absolute; left: 2px; top: .78em; width: 5px; height: 5px; border-radius: 50%; background: var(--text-3); }

/* Hero */
.hero { padding-block: clamp(38px, 5vw, 68px) clamp(34px, 6vw, 72px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: clamp(28px, 5vw, 78px); align-items: end; margin-bottom: clamp(28px, 4vw, 50px); }
.hero-kind { color: var(--text-3); font-size: .95rem; font-weight: 620; }
.hero h1 { font-size: clamp(5rem, 11.2vw, 10rem); line-height: .98; letter-spacing: -.055em; font-weight: 800; transform: translateX(-.045em); }
.hero-tagline { font-size: clamp(1.55rem, 3.1vw, 2.8rem); line-height: 1.18; letter-spacing: -.04em; font-weight: 740; }
.lede { margin-top: 12px; max-width: 27rem; font-size: clamp(1rem, 1.35vw, 1.125rem); color: var(--text-2); }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 19px; }
.release-line { display: flex; flex-wrap: wrap; align-items: center; gap: 9px 14px; margin-top: 22px; font-size: .8125rem; color: var(--text-3); }
.release-line a { padding: 0 6px; border: 1px solid var(--desk-line); color: var(--accent); font: 600 .8rem/1.6 var(--mono); text-decoration: none; }
.release-line a:hover { background: var(--accent-soft); }
.hero-stage { min-width: 0; margin: 0; }
.desk-shot {
  position: relative; display: block; isolation: isolate; aspect-ratio: 16 / 7.3; overflow: hidden;
  background: var(--demo-wallpaper);
  border: 1px solid var(--desk-line);
}
.desk-shot img { position: absolute; }
.shot-center { left: 19%; top: 5%; height: 89%; width: auto; max-width: none; border-radius: 4px; box-shadow: 0 0 0 1px #8797b8, 5px 6px 0 #1b337333; }
.shot-note { right: 9%; bottom: 11%; width: 24%; filter: drop-shadow(4px 5px 0 #1b337338); }
.shot-capsule { left: 7%; bottom: 10%; width: 17%; filter: drop-shadow(3px 3px 0 #1b33732b); }
.shot-tab { right: 0; top: 13%; width: 2.5%; }
.desk-caption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 18px; padding: 10px 14px; border: 1px solid var(--desk-line); border-top: 0; background: var(--surface-2); font-size: .8125rem; color: var(--text-3); }
.desk-caption nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.desk-caption a { text-decoration: none; font-weight: 600; }
.desk-caption a:hover { text-decoration: underline; }

.capture { padding-block: clamp(34px, 5vw, 66px); background: var(--bg-2); border-block: 1px solid var(--line); }
.capture-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: clamp(24px, 4.5vw, 66px); }
.capture-copy p { max-width: 28rem; margin-top: 12px; color: var(--text-2); }
.capture-keys { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 17px 0 0; }
.capture-keys div, .capture-keys dd { display: flex; align-items: center; gap: 5px; }
.capture-keys dt { font-size: .8125rem; color: var(--text-3); }
.capture-keys dd { margin: 0; }
kbd { border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: var(--r-s); padding: 1px 5px; background: var(--surface); font: .8125rem/1.5 var(--mono); }
.capture-figure { margin: 0; min-width: 0; }
.capture-figure img { width: 100%; filter: drop-shadow(0 6px 10px #1a2c5624); }
.capture-figure figcaption { margin-top: 12px; color: var(--text-3); font-size: .8125rem; }

@media (prefers-reduced-motion: no-preference) {
  .hero-grid, .hero-stage, .guide-hero { animation: hero-in 350ms var(--ease) both; }
  .hero-stage { animation-delay: 70ms; }
  .desk-shot img { transition: transform var(--t-mid) var(--ease); }
  .desk-shot:is(:hover, :focus-visible) .shot-note { transform: translate(-4px, -4px); }
  .desk-shot:is(:hover, :focus-visible) .shot-capsule { transform: translate(4px, -3px); }
  .btn { transition: background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--ease); }
  .btn:hover { transform: translateY(-2px); }
  .btn:active { transform: translate(2px, 2px); }
  @keyframes hero-in { from { opacity: 0; transform: translateY(8px); } }
}

/* Desk demo (core experience) */
.exp-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 2px; position: sticky; top: 84px; }
.steps li { counter-increment: s; }
.steps button { display: grid; grid-template-columns: 28px 1fr; column-gap: 10px; width: 100%; padding: 12px 12px; border: 0; border-radius: var(--r-m); background: transparent; text-align: left; cursor: pointer; color: var(--text-3); }
.steps button::before { content: counter(s); grid-row: span 2; display: grid; place-items: center; width: 24px; height: 24px; margin-top: 1px; border: 1px solid var(--line-2); font: 600 .75rem var(--mono); }
.steps b { color: var(--text-2); font-weight: 600; }
.steps span { font-size: .875rem; line-height: 1.55; }
.steps button:hover { background: var(--surface-3); }
.steps button[aria-current="step"] { background: var(--accent-soft); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--accent); }
.steps button[aria-current="step"] b { color: var(--text); }
.steps button[aria-current="step"]::before { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.step-count { min-width: 3.2em; text-align: center; font-size: .8125rem; color: var(--text-3); font-variant-numeric: tabular-nums; }

.desk { position: relative; aspect-ratio: 16 / 10.4; min-height: 340px; border-radius: var(--r-l); background: var(--demo-wallpaper); box-shadow: inset 0 0 0 1px var(--desk-line); overflow: hidden; user-select: none; -webkit-user-select: none; }
.edge-rail { position: absolute; top: 0; bottom: 0; width: 6px; background: var(--accent); opacity: 0; transition: opacity var(--t-fast); pointer-events: none; }
.edge-rail.left { left: 0; } .edge-rail.right { right: 0; }
.desk[data-hint="left"] .edge-rail.left, .desk[data-hint="right"] .edge-rail.right { opacity: .55; }
.desk-hint { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); margin: 0; padding: 4px 12px; border-radius: 999px; background: var(--text); color: var(--bg); font-size: .8125rem; white-space: nowrap; opacity: 0; transition: opacity var(--t-fast); pointer-events: none; }
.desk-hint.show { opacity: .92; }

.mini-center { position: absolute; left: 3.5%; top: 7%; width: 54%; height: 80%; display: flex; flex-direction: column; border-radius: 9px; background: var(--demo-surface); box-shadow: var(--shadow-win); overflow: hidden; }
.mini-bar { display: flex; align-items: center; gap: 10px; height: 30px; padding: 0 10px; border-bottom: 1px solid var(--line); font-size: .75rem; color: var(--text-3); background: var(--surface-2); flex: none; }
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: #fc6057; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }
.mini-body { display: grid; grid-template-columns: 38% 1fr; min-height: 0; flex: 1; }
.mini-side { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--line); background: var(--surface-2); }
.mini-list { flex: 1; margin: 0; padding: 6px; list-style: none; overflow: hidden; }
.sample-footer { display: grid; gap: 3px; padding: 6px 8px; border-top: 1px solid var(--line); color: var(--text-3); }
.sample-footer span { display: flex; align-items: center; gap: 5px; white-space: nowrap; font-size: .7rem; }
.mini-list li { display: flex; align-items: center; gap: 6px; padding: 6px 7px; border-radius: var(--r-s); font-size: .75rem; color: var(--text-2); white-space: nowrap; overflow: hidden; }
.mini-list li.sel { background: var(--demo-selected); box-shadow: var(--demo-selected-edge); color: var(--text); font-weight: 600; }
.mini-list .ic { width: 12px; height: 12px; margin-left: auto; color: var(--text-3); }
.mini-editor { padding: 12px 14px; font-size: .78rem; line-height: 1.6; overflow: hidden; min-width: 0; -webkit-mask-image: linear-gradient(#000 calc(100% - 28px), transparent); mask-image: linear-gradient(#000 calc(100% - 28px), transparent); }
.mini-editor h3 { font-size: .95rem; margin-bottom: 6px; }
.mini-editor .notice { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 8px; padding: 6px 8px; border-radius: var(--r-s); background: var(--surface-3); color: var(--text-3); font-size: .72rem; }
.mini-editor .notice button { border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; font-size: .72rem; }
.mini-editor .md { padding: 6px 4px; background: var(--demo-paper); }
.mini-editor.readonly .md { opacity: .62; }
.mini-editor .cta { margin-top: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: var(--r-s); border: 0; background: var(--accent-soft); color: var(--accent); font-size: .72rem; font-weight: 600; cursor: pointer; }

.desk-note { position: absolute; left: 0; top: 0; transform-origin: 0 0; z-index: 3; --nb: var(--n-sky); --nd: var(--n-sky-dot); }
.desk-note[hidden] { display: none; }
.desk-note > [data-face] { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.desk-note[data-form="expanded"] > [data-face="expanded"], .desk-note[data-form="capsule"] > [data-face="capsule"], .desk-note[data-form="tab"] > [data-face="tab"] { opacity: 1; pointer-events: auto; }
.desk-note[data-form="expanded"] { width: 228px; height: 252px; }
.desk-note[data-form="capsule"] { width: 152px; height: 34px; }
.desk-note[data-form="tab"] { width: 26px; height: 60px; }
/* The shell carries the shape change; faces hold the content and fade in after it. */
.dn-shell { position: absolute; inset: 0; transform-origin: 0 0; background: var(--nb); box-shadow: var(--shadow-win); border-radius: 9px; }
.desk-note[data-form="capsule"] .dn-shell { border-radius: 17px; }
.desk-note[data-form="tab"] .dn-shell { border-radius: 8px 0 0 8px; }
.desk-note[data-form="tab"][data-side="left"] .dn-shell { border-radius: 0 8px 8px 0; }
.desk-note.dragging .dn-shell { box-shadow: var(--shadow-pop); }
.dn-expanded { display: flex; flex-direction: column; border-radius: 9px; overflow: hidden; }
.dn-title { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 6px 0 10px; border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); cursor: grab; touch-action: none; flex: none; }
.dn-title:active { cursor: grabbing; }
.dot { width: 9px; height: 9px; clip-path: var(--demo-dot-cut); background: var(--nd); flex: none; }
.dn-name { font-size: .78rem; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.dn-btn { display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: var(--r-s); background: none; color: var(--text-3); cursor: pointer; padding: 0; flex: none; }
.dn-btn .ic { width: 14px; height: 14px; }
.dn-btn:hover { background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); }
.dn-btn.pinned { color: var(--on-accent); background: var(--accent); cursor: default; }
.dn-content { background: var(--demo-paper); padding: 10px 12px; font-size: .76rem; line-height: 1.6; overflow: hidden; flex: 1; -webkit-mask-image: linear-gradient(#000 calc(100% - 20px), transparent); mask-image: linear-gradient(#000 calc(100% - 20px), transparent); }
.dn-capsule { display: flex; align-items: center; gap: 8px; padding: 0 5px 0 12px; border-radius: 999px; cursor: pointer; touch-action: none; }
.dn-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 8px 0 0 8px; border-left: 3px solid var(--nd); cursor: pointer; touch-action: none; }
.desk-note[data-side="left"] .dn-tab { border-radius: 0 8px 8px 0; border-left: 0; border-right: 3px solid var(--nd); }
.dn-tab-text { writing-mode: vertical-rl; font-size: .72rem; font-weight: 650; letter-spacing: .05em; max-height: 45px; overflow: hidden; line-height: 1.05; }
.pixel-grip { display: block; width: 9px; height: 5px; background: repeating-linear-gradient(90deg, var(--accent) 0 1px, transparent 1px 3px); }
.desk-note.dragging { z-index: 6; }
.desk-preview { position: absolute; z-index: 5; width: 210px; padding: 12px 14px 10px; border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-pop); font-size: .76rem; line-height: 1.55; pointer-events: none; }
.desk-preview[hidden] { display: none; }
.desk-preview p { margin: 6px 0 10px; color: var(--text-2); white-space: pre-line; max-height: 7.8em; overflow: hidden; }
.pv-foot { display: flex; justify-content: space-between; align-items: center; color: var(--text-3); font-size: .7rem; }
.pv-open { color: var(--accent); background: var(--accent-soft); padding: 2px 8px; border-radius: 5px; }
.desk-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; min-height: 40px; }
.desk-actions button { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: var(--r-m); border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-size: .875rem; cursor: pointer; }
.desk-actions button:hover { border-color: var(--text-3); }
.desk-actions button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.decor-tab { position: absolute; right: 0; z-index: 2; display: grid; place-items: center; width: 26px; height: 60px; border-radius: 8px 0 0 8px; background: var(--n-mint); border-left: 3px solid var(--n-mint-dot); box-shadow: var(--shadow-win); }
.decor-tab span { writing-mode: vertical-rl; font-size: .72rem; font-weight: 650; letter-spacing: .05em; max-height: 52px; overflow: hidden; line-height: 1.05; }
.decor-capsule { position: absolute; z-index: 2; display: flex; align-items: center; gap: 8px; width: 152px; height: 34px; padding: 0 12px; border-radius: 999px; background: var(--n-grape); box-shadow: var(--shadow-win); font-size: .78rem; }
.decor-capsule .dot { --nd: var(--n-grape-dot); }
.switch-row input:disabled { opacity: .45; cursor: not-allowed; }

/* Markdown rendering (shared) */
.md p { margin: 0 0 .5em; }
.md h2, .md h3 { font-size: 1.02em; margin: 0 0 .4em; }
.md ul { margin: 0 0 .55em; padding-left: 1.2em; }
.md ul.tasks { list-style: none; padding-left: 0; }
.md li { margin: .12em 0; }
.md blockquote { margin: 0 0 .55em; padding-left: .8em; border-left: 3px solid var(--line-2); color: var(--text-3); }
.md .task { display: flex; align-items: flex-start; gap: .5em; }
.md .task input { appearance: none; -webkit-appearance: none; flex: none; width: 1.05em; height: 1.05em; margin: .3em 0 0; border: 1px solid var(--accent); border-radius: var(--r-s); background: transparent; cursor: pointer; display: grid; place-items: center; }
.md .task input:checked { background: var(--accent); }
.md .task input:checked::after { content: ""; width: 100%; height: 100%; background: var(--on-accent); mask: var(--demo-check) center / contain no-repeat; }
.md .task input:disabled { cursor: default; opacity: .7; }
.md .task.done span { color: var(--text-3); text-decoration: line-through; }
.md mark, .app mark { background: var(--mark); color: var(--mark-text); border-radius: 2px; padding: 0 1px; }
.md .added { background: var(--ok-soft); box-shadow: -6px 0 0 var(--ok-soft); border-radius: 2px; }

/* Center collapse */
.cc-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.cc-copy > p { margin-top: 14px; color: var(--text-2); }
.titlebar-shot { width: 190px; margin-top: 18px; border-radius: 8px; box-shadow: 0 0 0 1px var(--line); }
.cc-copy .fine { margin-top: 18px; }
.cc-real { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 18px; margin: 16px 0 0; }
.cc-real img[width="60"] { width: 24px; }
.cc-real img[width="640"] { width: 240px; filter: drop-shadow(0 3px 8px rgb(0 0 0 / .12)); }
.cc-real figcaption { width: 100%; font-size: .8125rem; color: var(--text-3); }
.screen { position: relative; aspect-ratio: 16 / 10; min-height: 280px; border-radius: var(--r-l); background: var(--demo-wallpaper); box-shadow: inset 0 0 0 1px var(--desk-line); overflow: hidden; touch-action: none; }
.cc-window { position: absolute; left: 18%; top: 14%; width: 64%; height: 70%; display: flex; flex-direction: column; border-radius: 9px; background: var(--demo-surface); box-shadow: var(--shadow-win); overflow: hidden; transform-origin: 0 0; }
.cc-window[hidden] { display: none; }
.cc-titlebar { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 6px 0 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); flex: none; }
.cc-title { font-size: .78rem; color: var(--text-3); flex: 1; }
.cc-tools { display: flex; gap: 2px; }
.cc-btn { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: var(--r-s); background: none; color: var(--text-2); cursor: pointer; padding: 0; }
.cc-btn:hover:not(:disabled) { background: var(--surface-3); color: var(--text); }
.cc-btn:disabled { opacity: .45; cursor: default; }
.cc-btn .ic { width: 15px; height: 15px; }
.cc-body { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.cc-body img { position: absolute; inset: -6% 0 auto; width: 100%; height: 106%; object-fit: fill; }
.cc-handle { position: absolute; top: 40%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 29px; height: 96px; padding: 0; border: 0; background: var(--surface); box-shadow: var(--shadow-win); color: var(--text-2); cursor: grab; touch-action: none; font-size: .68rem; }
.cc-handle span { writing-mode: vertical-rl; }
.cc-handle[hidden] { display: none; }
.cc-handle.left { left: 0; border-radius: 0 9px 9px 0; }
.cc-handle.right { right: 0; border-radius: 9px 0 0 9px; }
.cc-bar { position: absolute; left: 50%; top: 12%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; width: 300px; max-width: calc(100% - 24px); height: 40px; padding: 0 6px 0 12px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-win); font-size: .8rem; }
.cc-bar[hidden] { display: none; }
.cc-bar .ic { color: var(--accent); }
.cc-bar span { color: var(--text-3); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-bar .cc-btn .ic { color: var(--text-2); }

/* Daily use: re-drawn center */
.app { display: grid; grid-template-columns: 250px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); height: 540px; border-radius: var(--r-l); background: var(--surface); box-shadow: var(--shadow-win); overflow: hidden; font-size: .875rem; }
.app-chrome { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); color: var(--text-3); font-size: .78rem; }
.app-side { display: flex; flex-direction: column; min-height: 0; background: var(--surface-2); border-right: 1px solid var(--line); }
.app-search { display: flex; align-items: center; gap: 8px; margin: 12px 12px 8px; padding: 0 10px; height: 34px; border-radius: var(--r-s); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--text-3); }
.app-search:focus-within { box-shadow: inset 0 0 0 1.5px var(--accent); }
.app-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--text); font: inherit; }
.app-search input::-webkit-search-cancel-button { cursor: pointer; }
.app-scope { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 12px 8px; }
.app-filters { margin: 0 12px 8px; padding: 10px; border-radius: var(--r-s); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.app-filters[hidden] { display: none; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); font-size: .78rem; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.chip .ic { width: 12px; height: 12px; }
.app-active-filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px; }
.app-active-filters:not(:empty) { padding-bottom: 8px; }
.app-list { flex: 1; min-height: 0; overflow-y: auto; margin: 0; padding: 0 8px 12px; list-style: none; }
.app-row { display: block; width: 100%; padding: 9px 10px; margin-bottom: 2px; border: 0; border-radius: var(--r-s); background: none; text-align: left; cursor: pointer; }
.app-row:hover { background: var(--surface-3); }
.app-row[aria-current="true"] { background: var(--demo-selected); box-shadow: var(--demo-selected-edge); }
.row-top { display: flex; align-items: center; gap: 6px; }
.row-title { font-weight: 650; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.row-top .ic { width: 13px; height: 13px; color: var(--text-3); }
.row-top .ic.star { color: var(--star); fill: var(--star); }
.row-time { margin-left: auto; font-size: .75rem; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.row-excerpt { margin-top: 2px; font-size: .78rem; color: var(--text-3); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; font-size: .72rem; color: var(--text-3); }
.row-meta .todo { color: var(--accent); }
.app-empty { padding: 24px 12px; color: var(--text-3); font-size: .82rem; text-align: center; }
.app-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.app-tabs { display: flex; align-items: flex-end; gap: 2px; height: 44px; padding: 0 10px; border-bottom: 1px solid var(--line); background: var(--surface-2); overflow-x: auto; flex: none; scrollbar-width: none; }
.app-tab { display: inline-flex; align-items: center; gap: 4px; height: 32px; margin-bottom: 5px; padding: 0 4px 0 12px; border-radius: var(--r-s); color: var(--text-3); font-size: .8125rem; white-space: nowrap; }
.app-tab.sel { background: var(--demo-selected); color: var(--text); box-shadow: var(--demo-selected-edge); }
.app-tab > button { border: 0; background: none; padding: 0; color: inherit; cursor: pointer; font-size: inherit; }
.app-tab .close { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 4px; }
.app-tab .close:hover { background: var(--surface-3); }
.app-tab .close .ic { width: 12px; height: 12px; }
.app-editor { flex: 1; overflow-y: auto; padding: 22px 28px 28px; min-height: 0; background: var(--nb, var(--surface)); }
.ed-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ed-title { font-size: 1.25rem; font-weight: 650; margin-right: auto; }
.ed-tool { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 9px; border: 0; border-radius: var(--r-s); background: none; color: var(--text-2); font-size: .8125rem; cursor: pointer; }
.ed-tool:hover:not(:disabled) { background: color-mix(in srgb, var(--text) 7%, transparent); }
.ed-tool.icon { width: 30px; padding: 0; justify-content: center; }
.ed-tool .ic { width: 15px; height: 15px; }
.ed-tool.star-on .ic { color: var(--star); fill: var(--star); }
.ed-tool.chip-time { background: var(--accent-soft); color: var(--accent); }
.ed-tool.accent { color: var(--accent); }
.ed-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ed-tag { padding: 1px 9px; border-radius: 999px; background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text-2); font-size: .78rem; }
.ed-progress { display: flex; align-items: center; gap: 10px; margin: 16px 0 12px; font-size: .78rem; color: var(--text-3); }
.ed-bar { width: 96px; height: 6px; background: repeating-linear-gradient(90deg, var(--line) 0 5px, transparent 5px 7px); overflow: hidden; }
.ed-bar i { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--accent) 0 5px, transparent 5px 7px); transform-origin: 0 50%; transition: transform var(--t-mid) var(--ease); }
.ed-add { margin-left: auto; }
.ed-notice { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 14px; padding: 8px 12px; border-radius: var(--r-s); background: var(--surface-3); color: var(--text-3); font-size: .8125rem; }
.ed-notice button { border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; font-size: inherit; display: inline-flex; align-items: center; gap: 4px; }
.app-editor .md { padding: 8px 6px; background: var(--demo-paper); font-size: .9375rem; line-height: 1.75; max-width: 40rem; }
.app-editor.readonly .md { opacity: .7; }
.ed-addrow { display: flex; gap: 8px; margin-top: 4px; max-width: 40rem; }
.ed-addrow input { flex: 1; min-width: 0; height: 34px; padding: 0 10px; border-radius: var(--r-s); border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; font-size: .875rem; }
.pop { position: relative; }
.pop-menu { position: absolute; z-index: 4; top: calc(100% + 4px); right: 0; min-width: 190px; padding: 6px; border-radius: 9px; background: var(--surface); box-shadow: var(--shadow-pop); font-size: .8125rem; }
.pop-menu p { padding: 4px 8px 6px; color: var(--text-3); font-size: .75rem; }
.pop-menu button { display: block; width: 100%; padding: 6px 8px; border: 0; border-radius: var(--r-s); background: none; text-align: left; cursor: pointer; color: var(--text); }
.pop-menu button:hover { background: var(--surface-3); }
.legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 22px 0 0; }
.legend dt { font-weight: 650; font-size: .9375rem; }
.legend dd { margin: 4px 0 0; color: var(--text-3); font-size: .875rem; }

/* AI */
.ai-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.ai-demo { border-radius: var(--r-l); }
.ai-perm { display: grid; gap: 2px; padding: 12px 16px; border-radius: var(--r-s); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.switch-row { display: flex; align-items: center; justify-content: space-between; min-height: 38px; font-size: .9rem; cursor: pointer; }
.switch-row input { appearance: none; -webkit-appearance: none; position: relative; width: 36px; height: 21px; margin: 0; border-radius: var(--r-s); background: var(--line-2); cursor: pointer; transition: background-color var(--t-fast); }
.switch-row input::after { content: ""; position: absolute; left: 2px; top: 2px; width: 17px; height: 17px; border-radius: 1px; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .25); transition: transform var(--t-fast) var(--ease); }
.switch-row input:checked { background: var(--accent); }
.switch-row input:checked::after { transform: translateX(15px); }
.chat { display: grid; gap: 12px; margin-top: 16px; min-height: 120px; }
.msg { max-width: 88%; padding: 11px 14px; border-radius: var(--r-s); font-size: .9rem; line-height: 1.65; }
.msg.user { justify-self: end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 4px; }
.msg.user ol { margin: 6px 0 0; padding-left: 1.3em; }
.msg.agent { background: var(--surface); box-shadow: 0 0 0 1px var(--line); border-bottom-left-radius: 4px; }
.call { padding: 10px 12px; border-radius: var(--r-s); background: var(--surface-3); font-size: .8rem; }
.call-head { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text-2); }
.call-head code { color: var(--text); }
.call pre { margin: 6px 0 0; white-space: pre-wrap; word-break: break-word; font: .76rem/1.55 var(--mono); color: var(--text-3); }
.call.err { background: var(--err-soft); }
.call.err pre { color: var(--err); }
.call.ok .call-head::after { content: "完成"; margin-left: auto; font-weight: 500; color: var(--ok); font-size: .75rem; }
.preview-box { border-radius: var(--r-s); box-shadow: 0 0 0 1px var(--line); background: var(--n-sky); padding: 12px 14px; font-size: .82rem; }
.preview-box h5 { margin: 0 0 6px; font-size: .78rem; color: var(--text-3); font-weight: 600; }
.ai-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.ai-side h3 { font-size: 1.0625rem; }
.ai-side .fine { margin-top: 6px; }
.tool-group { margin-top: 18px; }
.tools { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: .875rem; color: var(--text-2); }
.tools code { display: inline-block; margin-right: 8px; padding: 0 6px; border-radius: 4px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); color: var(--text); font-size: .78rem; line-height: 1.7; }
.settings-shot { margin: 18px 0 14px; border-radius: var(--r-m); box-shadow: 0 0 0 1px var(--line); }

/* Data */
.data-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.data-list { margin: 0; border-top: 1px solid var(--line); }
.data-row { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.data-row dt { display: flex; align-items: center; gap: 10px; font-weight: 650; align-self: start; }
.data-row dt .ic { color: var(--text-3); }
.data-row dd { margin: 0; color: var(--text-2); }
.data-fig { margin: 0; }
.data-fig img { border-radius: var(--r-m); box-shadow: 0 0 0 1px var(--line); }
.data-fig figcaption { margin-top: 12px; font-size: .875rem; color: var(--text-3); }

/* Activity heatmap */
.act-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.act-copy p { margin-top: 14px; color: var(--text-2); }
.act-copy .fine { color: var(--text-3); }
.heat-demo { padding: clamp(16px, 2.5vw, 24px); border-radius: var(--r-l); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.heat-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.heat-stats div { min-width: 0; padding: 8px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.heat-stats b { display: block; font-size: 1.375rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.heat-stats span { font-size: .78rem; color: var(--text-3); }
.heat-wrap { display: flex; gap: 6px; }
.heat-days { display: grid; grid-template-rows: repeat(7, 1fr); gap: 3px; font-size: .66rem; color: var(--text-3); width: 1.2em; }
.heat-days span { display: grid; align-items: center; }
.heat { flex: 1; display: grid; grid-template-rows: repeat(7, auto); grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; min-width: 0; }
.heat button { aspect-ratio: 1; width: 100%; min-width: 0; padding: 0; border: 0; border-radius: 1px; background: var(--heat-0); cursor: pointer; }
.heat button[data-l="1"] { background: var(--heat-1); } .heat button[data-l="2"] { background: var(--heat-2); }
.heat button[data-l="3"] { background: var(--heat-3); } .heat button[data-l="4"] { background: var(--heat-4); }
.heat button[data-future] { background: transparent; box-shadow: inset 0 0 0 1px var(--line); cursor: default; }
.heat button[aria-pressed="true"] { outline: 2px solid var(--text); outline-offset: 1px; }
.heat button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
:root { --heat-0: #f0f0f2; --heat-1: #c7d9fb; --heat-2: #8fb3f5; --heat-3: #4f86ec; --heat-4: #2563eb; }
:root[data-theme="dark"] { --heat-0: #26262b; --heat-1: #1e3561; --heat-2: #2b4f94; --heat-3: #4474d4; --heat-4: #6b98ff; }
.heat-legend { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 10px; font-size: .72rem; color: var(--text-3); }
.heat-legend i { width: 11px; height: 11px; border-radius: 2px; background: var(--heat-0); }
.heat-legend i[data-l="1"] { background: var(--heat-1); } .heat-legend i[data-l="2"] { background: var(--heat-2); }
.heat-legend i[data-l="3"] { background: var(--heat-3); } .heat-legend i[data-l="4"] { background: var(--heat-4); }
.heat-day { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); min-height: 120px; }
.heat-day h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; font-size: .9375rem; }
.heat-day h3 span { font-weight: 400; font-size: .8125rem; color: var(--text-3); }
.heat-day ul { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.heat-day li { display: flex; align-items: center; gap: 10px; font-size: .875rem; }
.heat-day li .kind { flex: none; padding: 0 7px; border-radius: 4px; background: var(--surface-3); color: var(--text-3); font-size: .72rem; line-height: 1.8; }
.heat-day li .dot { --nd: var(--text-3); }
.heat-day .empty { margin-top: 8px; font-size: .875rem; color: var(--text-3); }

/* Themes */
.theme-compare { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(14px, 2vw, 24px); }
.theme-compare figure { margin: 0; }
.theme-compare img { border-radius: var(--r-m); box-shadow: var(--shadow-win); }
.theme-compare figcaption { margin-top: 10px; font-size: .875rem; color: var(--text-3); }
.theme-details { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(20px, 4vw, 48px); margin-top: clamp(28px, 4vw, 44px); align-items: center; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.swatches span { display: inline-flex; align-items: center; gap: 8px; font-size: .875rem; color: var(--text-2); }
.swatches span::before { content: ""; width: 18px; height: 18px; background: var(--sw); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .12); }
.note-pair { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: center; }
.note-pair img { filter: drop-shadow(0 6px 14px rgb(0 0 0 / .14)); }

/* Download */
.section-ink { background: var(--ink-bg); color: var(--ink-text); }
.section-ink h2 { color: var(--ink-text); }
.section-ink .fine { color: var(--ink-text-2); }
.section-ink a { color: #9dbcff; }
.dl-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.dl-copy > p { margin-top: 12px; color: var(--ink-text-2); }
.dl-copy .seg { margin-top: 22px; }
.dl-copy .fine { margin-top: 10px; }
.dl-copy .text-link { margin-top: 12px; }
.seg-inverse { background: var(--ink-surface); }
.seg-inverse button { color: var(--ink-text-2); }
.seg-inverse button[aria-selected="true"] { background: #fafafa; color: #18181b; box-shadow: none; }
.platform-panels { display: grid; grid-template-columns: minmax(0, 1fr); }
.dl-panel { display: grid; grid-area: 1 / 1; grid-template-columns: minmax(0, 1fr); gap: 10px; align-self: start; }
.dl-panel[hidden] { display: none; }
.dl-file { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--r-m); background: var(--ink-surface); box-shadow: inset 0 0 0 1px var(--ink-line); color: var(--ink-text) !important; text-decoration: none; transition: box-shadow var(--t-fast); }
.dl-file:hover { box-shadow: inset 0 0 0 1px #6b6b74; }
.dl-file.primary { background: #194ccf; box-shadow: 3px 3px 0 #7b92d5; }
.dl-file.primary:hover { background: #12399d; }
.dl-file b { display: block; font-size: 1rem; }
.dl-file small { display: block; color: rgb(255 255 255 / .72); font-size: .8125rem; }
.dl-file em { font-style: normal; font-size: .8125rem; color: rgb(255 255 255 / .72); white-space: nowrap; font-variant-numeric: tabular-nums; }
.dl-file .ic { width: 20px; height: 20px; }
.brew { margin-top: 8px; }
.brew p { font-size: .875rem; color: var(--ink-text-2); margin-bottom: 8px; }
.brew .cmd + p { margin-top: 12px; }
.brew .fine { margin-bottom: 0; }
.cmd { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: var(--r-m); background: #0c101a; box-shadow: inset 0 0 0 1px var(--ink-line); }
.cmd code { flex: 1; min-width: 0; color: #e4e4e7; font-size: .85rem; padding: 6px 0; user-select: all; -webkit-user-select: all; overflow-wrap: anywhere; }
.copy-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 10px; border: 0; border-radius: var(--r-s); background: var(--ink-surface); color: var(--ink-text); font-size: .8125rem; cursor: pointer; flex: none; }
.copy-btn:hover { background: #2f2f35; }
.copy-btn.done { color: #86efac; }
.dl-panels > .text-link { margin-top: 18px; }
.dl-panels { display: grid; grid-template-columns: minmax(0, 1fr); }

/* Additional documentation */
.integration { padding-block: clamp(40px, 6vw, 72px); background: var(--bg-2); }
.integration .section-head { margin-bottom: 18px; }
.integration-demo > summary { width: fit-content; cursor: pointer; color: var(--accent); font-weight: 600; padding-block: 6px; }
.integration-demo .ai-grid { margin-top: 16px; }
.faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(20px, 4vw, 56px); }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 2px; cursor: pointer; font-weight: 600; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 9px; height: 9px; margin-right: 6px; border: solid var(--text-3); border-width: 0 1.8px 1.8px 0; transform: rotate(45deg) translateY(-3px); transition: transform var(--t-fast); flex: none; }
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.faq details p { padding: 0 2px 20px; color: var(--text-2); max-width: 44rem; }
.faq code { word-break: break-all; }

@media (prefers-reduced-motion: no-preference) {
  .dl-panel, .faq details, .integration-demo { --disclosure-duration: 180ms; }
  .dl-panel {
    transition: opacity var(--disclosure-duration), display var(--disclosure-duration) allow-discrete;
    opacity: 1;
  }
  .dl-panel[hidden] { opacity: 0; }
  @starting-style { .dl-panel { opacity: 0; } }
  :is(.faq details, .integration-demo)::details-content {
    opacity: 0;
    transition: opacity var(--disclosure-duration), content-visibility var(--disclosure-duration) allow-discrete;
  }
  :is(.faq details, .integration-demo)[open]::details-content { opacity: 1; }
}

/* Footer */
.site-foot { padding-block: 32px; border-top: 1px solid var(--line); }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.foot-brand { display: flex; align-items: center; gap: 9px; font-weight: 700; }
.foot-brand img { border-radius: 6px; }
.foot-brand .fine { font-weight: 400; margin-left: 4px; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot-nav a { color: var(--text-2); text-decoration: none; font-size: .9rem; }
.foot-nav a:hover { color: var(--text); text-decoration: underline; }

/* Guide */
.guide-hero { padding-block: clamp(44px, 7vw, 90px) clamp(34px, 5vw, 62px); border-bottom: 1px solid var(--line); background: var(--bg-2); }
.guide-hero h1 { font-size: clamp(2.65rem, 6vw, 5.75rem); letter-spacing: -.035em; text-wrap: initial; }
.guide-hero p { max-width: 37rem; margin-top: 14px; color: var(--text-2); font-size: 1.0625rem; }
.guide-layout { display: grid; grid-template-columns: minmax(12rem, 1fr) minmax(0, 3.4fr); align-items: start; gap: clamp(24px, 5vw, 78px); padding-block: clamp(32px, 5vw, 65px); }
.guide-toc { position: sticky; top: 88px; display: grid; gap: 3px; border-inline-start: 2px solid var(--desk-line); padding-inline-start: 10px; }
.guide-toc a { padding: 6px 8px; color: var(--text-2); text-decoration: none; font-size: .9rem; }
.guide-toc a:hover { color: var(--accent); background: var(--accent-soft); }
.guide-content { min-width: 0; max-width: 49rem; }
.guide-content section { padding-bottom: clamp(30px, 4vw, 50px); }
.guide-content section + section { border-top: 1px solid var(--line); padding-top: clamp(30px, 4vw, 50px); }
.guide-content h3 { margin-top: 22px; }
.guide-content :is(p, ol, ul, pre) { margin: 10px 0 0; }
.guide-content :is(p, li) { color: var(--text-2); }
.guide-content li + li { margin-top: 7px; }
.guide-content code { overflow-wrap: anywhere; }
.guide-content pre { padding: 12px 14px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); white-space: pre-wrap; user-select: text; }
.guide-content figure { margin: 18px 0 0; }
.guide-content figure img { border: 1px solid var(--line-2); }

/* Responsive */
@media (max-width: 1100px) {
  .head-nav a:nth-child(n+5) { display: none; }
}
@media (max-width: 1023px) {
  .cc-grid, .ai-grid, .data-grid, .act-grid, .dl-grid, .faq-grid { grid-template-columns: minmax(0, 1fr); }
  .exp-grid { grid-template-columns: minmax(0, 1fr); }
  .steps { position: static; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps span { display: none; }
  .steps button { padding: 10px; }
  .theme-details { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .head-nav { display: none; }
  .hero-grid, .guide-layout { grid-template-columns: minmax(0, 1fr); }
  .guide-toc { position: static; display: flex; flex-wrap: wrap; }
  .desk-shot { aspect-ratio: 16 / 11; }
  .shot-center { left: 4.5%; top: 7%; width: 82%; height: auto; }
  .shot-note { right: 5%; bottom: 10%; width: 38%; }
  .shot-capsule { left: 10%; bottom: 6%; width: 27%; }
  .shot-tab { width: 3.7%; }
  .capture-grid { grid-template-columns: minmax(0, 1fr); }
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); height: auto; }
  .app-side { border-right: 0; border-bottom: 1px solid var(--line); }
  .app-list { max-height: 230px; }
  .app-editor { min-height: 360px; padding: 18px 16px 22px; }
  .legend { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .data-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .theme-compare { grid-template-columns: minmax(0, 1fr); }
  .heat-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .heat { gap: 2px; }
  .heat-days { gap: 2px; }
  .note-pair { grid-template-columns: 110px 1fr; }
  .desk { aspect-ratio: auto; height: 400px; }
  .mini-center { width: 62%; height: 54%; top: 5%; }
  .mini-body { grid-template-columns: minmax(0, 1fr); }
  .mini-side { display: none; }
  .screen { aspect-ratio: auto; height: 300px; }
  .cc-window { left: 8%; width: 84%; }
}
@media (max-width: 520px) {
  .head-row { gap: 8px; }
  .head-github { display: none; }
  .log-chip span { display: none; }
  .log-chip { padding-right: 4px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lede { font-size: 1.0625rem; }
  .btn { flex: 1 1 auto; justify-content: center; }
  .dl-file { grid-template-columns: auto 1fr; }
  .dl-file em { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  .ed-bar i, .switch-row input::after, .faq summary::after { transition: none; }
}
