/*
 * The page in front of the application. It carries the same palette as the app itself
 * (src/styles.css), so opening the app is a continuation rather than a jump, and it follows
 * the theme the app stored: `landing.js` writes `data-theme` on the root before paint.
 */
:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --text: #1d2330;
  --muted: #6b7280;
  --border: #d9dde5;
  --accent: #2563c9;
  --accent-ink: #ffffff;
  --accent-soft: #e6eefc;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --shadow: 0 1px 2px rgb(29 35 48 / 5%), 0 10px 28px rgb(29 35 48 / 6%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #15181e;
    --panel: #1d2129;
    --text: #e5e7eb;
    --muted: #9aa3b2;
    --border: #323846;
    --accent: #6d9cf2;
    --accent-ink: #12161d;
    --accent-soft: #24324d;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 10px 28px rgb(0 0 0 / 34%);
  }
}

:root[data-theme='dark'] {
  --bg: #15181e;
  --panel: #1d2129;
  --text: #e5e7eb;
  --muted: #9aa3b2;
  --border: #323846;
  --accent: #6d9cf2;
  --accent-ink: #12161d;
  --accent-soft: #24324d;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 10px 28px rgb(0 0 0 / 34%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 2;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
}

.wrap {
  max-width: 64rem;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 5vw, 2.5rem);
}

.top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 2.4rem;
}

.mark {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.85rem;
}

.wordmark {
  font-weight: 650;
  letter-spacing: -0.01em;
}

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

.lang {
  margin-left: auto;
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.lang button {
  background: var(--panel);
  border: 0;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  cursor: pointer;
}

.lang button + button {
  border-left: 1px solid var(--border);
}

.lang button[aria-pressed='true'] {
  background: var(--accent-soft);
  color: var(--accent);
}

.lang button:hover[aria-pressed='false'] {
  color: var(--text);
}

h1 {
  font-weight: 640;
  font-size: clamp(1.9rem, 5vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.7rem;
  text-wrap: balance;
}

h1 em {
  font-style: normal;
  color: var(--accent);
}

.lede {
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.1rem);
  max-width: 54ch;
  margin: 0 0 2rem;
}

.cta {
  margin: 0 0 0.6rem;
}

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  font-weight: 650;
  font-size: 1.02rem;
  padding: 0.7rem 1.5rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.button:hover {
  filter: brightness(1.07);
}

.cta-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 3rem 0 0.9rem;
}

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

@media (min-width: 46rem) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }
}

/* The cells are the `li`s and the hairlines between them are the grid gap showing the list's
   border colour, so every cell has to fill its row: a shorter card would otherwise leave a band
   of that colour under it, which reads as a stray patch rather than a rule. */
.cards li {
  background: var(--panel);
  padding: 1.3rem 1.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cards h3 {
  margin: 0;
  font-size: 1.04rem;
  font-weight: 650;
  line-height: 1.3;
}

.cards p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.note {
  color: var(--muted);
  max-width: 68ch;
  margin: 0 0 1.2rem;
  font-size: 0.95rem;
}

.tablewrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
}

caption,
th,
td {
  text-align: left;
}

thead th {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  padding: 0.8rem 1.1rem;
  border-bottom: 1px solid var(--border);
}

tbody th {
  font-weight: 600;
  white-space: nowrap;
}

tbody th,
tbody td {
  padding: 0.65rem 1.1rem;
  vertical-align: top;
}

tbody tr + tr th,
tbody tr + tr td {
  border-top: 1px solid var(--border);
}

tbody td:last-child {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

footer {
  margin-top: 3rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.84rem;
}

footer p {
  margin: 0;
}

code {
  font-family: var(--mono);
  font-size: 0.93em;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
