/* UX Research Associates.
   Layout: a wide page with section names in a narrow left column and content on the right, like margin notes.
   Type: Instrument Sans for headings and navigation, Source Serif 4 for reading.
   Color: near-black on warm white, spruce for links, one mid-century ochre reserved for the segments drawing. */

/* ---------- Tokens ---------- */
:root {
  --paper: #fbfbfa;
  --ink: #111417;
  --muted: #5a6168;
  --rule: #e2e4e1;
  --link: #0f5c4c;
  --spruce: #0f5c4c;
  --ochre: #d9a441;
  --slate: #8a949a;

  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Georgia, serif;

  --body: 1.0625rem;
  --body-lh: 1.62;
  --small: 0.9rem;
  --h1: clamp(2.6rem, 1.5rem + 4.2vw, 5.2rem);
  --h3: 1.3rem;

  --measure: 40rem;
  --wrap: 72rem;
  --side: clamp(16px, 4vw, 40px);
  --gap: clamp(3.5rem, 2.5rem + 4vw, 6.5rem);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1213; --ink: #eceeec; --muted: #9aa3a5; --rule: #262b2c; --link: #5fc3a8;
    --spruce: #5fc3a8; --ochre: #e0b35a; --slate: #6b7579;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f1213; --ink: #eceeec; --muted: #9aa3a5; --rule: #262b2c; --link: #5fc3a8;
  --spruce: #5fc3a8; --ochre: #e0b35a; --slate: #6b7579;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--body)/var(--body-lh) var(--serif);
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga", "onum";
}
img, svg { max-width: 100%; }
h1, h2, h3 { margin: 0; font-family: var(--sans); font-weight: 500; }
p { margin: 0; }
a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: 0.5rem 1rem; z-index: 20; }
.skip:focus { left: max(16px, env(safe-area-inset-left, 0px)); }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(var(--side), env(safe-area-inset-left, 0px));
  padding-right: max(var(--side), env(safe-area-inset-right, 0px));
}

/* ---------- Header ---------- */
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 2rem; padding-block: 1.1rem 0; font-family: var(--sans); }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; color: var(--ink); text-decoration: none; }
.brand-mark { display: block; width: 1.4rem; height: 1.4rem; flex: none; }
.brand-name { font-weight: 500; font-size: 0.95rem; letter-spacing: 0.01em; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 1.5rem; }
.site-nav a { color: var(--ink); text-decoration: none; font-size: 0.95rem; }
.site-nav a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.site-nav a[aria-current="page"] { color: var(--muted); }
.site-nav a.nav-contact { background: var(--ink); color: var(--paper); border-radius: 3px; padding: 0.5rem 0.95rem; margin-left: 0.25rem; }
.site-nav a.nav-contact:hover { text-decoration: none; background: var(--spruce); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(4rem, 2.5rem + 6vw, 8rem) clamp(1rem, 2vw, 2rem); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem);
  column-gap: clamp(2rem, 5vw, 6rem);
  row-gap: 1.6rem;
  align-items: start;
}
h1 {
  grid-column: 1 / -1;
  font-size: var(--h1);
  line-height: 1.0;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
h1 .line { display: block; }
.hero-copy { display: grid; gap: 1.4rem; min-width: 0; }
.lede { font-size: 1.25rem; line-height: 1.45; max-width: 34rem; }
.cred { color: var(--muted); max-width: 36rem; }
.hero-link { padding-top: 0.4rem; font-family: var(--sans); }

/* The segments drawing: survey respondents settling into three groups. */
.segments { margin: 0; display: grid; gap: 0.6rem; min-width: 0; align-self: start; }
.segments-svg { display: block; width: 100%; height: auto; max-width: 100%; }
.segments figcaption { font: 400 var(--small)/1.4 var(--sans); color: var(--muted); }
@media (max-width: 720px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .segments { max-width: 14rem; }
}

/* ---------- Sections ---------- */
.sec {
  display: grid; grid-template-columns: 11rem minmax(0, 1fr); column-gap: clamp(2rem, 4vw, 5rem);
  border-top: 1px solid var(--rule); padding-top: 1.6rem; margin-top: var(--gap);
}
.sec-name { font-size: 0.95rem; font-weight: 500; color: var(--muted); padding-top: 0.35rem; }
.sec-body { display: grid; gap: 1.6rem; min-width: 0; }
.sec-intro { max-width: var(--measure); color: var(--muted); }
.prose { max-width: var(--measure); display: grid; gap: 1rem; }
.more { font-family: var(--sans); }
@media (max-width: 720px) { .sec { grid-template-columns: minmax(0, 1fr); row-gap: 1rem; } }

/* Case-study list */
.studies { list-style: none; margin: 0; padding: 0; display: grid; }
.studies li {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); column-gap: clamp(1.5rem, 3vw, 3rem); row-gap: 0.55rem;
  align-items: start; padding-block: 1.6rem; border-top: 1px solid var(--rule); min-width: 0;
}
.studies li:first-child { border-top: 0; padding-top: 0; }
.study-head { display: grid; gap: 0.3rem; }
.studies h3 { font-size: var(--h3); line-height: 1.25; letter-spacing: -0.02em; font-weight: 600; text-wrap: pretty; }
.studies h3 a { color: var(--ink); text-decoration: none; }
.studies h3 a:hover { text-decoration: underline; text-underline-offset: 0.14em; }
.studies p { max-width: var(--measure); }
.tags { color: var(--muted); font-size: var(--small); font-family: var(--sans); }
@media (max-width: 720px) { .studies li { grid-template-columns: minmax(0, 1fr); } }

/* Services and principles */
.services, .principles { margin: 0; display: grid; }
.services > div { display: grid; gap: 0.4rem; padding-block: 1.3rem; border-top: 1px solid var(--rule); max-width: var(--measure); }
.services > div:first-child { border-top: 0; padding-top: 0; }
.services dt { font-family: var(--sans); font-size: var(--h3); line-height: 1.25; letter-spacing: -0.02em; font-weight: 600; }
.services dd { margin: 0; }
.services dd em { display: block; font-style: normal; color: var(--muted); margin-bottom: 0.25rem; }

.principles { grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 1.4rem 2.5rem; }
.principles > div { display: grid; }
.principles dt { font-family: var(--sans); font-weight: 600; font-size: 1rem; }
.principles dd { margin: 0; color: var(--muted); }

/* Links lists */
.links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; font-family: var(--sans); }

/* Closing */
.closing { padding-bottom: var(--gap); }
.closing-line { font-family: var(--sans); font-weight: 500; letter-spacing: -0.02em; font-size: 1.7rem; line-height: 1.3; max-width: 30ch; text-wrap: pretty; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--rule); font-size: var(--small); color: var(--muted); font-family: var(--sans); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; padding-block: 1.6rem 2.4rem; }
.site-footer a { color: inherit; }
.sep { opacity: 0.5; padding-inline: 0.2rem; }
.footer-line { font-family: var(--serif); }

/* ======================================================================
   Inner pages
   ====================================================================== */

/* Page hero (services, case studies, about, contact): title, one sentence, optional drawing at right. */
.page-hero { padding-block: clamp(3.5rem, 2rem + 4vw, 6rem) clamp(1rem, 2vw, 2rem); display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem); column-gap: clamp(2rem, 5vw, 6rem); row-gap: 1.4rem; align-items: start; }
.page-hero.no-drawing { grid-template-columns: minmax(0, 1fr); }
.page-hero h1 { grid-column: 1 / -1; font-size: clamp(2.2rem, 1.3rem + 3vw, 4rem); line-height: 1.04; letter-spacing: -0.03em; max-width: 24ch; text-wrap: balance; }
.page-hero .lede { grid-column: 1; }
.page-hero .kicker { grid-column: 1 / -1; font-family: var(--sans); color: var(--muted); font-size: var(--small); }
.page-hero .kicker a { color: inherit; }
.page-hero .drawing-fig { grid-column: 2; grid-row: 3 / span 2; margin: 0; display: grid; gap: 0.6rem; min-width: 0; align-self: start; }
.page-hero .drawing-fig svg { display: block; width: 100%; height: auto; }
.page-hero .drawing-fig figcaption { font: 400 var(--small)/1.4 var(--sans); color: var(--muted); }
@media (max-width: 720px) {
  .page-hero { grid-template-columns: minmax(0, 1fr); }
  .page-hero .drawing-fig { grid-column: 1; grid-row: auto; max-width: 16rem; }
}

/* At a glance: the facts of a study in a four-up row. */
.glance { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem 2.5rem; margin: 0; }
@media (max-width: 560px) { .glance { grid-template-columns: minmax(0, 1fr); } }
.glance > div { display: grid; gap: 0.25rem; align-content: start; min-width: 0; }
.glance dt { font: 500 var(--small)/1.4 var(--sans); color: var(--muted); }
.glance dd { margin: 0; font-size: 1rem; line-height: 1.5; }

/* Running text inside sections */
.body { max-width: var(--measure); display: grid; gap: 1rem; min-width: 0; }
.body h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.015em; margin-top: 0.9rem; }
.body h3:first-child { margin-top: 0; }
.body ul, .body ol { margin: 0; padding-left: 1.2em; display: grid; gap: 0.45rem; }
.body .wide { max-width: none; }
.sec-body.wide-body { max-width: none; }
.body-wide { display: grid; gap: 1rem; min-width: 0; }
.body-wide > p, .body-wide > ul, .body-wide > ol, .body-wide > h3 { max-width: var(--measure); }
.body-wide h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.015em; margin-top: 0.9rem; }
.body-wide ul, .body-wide ol { margin: 0; padding-left: 1.2em; display: grid; gap: 0.45rem; }

/* Side note: a short aside within the running text. */
.note { color: var(--muted); font-size: var(--small); line-height: 1.5; border-left: 2px solid var(--rule); padding-left: 1rem; display: grid; gap: 0.3rem; max-width: var(--measure); }
.note strong { font-family: var(--sans); font-weight: 600; color: var(--ink); font-size: var(--small); }

/* Figures: photographs of real artifacts, shown plainly. */
.figure { margin: 0; display: grid; gap: 0.6rem; max-width: none; }
.figure img { display: block; width: 100%; height: auto; border-radius: 2px; }
.figure figcaption { font: 400 var(--small)/1.45 var(--sans); color: var(--muted); max-width: var(--measure); }
.figure.narrow { max-width: 30rem; }
.figure-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; max-width: none; }
@media (max-width: 560px) { .figure-pair { grid-template-columns: minmax(0, 1fr); } }

/* Tables */
.table-scroll { overflow-x: auto; max-width: none; }
table.ledger { width: 100%; border-collapse: collapse; font-size: 0.98rem; line-height: 1.45; min-width: 36rem; }
table.ledger th, table.ledger td { text-align: left; vertical-align: top; padding: 0.7rem 1rem 0.7rem 0; border-bottom: 1px solid var(--rule); }
table.ledger thead th { font: 500 var(--small)/1.4 var(--sans); color: var(--muted); }
table.ledger tbody td:first-child, table.ledger tbody th { font-family: var(--sans); font-weight: 600; font-size: 0.95rem; }
table.ledger .num { text-align: right; font-variant-numeric: tabular-nums; }
table.compact { min-width: 0; }

/* Quotes from participants */
.quote { margin: 0; display: grid; gap: 0.5rem; padding-left: 1.1rem; border-left: 2px solid var(--spruce); max-width: var(--measure); }
.quote blockquote { margin: 0; font-size: 1.15rem; line-height: 1.45; }
.quote blockquote p { margin: 0; }
.quote figcaption { font: 400 var(--small)/1.4 var(--sans); color: var(--muted); }
.pullquote { font-family: var(--sans); font-weight: 500; font-size: 1.5rem; line-height: 1.3; letter-spacing: -0.02em; max-width: 30ch; padding-block: 0.4rem; }

/* Deliverables list: what the team got */
.deliverables { margin: 0; display: grid; gap: 0; max-width: var(--measure); }
.deliverables > div { display: grid; gap: 0.3rem; padding-block: 0.9rem; border-top: 1px solid var(--rule); }
.deliverables > div:first-child { border-top: 0; padding-top: 0; }
.deliverables dt { font-family: var(--sans); font-weight: 600; font-size: 1rem; }
.deliverables dd { margin: 0; color: var(--muted); }

/* Principles / practices list (what carries over) */
.practices { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.9rem; max-width: var(--measure); }
.practices li strong { font-family: var(--sans); font-weight: 600; display: block; }
.practices li { color: var(--muted); }

/* Bars drawn to scale */
.bars { display: grid; gap: 0.9rem; margin: 0; max-width: var(--measure); }
.bar { display: grid; grid-template-columns: minmax(6rem, 8rem) minmax(0, 1fr); gap: 0.25rem 1rem; align-items: center; }
.bar .track { background: var(--rule); height: 1.6rem; border-radius: 2px; }
.bar .fill { height: 100%; background: var(--spruce); border-radius: 2px; }
.bar .fill.alt { background: var(--ochre); }
.bar .who { font: 600 0.95rem/1.25 var(--sans); }
.bar .val { grid-column: 2; font: 400 var(--small)/1.3 var(--sans); color: var(--muted); font-variant-numeric: tabular-nums; }

/* Inline SVG diagrams carried over from earlier studies (restyled to the tokens; scroll sideways on phones) */
.seq-scroll, .drawing-scroll { overflow-x: auto; max-width: none; }
.seq { display: block; width: 100%; max-width: none; min-width: 720px; height: auto; font-family: var(--sans); }
.seq-box { fill: var(--paper); stroke: var(--rule); }
.seq-lane { fill: var(--ink); font-size: 14px; font-weight: 600; text-anchor: middle; }
.seq-life { stroke: var(--rule); stroke-width: 1.5; }
.seq-msg { stroke: var(--ink); stroke-width: 1.25; }
.seq-reply { stroke: var(--muted); stroke-dasharray: 4 3; }
.seq-head { fill: var(--ink); }
.seq-label { fill: var(--ink); font-size: 13px; text-anchor: middle; paint-order: stroke; stroke: var(--paper); stroke-width: 5px; stroke-linejoin: round; }
.seq-note { fill: var(--ochre); }
.seq-note-text { fill: var(--ink); font-size: 13px; font-weight: 600; text-anchor: middle; }
.drawing { display: block; width: 100%; max-width: none; min-width: 640px; height: auto; font-family: var(--sans); }

/* Next study */
.next-study { border-top: 1px solid var(--rule); margin-top: var(--gap); padding-block: 1.6rem var(--gap); display: grid; grid-template-columns: 11rem minmax(0, 1fr); column-gap: clamp(2rem, 4vw, 5rem); }
.next-study .sec-name { padding-top: 0.2rem; }
.next-study a { font-family: var(--sans); font-weight: 600; font-size: 1.3rem; letter-spacing: -0.02em; text-decoration: none; color: var(--ink); }
.next-study a:hover { text-decoration: underline; text-underline-offset: 0.14em; }
@media (max-width: 720px) { .next-study { grid-template-columns: minmax(0, 1fr); row-gap: 0.6rem; } }

/* Case-study index: the full list of eight */
.studies.all li { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); }

/* Services page */
.service { display: grid; grid-template-columns: 11rem minmax(0, 1fr); column-gap: clamp(2rem, 4vw, 5rem); border-top: 1px solid var(--rule); padding-top: 1.6rem; margin-top: var(--gap); }
.service .sec-name { color: var(--ink); font-size: 1.3rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; padding-top: 0; }
.service .q { font-size: 1.25rem; line-height: 1.45; max-width: 34rem; }
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: 1.4rem 2.5rem; }
.service-grid > div { display: grid; gap: 0.4rem; align-content: start; }
.service-grid dt { font-family: var(--sans); font-weight: 600; font-size: 1rem; }
.service-grid dd { margin: 0; color: var(--muted); }
.service-grid ul { margin: 0; padding-left: 1.1em; display: grid; gap: 0.3rem; color: var(--muted); }
.service .proof { font-family: var(--sans); font-size: var(--small); color: var(--muted); }
@media (max-width: 720px) { .service { grid-template-columns: minmax(0, 1fr); row-gap: 1rem; } }

/* Steps: how an engagement runs */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: 1.4rem 2.5rem; }
.steps li { display: grid; gap: 0.35rem; align-content: start; }
.steps .step-when { font: 500 var(--small)/1.4 var(--sans); color: var(--muted); }
.steps h3 { font-size: 1rem; font-weight: 600; }
.steps p { color: var(--muted); }

/* Timeline (About) */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.timeline li { display: grid; grid-template-columns: minmax(8.5rem, 10rem) minmax(0, 1fr); gap: 0.4rem 2rem; padding-block: 1rem; border-top: 1px solid var(--rule); }
.timeline li:first-child { border-top: 0; padding-top: 0; }
.timeline .when { font: 400 var(--small)/1.6 var(--sans); color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline strong { font-family: var(--sans); font-weight: 600; display: block; }
.timeline p { color: var(--muted); max-width: var(--measure); }
@media (max-width: 560px) { .timeline li { grid-template-columns: minmax(0, 1fr); gap: 0.2rem; } }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.plain-list strong { font-family: var(--sans); font-weight: 600; }
.people { margin: 0; display: grid; gap: 1rem; max-width: var(--measure); }
.people dt { font-family: var(--sans); font-weight: 600; }
.people dd { margin: 0; color: var(--muted); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 4vw, 5rem); align-items: start; }
.contact-grid > * { min-width: 0; }
@media (max-width: 720px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
.email-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; font-family: var(--sans); font-size: 1.15rem; }
.email-line code { font: 500 1.1rem/1.3 var(--sans); user-select: all; overflow-wrap: anywhere; }
.copy-btn { font: 500 0.85rem/1 var(--sans); padding: 0.45rem 0.7rem; border-radius: 3px; border: 1px solid var(--rule); background: transparent; color: var(--ink); cursor: pointer; }
.copy-btn:hover { border-color: var(--ink); }
form.contact { display: grid; gap: 1rem; }
form.contact label { display: grid; gap: 0.35rem; font: 500 0.95rem/1.3 var(--sans); }
form.contact input, form.contact textarea {
  font: 400 1rem/1.4 var(--serif); color: var(--ink); background: var(--paper);
  border: 1px solid var(--rule); border-radius: 3px; padding: 0.7rem 0.85rem; width: 100%;
}
form.contact input:focus, form.contact textarea:focus { outline: 2px solid var(--link); outline-offset: 1px; border-color: var(--link); }
form.contact .two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { form.contact .two { grid-template-columns: 1fr; } }
form.contact button { font: 500 1rem/1 var(--sans); padding: 0.8rem 1.2rem; border-radius: 3px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); cursor: pointer; justify-self: start; }
form.contact button:hover { background: var(--spruce); border-color: var(--spruce); }
.form-status { font-size: var(--small); color: var(--muted); font-family: var(--sans); }
.hidden-field { position: absolute; left: -9999px; }
.body ol.steps { padding-left: 0; gap: 1.2rem; }
.lanes { display: block; width: 100%; max-width: none; min-width: 760px; height: auto; }
.personas-svg { display: block; width: 100%; max-width: 40rem; height: auto; }
.authority { display: block; width: 100%; max-width: 48rem; min-width: 600px; height: auto; }
