/* Studio — partner portal. Same design language as SocialOps (app/static/styles.css):
   charcoal ground, flat surfaces with hairlines, one iris accent, Hanken Grotesk +
   JetBrains Mono for labels and numbers. */
:root {
  color-scheme: dark;
  --bg: #0a0a0e;
  --bg-raise: #101017;
  --surface: #15151d;
  --surface-2: #1b1b25;
  --surface-hov: #1a1a24;
  --inset: rgba(0,0,0,.25);
  --tint-1: rgba(255,255,255,.022);
  --tint-2: rgba(255,255,255,.04);
  --tint-3: rgba(255,255,255,.065);
  --tint-4: rgba(255,255,255,.10);
  --line: var(--tint-3);
  --line2: var(--tint-4);
  --text: #f5f5f8;
  --muted: #aeaebd;
  --dim: #74748a;
  --accent-rgb: 124 108 255;
  --accent: #7c6cff;
  --accent-bright: #9a8dff;
  --accent-fill: #6f60e8;
  --accent-hover: #6a57f5;
  --accent-soft: rgb(var(--accent-rgb) / .14);
  --accent-line: rgb(var(--accent-rgb) / .38);
  --ok-rgb: 54 211 153; --ok: #36d399;
  --warn-rgb: 246 179 82; --warn: #f6b352;
  --bad-rgb: 255 107 107; --bad: #ff6b6b;
  --r-sm: 10px; --r-md: 14px; --r-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.45);
  --shadow: 0 14px 40px -18px rgba(0,0,0,.78);
  --shadow-lg: 0 30px 70px -26px rgba(0,0,0,.85);
  --font: 'Hanken Grotesk', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --fs-1: 11px; --fs-2: 12.5px; --fs-3: 14px; --fs-4: 16px; --fs-5: 20px; --fs-6: 28px; --fs-metric: 34px;
  /* SocialOps' own token names, so pages ported from it (intake) render the same */
  --hg-bg: var(--bg); --hg-bg-raise: var(--bg-raise); --hg-surface: var(--surface); --hg-surface-2: var(--surface-2);
  --hg-surface-hov: var(--surface-hov); --hg-inset: var(--inset); --hg-tint-1: var(--tint-1); --hg-tint-2: var(--tint-2);
  --hg-tint-3: var(--tint-3); --hg-line: var(--line); --hg-line-strong: var(--line2); --hg-text: var(--text);
  --hg-text-2: var(--muted); --hg-text-3: var(--dim); --hg-accent: var(--accent); --hg-accent-bright: var(--accent-bright);
  --hg-accent-fill: var(--accent-fill); --hg-accent-hover: var(--accent-hover); --hg-accent-soft: var(--accent-soft);
  --hg-accent-line: var(--accent-line); --hg-on-accent: #fff; --hg-mono: var(--mono); --hg-shadow: var(--shadow);
  --hg-success: var(--ok); --hg-success-soft: rgb(var(--ok-rgb) / .13); --hg-success-line: rgb(var(--ok-rgb) / .34);
  --hg-warn: var(--warn); --hg-warn-soft: rgb(var(--warn-rgb) / .13); --hg-warn-line: rgb(var(--warn-rgb) / .34);
  --hg-danger: var(--bad); --hg-danger-soft: rgb(var(--bad-rgb) / .13); --hg-danger-line: rgb(var(--bad-rgb) / .36);
  --hg-r-sm: var(--r-sm); --hg-r-md: var(--r-md); --hg-r-pill: 999px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); }
body {
  background: radial-gradient(110% 80% at 50% -18%, rgb(var(--accent-rgb) / .05), transparent 58%), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: var(--fs-3)/1.5 var(--font);
  letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
/* Sprite icons (icons.svg) are stroke drawings: the <use> inherits these from its <svg>. */
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon { width: 16px; height: 16px; flex: none; }
.icon.sm { width: 14px; height: 14px; }
.icon.lg { width: 22px; height: 22px; }
h1, h2, h3 { margin: 0; }
h1 { font-size: var(--fs-6); font-weight: 800; letter-spacing: -.03em; line-height: 1.12; }
h2 { font-size: var(--fs-4); font-weight: 600; letter-spacing: -.02em; }
h3 { font-size: var(--fs-3); font-weight: 600; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: var(--fs-2); }
.tnum, .mono { font-family: var(--mono); font-weight: 500; font-feature-settings: 'tnum'; letter-spacing: 0; }
.grad-text { color: var(--accent-bright); }
.eyebrow { color: var(--dim); font-size: var(--fs-2); font-weight: 500; margin-bottom: 4px; }

/* ── shell ─────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.shell > div { min-width: 0; }
.side {
  position: sticky; top: 0; height: 100vh; height: 100dvh; padding: 22px 14px; display: flex; flex-direction: column; gap: 0;
  background: linear-gradient(180deg, var(--bg-raise), var(--bg)); border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; margin: 2px 6px 28px; font-size: var(--fs-4); font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.brand small { display: block; color: var(--dim); font-size: var(--fs-1); font-weight: 500; letter-spacing: 0; }
.logo-dot {
  width: 12px; height: 12px; border-radius: 999px; flex: none;
  background: conic-gradient(from 200deg, var(--accent), var(--accent-bright), var(--accent));
  box-shadow: 0 0 12px 0 rgb(var(--accent-rgb) / .55);
}
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 11px; border-radius: var(--r-md);
  color: var(--muted); font-weight: 500; border: 1px solid transparent; transition: background .16s, color .16s, border-color .16s;
}
.nav a .icon { opacity: .7; }
.nav a:hover { background: var(--tint-2); color: var(--text); }
.nav a.on { background: var(--accent-soft); border-color: var(--accent-line); color: #fff; box-shadow: inset 0 1px 0 var(--tint-3); }
.nav a.on .icon { opacity: 1; color: var(--accent-bright); }
.nav .count { margin-left: auto; font: 600 var(--fs-1)/1 var(--mono); padding: 3px 7px; border-radius: 99px; background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent-bright); }
.nav-label { font: 500 var(--fs-1) var(--mono); text-transform: uppercase; letter-spacing: .16em; color: var(--dim); margin: 18px 11px 7px; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.who { display: flex; align-items: center; gap: 10px; padding: 4px 4px; }
.who .av { width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent-bright); display: grid; place-items: center; font-weight: 700; font-size: var(--fs-2); }
.who .n { font-weight: 600; line-height: 1.2; font-size: var(--fs-2); }
.who .r { font-size: var(--fs-1); color: var(--dim); }
.asbar select { width: 100%; }
.main { padding: 40px 44px 80px; max-width: 1500px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 30px; flex-wrap: wrap; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.topbar { display: none; }

@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .topbar {
    display: flex; position: sticky; top: 0; z-index: 40; flex-direction: column; gap: 10px; padding: 12px 16px 10px;
    background: rgba(16,16,23,.94); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
  }
  .topbar .row1 { display: flex; align-items: center; justify-content: space-between; }
  .topbar .brand { margin: 0; }
  .topnav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .topnav::-webkit-scrollbar { display: none; }
  .topnav a { flex: none; display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; color: var(--muted); font-weight: 500; font-size: 13px; border: 1px solid var(--line); }
  .topnav a.on { color: #fff; background: var(--accent-soft); border-color: var(--accent-line); }
  .topnav a.on .icon { color: var(--accent-bright); }
  .topnav .count { font: 600 10px/1 var(--mono); padding: 2px 6px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-bright); }
  .main { padding: 22px 16px 80px; }
  h1 { font-size: 24px; }
}

/* ── building blocks ───────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px 22px; box-shadow: var(--shadow-sm); }
.card.pad-0 { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { margin: 0; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 640px) { .g2, .g3 { grid-template-columns: 1fr; } .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .grid { gap: 12px; } }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mt { margin-top: 18px; } .mt2 { margin-top: 30px; }

/* metric tiles */
.stat { padding: 20px 22px; }
.stat .k { font-size: var(--fs-1); color: var(--dim); text-transform: uppercase; letter-spacing: .07em; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.stat .k .icon { display: none; }
.stat .v { font-size: var(--fs-metric); font-weight: 800; letter-spacing: -.03em; line-height: 1; margin-top: 14px; font-family: var(--font); }
.stat .d { font-size: var(--fs-2); margin-top: 8px; color: var(--muted); }
.up { color: var(--ok) !important; } .down { color: var(--bad) !important; }
@media (max-width: 640px) { .stat { padding: 16px; } .stat .v { font-size: 26px; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; min-height: 38px; border-radius: var(--r-md);
  border: 1px solid var(--line2); background: var(--tint-2); color: var(--text); font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .16s, border-color .16s, color .16s;
}
.btn:hover { background: var(--tint-3); }
.btn.primary { background: var(--accent-fill); border-color: transparent; color: #fff; box-shadow: var(--shadow-sm); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.white { background: var(--accent-fill); border-color: transparent; color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--tint-2); }
.btn.danger { color: var(--bad); background: rgb(var(--bad-rgb) / .08); border-color: rgb(var(--bad-rgb) / .32); }
.btn.ghost.danger { background: transparent; border-color: transparent; }
.btn.danger:hover { background: rgb(var(--bad-rgb) / .16); }
.btn.sm { padding: 5px 12px; min-height: 32px; font-size: var(--fs-2); border-radius: var(--r-sm); }
.btn[disabled] { opacity: .45; pointer-events: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 22px; padding: 3px 10px; border-radius: 999px;
  font-size: var(--fs-1); font-weight: 600; background: var(--tint-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap;
}
.chip.ok { color: var(--ok); border-color: rgb(var(--ok-rgb) / .32); background: rgb(var(--ok-rgb) / .12); }
.chip.warn { color: var(--warn); border-color: rgb(var(--warn-rgb) / .32); background: rgb(var(--warn-rgb) / .12); }
.chip.bad { color: var(--bad); border-color: rgb(var(--bad-rgb) / .32); background: rgb(var(--bad-rgb) / .12); }
.chip.blue, .chip.pink { color: var(--accent-bright); border-color: rgb(var(--accent-rgb) / .3); background: rgb(var(--accent-rgb) / .12); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }

label.f { display: block; font-size: var(--fs-2); font-weight: 500; color: var(--muted); }
label.f > :not(span) { display: block; margin-top: 6px; }
label.f > .char { margin-top: 4px; }
.input, select.input, textarea.input {
  width: 100%; padding: 10px 13px; border-radius: 11px; border: 1px solid var(--line); background: var(--tint-2);
  outline: none; color: var(--text); transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--dim); }
.input:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / .14); }
textarea.input { resize: vertical; min-height: 84px; line-height: 1.45; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
select.input option { background: var(--surface-2); }
.input.sm { padding: 6px 10px; font-size: var(--fs-2); border-radius: var(--r-sm); }

.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-weight: 600; }
.toggle input { display: none; }
.toggle .sw { width: 36px; height: 21px; border-radius: 99px; background: var(--tint-4); position: relative; transition: background .2s; flex: none; }
.toggle .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle input:checked + .sw { background: var(--accent-fill); }
.toggle input:checked + .sw::after { transform: translateX(15px); }
.toggle .t small { display: block; font-weight: 400; color: var(--dim); font-size: var(--fs-2); }

.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--inset); border: 1px solid var(--line); }
.seg a, .seg button { padding: 6px 13px; border-radius: 9px; font-weight: 600; font-size: var(--fs-2); color: var(--muted); cursor: pointer; border: 0; background: none; display: inline-flex; align-items: center; gap: 6px; }
.seg label { padding: 0; cursor: pointer; }
.seg label span { padding: 6px 13px; border-radius: 9px; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: var(--fs-2); color: var(--muted); }
.seg .on, .seg input:checked + span { background: var(--accent-fill); color: #fff; }
.seg input { display: none; }

.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th { text-align: left; font: 500 var(--fs-1) var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 11px 14px; background: var(--tint-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--tint-1); }
.table-wrap { overflow-x: auto; }

.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty .icon { width: 28px; height: 28px; margin: 0 auto 12px; color: var(--dim); }
.empty h3 { color: var(--text); margin-bottom: 4px; }

.av { width: 38px; height: 38px; border-radius: 11px; object-fit: cover; flex: none; background: var(--surface-2); border: 1px solid var(--line2); }
.av-ring { flex: none; display: inline-flex; }
.acct { display: flex; align-items: center; gap: 11px; min-width: 0; }
.acct .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct .un { font-size: var(--fs-2); color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.meter { height: 6px; border-radius: 99px; background: var(--tint-3); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.meter.m-ok > i { background: var(--ok); } .meter.m-low > i { background: var(--warn); } .meter.m-empty > i { background: var(--bad); }

.spark { width: 100%; height: 56px; }
.spark .l { fill: none; stroke: var(--accent-bright); stroke-width: 2; }
.spark .a { fill: url(#sparkfill); stroke: none; }

.thumb { position: relative; border-radius: 10px; overflow: hidden; background: var(--surface-2); aspect-ratio: 9/16; border: 1px solid var(--line); }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; }
.thumb .badge { position: absolute; top: 6px; left: 6px; }
.thumb .play { position: absolute; inset: auto 6px 6px auto; width: 24px; height: 24px; border-radius: 50%; background: rgba(0,0,0,.6); display: grid; place-items: center; color: #fff; }

#toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; pointer-events: none; }
.toast { pointer-events: auto; padding: 10px 15px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line2); box-shadow: var(--shadow); font-weight: 500; display: flex; gap: 9px; align-items: center; animation: tin .18s ease-out; max-width: 92vw; }
.toast.err { border-color: rgb(var(--bad-rgb) / .45); }
.toast.ok .icon { color: var(--ok); } .toast.err .icon { color: var(--bad); }
@keyframes tin { from { opacity: 0; transform: translateY(6px); } }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 80; display: none; align-items: center; justify-content: center; padding: 16px; }
.modal-bg.open { display: flex; }
.modal { width: min(720px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border: 1px solid var(--line2); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 22px; animation: tin .18s ease-out; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }

/* login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(380px, 100%); padding: 30px 28px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.login-card .brand { justify-content: center; margin: 0 0 4px; font-size: var(--fs-5); }

/* ── account designer ── */
.char { font: 500 var(--fs-1) var(--mono); color: var(--dim); text-align: right; }
.char.over { color: var(--bad); }
.checklist { display: flex; flex-wrap: wrap; gap: 8px 16px; flex: 1; min-width: 220px; }
.checklist div { display: flex; align-items: center; gap: 8px; color: var(--dim); font-weight: 500; font-size: var(--fs-2); }
.checklist div.done { color: var(--text); }
.checklist .ck { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line2); display: grid; place-items: center; flex: none; }
.checklist .done .ck { background: var(--ok); border-color: var(--ok); }
.checklist .ck svg { width: 11px; height: 11px; color: #0a0a0e; stroke-width: 3; }

/* account cards */
.acard { display: flex; flex-direction: column; gap: 14px; }
.acard:hover { border-color: var(--line2); background: var(--surface-hov); }
.acard .mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; border-radius: 8px; overflow: hidden; }
.acard .mini-grid div { aspect-ratio: 1; background: var(--surface-2); }
.acard .mini-grid img, .acard .mini-grid video { width: 100%; height: 100%; object-fit: cover; }
.newcard { border: 1px dashed var(--line2); background: transparent; box-shadow: none; display: grid; place-items: center; min-height: 220px; cursor: pointer; color: var(--muted); font-weight: 600; }
.newcard:hover { border-color: var(--accent-line); color: var(--text); background: var(--tint-1); }
.newcard .plusc { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--accent-line); display: grid; place-items: center; margin: 0 auto 10px; }
.newcard .plusc svg { color: var(--accent-bright); width: 20px; height: 20px; }

/* compose */
.drop { border: 1px dashed var(--line2); border-radius: var(--r-md); padding: 34px 20px; text-align: center; cursor: pointer; background: var(--tint-1); transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--accent-line); background: rgb(var(--accent-rgb) / .06); }
.drop .big { width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--accent-line); display: grid; place-items: center; margin: 0 auto 12px; }
.drop .big svg { width: 22px; height: 22px; color: var(--accent-bright); }
.drop h2 { margin: 0; }
.qitem { display: grid; grid-template-columns: 50px 1fr auto; gap: 14px; align-items: center; padding: 12px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.qitem .thumb { width: 50px; border-radius: 8px; }
.qitem textarea { min-height: 52px; }
.prog { height: 4px; border-radius: 99px; background: var(--tint-3); overflow: hidden; margin-top: 6px; }
.prog i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .2s; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.vcard { display: flex; flex-direction: column; gap: 8px; }
.vcard .cap { font-size: var(--fs-2); color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs a { padding: 10px 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; display: flex; gap: 7px; align-items: center; white-space: nowrap; }
.tabs a.on { color: var(--text); border-color: var(--accent); }
.tabs a.on .icon { color: var(--accent-bright); }
.tabs .count { font: 600 var(--fs-1)/1 var(--mono); padding: 3px 7px; border-radius: 99px; background: var(--tint-3); }

/* calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 8px; }
.cal .dow { font: 500 var(--fs-1) var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--dim); padding: 0 4px; }
.day { min-height: 160px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.day.today { border-color: var(--accent-line); background: linear-gradient(180deg, rgb(var(--accent-rgb) / .06), var(--surface) 60%); }
.day.past { opacity: .75; }
.day.other { opacity: .35; }
.day .dn { font: 600 var(--fs-2) var(--font); display: flex; justify-content: space-between; color: var(--muted); }
.day .dn .dim { font-family: var(--mono); }
.day.today .dn { color: var(--accent-bright); }
.tile { display: grid; grid-template-columns: 32px 1fr; gap: 7px; align-items: center; padding: 5px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; text-align: left; width: 100%; color: var(--text); }
.tile:hover { border-color: var(--line2); }
.tile .thumb { width: 32px; border-radius: 6px; border: 0; }
.tile .t { font: 500 var(--fs-1) var(--mono); }
.tile .a { font-size: var(--fs-1); color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile.posted { border-color: rgb(var(--ok-rgb) / .3); }
.tile.failed { border-color: rgb(var(--bad-rgb) / .45); }
.cal.month .day { min-height: 118px; }
.cal.month .tile { grid-template-columns: 22px 1fr; }
.cal.month .tile .thumb { width: 22px; }
@media (max-width: 900px) {
  .cal { grid-template-columns: 1fr; }
  .cal .dow { display: none; }
  .day { min-height: 0; }
  .day.other { display: none; }
  .cal.month .day:not(:has(.tile)) { display: none; }
}

/* stories */
.story-card { display: grid; grid-template-columns: 88px 1fr; gap: 14px; }
.story-card .thumb { width: 88px; border-radius: 10px; }
.ring { padding: 2px; border-radius: 12px; border: 1px solid var(--accent-line); }
.ring .thumb { border: 0 !important; }
.ring.done { border-color: var(--line); }

/* growth */
.gcard .big { font-size: 28px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.fleet-chart { width: 100%; height: 160px; }
.toplist { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.toplist div { display: flex; justify-content: space-between; gap: 10px; font-size: var(--fs-2); color: var(--muted); }
.toplist div span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toplist b { color: var(--text); font-family: var(--mono); font-weight: 500; }
.label { font: 500 var(--fs-1) var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--dim); }

.flash { padding: 13px 16px; border-radius: var(--r-md); border: 1px solid rgb(var(--ok-rgb) / .34); background: rgb(var(--ok-rgb) / .08); margin-bottom: 18px; }
.flash.err { border-color: rgb(var(--bad-rgb) / .4); background: rgb(var(--bad-rgb) / .08); }
.flash.warn { border-color: rgb(var(--warn-rgb) / .4); background: rgb(var(--warn-rgb) / .08); }
.code { font-family: var(--mono); background: var(--inset); padding: 3px 8px; border-radius: 8px; border: 1px solid var(--line2); user-select: all; }
.kv { display: grid; grid-template-columns: 150px 1fr auto; gap: 10px 14px; align-items: start; }
.kv dt { font: 500 var(--fs-1) var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--dim); padding-top: 4px; }
.kv dd { margin: 0; white-space: pre-wrap; word-break: break-word; }
@media (max-width: 640px) { .kv { grid-template-columns: 1fr auto; } .kv dt { grid-column: 1 / -1; padding: 0; } }
.hide { display: none !important; }
