/* Hardpost legal pages (engine/legal.py): the website's white style, made for reading. Plain CSS, no build step.
   Owner rules: no serif or mono display type, no pill tags, sentence case. */
:root {
  --bg: #ffffff; --tint: #f7f9fc; --sky: #eaf3fe; --ink: #141414; --ink2: #3d4451; --ink3: #5b6472;
  --line: #eef0f3; --line2: #e4e7ec; --accent: #138cf5; --accent-ink: #0b6fd6; --warn: #fff4cc; --warn-line: #f1d36b;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Inter Tight", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; color: var(--ink); background: var(--bg); font: 16px/1.65 var(--font);
  background-image: radial-gradient(70% 320px at 50% 0, var(--sky) 0, rgba(234, 243, 254, 0) 100%); background-repeat: no-repeat; }
a { color: var(--accent-ink); text-underline-offset: 2px; }
.wrap { width: min(1100px, 100%); margin: 0 auto; padding: 0 max(20px, env(safe-area-inset-left)); }

.top { position: sticky; top: 0; z-index: 5; background: rgba(255, 255, 255, .86); backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 600 18px/1 var(--display); letter-spacing: -.03em; }
.brand img { border-radius: 7px; }
.lnav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; }
.lnav a, .foot nav a { color: var(--ink3); text-decoration: none; font-weight: 500; }
.lnav a:hover, .foot nav a:hover { color: var(--ink); }
.lnav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 6px; }

.page { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 56px; padding-top: 48px; padding-bottom: 72px; }
.toc { position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 120px); overflow: auto; font-size: 14px; }
.toc-h { margin: 0 0 10px; color: var(--ink3); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.toc ol, .toc-m ol { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.toc li, .toc-m li { counter-increment: s; }
.toc a, .toc-m a { display: block; padding: 5px 0 5px 12px; border-left: 2px solid var(--line); color: var(--ink3); text-decoration: none; line-height: 1.35; }
.toc a:hover, .toc-m a:hover { color: var(--ink); border-left-color: var(--accent); }
.toc-m { display: none; margin: 0 0 28px; border: 1px solid var(--line2); border-radius: 12px; padding: 12px 16px; background: var(--tint); }
.toc-m summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.toc-m ol { margin-top: 10px; }

.doc { max-width: 720px; min-width: 0; }
.doc h1 { font: 600 clamp(32px, 5vw, 44px)/1.1 var(--display); letter-spacing: -.035em; margin: 0 0 12px; }
.meta { color: var(--ink3); font-size: 14px; margin: 0 0 32px; }
.lead { font-size: 18px; color: var(--ink2); margin: 0 0 8px; }
.doc h2 { font: 600 22px/1.25 var(--display); letter-spacing: -.02em; margin: 44px 0 12px; padding-top: 4px; }
.doc h3 { font-size: 16px; font-weight: 600; margin: 24px 0 6px; }
.doc p, .doc li { color: var(--ink2); }
.doc ul, .doc ol:not(.toc-m ol) { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc strong, .doc b { color: var(--ink); }
.doc table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 16px 0; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.doc thead th { color: var(--ink); font-weight: 600; background: var(--tint); border-bottom-color: var(--line2); }
.doc code { font-family: var(--font); font-weight: 600; background: var(--tint); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: .92em; }
.back { margin-top: 48px; font-size: 14px; }

/* empty data/legal.json fields: plain text for everyone, highlighted for admins */
.tbf { font-style: italic; }
.admin .tbf { background: var(--warn); outline: 1px solid var(--warn-line); border-radius: 4px; padding: 0 4px; font-style: normal; font-weight: 600; color: #6b4e00; }
.adm { margin: 0 0 24px; padding: 12px 16px; border: 1px solid var(--warn-line); background: var(--warn); border-radius: 12px; font-size: 14px; color: #4d3800; }

.foot { border-top: 1px solid var(--line); background: var(--tint); }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 28px calc(28px + env(safe-area-inset-bottom)); font-size: 14px; color: var(--ink3); }
.foot p { margin: 0; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* skip link, and the table of contents marks the section you are reading (legal.js sets aria-current) */
.skip { position: absolute; left: 12px; top: -48px; z-index: 10; padding: 8px 12px; border-radius: 10px; background: var(--ink); color: #fff; text-decoration: none; }
.skip:focus { top: 12px; }
.doc:focus { outline: none; }
.toc a[aria-current="true"] { color: var(--ink); border-left-color: var(--accent); font-weight: 600; }

@media (max-width: 860px) {
  .page { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 28px; }
  .toc { display: none; }
  .toc-m { display: block; }
  .top { position: static; }
  .lnav { gap: 4px 14px; font-size: 13px; }
  .doc h2 { margin-top: 36px; }
}
