:root {
  color-scheme: dark;
  --ink: #080a09;
  --ink-soft: #0e1110;
  --surface: #121614;
  --surface-2: #171c19;
  --line: rgba(235, 241, 222, 0.13);
  --line-strong: rgba(235, 241, 222, 0.24);
  --paper: #edf2e5;
  --muted: #929b8d;
  --acid: #c6ff3d;
  --orange: #ff7548;
  --cyan: #76e6da;
  --red: #ff6b68;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--paper);
  background:
    radial-gradient(circle at 52% 14%, rgba(198, 255, 61, 0.055), transparent 27rem),
    var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.16;
  pointer-events: none;
  content: "";
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  color: var(--ink);
  background: var(--acid);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.eyebrow,
.section-label,
.focus-topline,
.clock-kicker,
.directory-summary {
  font-family: var(--font-mono);
  font-size: 0.67rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 1rem;
  color: var(--acid);
}

.eyebrow::before {
  width: 1.4rem;
  height: 1px;
  content: "";
  background: currentColor;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 70px;
  padding: 0 3.25vw;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 10, 9, 0.82);
  backdrop-filter: blur(18px);
}

.brand,
.footer-brand strong {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-mark {
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 2px solid var(--acid);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(198, 255, 61, 0.08);
}

.primary-nav {
  display: flex;
  gap: 2rem;
}

.primary-nav a {
  color: var(--muted);
  font-size: 0.76rem;
  text-decoration: none;
  transition: color 180ms ease;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
  color: var(--paper);
}

.header-time {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: var(--font-mono);
  line-height: 1.35;
}

.header-time span {
  color: var(--muted);
  font-size: 0.58rem;
}

.header-time strong {
  font-size: 0.72rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(225px, 0.7fr) minmax(520px, 1.65fr) minmax(260px, 0.75fr);
  min-height: calc(100vh - 70px);
  border-bottom: 1px solid var(--line);
}

.hero-heading,
.market-focus {
  padding: clamp(2rem, 4vw, 4.75rem) clamp(1.5rem, 3vw, 3.5rem);
}

.hero-heading {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
}

.hero-heading h1 {
  margin: 0;
  font-size: clamp(3.3rem, 5.7vw, 7.4rem);
  font-weight: 500;
  letter-spacing: -0.075em;
  line-height: 0.82;
}

.hero-heading h1 em {
  color: var(--acid);
  font-family: Georgia, serif;
  font-weight: 400;
}

.hero-copy {
  max-width: 28rem;
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: clamp(0.9rem, 1.1vw, 1.05rem);
}

.hero-stats {
  display: grid;
  gap: 1.1rem;
  margin-top: auto;
  padding-top: 3rem;
}

.hero-stats div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.hero-stats strong {
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: clamp(1.2rem, 2vw, 2.1rem);
  font-weight: 400;
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.72rem;
}

.clock-stage {
  display: flex;
  min-width: 0;
  padding: 1.35rem clamp(1rem, 2.2vw, 2.6rem) 1.2rem;
  overflow: hidden;
  flex-direction: column;
  justify-content: center;
}

.clock-kicker,
.focus-topline,
.section-label,
.directory-summary {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}

.orbit-wrap {
  position: relative;
  width: min(100%, 72vh, 780px);
  margin: auto;
  aspect-ratio: 1;
}

#market-orbit {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.orbit-core {
  position: absolute;
  inset: 35%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(8, 10, 9, 0.92);
  box-shadow: 0 0 4rem rgba(0, 0, 0, 0.65);
  flex-direction: column;
}

.orbit-label,
#orbit-open {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: clamp(0.46rem, 0.7vw, 0.65rem);
  letter-spacing: 0.12em;
}

#orbit-time {
  margin: 0.35rem 0;
  font-family: var(--font-mono);
  font-size: clamp(1.15rem, 2.55vw, 2.75rem);
  font-weight: 400;
  letter-spacing: -0.06em;
}

#orbit-open {
  color: var(--acid);
}

.orbit-face,
.orbit-guide,
.orbit-tick {
  fill: none;
  stroke: var(--line);
}

.orbit-face {
  stroke: var(--line-strong);
}

.orbit-guide {
  opacity: 0.6;
}

.orbit-tick.major {
  stroke: var(--paper);
}

.orbit-number {
  fill: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
  text-anchor: middle;
  dominant-baseline: middle;
}

.orbit-number.major {
  fill: var(--paper);
  font-weight: 700;
}

.session-arc {
  fill: none;
  stroke-linecap: round;
  opacity: 0.82;
  transition: opacity 180ms ease, stroke-width 180ms ease, filter 180ms ease;
}

.session-arc.is-muted {
  opacity: 0.08;
}

.session-arc.is-active {
  opacity: 1;
  filter: drop-shadow(0 0 7px currentColor);
}

.clock-hand-halo,
.clock-hand {
  stroke-linecap: round;
}

.clock-hand-halo {
  stroke: rgba(198, 255, 61, 0.14);
  stroke-width: 12;
}

.clock-hand {
  stroke: var(--acid);
  stroke-width: 2;
}

.orbit-legend {
  display: flex;
  max-width: 100%;
  gap: 0.4rem;
  padding: 0.4rem 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.orbit-legend::-webkit-scrollbar {
  display: none;
}

.legend-button,
.filter-button {
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.legend-button {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.55rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.62rem;
}

.legend-button::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  content: "";
  background: var(--exchange-color);
}

.legend-button:hover,
.legend-button:focus-visible,
.legend-button.is-selected {
  border-color: var(--exchange-color);
  color: var(--paper);
}

.legend-button.is-selected {
  background: rgba(255, 255, 255, 0.05);
}

.market-focus {
  display: flex;
  border-left: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent);
  flex-direction: column;
}

.focus-place {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: clamp(2rem, 7vh, 5.5rem);
}

.focus-flag {
  display: grid;
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  place-items: center;
  font-size: 1.35rem;
}

.focus-place h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2vw, 2.4rem);
  font-weight: 500;
  letter-spacing: -0.04em;
}

.focus-place p {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.focus-time {
  display: flex;
  margin-top: 2rem;
  flex-direction: column;
}

.focus-time strong {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 3.8vw, 4.3rem);
  font-weight: 400;
  letter-spacing: -0.08em;
  line-height: 1;
}

.focus-time span {
  margin-top: 0.4rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.63rem;
}

.focus-status {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 2rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.focus-status strong {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.focus-status > span:last-child {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.72rem;
}

.status-badge {
  width: max-content;
  padding: 0.3rem 0.55rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.57rem;
  letter-spacing: 0.1em;
}

.status-badge.open {
  color: var(--acid);
}

.status-badge.lunch {
  color: #ffd166;
}

.status-badge.holiday {
  color: #cc9dff;
}

.status-badge.closed {
  color: var(--red);
}

.focus-holidays {
  margin-top: auto;
  padding-top: 2rem;
}

.holiday-list {
  min-height: 7.6rem;
}

.holiday-row {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: 0.8rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

.holiday-row time {
  color: var(--acid);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.holiday-row strong {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
}

.holiday-row span {
  color: var(--muted);
  font-size: 0.62rem;
}

.quiet,
.calendar-note {
  color: var(--muted);
  font-size: 0.68rem;
}

.calendar-note {
  margin: 1rem 0 0;
}

.tape-section,
.directory {
  padding: clamp(4rem, 7vw, 7rem) max(3.25vw, 1.25rem);
  border-bottom: 1px solid var(--line);
}

.tape-heading {
  display: grid;
  grid-template-columns: 0.6fr 1.2fr 1fr;
  align-items: end;
  gap: 2rem;
  margin-bottom: 3rem;
}

.tape-heading h2,
.directory-heading h2 {
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 5.5rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.95;
}

.tape-heading > p:last-child {
  justify-self: end;
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.65rem;
}

.price-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.price-group {
  min-width: 0;
}

.price-group + .price-group {
  border-left: 1px solid var(--line);
}

.price-group .section-label {
  padding: 0.8rem 1rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.price-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.price-card {
  min-width: 0;
  min-height: 8.75rem;
  padding: 1.1rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.01);
}

.price-card:hover {
  background: rgba(255, 255, 255, 0.025);
}

.price-card-head {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.61rem;
}

.price-card strong {
  display: block;
  margin-top: 1.2rem;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: clamp(1.25rem, 2vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.06em;
  text-overflow: ellipsis;
}

.price-change {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.63rem;
}

.price-change.positive {
  color: var(--acid);
}

.price-change.negative {
  color: var(--red);
}

.skeleton {
  opacity: 0.55;
}

.skeleton strong {
  color: transparent;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--surface), var(--surface-2), var(--surface));
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

.directory-heading {
  display: grid;
  grid-template-columns: 1.5fr 0.65fr;
  align-items: end;
  gap: 3rem;
}

.directory-heading > p {
  max-width: 28rem;
  margin: 0 0 0.5rem auto;
  color: var(--muted);
}

.directory-tools {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) 1fr;
  align-items: center;
  gap: 2rem;
  margin-top: 3.5rem;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box svg {
  position: absolute;
  left: 1rem;
  width: 17px;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-width: 1.5;
}

.search-box input {
  width: 100%;
  height: 3.2rem;
  padding: 0 3.5rem 0 3rem;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  outline: none;
  color: var(--paper);
  background: transparent;
}

.search-box input:focus {
  border-color: var(--acid);
}

.search-box input::placeholder {
  color: #667064;
}

.search-box kbd {
  position: absolute;
  right: 1rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.65rem;
}

.region-filters {
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
  overflow-x: auto;
}

.filter-button {
  padding: 0.55rem 0.8rem;
  color: var(--muted);
  font-size: 0.67rem;
}

.filter-button:hover,
.filter-button:focus-visible,
.filter-button.is-active {
  border-color: var(--acid);
  color: var(--paper);
}

.filter-button.is-active {
  color: var(--ink);
  background: var(--acid);
}

.directory-summary {
  margin-top: 3rem;
  padding: 0 0 0.8rem;
  border-bottom: 1px solid var(--line-strong);
}

.exchange-list {
  display: grid;
}

.exchange-row {
  position: relative;
  display: grid;
  grid-template-columns: 2.25fr 1fr 1fr 1fr 1.25fr auto;
  align-items: center;
  min-height: 6.25rem;
  gap: 1.5rem;
  padding: 1rem 0.85rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  background: transparent;
  cursor: pointer;
  transition: background 160ms ease, padding 160ms ease;
}

.exchange-row::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  content: "";
  background: var(--exchange-color);
  transform: scaleY(0);
  transition: transform 160ms ease;
}

.exchange-row:hover,
.exchange-row:focus-visible,
.exchange-row.is-selected {
  padding-right: 1.1rem;
  padding-left: 1.1rem;
  outline: none;
  background: rgba(255, 255, 255, 0.025);
}

.exchange-row:hover::before,
.exchange-row:focus-visible::before,
.exchange-row.is-selected::before {
  transform: scaleY(1);
}

.exchange-identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 1rem;
}

.exchange-flag {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  place-items: center;
}

.exchange-identity strong,
.exchange-identity span {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.exchange-identity strong {
  font-size: 0.95rem;
  font-weight: 500;
}

.exchange-identity span,
.exchange-cell span {
  color: var(--muted);
  font-size: 0.67rem;
}

.exchange-cell strong,
.exchange-cell span {
  display: block;
}

.exchange-cell strong {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 400;
}

.exchange-local-time {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 1.5vw, 1.45rem);
  letter-spacing: -0.04em;
}

.row-arrow {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  place-items: center;
  transition: color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.exchange-row:hover .row-arrow,
.exchange-row:focus-visible .row-arrow {
  border-color: var(--acid);
  color: var(--acid);
  transform: translateX(3px);
}

.empty-state {
  padding: 4rem 0;
  color: var(--muted);
  text-align: center;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr 1.5fr 0.6fr;
  gap: 3rem;
  padding: 3.5rem max(3.25vw, 1.25rem);
  color: var(--muted);
}

.footer-brand {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  width: max-content;
  gap: 0.7rem;
}

.footer-brand p {
  grid-column: 1 / -1;
  margin: 0.6rem 0 0;
  font-size: 0.72rem;
}

.footer-meta {
  font-size: 0.68rem;
}

.footer-meta p {
  margin: 0 0 0.65rem;
}

.footer-meta a:hover {
  color: var(--paper);
}

.footer-legal {
  margin: 0;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
}

.noscript {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  z-index: 100;
  padding: 1rem;
  color: var(--ink);
  text-align: center;
  background: var(--acid);
}

@media (max-width: 1180px) {
  .hero {
    grid-template-columns: 0.7fr 1.3fr;
  }

  .market-focus {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 3rem;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .focus-topline,
  .calendar-note {
    grid-column: 1 / -1;
  }

  .focus-place {
    margin-top: 2rem;
  }

  .focus-holidays {
    grid-column: 2;
    grid-row: 2 / span 3;
    margin-top: 2rem;
    padding-top: 0;
  }

  .exchange-row {
    grid-template-columns: 2fr 1fr 1fr 1.25fr auto;
  }

  .exchange-row .exchange-cell:nth-of-type(3) {
    display: none;
  }
}

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

  .primary-nav {
    display: none;
  }

  .hero {
    display: flex;
    flex-direction: column;
  }

  .hero-heading {
    min-height: 37rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .clock-stage {
    min-height: 100svh;
  }

  .orbit-wrap {
    width: min(100%, 680px);
  }

  .market-focus {
    display: flex;
  }

  .focus-holidays {
    margin-top: 2rem;
  }

  .tape-heading,
  .directory-heading,
  .directory-tools {
    grid-template-columns: 1fr;
  }

  .tape-heading > p:last-child {
    justify-self: start;
  }

  .price-board {
    grid-template-columns: 1fr;
  }

  .price-group + .price-group {
    border-left: 0;
  }

  .directory-heading > p {
    margin-left: 0;
  }

  .region-filters {
    justify-content: flex-start;
  }

  .exchange-row {
    grid-template-columns: 1.7fr 1fr 1fr auto;
  }

  .exchange-row .exchange-cell:nth-of-type(2),
  .exchange-row .exchange-cell:nth-of-type(3) {
    display: none;
  }

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

  .footer-legal {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding: 0 1rem;
  }

  .hero-heading,
  .market-focus,
  .tape-section,
  .directory {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .hero-heading {
    min-height: 33rem;
  }

  .hero-heading h1 {
    font-size: clamp(3.7rem, 19vw, 6rem);
  }

  .clock-stage {
    min-height: auto;
    padding: 2rem 0.4rem;
  }

  .clock-kicker,
  .orbit-legend {
    margin-right: 0.6rem;
    margin-left: 0.6rem;
  }

  .orbit-core {
    inset: 32%;
  }

  .market-focus {
    min-height: 48rem;
  }

  .price-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .directory-tools {
    gap: 1rem;
  }

  .directory-summary span:last-child {
    display: none;
  }

  .exchange-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.8rem;
  }

  .exchange-row .exchange-cell {
    display: none;
  }

  .exchange-local-time {
    font-size: 0.78rem;
  }

  .row-arrow {
    width: 2rem;
    height: 2rem;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
