/* GO CENTRAL — Compliance section
   Layered on app.css. The library pages are browse-and-scan; these are
   read-end-to-end documents, so the type is set for sustained reading:
   a single ~68ch measure, a sticky contents rail, and callouts that
   survive being screenshotted out of context (every do/don't carries its
   own label, not just a colour). */

:root {
  --c-red:      #B3261E;
  --c-red-bg:   #FCEEED;
  --c-red-br:   rgba(179, 38, 30, .28);
  --c-green:    #2E6B1F;
  --c-green-bg: #F0F7E9;
  --c-green-br: rgba(46, 107, 31, .28);
  --c-amber:    #8A5A00;
  --c-amber-bg: #FDF4E3;
  --c-amber-br: rgba(138, 90, 0, .28);
  --doc-measure: 68ch;
}

/* ---------- machine-translation banner ----------
   Sits above everything, on every non-English page. Amber rather than red:
   this is a caveat, not an error. It must never be dismissible — a reader
   who lands mid-document from a shared link still has to see it. */

.cx-mt {
  background: var(--c-amber-bg);
  border-bottom: 1px solid var(--c-amber-br);
  color: #4A3100;
}
.cx-mt .wrap {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  padding-top: 12px; padding-bottom: 12px;
}
.cx-mt .cx-mt-tag {
  font-family: "Space Mono", ui-monospace, monospace; font-size: 10.5px;
  letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
  background: var(--c-amber); color: #fff; padding: 4px 9px; border-radius: 999px;
}
.cx-mt p { margin: 0; font-size: 14.5px; line-height: 1.6; max-width: 92ch; }
.cx-mt a { color: #4A3100; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- language switcher ----------
   These pages are one document per language, so the switcher is a set of links
   rather than a re-render. It now uses the shared `.langpicker` in app.css —
   same control as the library's, populated with links instead of buttons — so
   the three-up `.cx-lang` row that used to live here is gone. */

/* ---------- hub ---------- */

.cx-hero { padding: 56px 0 8px; }
.cx-hero .display { margin: 10px 0 14px; max-width: 16ch; }
.cx-hero .lede { max-width: 62ch; }

.cx-cards {
  display: grid; gap: 20px; margin: 36px 0 8px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.cx-card {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 24px; box-shadow: var(--shadow); transition: .18s;
}
.cx-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: rgba(18,32,46,.2); }
.cx-card h2 { font-size: 21px; line-height: 1.25; margin: 0; letter-spacing: -.01em; }
.cx-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.cx-card .cx-meta {
  margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-family: "Space Mono", ui-monospace, monospace; font-size: 11px;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.cx-card .cx-go { color: var(--ink); font-weight: 700; }
.cx-card:hover .cx-go { color: #46770f; }

.cx-note {
  margin: 40px 0 64px; padding: 20px 22px; border-radius: 14px;
  background: var(--cream-2); border: 1px solid var(--line);
  font-size: 14.5px; line-height: 1.65; color: var(--muted); max-width: 78ch;
}
.cx-note strong { color: var(--ink); }

/* ---------- document shell ---------- */

.cx-doc { padding: 40px 0 96px; }
.cx-doc .wrap { display: grid; gap: 48px; grid-template-columns: 232px minmax(0, 1fr); align-items: start; }

.cx-toc { position: sticky; top: 88px; font-size: 14px; }
.cx-toc .nv-title {
  font-family: "Space Mono", ui-monospace, monospace; font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.cx-toc a {
  display: block; padding: 7px 10px; margin-left: -10px; border-radius: 8px;
  color: var(--muted); line-height: 1.4; transition: .14s;
}
.cx-toc a:hover { color: var(--ink); background: rgba(18,32,46,.05); }

.cx-body { max-width: var(--doc-measure); font-size: 17px; line-height: 1.72; }
.cx-body > * { max-width: 100%; }
.cx-body h2 {
  font-size: 27px; line-height: 1.2; letter-spacing: -.015em;
  margin: 56px 0 16px; padding-top: 20px; border-top: 2px solid var(--lime);
  scroll-margin-top: 88px;
}
.cx-body h2:first-child { margin-top: 0; }
.cx-body h3 { font-size: 20px; line-height: 1.3; margin: 36px 0 12px; scroll-margin-top: 88px; }
.cx-body h4 { font-size: 16.5px; margin: 26px 0 8px; }
.cx-body p { margin: 0 0 18px; }
.cx-body ul, .cx-body ol { margin: 0 0 18px; padding-left: 22px; }
.cx-body li { margin-bottom: 10px; }
.cx-body li > ul, .cx-body li > ol { margin-top: 10px; }
.cx-body strong { color: var(--ink); }
.cx-body em { color: var(--ink); }
.cx-body a:not(.btn) { color: #46770f; text-decoration: underline; text-underline-offset: 2px; }

.cx-lede {
  font-size: 19px; line-height: 1.62; color: var(--muted);
  padding-bottom: 22px; margin-bottom: 6px; border-bottom: 1px solid var(--line);
}

.cx-stamp {
  font-family: "Space Mono", ui-monospace, monospace; font-size: 11.5px;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 28px;
}

/* ---------- callouts ---------- */

.cx-call {
  margin: 0 0 24px; padding: 18px 20px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); font-size: 16px; line-height: 1.65;
}
.cx-call > :last-child { margin-bottom: 0; }
.cx-call .cx-tag {
  display: inline-block; font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; margin-bottom: 10px;
}
.cx-call.stop { background: var(--c-red-bg);   border-color: var(--c-red-br); }
.cx-call.stop .cx-tag { background: var(--c-red); color: #fff; }
.cx-call.ok { background: var(--c-green-bg); border-color: var(--c-green-br); }
.cx-call.ok .cx-tag { background: var(--c-green); color: #fff; }
.cx-call.care { background: var(--c-amber-bg); border-color: var(--c-amber-br); }
.cx-call.care .cx-tag { background: var(--c-amber); color: #fff; }
.cx-call.rule { background: var(--navy); border-color: var(--navy); color: #E8EEF5; }
.cx-call.rule .cx-tag { background: var(--lime); color: var(--lime-ink); }
.cx-call.rule strong, .cx-call.rule em { color: #fff; }

/* ---------- tables ---------- */

.cx-tablewrap { overflow-x: auto; margin: 0 0 28px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); }
.cx-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.55; min-width: 560px; }
.cx-table th, .cx-table td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.cx-table thead th {
  font-family: "Space Mono", ui-monospace, monospace; font-size: 10.5px;
  letter-spacing: .09em; text-transform: uppercase; color: var(--muted);
  background: var(--cream-2); border-bottom: 1px solid var(--line);
}
.cx-table tbody tr:last-child td { border-bottom: 0; }
.cx-table .term { font-weight: 700; color: var(--ink); }
.cx-table td.no  { color: var(--c-red); font-weight: 600; }
.cx-table td.yes { color: var(--c-green); font-weight: 600; }
.cx-table .why { color: var(--muted); }

/* ---------- checklist ---------- */

.cx-check { list-style: none; margin: 0 0 24px; padding: 0; }
.cx-check li {
  position: relative; padding: 12px 16px 12px 46px; margin-bottom: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  font-size: 15.5px; line-height: 1.6;
}
.cx-check li::before {
  content: ""; position: absolute; left: 16px; top: 15px;
  width: 16px; height: 16px; border-radius: 4px;
  border: 2px solid rgba(18,32,46,.3);
}

.cx-scroll-note {
  display: none; font-family: "Space Mono", ui-monospace, monospace;
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); margin: -18px 0 24px;
}

.cx-backtop { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); }

@media (max-width: 900px) {
  .cx-doc .wrap { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .cx-toc { position: static; }
  .cx-body { font-size: 16.5px; }
  .cx-body h2 { font-size: 24px; margin-top: 44px; }
  .cx-scroll-note { display: block; }
}

@media print {
  .topbar, .cx-toc, #lgf-root, .cx-backtop { display: none !important; }
  .cx-doc .wrap { display: block; }
  .cx-body { max-width: none; font-size: 11.5pt; }
  .cx-call, .cx-tablewrap, .cx-check li { break-inside: avoid; }
}
