/* Layout: a typeset document. One reading column beside a narrow margin column that carries the page's contents list; the same two columns on every page. */
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-latin-opsz-normal.woff2") format("woff2");
  font-weight: 200 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900; font-style: normal; font-display: swap;
}
:root {
  --paper: #ffffff;
  --ground: #f2f4f7;
  --ink: #131922;
  --ink-soft: #515a68;
  --rule: #d8dce3;
  --accent: #1c479c;
  --tile: #ffffff;
  --show-on-light: inline; --show-on-dark: none;
  --display: "Source Serif 4", "Iowan Old Style", "Charter", Cambria, Georgia, serif;
  --body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --measure: 41rem;
  --margin-col: 14rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #10141b; --ground: #171c25; --ink: #e7eaef; --ink-soft: #a3acb9;
    --rule: #2b323e; --accent: #9fbaf0; --tile: #ffffff; --show-on-light: none; --show-on-dark: inline; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #10141b; --ground: #171c25; --ink: #e7eaef; --ink-soft: #a3acb9;
  --rule: #2b323e; --accent: #9fbaf0; --tile: #ffffff; --show-on-light: none; --show-on-dark: inline; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.62 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, address { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--display); font-weight: 600; line-height: 1.18;
  text-wrap: balance; hyphens: auto; overflow-wrap: break-word;
}
p, li, dd { hyphens: auto; overflow-wrap: break-word; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
strong { font-weight: 600; }

.wrap { max-width: 70rem; margin-inline: auto; padding-inline: 1.25rem; }
@media (min-width: 700px) { .wrap { padding-inline: 2.5rem; } }
.skip { position: absolute; left: -999rem; }
.skip:focus { left: 1rem; top: 1rem; background: var(--paper); padding: 0.5rem 0.75rem; z-index: 5; }

/* Header */
.site-head { border-bottom: 1px solid var(--rule); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.6rem 2.5rem; padding-block: 1.35rem; }
.wordmark { font-family: var(--display); font-size: 1.3125rem; font-weight: 600; color: var(--ink); text-decoration: none; letter-spacing: -0.005em; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0.3rem 1.5rem; }
.site-nav a { font-size: 0.9375rem; color: var(--ink-soft); text-decoration: none; padding-block: 0.2rem; display: inline-block; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); box-shadow: 0 2px 0 var(--accent); }
.site-nav .apart { padding-left: 1.5rem; border-left: 1px solid var(--rule); }

/* Shared two-column frame */
.frame { display: grid; gap: 2rem 4rem; }
@media (min-width: 980px) { .frame { grid-template-columns: var(--margin-col) minmax(0, 1fr); } }
.frame > .main { min-width: 0; }

/* Page head */
.page-head { padding-block: clamp(2.75rem, 7vw, 5rem) clamp(2rem, 4vw, 3rem); }
.page-head h1 { font-size: clamp(2.125rem, 5.4vw, 3.5rem); font-weight: 500; letter-spacing: -0.015em; line-height: 1.08; max-width: 18em; }
.page-body { padding-bottom: clamp(3.5rem, 8vw, 6rem); }

/* Contents list in the margin */
.toc { display: none; }
@media (min-width: 980px) {
  .toc { display: block; position: sticky; top: 2rem; align-self: start; font-size: 0.9375rem; line-height: 1.35; padding-top: 0.35rem; }
}
.toc p { color: var(--ink-soft); font-size: 0.875rem; margin-bottom: 0.9rem; }
.toc ul { display: grid; gap: 0.7rem; }
.toc ul ul { margin-top: 0.6rem; padding-left: 0.9rem; border-left: 1px solid var(--rule); gap: 0.5rem; }
.toc a { color: var(--ink); text-decoration: none; }
.toc ul ul a { color: var(--ink-soft); }
.toc a:hover { color: var(--accent); text-decoration: underline; }

/* Running text */
.prose > :where(p, h2, h3, h4, ul, address) { max-width: var(--measure); }
.prose > .wide { max-width: none; }
.prose > * + * { margin-top: 1.05em; }
.prose > .lead { font-size: 1.3125rem; line-height: 1.5; font-family: var(--display); font-weight: 400; }
.prose > .part { font-size: clamp(1.875rem, 4.4vw, 2.625rem); font-weight: 500; letter-spacing: -0.012em; margin-top: 5rem; padding-top: 3rem; border-top: 2px solid var(--ink); }
.prose > .sec { font-size: clamp(1.5rem, 3vw, 1.875rem); margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); scroll-margin-top: 1rem; }
.prose > .sec:first-child, .prose > .lead + .sec.first { margin-top: 0; }
.prose > .sub { font-size: 1.375rem; margin-top: 2.75rem; scroll-margin-top: 1.5rem; }
.prose > .sec + .sub { margin-top: 1.75rem; }
.prose > .kicker { margin-top: 2em; font-weight: 600; }
.prose > .kicker + p { margin-top: 0.3em; }
.prose > .part + .sec { margin-top: 2.5rem; }

.sec.appointed { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; align-items: center; }
.signet { flex: none; width: 3.5rem; height: 3.5rem; padding: 0.4rem; background: var(--tile); border-radius: 50%; box-shadow: 0 0 0 1px var(--rule); display: grid; place-items: center; }
.signet img { width: 100%; height: auto; display: block; }

/* Term and definition rows */
.terms { border-top: 1px solid var(--rule); margin-top: 1.75rem; }
.terms > div { display: grid; gap: 0.25rem 2rem; padding-block: 1.1rem; border-bottom: 1px solid var(--rule); }
@media (min-width: 640px) { .terms > div { grid-template-columns: 11.5rem minmax(0, 1fr); } }
.terms dt { font-family: var(--display); font-weight: 600; font-size: 1.1875rem; line-height: 1.3; }
.terms dt a { color: var(--ink); text-decoration-color: var(--accent); }
.terms dt a:hover { color: var(--accent); }

/* Lists */
.rows { border-top: 1px solid var(--rule); margin-top: 1.5rem; }
.rows li { padding-block: 0.85rem; border-bottom: 1px solid var(--rule); }
.timeline li { display: grid; gap: 0.2rem 2rem; }
@media (min-width: 640px) { .timeline li { grid-template-columns: 13.5rem minmax(0, 1fr); } }
.timeline strong { font-family: var(--display); line-height: 1.3; hyphens: manual; }

/* Home */
.hero { padding-block: clamp(3rem, 9vw, 6.5rem) clamp(2.5rem, 6vw, 4.5rem); }
.hero h1 { font-size: clamp(3rem, 10.5vw, 6.75rem); font-weight: 400; letter-spacing: -0.028em; line-height: 0.96; }
.appointment { margin-top: clamp(1.75rem, 4vw, 2.75rem); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.25rem; align-items: start; max-width: 47rem; }
.appointment .signet { width: 4.5rem; height: 4.5rem; padding: 0.5rem; margin-top: 0.2rem; }
.appointment .tenor { font-family: var(--display); font-size: clamp(1.1875rem, 2.4vw, 1.5rem); line-height: 1.32; font-weight: 500; }
.appointment .tenor strong { font-weight: inherit; }
.appointment .since { margin-top: 0.6rem; color: var(--ink-soft); font-size: 1rem; }

.statement { background: var(--ground); padding-block: clamp(3rem, 8vw, 5.5rem); }
.statement h2 { font-size: clamp(1.875rem, 5.6vw, 3.875rem); font-weight: 500; letter-spacing: -0.018em; line-height: 1.08; }
.statement h2 span { display: block; }
.statement h2 span + span { color: var(--accent); }

.home-section { padding-block: clamp(3rem, 7vw, 5rem); }
.home-section + .home-section { border-top: 1px solid var(--rule); }
.home-section h2 { font-size: clamp(1.75rem, 3.6vw, 2.375rem); font-weight: 500; letter-spacing: -0.01em; }
.margin-note { color: var(--ink-soft); font-size: 0.9375rem; line-height: 1.45; }
.margin-note a { color: var(--ink); }

.actions { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn { display: inline-block; padding: 0.8rem 1.35rem; border: 1px solid var(--accent); border-radius: 2px; font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--paper); }
.btn-primary:hover { filter: brightness(1.12); }
.btn-quiet { color: var(--accent); }
.btn-quiet:hover { background: var(--ground); }

/* Contact */
.address { font-style: normal; margin-top: 2rem; font-family: var(--display); font-size: 1.25rem; line-height: 1.45; }
.address p + p { margin-top: 0.1rem; }
.address .kicker { font-weight: 600; font-size: 1.5rem; margin-bottom: 0.35rem; }
.terms.contact dd { font-family: var(--display); font-size: 1.3125rem; }
.terms.contact dd a { color: var(--ink); }
.terms.contact dd a:hover { color: var(--accent); }

/* Onward link and footer */
.onward { border-top: 1px solid var(--rule); padding-block: 2rem; }
.onward .frame { align-items: baseline; }
.onward span { color: var(--ink-soft); font-size: 0.9375rem; }
.onward a { font-family: var(--display); font-size: clamp(1.375rem, 3vw, 1.75rem); font-weight: 500; color: var(--ink); text-decoration-color: var(--accent); }
.onward a:hover { color: var(--accent); }

.site-foot { background: var(--ground); padding-block: 2.75rem 3.25rem; font-size: 0.9375rem; color: var(--ink-soft); }
.site-foot .frame { gap: 1.5rem 4rem; }
.site-foot .name { font-family: var(--display); font-size: 1.125rem; font-weight: 600; color: var(--ink); }
.site-foot .cols { display: grid; gap: 1.5rem 3rem; }
@media (min-width: 640px) { .site-foot .cols { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.site-foot ul { display: grid; gap: 0.35rem; }
.site-foot a { color: var(--ink-soft); }
.site-foot a:hover { color: var(--ink); }
.site-foot .legal { margin-top: 1.25rem; }

/* Hyphenation: only in running text, and only for long words */
p, li, dd { hyphenate-limit-chars: 12 5 5; }
.tenor, .toc a, .site-foot p, .lead { hyphens: manual; }
@media (min-width: 640px) { h1, h2, h3, h4 { hyphens: manual; } }
@media (max-width: 699px) { .site-nav .apart { padding-left: 0; border-left: 0; } }

/* Portrait and company logo */
.hero-grid { display: grid; gap: 2.5rem 4rem; align-items: end; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr) 17rem; } }
.portrait { display: block; width: 100%; max-width: 17rem; height: auto; border-radius: 2px; }
@media (max-width: 899px) { .portrait { max-width: 12.5rem; } }
.logo { display: inline-block; line-height: 0; margin-top: 0.85rem; }
.logo img { width: 10.5rem; height: auto; }
.logo .on-light { display: var(--show-on-light); }
.logo .on-dark { display: var(--show-on-dark); }
.site-foot .legal a { margin-left: 0.75rem; }

/* ---------- Structured presentation of long text ---------- */
.frame > .main { max-width: 48rem; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Procedures: title beside its text, separated by rules */
.entries { margin-top: 1.5rem; }
.entry { display: grid; gap: 0.75rem 2.5rem; padding-block: 2rem 2.25rem; border-top: 1px solid var(--rule); scroll-margin-top: 1rem; }
@media (min-width: 760px) { .entry { grid-template-columns: 13rem minmax(0, 1fr); } }
.entry > h3 { font-size: 1.5rem; line-height: 1.2; }
.entry.featured { border-top: 2px solid var(--accent); }
.entry.featured > h3 { color: var(--accent); }
.inner > * + * { margin-top: 0.95em; }
.sec.appointed + .entries, .sec + .entries { margin-top: 1.75rem; }

/* Tinted panel: notes, special status, contact card */
.panel { background: var(--ground); padding: clamp(1.5rem, 4vw, 2.25rem) clamp(1.25rem, 4vw, 2.5rem); border-radius: 3px; margin-top: 2.5rem; }
.panel > * + * { margin-top: 0.95em; }
.panel > :where(p, h2) { max-width: 39rem; }
.panel > h2 { font-size: clamp(1.375rem, 2.6vw, 1.625rem); }
.prose > .panel + .sec { margin-top: 3.5rem; }
.panel.card { margin-top: 2rem; }
.panel.card .address { margin-top: 0; }
.panel.card .terms { margin-top: 1.5rem; }

/* Grids */
.grid { display: grid; gap: 0 3rem; margin-top: 2.25rem; }
@media (min-width: 700px) { .grid.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.grid .cell > * + * { margin-top: 0.7em; }
.grid.ruled .cell { border-top: 1px solid var(--rule); padding-block: 1.6rem 2rem; scroll-margin-top: 1rem; }
.grid.ruled .cell h2, .grid.ruled .cell h3 { font-size: 1.4375rem; line-height: 1.22; }
.grid .cell .kicker { font-family: var(--display); font-size: 1.1875rem; line-height: 1.3; font-weight: 600; }
.grid:not(.ruled):not(.tinted) .cell { border-top: 1px solid var(--rule); padding-block: 1.25rem 1.5rem; }
.grid.tinted { gap: 1.25rem; }
.grid.tinted .cell { background: var(--ground); padding: 1.75rem 1.75rem 2rem; border-radius: 3px; }
.grid.tinted .cell h3 { font-size: 1.375rem; }

/* Linked overview cards on the home page */
.cards { margin-top: 2.5rem; }
.card { color: var(--ink); text-decoration: none; display: block; }
.card h3 { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
.card:hover h3 { color: var(--accent); text-decoration-thickness: 2px; }
.card p { color: var(--ink-soft); }
.after-grid { border-top: 1px solid var(--rule); padding-top: 1.6rem; }

/* Steps: a real sequence, so numbered */
.steps { counter-reset: step; margin-top: 2.5rem; }
.steps > li { counter-increment: step; display: grid; gap: 0.6rem 2.5rem; padding-block: 2rem 2.25rem; border-top: 1px solid var(--rule); scroll-margin-top: 1rem; }
@media (min-width: 760px) { .steps > li { grid-template-columns: 13rem minmax(0, 1fr); } }
.steps h2 { font-size: 1.5rem; line-height: 1.2; }
.steps h2::before { content: counter(step); display: block; font-size: 2.75rem; font-weight: 400; line-height: 1; color: var(--accent); margin-bottom: 0.6rem; font-variant-numeric: lining-nums; }

/* Three principles side by side */
.trio { display: grid; gap: 1.5rem 2.5rem; margin-top: 2rem; }
@media (min-width: 760px) { .trio { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.trio .cell { border-top: 2px solid var(--ink); padding-top: 1rem; }
.trio .kicker { font-family: var(--display); font-size: 1.1875rem; line-height: 1.28; font-weight: 600; hyphens: manual; }
.trio .cell p + p { margin-top: 0.6em; color: var(--ink-soft); }

/* Service rows */
.terms.services dt { hyphens: auto; }
.terms.services dd p + p { margin-top: 0.7em; }
@media (min-width: 640px) { .terms.services > div { grid-template-columns: 15rem minmax(0, 1fr); } }

/* Certificate tiles */
.rows.tiles { border: 0; display: grid; gap: 1rem; margin-top: 1.75rem; }
@media (min-width: 700px) { .rows.tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rows.tiles li { border: 1px solid var(--rule); border-radius: 3px; padding: 1.1rem 1.25rem 1.25rem; font-size: 1rem; line-height: 1.4; color: var(--ink-soft); hyphens: manual; }
.rows.tiles strong { font-family: var(--display); color: var(--ink); font-size: 1.0625rem; }

/* Home: lead beside the remaining introduction */
.split { display: grid; gap: 1.5rem 4.5rem; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.split .lead { font-family: var(--display); font-size: clamp(1.375rem, 2.6vw, 1.75rem); line-height: 1.36; hyphens: manual; }
.split .prose > * + * { margin-top: 1.05em; }

/* Corrections after review */
.prose > .sec, .prose > .part { max-width: none; }
.entry > h3, .steps h2 { hyphens: auto; font-size: 1.375rem; }
@media (min-width: 760px) { .entry, .steps > li { grid-template-columns: 14.5rem minmax(0, 1fr); gap: 0.75rem 2.25rem; } }

/* Career: period on the left, employer as heading, role below */
.timeline li { gap: 0.15rem 2.25rem; padding-block: 1.15rem 1.3rem; }
@media (min-width: 640px) { .timeline li { grid-template-columns: 8.5rem minmax(0, 1fr); } }
.timeline .when { color: var(--ink-soft); font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; padding-top: 0.18rem; }
.timeline .what { display: block; min-width: 0; }
.timeline strong { display: block; font-family: var(--display); font-size: 1.25rem; line-height: 1.28; }
.timeline .desc { display: block; margin-top: 0.3rem; }
