:root {
  --ink: #e8eef8;
  --ink-soft: #b7c2d6;
  --muted: #7f8ca3;
  --paper: #07090d;
  --paper-2: #0e1219;
  --surface: rgba(18, 24, 36, 0.72);
  --surface-solid: #121824;
  --line: rgba(180, 210, 255, 0.1);
  --line-strong: rgba(180, 210, 255, 0.18);
  --accent: #3ddbc0;
  --accent-2: #6ea8ff;
  --accent-soft: rgba(61, 219, 192, 0.14);
  --accent-hover: #5aead0;
  --warn: #f0b429;
  --warn-bg: rgba(240, 180, 41, 0.12);
  --danger: #ff6b7a;
  --danger-bg: rgba(255, 107, 122, 0.12);
  --good: #3ddbc0;
  --good-bg: rgba(61, 219, 192, 0.12);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --glow: 0 0 40px rgba(61, 219, 192, 0.18);
  --radius: 18px;
  --radius-sm: 12px;
  --font-display: "Fraunces", Georgia, serif;
  --font-brand: "Syne", "Sora", sans-serif;
  --font-body: "Sora", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 4.25rem;
  --chart-tick: #8b97ad;
  --chart-grid: rgba(180, 210, 255, 0.08);
  --chart-legend: #e8eef8;
  --chart-line: #3ddbc0;
  --chart-line-2: #6ea8ff;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse 70% 45% at 85% -5%, rgba(61, 219, 192, 0.16), transparent 55%),
    radial-gradient(ellipse 55% 40% at -10% 70%, rgba(110, 168, 255, 0.12), transparent 50%),
    radial-gradient(circle at 50% 120%, rgba(61, 219, 192, 0.06), transparent 40%),
    linear-gradient(180deg, #0a0d14 0%, var(--paper) 45%, #05070b 100%);
  padding-bottom: calc(var(--nav-h) + 1.5rem);
  perspective: 1200px;
}

@media (min-width: 860px) {
  body {
    padding-bottom: 2rem;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

::selection {
  background: var(--accent-soft);
  color: var(--ink);
}

.shell {
  width: min(1100px, calc(100% - 1.5rem));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px) saturate(1.2);
  background: rgba(7, 9, 13, 0.72);
  border-bottom: 1px solid transparent;
}

.topbar.is-scrolled {
  border-bottom-color: var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-size: 0.98rem;
}

.brand-mark {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 11px;
  background:
    linear-gradient(145deg, rgba(110, 168, 255, 0.55) 0%, rgba(61, 219, 192, 0.9) 48%, #0d3d38 100%);
  position: relative;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 20px rgba(61, 219, 192, 0.25);
  transform: rotateX(12deg) rotateY(-12deg);
  transform-style: preserve-3d;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 6px;
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.55), transparent 45%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.12), transparent);
}

.brand-orb {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: var(--glow);
  pointer-events: none;
}

.brand-text {
  display: grid;
  line-height: 1.15;
}

.brand-text small {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.nav-actions {
  display: none;
  gap: 0.55rem;
  flex-wrap: wrap;
  align-items: center;
}

@media (min-width: 860px) {
  .nav-actions {
    display: flex;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.78rem 1.15rem;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease),
    color 0.2s var(--ease), transform 0.2s var(--ease);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, #4ae8cb 0%, #2bbfa5 55%, #1f9f8a 100%);
  color: #04110e;
  box-shadow: 0 10px 28px rgba(61, 219, 192, 0.28);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #6ef0d6 0%, var(--accent-hover) 60%, #2bbfa5 100%);
}

.btn-secondary {
  background: rgba(18, 24, 36, 0.9);
  border-color: var(--line-strong);
  color: var(--ink);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(28, 36, 52, 0.95);
  border-color: rgba(61, 219, 192, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
}

.btn-block {
  width: 100%;
}

.hero {
  display: grid;
  gap: 2rem;
  padding: 1.5rem 0 2.5rem;
  animation: rise 0.7s var(--ease) both;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: calc(100vh - 6rem);
    align-content: center;
    padding: 2rem 0 3rem;
  }
}

.hero-stage {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  min-height: min(62vh, 560px);
  background:
    radial-gradient(circle at 72% 28%, rgba(110, 168, 255, 0.35), transparent 28%),
    radial-gradient(circle at 30% 70%, rgba(61, 219, 192, 0.28), transparent 32%),
    linear-gradient(155deg, #0d1524 0%, #0a3d38 42%, #071018 100%);
  color: #f4fffa;
  padding: clamp(1.5rem, 4vw, 3rem);
  display: grid;
  align-content: end;
  isolation: isolate;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateZ(0) rotateX(1.5deg);
  transform-style: preserve-3d;
}

.hero-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 22%, rgba(255, 255, 255, 0.18), transparent 18%),
    linear-gradient(180deg, transparent 30%, rgba(3, 6, 12, 0.55) 100%);
  z-index: -1;
  animation: drift 12s ease-in-out infinite alternate;
}

.hero-stage::after {
  content: "";
  position: absolute;
  width: min(42vw, 280px);
  height: min(42vw, 280px);
  right: 8%;
  top: 12%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.55), transparent 28%),
    radial-gradient(circle at 50% 55%, #5aead0 0%, #1a6b62 45%, #0a1a28 72%);
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.45),
    0 0 80px rgba(61, 219, 192, 0.35),
    inset -12px -18px 40px rgba(0, 0, 0, 0.35);
  transform: rotateX(18deg) rotateY(-22deg);
  animation: orb-float 8s ease-in-out infinite alternate;
  z-index: -1;
  pointer-events: none;
}

.hero-stage .brand-inline {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  letter-spacing: -0.04em;
  margin-bottom: 0.85rem;
  max-width: 16ch;
}

.hero-stage h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  line-height: 1.02;
  max-width: 14ch;
  color: #fff;
}

.hero-stage .hero-support {
  color: rgba(244, 255, 250, 0.82);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 34rem;
  margin: 1rem 0 0;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.6rem;
}

.hero-stage .btn-primary {
  background: #f4fffa;
  color: #0a3d38;
}

.hero-stage .btn-primary:hover {
  background: #fff;
}

.hero-stage .btn-secondary {
  background: transparent;
  border-color: rgba(244, 255, 250, 0.35);
  color: #f4fffa;
}

.hero-stage .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.eyebrow {
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  margin: 0;
  color: var(--ink);
}

.page-title {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  margin-bottom: 0.35rem;
}

.features {
  display: grid;
  gap: 0;
  padding: 0.5rem 0 3rem;
  counter-reset: step;
  animation: rise 0.8s var(--ease) 0.08s both;
}

@media (min-width: 800px) {
  .features {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
  }
}

.feature {
  padding: 1.4rem 0;
  border-top: 1px solid var(--line);
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

@media (min-width: 800px) {
  .feature {
    border-top: none;
    border-left: 1px solid var(--line);
    padding: 0.5rem 0 0.5rem 1.4rem;
  }

  .feature:first-child {
    border-left: none;
    padding-left: 0;
  }
}

.feature h3 {
  font-size: 1.25rem;
  margin-bottom: 0.55rem;
  counter-increment: step;
}

.feature h3::before {
  content: counter(step) " · ";
  color: var(--accent);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
}

.feature p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.95rem;
}

.workspace {
  padding: 0.5rem 0 2rem;
}

.workspace-grid {
  display: grid;
  gap: 1rem;
  animation: rise 0.55s var(--ease) both;
}

@media (min-width: 980px) {
  .workspace-grid {
    grid-template-columns: 0.92fr 1.08fr;
    align-items: start;
  }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.15);
  transform-style: preserve-3d;
  transition: transform 0.35s var(--ease), border-color 0.25s ease, box-shadow 0.35s ease;
}

.panel:hover {
  border-color: rgba(61, 219, 192, 0.22);
  box-shadow: var(--shadow), var(--glow);
}

.form-card,
.results-card,
.chart-panel,
.save-prompt,
.auth-card {
  padding: 1.35rem 1.25rem;
}

.form-card h2,
.results-card h2 {
  font-size: 1.55rem;
  margin-bottom: 0.3rem;
}

.lede {
  color: var(--muted);
  margin: 0 0 1.2rem;
  line-height: 1.6;
  font-size: 0.95rem;
}

.stepper {
  display: flex;
  gap: 0.45rem;
  margin: 0 0 1.25rem;
}

.stepper span {
  height: 4px;
  flex: 1;
  border-radius: 99px;
  background: var(--paper-2);
}

.stepper span.is-on {
  background: var(--accent);
}

.field-grid {
  display: grid;
  gap: 0.9rem;
}

@media (min-width: 640px) {
  .field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.field-grid.single {
  grid-template-columns: 1fr;
}

label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-soft);
}

input,
.category-select {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: rgba(7, 9, 13, 0.65);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 0.88rem 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input:hover,
.category-select:hover {
  background: rgba(14, 18, 25, 0.9);
}

input:focus,
.category-select:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(14, 18, 25, 0.95);
  box-shadow: 0 0 0 3px rgba(61, 219, 192, 0.18);
}

.field-error {
  color: var(--danger);
  font-size: 0.75rem;
  min-height: 1em;
  font-weight: 500;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.2rem;
}

.sticky-actions {
  position: sticky;
  bottom: calc(var(--nav-h) + 0.6rem);
  z-index: 20;
  margin-top: 1rem;
  padding: 0.75rem;
  background: rgba(12, 16, 24, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
}

@media (min-width: 860px) {
  .sticky-actions {
    bottom: 1rem;
  }
}

.empty-state,
.status-banner {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1rem;
  color: var(--muted);
  line-height: 1.55;
  background: var(--paper);
}

.status-banner {
  margin-bottom: 1rem;
}

.status-banner.good {
  border-color: rgba(15, 107, 92, 0.25);
  background: var(--good-bg);
  color: var(--good);
}

.status-banner.warn {
  border-color: rgba(154, 103, 0, 0.25);
  background: var(--warn-bg);
  color: var(--warn);
}

.status-banner.danger {
  border-color: rgba(180, 35, 24, 0.2);
  background: var(--danger-bg);
  color: var(--danger);
}

.hidden {
  display: none !important;
}

.score-row,
.results-grid,
.metric-grid {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .score-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 720px) {
  .results-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.results-grid {
  padding: 1rem;
}

.metric,
.metric-card {
  background: rgba(7, 9, 13, 0.45);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.metric-card.accent,
.metric.accent {
  background: var(--accent-soft);
  border-color: rgba(61, 219, 192, 0.28);
}

.metric span,
.metric-label {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin: 0 0 0.35rem;
}

.metric strong,
.metric-value {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.metric-value.small {
  font-size: 1.05rem;
  line-height: 1.35;
  font-family: var(--font-body);
  font-weight: 600;
}

.metric-hint {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.hero-metric {
  padding: 1.4rem 1.25rem;
  margin-bottom: 1rem;
  background:
    radial-gradient(circle at 90% 10%, rgba(61, 219, 192, 0.2), transparent 40%),
    linear-gradient(135deg, rgba(61, 219, 192, 0.08), transparent 55%),
    var(--surface);
}

.hero-metric .metric-value {
  font-size: clamp(2.4rem, 6vw, 3.4rem);
}

.advice-list {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0;
  padding: 0;
  list-style: none;
}

.advice-item {
  background: rgba(7, 9, 13, 0.45);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
}

.advice-item strong {
  display: block;
  margin-bottom: 0.25rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.advice-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.9rem;
}

.chart-wrap {
  margin-top: 1rem;
  background: rgba(7, 9, 13, 0.45);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
}

.footnote {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 1.25rem 0 2rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.auth-card {
  max-width: 26rem;
  margin: 1rem auto 2rem;
  animation: rise 0.55s var(--ease) both;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.3rem;
  margin: 0 0 1.1rem;
  padding: 0.3rem;
  background: var(--paper);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.auth-tab {
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 10px;
  padding: 0.65rem 0.4rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.82rem;
}

.auth-tab.is-active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.user-chip {
  align-self: center;
  color: var(--muted);
  font-size: 0.82rem;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0.35rem 0.7rem;
  background: var(--paper);
  border-radius: 999px;
  border: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 1rem;
}

.section-heading h2 {
  font-size: 1.35rem;
  margin-bottom: 0.3rem;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.92rem;
}

.chart-panel,
.save-prompt {
  margin-bottom: 1rem;
  animation: rise 0.6s var(--ease) both;
}

.save-prompt h3 {
  margin-bottom: 0.4rem;
}

.save-prompt p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 0.85rem;
}

.save-prompt a,
.import-callout a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

#import-advice,
#update-advice {
  list-style: none;
  padding: 0;
}

.import-callout {
  border: 1px solid rgba(61, 219, 192, 0.28);
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
}

.import-callout p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.55;
  font-size: 0.92rem;
}

.file-label {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.file-label input[type="file"] {
  padding: 0.85rem;
  background: var(--paper);
}

.dropzone {
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 1.6rem 1.2rem;
  text-align: center;
  background: var(--paper);
  color: var(--muted);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.dropzone:hover,
.dropzone.is-drag {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
}

.table-wrap {
  overflow-x: auto;
  margin-top: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.tx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.tx-table th,
.tx-table td {
  text-align: left;
  padding: 0.75rem 0.7rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.tx-table th {
  color: var(--muted);
  font-weight: 600;
  background: var(--paper);
  position: sticky;
  top: 0;
}

.tx-table tr:last-child td {
  border-bottom: none;
}

.credit-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 720px) {
  .credit-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile bottom nav — modern app pattern */
.mobile-nav {
  position: fixed;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 50;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.15rem;
  padding: 0.45rem;
  background: rgba(10, 14, 22, 0.92);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(16px);
}

@media (min-width: 860px) {
  .mobile-nav {
    display: none;
  }
}

.mobile-nav a {
  display: grid;
  justify-items: center;
  gap: 0.2rem;
  padding: 0.45rem 0.2rem;
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
}

.mobile-nav a svg {
  width: 1.15rem;
  height: 1.15rem;
}

.mobile-nav a.is-active,
.mobile-nav a:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-8px);
  }
}

@keyframes orb-float {
  from {
    transform: rotateX(18deg) rotateY(-22deg) translateY(0);
  }
  to {
    transform: rotateX(22deg) rotateY(-16deg) translateY(-14px);
  }
}

@keyframes score-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(61, 219, 192, 0.35), 0 20px 50px rgba(0, 0, 0, 0.4);
  }
  50% {
    box-shadow: 0 0 0 14px rgba(61, 219, 192, 0), 0 20px 50px rgba(0, 0, 0, 0.4);
  }
}

/* —— Command hub / 3D dark extras —— */
.dash-command {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 900px) {
  .dash-command {
    grid-template-columns: 280px 1fr;
    align-items: stretch;
  }
}

.score-orb-wrap {
  display: grid;
  place-items: center;
  padding: 1.5rem 1rem;
  min-height: 240px;
}

.score-orb {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  display: grid;
  place-content: center;
  text-align: center;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.45), transparent 28%),
    radial-gradient(circle at 50% 55%, #4ae8cb 0%, #1a6b62 42%, #0a1a28 70%);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45), 0 0 60px rgba(61, 219, 192, 0.28);
  transform: rotateX(18deg) rotateY(-14deg);
  animation: score-pulse 4.5s ease-in-out infinite, orb-float 9s ease-in-out infinite alternate;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.score-orb .metric-label {
  color: rgba(244, 255, 250, 0.75);
  margin: 0;
}

.score-orb .metric-value {
  color: #fff;
  font-size: 2.6rem;
  margin: 0.15rem 0;
}

.score-orb .metric-hint {
  color: rgba(244, 255, 250, 0.65);
  margin: 0;
}

.dash-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
  padding: 0.35rem;
  background: rgba(7, 9, 13, 0.55);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.dash-tab {
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 10px;
  padding: 0.65rem 0.9rem;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
}

.dash-tab.is-active {
  color: var(--ink);
  background: rgba(61, 219, 192, 0.14);
  box-shadow: inset 0 0 0 1px rgba(61, 219, 192, 0.28);
}

.dash-pane {
  display: none;
  animation: rise 0.45s var(--ease) both;
}

.dash-pane.is-active {
  display: block;
}

.continuity-banner {
  border-color: rgba(110, 168, 255, 0.35);
  background: rgba(110, 168, 255, 0.1);
  color: var(--ink-soft);
}

.auth-link-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

.auth-link-row button {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  padding: 0;
}

.mobile-nav a span {
  font-size: 0.68rem;
}

.feature:hover {
  transform: translateY(-2px);
}

code {
  font-size: 0.85em;
  color: var(--accent-2);
}

.select,
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: rgba(7, 9, 13, 0.65);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 0.88rem 0.95rem;
}

input.is-changed,
.field-changed input {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(61, 219, 192, 0.2);
}

.check-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  cursor: pointer;
}

.check-row input {
  width: auto;
  margin-top: 0.35rem;
}

.checklist-item.is-done {
  opacity: 0.55;
}

.checklist-item.is-done strong {
  text-decoration: line-through;
}

.streak-cal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.streak-pill {
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.streak-pill.is-on {
  color: #04110e;
  background: var(--accent);
  border-color: transparent;
}

.quiz-q {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin: 0 0 0.75rem;
}

.quiz-q legend {
  padding: 0 0.35rem;
  font-weight: 600;
}

.quiz-opt {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin: 0.35rem 0;
  color: var(--ink-soft);
}

.quiz-opt input {
  width: auto;
}

.mood-toggle {
  display: grid;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--muted);
  min-width: 7rem;
}

@media (max-width: 860px) {
  .hero-stage::after {
    width: 140px;
    height: 140px;
    right: 6%;
    top: 8%;
    opacity: 0.85;
  }
}

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

/* —— Phases 4–6 + Explore —— */
.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem;
  padding: 0.3rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-top: 0.75rem;
}

.seg {
  border: none;
  background: transparent;
  border-radius: 10px;
  padding: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.seg.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.option-grid {
  display: grid;
  gap: 0.85rem;
  margin: 1rem 0;
}

@media (min-width: 800px) {
  .option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .option-grid.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.option-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: var(--shadow);
  animation: rise 0.5s var(--ease) both;
}

.option-card.tone-caution {
  border-color: rgba(240, 180, 41, 0.4);
  background: linear-gradient(180deg, var(--warn-bg), rgba(18, 24, 36, 0.85));
}

.option-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: start;
  margin-bottom: 0.45rem;
}

.option-top h3 {
  font-size: 1.15rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 0.25rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
  white-space: nowrap;
}

.option-blurb,
.option-reason {
  margin: 0 0 0.75rem;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.9rem;
}

.option-meta {
  display: grid;
  gap: 0.45rem;
  margin: 0 0 0.75rem;
}

.option-meta div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.35rem;
}

.option-meta dt {
  color: var(--muted);
}

.option-meta dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.fit-label {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.fit-bar {
  height: 6px;
  border-radius: 99px;
  background: var(--paper-2);
  overflow: hidden;
  margin-bottom: 0.55rem;
}

.fit-bar span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
}

.pricing-grid {
  display: grid;
  gap: 1rem;
  margin: 1rem 0 2rem;
}

@media (min-width: 800px) {
  .pricing-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.pricing-card {
  padding: 1.4rem;
}

.pricing-card.featured {
  border-color: rgba(61, 219, 192, 0.4);
  background: linear-gradient(180deg, rgba(61, 219, 192, 0.14), rgba(18, 24, 36, 0.9));
}

.price {
  font-family: var(--font-display);
  font-size: 2rem;
  margin: 0.35rem 0 1rem;
}

.check-list {
  margin: 0 0 1.25rem;
  padding-left: 1.1rem;
  color: var(--ink-soft);
  line-height: 1.7;
}

.slider-row {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.slider-row input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.goal-form {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

@media (min-width: 720px) {
  .goal-form {
    grid-template-columns: 1.2fr 0.8fr 0.8fr auto;
    align-items: center;
  }
}

.goals-list,
.goal-item {
  display: grid;
  gap: 0.75rem;
}

.goal-item {
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
}

.report-card {
  margin: 1.25rem auto;
  max-width: 420px;
  padding: 2rem 1.6rem;
  border-radius: 24px;
  background:
    radial-gradient(circle at 80% 10%, rgba(110, 168, 255, 0.35), transparent 35%),
    linear-gradient(155deg, #0d3d38 0%, #0a1a28 45%, #0d1524 100%);
  color: #f4fffa;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), var(--glow);
  transform: rotateX(4deg);
}

.report-brand {
  margin: 0 0 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.report-card h1 {
  color: #fff;
  font-size: 3.4rem;
  margin: 0;
}

.report-label {
  margin: 0.25rem 0 1rem;
  opacity: 0.8;
}

.report-insight {
  font-size: 1.15rem;
  line-height: 1.45;
  margin: 0 0 0.75rem;
}

.report-money {
  font-weight: 600;
  margin: 0 0 1.25rem;
}

.report-foot {
  margin: 0;
  font-size: 0.78rem;
  opacity: 0.7;
}

.toggle-row {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.5rem 0 1rem;
}

.prose h3 {
  margin: 1.4rem 0 0.45rem;
  font-size: 1.15rem;
}

.prose p {
  color: var(--ink-soft);
  line-height: 1.7;
}

.landing-cta {
  margin: 0 0 2rem;
  padding: 1.5rem;
}

.shell-pad {
  padding-bottom: 2rem;
}

@media print {
  .topbar,
  .mobile-nav,
  .toggle-row,
  .nav-actions {
    display: none !important;
  }
  .report-card {
    box-shadow: none;
  }
}

/* ═══════════════════════════════════════════
   Eledra-inspired landing (Rivu)
   Editorial dark · manifesto · cinematic hero
   ═══════════════════════════════════════════ */

body.landing-eledra {
  --paper: #050505;
  --ink: #f4f4f1;
  --ink-soft: #c8c8c2;
  --muted: #8a8a84;
  --accent: #c8f54a;
  --accent-hover: #d6ff6a;
  background: #050505;
  background-image: none;
  padding-bottom: 0;
  perspective: none;
}

body.landing-eledra .mobile-nav {
  display: none !important;
}

.eland-shell {
  width: 100%;
  max-width: none;
  margin: 0;
}

.eland-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem clamp(1rem, 3vw, 2rem);
  pointer-events: none;
}

.eland-nav > * {
  pointer-events: auto;
}

.eland-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.03em;
  text-transform: lowercase;
  color: #fff;
  justify-self: start;
}

.eland-logo-mark {
  opacity: 0.7;
  font-weight: 500;
}

.eland-links {
  display: none;
  gap: 0.15rem;
  padding: 0.35rem;
  border-radius: 999px;
  background: rgba(12, 12, 12, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px) saturate(1.2);
}

@media (min-width: 900px) {
  .eland-links {
    display: inline-flex;
  }
}

.eland-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.eland-links a span {
  color: rgba(255, 255, 255, 0.35);
  font-weight: 500;
}

.eland-links a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.eland-cta {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1rem;
  background: #fff;
  color: #050505;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: transform 0.2s var(--ease), background 0.2s ease;
}

.eland-cta:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

.eland-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-content: end;
  padding: clamp(1.5rem, 4vw, 3rem);
  padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
  overflow: hidden;
  isolation: isolate;
}

.eland-hero-stage {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 50% 40% at 50% 58%, rgba(200, 245, 74, 0.12), transparent 55%),
    linear-gradient(180deg, rgba(5, 5, 5, 0.15) 0%, rgba(5, 5, 5, 0.35) 45%, rgba(5, 5, 5, 0.92) 100%),
    radial-gradient(ellipse 80% 60% at 50% 100%, #0a1f14 0%, transparent 55%),
    linear-gradient(165deg, #0b1210 0%, #050805 40%, #020302 100%);
}

.eland-monolith {
  position: absolute;
  left: 50%;
  top: 42%;
  width: min(18vw, 120px);
  height: min(42vh, 320px);
  transform: translate(-50%, -50%);
  background:
    linear-gradient(180deg, rgba(230, 255, 160, 0.95) 0%, rgba(180, 230, 60, 0.55) 35%, rgba(40, 80, 30, 0.15) 100%);
  box-shadow:
    0 0 80px rgba(200, 245, 74, 0.45),
    0 0 160px rgba(200, 245, 74, 0.2),
    inset 0 0 40px rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  animation: monolith-pulse 7s ease-in-out infinite alternate;
  clip-path: polygon(18% 0, 82% 0, 100% 100%, 0 100%);
}

.eland-mist {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 70%, rgba(20, 40, 30, 0.5), transparent 40%),
    radial-gradient(circle at 70% 65%, rgba(15, 35, 25, 0.45), transparent 38%);
  animation: drift 14s ease-in-out infinite alternate;
}

.eland-water {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38%;
  background:
    linear-gradient(180deg, transparent, rgba(8, 20, 16, 0.85)),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 40px,
      rgba(200, 245, 74, 0.03) 40px,
      rgba(200, 245, 74, 0.03) 41px
    );
  mask-image: linear-gradient(180deg, transparent, #000 40%);
}

.eland-hero-copy {
  max-width: 28rem;
  animation: rise 0.9s var(--ease) both;
}

.eland-brand {
  margin: 0;
  font-family: var(--font-brand);
  font-weight: 800;
  font-size: clamp(3.2rem, 9vw, 5.8rem);
  letter-spacing: -0.06em;
  line-height: 0.95;
  color: #fff;
}

.eland-pillars {
  list-style: none;
  margin: 1.35rem 0 1.75rem;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.eland-pillars li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: rgba(244, 244, 241, 0.82);
  font-size: 0.95rem;
  font-weight: 500;
}

.eland-pillars li::before {
  content: "";
  width: 1.1rem;
  height: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 2px;
  background:
    linear-gradient(135deg, transparent 40%, var(--accent) 40% 60%, transparent 60%);
  flex-shrink: 0;
  opacity: 0.85;
}

.eland-ghost {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 2px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.eland-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: #fff;
}

.eland-manifesto {
  padding: clamp(4rem, 12vw, 8rem) clamp(1.25rem, 6vw, 5rem);
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.eland-kicker {
  margin: 0 0 1.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.eland-quote {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.4rem, 6.5vw, 4.6rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: #f7f7f4;
  max-width: 16ch;
  margin-inline: auto;
}

.eland-quote em {
  font-style: italic;
  color: #6f6f68;
  font-weight: 500;
}

.eland-attr {
  margin: 1.75rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.eland-quotes {
  display: grid;
  gap: 1rem;
  padding: 0 clamp(1.25rem, 4vw, 3rem) clamp(3rem, 8vw, 5rem);
  max-width: 1100px;
  margin: 0 auto;
}

@media (min-width: 820px) {
  .eland-quotes {
    grid-template-columns: 1fr 1fr;
  }
}

.eland-quote-card {
  background: #0b0b0b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 1.5rem 1.35rem 1.25rem;
  display: grid;
  gap: 1.25rem;
  transition: border-color 0.25s ease, transform 0.25s var(--ease);
}

.eland-quote-card:hover {
  border-color: rgba(200, 245, 74, 0.28);
  transform: translateY(-2px);
}

.eland-quote-card > p {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: #ecece7;
}

.eland-quote-card > p::before {
  content: "\201C";
  display: block;
  font-size: 2.4rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.22);
  margin-bottom: 0.35rem;
}

.eland-quote-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.eland-avatar {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 700;
  font-size: 0.85rem;
}

.eland-quote-meta strong {
  display: block;
  font-size: 0.9rem;
}

.eland-quote-meta small {
  color: var(--muted);
  font-size: 0.75rem;
}

.eland-quote-card > a {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
  font-weight: 600;
}

.eland-quote-card > a:hover {
  color: var(--accent);
}

.eland-build {
  padding: clamp(3rem, 8vw, 6rem) clamp(1.25rem, 4vw, 3rem);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  max-width: 1100px;
  margin: 0 auto;
}

.eland-build-head {
  margin-bottom: 2rem;
  max-width: 36rem;
}

.eland-build-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  letter-spacing: -0.03em;
  font-weight: 500;
  margin: 0;
  color: #f4f4f1;
}

.eland-foundations {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 900px) {
  .eland-foundations {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.eland-foundation {
  display: grid;
  gap: 0.75rem;
  padding: 1.35rem 1.2rem 1.2rem;
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  min-height: 100%;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.eland-foundation:hover {
  border-color: rgba(200, 245, 74, 0.35);
  background: #0e0e0c;
}

.eland-f-meta {
  margin: 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.eland-f-meta span {
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.35);
}

.eland-foundation h3 {
  margin: 0;
  font-family: var(--font-brand);
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  color: #fff;
}

.eland-foundation p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.92rem;
}

.eland-f-link {
  margin-top: 0.5rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  font-size: 0.88rem;
}

.eland-foundation:hover .eland-f-link {
  color: var(--accent);
}

.eland-closing {
  padding: clamp(4rem, 10vw, 7rem) clamp(1.25rem, 4vw, 3rem);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.eland-closing h2 {
  margin: 0 auto;
  max-width: 14ch;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: #f7f7f4;
}

.eland-lede {
  margin: 1.25rem auto 0;
  max-width: 34rem;
  color: var(--muted);
  line-height: 1.65;
}

.eland-closing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.75rem;
}

.eland-closing-actions .eland-cta {
  justify-self: auto;
}

.eland-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem clamp(1.25rem, 4vw, 3rem) 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 0.82rem;
}

.eland-footer a {
  margin-left: 1rem;
  color: rgba(255, 255, 255, 0.55);
}

.eland-footer a:hover {
  color: var(--accent);
}

@keyframes monolith-pulse {
  from {
    filter: brightness(0.92);
    box-shadow:
      0 0 60px rgba(200, 245, 74, 0.35),
      0 0 120px rgba(200, 245, 74, 0.15),
      inset 0 0 40px rgba(255, 255, 255, 0.2);
  }
  to {
    filter: brightness(1.08);
    box-shadow:
      0 0 100px rgba(200, 245, 74, 0.55),
      0 0 180px rgba(200, 245, 74, 0.25),
      inset 0 0 50px rgba(255, 255, 255, 0.3);
  }
}

@media (max-width: 899px) {
  .eland-nav {
    grid-template-columns: 1fr auto;
  }
  .eland-hero-copy {
    max-width: 100%;
  }
  .eland-monolith {
    width: 72px;
    height: 200px;
    top: 36%;
  }
}
