/* The online CV page. Ported from the example page the owner chose; the in-browser search rules are not ported (D2). */
:root {
  /* Layout: an engineering record. Ruled sections, ADR-style case files, one oversized expanded name as the single bold gesture. */
  --paper: #F1F3F4;
  --surface: #FFFFFF;
  --ink: #13171B;
  --muted: #58626C;
  --rule: #D3D9DE;
  --accent: #CF3F1B;
  --on-accent: #FFFFFF;
  --ok: #2E7D4F;
  --wip: #A86B12;
  --shadow: 0 6px 20px rgba(19, 23, 27, .14), 0 1px 3px rgba(19, 23, 27, .12);
  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --panel-w: 420px;
  --nav-h: 48px;
  --quote-mark: color-mix(in srgb, var(--accent) 28%, transparent); /* the quoted passage (U13) */
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0E1114;
    --surface: #161B20;
    --ink: #E6EAED;
    --muted: #9BA5AF;
    --rule: #2B333B;
    --accent: #FF6A40;
    --on-accent: #160A05;
    --ok: #62C08A;
    --wip: #E3A63E;
    --shadow: 0 8px 24px rgba(0, 0, 0, .55), 0 1px 3px rgba(0, 0, 0, .45);
    --quote-mark: color-mix(in srgb, var(--accent) 32%, transparent);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0E1114;
  --surface: #161B20;
  --ink: #E6EAED;
  --muted: #9BA5AF;
  --rule: #2B333B;
  --accent: #FF6A40;
  --on-accent: #160A05;
  --ok: #62C08A;
  --wip: #E3A63E;
  --shadow: 0 8px 24px rgba(0, 0, 0, .55), 0 1px 3px rgba(0, 0, 0, .45);
  --quote-mark: color-mix(in srgb, var(--accent) 32%, transparent);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
}
a { color: inherit; text-decoration-color: var(--rule); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.mono { font-family: var(--font-mono); }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 480px) { .wrap { padding: 0 16px; } }

/* Layout: the CV column keeps the window's scroll; sizes inside it follow the column's width
   (container units), so the name and headings fit when the chat panel takes the right side. */
.cv-col { container: cv / inline-size; min-width: 0; }

/* The section bar (tasks/ux/00-design.md U4): sticky at the top of the CV column, over the
   content, under the tips (25) and the chat panel (20). Its edges line up with .wrap. */
.topnav {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--nav-h);
  display: flex;
  align-items: stretch;
  gap: 24px;
  padding: 0 max(24px, calc((100% - 1120px) / 2 + 24px));
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  /* At a fractional scroll position the content can show through in a hairline above the bar's
     first pixel row; this paints over it. */
  box-shadow: 0 -2px 0 var(--paper);
}
.topnav a { text-decoration: none; white-space: nowrap; display: flex; align-items: center; }
.topnav-name {
  flex: none;
  font-family: var(--font-display);
  font-weight: 750;
  font-variation-settings: "wdth" 112;
  font-size: 14px;
  letter-spacing: .02em;
  text-transform: uppercase;
  /* Hidden while the hero's name is on screen; nav.js shows it once that has scrolled under the
     bar. It keeps its space, so nothing moves. Without JavaScript it stays hidden. */
  visibility: hidden;
  opacity: 0;
}
.topnav.name-shown .topnav-name { visibility: visible; opacity: 1; }
.topnav-links {
  position: relative; /* nav.js measures the current link inside this row */
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.topnav-links::-webkit-scrollbar { display: none; }
/* While the row overflows to the right (nav.js), its right edge fades to say there is more. */
.topnav-links.fade {
  -webkit-mask-image: linear-gradient(to left, transparent, var(--ink) 24px);
  mask-image: linear-gradient(to left, transparent, var(--ink) 24px);
}
.topnav-links li { display: flex; }
.topnav-links a {
  font-size: 14px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  padding-top: 2px; /* balances the line under the current link */
}
.topnav-links a:hover { color: var(--ink); }
.topnav-links a[aria-current="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.topnav-links a:focus-visible { outline-offset: -2px; }
.topnav-pdf { flex: none; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.topnav-pdf:hover { color: var(--ink); }
/* Too narrow for the name and the links: the name goes, the links scroll sideways. */
@container cv (max-width: 720px) {
  .topnav .topnav-name { display: none; }
}
@container cv (max-width: 480px) {
  .topnav { padding: 0 16px; gap: 18px; }
  .topnav-links { gap: 18px; }
}

/* Hero (U3): the eyebrow, the name on one line, the thesis, the path, one row of links */
.hero { padding: 28px 0 20px; }
.eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.name {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  column-gap: .3em;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(34px, 6.4vw, 66px);
  /* From the column's content width: the name stays on one line while it can. */
  font-size: clamp(34px, calc((100cqi - 48px) * .068), 66px);
  line-height: .95;
  letter-spacing: -.015em;
  text-transform: uppercase;
  font-variation-settings: "wdth" 125;
}
.name span { animation: widen 1.1s cubic-bezier(.2, .7, .1, 1) both; }
.name span + span { animation-delay: .12s; }
.name span:last-child::after {
  content: "";
  display: inline-block;
  width: .15em;
  height: .15em;
  margin-left: .06em;
  background: var(--accent);
}
@keyframes widen {
  from { font-variation-settings: "wdth" 78; }
  to { font-variation-settings: "wdth" 125; }
}
.thesis {
  font-size: clamp(18px, 2vw, 21px);
  font-size: clamp(18px, 2cqi, 21px);
  line-height: 1.42;
  max-width: 40em;
  margin: 16px 0 10px;
  text-wrap: pretty;
}
.meta { margin: 0 0 14px; font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.contact { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; font-size: 15px; }
.btn-line {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--ink);
  border-radius: 4px;
  padding: 5px 11px;
}
.btn-line:hover { border-color: var(--accent); }

/* The three points: each pillar's claim over the numbers that back it */
.pillars { display: grid; grid-template-columns: 1fr; gap: 32px 32px; margin-top: 14px; }
.pillar { border-top: 2px solid var(--ink); padding-top: 14px; min-width: 0; }
.pillar-n { font-family: var(--font-mono); font-size: 12px; color: var(--accent); margin: 0; font-variant-numeric: tabular-nums; }
.pillar h2 { font-size: clamp(21px, 2.3vw, 24px); font-size: clamp(21px, 2.3cqi, 24px); margin: 2px 0 8px; }
.claim { margin: 0 0 14px; max-width: 46ch; font-size: 16px; line-height: 1.5; }
/* The tiles share hairlines like the rows of a table: a rule above each, no gap between. */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 0 24px; align-content: start; }
.tile { border-top: 1px solid var(--rule); padding: 8px 0 10px; }
.tile .num {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-variation-settings: "wdth" 112;
  font-size: clamp(26px, 3vw, 32px);
  font-size: clamp(26px, 3cqi, 32px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  margin-bottom: 6px;
}
.tile .lbl { font-size: 14px; line-height: 1.4; color: var(--muted); display: block; }
/* Three columns when the CV column is wide enough. Subgrid lines up the titles, the claims and
   the first tiles across the columns, whatever the length of each claim. */
@container cv (min-width: 760px) {
  .pillars { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto auto auto 1fr; }
  .pillar { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 0; }
  .pillar .tiles { grid-template-columns: 1fr; }
}

/* Sections */
section.block { padding: 44px 0; border-top: 1px solid var(--rule); }
/* The points sit right under the hero, on the first screen (U3). */
section.block.points { padding-top: 20px; border-top: 0; }
.sec-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0; }
h2 {
  font-family: var(--font-display);
  font-weight: 650;
  font-variation-settings: "wdth" 100;
  font-size: clamp(26px, 3.2vw, 34px);
  font-size: clamp(26px, 3.2cqi, 34px);
  line-height: 1.15;
  margin: 4px 0 20px;
  text-wrap: balance;
}

/* Ask: the offline note (chat disabled) and the buttons the panel shares */
.ask-box { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 24px; }
.ask-box h2 { margin-top: 0; margin-bottom: 6px; }
.ask-note { color: var(--muted); font-size: 14px; margin: 0; max-width: 62ch; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font: 500 15px/1 var(--font-body);
  color: var(--on-accent);
  background: var(--accent);
  border: 0;
  border-radius: 4px;
  padding: 12px 20px;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.06); }
.icon { flex: none; display: block; }
.idea {
  font: 14px/1.35 var(--font-body);
  color: var(--ink);
  background: transparent;
  border: 1px dashed var(--rule);
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  text-align: left;
}
.idea:hover { border-color: var(--muted); border-style: solid; }
.src {
  font: 12px/1.2 var(--font-mono);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 5px 10px;
  cursor: pointer;
  text-align: left;
}
.src:hover { border-color: var(--accent); }

/* The chat panel (tasks/pitch/00-design.md P3). Wide screens: pinned on the right, as tall as
   the viewport, the CV column beside it. Narrow screens: closed, or over the whole viewport.
   html[data-chat] is set by boot.js before the first paint and by app.js after. */
.panel {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  color: var(--ink);
  min-width: 0;
}
@media (min-width: 1100px) {
  .has-chat .cv-col { margin-right: var(--panel-w); }
  .panel {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--panel-w);
    height: 100vh;
    height: 100dvh;
    border-left: 1px solid var(--rule);
    z-index: 20;
  }
  html[data-chat="closed"] .has-chat .cv-col { margin-right: 0; }
  html[data-chat="closed"] .panel { display: none; }
}
@media (max-width: 1099.98px) {
  html.js .panel { display: none; }
  html.js[data-chat="open"] .panel { display: flex; position: fixed; inset: 0; height: 100vh; height: 100dvh; z-index: 60; }
  html.js[data-chat="open"], html.js[data-chat="open"] body { overflow: hidden; }
  /* Without JavaScript the panel is a plain block after the CV, holding the noscript note. */
  html:not(.js) .panel { border-top: 1px solid var(--rule); }
}
html:not(.js) .composer, html:not(.js) #ask-ideas { display: none; }

.panel-head {
  flex: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 16px 14px 24px;
  border-bottom: 1px solid var(--rule);
}
.panel-id { min-width: 0; }
.panel-title {
  font-family: var(--font-display);
  font-weight: 650;
  font-variation-settings: "wdth" 100;
  font-size: 19px;
  line-height: 1.2;
  margin: 0;
}
.panel-title::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 4px; background: var(--accent); }
.panel-context { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin: 4px 0 0; }
.panel-actions { flex: none; display: flex; gap: 4px; align-items: center; }
.head-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 13px/1 var(--font-body);
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 7px 9px;
  cursor: pointer;
}
.head-btn .icon { width: 16px; height: 16px; }
.head-btn:hover { color: var(--ink); border-color: var(--rule); }
.head-btn.icon-only { padding: 7px; }

.chat-log {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  /* An explicit thin bar from the tokens: the browser's own track can be bright in dark mode. */
  scrollbar-width: thin;
  scrollbar-color: var(--muted) transparent;
  padding: 22px 24px 8px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-wrap: anywhere;
}
.chat-log:focus { outline: none; }
.chat-log:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.msg { font-size: 15px; line-height: 1.6; }
.msg p, .msg ul { margin: 0; }
.msg p + p, .msg p + ul, .msg ul + p, .msg ul + ul { margin-top: .7em; }
.msg ul { padding-left: 1.15em; }
.msg li + li { margin-top: .35em; }
.msg li::marker { color: var(--accent); }
.msg strong { font-weight: 600; }
.msg.user {
  align-self: flex-end;
  max-width: 86%;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px 14px 4px 14px;
  padding: 9px 14px;
  white-space: pre-wrap;
}
.greeting { color: var(--ink); }
.chat-log .ideas, .next { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.chat-noscript { font-size: 14px; color: var(--muted); margin: 0; }
.exchange { display: flex; flex-direction: column; gap: 14px; border-radius: 6px; outline: 2px solid transparent; outline-offset: 4px; }
.reply { display: flex; flex-direction: column; gap: 12px; }
.activity {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.activity::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .25; } }
.flag { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin: 0; }
.sources { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 4px 0 0;
}
.next { padding-top: 4px; }
.next .label { margin-bottom: 2px; }
.msg-error {
  border-left: 2px solid var(--accent);
  padding: 2px 0 2px 12px;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.msg-error p { margin: 0; }
.ghost {
  font: 500 13px/1 var(--font-body);
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
}
.ghost:hover { border-color: var(--muted); }

.composer { flex: none; padding: 10px 16px 0; }
/* A quote from the page (U13): above the composer, a line in the accent on its left, at most two
   lines of muted text, the ready question and the remove button under it. */
.ask-quote { margin: 0 0 8px; padding: 2px 0 0 12px; border-left: 2px solid var(--accent); }
.ask-quote-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.ask-quote-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.ask-quote-row .ghost:disabled { color: var(--muted); cursor: default; }
/* The quote in the visitor's message: its own line, in the quote's style, the question under it. */
.msg.user .msg-quote { color: var(--muted); font-size: 14px; border-left: 2px solid var(--accent); padding-left: 10px; white-space: normal; }
.msg.user .msg-quote + p { margin-top: 4px; }
.composer-box {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 10px 10px 8px 14px;
  transition: border-color .15s;
}
.composer-box:focus-within { border-color: var(--muted); box-shadow: 0 0 0 1px var(--muted); }
.composer textarea {
  display: block;
  width: 100%;
  resize: none;
  border: 0;
  outline: 0;
  padding: 2px 0;
  background: transparent;
  color: var(--ink);
  font: 15px/1.5 var(--font-body);
  min-height: calc(1.5em + 4px);
  max-height: calc(7.5em + 4px); /* five lines */
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--muted) transparent;
}
.composer textarea::placeholder { color: var(--muted); opacity: 1; }
.composer-row { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.count { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-right: auto; font-variant-numeric: tabular-nums; }
.count.full { color: var(--accent); }
.send {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: var(--on-accent);
  background: var(--accent);
  cursor: pointer;
}
.send:disabled { background: var(--rule); color: var(--muted); cursor: default; }
.send.stop { background: var(--ink); color: var(--paper); }
.panel-note { flex: none; margin: 0; padding: 8px 24px 14px; font-size: 11.5px; line-height: 1.45; color: var(--muted); text-align: center; text-wrap: balance; }

/* The opener: only while the panel is closed, floating at the bottom right */
.chat-open { display: none; }
html.js[data-chat="closed"] .chat-open {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font: 500 15px/1 var(--font-body);
  color: var(--on-accent);
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  padding: 14px 20px 14px 18px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(19, 23, 27, .18), 0 1px 3px rgba(19, 23, 27, .2);
}
@media (max-width: 480px) { html.js[data-chat="closed"] .chat-open { right: 16px; bottom: 16px; } }
/* Room under the footer, so at the very bottom of the page the opener covers nothing. */
html.js[data-chat="closed"] .has-chat .foot { padding-bottom: 96px; }

/* Role fit (U5): requirement, evidence with the links that prove it, a question */
.fit { margin: 0; border-top: 1px solid var(--ink); }
.fit-row { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 2.7fr); gap: 8px 28px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.fit dt { font-weight: 600; }
/* The dd holds the evidence and the question: side by side here, stacked on a narrow column. */
.fit dd { margin: 0; color: var(--ink); font-size: 15px; display: flex; align-items: flex-start; gap: 8px 28px; }
.fit-ev { flex: 1 1 auto; min-width: 0; }
.fit-ask { flex: none; }
.refs { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.refs a { color: var(--ink); }
@container cv (max-width: 640px) {
  .fit-row { grid-template-columns: 1fr; }
  .fit dd { flex-direction: column; }
}

/* The ask control (U10): a question for the assistant; public/app.js asks it on a click. Without
   JavaScript it is not shown. Once answered in the thread it is marked: a check, muted text. */
.ask {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 100%;
  font: 13.5px/1.3 var(--font-body);
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 5px 12px 5px 10px;
  cursor: pointer;
  text-align: left;
}
.ask .icon { width: 15px; height: 15px; margin-top: 1px; color: var(--accent); }
.ask:hover, .ask:focus-visible { border-color: var(--accent); }
.ask.compact { white-space: nowrap; }
.ask .icon-asked { display: none; }
.ask.asked { color: var(--muted); }
.ask.asked .icon-ask { display: none; }
.ask.asked .icon-asked { display: block; }
html:not(.js) .ask { display: none; }
/* Controls' text is not part of a selection, so a quote of a whole card is the card's text. */
.ask, details.more > summary { -webkit-user-select: none; user-select: none; }

/* "Ask about this" on a selection (U13, public/quote.js). Fine pointer: the ask control's pill,
   floating by the selection (placed with the CSSOM), with the page's one resting shadow because it
   lies over text. Coarse pointer: a bar at the bottom of the window, above the safe area. */
.quote-offer {
  position: fixed;
  z-index: 31; /* over the tips (25) and the chat opener (30) */
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 500 13.5px/1.3 var(--font-body);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 6px 12px 6px 10px;
  box-shadow: var(--shadow);
  cursor: pointer;
  white-space: nowrap;
}
.quote-offer .icon { width: 15px; height: 15px; color: var(--accent); }
.quote-offer:hover, .quote-offer:focus-visible { border-color: var(--accent); }
.quote-offer.bar {
  left: 16px;
  right: 16px;
  top: auto;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  justify-content: center;
  padding: 12px 16px;
  font-size: 15px;
  border-radius: 999px;
}
/* While the bar shows (quote.js marks the root), the floating chat opener gives it its place. */
html.js.quote-bar[data-chat="closed"] .chat-open { display: none; }
/* With the chat beside the page, the bar spans the CV column only. */
@media (min-width: 1100px) {
  html[data-chat="open"] .quote-offer.bar { right: calc(var(--panel-w) + 16px); }
}
/* The quoted passage stays marked while the quote is attached: the flash's accent tint (U12),
   stronger, so a passage of text shows it in light and dark. */
/* The text on it is ink, also where it was muted: at least 7:1 on the mark in light and dark. */
::highlight(quoted) { background-color: var(--quote-mark); color: var(--ink); }

/* Detail on demand (U2): a <details> whose summary is a quiet control with a chevron */
details.more > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 28px;
  font: 12px/1.2 var(--font-mono);
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  border-radius: 2px;
}
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin: 0 2px 3px 1px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  rotate: -45deg;
}
details.more[open] > summary::before { rotate: 45deg; margin-bottom: 4px; }
details.more > summary:hover { color: var(--ink); }
details.more > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Case files (U6): one group per domain; a card is a headline, the story one click away */
.case-group + .case-group { margin-top: 28px; }
.group-title { font: 600 17px/1.3 var(--font-body); margin: 0 0 12px; }
/* At rest the cards of a row are as tall as the tallest, the question at the foot; once a card's
   story is open, every card in the grid takes its own height. */
.case-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 16px; }
.case-grid:has(details[open]) { align-items: start; }
.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  outline: 2px solid transparent;
  outline-offset: 3px;
}
.card:hover, .card:focus-within { border-color: var(--muted); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.kind { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 12px; border: 1px solid var(--rule); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.status.progress::before { background: var(--wip); }
.card h4 {
  font-family: var(--font-display);
  font-weight: 650;
  font-variation-settings: "wdth" 100;
  font-size: 18px;
  line-height: 1.25;
  margin: 0;
  text-wrap: balance;
}
.result { margin: 0; font-weight: 500; color: var(--ink); }
.card dl { margin: 2px 0 0; }
.card dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.card dd { margin: 3px 0 0; font-size: 15px; }
.card dd ul { margin: 2px 0 0; padding-left: 18px; }
.card dd li + li { margin-top: 3px; }
.card-foot, .role-foot { margin: 0; }
.card-foot { margin-top: auto; }

/* Experience (U7): a timeline; the record one click away */
.roles { border-top: 1px solid var(--ink); }
.role { display: grid; grid-template-columns: 190px 1fr; gap: 8px 32px; padding: 16px 0; border-bottom: 1px solid var(--rule); outline: 2px solid transparent; outline-offset: 3px; }
.role:hover, .role:focus-within { border-bottom-color: var(--muted); }
.when { display: flex; flex-direction: column; gap: 2px; font-family: var(--font-mono); font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.role h3 { font-family: var(--font-display); font-weight: 650; font-variation-settings: "wdth" 100; font-size: 20px; line-height: 1.25; margin: 0; }
.org { margin: 2px 0 0; color: var(--muted); }
.role-sum { margin: 6px 0 2px; max-width: 76ch; }
/* The record's control and the question share a line while the record is closed. */
.role > div:last-child { display: flex; flex-wrap: wrap; align-items: center; gap: 0 20px; min-width: 0; }
.role > div:last-child > :not(details, .role-foot) { flex: 1 0 100%; }
.role details.more[open] { flex: 1 0 100%; margin-bottom: 10px; }
.role h4 { font-family: var(--font-mono); font-weight: 500; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 16px 0 6px; }
.role details.more > summary + h4 { margin-top: 10px; }
.role ul { margin: 6px 0 0; padding-left: 18px; max-width: 72ch; }
.role h4 + ul { margin-top: 0; }
.role li + li { margin-top: 6px; }
.to-case { font-family: var(--font-mono); font-size: 12px; white-space: nowrap; }
.stack { margin: 12px 0 0; max-width: 72ch; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
@container cv (max-width: 640px) { .role { grid-template-columns: 1fr; } .when { flex-direction: row; gap: 14px; } }
.pillar, #evidence, #more { outline: 2px solid transparent; outline-offset: 4px; }
/* The mark on a place the reader was sent to (U12): the accent outline and a soft tint around it. */
.flash { outline-color: var(--accent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 12%, transparent); }

/* Reading aids (tasks/aids/00-design.md, A3, A4). A term is text with a dotted underline; its
   tip shows on hover or focus (CSS only), or, once public/glossary.js runs (html.tips-js), while
   the term has .is-open. The script shifts the tip into the column with --tip-dx (CSSOM). */
.hl { font-weight: 600; color: var(--ink); }
.term { position: relative; }
.term-label {
  text-decoration: underline dotted var(--muted);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: help;
}
.term-label:hover { text-decoration-color: var(--ink); }
.tip {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 25; /* over the section bar (10) and the chat panel (20), under the chat opener (30) */
  width: max-content;
  max-width: min(320px, calc(100vw - 32px), calc(100cqi - 32px));
  margin-top: 6px;
  translate: var(--tip-dx, 0px) 0;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 6px;
  box-shadow: var(--shadow);
  font: 400 14px/1.45 var(--font-body);
  font-style: normal;
  letter-spacing: normal;
  text-transform: none;
  text-align: left;
  white-space: normal;
  overflow-wrap: break-word;
  animation: tip-in .12s ease-out;
}
/* Bridges the gap between the term and its tip, so the pointer can move into the tip. */
.tip::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.tip.tip-up { top: auto; bottom: 100%; margin: 0 0 6px; }
.tip.tip-up::before { top: auto; bottom: -8px; }
html:not(.tips-js) .term:hover .tip,
html:not(.tips-js) .term:focus-within .tip,
.term.is-open .tip { display: block; }
.tip-title { display: block; font-weight: 600; margin-bottom: 2px; }
.tip-text { display: block; }
.tip-link { display: inline-block; margin-top: 6px; font-size: 13px; }
@keyframes tip-in { from { opacity: 0; } }

/* Footer */
/* Skills, languages and education. (.wrap.more: details.more is the detail control above.) The
   skills take the full width in two columns, the rest share the row under them. */
.wrap.more { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px 32px; }
.wrap.more > div:first-child { grid-column: 1 / -1; columns: 2 300px; column-gap: 32px; }
.wrap.more > div:first-child h3 { column-span: all; }
.wrap.more h3 { font-family: var(--font-mono); font-weight: 500; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.wrap.more p { margin: 0 0 8px; break-inside: avoid; }
.wrap.more b { font-weight: 600; }
/* Only the vertical padding: the example reset the .wrap side padding here, so the footer sat 24px left of the content. */
.foot { padding-top: 24px; padding-bottom: 40px; font-size: 13px; color: var(--muted); }
#roles li { outline: 2px solid transparent; outline-offset: 4px; border-radius: 2px; }
/* Everything a link or the chat scrolls to lands below the section bar. */
.hero, .pillar, .card, #roles li, .fit-row { scroll-margin-top: 64px; }
/* A section's and a role's top rule (for a role, the rule of the one above) sits under the bar's
   own rule, so a jump shows one line, not two. */
section.block, .role { scroll-margin-top: calc(var(--nav-h) - 1px); }

/* The home page at "/" (body.home): the eyebrow, the name and the public links, on the CV page's
   left margin with room above. Only existing tokens; .eyebrow and .name come from the hero. */
.home main { padding-top: clamp(56px, 16vh, 160px); padding-bottom: 56px; }
.home-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 24px; font-size: 15px; }

@media (prefers-reduced-motion: no-preference) {
  .ask, .btn-line { transition: border-color .15s; }
  .role { transition: border-color .15s, outline-color .3s, box-shadow .3s; }
  .card { transition: border-color .15s, outline-color .3s, box-shadow .3s; }
  #roles li, .pillar, #evidence, #more, .exchange { transition: outline-color .3s, box-shadow .3s; }
  details.more > summary::before { transition: rotate .15s; }
  .topnav-name { transition: opacity .15s, visibility .15s; }
  .quote-offer { transition: border-color .15s; animation: tip-in .12s ease-out; }
}
@media (prefers-reduced-motion: reduce) {
  .name span { animation: none; }
  .composer-box { transition: none; }
  .activity::before { animation: none; }
  .tip { animation: none; }
}

/* Printing the page: the CV only */
@media print {
  .panel, .chat-open, .quote-offer, .topnav, .ask, .card-foot, .role-foot, .fit-ask { display: none !important; }
  .has-chat .cv-col { margin-right: 0 !important; }
  details.more > summary::before { display: none; }
  .term-label { text-decoration: none; }
  .tip { display: none !important; }
}
