/* Ochil Ledger, the pages nobody reads until they need them.
   Same two palettes as the feature, same one family, no engine, no scroll
   work. A legal page is a document, so it is set like one: one measure,
   rules instead of boxes, tabular figures in the tables. */

:root {
  color-scheme: light dark;
  --canvas: #F4EFE4; --surface: #EDE6D6;
  --ink: #1B2433;    --ink-soft: #59616E;
  --accent: #1F5C3E; --accent-ink: #FFFFFF;
  --line: rgba(27, 36, 51, .22);
  --line-strong: rgba(27, 36, 51, .46);

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --gutter: clamp(1.25rem, 5vw, 3rem);
}
:root[data-theme="dark"] {
  --canvas: #14171C; --surface: #1B1F26;
  --ink: #E9E4D8;    --ink-soft: #9AA0A8;
  --accent: #7FCBA2; --accent-ink: #14171C;
  --line: rgba(233, 228, 216, .20);
  --line-strong: rgba(233, 228, 216, .40);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0; background: var(--canvas); color: var(--ink);
  font: 400 clamp(1rem, .96rem + .2vw, 1.08rem)/1.62 var(--serif);
  font-variant-numeric: tabular-nums lining-nums;
  -webkit-font-smoothing: antialiased;
}
/* color is inherited as a computed value, so the token alone is not enough */
:root[data-theme="dark"] body { color: var(--ink); }
::selection { background: var(--accent); color: var(--accent-ink); }

.skip {
  position: fixed; top: .5rem; left: .5rem; z-index: 99;
  display: inline-flex; align-items: center; min-height: 44px;
  padding: .7rem 1rem; background: var(--accent); color: var(--accent-ink);
  font: 600 .95rem/1 var(--serif); text-decoration: none; transform: translateY(-200%);
}
.skip:focus-visible { transform: none; outline: 2px solid var(--ink); outline-offset: 2px; }

/* The demo strip, same job as on the feature: it is how a prospect who
   opens this from the work page finds Logan again. */
.demo {
  background: var(--surface); border-bottom: 1px solid var(--line);
  padding: .5rem var(--gutter);
  font: 400 .82rem/1.5 var(--serif);
  font-variant-caps: all-small-caps; letter-spacing: .1em;
  color: var(--ink-soft);
}
.demo p { margin: 0; display: flex; flex-wrap: wrap; gap: .1rem .9rem; align-items: baseline; }
.demo b { color: var(--ink); font-weight: 600; white-space: nowrap; }
.demo a { color: var(--ink); text-decoration: underline; display: inline-block; padding-block: .1rem; }

.bar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 1rem;
  padding: .75rem var(--gutter);
  background: var(--canvas);
  border-bottom: 2px solid var(--ink);
}
.bar__mark { color: var(--ink); text-decoration: none; font-weight: 600; letter-spacing: -.01em; }
.bar__mark span { display: block; font-weight: 400; font-size: .8rem; color: var(--ink-soft);
  font-variant-caps: all-small-caps; letter-spacing: .1em; }
.bar__back { margin-left: auto; color: var(--ink-soft); text-decoration: none;
  font-variant-caps: all-small-caps; letter-spacing: .1em; font-size: .9rem;
  display: inline-flex; align-items: center; min-height: 44px; }
.bar__back:hover { color: var(--ink); }
/* On a narrow screen the wordmark is already the way home, and a second
   link wrapping to two lines beside it is just noise. */
@media (max-width: 560px) { .bar__back { display: none; } }

.lights {
  display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0;
  background: transparent; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 0; cursor: pointer;
}
.lights:hover { color: var(--ink); border-color: var(--line-strong); }
.lights svg { width: 17px; height: 17px; display: block; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.lights__sun { display: none; }
:root[data-theme="dark"] .lights__sun { display: block; }
:root[data-theme="dark"] .lights__moon { display: none; }
@media (pointer: coarse) { .lights { width: 44px; height: 44px; } }

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

main { width: min(68ch, 100%); margin-inline: auto; padding: clamp(2.5rem, 7vw, 4.5rem) var(--gutter) 5rem; }

.eyebrow { margin: 0 0 .9rem; font-variant-caps: all-small-caps; letter-spacing: .12em;
  font-weight: 600; font-size: .88rem; color: var(--ink-soft); }
h1 { font: 600 clamp(2rem, 1.4rem + 2.6vw, 3rem)/1.04 var(--serif); letter-spacing: -.022em; margin: 0 0 .6rem; text-wrap: balance; }
.stamp { color: var(--ink-soft); font-size: .92rem; margin: 0 0 2rem; }
h2 { font: 600 clamp(1.2rem, 1.05rem + .6vw, 1.5rem)/1.18 var(--serif); letter-spacing: -.012em; margin: 2.75rem 0 .8rem; text-wrap: balance; }
h3 { font: 600 1.05rem/1.3 var(--serif); margin: 1.75rem 0 .5rem; }
p, li { text-wrap: pretty; }
p { margin: 0 0 1.05rem; }
ul, ol { margin: 0 0 1.05rem; padding-left: 1.3rem; }
li { margin-bottom: .45rem; }
a { color: var(--accent); text-underline-offset: .2em; }
strong { color: var(--ink); font-weight: 600; }
address { font-style: normal; }

.note {
  border-top: 2px solid var(--accent); border-bottom: 1px solid var(--line);
  padding: 1rem 0 .6rem; margin: 0 0 2.25rem;
}
.note p:last-child { margin-bottom: 0; }

.tablewrap { overflow-x: auto; margin: 0 0 1.4rem; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 30rem; }
caption { text-align: left; color: var(--ink-soft); font-size: .88rem;
  font-variant-caps: all-small-caps; letter-spacing: .1em; padding-bottom: .6rem; }
th, td { text-align: left; vertical-align: top; padding: .7rem .9rem .7rem 0; border-bottom: 1px solid var(--line); }
thead th { border-bottom: 2px solid var(--ink); font-weight: 600; font-size: .86rem;
  font-variant-caps: all-small-caps; letter-spacing: .09em; color: var(--ink-soft); }

.back {
  display: inline-flex; align-items: center; min-height: 44px;
  margin-top: 2.5rem; padding: .7rem 1.3rem;
  border: 1px solid var(--line-strong); color: var(--ink); text-decoration: none;
  font-weight: 600; font-size: .98rem;
}
.back:hover { border-color: var(--accent); color: var(--accent); }

.foot { border-top: 2px solid var(--ink); margin-top: 3.5rem; padding-top: 1.1rem; color: var(--ink-soft); font-size: .88rem; }
.foot a { color: var(--ink); }
