:root {
  --auth-ink: #071f18;
  --auth-forest: #0b2f24;
  --auth-blue: #0b2f24;
  --auth-slate: #44677a;
  --auth-plum: #644e70;
  --auth-brick: #a7463c;
  --auth-ochre: #c49a46;
  --auth-sky: #e9dfca;
  --auth-paper: #fffdf7;
  --auth-white: #fffdf7;
  --auth-orange: #c49a46;
  --auth-mint: #d8bd78;
  --auth-line: #c9c0ad;
  --auth-display: "Bahnschrift SemiCondensed", "Arial Narrow", sans-serif;
  --auth-body: "Segoe UI Variable", "Segoe UI", sans-serif;
  --auth-utility: "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

html { min-height: 100%; font-size: 16px; background: var(--auth-ink); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--auth-ink);
  background:
    radial-gradient(circle at 85% 10%, rgb(196 154 70 / 16%), transparent 28rem),
    linear-gradient(rgb(11 47 36 / 5%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(11 47 36 / 5%) 1px, transparent 1px),
    var(--auth-paper);
  background-size: auto, 42px 42px, 42px 42px, auto;
  font-family: var(--auth-body);
}

a { color: var(--auth-blue); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--auth-orange) !important;
  outline-offset: 3px;
  box-shadow: none !important;
}



.identity-header, .identity-footer, .auth-main {
  width: min(1420px, calc(100% - 48px));
  margin-inline: auto;
}

.identity-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 88px;
  border-bottom: 1px solid var(--auth-line);
}

.identity-brand { display: inline-flex; align-items: center; width: max-content; color: var(--auth-ink); text-decoration: none; }
.identity-lockup { position: relative; display: grid; line-height: 1; padding-bottom: 5px; }
.identity-lockup::after { content: ""; position: absolute; right: 0; bottom: 0; left: 0; height: 3px; background: linear-gradient(90deg, var(--auth-forest) 0 38%, var(--auth-slate) 38% 54%, var(--auth-plum) 54% 69%, var(--auth-brick) 69% 84%, var(--auth-ochre) 84%); }
.identity-brand strong { font-family: var(--auth-display); font-size: 1.38rem; letter-spacing: .14em; }
.identity-brand small { margin-top: 6px; color: var(--auth-brick); font-family: var(--auth-utility); font-size: .58rem; letter-spacing: .25em; }

.identity-context { display: inline-flex; align-items: center; gap: 10px; color: #4f695f; font-family: var(--auth-utility); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; }
.trust-light { width: 8px; height: 8px; border-radius: 50%; background: #13a95b; box-shadow: 0 0 0 5px rgb(19 169 91 / 13%); }

.identity-actions { display: flex; align-items: center; justify-content: end; gap: 18px; }
.identity-actions form { margin: 0; }
.identity-actions a, .identity-actions button { border: 0; padding: 8px 0; color: var(--auth-ink); background: transparent; font-size: .88rem; text-decoration: none; cursor: pointer; }
.identity-actions a:hover, .identity-actions button:hover { color: var(--auth-blue); }
.identity-actions .identity-signin { border: 1px solid var(--auth-ink); padding: 10px 15px; font-weight: 700; }
.identity-actions .identity-signin:hover { color: var(--auth-white); background: var(--auth-ink); }

.auth-main { min-height: calc(100vh - 178px); padding: 64px 0 100px; }

.account-hero { display: grid; grid-template-columns: 1fr minmax(500px, .88fr); gap: clamp(48px, 7vw, 108px); align-items: center; min-height: 650px; }
.auth-eyebrow { margin: 0; color: var(--auth-brick); font-family: var(--auth-utility); font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.account-copy h1 { margin: 21px 0 28px; font-family: var(--auth-display); font-size: clamp(4.8rem, 8.7vw, 8.6rem); font-weight: 770; line-height: .79; letter-spacing: -.045em; text-transform: uppercase; }
.account-deck { max-width: 650px; margin: 0; color: #315247; font-size: clamp(1.08rem, 1.5vw, 1.34rem); line-height: 1.68; }
.account-cta { display: flex; align-items: center; gap: 26px; margin-top: 38px; }
.auth-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 13px 22px; font-weight: 750; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; }
.auth-button:hover { transform: translateY(-2px); }
.auth-button-primary { color: var(--auth-white); background: var(--auth-forest); box-shadow: 6px 6px 0 var(--auth-ochre); }
.auth-button-primary:hover { color: var(--auth-white); box-shadow: 3px 3px 0 var(--auth-ochre); }
.auth-text-link { color: var(--auth-ink); font-weight: 700; text-underline-offset: 5px; }

.identity-map { position: relative; min-height: 540px; overflow: hidden; border: 1px solid var(--auth-line); background: var(--auth-white); box-shadow: 14px 14px 0 var(--auth-sky); }
.identity-map::before { content: ""; position: absolute; inset: 0; background: linear-gradient(rgb(11 47 36 / 7%) 1px, transparent 1px), linear-gradient(90deg, rgb(11 47 36 / 7%) 1px, transparent 1px); background-size: 32px 32px; mask-image: linear-gradient(to bottom right, black, transparent 78%); }
.map-caption { position: absolute; top: 18px; left: 20px; color: #63758b; font-family: var(--auth-utility); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; }
.map-orbit { position: absolute; border: 1px solid var(--auth-line); border-radius: 50%; }
.map-orbit-one { inset: 96px 110px; }
.map-orbit-two { inset: 54px 60px; border-style: dashed; }
.identity-core { position: absolute; left: 50%; top: 50%; display: grid; width: 150px; height: 150px; place-items: center; border-radius: 50%; color: var(--auth-white); background: var(--auth-forest); box-shadow: 0 0 0 12px var(--auth-white), 0 0 0 13px var(--auth-ochre); transform: translate(-50%, -50%); }
.identity-core span { position: absolute; top: 23px; color: var(--auth-mint); font-family: var(--auth-display); font-size: 2rem; font-weight: 800; }
.identity-core strong { margin-top: 20px; font-family: var(--auth-display); font-size: 2rem; text-transform: uppercase; }
.identity-core small { position: absolute; bottom: 25px; color: rgb(255 255 255 / 58%); font-family: var(--auth-utility); font-size: .55rem; letter-spacing: .12em; text-transform: uppercase; }
.product-node { position: absolute; display: grid; width: 138px; min-height: 96px; border: 1px solid var(--auth-ink); padding: 16px; color: var(--auth-ink); background: var(--auth-white); text-decoration: none; box-shadow: 5px 5px 0 var(--auth-brick); }
.product-node > span { color: var(--auth-brick); font-family: var(--auth-utility); font-size: .55rem; letter-spacing: .1em; text-transform: uppercase; }
.product-node strong { margin-top: 8px; font-family: var(--auth-display); font-size: 1.5rem; text-transform: uppercase; }
.product-node small { color: #63758b; }
/* Four products ring the core: one live, three still to come. Each corner keeps
   its own shadow colour so they read as separate destinations, not a grid. */
.node-idea { top: 82px; right: 46px; }
.node-agents { top: 82px; left: 46px; box-shadow: 5px 5px 0 var(--auth-plum); }
.node-builders { bottom: 76px; left: 45px; box-shadow: 5px 5px 0 var(--auth-slate); }
.node-next { bottom: 76px; right: 45px; box-shadow: 5px 5px 0 var(--auth-ochre); }
/* Only the live product gets the accent eyebrow; the rest stay muted so "Live"
   is the one word that draws the eye. */
.node-agents > span, .node-builders > span, .node-next > span { color: #63758b; }
.map-note { position: absolute; color: #63758b; font-family: var(--auth-utility); font-size: .58rem; letter-spacing: .08em; text-transform: uppercase; }
.note-private { bottom: 28px; right: 27px; }
/* Sits in the gap between the two left-hand nodes, which now occupy the corners
   this note used to have to itself. */
.note-products { top: 50%; left: 22px; writing-mode: vertical-rl; transform: translateY(-50%); }

.identity-promises { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 82px; border-top: 2px solid var(--auth-ink); border-bottom: 1px solid var(--auth-line); }
.identity-promises article { padding: 32px; border-right: 1px solid var(--auth-line); }
.identity-promises article:last-child { border-right: 0; }
.identity-promises span { color: var(--auth-brick); font-family: var(--auth-utility); font-size: .7rem; }
.identity-promises h2 { margin: 18px 0 9px; font-family: var(--auth-display); font-size: 2rem; text-transform: uppercase; }
.identity-promises p { margin: 0; color: #39594f; line-height: 1.6; }

/* Identity UI pages */
.auth-main > h1, .auth-main > h2, .auth-main .row h1, .auth-main .row h2, .auth-main .row h3 {
  font-family: var(--auth-display);
  font-weight: 740;
  letter-spacing: -.02em;
  text-transform: uppercase;
}
.auth-main > h1 { margin-bottom: 10px; font-size: clamp(3.2rem, 6vw, 5.8rem); }
.auth-main > h2 { color: #39594f; font-size: 1.2rem; font-family: var(--auth-body); font-weight: 400; letter-spacing: 0; text-transform: none; }
.auth-main > hr { margin: 28px 0; border-color: var(--auth-line); opacity: 1; }
.auth-main .row { max-width: 1050px; --bs-gutter-x: 48px; }
.auth-main .col-md-4 { width: min(100%, 520px); }
.auth-main .col-md-6 { width: min(100%, 520px); }
.auth-main .row section { border: 1px solid var(--auth-line); padding: 30px; background: var(--auth-white); box-shadow: 8px 8px 0 var(--auth-sky); }
.auth-main .form-control { border: 1px solid var(--auth-line); border-radius: 0; min-height: 52px; background: var(--auth-paper); }
.auth-main .form-control:focus { border-color: var(--auth-forest); box-shadow: 0 0 0 3px rgb(196 154 70 / 20%); }
.auth-main .form-floating > label { color: #4f695f; }
.auth-main .btn { border-radius: 0; min-height: 48px; font-weight: 700; }
.auth-main .btn-primary { border-color: var(--auth-blue); background: var(--auth-blue); box-shadow: 5px 5px 0 var(--auth-ink); }
.auth-main .btn-primary:hover { border-color: var(--auth-ink); background: var(--auth-ink); }
.auth-main .form-check-input { border-radius: 0; }
.auth-main .form-check-input:checked { border-color: var(--auth-blue); background-color: var(--auth-blue); }
.auth-main .text-danger { color: var(--auth-brick) !important; }
.auth-main .nav-pills .nav-link { border-radius: 0; color: var(--auth-ink); }
/* The rule above outranks Bootstrap's own active-link colour, so the selected
   pill has to restate it — otherwise near-black ink sits on the dark fill. */
.auth-main .nav-pills .nav-link.active { color: var(--auth-white); background: var(--auth-blue); }
.auth-main .nav-pills .nav-link.active:hover { color: var(--auth-white); }
.auth-main code { color: #b43e14; }

.account-security-page { max-width: 680px; border: 1px solid var(--auth-line); padding: clamp(26px, 5vw, 48px); background: var(--auth-white); box-shadow: 10px 10px 0 var(--auth-sky); }
.account-security-page h1 { margin: 16px 0 14px; font-family: var(--auth-display); font-size: clamp(3rem, 7vw, 5.5rem); line-height: .92; text-transform: uppercase; }
.account-security-page > p { color: #39594f; line-height: 1.65; }
.security-form { display: grid; gap: 10px; margin: 28px 0; }
.security-form .auth-button { justify-self: start; margin-top: 8px; border: 0; }
.status-message { border-left: 4px solid var(--auth-ochre); padding: 12px 16px; background: var(--auth-paper); }

.switch-row { display: flex; align-items: start; gap: 13px; margin: 6px 0 4px; cursor: pointer; }
.switch-row input { width: 20px; height: 20px; margin: 3px 0 0; flex: none; accent-color: var(--auth-forest); }
.switch-row input:disabled { cursor: not-allowed; opacity: .62; }
.switch-row span { display: grid; gap: 3px; line-height: 1.45; }
.switch-row strong { font-size: 1.02rem; }
.switch-row small, .method-option small { color: #4f695f; font-size: .87rem; line-height: 1.5; }

.method-choice { display: grid; gap: 14px; margin: 22px 0 4px; border: 1px solid var(--auth-line); padding: 20px 22px; }
.method-choice legend { padding: 0 8px; color: var(--auth-brick); font-family: var(--auth-utility); font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.method-option { display: flex; align-items: start; gap: 13px; cursor: pointer; }
.method-option input { width: 19px; height: 19px; margin: 3px 0 0; flex: none; accent-color: var(--auth-forest); }
.method-option input:disabled { cursor: not-allowed; opacity: .55; }
.method-option span { display: grid; gap: 4px; }
.method-option strong { font-size: 1.02rem; }
.method-option-blocked strong, .method-option-blocked small { color: #6d8177; }
.method-option .auth-text-link { justify-self: start; font-size: .87rem; }

.security-aside { margin-top: 34px; border-top: 1px solid var(--auth-line); padding-top: 24px; }
.security-aside h2 { margin: 0 0 10px; font-family: var(--auth-display); font-size: 1.5rem; letter-spacing: .02em; text-transform: uppercase; }
.security-aside p { margin: 0 0 12px; color: #39594f; line-height: 1.6; }
.security-aside form { margin-top: 10px; }
.setting-hint { margin: 6px 0 0; color: #4f695f; font-size: .9rem; }
.quiet-submit { border: 0; padding: 0; background: none; font: inherit; cursor: pointer; }

.legal-document { margin: 26px 0; border: 1px solid var(--auth-line); padding: 26px 28px; background: var(--auth-paper); }
.legal-document header { border-bottom: 1px solid var(--auth-line); padding-bottom: 14px; margin-bottom: 16px; }
.legal-document h2 { margin: 0 0 6px; font-family: var(--auth-display); font-size: 1.7rem; letter-spacing: .02em; text-transform: uppercase; }
.legal-document-meta { margin: 0; color: #4f695f; font-family: var(--auth-utility); font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; }
.legal-changes { margin: 12px 0 0; border-left: 4px solid var(--auth-ochre); padding: 9px 13px; background: var(--auth-white); }
.legal-body-rendered { max-height: 460px; overflow-y: auto; color: #24413a; line-height: 1.65; }
.legal-body-rendered h2 { margin: 22px 0 8px; font-family: var(--auth-display); font-size: 1.35rem; letter-spacing: .02em; text-transform: uppercase; }
.legal-body-rendered h3 { margin: 18px 0 6px; font-size: 1.02rem; }
.legal-body-rendered p { margin: 0 0 12px; }
.legal-body-rendered ul, .legal-body-rendered ol { margin: 0 0 14px; padding-left: 22px; }
.legal-body-rendered li { margin-bottom: 6px; }
.legal-body-rendered a { color: var(--auth-blue); }
.legal-public .legal-body-rendered { max-height: none; }

.legal-admin .legal-scope { margin-top: 30px; border-top: 2px solid var(--auth-ink); padding-top: 18px; }
.legal-admin .legal-scope h2 { margin: 0 0 4px; font-family: var(--auth-display); font-size: 1.5rem; text-transform: uppercase; }
.legal-admin .legal-scope h3 { margin: 16px 0 6px; color: var(--auth-brick); font-family: var(--auth-utility); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; }
.legal-versions { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.legal-versions li { display: grid; grid-template-columns: 92px auto 1fr; align-items: baseline; gap: 4px 12px; border-left: 4px solid var(--auth-line); padding: 9px 13px; background: var(--auth-white); }
.legal-versions .legal-version-state { color: #4f695f; font-family: var(--auth-utility); font-size: .58rem; letter-spacing: .1em; text-transform: uppercase; }
.legal-versions .legal-version-title { color: #24413a; }
.legal-versions .legal-version-meta { grid-column: 2 / -1; color: #4f695f; font-size: .82rem; }
.legal-inforce { border-left-color: var(--auth-forest); }
.legal-inforce .legal-version-state { color: var(--auth-forest); font-weight: 700; }
.legal-scheduled { border-left-color: var(--auth-ochre); }
.legal-scheduled .legal-version-state { color: #8a6a20; font-weight: 700; }
.legal-superseded { opacity: .72; }
.legal-body { font-family: var(--auth-utility); font-size: .82rem; line-height: 1.6; }
.legal-publish-actions { display: flex; gap: 14px; margin-top: 10px; }
.legal-preview { margin-top: 30px; border-top: 2px solid var(--auth-ink); padding-top: 18px; }
.legal-preview h2 { font-family: var(--auth-display); font-size: 1.4rem; text-transform: uppercase; }

.identity-footer { display: flex; align-items: end; justify-content: space-between; border-top: 1px solid var(--auth-line); padding: 28px 0 36px; color: #4f695f; font-size: .78rem; }
.identity-footer div { display: grid; gap: 3px; }
.identity-footer strong { color: var(--auth-ink); }
.identity-footer a { font-weight: 700; text-decoration: none; }

@media (max-width: 980px) {
  .account-hero { grid-template-columns: 1fr; }
  .identity-map { min-height: 500px; }
  .identity-promises { grid-template-columns: 1fr; }
  .identity-promises article { border-right: 0; border-bottom: 1px solid var(--auth-line); }
}

@media (max-width: 720px) {
  .identity-header { grid-template-columns: 1fr auto; }
  .identity-context { display: none; }
  .identity-actions a:first-child { display: none; }
  .account-copy h1 { font-size: clamp(4.2rem, 20vw, 6.7rem); }
  .account-cta { align-items: stretch; flex-direction: column; }
}

@media (max-width: 560px) {
  .identity-header, .identity-footer, .auth-main { width: min(100% - 28px, 1420px); }
  .identity-header { min-height: 74px; }
  .identity-brand strong { font-size: 1.18rem; }
  .auth-main { padding-top: 48px; }
  .account-hero { min-height: 0; }
  /* A phone is too narrow to ring four products around the core without them
     colliding with it, so the orbit becomes an honest stack: identity on top,
     products in a two-up grid beneath it. */
  .identity-map {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    min-height: 0;
    padding: 52px 16px 20px;
    box-shadow: 7px 7px 0 var(--auth-sky);
  }
  .map-orbit { display: none; }
  /* Stays relative so the core's own absolutely-placed "W" and ID label keep
     anchoring to it rather than to the map. */
  .identity-core {
    position: relative;
    grid-column: 1 / -1;
    justify-self: center;
    width: 128px;
    height: 128px;
    margin-bottom: 6px;
    inset: auto;
    transform: none;
  }
  .product-node { position: static; width: auto; min-height: 0; padding: 14px; }
  .map-note { display: none; }
  .identity-footer { align-items: start; flex-direction: column; gap: 15px; }
  .auth-main .row section { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }

}
