/* ROB RUN
 *
 * One palette, one accent, small radii. The product is a tool that runs over
 * a game, so the surface stays close to an instrument panel: dark by intent,
 * dense, and legible at a glance in a second monitor. Accent marks the one
 * action that matters on a screen, nothing else.
 */

:root {
  --ink:        #08090B;
  --ink-2:      #0B0D10;
  --surface:    #101317;
  --surface-2:  #14181D;
  --line:       #232830;
  --line-soft:  #1A1F26;
  --text:       #E9ECF1;
  --muted:      #98A1AE;
  --accent:     #C9F24C;
  --accent-ink: #0A0B0D;
  --bad:        #FF8A8A;
  --warn:       #F5C451;
  --ok:         #7BE38B;

  --r-sm: 2px;
  --r:    4px;

  --pad: 24px;
  --wrap: 1180px;

  --sans: ui-sans-serif, "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

a { color: var(--text); text-decoration-color: var(--line); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.015em; line-height: 1.15; }
h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); }
h3 { font-size: 1.02rem; letter-spacing: -0.005em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

ul, ol, dl { margin: 0; padding: 0; }
li { list-style: none; }

code, .mono { font-family: var(--mono); font-size: 0.88em; }

.muted { color: var(--muted); }
.fine { color: var(--muted); font-size: 0.82rem; line-height: 1.55; }
.center { text-align: center; }
.break { word-break: break-all; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.narrow { max-width: 760px; }

/* Anchored sections must clear the sticky header, or the section index lands
 * underneath it and looks clipped. */
[id] { scroll-margin-top: 80px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* ------------------------------------------------------------- controls ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease;
}
.btn:hover { border-color: #3A424E; background: var(--surface-2); }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}
.btn-primary:hover { background: #D8FF6E; border-color: #D8FF6E; }
.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-danger { border-color: #4A2424; color: var(--bad); }
.btn-danger:hover { background: #1A0F0F; border-color: #7A3232; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 0.84rem; }
.btn-xs { min-height: 28px; padding: 0 9px; font-size: 0.78rem; }
.btn-block { width: 100%; }
.btn.disabled { opacity: 0.45; pointer-events: none; }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }

.link-quiet { color: var(--muted); font-size: 0.85rem; text-decoration: none; }
.link-quiet:hover { color: var(--text); text-decoration: underline; }

label { display: block; font-size: 0.82rem; color: var(--muted); margin-bottom: 6px; }

input[type="text"], input[type="number"], input[type="url"], input[type="search"],
input[type="password"], input[type="file"], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--ink-2);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  border-color: var(--accent);
  outline: 2px solid transparent;
  box-shadow: 0 0 0 1px var(--accent);
}
input::placeholder, textarea::placeholder { color: #5E6672; }
input[type="checkbox"] {
  width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--accent);
}

.form { display: grid; gap: 14px; }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; }
.form-inline { display: flex; align-items: center; gap: 12px; }
.form-inline label { margin: 0; }
.form-inline input { width: 110px; }
.hint { color: var(--muted); font-size: 0.78rem; margin: 6px 0 0; }

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
  color: var(--text);
  font-size: 0.92rem;
  margin: 0;
}
.check:first-of-type { border-top: 0; }
.check span { display: block; }
.check strong { display: block; font-weight: 600; margin-bottom: 2px; }
.check .muted { font-size: 0.84rem; line-height: 1.5; }

/* --------------------------------------------------------------- chrome ---- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--ink);
  border-bottom: 1px solid var(--line-soft);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  white-space: nowrap;
}
.brand-mark {
  width: 11px; height: 11px;
  border: 1.5px solid var(--accent);
  display: inline-block;
  transform: rotate(45deg);
}
.brand-name {
  font-weight: 700;
  letter-spacing: 0.11em;
  font-size: 0.88rem;
}
.nav {
  display: flex;
  gap: 22px;
  margin-right: auto;
}
.nav a {
  color: var(--muted);
  font-size: 0.88rem;
  text-decoration: none;
}
.nav a:hover { color: var(--text); }
.topbar-actions { margin-left: auto; }

.announce {
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--text);
  padding: 9px 0;
}

.footer {
  border-top: 1px solid var(--line-soft);
  padding: 40px 0 48px;
  margin-top: 40px;
}
.footer-inner {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}
.footer-links { display: flex; gap: 20px; font-size: 0.86rem; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer .fine:last-child { grid-column: 1 / -1; margin-top: 8px; }

/* ----------------------------------------------------------- storefront ---- */

.eyebrow {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 14px;
}
.eyebrow::before { content: "// "; color: var(--accent); }

.hero { padding: 88px 0 72px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.85fr);
  gap: 64px;
  align-items: start;
}
.hero-copy h1 { max-width: 18ch; }
.lede {
  margin-top: 22px;
  max-width: 52ch;
  color: var(--muted);
  font-size: 1.05rem;
}
.cta-row { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }

.facts {
  display: flex;
  gap: 36px;
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
  flex-wrap: wrap;
}
.facts dt { font-size: 0.75rem; color: var(--muted); margin-bottom: 3px; }
.facts dd { margin: 0; font-size: 0.88rem; }

.buildpanel {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--r);
}
.buildpanel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
}
.mono-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}
.status { display: inline-flex; align-items: center; gap: 7px; font-size: 0.8rem; }
.status .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-ok { color: var(--ok); }
.status-bad { color: var(--bad); }

.buildpanel-body { padding: 6px 16px 14px; margin: 0; }
.buildpanel-body > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
}
.buildpanel-body > div:last-child { border-bottom: 0; }
.buildpanel-body dt { color: var(--muted); font-size: 0.82rem; }
.buildpanel-body dd { margin: 0; text-align: right; font-size: 0.82rem; }
.buildpanel-foot { padding: 14px 16px; border-top: 1px solid var(--line-soft); }
.keyline {
  display: block;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  word-break: break-all;
  line-height: 1.5;
}

.section { padding: 76px 0; }
.section-alt { background: var(--ink-2); border-block: 1px solid var(--line-soft); }

.section-head { margin-bottom: 40px; }
.section-head .index {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.section-head h2 { margin-bottom: 10px; }
.section-head p { color: var(--muted); max-width: 56ch; margin: 0; }

.feature-lead {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  gap: 48px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--line-soft);
}
.feature-lead-side { border-left: 1px solid var(--line-soft); padding-left: 44px; }
.feature-lead h3 { font-size: 1.2rem; margin-bottom: 10px; }
.feature-lead p { color: var(--muted); max-width: 46ch; }

.spec { margin-top: 22px; }
.spec li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 0.86rem;
}
.spec li span:last-child { color: var(--muted); text-align: right; }

.feature-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 8px;
}
.feature-row { padding: 28px 28px 8px 0; border-right: 1px solid var(--line-soft); }
.feature-row:last-child { border-right: 0; }
.feature-row + .feature-row { padding-left: 28px; }
.feature-row h3 { margin-bottom: 8px; }
.feature-row p { color: var(--muted); font-size: 0.88rem; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 64px;
  align-items: start;
}
.steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line-soft); }
.steps li {
  background: var(--ink-2);
  padding: 22px;
  display: flex;
  gap: 16px;
}
.section-alt .steps li { background: var(--ink-2); }
.step-n { font-family: var(--mono); font-size: 0.72rem; color: var(--accent); padding-top: 3px; }
.steps h3 { font-size: 0.95rem; margin-bottom: 6px; }
.steps p { color: var(--muted); font-size: 0.85rem; margin: 0; }

.access-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.75fr);
  gap: 56px;
  align-items: start;
}
.pricetable { width: 100%; border-collapse: collapse; margin: 0 0 20px; }
.pricetable th, .pricetable td {
  text-align: left;
  padding: 16px 12px;
  border-bottom: 1px solid var(--line-soft);
  font-weight: 400;
  font-size: 0.92rem;
}
.pricetable thead th {
  font-size: 0.74rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom-color: var(--line);
}
.pricetable tbody th { font-weight: 600; white-space: nowrap; }
.pricetable .price { color: var(--accent); white-space: nowrap; }

.access-cta {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--r);
  padding: 24px;
  display: grid;
  gap: 14px;
  align-content: start;
}
.access-cta h3 { font-size: 1.05rem; }
.access-cta p { color: var(--muted); font-size: 0.88rem; }
.assurances { display: grid; gap: 8px; padding-top: 6px; border-top: 1px solid var(--line-soft); }
.assurances li { font-size: 0.82rem; color: var(--muted); padding-left: 16px; position: relative; }
.assurances li::before { content: ""; position: absolute; left: 0; top: 8px; width: 6px; height: 1px; background: var(--accent); }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line-soft); }
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  cursor: pointer;
  font-weight: 500;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-family: var(--mono); }
.faq details[open] summary::after { content: "\2212"; color: var(--accent); }
.faq p { color: var(--muted); padding: 0 0 20px; max-width: 66ch; font-size: 0.92rem; }

.prose h3 { margin: 32px 0 8px; }
.prose p { color: var(--muted); max-width: 68ch; }
.prose .section-head p { color: var(--muted); }

/* --------------------------------------------------------------- forms ---- */

.auth-section { display: grid; place-items: center; padding: 80px 24px; }
.authcard {
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--r);
  padding: 32px;
}
.authcard h1 { font-size: 1.6rem; margin-bottom: 8px; }
.authcard .muted { margin-bottom: 22px; }

.flash {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-size: 0.88rem;
  margin: 0 0 18px;
}
.flash-ok { border-color: #2C4A33; color: var(--ok); background: #0D1510; }
.flash-err { border-color: #4A2A2A; color: var(--bad); background: #150E0E; }

.notice { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; font-size: 0.9rem; }
.notice-ok { border-color: #2C4A33; color: var(--ok); }
.notice-bad { border-color: #4A2A2A; color: var(--bad); }
.notice a { color: inherit; }

/* -------------------------------------------------------------- portal ---- */

.pagehead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}
.pagehead h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.pagehead .eyebrow { margin-bottom: 8px; }

.portalgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--r);
  padding: 22px;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}
.card-head h2 { font-size: 0.95rem; letter-spacing: 0.01em; }
.card p:last-child { margin-bottom: 0; }

.card-key .keybig {
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  margin: 4px 0 18px;
  word-break: break-all;
}

.kv > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.88rem;
}
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; }

.pill {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}
.pill-ok { border-color: #2C4A33; color: var(--ok); }
.pill-warn { border-color: #4A3D22; color: var(--warn); }
.pill-bad { border-color: #4A2A2A; color: var(--bad); }

/* --------------------------------------------------------------- admin ---- */

.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }

.side {
  border-right: 1px solid var(--line-soft);
  background: var(--ink-2);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.side-label { color: #5E6672; font-size: 0.72rem; margin: 10px 0 0; letter-spacing: 0.04em; }
.side-nav { display: grid; gap: 2px; }
.side-nav a {
  display: block;
  padding: 8px 10px;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}
.side-nav a:hover { color: var(--text); background: var(--surface); }
.side-nav a.active { color: var(--text); border-left-color: var(--accent); background: var(--surface); }
.side-foot { margin-top: auto; display: grid; gap: 12px; }
.side-link { color: #5E6672; font-size: 0.78rem; text-align: center; text-decoration: none; }
.side-link:hover { color: var(--muted); }

.main { padding: 30px 32px 64px; max-width: 1240px; }

.metrics {
  display: grid;
  grid-template-columns: minmax(200px, 0.6fr) minmax(0, 1.4fr);
  gap: 20px;
  margin-bottom: 20px;
}
.metric-primary {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--r);
  padding: 20px 22px;
  display: grid;
  align-content: start;
  gap: 4px;
}
.metric-label { font-size: 0.78rem; color: var(--muted); }
.metric-primary strong { font-size: 3rem; font-weight: 600; line-height: 1; letter-spacing: -0.03em; }
.metric-note { font-size: 0.8rem; color: var(--muted); }
.metric-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  overflow: hidden;
}
.metric-list > div { background: var(--surface); padding: 14px 16px; }
.metric-list dt { font-size: 0.76rem; color: var(--muted); }
.metric-list dd { margin: 2px 0 0; font-size: 1.2rem; font-family: var(--mono); }

.main .card { margin-bottom: 20px; }

.spark {
  font-family: var(--mono);
  font-size: 30px;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin: 6px 0 4px;
  line-height: 1.1;
  overflow-x: auto;
}
.spark span { cursor: default; }

.twocol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

.subhead { margin: 34px 0 14px; font-size: 0.95rem; letter-spacing: 0.01em; }

.panel {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  margin-bottom: 14px;
}
.panel > summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  font-weight: 500;
  font-size: 0.92rem;
}
.panel > summary::-webkit-details-marker { display: none; }
.panel > summary::after { content: "+"; color: var(--muted); font-family: var(--mono); }
.panel[open] > summary::after { content: "\2212"; color: var(--accent); }
.panel > summary .muted { font-size: 0.8rem; margin-left: auto; }
.panel .form { padding: 0 18px 18px; }

.filterbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 18px 0 14px;
  flex-wrap: wrap;
}
.filterbar input[type="search"] { max-width: 280px; }
.filterbar select { width: auto; min-width: 150px; }
.resultcount { font-size: 0.82rem; margin-left: auto; }

.tablewrap {
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow-x: auto;
  background: var(--surface);
  margin-bottom: 18px;
}
.table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.table th, .table td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
  white-space: nowrap;
  vertical-align: middle;
}
.table thead th {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
  border-bottom-color: var(--line);
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table-compact th, .table-compact td { padding: 9px 12px; }
.table .note { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }

.rowact { display: flex; gap: 6px; align-items: center; }
.rowact select { width: auto; padding: 5px 8px; font-size: 0.8rem; }
.actions-cell { display: flex; gap: 8px; align-items: center; }
.actions-cell form { margin: 0; }

.pager { display: flex; align-items: center; gap: 14px; justify-content: center; padding: 6px 0 20px; }

.empty {
  border: 1px dashed var(--line);
  border-radius: var(--r);
  padding: 26px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.empty a { color: var(--text); }

.code {
  border: 1px solid var(--line);
  background: var(--ink-2);
  border-radius: var(--r);
  padding: 18px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 70vh;
}

.keysout {
  border: 1px solid var(--line);
  background: var(--ink-2);
  border-radius: var(--r-sm);
  padding: 14px;
  width: 100%;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  color: var(--text);
}

.settingsform .card { margin-bottom: 16px; }
.card-danger { border-color: #3A2626; }
.prose-lead { color: var(--muted); max-width: 74ch; font-size: 0.92rem; margin-bottom: 20px; }

.admin-login { display: grid; place-items: center; min-height: 100vh; }
.authwrap { width: 100%; padding: 40px 24px; display: grid; place-items: center; }
.admin-login .brand { margin-bottom: 26px; }

/* ----------------------------------------------------------- responsive ---- */

@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-copy h1 { max-width: 24ch; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .feature-lead { grid-template-columns: 1fr; gap: 28px; }
  .feature-lead-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--line-soft); padding-top: 24px; }
  .access-grid { grid-template-columns: 1fr; gap: 32px; }
  .feature-list { grid-template-columns: 1fr; }
  .feature-row { border-right: 0; border-bottom: 1px solid var(--line-soft); padding: 22px 0; }
  .feature-row + .feature-row { padding-left: 0; }
  .feature-row:last-child { border-bottom: 0; }
  .portalgrid { grid-template-columns: 1fr; }
  .twocol { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  /* A 1fr track still has an auto minimum, so a wide table or the nav strip
   * would push the whole page sideways instead of scrolling inside its own
   * box. minmax(0, 1fr) plus min-width:0 keeps the overflow where it belongs. */
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side, .main { min-width: 0; }
  .side {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    overflow-x: auto;
    padding: 12px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }
  .side-top { display: flex; align-items: center; gap: 12px; }
  .side-label { display: none; }
  .side-nav { display: flex; gap: 4px; }
  .side-nav a { border-left: 0; border-bottom: 2px solid transparent; padding: 8px 10px; white-space: nowrap; }
  .side-nav a.active { border-left: 0; border-bottom-color: var(--accent); }
  .side-foot { margin: 0 0 0 auto; display: flex; align-items: center; gap: 10px; }
  .side-foot form { margin: 0; }
  .side-link { display: none; }
  .main { padding: 24px 18px 56px; }
  .metric-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  :root { --pad: 18px; }
  .topbar-inner { flex-wrap: wrap; gap: 12px; padding: 10px 0; }
  .nav { order: 3; width: 100%; overflow-x: auto; gap: 18px; padding-bottom: 4px; }
  .topbar-actions { margin-left: auto; }
  .hero { padding: 56px 0 48px; }
  .section { padding: 56px 0; }
  .facts { gap: 22px; }
  .steps { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { flex-wrap: wrap; gap: 14px; }
  .pagehead { flex-direction: column; align-items: flex-start; gap: 14px; }
  .btn { min-height: 44px; }
  .btn-sm { min-height: 40px; }
  .btn-xs { min-height: 36px; }
  .rowact { flex-wrap: wrap; }
  .pricetable .muted { display: none; }
  .spark { font-size: 22px; }
  .authcard { padding: 24px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
