/* ============================================================
   Bibnor — legal pages (privacy.html, terms.html)
   Loads after premium.css for tokens and shared components.
   These pages don't carry index.html's inline base styles, so
   the few resets they need live here.
   ============================================================ */

/* ---------- base ---------- */
*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; -webkit-text-size-adjust:100%; }
body{
  margin:0; font-family:var(--font-display); font-size:16px; line-height:1.6;
  color:var(--pm-muted); overflow-x:clip;
  -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;
}
a{ color:inherit; }
:focus-visible{ outline:2px solid var(--pm-amber); outline-offset:3px; border-radius:4px; }
.shell{ width:100%; margin:0 auto; }
.brand{ display:flex; align-items:center; gap:10px; text-decoration:none; }
.brand svg{ width:32px; height:32px; flex:none; border-radius:8px; }
.brand b{ font-size:18px; font-weight:800; letter-spacing:-.025em; color:var(--pm-text); }
.board-actions{ display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.foot-links{ display:flex; align-items:center; gap:24px; flex-wrap:wrap; }
.foot-links a{ text-decoration:none; }
.site-foot .brand svg{ width:26px; height:26px; }
.site-foot .brand b{ font-size:16px; }
@media (prefers-reduced-motion: reduce){ html{ scroll-behavior:auto; } }

/* ---------- reading progress ---------- */
.lg-progress{
  position:fixed; top:0; left:0; right:0; height:2px; z-index:60; pointer-events:none;
  background:var(--pm-amber);
  transform:scaleX(var(--read,0)); transform-origin:0 50%;
}

/* ---------- header ---------- */
.lg-top{
  position:sticky; top:0; z-index:50;
  background:rgba(250,248,244,.92);
  backdrop-filter:blur(18px) saturate(1.3); -webkit-backdrop-filter:blur(18px) saturate(1.3);
  border-bottom:1px solid var(--pm-hair);
}
.lg-top-in{ display:flex; align-items:center; justify-content:space-between; gap:20px; height:70px; }
.lg-nav{ display:flex; gap:2px; }
.lg-nav a{
  padding:8px 12px; border-radius:9px; text-decoration:none;
  font-size:14px; font-weight:500; color:var(--pm-muted);
  transition:color .2s, background .2s;
}
.lg-nav a:hover{ color:var(--pm-text); background:rgba(23,42,33,.05); }
.lg-nav a[aria-current="page"]{ color:var(--pm-text); background:var(--pm-bg-2); }
.pm-btn.sm{ padding:10px 16px; font-size:13.5px; border-radius:11px; }

/* ---------- hero ---------- */
.lg-hero{ padding-block:clamp(60px,8vw,108px) clamp(36px,4vw,52px); }
.lg-crumb{ display:flex; align-items:center; gap:8px; margin:0 0 22px; font-size:13px; color:var(--pm-faint); }
.lg-crumb a{ text-decoration:none; color:var(--pm-muted); }
.lg-crumb a:hover{ color:var(--pm-text); text-decoration:underline; }
.lg-hero h1{
  margin:0; color:var(--pm-text); font-family:var(--font-serif); font-weight:600;
  font-size:clamp(40px,5.6vw,64px); line-height:1.05; letter-spacing:-.015em;
}
.lg-lede{ margin:20px 0 0; max-width:60ch; font-size:clamp(17px,1.6vw,19px); line-height:1.6; color:var(--pm-body); }
.lg-meta{ display:flex; flex-wrap:wrap; gap:10px 22px; margin-top:26px; font-size:13.5px; color:var(--pm-faint); }
.lg-meta span{ display:inline-flex; align-items:center; gap:7px; }
.lg-meta svg{ width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.lg-switch{
  display:inline-flex; gap:4px; margin-top:30px; padding:5px; border-radius:13px;
  background:var(--pm-bg-2); border:0;
}
.lg-switch a{
  padding:9px 16px; border-radius:9px; text-decoration:none;
  font-size:14px; font-weight:600; color:var(--pm-muted); transition:color .2s, background .2s;
}
.lg-switch a:hover{ color:var(--pm-text); }
.lg-switch a[aria-current="page"]{ color:var(--pm-text); background:#fff; box-shadow:0 1px 3px rgba(23,42,33,.12); }

/* ---------- body: contents + document ---------- */
.lg-body{
  display:grid; grid-template-columns:230px minmax(0,1fr); gap:clamp(32px,6vw,88px);
  align-items:start; padding-bottom:clamp(80px,10vw,140px);
}
.lg-toc{ position:sticky; top:100px; }
.lg-toc p{ margin:0 0 12px; font-size:13px; font-weight:600; color:var(--pm-text); }
.lg-toc nav{ display:grid; border-left:1px solid var(--pm-hair); }
.lg-toc a{
  margin-left:-1px; padding:6px 0 6px 16px; border-left:2px solid transparent;
  font-size:14.5px; line-height:1.4; color:var(--pm-muted); text-decoration:none;
  transition:color .2s, border-color .2s;
}
.lg-toc a:hover{ color:var(--pm-text); }
.lg-toc a.on{ color:var(--pm-text); font-weight:500; border-left-color:var(--pm-green-2); }
.lg-toc-help{
  margin-top:26px; padding:16px; border-radius:14px;
  background:#fff; border:1px solid var(--pm-hair);
  font-size:13px; line-height:1.5; color:var(--pm-muted);
}
.lg-toc-help b{ display:block; color:var(--pm-text); font-size:13.5px; margin-bottom:4px; }
.lg-toc-help a{ color:var(--pm-green-2); }

.lg-doc{ max-width:74ch; min-width:0; }
.lg-glance{
  margin-bottom:52px; padding:clamp(22px,3vw,30px); border-radius:22px;
  border:1px solid var(--pm-hair); background:#fff;
}
.lg-glance h2{ margin:0 0 18px; font-family:var(--font-serif); font-size:21px; font-weight:600; color:var(--pm-text); }
.lg-glance ul{ list-style:none; margin:0; padding:0; display:grid; grid-template-columns:1fr 1fr; gap:14px 26px; }
.lg-glance li{ display:flex; gap:11px; font-size:14.5px; line-height:1.5; color:var(--pm-muted); }
.lg-glance li b{ color:var(--pm-text); font-weight:600; }
.lg-glance svg{
  flex:none; width:12px; height:12px; margin-top:4px; padding:4px; box-sizing:content-box; border-radius:50%;
  fill:none; stroke:var(--pm-green-2); stroke-width:2.8; stroke-linecap:round; stroke-linejoin:round;
  background:var(--pm-green-bg);
}

.lg-doc section{ scroll-margin-top:96px; padding-top:44px; margin-top:44px; border-top:1px solid var(--pm-hair); }
.lg-doc section:first-of-type{ padding-top:0; margin-top:0; border-top:0; }
.lg-doc h2{
  display:flex; align-items:baseline; gap:14px; margin:0 0 18px;
  font-family:var(--font-serif); font-size:clamp(23px,2.5vw,29px); font-weight:600; letter-spacing:-.01em; line-height:1.2; color:var(--pm-text);
}
.lg-doc h2 .n{ flex:none; font-family:var(--font-display); font-size:14px; font-weight:600; color:var(--pm-amber-ink); letter-spacing:0; }
.lg-doc h3{ margin:28px 0 10px; font-size:17px; font-weight:600; letter-spacing:-.01em; color:var(--pm-text); }
.lg-doc p, .lg-doc li{ font-size:17px; line-height:1.72; color:var(--pm-body); }
.lg-doc p{ margin:0 0 16px; }
.lg-doc ul{ margin:0 0 18px; padding-left:1.25em; display:grid; gap:6px; }
.lg-doc li::marker{ color:var(--pm-amber); }
.lg-doc strong{ color:var(--pm-text); font-weight:600; }
.lg-doc a:not(.pm-btn){ color:var(--pm-green-2); text-underline-offset:3px; }
.lg-short{
  display:flex; gap:12px; align-items:flex-start; margin:0 0 20px; padding:14px 16px; border-radius:14px;
  background:var(--pm-green-bg); border:1px solid #C4DDCD;
  font-size:15.5px; line-height:1.6; color:var(--pm-text);
}
.lg-short b{
  flex:none; margin-top:1px; padding:3px 8px; border-radius:999px;
  font-size:12px; font-weight:600; letter-spacing:0;
  color:#fff; background:var(--pm-green-2);
}
.lg-table{ width:100%; margin:6px 0 20px; border-collapse:separate; border-spacing:0; border:1px solid var(--pm-hair); border-radius:12px; overflow:hidden; font-size:15px; background:#fff; }
.lg-table th, .lg-table td{ padding:12px 16px; text-align:left; vertical-align:top; border-top:1px solid var(--pm-hair); line-height:1.55; }
.lg-table tr:first-child th, .lg-table tr:first-child td{ border-top:0; }
.lg-table th{ font-size:13px; font-weight:600; color:var(--pm-muted); background:var(--pm-bg-subtle); }
.lg-table td{ color:var(--pm-body); }
.lg-table td:first-child{ color:var(--pm-text); font-weight:500; }
.lg-contact{
  display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap;
  margin-top:8px; padding:20px 22px; border-radius:16px;
  background:#fff; border:1px solid var(--pm-hair);
}
.lg-contact span{ font-size:15px; color:var(--pm-text); }
.lg-contact small{ display:block; font-size:13px; color:var(--pm-faint); }

/* ---------- responsive ---------- */
@media (max-width:980px){
  .lg-body{ grid-template-columns:1fr; }
  .lg-toc{ position:static; padding:18px; border-radius:12px; background:#fff; border:1px solid var(--pm-hair); }
  .lg-toc nav{ grid-template-columns:1fr 1fr; border-left:0; gap:2px 16px; }
  .lg-toc a{ border-left:0; padding-left:0; margin-left:0; }
  .lg-toc a.on{ color:var(--pm-green-2); }
  .lg-toc-help{ display:none; }
}
@media (max-width:720px){
  .lg-nav{ display:none; }
  .lg-glance ul{ grid-template-columns:1fr; }
  .lg-toc nav{ grid-template-columns:1fr; }
  .shell{ padding-inline:20px; }
  .lg-table th, .lg-table td{ padding:10px 12px; }
}

/* high-contrast mode */
html.a11y-contrast .lg-top{ background:#fff !important; border-bottom:2px solid #000; }
html.a11y-contrast .lg-glance, html.a11y-contrast .lg-short, html.a11y-contrast .lg-contact, html.a11y-contrast .lg-toc-help{ background:#fff !important; border:2px solid #000 !important; }
.lg-toc .lg-toc-help a{ display:inline; margin:0; padding:0; border:0; font-size:inherit; }
@media (max-width:720px){
  .lg-toc a{ padding-block:9px; }
  .lg-switch a{ padding:11px 16px; }
}

/* "On this page" is a <details>: always open on larger screens, collapsed on phones */
.lg-toc-d > summary{ list-style:none; margin:0 0 12px; font-size:13px; font-weight:600; color:var(--pm-text); cursor:default; }
.lg-toc-d > summary::-webkit-details-marker{ display:none; }
@media (min-width:981px){ .lg-toc-d > summary{ pointer-events:none; } }
@media (max-width:980px){
  .lg-toc{ padding:0; }
  .lg-toc-d > summary{ cursor:pointer; display:flex; align-items:center; justify-content:space-between; min-height:52px; margin:0; padding:0 18px; font-size:15px; }
  .lg-toc-d > summary::after{ content:"+"; font-size:22px; font-weight:400; color:var(--pm-muted); transition:transform .2s; }
  .lg-toc-d[open] > summary::after{ transform:rotate(45deg); }
  .lg-toc-d > nav{ padding:0 18px 14px; }
  .lg-toc-d > summary:focus-visible{ outline:2px solid var(--pm-green-2); outline-offset:-2px; border-radius:12px; }
}
