/* Joey Tracker site. Colors from design/tokens.json (Warm Nest, lamplit). System fonts only, so the site makes no
   request to any third party. */
:root {
  --bg: #FCF6EE;
  --surface: #FFFDFB;
  --surface-alt: #F4EBE2;
  --text: #2B221C;
  --text-muted: #66584E;
  --divider: #E6DED6;
  --brand-container: #F1DFD5;
  --brand-on: #673E24;
  --brand-strong: #7A441F;
  --danger-container: #FFE2DE;
  --danger-on: #81332D;
  --focus: #2B221C;
  --shadow: 0 1px 2px rgba(60, 40, 25, 0.06), 0 6px 16px rgba(60, 40, 25, 0.07);
  --font-display: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", Roboto, "Segoe UI", system-ui, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #140F0C;
    --surface: #1C1714;
    --surface-alt: #251F1B;
    --text: #DFD8CD;
    --text-muted: #B2A79C;
    --divider: #3C3531;
    --brand-container: #34241A;
    --brand-on: #EDC9B4;
    --brand-strong: #E19C72;
    --danger-container: #32201D;
    --danger-on: #F0C5BF;
    --focus: #DFD8CD;
    --shadow: none;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

a { color: var(--brand-strong); text-underline-offset: 0.15em; }
a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

header.site, footer.site, main { max-width: 46rem; margin: 0 auto; padding: 0 16px; }

header.site {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}

nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
nav a { color: var(--text-muted); text-decoration: none; font-weight: 600; }
nav a:hover, nav a[aria-current="page"] { color: var(--brand-strong); text-decoration: underline; }

main { padding-bottom: 48px; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.25; }
h1 { font-size: clamp(1.75rem, 5vw, 2.25rem); margin: 16px 0 8px; }
h2 { font-size: 1.375rem; margin: 40px 0 8px; }
h3 { font-size: 1.125rem; margin: 24px 0 4px; }

.lede { font-size: 1.1875rem; color: var(--text-muted); margin-top: 0; }
.updated { color: var(--text-muted); font-size: 0.9375rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 16px;
  padding: 16px 20px;
  margin: 20px 0;
  box-shadow: var(--shadow);
}
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card.brand { background: var(--brand-container); color: var(--brand-on); border-color: transparent; box-shadow: none; }
.card.danger { background: var(--danger-container); color: var(--danger-on); border-color: transparent; box-shadow: none; }
.card.brand a, .card.danger a { color: inherit; }

ul.points { padding-left: 1.25rem; }
ul.points li { margin: 6px 0; }

table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.9875rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--divider); }
th { font-weight: 700; }
.table-wrap { overflow-x: auto; }

details { background: var(--surface); border: 1px solid var(--divider); border-radius: 12px; margin: 10px 0; padding: 0 16px; }
summary { cursor: pointer; font-weight: 700; padding: 12px 0; }
details[open] summary { border-bottom: 1px solid var(--divider); margin-bottom: 8px; }
details > :last-child { margin-bottom: 14px; }

.button {
  display: inline-block;
  background: var(--brand-strong);
  color: var(--surface);
  font-weight: 700;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 999px;
}

footer.site {
  border-top: 1px solid var(--divider);
  padding-top: 20px;
  padding-bottom: 32px;
  color: var(--text-muted);
  font-size: 0.9375rem;
}
footer.site ul { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 4px 18px; }
footer.site a { color: var(--text-muted); }
