:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-alt: #eef1f5;
  --line: #dde2ea;
  --ink: #26313d;
  --muted: #5d6a78;
  --head: #0f2742;
  --navy: #0f2742;
  --navy-2: #173a5e;
  --red: #c8102e;
  --red-dark: #a10d25;
  --link: #b10e29;
  --warn-bg: #fff4f4;
  --warn-line: #f0c3c9;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 24px rgba(15, 39, 66, 0.08);
  --wrap: 1120px;
  --narrow: 860px;
  --header-h: 64px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

html,
body {
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.7 var(--font);
  overflow-wrap: break-word;
}

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

a {
  color: var(--link);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--red-dark);
}

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

h1,
h2,
h3 {
  margin: 0 0 0.8em;
  color: var(--head);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(1.75rem, 4.2vw, 2.6rem);
}

h2 {
  margin-top: 2.6rem;
  font-size: clamp(1.4rem, 2.8vw, 1.85rem);
}

h3 {
  margin-top: 1.8rem;
  font-size: clamp(1.12rem, 2vw, 1.3rem);
}

p,
ul,
ol {
  margin: 0 0 1.1em;
}

ul,
ol {
  padding-left: 1.35em;
}

li {
  margin-bottom: 0.45em;
}

mark {
  padding: 0 0.2em;
  border-radius: 4px;
  background: #fff1a8;
}

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

.skip-link {
  position: absolute;
  top: -60px;
  left: 12px;
  z-index: 200;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--red);
  color: #fff;
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

.container {
  width: min(100% - 2rem, var(--wrap));
  margin-inline: auto;
}

.container--narrow {
  width: min(100% - 2rem, var(--narrow));
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--red);
  background: var(--navy);
}

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-h);
}

.site-logo {
  display: flex;
  flex: none;
}

.site-logo__img {
  width: auto;
  height: 40px;
}

.nav-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
}

.nav-toggle__icon,
.nav-toggle__icon::before,
.nav-toggle__icon::after {
  display: block;
  position: relative;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.2s ease, background 0.2s ease;
}

.nav-toggle__icon::before,
.nav-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__icon::before { top: -6px; }
.nav-toggle__icon::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__icon { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon::after { transform: translateY(-6px) rotate(-45deg); }

.site-nav__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__list li {
  margin: 0;
}

.site-nav__list a {
  display: block;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.site-nav__list a:hover {
  background: var(--navy-2);
  color: #fff;
}

@media (max-width: 899px) {
  .site-nav {
    position: absolute;
    top: calc(100% + 3px);
    left: -1rem;
    right: -1rem;
    display: none;
    padding: 0.5rem 1rem 1rem;
    background: var(--navy);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav__list a {
    padding: 0.8rem 0.6rem;
    font-size: 1.05rem;
  }
}

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

  .site-nav__list {
    display: flex;
    gap: 0.25rem;
  }
}

/* Hero */
.hero {
  padding: 2.5rem 0 2.25rem;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #e8eef5;
}

.hero h1 {
  color: #fff;
}

.hero__subtitle {
  font-size: 1.12rem;
}

.hero__note {
  color: #c9d6e4;
  font-size: 0.92rem;
}

.post-dates {
  margin-bottom: 1.25rem;
  color: #c9d6e4;
  font-size: 0.88rem;
}

.crumbs {
  margin-bottom: 1rem;
  font-size: 0.88rem;
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.crumbs li {
  margin: 0;
  color: #c9d6e4;
}

.crumbs li + li::before {
  content: "/";
  margin-right: 0.4rem;
  opacity: 0.6;
}

.crumbs a {
  color: #fff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.5rem;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.btn:hover {
  background: var(--red-dark);
  color: #fff;
}

/* Main */
main {
  padding-bottom: 3.5rem;
}

main > .container--narrow {
  padding-top: 2rem;
}

.toc {
  margin: 0 0 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.toc__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.2rem;
  color: var(--head);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.toc__title::-webkit-details-marker {
  display: none;
}

.toc__title::after {
  content: "+";
  color: var(--red);
  font-size: 1.4rem;
  line-height: 1;
}

.toc__details[open] .toc__title::after {
  content: "\2212";
}

.toc ol {
  margin: 0;
  padding: 0 1.2rem 1rem 2.4rem;
  font-size: 0.95rem;
}

@media (min-width: 768px) {
  .toc ol {
    columns: 2;
    column-gap: 2rem;
  }
}

.toc li {
  break-inside: avoid;
}

.toc a {
  color: var(--ink);
  text-decoration: none;
}

.toc a:hover {
  color: var(--link);
  text-decoration: underline;
}

.prose > h2:first-child,
.prose > #top-widget + p {
  margin-top: 0;
}

#top-widget {
  margin: 0 0 2rem;
}

.prose img {
  width: 100%;
  margin: 0 0 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* Tables */
.table-wrap {
  margin: 1.4rem 0 1.6rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  line-height: 1.5;
}

.data-table th,
.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.data-table thead th {
  background: var(--navy);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.data-table tbody tr:nth-child(even) {
  background: var(--surface-alt);
}

.data-table tbody tr:last-child > * {
  border-bottom: 0;
}

.data-table td b {
  color: var(--head);
}

@media (max-width: 640px) {
  .table-wrap:has(.data-table--stack) {
    overflow: visible;
    border: 0;
    background: none;
  }

  .data-table--stack,
  .data-table--stack tbody,
  .data-table--stack tr,
  .data-table--stack td {
    display: block;
    width: 100%;
  }

  .data-table--stack thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .data-table--stack tr {
    margin-bottom: 0.8rem;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface) !important;
  }

  .data-table--stack td {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--line);
    text-align: right;
  }

  .data-table--stack td::before {
    content: attr(data-label);
    flex: 0 0 42%;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
    text-align: left;
  }

  .data-table--stack td:first-child {
    background: var(--surface-alt);
    font-weight: 700;
  }

  .data-table--stack td:last-child {
    border-bottom: 0;
  }

  .data-table th,
  .data-table td {
    padding: 0.6rem 0.75rem;
  }
}

/* Callouts */
.callout {
  margin: 1.6rem 0;
  padding: 1.1rem 1.3rem;
  border-left: 4px solid var(--navy);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--surface-alt);
}

.callout h3 {
  margin-top: 0;
}

.callout > :last-child {
  margin-bottom: 0;
}

.callout--warning {
  border-left-color: var(--red);
  background: var(--warn-bg);
}

/* FAQ */
#faq {
  margin-top: 2.6rem;
}

.faq-item {
  margin-bottom: 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.faq-item__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1rem 1.2rem;
  border: 0;
  background: none;
  color: var(--head);
  font: 700 1rem/1.4 var(--font);
  text-align: left;
  cursor: pointer;
}

.faq-item__icon {
  position: relative;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface-alt);
}

.faq-item__icon::before,
.faq-item__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 2px;
  background: var(--red);
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease;
}

.faq-item__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.faq-item__question[aria-expanded="true"] .faq-item__icon::after {
  transform: translate(-50%, -50%) rotate(0);
}

.faq-item__answer-inner {
  padding: 0 1.2rem 1rem;
  color: var(--muted);
}

.faq-item__answer-inner > :last-child {
  margin-bottom: 0;
}

/* Footer */
.site-footer {
  padding: 3rem 0 1.5rem;
  border-top: 3px solid var(--red);
  background: var(--navy);
  color: #c9d6e4;
  font-size: 0.93rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

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

.footer-grid__title {
  margin-bottom: 0.8rem;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

.footer-grid li {
  margin-bottom: 0.5rem;
}

.site-footer a {
  color: #fff;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a[aria-current="page"] {
  text-decoration: underline;
}

.site-footer__bottom {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding-top: 1.5rem;
}

.footer-age-badge {
  display: grid;
  flex: none;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 2px solid var(--red);
  border-radius: 50%;
  color: #fff;
  font-weight: 800;
}

.site-footer__bottom-text p {
  margin: 0 0 0.6rem;
}

.site-footer__disclaimer {
  font-size: 0.85rem;
  line-height: 1.6;
}
