:root {
  color-scheme: dark;
  --bg: #0b0d0c;
  --panel: #12171a;
  --panel-2: #17201c;
  --ink: #f6f3ed;
  --muted: #a9b1ad;
  --line: #2c3832;
  --green: #70d47a;
  --green-dark: #235d31;
  --orange: #ff7a1a;
  --danger: #ff8d78;
  --focus: #ffe18a;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(0, 0, 0, .32);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 8%, rgba(112, 212, 122, .12), transparent 28rem),
    radial-gradient(circle at 88% 20%, rgba(255, 122, 26, .1), transparent 26rem),
    var(--bg);
  color: var(--ink);
  font-family: "Barlow", system-ui, sans-serif;
  line-height: 1.5;
}

a { color: inherit; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 20; padding: .75rem 1rem; border-radius: 10px; background: var(--ink); color: var(--bg); font-weight: 800; }
.skip-link:focus { top: 1rem; }

.site-nav { position: relative; z-index: 5; border-bottom: 1px solid rgba(255,255,255,.08); background: rgba(11,13,12,.9); backdrop-filter: blur(18px); }
.site-nav__inner { width: min(1180px, calc(100% - 2rem)); min-height: 70px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; font-family: "Saira Condensed", system-ui, sans-serif; font-size: 1.4rem; font-weight: 900; letter-spacing: .03em; text-transform: uppercase; }
.brand img { width: 38px; height: 38px; object-fit: contain; }
.site-nav__links { display: flex; align-items: center; gap: .45rem; }
.nav-link { padding: .58rem .72rem; color: var(--muted); text-decoration: none; font-weight: 800; }
.nav-link:hover { color: var(--ink); }
.nav-pill { padding: .62rem .88rem; border: 1px solid rgba(112,212,122,.5); border-radius: 999px; color: var(--green); text-decoration: none; font-weight: 900; }

.auth-shell { width: min(1040px, calc(100% - 2rem)); margin: auto; padding: clamp(2rem, 8vw, 6rem) 0; display: grid; gap: 1.5rem; }
.auth-story, .auth-card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.auth-story { position: relative; overflow: hidden; min-height: 280px; padding: clamp(1.5rem, 6vw, 3.5rem); background: linear-gradient(145deg, rgba(25,73,37,.95), rgba(11,13,12,.95)); }
.auth-story::after { content: ""; position: absolute; width: 22rem; height: 22rem; right: -8rem; bottom: -11rem; border: 54px solid rgba(112,212,122,.09); border-radius: 50%; }
.eyebrow { margin: 0 0 .7rem; color: var(--orange); font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3 { margin: 0; font-family: "Saira Condensed", system-ui, sans-serif; line-height: .98; }
.auth-story h1 { max-width: 11ch; font-size: clamp(2.8rem, 10vw, 5.5rem); text-transform: uppercase; }
.auth-story p:not(.eyebrow) { position: relative; z-index: 1; max-width: 35rem; color: #d8e3dc; font-size: 1.08rem; }
.auth-proof { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.5rem; }
.auth-proof span { padding: .5rem .7rem; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; color: #e5eee8; font-weight: 700; }
.auth-card { padding: clamp(1.4rem, 5vw, 2.4rem); background: rgba(18,23,26,.96); }
.auth-card h2 { font-size: clamp(2rem, 6vw, 3rem); }
.auth-card > p { color: var(--muted); }
.field { margin: 1.15rem 0; }
.field label { display: block; margin-bottom: .42rem; font-weight: 800; }
.field input { width: 100%; min-height: 50px; padding: .78rem .9rem; border: 1px solid #44514b; border-radius: 11px; background: #0c100e; color: var(--ink); }
.field input:focus { border-color: var(--green); }
.field small { display: block; margin-top: .35rem; color: var(--muted); }
.field-action { text-align: right; }
.field-action a, .auth-help a { color: var(--green); font-weight: 800; text-underline-offset: 3px; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: .5rem; padding: .75rem 1rem; border: 0; border-radius: 11px; background: var(--orange); color: #16100b; cursor: pointer; font-weight: 900; text-decoration: none; }
.button:hover { filter: brightness(1.08); }
.button:disabled { cursor: wait; opacity: .65; }
.button--full { width: 100%; }
.button--secondary { border: 1px solid var(--line); background: #18201c; color: var(--ink); }
.form-status { min-height: 1.5rem; margin: .8rem 0; color: var(--muted); }
.form-status[data-kind="error"] { color: var(--danger); }
.form-status[data-kind="success"] { color: var(--green); }
.auth-switch { margin: 1rem 0 0; text-align: center; }
.auth-switch a { color: var(--green); font-weight: 900; }
.auth-help { margin: 1rem 0 0; color: var(--muted); font-size: .92rem; text-align: center; }
.recovery-state { margin-top: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: #0c100e; }
.recovery-state[hidden] { display: none; }
.recovery-state h3 { margin-bottom: .45rem; font-size: 1.45rem; }
.recovery-state p { margin: .4rem 0; color: var(--muted); }
.recovery-state--error { border-color: rgba(255,141,120,.5); }
.recovery-state--success { border-color: rgba(112,212,122,.5); }

.portal-main { width: min(1180px, calc(100% - 2rem)); margin: auto; padding: 1.3rem 0 5rem; }
.portal-top { display: grid; gap: 1rem; padding: clamp(1.4rem, 5vw, 2.4rem); border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(135deg, rgba(19,43,28,.97), rgba(18,23,26,.97)); }
.portal-top h1 { max-width: 11ch; font-size: clamp(2.6rem, 9vw, 5.6rem); text-transform: uppercase; }
.portal-top__copy { max-width: 42rem; color: #c4cfca; font-size: 1.06rem; }
.member-tools { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.member-name { font-weight: 900; }
.member-status { flex-basis: 100%; min-height: 1.4rem; margin: 0; color: var(--muted); text-align: right; }
.member-status:empty { display: none; }
.member-status[data-kind="error"] { color: var(--danger); }
.status-panel { margin-top: 1rem; padding: 1.1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.status-panel--error { border-color: rgba(255,141,120,.5); }
.status-panel h2 { margin-bottom: .45rem; font-size: 1.6rem; }
.status-panel p { margin: .4rem 0; color: var(--muted); }
.skeleton { overflow: hidden; position: relative; min-height: 145px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.07), transparent); animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

.journey { margin-top: 1rem; }
.journey[hidden] { display: none; }
.journey-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-bottom: 1rem; }
.summary-card { min-width: 0; padding: 1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.summary-card span { display: block; color: var(--muted); font-size: .78rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.summary-card strong { display: block; overflow-wrap: anywhere; margin-top: .25rem; font-size: clamp(1.05rem, 4vw, 1.45rem); }
.progress-track { height: 10px; margin-top: .8rem; overflow: hidden; border-radius: 999px; background: #29332e; }
.progress-fill { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green-dark), var(--green)); transition: width .35s ease; }

.map-shell { position: relative; overflow: hidden; padding: clamp(1rem, 4vw, 2rem); border: 1px solid #31463a; border-radius: var(--radius); background:
  linear-gradient(rgba(8,22,13,.88), rgba(8,15,11,.96)),
  repeating-linear-gradient(22deg, transparent 0 34px, rgba(112,212,122,.06) 35px 37px); box-shadow: var(--shadow); }
.map-shell::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .24; background: radial-gradient(circle at 10% 10%, var(--green) 0 2px, transparent 3px), radial-gradient(circle at 85% 30%, var(--orange) 0 2px, transparent 3px); background-size: 62px 62px, 84px 84px; }
.map-head { position: relative; display: flex; justify-content: space-between; gap: 1rem; align-items: end; margin-bottom: 1.2rem; }
.map-head h2 { font-size: clamp(2rem, 7vw, 3.8rem); text-transform: uppercase; }
.map-head p { max-width: 35rem; margin: .4rem 0 0; color: var(--muted); }
.trail { position: relative; display: grid; gap: .85rem; margin: 0; padding: 0; list-style: none; }
.trail::before { content: ""; position: absolute; left: 25px; top: 30px; bottom: 30px; width: 3px; background: repeating-linear-gradient(to bottom, var(--green) 0 9px, transparent 9px 17px); opacity: .5; }
.checkpoint { position: relative; display: grid; grid-template-columns: 52px 1fr; gap: .8rem; padding: .9rem; border: 1px solid #30453a; border-radius: 16px; background: rgba(15,24,18,.94); }
.checkpoint--current { border-color: var(--orange); box-shadow: 0 0 0 2px rgba(255,122,26,.13); }
.checkpoint--complete { border-color: rgba(112,212,122,.5); }
.checkpoint__pin { position: relative; z-index: 1; display: grid; width: 52px; height: 52px; place-items: center; border: 2px solid #567062; border-radius: 50% 50% 50% 12%; transform: rotate(-45deg); background: #17231b; color: var(--ink); font-weight: 900; }
.checkpoint__pin span { transform: rotate(45deg); }
.checkpoint--complete .checkpoint__pin { border-color: var(--green); background: var(--green-dark); }
.checkpoint--current .checkpoint__pin { border-color: var(--orange); background: #6f3513; }
.checkpoint__top { display: flex; align-items: start; justify-content: space-between; gap: .6rem; }
.checkpoint h3 { font-size: 1.5rem; line-height: 1.08; }
.checkpoint__state { flex: 0 0 auto; padding: .2rem .5rem; border-radius: 999px; background: #26332d; color: var(--muted); font-size: .72rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.checkpoint--complete .checkpoint__state { background: rgba(112,212,122,.14); color: var(--green); }
.checkpoint--current .checkpoint__state { background: rgba(255,122,26,.14); color: #ffab6f; }
.checkpoint p { margin: .42rem 0; color: #c4cfca; }
.checkpoint__evidence { color: var(--muted) !important; font-size: .93rem; }
.checkpoint__actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .75rem; }
.text-link { display: inline-flex; min-height: 42px; align-items: center; color: var(--green); font-weight: 900; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.complete-toggle { min-height: 42px; padding: .55rem .72rem; border: 1px solid #526259; border-radius: 9px; background: #152019; color: var(--ink); cursor: pointer; font-weight: 900; }
.complete-toggle[aria-pressed="true"] { border-color: var(--green); color: var(--green); }
.save-status { min-height: 1.5rem; margin: .8rem 0 0; color: var(--muted); }
.save-status[data-kind="error"] { color: var(--danger); }
.save-status[data-kind="success"] { color: var(--green); }
.map-destination { position: relative; margin-top: 1rem; padding: 1rem; border: 1px solid rgba(255,122,26,.45); border-radius: 15px; background: rgba(92,44,14,.22); }
.map-destination strong { display: block; color: var(--orange); font-family: "Saira Condensed", sans-serif; font-size: 1.5rem; text-transform: uppercase; }
.map-destination p { margin: .25rem 0; color: #d8d0c9; }

.browser-import { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; padding: 1rem 1.1rem; border: 1px solid rgba(112,212,122,.45); border-radius: 14px; background: rgba(22,48,31,.72); }
.browser-import[hidden] { display: none; }
.browser-import h2 { margin: 0 0 .35rem; font-size: 1.55rem; }
.browser-import p { margin: 0; color: var(--muted); }
.browser-import .eyebrow { margin-bottom: .35rem; color: var(--green); }

.next-card { margin-top: 1rem; padding: clamp(1.2rem, 4vw, 2rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.next-card h2 { font-size: clamp(1.8rem, 6vw, 2.8rem); }
.next-card p { color: var(--muted); }
.next-card__actions { display: flex; flex-wrap: wrap; gap: .7rem; }

@media (min-width: 800px) {
  .auth-shell { grid-template-columns: 1.1fr .9fr; align-items: stretch; }
  .auth-card { align-self: center; }
  .portal-top { grid-template-columns: 1.2fr .8fr; align-items: end; }
  .member-tools { justify-content: flex-end; }
  .trail { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .trail::before { display: none; }
  .checkpoint:nth-child(even) { transform: translateY(2.2rem); }
  .map-destination { margin-top: 3.2rem; }
}

@media (max-width: 620px) {
  .site-nav__links .nav-link { display: none; }
  .journey-summary { grid-template-columns: 1fr; }
  .browser-import { align-items: stretch; flex-direction: column; }
  .checkpoint__top { display: block; }
  .checkpoint__state { display: inline-block; margin-top: .4rem; }
}

@media (max-width: 360px) {
  .site-nav__inner { width: min(1180px, calc(100% - 1rem)); gap: .5rem; }
  .brand { gap: .4rem; font-size: 1.1rem; }
  .brand img { width: 32px; height: 32px; }
  .nav-pill { padding: .55rem .65rem; font-size: .88rem; }
}

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