/* ==========================================================================
   India Utility Hub — Design System
   Palette: deep indigo primary, marigold accent, off-white bg
   Fonts: Space Grotesk (headings) + Inter (body)
   ========================================================================== */

:root {
  /* Colors — light mode */
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-2: #f1f5f9;
  --color-text: #0f172a;
  --color-text-muted: #475569;
  --color-primary: #0f172a;
  --color-primary-contrast: #f8fafc;
  --color-accent: #f59e0b;
  --color-accent-hover: #d97706;
  --color-accent-contrast: #1c1200;
  --color-success: #16a34a;
  --color-error: #dc2626;
  --color-border: #e2e8f0;
  --color-focus-ring: rgba(245, 158, 11, 0.35);

  /* Typography */
  --font-heading: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --text-xs: 0.8125rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: 2rem;
  --text-3xl: 2.5rem;

  /* Layout */
  --radius: 0.75rem;
  --radius-sm: 0.5rem;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.14);
  --container: 72rem;
}

[data-theme='dark'] {
  --color-bg: #0b1120;
  --color-surface: #111a2e;
  --color-surface-2: #1a2439;
  --color-text: #e6ecf5;
  --color-text-muted: #94a3b8;
  --color-primary: #e6ecf5;
  --color-primary-contrast: #0b1120;
  --color-accent: #f59e0b;
  --color-accent-hover: #fbbf24;
  --color-accent-contrast: #1c1200;
  --color-border: #26324a;
  --color-focus-ring: rgba(245, 158, 11, 0.45);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--color-bg);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
  margin: 0 0 0.75rem;
  text-wrap: balance;
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p {
  margin: 0 0 1rem;
  text-wrap: pretty;
}

a {
  color: var(--color-accent-hover);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img,
svg {
  max-width: 100%;
  vertical-align: middle;
}

:focus-visible {
  outline: 3px solid var(--color-focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 768px) {
  .container { padding-inline: 2rem; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: color-mix(in srgb, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--color-text);
  text-decoration: none;
}

.brand:hover { text-decoration: none; }

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.125rem;
  height: 2.125rem;
  border-radius: var(--radius-sm);
  background-color: var(--color-accent);
  color: var(--color-accent-contrast);
  flex-shrink: 0;
}

.main-nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

.main-nav a {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.main-nav a:hover,
.main-nav a[aria-current='page'] {
  color: var(--color-text);
  background-color: var(--color-surface-2);
  text-decoration: none;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle,
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background-color: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.theme-toggle:hover,
.nav-toggle:hover { background-color: var(--color-surface-2); }
.theme-toggle:active,
.nav-toggle:active { transform: scale(0.97); }

.nav-toggle { display: inline-flex; }
@media (min-width: 768px) {
  .nav-toggle { display: none; }
}

[data-theme='dark'] .icon-sun { display: block; }
[data-theme='dark'] .icon-moon { display: none; }
.icon-sun { display: none; }
.icon-moon { display: block; }

.mobile-nav {
  display: none;
  border-top: 1px solid var(--color-border);
  padding: 0.5rem 1rem 1rem;
}

.mobile-nav.open { display: block; }

.mobile-nav a {
  display: block;
  padding: 0.625rem 0.75rem;
  color: var(--color-text);
  font-weight: 500;
  border-radius: var(--radius-sm);
}

.mobile-nav a:hover {
  background-color: var(--color-surface-2);
  text-decoration: none;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-accent-contrast);
}

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

.btn-secondary {
  background-color: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-secondary:hover { background-color: var(--color-surface-2); }

.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  padding-block: 3.5rem 2.5rem;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.875rem;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-accent-hover);
  background-color: color-mix(in srgb, var(--color-accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-accent) 30%, transparent);
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.hero h1 {
  max-width: 46rem;
  margin-inline: auto;
}

.hero p {
  max-width: 38rem;
  margin: 0 auto 2rem;
  color: var(--color-text-muted);
  font-size: var(--text-lg);
}

.hero-search {
  max-width: 30rem;
  margin-inline: auto;
  position: relative;
}

.hero-search svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}

.hero-search input[type='text'] {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hero-search input[type='text']:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px var(--color-focus-ring);
}

/* ---------- Tool grid ---------- */
.section {
  padding-block: 2.5rem;
}

.section-title {
  margin-bottom: 0.25rem;
}

.section-sub {
  color: var(--color-text-muted);
  margin-bottom: 1.75rem;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.filter-chip {
  padding: 0.375rem 1rem;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-chip:hover { color: var(--color-text); }
.filter-chip:active { transform: scale(0.97); }

.filter-chip[aria-pressed='true'] {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-accent-contrast);
}

.tool-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 480px) {
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .tool-grid { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
}

@media (min-width: 1024px) {
  .tool-grid { grid-template-columns: repeat(4, 1fr); }
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.tool-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-sm);
  background-color: color-mix(in srgb, var(--color-accent) 14%, transparent);
  color: var(--color-accent-hover);
}

.tool-card h3 {
  font-size: 1.0625rem;
  margin: 0;
}

.tool-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
  flex-grow: 1;
}

.tool-card-tag {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tool-card .btn { align-self: flex-start; }

/* ---------- Trust section ---------- */
.trust-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .trust-grid { grid-template-columns: repeat(4, 1fr); }
}

.trust-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.trust-item svg { color: var(--color-success); }
.trust-item h3 { font-size: var(--text-base); margin: 0; }
.trust-item p { font-size: var(--text-sm); color: var(--color-text-muted); margin: 0; }

/* ---------- Tool page layout ---------- */
.tool-page {
  padding-block: 2.5rem 3.5rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

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

.tool-header {
  margin-bottom: 2rem;
  max-width: 46rem;
}

.tool-header p {
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  margin: 0;
}

.tool-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .tool-layout { grid-template-columns: 1.2fr 1fr; align-items: start; }
}

.card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

/* ---------- Forms ---------- */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.form-hint {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

input[type='number'],
input[type='text'],
input[type='email'],
input[type='date'],
select,
textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

input[aria-invalid='true'],
select[aria-invalid='true'] {
  border-color: var(--color-error);
}

.field-error {
  display: none;
  font-size: var(--text-xs);
  color: var(--color-error);
  margin-top: 0.25rem;
}

.field-error.visible { display: block; }

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.radio-pill {
  position: relative;
}

.radio-pill input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}

.radio-pill span {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: var(--text-sm);
  font-weight: 500;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background-color: var(--color-bg);
  color: var(--color-text-muted);
  transition: all 0.2s ease;
  cursor: pointer;
}

.radio-pill input:checked + span {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-accent-contrast);
}

.radio-pill input:focus-visible + span {
  outline: 3px solid var(--color-focus-ring);
  outline-offset: 2px;
}

/* ---------- Results ---------- */
.result-panel {
  display: none;
}

.result-panel.visible { display: block; }

.result-highlight {
  padding: 1.5rem;
  border-radius: var(--radius);
  background-color: color-mix(in srgb, var(--color-accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-accent) 30%, transparent);
  margin-bottom: 1.25rem;
  text-align: center;
}

.result-highlight .label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.result-highlight .value {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text);
}

.result-highlight.flash {
  animation: result-flash 0.6s ease;
}

@keyframes result-flash {
  0% { background-color: color-mix(in srgb, var(--color-accent) 35%, transparent); }
  100% { background-color: color-mix(in srgb, var(--color-accent) 10%, transparent); }
}

.result-rows {
  display: flex;
  flex-direction: column;
}

.result-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-sm);
}

.result-row:last-child { border-bottom: none; }
.result-row dt { color: var(--color-text-muted); margin: 0; }
.result-row dd { font-weight: 600; margin: 0; text-align: right; }

.inline-message {
  display: none;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  margin-top: 1rem;
}

.inline-message.visible { display: block; }

.inline-message.error {
  background-color: color-mix(in srgb, var(--color-error) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-error) 30%, transparent);
  color: var(--color-error);
}

.inline-message.info {
  background-color: var(--color-surface-2);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

.loading-spinner {
  display: inline-block;
  width: 1.125rem;
  height: 1.125rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -0.2em;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Tables ---------- */
.data-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.data-table th {
  background-color: var(--color-surface-2);
  font-weight: 600;
}

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

.data-table td.num,
.data-table th.num { text-align: right; }

/* ---------- Example chips ---------- */
.example-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.chip {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-accent-hover);
  background-color: color-mix(in srgb, var(--color-accent) 12%, transparent);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.chip:hover {
  border-color: var(--color-accent);
}

.chip:active { transform: scale(0.97); }

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
}

.badge-success {
  color: var(--color-success);
  background-color: color-mix(in srgb, var(--color-success) 12%, transparent);
}

.badge-muted {
  color: var(--color-text-muted);
  background-color: var(--color-surface-2);
}

.result-note {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0.75rem 0 1rem;
}

.inline-message.success {
  background-color: color-mix(in srgb, var(--color-success) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-success) 30%, transparent);
  color: var(--color-success);
}

/* ---------- SVG chart ---------- */
.chart-wrap {
  margin-top: 1.25rem;
}

.chart-legend {
  display: flex;
  gap: 1.25rem;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 0.5rem;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.legend-swatch {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 3px;
  display: inline-block;
}

.bar-invested { fill: var(--color-text-muted); }
.bar-returns { fill: var(--color-accent); }
.legend-swatch.invested { background-color: var(--color-text-muted); }
.legend-swatch.returns { background-color: var(--color-accent); }

/* ---------- Guide pages ---------- */
.guide-content {
  max-width: 46rem;
}

.guide-content h2 {
  margin-top: 2.5rem;
  font-size: var(--text-xl);
}

.guide-content ol,
.guide-content ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

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

.step-list {
  list-style: none;
  padding: 0;
  counter-reset: step;
  margin: 0 0 1.5rem;
}

.step-list li {
  counter-increment: step;
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

.step-list li::before {
  content: counter(step);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background-color: color-mix(in srgb, var(--color-accent) 14%, transparent);
  color: var(--color-accent-hover);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-sm);
}

.official-cta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
  background-color: color-mix(in srgb, var(--color-accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-accent) 25%, transparent);
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

.official-cta p { margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); }

details.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background-color: var(--color-surface);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

details.faq-item summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: background-color 0.2s ease;
}

details.faq-item summary::-webkit-details-marker { display: none; }

details.faq-item summary::after {
  content: '+';
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--color-text-muted);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

details.faq-item[open] summary::after {
  transform: rotate(45deg);
}

details.faq-item summary:hover { background-color: var(--color-surface-2); }

details.faq-item .faq-body {
  padding: 0 1.25rem 1rem;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.disclaimer-box {
  padding: 1.25rem 1.5rem;
  background-color: var(--color-surface-2);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 2rem 0;
}

.disclaimer-box strong { color: var(--color-text); }

.related-tools {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.related-tools h2 { font-size: var(--text-lg); margin-top: 0; }

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.related-links a {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  transition: all 0.2s ease;
}

.related-links a:hover {
  border-color: var(--color-accent);
  text-decoration: none;
  transform: translateY(-2px);
}

/* ---------- Static pages ---------- */
.page-content {
  max-width: 46rem;
  padding-block: 2.5rem 3.5rem;
}

.page-content h2 { margin-top: 2rem; font-size: var(--text-xl); }
.page-content ul { padding-left: 1.5rem; }
.page-content li { margin-bottom: 0.5rem; }

/* Long-form article styling (legal pages, about) */
.prose {
  max-width: 46rem;
}

.prose h2 {
  font-size: var(--text-lg);
  margin: 1.75rem 0 0.5rem;
}

.prose p {
  color: var(--color-text-muted);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.prose p strong { color: var(--color-text); }

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

.prose ul {
  padding-left: 1.5rem;
  color: var(--color-text-muted);
  line-height: 1.65;
}

.prose li { margin-bottom: 0.4rem; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 3rem;
  background-color: #0f172a;
  color: #cbd5e1;
  padding: 3rem 0 2rem;
}

[data-theme='dark'] .site-footer {
  background-color: #070c18;
  border-top: 1px solid var(--color-border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
}

.footer-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.125rem;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.footer-brand .brand-mark {
  background-color: var(--color-accent);
  color: var(--color-accent-contrast);
}

.footer-tagline {
  font-size: var(--text-sm);
  color: #94a3b8;
  max-width: 22rem;
}

.site-footer h3 {
  font-size: var(--text-sm);
  font-weight: 600;
  color: #f8fafc;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.site-footer li a {
  font-size: var(--text-sm);
  color: #94a3b8;
  transition: color 0.2s ease;
}

.site-footer li a:hover { color: var(--color-accent); text-decoration: none; }

.footer-bottom {
  border-top: 1px solid #26324a;
  padding-top: 1.5rem;
  font-size: var(--text-xs);
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  z-index: 100;
  display: none;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  max-width: 42rem;
  margin-inline: auto;
  padding: 1rem 1.25rem;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.cookie-banner.visible { display: flex; }

.cookie-banner p {
  flex: 1 1 16rem;
  margin: 0;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ---------- Animations ---------- */
.animate-in {
  opacity: 0;
  transform: translateY(16px);
  animation: fade-slide-up 0.6s ease forwards;
}

.animate-in.delay-1 { animation-delay: 0.08s; }
.animate-in.delay-2 { animation-delay: 0.16s; }
.animate-in.delay-3 { animation-delay: 0.24s; }
.animate-in.delay-4 { animation-delay: 0.32s; }

@keyframes fade-slide-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stagger-children > * {
  opacity: 0;
  transform: translateY(16px);
  animation: fade-slide-up 0.5s ease forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(7) { animation-delay: 0.35s; }
.stagger-children > *:nth-child(8) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(9) { animation-delay: 0.45s; }
.stagger-children > *:nth-child(10) { animation-delay: 0.5s; }
.stagger-children > *:nth-child(11) { animation-delay: 0.55s; }
.stagger-children > *:nth-child(12) { animation-delay: 0.6s; }

@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;
  }

  .animate-in,
  .stagger-children > * {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Utility ---------- */
.hidden { display: none !important; }
.text-muted { color: var(--color-text-muted); }
.text-success { color: var(--color-success); }
.text-error { color: var(--color-error); }
.mt-0 { margin-top: 0; }
.mb-2 { margin-bottom: 1rem; }
