:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #eaf2ff;
  --text: #111827;
  --muted: #5b6472;
  --light: #9ca3af;
  --border: #e5eaf0;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  padding: 18px max(20px, calc((100vw - 1080px) / 2));
  background: rgba(247, 249, 252, 0.88);
  border-bottom: 1px solid rgba(229, 234, 240, 0.8);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0) 42%),
    var(--primary);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.top-nav a {
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.top-nav a:hover,
.top-nav a.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.page-shell {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 44px 0 64px;
}

.home-hero {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: stretch;
  margin-bottom: 28px;
}

.hero-copy,
.page-title {
  min-width: 0;
  padding: 20px 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 700px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.12;
  letter-spacing: 0;
}

.hero-copy > p:not(.eyebrow),
.page-title p:last-child {
  width: 100%;
  max-width: 620px;
  overflow-wrap: anywhere;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.home-quick-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 210px);
  gap: 10px;
  align-items: start;
  width: min(100%, 620px);
  margin-top: 18px;
}

.livelihood-support {
  width: 100%;
  margin: 0;
}

.livelihood-support-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 68px;
  padding: 13px 16px;
  border: 1px solid #b9e2da;
  border-left: 4px solid #0f766e;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 7px 20px rgba(15, 118, 110, 0.08);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.livelihood-support-toggle:hover {
  border-color: #76c7b8;
  background: #f7fffd;
}

.livelihood-support-toggle:focus-visible,
.livelihood-support-move:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.24);
  outline-offset: 2px;
}

.livelihood-support-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.livelihood-support-title strong {
  font-size: 17px;
  line-height: 1.35;
}

.livelihood-support-title small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.livelihood-support-chevron {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-right: 4px;
  border-right: 2px solid #0f766e;
  border-bottom: 2px solid #0f766e;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 160ms ease;
}

.livelihood-support-toggle[aria-expanded="true"] .livelihood-support-chevron {
  transform: rotate(225deg) translate(-2px, -2px);
}

.livelihood-support-panel {
  margin-top: 8px;
  padding: 15px;
  border: 1px solid #b9e2da;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 7px 20px rgba(15, 118, 110, 0.06);
}

.livelihood-support-panel[hidden] {
  display: none;
}

.livelihood-support-panel label {
  display: block;
  margin-bottom: 7px;
  color: #115e59;
  font-size: 13px;
  font-weight: 800;
}

.livelihood-support-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 8px;
}

.livelihood-support-controls select {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  border-color: #b9e2da;
  background-color: #ffffff;
}

.livelihood-support-move {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: #0f766e;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
}

.livelihood-support-move:hover {
  background: #115e59;
}

.livelihood-support-move:disabled,
.livelihood-support-move[aria-disabled="true"] {
  background: #d7e3e1;
  color: #71807e;
  cursor: not-allowed;
  pointer-events: none;
}

.livelihood-support-status,
.livelihood-support-notice {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.livelihood-support-notice {
  margin-top: 4px;
  color: #7c5d12;
}

.fortune-home-cta {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  align-items: center;
  min-height: 68px;
  padding: 11px 14px;
  overflow: hidden;
  background: #173a76;
  border: 1px solid #173a76;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(23, 58, 118, 0.16);
  color: #ffffff;
}

.fortune-home-cta:hover {
  background: #102b55;
}

.fortune-home-cta:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.26);
  outline-offset: 2px;
}

.fortune-home-cta-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.fortune-home-cta-copy strong {
  font-size: 15px;
  line-height: 1.25;
  white-space: nowrap;
}

.fortune-home-cta-arrow {
  margin-top: 0;
  color: #fde68a;
  font-size: 20px;
  font-weight: 900;
}

.home-guide-link {
  margin: 12px 0 0;
  font-size: 14px;
}

.home-guide-link a {
  color: var(--primary);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

@media (max-width: 560px) {
  .home-quick-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .livelihood-support-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .livelihood-support-move {
    width: 100%;
  }

  .fortune-home-cta {
    grid-template-columns: 1fr auto;
  }
}

.hero-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.banner-panel {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  padding: 0;
}

.banner-panel picture,
.banner-panel img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  display: block;
}

.banner-panel img {
  object-fit: cover;
  object-position: center;
}

.mini-card {
  display: grid;
  gap: 7px;
  min-height: 172px;
  padding: 22px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
}

.mini-card strong {
  color: var(--text);
  font-size: 52px;
  line-height: 1;
}

.mini-label,
.mini-card span:last-child {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.mini-list {
  display: grid;
  gap: 10px;
}

.mini-list span {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  background: var(--surface-muted);
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.menu-grid.expanded {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.popular-section {
  margin: 0 0 28px;
}

.compact-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.compact-heading h2 {
  margin: 0;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  background: #e9fbf4;
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 999px;
  color: #047857;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.live-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.48);
  animation: livePulse 1600ms ease-out infinite;
}

.popular-list {
  display: grid;
  gap: 8px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 240ms ease, transform 240ms ease;
}

.popular-list.is-fading-out {
  opacity: 0;
  transform: translateY(-6px);
}

.popular-list.is-fading-in {
  animation: popularFadeIn 280ms ease both;
}

.popular-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 68px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.popular-card:hover {
  transform: translateX(3px);
  border-color: rgba(37, 99, 235, 0.28);
  background: #fbfdff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.popular-rank {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: var(--primary-soft);
  border-radius: 8px;
  color: var(--primary);
  font-size: 15px;
  font-weight: 900;
}

.popular-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.popular-card strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.3;
}

.popular-copy span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.popular-trend {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.popular-trend.up,
.popular-trend.new {
  background: #e9fbf4;
  color: #047857;
}

.popular-trend.down {
  background: #fff1f2;
  color: #be123c;
}

.popular-trend.same {
  background: var(--surface-muted);
  color: var(--muted);
}

@keyframes popularFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes livePulse {
  to {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
}

.category-browser {
  margin: 0 0 24px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.category-browser .section-heading p:last-child {
  max-width: none;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.category-selector {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
}

.category-choice {
  --category-accent: #2563eb;
  display: grid;
  grid-column: span 3;
  grid-template-rows: auto auto 1fr;
  gap: 10px;
  min-width: 0;
  min-height: 154px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-top: 4px solid var(--category-accent);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.category-choice:nth-child(2) { --category-accent: #0f766e; }
.category-choice:nth-child(3) { --category-accent: #7c3aed; }
.category-choice:nth-child(4) { --category-accent: #c2410c; }
.category-choice:nth-child(5) { --category-accent: #0369a1; }
.category-choice:nth-child(6) { --category-accent: #15803d; }
.category-choice:nth-child(7) { --category-accent: #be123c; }

.category-choice:nth-child(n + 5) {
  grid-column: span 4;
}

.category-choice:hover {
  transform: translateY(-2px);
  border-color: var(--category-accent);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.category-choice:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.24);
  outline-offset: 3px;
}

.category-choice.is-active {
  background: #f8fafc;
  border-color: var(--category-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--category-accent) 18%, transparent);
}

.category-choice-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.category-number {
  color: var(--category-accent);
  font-size: 13px;
  font-weight: 900;
}

.category-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.category-choice strong {
  color: var(--text);
  font-size: 20px;
  line-height: 1.25;
}

.category-choice > span:last-child {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.category-status {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.hub-section {
  scroll-margin-top: 96px;
  margin-top: 24px;
}

.category-panel[hidden] {
  display: none;
}

.category-panel:focus {
  outline: none;
}

.category-page-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: -4px 0 16px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
}

.category-page-link:hover {
  text-decoration: underline;
}

.menu-card {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 18px;
  align-items: center;
  min-height: 168px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.menu-card:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.icon-box {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 8px;
}

.icon-box svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-loan {
  background: var(--primary-soft);
  color: var(--primary);
}

.icon-pension {
  background: #e9fbf4;
  color: var(--success);
}

.icon-saving {
  background: #fff7e6;
  color: var(--warning);
}

.menu-content {
  display: grid;
  gap: 9px;
}

.menu-content strong {
  font-size: 22px;
}

.menu-content span {
  color: var(--muted);
  line-height: 1.5;
}

.arrow {
  color: var(--primary);
  font-size: 26px;
  font-weight: 700;
}

.page-title {
  margin-bottom: 24px;
}

.calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 22px;
  align-items: start;
}

.calculator-layout.wide {
  grid-template-columns: minmax(0, 1fr) 420px;
}

.form-card,
.result-card,
.standard-strip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.form-card {
  display: grid;
  gap: 20px;
  padding: 24px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field-group {
  display: grid;
  gap: 9px;
}

.field-group label,
legend,
.choice-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.input-unit {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 14px;
  background: var(--surface-muted);
  border: 1px solid transparent;
  border-radius: 8px;
}

.input-unit:focus-within {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.input-unit input {
  width: 100%;
  min-width: 0;
  padding: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
  font-weight: 750;
}

.input-unit span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

select {
  min-height: 52px;
  width: 100%;
  padding: 0 14px;
  background: var(--surface-muted);
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text);
  font-weight: 750;
  outline: 0;
}

select:focus {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

fieldset {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0 0 20px;
  border: 0;
  border-bottom: 1px solid var(--border);
}

fieldset:last-of-type {
  padding-bottom: 0;
  border-bottom: 0;
}

legend {
  margin-bottom: 2px;
  padding: 0;
}

.choice-group {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 14px;
  background: var(--surface-muted);
  border-radius: 8px;
}

.choice-group label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.choice-group input {
  accent-color: var(--primary);
}

.car-tax-presets {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.car-tax-presets label {
  justify-content: center;
  min-height: 42px;
}

.switch-group {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  background: var(--surface-muted);
  border-radius: 8px;
}

.switch-group label {
  min-width: 0;
}

.switch-group input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-group span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.switch-group input:checked + span {
  background: var(--surface);
  border-color: rgba(37, 99, 235, 0.2);
  color: var(--primary);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.switch-group input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.helper-text {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  width: 100%;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.button.primary {
  background: var(--primary);
  color: #ffffff;
}

.button.primary:hover {
  background: var(--primary-hover);
}

.button.secondary {
  background: #ffffff;
  border-color: var(--border);
  color: var(--text);
}

.button.secondary:hover {
  border-color: rgba(37, 99, 235, 0.35);
  color: var(--primary);
}

.result-card {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 18px;
  padding: 24px;
}

.result-card.accent {
  background:
    linear-gradient(180deg, var(--primary-soft), rgba(255, 255, 255, 0) 42%),
    var(--surface);
}

.result-label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.result-number {
  color: var(--text);
  font-size: clamp(34px, 5vw, 46px);
  line-height: 1.08;
  word-break: keep-all;
}

.result-caption,
.notice {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.wage-comparison {
  display: grid;
  gap: 10px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 8px;
}

.wage-comparison-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wage-comparison-row span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.wage-comparison-row strong {
  color: var(--text);
  font-size: 17px;
  font-weight: 900;
}

.wage-decision {
  margin: 4px 0 0;
  padding: 11px 12px;
  background: var(--primary-soft);
  border-radius: 6px;
  color: var(--primary);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.45;
}

.summary-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.summary-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.summary-list div:last-child {
  border-bottom: 0;
}

.summary-list dt {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.summary-list dd {
  margin: 0;
  color: var(--text);
  text-align: right;
  font-weight: 800;
  word-break: keep-all;
}

.standard-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 22px;
  background: var(--border);
}

.standard-strip div {
  display: grid;
  gap: 6px;
  padding: 18px;
  background: var(--surface);
}

.standard-strip span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.standard-strip strong {
  font-size: 20px;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 0 0 32px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.trust-strip div {
  display: grid;
  gap: 6px;
  min-height: 78px;
  padding: 16px;
  background: var(--surface);
}

.trust-strip span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.trust-strip strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
}

.content-panel {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.category-title p:last-child {
  max-width: 860px;
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.related-links a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  background: var(--primary-soft);
  border-radius: 8px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
}

.button-stack {
  display: grid;
  gap: 10px;
}

.seo-section {
  margin-top: 44px;
}

.section-heading {
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.25;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.faq-grid article {
  display: grid;
  gap: 10px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.faq-grid h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
}

.faq-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.blog-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.blog-section-heading .eyebrow {
  margin-bottom: 7px;
}

.blog-all-link {
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
}

.blog-all-link:hover,
.blog-all-link:focus-visible {
  border-color: rgba(37, 99, 235, 0.45);
  background: var(--primary-soft);
}

.blog-post-list {
  display: grid;
  gap: 10px;
}

.blog-post-banner {
  display: grid;
  grid-template-columns: 152px minmax(0, 1fr);
  min-height: 112px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.04);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.blog-post-banner:hover,
.blog-post-banner:focus-visible {
  border-color: rgba(37, 99, 235, 0.46);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.09);
  transform: translateY(-1px);
}

.blog-post-banner:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.2);
  outline-offset: 2px;
}

.blog-post-media {
  position: relative;
  display: block;
  min-width: 0;
  background: #e9eef5;
}

.blog-post-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 112px;
  object-fit: cover;
}

.blog-post-media.is-empty::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #7a8798;
  content: "BLOG";
  font-size: 13px;
  font-weight: 850;
}

.blog-post-body {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 7px;
  min-width: 0;
  padding: 16px 18px;
}

.blog-post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.blog-post-meta span:first-child {
  color: var(--primary);
}

.blog-post-body strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 18px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.blog-post-action {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.blog-post-banner:hover .blog-post-action,
.blog-post-banner:focus-visible .blog-post-action {
  color: var(--primary);
}

.blog-post-loading {
  display: grid;
  min-height: 112px;
  place-items: center;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.blog-post-loading.is-error {
  border-color: rgba(239, 68, 68, 0.24);
}

.blog-post-status {
  min-height: 18px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 560px) {
  .blog-section-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .blog-all-link {
    align-self: flex-start;
    padding: 8px 10px;
    white-space: nowrap;
  }

  .blog-post-banner {
    grid-template-columns: 104px minmax(0, 1fr);
    min-height: 108px;
  }

  .blog-post-media img {
    min-height: 108px;
  }

  .blog-post-body {
    gap: 5px;
    padding: 12px;
  }

  .blog-post-body strong {
    font-size: 15px;
  }

  .blog-post-meta span:first-child,
  .blog-post-action {
    display: none;
  }
}

.notice {
  padding: 14px;
  background: var(--surface-muted);
  border-radius: 8px;
}

.source-list {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.source-list a {
  color: var(--primary);
  font-weight: 750;
}

.compact-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.compact-list li {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.is-success {
  color: var(--success);
}

.is-warning {
  color: var(--warning);
}

.is-danger {
  color: var(--danger);
}


.guide-section {
  margin-top: 44px;
}

.guide-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.guide-heading h2 {
  margin: 0;
}

.guide-date {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}


.guide-card:first-child {
  grid-column: span 2;
}

.guide-card {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 178px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.guide-card:hover,
.guide-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.3);
  background: #fbfdff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
  outline: none;
}

.guide-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  padding: 0 9px;
  background: var(--primary-soft);
  border-radius: 999px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.guide-card strong {
  color: var(--text);
  font-size: 17px;
  line-height: 1.35;
}

.guide-card span:last-child {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.guide-modal {
  width: min(920px, calc(100% - 32px));
  max-height: min(86vh, 760px);
  padding: 0;
  border: 0;
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.26);
}

.guide-modal::backdrop {
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(3px);
}

.guide-modal-shell {
  position: relative;
  background: var(--surface);
}

.guide-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.guide-modal-close:hover,
.guide-modal-close:focus-visible {
  background: var(--primary-soft);
  color: var(--primary);
  outline: none;
}

.guide-modal-content {
  max-height: min(86vh, 760px);
  padding: 32px;
  overflow: auto;
  scroll-snap-type: y proximity;
}

.guide-modal-header {
  display: grid;
  gap: 10px;
  padding-right: 48px;
}

.guide-modal-header h2 {
  margin: 0;
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.2;
}

.guide-modal-header p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}


.guide-visual-card {
  display: grid;
  gap: 18px;
  margin: 22px 0 0;
  padding: 24px;
  background: #ffffff;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.visual-copy {
  display: grid;
  gap: 8px;
}

.visual-copy span {
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.visual-copy strong {
  color: var(--text);
  font-size: 24px;
  line-height: 1.35;
}

.visual-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.visual-saving .visual-board {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.visual-tile {
  display: grid;
  gap: 9px;
  min-height: 154px;
  padding: 18px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.visual-tile span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.visual-tile strong {
  color: var(--text);
  font-size: 30px;
  line-height: 1.1;
}

.visual-tile small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.visual-tile i {
  display: block;
  width: 100%;
  height: 9px;
  margin-top: auto;
  overflow: hidden;
  background: #dbe4ef;
  border-radius: 999px;
}

.visual-tile i::before {
  content: "";
  display: block;
  width: var(--meter);
  height: 100%;
  background: var(--primary);
  border-radius: inherit;
}

.visual-saving .visual-tile:first-child i::before {
  background: var(--success);
}

.visual-loan .visual-tile:nth-child(2) i::before {
  background: var(--warning);
}

.visual-loan .visual-tile:nth-child(3) i::before {
  background: var(--danger);
}

.guide-visual-card figcaption {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.guide-news-track {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.news-card {
  scroll-snap-align: start;
  display: grid;
  gap: 14px;
  min-height: 220px;
  padding: 24px;
  background: #fbfdff;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.news-card:nth-child(2n) {
  background: #f8fafc;
}

.news-card-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.news-card-step {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: var(--primary);
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.news-card h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.32;
}

.news-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.65;
}

.guide-modal-footer {
  display: grid;
  gap: 16px;
  margin-top: 20px;
  padding: 20px;
  background: var(--surface-muted);
  border-radius: 8px;
}

.guide-related-links,
.guide-source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.guide-related-links a,
.guide-source-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.guide-source-links a {
  color: var(--primary);
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 1080px) {
  .guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .guide-card:first-child {
    grid-column: span 1;
  }

  .guide-heading {
    align-items: start;
    flex-direction: column;
  }

  .guide-grid {
    grid-template-columns: 1fr;
  }

  .guide-card {
    min-height: 132px;
  }

  .guide-modal {
    width: min(100% - 18px, 920px);
    max-height: 90vh;
  }

  .guide-modal-content {
    max-height: 90vh;
    padding: 24px 16px;
  }

  .guide-modal-header {
    padding-right: 46px;
  }


  .visual-board,
  .visual-saving .visual-board {
    grid-template-columns: 1fr;
  }

  .visual-tile {
    min-height: 128px;
  }

  .news-card {
    min-height: 210px;
    padding: 20px;
  }

  .news-card h3 {
    font-size: 21px;
  }
}

@media (max-width: 840px) {
  .site-header {
    padding: 14px 20px;
  }

  .page-shell {
    padding-top: 28px;
  }

  .home-hero,
  .calculator-layout,
  .calculator-layout.wide,
  .popular-list,
  .hub-jump,
  .menu-grid,
  .menu-grid.expanded,
  .standard-strip,
  .trust-strip,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel,
  .result-card {
    position: static;
  }

  .menu-card {
    min-height: 138px;
  }
}

@media (max-width: 560px) {
  .brand span:last-child {
    display: inline;
    font-size: 15px;
  }

  .page-shell {
    width: min(100% - 32px, 1080px);
  }

  h1 {
    font-size: 34px;
  }

  .hero-copy > p:not(.eyebrow),
  .page-title p:last-child {
    font-size: 16px;
  }

  .field-grid,
  .choice-group,
  .switch-group {
    grid-template-columns: 1fr;
  }

  .car-tax-presets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .choice-group label {
    min-height: 36px;
  }

  .menu-card {
    grid-template-columns: 48px 1fr auto;
    gap: 14px;
    padding: 18px;
  }

  .icon-box {
    width: 48px;
    height: 48px;
  }

  .menu-content strong {
    font-size: 19px;
  }
}


.lottery-panel {
  margin-top: 24px;
  min-height: 200px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.lottery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.lottery-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.lottery-card.featured {
  border-color: rgba(37, 99, 235, .34);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.lottery-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.lottery-title {
  display: grid;
  gap: 2px;
}

.lottery-title strong {
  font-size: 15px;
  line-height: 1.2;
}

.lottery-title span,
.lottery-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.lottery-balls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 34px;
}

.lottery-ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.12);
}

.lottery-ball.low { background: #f59e0b; color: #111827; }
.lottery-ball.mid { background: #2563eb; }
.lottery-ball.high { background: #dc2626; }
.lottery-ball.top { background: #6b7280; }
.lottery-ball.bonus { background: #f59e0b; color: #111827; }
.lottery-ball.group { background: #f8fafc; color: #334155; border: 2px solid #cbd5e1; box-shadow: none; }
.lottery-ball.pension-red { background: #ea580c; }
.lottery-ball.pension-yellow { background: #facc15; color: #111827; }
.lottery-ball.pension-blue { background: #0ea5e9; }
.lottery-ball.pension-purple { background: #8b5cf6; }
.lottery-ball.pension-gray { background: #f8fafc; color: #334155; border: 2px solid #cbd5e1; box-shadow: none; }

.lottery-plus {
  color: var(--light);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.pension-line {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.pension-line .lottery-balls {
  flex-wrap: nowrap;
  gap: 3px;
}

.pension-line .lottery-ball {
  width: 26px;
  height: 26px;
  font-size: 12px;
}

.pension-line-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.lottery-prize {
  margin: 10px 0 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.lottery-prize span {
  color: var(--muted);
  font-weight: 700;
}

.lottery-skeleton {
  display: block;
  min-height: 64px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.site-footer {
  margin-top: 56px;
  padding: 30px max(20px, calc((100vw - 1080px) / 2));
  background: #fff;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 24px;
  align-items: start;
}

.footer-brand,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.footer-brand { display: grid; gap: 7px; }
.footer-brand strong { font-size: 18px; }
.footer-brand span { color: var(--muted); font-size: 13px; line-height: 1.5; }
.footer-links a { color: var(--muted); font-size: 13px; font-weight: 700; }
.footer-links a:hover { color: var(--primary); text-decoration: underline; }

.policy-layout { max-width: 900px; }
.policy-content { display: grid; gap: 18px; }
.policy-section { padding: 26px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); }
.policy-section h2 { margin: 0 0 14px; font-size: 24px; }
.policy-section p { margin: 0; color: var(--muted); line-height: 1.75; }
.policy-section p + p, .policy-section ul + p, .policy-section ol + p { margin-top: 14px; }
.policy-section a { color: var(--primary); font-weight: 700; }
.policy-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 18px 0 0; }
.policy-facts div { padding: 14px; background: var(--surface-muted); border-radius: 8px; }
.policy-facts dt { color: var(--muted); font-size: 12px; font-weight: 800; }
.policy-facts dd { margin: 5px 0 0; font-weight: 800; }
.numbered-list { display: grid; gap: 10px; margin: 0; padding-left: 22px; color: var(--muted); line-height: 1.65; }
.source-links { display: flex; flex-wrap: wrap; gap: 10px; }
.source-links a { padding: 10px 12px; background: var(--primary-soft); border-radius: 8px; font-size: 14px; }
.source-directory { display: grid; gap: 12px; margin-top: 18px; }
.source-directory article { padding: 16px; background: var(--surface-muted); border-radius: 8px; }
.source-directory h3 { margin: 0 0 8px; font-size: 17px; }
.source-directory ul { margin: 0; padding-left: 20px; }
.source-directory li + li { margin-top: 5px; }
.source-summary .content-panel > p:first-child { margin-top: 0; color: var(--muted); font-size: 14px; }
.source-list { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 16px 0; padding: 0; list-style: none; }
.source-list a { color: var(--primary); font-weight: 800; }
.source-disclaimer { margin-bottom: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.source-disclaimer a { color: var(--primary); font-weight: 800; }
.breadcrumb { margin: 0 0 24px; color: var(--muted); font-size: 13px; font-weight: 700; }
.breadcrumb ol { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.breadcrumb li + li::before { margin-right: 8px; color: var(--light); content: "/"; }
.breadcrumb a:hover { color: var(--primary); }
.guide-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.guide-detail-grid article { padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); }
.guide-detail-grid h3 { margin: 0 0 10px; font-size: 18px; }
.guide-detail-grid p, .guide-detail-grid li { color: var(--muted); line-height: 1.7; }
.guide-detail-grid p { margin: 0; }
.guide-detail-grid ul { display: grid; gap: 8px; margin: 0; padding-left: 20px; }
.contact-layout { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: start; }
.contact-form { margin: 0; }
.contact-form textarea { width: 100%; resize: vertical; }
.contact-form input[type="file"] { width: 100%; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; color: var(--muted); }
.contact-form input[type="file"]::file-selector-button { margin-right: 12px; padding: 9px 12px; background: var(--surface-muted); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font: inherit; font-weight: 800; cursor: pointer; }
.contact-form input[type="file"]::file-selector-button:hover { border-color: var(--primary); color: var(--primary); }
.field-help { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.form-status { margin: 16px 0 0; padding: 12px 14px; background: var(--surface-muted); border: 1px solid var(--border); border-radius: 8px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.form-status.is-success { border-color: #86efac; background: #f0fdf4; color: #166534; }
.form-status.is-error { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.field-span { grid-column: 1 / -1; }
.form-trap { position: absolute; left: -9999px; }
.consent-check { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.consent-check input { width: 18px; height: 18px; margin-top: 1px; }
.submission-result { max-width: 680px; margin: 10vh auto 0; text-align: center; }
.submission-result h1 { margin: 0 auto 18px; }
.submission-result p { color: var(--muted); line-height: 1.7; }
.submission-result .button { margin-top: 20px; }

/* Site usage guide: one reading surface, separated by spacing and rules. */
.usage-guide-layout {
  max-width: 860px;
}

.usage-guide-intro {
  padding: 20px 0 36px;
  border-bottom: 1px solid var(--border);
}

.usage-guide-intro h1 {
  max-width: none;
  font-size: clamp(36px, 6vw, 52px);
}

.usage-guide-intro > p {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.guide-jump-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 24px;
}

.guide-jump-links a,
.usage-guide-section .text-link {
  color: var(--primary);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.usage-guide-section {
  padding: 38px 0;
  scroll-margin-top: 92px;
}

.usage-guide-section + .usage-guide-section {
  border-top: 1px solid var(--border);
}

.usage-guide-section h2 {
  margin: 0 0 16px;
  font-size: clamp(24px, 4vw, 30px);
  line-height: 1.3;
}

.usage-guide-section > p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.usage-guide-section > p + p,
.usage-guide-section ol + p,
.usage-guide-section dl + p {
  margin-top: 18px;
}

.usage-steps {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: usage-step;
}

.usage-steps li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  counter-increment: usage-step;
}

.usage-steps li::before {
  content: counter(usage-step);
  color: var(--primary);
  font-size: 18px;
  font-weight: 900;
}

.usage-steps strong {
  display: block;
  margin-bottom: 5px;
  font-size: 17px;
}

.usage-steps p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.guide-checklist {
  margin: 22px 0 0;
}

.guide-checklist div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  padding: 15px 0;
  border-top: 1px solid var(--border);
}

.guide-checklist dt {
  font-weight: 900;
}

.guide-checklist dd {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.guide-policy-list {
  margin: 20px 0 0;
}

.guide-note {
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: #475569;
}

.guide-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 20px;
  margin-top: 22px;
}

@media (max-width: 560px) {
  .usage-guide-intro > p {
    font-size: 16px;
  }

  .usage-guide-section {
    padding: 30px 0;
  }

  .guide-checklist div {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .guide-actions .button {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .footer-inner, .contact-layout { grid-template-columns: 1fr; }
  .policy-facts { grid-template-columns: 1fr; }
  .policy-section { padding: 20px; }
  .guide-detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 840px) {
  .category-selector {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-choice:nth-child(n + 5) {
    grid-column: auto;
  }

  .category-choice:last-child {
    grid-column: 1 / -1;
  }

  .category-browser {
    padding: 22px;
  }

  .lottery-grid {
    grid-template-columns: 1fr;
  }

  .lottery-panel {
    min-height: 344px;
  }
}

@media (max-width: 560px) {
  .category-browser {
    padding: 18px;
  }

  .category-selector {
    grid-template-columns: 1fr;
  }

  .category-choice:last-child {
    grid-column: auto;
  }

  .category-choice {
    min-height: 118px;
  }

  .lottery-panel {
    padding: 14px;
  }

  .lottery-ball {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }
}

/* policy-nav-visibility:start */
@media (max-width: 840px) {
  .site-header {
    flex-wrap: nowrap;
    gap: 12px;
  }

  .brand {
    flex: 0 0 auto;
  }

  .top-nav {
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

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

  .top-nav a {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    white-space: nowrap;
  }

  .top-nav a.active,
  .top-nav a[aria-current="page"] {
    order: -1;
  }
}
/* policy-nav-visibility:end */

/* editorial-transparency:start */
.editorial-note {
  margin-top: 32px;
  padding: 22px;
  border: 1px solid var(--border);
  border-left: 4px solid #475569;
  border-radius: 8px;
  background: #ffffff;
}

.editorial-note h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.editorial-note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.editorial-note p + p {
  margin-top: 8px;
}

.editorial-note a {
  color: var(--primary);
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.editorial-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 0;
}

.editorial-facts div {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-muted);
}

.editorial-facts dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.editorial-facts dd {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .editorial-note {
    padding: 18px;
  }

  .editorial-facts {
    grid-template-columns: 1fr;
  }
}
/* editorial-transparency:end */

/* growth-tools:start */
.calculator-finder {
  margin: 12px 0 48px;
  padding: 28px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.calculator-finder-heading {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(320px, 1.15fr);
  gap: 28px;
  align-items: end;
}

.calculator-finder-form label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.calculator-finder-form > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.calculator-finder-form input {
  width: 100%;
  min-width: 0;
  padding: 13px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font: inherit;
}

.calculator-finder-form input:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(37, 99, 235, .12);
}

.calculator-quick-links,
.recent-tool-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.calculator-quick-links {
  margin-top: 20px;
}

.calculator-quick-links a,
.recent-tool-link {
  padding: 9px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
  font-weight: 750;
}

.calculator-quick-links a:hover,
.calculator-quick-links a:focus-visible,
.recent-tool-link:hover,
.recent-tool-link:focus-visible {
  border-color: var(--primary);
  color: var(--primary);
}

.calculator-search-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.calculator-search-result {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.calculator-search-result:hover,
.calculator-search-result:focus-visible,
.calculator-search-result.is-active {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.calculator-search-result.is-active strong {
  color: var(--primary);
}

.calculator-search-result strong,
.calculator-search-result span {
  overflow-wrap: anywhere;
}

.calculator-search-result span,
.calculator-search-status,
.calculator-search-empty {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.calculator-search-status {
  min-height: 20px;
  margin: 10px 0 0;
}

.recent-calculators {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.recent-calculators > strong {
  font-size: 14px;
}

.recent-tools {
  padding-top: 8px;
}

.calculator-presets {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.calculator-presets > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.calculator-presets > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.calculator-presets button {
  padding: 9px 11px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.calculator-presets button:hover,
.calculator-presets button:focus-visible {
  border-color: var(--primary);
  color: var(--primary);
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}

.comparison-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 14px;
}

.comparison-table caption {
  padding: 12px 16px;
  color: var(--muted);
  font-size: 13px;
  text-align: left;
}

.comparison-table th,
.comparison-table td {
  padding: 13px 16px;
  border-top: 1px solid var(--border);
  text-align: right;
  white-space: nowrap;
}

.comparison-table th:first-child,
.comparison-table td:first-child {
  text-align: left;
}

.comparison-table thead th {
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 13px;
}

.comparison-table tbody tr.is-selected {
  background: var(--primary-soft);
}

.comparison-table tbody tr.is-selected th {
  color: var(--primary);
}

.table-heading {
  margin-top: 30px;
}

.table-heading h3 {
  margin: 0;
  font-size: 20px;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, .28);
}

.result-action-button,
.result-source-link {
  min-height: 42px;
  background: var(--primary-soft);
  border-color: rgba(37, 99, 235, .25);
  color: var(--primary);
  font-weight: 800;
}

.result-share-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.result-share-controls[hidden] {
  display: none;
}

.result-action-button {
  width: auto;
  min-width: 0;
  padding: 0 9px;
  font-size: 13px;
  word-break: keep-all;
}

.result-action-button:disabled {
  background: var(--surface-muted);
  border-color: var(--border);
  color: #94a3b8;
  cursor: not-allowed;
}

.result-share-status {
  flex-basis: 100%;
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
}

.result-cta {
  margin-top: 18px;
}

.analytics-consent {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  width: min(620px, calc(100% - 40px));
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .2);
}

.analytics-consent[hidden] {
  display: none;
}

.analytics-consent strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

.analytics-consent p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.analytics-consent-actions {
  display: flex;
  gap: 8px;
}

@media (max-width: 720px) {
  .analytics-consent {
    right: 8px;
    bottom: 8px;
    grid-template-columns: 1fr;
    gap: 10px;
    width: calc(100% - 16px);
    padding: 12px;
    border-radius: 8px;
  }

  .analytics-consent p {
    font-size: 12px;
    line-height: 1.45;
  }

  .analytics-consent-actions .button {
    flex: 1;
    min-height: 40px;
  }

  .calculator-finder-heading,
  .recent-calculators {
    grid-template-columns: 1fr;
  }

  .calculator-search-results {
    grid-template-columns: 1fr;
  }

  .calculator-finder-form > div {
    grid-template-columns: 1fr;
  }

  .calculator-finder-form .button {
    width: 100%;
  }

  .comparison-table {
    min-width: 560px;
  }
}
/* growth-tools:end */
/* homepage-priority-architecture:start */
.home-priority-section,
.seasonal-focus,
.home-insights,
.other-tools-section,
.other-policy-discovery {
  scroll-margin-top: 92px;
}

.home-priority-section .section-heading,
.home-insights .section-heading {
  margin-bottom: 18px;
}

.priority-hub-link {
  margin: 18px 0 0;
}

.seasonal-focus .content-panel > p:first-child {
  margin-top: 0;
  font-size: 17px;
  line-height: 1.7;
}

.primary-category-selector .category-choice:last-child {
  grid-column: span 3;
}

.home-insights {
  margin-top: 52px;
}

.other-tool-actions {
  margin-top: 20px;
}

.legacy-anchor {
  display: block;
  height: 0;
  scroll-margin-top: 92px;
}

.other-tool-details {
  margin-top: 20px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.other-tool-details summary {
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.other-tool-details[open] summary {
  margin-bottom: 16px;
}

.other-tool-details .menu-card {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 112px;
  padding: 18px;
}

.other-lottery-panel {
  min-height: 0;
  margin-top: 24px;
}

.other-policy-discovery {
  margin-top: 28px;
}

.analytics-preference-controls {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 16px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.analytics-preference-controls p {
  margin: 0;
  color: var(--muted);
}

.analytics-preference-controls > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 840px) {
  .primary-category-selector .category-choice:last-child {
    grid-column: auto;
  }
}
/* homepage-priority-architecture:end */

/* official-insights:start */
.insight-shell {
  width: min(980px, calc(100% - 40px));
}

.insight-hero {
  max-width: 820px;
  padding: 28px 0 34px;
}

.insight-hero h1 {
  max-width: 820px;
  font-size: clamp(36px, 5vw, 58px);
}

.insight-hero .answer-lead {
  margin: 18px 0 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 750;
  line-height: 1.65;
}

.insight-hero .answer-detail {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.verification-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  margin-top: 20px;
  color: var(--muted);
  font-size: 13px;
}

.verification-line strong {
  color: #047857;
}

.insight-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.insight-facts > div {
  min-width: 0;
  padding: 22px;
  border-right: 1px solid var(--border);
}

.insight-facts > div:last-child {
  border-right: 0;
}

.insight-facts span,
.insight-facts small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.insight-facts strong {
  display: block;
  margin: 7px 0 4px;
  overflow-wrap: anywhere;
  font-size: 24px;
  line-height: 1.25;
}

.insight-section {
  min-width: 0;
  padding: 48px 0;
  border-top: 1px solid var(--border);
}

.insight-section:first-of-type {
  margin-top: 42px;
}

.insight-section .section-heading {
  margin-bottom: 20px;
}

.insight-section .section-heading > p:not(.eyebrow) {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.insight-index-grid,
.related-insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.insight-index-card,
.related-insight-link {
  display: grid;
  min-width: 0;
  min-height: 218px;
  align-content: start;
  padding: 22px;
  border: 1px solid var(--border);
  border-top: 3px solid var(--primary);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.insight-index-card:nth-child(2),
.related-insight-link:nth-child(2) {
  border-top-color: #0f9f74;
}

.insight-index-card:nth-child(3),
.related-insight-link:nth-child(3) {
  border-top-color: #d97706;
}

.insight-index-card span,
.related-insight-link span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.insight-index-card strong,
.related-insight-link strong {
  margin-top: 10px;
  font-size: 20px;
  line-height: 1.4;
}

.insight-index-card p,
.related-insight-link p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.insight-index-card b,
.related-insight-link b {
  align-self: end;
  margin-top: 18px;
  color: var(--primary);
  font-size: 14px;
}

.insight-index-card:hover,
.insight-index-card:focus-visible,
.related-insight-link:hover,
.related-insight-link:focus-visible {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.insight-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 14px;
}

.insight-table caption {
  padding: 14px 16px;
  color: var(--muted);
  font-size: 13px;
  text-align: left;
}

.insight-table th,
.insight-table td {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  text-align: right;
  white-space: nowrap;
}

.insight-table th:first-child,
.insight-table td:first-child {
  text-align: left;
}

.insight-table thead th {
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 13px;
}

.insight-table tbody tr.is-key-row {
  background: var(--primary-soft);
}

.insight-table tbody tr.is-key-row th {
  color: var(--primary);
}

.insight-explainer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 36px;
}

.insight-explainer article {
  padding-top: 18px;
  border-top: 2px solid var(--border);
}

.insight-explainer h3 {
  margin: 0;
  font-size: 20px;
}

.insight-explainer p,
.insight-explainer li {
  color: var(--muted);
  line-height: 1.75;
}

.insight-explainer ul {
  margin: 12px 0 0;
  padding-left: 20px;
}

.formula-line {
  display: block;
  margin-top: 12px;
  padding: 14px 16px;
  overflow-x: auto;
  border-left: 3px solid var(--primary);
  background: var(--surface-muted);
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
  white-space: nowrap;
}

.source-record {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
}

.source-record:first-child {
  border-top: 0;
}

.source-record dt {
  font-weight: 800;
}

.source-record dd {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.source-record a {
  color: var(--primary);
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dataset-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 22px;
}

.dataset-actions .button {
  width: auto;
}

.dataset-status {
  flex-basis: 100%;
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.citation-copy {
  min-width: 0;
  max-width: 100%;
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
}

.citation-copy p {
  margin: 8px 0 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  color: var(--muted);
  line-height: 1.65;
}

.policy-status-note {
  margin-top: 18px;
  padding: 16px 18px;
  border-left: 3px solid #d97706;
  background: #fff7ed;
  color: #7c2d12;
  line-height: 1.7;
}

.official-hub-links {
  grid-template-columns: minmax(0, 720px);
  margin-top: 22px;
}

.official-hub-links .insight-index-card {
  min-height: 190px;
}

@media (max-width: 760px) {
  .insight-shell {
    width: min(100% - 32px, 980px);
  }

  .insight-hero {
    padding-top: 12px;
  }

  .insight-hero h1 {
    font-size: 36px;
  }

  .insight-hero .answer-lead {
    font-size: 18px;
  }

  .insight-facts,
  .insight-index-grid,
  .related-insight-grid,
  .insight-explainer {
    grid-template-columns: 1fr;
  }

  .insight-facts > div {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .insight-facts > div:last-child {
    border-bottom: 0;
  }

  .insight-index-card,
  .related-insight-link {
    min-height: 0;
  }

  .source-record {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .dataset-actions .button {
    width: 100%;
  }
}

@media print {
  .site-header,
  .site-footer,
  .dataset-actions,
  .related-insight-grid {
    display: none !important;
  }

  .insight-shell {
    width: 100%;
  }
}
/* official-insights:end */
