/* Forge Learning Academy partner portal. Tokens match forge-site. */
:root {
  --bg: #0D1426;
  --bg-deep: #080E1C;
  --surface: #162038;
  --surface-2: #1B2845;
  --border: #28385A;
  --row: #1D2C4C;
  --accent: #5B97D6;
  --accent-bright: #7CB0E6;
  --gold: #E8A33D;
  --green: #74D2A4;
  --red: #E68C8C;
  --ink: #FFFFFF;
  --text: #D4DFEF;
  --text-soft: #C4D2E8;
  --muted: #94A3BE;
  --muted-dim: #6B7A98;
  --display: Poppins, system-ui, sans-serif;
  --body: Inter, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
}
a { color: var(--accent-bright); }
a:hover { color: #A9CBEF; }
h1, h2, p { margin: 0; }
::placeholder { color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; }

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

/* Brand row */
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand img { width: 40px; height: 40px; border-radius: 10px; display: block; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 18px; }
.tag {
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--gold); background: rgba(232, 163, 61, .12); border: 1px solid rgba(232, 163, 61, .4);
  border-radius: 999px; padding: 2px 10px;
}

/* Top bar */
.top { background: var(--bg-deep); border-bottom: 1px solid var(--border); }
.top-in {
  max-width: 1120px; margin: 0 auto; padding: 14px 24px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
}
.top-right { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; font-size: 14px; color: var(--text); }
.linkish {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: 600 14px var(--body); color: var(--accent-bright); text-decoration: underline;
}
.linkish:hover { color: #A9CBEF; }

/* Buttons and fields */
.btn {
  min-height: 48px; padding: 0 22px; border: 0; border-radius: 14px;
  background: var(--accent); color: #06121F; font: 700 15px var(--body);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--accent-bright); color: #06121F; }
.btn[disabled] { opacity: .6; cursor: default; }
.btn-block { width: 100%; }
.btn-copy { min-height: 46px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; color: var(--text); }
.field input, .field textarea {
  min-height: 46px; padding: 0 12px; width: 100%;
  background: var(--bg); border: 1px solid var(--muted-dim); border-radius: 14px;
  font: 400 16px var(--body); color: var(--ink);
}
.field textarea { padding: 10px 12px; resize: vertical; }
.auth .field input { background: var(--surface); }
.hint { font-size: 13px; color: var(--muted); }
.choice { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.choice legend { padding: 0; margin-bottom: 8px; font-size: 14px; font-weight: 600; color: var(--text); }
.choice label { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--text-soft); cursor: pointer; }
.choice input { width: 20px; height: 20px; margin: 0; flex: 0 0 20px; accent-color: var(--accent); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-soft); }
.check input { width: 20px; height: 20px; margin: 1px 0 0; flex: 0 0 20px; accent-color: var(--accent); }

.msg { font-size: 14px; border-radius: 12px; padding: 10px 12px; }
.msg-error { color: #F6C9C9; background: rgba(230, 140, 140, .12); border: 1px solid rgba(230, 140, 140, .45); }
.msg-ok { color: #BFEBD6; background: rgba(116, 210, 164, .12); border: 1px solid rgba(116, 210, 164, .45); }
.msg-note { color: var(--text); background: rgba(91, 151, 214, .14); border: 1px solid rgba(91, 151, 214, .45); }

/* Sign in and status cards */
.auth {
  max-width: 480px; margin: 0 auto; padding: 40px 24px 56px;
  display: flex; flex-direction: column; gap: 14px;
}
.auth .brand-name { font-size: 16px; }
.auth h1 { font-family: var(--display); font-weight: 700; font-size: 28px; line-height: 1.2; }
.auth-head { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.auth-head p, .auth p.lead { color: var(--text-soft); }
.auth form { display: flex; flex-direction: column; gap: 14px; }
.auth .center { align-self: center; text-align: center; }
.auth .small { font-size: 14px; color: var(--muted); text-align: center; }
.auth .small a, .auth a.strong { font-weight: 600; }
.tick {
  width: 48px; height: 48px; margin-top: 10px; border-radius: 999px;
  background: rgba(116, 210, 164, .14); color: var(--green);
  display: flex; align-items: center; justify-content: center;
}

/* Dashboard */
.dash { max-width: 1120px; margin: 0 auto; padding: 32px 24px 56px; display: flex; flex-direction: column; gap: 24px; }
.dash-head { display: flex; flex-direction: column; gap: 6px; }
.dash-head h1 { font-family: var(--display); font-weight: 700; font-size: 30px; line-height: 1.2; }
.dash-head p { color: var(--text-soft); max-width: 640px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 24px; }
.card h2.label { font-size: 14px; font-weight: 600; color: var(--muted); }
.card h2.title { font-family: var(--display); font-weight: 700; font-size: 20px; }
.card h2.side { font-size: 16px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-lg { display: flex; flex-direction: column; gap: 20px; }

.link-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.link-box {
  flex: 1 1 320px; min-width: 0;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 15px; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px;
  overflow-wrap: anywhere;
}
.link-kind { font-size: 13px; font-weight: 600; color: var(--text); }
.note { font-size: 14px; color: var(--muted); }
.fine { font-size: 13px; color: var(--muted); }

.tiles { display: flex; flex-wrap: wrap; gap: 16px; }
.tile { flex: 1 1 200px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 20px; }
.tile-k { font-size: 13px; font-weight: 600; color: var(--muted); }
.tile-v { font-family: var(--display); font-weight: 700; font-size: 34px; line-height: 1.3; }
.tile-s { font-size: 13px; color: var(--muted); }
.tile-gold { background: var(--surface-2); border-color: rgba(232, 163, 61, .4); }
.tile-gold .tile-k, .tile-gold .tile-s { color: var(--text); }
.tile-gold .tile-v { color: var(--gold); }

.rewards-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.rewards-head span { font-size: 14px; color: var(--text-soft); }
.bar { height: 10px; background: var(--border); border-radius: 999px; overflow: hidden; }
.bar-fill { width: 0; height: 10px; background: var(--gold); border-radius: 999px; }
.ladder { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 12px; }
.rung {
  flex: 1 1 130px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 4px;
}
.rung-n { font-family: var(--display); font-weight: 700; font-size: 20px; }
.rung-t { font-size: 13px; color: var(--text); }
.rung.earned { border-color: rgba(116, 210, 164, .5); }
.rung.next { border-color: rgba(232, 163, 61, .5); }
.pill { align-self: flex-start; font-size: 11px; font-weight: 600; border-radius: 999px; padding: 2px 8px; }
.pill-green { color: var(--green); background: rgba(116, 210, 164, .14); }
.pill-gold { color: var(--gold); background: rgba(232, 163, 61, .12); }
.pill-blue { color: var(--accent-bright); background: rgba(91, 151, 214, .14); }
.pill-grey { color: var(--text); background: var(--border); }
.pill-md { font-size: 12px; padding: 3px 10px; }

.split { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px; }
.split-main { flex: 999 1 560px; min-width: 0; }
.split-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.split-side .card { padding: 20px; }
.split-side ul { margin: 0; padding-left: 18px; font-size: 14px; color: var(--text-soft); display: flex; flex-direction: column; gap: 6px; }
.split-side p { font-size: 14px; color: var(--text-soft); }

.buckets { display: flex; flex-wrap: wrap; gap: 12px; }
.bucket { flex: 1 1 160px; background: var(--surface-2); border-radius: 14px; padding: 14px 16px; }
.bucket-k { font-size: 13px; font-weight: 600; }
.bucket-k.gold { color: var(--gold); }
.bucket-k.blue { color: var(--accent-bright); }
.bucket-k.grey { color: var(--text); }
.bucket-v { font-family: var(--display); font-weight: 700; font-size: 24px; }
.bucket-s { font-size: 13px; color: var(--text-soft); }

.table-wrap { overflow-x: auto; }
table.months { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 14px; color: var(--text); }
table.months th {
  text-align: left; color: var(--muted); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 10px 12px; border-bottom: 1px solid var(--border);
}
table.months td { padding: 14px 12px; border-bottom: 1px solid var(--row); }
table.months th:first-child, table.months td:first-child { padding-left: 0; }
table.months th:last-child, table.months td:last-child { padding-right: 0; }
table.months tr:last-child td { border-bottom: 0; }
table.months td.amt { font-weight: 600; color: var(--ink); }
.empty { font-size: 14px; color: var(--text-soft); background: var(--surface-2); border-radius: 14px; padding: 14px 16px; }

.foot { font-size: 14px; color: var(--muted); }

/* Apply page */
.apply { max-width: 1120px; margin: 0 auto; padding: 48px 24px 64px; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px; }
.apply-copy { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.apply-copy h1 { font-family: var(--display); font-weight: 800; font-size: 44px; line-height: 1.12; }
.apply-copy .lede { font-size: 18px; color: var(--text-soft); max-width: 560px; margin-top: 14px; }
.apply-copy h2 { font-family: var(--display); font-weight: 700; font-size: 22px; }
.facts { display: flex; flex-wrap: wrap; gap: 14px; }
.fact { flex: 1 1 170px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 18px; }
.fact-v { font-family: var(--display); font-weight: 700; font-size: 28px; color: var(--gold); }
.fact-t { font-size: 14px; color: var(--text-soft); }
.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; font-size: 16px; }
.steps .num {
  flex: 0 0 32px; height: 32px; border-radius: 999px; background: rgba(91, 151, 214, .14);
  border: 1px solid var(--accent); color: var(--accent-bright); font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.steps span.soft { color: var(--text-soft); }
.perks { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: 15px; color: var(--text-soft); }
.perks li { flex: 1 1 240px; display: flex; align-items: baseline; gap: 10px; }
.perks strong { flex: 0 0 44px; font-family: var(--display); font-size: 18px; color: var(--gold); }
.group { display: flex; flex-direction: column; gap: 14px; }
.apply-copy .fineprint { font-size: 14px; color: var(--muted); max-width: 560px; }

.apply-form {
  flex: 1 1 380px; min-width: 0; background: var(--surface); border: 1px solid var(--border);
  border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 16px;
}
.apply-form h2 { font-family: var(--display); font-weight: 700; font-size: 22px; }
.apply-form form { display: flex; flex-direction: column; gap: 16px; }
.apply-form .small { font-size: 14px; color: var(--muted); text-align: center; }
.apply-form .small a { font-weight: 600; }
.apply-form p.lead { color: var(--text-soft); }
.signed-as { font-size: 14px; color: var(--text-soft); background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }

/* Terms page */
.terms { max-width: 760px; margin: 0 auto; padding: 40px 24px 64px; display: flex; flex-direction: column; gap: 18px; color: var(--text-soft); font-size: 16px; }
.terms h1 { font-family: var(--display); font-weight: 700; font-size: 32px; line-height: 1.2; color: var(--ink); }
.terms h2 { font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--ink); margin-top: 10px; }
.terms ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.terms table { border-collapse: collapse; width: 100%; font-size: 15px; }
.terms th, .terms td { text-align: left; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--border); }
.terms th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }

@media (max-width: 560px) {
  .brand-name { font-size: 16px; }
  .top-in, .dash, .apply { padding-left: 16px; padding-right: 16px; }
  .dash-head h1 { font-size: 26px; }
  .apply { padding-top: 32px; gap: 28px; }
  .apply-copy h1 { font-size: 34px; }
  .apply-form { padding: 20px; }
  .card { padding: 18px; }
  .tile { flex-basis: 140px; padding: 16px; }
  .tile-v { font-size: 28px; }
  .btn-copy { flex: 1 1 100%; }
  table.months { min-width: 0; font-size: 13px; }
  table.months th, table.months td { padding-left: 6px; padding-right: 6px; }
  table.months th { font-size: 11px; letter-spacing: 0.03em; }
}
