/* Nudge website. Colours are the app's own tokens (design/tokens.json). */

:root {
  color-scheme: light dark;
  --surface: #F9F7F3;
  --surface-muted: #F0EDE8;
  --text: #1A1A2E;
  --text-secondary: #6E6E7C;
  --accent: #2E7D32;
  --accent-soft: #4CAF72;
  --border: rgba(0, 0, 0, 0.08);
  --radius: 14px;
  --measure: 40rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #252525;
    --surface-muted: #333333;
    --text: #FBFBFB;
    --text-secondary: #B4B4B4;
    --accent: #7ED39B;
    --accent-soft: #4CAF72;
    --border: rgba(255, 255, 255, 0.12);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { color: var(--accent-soft); }

.site-header, .site-footer, main {
  width: min(100% - 2.5rem, var(--measure));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem;
}

.wordmark {
  font-weight: 600;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--text);
}

.site-header nav, .site-footer nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-header nav a { text-decoration: none; color: var(--text-secondary); }
.site-header nav a:hover { color: var(--text); }

main { padding-block: 2rem 4rem; }

h1 { font-size: clamp(1.9rem, 5vw, 2.5rem); line-height: 1.15; margin: 0 0 1rem; letter-spacing: -0.01em; }
h2 { font-size: 1.35rem; margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.1rem; margin: 1.75rem 0 0.5rem; }
p, ul, ol { margin: 0 0 1rem; }
ul, ol { padding-left: 1.25rem; }
li { margin-bottom: 0.35rem; }

.lede { font-size: 1.25rem; color: var(--text-secondary); margin-bottom: 2rem; }
.muted { color: var(--text-secondary); }

.hero { padding-block: 3rem 2rem; }
.hero p { max-width: 34rem; }

.pill {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-secondary);
  font-weight: 500;
}

.card {
  background: var(--surface-muted);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.card p:last-child { margin-bottom: 0; }

table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--border); }
th { font-weight: 600; }
.table-wrap { overflow-x: auto; }

.site-footer {
  padding-block: 2rem 3rem;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--text-secondary); }

/* On a phone, the processor table stacks: each row becomes a small card. */
@media (max-width: 600px) {
  table thead { display: none; }
  table, tbody, tr, td { display: block; width: 100%; }
  tr { padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
  td { border: 0; padding: 0.15rem 0; }
  td::before { content: attr(data-label) ": "; font-weight: 600; }
}
