:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-muted: #edf2f7;
  --ink: #172235;
  --muted: #5e6a7b;
  --line: #dbe2ea;
  --accent: #176b87;
  --accent-strong: #0d5069;
  --accent-soft: #dceff4;
  --good: #20744a;
  --shadow: 0 16px 45px rgba(29, 46, 68, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% -10%, rgba(23, 107, 135, 0.12), transparent 30rem),
    var(--bg);
  color: var(--ink);
  font: 16px/1.65 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: var(--accent-strong); }
a:hover { color: var(--accent); }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 20;
  padding: .6rem .9rem;
  background: var(--ink);
  color: #fff;
  border-radius: .5rem;
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(219, 226, 234, .9);
  background: rgba(246, 248, 251, .9);
  backdrop-filter: blur(14px);
}

.header-inner,
.page,
.footer-inner {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 760;
  letter-spacing: -.02em;
}
.brand img { width: 34px; height: 34px; }

.nav { display: flex; gap: .2rem; flex-wrap: wrap; }
.nav a {
  padding: .45rem .7rem;
  border-radius: .6rem;
  color: var(--muted);
  text-decoration: none;
  font-size: .94rem;
}
.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 3px 14px rgba(29, 46, 68, .06);
}

.page { padding: 5rem 0 6rem; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
  gap: 3rem;
  align-items: center;
  min-height: 470px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin: 0 0 .9rem;
  color: var(--accent-strong);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: .5rem;
  height: .5rem;
  background: var(--accent);
  border-radius: 50%;
}

h1, h2, h3 { line-height: 1.16; letter-spacing: -.035em; }
h1 { margin: 0 0 1.25rem; font-size: clamp(2.7rem, 7vw, 5rem); max-width: 12ch; }
h2 { margin: 0 0 .8rem; font-size: clamp(1.8rem, 4vw, 2.65rem); }
h3 { margin: 0 0 .45rem; font-size: 1.15rem; }
p { margin: 0 0 1rem; }

.lead { max-width: 62ch; color: var(--muted); font-size: 1.16rem; }

.actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.8rem; }
.actions.centered { justify-content: center; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .76rem 1rem;
  border: 1px solid var(--accent);
  border-radius: .7rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 720;
}
.button:hover { background: var(--accent-strong); color: #fff; }
.button.secondary { background: transparent; color: var(--accent-strong); }
.button.secondary:hover { background: var(--accent-soft); }

.route-card,
.card,
.article,
.notice {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.route-card { padding: 1.2rem; }
.route-map {
  position: relative;
  display: grid;
  gap: 1rem;
  min-height: 300px;
  padding: 1rem;
  overflow: hidden;
  border-radius: 13px;
  background: #102537 url("grid.svg");
  color: #eaf4f7;
}
.route-map::after {
  content: "";
  position: absolute;
  width: 210px;
  height: 210px;
  right: -65px;
  top: -65px;
  border: 1px solid rgba(115, 209, 227, .35);
  border-radius: 50%;
  box-shadow: 0 0 0 45px rgba(115, 209, 227, .05), 0 0 0 90px rgba(115, 209, 227, .03);
}
.route-step { position: relative; z-index: 1; display: flex; gap: .8rem; align-items: center; }
.route-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: .42rem;
  top: 1.65rem;
  width: 1px;
  height: 2.35rem;
  background: rgba(115, 209, 227, .55);
}
.node { width: .9rem; height: .9rem; flex: 0 0 auto; border-radius: 50%; background: #73d1e3; box-shadow: 0 0 0 5px rgba(115, 209, 227, .12); }
.route-step small { display: block; color: #9eb4c2; }

.section { margin-top: 5rem; }
.section-head { display: flex; justify-content: space-between; gap: 2rem; align-items: end; margin-bottom: 1.5rem; }
.section-head p { max-width: 52ch; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { padding: 1.35rem; box-shadow: none; }
.card p, .meta, .muted { color: var(--muted); }
.card a.more { font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.tag {
  display: inline-block;
  margin-bottom: .8rem;
  padding: .24rem .55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: .76rem;
  font-weight: 780;
}

.page-head { max-width: 760px; margin-bottom: 3rem; }
.page-head h1 { max-width: 15ch; font-size: clamp(2.5rem, 7vw, 4.3rem); }

.article { max-width: 820px; padding: clamp(1.3rem, 4vw, 2.6rem); margin-bottom: 1rem; box-shadow: none; }
.article h2 { margin-top: 0; font-size: 1.65rem; }
.article h3 { margin-top: 1.6rem; }
.article ul, .article ol { padding-left: 1.25rem; }
.article li + li { margin-top: .45rem; }
.article code {
  padding: .1rem .35rem;
  border-radius: .3rem;
  background: var(--surface-muted);
  font: .9em ui-monospace, SFMono-Regular, Consolas, monospace;
}

.toc { display: flex; gap: .5rem; flex-wrap: wrap; margin: 0 0 2rem; }
.toc a { padding: .45rem .7rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); text-decoration: none; font-size: .9rem; }

.status-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.status-row:last-child { border-bottom: 0; }
.status-dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 5px rgba(32,116,74,.12); }
.status-value { color: var(--good); font-weight: 760; }

.notice { padding: 1rem 1.15rem; border-left: 4px solid var(--accent); box-shadow: none; color: var(--muted); }

.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner { display: flex; justify-content: space-between; gap: 1.5rem; padding: 2rem 0; color: var(--muted); font-size: .9rem; }
.footer-inner nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer-inner a { color: inherit; }

.error-page { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.error-code { margin: 0; color: var(--accent); font-size: clamp(6rem, 22vw, 12rem); font-weight: 850; line-height: .85; letter-spacing: -.08em; }
.error-page h1 { max-width: none; font-size: clamp(2rem, 5vw, 3.2rem); }

@media (max-width: 820px) {
  .site-header { position: static; }
  .header-inner { align-items: flex-start; flex-direction: column; padding: 1rem 0; gap: .6rem; }
  .nav { margin-left: -.5rem; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .route-card { max-width: 520px; }
  .grid, .grid.two { grid-template-columns: 1fr; }
  .section-head, .footer-inner { align-items: flex-start; flex-direction: column; }
}

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