:root {
  --bg: #0d1330;
  --bg2: #10173a;
  --panel: #151c40;
  --panel2: #1b2350;
  --line: #28316b;
  --line2: #333e80;
  --text: #e8ebfb;
  --muted: #8f98c9;
  --faint: #5f6899;
  --brand: #2f86ff;
  --brand2: #0a5cf5;
  --live: #36d399;
  --build: #5aa9ff;
  --fail: #ff6b81;
  --warn: #ffc857;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 13px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); font-size: 12px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 218px 1fr; min-height: 100vh; }
.rail { background: var(--bg2); border-right: 1px solid var(--line); padding: 14px 10px; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 26px; height: 26px; }
.brand b { font-size: 14.5px; letter-spacing: -0.2px; display: block; }
.brand span { display: block; font-size: 11.5px; color: var(--faint); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a, .nav button { display: flex; align-items: center; gap: 9px; padding: 6px 9px; border-radius: 7px; font-size: 13px; color: var(--muted); background: none; border: 0; cursor: pointer; text-align: left; width: 100%; }
.nav a:hover, .nav button:hover { background: var(--panel); color: var(--text); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--panel2); color: var(--text); }
.nav .group { font-size: 11px; color: var(--faint); padding: 12px 9px 3px; display: flex; align-items: center; justify-content: space-between; text-transform: none; letter-spacing: 0.02em; }
.nav .count { margin-left: auto; font-size: 12px; color: var(--faint); }
.rail-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 14px; font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 8px; }
.conn { display: flex; align-items: center; gap: 8px; }
main { padding: 20px 26px 50px; min-width: 0; max-width: 1400px; }
.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.head h1 { font-size: 19px; margin: 0; letter-spacing: -0.3px; font-weight: 650; display: flex; align-items: center; gap: 12px; }
.head p { margin: 4px 0 0; color: var(--muted); }
.crumbs { font-size: 12px; color: var(--faint); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- controls ---------- */
.btn { border: 1px solid var(--line2); background: var(--panel); color: var(--text); border-radius: 7px; padding: 6px 12px; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 550; white-space: nowrap; }
.btn:hover { border-color: var(--brand); text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.primary { background: var(--brand2); border-color: var(--brand2); color: #fff; }
.btn.primary:hover { background: var(--brand); border-color: var(--brand); }
.btn.danger { color: var(--fail); border-color: #5a2a44; }
.btn.small { padding: 4px 9px; font-size: 12px; }
.btn.ghost { background: transparent; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.in { background: var(--bg); border: 1px solid var(--line2); border-radius: 7px; padding: 7px 10px; font-size: 13px; color: var(--text); min-width: 0; width: 100%; }
textarea.in { font-family: var(--mono); font-size: 12px; min-height: 120px; resize: vertical; }
.in:focus { border-color: var(--brand); outline: none; }
.row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.row > * { flex: 1 1 180px; }
.row > .btn { flex: 0 0 auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---------- surfaces ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.panel-head { font-size: 13px; font-weight: 600; margin: 0; padding: 10px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel-head .muted { font-weight: 400; }
.panel-body { padding: 14px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.mt { margin-top: 12px; }

/* ---------- status ---------- */
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); display: inline-block; flex: none; }
.dot.live { background: var(--live); animation: beat 2.4s infinite; }
.dot.building, .dot.queued, .dot.starting, .dot.restarting { background: var(--build); animation: blink 1s infinite; }
.dot.failed, .dot.crashed { background: var(--fail); }
@keyframes beat { 0% { box-shadow: 0 0 0 0 rgba(54, 211, 153, 0.55); } 70% { box-shadow: 0 0 0 7px rgba(54, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(54, 211, 153, 0); } }
@keyframes blink { 50% { opacity: 0.35; } }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px; border-radius: 999px; background: var(--panel2); font-size: 12px; color: var(--muted); font-weight: 500; }
.pill.live { color: var(--live); }
.pill.failed, .pill.crashed { color: var(--fail); }
.pill.building, .pill.queued, .pill.starting, .pill.restarting { color: var(--build); }

/* ---------- overview ---------- */
.vitals { display: flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; }
.vital { flex: 1 1 140px; padding: 10px 14px; border-right: 1px solid var(--line); }
.vital:last-child { border-right: 0; }
.vital .v { font-size: 19px; font-weight: 650; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.vital .l { color: var(--muted); font-size: 12px; }
.map-wrap { position: relative; margin-top: 12px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--bg2); }
.map-wrap canvas { display: block; width: 100%; height: 320px; }
.map-legend { position: absolute; left: 16px; top: 12px; font-size: 12px; color: var(--muted); display: flex; gap: 14px; align-items: center; pointer-events: none; }
.map-legend span { display: inline-flex; gap: 6px; align-items: center; }
.map-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 20px; }
.feed { list-style: none; margin: 0; padding: 0; max-height: 380px; overflow-y: auto; }
.feed li { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: start; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.feed li:last-child { border-bottom: 0; }
.feed .dot { margin-top: 6px; }
.feed .t { font-size: 12px; color: var(--faint); white-space: nowrap; }
.feed .what { font-size: 13px; }
.feed .why { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.feed li.flash { animation: flash 1.6s ease-out; }
@keyframes flash { from { background: rgba(47, 134, 255, 0.2); } to { background: transparent; } }

/* ---------- logs ---------- */
.logs { font-family: var(--mono); font-size: 12px; line-height: 1.55; background: #090e25; border-radius: 0 0 12px 12px; padding: 10px 0; height: 380px; overflow-y: auto; }
.logs.tall { height: 560px; }
.logs div { padding: 0 14px; white-space: pre-wrap; word-break: break-word; }
.logs .ts { color: var(--faint); margin-right: 10px; }
.logs .tag { color: var(--brand); margin-right: 10px; }
.logs .err { color: #ffb3c0; }
.logs .system { color: var(--build); }
.logs .empty { color: var(--faint); padding: 14px; }
.buildlog { font-family: var(--mono); font-size: 12px; line-height: 1.6; background: #090e25; border-radius: 0 0 12px 12px; padding: 12px 14px; height: 460px; overflow-y: auto; white-space: pre-wrap; word-break: break-word; color: #cfd5f5; margin: 0; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-weight: 500; color: var(--faint); font-size: 11.5px; padding: 8px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 8px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: var(--panel2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.svc-name { display: flex; align-items: center; gap: 10px; font-weight: 550; }
canvas.spark { width: 110px; height: 26px; display: block; }

/* ---------- project ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.svc { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; cursor: pointer; display: flex; flex-direction: column; gap: 10px; text-align: left; color: var(--text); }
.svc:hover { border-color: var(--line2); text-decoration: none; }
.svc .top { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.svc .addr { font-family: var(--mono); font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svc .meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; align-items: center; gap: 8px; }
.svc.add { border-style: dashed; align-items: center; justify-content: center; color: var(--muted); min-height: 150px; background: transparent; }

/* ---------- service ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 6px 0 18px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 14px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--brand); }
.charts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.chart canvas { width: 100%; height: 150px; display: block; }
.chart .big { font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }
.deploys { list-style: none; margin: 0; padding: 0; max-height: 520px; overflow-y: auto; }
.deploys li { display: grid; grid-template-columns: 14px 1fr; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); cursor: pointer; align-items: start; }
.deploys li[aria-selected="true"] { background: var(--panel2); }
.deploys li:last-child { border-bottom: 0; }
.deploys .dot { margin-top: 6px; }
.split { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; font-size: 13px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-family: var(--mono); font-size: 12px; word-break: break-all; }
.copy { display: flex; gap: 8px; align-items: center; }
.copy code { flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--line2); border-radius: 8px; padding: 8px 10px; font-family: var(--mono); font-size: 12px; overflow-x: auto; white-space: nowrap; }
.note { background: rgba(90, 169, 255, 0.08); border: 1px solid rgba(90, 169, 255, 0.25); color: #bcd9ff; border-radius: 10px; padding: 10px 14px; font-size: 13px; }
.note.bad { background: rgba(255, 107, 129, 0.08); border-color: rgba(255, 107, 129, 0.3); color: #ffc2cd; }
.plan { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.plan .k { color: var(--faint); font-size: 12px; display: block; margin-bottom: 4px; }
.plan .in { font-family: var(--mono); font-size: 12px; }
.files { display: flex; flex-wrap: wrap; gap: 6px; }
.files span { font-family: var(--mono); font-size: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; color: var(--muted); }
.steps { display: flex; flex-direction: column; gap: 16px; max-width: 900px; }
.env-row { display: grid; grid-template-columns: 1fr 140px auto; gap: 10px; align-items: center; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }
.auth-art { position: relative; overflow: hidden; border-right: 1px solid var(--line); background: radial-gradient(ellipse at 50% 35%, #1b2160 0%, #10173a 55%, #0b1030 100%); min-height: 300px; }
.auth-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.auth-copy { position: absolute; left: 48px; bottom: 48px; right: 48px; }
.auth-copy h1 { font-size: 34px; line-height: 1.1; letter-spacing: -1px; margin: 0 0 14px; max-width: 15ch; }
.auth-copy p { color: var(--muted); max-width: 46ch; font-size: 15px; margin: 0; }
.auth-form { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-form form { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px; margin: auto 0; }
.auth-form h2 { margin: 0; font-size: 19px; }
.switch { background: none; border: 0; color: var(--brand); cursor: pointer; padding: 0; }
.err { color: var(--fail); font-size: 13px; min-height: 18px; margin: 0; }

/* ---------- site footer (signed-out) ---------- */
.site-foot { width: 100%; max-width: 360px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); text-align: center; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; }
.foot-links a { color: var(--muted); font-size: 13px; }
.foot-links a:hover { color: var(--text); }
.foot-copy { margin: 10px 0 0; }

/* ---------- toast ---------- */
.toast { position: fixed; right: 20px; bottom: 20px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 10px; padding: 11px 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); z-index: 50; max-width: 420px; }
.toast.bad { border-color: #6b2a40; color: #ffc2cd; }

@media (max-width: 1080px) {
  .cols, .charts, .split, .grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-copy { left: 24px; right: 24px; bottom: 24px; }
  .auth-copy h1 { font-size: 28px; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; }
  .rail .nav { flex-direction: row; flex-wrap: wrap; }
  .rail .nav a, .rail .nav button { width: auto; }
  .rail .nav .group, .rail .nav .proj, .rail-foot { display: none; }
  main { padding: 18px 14px 50px; }
  .vital { flex-basis: 50%; border-bottom: 1px solid var(--line); }
  .map-wrap canvas { height: 280px; }
  .hide-sm { display: none; }
  table.t td, table.t th { padding: 10px; }
  .env-row { grid-template-columns: 1fr auto; }
  .env-row .when { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .dot.live, .dot.building, .dot.queued, .dot.starting, .feed li.flash { animation: none; }
}

/* ---------------- billing ---------------- */
.nav .count.bill-trial { color: var(--live); }
.nav .count.bill-grace { color: var(--warn); }
.nav .count.bill-paused { color: var(--fail); }
.banner { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 16px; margin-bottom: 18px; border-radius: 10px; border: 1px solid var(--line2); background: var(--panel); font-size: 14px; }
.banner.grace { border-color: rgba(255, 200, 87, 0.5); background: rgba(255, 200, 87, 0.08); }
.banner.paused { border-color: rgba(255, 107, 129, 0.55); background: rgba(255, 107, 129, 0.08); }
.status-title { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font-size: 16px; }
.panel.status-grace { border-color: rgba(255, 200, 87, 0.45); }
.panel.status-paused { border-color: rgba(255, 107, 129, 0.5); }
.plan-controls { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.plan-controls label.field { margin: 0; min-width: 260px; }
.plan-controls .tabs { margin: 0; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 8px; }
.plan-card { display: flex; flex-direction: column; gap: 8px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.plan-card.pick { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.plan-card.current { border-color: var(--live); box-shadow: none; }
.plan-card h2 { margin: 0; font-size: 16px; }
.plan-card p { margin: 0; }
.plan-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price b { font-size: 24px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ticks { list-style: none; margin: 4px 0 6px; padding: 0; display: grid; gap: 5px; font-size: 13px; flex: 1; }
.ticks li { padding-left: 22px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 3px; top: 5px; width: 9px; height: 5px; border-left: 2px solid var(--live); border-bottom: 2px solid var(--live); transform: rotate(-45deg); }
.warn { color: var(--warn); }
@media (max-width: 1080px) { .plans { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .banner { flex-direction: column; align-items: flex-start; } .plan-controls label.field { min-width: 0; width: 100%; } }

/* ---------------- databases ---------------- */
.section-head { margin: 26px 0 10px; }
.section-head h2 { margin: 0 0 3px; font-size: 15px; }
.section-head p { margin: 0; }
.svc .grow { flex: 1; }
.svc .top .pill { font-weight: 500; }
.db-mark { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; font: 700 11px/1 var(--mono); color: #fff; flex: none; }
.db-mark.postgres { background: #336791; }
.db-mark.redis { background: #c6302b; }
.db-mark.big { width: 34px; height: 34px; font-size: 13px; border-radius: 9px; }
.svc.db-add { cursor: default; gap: 12px; }
.svc.db-add .row { justify-content: center; }
h1.with-mark { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
h1.with-mark .pill { font-size: 12px; font-weight: 500; }
.lead { margin: 0 0 12px; font-size: 14px; line-height: 1.55; }
code.var { font-family: var(--mono); font-size: 12px; background: var(--bg); border: 1px solid var(--line2); border-radius: 6px; padding: 1px 6px; color: var(--live); }
.pad { padding: 12px 16px 0; margin: 0; }
p.faint.pad { padding-bottom: 16px; }
.panel.danger-zone { margin-top: 18px; border-color: rgba(255, 107, 129, 0.35); }
.danger-zone .row .in { max-width: 260px; }
.note.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kv.mt { margin-top: 18px; }

/* ---------------- GitHub ---------------- */
.repo-picker .panel-body { display: grid; gap: 10px; }
.repos { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.repos li { border-bottom: 1px solid var(--line); }
.repos li:last-child { border-bottom: 0; }
.repos li.faint, .repos li.note { padding: 12px 14px; border-bottom: 0; }
.repos button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 14px; background: none; border: 0; color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.repos button:hover { background: var(--panel2); }
.repos .rname { font-family: var(--mono); font-size: 13px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.repos .lock { font-size: 11px; color: var(--warn); border: 1px solid rgba(255, 200, 87, 0.4); border-radius: 999px; padding: 1px 8px; }
.row.between { justify-content: space-between; align-items: center; }
.row.between p { margin: 0; }
ol.how { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; line-height: 1.5; }
@media (max-width: 760px) { .repos button .faint { display: none; } .row.between { flex-direction: column; align-items: flex-start; } }

/* ---------------- legal pages ---------------- */
main.legal { max-width: 760px; margin: 0 auto; padding: 40px 20px 80px; line-height: 1.65; font-size: 15.5px; }
main.legal .brand { margin-bottom: 30px; }
main.legal h1 { font-size: 30px; margin: 0 0 4px; }
main.legal h2 { font-size: 18px; margin: 32px 0 8px; }
main.legal li { margin-bottom: 6px; }
main.legal ul { padding-left: 22px; }

/* ---------------- account security and admin ---------------- */
label.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); line-height: 1.5; }
label.check input { margin-top: 3px; accent-color: var(--brand); width: 16px; height: 16px; flex: none; }
.code-in { font-size: 20px; letter-spacing: 0.25em; max-width: 220px; }
.sec-block { display: grid; gap: 10px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.sec-block:last-child { border-bottom: 0; padding-bottom: 0; }
.sec-block h3 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 10px; }
.sec-block p { margin: 0; }
.sec-block details summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.qr-row { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
svg.qr { width: 200px; height: 200px; border-radius: 10px; flex: none; }
ul.codes { list-style: none; margin: 0; padding: 14px; display: grid; grid-template-columns: repeat(2, max-content); gap: 8px 28px; background: var(--bg); border: 1px solid var(--line2); border-radius: 10px; font-family: var(--mono); font-size: 15px; letter-spacing: 0.06em; }
.row.end { justify-content: flex-end; flex-wrap: nowrap; }
.panel-head .in { max-width: 280px; padding: 6px 10px; font-size: 13px; }
.auth-form .note { margin: 0; }
.qr-row form.row { justify-content: flex-start; align-items: flex-end; } .qr-row form.row > .field { flex: 0 1 220px; } .qr-row form.row > .btn { flex: none; }

/* ---------------- continue with GitHub or Google ---------------- */
.social { display: grid; gap: 10px; }
.btn.social-btn { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 11px 14px; font-weight: 600; text-decoration: none; }
.btn.social-btn.github { background: #f0f2fb; color: #0d1330; border-color: #f0f2fb; }
.btn.social-btn.github:hover { background: #ffffff; }
.btn.social-btn.google { background: #ffffff; color: #1f1f1f; border-color: #ffffff; }
.btn.social-btn.google:hover { background: #f2f4f8; }
.social-icon { width: 20px; height: 20px; flex: none; object-fit: contain; }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
ul.logins { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border: 1px solid var(--line); border-radius: 10px; }
ul.logins li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
ul.logins li:last-child { border-bottom: 0; }
ul.logins .lname { font-weight: 600; min-width: 140px; }
ul.logins .muted { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 860px) { .auth-art { min-height: 640px; } }
.auth-form .auth-logo { width: 210px; height: auto; margin: 0 0 14px; align-self: flex-start; }


/* ---------------- navigation, search and shared pieces ---------------- */
.ico { flex: none; opacity: 0.85; }
.nav a .lbl, .nav .proj .lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav a[aria-current="page"] .ico { color: var(--brand); opacity: 1; }
.search-btn { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; padding: 7px 9px !important; border: 1px solid var(--line) !important; background: var(--bg) !important; color: var(--faint) !important; border-radius: 8px !important; font-size: 12.5px; }
.search-btn span { flex: 1; text-align: left; }
.search-btn:hover { border-color: var(--line2) !important; color: var(--muted) !important; }
kbd { font-family: var(--mono); font-size: 10.5px; padding: 1px 5px; border: 1px solid var(--line2); border-radius: 4px; color: var(--faint); background: var(--panel); }
.group-add { color: var(--faint) !important; padding: 2px !important; width: auto !important; border-radius: 4px !important; }
.group-add:hover { color: var(--text) !important; background: var(--panel) !important; }
.empty-proj { padding: 4px 9px 2px; }
.rail-foot { gap: 10px; font-size: 12px; }
.plan-box { display: grid; gap: 7px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--text); }
.plan-box:hover { border-color: var(--line2); text-decoration: none; }
.plan-name { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; }
.meter { display: grid; gap: 3px; }
.meter-top { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.meter-bar { height: 4px; border-radius: 99px; background: var(--line); overflow: hidden; }
.meter-fill { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.meter-fill.high { background: var(--warn); }
.meter-fill.full { background: var(--fail); }
.me-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.me-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.icon-btn { background: none; border: 1px solid transparent; color: var(--muted); border-radius: 6px; padding: 4px; cursor: pointer; display: inline-flex; }
.icon-btn:hover { border-color: var(--line2); color: var(--text); }
.palette { position: fixed; inset: 0; background: rgba(5, 8, 25, 0.6); display: grid; place-items: start center; padding-top: 12vh; z-index: 50; }
.palette-box { width: min(560px, calc(100vw - 32px)); background: var(--panel); border: 1px solid var(--line2); border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); overflow: hidden; }
.palette-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--faint); }
.palette-in { border: 0 !important; background: transparent !important; padding: 4px 0 !important; font-size: 14px !important; }
.palette-list { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow-y: auto; }
.palette-list li { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; cursor: pointer; }
.palette-list li.on { background: var(--panel2); }
.palette-list .pl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-list .ph { font-size: 11.5px; white-space: nowrap; }
.palette-foot { padding: 8px 14px; border-top: 1px solid var(--line); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { background: var(--panel); border: 1px solid var(--line2); color: var(--muted); border-radius: 99px; padding: 3px 10px; font-size: 12px; cursor: pointer; }
.chip:hover { color: var(--text); }
.chip.on { background: var(--brand2); border-color: var(--brand2); color: #fff; }
.empty-state { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 44px 20px; border: 1px dashed var(--line2); border-radius: 12px; color: var(--muted); }
.empty-state h2 { margin: 4px 0 0; font-size: 16px; color: var(--text); }
.empty-state p { margin: 0 0 6px; max-width: 46ch; }
.stack { display: grid; gap: 12px; align-content: start; min-width: 0; }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.usage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.usage-box { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: grid; gap: 6px; }
.usage-num b { font-size: 19px; letter-spacing: -0.3px; }
.help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.help-list { margin: 0; padding: 12px 14px 14px 30px; display: grid; gap: 6px; color: var(--muted); }
.tag-kind { font-size: 11.5px; font-weight: 500; color: var(--warn); border: 1px solid rgba(255, 200, 87, 0.4); border-radius: 99px; padding: 1px 8px; }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.seg-opt { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border: 1px solid var(--line2); border-radius: 9px; background: var(--bg); color: var(--text); cursor: pointer; }
.seg-opt.on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.stack-offer { border-color: var(--brand); }
.stack-rows { display: grid; gap: 6px; }
.stack-row { display: grid; grid-template-columns: 1.3fr 0.9fr 1fr 1.3fr; gap: 8px; align-items: center; }
.stack-row.head { padding: 0 2px; }
.var-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.var-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--bg); border: 1px solid var(--line2); border-radius: 7px; padding: 2px 4px 2px 8px; }
.var-chip code { font-family: var(--mono); font-size: 12px; color: var(--live); }
.var-chip .x { background: none; border: 0; color: var(--faint); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 4px; }
.var-chip .x:hover { color: var(--fail); }
.dom-name { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-weight: 500; }
table.t.dns code.copyable { font-family: var(--mono); font-size: 12px; background: var(--bg); border: 1px solid var(--line2); border-radius: 6px; padding: 2px 6px; cursor: copy; word-break: break-all; }
.confirm { margin-top: 14px; border-color: var(--brand); }
.confirm.bad { border-color: rgba(255, 107, 129, 0.5); }
.fit { margin: 0; }
.fit.ok { color: var(--live); }
.fit.no { color: var(--fail); }
.fit-list { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.fit-list.bad li { color: #ffc2cd; }
.fit-list.warn li { color: #ffe3a8; }

/* ---------------- Log Doctor ---------------- */
.doctor { border: 1px solid rgba(255, 200, 87, 0.45); background: linear-gradient(180deg, rgba(255, 200, 87, 0.07), rgba(255, 200, 87, 0.02)); border-radius: 10px; padding: 12px 14px; display: grid; gap: 8px; }
.doctor.compact { margin-bottom: 12px; }
.doc-head { display: flex; align-items: center; gap: 8px; color: var(--warn); font-weight: 600; font-size: 12.5px; }
.doc-head .faint { font-weight: 400; }
.doc-item { display: grid; gap: 5px; }
.doc-title b { font-size: 14px; }
.doc-explain { margin: 0; color: var(--text); }
.doc-line { font-family: var(--mono); font-size: 11.5px; background: #090e25; border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; color: #ffb3c0; overflow-x: auto; white-space: pre; display: block; }
.doc-fix-k { font-size: 11px; color: var(--faint); margin-top: 2px; }
.doc-fix { margin: 0; padding-left: 20px; display: grid; gap: 3px; }
.doc-fix li { font-family: var(--sans); }
.doc-more summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.doc-more .doc-item { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line2); }

@media (max-width: 1080px) { .seg { grid-template-columns: 1fr; } .stack-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) {
  .search-btn kbd, .rail .plan-box, .rail .me-row { display: none; }
  .rail .nav .group { display: none; }
  .help-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .rail .nav { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 2px; }
  .rail .nav a { white-space: nowrap; }
  .search-btn span { display: none; }
}
/* One-tap GitHub connect */
.btn.gh-connect { background: #f0f2fb; color: #0d1330; border-color: #f0f2fb; text-decoration: none; font-weight: 600; }
.btn.gh-connect:hover { background: #ffffff; }
.btn.gh-connect .social-icon { width: 16px; height: 16px; }
.access-note { display: grid; gap: 10px; }
.access-note p { margin: 0; }
details.token-alt { margin-top: 4px; }
details.token-alt summary { cursor: pointer; }
details.token-alt[open] summary { margin-bottom: 10px; }
.repo-picker .panel-body.row { display: flex; align-items: center; justify-content: space-between; }
.repo-picker .panel-body.row > p { margin: 0; flex: 1 1 auto; }

/* ================= Guide: the presenter and the phone ================= */
body.g-lock { overflow: hidden; }
.g-modal { position: fixed; inset: 0; z-index: 200; background: rgba(4, 8, 28, 0.78); display: grid; place-items: center; padding: 16px; backdrop-filter: blur(3px); }
.g-card { width: min(980px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: radial-gradient(120% 90% at 20% 0%, #1a2a6e 0%, #0f1640 55%, #0b1133 100%); border: 1px solid #2b3a8a; border-radius: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); color: #eef1ff; }
.g-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 0; }
.g-title { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.g-close { background: none; border: 0; color: #b9c2f0; font-size: 26px; line-height: 1; cursor: pointer; padding: 2px 8px; border-radius: 8px; }
.g-close:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.g-stage { display: grid; grid-template-columns: 1.1fr 1fr; gap: 10px; align-items: center; padding: 6px 22px 10px; min-height: 470px; }
.g-presenter { display: grid; grid-template-columns: 200px 1fr; align-items: end; gap: 6px; }
.g-char { width: 200px; height: 275px; }
.g-char svg { width: 100%; height: 100%; overflow: visible; }
.g-talk { align-self: center; display: grid; gap: 8px; }
.g-scene-title { font-size: 12px; font-weight: 700; color: #8fb8ff; }
.g-bubble { position: relative; background: #fff; color: #10183f; border-radius: 16px; padding: 14px 16px; font-size: 15px; line-height: 1.5; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); }
.g-bubble::before { content: ""; position: absolute; left: -9px; bottom: 26px; border: 9px solid transparent; border-right-color: #fff; border-left: 0; }
.g-device { display: grid; place-items: center; }
.g-phone { position: relative; width: 250px; height: 470px; border-radius: 34px; background: #05081a; padding: 12px; box-shadow: 0 0 0 2px #2e3a80, 0 24px 60px rgba(0, 0, 0, 0.55); }
.g-notch { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 84px; height: 18px; background: #05081a; border-radius: 0 0 12px 12px; z-index: 3; }
.g-screen { position: relative; height: 100%; border-radius: 24px; overflow: hidden; background: #0d1330; font-size: 12px; color: #e8ebfb; scroll-behavior: smooth; }
.g-progress { height: 4px; background: rgba(255, 255, 255, 0.08); margin: 0 22px; border-radius: 4px; overflow: hidden; }
.g-progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, #16adff, #2f86ff); transition: width 0.5s ease; }
.g-controls { display: flex; align-items: center; gap: 8px; padding: 12px 22px; flex-wrap: wrap; }
.g-spacer { flex: 1; }
.g-count { color: #9aa5da; font-size: 12px; margin-left: 4px; }
.g-btn { background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14); color: #eef1ff; border-radius: 9px; padding: 7px 13px; font-weight: 600; font-size: 13px; cursor: pointer; }
.g-btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.14); }
.g-btn:disabled { opacity: 0.4; cursor: default; }
.g-btn.g-primary { background: #2f86ff; border-color: #2f86ff; min-width: 104px; }
.g-chapters { display: flex; gap: 6px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0 22px 18px; }
.g-chapters button { background: none; border: 1px solid rgba(255, 255, 255, 0.12); color: #aab3e3; border-radius: 99px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.g-chapters button:hover { color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.g-chapters .g-current button { background: #fff; color: #10183f; border-color: #fff; font-weight: 700; }

/* the presenter's movements */
.g-char .g-body, .g-char .g-arm, .g-char .g-eyes, .g-char .g-head { transform-box: view-box; }
.g-char .g-body { transform-origin: 120px 320px; animation: g-bob 3.2s ease-in-out infinite; }
.g-char .g-head { transform-origin: 120px 150px; animation: g-nod 6s ease-in-out infinite; }
.g-char .g-eyes { transform-origin: 120px 102px; animation: g-blink 4.6s infinite; }
.g-char .g-arm-l { transform-origin: 178px 190px; transition: transform 0.6s cubic-bezier(.3, 1.4, .5, 1); }
.g-char .g-arm-r { transform-origin: 62px 190px; transition: transform 0.6s cubic-bezier(.3, 1.4, .5, 1); }
.g-char .g-finger { opacity: 0; transition: opacity 0.3s; }
.g-char .g-mouth-open { opacity: 0; transform-box: fill-box; transform-origin: center top; }
.g-char.talking .g-mouth-closed { opacity: 0; }
.g-char.talking .g-mouth-open { opacity: 1; animation: g-talk 0.24s ease-in-out infinite alternate; }
.g-char.pose-wave .g-arm-l { animation: g-wave 1.1s ease-in-out infinite; }
.g-char.pose-point .g-arm-l { transform: rotate(-82deg); }
.g-char.pose-point .g-finger { opacity: 1; }
.g-char.pose-think .g-arm-r { transform: rotate(150deg) translate(4px, -8px); }
.g-char.pose-think .g-arm-l { transform: rotate(-60deg); }
.g-char.pose-cheer .g-arm-l { transform: rotate(-150deg); }
.g-char.pose-cheer .g-arm-r { transform: rotate(150deg); }
.g-char.pose-cheer .g-body { animation: g-hop 0.9s ease-in-out infinite; }
@keyframes g-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes g-hop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes g-nod { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-3deg); } 60% { transform: rotate(2deg); } }
@keyframes g-blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(0.1); } }
@keyframes g-talk { from { transform: scaleY(0.35); } to { transform: scaleY(1); } }
@keyframes g-wave { 0%, 100% { transform: rotate(-150deg); } 50% { transform: rotate(-118deg); } }

/* the finger that taps on the phone */
.g-tap { position: absolute; left: 0; top: 0; z-index: 5; width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, 0.85); box-shadow: 0 0 0 6px rgba(47, 134, 255, 0.35); opacity: 0; transition: transform 0.65s cubic-bezier(.4, 0, .2, 1), opacity 0.3s; pointer-events: none; }
.g-tap.g-show { opacity: 1; }
.g-tap.g-down { box-shadow: 0 0 0 14px rgba(47, 134, 255, 0.25); background: #fff; }
.g-pressed { filter: brightness(1.25); transform: scale(0.96); transition: transform 0.15s; }
.g-hide { display: none !important; }
.g-in { animation: g-in 0.35s ease both; }
@keyframes g-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.g-typing::after { content: "▍"; color: #5aa9ff; animation: g-caret 0.8s steps(1) infinite; }
@keyframes g-caret { 50% { opacity: 0; } }
.g-still *, .g-still *::before, .g-still *::after { animation: none !important; transition: none !important; }

/* the little app on the phone */
.gs-bar { display: flex; align-items: center; gap: 7px; padding: 30px 14px 10px; background: #10173a; border-bottom: 1px solid #28316b; font-size: 13px; }
.gs-bar img { width: 20px; height: 20px; }
.gs-body { display: grid; gap: 9px; padding: 14px; }
.gs-body h4 { margin: 2px 0; font-size: 14px; }
.gs-muted { color: #8f98c9; }
.gs-small { font-size: 10.5px; }
.gs-mono { font-family: var(--mono); font-size: 11px; word-break: break-all; }
.gs-btn { border-radius: 9px; padding: 9px 10px; text-align: center; font-weight: 600; background: #1b2350; border: 1px solid #333e80; }
.gs-btn.gs-primary { background: #2f86ff; border-color: #2f86ff; color: #fff; }
.gs-btn.gs-light { background: #f0f2fb; color: #0d1330; border-color: #f0f2fb; }
.gs-btn.gs-green { background: #2da44e; border-color: #2da44e; color: #fff; }
.gs-or { text-align: center; color: #5f6899; font-size: 11px; }
.gs-field { display: grid; gap: 4px; color: #8f98c9; font-size: 11px; }
.gs-input, .gs-search, .gs-code { background: #0b1029; border: 1px solid #333e80; border-radius: 8px; padding: 8px 10px; min-height: 34px; color: #e8ebfb; }
.gs-search { color: #8f98c9; display: flex; justify-content: space-between; align-items: center; }
.gs-search kbd { font-family: var(--mono); font-size: 10px; border: 1px solid #333e80; border-radius: 5px; padding: 1px 5px; }
.gs-code { font-family: var(--mono); font-size: 11px; white-space: pre-wrap; min-height: 54px; }
.gs-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px; border-radius: 9px; background: #151c40; border: 1px solid #28316b; }
.gs-row.gs-ok { border-color: rgba(54, 211, 153, 0.5); background: rgba(54, 211, 153, 0.1); color: #8ef0c8; font-weight: 600; flex-wrap: wrap; }
.gs-lock { font-size: 10px; color: #ffc857; border: 1px solid rgba(255, 200, 87, 0.4); border-radius: 99px; padding: 1px 7px; }
.gs-card { display: grid; gap: 7px; padding: 11px; border-radius: 10px; background: #151c40; border: 1px solid #333e80; }
.gs-toast { margin: 12px; padding: 10px 12px; border-radius: 10px; background: #36d399; color: #062b1d; font-weight: 700; text-align: center; }
.gs-toast.gs-static { margin: 0; }
.gs-hero { height: 100%; display: grid; place-content: center; justify-items: center; gap: 6px; text-align: center; background: radial-gradient(circle at 50% 35%, #1e3c9a, #0d1330 70%); }
.gs-hero-logo { width: 92px; height: 92px; animation: g-float 3s ease-in-out infinite; }
@keyframes g-float { 50% { transform: translateY(-6px); } }
.gs-hero h3 { margin: 4px 0 0; font-size: 22px; }
.gs-hero p { margin: 0; color: #9fb6ff; letter-spacing: 0.04em; }
.gs-pill { margin-top: 10px; background: #36d399; color: #062b1d; font-weight: 700; padding: 5px 12px; border-radius: 99px; }
.gs-github { height: 100%; display: grid; align-content: center; gap: 12px; padding: 22px; background: #f6f8fa; color: #1f2328; text-align: center; }
.gs-gh-head { font-weight: 800; font-size: 18px; }
.gs-part { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; padding: 10px; border-radius: 10px; background: #151c40; border: 1px solid #333e80; }
.gs-part .gs-tag { grid-row: span 2; align-self: center; }
.gs-tag { font-size: 10px; font-weight: 700; padding: 3px 7px; border-radius: 99px; }
.gs-tag.gs-blue { background: rgba(47, 134, 255, 0.2); color: #8fc0ff; }
.gs-tag.gs-green { background: rgba(54, 211, 153, 0.18); color: #7ff0c3; }
.gs-link { padding: 8px 10px; border-radius: 9px; border: 1px dashed #5aa9ff; color: #bcd6ff; font-size: 11px; }
.gs-logs { background: #050817; border-radius: 9px; padding: 9px; font-family: var(--mono); font-size: 10.5px; color: #a9b4e8; display: grid; gap: 3px; min-height: 200px; align-content: start; }
.gs-logs.gs-short { min-height: 0; color: #ff9aaa; }
.gs-status { font-weight: 700; padding: 8px 10px; border-radius: 9px; }
.gs-building { background: rgba(90, 169, 255, 0.15); color: #8fc0ff; }
.gs-live { background: rgba(54, 211, 153, 0.15); color: #36d399; }
.gs-failed { background: rgba(255, 107, 129, 0.15); color: #ff8fa0; }
.gs-doctor { padding: 11px; border-radius: 10px; background: #fff; color: #10183f; display: grid; gap: 4px; }
.gs-doctor p { margin: 0; font-weight: 600; }
.gs-doctor ol { margin: 0; padding-left: 18px; font-size: 11px; }
.gs-browser { display: flex; align-items: center; gap: 6px; margin: 30px 10px 0; padding: 7px 10px; border-radius: 99px; background: #1b2350; font-size: 11.5px; }
.gs-url { color: #e8ebfb; }
.gs-site { margin: 10px; border-radius: 12px; background: linear-gradient(160deg, #fff7e6, #ffe1c2); color: #3a1d00; padding: 22px 14px; display: grid; gap: 8px; text-align: center; }
.gs-site-hero { font-size: 20px; font-weight: 800; }
.gs-site p { margin: 0; }
.gs-site-btn { justify-self: center; background: #e2711d; color: #fff; border-radius: 99px; padding: 6px 16px; font-weight: 700; }
.gs-float { margin: 0 10px; }
.gs-currencies { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gs-currencies span { text-align: center; padding: 10px 0; border-radius: 9px; background: #1b2350; font-weight: 700; font-size: 14px; }
.gs-k { margin-top: 6px; }

/* the "watch" cards that open the guide */
.watch-card { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line2); background: linear-gradient(120deg, rgba(47, 134, 255, 0.18), rgba(22, 173, 255, 0.05)); cursor: pointer; color: var(--text); text-align: left; width: 100%; }
.watch-card:hover { border-color: var(--brand); }
.watch-card .play { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: 15px; }
.watch-card .g-char { width: 52px; height: 70px; flex: none; }
.watch-card b { display: block; font-size: 14px; }
.watch-card span.muted { font-size: 12px; }
.watch-link { background: none; border: 0; color: var(--brand); cursor: pointer; font-weight: 600; padding: 0; display: inline-flex; align-items: center; gap: 6px; }

@media (max-width: 760px) {
  .g-stage { grid-template-columns: 1fr; min-height: 0; padding: 6px 12px; }
  .g-presenter { grid-template-columns: 96px 1fr; order: 2; }
  .g-char { width: 96px; height: 132px; }
  .g-bubble { font-size: 13.5px; padding: 10px 12px; }
  .g-phone { width: 220px; height: 400px; }
  .g-controls, .g-chapters { padding-left: 12px; padding-right: 12px; }
  .g-progress { margin: 0 12px; }
  .g-chapters { display: none; }
}
.play-dot { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 10px; }
.auth-copy .watch-link { margin-top: 14px; font-size: 14px; }
.watch-card + .vitals { margin-top: 12px; }
@media (max-width: 760px) {
  .g-phone { width: 200px; height: 350px; border-radius: 28px; padding: 9px; }
  .g-screen { border-radius: 20px; font-size: 11px; }
  .g-char { width: 80px; height: 110px; }
  .g-presenter { grid-template-columns: 80px 1fr; }
  .g-bubble { font-size: 13px; }
}
.g-genders { display: inline-flex; padding: 3px; gap: 3px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14); }
.g-gender { width: 30px; height: 26px; border: 0; border-radius: 99px; background: transparent; color: #c7cff5; font-weight: 800; font-size: 12px; cursor: pointer; }
.g-gender.g-on { background: #fff; color: #10183f; }

/* One-click templates */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tpl { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel2); }
.tpl p { margin: 0; }
.tpl .row { margin-top: auto; padding-top: 4px; flex-wrap: wrap; }
.tpl-top { display: flex; align-items: center; gap: 10px; }
.tpl-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; background: var(--bg2); font-size: 17px; }
.linklike { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; cursor: pointer; text-decoration: underline; }

/* Team and alerts */
.split-team { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.team-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.team-row .row { flex-wrap: nowrap; }
.banner.team { border-color: rgba(47, 134, 255, 0.5); background: rgba(47, 134, 255, 0.08); }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--brand); }
.in.small { padding: 4px 8px; font-size: 12px; width: auto; }
.in.ws-switch { width: 100%; margin-bottom: 8px; }
.team-ask { padding: 22px; max-width: 440px; }
.team-ask h2 { margin: 0 0 8px; font-size: 18px; }
@media (max-width: 860px) { .split-team { grid-template-columns: 1fr; } }
.team-body > p, .team-body > ul { margin: 0; }
.team-body ul { padding-left: 18px; }

/* Persistent storage (disk) meter */
.disk-meter { height: 10px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--line); overflow: hidden; margin: 4px 0 8px; }
.disk-fill { display: block; height: 100%; background: var(--brand); border-radius: 999px; transition: width .4s ease; }
.disk-fill.full { background: var(--fail); }
@media (prefers-reduced-motion: reduce) { .disk-fill { transition: none; } }
.gs-logs.gs-mini { min-height: 86px; }

/* uptime */
.uptime { margin-bottom: 16px; }
.up-state { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; margin-left: 6px; }
.up-state.up { background: rgba(54, 211, 153, .15); color: var(--live); }
.up-state.down { background: rgba(255, 107, 129, .15); color: var(--fail); }
.up-state.wait, .up-state.past { background: rgba(143, 152, 201, .15); color: var(--muted); margin-left: 0; }
.up-figs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.up-figs > div { display: flex; flex-direction: column; gap: 2px; }
.up-figs .big { font-size: 22px; font-weight: 700; }
.up-bars { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; height: 30px; }
.up-bar { border-radius: 3px; background: var(--line); }
.up-bar.ok { background: var(--live); }
.up-bar.some { background: var(--warn); }
.up-bar.bad { background: var(--fail); }
.up-axis { display: flex; justify-content: space-between; margin-top: 4px; }
.up-incidents { margin-top: 14px; }
.up-incidents h3 { margin: 0 0 6px; }
.up-incidents ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 13px; }
@media (max-width: 640px) { .up-figs { grid-template-columns: repeat(2, 1fr); } }

/* show or hide password */
.pw-wrap { position: relative; display: block; width: 100%; }
.pw-wrap > input { width: 100%; padding-right: 42px !important; box-sizing: border-box; }
.pw-eye { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 32px; height: 32px; display: grid; place-items: center; background: none; border: 0; border-radius: 8px; color: currentColor; opacity: .6; cursor: pointer; padding: 0; }
.pw-eye:hover { opacity: 1; }
.pw-eye:focus-visible { opacity: 1; outline: 2px solid currentColor; outline-offset: 1px; }
.pw-eye[aria-pressed="true"] { opacity: .95; }

/* Lucent Shield: the shielded address and the Shield tab */
.shielded { display: inline-flex; align-items: center; gap: 6px; }
.shielded.on { color: #2fe6a6; }
.shielded .sl { display: inline-grid; place-items: center; color: #2fe6a6; filter: drop-shadow(0 0 5px rgba(47, 230, 166, .55)); }
.shielded.big { font-size: 17px; font-weight: 700; gap: 10px; }
.shield-url { margin-bottom: 10px; }
.shield-hero.on { border-color: rgba(47, 230, 166, .45); box-shadow: 0 0 34px -18px #2fe6a6; }
.snippet { flex: 1; display: block; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; word-break: break-all; }
.dns-help summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.dns-help dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 10px 0 0; }
.dns-help dt { font-weight: 600; font-size: 13px; }
.dns-help dd { margin: 0; }
@media (max-width: 640px) { .dns-help dl { grid-template-columns: 1fr; } }
.shield-url { display: flex; flex-wrap: wrap; gap: 8px 22px; }

/* Lucent Shield welcome card, shown once after the first app goes live */
.lucent-welcome { display: flex; gap: 22px; align-items: flex-start; padding: 26px 28px; margin: 0 0 22px; border-radius: 16px; border: 1px solid rgba(47,230,166,.35); background: linear-gradient(135deg, rgba(47,230,166,.08), rgba(34,211,238,.04) 60%, transparent); }
.lucent-welcome .lw-mark { flex: none; width: 58px; height: 58px; border-radius: 14px; display: grid; place-items: center; color: #2fe6a6; background: rgba(47,230,166,.12); box-shadow: 0 0 28px rgba(47,230,166,.18); }
.lucent-welcome h2 { margin: 2px 0 8px; font-size: 22px; }
.lucent-welcome p { margin: 0 0 8px; max-width: 72ch; line-height: 1.55; }
.lucent-welcome .lw-eyebrow { color: #2fe6a6; font-weight: 600; font-size: 13px; margin-bottom: 2px; }
.lucent-welcome .lw-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
@media (max-width: 640px) { .lucent-welcome { flex-direction: column; padding: 20px; } }
