/* Tennis Rivals site: the app's "Sunset Court" palette (TwMeta DesignSystem/DSColor.swift). Header and footer stay navy in
   both schemes so the gold wordmark always reads; the reading area follows the system light/dark setting. */
:root {
  --ink: #050B19;
  --navy950: #081127;
  --navy900: #0C1834;
  --navy800: #132347;
  --navy700: #1B305E;
  --gold: #F7B731;
  --gold-light: #FFDB8A;
  --gold-deep: #C97F12;
  --gold-shadow: #8A4F06;
  --sun: #FF9A3C;
  --sunset: #F2664A;
  --cream: #FFF8EC;
  --mist: #B4C0DB;

  --bg: var(--navy950);
  --surface: var(--navy900);
  --line: #24365F;
  --text: var(--cream);
  --muted: var(--mist);
  --link: var(--gold-light);
  --accent: var(--gold);
  --measure: 44rem;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #FFFBF4;
    --surface: #FFF3DE;
    --line: #EAD9BB;
    --text: #0C1834;
    --muted: #46557A;
    --link: var(--gold-shadow);
    --accent: var(--gold-deep);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: var(--ink); padding: 8px 12px; }
.skip:focus { left: 8px; top: 8px; z-index: 10; }

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px max(16px, calc((100vw - 60rem) / 2));
  background: linear-gradient(180deg, var(--ink), var(--navy900));
  border-bottom: 1px solid #24365F;
}
.top .brand img { display: block; height: 24px; width: auto; }
.top nav { display: flex; gap: 18px; flex-wrap: wrap; }
.top nav a { color: var(--cream); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.top nav a:hover { color: var(--gold-light); }

main { max-width: var(--measure); margin: 0 auto; padding: 32px 16px 56px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h1 {
  font: 800 clamp(2rem, 6vw, 2.75rem)/1.1 -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif;
  font-stretch: condensed; margin: 0.2em 0 0.4em;
}
h2 { font-size: 1.45rem; margin: 2.2em 0 0.5em; padding-top: 0.6em; border-top: 1px solid var(--line); }
h3 { font-size: 1.12rem; margin: 1.6em 0 0.4em; }
p, li { max-width: 68ch; }
.lede { font-size: 1.15rem; color: var(--muted); }
.meta, .small { color: var(--muted); font-size: 0.9rem; }
.updated { color: var(--muted); font-size: 0.95rem; margin-top: -0.2em; }

.box {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: 12px; padding: 16px 20px; margin: 1.4em 0;
}
.box h2 { border: 0; margin-top: 0; padding-top: 0; font-size: 1.15rem; }
.box ul { margin: 0.4em 0 0; padding-left: 1.2em; }

table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }
.table-scroll { overflow-x: auto; }

.toc { columns: 2 14rem; padding-left: 1.2em; }
.toc li { break-inside: avoid; }

.hero { text-align: center; padding: 24px 0 8px; }
.hero img.mark { width: 88px; height: 88px; }
.hero h1 { margin-top: 12px; }
.promises { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 12px; padding: 0; list-style: none; }
.promises li {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; max-width: none;
}
.promises strong { display: block; color: var(--accent); font-size: 1.05rem; }
.badge-soon {
  display: inline-block; margin-top: 8px; padding: 10px 18px; border-radius: 999px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold)); color: #2A1703; font-weight: 800;
  text-decoration: none;
}

ul.credits { list-style: none; padding: 0; }
ul.credits li { border-bottom: 1px solid var(--line); padding: 10px 0; max-width: none; }
ul.credits li:last-child { border-bottom: 0; }
ul.credits p { margin: 0.15em 0; }
.tag {
  display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 0.8rem;
  border: 1px solid var(--accent); color: var(--accent);
}
details { border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; margin: 8px 0; }
summary { cursor: pointer; font-weight: 600; }
pre { white-space: pre-wrap; font-size: 0.85rem; color: var(--muted); }

mark.todo {
  background: transparent; color: var(--sunset); border: 1.5px dashed var(--sunset); border-radius: 4px;
  padding: 0 4px; font-weight: 700; text-transform: uppercase; font-size: 0.85em;
}

.foot {
  background: var(--navy950); color: var(--mist); border-top: 1px solid #24365F;
  padding: 24px max(16px, calc((100vw - 60rem) / 2)) 36px; font-size: 0.9rem;
}
.foot a { color: var(--gold-light); }
.foot p { max-width: none; margin: 0.4em 0; }
.foot .mono { vertical-align: -5px; margin-right: 4px; }
.foot .small { color: #7B8AAE; }

@media (prefers-reduced-motion: no-preference) {
  a { transition: color 0.15s ease; }
}
@media print {
  .top, .foot, .skip { display: none; }
  body { background: #fff; color: #000; }
}
