/* Severance.help design system
   Tone: calm, intelligent, empowering, factual. Never alarmist.
   Inter carries the UI; Source Serif 4 carries editorial headings so content
   pages read as a publication rather than a landing page. */

:root {
  --color-primary: #17293F;
  --color-primary-dark: #0D1B2B;
  --color-primary-light: #2A4763;
  --color-accent: #0F766E;
  --color-accent-dark: #0B5A54;
  --color-link: #1D4ED8;
  --color-link-dark: #1E40AF;

  /* Offer-strength scale. Deliberately not a red/green alarm scale: a weak
     offer is an opportunity for the user, not a catastrophe. */
  --color-weak: #B45309;
  --color-weak-bg: #FEF3C7;
  --color-fair: #1D4ED8;
  --color-fair-bg: #DBEAFE;
  --color-strong: #15803D;
  --color-strong-bg: #DCFCE7;
  --color-review: #7C3AED;
  --color-review-bg: #EDE9FE;

  --color-bg: #FFFFFF;
  --color-bg-soft: #F7F9FB;
  --color-bg-muted: #EDF1F6;
  --color-ink: #0F1A28;
  --color-text: #23364C;
  --color-text-muted: #5A6B80;
  --color-border: #DFE6EE;
  --color-border-strong: #C3CFDC;

  --shadow-sm: 0 1px 2px rgba(23, 41, 63, 0.06);
  --shadow-md: 0 4px 14px rgba(23, 41, 63, 0.08);
  --shadow-lg: 0 18px 44px rgba(23, 41, 63, 0.13);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --max-width: 1160px;
  --max-prose: 720px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--color-link); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 3px;
}

img, svg { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  color: var(--color-primary);
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.18;
  margin: 0 0 0.5em;
}
h1 { font-family: var(--font-serif); font-size: clamp(2.1rem, 4.4vw, 3.1rem); letter-spacing: -0.015em; }
h2 { font-family: var(--font-serif); font-size: clamp(1.55rem, 2.9vw, 2.1rem); margin-top: 0; }
h3 { font-size: 1.22rem; }
h4 { font-size: 1.04rem; }

p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.35em; }
li { margin-bottom: 0.45em; }
strong { color: var(--color-ink); font-weight: 650; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 820px; margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--color-primary); color: #fff; padding: 12px 18px; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; }
.nav-logo { display: flex; align-items: center; font-family: var(--font-serif); font-size: 1.32rem; font-weight: 700; color: var(--color-primary); letter-spacing: -0.02em; }
.nav-logo:hover { text-decoration: none; }
.nav-logo .dot { color: var(--color-accent); }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--color-text); font-size: 0.91rem; font-weight: 500; white-space: nowrap;
}
.nav-links a:hover { background: var(--color-bg-muted); text-decoration: none; }
.nav-links a.active { color: var(--color-primary); font-weight: 650; }
.nav-links a.btn { color: #fff; }
.nav-links a.btn:hover { background: var(--color-accent-dark); }
.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0;
  padding: 10px; cursor: pointer;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--color-primary); border-radius: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 11px 20px; border-radius: var(--radius-md);
  font-size: 0.95rem; font-weight: 600; text-align: center; cursor: pointer;
  border: 1px solid transparent; transition: background-color .15s ease, border-color .15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--color-primary); border-color: var(--color-border-strong); }
.btn-outline:hover { background: var(--color-bg-muted); }
.btn-lg { padding: 15px 30px; font-size: 1.05rem; }
.btn-block { display: block; width: 100%; }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(170deg, #F7F9FB 0%, #EDF1F6 100%); border-bottom: 1px solid var(--color-border); padding: 68px 0 76px; }
.hero-inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-block; margin-bottom: 16px; padding: 5px 12px;
  background: #fff; border: 1px solid var(--color-border);
  border-radius: 999px; font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.02em; color: var(--color-accent-dark); box-shadow: var(--shadow-sm);
}
.hero h1 { margin-bottom: 18px; }
.lead { font-size: 1.15rem; color: var(--color-text); margin-bottom: 26px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-note { margin: 16px 0 0; font-size: 0.9rem; color: var(--color-text-muted); }

/* ---------- Sections ---------- */
.section { padding: 68px 0; }
.section-soft { background: var(--color-bg-soft); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.section-head { max-width: 700px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--color-text-muted); font-size: 1.06rem; margin-bottom: 0; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.card-link { display: block; color: inherit; }
.card-link:hover { text-decoration: none; border-color: var(--color-border-strong); box-shadow: var(--shadow-md); }
.card-link h3 { color: var(--color-link); }
.card-kicker { font-size: 0.78rem; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-muted); margin-bottom: 8px; }

.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 28px; margin-bottom: 10px; }
.checklist li::before {
  content: ""; position: absolute; left: 4px; top: 0.62em;
  width: 8px; height: 8px; border-radius: 50%; background: var(--color-accent);
}

/* ---------- Sample assessment panel ---------- */
.sample-report {
  background: #fff; border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden;
}
.sample-report-head {
  background: var(--color-primary); color: #fff; padding: 14px 24px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
}
.sample-report-body { padding: 24px; }
.sample-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 22px; }
.metric { background: var(--color-bg-soft); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 14px 16px; }
.metric-label { font-size: 0.73rem; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase; color: var(--color-text-muted); margin-bottom: 5px; }
.metric-value { font-size: 1.4rem; font-weight: 700; color: var(--color-primary); font-family: var(--font-serif); line-height: 1.15; }

.badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
}
.badge-weak { background: var(--color-weak-bg); color: var(--color-weak); }
.badge-fair { background: var(--color-fair-bg); color: var(--color-fair); }
.badge-strong { background: var(--color-strong-bg); color: var(--color-strong); }
.badge-review { background: var(--color-review-bg); color: var(--color-review); }
.badge-lg { font-size: 0.95rem; padding: 6px 15px; }

.factor-list { list-style: none; padding: 0; margin: 0 0 18px; font-size: 0.95rem; }
.factor-list li { position: relative; padding-left: 26px; margin-bottom: 8px; }
.factor-list li::before { content: "\2191"; position: absolute; left: 2px; top: 0; color: var(--color-strong); font-weight: 700; }
.factor-list.down li::before { content: "\2193"; color: var(--color-weak); }
.factor-list.review li::before { content: "?"; color: var(--color-review); }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  background: var(--color-bg-muted); border: 1px solid var(--color-border);
  border-radius: 999px; padding: 5px 12px; font-size: 0.86rem; color: var(--color-text);
}

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; gap: 24px; grid-template-columns: repeat(4, 1fr); }
.step { position: relative; padding-top: 46px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 0; left: 0;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--color-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.95rem;
}
.step h3 { font-size: 1.08rem; margin-bottom: 6px; }
.step p { font-size: 0.95rem; color: var(--color-text-muted); margin-bottom: 0; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--color-primary); color: #fff; padding: 60px 0; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #C9D6E4; font-size: 1.08rem; max-width: 620px; margin: 0 auto 26px; }
.cta-band .btn-primary { background: #fff; color: var(--color-primary); }
.cta-band .btn-primary:hover { background: #E8EEF4; color: var(--color-primary); }

/* Inline CTA used inside articles */
.cta-inline {
  background: var(--color-bg-soft); border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-md); padding: 24px 26px; margin: 34px 0;
}
.cta-inline h3 { margin-bottom: 8px; }
.cta-inline p { margin-bottom: 16px; color: var(--color-text); }
.cta-inline p:last-child { margin-bottom: 0; }

/* ---------- Article layout ---------- */
.article-header { border-bottom: 1px solid var(--color-border); padding: 32px 0 30px; background: var(--color-bg-soft); }
.article-header h1 { margin-bottom: 14px; }
.article-standfirst { font-size: 1.15rem; color: var(--color-text); max-width: var(--max-prose); margin-bottom: 18px; }
.article-meta { font-size: 0.87rem; color: var(--color-text-muted); display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; }
.article-meta a { color: var(--color-text-muted); text-decoration: underline; }

.breadcrumbs { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 16px; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: 8px; color: var(--color-border-strong); }
.breadcrumbs a { color: var(--color-text-muted); }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; padding: 44px 0 68px; align-items: start; }
.article-body { max-width: var(--max-prose); font-size: 1.06rem; }
.article-body h2 { margin-top: 2em; }
.article-body h3 { margin-top: 1.7em; }
.article-body > h2:first-child { margin-top: 0; }
.article-body a { text-decoration: underline; }

.answer-box {
  background: var(--color-bg-soft); border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg); padding: 24px 26px; margin-bottom: 32px;
}
.answer-box p:last-child { margin-bottom: 0; }
.answer-box .card-kicker { color: var(--color-accent-dark); }

.sidebar { position: sticky; top: 92px; font-size: 0.95rem; }
.sidebar-card { background: var(--color-bg-soft); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 22px; margin-bottom: 20px; }
.sidebar-card h3 { font-size: 1rem; margin-bottom: 12px; }
.sidebar-card ul { list-style: none; padding: 0; margin: 0; }
.sidebar-card li { margin-bottom: 9px; }
.toc a { color: var(--color-text); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 0 1.6em; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 0.96rem; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--color-border); vertical-align: top; }
th { background: var(--color-bg-soft); font-weight: 650; color: var(--color-primary); }
tbody tr:last-child td { border-bottom: 0; }
caption { caption-side: bottom; padding-top: 10px; font-size: 0.85rem; color: var(--color-text-muted); text-align: left; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--color-border); }
.faq details { border-bottom: 1px solid var(--color-border); }
.faq summary {
  cursor: pointer; padding: 16px 0; font-weight: 650; color: var(--color-primary);
  font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--color-accent); font-weight: 700; flex-shrink: 0; }
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding-bottom: 16px; }
.faq details > div > p:last-child { margin-bottom: 0; }

/* ---------- Calculator ---------- */
.calc { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); overflow: hidden; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; }
.calc-inputs { padding: 28px; border-right: 1px solid var(--color-border); }
.calc-outputs { padding: 28px; background: var(--color-bg-soft); }
.calc-outputs h3 { margin-bottom: 14px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 0.92rem; color: var(--color-primary); margin-bottom: 6px; }
.field .hint { font-size: 0.84rem; color: var(--color-text-muted); margin: 5px 0 0; }
.field input, .field select {
  width: 100%; padding: 11px 13px; font-family: inherit; font-size: 1rem; color: var(--color-ink);
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm); background: #fff;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.input-prefix { position: relative; }
.input-prefix .prefix { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--color-text-muted); pointer-events: none; }
.input-prefix input { padding-left: 28px; }

.result-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--color-border); }
.result-row:last-of-type { border-bottom: 0; }
.result-label { color: var(--color-text-muted); font-size: 0.95rem; }
.result-value { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 700; color: var(--color-primary); text-align: right; }
.result-total { border-top: 2px solid var(--color-primary); border-bottom: 0; margin-top: 6px; padding-top: 14px; }
.result-total .result-value { font-size: 1.6rem; }
.calc-context { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--color-border); font-size: 0.95rem; }
.calc-context p:last-child { margin-bottom: 0; }

/* ---------- Disclosure ---------- */
.disclaimer {
  background: var(--color-bg-muted); border-radius: var(--radius-md);
  padding: 16px 18px; font-size: 0.88rem; color: var(--color-text-muted); margin: 28px 0 0;
}
.disclaimer p:last-child { margin-bottom: 0; }
.disclaimer strong { color: var(--color-text); }

/* ---------- Sources ---------- */
.sources { margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--color-border); font-size: 0.92rem; }
.sources h2 { font-size: 1.15rem; font-family: var(--font-sans); margin-top: 0; }
.sources ol { padding-left: 1.2em; color: var(--color-text-muted); }

/* ---------- Related links ---------- */
.related { margin-top: 40px; padding-top: 26px; border-top: 1px solid var(--color-border); }
.related h2 { font-size: 1.2rem; font-family: var(--font-sans); margin-top: 0; margin-bottom: 14px; }
.related ul { list-style: none; padding: 0; display: grid; gap: 8px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-primary-dark); color: #A9BACB; padding: 54px 0 28px; font-size: 0.92rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; margin-bottom: 36px; }
.site-footer h4 { color: #fff; font-size: 0.8rem; letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #A9BACB; }
.site-footer a:hover { color: #fff; }
.footer-brand { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 700; color: #fff; margin-bottom: 10px; }
.footer-brand .dot { color: var(--color-accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 22px; font-size: 0.86rem; color: #8296AB; }
.footer-bottom p { margin-bottom: 0.6em; }

/* ---------- Utilities ---------- */
.text-muted { color: var(--color-text-muted); }
.mb-0 { margin-bottom: 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .nav-links a { padding: 8px 7px; font-size: 0.87rem; }
}

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .article-layout { grid-template-columns: 1fr; gap: 0; }
  .sidebar { position: static; margin-top: 40px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--color-border);
    padding: 10px 16px 16px; box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 8px; font-size: 1rem; }
  .nav-links .btn { margin-top: 8px; text-align: center; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .grid-2, .grid-3, .grid-4, .steps { grid-template-columns: 1fr; }
  .calc-grid { grid-template-columns: 1fr; }
  .calc-inputs { border-right: 0; border-bottom: 1px solid var(--color-border); }
  .sample-metrics { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  .hero { padding: 44px 0 52px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
}

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

@media print {
  .site-header, .site-footer, .cta-band, .cta-inline, .sidebar { display: none; }
  .article-layout { grid-template-columns: 1fr; }
}
