/* FireDanmark.dk – Professionelt design */

:root {
  --color-navy: #0c1a2e;
  --color-navy-mid: #152238;
  --color-primary: #1d4ed8;
  --color-primary-hover: #1e40af;
  --color-primary-soft: #eff6ff;
  --color-accent: #0e7490;
  --color-bg: #f1f5f9;
  --color-surface: #ffffff;
  --color-text: #0f172a;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --color-border-strong: #cbd5e1;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --radius: 10px;
  --radius-lg: 14px;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --max-width: 1200px;
  --header-height: 72px;
  --space-page: 2rem;
  --space-section: 5.5rem;
  --space-block: 1.75rem;
  --line-body: 1.75;
  --line-relaxed: 1.8;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1.25rem);
}

body {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: var(--line-body);
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--color-primary);
  color: white;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
  outline: 3px solid var(--color-primary-soft);
  outline-offset: 2px;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--color-primary-hover);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: transparent;
  border-bottom: 1px solid color-mix(in srgb, var(--color-border) 65%, transparent);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: color-mix(in srgb, var(--color-surface) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background 0.2s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.site-header.is-scrolled::before {
  background: color-mix(in srgb, var(--color-surface) 94%, transparent);
}

.header-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-page);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  color: var(--color-navy);
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}

.logo:hover {
  color: var(--color-navy);
}

.logo-text {
  display: inline-flex;
  align-items: baseline;
  letter-spacing: -0.03em;
  line-height: 1;
}

.logo-fire {
  color: var(--color-primary);
}

.logo-dot {
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 0.9em;
}

.logo-icon {
  width: 2rem;
  height: 2rem;
  background: linear-gradient(145deg, #0c1a2e 0%, #1d4ed8 100%);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(29, 78, 216, 0.22);
}

.logo-icon svg {
  width: 1.125rem;
  height: 1.125rem;
  color: white;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  padding: 0.3125rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  justify-content: center;
}

.nav-desktop a {
  padding: 0.4375rem 0.8125rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-muted);
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.nav-desktop a:hover {
  color: var(--color-text);
  background: color-mix(in srgb, var(--color-surface) 75%, transparent);
}

.nav-desktop a.active {
  color: var(--color-text);
  background: var(--color-surface);
  box-shadow: var(--shadow-xs);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.header-cta {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.125rem;
  background: var(--color-primary);
  color: white !important;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.15s ease;
}

.header-cta:hover {
  background: var(--color-primary-hover);
  color: white !important;
  transform: translateY(-1px);
}

.header-cta.active {
  background: var(--color-primary-hover);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.22);
}

@media (min-width: 1025px) {
  .header-inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1rem;
  }

  .nav-desktop {
    justify-self: center;
    width: max-content;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .nav-desktop::-webkit-scrollbar {
    display: none;
  }

  .header-cta {
    display: inline-flex;
  }
}

@media (max-width: 1200px) and (min-width: 1025px) {
  .nav-desktop a {
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
  }

  .header-cta {
    padding: 0.4375rem 0.875rem;
    font-size: 0.8125rem;
  }

  .logo {
    font-size: 1rem;
  }
}

.lang-toggle,
.theme-toggle,
.menu-toggle {
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

.lang-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.5rem;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.lang-toggle:hover {
  background: var(--color-bg);
  border-color: var(--color-border-strong);
  color: var(--color-text);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.theme-toggle:hover {
  background: var(--color-bg);
  border-color: var(--color-border-strong);
  color: var(--color-text);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-sun {
  display: none;
}

.theme-toggle .icon-moon {
  display: block;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-navy);
  border-radius: 6px;
  min-width: 40px;
  min-height: 40px;
}

.menu-toggle:hover {
  background: var(--color-bg);
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
}

.nav-mobile {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem var(--space-page) 1.25rem;
  box-shadow: var(--shadow-md);
  flex-direction: column;
  gap: 0.25rem;
  z-index: 99;
}

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

.nav-mobile a {
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 1rem;
  color: var(--color-text);
  border: 1px solid transparent;
}

.nav-mobile-cta {
  background: var(--color-primary) !important;
  color: white !important;
  font-weight: 600 !important;
  text-align: center;
  margin-bottom: 0.375rem;
  border-color: transparent !important;
}

.nav-mobile-cta:hover,
.nav-mobile-cta.active {
  background: var(--color-primary-hover) !important;
  color: white !important;
}

.nav-mobile a:hover,
.nav-mobile a.active {
  background: var(--color-bg);
  border-color: var(--color-border);
  color: var(--color-primary);
}

/* Main */
main {
  flex: 1;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-page);
}

/* Homepage */
.home-page {
  background: var(--color-bg);
}

.home-kicker {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.home-hero {
  padding: 3.5rem 0 2rem;
}

.home-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: stretch;
}

.home-hero-copy h1 {
  font-size: clamp(2.125rem, 4.8vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--color-navy);
  margin-bottom: 1.125rem;
}

.home-lead {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  line-height: var(--line-relaxed);
  max-width: 42ch;
  margin-bottom: 1.75rem;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.home-hero-rail {
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  gap: 0.75rem;
}

.home-rail-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.125rem;
  padding: 1.125rem 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.home-rail-card:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.home-rail-card--accent {
  background: var(--color-navy);
  border-color: var(--color-navy);
  color: white;
}

.home-rail-card--accent:hover {
  border-color: var(--color-navy-mid);
  box-shadow: var(--shadow-md);
}

.home-rail-card--accent .home-rail-hint {
  color: rgba(255, 255, 255, 0.65);
}

.home-rail-num {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--color-navy);
}

.home-rail-card--accent .home-rail-num {
  color: white;
}

.home-rail-num--text {
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}

.home-rail-label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
}

.home-rail-card--accent .home-rail-label {
  color: white;
}

.home-rail-hint {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.35;
}

.home-workspace {
  padding: 1.5rem 0 3.5rem;
}

.home-workspace-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem 2rem;
  align-items: end;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border);
}

.home-workspace-head h2 {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-navy);
  margin: 0;
}

.home-workspace-head .home-kicker {
  margin-bottom: 0.375rem;
}

.home-workspace-intro {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  max-width: 42ch;
}

.home-workspace-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  white-space: nowrap;
}

.home-workspace-link:hover {
  text-decoration: underline;
}

.home-bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0.75rem;
}

.home-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 1.25rem 1.375rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.home-tile:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.home-tile h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-navy);
  margin: 0;
}

.home-tile p {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.home-tile-tag {
  align-self: flex-start;
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  margin-bottom: 0.25rem;
}

.home-tile-go {
  position: absolute;
  right: 1.125rem;
  bottom: 1.125rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-primary);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.home-tile:hover .home-tile-go {
  opacity: 1;
  transform: translateX(0);
}

.home-tile--feature {
  grid-column: 1 / 8;
  grid-row: 1 / 3;
  padding: 1.5rem 1.625rem;
  background: linear-gradient(145deg, var(--color-surface) 0%, var(--color-primary-soft) 100%);
}

.home-tile--feature h3 {
  font-size: 1.25rem;
}

.home-tile--feature p {
  font-size: 0.875rem;
  max-width: 28ch;
}

.home-tile:nth-child(2) { grid-column: 8 / 11; }
.home-tile:nth-child(3) { grid-column: 11 / 13; }
.home-tile:nth-child(4) { grid-column: 8 / 11; }
.home-tile:nth-child(5) { grid-column: 11 / 13; }
.home-tile--guides {
  grid-column: 1 / 13;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.375rem;
  background: var(--color-bg);
}

.home-tile--guides h3,
.home-tile--guides p {
  margin: 0;
}

.home-tile--guides .home-tile-go {
  position: static;
  opacity: 0.6;
  transform: none;
}

.home-tile--guides:hover .home-tile-go {
  opacity: 1;
}

.home-trust {
  padding: 0 0 3rem;
}

.home-trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  overflow: hidden;
}

.home-trust-item {
  padding: 1.25rem 1.375rem;
  border-right: 1px solid var(--color-border);
}

.home-trust-item:last-child {
  border-right: none;
}

.home-trust-item h3 {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-navy);
  margin: 0 0 0.375rem;
}

.home-trust-item p {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.home-fire-note {
  padding: 0 0 3.5rem;
}

.home-fire-inner {
  display: grid;
  grid-template-columns: minmax(140px, 200px) 1fr;
  gap: 1.5rem 2rem;
  align-items: start;
  padding: 1.375rem 1.5rem;
  background: var(--color-surface);
  border-left: 3px solid var(--color-primary);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  box-shadow: var(--shadow-xs);
}

.home-fire-inner h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-navy);
  margin: 0;
}

.home-fire-inner p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: var(--line-relaxed);
  color: var(--color-text-muted);
}

.home-cta {
  background: var(--color-navy);
  color: white;
  padding: 2.5rem 0;
}

.home-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.home-cta-copy h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.375rem;
}

.home-cta-copy p {
  margin: 0;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.7);
  max-width: 40ch;
}

.home-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.home-cta .btn-primary {
  background: white;
  color: var(--color-navy);
}

.home-cta .btn-primary:hover {
  background: #f1f5f9;
  color: var(--color-navy);
}

.home-cta .btn-secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: white;
}

.home-cta .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  color: white;
}

.home-save {
  padding: 0 0 3.5rem;
}

.home-save-note {
  margin: 0 0 1.25rem;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--color-text-muted);
  background: var(--color-primary-soft);
  border-radius: var(--radius);
  border-left: 3px solid var(--color-primary);
  max-width: 52ch;
}

.home-save-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.home-save-card {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 1.125rem 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.home-save-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.home-save-card h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-navy);
  margin: 0;
}

.home-save-card p {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.home-save-tag {
  align-self: flex-start;
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  margin-bottom: 0.125rem;
}

.home-updates {
  padding: 0 0 3rem;
}

.home-updates-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.home-updates-head h2 {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-navy);
  margin: 0;
}

.home-updates-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.updates-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 720px;
}

.update-card {
  padding: 1.25rem 1.375rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: border-color 0.15s ease, box-shadow 0.2s ease;
}

.update-card:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-xs);
}

.update-card-meta {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.5rem;
}

.update-card-meta time {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.update-tag {
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
}

.update-card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-navy);
  margin: 0 0 0.375rem;
}

.update-card-summary {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.update-card-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
}

.update-card-link:hover {
  text-decoration: underline;
}

.update-card--compact .update-card-summary {
  margin-bottom: 0.5rem;
}

.updates-empty {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.platform-facts-table {
  width: 100%;
  max-width: 28rem;
  margin: 1.25rem 0 1.75rem;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.platform-facts-table th {
  text-align: left;
  font-weight: 600;
  color: var(--color-text-muted);
  padding: 0.5rem 1rem 0.5rem 0;
  width: 42%;
  vertical-align: top;
}

.platform-facts-table td {
  padding: 0.5rem 0;
  color: var(--color-text);
  font-weight: 500;
}

.platform-compare-category {
  margin-top: 2rem;
}

.platform-compare-category:first-of-type {
  margin-top: 1.25rem;
}

.platform-compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 0.875rem;
  margin: 0 0 1.5rem;
}

.platform-compare-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.125rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.platform-compare-card:hover,
.platform-compare-card:focus-visible {
  border-color: var(--color-primary-light);
  box-shadow: var(--shadow-sm);
  outline: none;
}

.platform-compare-card:active {
  transform: translateY(1px);
}

.platform-compare-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.platform-compare-card-name {
  font-size: 1rem;
  color: var(--color-navy);
  line-height: 1.3;
}

.platform-compare-fire {
  flex-shrink: 0;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  line-height: 1;
}

.platform-compare-summary {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.platform-compare-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 0.75rem;
  margin: 0.125rem 0 0;
}

.platform-compare-meta-item {
  min-width: 0;
}

.platform-compare-meta dt {
  margin: 0;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.platform-compare-meta dd {
  margin: 0.125rem 0 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.35;
}

.platform-compare-card-cta {
  margin-top: auto;
  padding-top: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-primary);
}

.platform-compare-note {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin: 0.5rem 0 1.5rem;
}

@media (max-width: 520px) {
  .platform-compare-grid {
    grid-template-columns: 1fr;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  min-height: 48px;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--color-primary-hover);
  color: white;
}

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

.btn-secondary:hover {
  background: var(--color-bg);
  color: var(--color-text);
  border-color: var(--color-border-strong);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary-hover);
}

/* Sections */
.section {
  padding: var(--space-section) 0;
}

.section .calc-hub {
  margin-top: 0.5rem;
}

.section-alt {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.section-header {
  margin-bottom: 3.25rem;
}

.section-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.section-header h2 {
  font-size: clamp(1.5rem, 2.5vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--color-navy);
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--color-text-muted);
  font-size: 1.0625rem;
  max-width: 60ch;
  line-height: 1.65;
}

/* Page header */
.page-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 4.5rem 0 3.75rem;
}

.page-header .container {
  max-width: 800px;
}

.page-header .section-label {
  margin-bottom: 1rem;
}

.page-header h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.375rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-navy);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.page-header p {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  max-width: 62ch;
  line-height: var(--line-relaxed);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 2rem 2.125rem;
  border: 1px solid var(--color-border);
  transition: border-color 0.15s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.card-icon {
  width: 40px;
  height: 40px;
  background: var(--color-primary-soft);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.125rem;
  color: var(--color-primary);
}

.card-icon svg {
  width: 20px;
  height: 20px;
}

.card h3 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
  color: var(--color-navy);
}

.card p {
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: var(--line-relaxed);
}

/* Content blocks */
.content-block {
  max-width: 72ch;
}

.content-block a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(29, 78, 216, 0.35);
}

.content-block a:hover {
  text-decoration-color: var(--color-primary);
}

.content-block h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-navy);
  margin: 3.25rem 0 1.125rem;
  padding-top: 0.75rem;
}

.content-block h2:first-child {
  margin-top: 0;
  padding-top: 0;
}

.content-block h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 1.75rem 0 0.625rem;
}

.content-block p {
  margin-bottom: 1.25rem;
  color: var(--color-text-muted);
  line-height: var(--line-relaxed);
}

.content-block ul,
.content-block ol {
  margin: 0 0 1.5rem 1.5rem;
  color: var(--color-text-muted);
  line-height: var(--line-relaxed);
}

.content-block li {
  margin-bottom: 0.75rem;
  padding-left: 0.375rem;
}

.content-block li::marker {
  color: var(--color-primary);
}

.content-block li strong {
  color: var(--color-text);
  font-weight: 600;
}

.contact-email {
  font-size: 1.125rem;
  margin: 0.5rem 0 1.5rem;
}

.contact-email a {
  font-weight: 600;
}

.privacy-updated {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 0.75rem;
}

.content-block code {
  font-size: 0.875em;
  background: var(--color-surface-alt);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

.tip-box {
  background: var(--color-primary-soft);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin: 2.25rem 0;
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: var(--line-relaxed);
}

.tip-box strong {
  color: var(--color-navy);
  font-weight: 600;
}

/* CTA section */
.cta-section {
  background: var(--color-navy);
  color: white;
  padding: 5rem 0;
  text-align: center;
}

.cta-section h2 {
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.75rem;
  max-width: 48ch;
  margin-left: auto;
  margin-right: auto;
  font-size: 1rem;
}

.cta-section .btn-primary {
  background: white;
  color: var(--color-navy);
}

.cta-section .btn-primary:hover {
  background: #f1f5f9;
  color: var(--color-navy);
}

.cta-section .cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.cta-section .btn-secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: white;
}

.cta-section .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  color: white;
}

/* Calculator hub */
.download-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  background: var(--color-primary-soft);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  margin-bottom: 2.5rem;
}

.download-banner strong {
  display: block;
  color: var(--color-navy);
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.download-banner p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin: 0;
}

[data-theme="dark"] .download-banner {
  background: var(--color-primary-soft);
  border-color: #1d4ed8;
}

.calc-hub {
  display: grid;
  grid-template-columns: minmax(280px, 300px) 1fr;
  gap: 2.5rem;
  align-items: start;
}

.calc-menu {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 0;
  position: sticky;
  top: calc(var(--header-height) + 2rem);
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
}

.hub-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border);
}

.hub-toolbar-title {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.hub-search {
  flex: 1;
  max-width: 380px;
  margin-left: auto;
}

.hub-search-field {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 44px;
  padding: 0.375rem 0.5rem 0.375rem 0.875rem;
  border-radius: 999px;
  background: var(--color-bg);
  box-shadow: inset 0 0 0 1px var(--color-border);
  cursor: text;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.hub-search-field:hover {
  box-shadow: inset 0 0 0 1px var(--color-border-strong);
}

.hub-search-field:focus-within {
  background: var(--color-surface);
  box-shadow:
    inset 0 0 0 1px var(--color-primary),
    0 0 0 3px rgba(29, 78, 216, 0.08);
}

.hub-search-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 16px;
  color: var(--color-text-muted);
  opacity: 0.55;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.hub-search-field:focus-within .hub-search-icon-wrap {
  color: var(--color-primary);
  opacity: 1;
}

.hub-search-icon {
  display: block;
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.hub-search-input {
  display: block;
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0.375rem 0;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.25;
  color: var(--color-text);
  -webkit-appearance: none;
  appearance: none;
}

.hub-search-input::placeholder {
  color: var(--color-text-muted);
  opacity: 0.7;
}

.hub-search-input:focus {
  outline: none;
}

.hub-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  height: 16px;
  width: 16px;
  margin-left: 0.25rem;
  cursor: pointer;
  opacity: 0.45;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M18 6L6 18M6 6l12 12'/%3E%3C/svg%3E") center / 14px no-repeat;
  transition: opacity 0.15s ease;
}

.hub-search-input::-webkit-search-cancel-button:hover {
  opacity: 0.85;
}

.hub-search-status {
  flex-shrink: 0;
  margin: 0;
  padding: 0.25rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  border-radius: 999px;
  white-space: nowrap;
}

.hub-search-empty {
  margin: 0.5rem 0 0;
  padding: 0 0.875rem;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--color-text-muted);
  text-align: right;
}

.hub-search-hint {
  margin: 0.375rem 0 0;
  padding: 0 0.875rem;
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  text-align: right;
  opacity: 0.75;
}

.hub-nav-bar {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin-bottom: 1.25rem;
}

.hub-jump-select {
  display: none;
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-surface);
}

.hub-jump-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.hub-quick-picks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.hub-quick-picks[hidden] {
  display: none !important;
}

.hub-quick-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.hub-quick-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hub-quick-chip {
  padding: 0.4375rem 0.8125rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-navy);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.hub-quick-chip:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  transform: translateY(-1px);
}

.hub-category-filters {
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 0.125rem;
}

.hub-category-filters::-webkit-scrollbar {
  display: none;
}

.hub-category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-width: min-content;
}

.hub-category-chip {
  padding: 0.4375rem 0.875rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-bg);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.hub-category-chip:hover {
  border-color: var(--color-border-strong);
  color: var(--color-text);
}

.hub-category-chip.is-active {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-weight: 600;
}

.calc-menu-item.is-filtered-out,
.calc-menu-group.is-filtered-out {
  display: none !important;
}

.calc-menu-group {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  opacity: 0.65;
  margin: 1rem 0 0.375rem;
  padding: 0 0.5rem;
}

.calc-menu-group:first-of-type {
  margin-top: 0.25rem;
}

.form-group select {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border-strong);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-surface);
}

.form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

[data-theme="dark"] .form-group select {
  background: #0f172a;
}

.guide-panel .content-block,
.page-header + .section .content-block {
  max-width: none;
}

.guide-panel-header p,
.calc-panel-header p {
  font-size: 1.0625rem;
  color: var(--color-text-muted);
  line-height: var(--line-relaxed);
  max-width: 65ch;
}

.calc-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  flex: 1;
  min-height: 0;
  max-height: calc(100vh - var(--header-height) - 10rem);
  overflow-y: auto;
  padding: 0.875rem 0.75rem 1.125rem;
  padding-right: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border-strong) transparent;
}

.calc-menu-nav::-webkit-scrollbar {
  width: 6px;
}

.calc-menu-nav::-webkit-scrollbar-thumb {
  background: var(--color-border-strong);
  border-radius: 3px;
}

.calc-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  text-align: left;
  padding: 0.625rem 0.75rem;
  border: none;
  background: none;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
  line-height: 1.4;
}

.menu-popular-badge {
  flex-shrink: 0;
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  line-height: 1.2;
}

.calc-menu-item:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

.calc-menu-item.active {
  background: var(--color-bg);
  color: var(--color-navy);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--color-primary);
  padding-left: calc(0.75rem - 3px);
}

.calc-panels {
  min-width: 0;
}

.calc-panel {
  display: none;
}

.calc-panel.active,
.guide-panel.active {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2.75rem;
  box-shadow: var(--shadow-xs);
}

.guide-panel {
  display: none;
}

.calc-panel-header,
.guide-panel-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.calc-panel-header h2,
.guide-panel-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-navy);
  margin-bottom: 0.5rem;
}

.calculator-form h3,
.calculator-results h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-navy);
  border-bottom: 1px solid var(--color-border);
}

/* Calculator */
.calculator-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.calculator-form,
.calculator-results {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2.5rem;
  border: 1px solid var(--color-border);
}

.calculator-form h3,
.calculator-results h3 {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
}

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

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

.form-group .hint {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
  line-height: 1.55;
}

.form-group input[type="number"] {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border-strong);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-group input[type="number"]:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  font-size: 0.9375rem;
  min-height: 44px;
  cursor: pointer;
  color: var(--color-text-muted);
}

.radio-group input[type="radio"] {
  accent-color: var(--color-primary);
  width: 18px;
  height: 18px;
}

.calculator-results {
  position: sticky;
  top: calc(var(--header-height) + 2rem);
}

.result-item {
  padding: 1.375rem 0;
  border-bottom: 1px solid var(--color-border);
}

.result-item:last-of-type {
  border-bottom: none;
}

.result-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.result-value {
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-navy);
  font-variant-numeric: tabular-nums;
}

.result-value.highlight {
  font-size: 2rem;
  color: var(--color-primary);
}

.result-explanation {
  margin-top: 1.5rem;
  padding: 1.375rem 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: var(--line-relaxed);
}

.disclaimer {
  margin-top: 3rem;
  padding: 1.5rem 1.75rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-lg);
  font-size: 0.9375rem;
  color: #92400e;
  line-height: var(--line-relaxed);
}

.disclaimer strong {
  font-weight: 600;
}

/* Table */
.table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
}

th, td {
  padding: 1rem 1.5rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

th {
  background: var(--color-bg);
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

td {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

td strong {
  color: var(--color-navy);
  font-weight: 600;
}

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

tr:hover td {
  background: var(--color-bg);
}

/* Guide list */
.guide-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
}

.guide-list li {
  margin-bottom: 0;
  border-bottom: 1px solid var(--color-border);
}

.guide-list li:last-child {
  border-bottom: none;
}

.guide-list a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.75rem;
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--color-text);
  transition: background 0.15s ease;
}

.guide-list a:hover {
  background: var(--color-bg);
  color: var(--color-primary);
}

.guide-list .arrow {
  margin-left: auto;
  color: var(--color-text-muted);
  font-size: 1rem;
  transition: color 0.15s ease;
}

.guide-list a:hover .arrow {
  color: var(--color-primary);
}

/* Resource cards */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
}

.resource-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem 2.125rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.resource-card:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-sm);
}

.resource-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.resource-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: var(--color-navy);
  flex: 1;
  min-width: 0;
}

.resource-recommend {
  flex-shrink: 0;
  text-align: right;
  line-height: 1.2;
}

.resource-recommend-label {
  display: block;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 0.2rem;
}

.resource-recommend-stars {
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--color-accent);
}

.resource-card p {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: 1.125rem;
  line-height: var(--line-relaxed);
}

.resource-card a {
  font-weight: 600;
  font-size: 0.9375rem;
}

/* Resources page hero */
.resources-hero {
  padding: 3.25rem 0 2.75rem;
  background:
    radial-gradient(ellipse 80% 60% at 100% 0%, color-mix(in srgb, var(--color-primary) 10%, transparent), transparent 70%),
    linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg) 100%);
  border-bottom: 1px solid var(--color-border);
}

.resources-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr minmax(260px, 400px);
  gap: 2.5rem;
  align-items: start;
}

.resources-hero-copy h1 {
  font-size: clamp(2rem, 4.2vw, 2.875rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: var(--color-navy);
  margin-bottom: 1rem;
}

.resources-hero-lead {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  line-height: var(--line-relaxed);
  max-width: 46ch;
  margin: 0;
}

.resources-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.625rem;
}

.resources-nav-link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.8125rem 0.9375rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-navy);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.resources-nav-link:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.resources-nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--color-primary) 12%, var(--color-surface));
  color: var(--color-primary);
}

.resources-nav-icon svg {
  width: 1rem;
  height: 1rem;
}

.resources-nav-label {
  flex: 1;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.25;
}

.resources-nav-count {
  flex-shrink: 0;
  min-width: 1.375rem;
  padding: 0.125rem 0.375rem;
  border-radius: 999px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-align: center;
}

[data-theme="dark"] .resources-hero {
  background:
    radial-gradient(ellipse 80% 60% at 100% 0%, color-mix(in srgb, var(--color-primary) 18%, transparent), transparent 70%),
    linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg) 100%);
}

/* Tax page hero */
.tax-hero {
  padding: 3.25rem 0 2rem;
  background:
    radial-gradient(ellipse 70% 55% at 0% 0%, color-mix(in srgb, var(--color-primary) 9%, transparent), transparent 65%),
    linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg) 100%);
  border-bottom: 1px solid var(--color-border);
}

.tax-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr minmax(260px, 400px);
  gap: 2.5rem;
  align-items: start;
  margin-bottom: 2rem;
}

.tax-hero-copy h1 {
  font-size: clamp(2rem, 4.2vw, 2.875rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: var(--color-navy);
  margin-bottom: 1rem;
}

.tax-hero-lead {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  line-height: var(--line-relaxed);
  max-width: 46ch;
  margin: 0;
}

.tax-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.625rem;
}

.tax-nav-link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.8125rem 0.9375rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-navy);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.tax-nav-link:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.tax-nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--color-primary) 12%, var(--color-surface));
  color: var(--color-primary);
}

.tax-nav-icon svg {
  width: 1rem;
  height: 1rem;
}

.tax-nav-label {
  flex: 1;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.25;
}

.tax-nav-count {
  flex-shrink: 0;
  min-width: 1.375rem;
  padding: 0.125rem 0.375rem;
  border-radius: 999px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-align: center;
}

.tax-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.tax-fact-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 0.8125rem;
}

.tax-fact-label {
  color: var(--color-text-muted);
  font-weight: 500;
}

.tax-fact-value {
  color: var(--color-navy);
  font-weight: 700;
}

[data-theme="dark"] .tax-hero {
  background:
    radial-gradient(ellipse 70% 55% at 0% 0%, color-mix(in srgb, var(--color-primary) 16%, transparent), transparent 65%),
    linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg) 100%);
}

.tax-section {
  scroll-margin-top: 5.5rem;
}

.tax-section:not(:first-child) .page-section-title {
  margin-top: 2.5rem;
}

.tax-section-intro {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin: -0.75rem 0 1.5rem;
  line-height: var(--line-relaxed);
  max-width: 52rem;
}

.tax-compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.tax-compare-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.375rem 1.5rem;
}

.tax-compare-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-navy);
  margin-bottom: 0.5rem;
}

.tax-compare-card p {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: var(--line-relaxed);
  margin: 0;
}

.tax-bullets {
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
  max-width: 52rem;
}

.tax-bullets li {
  position: relative;
  padding-left: 1.375rem;
  margin-bottom: 0.625rem;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: var(--line-relaxed);
}

.tax-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 50%;
  background: var(--color-primary);
}

.tax-topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.tax-topic-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.375rem 1.5rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.tax-topic-card:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.tax-topic-badge {
  align-self: flex-start;
  margin-bottom: 0.75rem;
  padding: 0.1875rem 0.5rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.tax-topic-badge--guide {
  background: color-mix(in srgb, var(--color-primary) 12%, var(--color-surface));
  color: var(--color-primary);
}

.tax-topic-badge--calc {
  background: color-mix(in srgb, #059669 12%, var(--color-surface));
  color: #059669;
}

.tax-topic-badge--rates {
  background: color-mix(in srgb, #d97706 12%, var(--color-surface));
  color: #d97706;
}

.tax-topic-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-navy);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.tax-topic-card p {
  flex: 1;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: var(--line-relaxed);
  margin: 0 0 1rem;
}

.tax-topic-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
}

.tax-topic-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tax-disclaimer {
  margin-top: 2.5rem;
}

.resource-section {
  scroll-margin-top: 5.5rem;
}

.resource-section:not(:first-child) .page-section-title {
  margin-top: 2.5rem;
}

.resource-section-intro {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin: -0.75rem 0 1.5rem;
  line-height: var(--line-relaxed);
  max-width: 52rem;
}

.resource-disclaimer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: var(--line-relaxed);
}

.page-section-title {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-navy);
  margin-bottom: 1.75rem;
  margin-top: 0.5rem;
}

/* Footer */
.site-footer {
  background: var(--color-navy);
  color: rgba(255, 255, 255, 0.75);
  padding: 4.5rem 0 2.5rem;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}

.footer-brand .logo {
  color: white;
  margin-bottom: 0.875rem;
}

.footer-brand .logo-icon {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.14) 0%, rgba(96, 165, 250, 0.35) 100%);
  box-shadow: none;
}

.footer-brand .logo-fire {
  color: #93c5fd;
}

.footer-brand .logo-dot {
  color: rgba(255, 255, 255, 0.5);
}

.footer-brand p {
  font-size: 0.875rem;
  line-height: 1.6;
  max-width: 30ch;
}

.footer-nav h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-nav ul {
  list-style: none;
}

.footer-nav li {
  margin-bottom: 0.75rem;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.875rem;
}

.footer-nav a:hover {
  color: white;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 2.5rem auto 0;
  padding: 1.5rem 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
}

/* Responsive */
@media (max-width: 900px) {
  :root {
    --space-section: 4rem;
    --space-page: 1.5rem;
  }

  .calc-hub {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .calc-menu {
    position: static;
  }

  .hub-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
  }

  .hub-search {
    max-width: none;
    margin-left: 0;
  }

  .hub-search-hint {
    text-align: left;
    padding-left: 0;
  }

  .hub-jump-select {
    display: block;
  }

  .calc-menu-nav {
    flex-direction: column;
    flex-wrap: nowrap;
    max-height: 13rem;
    overflow-y: auto;
    overflow-x: hidden;
    gap: 0.125rem;
    -webkit-overflow-scrolling: touch;
  }

  .calc-menu-group {
    margin-top: 0.75rem;
    padding-top: 0;
  }

  .calc-menu-item {
    white-space: normal;
    flex-shrink: 0;
    font-size: 0.875rem;
    padding: 0.625rem 0.75rem;
    background: none;
  }

  .calc-menu-item.active {
    background: var(--color-bg);
  }

  .calc-panel.active,
  .guide-panel.active {
    padding: 1.75rem 1.5rem;
  }

  .calculator-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .calculator-form,
  .calculator-results {
    padding: 1.75rem 1.5rem;
  }

  .calculator-results {
    position: static;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 1024px) {
  .nav-desktop {
    display: none;
  }

  .header-cta {
    display: none !important;
  }

  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
  }
}

@media (max-width: 768px) {
  :root {
    --space-page: 1.25rem;
    --space-section: 3.5rem;
  }

  .header-inner,
  .container,
  .footer-inner,
  .footer-bottom {
    padding-left: var(--space-page);
    padding-right: var(--space-page);
  }

  .home-hero-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .home-workspace-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .home-bento {
    grid-template-columns: 1fr;
  }

  .home-tile--feature,
  .home-tile:nth-child(2),
  .home-tile:nth-child(3),
  .home-tile:nth-child(4),
  .home-tile:nth-child(5),
  .home-tile--guides {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .home-tile--guides {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-trust-grid {
    grid-template-columns: 1fr 1fr;
  }

  .home-trust-item:nth-child(2) {
    border-right: none;
  }

  .home-trust-item:nth-child(1),
  .home-trust-item:nth-child(2) {
    border-bottom: 1px solid var(--color-border);
  }

  .home-fire-inner {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .home-updates-list {
    grid-template-columns: 1fr;
  }

  .home-save-grid {
    grid-template-columns: 1fr;
  }

  .home-cta-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .home-hero-actions .btn,
  .home-cta-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .page-header {
    padding: 3.25rem 0 2.75rem;
  }

  .resources-hero-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .tax-hero-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .resources-nav {
    grid-template-columns: 1fr 1fr;
  }

  .tax-nav {
    grid-template-columns: 1fr 1fr;
  }

  .section {
    padding: var(--space-section) 0;
  }

  .section .btn {
    width: 100%;
    justify-content: center;
  }

  .section .btn + .btn {
    margin-left: 0 !important;
    margin-top: 0.75rem;
  }

  .download-banner {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }

  .download-banner .btn {
    width: 100%;
  }
}

/* Dark theme */
[data-theme="dark"] {
  --color-navy: #f1f5f9;
  --color-navy-mid: #cbd5e1;
  --color-primary: #3b82f6;
  --color-primary-hover: #60a5fa;
  --color-primary-soft: #1e3a5f;
  --color-bg: #0f172a;
  --color-surface: #1e293b;
  --color-text: #f1f5f9;
  --color-text-muted: #94a3b8;
  --color-border: #334155;
  --color-border-strong: #475569;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .home-rail-card--accent {
  background: #0c1a2e;
  border-color: #1e3a5f;
}

[data-theme="dark"] .home-tile--feature {
  background: linear-gradient(145deg, var(--color-surface) 0%, rgba(29, 78, 216, 0.12) 100%);
}

[data-theme="dark"] .home-cta {
  background: #060d18;
}

[data-theme="dark"] .home-cta .btn-primary {
  background: var(--color-primary);
  color: white;
}

[data-theme="dark"] .home-cta .btn-primary:hover {
  background: var(--color-primary-hover);
  color: white;
}

[data-theme="dark"] .logo-icon {
  background: linear-gradient(145deg, #1e3a8a 0%, #3b82f6 100%);
  box-shadow: 0 1px 4px rgba(59, 130, 246, 0.35);
}

[data-theme="dark"] .logo-fire {
  color: #60a5fa;
}

[data-theme="dark"] .tip-box {
  background: var(--color-primary-soft);
  border-color: #1d4ed8;
}

[data-theme="dark"] .disclaimer {
  background: #422006;
  border-color: #92400e;
  color: #fcd34d;
}

[data-theme="dark"] .cta-section {
  background: #060d18;
}

[data-theme="dark"] .cta-section .btn-primary {
  background: var(--color-primary);
  color: white;
}

[data-theme="dark"] .cta-section .btn-primary:hover {
  background: var(--color-primary-hover);
  color: white;
}

[data-theme="dark"] .site-footer {
  background: #060d18;
}

[data-theme="dark"] th {
  background: #0f172a;
}

[data-theme="dark"] tr:hover td {
  background: #0f172a;
}

[data-theme="dark"] .form-group input[type="number"] {
  background: #0f172a;
  color: var(--color-text);
}

[data-theme="dark"] .result-explanation {
  background: #0f172a;
}

[data-theme="dark"] .calculator-form,
[data-theme="dark"] .calculator-results {
  background: #0f172a;
}

@media (max-width: 900px) {
  [data-theme="dark"] .calc-menu-item.active {
    background: #0f172a;
  }
}

[data-theme="dark"] .hub-search-field {
  background: rgba(15, 23, 42, 0.55);
  box-shadow: inset 0 0 0 1px #334155;
}

[data-theme="dark"] .hub-search-field:hover {
  box-shadow: inset 0 0 0 1px #475569;
}

[data-theme="dark"] .hub-search-field:focus-within {
  background: #0f172a;
  box-shadow:
    inset 0 0 0 1px #3b82f6,
    0 0 0 3px rgba(59, 130, 246, 0.12);
}

[data-theme="dark"] .hub-search-status {
  background: rgba(29, 78, 216, 0.18);
  color: #93c5fd;
}

[data-theme="dark"] .menu-popular-badge {
  background: rgba(29, 78, 216, 0.18);
  color: #93c5fd;
}

[data-theme="dark"] .calc-menu-item.active {
  color: var(--color-text);
  background: #0f172a;
}

.rates-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.9375rem;
}

.rates-table th,
.rates-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.rates-table th {
  background: var(--color-bg);
  font-weight: 600;
  color: var(--color-navy);
}

.rates-table tr:hover td {
  background: var(--color-primary-soft);
}

.rates-updated {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin-bottom: 2rem;
}

.calculator-layout-wide {
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 1.4fr);
}

.calculator-results-wide {
  min-width: 0;
}

.year-plan-wrap {
  max-height: 360px;
  overflow-y: auto;
  margin: 1rem 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.year-plan-table {
  margin: 0;
  font-size: 0.8125rem;
}

.year-plan-table th,
.year-plan-table td {
  padding: 0.5rem 0.75rem;
}

.year-plan-fire td {
  background: var(--color-primary-soft);
  font-weight: 600;
}

[data-theme="dark"] .year-plan-fire td {
  background: rgba(29, 78, 216, 0.15);
}

@media (max-width: 900px) {
  .calculator-layout-wide {
    grid-template-columns: 1fr;
  }
}

/* Site guide chatbot */
.site-chatbot {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 150;
  font-family: var(--font-sans);
}

.chatbot-fab {
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.15s ease;
}

.chatbot-fab:hover {
  background: var(--color-primary-hover);
  transform: scale(1.04);
}

.chatbot-fab[aria-expanded="true"] .chatbot-fab-icon--open {
  display: none;
}

.chatbot-fab[aria-expanded="true"] .chatbot-fab-icon--close {
  display: block;
}

.chatbot-fab[aria-expanded="false"] .chatbot-fab-icon--close {
  display: none;
}

.chatbot-fab-icon {
  width: 24px;
  height: 24px;
}

.chatbot-panel {
  position: absolute;
  right: 0;
  bottom: calc(56px + 1rem);
  width: min(380px, calc(100vw - 2rem));
  max-height: min(520px, calc(100vh - 8rem));
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chatbot-panel[hidden] {
  display: none !important;
}

.chatbot-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}

.chatbot-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--color-navy);
  margin: 0 0 0.25rem;
}

.chatbot-subtitle {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.45;
}

.chatbot-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 1.25rem;
  line-height: 1;
}

.chatbot-close::before {
  content: '×';
}

.chatbot-close:hover {
  background: var(--color-surface);
  color: var(--color-text);
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  scrollbar-width: thin;
}

.chatbot-msg {
  max-width: 92%;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.chatbot-msg--user {
  align-self: flex-end;
  background: var(--color-primary);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 14px 14px 4px 14px;
}

.chatbot-msg--user p {
  margin: 0;
}

.chatbot-msg--bot {
  align-self: flex-start;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  padding: 0.875rem 1rem;
  border-radius: 14px 14px 14px 4px;
  color: var(--color-text);
}

.chatbot-msg--bot p {
  margin: 0 0 0.75rem;
  color: var(--color-text-muted);
}

.chatbot-msg--bot p:last-child {
  margin-bottom: 0;
}

.chatbot-link {
  display: block;
  padding: 0.75rem 0.875rem;
  margin-top: 0.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.chatbot-link:first-of-type {
  margin-top: 0;
}

.chatbot-link:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}

.chatbot-link-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.chatbot-link-title {
  display: block;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--color-navy);
}

.chatbot-link-desc {
  display: block;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: 0.2rem;
}

.chatbot-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 1.25rem 0.75rem;
}

.chatbot-chip {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

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

.chatbot-form {
  display: flex;
  gap: 0.5rem;
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.chatbot-input {
  flex: 1;
  min-height: 44px;
  padding: 0.625rem 1rem;
  border: 1px solid var(--color-border-strong);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--color-text);
  background: var(--color-bg);
}

.chatbot-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.chatbot-send {
  min-height: 44px;
  padding: 0 1.125rem;
  border: none;
  border-radius: 8px;
  background: var(--color-primary);
  color: white;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
}

.chatbot-send:hover {
  background: var(--color-primary-hover);
}

@media (max-width: 480px) {
  .site-chatbot {
    right: 1rem;
    bottom: 1rem;
  }

  .chatbot-panel {
    width: calc(100vw - 2rem);
    max-height: calc(100vh - 6rem);
  }
}

[data-theme="dark"] .chatbot-msg--bot {
  background: #0f172a;
}

[data-theme="dark"] .chatbot-input {
  background: #0f172a;
  color: var(--color-text);
}

/* Google AdSense – diskrete placeringer */
.ad-slot {
  margin: 2.5rem auto;
  max-width: 728px;
  text-align: center;
  min-height: 90px;
  opacity: 0;
  animation: ad-fade-in 0.4s ease 0.2s forwards;
}

@keyframes ad-fade-in {
  to { opacity: 1; }
}

.ad-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
  opacity: 0.7;
}

.ad-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 90px;
  padding: 0.75rem;
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.ad-slot--loaded .ad-inner {
  border-style: solid;
  border-color: var(--color-border);
  background: var(--color-bg);
}

.adsbygoogle {
  min-width: 250px;
}

/* Samtykkebanner – nederst, ikke-blokerende */
.ad-consent {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  right: 5.5rem;
  z-index: 90;
  max-width: 520px;
  animation: ad-consent-in 0.35s ease;
}

@keyframes ad-consent-in {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ad-consent--hidden {
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}

.ad-consent-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.ad-consent-text strong {
  display: block;
  font-size: 0.9375rem;
  color: var(--color-navy);
  margin-bottom: 0.375rem;
}

.ad-consent-desc {
  font-size: 0.875rem;
  color: var(--color-text);
  line-height: 1.55;
  margin: 0;
}

.ad-consent-privacy {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin: 0.5rem 0 0;
  line-height: 1.45;
}

.ad-consent-privacy a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ad-consent-actions {
  display: flex;
  gap: 0.625rem;
  flex-shrink: 0;
}

.ad-consent-actions .btn {
  flex: 1;
  min-height: 40px;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
}

@media (min-width: 640px) {
  .ad-consent-inner {
    flex-direction: row;
    align-items: center;
  }

  .ad-consent-actions {
    flex-direction: column;
    min-width: 120px;
  }
}

@media (max-width: 480px) {
  .ad-consent {
    left: 1rem;
    right: 1rem;
    bottom: 5.5rem;
    max-width: none;
  }
}

[data-theme="dark"] .ad-consent-text strong {
  color: var(--color-text);
}

/* Forhåndsvisning – mock-annoncer */
.ad-slot--preview .ad-inner {
  border-color: #93c5fd;
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
}

.ad-mock {
  width: 100%;
  max-width: 728px;
  margin: 0 auto;
}

.ad-mock-visual {
  display: flex;
  gap: 1rem;
  align-items: stretch;
  text-align: left;
  padding: 0.25rem;
}

.ad-mock-image {
  flex: 0 0 120px;
  min-height: 90px;
  border-radius: 6px;
  background: linear-gradient(145deg, #cbd5e1 0%, #94a3b8 50%, #64748b 100%);
}

.ad-mock-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  justify-content: center;
  min-width: 0;
}

.ad-mock-brand {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.ad-mock-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-navy);
}

.ad-mock-line {
  display: block;
  height: 0.5rem;
  border-radius: 999px;
  background: #dbeafe;
  width: 92%;
}

.ad-mock-line--short {
  width: 65%;
}

.ad-mock-cta {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--color-primary);
  font-weight: 500;
}

.ad-mock-placement {
  margin: 0.625rem 0 0;
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  text-align: center;
}

.ad-preview-badge {
  position: fixed;
  top: calc(var(--header-height) + 0.75rem);
  right: 1rem;
  z-index: 95;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: min(360px, calc(100vw - 2rem));
  padding: 0.75rem 1rem;
  background: #1e3a8a;
  color: #eff6ff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.ad-preview-badge-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.35);
  animation: ad-preview-pulse 2s ease infinite;
}

@keyframes ad-preview-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.ad-preview-badge-text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.ad-preview-badge-title {
  font-size: 0.8125rem;
  font-weight: 600;
}

.ad-preview-badge-hint {
  font-size: 0.6875rem;
  opacity: 0.85;
}

.ad-preview-badge-exit {
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.375rem 0.625rem;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.ad-preview-badge-exit:hover {
  background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 640px) {
  .ad-mock-visual {
    flex-direction: column;
  }

  .ad-mock-image {
    flex: none;
    width: 100%;
    min-height: 72px;
  }

  .ad-preview-badge {
    top: auto;
    bottom: 5.5rem;
    left: 1rem;
    right: 1rem;
    max-width: none;
  }
}

[data-theme="dark"] .ad-slot--preview .ad-inner {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-color: #334155;
}

[data-theme="dark"] .ad-mock-title {
  color: var(--color-text);
}

[data-theme="dark"] .ad-mock-line {
  background: #334155;
}