/* The Retrieval Company. Tokens and reasoning are in DESIGN.md */
:root {
  --desk: #0E2A23;
  --desk-2: #143A30;
  --paper: #F3F5EE;
  --ink: #12201B;
  --muted: #A6BBB1;
  --rule: rgba(243, 245, 238, .16);

  --teal: #7FD1C8;
  --orange: #FF9A52;
  --yellow: #FFD54A;
  --pink: #F7A1C4;

  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --doc: "Times New Roman", Times, "Liberation Serif", serif;
  --ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;

  --header-h: 64px;
  --tab-h: 46px;
  --gutter: clamp(16px, 3vw, 40px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--desk);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; }
a { color: inherit; }
p { margin: 0; }

.sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 8px;
  background: var(--paper); color: var(--ink); font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--paper); outline-offset: 3px; border-radius: 6px; }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 var(--gutter);
  background: var(--desk);
}
.brand {
  display: inline-flex; align-items: center; gap: 11px;
  text-decoration: none;
  font-size: 17px; font-weight: 650; font-stretch: 112%; letter-spacing: -.01em;
}
.brand__mark { width: 28px; height: 28px; flex: none; }
.top__nav { display: flex; gap: 2px; }
.top__nav a {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 12px; border-radius: 8px;
  font-size: 15px; font-weight: 500; text-decoration: none;
  transition: background-color .2s;
}
.top__nav { align-items: center; }
.top__nav a:not(.btn):hover { background: var(--desk-2); }
.top__nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 7px; }
.btn--small { min-height: 40px; padding: 0 18px; margin-left: 10px; font-size: 15px; }
.top__nav .btn { border-radius: 999px; padding: 0 18px; }

/* ---------- Shared ---------- */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 24px; border-radius: 999px;
  background: var(--paper); color: var(--ink);
  font-size: 16px; font-weight: 600; text-decoration: none;
  transition: background-color .2s, transform .2s var(--ease);
}
.btn:hover { background: #fff; }
.btn:active { transform: translateY(1px); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: #000; }
.link {
  font-weight: 500;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px;
}
.link:hover { text-decoration-thickness: 2px; }

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

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(16px, 3vw, 48px);
  min-height: calc(100svh - var(--header-h));
  padding: 0 var(--gutter) clamp(24px, 4vw, 56px);
}
.hero__copy { padding-block: 40px; }
h1 {
  font-size: clamp(46px, 6.4vw, 104px);
  line-height: .95;
  font-stretch: 118%;
  letter-spacing: -.028em;
  margin-bottom: 30px;
  max-width: 12ch;
}
.lead {
  font-size: clamp(18px, 1.55vw, 22px);
  line-height: 1.45;
  color: var(--muted);
  max-width: 30ch;
  margin-bottom: 38px;
}

.stack {
  position: relative;
  height: min(76svh, 720px);
  min-height: 380px;
  touch-action: pan-y;
}
.stack canvas {
  position: absolute; inset: 0; z-index: 2;
  width: 100%; height: 100%;
  pointer-events: none;
}
.flag {
  position: absolute; left: 0; top: 0; z-index: 1;
  height: 30px;
  transform: translate3d(var(--x, 0px), var(--y, -100px), 0);
  color: var(--ink); text-decoration: none;
  border-radius: 0 6px 6px 0;
}
.flag__in {
  display: flex; align-items: center; height: 100%;
  padding: 0 15px 0 24px;
  border-radius: 0 6px 6px 0;
  background: var(--c);
  font-size: 14px; font-weight: 650; white-space: nowrap;
  box-shadow: 0 8px 16px -10px rgba(0, 0, 0, .6);
}
.flag:focus-visible { outline: none; }
.flag:focus-visible .flag__in { outline: 3px solid var(--paper); outline-offset: 2px; }
.js .flag__in {
  opacity: 0; transform: translateX(-34px);
  transition: transform .8s var(--ease) calc(var(--n) * 120ms), opacity .3s ease calc(var(--n) * 120ms);
}
.js .stack.is-in .flag__in { opacity: 1; transform: none; }

/* ---------- The file of dividers ---------- */
.file {
  position: relative;
  padding: var(--tab-h) var(--gutter) 0;
}
.divider {
  position: sticky;
  top: calc(var(--header-h) + var(--tab-h));
  scroll-margin-top: calc(var(--header-h) + var(--tab-h));
  color: var(--ink);
}
.tab {
  position: absolute; bottom: calc(100% - 1px);
  left: calc(var(--i) * 25%);
  width: min(calc(25% - 8px), 270px);
  height: var(--tab-h);
  display: flex; align-items: center;
  padding: 0 20px;
  border-radius: 13px 13px 0 0;
  background: var(--c);
  color: var(--ink);
  font-size: 16px; font-weight: 650; font-stretch: 108%;
  text-decoration: none;
  box-shadow: 0 -10px 18px -14px rgba(0, 0, 0, .55);
}
.tab:focus-visible { outline-color: var(--ink); outline-offset: -5px; }
.sheet {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(24px, 4vw, 72px);
  min-height: calc(100svh - var(--header-h) - var(--tab-h));
  padding: clamp(28px, 4vw, 64px);
  background: var(--c);
  border-radius: 14px;
  box-shadow: 0 -18px 34px -20px rgba(0, 0, 0, .6);
  overflow: clip;
}
.divider[style*="--i: 0"] .sheet { border-top-left-radius: 0; }

.sheet__copy { max-width: 32rem; }
.sheet h2 {
  font-size: clamp(34px, 4.1vw, 66px);
  line-height: .98;
  font-stretch: 114%;
  letter-spacing: -.024em;
  margin-bottom: 22px;
}
.sheet__copy > p:not(.status) {
  font-size: clamp(17px, 1.3vw, 19px);
  line-height: 1.5;
  max-width: 36ch;
  margin-bottom: 26px;
}
.status {
  display: inline-flex; align-items: center; gap: 9px;
  margin-bottom: 26px;
  padding: 6px 13px 6px 11px; border-radius: 999px;
  background: rgba(18, 32, 27, .1);
  font-size: 14px; font-weight: 600;
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }
.sheet .link:focus-visible,
.sheet .btn:focus-visible { outline-color: var(--ink); }

.stage {
  position: relative;
  height: min(62svh, 560px);
  min-height: 340px;
}

/* Lasarra: ten tools file into one case record */
.chips { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.chip {
  position: absolute; left: var(--x); top: var(--y);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px 9px 10px; border-radius: 999px;
  background: #fff; color: var(--ink);
  font-size: 14px; font-weight: 600; white-space: nowrap;
  box-shadow: 0 10px 22px -14px rgba(8, 40, 36, .7);
  transition: transform .85s var(--ease), opacity .3s ease;
}
.chip svg, .record__icon svg {
  width: 20px; height: 20px;
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.chip svg { color: #0E6F69; }
.record {
  position: absolute; left: 50%; top: 50%;
  width: min(88%, 450px);
  transform: translate(-50%, -50%);
  padding: 16px 18px 8px;
  border-radius: 16px;
  background: #fff; color: var(--ink);
  box-shadow: 0 34px 60px -34px rgba(8, 40, 36, .75);
}
.record__head {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 12px; margin-bottom: 4px;
  border-bottom: 1px solid #E4EAE5;
}
.record__title { font-size: 18px; font-weight: 650; font-stretch: 106%; line-height: 1.2; }
.record__next { font-size: 13px; color: #56645E; }
.record__icon {
  display: grid; place-items: center; flex: none;
  width: 30px; height: 30px; border-radius: 8px;
  background: #E5F5F2; color: #0E6F69;
}
.record__rows { list-style: none; margin: 0; padding: 0; }
.record__rows li {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: clamp(2px, .55svh, 6px) 0;
  font-size: 14px; line-height: 1.3;
  border-bottom: 1px solid #EFF3EF;
}
.record__rows li:last-child { border-bottom: 0; }
.record__rows li > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record__rows time { font-size: 12.5px; color: #67746E; font-variant-numeric: tabular-nums; }

.js .stage--lasarra .record { opacity: 0; transition: opacity .45s ease; }
.js .stage--lasarra .record__rows li { opacity: 0; transform: translateX(-8px); transition: opacity .3s ease, transform .5s var(--ease); }
.js .stage--lasarra.is-on .record { opacity: 1; }
.js .stage--lasarra .record__rows li.is-in { opacity: 1; transform: none; }
.js .stage--lasarra .chip.is-gone { opacity: 0; }
.js .stage.is-final .record { opacity: 1; transition: none; }
.js .stage.is-final .record__rows li { opacity: 1; transform: none; transition: none; }
.js .stage.is-final .chip { opacity: 0; transition: none; }

/* Without JavaScript, each demo shows its finished state. */
html:not(.js) .chips { display: none; }
html:not(.js) .phone__track { transform: translateX(-50%); }

/* Togo: messy notes become a short plan */
.stage--plan { display: flex; align-items: center; justify-content: center; }
.phone {
  height: min(100%, 600px);
  aspect-ratio: 9 / 19;
  padding: 9px;
  border-radius: 46px;
  background: #15110E;
  box-shadow: 0 40px 70px -40px rgba(60, 20, 0, .8), inset 0 0 0 1.5px #3A322C;
}
.phone__screen {
  height: 100%;
  overflow: hidden;
  border-radius: 38px;
  background: #fff;
  color: #1C1C1E;
  font-family: var(--ui);
  font-size: clamp(12px, 1.85svh, 15px);
}
.phone__track {
  display: flex; width: 200%; height: 100%;
  transition: transform .75s var(--ease);
}
.notes, .brief { width: 50%; height: 100%; padding: 3.4em 1.25em 1.2em; }
.notes__bar {
  display: flex; gap: .9em;
  margin-bottom: 1.1em; padding: .55em .9em; border-radius: .9em;
  background: #F2F2F4;
  font-size: .86em; font-weight: 600;
}
.notes__bar span:last-child { color: #C2410C; }
.notes__day { font-size: .8em; color: #8E8E93; margin-bottom: .6em; }
.notes__lines { list-style: none; margin: 0; padding: 0; }
.notes__lines li { padding: .32em 0; line-height: 1.3; white-space: nowrap; }
.brief__title { font-size: 1.7em; font-weight: 700; letter-spacing: -.01em; margin-bottom: .7em; }
.brief__group { font-size: .86em; font-weight: 600; color: #6B6B70; margin: .9em 0 .4em; }
.brief__list { list-style: none; margin: 0; padding: 0; }
.brief__list li {
  display: grid; gap: .1em;
  padding: .55em .8em; margin-bottom: .45em; border-radius: .8em;
  background: #F6F6F8;
}
.brief__task { font-weight: 600; line-height: 1.25; }
.brief__why { font-size: .82em; color: #6B6B70; }
.brief__list--late .brief__why { color: #C2410C; }

.js .stage--plan .notes__bar { opacity: 0; transform: translateY(-6px); transition: opacity .35s, transform .45s var(--ease); }
.js .stage--plan .notes__lines li { clip-path: inset(0 100% 0 0); transition: clip-path .42s steps(14, end); }
.js .stage--plan .brief__list li { opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .5s var(--ease); }
.js .stage--plan.is-summary .notes__bar { opacity: 1; transform: none; }
.js .stage--plan .notes__lines li.is-in { clip-path: inset(0 0 0 0); }
.js .stage--plan.is-brief .phone__track { transform: translateX(-50%); }
.js .stage--plan .brief__list li.is-in { opacity: 1; transform: none; }
.js .stage--plan.is-final .notes__bar,
.js .stage--plan.is-final .brief__list li { opacity: 1; transform: none; transition: none; }
.js .stage--plan.is-final .notes__lines li { clip-path: none; transition: none; }
.js .stage--plan.is-final .phone__track { transform: translateX(-50%); transition: none; }

/* CourtCheck: every court, one page */
.stage--court {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(14px, 2vw, 26px); align-items: center;
}
.districts { display: grid; gap: clamp(8px, 1.4svh, 14px); }
.district > p { font-size: 13px; font-weight: 650; margin-bottom: 6px; }
.district ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(30px, 1fr)); gap: 5px;
}
.district li {
  position: relative;
  height: clamp(26px, 4.2svh, 38px);
  display: flex; align-items: flex-end;
  padding: 3px 4px;
  border-radius: 4px;
  background-color: #fff;
  background-image: repeating-linear-gradient(to bottom, #E6E8DF 0 1.5px, transparent 1.5px 5px);
  background-size: 66% 42%;
  background-position: 50% 26%;
  background-repeat: no-repeat;
  color: #5B6560;
  font-size: 10.5px; font-weight: 650; line-height: 1;
  transition: background-color .5s ease, color .5s ease, transform .5s var(--ease);
}
.district li.is-hit { background-color: var(--ink); color: var(--yellow); transform: translateY(-3px); transition-duration: .12s; }
.district li.has-new::after {
  content: ""; position: absolute; right: 4px; top: 4px;
  width: 7px; height: 7px; border-radius: 50%; background: #D9480F;
}
.feed { align-self: stretch; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.feed__clock {
  font-size: clamp(38px, 4.4vw, 60px); line-height: 1;
  font-weight: 700; font-stretch: 112%; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.feed__clock [data-ampm] { font-size: .42em; letter-spacing: 0; }
.feed__label { font-size: 13px; font-weight: 600; margin: 10px 0 10px; }
.feed__rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.feed__rows li {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px;
  padding: 9px 12px; border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 20px -16px rgba(70, 50, 0, .8);
  font-size: 13px; line-height: 1.3;
  animation: feed-in .5s var(--ease);
}
.feed__rows time { font-weight: 700; font-variant-numeric: tabular-nums; }
.feed__court { font-weight: 600; }
.feed__case { grid-column: 1 / -1; color: #4F5954; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes feed-in { from { opacity: 0; transform: translateY(-10px); } }
.stage.is-final .feed__rows li { animation: none; }

/* ClerkCheck: passage in, citation out */
.stage--clerk { isolation: isolate; }
.opinion {
  position: absolute; left: 0; top: 2%;
  width: 70%; height: 80%;
  overflow: hidden;
  padding: clamp(18px, 2.6svh, 28px) clamp(20px, 2.4vw, 34px);
  border-radius: 3px;
  background: #fff; color: #1C1C1C;
  font-family: var(--doc);
  font-size: clamp(12.5px, 1.6svh, 15.5px);
  line-height: 1.5;
  text-align: justify; hyphens: auto;
  transform: rotate(-1.4deg);
  box-shadow: 0 30px 50px -34px rgba(90, 10, 40, .7);
}
.opinion::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30%;
  background: linear-gradient(transparent, #fff);
}
.opinion__run { display: flex; justify-content: space-between; font-size: .78em; letter-spacing: .05em; }
.opinion__sub { text-align: center; font-size: .8em; font-style: italic; margin: 2px 0 1.1em; }
.opinion p + p { text-indent: 1.6em; margin-top: .5em; }
.opinion p:nth-of-type(3) { text-indent: 1.6em; }
.opinion mark {
  color: inherit;
  background-image: linear-gradient(transparent 10%, #F48FB8 10%, #F48FB8 90%, transparent 90%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  background-color: transparent;
  transition: background-size 1s cubic-bezier(.6, .1, .3, 1);
}
.js .stage--clerk .opinion mark { background-size: 0% 100%; }
.js .stage--clerk.is-marked .opinion mark,
.js .stage--clerk.is-final .opinion mark { background-size: 100% 100%; }
.cite {
  position: absolute; right: 0; bottom: 0; z-index: 1;
  width: min(66%, 440px);
  padding: 18px 22px 20px;
  border-radius: 14px;
  background: var(--ink); color: var(--paper);
  box-shadow: 0 30px 50px -28px rgba(60, 0, 25, .8);
}
.cite__when { font-family: var(--sans); font-size: 12.5px; color: #9FB3AA; }
.cite__full {
  font-family: var(--doc);
  font-size: clamp(17px, 2.2svh, 22px); line-height: 1.3;
  margin: 3px 0 14px;
}
.cite__more {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 5px 16px;
  padding-top: 12px; border-top: 1px solid rgba(243, 245, 238, .14);
}
.cite__more p:not(.cite__when) { font-family: var(--doc); font-size: 17px; }
.tok--pin { border-radius: 3px; padding: 0 2px; margin: 0 -2px; }
.js .stage--clerk .tok { opacity: 0; transition: opacity .25s ease; }
.js .stage--clerk .tok.is-in { opacity: 1; }
.js .stage--clerk .tok--pin.is-in { animation: pin 1.4s ease; }
.js .stage--clerk .cite__more { opacity: 0; transform: translateY(6px); transition: opacity .5s ease, transform .6s var(--ease); }
.js .stage--clerk.is-more .cite__more { opacity: 1; transform: none; }
.js .stage--clerk.is-final .tok,
.js .stage--clerk.is-final .cite__more { opacity: 1; transform: none; transition: none; animation: none; }
@keyframes pin { 0%, 40% { background: var(--pink); color: var(--ink); } 100% { background: transparent; } }

/* Side projects page: a shorter hero */
.hero--short { min-height: calc(78svh - var(--header-h)); }
.hero--short .stack { height: min(60svh, 560px); }
.closing--solo { grid-template-columns: minmax(0, 1fr); }

/* Client app: a firm-approved guide, and the client's assistant quoting it */
.stage--client { isolation: isolate; }
.guide {
  position: absolute; left: 0; top: 3%;
  width: 62%; height: 84%;
  overflow: hidden;
  padding: clamp(18px, 2.8svh, 32px) clamp(20px, 2.4vw, 36px);
  border-radius: 3px;
  background: #fff; color: #1C1C1C;
  font-family: var(--doc);
  font-size: clamp(13px, 1.7svh, 16.5px);
  line-height: 1.5;
  transform: rotate(-1.4deg);
  box-shadow: 0 30px 50px -34px rgba(90, 70, 0, .7);
}
.guide__from { font-family: var(--sans); font-size: .74em; color: #6B6B70; margin-bottom: .4em; }
.guide__title { font-size: 1.55em; font-weight: 700; line-height: 1.12; margin-bottom: .5em; }
.guide__sec { font-weight: 700; margin: .85em 0 .15em; }
.guide mark {
  color: inherit;
  background-color: transparent;
  background-image: linear-gradient(transparent 10%, #FFC93C 10%, #FFC93C 90%, transparent 90%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  transition: background-size 1s cubic-bezier(.6, .1, .3, 1);
}
.phone--client { position: absolute; right: 1%; bottom: 0; height: 96%; }
.chat { height: 100%; display: flex; flex-direction: column; gap: .55em; padding: 3.2em 1em 1em; }
.chat__head { font-weight: 700; font-size: 1.15em; margin-bottom: .35em; }
.bubble { max-width: 88%; padding: .6em .85em; border-radius: 1.1em; line-height: 1.3; }
.bubble--me { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: .35em; }
.bubble--ai { align-self: flex-start; background: #F1F1F4; color: #1C1C1E; border-bottom-left-radius: .35em; }
.bubble__src { display: block; margin-top: .5em; padding-top: .45em; border-top: 1px solid #E2E2E8; font-size: .78em; color: #5F5F66; }
.js .stage--client .guide mark { background-size: 0% 100%; }
.js .stage--client.is-marked .guide mark { background-size: 100% 100%; }
.js .stage--client .bubble { opacity: 0; transform: translateY(8px); transition: opacity .35s ease, transform .5s var(--ease); }
.js .stage--client .bubble.is-in { opacity: 1; transform: none; }
.js .stage--client .bubble__src { opacity: 0; transition: opacity .45s ease; }
.js .stage--client .bubble__src.is-in { opacity: 1; }
.js .stage--client.is-final .guide mark { background-size: 100% 100%; transition: none; }
.js .stage--client.is-final .bubble,
.js .stage--client.is-final .bubble__src { opacity: 1; transform: none; transition: none; }

/* Switching: everything is copied over and checked */
.stage--switch .district li { padding: 0; transition: background-color .3s ease, box-shadow .3s ease, transform .4s var(--ease); }
.js .stage--switch .district li:not(.is-moved) {
  background-color: rgba(255, 255, 255, .26);
  background-image: none;
  box-shadow: inset 0 0 0 1.5px rgba(18, 32, 27, .2);
  transform: translateY(2px);
}
.stage--switch .feed__rows li { grid-template-columns: minmax(0, 1fr); }
.feed__rows li.is-done { background: var(--ink); color: var(--paper); }
.feed__rows li.is-done .feed__case { color: #A6BBB1; }

/* ---------- About ---------- */
.about, .closing {
  max-width: 1320px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.about { padding-top: clamp(96px, 13vw, 180px); }
h2[tabindex="-1"]:focus { outline: none; }
.about h2, .closing h2 {
  font-size: clamp(36px, 4.8vw, 76px);
  line-height: .98;
  font-stretch: 116%;
  letter-spacing: -.026em;
  max-width: 13ch;
}
.principles {
  list-style: none; margin: clamp(40px, 5vw, 64px) 0 0; padding: 28px 0 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px;
  border-top: 1px solid var(--rule);
}
.principle { font-size: clamp(19px, 1.6vw, 23px); font-weight: 600; font-stretch: 106%; line-height: 1.25; margin-bottom: 8px; }
.principles li > p:not(.principle) { color: var(--muted); }
.since { margin-top: clamp(40px, 5vw, 64px); color: var(--muted); max-width: 46ch; }

.closing {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: center; gap: 32px;
  padding-top: clamp(96px, 12vw, 170px); padding-bottom: clamp(80px, 10vw, 140px);
}
.stack--mini { height: 360px; min-height: 0; }
.closing p { color: var(--muted); font-size: clamp(18px, 1.5vw, 21px); max-width: 34ch; margin: 22px 0 34px; }

/* ---------- Footer ---------- */
.foot {
  display: grid; grid-template-columns: 1.4fr 2fr 1fr; gap: 20px 32px; align-items: start;
  padding: 30px var(--gutter) 40px;
  border-top: 1px solid var(--rule);
  color: var(--muted); font-size: 15px;
}
.foot__brand { display: flex; align-items: center; gap: 11px; color: var(--paper); font-weight: 650; font-stretch: 112%; }
.foot__links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 26px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 4px; }
.foot__contact { justify-self: end; }
.foot__fine { grid-column: 1 / -1; font-size: 13px; }

/* ---------- Smaller screens ---------- */
@media (max-width: 980px) {
  .top__nav a:first-child { display: none; }
  .brand { font-size: 15px; }
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: 12px; }
  .hero__copy { padding-block: 28px 8px; }
  .stack { height: 420px; min-height: 0; }
  .divider { position: relative; top: auto; margin-top: calc(var(--tab-h) + 22px); }
  .divider:first-child { margin-top: 0; }
  .sheet { grid-template-columns: minmax(0, 1fr); min-height: 0; border-radius: 14px; }
  .divider[style*="--i: 0"] .sheet { border-top-left-radius: 0; }
  .stage { height: 440px; }
  .principles { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .closing { grid-template-columns: minmax(0, 1fr); }
  .stack--mini { height: 280px; }
  .foot { grid-template-columns: minmax(0, 1fr); }
  .foot__contact { justify-self: start; }
}
@media (max-width: 560px) {
  :root { --tab-h: 40px; }
  .top__nav .btn--small { display: none; }
  .top__nav a { padding: 8px 6px; }
  .stage.stage--client { height: 560px; }
  .stage--client .guide { width: 86%; height: 44%; top: 0; }
  .phone--client { height: 72%; right: 0; }
  .phone--client .phone__screen { font-size: 12px; }
  .tab { left: calc(var(--i) * 23%); width: auto; min-width: calc(23% - 4px); padding: 0 12px; font-size: 13px; border-radius: 10px 10px 0 0; }
  .stage { height: 400px; }
  .stage--court { grid-template-columns: minmax(0, 1fr); height: auto; }
  .stage--court .feed__rows li:nth-child(n + 3) { display: none; }
  .stage--clerk { height: 430px; }
  .opinion { width: 92%; height: 66%; }
  .cite { width: 86%; }
  .chip { font-size: 13px; padding: 7px 12px 7px 8px; }
  .chip svg { width: 18px; height: 18px; }
  .record__rows li { font-size: 13px; }
  .cite { padding: 14px 16px 16px; }
  .cite__full { font-size: 17px; }
  .cite__more p:not(.cite__when) { font-size: 15px; }
}
@media (max-height: 640px) and (min-width: 981px) {
  .divider { position: relative; top: auto; margin-top: calc(var(--tab-h) + 22px); }
  .divider:first-child { margin-top: 0; }
  .sheet { min-height: 0; border-radius: 14px; }
  .stage { height: 460px; }
}

.still *, .still *::before, .still *::after { transition: none !important; animation: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}
