:root {
  color-scheme: dark;
  --ink: #ebe3cf;
  --muted: #908b80;
  --surface: #0b0b0a;
  --surface-raised: #11110f;
  --line: #34312a;
  --line-hot: #a5432e;
  --signal: #c65538;
  --glow: rgba(198, 85, 56, 0.14);
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Code", "Roboto Mono", monospace;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--surface);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 78% 20%, var(--glow), transparent 33rem),
    linear-gradient(rgba(235, 227, 207, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(235, 227, 207, 0.025) 1px, transparent 1px),
    var(--surface);
  background-size: auto, 48px 48px, 48px 48px, auto;
}

a {
  color: inherit;
}

.shell {
  width: min(100%, 1120px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 3rem);
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.masthead,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.identity {
  text-decoration: none;
}

.identity:focus-visible,
.return-link:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 4px;
}

.status {
  color: var(--muted);
}

.status i {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.45rem;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 1rem rgba(198, 85, 56, 0.7);
}

.router {
  width: min(100%, 880px);
  margin: auto;
  padding: clamp(4rem, 11vh, 8rem) 0;
}

.eyebrow {
  margin: 0 0 1.25rem;
  color: var(--signal);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
}

h1 {
  max-width: 14ch;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 9vw, 7rem);
  font-weight: 400;
  line-height: 0.93;
  letter-spacing: -0.055em;
}

.lede {
  margin: 1.5rem 0 clamp(3rem, 7vw, 5rem);
  color: var(--muted);
  font-size: clamp(0.82rem, 1.5vw, 1rem);
  line-height: 1.7;
}

.routes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.route {
  min-width: 0;
  min-height: 12rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: 1.25rem;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  background: rgba(17, 17, 15, 0.72);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background-color 160ms ease, border-color 160ms ease;
}

.route::before {
  content: "";
  width: 0;
  height: 2px;
  position: absolute;
  inset: 0 auto auto 0;
  background: var(--signal);
  transition: width 180ms ease;
}

.route:hover,
.route:focus-visible {
  background: #181510;
  border-color: var(--line-hot);
  outline: none;
}

.route:hover::before,
.route:focus-visible::before {
  width: 100%;
}

.route-index,
.route-arrow {
  color: var(--muted);
  font-size: 0.72rem;
}

.route-arrow {
  font-size: 1.15rem;
  transition: color 160ms ease, transform 160ms ease;
}

.route:hover .route-arrow,
.route:focus-visible .route-arrow {
  color: var(--signal);
  transform: translate(0.2rem, -0.2rem);
}

.route-copy {
  min-width: 0;
  display: grid;
  gap: 0.55rem;
}

.route-copy strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 3.75rem);
  font-weight: 400;
  line-height: 1;
}

.route-copy small {
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

footer {
  padding-top: 1rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.shell-error .router {
  align-self: center;
}

.return-link {
  color: var(--ink);
  text-underline-offset: 0.3em;
}

@media (max-width: 640px) {
  .shell {
    padding: 1rem;
  }

  .router {
    padding: 4rem 0;
  }

  .routes {
    grid-template-columns: 1fr;
  }

  .route {
    min-height: 9.5rem;
  }

  footer span:last-child {
    display: none;
  }
}

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