/* MIQ legal instruments: tournament winner "Atelier Instrument" (2026-08-29).
   Brand chrome around an editorial reading core. Rule order is mandatory:
   light base, then dark override, then print last. */
@font-face { font-family: 'Inter'; src: url('/css/fonts/inter-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/css/fonts/inter-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/css/fonts/jetbrainsmono-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  color-scheme: light dark;
  --bg: #f7f5ef; --ink: #15140f; --muted: #5f5a51;
  --accent: #8a5d12; --underline: rgb(138 93 18 / 0.45);
  --line: rgb(21 20 15 / 0.14); --line-strong: rgb(21 20 15 / 0.26);
  --line-bronze: rgb(140 102 59 / 0.58);
  --th-fill: rgb(21 20 15 / 0.045); --sel: rgb(138 93 18 / 0.18);
  --serif: Georgia, Cambria, 'Times New Roman', Times, serif;
  --sans: 'Inter', ui-sans-serif, 'Segoe UI', Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, 'Courier New', monospace;
}

body { margin: 0; background: var(--bg); color: var(--ink);
  font: 400 clamp(1rem, 0.95rem + 0.25vw, 1.0625rem)/1.72 var(--serif); }
.shell { max-width: 47rem; margin: 0 auto;
  padding: clamp(2.25rem, 5vw, 3.5rem) 1.5rem clamp(4rem, 8vw, 6rem); }
p { margin: 0 0 1em; }
p, li { text-wrap: pretty; }
h1 { font: 400 clamp(1.9rem, 1.55rem + 1.4vw, 2.55rem)/1.12 var(--serif);
  letter-spacing: -0.035em; margin: 0 0 2.25rem; text-wrap: balance; }
h2 { font: 600 clamp(1.15rem, 1.08rem + 0.3vw, 1.32rem)/1.3 var(--sans);
  letter-spacing: -0.01em; margin: 3.25rem 0 0.9rem; padding-top: 1.15rem;
  border-top: 1px solid var(--line); }
h3 { font: 600 clamp(1rem, 0.97rem + 0.15vw, 1.08rem)/1.4 var(--sans); margin: 2.1rem 0 0.5rem; }
h4 { font: 600 0.92rem/1.4 var(--sans); letter-spacing: 0.02em; margin: 1.8rem 0 0.4rem; }
ul, ol { padding-left: 1.4rem; margin: 0 0 1.1em; }
li { margin: 0.4em 0; }
li > ul, li > ol { margin-bottom: 0; }
blockquote { margin: 1.5rem 0; padding: 0.2rem 0 0.2rem 1.25rem;
  border-left: 2px solid var(--line-bronze); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.75rem 0; }
code { font: 400 0.85em var(--mono); }

.masthead { display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; flex-wrap: wrap; font: 400 0.72rem/1 var(--mono);
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
  padding-bottom: 0.9rem; border-bottom: 1px solid var(--line-bronze);
  margin-bottom: clamp(2.5rem, 6vw, 3.5rem); }
.masthead a { color: var(--accent); text-decoration: none; padding: 0.85rem 0; margin: -0.85rem 0; }
.masthead a:hover { text-decoration: underline; text-underline-offset: 0.35em; }

.versionline { margin-top: clamp(3rem, 8vw, 4.5rem); padding-top: 1rem;
  border-top: 1px solid var(--line); font: 400 0.75rem/1.7 var(--mono); color: var(--muted); }

table { border-collapse: collapse; width: 100%; margin: 1.4rem 0 1.6rem;
  font: 400 0.875rem/1.55 var(--sans); font-variant-numeric: tabular-nums lining-nums; }
th, td { border: 1px solid var(--line); padding: 0.55rem 0.7rem;
  text-align: left; vertical-align: top; }
th { font: 400 0.72rem/1.4 var(--mono); letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); background: var(--th-fill);
  border-bottom: 1px solid var(--line-strong); }
@media (max-width: 40rem) { table { display: block; overflow-x: auto; } }

main a { color: var(--accent); text-decoration: underline;
  text-decoration-color: var(--underline); text-decoration-thickness: 1px;
  text-underline-offset: 3px; }
main a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--sel); }

/* index-page helpers (hub only) */
.note { color: var(--muted); font-size: 0.92rem; }

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #071017; --ink: #f2eee5; --muted: #a9a69d;
    --accent: #caa66b; --underline: rgb(202 166 107 / 0.5);
    --line: rgb(242 238 229 / 0.16); --line-strong: rgb(242 238 229 / 0.28);
    --line-bronze: rgb(202 166 107 / 0.5);
    --th-fill: rgb(242 238 229 / 0.06); --sel: rgb(202 166 107 / 0.3);
  }
}

@media print {
  @page { margin: 22mm 18mm; }
  :root { --bg: #fff; --ink: #000; --muted: #444; --accent: #000;
    --underline: #000; --line: #999; --line-strong: #555; --line-bronze: #555;
    --th-fill: transparent; --sel: transparent; }
  body { font-size: 10.5pt; line-height: 1.55; }
  .shell { max-width: none; padding: 0; }
  .masthead a { display: none; }
  main { text-align: justify; hyphens: auto; }
  main a { color: #000; }
  main a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 85%; }
  h1, h2, h3, h4 { break-after: avoid; }
  table, blockquote, tr { break-inside: avoid; }
  p, li { orphans: 3; widows: 3; }
  th, td { border-color: #777; }
}
