:root {
  --black: #020402;
  --ink: #121612;
  --muted: #606b60;
  --line: #dce5dc;
  --soft: #f4f8f4;
  --green: #6ed866;
  --green-dark: #205f1c;
  --green-soft: #e8f9e6;
  --white: #ffffff;
  --danger: #b42318;
  --shadow: 0 22px 60px rgba(2, 4, 2, 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
.hidden { display: none !important; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-header {
  height: 78px;
  padding: 0 clamp(20px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--black); }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  background: var(--black); border-radius: 8px; overflow: hidden; flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}
.brand-mark img { width: 96%; height: 96%; object-fit: contain; display: block; }
.brand-name { font-size: 1.1rem; font-weight: 900; letter-spacing: 0.14em; }
.header-actions { display: flex; align-items: center; gap: 16px; }
.lang-switcher { display: inline-flex; align-items: center; }
.lang-switcher select {
  min-height: 38px;
  min-width: 118px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  font-weight: 750;
  font-size: 0.82rem;
  cursor: pointer;
}
.secure-label { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.875rem; }
.secure-label svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.text-button, .back-link {
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: none;
  color: var(--ink);
  font-weight: 750;
  cursor: pointer;
}
.text-button:hover, .back-link:hover { color: var(--green-dark); }
main { min-height: calc(100vh - 146px); }
.view { display: none; }
.view.active { display: block; }

#welcome-view {
  min-height: calc(100vh - 78px);
  background: linear-gradient(90deg, var(--black) 0, var(--black) 45%, var(--white) 45%, var(--white) 100%);
}
.welcome-grid {
  min-height: calc(100vh - 78px);
  max-width: 1480px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(520px, 1.1fr);
}
.welcome-copy { padding: clamp(64px, 9vw, 130px) clamp(34px, 6vw, 86px) 70px; color: var(--white); }
.eyebrow, .kicker {
  margin: 0 0 10px;
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.welcome-copy .eyebrow { color: var(--green); }
.welcome-copy h1, .dashboard-header h1 {
  margin: 0;
  max-width: 650px;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}
.lead { margin: 26px 0 0; max-width: 570px; color: rgba(255, 255, 255, 0.7); font-size: 1.05rem; line-height: 1.7; }
.trust-list { margin-top: clamp(48px, 8vw, 100px); display: grid; gap: 18px; }
.trust-list > div {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.trust-list > div > span { color: var(--green); font-size: 0.8rem; font-weight: 850; }
.trust-list p { margin: 0; color: rgba(255,255,255,.62); font-size: 0.88rem; }
.trust-list strong { display: block; color: var(--white); font-size: 1rem; margin-bottom: 2px; }
.role-panel { padding: clamp(48px, 7vw, 105px) clamp(28px, 6vw, 90px) 70px; display: flex; flex-direction: column; justify-content: center; }
.panel-label { margin: 0 0 16px; font-weight: 800; }
.reward-prompt { margin: -2px 0 16px; padding: 13px 15px; border-left: 3px solid var(--green); background: var(--green-soft); }
.reward-prompt span { display: block; color: var(--green-dark); font-size: .7rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.reward-prompt strong { display: block; margin-top: 3px; font-size: .9rem; }
.reward-prompt small { display: block; margin-top: 3px; color: var(--muted); font-size: .74rem; }
.role-list { display: grid; gap: 12px; }
.role-card {
  width: 100%;
  min-height: 112px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 17px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.role-card:hover, .role-card:focus-visible { border-color: var(--green); box-shadow: 0 12px 32px rgba(2, 4, 2, 0.08); transform: translateY(-2px); outline: none; }
.role-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 6px; background: var(--green-soft); color: var(--green-dark); }
.role-icon svg { width: 27px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.role-copy strong { display: block; font-size: 1.02rem; }
.role-copy small { display: block; margin-top: 4px; color: var(--muted); font-size: 0.86rem; line-height: 1.45; }
.role-arrow { font-size: 1.35rem; transition: transform 160ms ease; }
.role-card:hover .role-arrow { transform: translateX(3px); }
.privacy-note { margin: 18px 0 0; color: var(--muted); font-size: 0.82rem; }

.saved-account {
  margin-bottom: 26px;
  padding: 16px;
  border: 1px solid #a9dda5;
  border-radius: 8px;
  background: var(--green-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.saved-account > div { display: grid; grid-template-columns: 12px 1fr; column-gap: 8px; }
.saved-account .status-dot { grid-row: 1 / span 3; margin-top: 5px; }
.saved-account .kicker { margin: 0; color: var(--green-dark); }
.saved-account strong, .saved-account span:last-child { grid-column: 2; }
.saved-account span:last-child { color: var(--muted); font-size: 0.82rem; }

.button {
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 850;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}
.button:hover { transform: translateY(-1px); }
.button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(110,216,102,.38); outline-offset: 2px; }
.button-primary { background: var(--green); color: #052003; border-color: var(--green); }
.button-primary:hover { background: #7ee276; }
.button-dark { background: var(--black); color: var(--white); border-color: var(--black); white-space: nowrap; }
.button-secondary { background: var(--white); color: var(--ink); border-color: #aeb9ae; }
.button-full { width: 100%; margin-top: 18px; }

.flow-layout {
  max-width: 1260px;
  margin: 0 auto;
  padding: clamp(38px, 6vw, 78px) clamp(20px, 4vw, 56px) 80px;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: clamp(38px, 7vw, 94px);
  align-items: start;
}
.flow-aside { position: sticky; top: 118px; }
.back-link { margin-bottom: 58px; }
.flow-aside h2, .survey-heading h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.05; letter-spacing: -0.04em; }
.flow-aside > p:not(.eyebrow) { margin: 18px 0 0; color: var(--muted); line-height: 1.7; }
.role-summary { margin-top: 30px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; font-weight: 800; }
.role-summary .role-icon { width: 42px; height: 42px; }
.role-summary .role-icon svg { width: 22px; }
.support-note { margin-top: 30px; padding-left: 16px; border-left: 3px solid var(--green); }
.support-note p { margin: 6px 0 0; color: var(--muted); font-size: 0.9rem; }
.flow-card, .survey-shell { padding: clamp(24px, 4vw, 48px); border: 1px solid var(--line); border-radius: 8px; background: var(--white); box-shadow: var(--shadow); }
.progress-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.progress-header > div { display: grid; gap: 2px; }
.progress-header span { color: var(--muted); font-size: 0.84rem; }
.progress-header strong { font-size: 1.05rem; }
#progress-percent { color: var(--green-dark); font-weight: 850; }
.progress-track { height: 5px; overflow: hidden; border-radius: 99px; background: #e8eee8; }
.progress-header + .progress-track { margin-top: 14px; margin-bottom: 34px; }
.progress-track span { display: block; width: 25%; height: 100%; background: var(--green); transition: width 220ms ease; }

.form-section-heading { margin-bottom: 26px; }
.form-section-heading h3 { margin: 0; font-size: 1.45rem; letter-spacing: -0.02em; }
.form-section-heading p { margin: 7px 0 0; color: var(--muted); }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; }
.field { min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field > label, .field > legend { display: block; margin-bottom: 8px; color: #263026; font-size: 0.88rem; font-weight: 800; }
.field > label span, .field > legend span { color: var(--danger); }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], select, textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 13px;
  border: 1px solid #bcc7bc;
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
}
textarea { min-height: 96px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #879087; }
fieldset { padding: 0; margin: 0; border: 0; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.choice-grid.single { grid-template-columns: 1fr; }
.choice { min-height: 48px; display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid #cbd4cb; border-radius: 6px; background: var(--white); cursor: pointer; font-weight: 650; font-size: 0.9rem; }
.choice:hover { border-color: var(--green); }
.choice:has(input:checked) { border-color: var(--green-dark); background: var(--green-soft); }
.choice input { margin: 3px 0 0; accent-color: var(--green-dark); flex: 0 0 auto; }
.consent-field { padding: 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--soft); }
.consent-field label { display: flex; gap: 11px; align-items: flex-start; font-size: 0.9rem; font-weight: 650; }
.consent-field input { margin-top: 3px; accent-color: var(--green-dark); }
.form-actions { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; }
.form-actions .button-primary { margin-left: auto; min-width: 150px; }
.form-error { margin-top: 18px; padding: 12px 14px; border-left: 3px solid var(--danger); background: #fff3f1; color: #7a271a; font-size: 0.9rem; }

.review-banner { padding: 18px; border-left: 4px solid var(--green); background: var(--green-soft); margin-bottom: 24px; }
.review-banner strong { display: block; font-size: 1.05rem; }
.review-banner p { margin: 5px 0 0; color: var(--muted); }
.review-groups { display: grid; gap: 22px; }
.review-group { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.review-group h4 { margin: 0; padding: 12px 15px; background: var(--soft); font-size: 0.88rem; }
.review-row { display: grid; grid-template-columns: minmax(130px,.8fr) 1.2fr; gap: 16px; padding: 11px 15px; border-top: 1px solid var(--line); font-size: 0.88rem; }
.review-row span:first-child { color: var(--muted); }
.review-row strong { overflow-wrap: anywhere; }

#survey-view { padding: clamp(36px, 6vw, 76px) 20px 80px; background: var(--soft); min-height: calc(100vh - 78px); }
.survey-shell { max-width: 900px; margin: 0 auto; }
.survey-heading { display: flex; justify-content: space-between; gap: 36px; align-items: flex-start; }
.survey-heading h2 { max-width: 620px; }
.survey-heading p:last-child { margin: 14px 0 0; max-width: 650px; color: var(--muted); }
.survey-progress { margin: 34px 0 32px; }
.survey-progress > span { display: block; margin-bottom: 9px; color: var(--muted); font-size: 0.84rem; font-weight: 750; }
.survey-question { padding: 22px 0; border-top: 1px solid var(--line); }
.survey-question:first-child { border-top: 0; padding-top: 0; }
.survey-question legend { margin-bottom: 12px; font-weight: 800; }
.survey-question legend small { display: block; margin-top: 3px; color: var(--muted); font-weight: 500; }

.dashboard-view { max-width: 1320px; margin: 0 auto; padding: clamp(36px, 6vw, 76px) clamp(20px, 4vw, 56px) 80px; }
.dashboard-header { display: flex; justify-content: space-between; gap: 30px; align-items: flex-start; }
.dashboard-header h1 { font-size: clamp(2.3rem, 5vw, 4.6rem); color: var(--black); }
.dashboard-header p:last-child { margin: 14px 0 0; color: var(--muted); font-size: 1.02rem; }
.status-pill { display: inline-flex; align-items: center; gap: 9px; padding: 10px 13px; border: 1px solid #b7ddb4; border-radius: 99px; background: var(--green-soft); color: var(--green-dark); font-weight: 800; white-space: nowrap; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(110,216,102,.18); }
.account-grid { margin-top: 38px; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.account-metric { min-height: 110px; padding: 20px; border-left: 1px solid var(--line); background: var(--white); }
.account-metric:first-child { border-left: 0; }
.account-metric span { display: block; color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; }
.account-metric strong { display: block; margin-top: 12px; font-size: 1.03rem; }
.dashboard-grid { margin-top: 22px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 22px; align-items: start; }
.dashboard-card { padding: 26px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.dashboard-card-wide { grid-row: span 2; }
.card-heading { min-height: 50px; display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.card-heading h2 { margin: 0; font-size: 1.35rem; letter-spacing: -.02em; }
.summary-grid { margin-top: 22px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.summary-item { min-height: 115px; padding: 18px; background: var(--white); }
.summary-item span { display: block; color: var(--muted); font-size: .8rem; }
.summary-item strong { display: block; margin-top: 9px; font-size: 1rem; overflow-wrap: anywhere; }
.checklist { margin-top: 18px; display: grid; }
.check-item { position: relative; display: grid; grid-template-columns: 30px 1fr; gap: 10px; min-height: 68px; }
.check-item:not(:last-child)::after { content: ""; position: absolute; left: 11px; top: 28px; bottom: 0; width: 1px; background: var(--line); }
.check-mark { width: 23px; height: 23px; display: grid; place-items: center; border: 1px solid #aab5aa; border-radius: 50%; background: var(--white); color: transparent; font-size: .75rem; font-weight: 900; z-index: 1; }
.check-item.complete .check-mark { border-color: var(--green-dark); background: var(--green); color: #052003; }
.check-item.active .check-mark { border-color: var(--green-dark); box-shadow: 0 0 0 4px var(--green-soft); }
.check-copy strong { display: block; font-size: .9rem; }
.check-copy span { display: block; margin-top: 3px; color: var(--muted); font-size: .8rem; }
.priority-list { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.priority-list li { padding: 11px 12px; border-left: 3px solid var(--green); background: var(--soft); font-size: .9rem; font-weight: 700; }
.priority-empty { margin: 18px 0 0; color: var(--muted); font-size: .9rem; line-height: 1.6; }

.rewards-section {
  margin-top: 22px;
  border: 1px solid #1f261f;
  border-radius: 8px;
  overflow: hidden;
  background: var(--black);
  color: var(--white);
}
.rewards-hero {
  padding: clamp(26px, 4vw, 44px);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 36px;
  border-bottom: 1px solid rgba(255,255,255,.13);
  background: radial-gradient(circle at 78% -30%, rgba(110,216,102,.25), transparent 35%);
}
.rewards-heading .kicker { color: var(--green); }
.rewards-heading h2 { margin: 0; max-width: 620px; font-size: clamp(2rem, 4vw, 3.3rem); line-height: 1; letter-spacing: -.045em; }
.rewards-heading > p:last-child { margin: 16px 0 0; max-width: 640px; color: rgba(255,255,255,.65); }
.reward-balance-card {
  width: 218px;
  min-height: 154px;
  padding: 20px;
  flex: 0 0 auto;
  border: 1px solid rgba(110,216,102,.42);
  border-radius: 8px;
  background: rgba(110,216,102,.08);
}
.reward-balance-card span { display: block; color: var(--green); font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.reward-balance-card strong { display: block; margin-top: 17px; font-size: 2.55rem; line-height: 1; letter-spacing: -.04em; }
.reward-balance-card small { display: block; margin-top: 6px; color: rgba(255,255,255,.58); }
.tier-panel {
  padding: 24px clamp(26px, 4vw, 44px);
  display: grid;
  grid-template-columns: 250px minmax(0,1fr);
  align-items: center;
  gap: 34px;
  border-bottom: 1px solid rgba(255,255,255,.13);
}
.tier-copy { display: grid; }
.tier-copy > span { color: rgba(255,255,255,.55); font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.tier-copy strong { margin-top: 3px; font-size: 1.3rem; }
.tier-copy small { margin-top: 3px; color: rgba(255,255,255,.58); }
.tier-track { position: relative; height: 6px; border-radius: 99px; background: rgba(255,255,255,.14); }
.tier-track span { display: block; width: 50%; height: 100%; border-radius: inherit; background: var(--green); transition: width 220ms ease; }
.tier-labels { margin-top: 9px; display: flex; justify-content: space-between; color: rgba(255,255,255,.54); font-size: .72rem; font-weight: 750; }
.reward-columns { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
.reward-column { min-width: 0; padding: 28px clamp(20px, 2.7vw, 36px); border-left: 1px solid rgba(255,255,255,.13); }
.reward-column:first-child { border-left: 0; }
.reward-column-heading { min-height: 60px; display: grid; grid-template-columns: 32px 1fr; gap: 10px; align-items: start; }
.reward-column-heading > span { color: var(--green); font-size: .76rem; font-weight: 850; }
.reward-column-heading .kicker { margin: 0; color: rgba(255,255,255,.48); }
.reward-column-heading h3 { margin: 2px 0 0; font-size: 1.05rem; }
.reward-list { display: grid; }
.reward-item {
  min-height: 66px;
  padding: 14px 0;
  display: grid;
  grid-template-columns: 24px minmax(0,1fr) auto;
  align-items: start;
  gap: 10px;
  border-top: 1px solid rgba(255,255,255,.11);
}
.reward-item:first-child { border-top: 0; }
.reward-item-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50%;
  color: var(--green);
  font-size: .72rem;
  font-weight: 900;
}
.reward-item.complete .reward-item-icon { border-color: var(--green); background: var(--green); color: #052003; }
.reward-item-copy strong { display: block; font-size: .84rem; line-height: 1.35; }
.reward-item-copy small { display: block; margin-top: 4px; color: rgba(255,255,255,.52); font-size: .74rem; line-height: 1.4; }
.reward-points { color: var(--green); font-size: .78rem; font-weight: 850; white-space: nowrap; }
.reward-guardrail {
  padding: 24px clamp(26px, 4vw, 44px);
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,.13);
  background: rgba(255,255,255,.04);
}
.reward-guardrail > div:first-child { max-width: 500px; }
.reward-guardrail > div:first-child span { display: block; color: var(--green); font-size: .74rem; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.reward-guardrail > div:first-child strong { display: block; margin-top: 5px; font-size: .88rem; }
.reward-rules { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.reward-rules span { padding: 7px 9px; border: 1px solid rgba(255,255,255,.15); border-radius: 4px; color: rgba(255,255,255,.62); font-size: .7rem; }

.map-teaser {
  width: 100%;
  margin-top: 22px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  text-align: left;
  cursor: pointer;
}
.map-teaser span { display: block; color: var(--green-dark); font-size: .7rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.map-teaser strong { display: block; margin-top: 6px; font-size: .92rem; font-weight: 750; }
.map-teaser em { display: block; margin-top: 8px; color: var(--green-dark); font-style: normal; font-weight: 850; }
.map-teaser:hover { border-color: var(--green); }

.network-view { max-width: 1440px; margin: 0 auto; padding: clamp(28px, 5vw, 56px) clamp(16px, 4vw, 56px) 72px; }
.network-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 22px; }
.network-header h1 { margin: 0; font-size: clamp(2rem, 4vw, 3.4rem); letter-spacing: -.04em; line-height: 1.05; max-width: 720px; }
.network-disclaimer { margin: 10px 0 0; max-width: 640px; color: var(--muted); }
.network-count { padding: 8px 12px; border: 1px solid #b7ddb4; border-radius: 99px; background: var(--green-soft); color: var(--green-dark); font-weight: 800; white-space: nowrap; }
.network-toolbar { display: grid; grid-template-columns: minmax(0,1.4fr) repeat(3, minmax(0,1fr)); gap: 10px; margin-bottom: 16px; }
.network-search input, .network-toolbar select {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #bcc7bc; border-radius: 6px; background: var(--white);
}
.network-workspace { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(300px, .9fr); gap: 16px; min-height: 620px; }
.network-map-wrap { position: relative; min-height: 560px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #e8eee8; }
#network-map { height: 100%; min-height: 560px; }
.network-legend {
  position: absolute; left: 12px; bottom: 12px; z-index: 400;
  display: grid; gap: 6px; padding: 10px 12px; border-radius: 6px;
  background: rgba(255,255,255,.94); border: 1px solid var(--line); font-size: .74rem; font-weight: 700;
}
.network-legend span { display: flex; align-items: center; gap: 8px; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.legend-dot.state { background: transparent !important; border: 1.5px dashed var(--green-dark); }
.legend-dot.hub { border-radius: 2px; }
.legend-dot.logistics { border-radius: 2px; transform: rotate(45deg); }
.network-side { display: grid; grid-template-rows: minmax(0,1fr) auto; gap: 12px; min-width: 0; }
.network-list { overflow: auto; max-height: 620px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.network-item {
  width: 100%; display: grid; gap: 4px; padding: 14px 15px; border: 0; border-bottom: 1px solid var(--line);
  background: var(--white); text-align: left; cursor: pointer;
}
.network-item:last-child { border-bottom: 0; }
.network-item:hover, .network-item.active { background: var(--green-soft); }
.network-item strong { font-size: .92rem; }
.network-item small { color: var(--muted); font-size: .78rem; }
.network-item .status-chip { justify-self: start; margin-top: 4px; }
.status-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 99px;
  background: var(--soft); font-size: .7rem; font-weight: 800;
}
.status-chip i { width: 8px; height: 8px; border-radius: 50%; }
.network-drawer { padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.network-drawer[hidden] { display: none; }
.network-drawer h3 { margin: 0 0 6px; font-size: 1.1rem; }
.network-drawer p { margin: 0 0 10px; color: var(--muted); font-size: .88rem; }
.network-drawer .button { width: 100%; margin-top: 8px; }
.network-empty { padding: 28px 16px; color: var(--muted); text-align: center; }
.network-dash-card { margin-top: 22px; }
.network-dash-list { display: grid; gap: 8px; margin-top: 16px; }
.network-dash-row { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px; border: 0; background: var(--soft); border-radius: 6px; text-align: left; cursor: pointer; }
.network-dash-row strong { display: block; }
.network-dash-row small { color: var(--muted); }

.status-discovered i { background: #d4a017; }
.status-contacted i { background: #e07a2f; }
.status-self_reported i { background: #2f6fed; }
.status-verified i { background: #2fa84a; }
.status-live i { background: #7b3fe4; }

footer { min-height: 68px; padding: 20px clamp(20px, 4vw, 64px); display: flex; justify-content: space-between; gap: 20px; background: var(--black); color: rgba(255,255,255,.62); font-size: .8rem; }
.toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 50;
  width: min(360px, calc(100vw - 40px)); padding: 16px 18px; display: grid; gap: 3px;
  border-left: 4px solid var(--green); border-radius: 6px; background: var(--black); color: var(--white);
  box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(14px); transition: 180ms ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast span { color: rgba(255,255,255,.7); font-size: .86rem; }

/* Checkout summary, nationwide coverage and address autocomplete */
.checkout-card { margin-top: 22px; }
.checkout-lines { margin-top: 16px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.checkout-line {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 14px 16px; border-top: 1px solid var(--line); background: var(--white); font-size: .92rem;
}
.checkout-line:first-child { border-top: 0; }
.checkout-line strong { text-align: right; font-weight: 750; }
.checkout-line-disabled { color: var(--muted); background: var(--soft); cursor: not-allowed; }
.checkout-option { display: flex; align-items: flex-start; gap: 10px; }
.checkout-option input { margin-top: 3px; accent-color: var(--green-dark); }
.checkout-option small { display: block; margin-top: 3px; color: var(--muted); font-size: .78rem; line-height: 1.4; }
.checkout-line-disabled strong { color: var(--muted); font-weight: 600; }
.checkout-line-total { background: var(--green-soft); font-weight: 850; }
.address-search { display: grid; gap: 5px; margin-bottom: 10px; }
.address-search label { font-size: .82rem; font-weight: 700; color: var(--muted); }
.address-search input {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #bcc7bc; border-radius: 6px;
  background: var(--white); color: var(--ink);
}
.address-search small { color: var(--muted); font-size: .76rem; line-height: 1.4; }
.address-search small.address-search-error { color: var(--danger); }

@media (max-width: 980px) {
  #welcome-view { background: var(--white); }
  .welcome-grid { grid-template-columns: 1fr; }
  .welcome-copy { background: var(--black); padding-top: 70px; }
  .trust-list { margin-top: 48px; }
  .role-panel { padding-top: 56px; }
  .flow-layout { grid-template-columns: 1fr; gap: 34px; }
  .flow-aside { position: static; }
  .back-link { margin-bottom: 34px; }
  .support-note { display: none; }
  .account-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .account-metric:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .account-metric:nth-child(4) { border-top: 1px solid var(--line); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-card-wide { grid-row: auto; }
  .reward-columns { grid-template-columns: 1fr; }
  .reward-column { border-left: 0; border-top: 1px solid rgba(255,255,255,.13); }
  .reward-column:first-child { border-top: 0; }
  .reward-guardrail { align-items: flex-start; flex-direction: column; }
  .reward-rules { justify-content: flex-start; }
  .network-toolbar { grid-template-columns: 1fr 1fr; }
  .network-workspace { grid-template-columns: 1fr; }
  .network-list { max-height: 320px; }
}
@media (max-width: 660px) {
  .app-header { height: 68px; gap: 10px; }
  .header-actions { gap: 10px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-name { font-size: 1rem; letter-spacing: 0.12em; }
  .secure-label, #network-link { display: none; }
  .lang-switcher select { min-width: 0; width: 92px; padding: 6px 8px; font-size: 0.78rem; }
  #account-button { font-size: 0.8rem; white-space: nowrap; }
  #welcome-view, .welcome-grid { min-height: calc(100vh - 68px); }
  .welcome-copy { padding: 54px 22px 46px; }
  .welcome-copy h1 { font-size: clamp(2.25rem, 12vw, 3.7rem); }
  .role-panel { padding: 42px 18px 56px; }
  .role-card { grid-template-columns: 46px minmax(0,1fr) 18px; padding: 15px; min-height: 102px; gap: 12px; }
  .role-icon { width: 46px; height: 46px; }
  .saved-account { align-items: flex-start; flex-direction: column; }
  .saved-account .button { width: 100%; }
  .flow-layout { padding: 30px 16px 56px; }
  .flow-card, .survey-shell { padding: 22px 16px; box-shadow: none; }
  .field-grid, .choice-grid { grid-template-columns: 1fr; }
  .survey-heading, .dashboard-header { flex-direction: column; }
  #survey-view { padding: 28px 12px 50px; }
  .survey-heading h2 { font-size: 2.15rem; }
  .survey-heading .text-button { align-self: flex-start; }
  .dashboard-view { padding: 38px 16px 60px; }
  .checkout-line { flex-direction: column; gap: 6px; }
  .checkout-line strong { text-align: left; }
  .card-heading { flex-direction: column; gap: 6px; }
  .card-heading .text-button { align-self: flex-start; }
  .account-grid, .summary-grid { grid-template-columns: 1fr; }
  .account-metric { border-left: 0; border-top: 1px solid var(--line); }
  .account-metric:first-child { border-top: 0; }
  .summary-item { min-height: 90px; }
  .review-row { grid-template-columns: 1fr; gap: 3px; }
  .form-actions { flex-wrap: wrap; }
  .form-actions .button { flex: 1 1 130px; }
  .rewards-hero { flex-direction: column; }
  .reward-balance-card { width: 100%; min-height: 132px; }
  .tier-panel { grid-template-columns: 1fr; gap: 22px; }
  .tier-labels { font-size: .65rem; }
  footer { flex-direction: column; gap: 5px; }
  .network-header { flex-direction: column; }
  .network-toolbar { grid-template-columns: 1fr; }
  #network-map, .network-map-wrap { min-height: 360px; }
  .network-legend { left: auto; right: 12px; max-width: 170px; font-size: .68rem; }
}
@media (max-width: 400px) {
  .app-header { padding: 0 12px; gap: 8px; }
  .brand { gap: 8px; }
  .brand-mark { width: 30px; height: 30px; border-radius: 7px; }
  .brand-name { font-size: 0.92rem; letter-spacing: 0.1em; }
  .header-actions { gap: 8px; }
  .lang-switcher select { width: 82px; font-size: 0.72rem; }
  #account-button { font-size: 0.74rem; }
  footer { padding: 20px 14px; }
  .adsense-wrap { padding-left: 12px; padding-right: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }

/* AdSense unit (server-injected when enabled in the admin dashboard) */
.adsense-wrap {
  max-width: 1040px;
  margin: 32px auto;
  padding: 12px clamp(16px, 4vw, 32px) 0;
}
.adsense-label {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.adsense-wrap .adsbygoogle { min-height: 90px; }
