/* NosHost core styles: design tokens, shared components and workflow layouts in one file (one request on every page). Page styles: pages.css; homepage: home.css. */
/* ===== Tokens ===== */
/* NosHost design tokens (V2 brand). Every color, space and radius used by the UI lives here.
   Themes: [data-theme="light"|"dark"] on <html>. Density: [data-density="compact"]. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  /* Type */
  --font-sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Bricolage Grotesque", "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --fs-xs: 0.75rem;   /* 12 */
  --fs-sm: 0.8125rem; /* 13 */
  --fs-md: 1rem;      /* 16 body */
  --fs-lg: 1.0625rem; /* 17 */
  --fs-xl: 1.25rem;   /* 20 */
  --fs-2xl: 1.625rem; /* 26 */
  --fs-3xl: 2.125rem; /* 34 */
  --fs-h1: clamp(2rem, 3.6vw, 2.9rem); /* one page-title size for every page except the homepage hero */
  --lh-tight: 1.2;
  --lh-body: 1.6;

  /* Space (4px base) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px;

  /* Density-aware component sizes */
  --control-h: 40px;
  --control-h-sm: 32px;
  --card-pad: 18px;
  --row-pad: 12px;
  --gap: 16px;

  /* Shape */
  --r-sm: 9px; --r-md: 12px; --r-lg: 16px; --r-pill: 999px;

  /* Layout */
  --header-h: 64px;
  --sidebar-w: 256px;
  --sidebar-w-collapsed: 64px;
  --content-max: 1240px;
  --wrap: 1240px;            /* page container: 1200px of content plus 20px gutters */
  --prose-max: 720px;

  /* Motion */
  --t-fast: 120ms;
  --t-med: 200ms;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* Light theme (default): warm paper, ink and a signal-orange accent */
  --bg: #f3f0e8;
  --bg-elev: #fbfaf6;
  --surface: #fbfaf6;
  --surface-2: #efebe1;
  --surface-3: #e6e1d4;
  --border: #dcd6c8;
  --border-strong: #c6c0b0;
  --input-border: #8a8576;
  --text: #15140f;
  --text-2: #47443b;
  --muted: #6a665b;
  --ink: #15140f;
  --ink-text: #f3f0e8;
  --accent: #bd370d;          /* 5.6:1 with white text and 4.5:1 on the light surfaces */
  --accent-hover: #b8360c;
  --accent-bright: #e5461a;   /* brand orange for large type, dots and marks only */
  --accent-soft: #fbe2d8;
  --accent-text: #ffffff;
  --accent-ink: #b53210;      /* accent for text on paper */
  --accent-ring: rgba(229, 70, 26, .3);
  --dot: rgba(21, 20, 15, .1);
  --grid-line: rgba(21, 20, 15, .07);
  --code-bg: #efebe1;
  --code-text: #1c1b16;
  --codeblock-bg: #1c1b16;
  --codeblock-head: #26251f;
  --codeblock-text: #ece8dc;
  --codeblock-muted: #a19d90;
  --shadow-sm: 0 1px 0 rgba(21, 20, 15, .04), 0 1px 2px rgba(21, 20, 15, .06);
  --shadow-md: 0 1px 0 rgba(21, 20, 15, .04), 0 10px 30px -18px rgba(21, 20, 15, .4);
  --shadow-lg: 0 30px 60px -30px rgba(21, 20, 15, .5), 0 4px 12px rgba(21, 20, 15, .06);
  --overlay: rgba(14, 13, 10, .45);

  /* Status: always paired with an icon and a text label */
  --pass: #13703a;  --pass-soft: #dcf0e2;
  --warn: #85560a;  --warn-soft: #f8ebc7;
  --fail: #b0261e;  --fail-soft: #f9dcd8;
  --info: #2450d6;  --info-soft: #e1e8fb;
  --na: #6a665b;    --na-soft: #ebe7dc;

  /* Code tokens (code blocks are dark in both themes) */
  --tok-key: #ff8e6b;
  --tok-str: #9fd99b;
  --tok-num: #8fb3ff;
  --tok-com: #8a867a;

  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0d0e0b;
  --bg-elev: #171814;
  --surface: #171814;
  --surface-2: #1e1f1a;
  --surface-3: #272822;
  --border: #2d2e28;
  --border-strong: #3d3e36;
  --input-border: #77736a;
  --text: #f1eee4;
  --text-2: #c9c5b8;
  --muted: #9a9689;
  --ink: #f1eee4;
  --ink-text: #0d0e0b;
  --accent: #ff6a3d;
  --accent-hover: #ff8a63;
  --accent-bright: #ff6a3d;
  --accent-soft: #3a1a0f;
  --accent-text: #160a05;
  --accent-ink: #ff9774;
  --accent-ring: rgba(255, 106, 61, .45);
  --dot: rgba(241, 238, 228, .08);
  --grid-line: rgba(241, 238, 228, .05);
  --code-bg: #10110d;
  --code-text: #e6e2d6;
  --codeblock-bg: #0a0b08;
  --codeblock-head: #141510;
  --codeblock-text: #e6e2d6;
  --codeblock-muted: #8f8b7f;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-md: 0 1px 0 rgba(0, 0, 0, .4), 0 10px 30px -18px rgba(0, 0, 0, .9);
  --shadow-lg: 0 30px 60px -30px rgba(0, 0, 0, .95);
  --overlay: rgba(0, 0, 0, .62);

  --pass: #4ccf7f;  --pass-soft: #11291b;
  --warn: #f2bd46;  --warn-soft: #2e2510;
  --fail: #ff7a6c;  --fail-soft: #33150f;
  --info: #8aa6ff;  --info-soft: #18213d;
  --na: #a3a093;    --na-soft: #272822;

  --tok-key: #ff8e6b;
  --tok-str: #9fd99b;
  --tok-num: #8fb3ff;
  --tok-com: #7f7b70;

  color-scheme: dark;
}

[data-density="compact"] {
  --control-h: 34px;
  --control-h-sm: 28px;
  --card-pad: 12px;
  --row-pad: 8px;
  --gap: 10px;
  --fs-md: 0.875rem;
}

/* ===== Components ===== */
/* NosHost shared components. Depends on tokens.css. */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-sans); font-size: var(--fs-md); line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100vh; display: flex; flex-direction: column;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { line-height: var(--lh-tight); margin: 0 0 var(--s-3); letter-spacing: -0.02em; font-weight: 700; font-family: var(--font-display); }
h1 { font-size: var(--fs-h1); letter-spacing: -0.04em; line-height: 1.04; }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }
p { margin: 0 0 var(--s-3); }
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--text); }
code, kbd, pre, samp, .mono { font-family: var(--font-mono); font-size: 0.92em; }
:not(pre) > code { background: var(--surface-2); border: 1px solid var(--border); padding: 0.05em 0.35em; border-radius: 5px; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--s-6) 0; }
ul, ol { padding-left: 1.3em; margin: 0 0 var(--s-3); }
[hidden] { display: none !important; }
::selection { background: var(--accent-soft); color: var(--text); }

:focus { outline: none; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 0; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--accent); color: var(--accent-text); padding: 10px 14px; border-radius: var(--r-sm); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 10px; color: var(--accent-text); }

.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 15px; height: 15px; }
.icon-lg { width: 22px; height: 22px; }

.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.xs { font-size: var(--fs-xs); }
.nowrap { white-space: nowrap; }
.stack > * + * { margin-top: var(--gap); }
.row { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.dotgrid { background-image: radial-gradient(var(--dot) 1px, transparent 1px); background-size: 18px 18px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(140%) blur(10px); -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 16px; padding: 0 20px; max-width: var(--wrap); margin: 0 auto; }
.brand { display: inline-flex; align-items: center; color: var(--text); text-decoration: none; flex: none; line-height: 0; }
.brand-logo { display: block; height: 32px; width: auto; }
.brand-logo-dark, [data-theme="dark"] .brand-logo-light { display: none; }
[data-theme="dark"] .brand-logo-dark { display: block; }
.main-nav { display: flex; gap: 2px; margin-left: 12px; }
.main-nav a { color: var(--text-2); text-decoration: none; padding: 7px 12px; border-radius: var(--r-pill); font-size: 14.5px; font-weight: 550; }
.main-nav a:hover { background: var(--surface-2); color: var(--text); }
.main-nav a[aria-current="page"] { color: var(--ink-text); background: var(--ink); }
.search-trigger {
  margin-left: auto; display: flex; align-items: center; gap: 10px; width: 250px;
  height: 38px; padding: 0 10px 0 12px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--border); color: var(--muted);
  font: inherit; font-size: 14px; cursor: pointer; text-align: left;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.search-trigger:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.search-trigger span.grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
kbd, .kbd {
  font-family: var(--font-mono); font-size: 11px; line-height: 1; padding: 4px 6px; border-radius: 5px;
  border: 1px solid var(--border); border-bottom-width: 2px; background: var(--surface-2); color: var(--muted); white-space: nowrap;
}
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-actions .btn-icon { width: 38px; height: 38px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.header-actions .btn-icon:hover { border-color: var(--border-strong); background: var(--surface); }
.btn.nav-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--surface); --btn-fg: var(--text); --btn-bd: var(--border);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--control-h); padding: 0 16px; border-radius: var(--r-pill);
  background: var(--btn-bg); color: var(--btn-fg); border: 1px solid var(--btn-bd);
  font: inherit; font-size: var(--fs-sm); font-weight: 650; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.btn:hover { --btn-bg: var(--surface-2); --btn-bd: var(--border-strong); color: var(--btn-fg); }
.btn:active { transform: translateY(1px); }
.btn-primary { --btn-bg: var(--accent); --btn-fg: var(--accent-text); --btn-bd: var(--accent); }
.btn-primary:hover { --btn-bg: var(--accent-hover); --btn-bd: var(--accent-hover); color: var(--accent-text); }
.btn-ink { --btn-bg: var(--ink); --btn-fg: var(--ink-text); --btn-bd: var(--ink); }
.btn-ink:hover { --btn-bg: var(--ink); --btn-bd: var(--ink); color: var(--ink-text); opacity: .88; }
.btn-ghost { --btn-bg: transparent; --btn-bd: transparent; color: var(--text-2); }
.btn-ghost:hover { --btn-bg: var(--surface-2); --btn-bd: transparent; }
.btn-danger { --btn-fg: var(--fail); }
.btn-sm { height: var(--control-h-sm); padding: 0 12px; font-size: var(--fs-xs); }
.btn-lg { height: 48px; padding: 0 22px; font-size: var(--fs-md); }
.btn-icon { width: var(--control-h); padding: 0; }
.btn-icon.btn-sm { width: var(--control-h-sm); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn.is-copied { --btn-fg: var(--pass); }
.btn.is-failed { --btn-fg: var(--fail); }
.fav-btn[aria-pressed="true"] { color: var(--warn); }
.fav-btn[aria-pressed="true"] .icon { fill: currentColor; }

/* ---------- App layout ---------- */
.app { flex: 1; display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); max-width: var(--wrap); width: 100%; margin: 0 auto; }
.app.no-sidebar { grid-template-columns: minmax(0, 1fr); }
html[data-sidebar="collapsed"] .app:not(.no-sidebar) { grid-template-columns: var(--sidebar-w-collapsed) minmax(0, 1fr); }
.main { min-width: 0; overflow-x: clip; padding: var(--s-6) 20px var(--s-16); }
.app:not(.no-sidebar) .main { padding-right: 20px; padding-left: var(--s-6); }
.main-narrow { max-width: var(--content-max); margin: 0 auto; width: 100%; }

.sidebar {
  position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain;
  border-right: 1px solid var(--border); padding: var(--s-4) var(--s-3) var(--s-6); scrollbar-width: thin;
}
.sidebar-section + .sidebar-section { margin-top: var(--s-5); }
.sidebar-title { display: flex; align-items: center; justify-content: space-between; font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 0 10px; margin-bottom: 6px; }
.side-link {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--r-sm);
  color: var(--text-2); text-decoration: none; font-size: var(--fs-sm); line-height: 1.3;
}
.side-link:hover { background: var(--surface-2); color: var(--text); }
.side-link[aria-current="page"] { background: var(--surface); color: var(--text); font-weight: 650; box-shadow: inset 3px 0 0 var(--accent), var(--shadow-sm); }
.side-link .count { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.side-link .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-empty { font-size: var(--fs-xs); color: var(--muted); padding: 4px 10px; margin: 0; }
.sidebar-collapse { width: 100%; justify-content: flex-start; margin-bottom: var(--s-3); }
html[data-sidebar="collapsed"] .sidebar { padding-left: 8px; padding-right: 8px; }
html[data-sidebar="collapsed"] .sidebar .label,
html[data-sidebar="collapsed"] .sidebar .count,
html[data-sidebar="collapsed"] .sidebar .sidebar-title,
html[data-sidebar="collapsed"] .sidebar .side-empty,
html[data-sidebar="collapsed"] .sidebar [data-collapsible-hide] { display: none; }
html[data-sidebar="collapsed"] .side-link, html[data-sidebar="collapsed"] .sidebar-collapse { justify-content: center; padding: 9px 0; }
html[data-sidebar="collapsed"] .sidebar-collapse .icon { transform: rotate(180deg); }

/* ---------- Recent bar ---------- */
.recent-bar { border-bottom: 1px solid var(--border); background: var(--bg-elev); }
.recent-inner { max-width: var(--wrap); margin: 0 auto; display: flex; align-items: center; gap: var(--s-2); padding: 6px 20px; min-height: 42px; }
.recent-list { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; padding: 2px; }
.recent-list::-webkit-scrollbar { display: none; }
.recent-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--surface); font-size: var(--fs-xs); color: var(--text-2); text-decoration: none; white-space: nowrap; }
.recent-chip:hover { border-color: var(--border-strong); color: var(--text); }

/* ---------- Breadcrumbs / page head ---------- */
.breadcrumbs ol { list-style: none; padding: 0; margin: 0 0 var(--s-4); display: flex; flex-wrap: wrap; gap: 4px; font-size: var(--fs-sm); color: var(--muted); }
.breadcrumbs li { display: inline-flex; align-items: center; gap: 4px; }
.breadcrumbs li + li::before { content: "/"; color: var(--border-strong); margin-right: 2px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; display: inline-block; padding-block: 3px; }
.breadcrumbs a:hover { color: var(--text); text-decoration: underline; }
.page-head { margin-bottom: var(--s-6); }
.page-head h1 { margin-bottom: var(--s-2); }
.page-head .lede { color: var(--text-2); font-size: var(--fs-lg); max-width: 68ch; margin: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s-2); }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent-bright); flex: none; }
.eyebrow > .icon:first-child { display: none; }

/* ---------- Surfaces ---------- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--card-pad); box-shadow: var(--shadow-md); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-3); flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { margin: 0; }
.panel-flush { padding: 0; overflow: hidden; }
.section { margin-top: var(--s-12); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-4); flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head p { margin: 4px 0 0; color: var(--muted); }

.demo-note {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: var(--r-md);
  background: var(--info-soft); color: var(--text); border: 1px dashed color-mix(in srgb, var(--info) 45%, transparent); font-size: var(--fs-sm);
}
.demo-note .icon { color: var(--info); margin-top: 2px; }
.demo-note p { margin: 0; }
.tag { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 7px; border-radius: 6px; font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); white-space: nowrap; }
.tag-mono { font-family: var(--font-mono); font-weight: 450; }
.tag-accent { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.tag-demo { background: transparent; border-style: dashed; color: var(--muted); }
.tag-live { background: var(--pass-soft); color: var(--pass); border-color: transparent; }
.tag-queued { background: var(--info-soft); color: var(--info); border-color: transparent; }
.tag-local { background: var(--warn-soft); color: var(--warn); border-color: transparent; }

/* ---------- Tool cards ---------- */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--gap); }
.tool-card {
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: var(--card-pad);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.tool-card:hover { border-color: var(--text); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.tool-card:focus-within { border-color: var(--accent); }
.tool-card .tc-top { display: flex; align-items: center; gap: 10px; }
.tool-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); flex: none; border: 1px solid transparent; }
.tool-card h3, .tool-card .tc-title { font-family: var(--font-sans); font-size: var(--fs-md); margin: 0; font-weight: 650; line-height: 1.3; letter-spacing: -0.01em; }
.tool-card .tc-link { color: var(--text); text-decoration: none; }
.tool-card .tc-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.tool-card .tc-link:focus-visible { outline: none; }
.tool-card .tc-link:focus-visible::after { outline: 2px solid var(--accent); outline-offset: 2px; }
.tool-card p { margin: 0; color: var(--muted); font-size: var(--fs-sm); line-height: 1.5; }
.tool-card .tc-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
.tool-card .fav-btn { position: relative; z-index: 2; margin-left: auto; }
.tool-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.tool-list .tool-card { flex-direction: row; align-items: center; border: 0; border-radius: 0; gap: var(--s-3); padding: var(--row-pad) var(--card-pad); }
.tool-list .tool-card + .tool-card { border-top: 1px solid var(--border); }
.tool-list .tool-card:hover { box-shadow: none; background: var(--surface-2); }
.tool-list .tool-card .tc-top { flex: 0 0 300px; min-width: 0; }
.tool-list .tool-card p { flex: 1; min-width: 0; }
.tool-list .tool-card .tc-meta { margin: 0; padding: 0; flex: none; }
.tool-list .tool-card .tc-cat { display: none; }
.tool-list .tool-card .fav-btn { margin-left: 0; order: 9; }

/* ---------- Chips / segmented / filters ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: var(--r-pill);
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font: inherit; font-size: var(--fs-sm); cursor: pointer; text-decoration: none;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip[aria-pressed="true"], .chip[aria-current="page"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip .count { font-family: var(--font-mono); font-size: 11px; opacity: .85; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); }
.seg button { display: inline-flex; align-items: center; gap: 6px; height: calc(var(--control-h-sm) - 2px); padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font: inherit; font-size: var(--fs-xs); font-weight: 560; cursor: pointer; }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-bottom: var(--s-4); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field + .field { margin-top: var(--s-4); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--s-4); }
.field-row > .field + .field { margin-top: 0; }
label, .label { font-size: var(--fs-sm); font-weight: 580; color: var(--text); }
.hint { font-size: var(--fs-xs); color: var(--muted); margin: 0; }
.input, .select, .textarea {
  width: 100%; min-height: var(--control-h); padding: 0 12px; border-radius: var(--r-sm);
  border: 1px solid var(--input-border); background: var(--bg-elev); color: var(--text);
  font: inherit; font-size: var(--fs-md);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.textarea { padding: 10px 12px; min-height: 120px; resize: vertical; line-height: 1.5; }
.input.mono, .textarea.mono { font-family: var(--font-mono); font-size: var(--fs-sm); }
.select { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--muted); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); outline: none; }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--fail); }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--fail) 35%, transparent); }
.error-text { display: flex; gap: 6px; align-items: flex-start; color: var(--fail); font-size: var(--fs-sm); margin: 0; }
.input-group { display: flex; gap: var(--s-2); }
.input-group .input { flex: 1; }
.input-affix { position: relative; }
.input-affix .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-affix .input { padding-left: 38px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: var(--fs-sm); cursor: pointer; font-weight: 450; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 1px 0 0; flex: none; }
.radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.radio-card { position: relative; }
.radio-card input { position: absolute; opacity: 0; inset: 0; }
.radio-card span { display: block; padding: 10px 12px; border: 1px solid var(--input-border); border-radius: var(--r-md); background: var(--surface); font-size: var(--fs-sm); cursor: pointer; }
.radio-card input:checked + span { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.radio-card input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.radio-card small { display: block; color: var(--muted); font-size: var(--fs-xs); }
.examples { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: var(--fs-sm); }
.examples > span { color: var(--muted); }
.link-btn { text-align: left; background: none; border: 0; padding: 0; color: var(--accent-ink); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ---------- Disclosure: Advanced / Accordion ---------- */
details.disclosure { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
details.disclosure > summary { list-style: none; cursor: pointer; padding: 10px 14px; display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); font-weight: 580; border-radius: inherit; }
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary .chev { margin-left: auto; transition: transform var(--t-med) var(--ease); color: var(--muted); }
details.disclosure[open] > summary .chev { transform: rotate(180deg); }
details.disclosure > .disclosure-body { padding: 4px 14px 14px; }
.accordion { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.accordion details + details { border-top: 1px solid var(--border); }
.accordion summary { list-style: none; cursor: pointer; padding: 14px 16px; display: flex; gap: 10px; align-items: center; font-weight: 580; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary .chev { margin-left: auto; color: var(--muted); transition: transform var(--t-med) var(--ease); }
.accordion details[open] summary .chev { transform: rotate(180deg); }
.accordion .acc-body { padding: 0 16px 16px; color: var(--text-2); }
.accordion .acc-body p:last-child { margin: 0; }

/* ---------- Workspace ---------- */
.tool-head { display: flex; align-items: flex-start; gap: var(--s-4); margin-bottom: var(--s-5); }
.tool-head .tool-ico { width: 52px; height: 52px; border-radius: 14px; }
.tool-head .tool-ico .icon { width: 22px; height: 22px; }
.tool-head h1 { font-size: var(--fs-h1); margin-bottom: 8px; }
.tool-head p { color: var(--text-2); margin: 0; max-width: 70ch; }
.tool-head .tool-actions { margin-left: auto; display: flex; gap: 6px; flex: none; }
.workspace { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1100px) {
  .workspace.split { grid-template-columns: minmax(340px, 5fr) minmax(0, 7fr); }
}
.ws-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; margin-top: var(--s-4); }

/* ---------- Status + result cards ---------- */
.status { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px 0 7px; border-radius: var(--r-pill); font-size: 12px; font-weight: 620; white-space: nowrap; }
.status .icon { width: 14px; height: 14px; stroke-width: 2.2; }
.st-pass { color: var(--pass); background: var(--pass-soft); }
.st-warn { color: var(--warn); background: var(--warn-soft); }
.st-fail { color: var(--fail); background: var(--fail-soft); }
.st-na { color: var(--na); background: var(--na-soft); }
.st-info { color: var(--info); background: var(--info-soft); }
.result-list { display: flex; flex-direction: column; gap: 10px; }
.result-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; padding: 14px var(--card-pad); border: 1px solid var(--border); border-left-width: 4px; border-radius: var(--r-md); background: var(--surface); }
.result-card.rc-pass { border-left-color: var(--pass); }
.result-card.rc-warn { border-left-color: var(--warn); }
.result-card.rc-fail { border-left-color: var(--fail); }
.result-card.rc-na { border-left-color: var(--na); border-left-style: dashed; }
.result-card .rc-icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; grid-row: span 2; }
.rc-pass .rc-icon { background: var(--pass-soft); color: var(--pass); }
.rc-warn .rc-icon { background: var(--warn-soft); color: var(--warn); }
.rc-fail .rc-icon { background: var(--fail-soft); color: var(--fail); }
.rc-na .rc-icon { background: var(--na-soft); color: var(--na); }
.result-card h3 { font-family: var(--font-sans); letter-spacing: -0.01em; font-size: var(--fs-md); margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.result-card p { margin: 0; color: var(--text-2); font-size: var(--fs-sm); }
.result-card .rc-fix { grid-column: 2; margin-top: 8px; padding: 10px 12px; border-radius: 0 var(--r-sm) var(--r-sm) 0; border-left: 3px solid var(--accent); background: var(--surface-2); font-size: var(--fs-sm); }
.result-card .rc-fix strong { display: block; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-ink); margin-bottom: 2px; }
.summary-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.summary-strip > div { background: var(--surface); padding: 14px 16px; }
.summary-strip .k { font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.summary-strip .v { font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.summary-strip .v small { font-size: var(--fs-sm); color: var(--muted); font-weight: 500; }

/* ---------- Code blocks ---------- */
.code-block { border: 1px solid var(--codeblock-bg); border-radius: var(--r-md); background: var(--codeblock-bg); overflow: hidden; }
.code-head { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 12px; border-bottom: 1px solid rgba(255, 255, 255, .08); background: var(--codeblock-head); }
.code-head .lang { font-family: var(--font-mono); font-size: 11.5px; color: var(--codeblock-muted); margin-right: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-head .btn-ghost { color: var(--codeblock-text); }
.code-head .btn-ghost:hover { background: rgba(255, 255, 255, .08); color: var(--codeblock-text); }
.code-block pre { margin: 0; padding: 14px 16px; overflow: auto; font-size: 13px; line-height: 1.65; color: var(--codeblock-text); tab-size: 2; max-height: 460px; }
.code-block pre code { font-size: inherit; }
.code-block.wrap pre { white-space: pre-wrap; word-break: break-word; }
.tok-k { color: var(--tok-key); } .tok-s { color: var(--tok-str); } .tok-n { color: var(--tok-num); } .tok-c { color: var(--tok-com); font-style: italic; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); -webkit-overflow-scrolling: touch; }
.table-wrap:focus-visible { outline-offset: 2px; }
table.data { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
table.data th, table.data td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.data th { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; color: var(--muted); background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; }
table.data .url { font-family: var(--font-mono); font-size: 12.5px; word-break: break-all; min-width: 220px; }
table.data tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; margin-bottom: var(--s-4); }
.tabs::-webkit-scrollbar { display: none; }
.tabs [role="tab"] { position: relative; border: 0; background: none; padding: 12px 12px; font: inherit; font-size: var(--fs-sm); font-weight: 650; color: var(--muted); cursor: pointer; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tabs [role="tab"]:hover { color: var(--text); }
.tabs [role="tab"][aria-selected="true"] { color: var(--text); }
.tabs [role="tab"][aria-selected="true"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px; }
.tabs [role="tab"] .count { font-family: var(--font-mono); font-size: 11px; background: var(--surface-2); padding: 1px 6px; border-radius: 99px; }

/* ---------- Tooltip (works with hover, focus and tap) ---------- */
.tip { position: relative; display: inline-flex; }
.tip-btn { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); cursor: help; padding: 0; }
.tip-btn:hover { color: var(--text); background: var(--surface-2); }
.tip-bubble {
  position: absolute; z-index: 60; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  width: max-content; max-width: min(280px, 80vw); padding: 8px 10px; border-radius: var(--r-sm);
  background: var(--text); color: var(--bg); font-size: var(--fs-xs); font-weight: 450; line-height: 1.45; text-align: left;
  box-shadow: var(--shadow-md); pointer-events: none; opacity: 0; visibility: hidden; transition: opacity var(--t-fast) var(--ease);
}
.tip.is-open .tip-bubble, .tip:hover .tip-bubble, .tip:focus-within .tip-bubble { opacity: 1; visibility: visible; }
.tip.align-start .tip-bubble { left: 0; transform: none; }
.tip.align-end .tip-bubble { left: auto; right: 0; transform: none; }

/* ---------- Dialogs ---------- */
dialog { border: 0; padding: 0; background: transparent; color: var(--text); max-width: none; max-height: none; }
dialog::backdrop { background: var(--overlay); backdrop-filter: blur(2px); }
.modal { width: min(560px, calc(100vw - 24px)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); margin: 10vh auto auto; }
.modal-head { display: flex; align-items: center; gap: var(--s-3); padding: 16px 18px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: var(--fs-lg); }
.modal-head .btn-icon { margin-left: auto; }
.modal-body { padding: 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--border); flex-wrap: wrap; }

.palette { width: min(640px, calc(100vw - 24px)); margin: 9vh auto auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--border); }
.palette-input .icon { color: var(--muted); }
.palette-input input { flex: 1; height: 54px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: var(--fs-lg); min-width: 0; }
.palette-input input:focus { outline: none; }
.palette-results { max-height: min(56vh, 460px); overflow-y: auto; padding: 6px; overscroll-behavior: contain; }
.palette-group { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 10px 4px; font-weight: 600; }
.palette-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--r-sm); cursor: pointer; color: var(--text); text-decoration: none; }
.palette-item[aria-selected="true"] { background: var(--accent-soft); }
.palette-item .pi-text { min-width: 0; flex: 1; }
.palette-item .pi-title { display: block; font-weight: 560; font-size: var(--fs-sm); }
.palette-item .pi-desc { display: block; font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-item mark { background: transparent; color: var(--accent-ink); font-weight: 700; }
.palette-foot { display: flex; gap: 14px; align-items: center; padding: 8px 14px; border-top: 1px solid var(--border); font-size: var(--fs-xs); color: var(--muted); background: var(--surface-2); flex-wrap: wrap; }
.palette-empty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: var(--fs-sm); }

.fullview { width: 100vw; height: 100vh; height: 100dvh; margin: 0; background: var(--bg); display: flex; flex-direction: column; }
dialog.fullview-dialog { width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; margin: 0; inset: 0; }
.fullview-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--surface); }
.fullview-head h2 { margin: 0; font-size: var(--fs-md); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fullview-body { flex: 1; overflow: auto; padding: 20px; }
.fullview-body .code-block pre { max-height: none; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; z-index: 300; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 24px); }
.toast { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--r-md); background: var(--text); color: var(--bg); font-size: var(--fs-sm); box-shadow: var(--shadow-lg); animation: toast-in var(--t-med) var(--ease); pointer-events: auto; }
.toast.t-fail .icon { color: #ff9a8f; }
.toast.t-pass .icon { color: #7be3a1; }
[data-theme="dark"] .toast.t-fail .icon { color: var(--fail-soft); }
[data-theme="dark"] .toast.t-pass .icon { color: #157239; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Dropzone ---------- */
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 32px 20px; border: 2px dashed var(--border-strong); border-radius: var(--r-lg); background: var(--surface); transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone .dz-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); }
.dropzone h3 { margin: 4px 0 0; font-size: var(--fs-md); }
.dropzone p { margin: 0; color: var(--muted); font-size: var(--fs-sm); }
.file-pill { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.file-pill .grow { min-width: 0; }
.file-pill strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-sm); }

/* ---------- States ---------- */
.empty-state { text-align: center; padding: 40px 20px; border: 1px dashed var(--border-strong); border-radius: var(--r-lg); color: var(--muted); }
.empty-state .es-icon { width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); }
.empty-state h3 { color: var(--text); margin-bottom: 6px; }
.empty-state p { max-width: 46ch; margin: 0 auto 14px; font-size: var(--fs-sm); }
.state-box { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid; font-size: var(--fs-sm); }
.state-box p { margin: 0; }
.state-box strong { display: block; margin-bottom: 2px; font-size: var(--fs-md); }
.state-error { background: var(--fail-soft); border-color: color-mix(in srgb, var(--fail) 35%, transparent); }
.state-error > .icon { color: var(--fail); }
.state-partial { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.state-partial > .icon { color: var(--warn); }
.state-success { background: var(--pass-soft); border-color: color-mix(in srgb, var(--pass) 35%, transparent); }
.state-success > .icon { color: var(--pass); }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: var(--r-sm); }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.progress-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: var(--fs-sm); }
.progress-steps li { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.progress-steps li[data-state="done"] { color: var(--text); }
.progress-steps li[data-state="done"] .ps-dot { background: var(--pass); border-color: var(--pass); }
.progress-steps li[data-state="active"] { color: var(--text); font-weight: 560; }
.progress-steps li[data-state="active"] .ps-dot { border-color: var(--accent); border-top-color: transparent; animation: spin .8s linear infinite; }
.ps-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border-strong); flex: none; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Bars / meters ---------- */
.bar-list { display: flex; flex-direction: column; gap: 8px; }
.bar-item { display: grid; grid-template-columns: minmax(70px, 170px) minmax(0, 1fr) 64px; gap: 10px; align-items: center; font-size: var(--fs-sm); }
.bar-item .bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; background: var(--accent); }
.bar-item .bar-val { text-align: right; font-family: var(--font-mono); font-size: 12px; color: var(--text-2); }
.history { display: flex; gap: 2px; align-items: stretch; height: 28px; }
.history i { flex: 1; min-width: 2px; border-radius: 2px; background: var(--pass); opacity: .85; }
.history i.h-warn { background: var(--warn); }
.history i.h-fail { background: var(--fail); }
.history i.h-none { background: var(--surface-3); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface-2); margin-top: auto; }
.footer-inner { max-width: var(--wrap); margin: 0 auto; padding: var(--s-10) 20px var(--s-6); display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: var(--s-8); }
.footer-inner h2 { font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: var(--s-3); }
.footer-inner ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: var(--fs-md); }
.footer-inner a { color: var(--text-2); text-decoration: none; display: inline-block; padding-block: 3px; }
.footer-inner a:hover { color: var(--accent-ink); text-decoration: underline; }
.footer-base { max-width: var(--wrap); margin: 0 auto; padding: var(--s-4) 20px var(--s-6); display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; color: var(--muted); font-size: var(--fs-xs); border-top: 1px solid var(--border); }

/* ---------- Settings panel ---------- */
.settings-pop { position: absolute; right: 12px; top: calc(var(--header-h) - 4px); width: min(320px, calc(100vw - 24px)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 14px; z-index: 70; }
.settings-pop .settings-title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-sm); margin: 0 0 10px; }
.settings-pop .set-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.settings-pop .set-row .label { font-size: var(--fs-xs); color: var(--muted); font-weight: 560; }
.settings-pop .seg { display: flex; }
.settings-pop .seg button { flex: 1; justify-content: center; }

/* ---------- Mobile drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 90; display: none; }
.drawer.is-open { display: block; }
.drawer-scrim { position: absolute; inset: 0; background: var(--overlay); }
.drawer-panel { position: absolute; top: 0; bottom: 0; left: 0; width: min(320px, 86vw); background: var(--bg-elev); border-right: 1px solid var(--border); overflow-y: auto; padding: 14px; box-shadow: var(--shadow-lg); animation: drawer-in var(--t-med) var(--ease); }
@keyframes drawer-in { from { transform: translateX(-16px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-panel .main-nav-m { display: flex; flex-direction: column; gap: 2px; margin: 12px 0 18px; }

/* ---------- Prose (guides) ---------- */
.prose { max-width: var(--prose-max); font-size: 1rem; line-height: 1.72; color: var(--text-2); }
.prose h2 { font-size: var(--fs-xl); color: var(--text); margin: var(--s-10) 0 var(--s-3); }
.prose h3 { font-size: var(--fs-lg); color: var(--text); margin: var(--s-6) 0 var(--s-2); }
.prose p, .prose ul, .prose ol { margin-bottom: var(--s-4); }
.prose li + li { margin-top: 6px; }
.prose strong { color: var(--text); }
.prose .code-block { margin: var(--s-4) 0 var(--s-5); }
.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface); margin: var(--s-5) 0; font-size: var(--fs-md); }
.callout > .icon { margin-top: 3px; }
.callout p:last-child { margin: 0; }
.callout-warn { border-color: color-mix(in srgb, var(--warn) 35%, transparent); background: var(--warn-soft); }
.callout-warn > .icon { color: var(--warn); }
.callout-tip { border-color: color-mix(in srgb, var(--info) 35%, transparent); background: var(--info-soft); }
.callout-tip > .icon { color: var(--info); }
.toc { position: sticky; top: calc(var(--header-h) + 20px); font-size: var(--fs-sm); }
.toc h2 { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--border); }
.toc a { display: block; padding: 5px 12px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.4; }
.toc a:hover { color: var(--text); }
.toc a[aria-current="true"] { color: var(--accent-ink); border-left-color: var(--accent); font-weight: 560; }

/* ---------- Before/after ---------- */
.ba { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.ba-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.ba-panes { display: grid; grid-template-columns: 1fr 1fr; }
.ba-pane { min-width: 0; }
.ba-pane + .ba-pane { border-left: 1px solid var(--border); }
.ba-pane-title { display: flex; justify-content: space-between; gap: 8px; padding: 8px 14px; font-size: var(--fs-xs); color: var(--muted); border-bottom: 1px solid var(--border); font-family: var(--font-mono); }
.ba-pane pre { margin: 0; padding: 12px 0; overflow: auto; font-size: 12.5px; line-height: 1.7; background: var(--code-bg); max-height: 360px; }
.ba-line { display: block; padding: 0 14px 0 0; white-space: pre; }
.ba-line .ln { display: inline-block; width: 36px; text-align: right; padding-right: 12px; color: var(--muted); user-select: none; }
.ba-line.del { background: var(--fail-soft); }
.ba-line.add { background: var(--pass-soft); }
.ba-line.del .mk::before { content: "-"; color: var(--fail); }
.ba-line.add .mk::before { content: "+"; color: var(--pass); }
.ba-line .mk { display: inline-block; width: 14px; font-weight: 700; }
.ba[data-view="unified"] .ba-panes { grid-template-columns: 1fr; }
.ba[data-view="unified"] .ba-pane + .ba-pane { border-left: 0; }

/* ---------- Unavailable demo link marker ---------- */
.is-demo-only { cursor: pointer; }
.demo-badge { font-size: 10.5px; font-family: var(--font-mono); color: var(--muted); border: 1px dashed var(--border-strong); border-radius: 99px; padding: 1px 7px; white-space: nowrap; }

/* ---------- Responsive ---------- */
@media (max-width: 1099px) {
  .main-nav { display: none; }
  .btn.nav-toggle { display: inline-flex; }
}
@media (max-width: 899px) {
  .app, html[data-sidebar="collapsed"] .app:not(.no-sidebar) { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .main { padding: var(--s-5) var(--s-4) var(--s-12); }
  .footer-inner { grid-template-columns: 1fr 1fr; padding: var(--s-8) var(--s-4) var(--s-4); }
  .footer-base { padding: var(--s-4); }
  .tool-list .tool-card { flex-wrap: wrap; }
  .tool-list .tool-card .tc-top { flex: 1 1 100%; }
  .tool-list .tool-card p { flex: 1 1 100%; order: 3; }
  .tool-list .tool-card .tc-meta { order: 4; }
  .ba-panes { grid-template-columns: 1fr; }
  .ba-pane + .ba-pane { border-left: 0; border-top: 1px solid var(--border); }
}
@media (max-width: 640px) {
  :root { --header-h: 56px; }
  html, html[data-density="compact"] { --control-h: 44px; --control-h-sm: 44px; }
  h1 { font-size: 2rem; }
  .search-trigger { width: auto; flex: 1; min-width: 0; }
  .search-trigger .kbd-hint { display: none; }
  .header-inner { gap: 6px; padding: 0 10px; }
  .brand-logo { height: 30px; }
  .tool-head { flex-wrap: wrap; }
  .tool-head .tool-actions { margin-left: 0; width: 100%; }
  .footer-inner { grid-template-columns: 1fr; gap: var(--s-6); }
  .input-group { flex-direction: column; }
  .input-group .btn { width: 100%; }
  .bar-item { grid-template-columns: 90px minmax(0, 1fr) 54px; }
  .modal { margin-top: 6vh; }
  .palette { margin-top: 2vh; }
  .btn, .chip, .seg button, .link-btn, .drawer .side-link, .radio-card span, .check { min-height: 44px; }
  .btn-icon, .btn-icon.btn-sm, .fav-btn { min-width: 44px; }
  .search-trigger { min-height: 44px; }
  .btn.nav-toggle { width: auto; padding-inline: 8px; gap: 6px; }
  .nav-toggle-label { font-size: var(--fs-xs); }
  .tip-btn { width: 44px; height: 44px; }
}
@media (hover: none) { .tool-card:hover { box-shadow: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .sidebar, .recent-bar, .site-footer, .tool-actions, .ws-actions { display: none !important; }
  .app { display: block; }
}

/* ---------- Utilities added for shell ---------- */
ul.plain { list-style: none; padding: 0; margin: 0; }
:where(.link-reset) { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
button.side-link { width: 100%; }
button.recent-chip { font-size: var(--fs-xs); }
dialog.sheet-dialog { width: 100%; max-width: 100%; height: auto; max-height: 100vh; margin: 0; inset: 0 0 auto 0; overflow-y: auto; padding: 0 12px 24px; }
html[data-sidebar="collapsed"] .sidebar .label { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; display: inline; }
.drawer .side-link .label { position: static; width: auto; height: auto; clip: auto; }
h1, h2, h3 { overflow-wrap: break-word; }
@media (max-width: 640px) { .summary-strip > div:last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (max-width: 480px) {
  .search-trigger { flex: 0 0 44px; width: 44px; justify-content: center; padding: 0; margin-left: auto; }
  .search-trigger span.grow { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .brand-logo { height: 28px; }
}

/* ===== Workflows ===== */
.workflow-method,.workflow-prerequisite { padding:var(--s-4); background:var(--surface-2); border:1px solid var(--border-strong); border-radius:var(--r-sm); overflow-wrap:anywhere; }
.workflow-verdict { padding-bottom:var(--s-4); border-bottom:1px solid var(--border-strong); }
.workflow-verdict h3 { margin-top:0; }
.workflow-outcome { font-size:var(--fs-xl); font-weight:700; color:var(--text); }
.workflow-outcome[data-outcome="review"],.workflow-outcome[data-outcome="partial"] { color:var(--warn); }
.workflow-outcome[data-outcome="fail"],.workflow-outcome[data-outcome="error"] { color:var(--fail); }
.workflow-severity { display:block; font-weight:650; font-size:var(--fs-sm); color:var(--muted); margin-bottom:var(--s-1); }
.workflow-actions { padding-inline-start:var(--s-6); }
.workflow-actions li { margin-block:var(--s-3); }
.workflow-evidence,.workflow-check { min-width:0; margin-block:var(--s-4); border:1px solid var(--border-strong); border-radius:var(--r-sm); padding:var(--s-3); }
.workflow-evidence summary,.workflow-check summary { overflow-wrap:anywhere; }
.workflow-evidence .btn { margin:var(--s-2) var(--s-2) var(--s-2) 0; white-space:normal; }
.workflow-comparison { padding:var(--s-4); background:var(--surface-2); margin-block:var(--s-5); border-radius:var(--r-sm); }
.workflow-builder,.workflow-rows { display:grid; gap:var(--s-4); min-width:0; }
.workflow-builder .btn,.diagnostic-workspace button.btn { min-height:44px; height:auto; padding-block:10px; white-space:normal; }
.workflow-row { display:grid; gap:var(--s-3); padding:var(--s-4); margin:0; min-width:0; border:1px solid var(--border-strong); border-radius:var(--r-sm); }
.workflow-row legend { font-weight:650; padding-inline:var(--s-2); }
.workflow-row .btn { justify-self:start; white-space:normal; }
.workflow-input { display:grid; gap:var(--s-2); min-width:0; }
.workflow-input .input { width:100%; min-width:0; }
.workflow-raw-toggle { display:flex; align-items:center; gap:var(--s-3); min-height:44px; margin-block:var(--s-3); cursor:pointer; }
.workflow-raw-toggle input { width:1.25rem; height:1.25rem; flex-shrink:0; }
.workflow-exports .btn,.workflow-check-actions .btn { min-height:44px; white-space:normal; }
.workflow-check-summary { padding:var(--s-4); margin-block:var(--s-4); min-width:0; }
.workflow-check-summary h3 { margin-top:0; }
.workflow-check-summary p,.workflow-check-summary li { overflow-wrap:anywhere; }
.workflow-check-summary li { margin-block:var(--s-3); }
.workflow-check-summary li a { display:inline-flex; align-items:center; min-height:44px; }
.workflow-check-actions { display:flex; flex-wrap:wrap; align-items:center; gap:var(--s-3); margin-block:var(--s-4); }
.workflow-check-actions p { flex-basis:100%; }
.workflow-builder [hidden],.workflow-check-actions[hidden] { display:none; }
.diagnostic-workspace :is(button,a,input,select,textarea,summary):focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
@media(min-width:42rem) { .workflow-row { grid-template-columns:repeat(2,minmax(0,1fr)); }.workflow-row > .btn { grid-column:1/-1; }.workflow-check-summary { padding:var(--s-5); } }
@media(min-width:64rem) { .workflow-evidence,.workflow-check { padding:var(--s-4); }.workflow-exports { gap:var(--s-3); } }
.evidence-download-status { flex-basis: 100%; max-width: 68ch; margin: .25rem 0; overflow-wrap: anywhere; }

/* Touch targets: standalone links are at least 24px tall (WCAG 2.2 target size). Links inside sentences are exempt. */
.cat-group-head a, p.small > a:only-child, .gc-link { display: inline-block; padding-block: 4px; }
