/* Kagel console prototype — tokens match the reworked Groq mock */
:root {
  --bg: #fafafa;
  --card: #ffffff;
  --text: #131417;
  --text-soft: #24262b;
  --muted: #74777e;
  --border: #e6e7e9;
  --border-strong: #d5d7db;
  --accent: #d96f92;
  --accent-soft: #fce7ee;
  --accent-ink: #b85578;
  --chart: #52555c;
  --danger: #d43d3d;
  --danger-soft: #fdecec;
  --ok: #2f7a46;
  --ok-soft: #e3f2e8;
  --warn: #91641c;
  --warn-soft: #f9efdb;
  --well: #f2f3f4;
  --shadow: 0 1px 2px rgba(19, 20, 23, 0.05);
  color-scheme: light;
}
html.dark {
  --bg: #1f2025;
  --card: #191a1e;
  --text: #f7f8f9;
  --text-soft: #e0e0e0;
  --muted: #a4a7ad;
  --border: rgba(153, 153, 153, 0.16);
  --border-strong: rgba(153, 153, 153, 0.32);
  --accent: #f2a6bc;
  --accent-soft: #33222a;
  --accent-ink: #f2a6bc;
  --chart: #9599a1;
  --danger: #e05252;
  --danger-soft: #37201f;
  --ok: #7dc491;
  --ok-soft: #1d2c22;
  --warn: #e0b063;
  --warn-soft: #322a1a;
  --well: #222327;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  transition: background-color 0.2s ease, color 0.2s ease;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .font-header { font-family: "Space Grotesk", "Inter", sans-serif; }

a { color: inherit; text-decoration: none; }

/* ---------- top nav ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 23px;
}
.topbar .left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.wordmark {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 700; font-size: 19px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: #e2e4e8;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.95), 0 -1px 1px rgba(19, 20, 23, 0.3);
  user-select: none;
}
html.dark .wordmark {
  color: #141518;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.07), 0 -1px 1px rgba(0, 0, 0, 0.85);
}
.crumbs { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; white-space: nowrap; }
.crumbs .sep { opacity: 0.6; }
.crumbs button {
  appearance: none; border: none; background: transparent; font: inherit; color: inherit;
  display: inline-flex; align-items: center; gap: 4px; cursor: pointer; padding: 4px 6px; border-radius: 6px;
}
.crumbs button:hover { background: var(--well); color: var(--text); }
.topbar .right { display: flex; align-items: center; gap: 6px; }
.nav-link {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: 14px;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 8px;
  transition: color 0.15s ease;
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--accent); font-weight: 500; }
.icon-btn {
  appearance: none; border: none; background: transparent; color: var(--muted);
  width: 32px; height: 32px; border-radius: 8px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: var(--well); color: var(--text); }
.icon-btn.active { color: var(--accent); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: #a855f7; color: #fff; font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; margin-left: 4px;
}

/* ---------- shell ---------- */
.shell { padding: 0 12px 12px; }
.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  min-height: calc(100vh - 68px);
  padding: 34px 38px 48px;
}
html.dark .panel { border-color: var(--border); }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 6px; }
.page-head p { margin: 0; color: var(--muted); font-size: 13.5px; max-width: 64ch; line-height: 1.55; }

h2.sec { font-size: 15px; font-weight: 600; margin: 34px 0 14px; }

/* ---------- buttons (bolt-neum bezel, as in the source mock) ---------- */
.btn {
  --bez-top: #ffffff;
  --bez-bot: #d0d2cd;
  --btn-from: #f5f5f5;
  --btn-to: #fffefe;
  position: relative;
  appearance: none; border: none; font: inherit; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 14px; font-weight: 400; color: var(--text);
  height: 40px; padding: 0 16px; border-radius: 8px;
  background: linear-gradient(180deg, var(--btn-from), var(--btn-to));
  transition: background 0.2s ease, box-shadow 0.2s ease, opacity 0.15s ease;
}
html.dark .btn {
  --bez-top: #999999;
  --bez-bot: #000000;
  --btn-from: #35373c;
  --btn-to: #484b52;
}
.btn::before {
  content: ""; position: absolute; inset: 0; padding: 1px; border-radius: 7px;
  background: linear-gradient(180deg, var(--bez-top), var(--bez-bot));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
          mask-composite: exclude;
  pointer-events: none; z-index: 1;
}
.btn:hover { --btn-from: #ffffff; }
html.dark .btn:hover { --btn-from: #3c3e44; }
.btn:active { --btn-from: #ededee; --btn-to: #f6f6f7; }
html.dark .btn:active { --btn-from: #2f3136; --btn-to: #3f4248; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn.primary::after {
  content: ""; position: absolute; inset: -1px; padding: 1px; border-radius: 8px;
  background: linear-gradient(180deg, #f6c6d4, #f2a6bc);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
          mask-composite: exclude;
  pointer-events: none; z-index: 2;
}
.btn.primary:hover { box-shadow: 0 0 8px rgba(242, 166, 188, 0.5); }
.btn.danger { color: var(--danger); }
.btn.danger::after {
  content: ""; position: absolute; inset: -1px; padding: 1px; border-radius: 8px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--danger) 45%, #fff), var(--danger));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  pointer-events: none; z-index: 2;
}
html.dark .btn.danger::after { background: linear-gradient(180deg, color-mix(in srgb, var(--danger) 60%, #000), var(--danger)); }
.btn.danger:hover { box-shadow: 0 0 8px color-mix(in srgb, var(--danger) 45%, transparent); }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.ghost::before { display: none; }
.btn.ghost:hover { background: var(--well); color: var(--text); box-shadow: none; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

.icon-action {
  appearance: none; border: 1px solid var(--border); background: var(--well);
  width: 34px; height: 34px; border-radius: 8px; cursor: pointer; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-action:hover { color: var(--text); border-color: var(--border-strong); }
.icon-action.danger { color: var(--danger); }
.icon-action.danger:hover { background: var(--danger-soft); border-color: var(--danger); }

/* ---------- table ---------- */
table.data { width: 100%; border-collapse: collapse; }
table.data th {
  text-align: left; font-size: 11.5px; font-weight: 500; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted);
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.data td { padding: 14px; border-bottom: 1px solid var(--border); font-size: 13.5px; vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }
table.data .mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; color: var(--muted); }
table.data .actions { text-align: right; white-space: nowrap; }
table.data .actions .icon-action + .icon-action { margin-left: 8px; }

/* ---------- chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 999px;
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.accent { background: var(--well); color: var(--text-soft); }
.chip.muted { background: var(--well); color: var(--muted); }

/* ---------- forms ---------- */
label.fld { display: block; font-size: 13px; font-weight: 500; margin: 0 0 6px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
input.txt, select.txt, textarea.txt {
  width: 100%; font: inherit; font-size: 13.5px; color: var(--text);
  background: var(--card); border: 1px solid var(--border-strong); border-radius: 10px;
  padding: 9px 12px; outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input.txt:focus, select.txt:focus, textarea.txt:focus {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 10%, transparent);
}
textarea.txt { resize: vertical; min-height: 74px; line-height: 1.5; }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 640px; }
.fcol { max-width: 640px; display: flex; flex-direction: column; gap: 18px; }

.switch { position: relative; display: inline-flex; width: 36px; height: 21px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .tr {
  position: absolute; inset: 0; border-radius: 999px; background: var(--well);
  border: 1px solid var(--border-strong); cursor: pointer; transition: background-color 0.18s ease;
}
.switch .tr::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%;
  background: var(--card); box-shadow: 0 1px 2px rgba(19,20,23,0.25); transition: transform 0.18s cubic-bezier(0.2,0.8,0.2,1);
}
.switch input:checked + .tr { background: #3a3d43; border-color: #3a3d43; }
html.dark .switch input:checked + .tr { background: #6d7178; border-color: #6d7178; }
.switch input:checked + .tr::after { transform: translateX(15px); }
.switch input:focus-visible + .tr { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- cards / misc ---------- */
.card-box { border: 1px solid var(--border); border-radius: 12px; padding: 20px 22px; background: var(--card); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.kpi .l { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.kpi .v { font-family: "Space Grotesk", "Inter", sans-serif; font-size: 26px; font-weight: 600; letter-spacing: -0.01em; }
.kpi .d { font-size: 12px; color: var(--muted); margin-top: 8px; }
.kpi .d.up { color: var(--ok); }
.kpi .d.down { color: var(--danger); }

.meter { height: 6px; border-radius: 999px; background: var(--well); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 999px; background: var(--chart); }

.code {
  background: var(--well); border: 1px solid var(--border); border-radius: 10px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; line-height: 1.65;
  padding: 14px 16px; overflow-x: auto; white-space: pre; color: var(--text-soft);
  position: relative;
}
.code .cm { color: var(--muted); }
.code .st { color: var(--accent-ink); }

/* ---------- modal ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(10, 10, 12, 0.5);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.overlay.open { display: flex; }
.modal {
  width: 100%; max-width: 420px; background: var(--card);
  border: 1px solid var(--border); border-radius: 14px; padding: 24px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}
.modal h3 { margin: 0 0 6px; font-size: 17px; }
.modal p { margin: 0 0 18px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.modal .foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ---------- toast ---------- */
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--text); color: var(--bg); font-size: 13px; font-weight: 500;
  padding: 10px 18px; border-radius: 999px; opacity: 0; pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s ease; z-index: 200;
}
#toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ---------- chart ---------- */
.chart-wrap { position: relative; }
.chart-tip {
  position: absolute; pointer-events: none; z-index: 5;
  background: var(--text); color: var(--bg);
  font-size: 12px; padding: 6px 10px; border-radius: 8px; white-space: nowrap;
  transform: translate(-50%, calc(-100% - 10px)); opacity: 0; transition: opacity 0.12s ease;
}
.chart-tip b { font-weight: 600; }
.chart svg { display: block; width: 100%; height: auto; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .axis-label { fill: var(--muted); font-size: 11px; font-family: "Inter", sans-serif; }
.chart .bar { fill: var(--chart); }
.chart .bar.dim { opacity: 0.45; }
details.dataview { margin-top: 14px; }
details.dataview summary { font-size: 12.5px; color: var(--muted); cursor: pointer; }
details.dataview table { margin-top: 10px; }

/* ---------- docs layout ---------- */
.docs { display: grid; grid-template-columns: 210px 1fr; gap: 40px; align-items: start; }
.docs nav { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 2px; }
.docs nav a { font-size: 13.5px; color: var(--muted); padding: 7px 12px; border-radius: 8px; }
.docs nav a:hover { color: var(--text); background: var(--well); }
.docs nav a.on { color: var(--text); background: var(--well); font-weight: 500; }
.prose { max-width: 72ch; }
.prose h2 { font-size: 19px; margin: 34px 0 10px; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--text-soft); line-height: 1.65; font-size: 14px; }
.prose p.note { color: var(--muted); font-size: 13px; }
.prose .code { margin: 14px 0; }

/* ---------- playground ---------- */
.pg { display: grid; grid-template-columns: 250px 1fr; gap: 28px; align-items: start; min-height: 60vh; }
.pg-side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 20px; }
.pg-chat { display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 12px; }
.msg .who {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
}
.msg.user .who { background: var(--well); color: var(--muted); }
.msg.ai .who { background: var(--well); color: var(--text-soft); }
.msg .bubble {
  background: var(--well); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 15px; font-size: 13.5px; line-height: 1.6; max-width: 66ch;
}
.msg.ai .bubble { background: var(--card); }
.pg-input { display: flex; gap: 10px; margin-top: 6px; }
.pg-input input { flex: 1; }
.slider-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.slider-row output { color: var(--muted); font-size: 12.5px; }
input[type="range"] { width: 100%; accent-color: var(--accent); }

/* ---------- theme toggle ---------- */
#kagel-theme-toggle {
  position: fixed; bottom: 20px; right: 20px; z-index: 300;
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--card); color: var(--text); border: 1px solid var(--border);
  box-shadow: 0 6px 18px rgba(19, 20, 23, 0.16); cursor: pointer; padding: 0;
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.18s ease;
}
#kagel-theme-toggle:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(19, 20, 23, 0.22); }
#kagel-theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#kagel-theme-toggle .moon { display: none; }
html.dark #kagel-theme-toggle .moon { display: block; }
html.dark #kagel-theme-toggle .sun { display: none; }

@media (max-width: 860px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .docs, .pg { grid-template-columns: 1fr; }
  .docs nav, .pg-side { position: static; }
  .frow { grid-template-columns: 1fr; }
  .panel { padding: 24px 20px 40px; }
  .topbar { padding: 12px 14px; }
  .crumbs { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .switch .tr::after, #toast, #kagel-theme-toggle { transition: none; }
}

/* ================= app.kagel.cc additions ================= */

/* app header */
.appbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 23px;
}
.appbar .right { display: flex; align-items: center; gap: 8px; }
.lang-switch { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 8px; overflow: hidden; }
.lang-switch button {
  appearance: none; border: none; background: transparent; font: inherit; cursor: pointer;
  font-size: 12.5px; padding: 5px 10px; color: var(--muted);
}
.lang-switch button.on { background: var(--well); color: var(--text); font-weight: 500; }

/* auth */
.auth-wrap {
  min-height: calc(100vh - 64px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 7vh 20px 60px;
}
.auth-card {
  width: 100%; max-width: 400px;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 30px 30px 26px;
  box-shadow: 0 8px 30px rgba(19, 20, 23, 0.06);
}
html.dark .auth-card { box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4); }
.auth-card h1 { font-size: 21px; font-weight: 600; margin: 0 0 4px; }
.auth-card .sub { color: var(--muted); font-size: 13.5px; margin: 0 0 22px; line-height: 1.5; }
.auth-card form { display: flex; flex-direction: column; gap: 16px; }
.auth-foot { margin-top: 20px; text-align: center; font-size: 13px; color: var(--muted); }
.auth-foot a, a.softlink { text-decoration: underline; text-underline-offset: 3px; }
.auth-foot a:hover, a.softlink:hover { color: var(--text); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.btn.w-full { width: 100%; }
.consent { font-size: 12px; color: var(--muted); line-height: 1.55; }

.strength { display: flex; gap: 5px; margin-top: 8px; align-items: center; }
.strength i { height: 4px; flex: 1; border-radius: 999px; background: var(--well); }
.strength .lab { flex: none; font-size: 11.5px; color: var(--muted); margin-left: 4px; min-width: 92px; text-align: right; }
.strength[data-level="1"] i:nth-child(1) { background: var(--danger); }
.strength[data-level="2"] i:nth-child(-n+2) { background: var(--warn); }
.strength[data-level="3"] i:nth-child(-n+3) { background: var(--ok); }

.phone-row { display: grid; grid-template-columns: 108px 1fr; gap: 10px; }

.code-row { display: flex; gap: 10px; justify-content: space-between; }
.code-row input {
  width: 48px; height: 56px; text-align: center;
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 22px;
  color: var(--text); background: var(--card);
  border: 1px solid var(--border-strong); border-radius: 10px; outline: none;
}
.code-row input:focus { border-color: var(--text-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 10%, transparent); }

/* stepper */
.stepper { display: flex; align-items: center; justify-content: center; gap: 10px; list-style: none; margin: 0; padding: 0; }
.stepper li { display: flex; align-items: center; gap: 10px; }
.stepper .conn { width: 34px; height: 1px; background: var(--border-strong); }
.step-pill {
  appearance: none; border: none; font: inherit; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 500;
  background: transparent; color: var(--muted);
}
.step-pill .n {
  width: 20px; height: 20px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 600; background: var(--well); color: var(--muted);
}
.step-pill.current { background: var(--text); color: var(--bg); }
.step-pill.current .n { background: color-mix(in srgb, var(--bg) 25%, transparent); color: var(--bg); }
.step-pill.done { color: var(--text); }
.step-pill.done .n { background: var(--ok-soft); color: var(--ok); }
.step-pill[disabled] { cursor: default; }

/* platform rows */
.plat-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 4px; border-bottom: 1px solid var(--border);
}
.plat-row:last-child { border-bottom: none; }
.plat-ico {
  flex: none; width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--well); border: 1px solid var(--border);
  font-family: "Space Grotesk", "Inter", sans-serif; font-weight: 600; font-size: 15px; color: var(--text-soft);
}
.plat-name { font-weight: 500; font-size: 14px; }
.plat-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.plat-right { margin-left: auto; }

/* key panel */
.key-row2 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.key-well {
  flex: 1; min-width: 240px;
  display: flex; align-items: center; gap: 10px;
  background: var(--well); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; color: var(--text-soft);
  overflow: hidden;
}
.key-well .val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.key-well .eye {
  appearance: none; border: none; background: transparent; cursor: pointer;
  color: var(--muted); margin-left: auto; display: inline-flex; padding: 2px;
}
.key-well .eye:hover { color: var(--text); }

/* instruction tabs */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.tabs button {
  appearance: none; border: none; background: transparent; font: inherit; cursor: pointer;
  font-family: "Space Grotesk", "Inter", sans-serif; font-size: 14px; color: var(--muted);
  padding: 9px 14px; border-bottom: 2px solid transparent; margin-bottom: -1px;
  display: inline-flex; align-items: center; gap: 7px;
}
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--text); border-bottom-color: var(--text); font-weight: 500; }
.tabs .soon { font-size: 10.5px; padding: 1px 7px; border-radius: 999px; background: var(--well); color: var(--muted); }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; counter-reset: st; }
.steps li { display: flex; gap: 14px; font-size: 13.5px; line-height: 1.6; color: var(--text-soft); }
.steps li::before {
  counter-increment: st; content: counter(st);
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--well); color: var(--muted); font-size: 12px; font-weight: 600; margin-top: 1px;
}
.steps .code { margin-top: 10px; }
.copy-mini {
  appearance: none; border: 1px solid var(--border-strong); background: var(--card);
  border-radius: 7px; cursor: pointer; color: var(--muted); font: inherit; font-size: 11.5px;
  padding: 3px 9px; position: absolute; top: 8px; right: 8px;
}
.copy-mini:hover { color: var(--text); }

/* stacked dashboard cards */
.stack { display: flex; flex-direction: column; gap: 18px; max-width: 760px; margin: 0 auto; }
.card-box h3 { font-size: 15.5px; font-weight: 600; margin: 0 0 4px; }
.card-box .subtitle { color: var(--muted); font-size: 13px; margin: 0 0 16px; line-height: 1.5; }
.status-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.status-line .big { font-family: "Space Grotesk", "Inter", sans-serif; font-size: 18px; font-weight: 600; }

@media (max-width: 560px) {
  .code-row input { width: 40px; height: 50px; font-size: 19px; }
  .phone-row { grid-template-columns: 96px 1fr; }
}

[hidden] { display: none !important; }

.tab-body .code { padding-right: 110px; }


/* dark only */
#kagel-theme-toggle, #theme-toggle { display: none !important; }

.brandlogo { height: 30px; width: auto; display: block; }
