/* Solver API console. The shared look (fonts, tokens, ground, header, buttons, planes, code panels, cards)
   is in /docs/assets/site.css. This file holds what only the console has. Form controls, dialogs and the
   sign-in card follow the web app; everything else follows the marketing site. */

body { font-size: 15px; }
h1 { font-size: 30px; line-height: 1.15; }
h2 { font-size: 20px; line-height: 1.25; }
h3 { font: 600 16px/1.4 var(--display); letter-spacing: -0.01em; }
code { color: var(--text); }

/* ---------------------------------------------------------------- form controls (the app's wells) */
.field { display: grid; gap: 8px; }
.field > label, .field > .label { font-weight: 500; font-size: 14px; color: var(--text-2); }
.field .hint { font-size: 13px; line-height: 1.45; color: var(--text-faint); }
.field .error { font-size: 13px; color: var(--bad-text); }
.input, .select {
  width: 100%; min-height: 44px; padding: 10px 14px;
  border: 0; border-radius: var(--r-control);
  background-color: var(--well); box-shadow: var(--well-shadow);
  color: var(--text); font-size: 15px;
}
.input::placeholder { color: var(--text-off); }
.input:hover, .select:hover { box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.35), inset 0 0 0 1px rgb(190 205 255 / 0.2); }
.input:focus, .select:focus { outline: none; box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.35), inset 0 0 0 1px var(--accent-edge), 0 0 0 3px var(--accent-soft); }
.input[disabled], .select[disabled] { opacity: 0.5; cursor: not-allowed; box-shadow: var(--well-shadow); }
.input[aria-invalid='true'] { box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.35), inset 0 0 0 1px color-mix(in srgb, var(--bad) 75%, transparent); }
.select { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23c4cbd9' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.select option { background: var(--overlay); color: var(--text); }
.input-unit { position: relative; }
.input-unit .input { padding-right: 72px; }
.input-unit .unit { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font: 400 12px/1 var(--mono); color: var(--text-faint); pointer-events: none; }
.input-unit.lead .input { padding-left: 28px; padding-right: 14px; }
.input-unit.lead .unit { left: 14px; right: auto; font: 400 15px/1 var(--ui); }

.check { display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start; cursor: pointer; }
.check input { appearance: none; width: 20px; height: 20px; margin: 1px 0 0; border-radius: 6px; background-color: var(--well); box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.35), inset 0 0 0 1px rgb(190 205 255 / 0.2); cursor: pointer; display: grid; place-content: center; transition: transform var(--fast) var(--ease); }
.check input:hover { box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.35), inset 0 0 0 1px rgb(190 205 255 / 0.34); }
.check input:active { transform: scale(0.92); }
.check input:checked { background: linear-gradient(180deg, #eef2ff, #b9c6ea); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.6), 0 1px 2px rgb(0 2 10 / 0.4); }
.check input:checked::after { content: ''; width: 10px; height: 6px; border-left: 2px solid #10141f; border-bottom: 2px solid #10141f; transform: translateY(-1px) rotate(-45deg); }
.check input:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.check input[disabled] { opacity: 0.5; cursor: not-allowed; }
.check span { color: var(--text-2); }

.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 500; color: var(--text); }
.switch input { appearance: none; position: relative; width: 42px; height: 24px; margin: 0; border-radius: var(--r-pill); background-color: var(--well); box-shadow: var(--well-shadow); cursor: pointer; flex: none; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-faint); box-shadow: 0 1px 2px rgb(0 2 10 / 0.5); transition: transform var(--base) var(--ease); }
.switch input:hover { box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.35), inset 0 0 0 1px rgb(190 205 255 / 0.2); }
.switch input:active::after { transform: scale(0.9); }
.switch input:checked { background-image: linear-gradient(180deg, var(--select-top), var(--select-bottom)); box-shadow: inset 0 0 0 1px var(--select-edge), inset 0 1px 0 rgb(255 255 255 / 0.12); }
.switch input:checked::after { background: var(--select-ink); transform: translateX(18px); }
.switch input:checked:active::after { transform: translateX(18px) scale(0.9); }
.switch input:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: var(--r-pill); }
.switch input[disabled] { opacity: 0.5; cursor: not-allowed; }

/* a recessed round track; the picked option is a lit thumb */
.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 3px; border-radius: var(--r-pill); background-color: var(--well); box-shadow: var(--well-shadow); }
.seg label { position: relative; display: block; }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg span { display: block; min-width: 96px; padding: 8px 16px; border-radius: var(--r-pill); text-align: center; font-size: 14px; font-weight: 500; color: var(--text-muted); }
.seg input:hover + span { color: var(--text); background-image: linear-gradient(180deg, rgb(205 218 255 / 0.09), rgb(205 218 255 / 0.05)); }
.seg input:active + span { background-image: linear-gradient(180deg, rgb(205 218 255 / 0.13), rgb(205 218 255 / 0.09)); }
.seg input:checked + span { background-image: linear-gradient(180deg, var(--select-top), var(--select-bottom)); box-shadow: inset 0 0 0 1px var(--select-edge), inset 0 1px 0 rgb(255 255 255 / 0.12); color: var(--select-ink); }
.seg input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: -2px; }

/* ---------------------------------------------------------------- frames before the console: the app's sign-in card */
.gate { min-height: calc(100dvh - var(--nav-h)); display: flex; flex-direction: column; align-items: center; padding: 24px 16px 48px; }
.gate-inner { width: 100%; max-width: 420px; margin: auto; }
.gate-inner.wide { max-width: 460px; }
.gate-card { position: relative; padding: 32px; border-radius: var(--r-card); background-image: linear-gradient(180deg, rgb(205 218 255 / 0.095), rgb(205 218 255 / 0.045)); box-shadow: var(--plane-shadow); }
.gate-card::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(180deg, rgb(225 232 255 / 0.1), transparent 62%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.gate-mark { display: block; width: 48px; height: 48px; margin: 0 auto 16px; object-fit: contain; }
.gate-card h1 { font-size: 24px; line-height: 1.2; text-align: center; margin-bottom: 8px; }
.gate-card .sub { color: var(--text-muted); text-align: center; margin-bottom: 24px; }
.gate-foot { margin-top: 20px; font-size: 13px; color: var(--text-faint); display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.stack { display: grid; gap: 18px; }
.or { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; color: var(--text-faint); font-size: 13px; }
.or::before { content: ''; height: 1px; background: linear-gradient(90deg, transparent, var(--edge-strong)); }
.or::after { content: ''; height: 1px; background: linear-gradient(90deg, var(--edge-strong), transparent); }
.boot { min-height: calc(100dvh - var(--nav-h)); display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--text-faint); }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--text-faint); border-right-color: transparent; animation: spin 700ms linear infinite; }

/* ---------------------------------------------------------------- notices */
.notice { display: grid; grid-template-columns: 16px 1fr auto; gap: 12px; align-items: start; padding: 13px 16px; border-radius: var(--r-control); background-image: var(--plane-inset); box-shadow: inset 0 0 0 1px var(--edge), inset 0 1px 0 0 var(--edge-top); color: var(--text-2); font-size: 14px; }
.notice svg.icon { margin-top: 3px; color: var(--text-faint); }
.notice.is-error svg.icon { color: var(--bad-text); }
.notice.is-ok svg.icon { color: var(--ok-text); }
.notice .link-btn { font-size: 13px; white-space: nowrap; margin-top: 1px; }
.notices { display: grid; gap: 10px; }
.notices:not(:empty) { margin-bottom: 24px; }
.notices:empty { display: none; }
.form-error { font-size: 14px; color: var(--bad-text); }
.form-note { font-size: 13px; color: var(--text-faint); }

/* ---------------------------------------------------------------- shell: a rail for the sections, the page beside it */
.shell { min-height: calc(100dvh - var(--nav-h)); display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.rail { position: sticky; top: var(--nav-h); height: calc(100dvh - var(--nav-h)); display: flex; flex-direction: column; padding: 24px 14px 20px; overflow-y: auto; }
.rail::after { content: ''; position: absolute; inset: 0 0 0 auto; width: 1px; pointer-events: none; background: linear-gradient(180deg, transparent 0%, var(--edge-strong) 14%, var(--edge-strong) 86%, transparent 100%); }
.rail-title { margin: 0; padding: 0 12px 6px; font: 500 11px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); }
.rail-group { display: grid; gap: 2px; }
.rail-group + .rail-group { margin-top: 18px; }
.rail-toggle { display: none; }
.nav { display: grid; }
.nav a { display: flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: var(--r-item); color: var(--text-2); font-size: 14px; font-weight: 500; text-decoration: none; }
.nav a:hover { background: var(--hover); color: var(--text); }
.nav a:active { background: rgb(205 218 255 / 0.13); }
.nav a[aria-current='page'] { background: var(--selected); box-shadow: var(--selected-shadow); color: var(--text); }
.nav a:focus-visible { border-radius: var(--r-item); }
.rail-foot { margin-top: auto; padding: 14px 12px 0; display: grid; gap: 4px; font-size: 13px; color: var(--text-faint); }
.rail-foot .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.rail-foot .link-btn { justify-self: start; font-size: 13px; }

.main { min-width: 0; padding: 40px 40px 80px; }
.main:focus { outline: none; }
.main-inner { max-width: 980px; }
.section { display: grid; gap: 32px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; }
.page-head .sub { margin-top: 6px; color: var(--text-faint); font-size: 14px; overflow-wrap: anywhere; }
.page-group { margin: 0 0 8px; font: 500 11px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); }
.lede a { white-space: nowrap; }
.lede { max-width: 68ch; color: var(--text-2); line-height: 1.6; }
.block { display: grid; gap: 14px; }
.block-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.block-head p { color: var(--text-faint); font-size: 13px; }
.panel-pad { padding: 22px; }
.muted { color: var(--text-faint); }
.small { font-size: 13px; }

/* overview */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { padding: 20px 22px 22px; min-width: 0; }
.stat + .stat { border-left: 1px solid var(--edge); }
.stat-label { font: 500 11px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); }
.stat-value { margin-top: 10px; font: 600 30px/1.1 var(--display); letter-spacing: -0.02em; color: var(--heading); font-variant-numeric: tabular-nums; }
.stat-value small { font: 500 15px/1 var(--ui); letter-spacing: 0; color: var(--text-faint); }
.stat-note { margin-top: 8px; font-size: 13px; line-height: 1.5; color: var(--text-faint); }
.state-dot { display: inline-block; width: 9px; height: 9px; margin-right: 10px; border-radius: 50%; vertical-align: 3px; box-shadow: inset 0 0 0 1.5px var(--text-faint); }
.state-dot.is-warm { background: #3fb89a; box-shadow: none; }

.steps { display: grid; gap: 0; counter-reset: step; }
.step { position: relative; display: grid; gap: 12px; padding: 0 0 28px 48px; counter-increment: step; min-width: 0; }
.step::before { content: counter(step); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; display: grid; place-content: center; font: 400 13px/1 var(--mono); box-shadow: inset 0 0 0 1px var(--edge-strong); color: var(--text); }
.step::after { content: ''; position: absolute; left: 15.5px; top: 38px; bottom: 6px; width: 1px; background: linear-gradient(180deg, var(--edge-strong), transparent); }
.step:last-child { padding-bottom: 0; }
.step:last-child::after { display: none; }
.step.is-done::before { content: ''; background-image: var(--chip); box-shadow: var(--chip-shadow); }
.step .tick { display: none; }
.step.is-done .tick { display: block; position: absolute; left: 8px; top: 8px; color: var(--text); }
.step h3 { line-height: 32px; font-size: 17px; }
.step p { color: var(--text-2); max-width: 68ch; line-height: 1.6; }
.step .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.spot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; color: var(--text-faint); font: 400 12px/1.5 var(--mono); font-variant-numeric: tabular-nums; }
.code-head .btn-small { min-height: 28px; background-image: none; box-shadow: inset 0 0 0 1px var(--edge-strong); font: 400 12px/1 var(--mono); color: var(--text-2); }
.code-head .btn-small:hover { background-color: rgb(255 255 255 / 0.05); color: var(--text); }
.code-head .btn-small:active { background-color: rgb(255 255 255 / 0.08); }

/* a part of a step that can be folded away */
.reveal { min-width: 0; }
.reveal > summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 14px; font-weight: 500; color: var(--text-2); cursor: pointer; }
.reveal > summary::-webkit-details-marker { display: none; }
.reveal > summary::before { content: ''; width: 6px; height: 6px; margin: 0 3px 0 2px; border-right: 1.5px solid var(--text-faint); border-bottom: 1.5px solid var(--text-faint); transform: rotate(-45deg); transition: transform var(--base) var(--ease); }
.reveal[open] > summary::before { transform: rotate(45deg); }
.reveal > summary:hover { color: var(--text); }
.reveal > summary:active { color: var(--text-muted); }
.reveal > * + * { margin-top: 12px; }

/* the whole console at a glance: one tile for each section */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tile { display: grid; align-content: start; gap: 2px; min-width: 0; padding: 16px 18px 18px; border-radius: var(--r-card); background-image: var(--plane-inset); box-shadow: inset 0 0 0 1px var(--edge), inset 0 1px 0 0 var(--edge-top); text-decoration: none; }
.tile:hover { background-image: var(--chip-hover); box-shadow: inset 0 0 0 1px var(--edge-strong), inset 0 1px 0 0 var(--edge-top); }
.tile:active { background-image: var(--chip-press); }
.tile:focus-visible { border-radius: var(--r-card); }
.tile-group { font: 500 11px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); }
.tile-name { font: 600 16px/1.35 var(--display); letter-spacing: -0.01em; color: var(--heading); }
.tile-value { margin-top: 12px; font: 600 24px/1.15 var(--display); letter-spacing: -0.02em; color: var(--heading); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tile-value small { font: 500 13px/1 var(--ui); letter-spacing: 0; color: var(--text-faint); }
.tile-note { margin-top: 6px; font-size: 13px; line-height: 1.45; color: var(--text-faint); }

/* how to pay, on the overview of an account with no plan and no calls */
.pay-choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pay-option { position: relative; display: grid; gap: 8px; align-content: start; padding: 20px; border-radius: var(--r-card); background-image: var(--plane); box-shadow: var(--plane-shadow); }
.pay-option h3 { font-size: 17px; }
.pay-option p { color: var(--text-2); line-height: 1.5; }
.pay-option .btn { margin-top: 8px; min-height: 46px; }

/* the plans as price cards (the cards themselves are in /docs/assets/site.css) */
.plan-status:empty { display: none; }
.plan-status { font-size: 14px; color: var(--text-2); }
.plans-wait { grid-column: 1 / -1; }
.plan-card .tag { font-family: var(--ui); letter-spacing: 0; }
.plan-card .btn[disabled] { opacity: 0.55; }
#plan-enterprise { margin-top: 0; }

/* tables: a plane with a label strip */
.table-wrap { overflow: hidden; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { padding: 13px 18px 12px; text-align: left; font: 500 11px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); white-space: nowrap; border-bottom: 1px solid var(--edge); }
td { padding: 14px 18px; vertical-align: middle; border-bottom: 1px solid var(--edge); color: var(--text-2); }
tbody tr:last-child td { border-bottom: 0; }
td.strong, td .strong { color: var(--text); font-weight: 600; }
th.r, td.r { text-align: right; }
td.num, th.num { font-variant-numeric: tabular-nums; }
td.mono { font-size: 13px; }
td.actions { text-align: right; white-space: nowrap; }
td.actions .btn + .btn { margin-left: 6px; }
td .sub { display: block; font-size: 12px; color: var(--text-faint); }
.nowrap { white-space: nowrap; }
.is-off td:not(.actions) { color: var(--text-off); }
.is-off td.strong, .is-off td .strong { color: var(--text-faint); }
.plus { color: var(--ok-text); }
.status { display: inline-flex; align-items: center; white-space: nowrap; }
.status::before { content: ''; width: 8px; height: 8px; margin-right: 9px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--text-faint); flex: none; }
.status.is-complete::before { background: #3fb89a; box-shadow: none; }
.status.is-failed::before { background: var(--bad); box-shadow: none; }
.status.is-stopped::before { background: var(--text-faint); box-shadow: none; }

.empty { padding: 40px 22px; display: grid; gap: 8px; justify-items: start; }
.empty h3 { font-size: 17px; }
.empty p { color: var(--text-faint); max-width: 56ch; }
.empty .btn { margin-top: 10px; }

/* billing */
.options { display: grid; }
.option { position: relative; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; padding: 16px 22px; cursor: pointer; }
.option + .option { border-top: 1px solid var(--edge); }
.option:hover { background: rgb(205 218 255 / 0.035); }
.option:active { background: rgb(205 218 255 / 0.06); }
.option input { appearance: none; width: 20px; height: 20px; margin: 0; border-radius: 50%; background-color: var(--well); box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.35), inset 0 0 0 1.5px rgb(190 205 255 / 0.34); cursor: pointer; display: grid; place-content: center; }
.option input:hover { box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.35), inset 0 0 0 1.5px rgb(190 205 255 / 0.5); }
.option input:checked { box-shadow: inset 0 0 0 1.5px var(--select-ink); }
.option input:checked::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(180deg, #eef2ff, #b9c6ea); }
.option input:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 50%; }
.option input[disabled] { opacity: 0.5; cursor: not-allowed; }
.option-name { font: 600 16px/1.35 var(--display); letter-spacing: -0.01em; color: var(--heading); }
.option-name small { display: block; margin-top: 2px; font: 400 13px/1.45 var(--ui); letter-spacing: 0; color: var(--text-faint); }
.option-name .tag { margin-left: 6px; vertical-align: 2px; font-family: var(--ui); letter-spacing: 0; }
.option-price { text-align: right; font: 600 16px/1.35 var(--display); color: var(--heading); font-variant-numeric: tabular-nums; white-space: nowrap; }
.option-price small { display: block; margin-top: 2px; font: 400 13px/1.45 var(--ui); color: var(--text-faint); }
.option.plan { grid-template-columns: minmax(0, 1fr) auto 104px; cursor: default; }
.option.plan .btn { justify-self: end; }
.option.plan:hover, .option.plan:active { background: transparent; }
.panel-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 16px 22px; border-top: 1px solid var(--edge); }
.kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 20px; align-items: center; padding: 18px 22px; }
.kv + .kv { border-top: 1px solid var(--edge); }
.kv b { font: 600 16px/1.35 var(--display); letter-spacing: -0.01em; color: var(--heading); }
.kv p { color: var(--text-faint); font-size: 13px; margin-top: 2px; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.form-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
/* a discount code for a plan: label, field and button on one line; the answer after them */
.discount label { font-weight: 500; font-size: 14px; color: var(--text-2); }
.discount .input { width: 190px; min-height: 36px; padding-top: 6px; padding-bottom: 6px; font-family: var(--mono); font-size: 13.5px; text-transform: uppercase; }
.discount .form-note { flex-basis: 100%; }
.discount .form-note.is-good { color: var(--good-text, var(--text-2)); }
.discount .form-note.is-bad { color: var(--bad-text); }
.option-price s { display: block; font: 400 13px/1.45 var(--ui); color: var(--text-faint); }
.option-name small.deal { color: var(--text-2); }
.price-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.price-col { padding: 18px 22px; min-width: 0; }
.price-col + .price-col { border-left: 1px solid var(--edge); }
.price-col h3 { font: 500 11px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 10px; }
.price-col dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; }
.price-col dt { color: var(--text-2); }
.price-col dd { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }

/* dialogs: an opaque overlay plane */
dialog { width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: var(--r-sheet); background-color: var(--overlay); background-image: linear-gradient(180deg, rgb(255 255 255 / 0.035), transparent 36%); color: var(--text); box-shadow: inset 0 1px 0 0 var(--edge-top), 0 0 0 1px rgb(0 0 0 / 0.35), var(--shadow-lg); overflow: auto; }
dialog::backdrop { background: rgb(0 0 0 / 0.55); -webkit-backdrop-filter: blur(6px) saturate(1.1); backdrop-filter: blur(6px) saturate(1.1); }
dialog[open] { animation: rise var(--base) var(--ease); }
dialog[open]::backdrop { animation: fade var(--base) var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(0.985); } }
@keyframes fade { from { opacity: 0; } }
.dlg { display: grid; gap: 20px; padding: 28px; }
.dlg h2 { font-size: 22px; }
.dlg p { color: var(--text-2); }
.dlg .form-note, .dlg .hint { color: var(--text-faint); }
.dlg-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.dlg-actions .btn { min-height: 44px; padding: 0 22px; }
.secret { display: grid; gap: 10px; }
.secret output { display: block; padding: 14px 16px; border-radius: var(--r-control); background-color: var(--well); box-shadow: var(--well-shadow); font: 400 14px/1.55 var(--mono); color: var(--heading); overflow-wrap: anywhere; user-select: all; }

/* ---------------------------------------------------------------- narrow windows: the sections are one grouped menu */
@media (max-width: 899px) {
  .shell { display: block; }
  .rail { position: sticky; top: var(--nav-h); z-index: 20; height: auto; display: block; padding: 0; overflow: visible; -webkit-backdrop-filter: blur(18px) saturate(1.15); backdrop-filter: blur(18px) saturate(1.15); background-color: color-mix(in srgb, var(--ground) 76%, transparent); }
  .rail::after { inset: auto 0 0 0; width: auto; height: 1px; background: var(--hairline-x); }
  .rail-foot { display: none; }
  .rail-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 48px; padding: 0 16px; border: 0; background: none; color: var(--text); cursor: pointer; }
  .rail-toggle:hover { background: rgb(205 218 255 / 0.04); }
  .rail-toggle:active { background: rgb(205 218 255 / 0.08); }
  .rail-toggle:focus-visible { outline-offset: -3px; }
  .rail-where { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
  .rail-where span { font: 500 11px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); }
  .rail-where b { font: 600 15px/1.3 var(--ui); color: var(--heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rail-toggle .icon { color: var(--text-faint); transition: transform var(--base) var(--ease); }
  .rail.is-open .rail-toggle .icon { transform: rotate(180deg); }
  .rail .nav { display: none; position: absolute; left: 8px; right: 8px; top: calc(100% + 6px); max-height: calc(100dvh - var(--nav-h) - 72px); overflow-y: auto; padding: 10px 8px; border-radius: 16px; background-color: var(--overlay); background-image: linear-gradient(180deg, rgb(255 255 255 / 0.035), transparent 40%); box-shadow: inset 0 1px 0 0 var(--edge-top), 0 0 0 1px rgb(0 0 0 / 0.35), var(--shadow-lg); }
  .rail.is-open .nav { display: grid; animation: rise var(--base) var(--ease); }
  .rail-group + .rail-group { margin-top: 12px; }
  .nav a { min-height: 42px; font-size: 15px; }
  .main { padding: 28px 16px 64px; }
  .section { gap: 28px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1279px) {
  .main .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 719px) {
  .pay-choice { grid-template-columns: minmax(0, 1fr); }
  .main .plans { grid-template-columns: minmax(0, 1fr); }
  h1 { font-size: 26px; }
  .stats, .price-grid, .tiles { grid-template-columns: 1fr; }
  .stat + .stat, .price-col + .price-col { border-left: 0; border-top: 1px solid var(--edge); }
  .form-grid { grid-template-columns: 1fr; }
  /* tables become one block for each row */
  table, tbody, tr, td { display: block; }
  thead { display: none; }
  tr { padding: 14px 18px; border-bottom: 1px solid var(--edge); }
  tbody tr:last-child { border-bottom: 0; }
  td { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; padding: 4px 0; border: 0; text-align: left !important; overflow-wrap: anywhere; }
  td::before { content: attr(data-label); font: 500 10.5px/1.5 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); padding-top: 4px; }
  td > .tag, td > .status, td > .cards { justify-self: start; }
  td.actions { display: flex; gap: 8px; padding-top: 12px; white-space: normal; }
  td.actions::before { display: none; }
  td.actions .btn + .btn { margin-left: 0; }
  .option { padding: 16px 18px; }
  .option.plan { grid-template-columns: minmax(0, 1fr) auto; }
  .option.plan .btn { grid-column: 1 / -1; justify-self: start; margin-top: 8px; }
  .kv { grid-template-columns: 1fr; padding: 18px; }
  .kv .btn { justify-self: start; }
  .panel-foot, .panel-pad { padding: 18px; }
  .gate-card { padding: 26px 20px; }
  .dlg { padding: 24px 20px; }
  .dlg-actions .btn { flex: 1 1 auto; }
}
@media (max-width: 400px) {
  .step { padding-left: 42px; }
  .seg span { min-width: 0; }
}
