/* Hub styles. Colors only through these variables (light and dark). */
:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --fg: #1d1c1a;
  --muted: #5c5a55;
  --line: #d9d6ce;
  --accent: #0f5c4d;
  --on-accent: #ffffff;
  --focus: #b3410e;
  --draft-bg: #fdf0dc;
  --draft-line: #9a5a00;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151514;
    --surface: #1f1f1d;
    --fg: #ecebe7;
    --muted: #a9a7a1;
    --line: #3d3c38;
    --accent: #7cc7b4;
    --on-accent: #151514;
    --focus: #f39a6b;
    --draft-bg: #33270f;
    --draft-line: #e0a54a;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 1rem/1.6 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  overflow-wrap: break-word;
}

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

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--line);
}

.skip:focus {
  top: 1rem;
}

.site-header,
main,
.site-footer {
  max-width: 48rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header {
  padding-top: 1.25rem;
}

.brand {
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
}

.brand:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  line-height: 1.25;
}

h1 {
  font-size: clamp(1.75rem, 1.2rem + 2.5vw, 2.5rem);
  margin: 2rem 0 0.75rem;
}

h2 {
  font-size: 1.25rem;
  margin: 2.25rem 0 0.75rem;
}

h3 {
  font-size: 1.125rem;
  margin: 0 0 0.5rem;
}

.lead {
  font-size: 1.125rem;
  color: var(--muted);
  margin: 0;
}

.tools {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}

.tool {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}

.tool p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.tool .cta,
.tool .soon {
  margin: auto 0 0;
}

.cta {
  display: inline-block;
  align-self: flex-start;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}

.cta:hover {
  text-decoration: underline;
}

.soon {
  font-style: italic;
}

.note {
  margin-top: 2.5rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--line);
}

.prose {
  max-width: 42rem;
}

.prose ul {
  padding-left: 1.25rem;
}

.prose li + li {
  margin-top: 0.4rem;
}

.draft {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  background: var(--draft-bg);
  border: 1px solid var(--draft-line);
  border-radius: 0.5rem;
}

.updated {
  color: var(--muted);
}

.consent {
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}

.consent-status {
  margin: 0 0 0.75rem;
  font-weight: 600;
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

button {
  font: inherit;
  padding: 0.55rem 0.9rem;
  border-radius: 0.5rem;
  border: 2px solid var(--accent);
  background: var(--surface);
  color: var(--fg);
  cursor: pointer;
}

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

/* Pressed state also shown without color: a check before the label. */
button[aria-pressed='true']::before {
  content: '✓ ';
}

button.quiet {
  border-color: var(--muted);
}

.site-footer {
  margin-top: 3rem;
  padding-bottom: 2rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
