/* ── base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; }
body {
  margin: 0; min-height: 100%; background: var(--ground); color: var(--ink);
  font-family: var(--ui); font-size: var(--fs); line-height: 1.55; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; text-wrap: balance; font-weight: 600; letter-spacing: -.012em; }
p { margin: 0; }
a { color: var(--brand-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 3px; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); font-size: .79rem; letter-spacing: -.01em; }
.num { font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--s5); }
.grp { font-size: 9.5px; letter-spacing: .17em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }

/* ── controls ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; padding: 7px 14px;
  border-radius: var(--r); border: 1px solid var(--line-strong); color: var(--ink); background: var(--surface);
  white-space: nowrap; line-height: 1.3;
}
.btn:hover { border-color: var(--ink-3); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.pri { background: var(--brand); border-color: var(--brand); color: var(--on-brand); font-weight: 600; }
.btn.pri:hover { background: var(--brand-deep); border-color: var(--brand-deep); }
.btn.ghost { border-color: transparent; color: var(--ink-2); background: none; }
.btn.ghost:hover { background: var(--surface-3); border-color: transparent; }
.btn.lg { padding: 10px 18px; font-size: 14px; }
.btn.icon { padding: 6px 8px; }
.btn .ic { width: 14px; height: 14px; display: block; }
.sel {
  appearance: none; -webkit-appearance: none; font: inherit; font-size: 13px; font-weight: 500; color: var(--ink);
  background: var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%238A857E' stroke-width='1.5'/></svg>") no-repeat right 10px center;
  border: 1px solid var(--line-strong); border-radius: var(--r); padding: 6px 28px 6px 11px; min-height: 34px; cursor: pointer;
}
.sel:hover { border-color: var(--ink-3); }
.kbd { font-family: var(--mono); font-size: var(--fs-xs); color: var(--ink-3); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; background: var(--surface-2); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 1px 9px; border-radius: 99px; font-size: var(--fs-xs); font-weight: 600; background: var(--surface-3); color: var(--ink-2); letter-spacing: .01em; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-queued, .pill-running { background: var(--note-soft); color: var(--note); }
.pill-running::before { animation: pulse 1s infinite; }
.pill-completed { background: var(--ok-soft); color: var(--ok); }
.pill-compile_error, .pill-runtime_error, .pill-failed, .pill-system_error { background: var(--crit-soft); color: var(--crit); }
.pill-timed_out, .pill-cancelled { background: var(--warn-soft); color: var(--warn); }
@keyframes pulse { 50% { opacity: .25; } }
.tag { font-size: 10px; font-weight: 600; padding: 0 6px; border-radius: 99px; background: var(--surface-3); color: var(--ink-3); }

/* ── top bar (marketing pages) ──────────────────────────────────────────── */
.top {
  display: flex; align-items: center; gap: 14px; padding: 0 var(--s5); height: var(--top-h);
  background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10;
}
.mark { display: flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 600; letter-spacing: -.02em; font-size: 14.5px; }
.mark:hover { text-decoration: none; }
.mark .glyph { width: 26px; height: 26px; border-radius: 7px; background: var(--brand); display: grid; place-items: center; flex: none; }
.mark .glyph svg { width: 16px; height: 16px; }
.top nav { display: flex; gap: 18px; margin-left: 10px; }
.top nav a { color: var(--ink-2); font-size: 13.5px; }
.top nav a:hover { color: var(--ink); text-decoration: none; }
.top .acts { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* ── app shell (IDE) ─────────────────────────────────────────────────────── */
.app { display: grid; grid-template-columns: var(--rail-w) 1fr; min-height: 100vh; }
.side { background: var(--rail); padding: 14px 0 18px; display: flex; flex-direction: column; gap: 1px; }
.side .mark { padding: 2px 16px 14px; color: var(--rail-ink-hi); }
.side .grp { padding: 15px 20px 6px; color: var(--rail-grp); }
.nav { display: flex; align-items: center; gap: 11px; margin: 0 10px; padding: 7px 10px; font-size: 13.5px; color: var(--rail-ink); border-radius: 7px; }
.nav:hover { color: var(--rail-ink-hi); background: var(--rail-2); text-decoration: none; }
.nav.on { background: var(--brand); color: var(--on-brand); font-weight: 600; }
.nav.on:hover { background: var(--brand); }
.nav .ic { width: 15px; height: 15px; flex: none; opacity: .9; }
.nav .tag { margin-left: auto; background: var(--rail-2); color: var(--rail-ink); }
.nav.on .tag { background: rgba(255, 255, 255, .22); color: var(--on-brand); }
.nav.dead { cursor: default; opacity: .5; }
.nav.dead:hover { background: none; color: var(--rail-ink); }
.side .foot { margin-top: auto; padding: 14px 20px 0; border-top: 1px solid var(--rail-line); font-size: 11.5px; color: var(--rail-grp); line-height: 1.5; }

/* ── IDE workspace ──────────────────────────────────────────────────────── */
.ws { display: grid; grid-template-columns: 44px 1fr; min-height: 100vh; }
.rail { background: var(--rail); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0 10px; }
.rail .sp { flex: 1; }
.rail-mark { display: block; padding: 2px 0 8px; }
.rail-mark .glyph { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--brand); }
.rail-mark .glyph svg { width: 16px; height: 16px; }
.rail-mark b { display: none; }
.rail-btn { width: 32px; height: 32px; border-radius: 7px; display: grid; place-items: center; color: var(--rail-ink); }
.rail-btn svg { width: 16px; height: 16px; }
.rail-btn:hover { color: var(--rail-ink-hi); background: var(--rail-2); text-decoration: none; }
.rail-btn.on { background: var(--brand); color: var(--on-brand); }
.rail-btn[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); }
.rail .sep { width: 20px; height: 1px; background: var(--rail-line); margin: 4px 0; }
.ws-main { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; position: relative; }

/* Popovers anchored to the rail */
.ctxmenu { position: fixed; z-index: 70; min-width: 200px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); display: grid; }
.ctxmenu[hidden] { display: none; }
.ctxmenu button { display: block; width: 100%; text-align: left; padding: 6px 10px; border: 0; border-radius: var(--r); background: none; color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.ctxmenu button:hover, .ctxmenu button:focus-visible { background: var(--surface-3); outline: 0; }
.ctxmenu button:disabled { color: var(--ink-3); cursor: default; background: none; }
.ctxmenu button.danger:not(:disabled) { color: var(--crit); }
.ctxmenu .sep { height: 1px; background: var(--line); margin: 4px 2px; }
.pop { position: fixed; left: 52px; z-index: 40; min-width: 260px; max-width: 340px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.pop[hidden] { display: none; }
.pop .head { display: flex; align-items: center; padding: 6px 10px 8px; border-bottom: 1px solid var(--line); margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.pop .head .x { margin-left: auto; color: var(--ink-3); font-size: 16px; line-height: 1; padding: 0 4px; }
.pop .row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; font-size: 13px; color: var(--ink-2); }
.pop .row label { flex: 1; color: var(--ink); }
.pop .row .sel { min-height: 30px; padding: 3px 26px 3px 9px; font-size: 12.5px; }
.pop .row .kbd { margin-left: auto; }
.pop .row.sep { padding: 0; height: 1px; background: var(--line); margin: 4px 2px; }
.switch { position: relative; width: 32px; height: 18px; border-radius: 99px; background: var(--line-strong); transition: background .15s; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch[aria-checked="true"] { background: var(--brand); }
.switch[aria-checked="true"]::after { left: 16px; }
.switch:disabled { opacity: .5; cursor: not-allowed; }

/* Toast */
.toast button { margin-left: 12px; color: var(--brand); font-weight: 600; pointer-events: auto; }
.toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); z-index: 60; padding: 8px 14px; border-radius: var(--r); background: var(--ink); color: var(--ground); font-size: 13px; box-shadow: var(--shadow); opacity: 0; transition: opacity .15s; pointer-events: none; }
.toast.show { opacity: 1; pointer-events: auto; }

.ide { display: grid; grid-template-rows: auto 1fr auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; min-height: 0; }
.ide.full { flex: 1; border: 0; border-radius: 0; height: 100vh; }
.ide.compact { height: 560px; box-shadow: var(--shadow); }
.ide-top { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.ide-top .sp { flex: 1; }
.ide-title { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.proj { display: inline-flex; flex-direction: column; line-height: 1.2; margin: 0 4px; min-width: 0; }
.proj-name { font-family: var(--mono); font-size: 12.5px; font-weight: 600; color: var(--ink); text-align: left; padding: 0; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-name:hover { color: var(--brand-deep); }
.proj-state { font-size: 10.5px; color: var(--ink-3); display: flex; align-items: center; gap: 5px; }
.proj-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
.proj-state.saved::before { background: var(--ok); }
.proj-state.dirty::before { background: var(--warn); }
.proj-state.saving::before { background: var(--note); animation: pulse 1s infinite; }
.proj-state.readonly::before { background: var(--note); }
/* Collaboration in the editor bar: who is in the room, the switch, the dialog */
.peers { display: inline-flex; align-items: center; margin-left: 6px; }
.peers .avatar { width: 24px; height: 24px; font-size: 10.5px; margin-left: -6px; border: 2px solid var(--surface); color: #fff; background: var(--peer-0); }
.peers .avatar:first-child { margin-left: 0; }
.peers .avatar.peer-1 { background: var(--peer-1); } .peers .avatar.peer-2 { background: var(--peer-2); } .peers .avatar.peer-3 { background: var(--peer-3); } .peers .avatar.peer-4 { background: var(--peer-4); } .peers .avatar.peer-5 { background: var(--peer-5); }
.collab-btn.on { border-color: var(--brand); color: var(--brand-deep); background: var(--brand-soft); }
.rbanner { padding: 5px 12px; font-size: 12.5px; color: var(--note); background: var(--note-soft); border-bottom: 1px solid var(--line); }
.modal-panel.collab { width: min(640px, 100%); gap: 0; padding: 0; }
.modal-panel.collab .modal-head { padding: 16px 18px 12px; }
.collab-switchrow { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.collab-switchrow > div { flex: 1; display: grid; gap: 2px; }
.collab-switchrow span { font-size: 12.5px; color: var(--ink-3); }
.collab-upgrade { padding: 12px 18px; font-size: 13px; color: var(--ink-2); background: var(--brand-soft); border-bottom: 1px solid var(--brand-line); }
.collab-section { padding: 12px 18px 4px; }
.collab-section .grp { margin-bottom: 8px; }
.collab-inviterow { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.collab-link { display: flex; gap: 8px; align-items: center; margin-top: 8px; padding: 8px 10px; border: 1px dashed var(--brand-line); border-radius: var(--r); background: var(--brand-soft); font-family: var(--mono); font-size: 12px; word-break: break-all; }
.collab-link .btn { flex: none; padding: 4px 9px; font-size: 12px; }
.gh-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.gh-form [data-role="gh-message"] { grid-column: 1 / -1; }
.gh-note { margin: 6px 0 8px; font-size: 12px; color: var(--ink-3); align-self: center; }
.collab-switchrow .gh-who { flex: 1; font-size: 13px; }
.collab-invites { display: grid; gap: 4px; margin-top: 8px; }
.collab-invites .row, .collab-members .row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--r); font-size: 13px; }
.collab-invites .row span, .collab-members .row span.meta { color: var(--ink-3); font-size: 12px; font-family: var(--mono); }
.collab-members { display: grid; gap: 4px; margin-bottom: 8px; }
.collab-members .row b { font-weight: 500; }
.collab-members .row .sp, .collab-invites .row .sp { flex: 1; }
.collab-members .row .sel { min-height: 28px; padding: 2px 24px 2px 8px; font-size: 12px; }
.collab-members .row .btn, .collab-invites .row .btn { padding: 3px 8px; font-size: 12px; }
.collab-members .row .here { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.collab-members .empty { font-size: 12.5px; color: var(--ink-3); padding: 4px 0 8px; }
.modal-panel.projects { width: min(820px, 100%); gap: 0; padding: 0; }
.modal-panel.projects .modal-head { padding: 16px 18px 12px; align-items: center; }
.modal-panel.projects .newproj { color: var(--brand-deep); font-weight: 600; margin-left: auto; }
.modal-panel.projects .newproj + .newproj { margin-left: 0; }
.modal-panel.projects .modal-head .x { margin-left: 4px; }
.projtabs { padding: 0 18px; }
.projtools { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; padding: 14px 18px 10px; }
.projlist { display: grid; gap: 6px; min-height: 280px; max-height: 52vh; overflow: auto; padding: 4px 18px 14px; align-content: start; }
.projrow { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.projrow.on { border-color: var(--brand); box-shadow: inset 2px 0 0 var(--brand); }
.projrow b { display: block; font-size: 13.5px; }
.projrow span { font-size: 11.5px; color: var(--ink-3); font-family: var(--mono); }
.projrow .acts { display: flex; gap: 6px; }
.projrow .acts .btn { padding: 4px 9px; font-size: 12px; }
.projempty { display: grid; place-items: center; text-align: center; gap: 6px; padding: 36px 0 24px; color: var(--ink-3); font-size: 12.5px; }
.projempty svg { width: 44px; height: 44px; color: var(--line-strong); margin-bottom: 6px; }
.projempty b { color: var(--ink); font-size: 14px; }
.projempty .btn { margin-top: 10px; }
.projlist .newrow { display: flex; gap: 8px; align-items: center; padding: 2px 0 10px; }
.projlist .newrow .inp { flex: 1; }
.modal-foot { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); }
.modal-foot .sp { flex: 1; }
@media (max-width: 640px) { .projtools { grid-template-columns: 1fr; } }
.srcfile { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 14px; background: var(--surface); }
.srchead { padding: 8px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 12px; color: var(--ink-2); }
.src { margin: 0; padding: 14px; font-size: 12.5px; line-height: 1.55; overflow: auto; white-space: pre; color: var(--ink); }
.langbtn { gap: 8px; font-weight: 600; }
.langbtn .dotc { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.langbtn .ic { width: 10px; height: 6px; color: var(--ink-3); }

/* Language modal */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(20, 20, 20, .45); display: grid; place-items: start center; padding: 8vh 16px 16px; overflow: auto; }
.modal[hidden] { display: none; }
/* Flare Desktop downloads (/download) */
.download .lede { max-width: 60ch; }
.dl-list { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.dl { display: grid; gap: var(--s1); padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: inherit; text-decoration: none; }
.dl:hover { border-color: var(--brand-line); box-shadow: var(--shadow); }
.dl b { font-size: var(--fs-md); }
.dl span { color: var(--ink-3); font-size: var(--fs-sm); }
.dl code { font-size: var(--fs-xs); color: var(--ink-3); word-break: break-all; }
.download ul { padding-left: 18px; color: var(--ink-2); display: grid; gap: var(--s2); }
.modal-panel { width: min(760px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 16px; display: grid; gap: 12px; }
.modal-head { display: flex; align-items: flex-start; gap: 12px; }
.modal-head b { font-size: 16px; display: block; }
.modal-head .sub { font-size: 12.5px; color: var(--ink-3); }
.modal-head .x { margin-left: auto; color: var(--ink-3); font-size: 20px; line-height: 1; padding: 0 6px; border-radius: 4px; }
.modal-head .x:hover { color: var(--ink); background: var(--surface-3); }
.inp { border: 1px solid var(--line-strong); border-radius: var(--r); padding: 9px 11px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px; width: 100%; outline: 0; }
.inp:focus { border-color: var(--brand); }
.langgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; max-height: 56vh; overflow: auto; padding: 2px; }
.langcard { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); }
.langcard:hover, .langcard:focus-visible { border-color: var(--brand); background: var(--brand-soft); outline: 0; }
.langcard.on { border-color: var(--brand); box-shadow: inset 2px 0 0 var(--brand); }
.langcard b { font-size: 13.5px; font-weight: 600; }
.langcard span { font-size: 11.5px; color: var(--ink-3); font-family: var(--mono); }
.langgrid .none { grid-column: 1 / -1; color: var(--ink-3); font-size: 13px; padding: 12px 4px; }
.ide-split { display: grid; grid-template-columns: 0 minmax(280px, 1fr) 6px minmax(300px, var(--side-w, 420px)); min-height: 0; }
.ide.has-explorer .ide-split { grid-template-columns: 200px minmax(280px, 1fr) 6px minmax(300px, var(--side-w, 420px)); }
/* Stays in the grid flow at zero width when closed: display:none would shift every
   sibling one track to the left. */
.explorer { min-width: 0; min-height: 0; overflow: hidden; background: var(--surface-2); }
.ide.has-explorer .explorer { overflow: auto; border-right: 1px solid var(--line); }
.ide:not(.has-explorer) .explorer { max-height: 0; }
.explorer .grp { padding: 10px 12px 4px; display: flex; align-items: center; }
.explorer .grp button { margin-left: auto; color: var(--ink-3); font-size: 15px; line-height: 1; padding: 0 4px; border-radius: 4px; display: inline-grid; place-items: center; min-height: 18px; }
.explorer .grp button svg { display: block; }
.explorer .f.folder .fi { color: var(--brand); opacity: .9; }
.explorer .grp button:hover { color: var(--ink); background: var(--surface-3); }
.explorer .f { display: flex; align-items: center; gap: 6px; padding: 4px 10px 4px calc(10px + var(--depth, 0) * 14px); font-family: var(--mono); font-size: 12px; color: var(--ink-2); cursor: pointer; width: 100%; text-align: left; border-radius: 0; }
.explorer .f.folder { color: var(--ink); font-family: var(--ui); font-weight: 500; }
.explorer .f .chev { width: 12px; height: 12px; flex: none; transition: transform .12s; opacity: .7; }
.explorer .f.folder.closed .chev { transform: rotate(-90deg); }
.explorer .f .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.explorer .f.dragging { opacity: .4; }
.explorer .f.over, .explorer.over-root .grp { background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand-line); }
.explorer .f .act { margin-left: auto; display: none; gap: 2px; }
.explorer .f:hover .act { display: inline-flex; }
.explorer .f .act button { color: var(--ink-3); padding: 0 4px; border-radius: 3px; font-size: 13px; line-height: 1.2; }
.explorer .f .act button:hover { color: var(--ink); background: var(--surface); }
.explorer .f .act button.del:hover { color: var(--crit); }
.explorer .f:hover { background: var(--surface-3); color: var(--ink); }
.explorer .f.on { background: var(--brand-soft); color: var(--ink); box-shadow: inset 2px 0 0 var(--brand); }
.explorer .f svg { width: 13px; height: 13px; flex: none; opacity: .7; }
.explorer .f .tag { margin-left: auto; }
.explorer .f:hover .tag { display: none; }
.explorer .f input { font: inherit; width: 100%; border: 1px solid var(--brand); border-radius: 3px; padding: 1px 4px; background: var(--surface); color: var(--ink); outline: 0; }
.explorer .hint { padding: 8px 12px; font-size: 11.5px; color: var(--ink-3); }
.explorer .dropzone { min-height: 40px; }
.explorer .grp button + button { margin-left: 2px; }
.ide-col { display: grid; grid-template-rows: auto 1fr; min-height: 0; min-width: 0; position: relative; }
/* Welcome: the default view; covers the tab strip and the editor until a start action */
.welcome { position: absolute; top: 0; left: 0; right: 0; bottom: 0; overflow: auto; background: var(--editor-bg); z-index: 5; }
.welcome[hidden] { display: none; }
.welcome-in { max-width: 860px; margin: 0 auto; padding: var(--s7) var(--s6); }
.welcome-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: var(--s3); }
.welcome-head > div { flex: 1; display: grid; gap: 2px; }
.welcome-head b { font-size: var(--fs-xl); letter-spacing: -.02em; }
.welcome-head span { color: var(--ink-3); font-size: 13px; }
.welcome-head .x { background: none; border: 0; color: var(--ink-3); font-size: 18px; cursor: pointer; padding: 2px 6px; border-radius: var(--r); }
.welcome-head .x:hover { background: var(--surface-3); color: var(--ink); }
.welcome .who { color: var(--ink-2); font-size: 13px; margin: 0 0 var(--s5); }
.welcome .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s6); }
.welcome h3 { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 10px; }
.welcome section > button { display: block; width: 100%; text-align: left; padding: 7px 10px; margin: 0 0 2px; border: 0; border-radius: var(--r); background: none; color: var(--brand-deep); font: inherit; font-size: 13.5px; cursor: pointer; }
.welcome section > button:hover, .welcome .recent:hover { background: var(--surface-3); }
.welcome .recents { display: grid; gap: 2px; margin-bottom: 6px; }
.welcome .recent { display: grid; gap: 1px; text-align: left; width: 100%; padding: 6px 10px; border: 0; border-radius: var(--r); background: none; color: var(--ink); font: inherit; cursor: pointer; }
.welcome .recent b { font-size: 13.5px; }
.welcome .recent span { font-size: 12px; color: var(--ink-3); }
.welcome .hint { color: var(--ink-3); font-size: 13px; margin: 2px 10px 8px; }
.welcome .row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; font-size: 13px; color: var(--ink-2); }
.welcome .row label { flex: 1; color: var(--ink); }
.ide-gutter { background: var(--ground); border-left: 1px solid var(--line); border-right: 1px solid var(--line); cursor: col-resize; }
.ide-gutter:hover, .ide-gutter.drag { background: var(--brand-soft); border-color: var(--brand-line); }
.ide-editor { min-height: 0; min-width: 0; background: var(--editor-bg); }

/* File tabs */
.ftabs { display: flex; align-items: stretch; background: var(--surface-2); border-bottom: 1px solid var(--line); overflow-x: auto; min-height: 34px; }
.ftab { display: inline-flex; align-items: center; gap: 7px; padding: 0 10px 0 12px; font-family: var(--mono); font-size: 12px; color: var(--ink-3); border-right: 1px solid var(--line); border-bottom: 2px solid transparent; white-space: nowrap; }
.ftab::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
.ftab.on { color: var(--ink); background: var(--surface); border-bottom-color: var(--brand); }
.ftab.on::before { background: var(--brand); }
.ftab:hover { color: var(--ink); }
.ftab .x { display: grid; place-items: center; width: 16px; height: 16px; border-radius: 4px; color: var(--ink-3); font-size: 13px; line-height: 1; margin-left: 2px; visibility: hidden; }
.ftab:hover .x { visibility: visible; }
.ftab .x:hover { background: var(--surface-3); color: var(--crit); }
.ftab.entry .x { display: none; }
.ftab-add { display: grid; place-items: center; width: 32px; margin-left: 8px; border-left: 1px solid var(--line); color: var(--ink-3); font-size: 16px; }
.ftab-add:hover { color: var(--ink); background: var(--surface-3); }
.ftab-new { display: inline-flex; align-items: center; gap: 6px; padding: 0 8px; }
.ftab-new input { font-family: var(--mono); font-size: 12px; border: 1px solid var(--brand); border-radius: 4px; padding: 3px 6px; background: var(--surface); color: var(--ink); width: 150px; outline: 0; }
.ftab-new .err { font-size: 11px; color: var(--crit); white-space: nowrap; }

/* Right pane */
.ide-side { display: grid; grid-template-rows: auto 1fr; min-height: 0; min-width: 0; background: var(--surface); }
.tabs { display: flex; gap: 18px; padding: 0 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.tabs button { padding: 9px 0; font-size: 13px; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 6px; }
.tabs button[aria-selected="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--brand); }
.tabs button:disabled { opacity: .55; cursor: not-allowed; }
.panel { display: none; min-height: 0; overflow: auto; }
.panel[data-active="true"] { display: block; }
.panel.io { display: none; grid-template-rows: auto auto 1fr; }
.panel.io[data-active="true"] { display: grid; }
.io-block { padding: 10px 14px 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.io-block .grp { margin-bottom: 6px; }
.stdin { width: 100%; resize: vertical; min-height: 64px; border: 1px solid var(--line-strong); border-radius: var(--r); outline: 0; padding: 8px 10px; background: var(--surface); color: var(--ink); font-family: var(--mono); font-size: 12.5px; }
.stdin:focus { border-color: var(--brand); }
.stdin::placeholder { color: var(--ink-3); }
.io-head { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.io-head .grp { margin-right: 4px; }
.io-head .mono { font-size: 11px; color: var(--ink-3); margin-left: auto; }
.out { padding: 12px 14px; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; color: var(--term-fg); background: var(--term-bg); white-space: pre-wrap; word-break: break-word; margin: 0; overflow: auto; min-height: 0; }
.out .hint { color: var(--term-muted); font-family: var(--ui); font-size: 13px; }
.out .lbl { display: block; font-family: var(--ui); font-size: 9.5px; letter-spacing: .17em; text-transform: uppercase; color: var(--term-muted); font-weight: 600; margin: 12px 0 4px; }
.out .lbl:first-child { margin-top: 0; }
.out .stderr { color: var(--term-stderr); }
.out .compile { color: var(--term-compile); }
.out .warn { color: var(--warn); font-family: var(--ui); font-size: 12.5px; }
/* Database runs: result sets as tables, the schema the run left behind, raw toggle */
.out .dbout { white-space: normal; font-family: var(--ui); display: grid; gap: 10px; align-content: start; }
.dbschema { display: grid; gap: 4px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.dbschema .grp { margin-bottom: 2px; }
.dbschema .dbt { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; min-width: 0; }
.dbschema .dbt b { font-family: var(--mono); font-weight: 600; }
.dbschema .dbt span { color: var(--ink-3); font-size: 11.5px; white-space: nowrap; }
.dbschema .dbt small { color: var(--ink-3); font-family: var(--mono); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dbtag { font-family: var(--mono); font-size: 12px; color: var(--term-muted); }
.dbtext { margin: 0; font-family: var(--mono); font-size: 12.5px; white-space: pre-wrap; word-break: break-word; }
.dbtext.stderr { color: var(--term-stderr); }
.dbtable { border-collapse: collapse; font-size: 12.5px; font-family: var(--mono); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; max-width: 100%; display: inline-block; vertical-align: top; }
.dbtable caption { caption-side: top; text-align: left; font-family: var(--ui); font-size: 11px; color: var(--ink-3); padding: 4px 8px; white-space: pre-wrap; }
.dbtable th, .dbtable td { padding: 4px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dbtable th { font-family: var(--ui); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); background: var(--surface-2); }
.dbtable td.null { color: var(--ink-3); font-style: italic; }
.dbtable tfoot td { color: var(--ink-3); font-family: var(--ui); font-size: 11.5px; border-bottom: 0; }
.dbtable tbody tr:last-child td { border-bottom: 0; }
.dbraw { justify-self: start; padding: 3px 8px; font-size: 11.5px; }
.about { padding: 14px 16px; font-size: 13px; color: var(--ink-2); }
.about h3 { font-size: 14px; color: var(--ink); margin-bottom: 4px; }
.about p { margin-bottom: 12px; }
.about dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0 0 14px; }
.about dt { color: var(--ink-3); font-size: 12px; }
.about dd { margin: 0; font-family: var(--mono); font-size: 12px; color: var(--ink); }

/* Status bar */
.ide-foot { display: flex; align-items: center; gap: 14px; padding: 4px 12px; background: var(--surface); border-top: 1px solid var(--line); font-size: var(--fs-xs); color: var(--ink-3); min-height: 26px; }
.ide-foot .sp { flex: 1; }
.ide-foot .footlang { background: none; border: 0; padding: 0 4px; margin: 0 -4px; font: inherit; color: inherit; cursor: pointer; border-radius: var(--r); }
.ide-foot .footlang:hover { color: var(--ink); background: var(--surface-3); }
.ide-foot .filepeers { gap: 0; margin-left: 0; }
.ide-foot .filepeers .label { margin-right: 6px; color: var(--ink-3); }
.ide-foot .filepeers .avatar { width: 18px; height: 18px; font-size: 9px; border-width: 1.5px; }
.ide-foot .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-right: -8px; }
.ide-foot .dot.busy { background: var(--note); animation: pulse 1s infinite; }
.ide-foot .dot.bad { background: var(--crit); }
.ide-foot .lsp { display: inline-flex; align-items: center; gap: 6px; }
.ide-foot .lsp .dot { margin-right: 0; }
.ide-foot .lsp .dot.off { background: var(--line-strong); }
.ide-foot .lsp .dot.connecting { background: var(--note); animation: pulse 1s infinite; }
.ide-foot .mono { font-size: 11px; }
.ide-foot .collab { display: inline-flex; align-items: center; gap: 6px; }
.ide-foot .collab .dot { margin-right: 0; }
.ide-foot .collab .dot.off { background: var(--line-strong); }
.ide-foot .collab .dot.connecting { background: var(--note); animation: pulse 1s infinite; }

/* Collaboration: other people's cursors and selections in the editor */
.collab-cursor { position: absolute; height: 100%; border-left: 2px solid var(--peer-0); margin-left: -1px; pointer-events: none; }
.collab-cursor::after { position: absolute; top: -1.35em; left: -2px; padding: 0 5px; border-radius: 3px 3px 3px 0; font-family: var(--ui); font-size: 10px; font-weight: 600; line-height: 1.5; color: #fff; background: var(--peer-0); white-space: nowrap; pointer-events: none; opacity: .92; }
.collab-sel { background: var(--peer-0); opacity: .22; }
.peer-0 { border-left-color: var(--peer-0); } .peer-0::after, .collab-sel.peer-0 { background: var(--peer-0); }
.peer-1 { border-left-color: var(--peer-1); } .peer-1::after, .collab-sel.peer-1 { background: var(--peer-1); }
.peer-2 { border-left-color: var(--peer-2); } .peer-2::after, .collab-sel.peer-2 { background: var(--peer-2); }
.peer-3 { border-left-color: var(--peer-3); } .peer-3::after, .collab-sel.peer-3 { background: var(--peer-3); }
.peer-4 { border-left-color: var(--peer-4); } .peer-4::after, .collab-sel.peer-4 { background: var(--peer-4); }
.peer-5 { border-left-color: var(--peer-5); } .peer-5::after, .collab-sel.peer-5 { background: var(--peer-5); }

/* ── landing ────────────────────────────────────────────────────────────── */
.hero { padding: var(--s8) 0 var(--s6); display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s6); align-items: end; }
.hero h1 { font-size: var(--fs-hero); line-height: 1.05; letter-spacing: -.025em; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero .lede { font-size: 17px; color: var(--ink-2); max-width: 520px; margin-top: var(--s4); }
.hero .cta { display: flex; gap: 10px; margin-top: var(--s5); flex-wrap: wrap; }
.hero .facts { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.hero .fact { background: var(--surface); padding: 12px 14px; }
.hero .fact .grp { margin-bottom: 3px; }
.hero .fact b { font-size: 18px; font-weight: 600; letter-spacing: -.01em; display: block; }
.hero .fact span { font-size: 12.5px; color: var(--ink-3); }
.section { padding: var(--s7) 0 0; }
.section-head { display: flex; align-items: flex-end; gap: 14px; margin-bottom: var(--s4); }
.section-head h2 { font-size: var(--fs-lg); }
.section-head .sub { font-size: 13px; color: var(--ink-3); }
.section-head .acts { margin-left: auto; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.step { background: var(--surface); padding: 18px 20px 20px; }
.step .n { font-family: var(--mono); font-size: 12px; color: var(--brand); font-weight: 500; }
.step h3 { font-size: 15px; margin: 8px 0 6px; }
.step p { color: var(--ink-2); font-size: 13.5px; }
.langs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.lang { padding: 12px 14px; display: flex; align-items: baseline; gap: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; }
.lang b { font-weight: 600; font-size: 13.5px; }
.lang span { color: var(--ink-3); font-size: 12px; margin-left: auto; font-family: var(--mono); }
.foot { margin-top: var(--s8); padding: var(--s5) 0 var(--s6); border-top: 1px solid var(--line); color: var(--ink-3); font-size: 12.5px; display: flex; gap: 14px; flex-wrap: wrap; }
.foot .sp { flex: 1; }

/* ── responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { flex-direction: row; align-items: center; padding: 6px 8px; overflow-x: auto; gap: 2px; }
  .side .mark { padding: 4px 8px; }
  .side .grp, .side .foot, .nav .tag { display: none; }
  .nav { margin: 0; padding: 6px 10px; font-size: 13px; }
  .ws { grid-template-columns: 1fr; }
  .rail { flex-direction: row; padding: 4px 8px; gap: 6px; }
  .rail .sp { flex: 1; }
  .rail-mark { padding: 0 6px 0 0; }
  .ide.full { height: auto; min-height: calc(100vh - 44px); }
  .ide-split, .ide.has-explorer .ide-split { grid-template-columns: 1fr !important; grid-template-rows: auto minmax(320px, 3fr) auto minmax(260px, 2fr); }
  .ide.has-explorer .explorer { border-right: 0; border-bottom: 1px solid var(--line); max-height: 160px; }
  .ide-gutter { display: none; }
  .pop { left: 8px; right: 8px; max-width: none; }
  .ide-side { border-top: 1px solid var(--line); }
  .ide-title { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: var(--s6); }
  .steps { grid-template-columns: 1fr; }
  .top nav { display: none; }
}
@media (max-width: 640px) {
  .hero h1 { font-size: 32px; }
  .ide.compact { height: auto; }
  .ide-top .kbd, .ide-foot .num { display: none; }
}

/* ── contact ────────────────────────────────────────────────────────────── */
.contact { padding-top: var(--s6); padding-bottom: var(--s8); max-width: 980px; }
.contact .back { display: inline-block; font-size: 13px; color: var(--ink-3); margin-bottom: var(--s4); }
.contact h1 { font-size: 34px; letter-spacing: -.02em; }
.contact .lede { color: var(--ink-2); font-size: 15.5px; margin: 6px 0 var(--s5); }
.contact-grid { display: grid; grid-template-columns: 260px 1fr; gap: var(--s4); align-items: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; }
.contact-side { display: grid; gap: var(--s3); }
.contact-side .card b { display: block; font-size: 13.5px; margin-bottom: 4px; }
.contact-side .card p { font-size: 12.5px; color: var(--ink-2); margin-bottom: 8px; }
.contact-side .card a { font-size: 13px; font-weight: 600; }
.form-card { padding: 22px 24px 20px; }
.form-card h2 { font-size: 18px; }
.form-card .sub { font-size: 13px; color: var(--ink-3); margin-bottom: 16px; }
.form-card form { display: grid; gap: 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 500; }
.field .opt { color: var(--ink-3); font-weight: 400; }
.field textarea.inp { resize: vertical; min-height: 120px; font-family: var(--ui); }
.field .sel { width: 100%; }
.file { font-size: 13px; color: var(--ink-2); }
.file::file-selector-button { font: inherit; font-size: 12.5px; font-weight: 500; padding: 6px 12px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); margin-right: 10px; cursor: pointer; }
.form-error { background: var(--crit-soft); color: var(--crit); border: 1px solid var(--crit); border-radius: var(--r); padding: 8px 12px; font-size: 13px; margin-bottom: 12px; }
.fine { font-size: 11.5px; color: var(--ink-3); }
.form-card .btn.lg { justify-self: start; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } .row2 { grid-template-columns: 1fr; } }

/* ── run log ────────────────────────────────────────────────────────────── */
.runlog { padding: 8px 0; }
.runlog .hint { padding: 8px 14px; font-size: 12.5px; color: var(--ink-3); }
.logrow { display: grid; grid-template-columns: 62px 1fr auto auto; gap: 10px; align-items: center; padding: 6px 14px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); border-bottom: 1px solid var(--line); cursor: pointer; }
.logrow:hover { background: var(--surface-2); }
.logrow .t { color: var(--ink-3); }
.logrow .f { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logrow .pill { font-size: 10.5px; }
/* file icons: a colour per language */
.explorer .f .dotc, .ftab .dotc { width: 8px; height: 8px; border-radius: 2px; flex: none; background: var(--line-strong); }
.ftab::before { display: none; }
.ftab .dotc { margin-right: 2px; }
.explorer .f.folder .fi { color: var(--warn); }

/* ── docs ───────────────────────────────────────────────────────────────── */
.docs { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - var(--top-h)); }
.docs-nav { background: var(--surface-2); border-right: 1px solid var(--line); padding: 14px 0; }
.docs-nav .grp { padding: 12px 18px 6px; }
.docs-nav a { display: block; padding: 5px 18px; font-size: 13px; color: var(--ink-2); }
.docs-nav a:hover { color: var(--ink); text-decoration: none; }
.docs-nav a.on { color: var(--brand-deep); font-weight: 600; box-shadow: inset 2px 0 0 var(--brand); }
.docs-main { padding: 36px 40px 64px; max-width: 820px; }
.docs-main h1 { font-size: 32px; letter-spacing: -.02em; margin-bottom: 8px; }
.docs-main h2 { font-size: 17px; margin: 26px 0 8px; }
.docs-main .lede { color: var(--ink-2); font-size: 15px; margin-bottom: 20px; }
.docs-main p, .docs-main li { font-size: 14px; color: var(--ink-2); }
.docs-main ul, .docs-main ol { padding-left: 20px; display: grid; gap: 6px; }
.docs-main b { color: var(--ink); }
.docs-main code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-3); padding: 1px 5px; border-radius: 4px; }
.docs-main kbd { font-family: var(--mono); font-size: 11.5px; border: 1px solid var(--line-strong); border-radius: 4px; padding: 1px 5px; background: var(--surface); }
.docs-main .src { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin: 10px 0 14px; }
.docs-main .callout { background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: var(--r); padding: 10px 12px; color: var(--ink); }
.doc-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.doc-card { display: grid; gap: 6px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--ink); position: relative; }
.doc-card:hover { border-color: var(--brand); text-decoration: none; }
.doc-card b { font-size: 14px; }
.doc-card span { font-size: 12.5px; color: var(--ink-2); }
.doc-card::after { content: "→"; position: absolute; top: 14px; right: 16px; color: var(--ink-3); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 12.5px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--ink); }
.chip:hover { border-color: var(--brand); text-decoration: none; }
.tbl { border-collapse: collapse; width: 100%; font-size: 13px; margin: 8px 0 14px; }
.tbl th, .tbl td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
@media (max-width: 760px) { .docs { grid-template-columns: 1fr; } .docs-nav { border-right: 0; border-bottom: 1px solid var(--line); } .doc-cards { grid-template-columns: 1fr; } .docs-main { padding: 24px 18px 48px; } }

/* ── account ────────────────────────────────────────────────────────────── */
.who { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.who-name { font-size: 13px; color: var(--ink-2); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 27px; height: 27px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-deep); display: grid; place-items: center; font-weight: 600; font-size: 11.5px; border: 1px solid var(--brand-line); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.signin { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.docs-nav .lock { font-size: 10px; opacity: .7; }
.login { box-sizing: border-box; min-height: 100vh; display: grid; place-items: center; padding: var(--s6) 16px; }
.login-card { width: min(420px, 100%); }
.login-card { padding: 26px 28px; }
.login-card h1 { font-size: 22px; margin-bottom: 6px; }
.login-card .sub { font-size: 13.5px; color: var(--ink-2); margin-bottom: 18px; }
.login-card .signin { flex-direction: column; align-items: stretch; }
.login-card .signin .btn { justify-content: center; gap: 10px; }
.login-card .signin .ic { width: 16px; height: 16px; }
.login-card .fine { margin-top: 14px; }
.rail-who { margin: 0; }
.rail-who .avatar { width: 24px; height: 24px; font-size: 11px; }
.login { padding: 24px 16px; }
.login-card { position: relative; text-align: center; padding: 28px 28px 22px; }
.login-card .x { position: absolute; top: 10px; right: 14px; color: var(--ink-3); font-size: 20px; line-height: 1; }
.login-logo .glyph { width: 40px; height: 40px; border-radius: 11px; background: var(--brand); display: inline-grid; place-items: center; margin-bottom: 10px; }
.login-logo .glyph svg { width: 22px; height: 22px; }
.login-card h1 { font-size: 20px; }
.login-card .sub { margin-bottom: 16px; }
.providers { display: flex; gap: 10px; justify-content: center; }
.providers .btn { flex: 1; justify-content: center; padding: 9px 0; }
.providers .ic { width: 18px; height: 18px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 12px; margin: 14px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login-form { display: grid; gap: 12px; text-align: left; }
.login-form .btn.lg { justify-content: center; margin-top: 4px; }
.pw { position: relative; }
.pw .inp { padding-right: 38px; }
.pw .eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 14px; }
.alt { font-size: 13px; color: var(--ink-2); margin-top: 14px; }
.alt a { font-weight: 600; }

/* ── billing ────────────────────────────────────────────────────────────── */
.billing { padding-top: var(--s6); padding-bottom: var(--s6); }
.billing .lede { color: var(--ink-2); font-size: 15.5px; margin: 6px 0 var(--s4); max-width: 640px; }
.billing .callout { background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: var(--r); padding: 10px 12px; color: var(--ink); margin: 0 0 var(--s4); max-width: 640px; }
.billing .plan-state { margin-bottom: var(--s5); color: var(--ink-2); }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 320px)); gap: var(--s4); margin-bottom: var(--s5); }
.plan { display: grid; gap: 10px; align-content: start; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.plan.on { border-color: var(--brand); box-shadow: inset 2px 0 0 var(--brand); }
.plan .price { font-size: var(--fs-xl); font-weight: 600; letter-spacing: -.02em; }
.plan .price span { font-size: var(--fs-sm); color: var(--ink-3); font-weight: 400; margin-left: 4px; }
.plan ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 13.5px; display: grid; gap: 4px; }
.plan li.no { color: var(--ink-3); text-decoration: line-through; }
.plan form { margin-top: 6px; }
.plans.four { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); max-width: var(--content-max); }
.plan .per { font-size: var(--fs-sm); color: var(--ink-3); margin-top: -6px; }
.plan li.dim { color: var(--ink-3); }
.plan .tag { vertical-align: middle; margin-left: 2px; }
.toggles { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 var(--s4); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 99px; overflow: hidden; background: var(--surface); }
.seg a { padding: 5px 14px; font-size: var(--fs-sm); color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.seg a:hover { text-decoration: none; color: var(--ink); }
.seg a.on { background: var(--ink); color: var(--ground); }
.seg a.on .tag { background: var(--brand); color: var(--ground); }
.rate-note { color: var(--ink-3); font-size: var(--fs-sm); max-width: 720px; margin: 0 0 var(--s5); }
.pricing .faq { max-width: 720px; margin-top: var(--s5); }
.pricing .faq h2 { font-size: var(--fs-lg); margin-bottom: var(--s3); }
.pricing .faq dt { font-weight: 600; margin-top: var(--s3); }
.pricing .faq dd { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }

/* ── account menu and account pages ─────────────────────────────────────── */
.acct { position: relative; display: inline-flex; margin-left: 4px; }
.acct-btn { cursor: pointer; border-color: var(--line-strong); }
.acct-btn:hover, .acct-btn[aria-expanded="true"] { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.acct-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 240px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); display: grid; }
.acct-menu[hidden] { display: none; }
.acct-who { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.acct-who .avatar { width: 34px; height: 34px; font-size: 14px; }
.acct-who div { display: grid; min-width: 0; }
.acct-who b { font-size: 13.5px; }
.acct-who span { font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu a, .acct-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border-radius: var(--r); font-size: 13px; color: var(--ink); text-align: left; }
.acct-menu a:hover, .acct-menu button:hover { background: var(--surface-3); text-decoration: none; }
.acct-menu svg { width: 15px; height: 15px; color: var(--ink-3); flex: none; }
.acct-menu .sep { height: 1px; background: var(--line); margin: 4px 2px; }
.acct-menu form { margin: 0; }
.ide-top .acct-btn { width: 28px; height: 28px; }
.account { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--s6); padding-top: var(--s6); padding-bottom: var(--s7); }
.acct-nav { display: grid; gap: 2px; align-content: start; }
.acct-nav a { padding: 7px 10px; border-radius: var(--r); color: var(--ink-2); font-size: 13.5px; }
.acct-nav a:hover { background: var(--surface-3); text-decoration: none; }
.acct-nav a.on { background: var(--brand-soft); color: var(--brand-deep); font-weight: 600; }
.acct-main .lede { color: var(--ink-2); font-size: 15px; margin: 6px 0 var(--s5); max-width: 640px; }
.acct-main h2 { font-size: var(--fs-md); margin: var(--s6) 0 var(--s3); }
.acct-main .hint { color: var(--ink-3); font-size: 13.5px; }
.acct-main .callout { background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: var(--r); padding: 10px 12px; margin-bottom: var(--s4); max-width: 640px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; display: grid; gap: 16px; max-width: 640px; }
.profile-row { display: flex; align-items: center; gap: 14px; }
.profile-row .avatar.lg { width: 56px; height: 56px; font-size: 22px; }
.profile-row div { display: grid; gap: 2px; }
.profile-row b { font-size: 16px; }
.profile-row span { font-size: 13px; color: var(--ink-3); }
.profile-form { display: grid; gap: 6px; }
.profile-form label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.profile-form .row { display: flex; gap: 8px; }
.profile-form small { color: var(--ink-3); font-size: 12px; }
.tbl.sessions td form { margin: 0; }
.tbl.sessions .btn { padding: 3px 8px; font-size: 12px; }
.tbl.sessions tr.current td { background: var(--surface-2); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.stat { display: grid; gap: 2px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--ink); }
.stat:hover { border-color: var(--brand); text-decoration: none; }
.stat b { font-size: var(--fs-xl); font-weight: 600; letter-spacing: -.02em; }
.stat span { font-size: 12.5px; color: var(--ink-3); }
.plan form .seats { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 8px; }
.plan form .seats .inp { width: 84px; padding: 6px 8px; }
@media (max-width: 900px) { .account { grid-template-columns: 1fr; } .acct-nav { grid-auto-flow: column; overflow-x: auto; } }
