/* ============================================================
   OpLoop — legal document styles.

   Deliberately plain. These pages are reference material, not a
   surface for the brand: one font, no accent colour, no depth, no
   call-out blocks. Anything that draws the eye to one clause draws
   it away from another. The landing page carries the design.
   ============================================================ */

:root {
  --bg:       #FFFFFF;
  --text:     #1A1A1A;
  --muted:    #5F5F5F;
  --rule:     #DDDDDD;
  --rule-alt: #EDEDED;
  --link:     #1A1A1A;

  --body: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:       #16181A;
    --text:     #DFE1E3;
    --muted:    #9BA0A5;
    --rule:     #33383C;
    --rule-alt: #26292C;
    --link:     #DFE1E3;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 24px;
}

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

.container {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── header ───────────────────────────────────────────── */

.site-head {
  border-bottom: 1px solid var(--rule);
}

.site-head .container {
  padding-top: 20px;
  padding-bottom: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 16px;
}

.brand img {
  width: 22px;
  height: 22px;
  display: block;
  border-radius: 4px;
}

/* ─── document ─────────────────────────────────────────── */

.doc {
  padding: 48px 0 64px;
}

.doc h1 {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

.doc .effective {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 32px;
}

.doc h2 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  margin: 40px 0 12px;
}

.doc h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 24px 0 8px;
}

.doc p {
  margin: 0 0 14px;
}

.doc ul {
  margin: 0 0 16px;
  padding-left: 22px;
}

.doc li {
  margin-bottom: 7px;
}

.doc strong { font-weight: 600; }

.doc a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.doc a:hover { text-decoration: none; }

.doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.intro {
  color: var(--text);
  margin-bottom: 32px;
}

/* ─── contents ─────────────────────────────────────────── */

.toc {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 20px 0;
  margin: 0 0 8px;
}

.toc h2 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 12px;
}

.toc ol {
  margin: 0;
  padding-left: 22px;
  font-size: 15px;
}

.toc li { margin-bottom: 5px; }

/* WCAG 2.2 target size (2.5.8) wants 24px. A bare link in this list is the
   line box and nothing more — 18px. Links sitting inside a sentence are
   exempt from that rule; a stacked list of navigation links is not. */
.toc a {
  color: var(--link);
  text-decoration: none;
  display: inline-block;
  padding: 3px 0;
}

.toc a:hover { text-decoration: underline; }

/* ─── table ────────────────────────────────────────────── */

.table-wrap {
  overflow-x: auto;
  margin: 0 0 18px;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 460px;
  font-size: 15px;
}

th, td {
  text-align: left;
  padding: 10px 14px 10px 0;
  border-bottom: 1px solid var(--rule-alt);
  vertical-align: top;
}

thead th {
  border-bottom: 1px solid var(--rule);
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
}

tbody tr:last-child td { border-bottom: none; }

/* ─── contact ──────────────────────────────────────────── */

.doc address {
  font-style: normal;
  margin: 0 0 14px;
}

/* ─── footer ───────────────────────────────────────────── */

.site-foot {
  border-top: 1px solid var(--rule);
  padding: 24px 0 40px;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-bottom: 12px;
}

.foot-links a {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  display: inline-block;
  padding: 4px 0;
}

.foot-links a:hover {
  color: var(--text);
  text-decoration: underline;
}

.copyright {
  font-size: 13px;
  color: var(--muted);
}

a:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}
