/* Tokens and header/footer follow apps/landing/public/assets/style.css; keep them in sync. */

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-muted: #eef3fc;
  --text: #1c1c1e;
  --muted: #5f6470;
  --accent: #2f7cff;
  --accent-strong: #1a5fe0;
  --accent-soft: #e6efff;
  --ball: #f2c94c;
  --border: #e2e7f0;
  --shadow: 0 1px 2px rgb(16 24 40 / 5%), 0 8px 24px rgb(16 24 40 / 6%);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120;
    --surface: #131b2e;
    --surface-muted: #18223a;
    --text: #e9edf5;
    --muted: #a0a9bb;
    --accent: #5b9bff;
    --accent-strong: #7fb0ff;
    --accent-soft: #1b2b4d;
    --border: #243049;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 30%);
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
}

a {
  color: var(--accent);
  text-underline-offset: 2px;
}

a:hover {
  color: var(--accent-strong);
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
}

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

.brand img {
  width: 28px;
  height: 28px;
}

.lang {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.85rem;
  font-weight: 600;
}

.lang a,
.lang span {
  padding: 4px 12px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
}

.lang [aria-current] {
  background: var(--accent);
  color: #ffffff;
}

/* Document */

main {
  max-width: 800px;
  margin: 24px auto 0;
  padding: 8px 20px 32px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

h1 {
  font-size: clamp(1.75rem, 6vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 24px 0 6px;
}

h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 36px 0 10px;
}

h3 {
  font-size: 1.05rem;
  margin: 22px 0 6px;
}

.updated {
  display: inline-block;
  margin: 4px 0 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.85rem;
  font-weight: 600;
}

.note {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 14px 18px;
}

ul,
ol {
  padding-left: 22px;
}

li + li {
  margin-top: 6px;
}

li::marker {
  color: var(--accent);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
  display: block;
  overflow-x: auto;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

/* Links on the index page */

.links.links-stacked {
  display: grid;
  gap: 8px;
  margin: 8px 0 0;
}

.links-stacked a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.links-stacked a::after {
  content: "›";
  color: var(--accent);
  font-size: 1.4rem;
  line-height: 1;
}

.links-stacked a:hover {
  border-color: var(--accent);
}

/* Footer */

.site-footer {
  padding: 32px 0 40px;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer .wrap {
  display: grid;
  gap: 16px;
  max-width: 800px;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--muted);
}

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

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

/* On phones the data table becomes stacked cards: category, details, then source. */
@media (max-width: 599px) {
  table,
  tbody,
  tr,
  td {
    display: block;
  }

  thead {
    display: none;
  }

  tr {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }

  td {
    padding: 0;
    border: 0;
  }

  td:first-child {
    font-weight: 700;
  }

  td + td {
    margin-top: 4px;
  }

  td:last-child {
    color: var(--muted);
    font-size: 0.88rem;
  }
}

@media (min-width: 720px) {
  .wrap {
    padding: 0 32px;
  }

  main {
    margin-top: 40px;
    padding: 16px 48px 48px;
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
  }

  .site-footer .wrap {
    padding: 0;
  }
}
