/* Basalt — cooled rock with fire inside. Dark-first ember theme. */

:root,
[data-theme="dark"] {
  --bg: #1e1e1e;
  --bg-sidebar: #181818;
  --bg-hover: rgba(255, 255, 255, .05);
  --bg-active: rgba(232, 99, 60, .14);
  --text: #d8d8d8;
  --text-muted: #8a8a8a;
  --text-faint: #6a6a6a;
  --accent: #E8633C;
  --accent-hover: #F4A24A;
  --accent-pressed: #C24322;
  --link: #6E9DB5;
  --border: #333333;
  --danger: #e5544b;
  --shadow: 0 8px 30px rgba(0, 0, 0, .4);
  --font-display: 'Space Grotesk', Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

[data-theme="light"] {
  --bg: #ffffff;
  --bg-sidebar: #f4f4f6;
  --bg-hover: rgba(0, 0, 0, .04);
  --bg-active: rgba(232, 99, 60, .12);
  --text: #2a2a30;
  --text-muted: #6a6a72;
  --text-faint: #9a9aa2;
  --accent: #E8633C;
  --accent-hover: #C24322;
  --border: #e2e2e6;
  --danger: #d23b32;
  --shadow: 0 8px 30px rgba(0, 0, 0, .12);
}

* { box-sizing: border-box; }

html, body, #app { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

button {
  font: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 8px;
  padding: 8px 14px;
  transition: background .12s, border-color .12s, color .12s;
}
button:hover { background: var(--bg-hover); }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
button.ghost { border-color: transparent; }
button:disabled { opacity: .55; cursor: not-allowed; }

input, textarea, select {
  font: inherit;
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  outline: none;
}
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232, 99, 60, .25); }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; padding: 0;
  border-color: transparent; color: var(--text-muted); border-radius: 6px;
}
.icon-btn:hover { color: var(--text); background: var(--bg-hover); }
.icon-btn.active { color: var(--accent); background: var(--bg-active); }

.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.err { color: var(--danger); font-size: 13px; min-height: 18px; }
.spacer { flex: 1; }
.hidden { display: none !important; }

/* ---------------- Landing ---------------- */
.landing { min-height: 100%; display: flex; flex-direction: column; position: relative; }
.landing > * { position: relative; z-index: 1; }
/* generated knowledge-graph backdrop: looping video, static image as poster fallback */
.landing > .hero-bg { z-index: 0; }
.hero-bg {
  position: absolute; top: 0; left: 0; right: 0; height: 920px;
  pointer-events: none; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 32%, #000 58%, transparent 92%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 32%, #000 58%, transparent 92%);
}
.hero-bg-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center top; opacity: .5;
}
[data-theme="light"] .hero-bg-video { opacity: .26; }

/* --- landing motion --- */
.hero-badge, .hero h1, .hero .tagline, .hero .cta, .hero-visual {
  animation: heroIn .7s cubic-bezier(.2,.7,.2,1) both;
}
.hero h1 { animation-delay: .06s; }
.hero .tagline { animation-delay: .12s; }
.hero .cta { animation-delay: .18s; }
.hero-visual { animation-delay: .26s; }
@keyframes heroIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

.hero-visual .mock-app { animation: floaty 7s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

.mock-graph circle { transform-box: fill-box; transform-origin: center; animation: nodePulse 3.6s ease-in-out infinite; }
.mock-graph circle:nth-child(6) { animation-delay: .3s; }
.mock-graph circle:nth-child(7) { animation-delay: .9s; }
.mock-graph circle:nth-child(8) { animation-delay: 1.5s; }
.mock-graph circle:nth-child(9) { animation-delay: 2.1s; }
@keyframes nodePulse { 0%, 100% { opacity: .9; transform: scale(1); } 50% { opacity: .45; transform: scale(.85); } }

.hero .cta .primary { animation: ctaGlow 3.2s ease-in-out infinite; }
@keyframes ctaGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232,99,60,0); }
  50% { box-shadow: 0 0 26px 2px rgba(232,99,60,.45); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-badge, .hero h1, .hero .tagline, .hero .cta, .hero-visual,
  .hero-visual .mock-app, .mock-graph circle, .hero .cta .primary { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
.landing-nav {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 28px; max-width: 1080px; margin: 0 auto; width: 100%;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-weight: 600; font-size: 20px;
  letter-spacing: -.03em; color: var(--text); line-height: 1;
}
.wordmark .bmark { width: 22px; height: 22px; flex: none; display: block; }
.wordmark .bword { color: var(--text); }
/* caret-style ember tick after the wordmark, echoing a blinking editor cursor */
.wordmark .bword::after {
  content: ""; display: inline-block; width: 6px; height: .82em;
  margin-left: 5px; vertical-align: -1px; border-radius: 1px;
  background: var(--accent);
}
.wordmark-lg { font-size: 30px; }
.wordmark-lg .bmark { width: 32px; height: 32px; }
/* legacy accent span kept for safety */
.wordmark .a { color: var(--accent); }
.hero {
  position: relative; overflow: hidden;
  text-align: center; padding: 96px 24px 80px;
  max-width: 820px; margin: 0 auto;
}
.hero::before {
  content: ""; position: absolute; inset: -40% 0 auto 0; height: 520px;
  background: radial-gradient(60% 60% at 50% 0%, rgba(232, 99, 60, .35), transparent 70%);
  filter: blur(20px); z-index: -1; pointer-events: none;
}
/* marketing display type — Space Grotesk with spine */
.hero h1, .section-head h2, .changelog h2, .mcp-body h2, .audience h2,
.cta-panel h2, .stat-num, .feat-card h4, .brandkit h1, .brandkit h2 {
  font-family: var(--font-display);
}
.hero h1 { font-size: 56px; line-height: 1.05; letter-spacing: -.03em; margin: 0 0 18px; }
.hero p.tagline { font-size: 19px; color: var(--text-muted); margin: 0 auto 32px; max-width: 560px; }
.hero .cta { display: flex; gap: 12px; justify-content: center; }
.hero .cta button { padding: 12px 22px; font-weight: 600; }
.features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; max-width: 1000px; margin: 24px auto 80px; padding: 0 24px;
}
.feature {
  border: 1px solid var(--border); border-radius: 14px; padding: 22px;
  background: var(--bg-sidebar);
}
.feature h3 { margin: 10px 0 6px; font-size: 16px; }
.feature p { margin: 0; color: var(--text-muted); font-size: 13.5px; }
.feature .ico { font-size: 22px; }
.changelog { max-width: 720px; margin: 0 auto 72px; padding: 0 24px; }
.changelog h2 { font-size: 22px; letter-spacing: -.02em; margin: 0 0 18px; }
.cl-entry { border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; margin-bottom: 12px; background: var(--bg-sidebar); }
.cl-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.cl-title { font-weight: 600; }
.cl-date { color: var(--text-faint); font-size: 12px; }
.cl-entry ul { margin: 4px 0 0; padding-left: 18px; color: var(--text-muted); font-size: 13.5px; }
.cl-entry li { margin: 2px 0; }
.cl-teaser-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.cl-teaser-head h2 { margin: 0; }
.cl-all { font-size: 13.5px; white-space: nowrap; }
.changelog-full { margin-top: 18px; }

/* help guide */
.help-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) 1fr; gap: 8px 14px; align-items: center; }
.help-code { margin: 0; font-size: 12px; white-space: pre-wrap; }
.help-desc { font-size: 13px; }

.landing-footer {
  margin-top: auto; border-top: 1px solid var(--border);
  padding: 22px 28px; color: var(--text-faint); font-size: 13px; text-align: center;
}
.footer-links { display: flex; gap: 18px; justify-content: center; margin-bottom: 8px; }
.footer-links a { color: var(--text-muted); }

/* legal pages */
.legal-page { min-height: 100%; display: flex; flex-direction: column; }
.legal-nav { display: flex; align-items: center; gap: 18px; padding: 18px 28px; max-width: 820px; margin: 0 auto; width: 100%; }
.legal-nav a { color: var(--text-muted); }
.legal-nav a:hover { color: var(--text); }
.legal { max-width: 760px; margin: 0 auto; padding: 44px 28px 80px; width: 100%; line-height: 1.7; }
.legal h1 { font-size: 30px; letter-spacing: -.02em; margin: 8px 0 6px; }
.legal h3 { margin: 1.6em 0 .4em; font-size: 16px; }
.legal a { color: var(--accent); }
.legal-cards { display: grid; gap: 12px; margin-top: 22px; }
.legal-card { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; background: var(--bg-sidebar); text-decoration: none; color: var(--text); }
.legal-card:hover { border-color: var(--accent); }

/* ---------------- MCP command reference (/docs/mcp) ---------------- */
.mcp-docs { max-width: 860px; }
.mcp-docs h1 { display: flex; align-items: center; gap: 12px; }
.mcp-h-ico { color: var(--accent); display: inline-flex; }
.mcp-h-ico svg { width: 26px; height: 26px; }
.mcp-lead { font-size: 15px; max-width: 60ch; }
.mcp-docs-body h2 { font-size: 20px; letter-spacing: -.02em; margin: 0 0 4px; display: flex; align-items: center; gap: 10px; }
.mcp-count { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); border: 1px solid var(--border); border-radius: 999px; padding: 1px 9px; font-weight: 400; }
.mcp-group-sub { margin: 0 0 16px; font-size: 13.5px; }
.mcp-group { margin-top: 36px; }

.mcp-connect { border: 1px solid var(--border); border-radius: 14px; padding: 20px 22px; background: var(--bg-sidebar); margin-top: 8px; }
.mcp-connect h2 { font-size: 18px; margin: 0 0 8px; }
.mcp-connect p { font-size: 13.5px; line-height: 1.65; margin: 8px 0 0; }
.mcp-endpoint { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; flex-wrap: wrap; }
.mcp-endpoint code { font-family: var(--font-mono); font-size: 13.5px; background: var(--bg); border: 1px solid var(--border); border-radius: 9px; padding: 8px 12px; color: var(--accent); flex: 1; min-width: 0; overflow-x: auto; }
.mcp-copy { padding: 8px 14px !important; font-size: 12.5px !important; }

.mcp-tools { display: grid; gap: 12px; }
.mcp-tool { border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; background: var(--bg-sidebar); }
.mcp-tool-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mcp-name { font-family: var(--font-mono); font-size: 14px; font-weight: 600; color: var(--text); }
.mcp-scope { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .06em; padding: 2px 9px 2px 7px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-muted); }
.mcp-scope .ico { display: inline-flex; }
.mcp-scope .ico svg { width: 13px; height: 13px; }
.mcp-scope-read { color: #5aa9e6; border-color: rgba(90,169,230,.4); }
.mcp-scope-write { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.mcp-desc { font-size: 13.5px; line-height: 1.6; margin: 8px 0 0; color: var(--text-muted); }

.mcp-params { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 12.5px; }
.mcp-params th { text-align: left; font-weight: 500; color: var(--text-faint); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; padding: 0 12px 6px 0; border-bottom: 1px solid var(--border); }
.mcp-params td { padding: 7px 12px 7px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.mcp-params tr:last-child td { border-bottom: none; }
.mcp-params td:nth-child(3) { width: 55%; line-height: 1.5; }
.mcp-params code { font-family: var(--font-mono); font-size: 12.5px; color: var(--text); }
.mcp-type { color: var(--text-faint) !important; }
.mcp-req { font-size: 10px; font-family: var(--font-mono); color: var(--accent); margin-left: 7px; text-transform: uppercase; letter-spacing: .04em; vertical-align: middle; }
.mcp-noargs { margin-top: 10px; font-size: 12.5px; }
.mcp-foot { margin-top: 32px; font-size: 12.5px; text-align: center; }

/* ---------------- How it works (/how-it-works) ---------------- */
.how-page { max-width: 760px; }
.how-page .kick { display: block; margin-bottom: 6px; }

/* ---- Pricing page ---- */
.pricing-page { max-width: 920px; }
.pricing-page .kick { display: block; margin-bottom: 6px; }
.pp-lead { font-size: 16px; line-height: 1.7; color: var(--text-muted); margin: 6px 0 28px; }
.pp-h2 { font-size: 22px; margin: 56px 0 18px; }
.pp-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 8px 0 8px; }
.pp-card { position: relative; border: 1px solid var(--border); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 10px; background: var(--surface, rgba(127,127,127,.03)); }
.pp-card.best { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: 0 8px 40px color-mix(in srgb, var(--accent) 10%, transparent); }
.pp-card .plan-name { font-size: 15px; font-weight: 650; }
.pp-card .plan-price { display: flex; align-items: baseline; gap: 4px; }
.pp-card .plan-price .amt { font-size: 38px; font-weight: 720; letter-spacing: -.02em; }
.pp-card .plan-price .per { color: var(--text-muted); font-size: 14px; }
.pp-card .plan-foot { font-size: 12.5px; min-height: 1em; }
.plan-badge { position: absolute; top: 16px; right: 16px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.cycle-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 2px; gap: 2px; align-self: flex-start; }
.cycle-btn { border: 0; background: none; color: var(--text-muted); font: inherit; font-size: 13px; padding: 5px 14px; border-radius: 999px; cursor: pointer; }
.cycle-btn.active { background: var(--accent); color: #fff; font-weight: 600; }
.pp-tag { color: var(--text-muted); font-size: 13.5px; margin: 2px 0 6px; line-height: 1.55; }
.pp-list { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pp-list li { position: relative; padding-left: 22px; font-size: 13.5px; line-height: 1.5; }
.pp-list li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.pp-card .btn { width: 100%; text-align: center; padding: 11px; }

.pp-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; }
.pp-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
.pp-table th { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--border); font-size: 13px; }
.pp-table th.pp-prem { color: var(--accent); }
.pp-table td { padding: 11px 18px; border-bottom: 1px solid var(--border); }
.pp-table td:nth-child(2), .pp-table td:nth-child(3), .pp-table th:nth-child(2), .pp-table th:nth-child(3) { text-align: center; width: 130px; }
.pp-table tr:last-child td { border-bottom: 0; }
.pp-table .pp-group td { background: var(--bg-hover); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); font-weight: 600; }
.pp-yes { color: var(--accent); font-weight: 700; }
.pp-no { color: var(--text-faint); }
.pp-pay { font-size: 12.5px; margin: 14px 2px 0; }

.pp-faq { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 32px; }
.pp-faq-item h4 { margin: 0 0 6px; font-size: 15px; }
.pp-faq-item p { margin: 0; font-size: 13.5px; line-height: 1.6; }

.pp-cta { margin: 56px 0 8px; text-align: center; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border)); border-radius: 18px; padding: 36px 24px; }
.pp-cta h3 { font-size: 22px; margin: 0 0 6px; }
.pp-cta-btns { display: flex; gap: 12px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }

@media (max-width: 720px) {
  .pp-cards { grid-template-columns: 1fr; }
  .pp-faq { grid-template-columns: 1fr; }
}
.how-lead { font-size: 16px; line-height: 1.7; color: var(--text-muted); margin: 6px 0 8px; }
.how-section { margin-top: 40px; }
.how-section h2 { font-size: 23px; letter-spacing: -.02em; margin: 0 0 12px; }
.how-section > p { line-height: 1.7; margin: 0 0 12px; }

.how-steps { display: grid; gap: 12px; margin-top: 8px; }
.how-step { display: flex; gap: 14px; align-items: flex-start; border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px; background: var(--bg-sidebar); }
.how-step-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: #fff;
  background: var(--accent); box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 45%, transparent); }
.how-step h4 { margin: 2px 0 4px; font-size: 15px; }
.how-step p { margin: 0; font-size: 13.5px; line-height: 1.6; }

.tok-viz { border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; margin-top: 16px;
  background: radial-gradient(120% 100% at 0% 0%, color-mix(in srgb, var(--accent) 7%, var(--bg-sidebar)), var(--bg-sidebar) 70%); }
.tok-viz-head { font-weight: 600; font-size: 13.5px; margin-bottom: 14px; }
.tok-row { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,2fr) auto; align-items: center; gap: 12px; margin: 9px 0; }
.tok-label { font-size: 12.5px; color: var(--text-muted); }
.tok-track { height: 12px; border-radius: 6px; background: color-mix(in srgb, var(--text-faint) 22%, transparent); overflow: hidden; }
.tok-fill { height: 100%; border-radius: 6px; }
.tok-fill.bad { background: linear-gradient(90deg, #c0563a, #e0734a); }
.tok-fill.good { background: linear-gradient(90deg, #3f9d6b, #54c08b); }
.tok-val { font-family: var(--font-mono); font-size: 12px; color: var(--text); white-space: nowrap; }
.tok-note { font-size: 12px; line-height: 1.55; margin-top: 12px; }

.how-list { margin: 8px 0 0; padding-left: 0; list-style: none; }
.how-list li { position: relative; padding: 7px 0 7px 22px; line-height: 1.6; font-size: 14px; border-bottom: 1px solid var(--border); }
.how-list li:last-child { border-bottom: none; }
.how-list li::before { content: ''; position: absolute; left: 4px; top: 14px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.how-example { border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; background: var(--bg-sidebar); }
.how-example > p:first-child { margin: 0 0 10px; }
.how-flow { margin: 0; padding-left: 20px; }
.how-flow li { margin: 5px 0; line-height: 1.6; font-size: 13.5px; color: var(--text-muted); }

.how-callout { border-left: 3px solid var(--accent); padding: 4px 0 4px 16px; }
.how-callout h3 { margin: 0 0 6px; font-size: 16px; }

.how-cta { margin: 56px 0 16px; text-align: center; border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--border));
  border-radius: 18px; background: var(--bg-sidebar); padding: 40px 28px; }
.how-cta h2 { font-size: 24px; letter-spacing: -.02em; margin: 0 0 8px; }
.how-cta-row { display: flex; gap: 18px; align-items: center; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.how-cta-link { color: var(--accent); font-size: 14px; }
.nav-link { color: var(--text-muted); font-size: 13.5px; margin-right: 4px; }
.nav-link:hover { color: var(--text); }

/* ---------------- Shared public chrome (nav + footer) ---------------- */
.public-nav { display: flex; align-items: center; gap: 14px; max-width: 1080px; margin: 0 auto; width: 100%; padding: 14px 28px; }
.public-nav .wordmark { display: inline-flex; align-items: center; }
.pnav-links { display: flex; align-items: center; gap: 2px; margin-left: 10px; }
.pnav-link { color: var(--text-muted); font-size: 13.5px; padding: 6px 11px; border-radius: 8px; }
.pnav-link:hover, .pnav-link.active { color: var(--text); background: rgba(255,255,255,.06); }
.public-nav .spacer { flex: 1; }
.public-nav .ghost, .public-nav .primary { padding: 8px 16px; border-radius: 10px; font-size: 13px; }

.public-footer { border-top: 1px solid var(--border); margin-top: auto; }
.pfoot-grid { max-width: 1080px; margin: 0 auto; width: 100%; padding: 44px 28px 18px; display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 28px; }
.pfoot-brand .muted { margin: 10px 0 0; font-size: 13px; max-width: 220px; line-height: 1.5; }
.pfoot-h { font-size: 11.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--text-faint); margin-bottom: 10px; }
.pfoot-col { display: flex; flex-direction: column; gap: 8px; }
.pfoot-col a { color: var(--text-muted); font-size: 13.5px; }
.pfoot-col a:hover { color: var(--text); }
.pfoot-base { max-width: 1080px; margin: 0 auto; width: 100%; padding: 16px 28px 30px; color: var(--text-faint); font-size: 12.5px; }
@media (max-width: 760px) {
  .pnav-links { display: none; }
  .pfoot-grid { grid-template-columns: 1fr 1fr; gap: 22px 18px; }
  .pfoot-brand { grid-column: 1 / -1; }
}

/* ---------------- Feature pages (/features, /features/<slug>) ---------------- */
.feat-page .legal-nav, .feat-page > header, .feat-page > section, .feat-page > .landing-footer { max-width: 1080px; margin-left: auto; margin-right: auto; width: 100%; }
.feat-page > header, .feat-page > section { padding-left: 28px; padding-right: 28px; }

.feat-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding-top: 56px; padding-bottom: 40px; }
.feat-hero h1 { font-size: 40px; line-height: 1.08; letter-spacing: -.03em; margin: 10px 0 14px; }
.feat-lead { font-size: 16.5px; line-height: 1.7; color: var(--text-muted); margin: 0; }
.feat-cta { display: flex; align-items: center; gap: 18px; margin-top: 24px; }
.feat-hero-art { position: relative; }
.feat-hero-img { width: 100%; border-radius: 18px; border: 1px solid var(--border); display: block;
  box-shadow: 0 30px 80px rgba(0,0,0,.5); animation: feat-float 7s ease-in-out infinite; }
@keyframes feat-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.feat-demo-sec { text-align: center; margin: 40px auto 24px; }
.feat-demo-sec .kick { display: block; margin-bottom: 16px; }
.feat-demo { display: flex; justify-content: center; }
.feat-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 52px auto; }
.feat-point { border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; background: var(--bg-sidebar); }
.feat-point-ico { display: inline-flex; color: var(--accent); margin-bottom: 8px; }
.feat-point-ico svg { width: 22px; height: 22px; }
.feat-point h3 { margin: 2px 0 6px; font-size: 16px; }
.feat-point p { margin: 0; font-size: 13.5px; line-height: 1.6; }

.feat-more { margin: 56px auto 0; }
.feat-more h2 { font-size: 20px; margin: 0 0 14px; }
.feat-more-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.feat-more-card { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 18px; background: var(--bg-sidebar); text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s; }
.feat-more-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.feat-more-title { font-weight: 600; font-size: 15px; }

/* feature-page CTA is a self-contained card, not a bare band */
.feat-page .how-cta { border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border)); border-radius: 20px;
  background: radial-gradient(110% 130% at 50% 0%, color-mix(in srgb, var(--accent) 14%, var(--bg-sidebar)), var(--bg-sidebar) 65%);
  padding: 48px 28px; margin: 64px auto 72px; }
.feat-page .how-cta h2 { font-size: 26px; }

.feat-hub-head { text-align: center; padding-top: 36px; }
.feat-hub-head h1 { font-size: 38px; letter-spacing: -.03em; margin: 10px 0 12px; }
.feat-hub-head .feat-lead { max-width: 640px; margin: 0 auto; }
.feat-hub-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 36px auto 20px; }
.feat-hub-card { display: flex; flex-direction: column; gap: 7px; border: 1px solid var(--border); border-radius: 16px;
  padding: 16px; background: var(--bg-sidebar); text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s; }
.feat-hub-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.feat-hub-art { height: 150px; border-radius: 10px; overflow: hidden; background: var(--bg); display: grid; place-items: center; margin-bottom: 6px; }
.feat-hub-title { font-weight: 600; font-size: 16px; letter-spacing: -.01em; }
.feat-hub-desc { font-size: 13px; line-height: 1.55; }

/* scroll-reveal */
.reveal-in { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal-in.in { opacity: 1; transform: none; }

/* ---- animated demos: one self-contained SVG per feature (viewBox 540×300) ---- */
.fdemo { width: min(540px, 100%); aspect-ratio: 540 / 300; border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
  background: radial-gradient(120% 100% at 30% 0%, color-mix(in srgb, var(--accent) 9%, var(--bg-sidebar)), var(--bg-sidebar) 70%); }
.fdemo.mini { width: 100%; height: 100%; aspect-ratio: auto; border: none; border-radius: 0; background: radial-gradient(120% 100% at 30% 0%, color-mix(in srgb, var(--accent) 10%, var(--bg)), var(--bg) 72%); }
.fdemo-svg { width: 100%; height: 100%; display: block; }
.fdemo-canvas { background-image: radial-gradient(circle, color-mix(in srgb, var(--text-faint) 24%, transparent) 1px, transparent 1px); background-size: 22px 22px; }
.fdemo text { fill: var(--text); font: 600 14px Inter, system-ui, sans-serif; text-anchor: middle; dominant-baseline: middle; }

/* canvas demo */
.fc-edge { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 260; stroke-dashoffset: 260; animation: fc-draw 4.4s ease-in-out infinite; }
.fc-edge.d2 { animation-delay: .7s; }
@keyframes fc-draw { 0% { stroke-dashoffset: 260; opacity: .15; } 40%,72% { stroke-dashoffset: 0; opacity: .95; } 100% { stroke-dashoffset: 0; opacity: .15; } }
.fc-node rect { fill: var(--bg-sidebar); stroke: var(--border); stroke-width: 1; }
.fc-node.n2 rect { stroke: var(--accent); } .fc-node.n3 rect { stroke: #5aa9e6; }
.fc-node { animation: fc-bob 6s ease-in-out infinite; }
.fc-node.n2 { animation-delay: .5s; } .fc-node.n3 { animation-delay: 1s; }
@keyframes fc-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

/* kanban demo */
.fk-colbg { fill: rgba(0,0,0,.22); stroke: var(--border); stroke-width: 1; }
.fdemo .fk-h { fill: var(--text-muted); font: 600 13px Inter, system-ui, sans-serif; text-anchor: start; dominant-baseline: alphabetic; }
.fk-card rect:first-child { fill: color-mix(in srgb, var(--text) 8%, var(--bg-sidebar)); stroke: var(--border); stroke-width: 1; }
.fdemo .fk-label { fill: var(--text); font: 500 12.5px Inter, system-ui, sans-serif; text-anchor: start; }
.fk-flier { animation: fk-fly 4.8s cubic-bezier(.5,0,.3,1) infinite; }
.fk-flier rect:first-child { filter: drop-shadow(0 8px 14px rgba(0,0,0,.45)); }
@keyframes fk-fly {
  0%, 12% { transform: translate(33px,152px); opacity: 0; }
  24% { opacity: 1; }
  55%, 82% { transform: translate(210px,108px); opacity: 1; }
  100% { transform: translate(210px,108px); opacity: 0; }
}

/* graph demo */
.fg-edges line { stroke: color-mix(in srgb, var(--accent) 50%, transparent); stroke-width: 1.5; animation: fg-line 4s ease-in-out infinite; }
@keyframes fg-line { 0%,100% { opacity: .25; } 50% { opacity: .8; } }
.fg-node { fill: var(--accent); transform-box: fill-box; transform-origin: center; filter: drop-shadow(0 0 7px var(--accent)); animation: fg-pulse 3s ease-in-out infinite; animation-delay: calc(var(--i,0) * .4s); }
.fg-node.b { fill: #5aa9e6; filter: drop-shadow(0 0 7px #5aa9e6); }
.fg-node.d { fill: #8e7dbe; filter: drop-shadow(0 0 7px #8e7dbe); }
@keyframes fg-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.18); } }

@media (max-width: 860px) {
  .feat-hero { grid-template-columns: 1fr; gap: 24px; }
  .feat-points, .feat-hub-grid { grid-template-columns: 1fr; }
  .feat-more-row { grid-template-columns: 1fr; }
  .feat-hero h1 { font-size: 32px; }
}

/* ---------------- Brand & Media Kit (/brand) ---------------- */
.mono { font-family: var(--font-mono); }
.kick { font-family: var(--font-mono); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--text-faint); }
.legal-page:has(.brandkit) .legal-nav { max-width: 1080px; }
.brandkit-wrap { max-width: 1080px; margin: 0 auto; width: 100%; padding: 36px 28px 80px; }
.brandkit h1 { font-size: 40px; letter-spacing: -.03em; margin: 12px 0 12px; }
.brandkit h2 { font-size: 24px; letter-spacing: -.02em; margin: 0 0 16px; }
.bk-sec { padding: 40px 0; border-top: 1px solid var(--border); }
.bk-hero { display: flex; gap: 32px; align-items: center; padding: 28px 0 8px; }
.bk-hero-mark { width: 104px; height: 104px; flex: none; }
.bk-hero-mark svg, .bk-logo-lg { width: 100%; height: 100%; display: block; }
.bk-hero p { max-width: 620px; line-height: 1.65; margin: 6px 0 18px; }
.bk-hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.bk-btn { display: inline-flex; align-items: center; padding: 11px 18px; border-radius: 9px; font-weight: 600; font-size: 13.5px; text-decoration: none; }
.bk-btn.primary { background: var(--accent); border: 1px solid var(--accent); color: #1a0e09; }
.bk-btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.bk-btn.ghost { border: 1px solid var(--border); color: var(--text); }
.bk-btn.ghost:hover { border-color: var(--accent); color: var(--text); }
.bk-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.bk-card { border: 1px solid var(--border); border-radius: 14px; background: var(--bg-sidebar); padding: 22px; }
.bk-card .kick { margin-bottom: 16px; }
.bk-show { border-radius: 10px; display: grid; place-items: center; padding: 38px; min-height: 150px; }
.bk-show.dark { background: #1E1E1E; border: 1px solid var(--border); }
.bk-show.light { background: #F4F1EC; border: 1px solid #d9d3ca; }
.bk-logo-lg { width: 104px; height: 104px; }
.bk-toks { display: flex; flex-direction: column; }
.bk-tok { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.bk-tok:last-child { border-bottom: none; }
.bk-sw { width: 40px; height: 40px; border-radius: 8px; border: 1px solid rgba(255,255,255,.08); flex: none; }
.bk-tok-name { font-size: 13px; font-weight: 500; }
.bk-tok-note { color: var(--text-muted); font-size: 12px; }
.bk-tok-hex { margin-left: auto; color: var(--text-muted); font-size: 12.5px; }
.bk-type-sample { padding: 8px 0 4px; }
.bk-type-note { font-size: 13px; margin: 12px 0 0; }
.bk-downloads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.bk-dl { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-sidebar); padding: 14px 16px; text-decoration: none; color: var(--text); }
.bk-dl:hover { border-color: var(--accent); }
.bk-dl-label { font-size: 13.5px; }
.bk-dl-fmt { color: var(--text-faint); font-size: 11px; }
.bk-rules { margin: 0; padding-left: 18px; line-height: 1.7; color: var(--text-muted); font-size: 13.5px; }
.bk-rules li { margin: 6px 0; }
.bk-rules.ok li::marker { color: var(--accent); }
.bk-rules.no li::marker { color: var(--danger); }
@media (max-width: 720px) {
  .bk-hero { flex-direction: column; text-align: center; align-items: center; }
  .bk-grid-2, .bk-downloads { grid-template-columns: 1fr; }
}

/* hero badge + visual */
.hero-badge { display: inline-block; font-size: 12px; color: var(--accent); background: var(--bg-active); border: 1px solid rgba(232,99,60,.3); padding: 5px 12px; border-radius: 999px; margin-bottom: 20px; }
.hero-visual { margin: 48px auto 0; max-width: 760px; }
.mock { border: 1px solid var(--border); border-radius: 12px; background: var(--bg-sidebar); box-shadow: var(--shadow); text-align: left; overflow: hidden; }
.mock-app { display: grid; grid-template-columns: 130px 1fr 120px; min-height: 220px; }
.mock-side, .mock-right { background: var(--bg); border-right: 1px solid var(--border); padding: 10px 8px; }
.mock-right { border-right: none; border-left: 1px solid var(--border); }
.mock-main { padding: 16px 18px; }
.mock-row { font-size: 12px; color: var(--text-muted); padding: 5px 7px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-row.active { background: var(--bg-active); color: var(--text); }
.mock-h { font-family: ui-monospace, monospace; color: var(--text); font-size: 14px; margin-bottom: 10px; }
.mock-p { font-size: 13px; color: var(--text-muted); margin: 6px 0; }
.mock-label { font-size: 10px; letter-spacing: .08em; color: var(--text-faint); margin-bottom: 6px; }
.lk { color: var(--accent); }
.tg { color: #4caf7d; }
.mock-callout { margin-top: 12px; border-left: 3px solid var(--accent); background: var(--bg-active); border-radius: 6px; padding: 7px 10px; font-size: 12px; color: var(--text-muted); }
.mock-note, .mock-search, .mock-mcp { padding: 16px 18px; min-height: 150px; }
.mock-suggest { position: relative; margin-top: 12px; font-family: ui-monospace, monospace; font-size: 13px; }
.mock-pop { position: absolute; top: 22px; left: 0; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 11px; color: var(--text-muted); box-shadow: var(--shadow); }
.mock-graph { min-height: 180px; display: grid; place-items: center; padding: 12px; }
.mock-input { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.mock-res { padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.mock-res b { color: var(--text); margin-right: 8px; } .mock-res span { color: var(--text-faint); }
.mock-mcp { font-family: ui-monospace, monospace; font-size: 12.5px; }
.mock-line { padding: 4px 0; color: var(--text-muted); } .mock-line.dim { color: var(--text-faint); }
.mt { color: var(--accent); }

/* value props */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; max-width: 1040px; margin: 84px auto; padding: 0 24px; }
.value { border: 1px solid var(--border); border-radius: 16px; padding: 24px 22px; background: var(--bg-sidebar); transition: transform .25s ease, border-color .25s ease; }
.value:hover { transform: translateY(-4px); border-color: rgba(232,99,60,.45); }
.value .ico { width: 72px; height: 72px; border-radius: 18px; overflow: hidden; border: 1px solid var(--border); box-shadow: 0 6px 20px rgba(232,99,60,.18); }
.value .ico img { width: 100%; height: 100%; object-fit: cover; display: block; }
.value h3 { margin: 16px 0 6px; font-size: 17px; }
.value p { margin: 0; color: var(--text-muted); font-size: 14px; line-height: 1.6; }

/* shared section heading */
.section-head { max-width: 1040px; margin: 0 auto 32px; padding: 0 24px; text-align: center; }
.section-head h2 { font-size: 30px; letter-spacing: -.02em; margin: 0 0 8px; }
.section-head .muted { margin: 0; font-size: 15px; }

/* stats band */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  max-width: 980px; margin: 64px auto; padding: 22px 24px;
  border: 1px solid var(--border); border-radius: 18px;
  background: linear-gradient(180deg, var(--bg-sidebar), transparent);
}
.stat { text-align: center; }
.stat-num {
  font-size: 34px; font-weight: 700; letter-spacing: -.02em; line-height: 1;
  background: linear-gradient(180deg, #fff, #F4A24A);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-label { color: var(--text-muted); font-size: 13px; margin-top: 6px; }

/* spotlight cards */
.spotlight { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 1040px; margin: 44px auto 8px; padding: 0 24px; }
.spot { border: 1px solid var(--border); border-radius: 20px; overflow: hidden; background: var(--bg-sidebar); transition: transform .3s ease, border-color .3s ease; }
.spot:hover { transform: translateY(-5px); border-color: rgba(232,99,60,.4); }
.spot-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.spot-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.spot-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, var(--bg-sidebar)); }
.spot-body { padding: 20px 24px 26px; }
.eyebrow { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.spot-body h3 { font-size: 21px; letter-spacing: -.02em; margin: 8px 0; }
.spot-body p { color: var(--text-muted); font-size: 14.5px; line-height: 1.65; margin: 0; }

/* feature grid */
.feat-section { max-width: 1040px; margin: 96px auto; }
.feat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 0 24px; }
.feat-card {
  display: flex; gap: 13px; align-items: flex-start; padding: 18px 16px;
  border: 1px solid var(--border); border-radius: 14px; background: var(--bg-sidebar);
  transition: transform .2s ease, border-color .2s ease;
}
.feat-card:hover { transform: translateY(-3px); border-color: rgba(232,99,60,.4); }
.feat-card .fi {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  color: var(--accent); background: var(--bg-active); border: 1px solid rgba(232,99,60,.25);
}
.feat-card .fi svg { width: 20px; height: 20px; }
.feat-card h4 { margin: 1px 0 3px; font-size: 14.5px; }
.feat-card p { margin: 0; color: var(--text-muted); font-size: 12.8px; line-height: 1.5; }

/* how it works */
.how { max-width: 1040px; margin: 96px auto; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 0 24px; }
.step { text-align: center; padding: 8px 14px; }
.step-num {
  width: 44px; height: 44px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; color: #fff; background: linear-gradient(160deg, var(--accent), #C24322); box-shadow: 0 8px 24px rgba(232,99,60,.35);
}
.step h4 { margin: 0 0 6px; font-size: 17px; }
.step p { margin: 0; color: var(--text-muted); font-size: 14px; line-height: 1.6; }

/* AI / MCP panel */
.mcp-panel {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 36px; align-items: center;
  max-width: 1040px; margin: 96px auto; padding: 28px; border: 1px solid var(--border); border-radius: 22px;
  background: radial-gradient(120% 120% at 0% 0%, rgba(232,99,60,.12), transparent 60%), var(--bg-sidebar);
}
.mcp-media img { width: 100%; border-radius: 16px; display: block; box-shadow: 0 18px 50px rgba(0,0,0,.45); border: 1px solid var(--border); }
.mcp-body h2 { font-size: 26px; letter-spacing: -.02em; margin: 10px 0; }
.mcp-body > p { color: var(--text-muted); font-size: 14.5px; line-height: 1.7; margin: 0 0 16px; }
.code-block { font-family: ui-monospace, monospace; font-size: 12.5px; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 18px; overflow-x: auto; }
.code-line { white-space: nowrap; padding: 3px 0; }
.tok-fn { color: var(--accent); } .tok-arg { color: var(--text-muted); } .tok-res { color: var(--text-faint); }

/* audience */
.audience { max-width: 820px; margin: 96px auto; padding: 0 24px; text-align: center; }
.audience h2 { font-size: 26px; letter-spacing: -.02em; margin: 0 0 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.chip { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-sidebar); font-size: 14px; color: var(--text-muted); }

/* FAQ */
.faq { max-width: 1040px; margin: 96px auto; padding: 0 24px; }
.faq .section-head { padding: 0; }
.faq-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; align-items: start; }
.faq-item { border: 1px solid var(--border); border-radius: 12px; background: var(--bg-sidebar); overflow: hidden; }
.faq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; font-weight: 600; font-size: 15px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-mark { color: var(--accent); font-size: 20px; line-height: 1; transition: transform .2s ease; }
.faq-item[open] .faq-mark { transform: rotate(45deg); }
.faq-a { padding: 0 18px 16px; color: var(--text-muted); font-size: 14px; line-height: 1.7; }

/* final CTA panel */
.cta-panel {
  max-width: 1040px; margin: 96px auto; padding: 56px 32px; text-align: center;
  border: 1px solid rgba(232,99,60,.3); border-radius: 24px;
  background: radial-gradient(100% 140% at 50% 0%, rgba(232,99,60,.18), transparent 60%), var(--bg-sidebar);
}
.cta-panel h2 { font-size: 32px; letter-spacing: -.02em; margin: 0 0 10px; }
.cta-panel > p { color: var(--text-muted); margin: 0 0 22px; font-size: 16px; }
.cta-panel button { padding: 13px 26px; font-weight: 600; }
.cta-note { margin-top: 16px; font-size: 12.5px; color: var(--text-faint); }

/* site footer (landing) */
.site-footer { margin-top: auto; border-top: 1px solid var(--border); padding: 48px 28px 28px; }
.foot-grid { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.foot-brand .muted { margin: 10px 0 0; font-size: 13px; max-width: 220px; }
.foot-col { display: flex; flex-direction: column; gap: 8px; }
.foot-h { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 2px; }
.foot-col a { color: var(--text-muted); font-size: 14px; }
.foot-col a:hover { color: var(--accent); }
.foot-col .small { font-size: 12px; }
.foot-base { max-width: 1040px; margin: 32px auto 0; padding-top: 20px; border-top: 1px solid var(--border); color: var(--text-faint); font-size: 13px; text-align: center; }

@media (max-width: 980px) {
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .hero h1 { font-size: 38px; }
  .mock-app { grid-template-columns: 1fr; } .mock-side, .mock-right { display: none; }
  .values { grid-template-columns: 1fr; gap: 16px; margin: 48px auto; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .spotlight { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 14px; }
  .mcp-panel { grid-template-columns: 1fr; gap: 22px; }
  .faq-list { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  .feat-grid { grid-template-columns: 1fr; }
}

/* ---------------- Auth ---------------- */
.auth-wrap { min-height: 100%; display: grid; place-items: center; padding: 40px 16px; }
.auth-card {
  width: 100%; max-width: 400px; background: var(--bg-sidebar);
  border: 1px solid var(--border); border-radius: 16px; padding: 32px;
  box-shadow: var(--shadow);
}
.auth-card h1 { font-size: 22px; margin: 14px 0 4px; }
.auth-card .sub { color: var(--text-muted); margin: 0 0 22px; font-size: 14px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.auth-card button[type="submit"] { width: 100%; padding: 11px; font-weight: 600; margin-top: 4px; }
.auth-alt { margin-top: 18px; font-size: 13px; color: var(--text-muted); text-align: center; }
.cf-turnstile { margin: 6px 0 14px; min-height: 65px; }
.oauth-divider { display: flex; align-items: center; gap: 10px; margin: 16px 0; color: var(--text-faint); font-size: 12px; }
.oauth-divider::before, .oauth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.oauth-btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; font-weight: 500; }
.banner {
  border-radius: 10px; padding: 12px 14px; font-size: 13px; margin-bottom: 16px;
  border: 1px solid var(--border);
}
.banner.ok { border-color: rgba(232,99,60,.4); background: var(--bg-active); }
.banner.warn { border-color: rgba(229,84,75,.4); background: rgba(229,84,75,.08); }
.check-row { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.check-row input { width: auto; }

/* ---------------- Workspace (3-pane) ---------------- */
.ws { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: 1fr auto; height: 100%; }
.ws-scrim { display: none; }   /* mobile-only backdrop (shown in the media query) */
.ws.left-collapsed { grid-template-columns: 0 1fr auto; }
.ws.right-collapsed { grid-template-columns: auto 1fr 0; }

.sidebar {
  background: var(--bg-sidebar); border-right: 1px solid var(--border);
  width: 270px; display: flex; flex-direction: column; overflow: hidden;
}
.sidebar.right { border-right: none; border-left: 1px solid var(--border); width: 290px; }
.ws.left-collapsed .sidebar.left,
.ws.right-collapsed .sidebar.right { width: 0; border: none; }

.sb-tabs { display: flex; gap: 2px; padding: 8px; border-bottom: 1px solid var(--border); }
.sb-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.sb-head .title { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); }
.sb-body { overflow-y: auto; flex: 1; padding: 4px 6px 16px; }

.center { display: flex; flex-direction: column; min-width: 0; }
.tabbar {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border-bottom: 1px solid var(--border); min-height: 46px;
}
.tabbar .note-title { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 4px; }
.tabbar .save-state { font-size: 12px; color: var(--text-faint); white-space: nowrap; }
/* open-note tabs */
.tabstrip { flex: 1; display: flex; align-items: center; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.tabstrip::-webkit-scrollbar { height: 4px; }
.tab {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; max-width: 200px;
  padding: 4px 6px 4px 10px; border-radius: 6px; cursor: pointer; font-size: 13px;
  color: var(--text-faint); border: 1px solid transparent;
}
.tab:hover { background: var(--bg-hover); color: var(--text); }
.tab.active { background: var(--bg-active, var(--bg-hover)); color: var(--text); font-weight: 600; border-color: var(--border); }
.tab.side { box-shadow: inset 2px 0 0 var(--accent); }
.tab-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab-close { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 15px; line-height: 1; padding: 0 2px; border-radius: 4px; opacity: .55; }
.tab-close:hover { opacity: 1; background: var(--border); }
.editor-host { flex: 1; min-height: 0; display: flex; position: relative; }
.editor-host > * { flex: 1 1 auto; min-width: 0; min-height: 0; }
.cm-pane, .preview-pane { overflow: auto; min-width: 0; }
.preview-pane { padding: 28px 36px; }

/* tiled split panes */
.pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; overflow: hidden; }
.pane-body { flex: 1; min-height: 0; display: flex; overflow: hidden; position: relative; }
.pane-body > * { flex: 1 1 auto; min-width: 0; }
.pane-head {
  display: none; align-items: center; gap: 8px; padding: 5px 6px 5px 12px; min-height: 31px;
  border-bottom: 1px solid var(--border); background: var(--bg-sidebar); flex: none;
}
.editor-host.paned .pane-head { display: flex; }
.pane-title { flex: 1; font-weight: 600; font-size: 12.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pane.active .pane-title { color: var(--text); }
.editor-host.paned .pane.active > .pane-head { box-shadow: inset 0 2px 0 var(--accent); }
.pane-close { border: none; background: none; color: var(--text-faint); cursor: pointer; font-size: 16px; line-height: 1; padding: 2px 7px; border-radius: 6px; }
.pane-close:hover { background: var(--bg-active); color: var(--text); }

.pane-split { display: flex; min-width: 0; min-height: 0; }
.pane-split.row { flex-direction: row; }
.pane-split.col { flex-direction: column; }
.pane-split > .pane, .pane-split > .pane-split { flex: 1 1 50%; min-width: 0; min-height: 0; }
.pane-divider { flex: none; background: var(--border); transition: background .12s ease; }
.pane-divider.v { width: 5px; cursor: col-resize; }
.pane-divider.h { height: 5px; cursor: row-resize; }
.pane-divider:hover, .pane-divider.dragging { background: var(--accent); }

/* drag-a-tab drop zones */
.pane-drop { position: absolute; inset: 0; pointer-events: none; z-index: 6; display: none; }
.pane-drop.show { display: block; }
.pane-drop.show::after {
  content: ''; position: absolute; border-radius: 8px; transition: all .07s ease;
  background: color-mix(in srgb, var(--accent) 20%, transparent); border: 2px solid var(--accent);
}
.pane-drop.zone-center::after { inset: 10px; }
.pane-drop.zone-left::after { top: 10px; bottom: 10px; left: 10px; width: 46%; }
.pane-drop.zone-right::after { top: 10px; bottom: 10px; right: 10px; width: 46%; }
.pane-drop.zone-up::after { left: 10px; right: 10px; top: 10px; height: 46%; }
.pane-drop.zone-down::after { left: 10px; right: 10px; bottom: 10px; height: 46%; }

.tab.shown { box-shadow: inset 0 -2px 0 var(--accent); }
.empty-state { display: grid; place-items: center; height: 100%; width: 100%; color: var(--text-faint); text-align: center; padding: 40px; }

/* note-toolbar overflow menu: the "⋯" button only appears on mobile */
.tb-more { display: none; }
.popmenu { position: fixed; z-index: 80; min-width: 188px; padding: 6px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-sidebar); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; }
.popmenu-item { display: block; width: 100%; text-align: left; background: none; border: none; border-radius: 8px; padding: 9px 12px; font-size: 14px; color: var(--text); }
.popmenu-item:hover { background: var(--bg-hover); }
.popmenu-item.danger { color: var(--danger); }
.popmenu-item.danger:hover { background: rgba(229,84,75,.12); }

/* responsive app: sidebars become overlays on small screens */
@media (max-width: 720px) {
  .ws { grid-template-columns: 1fr; }
  .sidebar { position: fixed; top: 0; bottom: 30px; z-index: 40; width: 80%; max-width: 300px; box-shadow: var(--shadow); transition: transform .2s; }
  .sidebar.left { left: 0; border-right: 1px solid var(--border); }
  .sidebar.right { right: 0; left: auto; }
  .ws.left-collapsed .sidebar.left { transform: translateX(-101%); }
  .ws.right-collapsed .sidebar.right { transform: translateX(101%); }
  .ws .sidebar.left, .ws .sidebar.right { width: 84%; max-width: 340px; }

  /* dimmed tap-to-close backdrop behind an open sidebar overlay */
  .ws-scrim { display: block; position: fixed; inset: 0; z-index: 35;
    background: rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .ws:not(.left-collapsed) .ws-scrim,
  .ws:not(.right-collapsed) .ws-scrim { opacity: 1; pointer-events: auto; }
  .cm-editor .cm-content, .preview-pane { padding: 16px; }
  /* panes are desktop-only; if a split survives a resize, stack it and hide chrome */
  .pane-split { flex-direction: column; }
  .pane-divider { display: none; }
  .editor-host.paned .pane-head { display: none; }
  .tab { max-width: 140px; }

  /* declutter the note toolbar: secondary actions move into the ⋯ menu */
  .tb-extra { display: none; }
  .tb-more { display: inline-flex; }

  /* declutter the status bar so nothing (esp. Sign out) overflows off-screen */
  .statusbar { gap: 4px; padding: 0 8px; overflow: hidden; }
  .statusbar .sb-count, .statusbar .wc, .statusbar .sb-name,
  .statusbar .sb-help, .statusbar .sb-extra { display: none; }
  .statusbar select { max-width: 38vw; }
  .statusbar .badge-premium { padding: 4px 6px; }
  .statusbar .badge-premium .badge-label { display: none; }
  .statusbar .icon-btn { padding: 4px 6px; flex: none; }
  .statusbar .sb-signout { flex: none; }
}

/* status bar */
.statusbar {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 16px;
  border-top: 1px solid var(--border); background: var(--bg-sidebar);
  padding: 4px 14px; font-size: 12px; color: var(--text-faint);
}

/* file tree */
.tree-item, .list-row {
  display: flex; align-items: center; gap: 6px; padding: 5px 8px;
  border-radius: 6px; cursor: pointer; color: var(--text-muted); user-select: none;
  font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tree-item:hover, .list-row:hover { background: var(--bg-hover); color: var(--text); }
.tree-item.active { background: var(--bg-active); color: var(--text); }
.tree-folder > .tree-item { color: var(--text); font-weight: 500; }
.tree-children { margin-left: 12px; border-left: 1px solid var(--border); padding-left: 4px; }
.tag-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px;
  background: var(--bg-active); color: var(--accent); border-radius: 999px; font-size: 12px; cursor: pointer;
}
.tag-node .tag-edit { width: 22px; height: 22px; font-size: 13px; opacity: 0; }
.tag-node:hover .tag-edit { opacity: 1; }

.search-input { margin: 4px 8px 10px; }
.result {
  padding: 9px 10px; border-radius: 8px; cursor: pointer; margin-bottom: 4px;
  border: 1px solid transparent;
}
.result:hover { background: var(--bg-hover); }
.result .r-title { font-size: 13.5px; color: var(--text); font-weight: 500; }
.result .r-snip { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; }
.result .r-meta { font-size: 11.5px; color: var(--text-faint); margin-top: 5px; display: flex; gap: 8px; }

/* rendered markdown */
.md { color: var(--text); }
.md h1,.md h2,.md h3 { line-height: 1.25; margin: 1.2em 0 .5em; letter-spacing: -.01em; }
.md h1 { font-size: 1.8em; } .md h2 { font-size: 1.45em; } .md h3 { font-size: 1.2em; }
.md p { margin: .6em 0; }
.md a.wikilink { border-bottom: 1px dashed var(--accent); }
.md a.wikilink.missing { color: var(--text-faint); border-color: var(--text-faint); }
.md code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--bg-hover); padding: .15em .35em; border-radius: 4px; font-size: .9em; }
.md pre { background: var(--bg-sidebar); border: 1px solid var(--border); padding: 14px; border-radius: 10px; overflow: auto; }
.md pre code { background: none; padding: 0; }
.md blockquote { border-left: 3px solid var(--accent); margin: .8em 0; padding: .2em 0 .2em 14px; color: var(--text-muted); }
.md ul, .md ol { padding-left: 1.4em; }
.md hr { border: none; border-top: 1px solid var(--border); margin: 1.4em 0; }
.md table { border-collapse: collapse; } .md th, .md td { border: 1px solid var(--border); padding: 6px 10px; }
.md img { max-width: 100%; height: auto; border-radius: 8px; }

/* rich media embeds */
.md .embed-frame { position: relative; width: 100%; max-width: 720px; margin: .9em 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: #000; aspect-ratio: 16 / 9; }
.md .embed-frame.prov-spotify, .md .embed-frame.prov-soundcloud { aspect-ratio: auto; background: transparent; border: 0; }
.md .embed-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.md .embed-video { max-width: 720px; width: 100%; border-radius: 12px; margin: .9em 0; display: block; background: #000; }
.md .embed-audio { width: 100%; max-width: 480px; margin: .7em 0; display: block; }

/* highlight */
.md mark { background: color-mix(in srgb, var(--accent) 32%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; }

/* task list */
.md li.task-item { list-style: none; margin-left: -1.2em; }
.md .task-check { display: inline-block; width: 15px; height: 15px; border: 1.5px solid var(--text-faint); border-radius: 4px; vertical-align: -3px; margin-right: 4px; position: relative; }
.md .task-check.checked { background: var(--accent); border-color: var(--accent); }
.md .task-check.checked::after { content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* callouts */
.md .callout {
  border: 1px solid var(--border); border-left: 3px solid var(--co, var(--accent));
  background: color-mix(in srgb, var(--co, var(--accent)) 8%, transparent);
  border-radius: 8px; padding: 10px 14px; margin: .8em 0;
}
.md .callout > p:first-child, .md .callout > .callout-title + p { margin-top: 0; }
.md .callout-title { font-weight: 600; color: var(--co, var(--accent)); margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.md .callout-ico::before { content: "●"; font-size: 10px; }
.callout-note, .callout-info, .callout-todo { --co: #5b8def; }
.callout-tip, .callout-success, .callout-check, .callout-done { --co: #4caf7d; }
.callout-warning, .callout-caution, .callout-attention { --co: #e0a32e; }
.callout-danger, .callout-error, .callout-failure, .callout-fail, .callout-bug, .callout-missing { --co: #e5544b; }
.callout-question, .callout-help, .callout-faq { --co: #d98c2b; }
.callout-quote, .callout-cite, .callout-example, .callout-abstract, .callout-summary { --co: #9a7dff; }

/* transclusion embeds */
.md .embed { border: 1px solid var(--border); border-radius: 8px; margin: .8em 0; overflow: hidden; background: var(--bg-sidebar); }
.md .embed-title { font-size: 12px; color: var(--text-muted); padding: 6px 12px; border-bottom: 1px solid var(--border); cursor: pointer; }
.md .embed-title:hover { color: var(--accent); }
.md .embed-body { padding: 4px 14px 10px; }
.md .embed-missing { padding: 8px 12px; color: var(--text-faint); font-size: 13px; }

.sb-subhead { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); padding: 10px 8px 4px; }

/* properties panel */
.props-body { padding: 6px 8px 12px; }
.prop-row { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.prop-key { flex: 0 0 70px; font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prop-input { flex: 1; padding: 4px 7px; font-size: 12.5px; border-radius: 6px; }
.prop-row .icon-btn { width: 22px; height: 22px; font-size: 15px; }

/* CodeMirror tuning */
.cm-editor { height: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; }
.cm-editor .cm-content { padding: 24px 32px; max-width: 820px; }
.cm-editor.cm-focused { outline: none; }
.cm-pane.fallback textarea {
  width: 100%; height: 100%; border: none; border-radius: 0; resize: none;
  padding: 24px 32px; font-family: ui-monospace, monospace; background: var(--bg);
}

/* modal / palette */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: grid; place-items: start center; padding-top: 12vh; z-index: 50; }
.palette { width: 100%; max-width: 560px; background: var(--bg-sidebar); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.palette input { border: none; border-bottom: 1px solid var(--border); border-radius: 0; padding: 14px 16px; }
.palette input:focus { box-shadow: none; }
.palette-list { max-height: 360px; overflow-y: auto; padding: 6px; }
.palette-item { padding: 9px 12px; border-radius: 8px; cursor: pointer; display: flex; gap: 10px; align-items: center; }
.palette-item.sel { background: var(--bg-active); }
.palette-item .hint { margin-left: auto; color: var(--text-faint); font-size: 12px; }

/* public share viewer */
.share-page { max-width: 760px; margin: 0 auto; padding: 0 24px 80px; }
.share-head { display: flex; align-items: center; gap: 12px; padding: 22px 0; border-bottom: 1px solid var(--border); margin-bottom: 32px; }
.share-main { font-size: 15px; line-height: 1.7; }
.share-error { color: var(--text-muted); padding: 40px 0; text-align: center; }
.share-lock { max-width: 340px; margin: 48px auto; display: flex; flex-direction: column; gap: 12px; text-align: center; }
.share-lock-title { font-size: 18px; font-weight: 650; }
.share-lock-note { color: var(--text-muted); font-size: 14px; margin: 0; }
.share-lock input { padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface, #1a1a1a); color: inherit; font-size: 15px; }
.share-lock button { padding: 10px 12px; border: 0; border-radius: 8px; background: var(--accent, #6c8cff); color: #fff; font-weight: 600; cursor: pointer; }
.share-lock button:disabled { opacity: .6; cursor: default; }
.share-lock-err { color: #e06c75; font-size: 13px; min-height: 1em; }
/* Share modal (in-app): password row + protected badge */
.share-pw-row { display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; }
.share-pw-row .share-pw-ico { width: 16px; height: 16px; flex: 0 0 auto; opacity: .7; }
.share-pw { flex: 1; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: transparent; color: inherit; font-size: 14px; }
.share-pw:disabled { opacity: .55; }
.share-pw-up { font-size: 13px; white-space: nowrap; }
.share-lock-badge { display: inline-flex; align-items: center; opacity: .7; }
.share-lock-badge svg { width: 15px; height: 15px; }
.share-item { margin-bottom: 12px; }
.share-stats { display: flex; align-items: center; gap: 5px; font-size: 12px; margin: 4px 2px 0; }
.share-stats .share-stat-ico { width: 13px; height: 13px; opacity: .7; }
/* Version-history retention banner */
.retention-note { display: flex; flex-wrap: wrap; gap: 4px; align-items: baseline; font-size: 13px; color: var(--text-muted);
  padding: 8px 10px; margin-bottom: 10px; border: 1px solid var(--border); border-radius: 8px; background: rgba(127,127,127,.06); }
.retention-note a { font-weight: 600; }
.trash-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Web-clipper capture page */
.capture-page { max-width: 560px; margin: 0 auto; padding: 0 18px 40px; }
.capture-main { margin-top: 18px; }
.capture-card { display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--border); border-radius: 12px; padding: 20px; background: var(--surface, rgba(127,127,127,.04)); }
.capture-title { font-size: 18px; font-weight: 650; }
.capture-note { color: var(--text-muted); margin: 0; }
.capture-label { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-top: 4px; }
.capture-input { width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; background: transparent; color: inherit; font: inherit; font-size: 14px; box-sizing: border-box; }
.capture-text { resize: vertical; min-height: 96px; }
.capture-url { font-size: 12px; color: var(--text-muted); word-break: break-all; }
.capture-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.capture-radio { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.capture-actions { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.capture-status { font-size: 13px; }
.capture-status.ok { color: #4caf78; }
.capture-status.err { color: #e06c75; }

/* graph + settings modals */
.graph-modal, .settings-modal {
  width: min(900px, 92vw); height: min(620px, 88vh);
  background: var(--bg-sidebar); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden;
}
.graph-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.graph-head .title { font-weight: 600; }
.graph-modal.graph { background: radial-gradient(120% 90% at 50% -10%, color-mix(in srgb, var(--accent) 8%, var(--bg-sidebar)), var(--bg-sidebar) 70%); }
.graph-stage { position: relative; flex: 1; min-height: 0; }
.graph-canvas { width: 100%; height: 100%; display: block; }
.graph-legend {
  position: absolute; left: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 5px;
  padding: 10px 12px; max-width: 220px; pointer-events: none;
  background: color-mix(in srgb, var(--bg-sidebar) 78%, transparent);
  border: 1px solid var(--border); border-radius: 10px; backdrop-filter: blur(6px);
}
.gl-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
.gl-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; box-shadow: 0 0 6px currentColor; }
.gl-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-more { color: var(--text-faint); font-size: 11px; padding-left: 17px; }
/* settings: sidebar nav + content */
.settings-main { flex: 1; display: flex; min-height: 0; }
.settings-nav { flex: 0 0 176px; display: flex; flex-direction: column; gap: 2px; padding: 12px; border-right: 1px solid var(--border); overflow-y: auto; }
.settings-navitem { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 12px; border-radius: 9px; border: 1px solid transparent; background: none; color: var(--text-muted); font-size: 14px; }
.settings-navitem:hover { background: var(--bg-hover); color: var(--text); }
.settings-navitem.active { background: var(--bg-active); color: var(--text); border-color: rgba(232,99,60,.3); }
.settings-navitem .ni-ico { width: 20px; text-align: center; font-size: 14px; opacity: .9; }
.settings-body { flex: 1; overflow-y: auto; padding: 20px 24px; }
.settings-body label { display: block; font-size: 12.5px; color: var(--text-muted); margin: 12px 0 5px; }
.settings-body textarea { resize: vertical; }
.profile-row { display: flex; gap: 16px; align-items: center; margin-bottom: 8px; }
.avatar-lg { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); background-size: cover; background-position: center; display: grid; place-items: center; color: #fff; font-size: 26px; font-weight: 700; flex: none; }
.avatar-sm { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); background-size: cover; background-position: center; display: inline-grid; place-items: center; color: #fff; font-size: 11px; font-weight: 700; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.ghost.btn { display: inline-flex; align-items: center; padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px; color: var(--text); text-decoration: none; }
.vault-row { display: flex; gap: 8px; align-items: center; padding: 7px 0; }
.danger-zone { border: 1px solid rgba(229,84,75,.35); border-radius: 12px; padding: 14px 16px; background: rgba(229,84,75,.05); }

/* premium / billing */
.premium-status { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-sidebar); }
.premium-status.active { border-color: rgba(232,99,60,.45); background: var(--bg-active); }
.ps-badge { font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: linear-gradient(160deg, var(--accent), #C24322); color: #fff; white-space: nowrap; }
.ps-badge.free { background: var(--bg-hover); color: var(--text-muted); }
.ps-title { font-weight: 600; font-size: 15px; }
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.plan-card { position: relative; border: 1px solid var(--border); border-radius: 14px; padding: 18px 16px; background: var(--bg-sidebar); }
.plan-card.best { border-color: rgba(232,99,60,.5); box-shadow: 0 0 0 1px rgba(232,99,60,.25) inset; }
.plan-tag { position: absolute; top: -9px; right: 12px; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: var(--accent); padding: 3px 9px; border-radius: 999px; }
.plan-name { font-size: 13px; color: var(--text-muted); }
.plan-price { margin: 4px 0 6px; }
.plan-price .amt { font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.plan-price .per { font-size: 13px; color: var(--text-faint); }
.perk-list { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 2px; }
.perk { display: flex; gap: 12px; align-items: flex-start; }
.perk-ico { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--bg-active); border: 1px solid rgba(232,99,60,.25); font-size: 15px; }
.perk-title { font-weight: 600; font-size: 14px; }
.pay-history { display: flex; flex-direction: column; gap: 6px; }
.pay-row { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; }
.pay-status { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--bg-hover); color: var(--text-muted); text-transform: capitalize; }
.pay-status.s-completed { background: rgba(76,175,125,.16); color: #62c08a; }
.pay-status.s-pending { background: rgba(232,99,60,.16); color: var(--accent-hover); }
.pay-status.s-failed, .pay-status.s-expired, .pay-status.s-cancelled { background: rgba(229,84,75,.16); color: #e5544b; }
@media (max-width: 520px) { .plan-grid { grid-template-columns: 1fr; } }

/* appearance / theme picker */
.theme-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.theme-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-sidebar); cursor: pointer; position: relative; }
.theme-card:hover { border-color: var(--accent); background: var(--bg-sidebar); }
.theme-card.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.theme-card.locked { opacity: .6; }
.theme-card .swatch { width: 100%; height: 40px; border-radius: 8px; border: 1px solid var(--border); display: grid; place-items: center; }
.theme-card .swatch i { width: 18px; height: 18px; border-radius: 50%; display: block; box-shadow: 0 0 0 3px rgba(255,255,255,.08); }
.theme-name { font-size: 12.5px; font-weight: 600; }
.theme-tag { position: absolute; top: 7px; right: 8px; font-size: 11px; }
.accent-row { display: flex; align-items: center; gap: 12px; }
.accent-input { width: 46px; height: 34px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-sidebar); cursor: pointer; }
.flair-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.flair-preview { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.storage-bar { height: 8px; border-radius: 999px; background: var(--bg-hover); overflow: hidden; }
.storage-bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s ease; }
@media (max-width: 640px) {
  .theme-grid { grid-template-columns: repeat(2, 1fr); }
  .settings-main { flex-direction: column; }
  .settings-nav { flex: 0 0 auto; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .settings-navitem { white-space: nowrap; }
}

/* premium badge in the status bar */
.badge-premium { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: linear-gradient(160deg, var(--accent), #C24322); color: #fff; white-space: nowrap; }

/* ---------------- Admin portal ---------------- */
.admin-page { min-height: 100%; display: flex; flex-direction: column; background: var(--bg); }
.admin-head { display: flex; align-items: center; gap: 12px; padding: 14px 22px; border-bottom: 1px solid var(--border); }
.admin-tag { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); background: var(--bg-active); border: 1px solid rgba(232,99,60,.3); padding: 3px 9px; border-radius: 999px; }
.admin-tabs { display: flex; gap: 4px; padding: 0 20px; border-bottom: 1px solid var(--border); }
.admin-tab { border: none; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--text-muted); padding: 12px 14px; font-size: 14px; }
.admin-tab:hover { background: none; color: var(--text); }
.admin-tab.active { color: var(--text); border-bottom-color: var(--accent); }
.admin-body { padding: 22px; max-width: 1100px; width: 100%; margin: 0 auto; overflow-y: auto; }

.kpi-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.kpi { border: 1px solid var(--border); border-radius: 14px; padding: 16px; background: var(--bg-sidebar); }
.kpi.accent { border-color: rgba(232,99,60,.4); background: var(--bg-active); }
.kpi-num { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.kpi-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.kpi-sub { font-size: 11px; color: var(--text-faint); margin-top: 4px; }

.chart-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.chart-card { border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; background: var(--bg-sidebar); }
.chart-title { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.chart-total { color: var(--accent); font-size: 13px; }
.bars { width: 100%; height: 120px; display: block; }

.admin-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.admin-toolbar .search-input { flex: 1; max-width: 360px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); padding: 8px 10px; border-bottom: 1px solid var(--border); }
.admin-table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.u-name { font-weight: 600; }
.u-email { font-size: 11.5px; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.mini { font-size: 11.5px; padding: 4px 9px; border-radius: 7px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
.mini:hover { background: var(--bg-hover); }
.mini.danger { color: var(--danger); border-color: rgba(229,84,75,.4); }
.mini.danger:hover { background: rgba(229,84,75,.12); }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; }
.u-link { background: none; border: 0; padding: 0; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.u-link:hover { color: var(--accent); text-decoration: underline; }
.row-disabled { opacity: .58; }
.audit-event { font-family: ui-monospace, monospace; font-size: 11.5px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; }
.audit-meta { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono { font-family: ui-monospace, monospace; }

/* Admin user/site drawer */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 60; display: flex; justify-content: flex-end; }
.drawer { width: min(480px, 100%); background: var(--bg); border-left: 1px solid var(--border); height: 100%; overflow-y: auto; padding: 18px 20px 40px; box-shadow: -8px 0 40px rgba(0,0,0,.35); }
.drawer-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.drawer-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.drawer-stats { display: flex; flex-wrap: wrap; gap: 14px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 16px; font-size: 13px; }
.drawer-section { margin-bottom: 20px; }
.drawer-section h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.drawer-list { display: flex; flex-direction: column; gap: 1px; }
.drawer-li { display: flex; align-items: center; gap: 8px; padding: 7px 2px; border-bottom: 1px solid var(--border); font-size: 13px; }
.drawer-li .spacer { flex: 1; }

/* Global announcement banner (set by admins) */
.app-announce { display: flex; align-items: center; gap: 12px; padding: 9px 16px; background: var(--accent); color: #fff; font-size: 13.5px; line-height: 1.45; }
.app-announce-msg { flex: 1; }
.app-announce-x { background: none; border: 0; color: #fff; font-size: 20px; line-height: 1; cursor: pointer; opacity: .85; }
.app-announce-x:hover { opacity: 1; }
/* Impersonation bar */
.app-imp { display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: #b4521f; color: #fff; font-size: 13px; font-weight: 500; }
.app-imp span { flex: 1; }
.app-imp-btn { background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: 7px; padding: 4px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.app-imp-btn:hover { background: rgba(255,255,255,.28); }

/* Admin health + settings */
.health-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 18px; }
.health-card { border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.health-card h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); }
.health-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 3px 0; }
.health-ok { color: #62c08a; }
.health-warn { color: #e5544b; }
.admin-h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); margin: 22px 0 10px; }
.setting-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.setting-row .setting-meta { flex: 1; }
.setting-row .setting-meta .st { font-weight: 600; }
.setting-row .setting-meta .sd { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.switch { position: relative; width: 42px; height: 24px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: var(--bg-hover); border: 1px solid var(--border); border-radius: 999px; transition: .15s; cursor: pointer; }
.switch .slider::before { content: ''; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: .15s; }
.switch input:checked + .slider { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(18px); }

@media (max-width: 860px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .chart-grid { grid-template-columns: 1fr; }
  .drawer { width: 100%; }
}
.qr { background: #fff; border-radius: 8px; padding: 8px; display: block; }
.settings-section { margin-bottom: 26px; }
.settings-section h3 { margin: 0 0 6px; font-size: 15px; }
.code-block { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 12px; font-family: ui-monospace, monospace; font-size: 12.5px; white-space: pre-wrap; word-break: break-all; }
.guide-code { max-height: 280px; overflow-y: auto; word-break: normal; line-height: 1.5; }
.token-create { display: flex; gap: 8px; align-items: center; margin: 12px 0; flex-wrap: wrap; }
.token-create input[type=text] { flex: 1; min-width: 180px; }
.scopes { display: flex; gap: 12px; }
.scope { display: inline-flex; align-items: center; gap: 4px; color: var(--text-muted); font-size: 13px; }
.scope input { width: auto; }
.token-list { margin-top: 10px; }
.token-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.token-reveal { margin: 12px 0; }
.token-reveal code { display: block; margin: 8px 0; }
button.danger { color: var(--danger); }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--bg-sidebar); border: 1px solid var(--border); color: var(--text);
  padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); z-index: 60; font-size: 13px;
}
.toast.err { border-color: var(--danger); }

/* CM autocomplete pop */
.cm-tooltip.cm-tooltip-autocomplete > ul {
  font-family: Inter, system-ui, sans-serif; background: var(--bg-sidebar);
  border: 1px solid var(--border); border-radius: 8px;
}
.cm-tooltip-autocomplete ul li[aria-selected] { background: var(--bg-active); color: var(--text); }

/* ============================================================================
   MARKETING + LEGAL — Linear-style dark redesign.
   Scoped to .landing / .legal-page / .auth-wrap. The app UI is untouched.
   ============================================================================ */
.landing, .legal-page, .auth-wrap {
  --bg: #08080b;
  --bg-sidebar: #0e0e13;
  --text: #ecedf2;
  --text-muted: #a4a5b2;
  --text-faint: #6c6e7e;
  --border: rgba(255,255,255,.09);
  --shadow: 0 24px 70px rgba(0,0,0,.55);
  --card-bg: #0e0e13;
  --grad-border: linear-gradient(180deg, rgba(255,255,255,.17), rgba(255,255,255,.04) 45%, rgba(255,255,255,.02));
  background: #08080b;
  color: var(--text);
  letter-spacing: -.011em;
  position: relative;
  overflow-x: clip;
}

/* ambient aurora + faint grid behind everything */
.landing::before, .legal-page::before, .auth-wrap::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 780px; z-index: 0; pointer-events: none;
  background:
    radial-gradient(50% 60% at 50% -8%, rgba(232,99,60,.30), transparent 68%),
    radial-gradient(42% 50% at 84% 2%, rgba(244,162,74,.16), transparent 70%),
    radial-gradient(40% 52% at 12% 6%, rgba(232,99,60,.12), transparent 72%);
  animation: auroraDrift 18s ease-in-out infinite alternate;
}
.landing::after, .legal-page::after, .auth-wrap::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(78% 52% at 50% 0%, #000, transparent 78%);
  mask-image: radial-gradient(78% 52% at 50% 0%, #000, transparent 78%);
}
.landing > *, .legal-page > *, .auth-wrap > * { position: relative; z-index: 1; }
.landing > .hero-bg { z-index: 0; }
@keyframes auroraDrift {
  from { transform: translate3d(-2%, 0, 0) scale(1); opacity: .9; }
  to   { transform: translate3d(3%, 1.5%, 0) scale(1.08); opacity: 1; }
}

/* typography */
.landing h2, .landing h3, .legal-page h1, .auth-card h1 { letter-spacing: -.03em; }
.hero h1 {
  background: linear-gradient(180deg, #fff 28%, #e8c9b8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* floating pill nav */
.landing-nav, .legal-nav {
  position: sticky; top: 14px; width: calc(100% - 28px); max-width: 1100px;
  margin: 14px auto 0; padding: 9px 10px 9px 18px; gap: 10px;
  border-radius: 16px; border: 1px solid var(--border);
  background: rgba(12,12,16,.55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.legal-nav { padding: 12px 16px 12px 18px; }
.landing-nav .ghost, .landing-nav .primary, .legal-nav .ghost, .legal-nav .primary { padding: 8px 16px; border-radius: 10px; font-size: 13px; }

/* buttons */
.landing button.primary, .landing .primary, .auth-card button.primary, .legal-page button.primary {
  background: linear-gradient(180deg, #F4A24A, #C24322);
  border: 1px solid rgba(255,255,255,.16); color: #fff; border-radius: 11px;
  box-shadow: 0 6px 20px rgba(232,99,60,.35), inset 0 1px 0 rgba(255,255,255,.25);
}
.landing button.primary:hover, .landing .primary:hover, .auth-card button.primary:hover { filter: brightness(1.07); }
.landing button.ghost, .legal-page button.ghost {
  background: rgba(255,255,255,.04); border: 1px solid var(--border); color: var(--text); border-radius: 11px;
}
.landing button.ghost:hover, .legal-page button.ghost:hover { background: rgba(255,255,255,.08); }

/* glass cards with a gradient hairline border */
.landing .value, .landing .spot, .landing .feat-card, .landing .stats,
.landing .mcp-panel, .landing .faq-item, .landing .cta-panel,
.landing .window, .auth-card, .legal-card {
  border: 1px solid transparent !important;
  background:
    linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
    var(--grad-border) border-box !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 20px 50px rgba(0,0,0,.45);
}
.landing .feat-card:hover, .landing .value:hover, .landing .spot:hover, .legal-card:hover {
  background:
    linear-gradient(#121219, #121219) padding-box,
    linear-gradient(180deg, rgba(232,99,60,.55), rgba(255,255,255,.06)) border-box !important;
}

/* hero badge → glassy pill */
.hero-badge {
  background: rgba(232,99,60,.10); border: 1px solid rgba(232,99,60,.32);
  color: #c3b6ff; backdrop-filter: blur(8px);
}

/* feature icon chips + chips */
.feat-card .fi { background: rgba(232,99,60,.12); border-color: rgba(232,99,60,.3); }
.chip { background: rgba(255,255,255,.04) !important; border: 1px solid var(--border) !important; }

/* hero orb centerpiece */
.hero-orb {
  position: relative; width: min(420px, 76vw); aspect-ratio: 1; margin: 50px auto 0;
  animation: heroIn .9s cubic-bezier(.2,.7,.2,1) both; animation-delay: .28s;
}
.hero-orb::before {
  content: ""; position: absolute; inset: -18%; border-radius: 50%; z-index: -1;
  background: radial-gradient(50% 50% at 50% 50%, rgba(232,99,60,.42), transparent 68%);
  filter: blur(28px); animation: orbGlow 6s ease-in-out infinite;
}
.hero-orb video, .hero-orb img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; animation: floaty 8s ease-in-out infinite; }
@keyframes orbGlow { 0%,100% { opacity: .8; transform: scale(1); } 50% { opacity: 1; transform: scale(1.07); } }

/* Generated illustrations were authored in violet; warm them to the Basalt
   ember palette so the whole marketing surface reads as one brand. */
.hero-orb video, .hero-orb img,
.spot-media img, .mcp-media img, .value .ico img {
  filter: hue-rotate(124deg) saturate(1.12);
}

/* product preview window */
.product { max-width: 1040px; margin: 84px auto; padding: 0 24px; }
.window { border-radius: 16px; overflow: hidden; }
.window-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.02); }
.window-bar i { width: 11px; height: 11px; border-radius: 50%; background: #34343c; display: block; }
.window-bar i:nth-child(1) { background: #ff5f57; } .window-bar i:nth-child(2) { background: #febc2e; } .window-bar i:nth-child(3) { background: #28c840; }
.window .mock { border: 0 !important; border-radius: 0; box-shadow: none; background: transparent; }

/* code block deepen */
.landing .code-block { background: #060609; }

/* auth card */
.auth-wrap { display: grid; place-items: center; min-height: 100%; padding: 40px 16px; }
.auth-card { border-radius: 18px; }
.auth-card .wordmark { display: block; margin-bottom: 8px; }

/* legal + changelog */
.legal-page .legal h1 { letter-spacing: -.03em; }
.cl-entry { background: var(--card-bg) !important; border-color: var(--border) !important; }

/* footer wash */
.site-footer { background: linear-gradient(180deg, transparent, rgba(232,99,60,.045)); }

@media (prefers-reduced-motion: reduce) {
  .landing::before, .legal-page::before, .auth-wrap::before,
  .hero-orb, .hero-orb::before, .hero-orb video, .hero-orb img { animation: none !important; }
}
@media (max-width: 760px) {
  .hero-orb { width: min(320px, 80vw); }
  .landing-nav, .legal-nav { top: 8px; }
}

/* ---------------- Published sites (/@slug) ---------------- */
body.pub { background: var(--bg); }
.pub-top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 24px; border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px);
}
.pub-brandsite { font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: -.02em; color: var(--text); }
.pub-powered { font-size: 12px; color: var(--text-faint); }
.pub-powered .pub-bw { font-family: var(--font-display); font-weight: 600; color: var(--accent); }
.pub-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 0; max-width: 1080px; margin: 0 auto; width: 100%; }
.pub-nav { border-right: 1px solid var(--border); padding: 24px 16px 60px; position: sticky; top: 57px; align-self: start; max-height: calc(100vh - 57px); overflow-y: auto; }
.pub-nav nav { display: flex; flex-direction: column; gap: 1px; }
.pub-nav a { display: block; padding: 6px 10px; border-radius: 7px; color: var(--text-muted); font-size: 14px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pub-nav a:hover { background: var(--bg-hover); color: var(--text); }
.pub-nav a.active { background: var(--bg-active); color: var(--accent); }
.pub-nav-group { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); margin: 16px 0 4px; padding: 0 10px; }
.pub-main { min-width: 0; padding: 36px 40px 80px; }
.pub-article { max-width: 720px; margin: 0 auto; }
.pub-h1 { font-family: var(--font-display); font-size: 34px; letter-spacing: -.025em; margin: 0 0 18px; }
.pub-wikilink { color: var(--accent); border-bottom: 1px dashed color-mix(in srgb, var(--accent) 55%, transparent); text-decoration: none; }
.pub-wikilink.missing { color: var(--text-faint); border: none; cursor: default; }
.pub-article input[type="checkbox"] { margin-right: 6px; vertical-align: -1px; }
.pub-foot { margin: 56px auto 0; max-width: 720px; padding-top: 22px; border-top: 1px solid var(--border); color: var(--text-faint); font-size: 13px; }
.pub-foot a { color: var(--text-muted); }
.pub-404 { max-width: 480px; margin: 14vh auto; text-align: center; padding: 0 24px; }
.pub-404 h1 { font-family: var(--font-display); font-size: 28px; margin: 18px 0 8px; }
.pub-404 .bk-btn { margin-top: 18px; }
@media (max-width: 820px) {
  .pub-shell { grid-template-columns: 1fr; }
  .pub-nav { position: static; max-height: none; border-right: none; border-bottom: 1px solid var(--border); padding: 14px 16px; }
  .pub-nav nav { flex-flow: row wrap; gap: 4px; }
  .pub-nav-group { width: 100%; margin: 8px 0 2px; }
  .pub-main { padding: 24px 20px 64px; }
}
/* published callouts */
.pub-callout { border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 8px; padding: 12px 16px; margin: 1em 0; background: var(--bg-sidebar); }
.pub-callout-title { font-weight: 600; color: var(--text); margin-bottom: 2px; }
.pub-callout-body { color: var(--text-muted); }
.pub-callout.callout-warning, .pub-callout.callout-caution { border-left-color: #e8a23c; }
.pub-callout.callout-danger, .pub-callout.callout-error { border-left-color: var(--danger); }
.pub-callout.callout-tip, .pub-callout.callout-success { border-left-color: #4caf7d; }

/* ---------------- Math / Mermaid / TOC / footnotes / queries ---------------- */
.md .math-block { display: block; overflow-x: auto; margin: 1em 0; text-align: center; }
.md .math[data-tex]:not(.math-block) { white-space: nowrap; }
.md .mermaid-src { white-space: pre-wrap; font-family: var(--font-mono); font-size: 12.5px; color: var(--text-muted);
  border: 1px dashed var(--border); border-radius: 8px; padding: 12px; }
.md .mermaid { display: flex; justify-content: center; margin: 1em 0; }
.md .mermaid svg { max-width: 100%; height: auto; }

.md .toc-block { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin: 1em 0; background: var(--bg-sidebar); }
.md .toc-block .toc-h { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); margin-bottom: 6px; }
.md a.toc-link { display: block; color: var(--text-muted); font-size: 13.5px; padding: 2px 0; text-decoration: none; }
.md a.toc-link:hover { color: var(--accent); }

.md .footnotes { border-top: 1px solid var(--border); margin-top: 2em; padding-top: 8px; font-size: 13px; color: var(--text-muted); }
.md .footnote-ref a { text-decoration: none; color: var(--accent); }
.md .footnotes-sep { display: none; }

.md .query-block { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; margin: 1em 0; background: var(--bg-sidebar); }
.md .query-count { font-size: 11.5px; margin-bottom: 6px; }
.md .query-list { margin: 0; padding-left: 18px; }
.md .query-list li { margin: 3px 0; }
.md a.query-link { color: var(--accent); cursor: pointer; text-decoration: none; border-bottom: 1px dashed color-mix(in srgb, var(--accent) 50%, transparent); }
.md a.query-link:hover { color: var(--accent-hover); }
.md .query-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.md .query-table th { text-align: left; color: var(--text-faint); font-weight: 500; border-bottom: 1px solid var(--border); padding: 5px 8px; }
.md .query-table td { border-bottom: 1px solid var(--border); padding: 5px 8px; }

/* hover preview popover */
.hover-preview {
  position: fixed; z-index: 90; display: none; width: 360px; max-height: 320px; overflow: hidden;
  background: var(--bg-sidebar); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); padding: 12px 14px;
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent);
  mask-image: linear-gradient(to bottom, #000 78%, transparent);
}
.hover-preview .hp-title { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.hover-preview .hp-body { font-size: 13px; color: var(--text-muted); }
.hover-preview .hp-body :is(h1,h2,h3) { font-size: 14px; margin: .4em 0; }
.hover-preview .hp-missing { color: var(--text-faint); font-style: italic; }

/* unlinked mentions */
.mention-row { padding: 8px; border-radius: 8px; }
.mention-row:hover { background: var(--bg-hover); }
.mention-title { font-size: 13.5px; color: var(--text); cursor: pointer; }
.mention-title:hover { color: var(--accent); }
.mention-snip { font-size: 12px; color: var(--text-faint); margin: 2px 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.mention-link.mini { padding: 2px 8px; font-size: 11.5px; }

/* ---------------- Canvas (spatial board) ---------------- */
.canvas-root { position: relative; height: 100%; overflow: hidden; background: var(--bg); }
.canvas-viewport {
  position: absolute; inset: 0; overflow: hidden; cursor: grab; touch-action: none;
  background-image: radial-gradient(circle, color-mix(in srgb, var(--text-faint) 34%, transparent) 1px, transparent 1px);
  background-size: 26px 26px;
}
.canvas-viewport.panning { cursor: grabbing; }
.canvas-world { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
.canvas-edges { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
.cv-edge { fill: none; color: var(--text-muted); stroke: currentColor; stroke-width: 2; }
.cv-edge.sel { color: var(--accent); stroke-width: 2.5; }
.cv-edge.temp { color: var(--accent); stroke-dasharray: 5 4; }
.cv-edge-hit { fill: none; stroke: transparent; stroke-width: 16px; pointer-events: stroke; cursor: pointer; }
.cv-edge-label { fill: var(--text-muted); font-size: 11px; text-anchor: middle; paint-order: stroke; stroke: var(--bg); stroke-width: 3px; }

.canvas-node {
  position: absolute; background: var(--bg-sidebar); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,.28); overflow: hidden;
  touch-action: none; cursor: grab; --cv-accent: var(--accent);
}
.canvas-node:active { cursor: grabbing; }
.canvas-node.sel { border-color: var(--cv-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--cv-accent) 55%, transparent); }
.canvas-node.accent { border-top: 3px solid var(--cv-accent); }
.canvas-node.note { background: color-mix(in srgb, var(--accent) 7%, var(--bg-sidebar)); }
.cv-body { padding: 10px 12px; height: 100%; overflow: auto; font-size: 13.5px; line-height: 1.5; color: var(--text); }
.cv-body.cv-empty { color: var(--text-faint); }
.cv-body.md :is(h1,h2,h3) { font-size: 15px; margin: .3em 0; }
.cv-note-title { font-weight: 600; font-size: 14px; }
.cv-note-path { color: var(--text-faint); font-size: 11px; margin-top: 3px; }
.cv-edit { width: 100%; height: 100%; border: none; background: transparent; resize: none; color: var(--text); font: inherit; outline: none; padding: 0; }

.cv-resize { position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; cursor: nwse-resize;
  background: linear-gradient(135deg, transparent 50%, var(--text-faint) 50%, var(--text-faint) 60%, transparent 60%); opacity: 0; }
.canvas-node:hover .cv-resize, .canvas-node.sel .cv-resize { opacity: .7; }
.cv-dot { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--cv-accent);
  border: 2px solid var(--bg-sidebar); opacity: 0; transition: opacity .12s; cursor: crosshair; z-index: 3; }
.cv-dot::before { content: ''; position: absolute; inset: -9px; border-radius: 50%; }  /* larger hit area */
.canvas-node:hover .cv-dot, .canvas-node.sel .cv-dot { opacity: 1; }
.cv-top { top: -6px; left: 50%; transform: translateX(-50%); }
.cv-bottom { bottom: -6px; left: 50%; transform: translateX(-50%); }
.cv-left { left: -6px; top: 50%; transform: translateY(-50%); }
.cv-right { right: -6px; top: 50%; transform: translateY(-50%); }

.canvas-toolbar { position: absolute; top: 10px; left: 10px; z-index: 5; display: flex; align-items: center; gap: 2px;
  background: var(--bg-sidebar); border: 1px solid var(--border); border-radius: 10px; padding: 4px; box-shadow: var(--shadow); }
.cv-btn { font: inherit; font-size: 12.5px; padding: 5px 9px; border: none; background: transparent; color: var(--text); border-radius: 6px; cursor: pointer; }
.cv-btn.icon { width: 28px; padding: 5px 0; }
.cv-btn:hover { background: var(--bg-hover); }
.cv-sep { width: 1px; height: 18px; background: var(--border); margin: 0 3px; }

.cv-colorbar { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 6;
  display: flex; align-items: center; gap: 6px; background: var(--bg-sidebar); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 12px; box-shadow: var(--shadow); }
.cv-swatch { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--border); cursor: pointer; padding: 0; }
.cv-swatch.none { background: var(--bg); position: relative; }
.cv-swatch.none::after { content: ''; position: absolute; inset: 3px; border-bottom: 1.5px solid var(--danger); transform: rotate(-45deg); }
.cv-del { border: none; background: transparent; cursor: pointer; font-size: 14px; margin-left: 4px; }
.canvas-hint { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 4;
  color: var(--text-faint); font-size: 12px; pointer-events: none; text-align: center; padding: 0 16px; }
.cv-btn:disabled { opacity: .4; cursor: default; }

/* cards sit above groups */
.canvas-node { z-index: 1; }
.canvas-node.sel { z-index: 2; }

/* groups: a labelled frame behind the cards it contains */
.canvas-node.cv-group {
  z-index: 0; background: color-mix(in srgb, var(--cv-accent) 7%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--cv-accent) 45%, var(--border));
  border-radius: 12px; box-shadow: none; overflow: visible; cursor: grab;
}
.canvas-node.cv-group.sel { box-shadow: 0 0 0 2px color-mix(in srgb, var(--cv-accent) 55%, transparent); }
.cv-group-label, .cv-group-edit {
  position: absolute; top: -13px; left: 10px; max-width: calc(100% - 20px);
  font-size: 12px; font-weight: 600; color: var(--text-muted); padding: 1px 8px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: text;
}
.cv-group-edit { font: inherit; font-size: 12px; font-weight: 600; outline: none; }

/* image cards */
.canvas-node.cv-image .cv-body { padding: 0; }
.cv-img { width: 100%; height: 100%; object-fit: contain; display: block; background: var(--bg); user-select: none; }

/* link cards */
.canvas-node.cv-link { background: color-mix(in srgb, var(--accent) 5%, var(--bg-sidebar)); }
.cv-link { display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.cv-link-host { font-weight: 600; font-size: 13.5px; color: var(--accent); }
.cv-link-url { font-size: 11px; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-extract { font-size: 11px !important; font-weight: 600; color: var(--text-muted); padding: 0 6px; }
.cv-extract:hover { color: var(--accent); }

/* alignment guide lines while dragging */
.cv-guide { position: absolute; z-index: 8; pointer-events: none; background: var(--accent); }
.cv-guide.v { top: -4000px; height: 8000px; width: 1px; }
.cv-guide.h { left: -4000px; width: 8000px; height: 1px; }

/* marquee box-select */
.cv-marquee { position: absolute; z-index: 9; border: 1px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent); pointer-events: none; border-radius: 3px; }

/* inline edge-label editor */
.cv-edge-edit { position: absolute; z-index: 8; transform: translate(-50%, -50%); width: 120px;
  font: inherit; font-size: 12px; text-align: center; padding: 2px 6px;
  background: var(--bg-sidebar); border: 1px solid var(--accent); border-radius: 6px; color: var(--text); outline: none; }
.tree-item.is-canvas .tree-canvas-ico { color: var(--accent); margin-right: 5px; font-size: 13px; }
.settings-version { margin-top: auto; padding: 12px 10px 4px; font-size: 11.5px; font-family: var(--font-mono); }

/* ---------------- Modal dialogs (custom confirm/prompt/alert) ---------------- */
.dialog-overlay { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  background: rgba(0,0,0,.5); opacity: 0; transition: opacity .15s; padding: 20px; }
.dialog-overlay.in { opacity: 1; }
.dialog { width: 410px; max-width: 100%; background: var(--bg-sidebar); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow); padding: 20px 22px; transform: translateY(8px) scale(.98); transition: transform .15s; }
.dialog-overlay.in .dialog { transform: none; }
.dialog-title { font-family: var(--font-display); font-weight: 600; font-size: 16px; margin-bottom: 8px; }
.dialog-msg { color: var(--text-muted); font-size: 14px; line-height: 1.6; white-space: pre-line; }
.dialog-input { margin-top: 16px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.danger-btn { background: var(--danger); border-color: var(--danger); color: #fff; }
.danger-btn:hover { background: var(--danger); border-color: var(--danger); filter: brightness(1.1); }

/* ---------------- Consistent select control across browsers ---------------- */
select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8a8a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px;
}
select::-ms-expand { display: none; }
select option { background: var(--bg-sidebar); color: var(--text); }
.statusbar .sb-vault { border: none; background-color: transparent; padding: 3px 22px 3px 8px; background-position: right 4px center; border-radius: 6px; }
.statusbar .sb-vault:hover { background-color: var(--bg-hover); }

/* canvas card scrollbars: thin + themed (kills the chunky default "sidebar") */
.cv-body { overflow: auto; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.cv-body::-webkit-scrollbar { width: 7px; height: 7px; }
.cv-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.cv-body::-webkit-scrollbar-track { background: transparent; }
.cv-body:has(.cv-edit) { overflow: hidden; padding: 0; }
.cv-edit { box-sizing: border-box; overflow: hidden; padding: 10px 12px; }

/* ---------------- Inline icon alignment (SVG icons replacing emoji) ---------------- */
.ico, .sh-ico, .tree-ico, .pm-ico, .badge-ico, .btn-ico, .u-admin, .perk-ico, .ni-ico {
  display: inline-flex; align-items: center; justify-content: center; flex: none; line-height: 0;
}
.ico svg, .sh-ico svg, .tree-ico svg, .pm-ico svg, .btn-ico svg, .u-admin svg, .ni-ico svg { width: 16px; height: 16px; }
.badge-ico svg { width: 12px; height: 12px; }
.perk-ico svg { width: 18px; height: 18px; }
.theme-tag svg { width: 13px; height: 13px; }

/* subheads: icon + label */
.sb-subhead { display: flex; align-items: center; gap: 6px; }
.sb-subhead .sh-ico { color: var(--text-faint); }
.tree-folder-row .tree-ico { color: var(--text-muted); margin-right: 4px; }
.tree-item.is-canvas .tree-canvas-ico svg { width: 14px; height: 14px; }

/* note-action overflow menu: icon + label */
.popmenu-item { display: flex; align-items: center; gap: 10px; }
.popmenu-item .pm-ico { color: var(--text-muted); }
.popmenu-item.danger .pm-ico { color: var(--danger); }

/* premium badge: icon + label */
.badge-premium { display: inline-flex; align-items: center; gap: 4px; }
.badge-premium .badge-ico { color: currentColor; }
.ps-badge { display: inline-flex; align-items: center; gap: 6px; }
.ps-badge svg { width: 14px; height: 14px; }

/* settings nav icon box */
.settings-navitem .ni-ico { width: 20px; opacity: .9; }
/* admin */
.u-admin { color: var(--accent); margin-left: 5px; }
.u-admin svg { width: 14px; height: 14px; }
.admin-actions .mini { display: inline-flex; align-items: center; gap: 4px; }
.admin-actions .mini .ico svg { width: 13px; height: 13px; }
.theme-tag { color: var(--accent); }
.theme-card.locked .theme-tag { color: var(--text-faint); }

/* ---------------- Kanban board (.kanban) ---------------- */
.kanban-root { height: 100%; display: flex; flex-direction: column; background: var(--bg); }
.kanban-toolbar { display: flex; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.kanban-board { flex: 1; display: flex; gap: 14px; align-items: flex-start; overflow-x: auto; padding: 16px; }
.kanban-empty { padding: 30px; }
.kanban-col { flex: 0 0 280px; max-height: 100%; display: flex; flex-direction: column;
  background: var(--bg-sidebar); border: 1px solid var(--border); border-radius: 12px; }
.kanban-col-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 8px; }
.kanban-col-title { font-weight: 600; font-size: 14px; cursor: text; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kanban-count { font-size: 12px; color: var(--text-faint); background: var(--bg-hover); border-radius: 999px; padding: 1px 8px; }
.kanban-col-del { opacity: 0; }
.kanban-col:hover .kanban-col-del { opacity: .7; }
.kanban-cards { flex: 1; overflow-y: auto; padding: 4px 8px; min-height: 24px; display: flex; flex-direction: column; gap: 8px; }
.kanban-cards.drop { background: var(--bg-active); border-radius: 8px; }
.kanban-card { position: relative; background: var(--bg); border: 1px solid var(--border); border-radius: 9px;
  padding: 10px 28px 10px 12px; font-size: 13.5px; line-height: 1.45; cursor: grab; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.kanban-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.kanban-card.dragging { opacity: .4; }
.kanban-card-text { white-space: pre-wrap; word-break: break-word; }
.kanban-card-del { position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; padding: 0; border: none;
  background: transparent; color: var(--text-faint); opacity: 0; border-radius: 6px; }
.kanban-card-del svg { width: 13px; height: 13px; }
.kanban-card:hover .kanban-card-del { opacity: 1; }
.kanban-card-del:hover { color: var(--danger); background: var(--bg-hover); }
.kanban-add { margin: 4px 8px 10px; padding: 7px; border: 1px dashed var(--border); background: transparent;
  color: var(--text-muted); border-radius: 8px; font-size: 13px; text-align: left; }
.kanban-add:hover { border-color: var(--accent); color: var(--text); }
.kanban-edit { width: 100%; font: inherit; background: var(--bg); color: var(--text); border: 1px solid var(--accent); border-radius: 6px; padding: 6px 8px; }
.kanban-card-edit { resize: none; }

/* kanban: grip + column drag, priorities, picker menu */
.kanban-root { position: relative; }
.kanban-grip { cursor: grab; color: var(--text-faint); display: inline-flex; opacity: 0; flex: none; }
.kanban-grip svg { width: 16px; height: 16px; }
.kanban-col:hover .kanban-grip { opacity: .7; }
.kanban-grip:active { cursor: grabbing; }
.kanban-col-sort { opacity: 0; }
.kanban-col:hover .kanban-col-sort { opacity: .7; }
.kanban-col-sort svg { width: 15px; height: 15px; }
.kanban-col.col-dragging { opacity: .5; }
.kanban-col.col-drop { outline: 2px dashed var(--accent); outline-offset: 2px; }

.kanban-card { padding: 10px 12px; }              /* delete moved into the footer */
.kanban-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; }
.kanban-card-text.empty { color: var(--text-faint); font-style: italic; }
.kanban-card-del { position: static; width: 22px; height: 22px; opacity: 0; }
.kanban-card:hover .kanban-card-del { opacity: 1; }

.kanban-prio { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-muted);
  border: 1px solid var(--border); background: var(--bg-sidebar); border-radius: 999px; padding: 2px 9px 2px 7px; cursor: pointer; }
.kanban-prio:hover { border-color: var(--accent); color: var(--text); }
.kanban-prio.none { color: var(--text-faint); }
.kanban-prio-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--text-faint); }
.kanban-prio.none .kanban-prio-dot { background: transparent; border: 1px dashed var(--text-faint); }

.kanban-card.p-urgent { border-left: 3px solid #e5484d; }
.kanban-card.p-high   { border-left: 3px solid #e8633c; }
.kanban-card.p-medium { border-left: 3px solid #5aa9e6; }
.kanban-card.p-low    { border-left: 3px solid #8b8f98; }
.kanban-card.p-urgent .kanban-prio-dot { background: #e5484d; }
.kanban-card.p-high   .kanban-prio-dot { background: #e8633c; }
.kanban-card.p-medium .kanban-prio-dot { background: #5aa9e6; }
.kanban-card.p-low    .kanban-prio-dot { background: #8b8f98; }

.kanban-menu { position: absolute; z-index: 20; min-width: 150px; background: var(--bg-sidebar);
  border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); padding: 5px; }
.kanban-menu-item { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; font-size: 13px;
  background: transparent; border: none; color: var(--text); padding: 7px 9px; border-radius: 7px; cursor: pointer; }
.kanban-menu-item:hover { background: var(--bg-active); }
.kanban-menu-item.muted { color: var(--text-muted); }
/* editable "base" tables */
.query-table.base-table td { padding: 3px 5px; }
.base-cell { width: 100%; min-width: 70px; background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 4px 6px; font: inherit; color: var(--text); transition: border-color .15s; }
.base-cell::placeholder { color: var(--text-faint); }
.base-cell:hover { border-color: var(--border); }
.base-cell:focus { border-color: var(--accent); background: var(--bg); outline: none; }
.base-cell.cell-saved { border-color: #4caf7d; }
.base-cell.cell-err { border-color: var(--danger); }
