/* ELO Labs hairline rule, applied site-wide.
   Every ruled element is either a closed box, or its rules run all the way to
   the outer hairlines of the box it sits in. Loaded last on every page.
   --bx is the inner padding of the enclosing bounded box, so a "bleed" can
   cancel it exactly. */
:root { --hl: rgba(27, 27, 27,.18); }
.secblock { --bx: var(--gut); }
.labs-section .secblock, .labs-advisors .secblock, .labs-principles-sec .secblock { --bx: clamp(1.25rem, 3.2vw, 3rem); }
@media (max-width: 700px) { .labs-section .secblock { --bx: 1.25rem; } }

/* Rules that run edge to edge inside their box */
.labs-scrolly, .labs-foundation, .labs-flow, .labs-possibilities, .logsTalks__list {
  margin-inline: calc(-1 * var(--bx));
  padding-inline: var(--bx);
}
/* Data foundation: one top and one bottom rule, dividers between cells */
.labs-foundation { border-bottom: 1px solid var(--hair); }
.labs-foundation > div { border-bottom: 0 !important; }
/* Talks: the box's own bottom edge closes the list, no double rule */
.logsTalks__item:last-child { border-bottom: 0; }
/* Logs grid already runs edge to edge; close it at the bottom too */
.logsGrid { border-bottom: 1px solid var(--hair); }
.logsGrid:last-child { margin-bottom: 0; border-bottom: 0; }

/* Data layers: the inputs column becomes a closed box, like the figure beside it */
.labs-inputs { border: 1px solid var(--hair); padding: 0 1.2rem; }
.labs-inputs article:last-child { border-bottom: 0; }

/* A banner that ends its box does not draw a second bottom rule */
.secblock > .banner:last-child { border-bottom: 0; }

/* Closing CTA: no floating horizontal rule; the vertical rule runs full height */
.labs-site-cta .vol-rules i:first-child { display: none; }

/* ---------- Product briefs (Vigil, Altiera, Polysoma): bounded boxes ---------- */
.labs-brief .section, .labs-brief .section.alt {
  padding: 3.5rem clamp(1rem, 4vw, 3rem) 0 !important;
  background: transparent !important;
}
.labs-brief main > .section:last-child { padding-bottom: 3.5rem !important; }
.labs-brief .section > .container {
  --bx: clamp(1.25rem, 3.2vw, 3rem);
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
  padding: var(--bx);
  border: 1px solid var(--hl);
  background: #f5f6f2;
}
.labs-brief .labs-product-hero.hasBanner.top { padding-bottom: 0; }
/* Spec rows run edge to edge */
.labs-brief .p-specs { margin-inline: calc(-1 * var(--bx)); border-top-color: var(--hl); }
.labs-brief .p-spec { padding-inline: var(--bx); }
/* Open questions row runs edge to edge */
.labs-brief .p-uses.p-uses-3 { margin-inline: calc(-1 * var(--bx)); border-top-color: var(--hl); }
.labs-brief .p-uses.p-uses-3 .p-use:first-child { padding-left: var(--bx); }
.labs-brief .p-uses.p-uses-3 .p-use:last-child { padding-right: var(--bx); }
/* Method comparison table runs edge to edge */
.labs-brief .p-compare { width: calc(100% + 2 * var(--bx)); margin-inline: calc(-1 * var(--bx)); }
.labs-brief .p-compare tr > :first-child { padding-left: var(--bx); }
.labs-brief .p-compare tr > :last-child { padding-right: var(--bx); }
.labs-brief .labs-compare-h { margin-top: 0; }
@media (max-width: 760px) {
  .labs-brief .p-uses.p-uses-3 .p-use { padding-inline: var(--bx) !important; }
}
/* Row-ruled lists: rows carry the rules, so the rows take the inner padding */
.logsTalks__list { padding-inline: 0; }
.logsTalks__item { padding-inline: var(--bx); }
.labs-inputs { padding: 0; }
.labs-inputs article { padding-inline: 1.2rem; }
/* An edge-to-edge row that ends its box sits on the box's own bottom rule */
.labs-possibilities:last-child, .labs-flow:last-child, .labs-foundation:last-child {
  margin-bottom: calc(-1 * var(--by));
  border-bottom: 0;
}
.labs-brief .container > .p-specs:last-child,
.labs-brief .container > .p-uses:last-child { margin-bottom: calc(-1 * var(--by)); }
.labs-brief .container > .p-specs:last-child > .p-spec:last-child,
.labs-brief .container > .p-uses.p-uses-3:last-child > .p-use { border-bottom: 0; }

/* ---------- Splits instead of boxes inside boxes ----------
   Side-by-side content runs to the box's outer hairlines and is divided by a
   single rule, with equal halves (or equal quarters for the flow). */

/* Data layers: figure | inputs, 50/50, sitting on the box's bottom rule */
.labs-layer-grid {
  grid-template-columns: 1fr 1fr; gap: 0; align-items: stretch;
  margin: 0 calc(-1 * var(--bx)) calc(-1 * var(--by));
  border-top: 1px solid var(--hair);
}
.labs-layer-grid > .labs-figure { margin: 0; border: 0; background: transparent; display: flex; flex-direction: column; }
.labs-layer-grid > .labs-figure .figpanel__tag { padding: var(--by) var(--by) 0 var(--bx); }
.labs-layer-grid > .labs-figure .figpanel__body { flex: 1; padding: calc(var(--by) + 2.4rem) var(--by) var(--by) var(--bx); }
.labs-layer-grid > .labs-inputs { border: 0; border-left: 1px solid var(--hair); }
.labs-layer-grid > .labs-inputs article { flex: 1 1 0; display: flex; flex-direction: column; justify-content: center; padding: 1.4rem var(--bx) 1.4rem var(--by); }

/* Simulation: text | figure, 50/50, sitting on the box's bottom rule */
.labs-simulation {
  grid-template-columns: 1fr 1fr; gap: 0; align-items: stretch;
  margin: calc(-1 * var(--by)) calc(-1 * var(--bx));
}
.labs-simulation > div { display: flex; flex-direction: column; justify-content: center; padding: var(--by) var(--by) var(--by) var(--bx); }
.labs-simulation > .labs-figure { padding: var(--by) var(--bx) var(--by) var(--by); }
.labs-simulation > .labs-figure { margin: 0; border: 0; border-left: 1px solid var(--hair); background: transparent; display: flex; flex-direction: column; }
.labs-simulation > .labs-figure .figpanel__tag { padding: var(--by) var(--bx) 0 var(--by); }
.labs-simulation > .labs-figure .figpanel__body { flex: 1; padding: calc(var(--by) + 2.4rem) var(--bx) var(--by) var(--by); }

/* Model flow: four equal cells divided by rules, arrows sit on the dividers */
.labs-flow { grid-template-columns: repeat(4, 1fr) !important; gap: 0; padding: 0 !important; align-items: stretch; }
.labs-flow > i { display: none; }
.labs-flow > div { position: relative; min-height: 150px; border: 0 !important; padding: 1.4rem clamp(1rem, 2vw, 1.6rem); background: transparent; }
.labs-flow > div:first-of-type { padding-left: var(--bx); }
.labs-flow > div:last-of-type { padding-right: var(--bx); }
.labs-flow > div + i + div { border-left: 1px solid var(--hair) !important; }
.labs-flow > div:not(:last-of-type)::after {
  content: "\2192"; position: absolute; right: clamp(1rem, 2vw, 1.6rem); top: 1.25rem; z-index: 1;
  display: block; border: 0; background: none; width: auto; height: auto;
  color: var(--red); font: 600 1.35rem/1 var(--mono); transform: none;
}
.labs-flow > .labs-flow-core { background: rgba(var(--accent-rgb),.05); }
.labs-flow > .labs-flow-core small { color: var(--red); }

/* How Labs fits: steps | figure, 50/50, one divider running the full height */
.labs-scrolly {
  grid-template-columns: 1fr 1fr; gap: 0; padding-inline: 0;
  margin-bottom: calc(-1 * var(--by));
  background: linear-gradient(var(--hair), var(--hair)) 50% 0 / 1px 100% no-repeat;
}
.labs-scrolly__steps { padding-inline: var(--bx) var(--by); }
.labs-scrolly__stage { padding: var(--by) var(--bx) var(--by) var(--by); }
.labs-scrolly__fig { border: 0; background: transparent; }
.labs-scrolly__fig .figpanel__tag { padding: 0; }
.labs-scrolly__fig .figpanel__body { padding: 2.4rem 0 0; }

@media (max-width: 900px) {
  .labs-layer-grid, .labs-simulation { grid-template-columns: 1fr; }
  .labs-layer-grid > .labs-inputs, .labs-simulation > .labs-figure { border-left: 0; border-top: 1px solid var(--hair); }
}
@media (max-width: 899px) {
  .labs-scrolly { grid-template-columns: 1fr; background: none; }
  .labs-scrolly__stage { padding: .8rem var(--bx); border-bottom: 1px solid var(--hair); }
}
@media (max-width: 700px) {
  .labs-flow { grid-template-columns: repeat(2, 1fr) !important; }
  .labs-flow > div { padding-inline: var(--bx) !important; }
  .labs-flow > div + i + div { border-left: 0 !important; }
  .labs-flow > div:nth-of-type(even) { border-left: 1px solid var(--hair) !important; }
  .labs-flow > div:nth-of-type(n+3) { border-top: 1px solid var(--hair) !important; }
}

/* ---------- Card grids run to the outer hairlines ----------
   The grid loses its own left edge, its right-hand and (when it ends the box)
   bottom rules fall under the box border and are clipped, so only one line
   is ever drawn on each edge. First and last columns take the box padding. */
.labs-brief .section > .container { overflow: clip; }
.labs-findings, .labs-systems, .labs-index--inquiry, .labs-advisors__grid, .labs-principles-grid, .labs-brief .p-steps, .labs-brief .p-others { margin-left: calc(-1 * var(--bx)); margin-right: calc(-1 * var(--bx) - 1px); border-left: 0 !important; }
.labs-advisors__grid:last-child, .labs-principles-grid:last-child { margin-bottom: calc(-1 * var(--by) - 1px); }
.labs-findings { grid-template-columns: repeat(4, 1fr) !important; }
.labs-findings > article:nth-child(4n+1) { padding-left: var(--bx) !important; }
.labs-findings > article:nth-child(4n) { padding-right: calc(var(--bx) + 1px) !important; }
.labs-systems { grid-template-columns: repeat(3, 1fr) !important; }
.labs-systems > a:nth-child(3n+1) > .labs-system-copy { padding-left: var(--bx) !important; }
.labs-systems > a:nth-child(3n) > .labs-system-copy { padding-right: calc(var(--bx) + 1px) !important; }
.labs-index--inquiry { grid-template-columns: repeat(3, 1fr) !important; }
.labs-index--inquiry > a:nth-child(3n+1) { padding-left: var(--bx) !important; }
.labs-index--inquiry > a:nth-child(3n) { padding-right: calc(var(--bx) + 1px) !important; }
.labs-advisors__grid { grid-template-columns: repeat(4, 1fr) !important; }
.labs-advisors__grid > article:nth-child(4n+1) { padding-left: var(--bx) !important; }
.labs-advisors__grid > article:nth-child(4n) { padding-right: calc(var(--bx) + 1px) !important; }
.labs-principles-grid { grid-template-columns: repeat(3, 1fr) !important; }
.labs-principles-grid > article:nth-child(3n+1) { padding-left: var(--bx) !important; }
.labs-principles-grid > article:nth-child(3n) { padding-right: calc(var(--bx) + 1px) !important; }
.labs-brief .p-steps { grid-template-columns: repeat(4, 1fr) !important; }
.labs-brief .p-steps > .p-step:nth-child(4n+1) { padding-left: var(--bx) !important; }
.labs-brief .p-steps > .p-step:nth-child(4n) { padding-right: calc(var(--bx) + 1px) !important; }
.labs-brief .p-others { grid-template-columns: repeat(3, 1fr) !important; }
.labs-brief .p-others > a:nth-child(3n+1) { padding-left: var(--bx) !important; }
.labs-brief .p-others > a:nth-child(3n) { padding-right: calc(var(--bx) + 1px) !important; }
@media (max-width: 1000px) {
  .labs-findings { grid-template-columns: repeat(2, 1fr) !important; }
  .labs-findings > article { padding-left: 1.3rem; padding-right: 1.3rem; }
  .labs-findings > article:nth-child(2n+1) { padding-left: var(--bx) !important; }
  .labs-findings > article:nth-child(2n) { padding-right: calc(var(--bx) + 1px) !important; }
  .labs-advisors__grid { grid-template-columns: repeat(2, 1fr) !important; }
  .labs-advisors__grid > article { padding-left: 1.3rem; padding-right: 1.3rem; }
  .labs-advisors__grid > article:nth-child(2n+1) { padding-left: var(--bx) !important; }
  .labs-advisors__grid > article:nth-child(2n) { padding-right: calc(var(--bx) + 1px) !important; }
  .labs-brief .p-steps { grid-template-columns: repeat(2, 1fr) !important; }
  .labs-brief .p-steps > .p-step { padding-left: 1.3rem; padding-right: 1.3rem; }
  .labs-brief .p-steps > .p-step:nth-child(2n+1) { padding-left: var(--bx) !important; }
  .labs-brief .p-steps > .p-step:nth-child(2n) { padding-right: calc(var(--bx) + 1px) !important; }
  .labs-brief .p-others { grid-template-columns: repeat(1, 1fr) !important; }
  .labs-brief .p-others > a { padding-left: 1.3rem; padding-right: 1.3rem; }
  .labs-brief .p-others > a { padding-left: var(--bx) !important; padding-right: calc(var(--bx) + 1px) !important; }
}
@media (max-width: 900px) {
  .labs-principles-grid { grid-template-columns: repeat(1, 1fr) !important; }
  .labs-principles-grid > article { padding-left: 1.3rem; padding-right: 1.3rem; }
  .labs-principles-grid > article { padding-left: var(--bx) !important; padding-right: calc(var(--bx) + 1px) !important; }
}
@media (max-width: 899px) {
  .labs-index--inquiry { grid-template-columns: repeat(1, 1fr) !important; }
  .labs-index--inquiry > a { padding-left: 1.3rem; padding-right: 1.3rem; }
  .labs-index--inquiry > a { padding-left: var(--bx) !important; padding-right: calc(var(--bx) + 1px) !important; }
}
@media (max-width: 700px) {
  .labs-systems { grid-template-columns: repeat(1, 1fr) !important; }
  .labs-systems > a > .labs-system-copy { padding-left: 1.3rem; padding-right: 1.3rem; }
  .labs-systems > a > .labs-system-copy { padding-left: var(--bx) !important; padding-right: calc(var(--bx) + 1px) !important; }
  .labs-brief .p-steps { grid-template-columns: repeat(1, 1fr) !important; }
  .labs-brief .p-steps > .p-step { padding-left: 1.3rem; padding-right: 1.3rem; }
  .labs-brief .p-steps > .p-step { padding-left: var(--bx) !important; padding-right: calc(var(--bx) + 1px) !important; }
}
@media (max-width: 600px) {
  .labs-findings { grid-template-columns: repeat(1, 1fr) !important; }
  .labs-findings > article { padding-left: 1.3rem; padding-right: 1.3rem; }
  .labs-findings > article { padding-left: var(--bx) !important; padding-right: calc(var(--bx) + 1px) !important; }
  .labs-advisors__grid { grid-template-columns: repeat(1, 1fr) !important; }
  .labs-advisors__grid > article { padding-left: 1.3rem; padding-right: 1.3rem; }
  .labs-advisors__grid > article { padding-left: var(--bx) !important; padding-right: calc(var(--bx) + 1px) !important; }
}

/* Dark illustrations fill the lower part of their box, edge to edge */
.labs-brief #model .container > figure { margin: 0 calc(-1 * var(--bx)) calc(-1 * var(--by)); border: 0; max-width: none; width: auto; }
/* Steps followed directly by spec rows share one rule */
.labs-brief .p-steps + .p-specs { margin-top: 0; border-top: 0; }
@media (max-width: 600px) { .labs-findings > article { min-height: 0; } }

/* Research hero: the banner (and its animation) fills its box to the outer hairlines, like every other page hero */
#research-hero > .secblock { padding: 0; }

/* Trust page: the four commitments run to the box bottom */
#boundaries .p-steps { margin-bottom: calc(-1 * var(--by) - 1px); }

/* ---------- Larger small text ---------- */
.labs-section .figpanel__tag, .labs-figure .figpanel__tag { font-size: 12px !important; }
.labs-figure .figpanel__cap, .labs-scrolly__cap { font-size: 12.5px !important; line-height: 1.55 !important; max-width: 60ch !important; }
.labs-section .readout, .labs-closing .readout { font-size: 14px !important; line-height: 1.6; letter-spacing: .08em; }
.labs-section .brief-link, .labs-inputs a, .labs-simulation .brief-link, .labs-systems b, .labs-index b, .labs-brief .p-others b { font-size: 13px !important; letter-spacing: .08em; }
.labs-flow small, .labs-principles small, .labs-inputs small, .labs-index small, .labs-possibilities small, .labs-systems small, .labs-findings small, .labs-advisor small { font-size: 11px !important; }
.labs-scrolly .ls-note text { font-size: 14px; }
.labs-flow b { font-size: 1.1rem; }
@media (max-width: 700px) { .labs-flow > div:nth-of-type(even)::after { display: none; } }

/* Closing CTA: the central rule continues up to the box above, same colour */
main { position: relative; }
main::after {
  content: ""; position: absolute; left: 48%; bottom: 0; width: 1px; height: 56px;
  background: rgba(var(--accent-rgb),.16); pointer-events: none;
}

/* ---------- Full width ----------
   Sections run edge to edge, separated by one hairline; no side rules.
   --bx is the horizontal gutter (screen edge to content edge), --by the vertical one.
   Only the components listed under "Boxed" keep a closed box. */
:root { --fw-gut: clamp(1.25rem, 3.2vw, 3rem); --by: clamp(1.25rem, 3.2vw, 3rem); --fw-bx: max(var(--fw-gut), calc((100vw - 1400px) / 2 + var(--fw-gut))); }
.boundedSection { padding: 0 !important; }
.boundedSection > .secblock, .labs-section .secblock, .labs-advisors .secblock, .labs-principles-sec .secblock {
  --bx: var(--fw-bx);
  max-width: none; width: 100%; margin: 0; border-width: 1px 0; padding: 0;
}
.boundedSection + .boundedSection > .secblock { border-top-width: 0; }
.boundedSection > .secblock > .secbody { max-width: none; padding: clamp(3.5rem, 6vw, 5rem) var(--bx) var(--by); }
@media (max-width: 700px) { .boundedSection > .secblock { --bx: 1.25rem; } }
.labs-scrolly__steps article:last-child { padding-bottom: clamp(3rem, 8vw, 6rem); }
/* Equal column widths for full-bleed grids: outer cells absorb the gutter */
@media (min-width: 1001px) { .labs-advisors__grid { grid-template-columns: calc((100% - 2 * var(--bx)) / 4 + var(--bx)) repeat(2, calc((100% - 2 * var(--bx)) / 4)) calc((100% - 2 * var(--bx)) / 4 + var(--bx)); } }
@media (min-width: 901px) { .labs-principles-grid { grid-template-columns: calc((100% - 2 * var(--bx)) / 3 + var(--bx)) calc((100% - 2 * var(--bx)) / 3) calc((100% - 2 * var(--bx)) / 3 + var(--bx)); } }

/* ----- Boxed: closed boxes inside the full-width sections ----- */
body .labs-findings, body .labs-systems, body .labs-index--inquiry, body.labs-brief .p-steps, body.labs-brief .p-others {
  margin-left: 0 !important; margin-right: 0 !important; border-left: 1px solid var(--hair) !important;
}
body .labs-findings > article:nth-child(n), body .labs-index--inquiry > a:nth-child(n) { padding: 1.3rem !important; }
body .labs-systems > a:nth-child(n) > .labs-system-copy { padding: 1.4rem !important; }
body .labs-flow { margin-inline: 0 !important; padding-inline: 0 !important; border: 1px solid var(--hair) !important; }
body .labs-flow > div:nth-of-type(n) { padding-inline: clamp(1rem, 2vw, 1.6rem) !important; }
body .labs-flow:last-child { margin-bottom: 0 !important; }
body.labs-brief .p-steps > .p-step:nth-child(n) { padding: 30px 28px 40px !important; }
body.labs-brief .p-others > a:nth-child(n) { padding: 28px !important; }
body .labs-foundation, body .labs-possibilities { margin-inline: 0 !important; padding-inline: 0 !important; border: 1px solid var(--hair) !important; }
body .labs-foundation > div:first-child { padding-left: 1.8rem; }
body .labs-possibilities > article:first-child { padding-left: 1rem; }
body .labs-possibilities:last-child, body .labs-foundation:last-child { margin-bottom: 0 !important; }
body.labs-brief .p-specs { margin-inline: 0 !important; border: 1px solid var(--hl) !important; border-top: 0 !important; }
body.labs-brief .p-spec { padding-inline: 1.3rem !important; }
body.labs-brief #model .container > figure { margin: 0 !important; border: 1px solid var(--hl) !important; }
#boundaries .p-steps { margin-bottom: 0 !important; }
/* Logs stays in its original closed box */
#logs.boundedSection { padding: 3.5rem clamp(1rem, 4vw, 3rem) !important; }
#logs.boundedSection > .secblock { --bx: var(--gut); max-width: 1400px; margin-inline: auto; border: 1px solid var(--hair); padding: var(--gut) 0 0; }
#logs.boundedSection > .secblock > .secbody { max-width: none; margin: 0; border: 0; padding: 0; }

/* Product briefs: sections full width, no container box */
.labs-brief .section, .labs-brief .section.alt { padding: 0 !important; border-top: 1px solid var(--hl); }
.labs-brief main > .section:last-child { padding-bottom: 0 !important; border-bottom: 1px solid var(--hl); }
.labs-brief .section > .container {
  --bx: var(--fw-bx);
  max-width: none; margin: 0; border-width: 0; background: transparent;
  padding: clamp(3rem, 6vw, 5rem) var(--bx) var(--by);
}
@media (max-width: 700px) { .labs-brief .section > .container { --bx: 1.25rem; } }

/* Page heroes (product briefs, research, about, mission): full bleed, no box */
.hasBanner.top, .labs-product-hero.hasBanner.top { padding-inline: 0; padding-bottom: 0; }
.hasBanner.top > .secblock, .labs-product-hero > .secblock { max-width: none; border-width: 0; }
.hasBanner.top .banner.banner--hero { border-bottom: 1px solid var(--hl); }
.hasBanner.top .bannerTxt { padding-left: var(--fw-bx); }
@media (max-width: 900px) { .hasBanner.top .bannerTxt { padding-left: clamp(1.4rem,5vw,2rem); } }
/* Home hero: text on the content edge; the status strip stays a closed box */
.hero-left { width: min(100%, 1400px); max-width: none; margin-inline: auto; padding-inline: var(--fw-gut); }
.counter-strip--hero .cs-cell { border-bottom: 0; padding-inline: var(--fw-gut); }
