/* Hub pages on design system release 2.1.0: tokens.css, then kit/kit.css, then hub-adapter.css, then this file.
   Every colour comes from a token. Type and palette follow the Night desk direction; sections and cards
   are ruled (Ledger): strong rules over section heads, hairline rules around figures, no shadows. */
h1, h2, h3 {margin: 0;}
p {margin: 0;}

/* Hero: the line on at most two lines at desktop width, the role line above it, the two sentences beside it. */
section.hub-hero {display: grid; gap: 1.25rem 4rem; padding-block: 3.75rem 3.25rem;}
.hub-hero .hero-role {margin: 0 0 1rem; font-size: var(--viz-type-small); color: var(--viz-muted);}
section.hub-hero h1 {font-size: clamp(2.6rem, 5.6vw, 4.75rem); font-weight: 500; line-height: 1; letter-spacing: -.03em; max-width: 16ch;}
.hub-hero .position {display: grid; gap: .75rem; align-content: start; border-inline-start: 2px solid var(--viz-accent); padding-inline-start: 1.25rem; max-width: 34rem;}
.hub-hero .position p {font-size: 1.125rem;}
.hub-hero .position a {justify-self: start; display: inline-flex; align-items: center; min-height: 44px;}
@media (min-width: 900px) {section.hub-hero {grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: end;}}

/* Section heads and card grids. */
.group {margin-bottom: 3.5rem;}
.group-head {display: grid; gap: .4rem; border-top: 2px solid var(--viz-rule-strong); padding-top: .75rem; margin-bottom: 1.5rem;}
.group-head h2 {font-size: 1.75rem; font-weight: 500; line-height: 1.15; letter-spacing: -.01em;}
.group-head p {color: var(--viz-muted); max-width: 44rem;}
@media (min-width: 900px) {.group-head {grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 3rem;} .group-head p {padding-top: .35rem;}}
.cards {display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem 1.5rem;}
@media (min-width: 640px) {.cards {grid-template-columns: repeat(2, minmax(0, 1fr));}}
@media (min-width: 1100px) {.cards {grid-template-columns: repeat(4, minmax(0, 1fr));}}

/* Start here (ruling D48): four wide rows, each the study's own figure on a plate beside the answer. The figure is shown
   at no more than its captured size; the plate fills the row height so short and tall figures share one frame. */
.features {display: grid;}
.feature {display: grid; gap: 1.25rem 3rem; padding-block: 2.25rem; border-top: 1px solid var(--viz-rule);}
.feature:first-child {border-top: 0; padding-top: .5rem;}
.exhibit {margin: 0; display: grid; gap: .6rem; min-width: 0;}
.exhibit-plate {display: grid; place-items: center; padding: clamp(1rem, 2.5vw, 2.25rem); background: var(--viz-surface); border: 1px solid var(--viz-rule); border-radius: 6px;}
.exhibit-plate picture, .exhibit-plate img {display: block; max-width: 100%; height: auto;}
.exhibit figcaption {font-size: var(--viz-type-label); color: var(--viz-muted);}
.exhibit .capture-dark {display: none;}
:root[data-theme="dark"] .exhibit .capture-light {display: none;}
:root[data-theme="dark"] .exhibit .capture-dark {display: block;}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .exhibit .capture-light {display: none;}
  :root:not([data-theme="light"]) .exhibit .capture-dark {display: block;}
}
.feature-copy {display: flex; flex-direction: column; gap: .6rem; min-width: 0; max-width: 34rem;}
.feature h3 {font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 500; line-height: 1.1; letter-spacing: -.015em;}
.feature .question {color: var(--viz-muted); font-weight: 400; font-size: 1rem;}
.feature .answer {font-family: var(--viz-font-heading); font-optical-sizing: auto; font-size: clamp(1.2rem, 1.7vw, 1.4rem); line-height: 1.35; font-weight: 500; margin-block: .2rem .3rem;}
.feature .study-link {margin-top: .25rem;}
@media (min-width: 1000px) {
  .feature {grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center;}
  .feature .exhibit {grid-column: 1; grid-row: 1;}
  .feature .feature-copy {grid-column: 2; grid-row: 1;}
}

/* More studies (ruling D48): one ruled index, a row per study. The figure column uses the text face with tabular
   digits (ruling D31). Under 900px each row becomes a stacked entry. */
.study-index {width: 100%; border-collapse: collapse; text-align: left;}
.study-index thead th {font-size: var(--viz-type-label); font-weight: 600; color: var(--viz-muted); padding: 0 1.25rem .6rem 0; border-bottom: 2px solid var(--viz-rule-strong);}
.study-index tbody th, .study-index td {vertical-align: top; padding: 1.1rem 1.25rem 1.2rem 0; border-bottom: 1px solid var(--viz-rule);}
.study-index tbody th {font-weight: 400; width: 26%;}
.study-index tbody th a {font-family: var(--viz-font-heading); font-optical-sizing: auto; font-size: 1.25rem; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; color: var(--viz-foreground); text-decoration-color: var(--viz-rule); text-underline-offset: .22em;}
.study-index tbody th a:hover {color: var(--viz-link); text-decoration-color: currentColor;}
.ix-question {display: block; margin-top: .35rem; font-size: var(--viz-type-small); color: var(--viz-muted);}
.ix-answer {font-size: .9375rem; line-height: 1.5; width: 34%;}
.ix-result {width: 22%;}
.ix-figure {font-family: var(--viz-font-body); font-variant-numeric: tabular-nums lining-nums; font-size: 1.6rem; line-height: 1; letter-spacing: -.02em; color: var(--viz-foreground);}
.ix-unit {font-size: var(--viz-type-small); color: var(--viz-muted);}
.ix-caption {display: block; margin-top: .4rem; font-size: var(--viz-type-label); line-height: 1.4; color: var(--viz-muted);}
.ix-tags {font-size: var(--viz-type-label); padding-right: 0; width: 14%;}
.ix-tags .tag {margin: 0 .3rem .3rem 0; white-space: nowrap;}
.ix-tags .tag-claim {font-weight: 600;}
@media (max-width: 899px) {
  .study-index thead {position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);}
  .study-index, .study-index tbody, .study-index tr, .study-index tbody th, .study-index td {display: block; width: auto;}
  .study-index tr {padding-block: 1.1rem 1.2rem; border-bottom: 1px solid var(--viz-rule);}
  .study-index tbody tr:first-child {border-top: 2px solid var(--viz-rule-strong);}
  .study-index tbody th, .study-index td {border: 0; padding: 0;}
  .ix-answer {margin-top: .6rem;}
  .ix-result {margin-top: .6rem;}
  .ix-tags {margin-top: .6rem;}
}

/* Card: a ruled ledger entry led by the kit thumbnail (E3b): figure, caption and glyph in theme colours. */
.study {min-width: 0; display: flex; flex-direction: column;}
.study > .thumb {min-height: 16rem;}
.thumb-judgment .thumb-caption {font-size: var(--viz-type-small); color: var(--viz-foreground);}
.study-copy {display: flex; flex-direction: column; gap: .5rem; padding-top: .9rem; flex: 1;}
.study-tags {display: flex; flex-wrap: wrap; gap: .35rem; font-size: var(--viz-type-label);}
.study-tags .tag-claim {font-weight: 600;}
.study h3 {font-size: 1.3rem; font-weight: 600; line-height: 1.15; letter-spacing: -.01em;}
.question {font-weight: 600; font-size: .9375rem;}
.headline {font-size: .9375rem; line-height: 1.5;}
.scope, .tools {color: var(--viz-muted); font-size: var(--viz-type-label);}
.study-link {margin-top: auto; display: inline-flex; align-items: center; min-height: 44px; font-size: .9375rem;}

/* The foundation is shown separately from the decision studies. */
.foundation {margin-bottom: 3.5rem;}
.foundation .study {display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem;}
@media (min-width: 760px) {.foundation .study {grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem; align-items: start;} .foundation .study-copy {padding-top: 0;}}

.pending {border-top: 2px solid var(--viz-rule-strong); padding-block: .75rem 2rem; margin-bottom: 2rem;}
.pending > p {max-width: 46rem; color: var(--viz-muted);}
.pending ul {list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem 2.5rem;}
.pending li {border-top: 1px solid var(--viz-rule); padding-top: 1rem;}
.pending h3 {font-size: 1.25rem;}
/* The rule is the kit's .kit-rule (2.0.4): drawn inside the content column, not across the wrapper's gutter. */
.contact {padding-block: 0 1rem;}
.contact h2 {font-size: 1.75rem; font-weight: 500; margin-bottom: .5rem;}
.contact p {max-width: 46rem;}

/* Summary pages generated for studies whose interactive build is not bundled. */
.detail {max-width: 920px; padding-block: 2.25rem 1rem; display: grid; gap: .9rem;}
.detail h1 {font-size: clamp(2.1rem, 4.4vw, 3.25rem); font-weight: 500; line-height: 1.06; letter-spacing: -.02em;}
.detail .question {font-size: 1.05rem;}
.detail .headline {font-size: 1.2rem; line-height: 1.45;}
.detail-figure {margin: .5rem 0;}
.detail-figure img {display: block; width: 100%; height: auto; border: 1px solid var(--viz-rule);}
.detail-figure figcaption {margin-top: .5rem; color: var(--viz-muted); font-size: var(--viz-type-label);}
/* The capture follows the page theme: light by default, dark when the kit or the system says dark. */
.detail-figure .capture-dark {display: none;}
:root[data-theme="dark"] .detail-figure .capture-light {display: none;}
:root[data-theme="dark"] .detail-figure .capture-dark {display: block;}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .detail-figure .capture-light {display: none;}
  :root:not([data-theme="light"]) .detail-figure .capture-dark {display: block;}
}
.detail .scope, .detail .tools {font-size: 1rem;}

/* CV: single column; the footer sits in the same column. */
.cv main {max-width: 920px; padding-block: 2.5rem 1rem;}
.cv footer.site .kit-wrap, .detail-page footer.site .kit-wrap {max-width: 920px;}
.cv h1 {font-size: 3rem; font-weight: 500; line-height: 1.1;}
.cv h2 {font-size: var(--viz-type-section); font-weight: 500; margin: 2rem 0 .75rem; border-top: 2px solid var(--viz-rule-strong); padding-top: .6rem;}
.cv h3 {font-size: 1.35rem; font-weight: 600; margin-top: 1rem;}
.cv main > p {margin-block: .75rem;}
.cv-subtitle {font-size: 1.4rem; color: var(--viz-muted);}
.cv-role {break-inside: avoid; padding-block: .25rem;}
.role-title {font-weight: 600;}
.role-title span {display: block; font-weight: 400; color: var(--viz-muted);}
.cv li {margin-bottom: .5rem;}

@media (max-width: 759px) {
  section.hub-hero {padding-block: 2rem 2.25rem;}
  .hub-hero .position p {font-size: 1.0625rem;}
  .group {margin-bottom: 2.5rem;}
  .group-head h2, .contact h2 {font-size: 1.5rem;}
  .pending ul {grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem;}
  .cv h1 {font-size: 2.3rem;}
}
@media (max-width: 380px) {.pending ul {grid-template-columns: 1fr;}}

@media print {
  :root, :root[data-theme="dark"] {color-scheme: light;}
  body {background: #fff !important; color: #000 !important;}
  h1, h2, h3, p, li, a, .tag, .scope, .tools, .role-title span, .site-role, .hero-role {color: #000 !important;}
  .kit-skip, .theme-toggle {display: none;}
  header.site nav a[href$="#studies"] {display: none;}
  header.site nav a[href^="mailto:"]::after {content: ": " attr(data-address);}
  .hub-hero {display: block; padding-block: .4cm;}
  .hub-hero h1 {font-size: 26pt; max-width: none;}
  .hub-hero .position {border: 0; padding: 0; margin-top: .3cm;}
  .hub-hero .position p {font-size: 11pt;}
  .group-head {display: block; margin-bottom: .3cm;}
  .cards {display: block;}
  .study, .foundation .study {display: grid; grid-template-columns: 4cm 1fr; gap: .5cm; break-inside: avoid; margin-bottom: .4cm;}
  .study > .thumb {min-height: 0; padding: .2cm; background: #fff !important; border-color: #000;}
  .thumb-figure, .thumb-unit, .thumb-caption {color: #000 !important;}
  .detail-figure .capture-dark {display: none !important;}
  .detail-figure .capture-light {display: block !important;}
  .study-copy {padding: 0; gap: .1cm;}
  .study h3 {font-size: 14pt;}
  .study p {font-size: 10pt;}
  .study-link {font-size: 10pt; min-height: 0;}
  .pending li {break-inside: avoid;}
  .cv main {padding-block: .3cm;}
  .cv {font-size: 10.5pt;}
  .cv h1 {font-size: 25pt;}
  .cv h2 {font-size: 17pt; margin: .4cm 0 .2cm;}
  .cv h3 {font-size: 13pt;}
  .cv-subtitle {font-size: 13pt;}
  @page {size: A4; margin: 1.5cm;}
}
