/* ── VeteranCalc shared design system — newlanding UI ────────────────────────
   All pages link to this file. Page-specific styles stay inline.           */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Design tokens — newlanding palette ── */
:root {
  --ink: #1a1a18;
  --ink-2: #3d3d39;
  --ink-3: #6b6b65;
  --ink-4: #9a9a92;
  --rule: #e4e2d8;
  --rule-light: #f0ede4;
  --page: #faf8f2;
  --white: #ffffff;
  /* legacy aliases kept so old inline styles still resolve */
  --accent: #1a3a5c;
  --accent-light: #e8eef5;
  --green: #1a4a2e;
  --green-bg: #e8f2ec;
  --amber: #5c3a0e;
  --amber-bg: #f5edde;
  --gray-bg: #f0ede4;
  --gray-text: #5f5e58;
  --danger: #8b1a1a;
  --danger-bg: #f5e8e8;
  /* new tokens from newlanding */
  --navy: #1a3a5c;
  --navy-deep: #0f2542;
  --navy-light: #e8eef5;
  --brass: #b08a3e;
  --brass-bg: #f5edd8;
  --field: #4a5542;
  --field-bg: #edefe7;
  --serif: "Libre Baskerville", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

/* ── Base ── */
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--page);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Sticky Nav (newlanding style) ── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,248,242,0.92);
  backdrop-filter: saturate(1.1) blur(10px);
  -webkit-backdrop-filter: saturate(1.1) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo-mark {
  width: 28px; height: 28px; border-radius: 6px;
  background: transparent;
  color: #fff; display: grid; place-items: center;
  font-family: var(--serif); font-size: 13px; font-weight: 700;
  letter-spacing: 0.02em;
}
.logo-mark svg { width: 22px; height: 22px; }
.logo-text { font-family: var(--serif); font-size: 17px; letter-spacing: -0.01em; color: var(--ink); }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a, .nav-links button {
  font-size: 13.5px; color: var(--ink-2); text-decoration: none;
  font-weight: 500; background: none; border: none; cursor: pointer;
  font-family: var(--sans);
}
.nav-links a:hover, .nav-links button:hover { color: var(--navy); }
.nav-cta,
.nav-links a.nav-cta {
  padding: 9px 16px;
  background: var(--navy) !important; color: #fff !important;
  border-radius: 8px; font-size: 13.5px; font-weight: 500;
  border: none; cursor: pointer; text-decoration: none;
  font-family: var(--sans);
  display: inline-block;
}
.nav-cta:hover,
.nav-links a.nav-cta:hover { background: var(--navy-deep) !important; color: #fff !important; }
@media (max-width: 720px) {
  .nav-links a:not(.nav-cta), .nav-links button:not(.nav-cta) { display: none; }
}

/* ── Legacy header (kept for pages that still use .site-header) ── */
.site-header { border-bottom: 1px solid var(--rule); background: var(--white); padding: 0 2rem; position: sticky; top: 0; z-index: 101; }
.header-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 60px; }

/* ── Header nav links ── */
.header-nav-link {
  background: none; border: none; padding: 0;
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  color: var(--navy); cursor: pointer; white-space: nowrap;
  text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: rgba(26,58,92,0.35);
  letter-spacing: 0.01em;
  transition: text-decoration-color 0.15s, color 0.15s;
}
.header-nav-link:hover { text-decoration-color: var(--navy); color: var(--ink); }
.header-back-link { font-size: 13px; color: var(--ink-4); text-decoration: none; display: flex; align-items: center; gap: 5px; transition: color 0.15s; margin-left: auto; }
.header-back-link:hover { color: var(--ink); }

/* ── Site footer ── */
.site-footer-bar {
  border-top: 1px solid var(--rule);
  max-width: 1180px; margin: 0 auto;
  padding: 28px 28px 40px;
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  align-items: center;
  font-size: 12.5px; color: var(--ink-4);
}
.site-footer-bar a { color: var(--ink-4); text-decoration: none; }
.site-footer-bar a:hover { color: var(--navy); }
.site-disclaimer {
  width: 100%;
  font-size: 11.5px; color: var(--ink-4);
  line-height: 1.5; margin-top: 4px;
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 15px 24px;
  background: var(--navy); color: #fff;
  font-family: var(--sans); font-size: 15px; font-weight: 500;
  border: none; border-radius: 10px; cursor: pointer;
  text-decoration: none;
  transition: transform 0.08s, background 0.15s;
}
.btn-primary:hover { background: var(--navy-deep); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 15px 22px;
  background: transparent; color: var(--ink);
  font-family: var(--sans); font-size: 15px; font-weight: 500;
  border: 1.5px solid var(--rule); border-radius: 10px; cursor: pointer;
  text-decoration: none;
}
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); }

/* ── Section chrome ── */
.section-kicker {
  font-size: 11px; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--navy);
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--serif); font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 400; line-height: 1.1;
  letter-spacing: -0.015em; color: var(--ink);
  max-width: 720px; margin-bottom: 12px; text-wrap: balance;
}
.section-lede {
  font-size: 16px; color: var(--ink-3); max-width: 620px; line-height: 1.55;
}

/* ── Eyebrow pill ── */
.eyebrow-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--navy);
  padding: 6px 12px; background: var(--navy-light);
  border-radius: 999px; margin-bottom: 18px;
}
.eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brass); flex-shrink: 0; }

/* ── Result / report shared styles ── */
.result-section { display: none; margin-top: 3rem; }
.result-section.active { display: block; }

/* report card pieces */
.report-header { margin-bottom: 20px; }
.report-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.meta-pill {
  font-size: 11px; font-weight: 500;
  background: var(--navy-light); color: var(--navy);
  padding: 4px 10px; border-radius: 999px;
}
.report-date { font-size: 12.5px; color: var(--ink-4); margin-top: 4px; }

.combined-rating-banner {
  background: var(--navy); border-radius: 14px;
  padding: 22px 28px; margin-bottom: 20px;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.combined-rating-label {
  font-size: 10px; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(255,255,255,0.6); margin-bottom: 4px;
}
.combined-rating-value {
  font-family: var(--serif); font-size: 48px; font-weight: 400;
  color: #fff; line-height: 1; margin-bottom: 4px;
}
.combined-rating-value span { font-size: 24px; color: rgba(255,255,255,0.55); }
.combined-rating-sub { font-size: 12px; color: rgba(255,255,255,0.55); margin-top: 4px; }
.combined-rating-comp { display: flex; align-items: baseline; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.combined-rating-comp-amount {
  font-family: var(--serif); font-size: 20px; font-weight: 400;
  color: var(--brass); line-height: 1;
}
.combined-rating-comp-label { font-size: 11px; color: rgba(255,255,255,0.5); line-height: 1.4; }
.combined-rating-disclaimer { font-size: 11.5px; color: rgba(255,255,255,0.45); max-width: 280px; line-height: 1.5; }

.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.stat-card {
  background: var(--white); border: 1px solid var(--rule);
  border-radius: 12px; padding: 16px 18px;
  display: flex; align-items: flex-start; gap: 14px;
}
.stat-left { min-width: 0; }
.stat-num { font-family: var(--serif); font-size: 32px; font-weight: 400; color: var(--ink); line-height: 1; }
.stat-lbl { font-size: 11.5px; color: var(--ink-4); margin-top: 3px; line-height: 1.4; }
.stat-right { flex: 1; min-width: 0; }
.claims-list { display: flex; flex-direction: column; gap: 4px; }
.claims-list-item { font-size: 12.5px; color: var(--ink-3); line-height: 1.4; padding: 4px 0; border-bottom: 1px dashed var(--rule); }
.claims-list-item:last-child { border-bottom: none; }

.summary-box {
  background: var(--navy-light); border-left: 3px solid var(--navy);
  padding: 14px 18px; border-radius: 0 10px 10px 0; margin-bottom: 20px;
}
.summary-label {
  font-size: 10px; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--navy); margin-bottom: 6px;
}
.summary-box p { font-size: 14px; color: var(--ink-2); line-height: 1.65; }

.section-label {
  font-size: 10px; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-4);
  margin: 20px 0 10px; padding-bottom: 8px;
  border-bottom: 1px solid var(--rule-light);
}

.claim-card {
  background: var(--white); border: 1px solid var(--rule);
  border-radius: 12px; padding: 18px 20px; margin-bottom: 10px;
}
.claim-title { font-family: var(--serif); font-size: 17px; font-weight: 400; color: var(--ink); line-height: 1.3; margin-bottom: 3px; }
.claim-dc { font-size: 11px; color: var(--ink-4); margin-bottom: 8px; font-family: var(--mono); }
.claim-body { font-size: 14px; color: var(--ink-3); line-height: 1.65; margin-bottom: 10px; }
.evidence-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.ev-pill { font-size: 11.5px; background: var(--rule-light); color: var(--ink-3); border-radius: 6px; padding: 3px 9px; border: 1px solid var(--rule); }
.theory-pill { font-size: 11.5px; background: var(--navy-light); color: var(--navy); border-radius: 6px; padding: 3px 9px; border: 1px solid var(--navy-light); font-weight: 500; }

.criteria-section { margin-top: 12px; border-top: 1px dashed var(--rule); padding-top: 12px; }
.criteria-cp-note { font-size: 12px; color: var(--ink-4); font-style: italic; margin-bottom: 10px; line-height: 1.5; }
.criteria-level { border-bottom: 1px solid var(--rule-light); padding-bottom: 6px; margin-bottom: 6px; }
.criteria-level:last-child { border-bottom: none; }
.criteria-level-header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.criteria-pct { font-family: var(--serif); font-size: 18px; color: var(--navy); min-width: 44px; flex-shrink: 0; line-height: 1; }
.criteria-level-label { font-size: 10px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-4); }
.criteria-bullets { padding-left: 56px; }
.criteria-bullet { font-size: 13px; color: var(--ink-3); line-height: 1.65; padding: 2px 0; }

/* loading / error */
.loading-state { display: none; padding: 3rem; text-align: center; }
.loading-state.active { display: block; }
.spinner-wrap { display: flex; align-items: flex-start; gap: 20px; max-width: 480px; margin: 0 auto; text-align: left; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--rule); border-top-color: var(--navy); border-radius: 50%; animation: spin 0.8s linear infinite; flex-shrink: 0; margin-top: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner-wrap h3 { font-family: var(--serif); font-size: 20px; font-weight: 400; color: var(--ink); margin-bottom: 6px; }
.spinner-wrap p { font-size: 14px; color: var(--ink-3); line-height: 1.6; }
.error-box { display: none; padding: 14px 18px; background: #f5e8e8; border: 1px solid #e5c0c0; border-radius: 10px; font-size: 14px; color: #8b1a1a; margin: 10px 0; max-width: 620px; width: 100%; }
.error-box.active { display: block; }

/* doc pages (terms / privacy) */
.page-wrap { max-width: 760px; margin: 0 auto; padding: 3.5rem 2rem 5rem; }
.doc-eyebrow {
  font-size: 11px; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--navy); margin-bottom: 0.75rem;
}
.doc-title { font-family: var(--serif); font-size: clamp(26px, 4vw, 36px); font-weight: 400; color: var(--ink); margin-bottom: 0.5rem; line-height: 1.15; }
.doc-date { font-size: 13px; color: var(--ink-4); margin-bottom: 2.5rem; }
.doc-section { margin-bottom: 2.25rem; }
.doc-section h2 { font-family: var(--serif); font-size: 20px; font-weight: 400; color: var(--ink); margin-bottom: 0.6rem; }
.doc-section p, .doc-section li { font-size: 14.5px; color: var(--ink-2); line-height: 1.75; }
.doc-section ul { padding-left: 1.5rem; margin-top: 0.5rem; }
.doc-section li { margin-bottom: 0.35rem; }
.doc-section a { color: var(--navy); }
.doc-divider { height: 1px; background: var(--rule); margin: 2.5rem 0; }
