:root {
  --font-display: "Noto Serif SC", "Songti SC", STSong, serif;
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --copy-measure: 42rem;
}

*,
*::before,
*::after {
  letter-spacing: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  font-kerning: normal;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  font-synthesis: none;
}

:where(h1, .hero-title, .display-title) {
  font-family: var(--font-display);
  font-weight: 700;
  font-synthesis: none;
  text-wrap: balance;
}

:where(h2, h3, h4, .section-title, .panel-title, .dashboard-state-title) {
  font-family: var(--font-sans);
  font-weight: 600;
  font-synthesis: none;
  text-wrap: balance;
}

:where(p, li, dd) {
  text-wrap: pretty;
}

:where(.font-mono, [class*="font-mono"], .metric strong, .metric-value, .numeric, .kbd, .search-result-meta, .step::before) {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums lining-nums;
}

:where(.font-medium) {
  font-weight: 500;
}

:where(.font-semibold, .font-bold, .font-extrabold, .font-black) {
  font-weight: 600;
}

.copy-measure,
.hero-copy,
.home-hero-copy,
.section-copy,
.prose-copy {
  max-width: var(--copy-measure);
}

.home-hero-intro .hero-title {
  max-width: 11em;
  margin: 0;
  color: var(--ink);
  background: none;
  font-size: 56px;
  line-height: 1.18;
}

html[lang="en"] .home-hero-intro .hero-title {
  max-width: 19ch;
}

.home-hero-intro .hero-title span {
  color: inherit;
  background: none;
  -webkit-text-fill-color: currentColor;
}

.page-hero .hero-title {
  max-width: 11em;
  font-size: 52px;
  line-height: 1.18;
}

html[lang="en"] .page-hero .hero-title {
  max-width: 19ch;
}

.section-title,
.section h2,
.section-band h2 {
  font-size: 40px;
  line-height: 1.24;
}

.home-hero-panel h2,
.dispatch-panel h2,
.panel-title {
  font-size: 24px;
  line-height: 1.35;
}

.home-hero-copy,
.hero-copy,
.lead-copy {
  font-size: 19px;
  line-height: 1.75;
}

.section-copy,
.prose-copy {
  font-size: 16px;
  line-height: 1.7;
}

.pill,
.panel-kicker,
.card-label,
[class*="kicker"] {
  font-family: var(--font-sans);
  font-weight: 600;
  text-transform: none;
}

.home-hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(20rem, 0.88fr);
  gap: 40px 64px;
  align-items: center;
  text-align: left;
}

.hero {
  min-height: 100dvh;
}

.home-hero-intro {
  min-width: 0;
}

.home-hero-intro .hero-mark {
  margin: 0 0 20px;
}

.home-hero-intro .pill {
  margin-left: 0;
  margin-right: 0;
}

.home-hero-copy {
  max-width: 40rem;
  margin: 24px 0 0;
  color: #526070;
}

.home-hero-panel {
  padding: 28px;
}

.home-hero-panel .hero-quick {
  width: 100%;
  margin: 16px 0 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.hero-actions .btn {
  min-height: 48px;
}

.hero-actions .btn-secondary {
  border-color: rgba(15, 159, 142, 0.25);
  color: var(--jade-dark);
}

.home-metrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.home-metrics .metric {
  padding: 16px 18px;
}

.home-metrics .metric-value {
  font-size: 32px;
  font-weight: 600;
}

.editorial-statement {
  max-width: 42rem;
  font-family: var(--font-sans);
  font-size: 40px;
  font-weight: 600;
  line-height: 1.32;
  text-wrap: balance;
}

.page-hero .hero-copy {
  max-width: 38rem;
}

.dashboard-state-title {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.35;
}

.dashboard-state-copy {
  max-width: 34rem;
  font-size: 16px;
  line-height: 1.7;
}

.dashboard-language-toggle {
  min-width: 44px;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.06);
  font-family: var(--font-sans);
  font-weight: 600;
}

@media (max-width: 1100px) and (min-width: 861px) {
  .home-hero-shell {
    grid-template-columns: minmax(0, 1.3fr) minmax(20rem, 0.7fr);
  }

  .home-hero-intro .hero-title {
    font-size: 48px;
  }

  .home-hero-panel .hero-quick {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-hero-panel .hero-quick-run {
    width: 100%;
  }
}

@media (max-width: 860px) {
  .nav .nav-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
    order: initial;
    padding-top: 4px;
  }

  .nav-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .hero {
    min-height: auto;
    padding-top: 176px;
  }

  .home-hero-shell {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .home-hero-intro .hero-title {
    font-size: 48px;
  }

  .page-hero .hero-title {
    font-size: 44px;
  }

  .section-title,
  .section h2,
  .section-band h2 {
    font-size: 34px;
  }

  .home-hero-panel h2,
  .dispatch-panel h2,
  .panel-title,
  .dashboard-state-title {
    font-size: 22px;
  }

  .home-hero-copy,
  .hero-copy,
  .lead-copy {
    font-size: 18px;
  }

  .home-hero-panel {
    padding: 20px;
  }

  .home-metrics {
    margin-top: 0;
  }
}

@media (max-width: 560px) {
  .command-btn,
  .start-btn {
    display: none;
  }

  .nav .brand span,
  .nav .nav-actions > .nav-button:first-child {
    display: none;
  }

  .nav-inner {
    row-gap: 4px;
  }

  .nav-links {
    gap: 4px;
    scrollbar-width: none;
  }

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

  .nav .nav-link,
  .nav-link-main {
    padding-inline: 8px;
  }

  .hero {
    padding: 118px 0 24px;
  }

  .home-hero-shell {
    gap: 16px;
  }

  .home-hero-intro .hero-mark {
    display: none;
  }

  .home-hero-intro .pill {
    margin-bottom: 10px;
    padding-block: 5px;
  }

  .home-hero-intro .hero-title {
    font-size: 38px;
  }

  .page-hero .hero-title {
    font-size: 36px;
  }

  .section-title,
  .section h2,
  .section-band h2 {
    font-size: 30px;
  }

  .home-hero-copy,
  .hero-copy,
  .lead-copy {
    margin-top: 12px;
    font-size: 17px;
  }

  .home-hero-panel {
    padding: 14px;
  }

  .home-hero-panel :where(.mt-3) {
    margin-top: 6px;
  }

  .home-hero-panel .hero-quick {
    grid-template-columns: 1fr auto;
    margin-top: 10px;
  }

  .home-hero-panel .hero-quick-input,
  .home-hero-panel .hero-quick-run {
    min-height: 44px;
  }

  .home-hero-panel .hero-quick-input {
    min-width: 0;
    padding-inline: 10px;
  }

  .home-hero-panel .hero-quick-run {
    padding-inline: 12px;
  }

  .home-hero-panel .hero-quick-hint,
  .home-hero-panel .hero-actions {
    display: none;
  }

  .home-metrics,
  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .metric-grid .metric {
    min-height: 76px;
    padding: 12px 8px;
  }

  .metric-grid .metric strong {
    font-size: 24px;
  }

  .metric-grid .metric span {
    margin-top: 6px;
  }

  .hero-actions {
    display: grid;
  }

  .hero-actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
