:root {
  --ink: #1A1A1A;
  --paper: #F5F1E8;
  --paper-deep: #EDE7DA;
  --line: #D9D4C7;
  --navy: #0B1F3A;
  --royal: #123E7C;
  --blue: #2F7BFF;
  --amber: #F2A93B;
  --magenta: #E63C7A;
  --teal: #18C7A3;
  --mint: #0E3B34;
  --fog: #9FB3D1;
  --red: #D94841;
  --white: #FFFFFF;
  --maxw: 1440px;
  --gutter: clamp(18px, 4vw, 56px);
  --border-w: 3px;
  --shadow-hard: 8px 8px 0 rgba(11, 31, 58, 0.92);
  --shadow-hard-sm: 4px 4px 0 rgba(11, 31, 58, 0.92);
  --font-display: "Archivo Black", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(11, 31, 58, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 31, 58, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

p {
  max-width: 42em;
}

::selection {
  background: var(--amber);
  color: var(--navy);
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 999;
  transform: translateY(-180%);
  border: 3px solid var(--navy);
  background: var(--amber);
  box-shadow: var(--shadow-hard);
  color: var(--navy);
  font-weight: 900;
  padding: 10px 16px;
  text-decoration: none;
  transition: transform 0.18s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 4px solid var(--navy);
  background: var(--navy);
  box-shadow: 0 8px 0 rgba(11, 31, 58, 0.12);
  color: var(--white);
}

.scroll-progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--amber) 0 35%, var(--magenta) 35% 68%, var(--teal) 68% 100%);
  transition: transform 0.14s linear;
}

.frame-top {
  border-bottom: 3px solid var(--blue);
  background:
    linear-gradient(90deg, rgba(18, 62, 124, 0.66), transparent 56%),
    var(--navy);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  width: min(100%, var(--maxw));
  margin-inline: auto;
  padding: 14px var(--gutter);
}

.brand {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  color: var(--white);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  flex: 0 0 52px;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 3px solid var(--white);
  background: var(--royal);
  box-shadow: 4px 4px 0 var(--amber);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.1em;
  line-height: 1;
}

.brand-mark-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border: 1px solid var(--navy);
  border-radius: 50%;
  background: var(--teal);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  color: var(--white);
  font-size: clamp(18px, 2.1vw, 24px);
  font-weight: 900;
  letter-spacing: -0.02em;
}

.brand-tagline {
  margin-top: 4px;
  color: var(--fog);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 20px);
  margin-left: auto;
}

.header-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(24, 199, 163, 0.45);
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 6px 9px;
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(24, 199, 163, 0.14);
}

.header-cta {
  flex: 0 0 auto;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  margin-left: auto;
  border: 3px solid var(--white);
  background: var(--amber);
  box-shadow: 4px 4px 0 var(--blue);
  color: var(--navy);
  font-weight: 900;
  padding: 8px 12px;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.nav-toggle-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 18px;
}

.nav-toggle-box span {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-label {
  font-size: 12px;
  line-height: 1;
}

.nav-toggle[aria-expanded="true"] {
  border-color: var(--white);
  background: var(--magenta);
  color: var(--white);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-box span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-box span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-box span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.frame-nav {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  background: var(--royal);
}

.nav-inner {
  display: flex;
  align-items: stretch;
  gap: 18px;
  width: min(100%, var(--maxw));
  min-height: 48px;
  margin-inline: auto;
  padding: 0 var(--gutter);
}

.nav-kicker {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  border-right: 2px solid rgba(255, 255, 255, 0.22);
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  padding-right: 18px;
  white-space: nowrap;
}

.primary-nav {
  flex: 1 1 auto;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  height: 100%;
}

.nav-list li {
  display: flex;
}

.nav-list a {
  position: relative;
  display: flex;
  align-items: center;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  padding: 12px 14px;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-list a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--amber);
}

.nav-list a[aria-current="page"] {
  background: var(--amber);
  color: var(--navy);
}

.nav-list a[aria-current="page"]::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--magenta);
  content: "";
}

.nav-frame-corner {
  display: flex;
  align-items: center;
  margin-left: auto;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--fog);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  padding-left: 18px;
  white-space: nowrap;
}

.btn {
  --btn-bg: var(--blue);
  --btn-fg: var(--white);
  --btn-bd: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 3px solid var(--btn-bd);
  border-radius: 0;
  background: var(--btn-bg);
  box-shadow: 4px 4px 0 var(--navy);
  color: var(--btn-fg);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1;
  padding: 10px 18px;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--navy);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--navy);
}

.btn-primary {
  --btn-bg: var(--amber);
  --btn-fg: var(--navy);
}

.btn-secondary {
  --btn-bg: var(--blue);
  --btn-fg: var(--white);
}

.btn-ghost {
  --btn-bg: transparent;
  --btn-fg: var(--white);
  --btn-bd: var(--white);
  box-shadow: 4px 4px 0 rgba(255, 255, 255, 0.25);
}

.btn-outline {
  --btn-bg: var(--paper);
  --btn-fg: var(--navy);
  --btn-bd: var(--navy);
}

.btn-small {
  min-height: 36px;
  font-size: 12px;
  padding: 8px 12px;
}

.container {
  width: min(calc(100% - var(--gutter) - var(--gutter)), 1280px);
  margin-inline: auto;
}

.content-shell {
  width: min(calc(100% - var(--gutter) - var(--gutter)), 1080px);
  margin-inline: auto;
}

.section {
  padding-block: clamp(48px, 7vw, 96px);
}

.section--paper {
  background: var(--paper);
  color: var(--ink);
}

.section--dark {
  background: var(--navy);
  color: var(--white);
}

.section--royal {
  background: var(--royal);
  color: var(--white);
}

.section--mint {
  background: var(--mint);
  color: var(--white);
}

.section--amber {
  background: var(--amber);
  color: var(--navy);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr);
  align-items: end;
  gap: 24px;
  margin-bottom: clamp(24px, 4vw, 44px);
  border-bottom: 4px solid var(--navy);
  padding-bottom: 18px;
}

.section--dark .section-head,
.section--royal .section-head,
.section--mint .section-head {
  border-color: var(--amber);
}

.section--amber .section-head {
  border-color: var(--navy);
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.5vw, 52px);
  line-height: 0.95;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.section-desc {
  max-width: 34em;
  color: var(--fog);
  font-size: 15px;
  line-height: 1.8;
}

.section--paper .section-desc,
.section--amber .section-desc {
  color: #424750;
}

.section-index {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--magenta);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-number {
  color: var(--amber);
  font-family: var(--font-mono);
  font-weight: 700;
}

.display-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 88px);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.eyebrow {
  color: var(--magenta);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lede {
  max-width: 34em;
  color: #4b5059;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.7;
}

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

.col-3 {
  grid-column: span 3;
}

.col-4 {
  grid-column: span 4;
}

.col-5 {
  grid-column: span 5;
}

.col-6 {
  grid-column: span 6;
}

.col-7 {
  grid-column: span 7;
}

.col-8 {
  grid-column: span 8;
}

.col-12 {
  grid-column: span 12;
}

.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 24px);
}

.bento-item {
  grid-column: span 4;
  min-width: 0;
}

.bento-item--wide {
  grid-column: span 8;
}

.bento-item--half {
  grid-column: span 6;
}

.bento-item--full {
  grid-column: span 12;
}

.data-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  border: 3px solid var(--navy);
  background: var(--white);
  box-shadow: var(--shadow-hard-sm);
  padding: clamp(18px, 2.5vw, 28px);
}

.data-card--dark {
  border-color: var(--amber);
  background: var(--mint);
  color: var(--white);
}

.data-card--amber {
  background: var(--amber);
  color: var(--navy);
}

.data-card--blue {
  background: var(--royal);
  color: var(--white);
}

.data-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.data-card h3 {
  font-size: clamp(19px, 2.3vw, 24px);
}

.card-kicker {
  color: var(--magenta);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.data-card--dark .card-kicker,
.data-card--blue .card-kicker {
  color: var(--amber);
}

.card-text {
  max-width: none;
  color: #4b5059;
  font-size: 14px;
  line-height: 1.75;
}

.data-card--dark .card-text,
.data-card--blue .card-text {
  color: var(--fog);
}

.stat {
  display: grid;
  gap: 4px;
  border-top: 2px solid var(--line);
  padding: 14px 0;
}

.stat-value {
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: clamp(28px, 5vw, 54px);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 1;
}

.stat-label {
  color: #5c6370;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.stat--amber .stat-value {
  color: var(--amber);
}

.stat--teal .stat-value {
  color: var(--teal);
}

.stat--magenta .stat-value {
  color: var(--magenta);
}

.section--dark .stat,
.section--royal .stat,
.section--mint .stat {
  border-color: rgba(255, 255, 255, 0.2);
}

.section--dark .stat-label,
.section--royal .stat-label,
.section--mint .stat-label {
  color: var(--fog);
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 3px solid var(--navy);
  background: var(--white);
  box-shadow: var(--shadow-hard-sm);
}

.stat-strip > * {
  border-right: 2px solid var(--line);
  padding: 16px;
}

.stat-strip > *:last-child {
  border-right: 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid currentColor;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  line-height: 1.2;
  padding: 4px 9px;
  text-transform: uppercase;
  white-space: nowrap;
}

.tag::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: currentColor;
  content: "";
}

.tag--transfer {
  background: rgba(230, 60, 122, 0.08);
  color: var(--magenta);
}

.tag--review {
  background: rgba(47, 123, 255, 0.08);
  color: var(--blue);
}

.tag--head2head {
  background: rgba(242, 169, 59, 0.12);
  color: var(--amber);
}

.tag--version {
  background: rgba(24, 199, 163, 0.1);
  color: var(--teal);
}

.tag--neutral {
  background: rgba(0, 0, 0, 0.04);
  color: #5c6370;
}

.prose {
  max-width: 42em;
  font-size: 16px;
  line-height: 1.85;
}

.prose > * + * {
  margin-top: 1em;
}

.prose h2 {
  margin-top: 1.6em;
  font-size: clamp(26px, 3.2vw, 38px);
}

.prose h3 {
  margin-top: 1.6em;
  font-size: clamp(20px, 2.4vw, 26px);
}

.prose a {
  color: var(--royal);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.prose ul {
  padding-left: 1.25em;
  list-style: square;
}

.prose ol {
  padding-left: 1.25em;
  list-style: decimal;
}

.prose li + li {
  margin-top: 0.4em;
}

.prose blockquote {
  border-left: 5px solid var(--amber);
  color: var(--royal);
  font-weight: 700;
  padding: 10px 0 10px 18px;
}

.media-frame {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 3px solid var(--navy);
  background: linear-gradient(135deg, var(--royal), var(--navy));
  box-shadow: var(--shadow-hard-sm);
}

.media-frame::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 28px 28px;
  content: "";
  mix-blend-mode: screen;
  pointer-events: none;
}

.media-frame::after {
  position: absolute;
  z-index: 2;
  right: -10%;
  bottom: -25%;
  left: -10%;
  height: 55%;
  transform: rotate(-8deg);
  background: linear-gradient(110deg, transparent 40%, rgba(242, 169, 59, 0.32) 40%, rgba(242, 169, 59, 0.32) 52%, transparent 52%);
  content: "";
  pointer-events: none;
}

.media-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.05) saturate(1.08);
}

.media-frame--wide {
  aspect-ratio: 16 / 9;
}

.media-frame--tall {
  aspect-ratio: 4 / 5;
}

.media-frame--square {
  aspect-ratio: 1 / 1;
}

.media-frame--hero {
  aspect-ratio: 16 / 10;
}

.media-frame__label {
  position: absolute;
  z-index: 3;
  bottom: 12px;
  left: 12px;
  border: 2px solid var(--amber);
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 5px 8px;
}

.table-shell {
  overflow: auto;
  border: 3px solid var(--navy);
  background: var(--white);
  box-shadow: var(--shadow-hard-sm);
}

.table-shell table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

.table-shell th,
.table-shell td {
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  padding: 12px 14px;
  text-align: left;
}

.table-shell thead th {
  position: sticky;
  z-index: 2;
  top: 0;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.table-shell tbody tr:hover {
  background: rgba(47, 123, 255, 0.06);
}

.table-shell td.num {
  font-family: var(--font-mono);
  font-weight: 700;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  color: #5c6370;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.breadcrumbs a {
  border-bottom: 1px solid currentColor;
  color: var(--royal);
  text-decoration: none;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.breadcrumbs li + li::before {
  color: var(--magenta);
  content: "/";
  font-weight: 700;
}

.breadcrumbs [aria-current="page"] {
  color: var(--ink);
}

.chapter-index {
  border: 3px solid var(--navy);
  background: var(--paper);
  box-shadow: var(--shadow-hard-sm);
}

.chapter-index a {
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  padding: 12px 14px;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.chapter-index a:last-child {
  border-bottom: 0;
}

.chapter-index a:hover {
  background: var(--amber);
  color: var(--navy);
}

.chapter-index__num {
  color: var(--magenta);
  font-family: var(--font-mono);
  font-weight: 700;
}

.site-footer {
  border-top: 6px solid var(--amber);
  background: var(--navy);
  color: var(--white);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.5fr;
  width: min(100%, var(--maxw));
  margin-inline: auto;
  border-right: 3px solid rgba(255, 255, 255, 0.14);
  border-left: 3px solid rgba(255, 255, 255, 0.14);
}

.footer-brand,
.footer-col,
.footer-contact {
  border-right: 2px solid rgba(255, 255, 255, 0.14);
  padding: clamp(24px, 3vw, 40px);
}

.footer-contact {
  border-right: 0;
}

.footer-brand-index {
  display: inline-block;
  margin-bottom: 18px;
  border: 1px solid rgba(242, 169, 59, 0.6);
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  padding: 4px 8px;
}

.footer-summary {
  max-width: 26em;
  margin-bottom: 22px;
  color: var(--fog);
  font-size: 14px;
  line-height: 1.8;
}

.footer-cta {
  margin-top: 4px;
}

.footer-title {
  margin-bottom: 18px;
  border-bottom: 2px solid var(--blue);
  color: var(--white);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.04em;
  padding-bottom: 10px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--paper);
  font-size: 14px;
  line-height: 1.5;
  text-decoration: none;
  transition: color 0.18s ease, transform 0.18s ease;
}

.footer-links a::before {
  color: var(--teal);
  content: "↳";
  font-family: var(--font-mono);
  font-size: 12px;
}

.footer-links a:hover {
  transform: translateX(3px);
  color: var(--amber);
}

.footer-contact-list {
  display: grid;
  gap: 13px;
}

.contact-item {
  display: grid;
  gap: 3px;
}

.contact-label {
  color: var(--fog);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact-value {
  overflow-wrap: anywhere;
  color: var(--paper);
  font-size: 13px;
  line-height: 1.6;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(100%, var(--maxw));
  margin-inline: auto;
  border-top: 2px solid rgba(255, 255, 255, 0.14);
  color: var(--fog);
  font-size: 12px;
  padding: 16px clamp(20px, 3vw, 40px);
}

.footer-bottom p {
  max-width: none;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.footer-legal a {
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--paper);
  text-decoration: none;
}

.footer-legal a:hover {
  border-color: var(--amber);
  color: var(--amber);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 1100px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand,
  .footer-col,
  .footer-contact {
    border-bottom: 2px solid rgba(255, 255, 255, 0.14);
    border-right: 2px solid rgba(255, 255, 255, 0.14);
  }

  .footer-col:nth-child(3),
  .footer-contact {
    border-right: 0;
  }
}

@media (max-width: 1024px) {
  .grid-12,
  .bento {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .col-3,
  .col-4,
  .col-5,
  .col-6 {
    grid-column: span 3;
  }

  .col-7,
  .col-8,
  .col-12 {
    grid-column: span 6;
  }

  .bento-item,
  .bento-item--half {
    grid-column: span 3;
  }

  .bento-item--wide,
  .bento-item--full {
    grid-column: span 6;
  }
}

@media (max-width: 980px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 12px;
  }

  .brand {
    flex: 1 1 auto;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .header-meta {
    order: 4;
    width: 100%;
    margin-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    justify-content: space-between;
    padding-top: 12px;
  }

  .frame-nav {
    position: relative;
  }

  .nav-inner {
    flex-wrap: wrap;
    gap: 0;
    padding-bottom: 0;
  }

  .nav-kicker {
    flex: 1 1 100%;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    padding: 10px 0;
  }

  .primary-nav {
    display: none;
    flex: 1 1 100%;
    padding: 12px 0 14px;
  }

  .primary-nav[data-open="true"] {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    gap: 6px;
    width: 100%;
  }

  .nav-list li {
    width: 100%;
  }

  .nav-list a {
    width: 100%;
    border: 2px solid rgba(255, 255, 255, 0.18);
    border-left: 4px solid var(--blue);
    padding: 12px 14px;
  }

  .nav-list a[aria-current="page"] {
    border-color: var(--amber);
  }

  .nav-frame-corner {
    display: none;
  }
}

@media (max-width: 720px) {
  .footer-top {
    grid-template-columns: 1fr;
  }

  .footer-brand,
  .footer-col,
  .footer-contact {
    border-right: 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.14);
  }

  .footer-contact {
    border-bottom: 0;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 680px) {
  .grid-12,
  .bento {
    grid-template-columns: 1fr;
  }

  .col-3,
  .col-4,
  .col-5,
  .col-6,
  .col-7,
  .col-8,
  .col-12,
  .bento-item,
  .bento-item--wide,
  .bento-item--half,
  .bento-item--full {
    grid-column: 1 / -1;
  }

  .section-head {
    grid-template-columns: 1fr;
  }

  .stat-strip {
    grid-template-columns: 1fr;
  }

  .stat-strip > * {
    border-right: 0;
    border-bottom: 2px solid var(--line);
  }

  .stat-strip > *:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 620px) {
  .brand-mark {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
    font-size: 14px;
  }

  .brand-name {
    font-size: 18px;
  }

  .brand-tagline {
    display: none;
  }

  .header-status {
    display: none;
  }

  .header-meta {
    justify-content: stretch;
  }

  .header-cta {
    width: 100%;
  }

  .nav-toggle {
    min-height: 44px;
    padding: 8px 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .btn:hover,
  .footer-links a:hover {
    transform: none;
  }
}
