:root {
  --ts-blue: #0A2A5E;
  --ts-blue-deep: #061B3D;
  --ts-yellow: #FFD100;
  --ts-red: #C8102E;
  --ts-cream: #F4F1EA;
  --ts-white: #FFFFFF;
  --ts-graphite: #3A3F45;
  --ts-clay: #B4653F;
  --ts-moss: #5A6B4F;
  --ts-mist: #C9D2DD;
  --ts-ink: #101418;

  --font-display: "Anton", "Bebas Neue", Impact, "Source Han Sans SC", "Noto Sans SC", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, monospace;

  --fs-1: 12px;
  --fs-2: 14px;
  --fs-3: 18px;
  --fs-4: 24px;
  --fs-5: 44px;
  --fs-6: 80px;

  --gutter: 72px;
  --header-h: 64px;
  --maxw: 1440px;
  --line: 1px solid var(--ts-mist);
  --ease: cubic-bezier(.2, .6, .3, 1);
}

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

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

body {
  margin: 0;
  background: var(--ts-cream);
  color: var(--ts-graphite);
  font-family: var(--font-body);
  font-size: var(--fs-3);
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.06;
  color: var(--ts-ink);
  text-align: left;
}

h1 { font-size: var(--fs-5); }
h2 { font-size: var(--fs-4); }
h3 { font-size: var(--fs-3); }

p { max-width: 38em; }

a { color: var(--ts-blue); }

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

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

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

button { cursor: pointer; }

hr { border: 0; border-top: var(--line); margin: 0; }

::selection { background: var(--ts-yellow); color: var(--ts-blue); }

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

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 999;
  padding: 12px 20px;
  background: var(--ts-blue);
  color: var(--ts-white);
  font-family: var(--font-mono);
  font-size: var(--fs-2);
  letter-spacing: .08em;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform .16s var(--ease);
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-1);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ts-graphite);
}

.eyebrow::before {
  content: "";
  width: 2px;
  height: 12px;
  background: var(--ts-yellow);
}

.index-num {
  font-family: var(--font-mono);
  font-size: var(--fs-1);
  letter-spacing: .18em;
  color: var(--ts-clay);
  font-variant-numeric: tabular-nums;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid transparent;
  font-family: var(--font-mono);
  font-size: var(--fs-2);
  letter-spacing: .08em;
  text-decoration: none;
  transition: background-color .16s var(--ease), color .16s var(--ease),
              border-color .16s var(--ease), transform .16s var(--ease);
}

.btn-primary {
  background: var(--ts-yellow);
  color: var(--ts-blue);
  border-color: var(--ts-yellow);
}

.btn-primary:hover {
  background: var(--ts-blue);
  color: var(--ts-yellow);
  border-color: var(--ts-blue);
}

.btn-ghost {
  background: transparent;
  color: var(--ts-blue);
  border-color: var(--ts-mist);
}

.btn-ghost:hover {
  border-color: var(--ts-yellow);
  color: var(--ts-ink);
}

/* ---------- tags & status ---------- */

.tag {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--ts-mist);
  font-family: var(--font-mono);
  font-size: var(--fs-1);
  letter-spacing: .12em;
  color: var(--ts-graphite);
}

.tag--clay { color: var(--ts-clay); border-color: var(--ts-clay); }
.tag--red { color: var(--ts-red); border-color: var(--ts-red); }

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: var(--fs-1);
  letter-spacing: .12em;
  color: var(--ts-graphite);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ts-moss);
  flex: none;
}

.status--alert .status-dot { background: var(--ts-red); }
.status--pending .status-dot { background: var(--ts-clay); }

/* ---------- media ---------- */

.media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: var(--line);
  background:
    linear-gradient(135deg, var(--ts-blue-deep) 0%, var(--ts-blue) 58%, #123B7C 100%);
  isolation: isolate;
}

.media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(115deg,
    rgba(255, 255, 255, .07) 0 1px,
    transparent 1px 20px);
  pointer-events: none;
  z-index: 2;
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

.media--wide { aspect-ratio: 21 / 9; }
.media--tall { aspect-ratio: 3 / 4; }
.media--square { aspect-ratio: 1 / 1; }

.media-caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-1);
  letter-spacing: .12em;
  color: var(--ts-graphite);
}

/* ---------- index list ---------- */

.index-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: var(--line);
}

.index-row {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 16px;
  min-height: 44px;
  padding: 8px 0 8px 14px;
  border-bottom: var(--line);
  color: var(--ts-graphite);
  text-decoration: none;
}

.index-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--ts-yellow);
  transform: scaleY(0);
  transform-origin: 50% 0;
  transition: transform .16s var(--ease);
}

.index-row:hover::before,
.index-row:focus-visible::before { transform: scaleY(1); }

/* ---------- cards & stats ---------- */

.card {
  background: var(--ts-white);
  border: var(--line);
  box-shadow: 0 1px 0 rgba(16, 20, 24, .03), 0 18px 40px -32px rgba(10, 42, 94, .55);
  transition: border-color .16s var(--ease), transform .16s var(--ease);
}

.card:hover {
  border-color: var(--ts-yellow);
  transform: translateY(-2px);
}

.stat { display: block; }

.stat-value {
  display: block;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-5);
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--ts-blue);
}

.stat-note {
  display: block;
  margin-top: 6px;
  font-size: var(--fs-2);
  color: var(--ts-graphite);
}

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

.section { padding-block: 96px; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  padding-bottom: 16px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--ts-graphite);
}

.section-title { font-size: var(--fs-4); }

.layout-split {
  display: grid;
  grid-template-columns: 36fr 64fr;
  align-items: start;
}

.grid { display: grid; gap: 24px; }
.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)); }

.breadcrumb {
  font-family: var(--font-mono);
  font-size: var(--fs-1);
  letter-spacing: .12em;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }

.breadcrumb li + li::before {
  content: "/";
  color: var(--ts-mist);
}

.breadcrumb a {
  color: var(--ts-graphite);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color .16s var(--ease), color .16s var(--ease);
}

.breadcrumb a:hover {
  color: var(--ts-blue);
  border-bottom-color: var(--ts-yellow);
}

.toc {
  position: sticky;
  top: calc(var(--header-h) + 32px);
  align-self: start;
}

.toc-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0 6px 12px;
  border-left: 2px solid transparent;
  font-family: var(--font-mono);
  font-size: var(--fs-1);
  letter-spacing: .12em;
  color: var(--ts-mist);
  text-decoration: none;
  transition: color .16s var(--ease), border-color .16s var(--ease);
}

.toc-link::before {
  content: "";
  width: 14px;
  height: 1px;
  background: currentColor;
  flex: none;
}

.toc-link:hover { color: var(--ts-blue); }

.toc-link.is-active,
.toc-link[aria-current="true"] {
  color: var(--ts-blue);
  border-left-color: var(--ts-yellow);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ts-cream);
  transition: background-color .2s var(--ease), box-shadow .2s var(--ease);
}

.site-header.is-scrolled {
  background: var(--ts-white);
  box-shadow: 0 14px 30px -26px rgba(6, 27, 61, .75);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--header-h);
  border-bottom: var(--line);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--fs-4);
  letter-spacing: -.01em;
  color: var(--ts-blue);
  white-space: nowrap;
}

.brand-short { display: none; }

.brand-version {
  font-family: var(--font-mono);
  font-size: var(--fs-1);
  letter-spacing: .12em;
  color: var(--ts-clay);
  font-weight: 400;
}

.nav {
  margin-left: auto;
  border-left: var(--line);
  padding-left: 20px;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item { display: block; }

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 8px;
  font-size: var(--fs-2);
  color: var(--ts-graphite);
  text-decoration: none;
  white-space: nowrap;
  transition: color .16s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 2px;
  height: 2px;
  background: var(--ts-yellow);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .16s var(--ease);
}

.nav-link:hover { color: var(--ts-ink); }
.nav-link:hover::after { transform: scaleX(1); }

.nav-num {
  font-family: var(--font-mono);
  font-size: var(--fs-1);
  letter-spacing: .1em;
  color: var(--ts-mist);
  font-variant-numeric: tabular-nums;
  transition: color .16s var(--ease);
}

.nav-link:hover .nav-num { color: var(--ts-clay); }

.nav-link[aria-current="page"] { color: var(--ts-ink); }
.nav-link[aria-current="page"]::after { transform: scaleX(1); }
.nav-link[aria-current="page"] .nav-num { color: var(--ts-red); }

.header-cta {
  flex: none;
  padding: 10px 16px;
  background: var(--ts-yellow);
  color: var(--ts-blue);
  font-family: var(--font-mono);
  font-size: var(--fs-2);
  letter-spacing: .06em;
  text-decoration: none;
  white-space: nowrap;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  transition: background-color .16s var(--ease), color .16s var(--ease);
}

.header-cta:hover {
  background: var(--ts-blue);
  color: var(--ts-yellow);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--ts-mist);
  background: transparent;
  transition: border-color .16s var(--ease), background-color .16s var(--ease);
}

.nav-toggle:hover { border-color: var(--ts-yellow); }
.nav-toggle[aria-expanded="true"] { background: var(--ts-blue); border-color: var(--ts-blue); }

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ts-blue);
  margin: 2.5px auto;
  transition: transform .16s var(--ease), opacity .16s var(--ease), background-color .16s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: var(--ts-yellow); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.scroll-meter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--ts-yellow);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .08s linear;
  pointer-events: none;
  z-index: 2;
}

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

.site-footer {
  background: var(--ts-blue);
  color: var(--ts-cream);
  margin-top: 0;
  position: relative;
}

.footer-rule {
  display: flex;
  height: 4px;
}

.footer-rule span:nth-child(1) { flex: 38; background: var(--ts-yellow); }
.footer-rule span:nth-child(2) { flex: 12; background: var(--ts-red); }
.footer-rule span:nth-child(3) { flex: 50; background: var(--ts-blue-deep); }

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 48px;
  padding-block: 72px 56px;
}

.footer-brand { min-width: 0; }

.footer-logo {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--fs-4);
  letter-spacing: -.01em;
  color: var(--ts-white);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color .16s var(--ease);
}

.footer-logo:hover { border-bottom-color: var(--ts-yellow); }

.footer-note {
  margin-top: 16px;
  max-width: 26em;
  font-size: var(--fs-2);
  line-height: 1.9;
  color: rgba(244, 241, 234, .74);
}

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

.footer-col { min-width: 0; }

.footer-col-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: var(--fs-1);
  font-weight: 400;
  letter-spacing: .18em;
  color: var(--ts-yellow);
  text-transform: uppercase;
}

.footer-col-title::before {
  content: "";
  width: 2px;
  height: 12px;
  background: var(--ts-yellow);
  flex: none;
}

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

.footer-link {
  display: inline-block;
  padding-block: 4px;
  font-size: var(--fs-2);
  line-height: 1.9;
  color: rgba(244, 241, 234, .78);
  text-decoration: none;
  transition: color .16s var(--ease);
}

.footer-link:hover { color: var(--ts-yellow); }

.footer-contact { min-width: 0; }

.footer-phone {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-3);
  letter-spacing: .04em;
  color: var(--ts-white);
  line-height: 1.4;
}

.footer-mail {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-1);
  letter-spacing: .04em;
  color: rgba(244, 241, 234, .82);
  word-break: break-all;
}

.footer-addr {
  margin-top: 16px;
  max-width: 22em;
  font-size: var(--fs-2);
  line-height: 1.9;
  color: rgba(244, 241, 234, .7);
}

.footer-hours {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-1);
  letter-spacing: .08em;
  color: var(--ts-mist);
}

.footer-bottom {
  border-top: 1px solid rgba(201, 210, 221, .22);
  padding-block: 18px;
}

.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.footer-legal,
.footer-copy {
  display: flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: var(--fs-1);
  letter-spacing: .08em;
  color: rgba(244, 241, 234, .7);
  max-width: none;
}

.footer-bar {
  display: inline-block;
  width: 2px;
  height: 12px;
  margin-right: 8px;
  background: var(--ts-yellow);
  flex: none;
}

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

@media (max-width: 1279px) {
  :root { --gutter: 40px; }
  .section { padding-block: 72px; }
  .footer-top { gap: 32px; padding-block: 56px 44px; }
}

@media (max-width: 1079px) {
  .nav-toggle { display: inline-flex; }
  .header-cta { margin-left: auto; }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-left: 0;
    padding: 8px 20px 24px;
    border-left: 0;
    border-top: var(--line);
    background: var(--ts-white);
    box-shadow: 0 24px 40px -30px rgba(6, 27, 61, .8);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    display: none;
  }

  .site-header[data-open] .nav { display: block; }

  .site-header[data-open] { background: var(--ts-white); }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-item { border-bottom: var(--line); }

  .nav-link {
    width: 100%;
    justify-content: flex-start;
    padding: 14px 0;
    font-size: var(--fs-3);
  }

  .nav-link::after { left: 0; right: auto; width: 28px; bottom: 8px; }
  .nav-link:hover::after { transform: scaleX(1); }

  .nav-num { font-size: var(--fs-1); min-width: 22px; }

  .layout-split { grid-template-columns: 1fr; }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 899px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-contact { grid-column: 1 / -1; }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 639px) {
  :root { --gutter: 20px; }

  body { font-size: 16px; }

  h1 { font-size: 32px; }
  h2 { font-size: var(--fs-4); }
  .stat-value { font-size: var(--fs-5); }

  .section { padding-block: 56px; }

  .header-inner { gap: 12px; }

  .brand { font-size: var(--fs-3); }
  .brand-full { display: none; }
  .brand-short { display: inline; }
  .brand-version { display: none; }

  .header-cta { padding: 9px 12px; font-size: var(--fs-1); }

  .footer-nav { grid-template-columns: 1fr; gap: 24px; }
  .footer-top { padding-block: 48px 36px; }
  .footer-bottom-inner { flex-direction: column; align-items: flex-start; }

  .grid--2,
  .grid--3,
  .grid--4 { grid-template-columns: minmax(0, 1fr); }

  .index-row { grid-template-columns: 40px 1fr; row-gap: 4px; }
  .index-row > :last-child { grid-column: 2; }

  .toc { position: static; display: flex; flex-wrap: wrap; gap: 8px 16px; }
}

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

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

  .card:hover,
  .index-row:hover::before { transform: none; }

  .scroll-meter { transition: none; }
}
