/* NotBroken — information pages (About, Privacy, Terms)
   Same editorial identity as the directory: Playfair headings, Inter body,
   the sage / ink / terracotta palette, light and dark. */
:root {
  --sage:#5B8A72; --sage-dark:#4A7560; --sage-tint:#E8F0EC; --ink:#1A1F36; --text:#2D3748; --muted:#6B7B8F;
  --terra:#C17B4A; --cream:#F5F0EB; --border:#E8ECF0; --border-2:#DCE3E9; --page-bg:#FFFFFF; --surface:#FFFFFF; --surface-2:#F5F0EB; --on-accent:#FFFFFF;
}
body[data-theme="dark"] {
  --sage:#84C0A0; --sage-dark:#A6D2BC; --sage-tint:#22302A; --ink:#F2EFEA; --text:#DAE0E6; --muted:#A5AFBC;
  --terra:#E8A375; --cream:#242A32; --border:#3A424E; --border-2:#4B5360; --page-bg:#15181D; --surface:#1F242B; --surface-2:#242A32; --on-accent:#13171D;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--page-bg); }
body {
  margin: 0; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 16.5px; line-height: 1.65;
  color: var(--text); background: var(--page-bg); -webkit-font-smoothing: antialiased;
}
a { color: var(--sage-dark); }
.pg-doc a, .pg-doc code { overflow-wrap: anywhere; }
a:hover { color: var(--sage); }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--terra); outline-offset: 2px; border-radius: 2px; }

/* top bar */
.pg-top {
  position: sticky; top: 0; z-index: 200; background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 12px 20px; padding-top: calc(12px + env(safe-area-inset-top, 0px));
  display: flex; align-items: center; gap: 14px;
}
.pg-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.pg-brand .accent { width: 22px; height: 3px; background: var(--sage); flex: 0 0 auto; }
.pg-brand strong { font-family: 'Playfair Display', Georgia, serif; font-size: 17px; white-space: nowrap; }
.pg-brand span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-top .spacer { flex: 1 1 auto; }
.pg-theme {
  display: inline-flex; align-items: center; justify-content: center; width: 42px; min-height: 42px; border-radius: 3px;
  color: var(--sage-dark); background: var(--surface); border: 1px solid var(--border-2); cursor: pointer;
}
.pg-theme:hover { background: var(--sage); border-color: var(--sage); color: var(--on-accent); }
.pg-theme svg { width: 18px; height: 18px; }
.pg-theme .sun { display: none; } .pg-theme .moon { display: block; }
body[data-theme="dark"] .pg-theme .sun { display: block; } body[data-theme="dark"] .pg-theme .moon { display: none; }

/* document */
.pg-doc { max-width: 780px; margin: 0 auto; padding: 44px 24px 80px; }
.pg-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: var(--sage); margin: 0 0 10px; }
.pg-doc h1 { font-family: 'Playfair Display', Georgia, serif; font-size: clamp(30px, 4.6vw, 42px); line-height: 1.12; color: var(--ink); margin: 0 0 16px; font-weight: 700; }
.pg-lede { font-size: 18px; color: var(--muted); margin: 0 0 30px; max-width: 640px; }
.pg-doc h2 { font-family: 'Playfair Display', Georgia, serif; font-size: 26px; line-height: 1.2; color: var(--ink); margin: 56px 0 14px; padding-top: 22px; border-top: 1px solid var(--border); font-weight: 700; scroll-margin-top: 90px; }
.pg-doc h3 { font-size: 15px; font-weight: 700; color: var(--ink); margin: 26px 0 8px; padding-left: 12px; border-left: 3px solid var(--sage); }
.pg-doc p, .pg-doc li { font-size: 16px; }
.pg-doc ul, .pg-doc ol { padding-left: 22px; }
.pg-doc li { margin-bottom: 6px; }
.pg-doc strong { color: var(--ink); }
.pg-doc code { font-size: 90%; background: var(--surface-2); padding: 1px 5px; border-radius: 3px; }
.pg-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; padding: 0; list-style: none; }
.pg-toc a { display: inline-block; font-size: 13px; font-weight: 600; padding: 8px 12px; border: 1px solid var(--border-2); border-radius: 16px; text-decoration: none; color: var(--text); background: var(--surface); }
.pg-toc a:hover { border-color: var(--sage); color: var(--sage-dark); }
.pg-box { background: var(--surface-2); border: 1px solid var(--border); padding: 22px 24px; margin: 22px 0; border-radius: 4px; }
.pg-box--warn { border-left: 4px solid var(--terra); }
.pg-box h3 { margin-top: 0; }
.pg-box p:last-child, .pg-box ul:last-child { margin-bottom: 0; }
.pg-tool { display: grid; grid-template-columns: 1fr; gap: 6px 22px; }
.pg-tool .open { display: inline-flex; align-items: center; gap: 8px; margin: 6px 0 4px; padding: 10px 16px; min-height: 42px; text-decoration: none; font-size: 14px; font-weight: 600; color: var(--sage-dark); background: var(--surface); border: 1px solid var(--border-2); border-radius: 4px; }
.pg-tool .open:hover { background: var(--sage); border-color: var(--sage); color: var(--on-accent); }
.pg-tool .open svg { width: 16px; height: 16px; }
.pg-meta { font-size: 13px; color: var(--muted); }
details.pg-faq { border-top: 1px solid var(--border); padding: 10px 0; }
details.pg-faq summary { cursor: pointer; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 40px; }
details.pg-faq summary::-webkit-details-marker { display: none; }
details.pg-faq summary::after { content: '+'; color: var(--sage); font-size: 20px; flex: 0 0 auto; }
details.pg-faq[open] summary::after { content: '–'; }
details.pg-faq p { margin: 6px 0 4px; }
.pg-crisis { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.pg-crisis li { background: var(--surface); border: 1px solid var(--border); padding: 12px 14px; border-radius: 4px; font-size: 14.5px; }
.pg-crisis li strong { display: block; }
.pg-foot { margin-top: 60px; padding-top: 22px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); line-height: 1.7; }
.pg-foot a { color: var(--sage-dark); }
.pg-foot .links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 8px; }

@media (max-width: 999.5px) and (orientation: portrait) { .pg-doc { padding-bottom: 120px; } }
@media (max-width: 560px) { .pg-brand span { display: none; } .pg-doc { padding: 34px 18px 110px; } .pg-doc h2 { margin-top: 44px; } }
@media print { .pg-top, .app-footer-menu, .pg-theme { display: none !important; } body { background: #fff; color: #000; } .pg-doc { max-width: none; padding: 0; } }
