:root {
  --bg: #12140f;
  --card: #1c211c;
  --card-2: #232922;
  --line: rgba(246, 241, 231, 0.1);
  --text: #f6f1e7;
  --muted: #b7b1a4;
  --faint: #8a8478;
  --amber: #e8b15a;
  --amber-ink: #2a2112;
  --up: #8dce9f;
  --down: #f08a78;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --serif: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 420px at 0% -8%, rgba(232, 177, 90, 0.1), transparent 55%),
    radial-gradient(680px 380px at 100% 0%, rgba(120, 150, 110, 0.12), transparent 50%);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
}

body::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--amber), #f3ddb0 42%, transparent 88%);
}

.wrap {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 18px max(16px, env(safe-area-inset-right)) calc(48px + env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
}

a {
  color: inherit;
}

a:focus-visible,
.skip:focus {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

::selection {
  background: rgba(232, 177, 90, 0.35);
  color: #fff;
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 5;
  background: var(--amber);
  color: var(--amber-ink);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.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;
}

.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  margin: 0;
  color: var(--amber);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
}

.refresh:hover {
  border-color: rgba(232, 177, 90, 0.45);
  background: rgba(232, 177, 90, 0.08);
}

h1 {
  margin: 10px 0 0;
  font-family: var(--serif);
  font-weight: 560;
  font-size: clamp(3.4rem, 12vw, 5.6rem);
  letter-spacing: -0.035em;
  line-height: 0.88;
}

.dek {
  max-width: 34ch;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.45;
}

.hero {
  display: grid;
  gap: 22px;
  margin-bottom: 28px;
}

.weather {
  padding: 16px 16px 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.weather h2,
.wlabel,
.wmeta,
.wasof,
.temp {
  margin: 0;
}

.wtop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.weather h2 {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.wlabel {
  margin-top: 4px;
  font-size: 1.05rem;
  font-weight: 500;
}

.wicon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(232, 177, 90, 0.12);
  color: var(--amber);
  flex: none;
}

.temp {
  margin-top: 8px;
  font-size: clamp(4rem, 18vw, 5.25rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 0.86;
}

.deg {
  font-size: 0.55em;
  margin-left: 1px;
}

.wmeta {
  margin-top: 10px;
  color: var(--muted);
}

.wasof {
  margin-top: 6px;
  color: var(--faint);
  font-size: 0.82rem;
}

.weather-error p {
  margin: 8px 0 0;
}

.block {
  margin-top: 28px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  margin-bottom: 10px;
}

.section-head h2 {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.updated {
  margin: 0;
  color: var(--faint);
  font-size: 0.78rem;
}

.markets,
.sports {
  display: grid;
  gap: 10px;
}

.quote,
.league {
  min-width: 0;
  container-type: inline-size;
  padding: 14px 14px 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.quote {
  border-top-width: 2px;
  border-top-color: var(--faint);
}

.quote.up {
  border-top-color: var(--up);
}

.quote.down {
  border-top-color: var(--down);
}

.quote.missing {
  border-top-color: var(--down);
  border-style: dashed;
}

.session {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.session.live {
  color: var(--amber);
}

.session i {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: var(--amber);
  box-shadow: 0 0 0 0 rgba(232, 177, 90, 0.7);
  animation: pulse 1.8s ease-out infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 6px rgba(232, 177, 90, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(232, 177, 90, 0);
  }
}

.quote-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
}

.quote-name h3,
.sub,
.price,
.chg,
.range {
  margin: 0;
}

.quote-name h3 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.sub {
  color: var(--faint);
  font-size: 0.82rem;
}

.price {
  font-size: clamp(1.45rem, 6vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}

.chg {
  margin-top: 8px;
  font-size: 0.95rem;
  font-weight: 600;
}

.chg.up,
.quote.up .chg {
  color: var(--up);
}

.chg.down,
.quote.down .chg {
  color: var(--down);
}

.chg.flat {
  color: var(--muted);
}

.range {
  margin-top: 4px;
  color: var(--faint);
  font-size: 0.82rem;
}

.league-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.league-head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.league-head p,
.quiet,
.venue {
  margin: 0;
  color: var(--faint);
  font-size: 0.82rem;
}

.game {
  padding: 11px 0 8px;
}

.game + .game {
  border-top: 1px solid var(--line);
}

.game.pinned {
  margin: 6px 0 8px;
  padding: 10px 10px 8px;
  border: 1px solid rgba(232, 177, 90, 0.38);
  border-radius: 14px;
  background: rgba(232, 177, 90, 0.07);
}

.game.pinned + .game {
  border-top: 0;
}

.game-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-bottom: 6px;
}

.status {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.status.in {
  color: var(--amber);
}

.status.post {
  color: var(--faint);
}

.tag {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(232, 177, 90, 0.18);
  color: var(--amber);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bcast {
  margin-left: auto;
  color: var(--faint);
  font-size: 0.78rem;
}

.side {
  display: grid;
  grid-template-columns: 3.1rem minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 30px;
}

.abbr {
  display: inline-grid;
  place-items: center;
  min-height: 26px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  background: color-mix(in srgb, var(--team, var(--amber)) 24%, transparent);
  box-shadow: inset 3px 0 0 var(--team, var(--line));
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.tname {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.side.winner .tname {
  font-weight: 600;
}

.rank {
  margin-right: 5px;
  color: var(--amber);
  font-size: 0.75rem;
  font-weight: 600;
}

.score,
.record {
  font-size: 0.95rem;
  font-weight: 600;
  text-align: right;
}

.record {
  color: var(--muted);
  font-weight: 500;
}

.venue {
  margin-top: 6px;
}

.quiet {
  padding-top: 8px;
}

.leaders {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.leaders.splits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}

/* Half a phone, or a third of a desktop row, cannot fit "Golden Knights". */
@container (max-width: 520px) {
  .leaders.splits {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.leader-col h4 {
  margin: 0 0 8px;
  color: var(--faint);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.leaders ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.leaders li {
  display: grid;
  grid-template-columns: 1.2rem minmax(0, 1fr) auto;
  gap: 6px;
  align-items: baseline;
  font-size: 0.9rem;
}

.seed,
.lead-detail {
  color: var(--muted);
}

.lead-name {
  min-width: 0;
}

.news {
  list-style: none;
  margin: 0;
  padding: 0;
}

.news a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 13px 8px;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.news li:first-child a {
  border-top: 0;
}

.news a:hover {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
}

.news-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pill.us {
  color: #f0d7a2;
  background: rgba(232, 177, 90, 0.14);
}

.pill.sports {
  color: #c6e7cf;
  background: rgba(141, 206, 159, 0.14);
}

.pill.markets {
  color: #d5e0ee;
  background: rgba(160, 184, 214, 0.16);
}

.meta {
  color: var(--faint);
  font-size: 0.8rem;
}

.headline {
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: -0.012em;
  line-height: 1.35;
  overflow-wrap: break-word;
}

.empty {
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
}

.empty p {
  margin: 0;
}

.empty-detail {
  margin-top: 4px;
  color: var(--muted);
}

.empty .refresh {
  margin-top: 12px;
}

footer {
  margin-top: 36px;
  color: var(--faint);
  font-size: 0.82rem;
}

footer p {
  margin: 0 0 6px;
}

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

.sources {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
}

.sources a {
  color: var(--muted);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.sources a:hover {
  color: var(--text);
}

@media (min-width: 800px) {
  .wrap {
    padding-top: 28px;
  }

  .hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    align-items: end;
    gap: 28px;
    margin-bottom: 36px;
  }

  .weather {
    padding: 18px 18px 16px;
  }

  .block {
    margin-top: 34px;
  }
}

@media (min-width: 860px) {
  .markets {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .quote-name {
    min-height: 2.7rem;
  }

  .quote-main {
    display: block;
  }

  .price {
    margin-top: 14px;
    font-size: 2.05rem;
  }
}

@media (min-width: 1020px) {
  .sports {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: min(100%, 280px);
  margin: 0 0 18px;
}

.tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}

.tabs a[aria-current="page"] {
  border-color: var(--amber);
  background: var(--amber);
  color: var(--amber-ink);
}

.hero-single {
  margin-bottom: 8px;
}

.finder {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  max-width: 560px;
}

.finder input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--text);
  font: inherit;
}

.finder input::placeholder {
  color: var(--faint);
}

.finder input:focus-visible,
.finder button:focus-visible,
.tabs a:focus-visible,
.ranges a:focus-visible,
.hit:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

.finder button {
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  background: var(--amber);
  color: var(--amber-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.stock {
  margin-top: 18px;
  padding: 16px 14px 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.stock-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: end;
}

.stock h2,
.stock .sub,
.stock-price {
  margin: 0;
}

.stock h2 {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.stock-price {
  font-size: clamp(1.7rem, 7vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

.ranges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 6px;
}

.ranges a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.ranges a[aria-current="true"] {
  border-color: var(--amber);
  background: var(--amber);
  color: var(--amber-ink);
}

.chart-svg {
  display: block;
  width: 100%;
  height: auto;
}

.chart-scale {
  display: flex;
  justify-content: space-between;
  color: var(--faint);
  font-size: 0.78rem;
}

.hits {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hit {
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 1px;
  align-items: center;
  min-height: 52px;
  padding: 10px 8px;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.hits li:first-child .hit {
  border-top: 0;
}

.hit-sym {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hit-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hit-meta {
  grid-column: 2;
  color: var(--faint);
  font-size: 0.78rem;
}

.hit[aria-current="true"],
.hit:hover {
  background: rgba(232, 177, 90, 0.08);
  border-radius: 12px;
}

@media (min-width: 800px) {
  .hero.hero-single {
    grid-template-columns: minmax(0, 720px);
  }

  .stock {
    padding: 18px 18px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .session i {
    animation: none;
  }
}
