/* AyahClarity information pages.
   Colours and type are taken from the app's own design system
   (AyahSteps/DesignSystem/Palette.swift, Typography.swift): warm ivory paper,
   deep emerald for action, gold as a hairline only, serif headings over a
   system sans body. No webfonts, no scripts, no third-party requests. */

:root {
  --bg: #FBF7F0;
  --surface: #FFFFFF;
  --surface-sunken: #F4EEE3;
  --surface-accent: #EFF5F1;
  --text: #1C211E;
  --text-secondary: #585F59;
  --text-tertiary: #7C837C;
  --emerald: #0E5B4A;
  --emerald-deep: #083E32;
  --emerald-soft: #DDEBE4;
  --gold: #9A7729;
  --gold-soft: #F3E9D2;
  --separator: #E6DECE;
  --hairline: #D9CFB9;
  --caution: #8A6314;
  --caution-soft: #FAF0DC;
  --serif: ui-serif, Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121110;
    --surface: #1C1A18;
    --surface-sunken: #171514;
    --surface-accent: #16221D;
    --text: #F3EEE4;
    --text-secondary: #A7A096;
    --text-tertiary: #817B72;
    --emerald: #4FBF9B;
    --emerald-deep: #2E8C71;
    --emerald-soft: #1D3730;
    --gold: #D8B368;
    --gold-soft: #2C2417;
    --separator: #2E2A25;
    --hairline: #3A342C;
    --caution: #E0B45E;
    --caution-soft: #2B2315;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--emerald);
  color: var(--bg);
  padding: 0.6rem 1rem;
  border-radius: 0 0 8px 0;
  z-index: 10;
}
.skip-link:focus { left: 0; }

a {
  color: var(--emerald);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover { color: var(--emerald-deep); }

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

.page {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1rem 4rem;
}

/* Header and navigation */

.masthead {
  border-bottom: 1px solid var(--separator);
  background: var(--surface);
}
.masthead-inner {
  max-width: 46rem;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: baseline;
  justify-content: space-between;
}
.wordmark {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--emerald);
  text-decoration: none;
}
.masthead nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0;
  padding: 0;
  font-size: 0.9375rem;
}
.masthead nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid var(--gold);
}

/* Headings */

h1 {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.25rem);
  font-weight: 600;
  line-height: 1.2;
  margin: 2.25rem 0 0.5rem;
}
.lede {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin: 0 0 2rem;
  max-width: 38rem;
}
h2 {
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 2.5rem 0 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
}
h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 1.75rem 0 0.4rem;
}
p, li { color: var(--text-secondary); }
p { margin: 0 0 1rem; }
h1 + p.lede { color: var(--text-secondary); }
strong { color: var(--text); font-weight: 600; }

ul, ol { padding-left: 1.25rem; margin: 0 0 1rem; }
li { margin-bottom: 0.4rem; }

dl { margin: 0 0 1rem; }
dt { font-weight: 600; color: var(--text); margin-top: 1rem; }
dd { margin: 0.2rem 0 0; color: var(--text-secondary); }

/* Cards and notices */

.card {
  background: var(--surface);
  border: 1px solid var(--separator);
  border-radius: 14px;
  padding: 1.25rem 1.25rem 0.5rem;
  margin: 1.5rem 0;
}
.card > :last-child { margin-bottom: 1rem; }
.card h2, .card h3 { margin-top: 0; border-top: 0; padding-top: 0; }

.notice {
  background: var(--surface-accent);
  border: 1px solid var(--separator);
  border-left: 3px solid var(--emerald);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}
.notice > :last-child { margin-bottom: 0; }
.notice.caution {
  background: var(--caution-soft);
  border-left-color: var(--caution);
}
.notice h2, .notice h3 { margin-top: 0; border-top: 0; padding-top: 0; }

.meta {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0 0 2rem;
}

.contact {
  font-size: 1.0625rem;
  font-weight: 600;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.9375rem;
}
caption {
  text-align: left;
  color: var(--text-secondary);
  font-size: 0.875rem;
  padding-bottom: 0.5rem;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.75rem 0.6rem 0;
  border-bottom: 1px solid var(--separator);
  color: var(--text-secondary);
}
th { color: var(--text); font-weight: 600; }

footer.page-footer {
  border-top: 1px solid var(--separator);
  margin-top: 3rem;
  padding-top: 1.5rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}
footer.page-footer ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0;
  margin: 0 0 0.75rem;
}
footer.page-footer p { color: var(--text-secondary); margin-bottom: 0.4rem; }

.draft-banner {
  background: var(--caution-soft);
  color: var(--text);
  border-bottom: 1px solid var(--caution);
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 600;
}

@media (max-width: 30rem) {
  body { font-size: 1rem; }
  .masthead-inner { padding: 0.875rem 1rem; }
}
