:root {
  --bg-cream: #eee6d7;
  --text-navy: #241e18;
  --text-muted: #584e40;
  --border-color: #d0bea0;
  --border-light: #ded1bb;
  --accent-amber: #d9ba78;
  --accent-hover: #e9d29e;
  --surface-white: #fbf8f1;
  --surface-muted: #f2eadb;
  --focus-ring: #9f762f;

  --font-sans: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'Manrope', sans-serif;
  --font-mono: 'Space Mono', monospace;

  --radius-sm: 0.25rem;
  --radius-md: 0.45rem;
  --radius-lg: 0.75rem;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.04);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.05);

  --max-width: 1200px;
  --content-width: 760px;
}

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

html {
  scroll-behavior: smooth;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-cream);
  color: var(--text-navy);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.045em;
  color: var(--text-navy);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 200;
  background: var(--text-navy);
  color: white;
  padding: .6rem 1rem;
}
.skip-link:focus { top: 1rem; }

/* Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Site Header & Nav */
.site-header {
  border-bottom: 1px solid rgba(217, 186, 120, .22);
  background-color: rgba(25, 24, 22, .97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 5.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
}

.brand img {
  display: block;
  width: 138px;
  height: 69px;
  object-fit: contain;
}

.nav {
  display: flex;
  gap: 1.5rem;
}

.nav a {
  font-size: 0.875rem;
  font-weight: 600;
  color: #d7ccb7;
}

.nav a:hover, .nav a[aria-current="page"] {
  color: #f2d696;
}

@media (max-width: 640px) {
  .site-header .container {
    height: auto;
    min-height: 5.5rem;
    flex-wrap: wrap;
    padding-top: .75rem;
    padding-bottom: .75rem;
    gap: .5rem;
  }
  .nav {
    width: 100%;
    justify-content: space-between;
    gap: .5rem;
  }
  .nav a { font-size: .75rem; }
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--text-navy);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.breadcrumb-separator {
  color: var(--border-color);
}

/* Hero Section */
.hero {
  padding: 4rem 0;
  text-align: center;
  max-width: var(--content-width);
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background-color: var(--accent-amber);
  color: var(--text-navy);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 9999px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1.5rem;
  text-wrap: balance;
}

.lede {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  text-wrap: pretty;
}

/* Content Grid (Article Layout) */
.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  padding-bottom: 6rem;
}

@media (min-width: 900px) {
  .content-grid {
    grid-template-columns: var(--content-width) 1fr;
    gap: 4rem;
  }
}

/* Main Content Typography */
.main-content {
  font-size: 1.0625rem;
}

.main-content h2 {
  font-size: 2rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
}

.main-content h3 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.main-content p {
  margin-bottom: 1.5rem;
  color: var(--text-navy);
  opacity: 0.9;
}

.main-content a {
  color: #765324;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  font-weight: 500;
}

.main-content a:hover {
  color: #463112;
}

.main-content ul, .main-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  color: var(--text-navy);
  opacity: 0.9;
}

.main-content li {
  margin-bottom: 0.5rem;
}

.main-content blockquote {
  border-left: 4px solid var(--accent-amber);
  padding-left: 1.5rem;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--text-muted);
  margin: 2rem 0;
  font-style: italic;
}

/* Sidebar & TOC */
.sidebar {
  position: relative;
}

@media (min-width: 900px) {
  .sidebar-inner {
    position: sticky;
    top: 6.5rem;
  }
}

.toc {
  background: var(--surface-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.toc h3 {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  font-weight: 700;
  color: var(--text-navy);
}

.toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc li {
  margin-bottom: 0.75rem;
}

.toc li:last-child {
  margin-bottom: 0;
}

.toc a {
  font-size: 0.9375rem;
  color: var(--text-muted);
  display: block;
  text-decoration: none;
}

.toc a:hover {
  color: var(--text-navy);
}

/* Info Card */
.info-card {
  background-color: var(--surface-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-sm);
}

.info-card h4 {
  font-family: var(--font-sans);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  margin-top: 0;
}

.info-card p:last-child {
  margin-bottom: 0;
}

/* Comparison Table */
.comparison-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--surface-white);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9375rem;
}

.comparison-table th {
  background-color: var(--surface-muted);
  padding: 1rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-navy);
  font-family: var(--font-sans);
}

.comparison-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-navy);
}

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

/* CTA Panel */
.cta-panel {
  background-color: var(--text-navy);
  color: var(--bg-cream);
  padding: 3rem 2rem;
  border-radius: var(--radius-lg);
  text-align: center;
  margin: 3rem 0;
  box-shadow: var(--shadow-md);
}

.cta-panel h3 {
  color: var(--bg-cream);
  font-size: 2rem;
  margin-bottom: 1rem;
  margin-top: 0;
}

.cta-panel p {
  color: var(--border-color);
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none !important;
  font-family: var(--font-sans);
}

.btn-primary {
  background: linear-gradient(113deg, #b89657, #e9d29e 29%, #c7a760 67%, #e6d09d);
  color: var(--text-navy);
  border: 1px solid #e4cf9b;
  box-shadow: inset 0 1px rgba(255,255,255,.44), var(--shadow-sm);
}

.main-content .btn-primary {
  color: var(--text-navy);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Guide Index & Cards */
.guide-index {
  padding: 4rem 0;
}

.guide-index-header {
  text-align: center;
  margin-bottom: 4rem;
}

.guide-index-header h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: 1rem;
}

.guide-index-header p {
  color: var(--text-muted);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.guide-card {
  display: flex;
  flex-direction: column;
  background-color: var(--surface-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  height: 100%;
}

.guide-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--text-muted);
}

.guide-card-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.guide-card .eyebrow {
  align-self: flex-start;
  margin-bottom: 1rem;
}

.guide-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  margin-top: 0;
}

.guide-card p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.guide-card-footer {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-navy);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.guide-card-footer::after {
  content: "→";
  transition: transform 0.2s ease;
}

.guide-card:hover .guide-card-footer::after {
  transform: translateX(4px);
}

/* Calculator & Forms */
.calculator {
  background-color: var(--surface-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin: 3rem 0;
  box-shadow: var(--shadow-sm);
}

.calculator-header {
  margin-bottom: 2rem;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
}

.calculator-header h3 {
  margin-top: 0;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.calculator-header p {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-navy);
}

input[type="text"],
input[type="number"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--bg-cream);
  color: var(--text-navy);
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--focus-ring);
  box-shadow: 0 0 0 1px var(--focus-ring);
}

.calculator-result {
  margin-top: 2rem;
  padding: 1.5rem;
  background-color: var(--surface-muted);
  border-radius: var(--radius-sm);
  text-align: center;
}

.calculator-result .value {
  display: block;
  font-size: 2.5rem;
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--text-navy);
  margin-bottom: 0.5rem;
}

.calculator-result .label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.calculator-result strong {
  display: block;
  font-size: 2.5rem;
  font-family: var(--font-serif);
  line-height: 1.2;
  margin: .5rem 0;
}
.calculator-result small { display: block; color: var(--text-muted); }
.calculator > div:not(.calculator-result) { margin-bottom: 1rem; }
.comparison-table caption { text-align: left; padding: 1rem; font-size: .875rem; color: var(--text-muted); }
.review-date { margin-top: 1rem; font-size: .875rem; color: var(--text-muted); }

/* Source List & Disclosures */
.source-list {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.source-list h4 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  margin-top: 0;
  color: var(--text-muted);
  font-family: var(--font-sans);
}

.source-list ol {
  font-size: 0.8125rem;
  color: var(--text-muted);
  padding-left: 1.25rem;
  margin-bottom: 0;
}

.source-list li {
  margin-bottom: 0.5rem;
}

.disclosure {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 2rem 0;
  padding: 1rem;
  background-color: var(--surface-muted);
  border-radius: var(--radius-sm);
}

/* Site Footer */
.site-footer {
  border-top: 1px solid rgba(217, 186, 120, .22);
  padding: 4rem 0;
  margin-top: 4rem;
  background-color: #191816;
  color: #eee6d7;
}

.site-footer-inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 768px) {
  .site-footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

.site-footer .brand {
  margin-bottom: 1rem;
  display: inline-flex;
}

.site-footer p {
  color: #d7ccb7;
}

.site-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.site-footer-nav a {
  font-size: 0.875rem;
  color: #d7ccb7;
}

.site-footer-nav a:hover {
  color: #f2d696;
}

.footer-copy {
  font-size: 0.875rem;
  color: #b7a789;
  margin-top: 2rem;
}
