@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/nunito-sans-latin.woff2") format("woff2");
}

:root {
  color-scheme: light dark;
  --surface: #ecf0f3;
  --heading: #31344b;
  --body: #44476a;
  --brand: #0f7a50;
  --secondary: #389dc6;
  --disabled: #93a5be;
  --border-default: #b8c3d4;
  --shadow-2xs: 1px 1px 2px #b8b9be, -1px -1px 2px #ffffff;
  --shadow-xs: 2px 2px 4px #b8b9be, -2px -2px 4px #ffffff;
  --shadow-sm: 3px 3px 6px #b8b9be, -3px -3px 6px #ffffff;
  --shadow-md: 6px 6px 12px #b8b9be, -6px -6px 12px #ffffff;
  --shadow-lg: 8px 8px 16px #b8b9be, -8px -8px 16px #ffffff;
  --shadow-inset: inset 2px 2px 5px #b8b9be, inset -3px -3px 7px #ffffff;
  --radius-base: 8px;
  --radius-default: 6px;
  --radius-full: 9999px;
  --max: 1140px;
  --read: 768px;
  --spring-snappy: linear(
    0,
    0.009,
    0.035 2.1%,
    0.141 4.4%,
    0.723 12.9%,
    0.938 16.7%,
    1.017 19.4%,
    1.067 22.5%,
    1.089 26%,
    1.049 36%,
    1.011 50.3%,
    1.001 69.3%,
    1
  );
  --ease-snap: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--body);
  font: 400 16px/1.7 "Nunito Sans", sans-serif;
}

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

a {
  color: var(--brand);
  text-decoration-thickness: 0.11em;
  text-underline-offset: 0.18em;
}

a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 4px;
  border-radius: var(--radius-default);
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--heading);
  font-family: "Nunito Sans", sans-serif;
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.5px;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.25;
}

p {
  margin: 0 0 1rem;
}

.skip-link {
  position: absolute;
  z-index: 50;
  left: 16px;
  top: 16px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-base);
  box-shadow: var(--shadow-sm);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: none;
}

.site-header {
  display: grid;
  grid-template-columns: 210px 1fr auto;
  align-items: center;
  gap: 32px;
  width: min(calc(100% - 48px), var(--max));
  margin: 24px auto;
  padding: 16px 24px;
  background: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-base);
  box-shadow: var(--shadow-md);
}

.brand img {
  width: 184px;
  height: 82px;
  object-fit: contain;
}

.site-header nav {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.site-header nav a,
.site-footer a {
  padding: 8px;
  border-radius: var(--radius-base);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-decoration: none;
  text-transform: uppercase;
  transition: all 200ms ease-in-out;
}

.site-header nav a:hover,
.site-footer a:hover {
  color: var(--heading);
  box-shadow: var(--shadow-sm);
}

.site-header nav a:active,
.site-footer a:active {
  box-shadow: var(--shadow-inset);
}

.dial-link,
.hero-actions a {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  background: var(--surface);
  color: var(--brand);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-base);
  box-shadow: var(--shadow-sm);
  font-weight: 500;
  text-decoration: none;
  transition: all 200ms ease-in-out;
}

.dial-link:hover,
.hero-actions a:hover {
  box-shadow: var(--shadow-md);
}

.dial-link:active,
.hero-actions a:active {
  box-shadow: var(--shadow-inset);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: clamp(56px, 9vw, 112px);
  align-items: center;
  width: min(calc(100% - 48px), var(--max));
  min-height: calc(100dvh - 154px);
  margin: auto;
  padding: clamp(64px, 8vw, 104px) 0;
  overflow: hidden;
}

.home .hero::before {
  content: "";
  position: absolute;
  inset: 7% 28% 12% -14%;
  z-index: -1;
  background: radial-gradient(
    ellipse at center,
    color-mix(in srgb, var(--secondary) 10%, transparent),
    transparent 68%
  );
  pointer-events: none;
}

.home .hero-copy h1 {
  max-width: 10ch;
  font-size: clamp(3.5rem, 7.25vw, 7.35rem);
  font-weight: 700;
  line-height: 0.91;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.signal,
.instrument-row span,
.result-no,
.guide-switcher a span,
.breadcrumb,
.mini-dial b,
.route-map article > span {
  color: var(--brand);
  font: 700 0.75rem/1.4 "Nunito Sans", sans-serif;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.hero-copy > p:nth-of-type(2) {
  max-width: 45ch;
  margin: 30px 0;
  font-size: clamp(1rem, 1.35vw, 1.2rem);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-actions a:nth-child(2) {
  background: var(--surface);
  color: var(--heading);
  box-shadow: var(--shadow-sm);
}

.compass-stage {
  transform: translate3d(0, calc(var(--hero-scroll, 0) * -18px), 0);
}

.compass-panel {
  position: relative;
  min-height: 410px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
}

.home .hero-copy .signal,
.home .hero-copy h1,
.home .hero-copy > p:nth-of-type(2),
.home .hero-actions,
.home .compass-panel {
  animation: hero-enter 650ms var(--spring-snappy) both;
}

.home .hero-copy .signal {
  animation-delay: 60ms;
}

.home .hero-copy h1 {
  animation-delay: 140ms;
}

.home .hero-copy > p:nth-of-type(2) {
  animation-delay: 240ms;
}

.home .hero-actions {
  animation-delay: 340ms;
}

.home .compass-panel {
  animation-name: hero-compass-enter;
  animation-delay: 110ms;
}

@keyframes hero-enter {
  from {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
  }
}

@keyframes hero-compass-enter {
  from {
    opacity: 0;
    transform: scale(0.96);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}

.compass-panel::before {
  content: "";
  position: absolute;
  inset: 40px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-inset);
}

.compass-panel img {
  position: relative;
  z-index: 2;
  width: 72%;
}

.metric-orbit {
  position: absolute;
  inset: 0;
}

.metric-orbit span {
  position: absolute;
  width: 88px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-base);
  box-shadow: var(--shadow-sm);
  transition:
    transform 360ms var(--ease-snap),
    box-shadow 360ms var(--ease-snap);
}

.metric-orbit span:hover {
  transform: translate3d(0, -3px, 0);
  box-shadow: var(--shadow-md);
}

.home .hero-actions a {
  transition:
    transform 420ms var(--ease-snap),
    box-shadow 420ms var(--ease-snap);
}

.home .hero-actions a:hover {
  transform: translate3d(0, -2px, 0);
}

.home .hero-actions a:active {
  transform: scale(0.97);
}

.metric-orbit span:nth-child(1) {
  top: -4px;
  left: 40%;
}

.metric-orbit span:nth-child(2) {
  right: -16px;
  bottom: 24%;
}

.metric-orbit span:nth-child(3) {
  left: -16px;
  bottom: 16%;
}

.instrument-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto 96px;
}

.instrument-row article {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-base);
  box-shadow: var(--shadow-inset);
}

.instrument-row strong {
  display: block;
  margin: 16px 0 0;
  color: var(--heading);
  font: 600 2.25rem/1.2 "Nunito Sans", sans-serif;
}

.latest {
  width: min(calc(100% - 48px), var(--max));
  margin: auto;
  padding: 96px 0;
}

.latest > header {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 32px;
  margin-bottom: 48px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.result-card {
  position: relative;
  min-width: 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-base);
  box-shadow: var(--shadow-md);
}

.result-card > img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  margin-bottom: 24px;
  border-radius: var(--radius-base);
  box-shadow: var(--shadow-inset);
}

.result-no {
  display: block;
  margin-bottom: 16px;
}

.result-card h3 {
  margin: 8px 0 16px;
}

.result-card h3 a {
  text-decoration: underline;
}

.guide-switcher {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 24px;
  width: min(calc(100% - 48px), var(--max));
  margin: 64px auto 96px;
}

.guide-switcher > * {
  padding: 32px;
  background: var(--surface);
  border-radius: var(--radius-base);
}

.guide-switcher > a {
  display: flex;
  min-height: 250px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--border-default);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: all 200ms ease-in-out;
}

.guide-switcher > a:hover {
  box-shadow: var(--shadow-md);
}

.guide-switcher > a:active {
  box-shadow: var(--shadow-inset);
}

.guide-switcher a strong {
  color: var(--heading);
  font: 600 1.5rem/1.3 "Nunito Sans", sans-serif;
}

.guide-switcher a i {
  font-size: 1.5rem;
  font-style: normal;
}

.breadcrumb {
  display: flex;
  gap: 16px;
  width: min(calc(100% - 48px), var(--max));
  margin: 48px auto 0;
}

.article-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: clamp(48px, 8vw, 96px);
  width: min(calc(100% - 48px), var(--max));
  margin: 64px auto 96px;
}

.article-shell aside {
  align-self: start;
  position: sticky;
  top: 32px;
}

.mini-dial {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  margin: 24px 0;
  background: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-inset);
}

.mini-dial i {
  width: 4px;
  height: 72px;
  background: var(--brand);
  transform: rotate(28deg);
  transform-origin: center;
}

.mini-dial small {
  font-weight: 500;
}

.reading {
  max-width: var(--read);
}

.reading .lede {
  margin: 24px 0 40px;
  font-size: 1.25rem;
  line-height: 1.7;
}

.article-hero {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  margin-bottom: 48px;
  border: 8px solid var(--surface);
  border-radius: var(--radius-base);
  box-shadow: var(--shadow-md);
}

.prose {
  font: 400 1rem/1.7 "Nunito Sans", sans-serif;
}

.prose h2,
.prose h3 {
  margin: 2.4em 0 0.75em;
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote {
  margin: 0 0 1.4em;
}

.prose img {
  margin: 32px auto;
  border: 8px solid var(--surface);
  border-radius: var(--radius-base);
  box-shadow: var(--shadow-md);
}

.prose table {
  display: block;
  max-width: 100%;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-base);
  box-shadow: var(--shadow-sm);
}

.archive-head,
.guide-head {
  width: min(calc(100% - 48px), var(--max));
  margin: auto;
  padding: 96px 0 64px;
}

.archive-head p:last-child,
.guide-head > p {
  max-width: 68ch;
  margin-top: 24px;
  font-size: 1.25rem;
  line-height: 1.7;
}

.archive-grid {
  width: min(calc(100% - 48px), var(--max));
  margin: auto;
}

.page-nav {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 64px auto 96px;
}

.page-nav a {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  background: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-base);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: all 200ms ease-in-out;
}

.page-nav a:hover {
  box-shadow: var(--shadow-md);
}

.page-nav a:active,
.page-nav a[aria-current] {
  box-shadow: var(--shadow-inset);
  color: var(--heading);
}

.source-note {
  display: grid;
  grid-template-columns: 184px 1fr;
  gap: 32px;
  margin-top: 48px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-base);
  box-shadow: var(--shadow-inset);
}

.route-map {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto 96px;
}

.route-map article {
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-base);
  box-shadow: var(--shadow-md);
}

.route-map h2 {
  margin: 24px 0;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  padding: 56px max(24px, calc((100% - var(--max)) / 2));
  background: var(--surface);
  color: var(--body);
  border-top: 1px solid var(--border-default);
  box-shadow: var(--shadow-inset);
}

.site-footer strong,
.site-footer span {
  display: block;
}

.site-footer nav {
  display: flex;
  gap: 16px;
  align-items: center;
}

.site-footer a {
  color: var(--brand);
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #262833;
    --heading: #ecf0f3;
    --body: #93a5be;
    --brand: #20b27a;
    --disabled: #66799e;
    --border-default: #788195;
    --shadow-2xs: 1px 1px 2px #191a22, -1px -1px 2px #333644;
    --shadow-xs: 2px 2px 4px #191a22, -2px -2px 4px #333644;
    --shadow-sm: 3px 3px 6px #191a22, -3px -3px 6px #333644;
    --shadow-md: 6px 6px 12px #191a22, -6px -6px 12px #333644;
    --shadow-lg: 8px 8px 16px #191a22, -8px -8px 16px #333644;
    --shadow-inset: inset 2px 2px 5px #191a22, inset -3px -3px 7px #333644;
  }
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .site-header nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow: auto;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 52px;
  }

  .home .hero-copy h1 {
    max-width: 12ch;
  }

  .compass-stage,
  .compass-panel {
    max-width: 480px;
  }

  .instrument-row,
  .result-grid,
  .guide-switcher {
    grid-template-columns: 1fr 1fr;
  }

  .latest > header,
  .article-shell {
    grid-template-columns: 1fr;
  }

  .article-shell aside {
    position: static;
    display: grid;
    grid-template-columns: 1fr 184px;
    align-items: center;
  }

  .mini-dial {
    margin: 0;
  }

  .guide-switcher > div {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .site-header,
  .hero,
  .instrument-row,
  .latest,
  .guide-switcher,
  .breadcrumb,
  .article-shell,
  .archive-head,
  .archive-grid,
  .guide-head,
  .route-map {
    width: calc(100% - 32px);
  }

  .site-header {
    grid-template-columns: 1fr;
    padding-inline: 16px;
  }

  .dial-link {
    display: none;
  }

  .site-header nav {
    gap: 16px;
  }

  .brand img {
    width: 152px;
  }

  .compass-panel {
    min-height: 310px;
  }

  .home .hero {
    padding: 56px 0 72px;
  }

  .home .hero-copy h1 {
    font-size: clamp(3rem, 15vw, 4.8rem);
    line-height: 0.92;
  }

  .metric-orbit span {
    display: none;
  }

  .instrument-row,
  .result-grid,
  .guide-switcher,
  .route-map {
    grid-template-columns: 1fr;
  }

  .article-shell aside {
    grid-template-columns: 1fr;
  }

  .mini-dial {
    display: none;
  }

  .source-note,
  .site-footer {
    grid-template-columns: 1fr;
  }

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

@media (prefers-reduced-motion: no-preference) {
  .result-card,
  .guide-switcher > a {
    transition: box-shadow 200ms ease-in-out, transform 200ms ease-in-out;
  }

  .result-card:hover,
  .guide-switcher > a:hover {
    transform: translateY(-2px);
  }
}

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

  .compass-stage {
    transform: none;
  }

  .home .hero-copy .signal,
  .home .hero-copy h1,
  .home .hero-copy > p:nth-of-type(2),
  .home .hero-actions,
  .home .compass-panel {
    animation: hero-fade 180ms cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0ms;
    filter: none;
    transform: none;
  }

  .home .hero-actions a,
  .metric-orbit span {
    transition: none;
  }

  .home .hero-actions a:hover,
  .home .hero-actions a:active,
  .metric-orbit span:hover {
    transform: none;
  }
}

@keyframes hero-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-color-scheme: dark) {
  .site-header nav a,
  .site-footer a,
  .dial-link,
  .hero-actions a {
    transition: box-shadow 200ms ease-in-out;
  }

  .guide-switcher > a,
  .page-nav a {
    transition: box-shadow 200ms ease-in-out, transform 200ms ease-in-out;
  }
}
