/* Evenweek site. Tokens mirror app/Evenweek/DesignSystem/Theme.swift. */
:root {
  --bg: #FFFFFF;
  --surface: #F3F4F5;
  --line: rgba(0, 0, 0, 0.09);
  --text: #111214;
  --muted: #6B7078;
  --accent-ink: #7A6A44;   /* text, lines, links */
  --accent-fill: #C8B993;  /* button fill only, never text */
  --on-accent: #111214;
  --radius-card: 16px;
  --radius-button: 14px;
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0A0A0B;
    --surface: #141517;
    --line: rgba(255, 255, 255, 0.09);
    --text: #F2F2F0;
    --muted: #8A8E95;
    --accent-ink: #C8B993;
    --on-accent: #0A0A0B;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

.wrap {
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 20px;
}

a { color: var(--accent-ink); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  z-index: 10;
}
.skip:focus { top: 12px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
}
.wordmark {
  font-family: var(--serif);
  font-size: 1.375rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.header-link { color: var(--muted); text-decoration: none; font-size: 0.9375rem; }
.header-link:hover, .header-link[aria-current="page"] { color: var(--text); }

main.wrap { padding-top: 48px; padding-bottom: 72px; }

/* Type */
h1, h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.015em;
  color: var(--text);
}
h1 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 2.75rem);
  line-height: 1.12;
  margin: 0 0 16px;
}
h2 {
  font-size: 1.5rem;
  line-height: 1.25;
  margin: 56px 0 12px;
}
h3 {
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 32px 0 6px;
}
h4, h5, h6 { font-size: 1rem; font-weight: 600; margin: 24px 0 4px; }
p { margin: 0 0 16px; }
strong { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

/* Legal pages: readable measure */
.legal, .support { max-width: 68ch; }
.legal h1 + p, .lede { color: var(--muted); }
.legal h2 { padding-top: 28px; border-top: 1px solid var(--line); margin-top: 48px; }
.legal ul, .legal ol, .support ol { padding-left: 1.4em; margin: 0 0 16px; }
.legal li, .support li { margin: 4px 0; }
.legal li > ul, .legal li > ol { margin: 4px 0 0; }
.legal li::marker, .support li::marker { color: var(--muted); }
blockquote {
  margin: 0 0 16px;
  padding: 2px 0 2px 16px;
  border-left: 2px solid var(--accent-ink);
  color: var(--muted);
}
code { font-size: 0.92em; background: var(--surface); padding: 1px 5px; border-radius: 5px; }
pre { background: var(--surface); padding: 14px 16px; border-radius: 12px; overflow-x: auto; }
pre code { background: none; padding: 0; }

.table-wrap {
  overflow-x: auto;
  margin: 0 0 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; line-height: 1.5; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
th { background: var(--surface); font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
.align-center { text-align: center; }
.align-right { text-align: right; }

/* Buttons: rounded rectangle, never a capsule */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: var(--radius-button);
  font-weight: 600;
  font-size: 1.0625rem;
  text-decoration: none;
}
.button-primary { background: var(--accent-fill); color: var(--on-accent); }
a.button-primary:hover { filter: brightness(0.95); }

/* Home */
.page-home main.wrap { padding-top: clamp(48px, 10vw, 112px); }
.hero h1 { font-size: clamp(2.25rem, 1.5rem + 3.6vw, 3.5rem); margin-bottom: 8px; }
.subtitle {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.5rem);
  line-height: 1.35;
  color: var(--accent-ink);
  margin: 0 0 32px;
}
.hero-copy { max-width: 36rem; margin-bottom: 32px; }
.hero-copy p { margin-bottom: 12px; }
.note { color: var(--muted); font-size: 0.9375rem; margin-top: 12px; }

.notice {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  max-width: 68ch;
}
.notice h2 {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0;
  margin: 0 0 6px;
}
.notice p { color: var(--muted); font-size: 0.9375rem; line-height: 1.6; }

/* Support */
.contact-card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 24px;
  margin: 32px 0 8px;
}
.contact-card h2 { margin-top: 0; }
.contact-hint { color: var(--muted); font-size: 0.9375rem; }
.contact-card .button { margin-top: 4px; }

.faq { margin: 0; }
.faq dt { font-weight: 600; margin-top: 24px; }
.faq dt:first-child { margin-top: 8px; }
.faq dd { margin: 4px 0 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 0.9375rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 12px; }
.site-footer nav a { color: var(--text); text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }
.site-footer nav a[aria-current="page"] { color: var(--accent-ink); text-decoration: underline; }
.copyright { color: var(--muted); margin: 0; }

@media (max-width: 480px) {
  body { font-size: 1rem; }
  .wrap { padding: 0 16px; }
  main.wrap { padding-top: 32px; }
  h2 { font-size: 1.375rem; margin-top: 44px; }
  .contact-card { padding: 20px; }
  th, td { padding: 10px 12px; }
  .contact-card .button, .hero .button { width: 100%; }
}

@media print {
  .site-header, .site-footer, .skip, .button { display: none; }
  body { background: #fff; color: #000; }
  a { color: inherit; }
}
