/* Open Artifacts website. Tokens follow packages/ui/src/styles.css (canvas, surface, text, accent, 6px radius);
   per-type colors come from packages/library-page/src/look.tsx and arrive as --tint / --wash / --ink. */

:root {
  --canvas: #f2f2f0;
  --bg: #fbfbfa;
  --surface: #ffffff;
  --surface-2: #f7f7f5;
  --text: #1c1c1a;
  --text-2: #4a4a46;
  --muted: #6b6b66;
  --line: rgba(28, 28, 26, 0.1);
  --line-2: rgba(28, 28, 26, 0.16);
  --accent: #2563eb;
  --accent-ink: #1d4ed8;
  --accent-wash: rgba(37, 99, 235, 0.08);
  --brand: #2f5bb7;
  --on-accent: #ffffff;
  --danger: #b42318;
  --code-bg: #f4f4f2;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.05), 0 18px 48px rgba(20, 30, 60, 0.1);
  --radius: 6px;
  --radius-lg: 12px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  --wrap: 1160px;
  --header-h: 60px;
  /* syntax */
  --hl-key: #a43a2a;
  --hl-str: #1f6f43;
  --hl-num: #8a4b00;
  --hl-kw: #5437b8;
  --hl-fn: #1757ac;
  --hl-com: #8a8a84;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #1a1a19;
    --bg: #1a1a19;
    --surface: #242423;
    --surface-2: #20201f;
    --text: #ededeb;
    --text-2: #c9c9c5;
    --muted: #a0a09a;
    --line: rgba(237, 237, 235, 0.1);
    --line-2: rgba(237, 237, 235, 0.17);
    --accent: #60a5fa;
    --accent-ink: #93c5fd;
    --accent-wash: rgba(96, 165, 250, 0.12);
    --brand: #7ea3ec;
    --on-accent: #0d1626;
    --danger: #f97066;
    --code-bg: #1f1f1e;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.3), 0 18px 48px rgba(0, 0, 0, 0.35);
    --hl-key: #f4a28c;
    --hl-str: #9fd8a8;
    --hl-num: #f2c27a;
    --hl-kw: #c3b5ff;
    --hl-fn: #8fc0ff;
    --hl-com: #85857f;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
:lang(zh-CN) body, html[lang='zh-CN'] body { line-height: 1.75; }
img, svg, video { max-width: 100%; }
svg { flex: none; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
code, pre, kbd { font-family: var(--mono); font-size: 0.875em; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.015em; margin: 0; font-weight: 650; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }
.muted { color: var(--muted); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: var(--radius); }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; letter-spacing: -0.01em; font-size: 16px; }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--brand); }
.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.main-nav a { color: var(--text-2); padding: 6px 10px; border-radius: var(--radius); font-size: 14.5px; display: inline-flex; align-items: center; gap: 6px; }
.main-nav a:hover { color: var(--text); background: var(--accent-wash); text-decoration: none; }
.main-nav a[aria-current='page'] { color: var(--text); font-weight: 600; }
.nav-gh .ver { font-family: var(--mono); font-size: 11.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 0 7px; }
.header-tools { display: flex; align-items: center; gap: 6px; }
.lang { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 14px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 99px; }
.lang:hover { color: var(--text); border-color: var(--line-2); text-decoration: none; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); color: var(--text); width: 36px; height: 36px; border-radius: var(--radius); align-items: center; justify-content: center; cursor: pointer; }
@media (max-width: 820px) {
  .menu-btn { display: inline-flex; }
  .header-row { gap: 12px; }
  .header-tools { margin-left: auto; }
  .main-nav {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
  }
  .main-nav a { padding: 12px 8px; font-size: 16px; border-radius: 0; border-bottom: 1px solid var(--line); }
  .nav-open .main-nav { display: flex; }
}

/* ---------- buttons & bits ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px;
  border-radius: var(--radius); font-weight: 600; font-size: 15px; border: 1px solid transparent;
  transition: background-color .15s, border-color .15s, transform .15s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, black); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--text-2); }
.btn-type { background: var(--ink); color: #fff; }
.btn-type:hover { background: color-mix(in srgb, var(--ink) 85%, black); }
@media (prefers-color-scheme: dark) { .btn-type { background: var(--tint); color: #111; } .btn-type:hover { background: color-mix(in srgb, var(--tint) 85%, white); } }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 550; }
.kicker { font-size: 13px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand); margin: 0 0 12px; }
:lang(zh-CN) .kicker { letter-spacing: 0.12em; }
.section-title { font-size: clamp(26px, 3.2vw, 36px); margin-bottom: 14px; }
.section-title.small { font-size: 18px; }
.section-lead { font-size: 18px; color: var(--text-2); max-width: 720px; margin-bottom: 36px; }
.section { padding: 88px 0; }
.section-tight { padding: 48px 0; }
.band { padding: 88px 0; background: var(--canvas); border-block: 1px solid var(--line); }
@media (prefers-color-scheme: dark) { .band { background: #1e1e1d; } }
@media (max-width: 600px) { .section, .band { padding: 60px 0; } .section-lead { font-size: 16.5px; } }
.badge-beta {
  display: inline-block; vertical-align: middle; margin-left: 8px; padding: 1px 7px; border-radius: 99px;
  font-size: 11px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.6;
  color: var(--ink, var(--muted)); background: color-mix(in srgb, var(--tint, #888) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--tint, #888) 35%, transparent);
}
@media (prefers-color-scheme: dark) { .badge-beta { color: color-mix(in srgb, var(--tint) 65%, white); } }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 14px; }
.chips li { font: 600 13px/1 var(--mono); padding: 8px 11px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-2); }

/* ---------- code ---------- */
.code { position: relative; margin: 0 0 1.25em; }
.code pre {
  margin: 0; padding: 14px 48px 14px 16px; overflow-x: auto; background: var(--code-bg);
  border: 1px solid var(--line); border-radius: var(--radius); line-height: 1.6; font-size: 13.5px;
}
.code pre code { font-size: inherit; background: none; padding: 0; border: 0; white-space: pre; }
.code .copy {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--muted); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; opacity: .85;
}
.code .copy:hover { color: var(--text); opacity: 1; }
.code .copy.done { color: #16a34a; border-color: #16a34a; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-built_in, .hljs-type { color: var(--hl-kw); }
.hljs-string, .hljs-regexp, .hljs-addition, .hljs-template-variable { color: var(--hl-str); }
.hljs-number, .hljs-symbol, .hljs-bullet, .hljs-meta { color: var(--hl-num); }
.hljs-attr, .hljs-attribute, .hljs-property, .hljs-name, .hljs-selector-class, .hljs-variable { color: var(--hl-key); }
.hljs-title, .hljs-title.function_, .hljs-section { color: var(--hl-fn); }
.hljs-comment, .hljs-quote, .hljs-deletion { color: var(--hl-com); font-style: italic; }

/* ---------- hero ---------- */
.hero { padding: 38px 0 0; position: relative; }
.hero::before {
  content: ''; position: absolute; inset: 0 0 auto auto; width: 62%; height: 150%; pointer-events: none; z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 9%, transparent), transparent 72%);
}
.hero-head { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); gap: 56px; align-items: end; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-2); padding: 5px 12px 5px 10px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--surface); margin-bottom: 18px; }
.eyebrow svg { color: var(--brand); }
.hero h1 { font-size: clamp(30px, 3.3vw, 44px); line-height: 1.1; letter-spacing: -0.03em; text-wrap: balance; }
:lang(zh-CN) .hero h1 { letter-spacing: -0.01em; line-height: 1.22; }
.hero-sub { font-size: 16.5px; color: var(--text-2); margin-bottom: 20px; }
.hero-privacy { display: flex; align-items: flex-start; gap: 8px; margin: 16px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.hero-privacy svg { margin-top: 3px; }
.stage-hint { display: flex; align-items: center; gap: 14px; margin: 28px auto 12px; font-size: 14px; font-weight: 550; color: var(--text-2); }
.stage-hint::before, .stage-hint::after { content: ''; flex: 1; height: 1px; background: var(--line); }
@media (max-width: 960px) {
  .hero { padding-top: 36px; }
  .hero-head { grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
  .stage-hint { margin-top: 28px; text-align: center; }
}

/* ---------- live stage (home): the playground's demos in a frame ---------- */
.stage-section { padding: 0 0 80px; }
.stage-wrap { max-width: 1320px; }
.stage {
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px;
  /* clip, not hidden: no scroll container, so the veil's label can stick to the bottom of the window. */
  overflow: hidden; overflow: clip;
  box-shadow: var(--shadow-lg); transition: box-shadow .2s, border-color .2s;
}
.stage[data-active] { border-color: color-mix(in srgb, var(--tint) 60%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tint) 22%, transparent), var(--shadow-lg); }
.stage-bar { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.stage-live { flex: none; display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.stage-live i, .stage-status i { width: 7px; height: 7px; border-radius: 50%; background: #22a55b; box-shadow: 0 0 0 3px rgba(34, 165, 91, 0.18); }
.stage-tabs { flex: 1; min-width: 0; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; padding: 2px; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
.stage-tabs::-webkit-scrollbar { display: none; }
.stage-tabs a:last-child { margin-right: 24px; }
.stage-tabs a {
  flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 6px; border-radius: 8px;
  font-size: 13.5px; font-weight: 550; color: var(--text-2); border: 1px solid transparent; white-space: nowrap;
}
.stage-tabs a:hover { color: var(--text); background: color-mix(in srgb, var(--tint) 10%, transparent); text-decoration: none; }
.stage-tabs a[aria-current='true'] { color: var(--text); font-weight: 620; background: var(--surface); border-color: color-mix(in srgb, var(--tint) 45%, transparent); box-shadow: var(--shadow); }
.stage-tab-icon { width: 23px; height: 23px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; background: var(--wash); color: var(--ink); }
@media (prefers-color-scheme: dark) { .stage-tab-icon { background: color-mix(in srgb, var(--tint) 22%, transparent); color: color-mix(in srgb, var(--tint) 70%, white); } }
.stage-open { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; font-size: 13px; font-weight: 550; color: var(--text-2); }
.stage-open:hover { color: var(--text); background: var(--accent-wash); text-decoration: none; }
.stage-again { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 13px; font-weight: 550; color: var(--text-2); cursor: pointer; }
.stage-again:hover { color: var(--text); background: var(--accent-wash); }
.stage-again[hidden] { display: none; }
.stage-view { position: relative; height: clamp(480px, 76vh, 760px); background: var(--canvas); isolation: isolate; }
.stage-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; visibility: hidden; background: var(--surface); }
.stage-frame[data-on] { visibility: visible; }
.stage-poster {
  position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 24px; text-align: center; color: var(--ink); transition: opacity .35s ease, visibility .35s;
  background:
    radial-gradient(color-mix(in srgb, var(--tint) 26%, transparent) 1px, transparent 1.4px) 0 0 / 22px 22px,
    color-mix(in srgb, var(--wash) 55%, var(--surface));
}
@media (prefers-color-scheme: dark) {
  .stage-poster { color: color-mix(in srgb, var(--tint) 62%, white); background: radial-gradient(color-mix(in srgb, var(--tint) 30%, transparent) 1px, transparent 1.4px) 0 0 / 22px 22px, color-mix(in oklab, var(--tint) 12%, var(--surface)); }
}
.stage-poster .type-icon { background: var(--surface); box-shadow: var(--shadow); margin-bottom: 8px; }
.stage-poster strong { font-size: 24px; font-weight: 680; letter-spacing: -0.015em; }
.stage-poster p { margin: 0; max-width: 460px; font-size: 15px; }
.stage-status { display: none; align-items: center; gap: 9px; margin-top: 14px !important; font-size: 13.5px !important; opacity: .85; }
.stage-status i { animation: stage-pulse 1.1s ease-in-out infinite; }
.stage-load { margin-top: 16px; }
.stage[data-state='loading'] .stage-status { display: inline-flex; }
.stage[data-state='loading'] .stage-load { display: none; }
.stage[data-state='ready'] .stage-poster { opacity: 0; visibility: hidden; pointer-events: none; }
/* Over a loaded demo until someone clicks in: the page keeps the wheel, so scrolling past the stage never gets stuck. */
.stage-veil {
  position: absolute; inset: 0; z-index: 3; display: flex; align-items: flex-end; justify-content: center; padding: 0 0 26px;
  background: none; border: 0; cursor: pointer; font: inherit; color: inherit;
}
.stage-veil[hidden] { display: none; }
.stage-veil span {
  position: sticky; bottom: 26px; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 99px;
  font-size: 14.5px; font-weight: 620; color: #fff; background: color-mix(in srgb, var(--ink) 92%, black);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.22), 0 0 0 4px color-mix(in srgb, var(--tint) 26%, transparent);
  transition: transform .15s;
}
.stage-veil:hover span { transform: translateY(-2px) scale(1.03); }
/* While the demo plays its replay, the click skips it. */
.stage-veil .stage-veil-skip, .stage[data-replay='playing'] .stage-veil .stage-veil-try { display: none; }
.stage[data-replay='playing'] .stage-veil .stage-veil-skip { display: inline-flex; bottom: 80px; }
.stage[data-replay='playing'] .stage-veil { padding-bottom: 80px; }
.stage-veil-skip i { width: 8px; height: 8px; border-radius: 50%; background: #ff6b5e; animation: stage-rec 1.2s ease-in-out infinite; }
@keyframes stage-rec { 50% { opacity: .25; } }
.stage-veil:focus-visible { outline: none; }
.stage-veil:focus-visible span { outline: 2px solid var(--accent); outline-offset: 3px; }
.stage-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--surface-2); font-size: 13px; color: var(--muted); }
.stage-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding: 0; counter-reset: st; }
.stage-steps li { counter-increment: st; position: relative; padding-left: 26px; }
.stage-steps li::before { content: counter(st); position: absolute; left: 0; top: 50%; margin-top: -9px; width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font: 650 11px/1 var(--mono); background: var(--accent-wash); color: var(--accent-ink); }
.stage-steps b { color: var(--text); font-weight: 620; margin-right: .3em; }
:lang(zh-CN) .stage-steps b { margin-right: 0; }
@keyframes stage-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .stage-status i, .stage-veil-skip i { animation: none; } .stage-poster, .stage-veil span { transition: none; } }
@media (max-width: 760px) {
  .stage-section { padding-bottom: 56px; }
  .stage { border-radius: 12px; }
  .stage-bar { padding-left: 10px; gap: 6px; }
  .stage-live, .stage-open span, .stage-again span { display: none; }
  .stage-view { height: clamp(420px, 68vh, 620px); }
  .stage-note { display: none; }
  .stage-steps { flex-direction: column; gap: 6px; }
  .stage-steps li::before { top: 2px; margin-top: 0; }
}

/* ---------- how it works: the lead beside the demo video ---------- */
.how-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr); gap: 48px; align-items: center; margin-bottom: 44px; }
.how-head .section-title { text-wrap: balance; }
.how-head .section-lead { margin-bottom: 0; }
.how-video { margin: 0; scroll-margin-top: calc(var(--header-h) + 24px); }
.video-frame {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; background: #111; aspect-ratio: 16 / 10;
  box-shadow: var(--shadow-lg); border: 1px solid var(--line-2);
}
.video-frame video { display: block; width: 100%; height: 100%; object-fit: cover; background: #111; }
.how-video figcaption { font-size: 13.5px; color: var(--muted); margin-top: 12px; }
@media (max-width: 900px) { .how-head { grid-template-columns: minmax(0, 1fr); gap: 28px; } }

/* ---------- loop diagram ---------- */
.loop { margin: 0; }
.loop-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; counter-reset: s; }
.loop-step {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 20px 18px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.loop-step:not(:last-child)::after {
  content: ''; position: absolute; top: 34px; right: -23px; width: 18px; height: 2px; background: var(--line-2);
}
.loop-step:not(:last-child)::before {
  content: ''; position: absolute; top: 30px; right: -24px; width: 8px; height: 8px;
  border-top: 2px solid var(--line-2); border-right: 2px solid var(--line-2); transform: rotate(45deg);
}
.loop-n { width: 26px; height: 26px; border-radius: 99px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-wash); color: var(--accent-ink); font: 650 13px/1 var(--mono); margin-bottom: 14px; }
.loop-step h3 { font-size: 16.5px; margin-bottom: 6px; }
.loop-step p { font-size: 14.5px; color: var(--text-2); margin-bottom: 14px; flex: 1; }
.loop-step code { display: block; font-size: 12px; color: var(--text-2); background: var(--code-bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 7px 9px; overflow-wrap: anywhere; }
.loop-back { margin-top: 0; }
/* A U-shaped dashed line from step 4 back to step 2, with an arrowhead pointing up into step 2. */
.loop-u {
  position: relative; height: 34px;
  margin-left: calc((100% - 84px) / 4 * 1.5 + 28px);
  margin-right: calc((100% - 84px) / 8);
  border: 2px dashed var(--accent); border-top: 0; border-radius: 0 0 14px 14px;
}
.loop-u::before {
  content: ''; position: absolute; left: -6px; top: -2px; width: 0; height: 0;
  border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 9px solid var(--accent);
}
.loop-back-label { margin: 12px 0 0 calc((100% - 84px) / 4 * 1.5 + 28px); font-size: 14.5px; color: var(--text-2); }
.loop-back-label strong { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-ink); margin-right: 4px; }
@media (max-width: 900px) {
  .loop-steps { grid-template-columns: 1fr 1fr; }
  .loop-step:nth-child(2)::after, .loop-step:nth-child(2)::before { display: none; }
  .loop-back { margin: 18px 0 0; }
  .loop-u { display: none; }
  .loop-back-label { margin: 0; border: 1.5px dashed var(--accent); border-radius: var(--radius-lg); padding: 12px 14px; }
  .loop-back-label strong { display: flex; margin-bottom: 2px; }
}
@media (max-width: 560px) {
  .loop-steps { grid-template-columns: 1fr; gap: 22px; }
  .loop-step::after, .loop-step::before { display: none; }
  .loop-step:not(:last-child)::after { display: block; top: auto; bottom: -18px; right: auto; left: 30px; width: 2px; height: 14px; }
}

/* ---------- type cards ---------- */
.type-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 960px) { .type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .type-grid { grid-template-columns: 1fr; } }
.type-card {
  --card: var(--wash);
  position: relative; display: flex; flex-direction: column; border-radius: var(--radius-lg);
  background: var(--card); color: var(--ink); overflow: hidden; border: 1px solid color-mix(in srgb, var(--tint) 22%, transparent);
  transition: transform .18s ease, box-shadow .18s ease;
}
.type-card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px color-mix(in srgb, var(--tint) 22%, transparent); }
@media (prefers-color-scheme: dark) {
  .type-card { --card: color-mix(in oklab, var(--tint) 15%, var(--surface)); color: color-mix(in srgb, var(--tint) 62%, white); border-color: color-mix(in srgb, var(--tint) 28%, transparent); }
}
.type-card-main { display: flex; flex-direction: column; gap: 10px; padding: 22px 22px 18px; color: inherit; flex: 1; }
.type-card-main:hover { text-decoration: none; }
.type-icon { width: 42px; height: 42px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--ink); }
@media (prefers-color-scheme: dark) { .type-icon { background: color-mix(in srgb, var(--tint) 22%, transparent); color: color-mix(in srgb, var(--tint) 70%, white); } }
.type-icon.sm { width: 26px; height: 26px; border-radius: 7px; }
.type-icon.lg { width: 56px; height: 56px; border-radius: 14px; }
.type-card-name { font-size: 19px; font-weight: 680; letter-spacing: -0.01em; color: var(--ink); }
@media (prefers-color-scheme: dark) { .type-card-name { color: #fff; } }
.type-card-line { font-size: 14.5px; line-height: 1.55; color: color-mix(in srgb, var(--ink) 88%, black); }
@media (prefers-color-scheme: dark) { .type-card-line { color: color-mix(in srgb, var(--tint) 30%, #e8e8e6); } }
.type-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 22px; border-top: 1px solid color-mix(in srgb, var(--tint) 22%, transparent); font-size: 13px; }
.type-exports { font-family: var(--mono); font-size: 12px; opacity: .8; }
.type-try { display: inline-flex; align-items: center; gap: 5px; font-weight: 650; color: var(--ink); white-space: nowrap; }
@media (prefers-color-scheme: dark) { .type-try { color: color-mix(in srgb, var(--tint) 60%, white); } }

/* ---------- why ---------- */
.why-grid { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.why-item { background: var(--surface); padding: 26px 24px; }
.why-item:last-child { grid-column: 1 / -1; }
.why-icon { width: 36px; height: 36px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-wash); color: var(--accent-ink); margin-bottom: 14px; }
.why-item h3 { font-size: 16.5px; margin-bottom: 8px; }
.why-item p { font-size: 14.5px; color: var(--text-2); margin: 0; }

/* ---------- apps ---------- */
.app-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.app-grid a { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); height: 100%; }
.app-grid a:hover { border-color: var(--line-2); text-decoration: none; box-shadow: var(--shadow); }
.app-grid strong { font-weight: 620; }
.app-grid span { font-size: 13.5px; color: var(--muted); }

/* ---------- install ---------- */
.install-wrap { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 48px; align-items: start; }
@media (max-width: 960px) { .install-wrap { grid-template-columns: minmax(0, 1fr); } }
.install-links { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.prompts-label { font-weight: 600; margin: 24px 0 10px; }
.tabs { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; min-width: 0; }
.tab-list { display: flex; gap: 2px; padding: 8px; overflow-x: auto; border-bottom: 1px solid var(--line); background: var(--surface-2); scrollbar-width: thin; }
.tab-list [role=tab] {
  flex: none; font: inherit; font-size: 13.5px; font-weight: 550; color: var(--text-2); background: none; border: 1px solid transparent;
  padding: 7px 11px; border-radius: var(--radius); cursor: pointer; white-space: nowrap;
}
.tab-list [role=tab]:hover { color: var(--text); background: var(--accent-wash); }
.tab-list [role=tab][aria-selected='true'] { color: var(--text); background: var(--surface); border-color: var(--line-2); box-shadow: var(--shadow); }
html:not(.js) .tab-list { display: none; }
.tab-panel { padding: 22px 22px 8px; }
html.js .tab-panel[data-hidden] { display: none; }
html:not(.js) .tab-panel + .tab-panel { border-top: 1px solid var(--line); }
.tab-panel-title { font-size: 17px; margin-bottom: 12px; }
.tab-panel-title small { font-weight: 450; color: var(--muted); font-size: 14px; margin-left: 6px; }
.steps { margin: 0 0 16px; padding-left: 22px; color: var(--text-2); }
.steps li { margin-bottom: 6px; }
.app-guide { font-size: 14px; }
.app-guide a { display: inline-flex; align-items: center; gap: 6px; }
.big-steps { list-style: none; margin: 0; padding: 0; counter-reset: bs; max-width: 860px; }
.big-steps > li { position: relative; padding: 0 0 40px 56px; counter-increment: bs; }
.big-steps > li::before {
  content: counter(bs); position: absolute; left: 0; top: -2px; width: 34px; height: 34px; border-radius: 99px;
  display: flex; align-items: center; justify-content: center; font: 650 14px/1 var(--mono); background: var(--accent); color: var(--on-accent);
}
.big-steps > li:not(:last-child)::after { content: ''; position: absolute; left: 16px; top: 40px; bottom: 6px; width: 2px; background: var(--line); }
.big-steps h2 { font-size: 22px; margin-bottom: 10px; }
.big-steps p { color: var(--text-2); }
@media (max-width: 600px) { .big-steps > li { padding-left: 46px; } }
.apps-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius-lg); overflow: hidden; }
.apps-table th, .apps-table td { text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.apps-table thead th { font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface-2); }
.apps-table tbody th { width: 28%; font-weight: 600; }
.apps-table tbody th small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.apps-table code.block { display: block; margin-top: 8px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12.5px; background: var(--code-bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); gap: 36px; } }

/* ---------- page heads ---------- */
.page-head { padding: 64px 0 8px; }
.page-head h1 { font-size: clamp(32px, 4.2vw, 46px); letter-spacing: -0.025em; margin-bottom: 16px; }
.crumbs { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.crumbs code { font-size: 12.5px; }
.choose-grid { list-style: none; margin: 24px 0 28px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.choose-grid li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; }
.choose-grid h3 { font-size: 16px; margin-bottom: 6px; }
.choose-grid p { margin: 0; color: var(--text-2); font-size: 14.5px; }
@media (max-width: 400px) { .choose-grid { grid-template-columns: 1fr; } }

/* ---------- type page ---------- */
.type-hero { background: var(--wash); color: var(--ink); padding: 56px 0 64px; border-bottom: 1px solid color-mix(in srgb, var(--tint) 25%, transparent); position: relative; overflow: hidden; }
@media (prefers-color-scheme: dark) { .type-hero { background: color-mix(in oklab, var(--tint) 14%, var(--bg)); color: color-mix(in srgb, var(--tint) 55%, white); } }
.type-hero .crumbs, .type-hero .crumbs a { color: inherit; opacity: .8; }
.type-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 40px; align-items: center; }
.type-hero h1 { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; font-size: clamp(36px, 5vw, 56px); letter-spacing: -0.03em; margin-bottom: 18px; color: var(--ink); }
@media (prefers-color-scheme: dark) { .type-hero h1 { color: #fff; } }
.type-hero h1 .badge-beta { font-size: 13px; margin-left: 0; }
.type-hero .type-icon { background: color-mix(in srgb, #fff 60%, transparent); }
.type-tagline { font-size: 20px; font-weight: 550; line-height: 1.45; max-width: 680px; margin-bottom: 14px; }
.type-summary { font-size: 16.5px; max-width: 680px; color: color-mix(in srgb, currentColor 85%, transparent); margin-bottom: 26px; }
.type-hero .btn-ghost { background: color-mix(in srgb, var(--surface) 75%, transparent); border-color: color-mix(in srgb, var(--tint) 35%, transparent); }
.beta-note { font-size: 13.5px; margin: 16px 0 0; opacity: .8; }
.type-hero-art { color: var(--tint); opacity: .55; display: flex; justify-content: center; }
.type-hero-art svg { width: 220px; height: 220px; }
.type-hero-art svg [stroke] { stroke-width: 1.1; }
@media (max-width: 760px) { .type-hero-grid { grid-template-columns: 1fr; } .type-hero-art { display: none; } }
.feature-grid { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
@media (max-width: 400px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-grid li { padding: 22px 22px 20px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--tint); }
.feature-grid h3 { font-size: 16.5px; margin-bottom: 8px; }
.feature-grid p { margin: 0; color: var(--text-2); font-size: 14.5px; }
.tree { margin: 0; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--tint); border-radius: var(--radius-lg); overflow-x: auto; font-size: 13.5px; line-height: 1.75; }
.tree code { font-size: inherit; }
.tree-rule { color: var(--muted); opacity: .7; }
.tree-note { color: var(--muted); }
.type-side .section-title { font-size: 22px; margin-top: 4px; }
.type-side .section-title + * { margin-top: 0; }
.type-side > .section-title:not(:first-child) { margin-top: 30px; }
.ds-note { display: flex; align-items: center; gap: 8px; color: #865400; }
@media (prefers-color-scheme: dark) { .ds-note { color: #e6c26a; } }
.type-links { display: flex; flex-wrap: wrap; gap: 18px; }
.other-types { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.other-types a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 14px; font-weight: 550; }
.other-types a:hover { border-color: var(--tint); text-decoration: none; }
.other-types .type-icon { background: var(--wash); }
@media (prefers-color-scheme: dark) { .other-types .type-icon { background: color-mix(in srgb, var(--tint) 22%, transparent); } }

/* ---------- CTA band ---------- */
.cta-band { padding: 96px 0; text-align: center; }
.cta-band-inner { display: flex; flex-direction: column; align-items: center; }
.cta-mark { color: var(--brand); margin-bottom: 18px; }
.cta-band h2 { font-size: clamp(26px, 3.4vw, 38px); margin-bottom: 10px; text-wrap: balance; }
.cta-band p { color: var(--muted); margin-bottom: 26px; }
.cta-band .cta-row { justify-content: center; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 28px; background: var(--surface-2); font-size: 14.5px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.footer-brand p { color: var(--muted); margin-top: 12px; max-width: 300px; }
.site-footer h2 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 14px; font-weight: 650; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer li a { color: var(--text-2); }
.footer-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; }
.footer-legal { display: flex; gap: 16px; }
.footer-legal a { color: var(--muted); }
.legal-missing { background: color-mix(in srgb, #c79a1b 28%, transparent); color: inherit; border-radius: 3px; padding: 0 3px; font-family: var(--mono, ui-monospace, monospace); font-size: .92em; }
.legal-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.legal-list a { font-weight: 600; }
.legal-list p { margin: 2px 0 0; color: var(--text-2); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- 404 ---------- */
.not-found { padding: 120px 0; text-align: center; }
.not-found .cta-row { justify-content: center; margin-top: 28px; }
.nf-code { font: 700 72px/1 var(--mono); color: var(--brand); opacity: .35; margin-bottom: 18px; }
.not-found h1 { font-size: 30px; margin-bottom: 16px; }
.not-found p { color: var(--text-2); }

/* ---------- docs ---------- */
.docs-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr) 210px; gap: 44px; padding-top: 28px; padding-bottom: 80px; align-items: start; max-width: 1320px; }
.docs-sidebar { position: sticky; top: calc(var(--header-h) + 20px); max-height: calc(100vh - var(--header-h) - 40px); display: flex; }
.docs-nav-toggle { width: 100%; display: flex; flex-direction: column; min-height: 0; }
.docs-nav-toggle > summary { display: none; }
.docs-nav { overflow-y: auto; padding-right: 8px; font-size: 14px; scrollbar-width: thin; }
.nav-group { margin-bottom: 10px; }
.nav-group > summary { cursor: pointer; list-style: none; font-size: 12.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 6px 8px; }
:lang(zh-CN) .nav-group > summary { letter-spacing: .1em; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary::after { content: '▸'; float: right; font-size: 10px; transition: transform .15s; }
.nav-group[open] > summary::after { transform: rotate(90deg); }
.nav-group ul { list-style: none; margin: 2px 0 8px; padding: 0; }
.nav-group a { display: block; padding: 5px 10px; border-radius: var(--radius); color: var(--text-2); line-height: 1.4; }
.nav-group a.mono { font-family: var(--mono); font-size: 12.5px; }
.nav-group a:hover { background: var(--accent-wash); color: var(--text); text-decoration: none; }
.nav-group a[aria-current='page'] { background: var(--accent-wash); color: var(--accent-ink); font-weight: 600; }
.docs-toc { position: sticky; top: calc(var(--header-h) + 28px); max-height: calc(100vh - var(--header-h) - 56px); overflow-y: auto; font-size: 13px; }
.toc p { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 10px; }
.toc ul { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.toc li a { display: block; padding: 4px 0 4px 12px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); line-height: 1.4; }
.toc li.d3 a { padding-left: 24px; }
.toc li a:hover { color: var(--text); text-decoration: none; }
.toc li a.on { color: var(--accent-ink); border-left-color: var(--accent); }
@media (max-width: 1200px) { .docs-layout { grid-template-columns: 240px minmax(0, 1fr); } .docs-toc { display: none; } }
@media (max-width: 960px) {
  .docs-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 16px; }
  .docs-sidebar { position: static; max-height: none; }
  .docs-nav-toggle { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
  .docs-nav-toggle > summary { display: flex; align-items: center; gap: 8px; padding: 12px 14px; cursor: pointer; font-size: 14.5px; font-weight: 600; list-style: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .docs-nav-toggle > summary::-webkit-details-marker { display: none; }
  .docs-nav-toggle[open] > summary { border-bottom: 1px solid var(--line); }
  .docs-nav { padding: 10px; max-height: 60vh; }
}
.doc { min-width: 0; max-width: 780px; }
.doc-title { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -0.025em; margin-bottom: 14px; }
.doc-title code { font-size: .8em; }
.doc-lead { font-size: 17px; color: var(--text-2); }
.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius-lg); border: 1px solid var(--line-2); background: var(--surface); font-size: 14.5px; margin: 0 0 24px; }
.callout p { margin: 4px 0 0; color: var(--text-2); }
.callout-agents { border-color: color-mix(in srgb, var(--accent) 35%, transparent); background: var(--accent-wash); }
.callout-agents > svg { color: var(--brand); margin-top: 2px; }
.callout-links { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.callout-links a { display: inline-flex; align-items: center; gap: 4px; }
.callout-note { background: color-mix(in srgb, #c79a1b 10%, var(--surface)); border-color: color-mix(in srgb, #c79a1b 40%, transparent); display: block; }
.doc-foot { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line); }
.doc-source { display: flex; flex-wrap: wrap; gap: 20px; font-size: 14px; }
.doc-source a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.doc-source a:hover { color: var(--text); }
.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; }
.pn { display: flex; flex-direction: column; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); color: var(--text); background: var(--surface); }
.pn:hover { border-color: var(--accent); text-decoration: none; }
.pn small { color: var(--muted); font-size: 12.5px; }
.pn span { font-weight: 600; }
.pn.next { text-align: right; grid-column: 2; }
@media (max-width: 560px) { .prev-next { grid-template-columns: 1fr; } .pn.next { grid-column: 1; } }

/* prose (rendered markdown) */
.prose { font-size: 16px; color: var(--text); overflow-wrap: break-word; }
.prose h2 { font-size: 24px; margin: 2.1em 0 .7em; padding-top: .3em; }
.prose h3 { font-size: 19px; margin: 1.8em 0 .6em; }
.prose h4 { font-size: 16px; margin: 1.6em 0 .5em; }
.prose h2:first-child, .prose h3:first-child { margin-top: .5em; }
.prose .anchor { float: left; margin-left: -0.95em; padding-right: .25em; color: var(--muted); opacity: 0; font-weight: 400; text-decoration: none; }
.prose h2:hover .anchor, .prose h3:hover .anchor, .prose h4:hover .anchor { opacity: .7; }
.prose p, .prose ul, .prose ol, .prose blockquote { margin: 0 0 1.05em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: .3em 0; }
.prose li > ul, .prose li > ol { margin: .3em 0; }
.prose :not(pre) > code { background: var(--code-bg); border: 1px solid var(--line); border-radius: 4px; padding: .08em .35em; font-size: .86em; overflow-wrap: anywhere; }
.prose a code { color: inherit; }
.prose blockquote { border-left: 3px solid var(--accent); background: var(--accent-wash); padding: 10px 16px; border-radius: 0 var(--radius) var(--radius) 0; color: var(--text-2); }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose img { border-radius: var(--radius); }
.table-wrap { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--line); border-radius: var(--radius); }
.prose table { border-collapse: collapse; width: 100%; font-size: 14px; line-height: 1.5; }
.prose th, .prose td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--surface-2); font-weight: 620; white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }
.prose td code { white-space: normal; }
.prose input[type=checkbox] { margin-right: 6px; }

.prompts pre code { white-space: pre-wrap; overflow-wrap: anywhere; }
.prompts pre { padding-right: 48px; }
.split-type { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
@media (max-width: 860px) { .split-type { grid-template-columns: minmax(0, 1fr); } }

/* Works with: the agent apps, one row under the live stage. */
.works-with { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 10px 18px; margin-top: -36px; padding-bottom: 8px; text-align: center; }
.works-with-label { margin: 0; font-size: 13px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
:lang(zh-CN) .works-with-label { letter-spacing: 0.12em; }
.works-with-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; font-size: 15.5px; font-weight: 620; color: var(--text-2); }
.works-with-more { font-weight: 450; }
.works-with-more a { color: var(--muted); }
@media (max-width: 600px) { .works-with { margin-top: -24px; } .works-with-list { gap: 6px 16px; font-size: 14.5px; } }

/* Open by design: four pillars, each with a small picture of what it means. */
#open { padding-top: 72px; }
.pillar-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .pillar-grid { grid-template-columns: minmax(0, 1fr); } }
.pillar { min-width: 0; display: flex; flex-direction: column; padding: 28px 28px 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.pillar h3 { font-size: 19px; margin-bottom: 8px; }
.pillar > p { font-size: 15px; color: var(--text-2); margin: 0 0 20px; }
.pillar .text-link { margin-top: 18px; align-self: flex-start; font-size: 14.5px; }
.pillar-art { margin-top: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--canvas); padding: 16px; font-size: 13px; min-height: 172px; }
@media (prefers-color-scheme: dark) { .pillar-art { background: #1e1e1d; } }

.pa-agents { display: grid; grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr); align-items: center; }
.pa-apps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pa-apps li { padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-weight: 560; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pa-wire { align-self: stretch; margin: 14px 0; border: 1.5px dashed var(--line-2); border-left: 0; border-radius: 0 10px 10px 0; width: 18px; position: relative; }
.pa-wire::after { content: ''; position: absolute; top: 50%; left: 16px; width: 20px; border-top: 1.5px dashed var(--line-2); }
.pa-hub { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 12px; border-radius: 10px; background: var(--accent-wash); color: var(--accent-ink); text-align: center; }
.pa-hub strong { font-size: 13.5px; color: var(--text); }
.pa-hub span { font-size: 12.5px; color: var(--muted); }

.pa-local { font-family: var(--mono); font-size: 12.5px; }
.pa-root { display: flex; align-items: center; gap: 7px; margin: 0 0 8px; font-weight: 600; }
.pa-root em { margin-left: auto; font-style: normal; font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: var(--accent-wash); color: var(--accent-ink); }
.pa-tree { list-style: none; margin: 0; padding: 0 0 0 10px; border-left: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 5px; }
.pa-tree li { display: flex; align-items: center; gap: 7px; padding-left: 10px; color: var(--text-2); }
.pa-tree .pa-dir { color: var(--text); font-weight: 600; margin-top: 3px; }
.pa-tree .pa-file { padding-left: 28px; }
.pa-tree svg { flex: none; color: var(--muted); }

.pa-presence { display: flex; align-items: center; margin-bottom: 12px; }
.pa-presence .pa-avatar { margin-right: -6px; border: 2px solid var(--canvas); }
.pa-presence i { margin-left: 14px; width: 8px; height: 8px; border-radius: 50%; background: #22a35a; box-shadow: 0 0 0 3px rgba(34, 163, 90, 0.18); }
.pa-avatar { flex: none; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 650; color: #fff; background: #8a6d3b; }
.pa-presence .pa-avatar:nth-child(2), .pa-thread li:nth-child(1) .pa-avatar { background: #c2562b; }
.pa-presence .pa-avatar:nth-child(3), .pa-thread li:nth-child(3) .pa-avatar { background: #2f7d5b; }
.pa-avatar.pa-agent, .pa-agent .pa-avatar { background: var(--accent); color: var(--on-accent); }
.pa-thread { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pa-thread li { display: flex; gap: 9px; align-items: flex-start; }
.pa-thread p { margin: 0; padding: 7px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); line-height: 1.45; }
.pa-thread b { display: block; font-size: 12px; font-weight: 650; }
.pa-thread .pa-agent p { border-color: color-mix(in srgb, var(--accent) 35%, transparent); background: var(--accent-wash); }

.pa-host { display: flex; flex-direction: column; gap: 12px; }
.pa-options { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pa-options li { display: flex; flex-direction: column; gap: 3px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.pa-options b { font-size: 13px; }
.pa-options span { font-size: 12px; color: var(--muted); line-height: 1.4; }
.pa-host code { display: block; padding: 9px 12px; border-radius: 8px; background: var(--code-bg); font-family: var(--mono); font-size: 12px; overflow-x: auto; white-space: nowrap; }
@media (max-width: 520px) {
  .pillar { padding: 22px 18px 20px; }
  .pa-options { grid-template-columns: 1fr; }
  .pa-agents { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .pa-apps { flex-direction: row; flex-wrap: wrap; }
  .pa-wire { display: none; }
  .pa-tree { overflow-x: auto; }
}

/* "Also in the box": three items, one row. */
.why-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.why-item:last-child { grid-column: auto; }

/* Tab strips (site.js): the tabs that do not fit go into a list behind ▾ at the end of the row, as in the app. */
html.js .strip { overflow: visible; -webkit-mask-image: none; mask-image: none; scrollbar-width: none; }
html.js .stage-tabs a:last-child { margin-right: 0; }
.strip > [hidden] { display: none !important; }
.strip-more { flex: none; margin-left: auto; display: inline-flex; align-items: center; gap: 3px; padding: 0 8px; min-height: 30px; border: 1px solid transparent; border-radius: 8px; background: none; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.strip-more:hover, .strip-more[aria-expanded='true'] { color: var(--text); background: var(--accent-wash); }
.strip-menu { position: fixed; z-index: 60; min-width: 200px; max-width: min(320px, calc(100vw - 16px)); overflow-y: auto; padding: 5px; display: flex; flex-direction: column; gap: 1px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow-lg); }
.strip-menu [role=menuitem] { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 9px; border: 0; border-radius: 7px; background: none; font: inherit; font-size: 13.5px; color: var(--text); text-align: left; cursor: pointer; }
.strip-menu [role=menuitem]:hover, .strip-menu [role=menuitem]:focus-visible { background: var(--accent-wash); outline: none; }
.strip-menu [role=menuitem] > span { display: flex; flex-direction: column; min-width: 0; }
.strip-menu b { font-weight: 560; }
.strip-menu small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip-menu .stage-tab-icon { flex: none; }

/* ---------- header account slot (chrome.mjs, site.js) ---------- */
/* A fixed width, so the answer of /account/session moves nothing else in the header. */
.account { flex: none; width: 9rem; display: flex; justify-content: flex-end; }
html.js .account[data-state='unknown'] > * { visibility: hidden; }
.account:not([data-state='in']) .account-menu { display: none; }
.account[data-state='in'] .account-signin { display: none; }
.account-signin, .account-menu > summary {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 34px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 99px; color: var(--text-2); font-size: 14px; white-space: nowrap;
}
.account-signin:hover, .account-menu > summary:hover, .account-menu[open] > summary { color: var(--text); border-color: var(--line-2); text-decoration: none; }
.account-menu { position: relative; min-width: 0; max-width: 100%; }
.account-menu > summary { list-style: none; cursor: pointer; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-name { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.account-pop {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 190px; padding: 6px;
  display: flex; flex-direction: column; gap: 1px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow-lg);
}
.account-pop [hidden] { display: none; }
.account-pop a, .account-pop button {
  display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 7px; background: none;
  font: inherit; font-size: 14.5px; color: var(--text); text-align: left; cursor: pointer;
}
.account-pop a:hover, .account-pop button:hover { background: var(--accent-wash); text-decoration: none; }
.account-pop form { margin: 4px 0 0; padding-top: 4px; border-top: 1px solid var(--line); }
/* Narrower windows: the slot is an icon button in both states. */
@media (max-width: 1020px) {
  .account { width: 36px; }
  .account-signin, .account-menu > summary { width: 36px; height: 36px; padding: 0; justify-content: center; border-radius: var(--radius); }
  .account-signin span, .account-menu > summary span, .account-menu > summary svg + span + svg { display: none; }
}

/* ---------- account pages (share service: sign-in, device approval, artifacts, account settings, report, admin) ---------- */
.acct { padding-top: 44px; padding-bottom: 88px; max-width: 920px; }
.acct h1 { font-size: clamp(26px, 3vw, 32px); margin-bottom: 10px; }
.acct h2 { font-size: 18px; margin: 0 0 14px; }
.acct-lead { color: var(--text-2); margin-bottom: 28px; max-width: 640px; }
.acct-narrow { max-width: 520px; }
.acct-section { margin-top: 44px; }
.acct-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.acct-section-head h2 { margin: 0; }
.acct-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 24px; }
.acct-card + .acct-card { margin-top: 16px; }
.acct-card > :last-child { margin-bottom: 0; }
.acct-stack { display: flex; flex-direction: column; gap: 10px; }
.acct-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.acct-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; }
.acct form { margin: 0; }
.acct label { display: block; font-weight: 600; font-size: 14.5px; margin: 16px 0 6px; }
.acct label.acct-check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; margin: 0; }
.acct label.acct-check input { margin-top: 5px; }
.acct input[type=text], .acct input[type=email], .acct input[type=search], .acct select, .acct textarea {
  width: 100%; font: inherit; font-size: 15px; padding: 9px 12px; color: var(--text);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius);
}
.acct input:focus-visible, .acct select:focus-visible, .acct textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.acct textarea { min-height: 120px; resize: vertical; }
.acct button.btn { font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; }
.acct button.btn-sm { font-size: 14px; }
.btn-danger { background: var(--surface); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 8%, var(--surface)); border-color: var(--danger); }
.btn-danger.btn-solid { background: var(--danger); color: var(--bg); border-color: var(--danger); }
.btn-wide { width: 100%; justify-content: center; }
.acct-note { padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--surface-2); font-size: 14.5px; margin: 0 0 18px; }
.acct-note-warn { background: color-mix(in srgb, #c79a1b 10%, var(--surface)); border-color: color-mix(in srgb, #c79a1b 40%, transparent); }
.acct-note-error { background: color-mix(in srgb, var(--danger) 8%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.acct-code { font: 600 30px/1.2 var(--mono); letter-spacing: .14em; margin: 4px 0 18px; padding: 14px 16px; text-align: center; background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.acct-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0 0 18px; font-size: 15px; }
.acct-facts dt { color: var(--muted); }
.acct-facts dd { margin: 0; overflow-wrap: anywhere; }
.acct-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 24px 0 4px; }
.acct-divider::before, .acct-divider::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 12.5px; font-weight: 600; white-space: nowrap; border: 1px solid var(--line-2); color: var(--text-2); background: var(--surface-2); }
.pill-live { color: #1f6f43; border-color: color-mix(in srgb, #1f6f43 35%, transparent); background: color-mix(in srgb, #1f6f43 8%, var(--surface)); }
.pill-warn { color: #8a5a00; border-color: color-mix(in srgb, #c79a1b 45%, transparent); background: color-mix(in srgb, #c79a1b 10%, var(--surface)); }
.pill-off { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); background: color-mix(in srgb, var(--danger) 7%, var(--surface)); }
@media (prefers-color-scheme: dark) { .pill-live { color: #9fd8a8; } .pill-warn { color: #e6c26a; } }

/* Account settings */
.acct-section-first { margin-top: 28px; }
.usage { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 8px; }
.usage-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 18px; }
.usage-label { color: var(--muted); font-size: 13.5px; margin-bottom: 4px; }
.usage-value { font-size: 18px; font-weight: 650; margin-bottom: 10px; }
.usage-value small { font-size: 14px; font-weight: 500; color: var(--muted); }
.usage meter { display: block; width: 100%; height: 8px; accent-color: var(--accent); }
.device-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.device-item { padding: 18px 20px; border-top: 1px solid var(--line); }
.device-item:first-child { border-top: 0; }
.share-title { font-weight: 650; font-size: 16px; overflow-wrap: anywhere; }
.device-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.device-name { font-weight: 600; }
.device-meta { color: var(--muted); font-size: 13.5px; }
.empty { text-align: center; padding: 40px 24px; background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--radius-lg); }
.empty h2, .empty h3 { font-size: 17px; margin-bottom: 8px; }
.empty p { color: var(--text-2); max-width: 520px; margin: 0 auto 6px; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.danger-zone p { margin: 0; color: var(--text-2); }
.signin-card { max-width: 440px; }
.signin-card .acct-stack .btn { justify-content: center; }
/* Admin */
.report-item h3 { font-size: 16px; margin-bottom: 6px; }
.report-meta { color: var(--muted); font-size: 13.5px; margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.admin-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.admin-controls .acct-row input { width: auto; flex: 1; min-width: 200px; }
@media (max-width: 600px) {
  .acct { padding-top: 28px; }
  .usage { grid-template-columns: 1fr; }
  .acct-card { padding: 18px; }
  .device-item { padding: 16px; }
}

/* Artifacts: the shares of the signed-in person as cards or a table (share/api/src/artifacts.ts, assets/artifacts.js).
   Type colors arrive as .tc-<type> classes (--tint, --wash, --ink), since these pages allow no style attribute. */
.acct-wide { max-width: var(--wrap); }
.acct [hidden] { display: none !important; }
.art-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.art-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 10px 24px; margin-bottom: 24px; }
.art-head .acct-lead { margin-bottom: 0; }
.art-usage { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: 13.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.art-usage:hover { color: var(--text); border-color: var(--line-2); text-decoration: none; }
.art-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 20px; }
.acct .art-search { flex: 1 1 220px; width: auto; max-width: 360px; height: 38px; padding: 0 12px; font-size: 14.5px; }
.acct .art-type { width: auto; height: 38px; padding: 0 30px 0 10px; font-size: 14.5px; }
.art-views { display: inline-flex; margin-left: auto; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); }
.art-views button { width: 38px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 0; }
.art-views button:first-child { border-radius: 5px 0 0 5px; }
.art-views button:last-child { border-radius: 0 5px 5px 0; border-left: 1px solid var(--line-2); }
.art-views button:hover { color: var(--text); }
.art-views button[aria-pressed='true'] { color: var(--text); background: var(--accent-wash); }
.art-views button:focus-visible { outline-offset: -2px; }

.art-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 960px) { .art-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
@media (max-width: 600px) { .art-grid { grid-template-columns: minmax(0, 1fr); } }
.art-card { position: relative; min-width: 0; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; }
.art-card:hover { border-color: var(--line-2); box-shadow: var(--shadow-lg); }
.art-card:has(.art-title a:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.art-thumb { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 11px 11px 0 0; border-bottom: 1px solid var(--line); }
.art-tile {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--ink);
  background: radial-gradient(color-mix(in srgb, var(--tint) 24%, transparent) 1px, transparent 1.4px) 0 0 / 18px 18px, color-mix(in srgb, var(--wash) 55%, var(--surface));
}
.art-tile svg { width: 40px; height: 40px; }
.art-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.art-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; min-width: 0; }
.art-title-row { display: flex; align-items: flex-start; gap: 6px; }
.art-title { flex: 1; min-width: 0; font-size: 15.5px; font-weight: 620; line-height: 1.4; letter-spacing: -0.005em; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.art-title a { color: var(--text); }
.art-title a:focus-visible { outline: none; }
.art-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 13.5px; min-height: 22px; }
.art-meta-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.art-globe { flex: none; display: inline-flex; color: var(--muted); }
.art-note { color: var(--text-2); font-size: 13.5px; margin: 2px 0 0; overflow-wrap: anywhere; }

/* The "…" menu of a card or a row: a <details>, which opens without JavaScript too. */
.art-menu { position: relative; flex: none; }
.art-menu > summary { list-style: none; cursor: pointer; width: 30px; height: 30px; margin: -3px -6px 0 0; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius); color: var(--text-2); }
.art-menu > summary::-webkit-details-marker { display: none; }
.art-menu > summary:hover, .art-menu[open] > summary { color: var(--text); background: var(--accent-wash); }
@media (hover: hover) and (pointer: fine) {
  .art-card .art-menu:not([open]) > summary { opacity: 0; transition: opacity .12s; }
  .art-card:hover .art-menu > summary, .art-card:focus-within .art-menu > summary { opacity: 1; }
}
.art-pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; width: 270px; max-width: calc(100vw - 32px); padding: 6px;
  display: flex; flex-direction: column; gap: 1px; text-align: left; white-space: normal;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow-lg);
}
.art-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 7px; background: none; font: inherit; font-size: 14.5px; line-height: 1.4; color: var(--text); text-align: left; cursor: pointer; }
.art-item:hover { background: var(--accent-wash); text-decoration: none; }
.art-item:focus-visible { outline-offset: -2px; }
.art-item svg { flex: none; color: var(--text-2); }
.art-item.art-danger, .art-item.art-danger svg { color: var(--danger); }
.art-item.art-danger:hover { background: color-mix(in srgb, var(--danger) 9%, transparent); }
.art-check[aria-pressed='true'] svg { color: var(--accent); }
.art-sep { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.acct .art-link { margin: 2px 0 4px; padding: 6px 8px; font: 12px/1.4 var(--mono); color: var(--text-2); background: var(--surface-2); }

/* The list: a compact table that drops columns rather than scroll sideways. */
.art-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.art-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.art-table th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.art-table td { padding: 10px 14px; border-top: 1px solid var(--line); color: var(--text-2); white-space: nowrap; vertical-align: middle; }
.art-table tbody tr:first-child td { border-top: 0; }
.art-table .c-name { width: 100%; min-width: 180px; white-space: normal; }
.art-table .c-menu { width: 1%; padding-left: 4px; text-align: right; }
.art-table .c-menu .art-menu > summary { margin: 0; }
.art-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.art-row-icon { flex: none; width: 26px; height: 26px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; background: var(--wash); color: var(--ink); }
.art-name-main { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.art-name-text { min-width: 0; overflow-wrap: break-word; font-weight: 580; color: var(--text); }
.art-name-text a { color: var(--text); }
@media (max-width: 900px) { .art-table .c-shared, .art-table .c-copies { display: none; } }
@media (max-width: 520px) { .art-table .c-type { display: none; } .art-table th, .art-table td { padding: 10px; } }

.art-dialog { width: calc(100% - 32px); max-width: 480px; padding: 24px; color: var(--text); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.art-dialog::backdrop { background: rgba(10, 10, 12, 0.45); }
.art-dialog h2 { font-size: 19px; margin: 0 0 12px; overflow-wrap: anywhere; }
.art-dialog p { color: var(--text-2); font-size: 15px; }
.art-dialog .acct-actions { justify-content: flex-end; margin-top: 8px; }
.art-empty p { margin-bottom: 14px; }
@media (prefers-color-scheme: dark) {
  .art-tile { color: color-mix(in srgb, var(--tint) 70%, white); background: radial-gradient(color-mix(in srgb, var(--tint) 30%, transparent) 1px, transparent 1.4px) 0 0 / 18px 18px, color-mix(in oklab, var(--tint) 14%, var(--surface)); }
  .art-row-icon { background: color-mix(in srgb, var(--tint) 22%, transparent); color: color-mix(in srgb, var(--tint) 70%, white); }
  .art-dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
}
