:root {
  --navy: #011a47;
  --navy-2: #082d47;
  --navy-3: #12485b;
  --teal: #1292a0;
  --deep-teal: #006d68;
  --mint: #a7dadd;
  --mint-soft: #e5f3f2;
  --paper: #f7f6f0;
  --paper-2: #efeee6;
  --white: #fffefa;
  --ink: #102a36;
  --muted: #627477;
  --line: #d6ded9;
  --line-strong: #bdcbc5;
  --red: #b34a3c;
  --red-soft: #f9e7e3;
  --amber: #a76518;
  --amber-soft: #f8ecd8;
  --green: #28735f;
  --green-soft: #dfeee7;
  --blue-soft: #e5eef6;
  --shadow: 0 22px 70px rgba(1, 26, 71, .12);
  --shadow-small: 0 10px 30px rgba(1, 26, 71, .08);
  --radius: 16px;
  --sidebar: 246px;
  --font-body: "Avenir Next", "Source Han Sans SC", "PingFang SC", sans-serif;
  --font-display: "Songti SC", "STSong", "Noto Serif CJK SC", "Iowan Old Style", Baskerville, Georgia, serif;
  --font-mono: "SFMono-Regular", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(1, 26, 71, .022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(1, 26, 71, .022) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px, 32px 32px, auto;
  font-family: var(--font-body);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.boot-screen {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 20px;
  color: var(--muted);
  background:
    radial-gradient(circle at 50% 40%, rgba(18, 146, 160, .11), transparent 34%),
    var(--paper);
}
.brand-plate {
  display: grid;
  place-items: center;
  width: 238px;
  min-height: 58px;
  padding: 10px 14px;
  border: 1px solid rgba(167, 218, 221, .8);
  background: rgba(255, 254, 250, .96);
}
.brand-plate img { display: block; width: 100%; height: auto; }
.boot-line { width: 238px; height: 2px; overflow: hidden; background: rgba(1, 26, 71, .08); }
.boot-line span { display: block; width: 45%; height: 100%; background: var(--teal); animation: boot 1.3s ease-in-out infinite; }
.boot-screen p { margin: 0; font-size: 11px; letter-spacing: .08em; }

@keyframes boot { from { transform: translateX(-120%); } to { transform: translateX(260%); } }
@keyframes reveal { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes hero-enter { from { transform: translateY(10px); } to { transform: none; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes trace { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Public portal */
.public-shell { min-height: 100vh; background: var(--paper); }
.public-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(22px, 5vw, 72px);
  border-bottom: 1px solid rgba(167, 218, 221, .16);
  background: rgba(1, 26, 71, .91);
  backdrop-filter: blur(18px);
  color: var(--white);
}
.public-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.public-brand .brand-plate { width: 198px; min-height: 47px; padding: 7px 10px; }
.public-header .brand-plate {
  border-color: transparent;
  background: transparent;
}
.public-header .brand-plate img { filter: brightness(0) invert(1); }
.brand-product { border-left: 1px solid rgba(255,255,255,.2); padding-left: 14px; }
.brand-product strong { display: block; font-size: 12px; letter-spacing: .08em; }
.brand-product small { display: block; margin-top: 3px; color: var(--mint); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.public-nav { display: flex; align-items: center; gap: 18px; }
.public-nav a { position: relative; color: rgba(255,255,255,.72); font-size: 12px; font-weight: 600; white-space: nowrap; }
.public-nav a:hover { color: var(--white); }
.public-nav a::after { content: ""; position: absolute; right: 0; bottom: -7px; left: 0; height: 1px; background: var(--mint); transform: scaleX(0); transform-origin: center; transition: transform .2s ease; }
.public-nav a.active { color: var(--white); }
.public-nav a.active::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 9px; }
.lang-switch {
  min-width: 52px;
  min-height: 38px;
  border: 1px solid rgba(255,255,255,.25);
  background: transparent;
  color: var(--white);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}
.public-hero {
  min-height: max(760px, 100svh);
  display: grid;
  align-items: center;
  padding: 142px clamp(24px, 7vw, 110px) 82px;
  color: var(--white);
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 18%, rgba(18, 146, 160, .26), transparent 30%),
    linear-gradient(135deg, rgba(1,26,71,.995), rgba(4,55,68,.98));
}
.public-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.032) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to right, transparent, black 38%, black);
}
.public-hero::after {
  content: "";
  position: absolute;
  width: min(48vw, 680px);
  aspect-ratio: 1;
  right: -13vw;
  bottom: -36%;
  border: 1px solid rgba(167,218,221,.22);
  border-radius: 50%;
  box-shadow: 0 0 0 75px rgba(167,218,221,.028), 0 0 0 150px rgba(167,218,221,.018);
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr); gap: clamp(60px, 8vw, 130px); align-items: center; }
.hero-copy { max-width: 780px; }
.eyebrow { margin: 0 0 20px; color: var(--mint); font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.hero-copy h1 { margin: 0; font-family: var(--font-display); font-size: clamp(48px, 6.2vw, 88px); font-weight: 500; line-height: 1.08; letter-spacing: -.045em; text-wrap: balance; }
.hero-copy h1 em { color: #a7ded4; font-style: normal; }
.hero-lede { max-width: 670px; margin: 28px 0 0; color: #c4d7d8; font-size: 17px; line-height: 1.9; text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.trust-line { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 38px; color: rgba(255,255,255,.54); font-size: 11px; }
.trust-line span { display: flex; align-items: center; gap: 8px; }
.trust-line span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--mint); }

.route-panel { position: relative; min-height: 470px; padding: 34px 28px; border: 1px solid rgba(167,218,221,.24); background: rgba(255,255,255,.055); backdrop-filter: blur(12px); }
.route-panel-head { display: flex; justify-content: space-between; gap: 14px; padding-bottom: 24px; border-bottom: 1px solid rgba(255,255,255,.1); }
.route-panel-head span { color: var(--mint); font-family: var(--font-mono); font-size: 10px; letter-spacing: .13em; }
.route-panel-head strong { font-family: var(--font-display); font-size: 19px; font-weight: 500; }
.route-path { position: relative; display: grid; gap: 26px; margin-top: 31px; }
.route-path::before { content: ""; position: absolute; left: 11px; top: 13px; bottom: 13px; width: 1px; background: rgba(167,218,221,.34); }
.route-step { display: grid; grid-template-columns: 24px 1fr auto; gap: 15px; align-items: start; position: relative; }
.route-step i { width: 23px; height: 23px; display: grid; place-items: center; border: 1px solid var(--mint); border-radius: 50%; background: var(--navy-2); color: var(--mint); font-family: var(--font-mono); font-size: 8px; font-style: normal; }
.route-step strong { display: block; font-size: 13px; }
.route-step p { margin: 5px 0 0; color: rgba(255,255,255,.55); font-size: 11px; line-height: 1.55; }
.route-step small { color: var(--mint); font-family: var(--font-mono); font-size: 9px; }
.route-lock { margin-top: 28px; padding: 17px 18px; background: rgba(167,218,221,.09); color: #cfe6e4; font-size: 11px; line-height: 1.65; }

.public-hero, .public-section, .economy-band { scroll-margin-top: 76px; }
.public-section { padding: 96px clamp(24px, 7vw, 110px); }
.public-section.alt { background: var(--white); border-block: 1px solid var(--line); }
.section-head { max-width: 790px; margin-bottom: 48px; }
.section-kicker { color: var(--teal); font-size: 10px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.section-head h2 { margin: 12px 0 0; color: var(--navy); font-family: var(--font-display); font-size: clamp(35px, 4.4vw, 58px); font-weight: 500; line-height: 1.16; letter-spacing: -.035em; text-wrap: balance; }
.section-head p { margin: 19px 0 0; color: var(--muted); font-size: 16px; line-height: 1.8; text-wrap: pretty; }
.value-section { position: relative; overflow: hidden; background: var(--paper); }
.value-intro { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(310px, .62fr); gap: clamp(54px, 8vw, 120px); align-items: end; }
.value-intro .section-head { max-width: 860px; margin-bottom: 0; }
.audience-note { padding-top: 24px; border-top: 2px solid var(--navy); }
.audience-note > span { color: var(--teal); font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.audience-list { display: grid; margin-top: 16px; }
.audience-list strong { position: relative; padding: 13px 0 13px 18px; border-top: 1px solid var(--line); color: var(--navy); font-size: 12px; font-weight: 650; line-height: 1.6; }
.audience-list strong::before { content: ""; position: absolute; top: 22px; left: 0; width: 7px; height: 1px; background: var(--teal); }
.value-exchange { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 62px; border: 1px solid var(--line-strong); background: var(--white); }
.value-stage { min-height: 350px; display: flex; flex-direction: column; padding: clamp(28px, 3.4vw, 46px); }
.value-stage + .value-stage { border-left: 1px solid var(--line-strong); }
.value-stage:nth-child(2) { color: var(--white); background: var(--navy); }
.value-stage:nth-child(3) { background: var(--mint-soft); }
.value-number { color: var(--teal); font-family: var(--font-mono); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.value-stage:nth-child(2) .value-number { color: var(--mint); }
.value-stage h3 { margin: 42px 0 16px; color: var(--navy); font-family: var(--font-display); font-size: clamp(27px, 2.5vw, 36px); font-weight: 500; line-height: 1.18; letter-spacing: -.025em; }
.value-stage:nth-child(2) h3 { color: var(--white); }
.value-stage p { margin: 0; color: var(--muted); line-height: 1.8; text-wrap: pretty; }
.value-stage:nth-child(2) p { color: #c4d7d8; }
.value-tags { display: flex; flex-wrap: wrap; gap: 9px 12px; margin-top: auto; padding-top: 32px; }
.value-tags span { padding-right: 12px; border-right: 1px solid var(--line-strong); color: var(--deep-teal); font-size: 10px; font-weight: 750; letter-spacing: .04em; }
.value-tags span:last-child { padding-right: 0; border-right: 0; }
.value-stage:nth-child(2) .value-tags span { border-color: rgba(255,255,255,.2); color: var(--mint); }
.value-promise { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(35px, 7vw, 100px); align-items: center; margin-top: 24px; padding: clamp(28px, 4vw, 52px); color: var(--white); background: var(--deep-teal); }
.value-promise strong { font-family: var(--font-display); font-size: clamp(28px, 3.3vw, 45px); font-weight: 500; line-height: 1.2; letter-spacing: -.025em; text-wrap: balance; }
.value-promise p { margin: 0; color: #c7ded9; font-size: 15px; line-height: 1.8; text-wrap: pretty; }
.process-grid { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line-strong); }
.process-item { position: relative; min-height: 250px; padding: 26px 24px 24px 0; border-right: 1px solid var(--line); }
.process-item:last-child { border-right: 0; padding-right: 0; }
.process-number { color: var(--teal); font-family: var(--font-mono); font-size: 10px; letter-spacing: .13em; }
.process-item h3 { margin: 42px 0 12px; color: var(--navy); font-family: var(--font-display); font-size: 24px; font-weight: 500; }
.process-item p { margin: 0; padding-right: 24px; color: var(--muted); line-height: 1.75; }
.process-item::before { content: ""; position: absolute; width: 9px; height: 9px; top: -5px; left: 0; border-radius: 50%; background: var(--white); border: 2px solid var(--teal); }
.process-item::after { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--teal); transform-origin: left; animation: trace .8s both; }
.boundary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line-strong); }
.boundary-col { padding: clamp(28px, 4vw, 52px); }
.boundary-col + .boundary-col { border-left: 1px solid var(--line-strong); background: var(--navy); color: var(--white); }
.boundary-col h3 { margin: 0 0 28px; font-family: var(--font-display); font-size: 28px; font-weight: 500; }
.boundary-list { display: grid; gap: 0; }
.boundary-row { display: grid; grid-template-columns: 24px 1fr; gap: 13px; padding: 15px 0; border-top: 1px solid var(--line); line-height: 1.65; }
.boundary-col + .boundary-col .boundary-row { border-color: rgba(255,255,255,.12); color: #cedbdc; }
.boundary-mark { color: var(--teal); font-family: var(--font-mono); font-size: 12px; }
.boundary-col + .boundary-col .boundary-mark { color: #e5aa80; }
.economy-band { padding: 50px clamp(24px, 7vw, 110px); color: var(--white); background: var(--deep-teal); }
.economy-grid { display: grid; grid-template-columns: 1.1fr repeat(3, .65fr); gap: 30px; align-items: center; }
.economy-grid h2 { margin: 0; font-family: var(--font-display); font-size: 32px; font-weight: 500; }
.economy-grid p { margin: 9px 0 0; color: #c7ded9; line-height: 1.65; }
.economy-fact { border-left: 1px solid rgba(255,255,255,.22); padding-left: 24px; }
.economy-fact strong { display: block; font-size: 15px; }
.economy-fact span { display: block; margin-top: 7px; color: #a8cbc5; font-size: 11px; line-height: 1.5; }
.public-cta { padding: 100px clamp(24px, 7vw, 110px); text-align: center; background: var(--paper); }
.public-cta .section-kicker { display: block; margin-bottom: 18px; }
.public-cta h2 { max-width: 900px; margin: 0 auto; color: var(--navy); font-family: var(--font-display); font-size: clamp(38px, 5vw, 66px); font-weight: 500; line-height: 1.16; letter-spacing: -.04em; }
.public-cta p { max-width: 700px; margin: 22px auto 30px; color: var(--muted); font-size: 16px; line-height: 1.75; }
.public-footer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .8fr); gap: clamp(40px, 7vw, 110px); padding: 42px clamp(24px, 7vw, 110px); border-top: 1px solid var(--line); color: var(--muted); background: var(--white); }
.footer-brand { display: flex; align-items: flex-start; gap: 18px; }
.footer-brand .brand-plate { width: 188px; min-height: 44px; }
.footer-brand p { max-width: 500px; margin: 0; font-size: 11px; line-height: 1.6; }
.footer-summary { max-width: 560px; }
.footer-meta { display: grid; justify-items: end; align-content: start; gap: 10px; text-align: right; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px 18px; font-size: 11px; }
.footer-links a { color: var(--navy-3); font-weight: 650; }
.footer-links a:hover { color: var(--teal); }
.footer-contact { margin-top: 4px; color: var(--navy-3); font-size: 10px; font-style: normal; line-height: 1.65; }
.footer-version { color: var(--muted); font-size: 10px; }

/* Crawlable company and legal pages */
.legal-lang { display: inline-grid; place-items: center; }
.legal-page { padding-top: 76px; background: var(--paper); }
.legal-hero {
  position: relative;
  overflow: hidden;
  min-height: 470px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 92px clamp(24px, 10vw, 150px) 78px;
  color: var(--white);
  background:
    radial-gradient(circle at 82% 14%, rgba(18,146,160,.31), transparent 28%),
    linear-gradient(128deg, #011a47 0%, #073c4a 100%);
}
.legal-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(110deg, transparent 4%, #000 65%); }
.legal-hero > * { position: relative; z-index: 1; }
.legal-breadcrumb { display: flex; gap: 10px; margin-bottom: auto; color: rgba(255,255,255,.58); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.legal-breadcrumb a:hover { color: var(--mint); }
.legal-hero .eyebrow { margin-top: 60px; }
.legal-hero h1 { max-width: 1000px; margin: 0; font-family: var(--font-display); font-size: clamp(45px, 6vw, 80px); font-weight: 500; line-height: 1.08; letter-spacing: -.04em; text-wrap: balance; }
.legal-hero > p:last-child { max-width: 840px; margin: 26px 0 0; color: #c5d9da; font-size: 17px; line-height: 1.85; }
.legal-content { max-width: 1180px; margin: 0 auto; padding: 38px clamp(24px, 6vw, 76px) 110px; }
.legal-section { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: clamp(22px, 5vw, 68px); padding: 58px 0; border-bottom: 1px solid var(--line-strong); }
.legal-index { color: var(--teal); font-family: var(--font-mono); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.legal-section h2 { max-width: 800px; margin: -8px 0 26px; color: var(--navy); font-family: var(--font-display); font-size: clamp(28px, 3.4vw, 43px); font-weight: 500; line-height: 1.2; letter-spacing: -.025em; }
.legal-section p { max-width: 900px; margin: 0 0 17px; color: var(--muted); font-size: 15px; line-height: 1.9; text-wrap: pretty; }
.legal-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 30px 0 0; border-top: 2px solid var(--navy); }
.legal-facts div { min-height: 105px; padding: 20px 20px 18px 0; border-bottom: 1px solid var(--line); }
.legal-facts div:nth-child(odd) { padding-right: 32px; border-right: 1px solid var(--line); }
.legal-facts div:nth-child(even) { padding-left: 32px; }
.legal-facts dt { color: var(--teal); font-size: 9px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.legal-facts dd { margin: 10px 0 0; color: var(--navy); font-size: 14px; font-weight: 650; line-height: 1.65; overflow-wrap: anywhere; }
.legal-list { display: grid; gap: 0; max-width: 930px; margin: 26px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line-strong); }
.legal-list li { position: relative; padding: 17px 12px 17px 32px; border-bottom: 1px solid var(--line); color: var(--ink); line-height: 1.75; }
.legal-list li::before { content: ""; position: absolute; top: 28px; left: 3px; width: 10px; height: 2px; background: var(--teal); }
.legal-notice { max-width: 930px; margin-top: 28px; padding: 20px 22px; border-left: 3px solid var(--teal); color: var(--navy-3); background: var(--mint-soft); font-size: 12px; line-height: 1.8; }
.legal-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.legal-links a { display: inline-flex; align-items: center; justify-content: space-between; gap: 22px; min-width: 230px; padding: 15px 17px; border: 1px solid var(--line-strong); color: var(--navy); background: var(--white); font-size: 12px; font-weight: 750; }
.legal-links a span { color: var(--teal); }
.legal-links a:hover { border-color: var(--teal); }
.legal-footer { border-top: 1px solid var(--line-strong); }
.checkbox-row a { color: var(--deep-teal); font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }
.noscript-public { max-width: 900px; margin: 120px auto 50px; padding: 34px; border: 1px solid var(--line); background: var(--white); }
.noscript-public h1 { color: var(--navy); font-family: var(--font-display); font-size: 40px; font-weight: 500; }
.noscript-public p { color: var(--muted); line-height: 1.8; }
.noscript-public nav { display: flex; flex-wrap: wrap; gap: 12px 20px; color: var(--deep-teal); font-weight: 750; }
.not-found { min-height: 100vh; display: grid; place-content: center; justify-items: start; padding: 30px; background: radial-gradient(circle at 70% 20%, rgba(18,146,160,.14), transparent 28%), var(--paper); }
.not-found > span { color: var(--teal); font-family: var(--font-mono); font-size: 12px; letter-spacing: .18em; }
.not-found h1 { max-width: 680px; margin: 14px 0 0; color: var(--navy); font-family: var(--font-display); font-size: clamp(44px, 7vw, 78px); font-weight: 500; line-height: 1.06; letter-spacing: -.04em; }
.not-found p { margin: 20px 0 28px; color: var(--muted); font-size: 16px; }

/* Buttons and forms */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 11px 17px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--navy);
  color: var(--white);
  font-weight: 750;
  font-size: 12px;
  cursor: pointer;
  transition: transform .16s, background .16s, border-color .16s, opacity .16s;
}
.button:hover { transform: translateY(-1px); background: var(--navy-3); }
.button:disabled { opacity: .45; pointer-events: none; transform: none; }
.button.teal { background: var(--teal); }
.button.teal:hover { background: var(--deep-teal); }
.button.light { color: var(--navy); background: var(--white); }
.button.light:hover { background: var(--mint-soft); }
.button.outline { border-color: var(--line-strong); color: var(--navy); background: transparent; }
.button.outline:hover { border-color: var(--teal); background: var(--mint-soft); }
.button.public-outline { border-color: rgba(255,255,255,.35); color: var(--white); background: transparent; }
.button.public-outline:hover { background: rgba(255,255,255,.08); }
.button.danger { background: var(--red); }
.button.warning { background: var(--amber); }
.button.small { min-height: 32px; padding: 7px 11px; font-size: 10px; border-radius: 6px; }
.button.wide { width: 100%; }
.button.text { min-height: auto; padding: 3px 0; border: 0; color: var(--deep-teal); background: transparent; }
.button.text:hover { transform: none; background: transparent; color: var(--navy); }

.auth-page, .referral-page { min-height: 100vh; padding: 124px clamp(20px, 6vw, 82px) 70px; background: var(--paper); }
.auth-layout, .referral-layout { width: min(1180px, 100%); margin: 0 auto; display: grid; grid-template-columns: minmax(320px, .78fr) minmax(480px, 1.22fr); gap: clamp(40px, 8vw, 110px); align-items: start; }
.auth-story, .referral-story { position: sticky; top: 112px; }
.auth-story h1, .referral-story h1 { margin: 18px 0 0; color: var(--navy); font-family: var(--font-display); font-size: clamp(40px, 5vw, 64px); font-weight: 500; line-height: 1.12; letter-spacing: -.035em; }
.auth-story > p, .referral-story > p { color: var(--muted); font-size: 15px; line-height: 1.8; }
.auth-proof { display: grid; gap: 0; margin-top: 34px; border-top: 1px solid var(--line-strong); }
.auth-proof div { display: grid; grid-template-columns: 32px 1fr; gap: 11px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.auth-proof b { color: var(--teal); font-family: var(--font-mono); font-size: 10px; }
.auth-proof span { color: var(--muted); line-height: 1.6; }
.form-panel { padding: clamp(28px, 5vw, 52px); border: 1px solid var(--line-strong); background: var(--white); box-shadow: var(--shadow); }
.form-panel-head { margin-bottom: 28px; }
.form-panel-head h2 { margin: 0; color: var(--navy); font-family: var(--font-display); font-size: 30px; font-weight: 500; }
.form-panel-head p { margin: 9px 0 0; color: var(--muted); line-height: 1.6; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 7px; }
.field.span-2 { grid-column: span 2; }
.field > span, .field > label { color: var(--navy-3); font-size: 11px; font-weight: 750; }
.field .hint { color: var(--muted); font-size: 10px; font-weight: 400; line-height: 1.5; }
.field > small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.input, .select, .textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  outline: none;
  color: var(--ink);
  background: #fff;
  transition: border-color .16s, box-shadow .16s;
}
.textarea { min-height: 105px; resize: vertical; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(18,146,160,.12); }
.input:disabled, .select:disabled, .textarea:disabled { color: var(--muted); background: var(--paper-2); cursor: not-allowed; }
.input::placeholder, .textarea::placeholder { color: #94a19f; }
.checkbox-row { display: grid; grid-template-columns: 18px 1fr; align-items: start; gap: 10px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.checkbox-row input { margin-top: 3px; accent-color: var(--deep-teal); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.form-message { min-height: 18px; margin: 12px 0 0; color: var(--red); font-size: 11px; }
.form-divider { height: 1px; margin: 24px 0; background: var(--line); }
.switch-copy { margin-top: 22px; color: var(--muted); text-align: center; font-size: 11px; }
.switch-copy button { border: 0; padding: 0; color: var(--deep-teal); background: none; cursor: pointer; font-weight: 800; }
.referral-source { margin: 28px 0; padding: 17px 18px; border: 1px solid var(--mint); background: var(--mint-soft); }
.referral-source span { display: block; color: var(--deep-teal); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.referral-source strong { display: block; margin-top: 6px; color: var(--navy); font-family: var(--font-display); font-size: 18px; }
.privacy-note { margin-top: 20px; padding: 15px 17px; color: var(--muted); background: var(--paper); font-size: 10px; line-height: 1.65; }

/* Authenticated workspaces */
.workspace-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.workspace-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--sidebar);
  padding: 20px 15px 18px;
  display: flex;
  flex-direction: column;
  color: var(--white);
  background:
    linear-gradient(rgba(255,255,255,.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.026) 1px, transparent 1px),
    var(--navy-2);
  background-size: 30px 30px;
}
.side-brand { padding: 4px 6px 19px; border-bottom: 1px solid rgba(255,255,255,.09); }
.side-brand .brand-plate { width: 203px; min-height: 48px; padding: 7px 9px; }
.side-brand .brand-plate {
  border-color: transparent;
  background: transparent;
}
.side-brand .brand-plate img { filter: brightness(0) invert(1); }
.side-brand-name { margin-top: 10px; text-align: center; color: var(--mint); font-size: 9px; letter-spacing: .13em; text-transform: uppercase; }
.side-nav { display: grid; gap: 3px; margin-top: 22px; }
.nav-section { margin: 16px 10px 6px; color: #6f9998; font-size: 8px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.nav-item { position: relative; display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 10px 11px; border: 0; border-radius: 7px; color: #b6cfcd; background: transparent; cursor: pointer; text-align: left; }
.nav-item:hover { color: var(--white); background: rgba(255,255,255,.06); }
.nav-item.active { color: var(--white); background: rgba(167,218,221,.12); }
.nav-item.active::before { content: ""; position: absolute; left: 0; width: 3px; height: 20px; background: var(--mint); border-radius: 0 3px 3px 0; }
.nav-icon { width: 20px; color: #8cb8b3; font-family: var(--font-mono); font-size: 9px; font-weight: 800; }
.nav-label { font-size: 12px; font-weight: 650; }
.side-account { margin-top: auto; padding: 16px 9px 4px; border-top: 1px solid rgba(255,255,255,.1); }
.side-account strong { display: block; font-size: 12px; }
.side-account span { display: block; margin-top: 4px; color: #8eb3af; font-size: 9px; line-height: 1.5; }
.side-account-actions { display: flex; gap: 8px; margin-top: 12px; }
.side-account-actions button { border: 1px solid rgba(255,255,255,.14); padding: 6px 8px; color: #bbcfcc; background: transparent; cursor: pointer; font-size: 9px; }
.side-account-actions button:hover { color: var(--white); border-color: rgba(255,255,255,.3); }
.workspace-main { grid-column: 2; min-width: 0; }
.workspace-topbar { position: sticky; top: 0; z-index: 25; height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(20px, 4vw, 50px); border-bottom: 1px solid rgba(189,203,197,.72); background: rgba(247,246,240,.9); backdrop-filter: blur(16px); }
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mobile-menu { display: none; border: 0; background: none; color: var(--navy); font-size: 24px; cursor: pointer; }
.breadcrumb { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.breadcrumb strong { color: var(--navy); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-button { position: relative; min-width: 38px; min-height: 38px; border: 1px solid var(--line); border-radius: 7px; background: var(--white); cursor: pointer; font-size: 10px; font-weight: 800; }
.topbar-button:hover { border-color: var(--teal); }
.notification-dot { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--paper); border-radius: 999px; color: #fff; background: var(--red); font-size: 8px; }
.workspace-content { padding: clamp(28px, 4vw, 52px); }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 30px; animation: reveal .35s both; }
.page-title h1 { margin: 0; color: var(--navy); font-family: var(--font-display); font-size: clamp(32px, 4vw, 45px); font-weight: 500; letter-spacing: -.03em; }
.page-title p { max-width: 720px; margin: 9px 0 0; color: var(--muted); line-height: 1.65; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.gate-banner { display: grid; grid-template-columns: 1fr auto; gap: 22px; align-items: center; margin-bottom: 24px; padding: 20px 22px; border: 1px solid #dbc08e; background: var(--amber-soft); }
.gate-banner strong { display: block; color: #70420d; }
.gate-banner p { margin: 6px 0 0; color: #80613b; line-height: 1.55; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 26px; }
.metric { min-height: 132px; padding: 20px; border: 1px solid var(--line); background: rgba(255,254,250,.82); }
.metric-label { color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.metric-value { margin-top: 13px; color: var(--navy); font-family: var(--font-display); font-size: 36px; line-height: 1; }
.metric.compact-value .metric-value { font-size: clamp(20px, 2vw, 27px); line-height: 1.18; }
.metric-note { margin-top: 13px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.metric.accent { color: var(--white); border-color: var(--deep-teal); background: var(--deep-teal); }
.metric.accent .metric-label, .metric.accent .metric-note { color: #b8d7d2; }
.metric.accent .metric-value { color: var(--white); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(310px, .75fr); gap: 20px; }
.panel { border: 1px solid var(--line); background: rgba(255,254,250,.88); box-shadow: 0 1px 0 rgba(255,255,255,.7) inset; }
.panel + .panel { margin-top: 20px; }
.panel-head { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; color: var(--navy); font-family: var(--font-display); font-size: 21px; font-weight: 500; }
.panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.panel-body { padding: 20px; }
.stage-track { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.stage-cell { min-height: 106px; padding: 14px 10px; background: var(--paper); border-top: 3px solid var(--line-strong); }
.stage-cell.active { border-top-color: var(--teal); background: var(--mint-soft); }
.stage-cell strong { display: block; color: var(--navy); font-family: var(--font-display); font-size: 24px; }
.stage-cell span { display: block; margin-top: 10px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.activity-list { display: grid; }
.activity-row { display: grid; grid-template-columns: 86px 1fr auto; gap: 14px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.activity-row:last-child { border-bottom: 0; }
.activity-row[data-action="open-notification"] { width: 100%; border-inline: 0; border-top: 0; border-radius: 0; color: inherit; font: inherit; text-align: left; background: transparent; cursor: pointer; appearance: none; }
.activity-row[data-action="open-notification"]:hover { background: var(--paper); }
.activity-row[data-action="open-notification"]:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }
.activity-code { color: var(--deep-teal); font-family: var(--font-mono); font-size: 9px; }
.activity-main strong { display: block; color: var(--navy); }
.activity-main span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.activity-date { color: var(--muted); font-size: 9px; white-space: nowrap; }
.quality-score { display: grid; place-content: center; min-height: 210px; text-align: center; }
.quality-score strong { color: var(--navy); font-family: var(--font-display); font-size: 64px; font-weight: 500; }
.quality-score span { color: var(--muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.quality-score p { max-width: 230px; margin: 14px auto 0; color: var(--muted); font-size: 10px; line-height: 1.55; }

.table-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.filter-group { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-group .input, .filter-group .select { width: auto; min-width: 150px; min-height: 38px; padding: 8px 10px; background: var(--white); font-size: 11px; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; background: rgba(255,254,250,.76); }
.data-table th { padding: 11px 13px; border-block: 1px solid var(--line); color: var(--muted); background: rgba(239,238,230,.66); font-size: 9px; letter-spacing: .07em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 13px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 11px; line-height: 1.45; }
.data-table tbody tr { cursor: pointer; transition: background .14s; }
.data-table tbody tr:hover { background: var(--mint-soft); }
.cell-main { color: var(--navy); font-weight: 750; }
.cell-sub { margin-top: 3px; color: var(--muted); font-size: 9px; }
.mono { font-family: var(--font-mono); font-size: .92em; }
.money { color: var(--navy); font-family: var(--font-mono); font-weight: 750; }
.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--navy-3);
  background: var(--blue-soft);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}
.status.green { color: #1d5e4d; background: var(--green-soft); }
.status.amber { color: #70420d; background: var(--amber-soft); }
.status.red { color: #873328; background: var(--red-soft); }
.status.gray { color: #66716f; background: #e8ebe8; }
.empty-state { min-height: 210px; display: grid; place-content: center; justify-items: center; padding: 40px; color: var(--muted); text-align: center; }
.empty-state strong { color: var(--navy); font-family: var(--font-display); font-size: 22px; font-weight: 500; }
.empty-state p { max-width: 430px; margin: 9px 0 0; line-height: 1.6; }

.link-grid, .content-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.link-card, .content-card { min-height: 260px; display: flex; flex-direction: column; padding: 22px; border: 1px solid var(--line); background: var(--white); }
.link-card-top, .content-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.link-card h3, .content-card h3 { margin: 18px 0 0; color: var(--navy); font-family: var(--font-display); font-size: 23px; font-weight: 500; line-height: 1.25; }
.link-card p, .content-card p { margin: 10px 0 0; color: var(--muted); line-height: 1.65; }
.link-url { margin-top: 18px; padding: 12px; word-break: break-all; color: var(--deep-teal); background: var(--mint-soft); font-family: var(--font-mono); font-size: 9px; line-height: 1.5; }
.link-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 16px; }
.link-metrics div { padding-top: 10px; border-top: 1px solid var(--line); }
.link-metrics strong { display: block; color: var(--navy); font-family: var(--font-display); font-size: 22px; }
.link-metrics span { color: var(--muted); font-size: 9px; }
.card-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; padding-top: 18px; }
.card-actions.compact { flex-wrap: nowrap; margin: 0; padding: 0; }
.card-actions.compact .button { white-space: nowrap; }
.content-card { min-height: 290px; }
.content-type { color: var(--teal); font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.content-version { color: var(--muted); font-family: var(--font-mono); font-size: 9px; }
.content-body { margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--line); color: var(--ink); font-size: 11px; line-height: 1.75; white-space: pre-line; }
.required-mark { color: var(--amber); font-size: 9px; font-weight: 800; }

.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .55fr); gap: 20px; }
.profile-summary { display: grid; gap: 0; }
.profile-row { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.profile-row span { color: var(--muted); font-size: 10px; }
.profile-row strong { color: var(--navy); font-weight: 650; }
.score-bars { display: grid; gap: 16px; }
.score-row { display: grid; grid-template-columns: 88px 1fr 34px; gap: 10px; align-items: center; }
.score-row span { color: var(--muted); font-size: 9px; }
.score-bar { height: 5px; overflow: hidden; background: var(--paper-2); }
.score-bar i { display: block; height: 100%; background: var(--teal); }
.score-row b { color: var(--navy); font-family: var(--font-mono); font-size: 10px; }

/* Modal and feedback */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: rgba(1,18,42,.65); backdrop-filter: blur(7px); }
.modal { width: min(760px, 100%); max-height: calc(100vh - 48px); overflow: auto; border: 1px solid rgba(255,255,255,.35); background: var(--white); box-shadow: 0 30px 100px rgba(0,0,0,.3); animation: modal-in .2s both; }
.modal.wide { width: min(1080px, 100%); }
.modal-head { position: sticky; top: 0; z-index: 3; min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: rgba(255,254,250,.96); backdrop-filter: blur(12px); }
.modal-head h2 { margin: 0; color: var(--navy); font-family: var(--font-display); font-size: 24px; font-weight: 500; }
.modal-close { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; font-size: 18px; }
.modal-body { padding: 24px; }
.modal-section + .modal-section { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.modal-section h3 { margin: 0 0 15px; color: var(--navy); font-family: var(--font-display); font-size: 20px; font-weight: 500; }
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.detail-item { min-height: 72px; padding: 12px; background: var(--paper); }
.detail-item span { display: block; color: var(--muted); font-size: 9px; }
.detail-item strong { display: block; margin-top: 6px; color: var(--navy); line-height: 1.45; }
.timeline { position: relative; display: grid; gap: 0; }
.timeline::before { content: ""; position: absolute; top: 10px; bottom: 18px; left: 5px; width: 1px; background: var(--line-strong); }
.timeline-row { position: relative; display: grid; grid-template-columns: 12px 1fr auto; gap: 12px; padding-bottom: 18px; }
.timeline-dot { width: 11px; height: 11px; margin-top: 4px; border: 2px solid var(--teal); border-radius: 50%; background: var(--white); }
.timeline-main strong { display: block; color: var(--navy); }
.timeline-main p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.timeline-date { color: var(--muted); font-size: 9px; }
.milestone-list { display: grid; gap: 8px; }
.milestone-row { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 12px 13px; border: 1px solid var(--line); }
.milestone-row strong { color: var(--navy); }
.milestone-row span { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.toast-region { position: fixed; top: 84px; right: 22px; z-index: 150; display: grid; gap: 8px; width: min(360px, calc(100vw - 44px)); pointer-events: none; }
.toast { padding: 14px 16px; border: 1px solid var(--mint); color: var(--navy); background: var(--white); box-shadow: var(--shadow-small); line-height: 1.55; animation: modal-in .2s both; }
.toast.error { border-color: #e0a097; color: #7d2c23; background: #fff9f7; }
.notice { padding: 14px 16px; border: 1px solid var(--mint); color: var(--navy-3); background: var(--mint-soft); font-size: 11px; line-height: 1.65; }
.notice.warning { border-color: #dbc08e; color: #70420d; background: var(--amber-soft); }
.notice.danger { border-color: #dda59c; color: #7b3027; background: var(--red-soft); }

.mobile-overlay { display: none; }

@media (max-width: 1360px) {
  .public-header { gap: 16px; padding-inline: 24px; }
  .public-brand .brand-plate { width: 178px; }
  .brand-product small { display: none; }
  .public-nav { gap: 12px; }
}

@media (max-width: 1180px) {
  .public-nav { display: none; }
  .hero-grid { grid-template-columns: 1fr minmax(330px, .65fr); gap: 50px; }
  .process-grid { grid-template-columns: repeat(3, 1fr); }
  .process-item:nth-child(3) { border-right: 0; }
  .process-item:nth-child(n+4) { border-top: 1px solid var(--line); }
  .economy-grid { grid-template-columns: 1fr 1fr; }
  .link-grid, .content-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .stage-track { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 900px) {
  :root { --sidebar: 268px; }
  .public-header { height: 68px; padding-inline: 16px; }
  .public-brand .brand-plate { width: 168px; }
  .brand-product { display: none; }
  .header-actions .button { display: none; }
  .public-hero { min-height: auto; padding: 118px 24px 70px; }
  .hero-grid { grid-template-columns: 1fr; }
  .route-panel { min-height: auto; }
  .value-intro, .value-promise { grid-template-columns: 1fr; }
  .value-exchange { grid-template-columns: 1fr; }
  .value-stage { min-height: auto; }
  .value-stage + .value-stage { border-top: 1px solid var(--line-strong); border-left: 0; }
  .auth-layout, .referral-layout { grid-template-columns: 1fr; }
  .auth-story, .referral-story { position: static; }
  .boundary-grid { grid-template-columns: 1fr; }
  .boundary-col + .boundary-col { border-left: 0; border-top: 1px solid var(--line-strong); }
  .public-footer { grid-template-columns: 1fr; }
  .footer-meta { justify-items: start; text-align: left; }
  .footer-links { justify-content: flex-start; }
  .legal-page { padding-top: 68px; }
  .legal-hero { min-height: 430px; padding: 64px 24px 58px; }
  .legal-content { padding-inline: 24px; }
  .workspace-shell { display: block; }
  .workspace-sidebar { transform: translateX(-100%); transition: transform .2s; }
  .workspace-shell.sidebar-open .workspace-sidebar { transform: none; }
  .workspace-main { min-width: 0; }
  .mobile-menu { display: block; }
  .mobile-overlay { position: fixed; inset: 0; z-index: 35; background: rgba(1,18,42,.48); }
  .workspace-shell.sidebar-open .mobile-overlay { display: block; }
  .dashboard-grid, .profile-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 13px; }
  .public-header { gap: 10px; }
  .public-brand .brand-plate { width: 144px; min-height: 40px; padding: 6px 8px; }
  .lang-switch { min-width: 44px; min-height: 34px; }
  .hero-copy h1 { font-size: 43px; }
  .hero-lede { font-size: 15px; }
  .trust-line { display: grid; gap: 10px; }
  .route-panel { padding: 25px 19px; }
  .public-section { padding: 70px 20px; }
  .value-intro { gap: 38px; }
  .value-exchange { margin-top: 42px; }
  .value-stage { padding: 30px 24px; }
  .value-stage h3 { margin-top: 28px; }
  .value-promise { gap: 20px; padding: 30px 24px; }
  .process-grid { grid-template-columns: 1fr; border-top: 0; }
  .process-item { min-height: auto; padding: 24px 0; border-top: 1px solid var(--line); border-right: 0; }
  .process-item h3 { margin-top: 24px; }
  .process-item::before { top: -5px; }
  .economy-grid { grid-template-columns: 1fr; }
  .economy-fact { padding: 17px 0 0; border-left: 0; border-top: 1px solid rgba(255,255,255,.2); }
  .footer-brand { align-items: flex-start; flex-direction: column; }
  .legal-hero { min-height: 420px; }
  .legal-hero .eyebrow { margin-top: 44px; }
  .legal-hero > p:last-child { font-size: 15px; }
  .legal-content { padding: 22px 20px 80px; }
  .legal-section { grid-template-columns: 1fr; gap: 18px; padding: 42px 0; }
  .legal-section h2 { margin-top: 0; }
  .legal-facts { grid-template-columns: 1fr; }
  .legal-facts div, .legal-facts div:nth-child(odd), .legal-facts div:nth-child(even) { min-height: 0; padding: 17px 0; border-right: 0; }
  .legal-links { display: grid; }
  .legal-links a { min-width: 0; }
  .auth-page, .referral-page { padding: 98px 16px 45px; }
  .form-panel { padding: 23px 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .field.span-2 { grid-column: auto; }
  .workspace-content { padding: 24px 14px; }
  .workspace-topbar { padding-inline: 13px; }
  .page-head { align-items: stretch; flex-direction: column; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .metric { min-height: 112px; padding: 15px; }
  .metric-value { font-size: 29px; }
  .stage-track { display: flex; overflow-x: auto; }
  .stage-cell { min-width: 112px; }
  .link-grid, .content-grid { grid-template-columns: 1fr; }
  .link-card, .content-card { min-height: auto; }
  .panel-head { align-items: flex-start; flex-direction: column; }
  .activity-row { grid-template-columns: 74px 1fr; }
  .activity-date { grid-column: 2; }
  .gate-banner { grid-template-columns: 1fr; }
  .profile-row { grid-template-columns: 105px 1fr; }
  .modal-backdrop { padding: 0; place-items: end center; }
  .modal, .modal.wide { width: 100%; max-height: 94vh; border-radius: 16px 16px 0 0; }
  .modal-body { padding: 18px 15px 28px; }
  .detail-grid { grid-template-columns: repeat(2, 1fr); }
  .milestone-row { grid-template-columns: 1fr auto; }
  .milestone-row .status { grid-column: 1 / -1; justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .001ms !important; }
}
