:root { color-scheme: light; }

* { box-sizing: border-box; }
html { min-width: 320px; overflow-x: hidden; background: #fff; }
body { min-width: 320px; margin: 0; overflow-x: hidden; background: #fff; color: var(--aerithm-txt, #17212b); font-family: var(--font-sans, Arial, sans-serif); }
a { color: inherit; }
button { color: inherit; font: inherit; }
:focus-visible { outline: 3px solid var(--aerithm-hero, #315f94); outline-offset: 3px; }

.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 12px 16px; transform: translateY(-170%); background: var(--aerithm-txt, #17212b); color: #fff; }
.skip-link:focus { transform: none; }
.sandbox-banner { padding: 7px 18px; border-bottom: 1px solid #17212b; background: #f4cf70; color: #3c2b00; font: 800 11px/1.2 var(--font-mono, monospace); letter-spacing: .09em; text-align: center; }

.portal-header { display: grid; grid-template-columns: minmax(140px, 1fr) auto minmax(140px, 1fr); align-items: center; gap: 24px; min-height: 82px; padding: 18px clamp(18px, 4vw, 64px); border-bottom: 1px solid var(--aerithm-grid, #d9dee2); }
.portal-header::after { content: "PRIVATE BETA"; justify-self: end; color: var(--aerithm-mut, #5e6872); font: 700 10px/1.2 var(--font-mono, monospace); letter-spacing: .08em; }
.brand { width: 150px; }
.brand img { display: block; width: 100%; height: auto; }
.portal-header nav { display: flex; align-items: center; justify-content: center; gap: 24px; font: 700 11px/1.2 var(--font-mono, monospace); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.portal-header nav [aria-current="page"] { color: var(--aerithm-hero, #315f94); }
.portal-header nav a { min-height: 44px; display: inline-flex; align-items: center; text-underline-offset: 5px; }

main { width: min(1320px, 100%); margin: 0 auto; padding: clamp(38px, 7vw, 92px) clamp(18px, 4vw, 64px) 96px; }
.eyebrow, .state-label, .state-word { margin: 0 0 13px; color: var(--aerithm-hero, #315f94); font: 750 10px/1.3 var(--font-mono, monospace); letter-spacing: .09em; text-transform: uppercase; }
h1, h2 { margin: 0; font-weight: 540; letter-spacing: -.038em; }
h1 { max-width: 780px; font-size: clamp(48px, 7vw, 94px); line-height: .93; text-wrap: balance; }
h2 { font-size: clamp(27px, 3vw, 42px); line-height: 1.04; text-wrap: balance; }
p { line-height: 1.62; }

.status-card { max-width: 780px; min-height: 320px; padding: clamp(28px, 5vw, 58px); border: 1px solid var(--aerithm-grid, #d9dee2); background: var(--aerithm-bg-soft, #f2f5f6); }
.status-card h1 { font-size: clamp(38px, 6vw, 70px); }
.error-card { border-color: var(--aerithm-danger, #9a433f); }

.portal-hero { display: grid; grid-template-columns: minmax(0, 8fr) minmax(280px, 4fr); gap: clamp(42px, 8vw, 110px); align-items: end; padding-bottom: clamp(58px, 9vw, 120px); }
.lede { max-width: 700px; margin: 25px 0 0; color: var(--aerithm-mut, #5e6872); font-size: clamp(17px, 2vw, 22px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px 22px; align-items: center; margin-top: 30px; }
.text-action { display: inline-flex; min-height: 44px; align-items: center; color: var(--aerithm-data, #162a4f); font: 750 11px/1.3 var(--font-mono, monospace); letter-spacing: .03em; text-underline-offset: 5px; text-transform: uppercase; }
.evidence-card { padding-top: 22px; border-top: 1px solid var(--aerithm-txt, #17212b); }
.evidence-card h2 { font-size: clamp(24px, 2.5vw, 34px); }
.evidence-card dl { margin: 24px 0 0; }
.evidence-card dl div { display: grid; grid-template-columns: 105px minmax(0, 1fr); gap: 16px; padding: 13px 0; border-top: 1px solid var(--aerithm-grid, #d9dee2); }
.evidence-card dt, .import-scope dt, .plan-window dt { color: var(--aerithm-mut, #5e6872); font: 700 10px/1.45 var(--font-mono, monospace); letter-spacing: .03em; text-transform: uppercase; }
.evidence-card dd, .import-scope dd, .plan-window dd { min-width: 0; margin: 0; line-height: 1.45; overflow-wrap: anywhere; }
.evidence-note { margin: 20px 0 0; color: var(--aerithm-mut, #5e6872); font-size: 12px; }

.start-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(280px, 4fr); gap: 1px; border: 1px solid var(--aerithm-grid, #d9dee2); background: var(--aerithm-grid, #d9dee2); }
.connection-card, .optional-plan { min-width: 0; padding: clamp(28px, 5vw, 58px); background: #fff; }
.connection-card { border-top: 7px solid var(--aerithm-positive, #dbe8df); }
.connection-card[data-connection-state="syncing"] { border-top-color: var(--aerithm-hero, #315f94); }
.connection-card[data-connection-state="partial"] { border-top-color: var(--aerithm-caution, #9a5e4f); }
.connection-card[data-connection-state="unsupported"], .connection-card[data-connection-state="disconnected"] { border-top-color: var(--aerithm-grid-strong, #96a0aa); }
.card-heading { display: flex; justify-content: space-between; gap: 30px; align-items: start; }
.card-heading > div { min-width: 0; }
.state-word { flex: 0 0 auto; margin: 0; padding: 7px 9px; background: var(--aerithm-bg-soft, #f2f5f6); color: var(--aerithm-txt, #17212b); }
.connection-copy { max-width: 730px; color: var(--aerithm-mut, #5e6872); font-size: 16px; }
.import-scope { margin: 34px 0 0; border-top: 1px solid var(--aerithm-txt, #17212b); }
.import-scope div { display: grid; grid-template-columns: minmax(125px, 1fr) 2.4fr; gap: 24px; padding: 15px 0; border-bottom: 1px solid var(--aerithm-grid, #d9dee2); }
.import-scope dd { font-size: 13px; }
.optional-plan { display: flex; align-items: flex-start; flex-direction: column; background: var(--aerithm-bg-soft, #f2f5f6); }
.optional-plan p:not(.eyebrow) { color: var(--aerithm-mut, #5e6872); }
.optional-plan .button { margin-top: auto; }

.import-progress { margin: 30px 0 6px; padding: 20px; border: 1px solid var(--aerithm-grid, #d9dee2); background: var(--aerithm-bg-soft, #f2f5f6); }
.progress-copy { display: flex; justify-content: space-between; gap: 20px; font-size: 13px; }
.progress-copy span { color: var(--aerithm-mut, #5e6872); }
.progress-track { height: 8px; margin-top: 14px; overflow: hidden; background: var(--aerithm-grid, #d9dee2); }
.progress-track span { display: block; width: 0; height: 100%; background: var(--aerithm-data, #162a4f); transition: width 180ms ease; }
.import-progress p { margin: 12px 0 0; color: var(--aerithm-mut, #5e6872); font-size: 12px; }

.active-plan { display: grid; grid-template-columns: minmax(0, 5fr) minmax(300px, 5fr) auto; gap: clamp(24px, 5vw, 70px); align-items: end; margin-top: clamp(54px, 8vw, 100px); padding: clamp(28px, 5vw, 54px) 0; border-block: 1px solid var(--aerithm-grid, #d9dee2); }
.active-plan p:not(.eyebrow) { color: var(--aerithm-mut, #5e6872); }
.plan-window { margin: 0; border-top: 1px solid var(--aerithm-txt, #17212b); }
.plan-window div { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--aerithm-grid, #d9dee2); }

.boundary-note { max-width: 900px; margin-top: clamp(54px, 8vw, 100px); padding: clamp(28px, 5vw, 54px); border-left: 7px solid var(--aerithm-ramp-2, #c4cdda); background: var(--aerithm-bg-soft, #f2f5f6); }
.boundary-note p:last-child { max-width: 760px; color: var(--aerithm-mut, #5e6872); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 18px; border: 1px solid var(--aerithm-txt, #17212b); background: #fff; color: var(--aerithm-txt, #17212b); font-weight: 750; text-align: center; text-decoration: none; }
.button-primary { background: var(--aerithm-txt, #17212b); color: #fff; }
.button-quiet { border-color: var(--aerithm-grid-strong, #96a0aa); }

@media (max-width: 960px) {
  .portal-header { grid-template-columns: 1fr auto; }
  .portal-header::after { display: none; }
  .portal-hero, .start-grid { grid-template-columns: 1fr; }
  .evidence-card { max-width: 620px; }
  .active-plan { grid-template-columns: 1fr 1fr; }
  .active-plan .text-action { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .portal-header { grid-template-columns: 1fr; align-items: start; gap: 12px; }
  .portal-header nav { width: 100%; justify-content: flex-start; gap: 20px; overflow-x: auto; padding-bottom: 3px; }
  main { padding-left: 16px; padding-right: 16px; }
  .card-heading, .progress-copy { align-items: flex-start; flex-direction: column; }
  .import-scope div, .evidence-card dl div { grid-template-columns: 1fr; gap: 6px; }
  .active-plan { grid-template-columns: 1fr; }
  .actions, .hero-actions { align-items: stretch; flex-direction: column; }
  .button, .hero-actions .text-action { width: 100%; }
  .optional-plan .button { margin-top: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
