/* Minutyx — legal & policy pages
   These are public, marketing-adjacent pages. The landing and auth screens are
   pinned to the light "Evergreen" theme (see .lp in overhaul.css), so these
   pages match that: light-only, using the app's exact design tokens. */

:root {
  color-scheme: light;

  /* Exact tokens from the app's light theme (src/styles.css / overhaul.css .lp) */
  --bg: #f2f4ef;
  --bg-tint-1: rgba(23, 98, 76, 0.05);
  --surface: #fdfefb;
  --surface-2: #eceee7;
  --surface-3: #e2e5dc;
  --border: #e2e5db;
  --border-2: #d0d4c7;
  --text: #1a1f1b;
  --text-2: #545b52;
  --text-3: #868d81;
  --accent: #17624c;
  --accent-2: #2a8f5f;
  --accent-ink: #124f3c;
  --accent-soft: #dcefe6;
  --on-accent: #ffffff;

  --shadow-sm: 0 1px 2px rgba(24, 40, 30, 0.06);
  --shadow: 0 1px 2px rgba(24, 40, 30, 0.05), 0 10px 30px rgba(24, 40, 30, 0.09);

  --radius: 16px;
  --radius-sm: 11px;
  --radius-xs: 8px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

  --maxw: 760px;
  /* Soft hairline for in-content dividers */
  --line-soft: #edefe9;
  /* "Fill me in" placeholder marker — kept subtle and on-brand */
  --ph-bg: #f4eede;
  --ph-line: #e0d2ad;
  --ph-ink: #6d5a23;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* Linked sections (#notetaker, #retention…) land below the sticky top bar. */
[id] { scroll-margin-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent-ink); text-underline-offset: 2px; }
a:hover { text-decoration: underline; }

/* ---- Top bar — mirrors the landing nav (.lp__nav) ---- */
.doc__top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 13px clamp(16px, 5vw, 40px);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.doc__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.doc__brand img { width: 26px; height: 26px; border-radius: var(--radius-xs); display: block; }

.doc__nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  overflow-x: auto;
}
.doc__nav a {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--text-2);
  text-decoration: none;
  white-space: nowrap;
}
.doc__nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.doc__nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); }

/* ---- Document body ---- */
.doc {
  max-width: var(--maxw);
  margin: 28px auto;
  padding: clamp(28px, 6vw, 60px) clamp(20px, 5vw, 48px) 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-height: 55vh;
}
@media (max-width: 820px) {
  .doc { margin: 0; border-radius: 0; border-left: none; border-right: none; box-shadow: none; }
}

.doc__eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.doc h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 5vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.doc__meta {
  margin: 0 0 8px;
  color: var(--text-3);
  font-size: 14px;
}
.doc__lede {
  margin: 18px 0 0;
  font-size: 17px;
  color: var(--text-2);
}

.doc h2 {
  margin: 40px 0 10px;
  font-size: 21px;
  letter-spacing: -0.01em;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.doc h2:first-of-type { border-top: none; padding-top: 0; }
.doc h3 { margin: 26px 0 6px; font-size: 17px; }

.doc p, .doc li { color: var(--text); }
.doc p { margin: 12px 0; }
.doc ul, .doc ol { margin: 12px 0; padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc strong { font-weight: 650; }

.doc small, .doc .fine { color: var(--text-2); font-size: 13.5px; }

hr { border: none; border-top: 1px solid var(--border); margin: 34px 0; }

/* Definition-style rows for contact / entity blocks */
.kv {
  margin: 16px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
}
.kv__row {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 12px;
  padding: 11px 16px;
  border-top: 1px solid var(--line-soft);
}
.kv__row:first-child { border-top: none; }
.kv__row:nth-child(even) { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
.kv__row dt { color: var(--text-2); font-size: 14px; margin: 0; }
.kv__row dd { margin: 0; }
@media (max-width: 560px) {
  .kv__row { grid-template-columns: 1fr; gap: 2px; }
}

/* Placeholder token — anything the operator must fill in before launch */
.ph {
  background: var(--ph-bg);
  border: 1px dashed var(--ph-line);
  color: var(--ph-ink);
  padding: 0 5px;
  border-radius: 5px;
  font-size: 0.92em;
  font-weight: 600;
  white-space: nowrap;
}

/* Callout / notice box */
.note {
  margin: 18px 0;
  padding: 14px 16px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text);
}
.note--warn {
  background: #f7efdd;
  border-color: #e6d3a4;
  color: #6d5a23;
}
.note strong { color: inherit; }

/* Data tables (sub-processors, retention) */
.table-wrap { overflow-x: auto; margin: 18px 0; }
table.t {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  min-width: 520px;
}
table.t th, table.t td {
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--border);
  vertical-align: top;
}
table.t th {
  background: var(--surface-2);
  font-weight: 650;
}
table.t tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 40%, transparent); }

/* Table of contents on the hub page */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
  margin: 24px 0;
}
.card {
  display: block;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.card h3 { margin: 0 0 4px; font-size: 16px; }
.card p { margin: 0; color: var(--text-2); font-size: 14px; }

/* ---- Footer ---- */
.doc__foot {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 8px clamp(20px, 5vw, 48px) 60px;
  color: var(--text-2);
  font-size: 13.5px;
}
.doc__foot .doc__footlinks {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}
.doc__foot a { color: var(--text-2); }
.doc__foot .ph { font-size: 12.5px; }

/* ---- Trust Center components ---- */
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-ink);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  font-size: 13px; font-weight: 600;
}
.badge--soon {
  background: var(--surface-2); color: var(--text-2);
  border-color: var(--border); font-weight: 500;
}
.badge--soon b { font-weight: 650; color: var(--text); }

.ctrlgrid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(244px, 1fr));
  gap: 14px; margin: 18px 0;
}
.ctrlgroup {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.ctrlgroup h3 { margin: 0 0 8px; font-size: 15px; }

ul.checks { list-style: none; padding-left: 0; margin: 8px 0; }
ul.checks li { position: relative; padding-left: 25px; margin: 8px 0; font-size: 14.5px; line-height: 1.5; }
ul.checks li::before {
  content: ""; position: absolute; left: 0; top: 3px;
  width: 16px; height: 16px; border-radius: 50%; background: var(--accent-soft);
}
ul.checks li::after {
  content: "\2713"; position: absolute; left: 3.5px; top: 1px;
  color: var(--accent-ink); font-size: 11px; font-weight: 800;
}

details.faq {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  margin: 10px 0; background: var(--surface); overflow: hidden;
}
details.faq > summary {
  list-style: none; cursor: pointer; padding: 14px 16px;
  font-weight: 600; display: flex; justify-content: space-between; gap: 12px; align-items: center;
}
details.faq > summary::-webkit-details-marker { display: none; }
details.faq > summary::after { content: "+"; color: var(--text-3); font-weight: 700; font-size: 18px; line-height: 1; }
details.faq[open] > summary::after { content: "\2212"; }
details.faq > div { padding: 0 16px 15px; color: var(--text); font-size: 15px; }
details.faq > div > :first-child { margin-top: 0; }

/* ---- Print ---- */
@media print {
  :root { --surface: #fff; --bg: #fff; --text: #000; --text-2: #333; }
  .doc__top, .doc__nav, .doc__foot .doc__footlinks { display: none; }
  .doc { border: none; box-shadow: none; max-width: none; margin: 0; padding: 0; }
  a { color: #000; text-decoration: none; }
  .ph { border: 1px solid #999; background: none; color: #000; }
}
