:root {
  color-scheme: dark;
  --canvas: #0b1315;
  --rail: #101b1d;
  --surface: #142022;
  --surface-raised: #1a2a2c;
  --surface-input: #0d1719;
  --stroke: #2b4142;
  --stroke-soft: #203335;
  --text: #eaf2ef;
  --text-secondary: #b5c8c3;
  --muted: #829a96;
  --violet: #62b6a5;
  --violet-bright: #8ed5c4;
  --violet-wash: #183936;
  --green: #79cdb3;
  --rose: #d8909b;
  --gold: #d4b985;
  --font-ui: "Segoe UI Variable", "Segoe UI", Inter, system-ui, sans-serif;
  --font-data: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

body { background: var(--canvas); }
.app-shell { grid-template-columns: 226px minmax(0, 1fr); }
.rail { align-items: stretch; gap: 30px; padding: 22px 16px; }
.brand-mark { width: 44px; height: 44px; margin-left: 8px; border: 1px solid #9bd8c03b; border-radius: 50%; background: radial-gradient(circle at 36% 31%, #4c8b7d, #173d39 72%); color: #e6d8b3; font-family: Georgia, serif; box-shadow: 0 0 26px #397f7220; }
.rail-nav { gap: 6px; }
.rail-link { display: flex; width: 100%; height: 44px; justify-content: flex-start; gap: 12px; padding: 0 11px; border-radius: 8px; }
.rail-link:hover, .rail-link.is-active { background: #183331; color: #d7eee6; }
.rail-link.is-active { border-color: #65ad9d2b; box-shadow: inset 2px 0 var(--violet-bright); }
.rail-label { color: inherit; font-size: 12px; }
.rail-bottom { min-height: 14px; }
.topbar { height: 66px; padding: 0 clamp(22px, 4vw, 56px); background: #101b1dec; }
.brand-name { letter-spacing: .18em; }
.content-wrap { width: min(100%, 1120px); padding: clamp(22px, 4vw, 48px) clamp(18px, 4vw, 54px) 44px; }
.site-intro { position: relative; display: grid; min-height: 238px; grid-template-columns: minmax(0, 1fr) 230px; align-items: center; overflow: hidden; margin-bottom: 34px; padding: 34px clamp(25px, 5vw, 60px); border: 1px solid #315052; border-radius: 18px; background: radial-gradient(ellipse at 84% 50%, #1d5a503f 0, transparent 44%), linear-gradient(112deg, #142224 0%, #132123 55%, #10201f 100%); }
.site-intro::before, .site-intro::after { position: absolute; border: 1px solid #c3d8c51c; border-radius: 50%; content: ""; pointer-events: none; }
.site-intro::before { top: -160px; right: -70px; width: 440px; height: 440px; }
.site-intro::after { top: -108px; right: -18px; width: 336px; height: 336px; }
.site-intro-copy { position: relative; z-index: 1; max-width: 620px; }
.site-overline { margin: 0 0 14px; color: #a4c8ba; font-family: var(--font-data); font-size: 10px; letter-spacing: .14em; }
.site-intro h1 { margin: 0; color: #f1f4ed; font-family: Georgia, "Times New Roman", serif; font-size: clamp(34px, 5vw, 57px); font-weight: 400; letter-spacing: -.045em; line-height: 1.02; }
.site-intro h1 em { color: #a7d5c4; font-weight: 400; }
.site-intro-copy > p:last-child { max-width: 58ch; margin: 18px 0 0; color: #b2c5bf; font-size: 14px; line-height: 1.7; }
.site-astrolabe { position: relative; width: 190px; height: 190px; justify-self: center; border: 1px solid #bdd3c337; border-radius: 50%; background: radial-gradient(circle, #a6c8a813 0 32%, transparent 33% 100%); }
.astrolabe-ring { position: absolute; display: block; border: 1px solid #b8d2c33b; border-radius: 50%; inset: 13px; }
.ring-two { inset: 33px; border-style: dashed; transform: rotate(28deg) scaleX(.74); }
.ring-three { inset: 4px 44px; transform: rotate(52deg); }
.astrolabe-axis { position: absolute; top: 50%; left: 7px; width: 176px; height: 1px; background: #c3d8c32b; transform: rotate(-38deg); }
.astrolabe-core { position: absolute; inset: 0; display: grid; place-items: center; color: #d9caa4; font-family: Georgia, serif; font-size: 41px; }
.astrolabe-star { position: absolute; top: 22px; right: 26px; color: #d8c898; font-size: 14px; }
.page-kicker { margin-bottom: 18px; }
.solar-card { min-height: 190px; grid-template-columns: minmax(0, 1fr) 150px; padding: 28px 30px 43px; border-color: #35504c; border-radius: 15px; background: radial-gradient(ellipse at 91% 22%, #528d7628 0, transparent 42%), linear-gradient(125deg, #172728, #182426 57%, #172923); }
.solar-copy h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(42px, 6vw, 66px); font-weight: 400; }
.solar-copy h1 small { color: #acd3c3; }
.solar-dial { width: 124px; height: 124px; border-color: #bbd2b647; background: radial-gradient(circle, #416e5b 0 34%, #203833 35% 69%, #c3d7bc12 70%); }
.dial-crosshair { left: 9px; width: 104px; }
.dial-sun { transform: rotate(var(--phase-angle, 0deg)) translateY(-47px); }
.dial-center { color: #ded0a9; }
.section-block { margin-top: 36px; }
.section-heading h2 { font-family: Georgia, "Times New Roman", serif; font-size: 22px; font-weight: 400; }
.profile-form, .reading, .interpretation-card, .data-details { border-radius: 12px; background: #132022; }
.profile-form { padding: 22px; }
.field-row { gap: 16px; margin-bottom: 16px; }
.field label { font-size: 12px; }
.field input, .field select { height: 44px; border-radius: 8px; font-size: 13px; }
.compute-button { min-height: 48px; border-color: #80c8b5; border-radius: 8px; background: #317868; font-size: 13px; box-shadow: 0 8px 24px #193e363b; }
.compute-button:hover { border-color: #b4e1ce; background: #3b8a77; }
.ai-generate-button:disabled { border-color: var(--stroke); background: #273738; }
.reading { min-height: 108px; padding: 17px; }
.reading-label { font-size: 12px; }
.reading-value { font-size: 15px; }
.reading-note { font-size: 11px; }
.interpretation-card { padding: 19px; }
.interpretation-summary { font-size: 13px; }
.evidence-row dt, .evidence-row dd, .interpretation-caveat { font-size: 11px; }
.future-lens-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.planned-lens { background: #101a1b; }
.planned-lens h3 { font-size: 12px; }
.planned-lens p { font-size: 11px; }
.app-footer { margin-top: 22px; border-top: 1px solid var(--stroke-soft); font-size: 10px; }
.profile-form input::placeholder { color: #68807b; }

@media (max-width: 760px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .rail { position: sticky; z-index: 3; top: 66px; height: auto; min-height: 0; flex-direction: row; align-items: center; justify-content: center; gap: 4px; padding: 7px 12px; border-right: 0; border-bottom: 1px solid var(--stroke-soft); }
  .brand-mark, .rail-bottom { display: none; }
  .rail-nav { width: min(100%, 540px); flex-direction: row; justify-content: space-between; gap: 3px; }
  .rail-link { height: 40px; justify-content: center; gap: 7px; padding: 0 8px; }
  .rail-link svg { width: 17px; height: 17px; }
  .rail-label { font-size: 11px; }
  .topbar { position: sticky; top: 0; }
  .content-scroll { min-height: calc(100vh - 110px); }
  .site-intro { min-height: 205px; grid-template-columns: minmax(0, 1fr) 128px; padding: 26px 23px; }
  .site-astrolabe { width: 122px; height: 122px; }
  .ring-two { inset: 23px; }
  .ring-three { inset: 3px 28px; }
  .astrolabe-axis { left: 5px; width: 110px; }
  .astrolabe-core { font-size: 30px; }
  .solar-card { grid-template-columns: minmax(0, 1fr) 108px; padding: 22px 20px 40px; }
  .solar-dial { width: 94px; height: 94px; }
  .dial-crosshair { left: 7px; width: 78px; }
  .dial-sun { transform: rotate(var(--phase-angle, 0deg)) translateY(-35px); }
  .future-lens-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .topbar { height: 58px; padding: 0 14px; }
  .rail { top: 58px; }
  .rail-link { flex-direction: column; height: 46px; gap: 2px; }
  .rail-label { font-size: 9px; }
  .topbar-meta { gap: 8px; }
  .live-indicator { font-size: 0; }
  .content-wrap { padding: 18px 13px 28px; }
  .site-intro { min-height: 195px; grid-template-columns: minmax(0, 1fr) 82px; gap: 5px; padding: 21px 16px; }
  .site-intro h1 { font-size: clamp(30px, 9vw, 40px); }
  .site-intro-copy > p:last-child { font-size: 12px; }
  .site-astrolabe { width: 80px; height: 80px; }
  .ring-two { inset: 15px; }
  .ring-three { inset: 2px 20px; }
  .astrolabe-axis { left: 3px; width: 72px; }
  .astrolabe-core { font-size: 22px; }
  .solar-card { grid-template-columns: minmax(0, 1fr) 80px; padding: 19px 14px 42px; }
  .solar-dial { width: 72px; height: 72px; }
  .dial-crosshair { left: 5px; width: 60px; }
  .dial-sun { transform: rotate(var(--phase-angle, 0deg)) translateY(-27px); }
  .field-row { gap: 9px; }
  .profile-form { padding: 13px; }
  .future-lens-grid { grid-template-columns: minmax(0, 1fr); }
}

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