:root {
  color-scheme: dark;
  --bg: #080b0d;
  --surface: #101519;
  --surface-raised: #161d22;
  --line: #28343b;
  --line-bright: #3b4b55;
  --text: #f2f5f6;
  --muted: #9aa8b0;
  --accent: #e1b84b;
  --accent-strong: #f1c857;
  --accent-ink: #181303;
  --safe: #63c79c;
  --danger: #ef7b72;
  --shadow: 0 24px 80px rgb(0 0 0 / 38%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 12%, rgb(225 184 75 / 10%), transparent 26rem),
    linear-gradient(145deg, #090d10, var(--bg) 65%);
}

a { color: inherit; }

.landing-page {
  display: grid;
  place-items: center;
  padding: 4rem clamp(1.25rem, 5vw, 5rem);
}

.landing-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(18rem, .8fr);
  gap: clamp(2rem, 7vw, 7rem);
  width: min(72rem, 100%);
  align-items: center;
}

.eyebrow, .panel-kicker {
  margin: 0 0 .8rem;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .18em;
  text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }

h1 {
  max-width: 12ch;
  margin-bottom: 1.25rem;
  font-size: clamp(3rem, 8vw, 6.8rem);
  font-weight: 720;
  letter-spacing: -.065em;
  line-height: .92;
}

.lede {
  max-width: 38rem;
  color: #c5ced3;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.6;
}

.landing-actions { display: flex; align-items: center; gap: 1rem; margin: 2.2rem 0 1.25rem; }

.text-link { color: var(--muted); font-size: .88rem; font-weight: 650; text-underline-offset: .25rem; }
.text-link:hover { color: var(--text); }

.privacy-note, .subtle {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.55;
}

.privacy-note { max-width: 35rem; }

.button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: .42rem;
  padding: .7rem 1rem;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button-primary {
  color: var(--accent-ink);
  background: var(--accent);
  box-shadow: 0 .6rem 2rem rgb(225 184 75 / 14%);
}

.button-primary:hover { background: var(--accent-strong); }

.button-quiet {
  color: var(--muted);
  border-color: var(--line);
  background: transparent;
}

.button-wide { width: 100%; }

.access-card, .panel {
  border: 1px solid var(--line);
  background: linear-gradient(155deg, rgb(22 29 34 / 96%), rgb(13 18 21 / 96%));
  box-shadow: var(--shadow);
}

.access-card {
  border-radius: .7rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.access-card h2 { font-size: 1.7rem; letter-spacing: -.025em; }

.status-line { color: var(--safe); font-size: .82rem; font-weight: 700; }

.status-dot {
  display: inline-block;
  width: .55rem;
  height: .55rem;
  margin-right: .45rem;
  border-radius: 50%;
  background: var(--safe);
  box-shadow: 0 0 1rem rgb(99 199 156 / 65%);
}

.access-card dl { margin: 2rem 0 0; }

.access-card dl div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding: .9rem 0;
}

.access-card dt { color: var(--muted); }
.access-card dd { margin: 0; font-weight: 650; }

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 4.5rem;
  border-bottom: 1px solid var(--line);
  padding: 0 clamp(1rem, 3vw, 2.5rem);
  background: rgb(8 11 13 / 88%);
  backdrop-filter: blur(18px);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
}

.wordmark-mark {
  border: 1px solid var(--accent);
  padding: .27rem .36rem;
  color: var(--accent);
  font-size: .65rem;
  letter-spacing: .12em;
}

.nav-link {
  display: inline-flex;
  min-height: 4.5rem;
  align-items: center;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: .88rem;
  text-decoration: none;
}

.nav-link-active { border-color: var(--accent); color: var(--text); }
.topbar .button { justify-self: end; }

.dashboard-shell {
  width: min(96rem, 100%);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3.5rem);
}

.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.page-heading h1 {
  max-width: none;
  margin-bottom: .4rem;
  font-size: clamp(2.3rem, 5vw, 4.4rem);
}

.page-heading .subtle { margin-bottom: 0; }

.access-pill {
  border: 1px solid rgb(99 199 156 / 35%);
  border-radius: 100vw;
  padding: .45rem .75rem;
  color: var(--safe);
  background: rgb(99 199 156 / 8%);
  font-size: .78rem;
  font-weight: 700;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(19rem, 25rem);
  gap: 1.2rem;
}

.panel { border-radius: .55rem; overflow: hidden; }

.panel-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding: 1.15rem 1.25rem;
}

.panel-heading h2 { margin: 0; font-size: 1.2rem; }
.panel-kicker { margin-bottom: .35rem; font-size: .62rem; }
.map-count { margin: .2rem 0 0; color: var(--muted); font-size: .78rem; }

.map-frame {
  position: relative;
  min-height: 38rem;
  background:
    linear-gradient(rgb(255 255 255 / 3%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 3%) 1px, transparent 1px),
    #090d10;
  background-size: 40px 40px;
}

#system-map { display: block; width: 100%; height: 38rem; }
.system-point { fill: var(--accent); }
.system-label { fill: #d8e0e4; font-size: 10px; }

.empty-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.planner-panel form { padding: 1.25rem; }

fieldset { margin: 0 0 1rem; border: 0; padding: 0; }
legend, label { color: #c1cbd0; font-size: .78rem; font-weight: 650; }
legend { margin-bottom: .5rem; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-bottom: 1rem; }

label { display: grid; gap: .4rem; }

input {
  width: 100%;
  border: 1px solid var(--line-bright);
  border-radius: .35rem;
  padding: .68rem .7rem;
  color: var(--text);
  background: #0b1013;
  font: inherit;
}

input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.route-result { border-top: 1px solid var(--line); padding: 1.25rem; }
.route-result h3 { margin: 0 0 .8rem; font-size: 1rem; }
.route-summary { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.route-summary div { border: 1px solid var(--line); border-radius: .35rem; padding: .75rem; }
.route-summary strong { display: block; margin-top: .2rem; font-size: 1.15rem; }
.route-leg { border-top: 1px solid var(--line); padding: .7rem 0; color: #cbd3d7; font-size: .82rem; }
.error-text { color: var(--danger); }

.terms-topbar { grid-template-columns: 1fr auto; }

.terms-shell {
  width: min(82rem, 100%);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 5.5rem) clamp(1rem, 4vw, 3rem) 5rem;
}

.terms-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(19rem, .7fr);
  gap: clamp(2rem, 7vw, 7rem);
  align-items: end;
  padding-bottom: clamp(3rem, 7vw, 6rem);
}

.terms-heading { max-width: 47rem; }
.terms-heading h1 {
  max-width: 14ch;
  margin-bottom: 1.5rem;
  font-size: clamp(2.8rem, 5vw, 4.8rem);
}

.terms-note {
  max-width: 42rem;
  margin: 1.7rem 0 0;
  border-left: 2px solid var(--accent);
  padding-left: 1rem;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.65;
}

.publication-card {
  border: 1px solid var(--line-bright);
  border-radius: .7rem;
  padding: 1.4rem;
  background: linear-gradient(150deg, rgb(22 29 34 / 98%), rgb(11 16 19 / 98%));
  box-shadow: var(--shadow);
}

.publication-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.publication-card-topline .panel-kicker { margin: 0; }
.publication-card h2 { margin: 1.3rem 0 .35rem; font-size: 1.45rem; }

.publication-state {
  border: 1px solid rgb(99 199 156 / 38%);
  border-radius: 100vw;
  padding: .35rem .65rem;
  color: var(--safe);
  background: rgb(99 199 156 / 8%);
  font-size: .7rem;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.publication-state-unavailable {
  border-color: rgb(239 123 114 / 38%);
  color: var(--danger);
  background: rgb(239 123 114 / 8%);
}

.publication-status { margin-bottom: 1.2rem; color: var(--muted); font-size: .8rem; }
.publication-version { display: block; color: var(--text); font-size: 1.05rem; }
.publication-change { margin: .5rem 0 1.2rem; color: #c5ced3; font-size: .88rem; line-height: 1.55; }

.publication-facts { display: grid; gap: .7rem; margin: 0; }
.publication-facts div { display: grid; grid-template-columns: 5.5rem 1fr; gap: .7rem; }
.publication-facts dt { color: var(--muted); font-size: .72rem; }
.publication-facts dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-size: .78rem; }

.terms-document {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  border-top: 1px solid var(--line);
}

.terms-navigation {
  align-self: start;
  position: sticky;
  top: 1.5rem;
  padding: 3rem 0;
}

.terms-navigation nav { display: grid; gap: .2rem; }
.terms-navigation nav button {
  width: 100%;
  border-left: 1px solid var(--line);
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  padding: .55rem .75rem;
  color: var(--muted);
  background: transparent;
  font-size: .82rem;
  font-weight: 650;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.terms-navigation nav button:hover,
.terms-navigation nav button.active {
  border-color: var(--accent);
  color: var(--text);
  background: var(--surface);
}

.publication-integrity {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  color: var(--muted);
  font-size: .72rem;
}
.publication-integrity summary { color: #c5ced3; cursor: pointer; font-weight: 700; }
.publication-integrity p { margin: .8rem 0 .3rem; }
.publication-integrity code { display: block; overflow-wrap: anywhere; color: var(--muted); }

.terms-document-section {
  scroll-margin-top: 2rem;
  border-bottom: 1px solid var(--line);
  padding: 3rem 0;
}
.terms-document-section:last-child { border-bottom: 0; }
.terms-document-section h2 {
  margin: 0 0 .55rem;
  font-size: clamp(2rem, 4vw, 3.25rem);
  letter-spacing: -.045em;
}
.terms-section-description { max-width: 43rem; margin-bottom: 1.7rem; color: var(--muted); line-height: 1.55; }

.terms-clause-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
}
.terms-clause {
  border: 1px solid var(--line);
  border-radius: .5rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
}
.terms-clause h3 { margin: 0 0 .6rem; color: var(--accent); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.terms-clause p { margin: 0; color: #c5ced3; font-size: .88rem; line-height: 1.62; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: .5rem; }
table { width: 100%; border-collapse: collapse; }
th, td { border-top: 1px solid var(--line); padding: .7rem 1rem; text-align: left; }
th { color: var(--accent); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; }
td:last-child { font-variant-numeric: tabular-nums; }

.terms-generic-list {
  display: grid;
  gap: .45rem;
  margin: 0;
  padding-left: 1.1rem;
  color: #c5ced3;
  line-height: 1.55;
}
.terms-generic-group { display: grid; gap: 1rem; }
.terms-generic-group section { border-left: 2px solid var(--line); padding-left: 1rem; }
.terms-generic-group h3, .terms-generic-group h4 { margin: 0 0 .5rem; }
.terms-generic-value { margin: 0; color: #c5ced3; line-height: 1.6; }

.guarantee-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.guarantee-grid section { border: 1px solid var(--line); border-radius: .45rem; padding: 1rem; background: var(--surface); }
.guarantee-grid h3 { margin: 0 0 .8rem; font-size: .9rem; }
.guarantee-grid ul { margin: 0; padding-left: 1.05rem; color: #c5ced3; font-size: .85rem; line-height: 1.65; }
.offer-price { color: var(--accent); white-space: nowrap; }
.purchase-category { margin: 1.8rem 0 .8rem; color: var(--text); font-size: 1.08rem; letter-spacing: .025em; }
.purchase-offer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.purchase-offer-grid section { border: 1px solid var(--line); border-radius: .45rem; padding: 1.1rem; background: var(--surface); }
.purchase-offer-grid section > div { display: flex; justify-content: space-between; gap: 1rem; }
.purchase-offer-grid section > div > strong { color: var(--text); font-size: .96rem; line-height: 1.4; }
.purchase-offer-grid p, .purchase-offer-grid small { display: block; margin: .6rem 0 0; color: #aebbc2; line-height: 1.55; }
.offer-price-stack { display: grid; justify-items: end; min-width: max-content; }
.offer-price-stack strong { font-size: 1rem; }
.offer-price-stack small { margin-top: .18rem !important; font-size: .78rem; }
.purchase-offer-facts { justify-content: flex-start !important; flex-wrap: wrap; margin-top: .85rem; color: #bac5ca; font-size: .82rem; }
.purchase-offer-facts span { padding-right: .8rem; border-right: 1px solid var(--line); }
.purchase-offer-facts span:last-child { border-right: 0; }
.terms-footnote {
  margin-left: calc(13rem + clamp(2rem, 6vw, 5rem));
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.6;
}
.terms-footnote strong { color: #c5ced3; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 850px) {
  .landing-shell, .dashboard-grid { grid-template-columns: 1fr; }
  .terms-hero, .terms-document { grid-template-columns: 1fr; }
  .terms-navigation { position: static; padding: 2rem 0 0; }
  .terms-navigation nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .publication-integrity { display: none; }
  .terms-footnote { margin-left: 0; }
  .guarantee-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .purchase-offer-grid { grid-template-columns: 1fr; }
  .landing-page { place-items: start; }
  .topbar { grid-template-columns: 1fr auto; }
  .topbar nav { display: none; }
  .map-frame, #system-map { min-height: 28rem; height: 28rem; }
}

@media (max-width: 520px) {
  .landing-page { padding: 2rem 1rem; }
  .access-card dl div, .field-row { grid-template-columns: 1fr; }
  .landing-actions { align-items: stretch; flex-direction: column; }
  .terms-clause-grid, .terms-navigation nav { grid-template-columns: 1fr; }
  .guarantee-grid { grid-template-columns: 1fr; }
  .page-heading { align-items: start; flex-direction: column; }
  .wordmark > span:last-child { display: none; }
  .publication-facts div { grid-template-columns: 1fr; gap: .2rem; }
}

/* The console-access table carries one column per section, so it can outgrow a narrow
   window. It scrolls inside its own box rather than making the whole page scroll sideways. */
.table-scroll { overflow-x: auto; }
.table-scroll select {
    background: var(--surface); color: inherit; font: inherit;
    border: 1px solid var(--line); border-radius: .3rem; padding: .35rem .5rem;
}
.table-scroll select:disabled { opacity: .6; }

.api-access-shell { max-width: 82rem; }
.api-access-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(20rem, .7fr); gap: 1.25rem; }
.contribution-panel .panel-content { padding: 1.4rem; color: #c5ced3; line-height: 1.55; }
.contribution-panel form { display: grid; gap: 1rem; margin-top: 1.4rem; }
.contribution-panel select {
  min-height: 2.75rem;
  border: 1px solid var(--line-bright);
  border-radius: .35rem;
  padding: .65rem .75rem;
  color: var(--text);
  background: #0a0f12;
  font: inherit;
}
.scope-summary, .contribution-status {
  border-left: 3px solid var(--accent);
  padding: .8rem 1rem;
  color: var(--muted);
  background: rgb(225 184 75 / 7%);
  font-size: .88rem;
}
.contribution-status-error { border-color: var(--danger); color: var(--danger); background: rgb(239 123 114 / 8%); }
.contribution-record { display: grid; grid-template-columns: 1fr auto; gap: .3rem 1rem; border-bottom: 1px solid var(--line); padding: .9rem 0; }
.contribution-record:first-child { padding-top: 0; }
.contribution-record small { grid-column: 1 / -1; color: var(--muted); }
.credential-health { color: var(--muted); font-size: .72rem; font-weight: 750; text-transform: uppercase; }
.credential-health-healthy { color: var(--safe); }
.credential-health-revoked, .credential-health-invalid { color: var(--danger); }
@media (max-width: 760px) { .api-access-grid { grid-template-columns: 1fr; } }

/*
 * Console theme.
 *
 * The hosted pages (landing, overview, contractor terms, API access) were built on their
 * own design system, so following "My API Access" out of the console felt like arriving on
 * a different site. They cannot simply load the console's stylesheet: the console admits
 * only FULL sessions, and these pages also serve LIMITED and READ_ONLY members, who would
 * get an unstyled page. So the console's look is restated here, over the same variables.
 * Values mirror ui/static/style.css; change them together.
 */
:root {
  --bg: #0a0b10;
  --surface: #0f1520;
  --surface-raised: #161f30;
  --line: #1a3060;
  --line-bright: #2a4a80;
  --text: #e8eef8;
  --muted: #7aaad8;
  --accent: #ffd700;
  --accent-strong: #ffe44d;
  --accent-ink: #0a0b10;
  --safe: #4ade80;
  --danger: #ff2a2a;
  --console-blue: #4096ff;
  font-family: 'Share Tech Mono', 'JetBrains Mono', 'Courier New', monospace;
}

body {
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(26, 48, 96, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 48, 96, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
}

h1 {
  max-width: none;
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 400;
  letter-spacing: .14em;
  line-height: 1.15;
  text-transform: uppercase;
}

.page-heading h1 { font-size: 1.25rem; letter-spacing: .2em; }

h2, .panel-heading h2 {
  color: var(--accent);
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.eyebrow, .panel-kicker {
  color: var(--console-blue);
  font-weight: 400;
  letter-spacing: .2em;
}

.lede { color: var(--muted); }

.button {
  border-radius: 0;
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.button-primary {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(255, 215, 0, 0.06);
  box-shadow: none;
}

.button-primary:hover { color: var(--accent-ink); background: var(--accent); }

.topbar { background: rgba(10, 11, 16, 0.92); }

.nav-link { letter-spacing: .14em; text-transform: uppercase; font-size: .72rem; }

.panel { border-radius: 0; border: 1px solid var(--line); background: var(--surface); }

/* The console uses square corners throughout, including inputs and badges. */
select, input, textarea, .access-pill { border-radius: 0; }

.choice-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.manual-sign-in-link { display: block; width: 100%; margin-top: 6px; font-family: monospace; }
