/* ==========================================================================
   Squid IP Hosting — design system
   Flat light theme derived from the v2 logo: navy #0C192F + blue #0064FD.
   No gradients. Dark surfaces are limited to the CTA band and footer.
   ========================================================================== */

/* ------------------------------------------------------------------ fonts */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/inter-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/inter-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/inter-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/inter-700.woff2') format('woff2');
}

/* ----------------------------------------------------------------- tokens */

:root {
  /* Brand, sampled from the v2 logo */
  --navy-900: #0c192f;
  --navy-800: #142440;
  --navy-700: #1d3157;

  --blue-600: #0064fd;
  --blue-700: #0052d6;
  --blue-50: #edf4ff;

  /* Cool navy-tinted neutrals */
  --body: #334155;
  --muted: #5b6b82;
  --line: #e4e9f2;
  --line-strong: #cfd8e8;
  --paper: #f6f8fb;
  --white: #ffffff;

  /* Legacy aliases used by a few remaining class names during the transition */
  --ink-950: var(--navy-900);
  --ink-900: var(--navy-900);
  --ink-800: var(--navy-800);
  --ink-700: var(--navy-700);
  --slate-700: var(--body);
  --slate-600: #475569;
  --slate-500: var(--muted);
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: var(--line);
  --slate-100: #f1f5f9;

  --ok: #2f8f5b;
  --warn: #b7791f;
  --err: #b3261e;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas,
    'Liberation Mono', monospace;

  --wrap: 1180px;
  --wrap-narrow: 780px;
  --radius: 6px;
  --radius-lg: 10px;

  --shadow-sm: 0 1px 2px rgba(12, 25, 47, 0.05);
  --shadow-md: 0 4px 14px rgba(12, 25, 47, 0.07);
  --shadow-lg: 0 16px 40px rgba(12, 25, 47, 0.1);
  --shadow-header: 0 1px 3px rgba(12, 25, 47, 0.08);

  --header-h: 72px;
}

/* ------------------------------------------------------------------- base */

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

a {
  color: var(--blue-700);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  color: var(--navy-900);
  text-decoration: underline;
  text-underline-offset: 2px;
}

:focus-visible {
  outline: 2px solid var(--blue-600);
  outline-offset: 2px;
  border-radius: 2px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  color: var(--navy-900);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 4.2vw, 3rem);
}
h2 {
  font-size: clamp(1.55rem, 2.5vw, 2.05rem);
}
h3 {
  font-size: 1.15rem;
}
h4 {
  font-size: 1.02rem;
}

p {
  margin: 0 0 1rem;
}
p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}
li + li {
  margin-top: 0.35rem;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

code,
kbd,
samp,
pre {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

code {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.1em 0.35em;
  color: var(--navy-800);
}

pre {
  background: var(--navy-900);
  color: #d7e2e6;
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius);
  overflow-x: auto;
  line-height: 1.55;
  margin: 0 0 1rem;
}
pre code {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: 0.85rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--navy-900);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus {
  left: 0;
  color: #fff;
}

/* ----------------------------------------------------------------- layout */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.wrap-narrow {
  max-width: var(--wrap-narrow);
}

.section {
  padding: 84px 0;
}
.section-sm {
  padding: 56px 0;
}
.section-tight {
  padding: 64px 0;
}
.section-paper {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* section-ink is retired as a dark surface; keep the class as a light paper band
   so existing markup continues to work without a dark wash. */
.section-ink {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--body);
}
.section-ink h2,
.section-ink h3,
.section-ink h4 {
  color: var(--navy-900);
}
.section-ink a:not(.btn) {
  color: var(--blue-700);
}
.section-ink a:not(.btn):hover {
  color: var(--navy-900);
}

.grid {
  display: grid;
  gap: 28px;
}
.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.grid-sidebar {
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 56px;
}
.grid-split {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

/* ------------------------------------------------------------- typography */

.eyebrow {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-600);
  margin-bottom: 0.85rem;
}
.section-ink .eyebrow,
.hero .eyebrow {
  color: var(--blue-600);
}

.lead {
  font-size: 1.12rem;
  line-height: 1.6;
  color: var(--slate-600);
}

.section-ink .lead,
.section-ink .feature p,
.hero .lead {
  color: var(--slate-600);
}

.section-head {
  max-width: 720px;
  margin-bottom: 48px;
}
.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.section-head p {
  margin-top: 1rem;
}

.muted {
  color: var(--muted);
}
.small {
  font-size: 0.9rem;
}
.tiny {
  font-size: 0.8rem;
}
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.925rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.9rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease,
    border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}
.btn .icon {
  width: 17px;
  height: 17px;
}

.btn-primary {
  background: var(--blue-600);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--blue-700);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.btn-outline {
  border-color: var(--line-strong);
  color: var(--navy-800);
  background: transparent;
}
.btn-outline:hover {
  border-color: var(--navy-800);
  color: var(--navy-900);
  background: var(--white);
}

/* Ghost button for dark surfaces (CTA band, footer). Keeps the old class name
   as an alias so existing templates keep working. */
.btn-ghost,
.btn-on-dark {
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
  background: transparent;
}
.btn-ghost:hover,
.btn-on-dark:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.btn-sm {
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.925rem;
  color: var(--blue-700);
}
.arrow-link .icon {
  width: 16px;
  height: 16px;
  transition: transform 0.15s ease;
}
.arrow-link:hover {
  text-decoration: none;
  color: var(--navy-900);
}
.arrow-link:hover .icon {
  transform: translateX(3px);
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.15s ease;
}
.site-header.scrolled {
  box-shadow: var(--shadow-header);
}

.header-bar {
  display: flex;
  align-items: center;
  gap: 32px;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.brand img {
  height: 34px;
  width: auto;
}
.brand:hover {
  opacity: 0.88;
  text-decoration: none;
}

.nav {
  margin-left: auto;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list > li {
  margin: 0;
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy-900);
  background: none;
  border: 0;
  font-family: inherit;
  cursor: pointer;
}
.nav-link:hover {
  color: var(--navy-900);
  background: var(--blue-50);
  text-decoration: none;
}
.nav-link[aria-current='true'],
.nav-item-active > .nav-link {
  color: var(--navy-900);
}
.nav-item-active > .nav-link::after {
  content: '';
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: -1px;
  height: 2px;
  background: var(--blue-600);
  border-radius: 2px;
}

.caret {
  width: 12px;
  height: 12px;
  stroke-width: 2.4;
  opacity: 0.55;
  transition: transform 0.15s ease;
}
.nav-link[aria-expanded='true'] .caret {
  transform: rotate(180deg);
}

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 258px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  list-style: none;
  margin: 0;
  display: none;
}
.dropdown.open {
  display: block;
}
.dropdown li {
  margin: 0;
}
.dropdown a {
  display: block;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy-800);
}
.dropdown a:hover {
  background: var(--blue-50);
  color: var(--navy-900);
  text-decoration: none;
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.header-phone:hover {
  color: var(--navy-900);
  text-decoration: none;
}
.header-phone .icon {
  width: 15px;
  height: 15px;
  color: var(--blue-600);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.55rem 0.7rem;
  cursor: pointer;
  color: var(--navy-900);
}
.nav-toggle .bars,
.nav-toggle .bars::before,
.nav-toggle .bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.nav-toggle .bars {
  position: relative;
}
.nav-toggle .bars::before,
.nav-toggle .bars::after {
  content: '';
  position: absolute;
  left: 0;
}
.nav-toggle .bars::before {
  top: -6px;
}
.nav-toggle .bars::after {
  top: 6px;
}

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  background: var(--white);
  color: var(--body);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-home {
  padding: 96px 0 88px;
}
.hero-home h1 {
  color: var(--navy-900);
  max-width: 15ch;
}
.hero-home .lead {
  max-width: 56ch;
  margin-top: 1.35rem;
  font-size: 1.15rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 64px;
  align-items: center;
}

.hero-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  padding: 26px 28px;
}
.hero-panel h2 {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-600);
  margin-bottom: 18px;
  font-weight: 600;
}
.hero-panel dl {
  margin: 0;
  display: grid;
  gap: 14px;
}
.hero-panel .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.hero-panel .row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.hero-panel dt {
  font-size: 0.875rem;
  color: var(--muted);
}
.hero-panel dd {
  margin: 0;
  font-weight: 600;
  color: var(--navy-900);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* Inner-page hero */
.hero-page {
  padding: 52px 0 56px;
  background: var(--paper);
}
.hero-page h1 {
  color: var(--navy-900);
  max-width: 24ch;
}
.hero-page .lead {
  max-width: 62ch;
  margin-top: 1.1rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0 0 1.35rem;
  padding: 0;
  font-size: 0.8rem;
  color: var(--muted);
}
.breadcrumb li {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.breadcrumb li + li::before {
  content: '/';
  color: var(--slate-300);
}
.breadcrumb a {
  color: var(--muted);
}
.breadcrumb a:hover {
  color: var(--navy-900);
}
.breadcrumb [aria-current='page'] {
  color: var(--blue-600);
  font-weight: 600;
}

/* ------------------------------------------------------------- stat band */

.stat-band {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.stat-band .wrap {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.stat {
  padding: 34px 28px;
  border-left: 1px solid var(--line);
}
.stat:first-child {
  border-left: 0;
  padding-left: 0;
}
.stat-value {
  font-size: 2.05rem;
  font-weight: 700;
  color: var(--navy-900);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.stat-label {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ----------------------------------------------------------------- cards */

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    transform 0.15s ease;
}
.card-link:hover {
  border-color: var(--blue-600);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}
.card h3 {
  margin-bottom: 0.6rem;
}
.card p {
  color: var(--slate-600);
  font-size: 0.95rem;
}
.card .arrow-link {
  margin-top: auto;
  padding-top: 1.1rem;
}
.card > ul {
  color: var(--slate-600);
  font-size: 0.925rem;
}

.icon-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: var(--blue-50);
  color: var(--blue-600);
  margin-bottom: 18px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 100, 253, 0.12);
}
.icon-chip .icon {
  width: 21px;
  height: 21px;
  stroke-width: 1.8;
}

.icon-chip-quiet {
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--blue-700);
}

.feature {
  display: flex;
  gap: 16px;
}
.feature .icon-chip {
  margin-bottom: 0;
  width: 36px;
  height: 36px;
}
.feature .icon-chip .icon {
  width: 18px;
  height: 18px;
}
.feature h3 {
  font-size: 1.02rem;
  margin-bottom: 0.35rem;
}
.feature p {
  font-size: 0.925rem;
  color: var(--slate-600);
  margin: 0;
}

/* ------------------------------------------------------------ check list */

.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.85rem;
}
.check-list li {
  position: relative;
  padding-left: 1.85rem;
  margin: 0;
  font-size: 0.95rem;
}
.check-list .icon {
  position: absolute;
  left: 0;
  top: 0.28em;
  width: 17px;
  height: 17px;
  color: var(--blue-600);
  stroke-width: 2.6;
}
.section-ink .check-list .icon {
  color: var(--blue-600);
}
.check-list strong {
  color: var(--navy-900);
}
.section-ink .check-list strong {
  color: var(--navy-900);
}

/* ---------------------------------------------------------------- tables */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
table.data caption {
  text-align: left;
  padding: 16px 20px;
  font-size: 0.825rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
table.data th,
table.data td {
  padding: 12px 20px;
  text-align: left;
  border-bottom: 1px solid var(--slate-100);
  vertical-align: top;
}
table.data thead th {
  background: var(--paper);
  color: var(--navy-900);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
table.data tbody tr:last-child th,
table.data tbody tr:last-child td {
  border-bottom: 0;
}
table.data tbody tr:hover {
  background: #fbfcfe;
}
table.data td.num,
table.data th.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}
table.data tbody th {
  font-weight: 600;
  color: var(--navy-900);
  white-space: nowrap;
}

.matrix td.self {
  background: var(--paper);
  color: var(--slate-400);
}

/* Sticky first column on wide latency matrices */
.matrix th:first-child,
.matrix td:first-child {
  position: sticky;
  left: 0;
  background: var(--white);
  z-index: 1;
}
.matrix thead th:first-child {
  background: var(--paper);
  z-index: 2;
}

/* ----------------------------------------------------------- definitions */

.detail-list {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(96px, 38%) minmax(0, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
}
.detail-list dt {
  padding: 14px 20px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.detail-list dd {
  margin: 0;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--navy-800);
  overflow-wrap: break-word;
}
.detail-list dt:last-of-type,
.detail-list dd:last-of-type {
  border-bottom: 0;
}

.detail-list-stack {
  grid-template-columns: minmax(0, 1fr);
}
.detail-list-stack dt {
  border-bottom: 0;
  padding: 12px 20px 2px;
  background: none;
}
.detail-list-stack dd {
  padding: 0 20px 12px;
}
.detail-list-stack dt:not(:first-of-type) {
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 12px;
}

/* ------------------------------------------------------------- footprint */

.region {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 32px;
}
.region:first-child {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}
.region-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.region-head h3 {
  font-size: 1.05rem;
}
.region-count {
  font-family: var(--font-mono);
  font-size: 0.825rem;
  color: var(--muted);
}
.pop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 14px;
}
.pop {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: var(--white);
}
.pop-city {
  font-weight: 600;
  color: var(--navy-900);
  font-size: 0.95rem;
}
.pop-meta {
  display: block;
  font-size: 0.825rem;
  color: var(--muted);
  margin-top: 0.15rem;
}
.pop-meta .icon {
  width: 13px;
  height: 13px;
  color: var(--slate-400);
  margin-right: 0.15rem;
}
.pop-code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--blue-700);
  letter-spacing: 0.05em;
}

/* ----------------------------------------------------------------- steps */

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 28px;
}
.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 60px;
  margin: 0;
}
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--white);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue-700);
}
.steps h3 {
  font-size: 1.02rem;
  margin-bottom: 0.35rem;
}
.steps p {
  font-size: 0.95rem;
  color: var(--slate-600);
  margin: 0;
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}
.timeline li {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  margin: 0;
}
.timeline li:first-child {
  border-top: 0;
}
.timeline .year {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--blue-700);
  font-size: 0.95rem;
}
.timeline p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--slate-600);
}

/* ------------------------------------------------------------- accordion */

.accordion {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
}
.accordion details {
  border-bottom: 1px solid var(--line);
}
.accordion details:last-child {
  border-bottom: 0;
}
.accordion summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  color: var(--navy-900);
  font-size: 0.975rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.accordion summary::-webkit-details-marker {
  display: none;
}
.accordion summary::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--blue-600);
  flex-shrink: 0;
  line-height: 1;
}
.accordion details[open] summary::after {
  content: '\2212';
}
.accordion summary:hover {
  background: var(--paper);
}
.accordion .answer {
  padding: 0 22px 20px;
  font-size: 0.95rem;
  color: var(--slate-600);
}

/* --------------------------------------------------------------- notices */

.notice-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.notice-list > li {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  margin: 0;
}
.notice-list > li:first-child {
  border-top: 0;
  padding-top: 0;
}
.notice-date {
  font-family: var(--font-mono);
  font-size: 0.825rem;
  color: var(--muted);
  white-space: nowrap;
}
.notice-body h3 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}
.notice-body p {
  font-size: 0.925rem;
  color: var(--slate-600);
  margin: 0;
}
.notice-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 0.7rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.725rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.28rem 0.6rem;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  font-family: var(--font-sans);
}
.pill-ok {
  border-color: rgba(47, 143, 91, 0.3);
  background: rgba(47, 143, 91, 0.08);
  color: #226e44;
}
.pill-warn {
  border-color: rgba(183, 121, 31, 0.3);
  background: rgba(183, 121, 31, 0.08);
  color: #8c5c12;
}
.pill-info {
  border-color: rgba(0, 100, 253, 0.22);
  background: var(--blue-50);
  color: var(--blue-700);
}

/* ------------------------------------------------------------- CTA band */

.cta-band {
  background: var(--navy-900);
  color: var(--slate-400);
  padding: 64px 0;
}
.cta-band .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}
.cta-band h2 {
  color: #fff;
  font-size: 1.65rem;
  max-width: 22ch;
}
.cta-band p {
  margin-top: 0.7rem;
  max-width: 52ch;
  color: var(--slate-400);
  font-size: 0.975rem;
}
.cta-band .btn-row {
  margin-top: 0;
  flex-shrink: 0;
}

/* ----------------------------------------------------------------- forms */

.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.field {
  margin-bottom: 20px;
}
.field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy-800);
  margin-bottom: 0.4rem;
}
.field .hint {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 400;
  margin-top: 0.15rem;
}
.req {
  color: var(--err);
}

input[type='text'],
input[type='email'],
input[type='tel'],
select,
textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--navy-900);
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.7rem 0.85rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(0, 100, 253, 0.14);
  outline: none;
}
textarea {
  min-height: 140px;
  resize: vertical;
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.4rem;
}

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

.captcha {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 26px;
}
.captcha-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}
.captcha-image {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  display: block;
}
.captcha-row .field {
  margin-bottom: 0;
  flex: 0 0 auto;
  width: 240px;
}
.captcha-refresh {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--blue-700);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.captcha-refresh:hover {
  color: var(--navy-900);
}

.alert {
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 24px;
  font-size: 0.925rem;
  border: 1px solid;
}
.alert-error {
  border-color: rgba(179, 38, 30, 0.3);
  background: rgba(179, 38, 30, 0.06);
  color: #8c1d18;
}
.alert-error ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}
.alert-ok {
  border-color: rgba(47, 143, 91, 0.32);
  background: rgba(47, 143, 91, 0.07);
  color: #1d5f3b;
}

/* ----------------------------------------------------------- prose pages */

.prose {
  font-size: 1rem;
  color: var(--body);
}
.prose h2 {
  font-size: 1.3rem;
  margin: 2.5rem 0 0.9rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}
.prose h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.prose h3 {
  font-size: 1.05rem;
  margin: 1.75rem 0 0.6rem;
}
.prose ul,
.prose ol {
  padding-left: 1.35rem;
}
.prose li {
  margin-bottom: 0.4rem;
}
.prose .detail-list {
  margin: 1.5rem 0;
}
.prose table.data {
  margin: 0;
}
.prose .table-wrap {
  margin: 1.5rem 0;
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 40px;
}
.doc-meta strong {
  color: var(--navy-900);
}

.toc {
  position: sticky;
  top: calc(var(--header-h) + 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  background: var(--white);
}
.toc h2 {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.85rem;
  font-weight: 600;
}
.toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
}
.toc li {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
}
.toc a {
  color: var(--slate-600);
  font-weight: 600;
}
.toc a:hover {
  color: var(--blue-700);
}
.toc a[aria-current='page'] {
  color: var(--blue-700);
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  background: var(--navy-900);
  color: var(--slate-400);
  padding: 64px 0 0;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: 40px;
  padding-bottom: 48px;
}
.footer-brand img {
  height: 28px;
  margin-bottom: 18px;
}
.footer-brand p {
  font-size: 0.875rem;
  color: var(--slate-400);
  max-width: 34ch;
}
.footer-col h2 {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 1rem;
  font-weight: 600;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col li {
  margin: 0 0 0.6rem;
}
.footer-col a {
  color: var(--slate-400);
  font-size: 0.875rem;
}
.footer-col a:hover {
  color: #fff;
  text-decoration: none;
}

.footer-contact {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-contact li {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
}
.footer-contact .icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 0.25em;
  color: var(--blue-600);
}

.footer-legal {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 24px 0 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 0.825rem;
}
.footer-legal p {
  margin: 0;
  color: var(--slate-400);
}
.footer-legal nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-legal a {
  color: var(--slate-400);
}
.footer-legal a:hover {
  color: #fff;
  text-decoration: none;
}

/* ------------------------------------------------------------- utilities */

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 2.75rem; }
.mt-6 { margin-top: 3.5rem; }
.mb-0 { margin-bottom: 0; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.text-center { text-align: center; }

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

.btn-link {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

.section-head-sm {
  margin-bottom: 32px;
}

.check-list-sm li {
  font-size: 0.9rem;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--slate-600);
}
.contact-list li {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.5;
}
.contact-list li:last-child {
  margin-bottom: 0;
}
.contact-list .icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 0.25em;
  color: var(--blue-600);
}

.figure {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper);
}
.figure img {
  display: block;
  width: 100%;
}
.figure figcaption {
  padding: 12px 18px;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: var(--white);
}

.callout {
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue-600);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 18px 22px;
  font-size: 0.925rem;
  color: var(--slate-600);
}
.callout strong {
  color: var(--navy-900);
}

/* --------------------------------------------------------------- responsive */

@media (max-width: 1080px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid-sidebar {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
  .toc {
    position: static;
  }
}

@media (max-width: 960px) {
  .nav,
  .header-cta {
    display: none;
  }
  .nav-toggle {
    display: block;
  }
  .site-header.open .nav {
    display: block;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 16px 24px 24px;
    margin: 0;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    box-shadow: var(--shadow-md);
  }
  .site-header {
    position: relative;
  }
  .site-header.open .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }
  .site-header.open .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 0.8rem 0.6rem;
    font-size: 1rem;
  }
  .site-header.open .nav-item-active > .nav-link::after {
    display: none;
  }
  .site-header.open .dropdown {
    position: static;
    box-shadow: none;
    border: 0;
    background: none;
    padding: 0 0 8px 0.6rem;
    min-width: 0;
  }
  .site-header.open .dropdown a {
    color: var(--slate-600);
    font-weight: 500;
    padding: 0.5rem 0.6rem;
  }
  .site-header.open .dropdown a:hover {
    background: var(--blue-50);
    color: var(--navy-900);
  }
  .site-header.open .header-cta {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
  }
  .site-header.open .header-cta .btn {
    justify-content: center;
  }

  .hero-grid,
  .grid-split {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
  .hero-home h1 {
    max-width: none;
  }
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat-band .wrap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat {
    padding: 26px 22px;
  }
  .stat:nth-child(odd) {
    border-left: 0;
    padding-left: 0;
  }
  .stat:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
  .cta-band .inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }
  .btn-row {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-row .btn {
    justify-content: center;
    white-space: normal;
    text-align: center;
    max-width: 100%;
  }
  .section {
    padding: 60px 0;
  }
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-home {
    padding: 64px 0 56px;
  }
  .field-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .detail-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .detail-list dt {
    border-bottom: 0;
    padding-bottom: 4px;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
  .form-card {
    padding: 24px 20px;
  }
  .steps > li {
    padding-left: 52px;
  }
  .notice-list > li,
  .timeline li {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
}

@media (max-width: 520px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .stat-band .wrap {
    grid-template-columns: minmax(0, 1fr);
  }
  .stat {
    border-left: 0;
    padding: 22px 0;
    border-top: 1px solid var(--line);
  }
  .stat:first-child {
    border-top: 0;
  }
}

@media print {
  .site-header,
  .cta-band,
  .site-footer nav,
  .nav-toggle {
    display: none;
  }
  body {
    font-size: 11pt;
    color: #000;
  }
  .hero {
    background: none;
    color: #000;
  }
  .hero h1,
  .hero .lead {
    color: #000;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
