/* ══════════════════════════════════════════════════════════════════════════════
 * site.css — the customer website's styling. PHASE K.
 *
 * Plain CSS, no framework, no build step, and no font or asset fetched from another origin — the CSP
 * names none and this file needs none.
 *
 * The accessibility decisions that live here rather than in the markup are the same ones the admin
 * console's stylesheet records, and for the same reasons: a visible focus ring on everything and
 * `outline: none` nowhere; every state pill carries its word so nothing depends on telling a red from
 * an amber; no animation, so there is nothing for prefers-reduced-motion to switch off.
 *
 * Full WCAG conformance cannot be claimed from a stylesheet — it needs manual testing with assistive
 * technology and expert review. What is claimed is that the known structural traps are avoided.
 * ══════════════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #0f1216;
  --panel: #191e26;
  --panel-2: #212836;
  --line: #2f3846;
  --text: #e9edf4;
  --muted: #a4aebd;
  --accent: #5aa9ff;
  --ok: #57c98b;
  --warn: #e8b451;
  --bad: #f07a7a;
  --focus: #ffd166;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 "Segoe UI", system-ui, -apple-system, sans-serif;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #07121f;
  padding: 10px 16px;
  z-index: 10;
  font-weight: 600;
}
.skip:focus { left: 0; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 12px; }
h1 { font-size: 30px; }
h2 { font-size: 22px; }
h3 { font-size: 17px; margin-top: 26px; }

.muted { color: var(--muted); }
.small { font-size: 14px; }
a { color: var(--accent); }

/* ─── The hidden attribute must win ───────────────────────────────────────────
 *
 * `hidden` is implemented by the user agent as `display: none`, and ANY author `display` declaration on
 * the same element beats it. This page switches between the public view, the account view and three
 * panels with `hidden`, and one `display: grid` on the wrong selector would leave two screens on top of
 * each other. It happened in the operator console, where `.login` set one. Stated once, here. */
[hidden] { display: none !important; }

.site-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 22px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: baseline; gap: 10px; }
.tag {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 3px;
  padding: 1px 6px;
}
.who { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ─── Signed out ────────────────────────────────────────────────────────────── */
.public-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  gap: 32px;
  padding: 28px 22px 60px;
  max-width: 1280px;
  align-items: start;
}
@media (max-width: 900px) {
  .public-body { grid-template-columns: minmax(0, 1fr); }
}
.pitch p { max-width: 62ch; }
/* ─── Your software ───────────────────────────────────────────────────────────
 *
 * The download is the one action on the site that a customer is looking FOR rather than being led to,
 * so it is a button rather than a line of prose with a link in it. */
.download {
  display: inline-block;
  background: var(--accent);
  color: #07121f;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  margin: 6px 0 4px;
}
.steps-list { margin: 8px 0 18px; padding-left: 26px; }
.steps-list li { margin-bottom: 8px; }

.forms { display: grid; gap: 18px; }
.forms label { display: block; margin: 14px 0 6px; font-weight: 600; }
.forms input { width: 100%; }
.forms button { width: 100%; margin-top: 18px; }

/* ─── Plans ─────────────────────────────────────────────────────────────────── */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.plan {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.plan h3 { margin: 0; font-size: 20px; }
.plan .price { font-size: 28px; font-weight: 600; }
.plan .per { color: var(--muted); font-size: 14px; font-weight: 400; }
.plan ul { margin: 6px 0 0; padding-left: 20px; color: var(--muted); }
.plan li { margin: 3px 0; }
.plan .grow { flex: 1; }

/* ─── Chrome ────────────────────────────────────────────────────────────────── */
.nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding: 10px 22px 0;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.nav-item {
  background: none;
  border: 1px solid transparent;
  border-bottom: none;
  color: var(--muted);
  padding: 9px 15px;
  border-radius: 5px 5px 0 0;
  cursor: pointer;
  font: inherit;
}
.nav-item:hover { color: var(--text); }
/* Keyed off the attribute the controller sets, so the visual state and the announced state cannot
 * drift apart. */
.nav-item[aria-current="page"] {
  background: var(--bg);
  border-color: var(--line);
  color: var(--text);
  font-weight: 600;
}

main { padding: 22px; max-width: 1100px; }

/* ─── Feedback ──────────────────────────────────────────────────────────────── */
.feedback { margin: 0; padding: 0 22px; color: var(--muted); }
.feedback:not(:empty) {
  padding: 11px 22px;
  border-left: 4px solid var(--line);
  background: var(--panel-2);
}
.feedback.ok:not(:empty) { border-left-color: var(--ok); color: var(--text); }
.feedback.bad:not(:empty) { border-left-color: var(--bad); color: var(--text); }
.card .feedback { padding: 0; }
.card .feedback:not(:empty) { margin-top: 14px; padding: 10px 12px; }

/* ─── Panels ────────────────────────────────────────────────────────────────── */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px 22px;
  margin-bottom: 18px;
}
.status-card {
  border-left-width: 4px;
  border-left-style: solid;
  border-left-color: var(--line);
}
.status-card.ok { border-left-color: var(--ok); }
.status-card.wait { border-left-color: var(--warn); }
.status-card.bad { border-left-color: var(--bad); }
.status-card .headline { font-size: 19px; font-weight: 600; margin-bottom: 6px; }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 7px 18px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

.instructions {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 12px 0;
}
.instructions .kv { grid-template-columns: max-content 1fr; }
.instructions dd { font-family: Consolas, "Cascadia Mono", monospace; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 18px; }
.steps li {
  counter-increment: step;
  padding: 6px 0 6px 34px;
  position: relative;
  color: var(--muted);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--line);
  text-align: center;
  line-height: 20px;
  font-size: 13px;
}
.steps li.done { color: var(--text); }
.steps li.done::before { border-color: var(--ok); color: var(--ok); }
.steps li.current { color: var(--text); font-weight: 600; }
.steps li.current::before { border-color: var(--accent); color: var(--accent); }

/* ─── Controls ──────────────────────────────────────────────────────────────── */
input, select, textarea {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 11px;
  font: inherit;
}
input:disabled, select:disabled, button:disabled { opacity: 0.55; cursor: not-allowed; }
input[type="file"] { padding: 7px; }

button {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 16px;
  font: inherit;
  cursor: pointer;
}
button:hover:not(:disabled) { border-color: var(--accent); }
button.primary { background: var(--accent); color: #07121f; border-color: var(--accent); font-weight: 600; }
button.danger { border-color: var(--bad); color: var(--bad); }
button.link { background: none; border: none; color: var(--accent); padding: 0; text-decoration: underline; }

.grid-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px 18px;
}
.grid-form label { display: block; color: var(--muted); margin-bottom: 5px; }
.grid-form input, .grid-form select, .grid-form textarea { width: 100%; }
.form-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.hint { display: block; color: var(--muted); font-size: 14px; margin-top: 5px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; margin: 0 0 16px; }
legend { color: var(--muted); padding: 0 6px; }

/* ─── State pills. The word is always in the element. ───────────────────────── */
.pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--line);
  white-space: nowrap;
}
.pill.ACTIVE, .pill.APPROVED { border-color: var(--ok); color: var(--ok); }
.pill.UNDER_REVIEW, .pill.PROOF_SUBMITTED, .pill.PENDING_PAYMENT, .pill.PAST_DUE {
  border-color: var(--warn); color: var(--warn);
}
.pill.REJECTED, .pill.CANCELLED, .pill.EXPIRED, .pill.SUSPENDED {
  border-color: var(--bad); color: var(--bad);
}

table { width: 100%; border-collapse: collapse; font-size: 15px; }
caption { text-align: left; color: var(--muted); padding-bottom: 8px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; white-space: nowrap; }
code, .mono { font-family: Consolas, "Cascadia Mono", monospace; font-size: 14px; }

.empty { color: var(--muted); padding: 14px 0; }
.proof-list { list-style: none; padding: 0; margin: 8px 0 0; }
.proof-list li { display: flex; gap: 10px; align-items: baseline; padding: 4px 0; }

/* ─── The risk statement and the legal footer ───────────────────────────────────
 *
 * The risk statement is given a WARNED border rather than the muted treatment every other note on
 * this page uses. It is not a footnote: a person deciding whether to let software trade their own
 * money should not be able to skim past it, and `.muted` is the class that makes text skimmable.
 *
 * It is not styled as an ERROR either. Nothing has gone wrong; this is a standing property of the
 * product, and red would make it read as a fault on the page rather than a fact about trading. */
.risk {
  margin: 14px 0;
  padding: 12px 14px;
  color: var(--text);
  background: rgba(232, 180, 81, 0.10);
  border: 1px solid rgba(232, 180, 81, 0.35);
  border-left: 3px solid var(--warn);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.55;
}

/* Outside both views, so it needs its own separation from whichever one is on screen. */
.legal {
  max-width: 1100px;
  margin: 28px auto 32px;
  padding: 18px 20px 0;
  border-top: 1px solid var(--line);
}

.legal-links { margin: 10px 0 6px; font-size: 14px; }
.legal-links .sep { color: var(--muted); }

/* Links here may leave the site, so they are visibly links rather than styled as page furniture. */
.legal a { color: var(--accent); }
.legal a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
