/* Rituel: long-form legal pages. Tokens come from shared/tokens.css. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font: 400 1.0625rem/1.65 var(--text);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--bordeaux); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:focus-visible { outline: 2px solid var(--bordeaux); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: 16px; top: -60px; padding: 10px 14px; background: var(--paper); border-radius: var(--r); }
.skip:focus { top: 12px; }

/* Header */
.lh {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 32px;
  min-height: var(--header-h); padding: 8px var(--page-gutter);
}
.lh-home { font: 400 1.5rem/1 var(--display); color: var(--bordeaux); text-decoration: none; }
.lh-nav { display: flex; flex-wrap: wrap; gap: 0 24px; font-size: 1rem; }
.lh-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; }
.lh-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
@media (hover: hover) and (pointer: fine) {
  .lh-nav a:hover { color: var(--bordeaux); text-decoration: underline; }
}

/* Layout: reading column, with a contents rail on wide screens */
.page { max-width: 1120px; margin: 0 auto; padding: clamp(32px, 6vw, 80px) var(--page-gutter) clamp(64px, 8vw, 112px); }
.page--narrow { max-width: calc(68ch + 2 * var(--page-gutter)); }
.page-head { max-width: 68ch; margin-bottom: clamp(32px, 4vw, 56px); }
.page-layout { display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; color: var(--bordeaux); text-wrap: balance; }
h1 { margin: 0; font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem); line-height: 1.08; }
.updated { margin: 14px 0 0; font-size: .9375rem; color: var(--muted); }
.lede .nb { white-space: nowrap; }
.lede { margin: 20px 0 0; font-size: 1.1875rem; line-height: 1.55; }

.toc { margin-bottom: 40px; font-size: 1rem; border-block: 1px solid rgb(35 22 26 / .14); }
.toc summary { display: flex; align-items: center; min-height: 48px; cursor: pointer; font-weight: 600; }
.toc ol { margin: 0; padding: 0 0 16px; list-style: none; }
.toc a { display: block; padding: 7px 0; line-height: 1.3; color: var(--muted); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .toc a:hover { color: var(--bordeaux); text-decoration: underline; } }
@media (min-width: 1000px) {
  .page-layout { display: grid; grid-template-columns: minmax(0, 68ch) 250px; justify-content: space-between; gap: 64px; align-items: start; }
  .toc { grid-column: 2; grid-row: 1; position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow: auto; margin: 0; border: 0; border-left: 1px solid rgb(35 22 26 / .14); padding-left: 20px; font-size: .9375rem; }
  .toc summary { display: none; }
  .toc::details-content { content-visibility: visible; height: auto; display: block; }
  .prose { grid-column: 1; grid-row: 1; }
}

/* Long-form text */
.prose { max-width: 68ch; }
.prose section { scroll-margin-top: 24px; }
.prose section + section { margin-top: clamp(36px, 4vw, 52px); }
.prose h2 { margin: 0 0 12px; font-size: clamp(1.4375rem, 1.3rem + .6vw, 1.75rem); line-height: 1.2; }
.prose h3 { margin: 24px 0 6px; font-size: 1.1875rem; line-height: 1.3; color: var(--ink); }
.prose p { margin: 0 0 14px; }
.prose ul { margin: 0 0 14px; padding-left: 1.2em; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--gold); }
.prose strong { font-weight: 600; }
.nb { white-space: nowrap; } /* legal references never break at their hyphen */
.prose a { overflow-wrap: anywhere; }

.box { margin: 20px 0; padding: 20px 22px; background: var(--paper); border-radius: var(--r-card); border: 1px solid rgb(35 22 26 / .1); }
.box > :last-child { margin-bottom: 0; }
.box--key { border-left: 4px solid var(--bordeaux); }
.box h3:first-child { margin-top: 0; }

/* A fact still to be supplied: must stay impossible to miss until it is filled in. */
.todo {
  padding: .05em .3em; border-radius: 4px;
  background: #f7dc8c; color: var(--ink); font-weight: 600;
  outline: 1px dashed #7d5e1c; outline-offset: -1px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* Tables become stacked records on a phone */
.table { width: 100%; margin: 16px 0 20px; border-collapse: collapse; font-size: 1rem; line-height: 1.5; }
.table th, .table td { padding: 12px 14px 12px 0; text-align: left; vertical-align: top; border-bottom: 1px solid rgb(35 22 26 / .14); }
.table thead th { font-weight: 600; font-size: .9375rem; color: var(--muted); }
.table tbody th { font-weight: 600; }
@media (max-width: 680px) {
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table, .table tbody, .table tr, .table th, .table td { display: block; width: 100%; }
  .table tr { padding: 14px 0; border-bottom: 1px solid rgb(35 22 26 / .14); }
  .table th, .table td { padding: 2px 0; border: 0; }
  .table td[data-label]::before { content: attr(data-label) " : "; color: var(--muted); }
}

/* Footer */
.lf {
  padding: clamp(32px, 4vw, 48px) var(--page-gutter);
  background: linear-gradient(rgb(36 8 12 / .55), rgb(36 8 12 / .55)), #4a141b url(/textures/marbre-bordeaux-s.jpg) center / cover;
  color: #f6eedf;
}
.lf-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 40px; max-width: 1120px; margin: 0 auto; }
.lf-mark { font: 400 1.75rem/1 var(--display); color: var(--gold-light); text-decoration: none; --wm-star: currentColor; }
.lf ul { display: flex; flex-wrap: wrap; gap: 0 24px; margin: 0; padding: 0; list-style: none; }
.lf ul a { display: inline-flex; align-items: center; min-height: 44px; color: #f6eedf; text-decoration: none; }
.lf a:focus-visible { outline-color: currentColor; }
@media (hover: hover) and (pointer: fine) { .lf ul a:hover { color: var(--gold-light); } }
