:root {
  color-scheme: light;
  font-family:
    "Avenir Next", Avenir, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  --background: oklch(0.975 0.005 75);
  --surface: oklch(1 0 0);
  --ink: oklch(0.2 0.015 49);
  --muted: oklch(0.48 0.012 49);
  --line: oklch(0.88 0.008 60);
  --accent: oklch(0.54 0.16 49);
  --accent-dark: oklch(0.46 0.14 49);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
}

body {
  min-width: 20rem;
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.65;
}

a {
  color: var(--accent-dark);
  text-underline-offset: 0.18em;
}

a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.site-header,
.site-footer,
.page-main {
  width: min(100% - 2rem, 56rem);
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.1rem;
}

.site-name {
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.9rem;
  font-size: 0.9rem;
}

.site-header a[aria-current="page"] {
  color: var(--ink);
  font-weight: 750;
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.3em;
}

.content-card {
  border-radius: 1.2rem;
  padding: clamp(1.25rem, 4vw, 2.75rem);
  background: var(--surface);
  box-shadow: 0 1rem 3rem oklch(0.2 0.01 49 / 0.08);
}

.content-card--wide {
  width: min(100%, 56rem);
}

.page-heading {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--accent-dark);
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.22;
  text-wrap: balance;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 3.25rem);
  letter-spacing: -0.035em;
}

h2 {
  margin-top: 2.25rem;
  font-size: 1.35rem;
}

h3 {
  margin-bottom: 0.25rem;
  font-size: 1.05rem;
}

.name-ja {
  margin-block: 0.35rem 0;
  color: var(--muted);
}

.answer {
  max-width: 48rem;
  margin-block: 1.6rem;
  font-size: clamp(1.08rem, 2vw, 1.22rem);
  line-height: 1.6;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
}

.facts div {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
}

.facts div:last-child {
  border-bottom: 0;
}

.facts dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.facts dd {
  margin: 0.2rem 0 0;
}

.primary-action {
  display: inline-block;
  margin-block: 1.25rem 0.5rem;
  border-radius: 999px;
  padding: 0.7rem 1rem;
  background: var(--accent);
  color: white;
  font-weight: 750;
  text-decoration: none;
}

.notice {
  margin-top: 1.5rem;
  border-block: 1px solid var(--line);
  padding-block: 0.75rem;
  color: var(--muted);
}

.directory-list {
  display: grid;
  gap: 0;
  margin: 1.75rem 0 0;
  border-top: 1px solid var(--line);
  padding: 0;
  list-style: none;
}

.directory-entry {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}

.directory-entry h2 {
  margin-top: 0;
  margin-bottom: 0;
  font-size: 1.2rem;
}

.directory-entry p:last-child {
  margin-bottom: 0;
}

.route-index {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.route-index h2 {
  margin: 0;
}

.route-index__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 1.4rem 0;
  border-block: 1px solid var(--line);
}

.route-index__facts > div {
  padding: 0.8rem;
}

.route-index__facts > div:first-child {
  padding-left: 0;
}

.route-index__facts > div + div {
  border-left: 1px solid var(--line);
}

.route-index__facts dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.route-index__facts dd {
  margin: 0.2rem 0 0;
  font-weight: 750;
}

.route-index__difficulty {
  color: var(--muted);
}

.checkpoint-list {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.checkpoint-list > li {
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  padding: 1rem 1.1rem;
}

.checkpoint-list h3 {
  margin-top: 0;
}

.checkpoint-list p:last-child {
  margin-bottom: 0;
}

.timing {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

code {
  overflow-wrap: anywhere;
  font-size: 0.83em;
}

.site-footer {
  padding-block: 1.75rem 2.5rem;
  color: var(--muted);
  font-size: 0.82rem;
}

@media (max-width: 40rem) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header nav {
    justify-content: flex-start;
  }

  .content-card {
    border-radius: 0.95rem;
  }
}

@media (min-width: 48rem) {
  .directory-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2rem;
  }
}

@media (hover: hover) and (pointer: fine) {
  .primary-action:hover {
    background: var(--accent-dark);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .primary-action {
    transition:
      background-color 160ms ease-out,
      transform 160ms ease-out;
  }

  .primary-action:active {
    transform: scale(0.98);
  }
}
