/* =========================================================================
   Instagram Automation - design system
   Plain CSS, no framework, no build step, no CDN.
   ========================================================================= */

/* ---------------------------------------------------------------- tokens */
:root {
  color-scheme: dark;

  /* surfaces */
  --bg: #0b0d12;
  --bg-soft: #11141b;
  --surface: #151924;
  --surface-2: #1b2030;
  --surface-3: #232937;
  --border: #262c3b;
  --border-soft: #1e2431;

  /* text */
  --text: #e8ecf4;
  --text-dim: #9aa4b8;
  --text-faint: #626c81;

  /* brand - the instagram gradient, used sparingly */
  --brand-1: #f9a03f;
  --brand-2: #e6683c;
  --brand-3: #dc2743;
  --brand-4: #bc1888;
  --brand-grad: linear-gradient(135deg, #f9a03f, #dc2743 45%, #bc1888);
  --accent: #7c5cff;

  /* state */
  --ok: #34d399;
  --ok-bg: rgba(52, 211, 153, .12);
  --warn: #fbbf24;
  --warn-bg: rgba(251, 191, 36, .12);
  --danger: #f87171;
  --danger-bg: rgba(248, 113, 113, .12);
  --info: #60a5fa;
  --info-bg: rgba(96, 165, 250, .12);
  --idle: #64748b;
  --idle-bg: rgba(100, 116, 139, .14);

  /* shape */
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 20px;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
  --shadow-lg: 0 24px 60px -20px rgba(0,0,0,.75);

  --sidebar-w: 248px;
  --font: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f4f5fa;
    --bg-soft: #eceef6;
    --surface: #ffffff;
    --surface-2: #f6f7fc;
    --surface-3: #eaedf6;
    --border: #dde1ed;
    --border-soft: #e8ebf4;
    --text: #10141f;
    --text-dim: #4d576d;
    --text-faint: #78829a;

    /* state colours that actually read on white */
    --ok: #0f9d6a;      --ok-bg: rgba(15,157,106,.10);
    --warn: #b45309;    --warn-bg: rgba(217,119,6,.12);
    --danger: #dc2626;  --danger-bg: rgba(220,38,38,.09);
    --info: #2563eb;    --info-bg: rgba(37,99,235,.09);
    --idle: #667085;    --idle-bg: rgba(102,112,133,.10);
    --accent: #6941ff;

    --shadow: 0 1px 2px rgba(16,24,40,.05), 0 10px 28px -16px rgba(16,24,40,.28);
    --shadow-lg: 0 30px 70px -30px rgba(16,24,40,.35);
  }
}

/* ----------------------------------------------------------------- reset */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p  { margin: 0 0 10px; }
code, pre, .mono { font-family: var(--mono); }

/* --------------------------------------------------------------- layout */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 7%, transparent), transparent 220px),
    var(--bg-soft);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

/* the sprite itself never renders - only its <use> references do */
.sprite { display: none; }
svg.ico {
  width: 18px; height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 18px 16px;
  border-bottom: 1px solid var(--border-soft);
}
.brand-mark {
  width: 36px; height: 36px;
  border-radius: 11px;
  background: var(--brand-grad);
  display: grid; place-items: center;
  color: #fff;
  box-shadow: 0 6px 16px -6px rgba(220,39,67,.6);
}
.brand-mark svg {
  width: 19px; height: 19px;
  fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.brand-text strong { display: block; font-size: 14px; letter-spacing: -.01em; }
.brand-text span { font-size: 11px; color: var(--text-faint); }

.nav { padding: 10px 10px 16px; overflow-y: auto; flex: 1; }
.nav-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-faint);
  padding: 16px 10px 6px;
  font-weight: 700;
}
.nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  margin-bottom: 1px;
  border-radius: 10px;
  color: var(--text-dim);
  font-size: 13.5px;
  transition: background .15s, color .15s;
}
.nav a .ico { color: var(--text-faint); transition: color .15s; }
.nav a > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a:hover .ico { color: var(--text-dim); }

.nav a.active {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-2));
  color: var(--text);
  font-weight: 600;
}
.nav a.active .ico { color: var(--accent); }
.nav a.active::before {          /* the rail, on the sidebar edge itself */
  content: "";
  position: absolute;
  left: -10px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 20px;
  border-radius: 0 3px 3px 0;
  background: var(--brand-grad);
}
.nav a .badge { margin-left: auto; }

.sidebar-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--border-soft);
  font-size: 12px;
  color: var(--text-faint);
}
.sidebar-foot .avatar {
  width: 30px; height: 30px;
  flex: 0 0 30px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand-grad);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
}
.sidebar-foot .who { flex: 1; min-width: 0; line-height: 1.35; }
.sidebar-foot .who strong { display: block; font-size: 12.5px; color: var(--text); font-weight: 600; }
.sidebar-foot .who span { font-size: 10.5px; color: var(--text-faint); }

.icon-btn {
  display: grid; place-items: center;
  width: 30px; height: 30px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover { background: var(--danger-bg); color: var(--danger); border-color: transparent; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 26px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 20;
}
.topbar .spacer { flex: 1; }
.page-title { font-size: 18px; font-weight: 600; }
.page-sub { font-size: 12.5px; color: var(--text-faint); }

.content { padding: 22px 26px 60px; max-width: 1400px; width: 100%; }

/* ---------------------------------------------------------------- cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }
.card-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-soft);
}
.card-head .spacer { flex: 1; }
.card-body { padding: 18px; }
.card-body.tight { padding: 12px 18px; }

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid.sidebar-right { grid-template-columns: minmax(0,2fr) minmax(0,1fr); }
@media (max-width: 1100px) {
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid.cols-3, .grid.sidebar-right { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .grid.cols-2, .grid.cols-4 { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------- stat tile */
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}
.stat::after {
  content: "";
  position: absolute; inset: 0 auto 0 0;
  width: 3px;
  background: var(--accent);
  opacity: .8;
}
.stat.ok::after     { background: var(--ok); }
.stat.warn::after   { background: var(--warn); }
.stat.danger::after { background: var(--danger); }
.stat.idle::after   { background: var(--idle); }
.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-faint);
  font-weight: 600;
}
.stat-value {
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  margin-top: 4px;
  line-height: 1.15;
}
.stat-value.sm { font-size: 19px; }
.stat-note { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

/* ------------------------------------------------------------------ pill */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .01em;
  background: var(--idle-bg); color: var(--idle);
  white-space: nowrap;
}
.pill.ok      { background: var(--ok-bg); color: var(--ok); }
.pill.warn    { background: var(--warn-bg); color: var(--warn); }
.pill.danger  { background: var(--danger-bg); color: var(--danger); }
.pill.info    { background: var(--info-bg); color: var(--info); }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill .dot.live { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }

.badge {
  display: inline-block;
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 550;
  font-family: inherit;
  cursor: pointer;
  transition: background .14s, border-color .14s, transform .06s;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: var(--brand-grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 18px -8px rgba(220,39,67,.7);
}
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--danger-bg); border-color: transparent; color: var(--danger); }
.btn.danger:hover { background: rgba(248,113,113,.2); }
.btn.ok { background: var(--ok-bg); border-color: transparent; color: var(--ok); }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.btn-stop {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  border: none; color: #fff;
  font-weight: 650;
  letter-spacing: .02em;
  box-shadow: 0 8px 22px -10px rgba(239,68,68,.9);
}

.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form { display: inline-block; }

/* ----------------------------------------------------------------- forms */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 5px;
}
.field .hint { font-size: 11.5px; color: var(--text-faint); margin-top: 4px; font-weight: 400; }
input[type=text], input[type=password], input[type=number], input[type=date],
input[type=time], input[type=url], select, textarea {
  width: 100%;
  padding: 9px 11px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 13.5px;
  font-family: inherit;
  transition: border-color .14s, box-shadow .14s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,92,255,.18);
}
textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
select { cursor: pointer; }

.check { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 10px; }
.check input { margin-top: 3px; accent-color: var(--accent); width: 15px; height: 15px; }
.check label { margin: 0; font-size: 13px; color: var(--text); font-weight: 500; }
.check .hint { margin-top: 2px; }

.day-picker { display: flex; gap: 6px; flex-wrap: wrap; }
.day-picker input { display: none; }
.day-picker label {
  padding: 6px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  color: var(--text-dim);
  margin: 0;
  transition: all .14s;
  user-select: none;
}
.day-picker input:checked + label {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.form-row { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0,1fr)); }
.form-row.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
@media (max-width: 700px) { .form-row, .form-row.three { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-faint);
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td { padding: 11px 14px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.tight { white-space: nowrap; }

/* ------------------------------------------------------------ list items */
.list-item {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border-soft);
  transition: background .14s;
}
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: var(--surface-2); }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 550; font-size: 13.5px; }
.list-item .meta { font-size: 12px; color: var(--text-faint); margin-top: 1px; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- meters */
.meter {
  height: 7px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 7px;
}
.meter > span {
  display: block; height: 100%;
  background: var(--ok);
  border-radius: 999px;
  transition: width .5s ease;
}
.meter.warn > span { background: var(--warn); }
.meter.danger > span { background: var(--danger); }
.meter-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-dim); }
.meter-row b { color: var(--text); font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------- banners */
.banner {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 12px 15px;
  border-radius: var(--r);
  border: 1px solid transparent;
  font-size: 13px;
  margin-bottom: 16px;
}
.banner .ico { font-size: 15px; line-height: 1.4; }
.banner.ok     { background: var(--ok-bg);     border-color: rgba(52,211,153,.3);  color: var(--ok); }
.banner.warn   { background: var(--warn-bg);   border-color: rgba(251,191,36,.3);  color: var(--warn); }
.banner.danger { background: var(--danger-bg); border-color: rgba(248,113,113,.3); color: var(--danger); }
.banner.info   { background: var(--info-bg);   border-color: rgba(96,165,250,.3);  color: var(--info); }
.banner strong { display: block; margin-bottom: 1px; }
.banner .body { color: var(--text-dim); }
.banner.ok .body, .banner.warn .body, .banner.danger .body, .banner.info .body { opacity: .92; }

/* ----------------------------------------------------------------- misc */
.empty {
  text-align: center;
  padding: 46px 20px;
  color: var(--text-faint);
}
.empty .ico { font-size: 34px; opacity: .5; display: block; margin-bottom: 10px; }
.empty h3 { color: var(--text-dim); margin-bottom: 4px; }

.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; font-size: 13px; }
.kv dt { color: var(--text-faint); }
.kv dd { margin: 0; word-break: break-word; }

.divider { height: 1px; background: var(--border-soft); margin: 18px 0; }

.codebox {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.bars { display: flex; align-items: flex-end; gap: 5px; height: 120px; padding-top: 10px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 3px; min-width: 0; }
.bars .bar i {
  display: block;
  background: var(--accent);
  border-radius: 4px 4px 0 0;
  min-height: 2px;
  transition: height .4s ease;
}
.bars .bar i.ok { background: var(--ok); }
.bars .bar i.danger { background: var(--danger); }
.bars .bar small {
  font-size: 9.5px; color: var(--text-faint); text-align: center;
  overflow: hidden; white-space: nowrap;
}

/* --------------------------------------------------------------- login */
/* A split page: the left panel says what this thing is, the right one signs
   you in. Below 900px the panel is dropped and only the form remains. */
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: var(--bg);
}

/* ---------------------------------------------------------- left panel */
.auth-show {
  position: relative;
  z-index: 0;
  overflow: hidden;
  display: grid;
  align-content: center;
  padding: 56px clamp(32px, 5vw, 72px);
  color: #fff;
  background: #0a0912;
}
/* Two slow-drifting colour fields, so the panel is never flat. They sit
   behind the content on their own layer and never intercept a click. */
.auth-show::before,
.auth-show::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.auth-show::before {
  width: 620px; height: 620px;
  top: -210px; left: -190px;
  background: radial-gradient(circle, rgba(220,39,67,.58), transparent 66%);
  animation: auth-drift-a 24s ease-in-out infinite alternate;
}
.auth-show::after {
  width: 560px; height: 560px;
  right: -200px; bottom: -210px;
  background: radial-gradient(circle, rgba(124,92,255,.52), transparent 66%);
  animation: auth-drift-b 30s ease-in-out infinite alternate;
}
@keyframes auth-drift-a {
  to { transform: translate3d(80px, 70px, 0) scale(1.12); }
}
@keyframes auth-drift-b {
  to { transform: translate3d(-70px, -60px, 0) scale(1.08); }
}

.auth-show .brand { border: none; padding: 0; margin-bottom: 30px; }
.auth-show .brand-mark {
  width: 42px; height: 42px; border-radius: 13px;
  box-shadow: 0 10px 30px -8px rgba(220,39,67,.75);
}
.auth-show .brand-text strong { color: #fff; font-size: 14.5px; }
.auth-show .brand-text span { color: rgba(255,255,255,.62); }

.auth-lede {
  font-size: clamp(26px, 3.1vw, 36px);
  line-height: 1.22;
  font-weight: 640;
  letter-spacing: -.02em;
  margin: 0 0 14px;
  max-width: 17ch;
}
.auth-lede em {
  font-style: normal;
  background: linear-gradient(100deg, #f9a03f, #ff6a8a 45%, #c07bff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-sub {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,.66);
  margin: 0;
  max-width: 46ch;
}

.auth-feats { display: grid; gap: 16px; margin-top: 36px; }
.auth-feat { display: flex; gap: 13px; align-items: flex-start; }
.auth-feat .fico {
  width: 34px; height: 34px; flex: none;
  border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
}
.auth-feat .fico svg {
  width: 17px; height: 17px;
  fill: none; stroke: #fff; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.auth-feat b {
  display: block;
  font-size: 13.5px; font-weight: 600;
  margin-bottom: 2px;
}
.auth-feat span {
  font-size: 12.5px; line-height: 1.5;
  color: rgba(255,255,255,.58);
}

.auth-note {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.11);
  font-size: 11.5px;
  line-height: 1.6;
  color: rgba(255,255,255,.45);
  max-width: 52ch;
}

/* --------------------------------------------------------- right panel */
.auth-form {
  display: grid;
  place-items: center;
  padding: 40px 24px;
}
.auth-card { width: 100%; max-width: 384px; }

/* Shown only when the left panel is hidden, so the page keeps its identity. */
.auth-card .brand { display: none; border: none; padding: 0 0 22px; }

.auth-title {
  font-size: 23px;
  font-weight: 640;
  letter-spacing: -.015em;
  margin: 0 0 5px;
}
.auth-hint {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0 0 24px;
}

/* Input with a leading icon, and a reveal button on the password. */
.auth-input { position: relative; }
.auth-input input { padding: 11px 12px 11px 39px; font-size: 14px; }
.auth-input input[type=password],
.auth-input input.has-reveal { padding-right: 42px; }
.auth-input .lead {
  position: absolute;
  left: 13px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  fill: none; stroke: var(--text-faint); stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
  pointer-events: none;
  transition: stroke .14s;
}
.auth-input input:focus + .lead { stroke: var(--accent); }

.reveal {
  position: absolute;
  right: 7px; top: 50%;
  transform: translateY(-50%);
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 0; border-radius: 8px;
  background: none;
  color: var(--text-faint);
  cursor: pointer;
  transition: color .14s, background .14s;
}
.reveal:hover { color: var(--text); background: var(--surface-2); }
.reveal:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.reveal svg {
  width: 16px; height: 16px;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

/* Caps Lock catches people out on a password field more than anything else. */
.caps {
  display: none;
  align-items: center; gap: 6px;
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--warn);
}
.caps.on { display: flex; }

.auth-card .btn.primary {
  padding: 12px 16px;
  font-size: 14px;
  margin-top: 4px;
}
.auth-card .btn.primary[aria-busy="true"] { opacity: .75; pointer-events: none; }
.spin {
  width: 15px; height: 15px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin .6s linear infinite;
}
@keyframes auth-spin { to { transform: rotate(360deg); } }

.auth-foot {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border-soft);
  font-size: 11.5px;
  color: var(--text-faint);
  text-align: center;
  line-height: 1.7;
}
.auth-foot a { color: var(--text-dim); }
.auth-foot a:hover { color: var(--text); }
.auth-lock {
  display: inline-flex; align-items: center; gap: 5px;
}

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-show { display: none; }
  .auth-card .brand { display: flex; justify-content: center; }
  .auth-form {
    /* The colour has to come from somewhere once the panel is gone. */
    background:
      radial-gradient(760px 420px at 12% -12%, rgba(188,24,136,.15), transparent 62%),
      radial-gradient(680px 420px at 92% 108%, rgba(124,92,255,.13), transparent 62%),
      var(--bg);
  }
  .auth-title, .auth-hint { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-show::before, .auth-show::after { animation: none; }
  .spin { animation-duration: 2s; }
}

/* -------------------------------------------------------------- toolbar */
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }
.chip {
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-dim);
  background: var(--surface);
  transition: all .14s;
}
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 550; }

/* -------------------------------------------------------------- details */
details.acc {
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  margin-bottom: 12px;
  overflow: hidden;
}
details.acc > summary {
  padding: 13px 16px;
  cursor: pointer;
  font-weight: 550;
  font-size: 13.5px;
  list-style: none;
  display: flex; align-items: center; gap: 10px;
}
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary::before { content: "▸"; color: var(--text-faint); transition: transform .2s; }
details.acc[open] > summary::before { transform: rotate(90deg); }
details.acc > summary .spacer { flex: 1; }
details.acc .acc-body { padding: 0 16px 16px; border-top: 1px solid var(--border-soft); padding-top: 16px; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 900px) {
  .app { flex-direction: column; }
  .sidebar {
    width: 100%; flex: none; height: auto; position: static;
    border-right: none; border-bottom: 1px solid var(--border);
    background: var(--bg-soft);   /* the vertical tint makes no sense in a strip */
  }
  .nav { display: flex; gap: 4px; overflow-x: auto; padding: 8px; }
  .nav-label, .sidebar-foot { display: none; }
  .nav a { white-space: nowrap; margin-bottom: 0; }
  .nav a.active::before { display: none; }
  .nav a.active { box-shadow: inset 0 -2px 0 var(--accent); }
  .content { padding: 16px; }
  .topbar { padding: 12px 16px; }
}

/* print - for saving a campaign report */
@media print {
  .sidebar, .topbar, .btn, .toolbar { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; border-color: #ccc; }
}

/* =========================================================================
   Safety console - the components the /safety page is built from.
   Additive only; nothing above was removed.
   ========================================================================= */

/* --------------------------------------------------------- section head */
.section {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 26px 2px 12px;
}
.section:first-child { margin-top: 4px; }
.section h2 { font-size: 14px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-dim); }
.section .rule { flex: 1; height: 1px; background: var(--border-soft); }
.section .note { font-size: 12px; color: var(--text-faint); }

/* ------------------------------------------------------------ hero note */
.note-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--info) 8%, transparent), transparent 70%),
    var(--surface);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.note-card .note-ico {
  width: 36px; height: 36px;
  flex: 0 0 36px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--info-bg);
  color: var(--info);
  font-size: 17px;
}
.note-card strong { display: block; font-size: 13.5px; margin-bottom: 2px; }
.note-card .body { color: var(--text-dim); font-size: 12.5px; max-width: 90ch; }

/* -------------------------------------------------------- metric tiles */
.metric {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 18px 18px;
  box-shadow: var(--shadow);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.metric::before {
  content: "";
  position: absolute; inset: 0 0 auto 0;
  height: 3px;
  background: var(--tone, var(--accent));
  opacity: .9;
}
.metric::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--tone, var(--accent)) 12%, transparent), transparent 62%);
}
.metric > * { position: relative; z-index: 1; }
.metric:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--tone, var(--accent)) 35%, var(--border));
}
.metric.ok     { --tone: var(--ok); }
.metric.warn   { --tone: var(--warn); }
.metric.danger { --tone: var(--danger); }
.metric.idle   { --tone: var(--idle); }

.metric-top { display: flex; align-items: center; gap: 8px; }
.metric-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--text-faint);
  font-weight: 700;
}
.metric-top .spacer { flex: 1; }
.metric-pct {
  font-size: 11px;
  font-weight: 700;
  color: var(--tone, var(--accent));
  background: color-mix(in srgb, var(--tone, var(--accent)) 13%, transparent);
  padding: 2px 8px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.metric-value {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin: 8px 0 2px;
}
.metric-foot { font-size: 11.5px; color: var(--text-faint); margin-top: 8px; }
.metric .meter { margin-top: 10px; }
.metric .pill { margin-top: 10px; }

/* richer meters - still driven by the live health poll in app.js */
.meter { height: 8px; background: color-mix(in srgb, var(--text-faint) 16%, transparent); }
.meter > span {
  background: linear-gradient(90deg, color-mix(in srgb, var(--ok) 60%, #ffffff), var(--ok));
}
.meter.warn > span {
  background: linear-gradient(90deg, color-mix(in srgb, var(--warn) 60%, #ffffff), var(--warn));
}
.meter.danger > span {
  background: linear-gradient(90deg, color-mix(in srgb, var(--danger) 60%, #ffffff), var(--danger));
}

/* failure pips - one dot per allowed consecutive failure */
.pips { display: flex; gap: 5px; margin-top: 12px; }
.pips i {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-faint) 18%, transparent);
}
.pips i.on { background: var(--danger); }

/* ---------------------------------------------------------- ramp track */
.ramp {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.ramp-step { position: relative; text-align: center; padding-top: 30px; }
.ramp-step::before {
  content: "";
  position: absolute;
  top: 13px;
  left: -5px; right: -5px;
  height: 2px;
  background: var(--border);
}
.ramp-step:first-child::before { left: 50%; }
.ramp-step:last-child::before  { right: 50%; }
.ramp-step.done::before { background: var(--accent); }
/* the track stops dead at the current node - everything right of it is unearned */
.ramp-step.current::before {
  background: linear-gradient(90deg, var(--accent) 0 50%, var(--border) 50% 100%);
}
.ramp-node {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
  background: var(--surface);
  border: 2px solid var(--border);
  color: var(--text-faint);
  z-index: 1;
}
.ramp-step.done .ramp-node { background: var(--accent); border-color: var(--accent); color: #fff; }
.ramp-step.current .ramp-node {
  background: var(--brand-grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-3) 20%, transparent);
}
.ramp-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 10px;
  background: var(--surface-2);
  transition: border-color .16s, background .16s, transform .16s;
}
.ramp-step.current .ramp-card {
  background: var(--surface);
  border-color: color-mix(in srgb, var(--brand-3) 45%, var(--border));
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.ramp-step.later .ramp-card { opacity: .6; }
.ramp-name { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); }
.ramp-big {
  font-size: 22px; font-weight: 700; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; line-height: 1.2; margin-top: 3px;
}
.ramp-sub { font-size: 11.5px; color: var(--text-faint); }
.ramp-card .pill { margin-top: 9px; }
@media (max-width: 860px) {
  .ramp { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ramp-step::before { display: none; }
}

/* -------------------------------------------------------- limit fields */
.limit {
  display: grid;
  grid-template-columns: 1fr 124px;
  align-items: center;
  gap: 8px 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
}
.limit:last-of-type { border-bottom: none; padding-bottom: 2px; }
.limit label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin: 0 0 3px; }
.limit .hint { font-size: 11.5px; color: var(--text-faint); }
.limit .range {
  display: inline-block;
  margin-top: 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 1px 8px;
  font-variant-numeric: tabular-nums;
}
.limit input { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
@media (max-width: 560px) { .limit { grid-template-columns: 1fr; } .limit input { text-align: left; } }

/* ------------------------------------------------------------ switches */
.switch-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border-soft);
}
.switch-row:last-of-type { border-bottom: none; padding-bottom: 2px; }
.switch-row .grow { flex: 1; min-width: 0; }
.switch-row .switch-title { font-size: 13.5px; font-weight: 600; }
.switch-row .hint { font-size: 12px; color: var(--text-faint); margin-top: 3px; max-width: 74ch; }

.switch { position: relative; flex: 0 0 auto; display: inline-block; width: 46px; height: 27px; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 2; }
.switch .track {
  position: absolute; inset: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-faint) 30%, transparent);
  border: 1px solid var(--border);
  transition: background .18s ease, border-color .18s ease;
}
.switch .track::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 21px; height: 21px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
  transition: transform .18s cubic-bezier(.34,1.4,.64,1);
}
.switch input:checked + .track { background: var(--ok); border-color: transparent; }
.switch input:checked + .track::after { transform: translateX(19px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.switch.warn input:checked + .track { background: var(--warn); }

.locked {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 8px;
  font-size: 11.5px; font-weight: 600;
  color: var(--warn);
  background: var(--warn-bg);
  border-radius: 8px;
  padding: 4px 9px;
}

/* ------------------------------------------------------------ save bar */
.save-bar {
  display: flex; align-items: center; gap: 12px;
  margin-top: 16px;
  padding: 13px 18px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  position: sticky;
  bottom: 14px;
  z-index: 10;
}
.save-bar .msg { font-size: 12.5px; color: var(--text-faint); flex: 1; }

/* --------------------------------------------------------- danger zone */
.card.zone-danger { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.card.zone-danger .card-head {
  background: var(--danger-bg);
  border-bottom-color: color-mix(in srgb, var(--danger) 22%, var(--border));
  border-radius: var(--r) var(--r) 0 0;
}
.card.zone-danger .card-head h2 { color: var(--danger); }

/* =========================================================================
   Dashboard - hero, quick actions and the pieces the overview screen adds.
   Additive only; nothing above was removed.
   ========================================================================= */

/* ------------------------------------------------------------------ hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 18px;
  align-items: center;
  padding: 20px 22px;
  margin-bottom: 4px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  background:
    radial-gradient(700px 220px at 0% 0%, color-mix(in srgb, var(--tone, var(--accent)) 13%, transparent), transparent 70%),
    linear-gradient(180deg, var(--surface), var(--bg-soft));
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0 0 auto 0;
  height: 3px;
  background: var(--tone, var(--accent));
}
.hero.ok     { --tone: var(--ok); }
.hero.warn   { --tone: var(--warn); }
.hero.danger { --tone: var(--danger); }
.hero.idle   { --tone: var(--idle); }

.hero-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.hero-id { display: flex; align-items: center; gap: 13px; min-width: 0; }
.hero-id .grow { min-width: 0; }
.hero-avatar {
  width: 44px; height: 44px;
  flex: 0 0 44px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: var(--brand-grad);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 8px 20px -8px rgba(220,39,67,.65);
}
.hero-name { font-size: 19px; font-weight: 650; letter-spacing: -.02em; }
.hero-sub { font-size: 12.5px; color: var(--text-faint); }

.hero-state { display: flex; align-items: flex-start; gap: 11px; }
.hero-state strong { font-size: 14px; }
.hero-body { font-size: 12.5px; color: var(--text-dim); max-width: 70ch; }
.hero-dot {
  width: 10px; height: 10px;
  flex: 0 0 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--tone, var(--idle));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--tone, var(--idle)) 20%, transparent);
}
.hero.ok .hero-dot { animation: pulse 2s ease-in-out infinite; }

.hero-actions { display: flex; gap: 9px; flex-wrap: wrap; }

.hero-side { text-align: center; }
.hero-side-note { font-size: 11.5px; color: var(--text-faint); margin-top: 10px; line-height: 1.4; }

/* --------------------------------------------------------- success ring */
.ring { position: relative; width: 130px; height: 130px; margin: 0 auto; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; stroke-linecap: round; }
.ring .ring-track { stroke: color-mix(in srgb, var(--text-faint) 18%, transparent); }
.ring .ring-fill {
  stroke: var(--tone, var(--accent));
  transition: stroke-dashoffset .6s ease, stroke .3s;
}
.ring.ok     { --tone: var(--ok); }
.ring.warn   { --tone: var(--warn); }
.ring.danger { --tone: var(--danger); }
.ring.idle   { --tone: var(--idle); }
.ring-text {
  position: absolute; inset: 0;
  display: grid; place-content: center;
  line-height: 1.1;
}
.ring-text b {
  display: block;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.ring-text small {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--text-faint);
  font-weight: 700;
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-side { display: flex; align-items: center; gap: 16px; text-align: left; }
  .hero-side .ring { width: 92px; height: 92px; margin: 0; }
  .ring-text b { font-size: 20px; }
  .hero-side-note { margin-top: 0; }
}

/* -------------------------------------------------------- quick actions */
.quick {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.quick-form { display: contents; }
.quick-btn {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 12px 13px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .14s ease, border-color .14s, background .14s, box-shadow .14s;
}
.quick-btn:hover {
  transform: translateY(-2px);
  background: var(--surface-2);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  box-shadow: var(--shadow-lg);
}
.quick-btn:active { transform: translateY(0); }
.quick-ico {
  width: 34px; height: 34px;
  flex: 0 0 34px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}
.quick-text { min-width: 0; line-height: 1.3; }
.quick-text strong { display: block; font-size: 13px; font-weight: 600; }
.quick-text small { display: block; font-size: 11px; color: var(--text-faint); }

@media (max-width: 1240px) { .quick { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 700px)  { .quick { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 440px)  { .quick { grid-template-columns: 1fr; } }

/* ------------------------------------------------- metric tile extras */
.grid.cols-5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
@media (max-width: 1240px) { .grid.cols-5 { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 720px)  { .grid.cols-5 { grid-template-columns: repeat(2, minmax(0,1fr)); } }

.metric-pill { margin: 12px 0 2px; }
.metric-value.sm { font-size: 22px; }
.metric-link {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
  border-bottom: 1px dashed color-mix(in srgb, var(--text-faint) 55%, transparent);
  transition: color .14s, border-color .14s;
}
.metric-link:hover { color: var(--accent); border-color: var(--accent); }

/* the ramp, shrunk to a row of segments that fits inside a tile */
.ramp-mini { list-style: none; display: flex; gap: 4px; margin: 12px 0 0; padding: 0; }
.ramp-mini li {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-faint) 18%, transparent);
}
.ramp-mini li.done { background: color-mix(in srgb, var(--accent) 55%, transparent); }
.ramp-mini li.current { background: var(--brand-grad); }

/* ------------------------------------------------------- chart legend */
.legend {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--text-faint); font-weight: 600;
}
.legend i { width: 9px; height: 9px; border-radius: 3px; background: var(--accent); }
.legend i.ok     { background: var(--ok); }
.legend i.danger { background: var(--danger); }
.legend i.idle   { background: color-mix(in srgb, var(--text-faint) 45%, transparent); }

.bars.tall { height: 176px; gap: 6px; align-items: flex-end; }
.bars.tall .bar { cursor: default; }
.bars.tall .bar i { border-radius: 0; }
.bars.tall .bar i:first-of-type { border-radius: 4px 4px 0 0; }
.bars.tall .bar:hover i { filter: brightness(1.15); }
.bars .bar i.idle { background: color-mix(in srgb, var(--text-faint) 40%, transparent); }
.bars .bar small { margin-top: 6px; }

/* ------------------------------------------------------- list extras */
.list-item .src {
  width: 28px; height: 28px;
  flex: 0 0 28px;
  display: grid; place-items: center;
  border-radius: 9px;
  font-size: 13px;
  background: var(--surface-3);
  color: var(--text-dim);
}
.list-item .src.dm { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.list-item .when {
  font-size: 11.5px;
  color: var(--text-faint);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 620px) { .list-item .when { display: none; } }

.tbar {
  height: 4px;
  margin-top: 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-faint) 16%, transparent);
  overflow: hidden;
}
.tbar > span { display: block; height: 100%; border-radius: 999px; background: var(--brand-grad); }
.tcount {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

/* =========================================================================
   Secret values - a masked credential with a reveal button beside it.
   ========================================================================= */
/* a masked value in a read-only list, with its own reveal button */
.secret { display: flex; align-items: center; gap: 8px; min-width: 0; }
.secret-value { min-width: 0; word-break: break-all; }
.secret-btn {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-faint);
  font-family: var(--font);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .14s, border-color .14s, background .14s;
}
.secret-btn:hover { color: var(--text); border-color: var(--accent); }
.secret-btn[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
