/* The site's look, from a few parameters in OkLCH: white or deep olive by
   the visitor's system, one typeface, the printed page as the only image.
   The marks are the MCP App's (viewer/sources.css): one hue per status. */
@font-face {
  font-family: "Libre Franklin";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/LibreFranklin-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Libre Franklin";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/LibreFranklin-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light dark;
  --hue-ink: 148;
  --paper: light-dark(oklch(100% 0 0), oklch(18.5% 0.016 var(--hue-ink)));
  --paper-2: light-dark(oklch(97.2% 0.006 110), oklch(22% 0.019 var(--hue-ink)));
  --ink: light-dark(oklch(24% 0.032 var(--hue-ink)), oklch(95.5% 0.012 105));
  --ink-2: light-dark(oklch(43% 0.028 140), oklch(79% 0.02 110));
  --line: light-dark(oklch(88.5% 0.014 110), oklch(32% 0.02 var(--hue-ink)));
  --accent: light-dark(oklch(47% 0.13 140), oklch(86% 0.15 124));
  --wash: light-dark(oklch(95.2% 0.065 124), oklch(33% 0.06 128));
}

@media (prefers-color-scheme: dark) {
  :root {
    --page-blend: screen;
    --page-filter: invert(1) hue-rotate(180deg) brightness(0.9);
    --mark-l: 41%;
    --mark-c: 0.085;
    --rule-l: 84%;
    --rule-c: 0.14;
  }
}

@media (prefers-color-scheme: light) {
  :root {
    --page-blend: multiply;
    --page-filter: none;
    --mark-l: 91%;
    --mark-c: 0.11;
    --rule-l: 55%;
    --rule-c: 0.15;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.55 "Libre Franklin", Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--wash);
}

h1,
h2 {
  margin: 0;
  font-weight: 600;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

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

code {
  font: 0.95em ui-monospace, Menlo, Consolas, monospace;
}

.site {
  container-type: inline-size;
}

.in {
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: max(clamp(20px, 6cqi, 72px), env(safe-area-inset-left, 0px));
}

.head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px;
}

.logo {
  color: var(--ink);
}

.logo svg {
  display: block;
  width: auto;
  height: 30px;
}

.logo-mark {
  stroke: oklch(88% 0.15 125);
}

.logo-rule {
  stroke: oklch(var(--rule-l) var(--rule-c) 125);
}

.head nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.94rem;
}

.head nav a {
  color: var(--ink);
  text-decoration: none;
}

.head nav a:hover {
  text-decoration: underline;
}

.languages {
  color: var(--ink-2);
  font-size: 0.85rem;
}

.languages b {
  color: var(--ink);
  font-weight: 600;
}

.button {
  display: inline-block;
  padding: 11px 16px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.button.filled {
  background: var(--ink);
  color: var(--paper);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.opening {
  padding-block: clamp(28px, 6cqi, 64px) clamp(24px, 4cqi, 44px);
}

.opening h1 {
  font-size: clamp(2.2rem, 5cqi, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.028em;
}

.opening .row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 40px;
  margin-top: 18px;
}

.opening .row p {
  flex: 1 1 22rem;
  max-width: 56ch;
  color: var(--ink-2);
  font-size: 1.08rem;
}

.example {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 5cqi, 64px);
  align-items: start;
  padding-block: clamp(32px, 5cqi, 56px);
  border-top: 1px solid var(--line);
}

.example h2 {
  font-size: clamp(1.45rem, 2.8cqi, 1.9rem);
  line-height: 1.16;
  letter-spacing: -0.02em;
}

.answer {
  margin-top: 12px;
}

.example.wide {
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

.example.wide > div:first-child {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 5cqi, 64px);
}

.example.wide .answer {
  margin-top: 0;
}

.cuts {
  display: grid;
  gap: 28px;
  min-width: 0;
}

/* One print scale: a cut is as wide as its page's column, at most. */
.cut {
  --hue: 125;
  --chroma: 1;
  width: min(100%, calc(var(--cut-width) * 0.69px));
  min-width: 0;
  margin: 0;
}

.cut[data-tone="amended"] {
  --hue: 250;
  --chroma: 0.8;
}

.cut[data-tone="repealed"] {
  --hue: 22;
  --chroma: 0.8;
}

.sheet {
  position: relative;
  overflow: hidden;
}

.sheet span {
  position: absolute;
  background: oklch(var(--mark-l) calc(var(--mark-c) * var(--chroma)) var(--hue));
}

.sheet img {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: var(--page-blend);
  filter: var(--page-filter);
}

/* Phones: the marked words of the printed page, at reading size. */
.flow {
  display: none;
}

.flow i {
  display: block;
  width: calc(var(--w) * var(--scale));
  height: calc(var(--line) * var(--scale));
  background-image: var(--image);
  background-position: calc(var(--x) * var(--scale) * -1) calc(var(--y) * var(--scale) * -1);
  background-repeat: no-repeat;
  background-size: calc(var(--image-width) * var(--scale)) auto;
  mix-blend-mode: var(--page-blend);
  filter: var(--page-filter);
}

.flow b {
  flex: 0 0 100%;
  height: 0;
}

.cut figcaption {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  color: var(--ink-2);
  font-size: 0.84rem;
  line-height: 1.45;
}

.cut figcaption a {
  justify-self: start;
  color: var(--ink);
}

.status {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: var(--ink);
}

.status::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: oklch(var(--rule-l) calc(var(--rule-c) * var(--chroma)) var(--hue));
}

.closing {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 48px;
  padding-block: 40px;
  border-top: 1px solid var(--line);
}

.closing p {
  flex: 1 1 22rem;
  max-width: 60ch;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 32px;
  padding-block: 20px 28px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.82rem;
}

.foot p {
  flex: 1 1 24rem;
  max-width: 62ch;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.foot a {
  color: var(--ink-2);
}

/* Pages of words. */
.words {
  display: grid;
  gap: 14px;
  max-width: calc(68ch + 2 * clamp(20px, 6cqi, 72px));
  padding-block: clamp(28px, 6cqi, 64px) 56px;
}

.words h1,
.legal h1 {
  font-size: clamp(2rem, 4.4cqi, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.words h2 {
  margin-top: 16px;
  font-size: 1.3rem;
}

.address code {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--paper-2);
  overflow-wrap: anywhere;
}

.legal {
  display: grid;
  grid-template-columns: 220px minmax(0, 68ch);
  gap: 20px 56px;
  padding-block: clamp(28px, 6cqi, 64px) 64px;
}

.legal h1 {
  grid-column: 1 / -1;
}

.toc {
  position: sticky;
  top: 16px;
  display: grid;
  align-content: start;
  gap: 6px;
  font-size: 0.86rem;
}

.toc a {
  color: var(--ink-2);
  text-decoration: none;
}

.toc a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.legal article {
  display: grid;
  gap: 12px;
  min-width: 0;
  container-type: inline-size;
}

.legal article > * {
  min-width: 0;
}

.legal h2 {
  margin-top: 18px;
  font-size: 1.15rem;
}

.legal ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 1.25em;
}

.meta {
  color: var(--ink-2);
  font-size: 0.9rem;
}

.xc {
  display: grid;
  gap: 6px;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--wash);
}

.why {
  color: var(--ink-2);
  font-size: 0.8rem;
}

.mono {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.86em;
}

.table {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--paper-2);
  color: var(--ink-2);
  font-size: 0.8rem;
  font-weight: 600;
}

tr:last-child td {
  border-bottom: 0;
}

a.c[aria-expanded="true"] {
  border-radius: 2px;
  background: var(--wash);
  text-decoration: none;
}

.citation {
  display: grid;
  gap: 22px;
  padding-block: 16px;
  border-block: 1px solid var(--line);
}

li > .citation {
  margin-top: 8px;
}

@container (max-width: 760px) {
  .example,
  .example.wide > div:first-child {
    grid-template-columns: minmax(0, 1fr);
  }

  .example.wide > div:first-child {
    gap: 12px;
  }

  .head .wide {
    display: none;
  }

  .legal {
    grid-template-columns: minmax(0, 1fr);
  }

  .toc {
    position: static;
    display: none;
  }
}

@container (max-width: 560px) {
  .sheet {
    display: none;
  }

  .flow {
    --scale: calc(1.42em / var(--line));
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.3em;
    padding: 0.6em 0.7em;
    border-radius: 3px;
    background: oklch(var(--mark-l) calc(var(--mark-c) * var(--chroma)) var(--hue));
  }
}
