/* Whereas - HTML template for law firms. Every colour, font and size the buyer may change is a token in :root. */
:root {
  --paper: #f6f5f1;          /* page (paper 1: white with blue ink; paper 2 below: cream with green ink) */
  --text: #121212;           /* text, buttons, redaction bars */
  --muted: #6b6b66;          /* captions, notes */
  --line: #d9d7cf;           /* rules between articles */
  --ink: #1f3fbf;            /* the only colour: blue ballpoint (underlines, initials, signature, links on hover) */
  --dark-bg: #121212;        /* the one dark article */
  --dark-text: #ecebe6;
  --dark-line: #34342f;
  --ink-on-dark: #7d93ff;

  --f-head: "Libre Caslon Text", Georgia, serif;
  --f-text: "Inter Tight", Arial, sans-serif;
  --f-mono: "Red Hat Mono", "Courier New", monospace;
  --f-sign: "Mrs Saint Delafield", cursive;

  --gut: 40px;               /* page side gutter */
  --m: 150px;                /* left margin: clause numbers, initials */
  --n: 260px;                /* right margin: footnotes */
  --g: 40px;                 /* gap between the three columns */
  --header: 72px;
  --radius: 0;
  --ease: cubic-bezier(.7, 0, .2, 1);
}

/* paper 2: a section with data-paper="cream" switches the whole page to it while it is on screen (main.js) */
:root[data-paper="cream"] { --paper: #f1eee4; --text: #17201b; --muted: #66695f; --line: #d6d1c2; --ink: #1d5c45; }
@property --paper { syntax: "<color>"; inherits: true; initial-value: #f6f5f1; }
@property --text { syntax: "<color>"; inherits: true; initial-value: #121212; }
@property --muted { syntax: "<color>"; inherits: true; initial-value: #6b6b66; }
@property --line { syntax: "<color>"; inherits: true; initial-value: #d9d7cf; }
@property --ink { syntax: "<color>"; inherits: true; initial-value: #1f3fbf; }
:root { transition: --paper .9s ease, --text .9s ease, --muted .9s ease, --line .9s ease, --ink .9s ease; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font-family: var(--f-text); font-size: 17px; line-height: 1.6;
  counter-reset: art;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p, h1, h2, h3, ol, ul, figure, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.mono { font-family: var(--f-mono); font-size: 12.5px; line-height: 1.5; letter-spacing: .01em; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--text); color: var(--paper); padding: 8px 14px; }
.skip:focus { left: 8px; }

/* ---------- buttons and links ---------- */
.btn {
  display: inline-block; padding: 15px 24px; border-radius: var(--radius);
  background: var(--text); color: var(--paper); text-decoration: none; font-size: 17px; line-height: 1.2;
  transition: background-color .25s;
}
.btn:hover { background: var(--ink); }
.btn-small { padding: 10px 16px; font-size: 15px; }
.link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; transition: color .2s; }
.link:hover { color: var(--ink); }

/* ---------- header and menu ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header);
  display: flex; align-items: center; gap: 32px; padding-inline: var(--gut);
  background: var(--paper); border-bottom: 1px solid transparent; transition: border-color .3s;
}
.header.scrolled { border-color: var(--line); }
.logo { font-family: var(--f-head); font-size: 23px; text-decoration: none; letter-spacing: -.01em; margin-right: auto; }
.nav { display: flex; gap: 28px; font-size: 16px; }
.nav a { text-decoration: none; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); }
.menu-btn { display: none; background: none; border: 1px solid var(--text); color: inherit; padding: 8px 14px; cursor: pointer; border-radius: var(--radius); }
.menu {
  position: fixed; inset: var(--header) 0 0; z-index: 49; background: var(--paper);
  padding: 32px var(--gut); display: flex; flex-direction: column; justify-content: space-between; overflow: auto;
}
.menu[hidden] { display: none; }
.menu nav { display: flex; flex-direction: column; }
.menu nav a { display: flex; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-family: var(--f-head); font-size: 34px; line-height: 1.1; text-decoration: none; }
.menu nav a .mono { color: var(--muted); }
.menu-foot { display: flex; flex-direction: column; gap: 4px; padding-top: 24px; }

/* ---------- the document grid: left margin | body | right margin ---------- */
.doc { max-width: 1440px; margin-inline: auto; padding-inline: var(--gut); }
.row { display: grid; grid-template-columns: var(--m) minmax(0, 1fr) var(--n); column-gap: var(--g); }
.row > .m, .row::before { grid-column: 1; grid-row: 1; }
.row > .b { grid-column: 2; grid-row: 1; max-width: 760px; }
.row > .b-wide { grid-column: 2 / -1; grid-row: 1; }
.row > .n { grid-column: 3; grid-row: 1; }
.row + .row { margin-top: 32px; }

/* articles and clauses are numbered by CSS: add or remove one and the page renumbers itself */
.art { counter-increment: art; counter-reset: cl; padding-top: 120px; }
.art-head { margin-bottom: 40px; }
.art-head::before { content: "Article " counter(art, decimal-leading-zero); font-family: var(--f-mono); font-size: 13px; padding-top: .9em; }
.cl { counter-increment: cl; }
.cl::before { content: counter(art) "." counter(cl); font-family: var(--f-mono); font-size: 13px; color: var(--muted); padding-top: .45em; }
.art h2, .exec-title { font-family: var(--f-head); font-weight: 400; font-size: clamp(34px, 4vw, 62px); line-height: 1.1; letter-spacing: -.015em; }
.lede { font-size: clamp(19px, 1.5vw, 22px); line-height: 1.5; }
.art-end { margin-top: 72px; border-top: 1px solid var(--line); min-height: 72px; }
.paraf { grid-column: 1; font-family: var(--f-sign); font-size: 46px; line-height: 1; color: var(--ink); padding-top: 10px; }

/* footnotes: the marker sits in the text, the note stands in the right margin at the height of its paragraph */
.fn { font-size: .55em; line-height: 0; margin-left: .15em; }
.fn a { font-family: var(--f-mono); color: var(--ink); text-decoration: none; }
.note { font-size: 15px; line-height: 1.5; color: var(--muted); padding-top: .4em; }
.note .mono { color: var(--ink); margin-right: 4px; }
.note:target { color: var(--text); }

/* ---------- hero: the cover page of the agreement ---------- */
.hero {
  display: grid; grid-template-columns: var(--m) minmax(0, 1.4fr) minmax(0, .8fr); column-gap: var(--g);
  padding-top: calc(var(--header) + 72px); align-items: start;
}
.hero-margin { display: flex; flex-direction: column; gap: 4px; padding-top: 6px; }
.kicker { margin-bottom: 28px; }
.hero-title { font-family: var(--f-head); font-weight: 400; font-size: clamp(40px, 5.4vw, 88px); line-height: 1.06; letter-spacing: -.02em; }
/* the hero title is an amended clause: the old words stay, struck through in ink and initialled, the new words follow */
.hero-title del, .hero-title ins { position: relative; display: inline-block; text-decoration: none; }
.hero-title del { color: var(--muted); }
.motion .hero-title del { color: inherit; transition: color .6s .35s; }
.motion .hero-title del.on { color: var(--muted); }
.strike-line { position: absolute; left: -3%; width: 106%; top: 52%; height: 14px; margin-top: -7px; overflow: visible; pointer-events: none; }
.strike-line path { fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; }
.amend { position: absolute; left: calc(100% + .14em); top: -.02em; font-family: var(--f-sign); font-size: .56em; line-height: 1; color: var(--ink); letter-spacing: 0; }
.motion .strike-line path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.motion del.on .strike-line path { stroke-dashoffset: 0; transition: stroke-dashoffset .55s cubic-bezier(.6, 0, .3, 1); }
.motion .amend { clip-path: inset(-30% 100% -30% 0); }
.motion del.on .amend { clip-path: inset(-30% -10% -30% 0); transition: clip-path .45s .6s cubic-bezier(.4, 0, .3, 1); }
.recitals { margin-top: 48px; max-width: 620px; display: grid; gap: 14px; font-family: var(--f-head); font-size: 19px; line-height: 1.5; }
.recitals .lead { text-transform: uppercase; letter-spacing: .08em; font-size: .8em; font-weight: 700; }
.hero-actions { margin-top: 44px; display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }
.hero-fig { margin-top: 8px; }
.hero-fig img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
figcaption { margin-top: 10px; color: var(--muted); }

/* photos are black and white everywhere, so the blue ink stays the only colour and any photo the buyer adds fits */
.print img { filter: grayscale(1) contrast(1.06); }
/* maps: same frame and size as the photos, black and white, printed onto the paper colour */
.office-map { margin-top: 20px; }
.office-map iframe { display: block; width: 100%; aspect-ratio: 16 / 10; border: 0; filter: grayscale(1) contrast(1.08); mix-blend-mode: multiply; }

/* ---------- table of contents (practice areas) ---------- */
.toc { max-width: none; border-top: 1px solid var(--text); }
.toc a {
  display: grid; grid-template-columns: 48px auto minmax(24px, 1fr) auto; column-gap: 16px; row-gap: 6px; align-items: baseline;
  padding: 22px 0; border-bottom: 1px solid var(--line); text-decoration: none;
}
.toc-title { font-family: var(--f-head); font-size: clamp(22px, 2vw, 31px); line-height: 1.2; transition: color .2s; }
.toc-dots { align-self: end; margin-bottom: .5em; height: 2px; background: radial-gradient(circle, currentColor .8px, transparent 1.2px) left / 6px 2px repeat-x; opacity: .6; transform-origin: left; }
.toc-no, .toc-page { color: var(--muted); transition: color .2s; }
.toc-short { grid-column: 2 / -2; color: var(--muted); max-width: 640px; font-size: 16px; }
.toc a:hover .toc-title { color: var(--ink); }
.toc a:hover .toc-no, .toc a:hover .toc-page { color: var(--ink); }

/* ---------- people ---------- */
.people { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 24px; }
.person a { display: flex; flex-direction: column; text-decoration: none; }
.person figure { position: relative; }
.person img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.person-ink {
  position: absolute; right: 12px; bottom: -14px; font-family: var(--f-sign); font-size: 64px; line-height: 1; color: var(--ink);
  clip-path: inset(0 100% 0 0); transition: clip-path .6s var(--ease); pointer-events: none;
}
.person a:hover .person-ink { clip-path: inset(0 0 0 0); }
.person-name { margin-top: 14px; font-family: var(--f-head); font-size: 22px; line-height: 1.25; }
.person-meta { color: var(--muted); }

/* ---------- the one dark article: figures ---------- */
.dark {
  --line: var(--dark-line); --muted: #9a9a93; --ink: var(--ink-on-dark); --cover: var(--dark-bg);
  background: var(--dark-bg); color: var(--dark-text); margin-top: 120px; padding-bottom: 1px;
  box-shadow: 0 0 0 100vmax var(--dark-bg); clip-path: inset(0 -100vmax); overflow-x: clip;
}
.dark .link:hover { color: var(--ink); }
.figure-row { padding: 28px 0; border-top: 1px solid var(--line); margin-top: 0 !important; }
.figure-row:last-of-type { border-bottom: 1px solid var(--line); }
.figure { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: baseline; max-width: none !important; }
.figure-value { display: inline-block; font-family: var(--f-head); font-size: clamp(52px, 6.4vw, 106px); line-height: 1; letter-spacing: -.02em; transform-origin: 30% 60%; }
.figure-label { font-size: 19px; }
.dark .figure-row + .row { margin-top: 40px; }

/* ---------- statement ---------- */
.statement blockquote { font-family: var(--f-head); font-style: italic; font-size: clamp(24px, 2.4vw, 36px); line-height: 1.38; }
.statement blockquote p { text-indent: -.42em; }
.statement blockquote p::before { content: "\201C"; }
.statement blockquote p::after { content: "\201D"; }
.statement figcaption { margin-top: 24px; color: var(--muted); }
.statement-fig img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

/* ---------- insights ---------- */
.notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 24px; }
.notes a { display: flex; flex-direction: column; gap: 10px; text-decoration: none; }
.notes img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.notes-meta { color: var(--muted); margin-top: 6px; }
.notes-title { font-family: var(--f-head); font-size: 22px; line-height: 1.3; transition: color .2s; }
.notes a:hover .notes-title { color: var(--ink); }

/* ---------- execution: the signature block that closes the page ---------- */
.execution { padding-top: 140px; padding-bottom: 120px; }
.exec-label { padding-top: .9em; }
.execution .lede { margin-top: 28px; max-width: 620px; }
.execution .btn { margin-top: 36px; }
.signatures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; margin-top: 56px; }
.sig { display: flex; flex-direction: column; text-decoration: none; }
.sig-for { color: var(--muted); }
.sig-line { position: relative; height: 112px; border-bottom: 1px solid var(--text); display: flex; align-items: flex-end; }
.signature { font-family: var(--f-sign); font-size: clamp(64px, 7vw, 104px); line-height: 1; color: var(--ink); white-space: nowrap; padding: 0 .1em .02em 0; transform: translateY(.18em); }
.sig-name { margin-top: 12px; font-size: 18px; }
.sig-date { color: var(--muted); }
.sig-here { color: var(--muted); font-style: italic; padding-bottom: 10px; transition: color .2s; }
.sig-you:hover .sig-here, .sig-you:hover .sig-name { color: var(--ink); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--text); padding: 56px 0 40px; font-size: 16px; }
.wrap { max-width: 1440px; margin-inline: auto; padding-inline: var(--gut); }
.footer-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-name { font-family: var(--f-head); font-size: 24px; line-height: 1.2; }
.footer .label { color: var(--muted); margin-bottom: 6px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ink); }
.footer-small { display: flex; justify-content: space-between; gap: 32px; margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); }
.footer-small p { max-width: 640px; }

.to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 40; width: 46px; height: 46px; display: grid; place-items: center;
  background: var(--paper); color: var(--text); border: 1px solid var(--text); border-radius: var(--radius);
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s, background-color .2s, color .2s;
}
.to-top.show { opacity: 1; visibility: visible; }
.to-top:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ---------- motion (only with .motion: off for reduced motion and without JS) ---------- */
/* headings: a redaction bar in the text colour covers each line, then slides off to the right */
.motion [data-redact] .bar {
  background: linear-gradient(currentColor, currentColor) no-repeat right / 100% 100%;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.motion [data-redact].on .bar { background-size: 0% 100%; transition: background-size .9s var(--ease); }
/* text is written line by line: a cover in the paper colour slides off each line to the right, its left edge is the pen */
[data-write] { position: relative; }
.motion [data-write]:not(.ready) { visibility: hidden; }
.pen { position: absolute; z-index: 1; background: var(--cover, var(--paper)); transform-origin: right; pointer-events: none; }
.pen::before { content: ""; position: absolute; left: 0; top: 10%; bottom: 10%; width: 2px; background: var(--ink); opacity: 0; }
.pen.go::before { opacity: 1; transition: opacity 0s var(--pen-d, 0s); }
.pen.go { transform: scaleX(0); transition: transform var(--pen-t, .6s) cubic-bezier(.5, .1, .3, 1) var(--pen-d, 0s); }
/* buttons, links and small labels only come up a little */
.motion .rise { opacity: 0; transform: translateY(10px); }
.motion .rise.on { opacity: 1; transform: none; transition: opacity .6s, transform .6s var(--ease); }
/* figures land like a rubber stamp: large and blurred above the paper, then pressed down hard */
.motion .figure-value { opacity: 0; transform: scale(1.7) rotate(-4deg); filter: blur(6px); }
.motion .figure.on .figure-value { opacity: 1; transform: none; filter: none;
  transition: opacity .25s, filter .35s, transform .45s cubic-bezier(.3, 1.5, .5, 1); }
/* contents: the dotted leader runs out to the page number */
.motion .toc-dots { transform: scaleX(0); }
.motion .toc-page { opacity: 0; }
.motion .toc li.on .toc-dots { transform: none; transition: transform .9s cubic-bezier(.5, 0, .2, 1) .25s; }
.motion .toc li.on .toc-page { opacity: 1; transition: opacity .3s 1.05s; }
/* photos come out of a line: the left edge of the frame is drawn top to bottom, then the photo opens from it to the right */
.print { position: relative; }
.motion .print::before {
  content: ""; position: absolute; z-index: 1; left: 0; top: 0; bottom: 0; width: 1px; background: var(--text);
  transform: scaleY(0); transform-origin: top; pointer-events: none;
}
.motion .print.on::before { transform: scaleY(1); opacity: 0; transition: transform .5s cubic-bezier(.6, 0, .3, 1), opacity .4s 1.5s; }
.motion .print :is(img, iframe) { clip-path: inset(0 100% 0 0); }
.motion .print.on :is(img, iframe) { clip-path: inset(0 0 0 0); transition: clip-path 1s cubic-bezier(.7, 0, .2, 1) .45s; }
.dark .print::before { background: var(--dark-text); }
.print:has(> figcaption)::before { bottom: 29px; }   /* the line stops where the photo ends, not under its caption */
/* blue ink: underline drawn by hand, initials and signature written from left to right */
[data-ink] { position: relative; display: inline-block; }
.ink-line { position: absolute; left: -2%; width: 104%; bottom: -.1em; height: 10px; overflow: visible; pointer-events: none; }
.ink-line path { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; }
.motion .ink-line path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.motion .ink-line.on path { stroke-dashoffset: 0; transition: stroke-dashoffset 1s .2s cubic-bezier(.5, 0, .2, 1); }
.motion .paraf, .motion .signature { clip-path: inset(0 100% 0 0); }
.motion .paraf.on { clip-path: inset(-20% -10% -20% 0); transition: clip-path .8s cubic-bezier(.4, 0, .3, 1); }
.motion .signature.on { clip-path: inset(-20% -10% -40% 0); transition: clip-path 2s cubic-bezier(.45, .05, .35, 1); }

/* ---------- tablet: footnotes drop under their paragraph ---------- */
@media (max-width: 1100px) {
  :root { --m: 96px; --g: 28px; }
  .row { grid-template-columns: var(--m) minmax(0, 1fr); }
  .row > .n { grid-column: 2; grid-row: auto; margin-top: 16px; max-width: 520px; }
  .hero { grid-template-columns: var(--m) minmax(0, 1fr) minmax(0, .7fr); }
  .people { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .nav, .header-cta { display: none; }
  .menu-btn { display: inline-block; }
  .hero { grid-template-columns: minmax(0, 1fr); row-gap: 32px; padding-top: calc(var(--header) + 40px); }
  .hero-margin { flex-direction: row; gap: 16px; }
  .hero-fig img { aspect-ratio: 4 / 3; }
  .notes { grid-template-columns: minmax(0, 1fr); }
  .notes a { display: grid; grid-template-columns: 38% minmax(0, 1fr); column-gap: 20px; align-content: start; }
  .notes figure { grid-row: span 2; }
  .notes-meta { margin-top: 0; }
}
/* ---------- phone: one column, clause numbers sit above their paragraph ---------- */
@media (max-width: 700px) {
  :root { --gut: 20px; --header: 64px; }
  body { font-size: 18px; }
  .row { grid-template-columns: minmax(0, 1fr); }
  .row > *, .row::before { grid-column: 1 !important; grid-row: auto !important; }
  .row::before { padding: 0 0 6px; }
  .art { padding-top: 88px; }
  .art-head { margin-bottom: 28px; }
  .art-end { margin-top: 48px; min-height: 60px; }
  .recitals { font-size: 18px; margin-top: 36px; }
  .toc a { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .toc-dots { display: none; }
  .toc-short { grid-column: 2 / -1; }
  .figure { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .notes a { grid-template-columns: 40% minmax(0, 1fr); }
  .notes-title { font-size: 20px; }
  .statement-fig img { aspect-ratio: 4 / 3; }
  .signatures { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .people { gap: 32px 16px; }
  .person-name { font-size: 20px; }
  .person-ink { font-size: 48px; }
  .footer-cols { grid-template-columns: minmax(0, 1fr); }
  .footer-small { flex-direction: column; gap: 12px; }
  .to-top { right: 16px; bottom: 16px; }
}

/* ======================================================================
   Inner pages: page head, clauses, register, questions, particulars,
   article, offices, the engagement letter. Same grid, same motion.
   ====================================================================== */
.page-head { padding-bottom: 24px; }
.page-head-plain { grid-template-columns: var(--m) minmax(0, 1fr) minmax(0, .45fr); }
.page-title { font-family: var(--f-head); font-weight: 400; font-size: clamp(38px, 4.6vw, 74px); line-height: 1.08; letter-spacing: -.02em; max-width: 15ch; }
.page-head-plain .page-title { max-width: 18ch; }
.page-lede { margin-top: 36px; max-width: 620px; }
.kicker .link { text-decoration-color: var(--line); }
.byline { margin-top: 28px; color: var(--muted); }
.void .hero-title { max-width: 14ch; }

/* a clause: a short title and its text, numbered in the margin */
.clause + .clause { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line); }
.clause-title { font-family: var(--f-head); font-weight: 400; font-size: clamp(22px, 1.8vw, 28px); line-height: 1.25; margin-bottom: 8px; }

/* register of matters */
.register { border-top: 1px solid var(--text); }
.register-row {
  display: grid; grid-template-columns: 72px minmax(0, 1.6fr) minmax(0, 1fr) 110px; column-gap: 24px; align-items: baseline;
  padding: 20px 0; border-bottom: 1px solid var(--line);
}
.register-row[hidden] { display: none; }
.register-year, .register-value { color: var(--muted); }
.register-value { text-align: right; }
.register-title { font-family: var(--f-head); font-size: 21px; line-height: 1.35; }
.register-area { display: block; margin-top: 4px; font-family: var(--f-mono); font-size: 12.5px; color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  background: transparent; color: inherit; cursor: pointer; transition: border-color .2s, background-color .2s, color .2s;
}
.chip:hover { border-color: var(--text); }
.chip[aria-pressed="true"], .chip:has(input:checked) { background: var(--text); border-color: var(--text); color: var(--paper); }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 3px; }

/* the partner responsible for an area */
.responsible { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 40px; align-items: end; }
.responsible .person { display: block; position: relative; }
.responsible-text .person-name a { text-decoration: none; }
.responsible-text .person-name a:hover { color: var(--ink); }
.responsible-quote { margin: 24px 0 16px; font-family: var(--f-head); font-style: italic; font-size: clamp(22px, 2vw, 30px); line-height: 1.35; max-width: 560px; }

/* questions clients ask */
.qa { border-top: 1px solid var(--text); }
.qa details { border-bottom: 1px solid var(--line); }
.qa summary {
  display: flex; justify-content: space-between; gap: 24px; padding: 20px 0; cursor: pointer; list-style: none;
  font-family: var(--f-head); font-size: clamp(20px, 1.6vw, 24px); line-height: 1.3; transition: color .2s;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; font-family: var(--f-mono); color: var(--ink); transition: transform .3s var(--ease); }
.qa details[open] summary::after { transform: rotate(45deg); }
.qa details p { padding: 0 0 22px; max-width: 620px; color: var(--muted); }
.qa summary:hover { color: var(--ink); }

/* next page */
.next-row { margin-top: 72px !important; }
.next { display: flex; flex-direction: column; gap: 6px; padding: 28px 0; border-top: 1px solid var(--text); border-bottom: 1px solid var(--text); text-decoration: none; }
.next .mono { color: var(--muted); }
.next-title { font-family: var(--f-head); font-size: clamp(28px, 3vw, 46px); line-height: 1.1; transition: color .2s; }
.next-title::after { content: " \2192"; }
.next:hover .next-title { color: var(--ink); }

/* person: particulars as a list of defined terms */
.particulars { border-top: 1px solid var(--text); }
.particulars > div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.particulars dt { color: var(--muted); padding-top: .2em; }
.particulars dd { margin: 0; }
.particulars-line { display: block; }
.person-quote { font-family: var(--f-head); font-style: italic; font-size: clamp(26px, 2.6vw, 40px); line-height: 1.3; }
.person-quote p::before { content: "\201C"; }
.person-quote p::after { content: "\201D"; }
.person-card { display: flex; flex-direction: column; }
.person-head .hero-fig img { aspect-ratio: 4 / 5; }

/* history: the year stands in the margin like a clause number */
.history-row { padding: 22px 0; border-top: 1px solid var(--line); margin-top: 0 !important; }
.history-row:last-of-type { border-bottom: 1px solid var(--line); }
.history-year { font-family: var(--f-head); font-size: clamp(28px, 2.6vw, 40px); line-height: 1; color: var(--ink); }
.history-text { font-family: var(--f-head); font-size: clamp(20px, 1.6vw, 24px); line-height: 1.45; }

/* insights list */
.note-list { border-top: 1px solid var(--text); }
.note-list a {
  display: grid; grid-template-columns: 180px minmax(0, 1fr) minmax(0, 240px); grid-template-rows: auto 1fr; column-gap: 32px; row-gap: 10px;
  padding: 28px 0; border-bottom: 1px solid var(--line); text-decoration: none;
}
.note-list-meta { grid-row: span 2; display: flex; flex-direction: column; gap: 2px; color: var(--muted); }
.note-list-title { font-family: var(--f-head); font-size: clamp(24px, 2.2vw, 34px); line-height: 1.2; transition: color .2s; }
.note-list-lede { color: var(--muted); max-width: 560px; }
.note-list figure { grid-column: 3; grid-row: 1 / span 2; }
.note-list img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.note-list a:hover .note-list-title { color: var(--ink); }

/* article body */
.article-body .row + .row { margin-top: 24px; }
.article-body .row > p.b { font-size: 18px; line-height: 1.7; }
.art .article-h { font-family: var(--f-head); font-weight: 400; font-size: clamp(26px, 2.4vw, 36px); line-height: 1.2; margin-top: 32px; }

/* offices */
.offices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 24px; }
.offices img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; margin-bottom: 14px; }

/* engagement letter: a sentence with blanks to fill in, signed with the name typed */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.letter { --error: #b42318; }
.letter-text { font-family: var(--f-head); font-size: clamp(22px, 2.1vw, 32px); line-height: 1.9; max-width: 1000px; }
.letter-text + .letter-areas, .letter-areas + .letter-text { margin-top: 16px; }
.blank input {
  font: inherit; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--text); border-radius: 0;
  padding: 0 .3em 0 .4em; min-width: 9ch; width: 12ch; field-sizing: content;   /* left room: italic placeholder letters (y, p) lean out to the left */ max-width: 100%; transition: border-color .2s;
}
.blank input::placeholder { color: var(--muted); font-style: normal; opacity: .8; }   /* upright: italic letters leaned out of the field and were cut */
.blank input:focus { outline: none; border-bottom: 2px solid var(--ink); }
.letter-areas { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.letter-brief { display: flex; flex-direction: column; gap: 10px; margin-top: 40px; max-width: 760px; }
.letter-brief .mono { color: var(--muted); }
.letter-brief textarea {
  font: inherit; font-size: 18px; line-height: 32px; color: inherit; resize: vertical; padding: 0; min-height: 160px;
  border: 0; border-radius: 0; background: repeating-linear-gradient(transparent 0 31px, var(--line) 31px 32px) local;
}
.letter-brief textarea:focus { outline: none; background-image: repeating-linear-gradient(transparent 0 31px, var(--ink) 31px 32px); }
.letter-consent { display: flex; gap: 12px; align-items: flex-start; margin-top: 28px; max-width: 760px; font-size: 15px; color: var(--muted); cursor: pointer; }
.letter-consent input { appearance: none; flex: none; width: 18px; height: 18px; margin: 2px 0 0; border: 1px solid var(--text); border-radius: 0; display: grid; place-items: center; background: transparent; }
.letter-consent input:checked::after { content: "\2713"; color: var(--ink); font-size: 15px; line-height: 1; font-family: var(--f-mono); }
.letter-consent input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.letter .invalid input, .letter .invalid textarea { border-color: var(--error); }
.letter .invalid textarea { background-image: repeating-linear-gradient(transparent 0 31px, var(--error) 31px 32px); }
.letter-areas.invalid .chip { border-color: var(--error); }
.letter-sign { margin-top: 56px; }
.letter-send { justify-content: flex-end; gap: 14px; }
.letter-send .btn { align-self: flex-start; cursor: pointer; border: 0; font-family: inherit; }
.letter-status { min-height: 1.5em; }
.letter-status.error { color: var(--error); }
.letter.sent .letter-status { color: var(--ink); }
.signature-live:empty { display: none; }
.signature-live:not(:empty) + .sig-here { display: none; }

@media (max-width: 1100px) {
  .page-head-plain { grid-template-columns: var(--m) minmax(0, 1fr); }
  .note-list a { grid-template-columns: 140px minmax(0, 1fr); }
  .note-list figure { grid-column: 2; grid-row: auto; max-width: 360px; }
}
@media (max-width: 900px) {
  .page-head-plain { grid-template-columns: minmax(0, 1fr); }
  .register-row { grid-template-columns: 56px minmax(0, 1fr) auto; }
  .register-outcome { grid-column: 2; color: var(--muted); }
  .register-value { grid-column: 3; grid-row: 1; }
}
@media (max-width: 700px) {
  .register-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
  .register-year { grid-column: 1; }
  .register-value { grid-column: 2; grid-row: 1; }
  .register-title, .register-outcome { grid-column: 1 / -1; }
  .register-title { font-size: 19px; }
  .responsible { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .responsible .person { max-width: 260px; }
  .particulars > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .note-list a { grid-template-columns: minmax(0, 1fr); }
  .note-list-meta { grid-row: auto; flex-direction: row; flex-wrap: wrap; gap: 12px; }
  .note-list figure { grid-column: 1; max-width: none; }
  .offices { grid-template-columns: minmax(0, 1fr); }
  .letter-text { line-height: 1.8; }
  .blank input { min-width: 7ch; }
}
