/*
 * aiyurveda.app: the public pages the app links to (privacy notice, consumer
 * health data policy, account deletion). Same tokens as the app
 * (apps/mobile/src/theme/index.ts): warm paper, ink, one sage accent.
 *
 * No web fonts and no third-party requests of any kind. A privacy page that
 * hands its readers' IP addresses to a font CDN would contradict itself.
 */

:root {
  --ground: #faf7f2;
  --surface: #ffffff;
  --surface-muted: #f2ede4;
  --ink: #2b2a27;
  --ink-soft: #6b6862;
  --ink-faint: #9a968e;
  --accent: #6f8265;
  --accent-ink: #4f5f47;
  --accent-soft: #e8ede3;
  --line: #e7e1d8;
  --measure: 42rem;
  --font:
    ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #1c1b19;
    --surface: #24231f;
    --surface-muted: #2b2924;
    --ink: #ece8e1;
    --ink-soft: #b5b0a6;
    --ink-faint: #8b867d;
    --accent: #9db291;
    --accent-ink: #b9cbad;
    --accent-soft: #2c3328;
    --line: #3a3832;
  }
}

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

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

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

a {
  color: var(--accent-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  background: var(--surface);
  padding: 0.5rem 0.75rem;
  z-index: 1;
}

header.site,
main,
footer.site {
  max-width: var(--measure);
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

header.site {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

header.site .brand {
  font-weight: 650;
  font-size: 1.125rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}

header.site nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  font-size: 0.9375rem;
}

header.site nav a {
  color: var(--ink-soft);
  text-decoration: none;
}

header.site nav a:hover,
header.site nav a[aria-current='page'] {
  color: var(--ink);
  text-decoration: underline;
}

main {
  padding-top: 2rem;
  padding-bottom: 3rem;
}

h1 {
  font-size: 1.875rem;
  line-height: 1.25;
  margin: 0 0 0.5rem;
  font-weight: 650;
}

h2 {
  font-size: 1.25rem;
  line-height: 1.35;
  margin: 2.25rem 0 0.5rem;
  font-weight: 650;
}

h3 {
  font-size: 1.0625rem;
  margin: 1.5rem 0 0.25rem;
  font-weight: 650;
}

p,
ul,
ol,
table {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.25rem;
}

li + li {
  margin-top: 0.25rem;
}

.meta {
  color: var(--ink-soft);
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
}

.lede {
  font-size: 1.1875rem;
  color: var(--ink);
}

.note {
  background: var(--surface-muted);
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1rem;
  border-radius: 0 8px 8px 0;
  margin: 1.25rem 0;
}

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

.links {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.links a {
  display: block;
  padding: 0.875rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
}

.links a:hover {
  border-color: var(--accent);
}

.links a strong {
  display: block;
  color: var(--accent-ink);
}

.links a span {
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9375rem;
  margin: 0;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--line);
}

th {
  background: var(--surface-muted);
  font-weight: 650;
}

tr:last-child td {
  border-bottom: 0;
}

footer.site {
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
  padding-bottom: 2.5rem;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

footer.site p {
  margin-bottom: 0.5rem;
}

/* Narrow screens: each row becomes a small card, each cell labelled by its
   column (data-label, written into the HTML), instead of a table to scroll. */
@media (max-width: 600px) {
  .table-wrap {
    border: 0;
    overflow: visible;
  }

  .table-wrap table,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap td {
    display: block;
    width: 100%;
  }

  .table-wrap thead {
    position: absolute;
    left: -9999px;
  }

  .table-wrap tr {
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    background: var(--surface);
  }

  .table-wrap td {
    border-bottom: 1px solid var(--line);
  }

  .table-wrap td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.8125rem;
    font-weight: 650;
    color: var(--ink-soft);
    margin-bottom: 0.125rem;
  }

  .table-wrap tr td:last-child {
    border-bottom: 0;
  }
}
