:root {
  --bg: #0a0a0a;
  --bg-1: #111111;
  --bg-2: #171717;
  --bg-3: #1f1f1f;
  --line: #232323;
  --line-2: #2e2e2e;
  --text: #ededed;
  --dim: #a1a1a1;
  --faint: #929292;
  --accent: #5b8def;
  --ok: #3fb950;
  --bad: #f85149;
  --r: 8px;
  --r-s: 6px;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 400 14px/1.55 var(--sans); -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
.dim { color: var(--dim); }
.faint { color: var(--faint); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[data-lucide], .lucide { width: 16px; height: 16px; stroke-width: 1.75; flex: none; }

.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; letter-spacing: -0.02em; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 14px; font: 500 13.5px var(--sans); color: var(--text); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-s); cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--bg-3); }
.btn.primary { background: var(--text); color: #0a0a0a; border-color: var(--text); }
.btn.primary:hover { background: #fff; }
.btn.ghost { background: none; border-color: transparent; color: var(--dim); }
.btn.ghost:hover { color: var(--text); background: var(--bg-2); }
.btn.danger { color: var(--bad); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn.lg { height: 40px; padding: 0 18px; font-size: 14px; }
.btn.icon { width: 34px; padding: 0; }

input, select, textarea { font: 13.5px var(--sans); color: var(--text); background: var(--bg-1); border: 1px solid var(--line-2); border-radius: var(--r-s); padding: 8px 11px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #555; }
textarea { resize: vertical; }
label.field { display: block; font-size: 12.5px; font-weight: 500; color: var(--dim); margin-bottom: 14px; }
label.field > * { margin-top: 6px; }

.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500; padding: 1px 7px; border-radius: 4px; background: var(--bg-3); color: var(--dim); white-space: nowrap; }
.badge.ok { color: var(--ok); background: #3fb95014; }
.badge.bad { color: var(--bad); background: #f8514914; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* provider logo tile */
.plogo { width: 28px; height: 28px; border-radius: 7px; background: var(--bg-3); border: 1px solid var(--line-2); display: grid; place-items: center; flex: none; }
.plogo img { width: 16px; height: 16px; }
.plogo.sm { width: 20px; height: 20px; border-radius: 5px; }
.plogo.sm img { width: 12px; height: 12px; }
.model { display: flex; align-items: center; gap: 11px; }
.model .n { font-weight: 500; }
.model .id { font-family: var(--mono); font-size: 11.5px; color: var(--faint); }

/* code */
.code { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.code-head { display: flex; align-items: center; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); }
.code-head button.tabb { font: 500 12.5px var(--sans); color: var(--faint); background: none; border: 0; border-radius: 5px; padding: 5px 10px; cursor: pointer; }
.code-head button.tabb[aria-selected="true"] { color: var(--text); background: var(--bg-3); }
.code-head .copy { margin-left: auto; }
.code pre { margin: 0; padding: 16px 18px; font: 12.5px/1.7 var(--mono); color: #d4d4d4; overflow-x: auto; }
.tk-k { color: #ff7b72; } .tk-s { color: #a5d6ff; } .tk-c { color: var(--faint); } .tk-n { color: #79c0ff; } .tk-f { color: #d2a8ff; }

/* tables */
.table { border: 1px solid var(--line); border-radius: var(--r); overflow-x: auto; }
.table table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-weight: 500; color: var(--faint); font-size: 12px; padding: 9px 14px; border-bottom: 1px solid var(--line); background: var(--bg-1); white-space: nowrap; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--bg-1); }
.table .r { text-align: right; font-variant-numeric: tabular-nums; }
.table td.r { color: var(--dim); }

.toast { position: fixed; bottom: 20px; right: 20px; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text); font-size: 13.5px; padding: 10px 14px; border-radius: var(--r); z-index: 100; display: flex; gap: 8px; align-items: center; box-shadow: 0 8px 30px #000a; }
.toast .lucide { color: var(--ok); }

/* ============ site ============ */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.nav { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 28px; height: 56px; }
.nav nav { display: flex; gap: 22px; }
.nav nav a { color: var(--dim); font-size: 13.5px; }
.nav nav a:hover { color: var(--text); }
.nav .right { margin-left: auto; display: flex; gap: 8px; }

.hero { text-align: left; padding: 76px 0 48px; }
.hero h1 { max-width: 680px; font-size: clamp(42px, 5vw, 56px); letter-spacing: -0.04em; line-height: 1.05; }
.hero h1 span { color: var(--faint); }
.hero p.lede { font-size: 17px; color: var(--dim); max-width: 610px; margin: 18px 0 26px; }
.hero .ctas { display: flex; gap: 10px; justify-content: flex-start; }
.hero-search { max-width: 520px; margin: 26px 0 0; position: relative; }
.hero-search input { height: 46px; padding-left: 42px; font-size: 14.5px; border-radius: 10px; background: var(--bg-1); }
.hero-search .lucide { position: absolute; left: 15px; top: 15px; color: var(--faint); }
.hero-search kbd { position: absolute; right: 12px; top: 12px; font: 11px var(--mono); color: var(--faint); border: 1px solid var(--line-2); border-radius: 4px; padding: 2px 6px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats div { padding: 26px 0; text-align: center; }
.stats div + div { border-left: 1px solid var(--line); }
.stats b { display: block; font-size: 26px; font-weight: 600; letter-spacing: -0.03em; }
.stats span { color: var(--faint); font-size: 13px; }

.sec { padding: 88px 0; }
.sec + .sec { border-top: 1px solid var(--line); }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.sec h2 { font-size: 30px; letter-spacing: -0.03em; }
.sec .sub { color: var(--dim); font-size: 15px; margin-top: 8px; max-width: 520px; }
.more { display: inline-flex; align-items: center; gap: 6px; color: var(--dim); font-size: 13.5px; }
.more:hover { color: var(--text); }

.featured { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mcard { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; background: var(--bg-1); display: flex; flex-direction: column; gap: 14px; transition: border-color .15s; }
.mcard:hover { border-color: #3a3a3a; }
.mcard .top { display: flex; align-items: center; gap: 11px; }
.mcard .top .badge { margin-left: auto; }
.mcard .meta { display: flex; gap: 16px; font-size: 12.5px; color: var(--faint); }
.mcard .meta b { color: var(--dim); font-weight: 500; }

.providers { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 36px; padding: 36px 0; border-top: 1px solid var(--line); }
.providers span { display: inline-flex; align-items: center; gap: 9px; color: var(--dim); font-weight: 500; font-size: 15px; }
.providers img { width: 20px; height: 20px; }

.steps { display: grid; grid-template-columns: 1fr 1.25fr; gap: 48px; align-items: start; }
.step { display: grid; grid-template-columns: 28px 1fr; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.step:first-child { border-top: 1px solid var(--line); }
.step .num { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; font-size: 12px; color: var(--dim); }
.step h3 { font-size: 15px; font-weight: 500; margin-bottom: 3px; }
.step p { color: var(--dim); font-size: 13.5px; }

.feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.feats > div { background: var(--bg); padding: 26px 24px; }
.feats .lucide { width: 18px; height: 18px; color: var(--dim); margin-bottom: 14px; }
.feats h3 { font-size: 14.5px; font-weight: 500; margin-bottom: 6px; }
.feats p { color: var(--dim); font-size: 13.5px; }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.plan { border: 1px solid var(--line); border-radius: var(--r); padding: 24px; display: flex; flex-direction: column; }
.plan.hi { border-color: #444; background: var(--bg-1); }
.plan h3 { font-size: 15px; font-weight: 500; }
.plan .amt { font-size: 32px; font-weight: 600; letter-spacing: -0.03em; margin: 14px 0 2px; }
.plan .amt small { font-size: 13px; font-weight: 400; color: var(--faint); letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 20px 0 24px; display: grid; gap: 9px; color: var(--dim); font-size: 13.5px; }
.plan li { display: flex; gap: 9px; align-items: center; }
.plan li .lucide { width: 14px; height: 14px; color: var(--text); }
.plan .btn { margin-top: auto; }

.faq { max-width: 720px; }
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 500; list-style: none; display: flex; justify-content: space-between; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .lucide { color: var(--faint); transition: transform .15s; }
.faq details[open] summary .lucide { transform: rotate(45deg); }
.faq details p { color: var(--dim); margin-top: 8px; font-size: 13.5px; }

.foot { border-top: 1px solid var(--line); padding: 48px 0 32px; font-size: 13px; }
.foot .cols { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 24px; }
.foot h4 { margin: 0 0 12px; font-size: 12.5px; font-weight: 500; color: var(--text); }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot ul a { color: var(--faint); }
.foot ul a:hover { color: var(--text); }
.foot .bottom { display: flex; justify-content: space-between; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--faint); gap: 12px; flex-wrap: wrap; }

/* ============ app ============ */
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--line); background: var(--bg); display: flex; flex-direction: column; padding: 12px 10px; overflow-y: auto; }
.sidebar .head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 14px; }
.ws { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: var(--r-s); font-size: 13px; font-weight: 500; cursor: pointer; margin-bottom: 8px; border: 1px solid var(--line); }
.ws:hover { background: var(--bg-1); }
.ws .av { width: 20px; height: 20px; border-radius: 5px; background: var(--bg-3); display: grid; place-items: center; font-size: 11px; font-weight: 600; color: var(--dim); }
.ws .lucide { margin-left: auto; color: var(--faint); width: 14px; height: 14px; }
.sidebar .label { font-size: 11.5px; color: var(--faint); padding: 16px 8px 6px; }
.sidebar a.tab { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--r-s); color: var(--dim); font-size: 13.5px; font-weight: 500; }
.sidebar a.tab .lucide { color: var(--faint); }
.sidebar a.tab:hover { color: var(--text); background: var(--bg-1); }
.sidebar a.tab.on { color: var(--text); background: var(--bg-2); }
.sidebar a.tab.on .lucide { color: var(--text); }
.sidebar a.tab .ext { margin-left: auto; width: 13px; height: 13px; }
.sidebar .credit { margin-top: auto; border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.sidebar .credit .row { display: flex; justify-content: space-between; align-items: baseline; }
.sidebar .credit .amt { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; margin: 2px 0 10px; }
.track { height: 4px; border-radius: 2px; background: var(--bg-3); overflow: hidden; }
.track i { display: block; height: 100%; background: var(--text); border-radius: 2px; }
.sidebar .me { display: flex; align-items: center; gap: 9px; padding: 12px 8px 4px; font-size: 13px; }
.sidebar .me .av { width: 26px; height: 26px; border-radius: 50%; background: var(--bg-3); display: grid; place-items: center; font-size: 11px; font-weight: 600; }
.sidebar .me .email { color: var(--faint); font-size: 12px; }
.sidebar .me a { margin-left: auto; color: var(--faint); }
.sidebar .me a:hover { color: var(--text); }

.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 28px; border-bottom: 1px solid var(--line); background: #0a0a0add; backdrop-filter: blur(10px); }
.crumb { font-size: 13.5px; color: var(--faint); display: flex; gap: 8px; align-items: center; }
.crumb b { color: var(--text); font-weight: 500; }
.topbar .search { margin-left: auto; position: relative; width: 260px; }
.topbar .search input { padding-left: 32px; height: 32px; }
.topbar .search .lucide { position: absolute; left: 10px; top: 8px; color: var(--faint); width: 15px; height: 15px; }
.menu-toggle { display: none; }
.page { padding: 28px; max-width: 1200px; }
.view[hidden] { display: none; }
.view-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.view-head h1 { font-size: 22px; }
.view-head p { color: var(--dim); margin-top: 4px; }
.view-head .acts { display: flex; gap: 8px; }
.block + .block, .kpis + .block { margin-top: 20px; }
.block-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.block-head h2 { font-size: 14px; font-weight: 500; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--r); }
.kpi { padding: 16px 18px; }
.kpi + .kpi { border-left: 1px solid var(--line); }
.kpi .l { font-size: 12.5px; color: var(--dim); }
.kpi .v { font-size: 24px; font-weight: 600; letter-spacing: -0.03em; margin: 6px 0 2px; }
.kpi .d { font-size: 12px; color: var(--faint); }
.kpi .d .up { color: var(--ok); }
.kpi .d .down { color: var(--bad); }

.panel { border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.chart-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.chart-head .big { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r-s); padding: 2px; }
.seg button { font: 500 12px var(--sans); color: var(--faint); background: none; border: 0; border-radius: 4px; padding: 4px 10px; cursor: pointer; }
.seg button.on { background: var(--bg-3); color: var(--text); }
.chart { position: relative; }
.chart svg { width: 100%; height: 220px; display: block; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--dim); margin-top: 10px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.tip { position: absolute; pointer-events: none; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-s); padding: 7px 10px; font-size: 12px; white-space: nowrap; z-index: 2; }
.tip b { display: block; font-weight: 500; }

.split { display: grid; grid-template-columns: 1.7fr 1fr; gap: 16px; }
.top-models { display: grid; }
.top-models .row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.top-models .row:last-child { border-bottom: 0; }
.top-models .row .v { margin-left: auto; color: var(--dim); font-variant-numeric: tabular-nums; }
.top-models .row .p { width: 60px; }

/* playground */
.pg { display: grid; grid-template-columns: 1fr 280px; gap: 16px; height: calc(100vh - 180px); min-height: 500px; }
.chat { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); min-height: 0; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.chat-head .id { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.msgs { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 18px; }
.msg { display: grid; grid-template-columns: 28px 1fr; gap: 12px; max-width: 760px; }
.msg .av { width: 28px; height: 28px; border-radius: 50%; background: var(--bg-3); display: grid; place-items: center; font-size: 11px; font-weight: 600; }
.msg .who { font-size: 12.5px; font-weight: 500; margin-bottom: 3px; }
.msg .body { color: #d4d4d4; white-space: pre-wrap; }
.msg.typing .body::after { content: ""; display: inline-block; width: 7px; height: 14px; background: var(--text); vertical-align: -2px; margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.empty-chat { margin: auto; text-align: center; color: var(--dim); }
.empty-chat .plogo { width: 40px; height: 40px; margin: 0 auto 12px; border-radius: 10px; }
.empty-chat .plogo img { width: 22px; height: 22px; }
.empty-chat h3 { font-size: 15px; font-weight: 500; color: var(--text); margin-bottom: 4px; }
.suggest { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.composer { padding: 12px; border-top: 1px solid var(--line); }
.composer .box { border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg-1); padding: 8px 8px 8px 12px; display: flex; gap: 8px; align-items: end; }
.composer .box:focus-within { border-color: #555; }
.composer textarea { border: 0; background: none; padding: 6px 0; min-height: 34px; max-height: 160px; resize: none; }
.composer textarea:focus { border: 0; }
.stats-line { font: 11.5px var(--mono); color: var(--faint); margin-top: 8px; padding-left: 2px; min-height: 16px; }
.params { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; overflow-y: auto; }
.range { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--dim); font-weight: 500; }
.range output { font-family: var(--mono); color: var(--text); font-weight: 400; }
input[type=range] { padding: 0; border: 0; accent-color: var(--text); background: none; margin: 8px 0 16px; }

.reveal { border: 1px solid var(--line-2); background: var(--bg-1); border-radius: var(--r); padding: 14px 16px; margin-bottom: 16px; }
.reveal .t { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.reveal .t .lucide { color: var(--ok); }
.reveal .row { display: flex; gap: 8px; margin-top: 10px; }
.reveal input { font-family: var(--mono); font-size: 12.5px; }

.modal-bg { position: fixed; inset: 0; background: #000b; display: grid; place-items: center; z-index: 60; padding: 16px; }
.modal { width: 100%; max-width: 420px; background: var(--bg-1); border: 1px solid var(--line-2); border-radius: 12px; padding: 20px; }
.modal h3 { font-size: 16px; margin-bottom: 6px; }
.modal p { color: var(--dim); font-size: 13.5px; margin-bottom: 16px; }
.modal .acts { display: flex; justify-content: end; gap: 8px; margin-top: 4px; }

.amounts { display: flex; gap: 8px; flex-wrap: wrap; }
.amounts button { font: 500 13px var(--sans); color: var(--dim); background: var(--bg-1); border: 1px solid var(--line-2); border-radius: var(--r-s); padding: 7px 14px; cursor: pointer; }
.amounts button[aria-pressed="true"] { color: var(--text); border-color: var(--text); }

.settings-row { display: grid; grid-template-columns: 240px 1fr; gap: 32px; padding: 24px 0; border-top: 1px solid var(--line); }
.settings-row h2 { font-size: 14px; font-weight: 500; }
.settings-row p.dim { font-size: 13px; margin-top: 4px; }
.settings-row form, .settings-row .opts { max-width: 460px; }
.switch { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 9px 0; font-size: 13.5px; }
.switch input { appearance: none; width: 32px; height: 18px; border-radius: 99px; background: var(--bg-3); border: 1px solid var(--line-2); padding: 0; position: relative; cursor: pointer; flex: none; }
.switch input::after { content: ""; position: absolute; left: 2px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--faint); transition: transform .15s; }
.switch input:checked { background: var(--text); border-color: var(--text); }
.switch input:checked::after { transform: translateX(14px); background: #0a0a0a; }

@media (max-width: 1000px) {
  .featured, .plans, .feats { grid-template-columns: 1fr 1fr; }
  .steps, .split { grid-template-columns: 1fr; }
  .kpis, .stats { grid-template-columns: 1fr 1fr; }
  .kpi:nth-child(3), .stats div:nth-child(3) { border-left: 0; }
  .kpi:nth-child(n+3), .stats div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .foot .cols { grid-template-columns: 1fr 1fr; }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; width: 260px; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: 0 0 0 100vw #000a; }
  .menu-toggle { display: inline-flex; }
  .pg { grid-template-columns: 1fr; height: auto; }
  .chat { height: 70vh; }
  .settings-row { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .nav nav { display: none; }
  .hero { padding: 64px 0 48px; }
  .hero h1 { font-size: 38px; }
  .featured, .plans, .feats { grid-template-columns: 1fr; }
  .sec { padding: 64px 0; }
  .topbar { padding: 0 16px; }
  .topbar .search { display: none; }
  .page { padding: 20px 16px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Account forms and live-data states share the existing dashboard palette. */
[hidden] { display: none !important; }
button:disabled { cursor: not-allowed; opacity: .55; }
input:disabled, textarea:disabled { cursor: not-allowed; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input::placeholder, textarea::placeholder { color: var(--dim); }
::selection { background: #294779; color: #fff; }
input, textarea { caret-color: var(--text); }
.notice { padding: 16px 24px; margin: 20px 24px 0; border: 1px solid var(--line-2); border-radius: var(--r); color: var(--dim); background: var(--bg-1); }
.wrap > .notice { margin-inline: 0; }
.form-message { margin: 12px 0; color: #ff9b96; font-size: 13px; overflow-wrap: anywhere; }
.form-message.success { color: #7cdb8b; }
.empty-data { min-height: 200px; display: grid; place-items: center; color: var(--dim); text-align: center; padding: 24px; }
.user-details { min-width: 0; overflow: hidden; }
.user-details > div, [data-workspace] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws [data-workspace] { flex: 1; }
.me > button { flex: none; margin-left: auto; }
.key-name { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.key-dialog { width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow-y: auto; padding: 26px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg-1); color: var(--text); box-shadow: 0 16px 60px #0008; }
.key-dialog::backdrop { background: #000b; }
.key-dialog h2 { font-size: 21px; margin-bottom: 12px; }
.key-dialog p { margin-bottom: 20px; overflow-wrap: anywhere; }
.key-dialog .acts { display: flex; justify-content: flex-end; gap: 8px; }
.delete-confirm { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 18px; color: var(--dim); }
.delete-confirm input { width: auto; flex: none; margin-top: 4px; }
.reveal .row { flex-wrap: wrap; }
.reveal .row input { min-width: 0; flex: 1 1 230px; }
.empty-chat > .btn { margin-top: 18px; }
.docs-content { max-width: 790px; padding-block: 56px; font-size: 16px; line-height: 1.7; }
.docs-content h1 { margin-bottom: 16px; font-size: 36px; }
.docs-content section { margin-top: 40px; }
.docs-content h2 { margin-bottom: 14px; font-size: 24px; }
.docs-content p + p { margin-top: 14px; }
.docs-content a { text-decoration: underline; text-underline-offset: 3px; }
.docs-content code { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  input, select, textarea { font-size: 16px; }
  .notice { margin: 16px 16px 0; padding: 14px 16px; }
  .crumb { min-width: 0; }
  .crumb [data-workspace] { display: inline-block; max-width: 90px; vertical-align: bottom; }
  .key-dialog { padding: 22px; }
  .toast { max-width: calc(100vw - 32px); left: 16px; right: 16px; }
  .docs-content h1 { font-size: 30px; }
}
