/* ------------------------------------------------------------------
   pages.css — shared shell for the static documents (/privacy/, /about/,
   /404.html). Everything is scoped to .doc-* and built on the palette and
   font already defined in styles.css, so these pages look like the app.
   ------------------------------------------------------------------ */

/* ---------- skip link ---------- */
.doc-skip {
  position: absolute;
  inset-inline-start: 16px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--cyan);
  color: #04121a;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s ease;
}
.doc-skip:focus,
.doc-skip:focus-visible {
  top: 12px;
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

/* ---------- page frame ---------- */
.doc-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 18px 16px 36px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- compact header ---------- */
.doc-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 13px;
  margin-bottom: 18px;
  background: linear-gradient(180deg, rgba(18, 26, 41, 0.92), rgba(13, 20, 33, 0.92));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.doc-brand {
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
  padding: 3px;
  margin-inline-start: -3px;
}
.doc-brand:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}
.doc-brand-copy {
  display: block;
  line-height: 1.35;
}
.doc-brand strong {
  font-size: 15px;
}
.doc-brand small {
  color: var(--muted);
  font-size: 11px;
}

.doc-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-inline-start: auto;
}
.doc-nav-link {
  font-size: 12px;
  line-height: 1.6;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.doc-nav-link:hover {
  color: var(--text);
  border-color: #2b3c58;
}
.doc-nav-link[aria-current="page"] {
  color: var(--cyan);
  background: rgba(53, 208, 186, 0.12);
  border-color: rgba(53, 208, 186, 0.35);
  font-weight: 600;
}

/* ---------- main column ---------- */
.doc-main {
  flex: 1;
}

.doc-head {
  padding: 6px 2px 22px;
}
.doc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  padding: 4px 11px;
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(53, 208, 186, 0.1);
  border: 1px solid rgba(53, 208, 186, 0.22);
}
.doc-title {
  margin: 12px 0 10px;
  font-size: clamp(27px, 7vw, 38px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.4px;
}
.doc-lead {
  margin: 0;
  font-size: 14.5px;
  line-height: 2;
  color: var(--text);
  max-width: 62ch;
  text-wrap: balance;
}
.doc-updated {
  display: inline-block;
  margin: 14px 0 0;
  padding: 4px 10px;
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

/* ---------- content blocks ---------- */
.doc-card {
  padding: 20px;
  margin-bottom: 14px;
  background: linear-gradient(180deg, rgba(18, 26, 41, 0.82), rgba(11, 17, 28, 0.82));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.doc-card h2,
.doc-health h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.6;
}
.doc-card h2::before,
.doc-health h2::before {
  content: "";
  flex: 0 0 auto;
  width: 4px;
  height: 17px;
  border-radius: 99px;
  background: var(--cyan);
}

.doc-card p,
.doc-health p {
  margin: 0 0 11px;
  font-size: 14px;
  line-height: 2;
}
.doc-card p:last-child,
.doc-health p:last-child {
  margin-bottom: 0;
}

.doc-main a {
  color: var(--cyan);
  text-underline-offset: 3px;
}

.doc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}
.doc-list li {
  position: relative;
  padding-inline-start: 17px;
  font-size: 14px;
  line-height: 1.95;
}
.doc-list li::before {
  content: "•";
  position: absolute;
  inset-inline-start: 1px;
  top: -1px;
  color: var(--cyan);
  font-size: 17px;
  line-height: 1.75;
}
.doc-list li:last-child {
  margin-bottom: 0;
}
.doc-list strong {
  font-weight: 700;
  color: var(--text);
}

.doc-note {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
}

.doc-sub {
  margin: 16px 0 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.8;
  color: var(--text);
}

/* risk note — gold, with a written label so colour is never the only cue */
.doc-alert {
  margin: 14px 0 0;
  padding: 13px 14px;
  border: 1px solid rgba(231, 184, 75, 0.32);
  border-inline-start: 3px solid var(--gold);
  border-radius: 12px;
  background: rgba(231, 184, 75, 0.07);
}
.doc-alert-title {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.8;
}
.doc-alert p {
  margin: 0;
  font-size: 13px;
  line-height: 1.95;
  color: var(--text);
}

/* health disclaimer — separated, red-accented, but labelled in text */
.doc-health {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid rgba(224, 85, 95, 0.34);
  border-radius: var(--radius);
  background:
    radial-gradient(420px 200px at 100% 0%, rgba(224, 85, 95, 0.1), transparent 70%),
    rgba(18, 14, 20, 0.6);
}
.doc-health h2::before {
  background: var(--red);
}
.doc-health .doc-list li::before {
  color: var(--red);
}
.doc-health-kicker {
  color: var(--red);
  font-weight: 700;
}

/* placeholder that a human still has to fill in */
.doc-todo {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px dashed rgba(53, 208, 186, 0.4);
  border-radius: 11px;
  background: rgba(53, 208, 186, 0.05);
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
}
.doc-todo .doc-slot {
  display: inline-block;
  min-width: 30px;
  padding: 0 12px;
  margin-inline: 4px;
  border: 1px dashed rgba(125, 142, 169, 0.55);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  line-height: 1.7;
  text-align: center;
}
.doc-todo em {
  font-style: normal;
  font-size: 12px;
}

/* ---------- about-page steps ---------- */
.doc-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  counter-reset: none;
}
.doc-steps li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 14px;
  line-height: 1.95;
}
.doc-step-num {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  margin-top: 4px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--cyan);
  background: rgba(53, 208, 186, 0.12);
  border: 1px solid rgba(53, 208, 186, 0.28);
}

/* ---------- links / buttons ---------- */
.doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.doc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.6;
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.doc-btn--primary,
a.doc-btn--primary {
  color: #04121a;
  background: linear-gradient(145deg, var(--cyan), #1e8f9a);
  box-shadow: 0 8px 24px rgba(53, 208, 186, 0.22);
}
.doc-btn--primary:hover,
a.doc-btn--primary:hover {
  transform: translateY(-1px);
}
.doc-btn--ghost,
a.doc-btn--ghost {
  color: var(--text);
  border: 1px solid var(--line);
  background: transparent;
}
.doc-btn--ghost:hover,
a.doc-btn--ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

/* ---------- 404 ---------- */
.doc-main--error {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: 18px 30px;
}
.doc-error {
  width: 100%;
  max-width: 460px;
  padding: 30px 22px;
  text-align: center;
  background: linear-gradient(180deg, rgba(18, 26, 41, 0.82), rgba(11, 17, 28, 0.82));
  border: 1px solid var(--line);
  border-radius: 20px;
}
.doc-code {
  margin: 0;
  font-size: 64px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 2px;
  color: var(--cyan);
  opacity: 0.9;
}
.doc-error-title {
  margin: 8px 0 12px;
  font-size: clamp(23px, 6vw, 30px);
  font-weight: 800;
  line-height: 1.4;
}
.doc-error p {
  margin: 0;
  font-size: 14px;
  line-height: 2;
  color: var(--muted);
}
.doc-error .doc-actions {
  justify-content: center;
  margin-top: 22px;
}
.doc-error-hint {
  margin-top: 16px !important;
  font-size: 12px !important;
  line-height: 1.9 !important;
  color: var(--muted);
}

/* ---------- footer ---------- */
.doc-footer {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.doc-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.doc-footer-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  text-decoration: none;
}
.doc-footer-link:hover {
  color: var(--cyan);
  border-color: rgba(53, 208, 186, 0.4);
}
.doc-footer-link[aria-current="page"] {
  color: var(--cyan);
  border-color: rgba(53, 208, 186, 0.4);
  background: rgba(53, 208, 186, 0.08);
}
.doc-footer-app {
  color: var(--text);
  border-color: rgba(53, 208, 186, 0.28);
}
.doc-footer-note {
  margin: 12px 0 0;
  font-size: 11px;
  line-height: 1.9;
  color: var(--muted);
}

/* ---------- focus ---------- */
.doc-shell a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* ---------- small screens ---------- */
@media (max-width: 430px) {
  .doc-shell {
    padding: 10px 12px 28px;
  }
  .doc-header {
    padding: 9px 10px;
    margin-bottom: 14px;
    gap: 6px 8px;
  }
  .doc-brand-mark {
    width: 34px;
    height: 34px;
    font-size: 17px;
  }
  .doc-nav-link {
    font-size: 11.5px;
    padding: 4px 9px;
  }
  .doc-head {
    padding: 2px 2px 18px;
  }
  .doc-title {
    margin: 10px 0 9px;
  }
  .doc-lead {
    font-size: 13.5px;
    line-height: 1.95;
  }
  .doc-card,
  .doc-health {
    padding: 16px;
    margin-bottom: 12px;
  }
  .doc-card h2,
  .doc-health h2 {
    font-size: 15.5px;
  }
  .doc-card p,
  .doc-health p,
  .doc-list li,
  .doc-steps li {
    font-size: 13.5px;
  }
  .doc-error {
    padding: 24px 16px;
    border-radius: 16px;
  }
  .doc-code {
    font-size: 52px;
  }
  .doc-btn {
    flex: 1 1 100%;
  }
  .doc-footer-link {
    font-size: 11.5px;
  }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .doc-shell *,
  .doc-skip {
    transition: none !important;
  }
}
