/* DietX legal site — plain static CSS, no external fonts/CDNs/scripts. */
:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --text: #17171a;
  --text-muted: #5b5b64;
  --border: #e6e2d8;
  --gold: #b8913f;          /* DietX gold, darkened for AA contrast on light surfaces */
  --gold-soft: #f4ecd9;
  --header-bg: #0b0b0d;     /* DietX brand black */
  --header-text: #ffffff;
  --header-gold: #d9b872;   /* DietX gold as used in the app */
  --radius: 16px;
  --max: 760px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0d;
    --surface: #161618;
    --text: #f2f2f4;
    --text-muted: #a1a1aa;
    --border: #2a2a2e;
    --gold: #d9b872;
    --gold-soft: rgba(217, 184, 114, 0.12);
    --header-bg: #111113;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

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

/* ---------- Header ---------- */
.site-header {
  background: var(--header-bg);
  color: var(--header-text);
  padding: 20px 16px;
}
.site-header .inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--header-text);
  text-decoration: none;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.3px;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--header-gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-mark svg { width: 18px; height: 18px; }
.header-nav { display: flex; gap: 16px; font-size: 14px; }
.header-nav a { color: rgba(255, 255, 255, 0.78); text-decoration: none; }
.header-nav a:hover, .header-nav a[aria-current="page"] { color: var(--header-gold); }

/* ---------- Layout ---------- */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 16px 56px;
}

.page-title { font-size: 30px; line-height: 1.2; margin: 0 0 8px; letter-spacing: -0.3px; }
.meta { color: var(--text-muted); font-size: 14px; margin: 0 0 28px; }

h2 {
  font-size: 20px;
  line-height: 1.3;
  margin: 36px 0 10px;
  padding-top: 8px;
  scroll-margin-top: 16px;
}
h3 { font-size: 16.5px; margin: 22px 0 6px; }
p, ul, ol { margin: 0 0 14px; }
ul, ol { padding-left: 22px; }
li { margin-bottom: 6px; }
strong { font-weight: 700; }

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

.notice {
  background: var(--gold-soft);
  border-left: 4px solid var(--gold);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 0 0 18px;
}
.notice p:last-child, .card p:last-child, .card ul:last-child { margin-bottom: 0; }

.toc { font-size: 15px; }
.toc ol { margin: 8px 0 0; }
.toc li { margin-bottom: 4px; }

/* ---------- Tables (data inventory) ---------- */
.table-wrap { overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--border); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; background: var(--surface); }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { font-weight: 700; background: var(--gold-soft); }
tr:last-child td { border-bottom: 0; }

/* ---------- Home ---------- */
.hero { text-align: center; padding: 16px 0 28px; }
.hero .brand-mark { width: 64px; height: 64px; margin-bottom: 14px; }
.hero .brand-mark svg { width: 34px; height: 34px; }
.hero h1 { font-size: 34px; margin: 0 0 8px; letter-spacing: -0.4px; }
.hero p { color: var(--text-muted); margin: 0 auto; max-width: 520px; }

.links { display: grid; gap: 14px; margin-top: 8px; }
.link-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  color: var(--text);
  text-decoration: none;
}
.link-card:hover { border-color: var(--gold); }
.link-card .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--gold-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--gold);
}
.link-card .icon svg { width: 22px; height: 22px; }
.link-card .title { font-weight: 700; display: block; }
.link-card .desc { color: var(--text-muted); font-size: 14px; display: block; }
.link-card .chev { margin-left: auto; color: var(--text-muted); }

/* ---------- Steps ---------- */
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 44px; margin-bottom: 14px; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gold);
  color: #0b0b0d;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.email {
  display: inline-block;
  font-weight: 700;
  background: var(--gold-soft);
  padding: 2px 8px;
  border-radius: 6px;
  word-break: break-all;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13.5px;
  padding: 20px 16px 32px;
}
.site-footer .inner { max-width: var(--max); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.site-footer a { color: var(--text-muted); }

@media (max-width: 480px) {
  .page-title { font-size: 25px; }
  .hero h1 { font-size: 29px; }
  .header-nav { display: none; }
  main { padding-top: 24px; }
}

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