/* Verno developer console. Built on the Verno tokens (verno.css). Light and dark; no external fonts or images. */
:root {
  --c-bg: var(--vn-sand-50); --c-surface: #fff; --c-sunk: var(--vn-sand-100); --c-line: var(--vn-sand-200);
  --c-text: var(--vn-stone-700); --c-strong: var(--vn-stone-900); --c-muted: var(--vn-stone-500);
  --c-accent: var(--vn-green-600); --c-accent-d: var(--vn-green-700); --c-accent-bg: var(--vn-green-50); --c-accent-ink: var(--vn-green-800);
  --c-bad: var(--vn-red-700); --c-bad-bg: var(--vn-red-50); --c-warn: var(--vn-amber-700); --c-warn-bg: var(--vn-amber-50);
  --c-info: var(--vn-blue-700); --c-info-bg: var(--vn-blue-50); --c-out: var(--vn-green-100); --c-code: #1c1a16; --c-code-fg: #ece7dd;
  --c-shadow: 0 1px 2px rgba(31,27,22,.05), 0 6px 18px rgba(31,27,22,.06); --rail-w: 256px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --c-bg: #12110f; --c-surface: #1b1a17; --c-sunk: #24221e; --c-line: #35322b; --c-text: #cfc9bd; --c-strong: #f4f0e8; --c-muted: #9a9387;
  --c-accent: #34d399; --c-accent-d: #6ee7b7; --c-accent-bg: #10281f; --c-accent-ink: #a7f3d0;
  --c-bad: #fca5a5; --c-bad-bg: #331616; --c-warn: #fcd34d; --c-warn-bg: #2f2410; --c-info: #93c5fd; --c-info-bg: #14233b; --c-out: #134736;
  --c-shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35); color-scheme: dark;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --c-bg: #12110f; --c-surface: #1b1a17; --c-sunk: #24221e; --c-line: #35322b; --c-text: #cfc9bd; --c-strong: #f4f0e8; --c-muted: #9a9387;
  --c-accent: #34d399; --c-accent-d: #6ee7b7; --c-accent-bg: #10281f; --c-accent-ink: #a7f3d0;
  --c-bad: #fca5a5; --c-bad-bg: #331616; --c-warn: #fcd34d; --c-warn-bg: #2f2410; --c-info: #93c5fd; --c-info-bg: #14233b; --c-out: #134736;
  --c-shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35); color-scheme: dark; } }

body { background: var(--c-bg); color: var(--c-text); font-family: var(--vn-font); font-size: 15px; }
* { box-sizing: border-box; }
.skip { position: absolute; left: -999px; top: 0; background: var(--c-strong); color: var(--c-bg); padding: 10px 14px; z-index: 60; border-radius: 0 0 8px 0; }
.skip:focus { left: 0; }
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; border-radius: 6px; }
a { color: var(--c-accent-d); }
h1, h2, h3 { color: var(--c-strong); letter-spacing: -.01em; }

/* ---- shell ---- */
.shell { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 14px; padding: 16px 12px; background: var(--c-surface); border-right: 1px solid var(--c-line); overflow-y: auto; z-index: 40; }
.rail-top { display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--c-strong); padding: 4px 6px; min-height: 44px; }
.brand b { display: block; letter-spacing: 2px; font-size: 16px; line-height: 1.1; }
.brand small { color: var(--c-muted); font-size: 12px; font-weight: 600; }
.switch label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--c-muted); margin: 0 6px 4px; }
.switch select, .stage select, .stage input, .stage textarea { width: 100%; font: inherit; color: var(--c-strong); background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 10px; padding: 10px 12px; min-height: 44px; }
.switch select + select { margin-top: 8px; }
.stage textarea { resize: vertical; }
.switch select:focus, .stage select:focus, .stage input:focus, .stage textarea:focus { outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-accent) 28%, transparent); }
#nav { display: grid; gap: 2px; align-content: start; flex: 1; }
#nav .grp { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--c-muted); margin: 14px 10px 4px; }
.nav-link, .rail-link { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 10px; border: 0; border-radius: 10px; background: none; color: var(--c-text); font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; text-align: left; position: relative; transition: background .15s, color .15s; }
.nav-link:hover, .rail-link:hover { background: var(--c-sunk); color: var(--c-strong); }
.nav-link[aria-current="page"] { background: var(--c-accent-bg); color: var(--c-accent-ink); font-weight: 650; }
.nav-link[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--c-accent); }
.nav-link .badge { margin-left: auto; font-size: 12px; font-weight: 700; background: var(--c-bad); color: var(--c-surface); border-radius: 999px; padding: 0 7px; min-width: 20px; text-align: center; }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rail-foot { border-top: 1px solid var(--c-line); padding-top: 8px; display: grid; gap: 2px; }
.icon-btn { width: 44px; height: 44px; border: 0; border-radius: 10px; background: none; color: var(--c-strong); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--c-sunk); }
.only-narrow, .scrim { display: none; }
.stage { padding: 28px clamp(16px, 3vw, 48px) 64px; max-width: none; width: 100%; min-width: 0; outline: none; }
.sec { animation: rise .28s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sec, .rail, .scrim { animation: none !important; transition: none !important; } .skel::after { animation: none !important; } }
@media (max-width: 900px) {
  .shell { display: block; }
  .only-narrow { display: inline-flex; }
  .topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 6px; padding: 6px 8px; background: var(--c-surface); border-bottom: 1px solid var(--c-line); }
  .rail { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); transform: translateX(-104%); transition: transform .22s ease; box-shadow: var(--c-shadow); }
  .rail.open { transform: none; }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 35; opacity: 0; pointer-events: none; transition: opacity .2s; display: block; }
  .scrim.on { opacity: 1; pointer-events: auto; }
  .stage { padding-top: 18px; }
}

/* ---- page parts ---- */
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; margin-bottom: 20px; }
.head h1 { font-size: clamp(24px, 3.4vw, 30px); line-height: 1.15; margin: 0; }
.head p { color: var(--c-muted); margin: 4px 0 0; max-width: 62ch; }
.card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 16px; padding: 18px; box-shadow: var(--c-shadow); margin-bottom: 16px; min-width: 0; }
.card h2 { font-size: 17px; margin: 0 0 12px; }
.card h3 { font-size: 15px; margin: 0 0 8px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; align-items: start; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 8px; }
@media (min-width: 700px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1400px) { .kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); } .grid2 { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); } .threads { max-height: calc(100vh - 220px); } .inbox { min-height: calc(100vh - 180px); } }
.kpi { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--c-shadow); transition: transform .15s, border-color .15s; }
.kpi:hover { transform: translateY(-2px); border-color: var(--c-accent); }
.kpi span { display: block; font-size: 13px; color: var(--c-muted); }
.kpi b { display: block; font-size: 28px; line-height: 1.2; color: var(--c-strong); font-variant-numeric: tabular-nums; }
.eyebrow-c { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--c-muted); margin: 18px 0 8px; }
.btn2 { font: inherit; font-weight: 600; font-size: 14px; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--c-line); background: var(--c-surface); color: var(--c-strong); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; transition: background .15s, border-color .15s, transform .1s; }
.btn2:hover { background: var(--c-sunk); border-color: var(--c-muted); color: var(--c-strong); }
.btn2:active { transform: scale(.98); }
.btn2.primary { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }
:root[data-theme="dark"] .btn2.primary { color: #052e1f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn2.primary { color: #052e1f; } }
.btn2.primary:hover { background: var(--c-accent-d); border-color: var(--c-accent-d); }
.btn2.danger { color: var(--c-bad); }
.btn2:disabled { opacity: .5; pointer-events: none; }
.row2 { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pill2 { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 650; border-radius: 999px; padding: 2px 10px; background: var(--c-sunk); color: var(--c-text); white-space: nowrap; }
.pill2.ok { background: var(--c-accent-bg); color: var(--c-accent-ink); } .pill2.bad { background: var(--c-bad-bg); color: var(--c-bad); }
.pill2.warn { background: var(--c-warn-bg); color: var(--c-warn); } .pill2.info { background: var(--c-info-bg); color: var(--c-info); }
.alerts { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.alerts li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--c-sunk); }
.alerts li.bad { background: var(--c-bad-bg); color: var(--c-bad); } .alerts li.warn { background: var(--c-warn-bg); color: var(--c-warn); } .alerts li.info { background: var(--c-info-bg); color: var(--c-info); }
.empty { text-align: center; padding: 36px 16px; color: var(--c-muted); }
.empty b { display: block; color: var(--c-strong); font-size: 17px; margin-bottom: 6px; }
.note2 { font-size: 13px; color: var(--c-muted); margin: 8px 0 0; }
.field2 { margin: 0 0 12px; } .field2 > label { display: block; font-weight: 600; font-size: 14px; margin: 0 0 4px; color: var(--c-strong); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; overflow-wrap: anywhere; }
pre.code { background: var(--c-code); color: var(--c-code-fg); border-radius: 12px; padding: 14px; margin: 0; overflow: auto; max-height: 340px; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.skel { position: relative; overflow: hidden; background: var(--c-sunk); border-radius: 12px; height: 84px; }
.skel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--c-surface) 70%, transparent), transparent); animation: sweep 1.2s infinite; }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; } .tbl th { text-align: left; font-size: 12px; color: var(--c-muted); text-transform: uppercase; letter-spacing: .06em; padding: 6px 8px; }
.tbl td { padding: 10px 8px; border-top: 1px solid var(--c-line); vertical-align: middle; overflow-wrap: anywhere; }
.tbl-wrap { overflow-x: auto; }
.seg { display: inline-flex; background: var(--c-sunk); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; font: inherit; font-weight: 600; font-size: 13px; color: var(--c-muted); padding: 0 12px; min-height: 36px; border-radius: 8px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--c-surface); color: var(--c-strong); box-shadow: var(--c-shadow); }

/* ---- inbox ---- */
.inbox { display: grid; grid-template-columns: minmax(240px, 330px) minmax(0, 1fr); gap: 0; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 16px; box-shadow: var(--c-shadow); overflow: hidden; min-height: 520px; }
.threads { border-right: 1px solid var(--c-line); overflow-y: auto; max-height: 70vh; }
.thread-item { display: grid; gap: 2px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--c-line); background: none; padding: 12px 14px; font: inherit; color: var(--c-text); cursor: pointer; min-height: 64px; }
.thread-item:hover { background: var(--c-sunk); } .thread-item[aria-current="true"] { background: var(--c-accent-bg); box-shadow: inset 3px 0 0 var(--c-accent); }
.thread-item .who { display: flex; gap: 6px; align-items: center; justify-content: space-between; font-weight: 650; color: var(--c-strong); }
.thread-item .snip { color: var(--c-muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.convo { display: flex; flex-direction: column; min-width: 0; }
.convo-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--c-line); }
.msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; max-height: 52vh; min-height: 240px; background: var(--c-bg); }
.bubble { max-width: min(78%, 480px); padding: 9px 13px; border-radius: 16px; background: var(--c-surface); border: 1px solid var(--c-line); overflow-wrap: anywhere; white-space: pre-wrap; animation: rise .2s both; }
.bubble.out { align-self: flex-end; background: var(--c-out); border-color: transparent; color: var(--c-strong); }
.bubble.system { align-self: center; background: none; border: 0; color: var(--c-muted); font-size: 13px; }
.bubble time { display: block; font-size: 11px; color: var(--c-muted); margin-top: 3px; }
.composer { border-top: 1px solid var(--c-line); padding: 12px 16px; display: grid; gap: 8px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--c-line); background: var(--c-surface); color: var(--c-text); border-radius: 999px; min-height: 36px; padding: 0 12px; font: inherit; font-size: 13px; cursor: pointer; }
.chip:hover { border-color: var(--c-accent); color: var(--c-accent-ink); }
.back-btn { display: none; }
@media (max-width: 760px) {
  .inbox { grid-template-columns: minmax(0, 1fr); } .inbox .convo { display: none; } .inbox.show-thread .threads { display: none; } .inbox.show-thread .convo { display: flex; }
  .back-btn { display: inline-flex; } .threads { max-height: none; } .bubble { max-width: 90%; }
}

/* ---- broadcast phone preview, explorer, share kit ---- */
.phone { width: min(300px, 100%); margin: 0 auto; border: 8px solid var(--c-strong); border-radius: 32px; background: var(--c-bg); padding: 14px 12px 18px; min-height: 280px; }
.phone .bar { text-align: center; font-weight: 700; color: var(--c-strong); border-bottom: 1px solid var(--c-line); padding-bottom: 8px; margin-bottom: 12px; font-size: 14px; }
.phone .bubble { max-width: 100%; }
.phone .btnline { display: block; text-align: center; margin-top: 8px; padding: 8px; border-top: 1px solid var(--c-line); color: var(--c-info); font-weight: 600; font-size: 14px; }
.explorer { display: grid; grid-template-columns: minmax(200px, 260px) minmax(0, 1fr); gap: 16px; align-items: start; }
.ep-list { display: grid; gap: 4px; }
.ep { display: flex; gap: 8px; align-items: center; width: 100%; border: 1px solid transparent; background: none; text-align: left; padding: 8px 10px; border-radius: 10px; min-height: 44px; cursor: pointer; font: inherit; color: var(--c-text); }
.ep:hover { background: var(--c-sunk); } .ep[aria-pressed="true"] { background: var(--c-accent-bg); border-color: var(--c-accent); }
.verb { font: 700 11px ui-monospace, Menlo, monospace; padding: 2px 6px; border-radius: 6px; background: var(--c-info-bg); color: var(--c-info); }
.verb.post { background: var(--c-accent-bg); color: var(--c-accent-ink); }
@media (max-width: 760px) { .explorer { grid-template-columns: minmax(0, 1fr); } }
.poster { text-align: center; max-width: 380px; margin: 0 auto; border-radius: 20px; padding: 28px 24px; background: linear-gradient(160deg, var(--c-accent-bg), var(--c-surface)); border: 1px solid var(--c-line); }
.poster h3 { font-size: 24px; margin: 0 0 4px; } .poster p { margin: 0 0 14px; color: var(--c-muted); }
.poster svg { width: min(100%, 260px); height: auto; background: #fff; padding: 12px; border-radius: 14px; }
.poster .url { margin-top: 12px; font-size: 12px; }
.kv2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 12px; font-size: 14px; } .kv2 b { color: var(--c-strong); overflow-wrap: anywhere; }
@media (max-width: 600px) { .kv2 { grid-template-columns: minmax(0, 1fr); } }

/* ---- the shared dialog, dark ---- */
.shell ~ dialog, dialog { background: var(--c-surface); color: var(--c-text); }
dialog .btn { background: var(--c-surface); color: var(--c-strong); border-color: var(--c-line); }
dialog .btn.primary { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }
dialog form > .row:last-child { background: var(--c-surface); }
dialog input, dialog select, dialog textarea { background: var(--c-surface); color: var(--c-strong); border: 1px solid var(--c-line); border-radius: 10px; width: 100%; min-height: 44px; padding: 8px 12px; font: inherit; }
dialog .secret { background: var(--c-sunk); color: var(--c-strong); }

@media print {
  body * { visibility: hidden; } .poster, .poster * { visibility: visible; } .poster { position: absolute; inset: 0 auto auto 50%; transform: translateX(-50%); border: 0; background: #fff; color: #000; }
}

/* ---- charts ---- */
.chart { width: 100%; height: auto; display: block; } .chart .grid { stroke: var(--c-line); stroke-width: 1; } .chart text { fill: var(--c-muted); font-size: 11px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--c-muted); margin-top: 6px; } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.chart-empty { text-align: center; color: var(--c-muted); padding: 34px 12px; border: 1px dashed var(--c-line); border-radius: 12px; } .chart-empty b { display: block; color: var(--c-strong); margin-bottom: 4px; }

/* ---- onboarding checklist ---- */
.meter { height: 8px; background: var(--c-sunk); border-radius: 999px; overflow: hidden; margin: 6px 0 14px; } .meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--c-accent), var(--c-accent-d)); border-radius: 999px; transition: width .5s cubic-bezier(.2,.7,.2,1); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; } .steps li { display: flex; gap: 14px; align-items: flex-start; padding: 12px; border-radius: 12px; border: 1px solid transparent; }
.steps li.now { background: var(--c-accent-bg); border-color: var(--c-accent); } .steps li.done { opacity: .7; } .steps p { margin: 2px 0 8px; color: var(--c-muted); }
.steps .dot { flex: none; width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; background: var(--c-sunk); color: var(--c-strong); }
.steps li.done .dot { background: var(--c-accent); color: #fff; } .steps li.now .dot { background: var(--c-strong); color: var(--c-surface); }
.sr { position: absolute; left: -9999px; }
