/* Amber Console — design system (faithful port of the Phase-2 "elegant/minimal/
   bold" direction: near-white paper, white panels, near-black ink, a single
   amber accent, flat hairline cards, Schibsted headlines + Hanken body +
   Spline mono). Ported from the Claude Design handoff (p2-kit / wf-kit). */

:root {
  --bg: #f6f4ee;
  --panel: #ffffff;
  --panel2: #f3f1ea;
  --ink: #1b1712;
  --sub: #7c756a;
  --faint: #aaa294;
  --line: #e8e4d9;
  --accent: #b9700f;
  --accent-ink: #8a5208;
  --accent-soft: #f4ead6;
  --risk: #a8472a;
  --risk-soft: #f0e0d6;
  --ok: #5f7d3a;
  --table-border: #e0dac9;
  --radius: 4px;
  --rsm: 3px;
  --font: "Hanken Grotesk", system-ui, sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --head: "Schibsted Grotesk", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font-family: var(--font); }

/* ── artboard frame ─────────────────────────────────────────── */
.frame { background: var(--bg); font-family: var(--font); overflow: hidden; position: relative; }

/* ── seal / lock mark ───────────────────────────────────────── */
.seal {
  --s: 16px;
  width: var(--s); height: var(--s); flex-shrink: 0;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
}
.seal::after {
  content: ""; width: calc(var(--s) * 0.16); height: calc(var(--s) * 0.16);
  min-width: 2px; min-height: 2px; border-radius: 50%; background: rgba(255,255,255,.85);
}

/* ── icons (svg sprite via <use>) ───────────────────────────── */
.icon { display: inline-block; vertical-align: middle; }
.icon svg { display: block; }

/* ── typography ─────────────────────────────────────────────── */
.h { font-family: var(--head); font-weight: 800; font-size: 22px; color: var(--ink); letter-spacing: -.6px; line-height: 1.12; }
.sub { font-family: var(--font); font-size: 13px; color: var(--sub); line-height: 1.5; }
.label { font-family: var(--mono); font-size: 10px; letter-spacing: .6px; text-transform: uppercase; color: var(--faint); }
.mono { font-family: var(--mono); }
.ink { color: var(--ink); } .dim { color: var(--sub); } .faint { color: var(--faint); }
.accent-ink { color: var(--accent-ink); }
b, .strong { font-weight: 600; }

/* ── app shell ──────────────────────────────────────────────── */
.shell { display: flex; overflow: hidden; height: 100%; background: var(--bg); }
.sidenav { width: 226px; flex-shrink: 0; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 14px; }
.sidenav .brand { display: flex; align-items: center; gap: 9px; padding: 0 8px 18px; }
.sidenav .brand-name { font-family: var(--head); font-weight: 800; font-size: 18px; color: var(--ink); letter-spacing: -.3px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; cursor: pointer; color: var(--sub); }
.nav-item span.lbl { font-family: var(--font); font-size: 13px; font-weight: 500; color: var(--sub); flex: 1; }
.nav-item.on { padding: 9px 10px 9px 24px; margin-left: -14px; border-radius: 0 999px 999px 0; background: rgba(27,23,18,0.06); }
.nav-item.on span.lbl { font-weight: 700; color: var(--ink); }
.nav-item.on::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 4px; background: var(--accent); border-radius: 0 3px 3px 0; }
.nav-item .badge { font-family: var(--mono); font-size: 10px; font-weight: 700; color: #fff; background: var(--risk); border-radius: 9px; padding: 1px 6px; min-width: 16px; text-align: center; }
.sidenav .spacer { flex: 1; }
.userbox { display: flex; align-items: center; gap: 9px; padding: 10px 8px; border-top: 1px solid var(--line); }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-family: var(--head); font-weight: 700; font-size: 11px; color: var(--accent-ink); }
.userbox .name { font-family: var(--font); font-size: 12px; font-weight: 600; color: var(--ink); }
.userbox .org { font-family: var(--font); font-size: 10.5px; color: var(--faint); }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { height: 56px; flex-shrink: 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 24px; background: var(--panel); }
.crumbs { display: flex; align-items: center; gap: 7px; flex: 1; min-width: 0; }
.crumb { font-family: var(--font); font-size: 13px; font-weight: 500; color: var(--sub); white-space: nowrap; }
.crumb.last { font-family: var(--head); font-size: 16px; font-weight: 700; color: var(--ink); letter-spacing: -.2px; }
.crumb-sep { color: var(--faint); opacity: .7; display: inline-flex; transform: translateY(-1px); }
.search { display: flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 8px; border: 1px solid var(--line); color: var(--faint); width: 150px; }
.search span { font-family: var(--font); font-size: 12px; color: var(--faint); }
.search .kbd { font-family: var(--mono); font-size: 10px; }
.content { flex: 1; padding: 24px; overflow: hidden; }
.col { display: flex; flex-direction: column; }
.colgap16 { display: flex; flex-direction: column; gap: 16px; height: 100%; }

/* ── surfaces / cards ───────────────────────────────────────── */
.surface { border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.card { border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 16px 16px 8px; }
.card-title { font-family: var(--head); font-weight: 700; font-size: 14.5px; color: var(--ink); letter-spacing: -.2px; }
.card-sub { font-family: var(--font); font-size: 11.5px; color: var(--sub); margin-top: 2px; }
.card-body { padding: 8px 16px 16px; flex: 1; min-height: 0; }
.card-body.no-head { padding: 16px; }
.link { font-family: var(--font); font-size: 12px; color: var(--accent-ink); font-weight: 600; cursor: pointer; }

/* callout (accent top-rule) — the brand moment */
.callout { background: var(--panel); border: 1px solid var(--line); border-radius: 0; border-top: 2.5px solid var(--accent); padding: 16px; display: flex; align-items: center; gap: 14px; }
.callout .ttl { font-family: var(--head); font-weight: 800; font-size: 15px; color: var(--ink); letter-spacing: -.2px; }
.callout .desc { font-family: var(--font); font-size: 12px; color: var(--sub); margin-top: 3px; }

/* ── pills ──────────────────────────────────────────────────── */
.pill { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font); font-size: 9.5px; font-weight: 600; letter-spacing: .2px; padding: 3px 7px; border-radius: 20px; text-transform: uppercase; white-space: nowrap; background: var(--panel2); color: var(--sub); border: 1px solid var(--line); }
.pill.accent { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.pill.risk { background: var(--risk-soft); color: var(--risk); border-color: transparent; }

/* ── buttons ────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-family: var(--font); font-size: 11.5px; font-weight: 600; padding: 8px 14px; border-radius: var(--rsm); white-space: nowrap; cursor: pointer; border: none; box-sizing: border-box; }
.btn.sm { padding: 6px 11px; font-size: 10.5px; }
.btn.lg { padding: 11px 18px; font-size: 13px; }
.btn.full { width: 100%; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.danger { background: var(--risk); color: #fff; }
.btn.ghost { background: transparent; color: var(--sub); border: 1px solid var(--line); }
.btn.outline { background: transparent; color: var(--ink); border: 1px solid var(--ink); }

/* ── stats ──────────────────────────────────────────────────── */
.stat { border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); padding: 16px; flex: 1; }
.stat .val { font-family: var(--head); font-weight: 800; font-size: 27px; color: var(--ink); letter-spacing: -.8px; margin: 7px 0 3px; }
.stat .val.accent { color: var(--accent); }
.stat .ssub { font-family: var(--font); font-size: 11.5px; color: var(--sub); }
.row { display: flex; }
.gap12 { gap: 12px; } .gap14 { gap: 14px; } .gap16 { gap: 16px; }

/* ── tables ─────────────────────────────────────────────────── */
.table { border-radius: var(--radius); background: var(--panel); border: 1px solid var(--table-border); overflow: hidden; }
.thead { display: flex; align-items: center; height: 30px; padding: 0 14px; background: var(--panel); border-bottom: 1px solid var(--table-border); }
.thead .th { font-family: var(--mono); font-size: 9.5px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: var(--sub); padding-right: 10px; }
.trow { display: flex; align-items: center; height: 36px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.trow.dense { height: 30px; }
.trow:last-child { border-bottom: none; }
.trow.sel { background: var(--accent-soft); }
.td { min-width: 0; padding-right: 10px; }
.td .cell { font-family: var(--font); font-size: 12.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.td .cell.mono { font-family: var(--mono); font-size: 11.5px; }
.td .cell.strong { font-weight: 600; }
.td .cell.dim { color: var(--sub); }
.td .cell.strike { text-decoration: line-through; opacity: .5; }
.right { text-align: right; }

/* ── key/value ──────────────────────────────────────────────── */
.kv { display: flex; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.kv .k { width: 130px; flex-shrink: 0; font-family: var(--font); font-size: 12px; color: var(--sub); }
.kv .v { flex: 1; font-family: var(--font); font-size: 12.5px; color: var(--ink); }
.kv .v.mono { font-family: var(--mono); font-size: 12px; }

/* ── status dot ─────────────────────────────────────────────── */
.status { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font); font-size: 12px; color: var(--sub); }
.status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.status.risk .dot { background: var(--risk); } .status.muted .dot { background: var(--faint); }

/* ── activity row ───────────────────────────────────────────── */
.actrow { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.actrow:last-child { border-bottom: none; }
.actrow .at { font-family: var(--font); font-size: 12.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.actrow .aw { font-family: var(--font); font-size: 11px; color: var(--faint); margin-top: 1px; }
.actrow .awhen { font-family: var(--mono); font-size: 10.5px; color: var(--faint); white-space: nowrap; }

/* ── history: timeline + diff ───────────────────────────────── */
.tl { position: relative; }
.tl .rail { position: absolute; left: 5.5px; top: 6px; bottom: 6px; width: 1.5px; background: var(--line); }
.tl .node { display: flex; gap: 12px; margin-bottom: 18px; position: relative; }
.tl .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--panel); border: 2px solid var(--line); margin-top: 1px; flex-shrink: 0; z-index: 1; }
.tl .dot.sel { background: var(--accent); border-color: var(--accent); }
.tl .dot.risk { border-color: var(--risk); }
.diffrow { display: flex; gap: 8px; margin-bottom: 8px; font-family: var(--mono); font-size: 12.5px; align-items: baseline; }
.diffrow .dk { color: var(--faint); width: 64px; flex-shrink: 0; }
.diffrow .old { color: var(--risk); text-decoration: line-through; opacity: .8; }
.diffrow .arr { color: var(--faint); }
.diffrow .new { color: var(--ok); font-weight: 600; }

/* ── tabs ───────────────────────────────────────────────────── */
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); }
.tab { padding: 0 0 10px; font-family: var(--font); font-size: 13px; font-weight: 500; color: var(--sub); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.tab.on { font-weight: 700; color: var(--ink); border-bottom-color: var(--accent); }

/* query box for the data browser */
.querybox { border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); overflow: hidden; }
.queryline { display: flex; align-items: center; gap: 8px; padding: 10px 14px; }
.queryline .sql { font-family: var(--mono); font-size: 12px; color: var(--ink); flex: 1; }
.queryline .sql .kw { color: var(--accent); } .queryline .sql .str { color: var(--ok); }

/* ── public doc pages (/privacy /terms /pricing /docs) ──────── */
.pnav { position: sticky; top: 0; z-index: 10; background: var(--panel); border-bottom: 1px solid var(--line); }
.pnav .wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 16px; height: 60px; }
.pnav .brand { display: flex; align-items: center; gap: 9px; color: inherit; text-decoration: none; }
.pnav .nm { font-family: var(--head); font-weight: 800; font-size: 19px; letter-spacing: -.3px; }
.pnav .links { display: flex; gap: 20px; margin-left: 18px; }
.pnav .links a { font-size: 13px; font-weight: 500; color: var(--sub); text-decoration: none; }
.pnav .links a.on { font-weight: 700; color: var(--ink); }
.pnav .spacer { flex: 1; }
.pnav .signin { font-size: 13px; font-weight: 600; color: var(--sub); text-decoration: none; }
.doc { max-width: 720px; margin: 0 auto; padding: 44px 24px 72px; }
.doc .eyebrow { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--accent-ink); background: var(--accent-soft); padding: 5px 11px; border-radius: 20px; }
.doc h1 { font-family: var(--head); font-weight: 800; font-size: 36px; letter-spacing: -1.2px; line-height: 1.08; margin: 14px 0 6px; }
.doc .meta { font-size: 13px; color: var(--sub); margin: 0 0 6px; }
.doc h2 { font-family: var(--head); font-weight: 700; font-size: 19px; letter-spacing: -.4px; margin: 34px 0 10px; }
.doc h3 { font-family: var(--head); font-weight: 700; font-size: 15px; letter-spacing: -.2px; margin: 24px 0 8px; }
.doc p, .doc li { font-size: 14.5px; line-height: 1.65; color: var(--ink); }
.doc p { margin: 0 0 12px; }
.doc ul { margin: 0 0 12px; padding-left: 22px; }
.doc li { margin-bottom: 7px; }
.doc a { color: var(--accent-ink); }
.doc code { font-family: var(--mono); font-size: 12.5px; background: var(--panel); border: 1px solid var(--line); padding: 1px 5px; border-radius: 3px; }
.doc pre { background: #241f18; color: #f3f1ea; padding: 14px 16px; border-radius: var(--radius); overflow-x: auto; font-family: var(--mono); font-size: 12px; line-height: 1.6; }
.doc pre code { background: transparent; border: none; padding: 0; color: inherit; font-size: 12px; }
.pfoot { border-top: 1px solid var(--line); background: var(--panel); }
.pfoot .wrap { max-width: 1080px; margin: 0 auto; padding: 20px 24px; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-size: 12.5px; color: var(--sub); }
.pfoot a { color: var(--sub); text-decoration: none; }
.pfoot a:hover { color: var(--ink); }
.pfoot .spacer { flex: 1; }

/* ── gallery / index ────────────────────────────────────────── */
.canvas { padding: 32px 60px 80px; }
.intro { max-width: 920px; margin-bottom: 8px; }
.tag { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 20px; background: #1b1712; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .3px; margin-bottom: 16px; }
.tag .seal { --s: 9px; }
.intro h1 { font-family: var(--head); font-size: 34px; font-weight: 800; letter-spacing: -1px; color: var(--ink); line-height: 1.1; margin: 0; max-width: 760px; }
.intro p { font-size: 15px; color: var(--sub); line-height: 1.55; margin-top: 14px; max-width: 680px; }
.section { margin-top: 44px; }
.section-head { margin-bottom: 18px; }
.section-head .st { font-family: var(--head); font-weight: 800; font-size: 20px; color: var(--ink); letter-spacing: -.4px; }
.section-head .ss { font-family: var(--font); font-size: 13px; color: var(--sub); margin-top: 3px; }
.boards { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.board { }
.board .blabel { font-family: var(--mono); font-size: 11px; letter-spacing: .4px; color: var(--faint); margin-bottom: 8px; text-transform: lowercase; }
.board .art { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; box-shadow: 0 1px 0 rgba(27,23,18,.03); }
