/* Colors, type and shapes from docs/policies/design-system.md (teal palette, light and dark). */
:root {
  color-scheme: light;
  --background: #f4f9f9;
  --surface: #ffffff;
  --surface-raised: #e8f0f0;
  --border: #cfdcdd;
  --text-primary: #0f1b1d;
  --text-secondary: #475a5e;
  --text-muted: #62747a;
  --link: #00796b;
  --primary: #00796b;
  --on-primary: #ffffff;
  --primary-container: #c8efe9;
  --on-primary-container: #00504a;

  --radius-full: 999px;
  --radius-card: 24px;
  --radius-icon-box: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --background: #0e1214;
    --surface: #151b1e;
    --surface-raised: #1c2427;
    --border: #2b3539;
    --text-primary: #eef4f5;
    --text-secondary: #a7b6ba;
    --text-muted: #7d8d91;
    --link: #5fd4c4;
    --primary: #5fd4c4;
    --on-primary: #00372f;
    --primary-container: #0d4a42;
    --on-primary-container: #a8f0e5;
  }
}

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

body {
  margin: 0;
  background: var(--background);
  color: var(--text-primary);
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
  font-size: 16px;
  line-height: 24px;
}

a {
  color: var(--link);
  font-weight: 500;
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

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

h1 {
  font-size: 32px;
  line-height: 40px;
  margin: 40px 0 8px;
}

h2 {
  font-size: 24px;
  line-height: 32px;
  margin: 32px 0 12px;
}

h3 {
  font-size: 18px;
  line-height: 24px;
  margin: 0 0 4px;
}

p {
  margin: 0 0 12px;
}

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

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

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

.skip-link:focus {
  left: 16px;
  top: 16px;
  padding: 8px 16px;
  background: var(--surface);
  border-radius: var(--radius-full);
}

/* Header and footer */
.site-header {
  background: var(--surface-raised);
}

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

.brand {
  color: var(--primary);
  font-size: 24px;
  font-weight: 700;
}

.site-header nav {
  display: flex;
  gap: 20px;
}

.site-header nav a {
  color: var(--text-primary);
}

main {
  padding-bottom: 48px;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 48px;
  font-size: 14px;
  line-height: 20px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 16px;
}

/* Content blocks */
.hero {
  padding: 16px 0 8px;
}

.lead {
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 28px;
}

.muted {
  color: var(--text-secondary);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px;
}

.card ul,
.card ol {
  margin: 0 0 12px;
  padding-left: 20px;
}

.card ul:last-child,
.card ol:last-child {
  margin-bottom: 0;
}

.card li + li {
  margin-top: 8px;
}

.note {
  background: var(--surface-raised);
  border-radius: var(--radius-card);
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 20px;
  margin-top: 32px;
  padding: 16px;
}

/* How it works: numbered step cards */
.steps {
  counter-reset: step;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.steps li {
  counter-increment: step;
  padding-left: 72px;
  position: relative;
}

.steps li::before {
  align-items: center;
  background: var(--primary-container);
  border-radius: var(--radius-icon-box);
  color: var(--on-primary-container);
  content: counter(step);
  display: flex;
  font-weight: 700;
  height: 40px;
  justify-content: center;
  left: 16px;
  position: absolute;
  top: 16px;
  width: 40px;
}

.steps p {
  color: var(--text-secondary);
}

.card.numbered {
  padding-left: 36px;
}

/* Contact rows */
.contact-list {
  list-style: none;
  margin: 0;
}

.contact-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
}

.contact-list .label {
  font-weight: 700;
}

/* Buttons */
.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  align-items: center;
  background: var(--primary);
  border-radius: var(--radius-full);
  color: var(--on-primary);
  display: inline-flex;
  min-height: 52px;
  padding: 0 24px;
}

.button:hover,
.button:focus-visible {
  opacity: 0.88;
  text-decoration: none;
}

/* Legal documents rendered from Markdown */
.legal h2 {
  font-size: 18px;
  line-height: 24px;
  margin: 24px 0 8px;
}

.legal blockquote {
  background: var(--surface-raised);
  border-radius: var(--radius-card);
  color: var(--text-secondary);
  margin: 0 0 16px;
  padding: 16px;
}

.legal table {
  border-collapse: collapse;
  width: 100%;
}

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

@media (max-width: 480px) {
  h1 {
    font-size: 28px;
    line-height: 36px;
    margin-top: 32px;
  }

  .site-header nav {
    gap: 16px;
    font-size: 14px;
  }
}
