/* SHIFT Research Lab */

@font-face { font-family: "Plex Sans"; src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex Serif"; src: url("fonts/ibm-plex-serif-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Serif"; src: url("fonts/ibm-plex-serif-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Serif"; src: url("fonts/ibm-plex-serif-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --paper: #F4F3F8;
  --surface: #FFFFFF;
  --ink: #1A1840;
  --muted: #4E4C6B;
  --line: #CFCDE0;
  --teal: #2B2875;        /* primary indigo (kept variable name) */
  --teal-deep: #1C1A52;
  --teal-soft: #E6E4F3;
  --indigo-night: #17153F;
  --gold: #D9A93A;
  --gold-soft: #F1D998;
  --red: #C0463A;
  --sunk: #C0463A;

  --serif: "Plex Serif", Georgia, "Times New Roman", serif;
  --sans: "Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 72rem;
  --measure: 38rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--teal-deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

/* Type */
h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--ink); margin: 0; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.6rem); line-height: 1.08; letter-spacing: -0.015em; max-width: 18ch; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.2; letter-spacing: -0.01em; max-width: 24ch; }
h3 { font-family: var(--sans); font-weight: 600; font-size: 1.0625rem; line-height: 1.35; }
p { margin: 0 0 1em; max-width: var(--measure); }
.lede { font-size: clamp(1.125rem, 1.8vw, 1.3rem); line-height: 1.55; color: var(--ink); max-width: 36rem; }
.muted { color: var(--muted); }
.sub { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 1.15rem; margin-top: .5rem; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; padding-block: 1rem; }
.brand { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); line-height: 1.15; }
.brand:hover { color: var(--ink); }
.brand-mark { font-family: var(--serif); font-weight: 500; font-size: 1.45rem; letter-spacing: 0.04em; }
.brand-name { font-size: .8rem; color: var(--muted); }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; margin: 0; padding: 0; align-items: center; }
.site-nav a { color: var(--ink); text-decoration: none; font-size: .95rem; padding-block: .3rem; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--line); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--gold); }
.site-nav .nav-cta { background: var(--teal); color: #fff; padding: .45rem .9rem; border-radius: 3px; border: 0; }
.site-nav .nav-cta:hover { background: var(--teal-deep); color: #fff; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: center; margin-top: 1.75rem; }
.btn { display: inline-block; background: var(--teal); color: #fff; text-decoration: none; font-weight: 500; padding: .8rem 1.25rem; border-radius: 3px; border: 0; font: inherit; font-weight: 500; cursor: pointer; }
.btn:hover { background: var(--teal-deep); color: #fff; }
.btn-quiet { color: var(--teal); font-weight: 500; }

/* Sections */
section { padding-block: clamp(3rem, 7vw, 5.5rem); }
section + section { border-top: 1px solid var(--line); }
.section-head { margin-bottom: 2.25rem; }
.section-head p { margin-top: 1rem; }
.band { background: var(--surface); }
.band-teal { background: var(--teal-deep); color: #fff; }
.band-teal h2, .band-teal p { color: #fff; }
.band-teal .btn, .hero .btn { background: var(--gold); color: var(--indigo-night); }
.band-teal .btn:hover, .hero .btn:hover { background: var(--gold-soft); color: var(--indigo-night); }

/* Page heading */
.page-head { padding-block: clamp(3rem, 7vw, 5rem) clamp(2rem, 4vw, 3rem); }
.page-head h1 { max-width: 22ch; }
.page-head .lede { margin-top: 1.25rem; }

/* Hero */
.hero { padding-block: clamp(3rem, 7vw, 5.5rem); background: radial-gradient(ellipse at 85% 20%, #2E2A7A 0%, var(--indigo-night) 60%); color: #fff; }
.hero h1, .hero .lede { color: #fff; }
.hero .lede { color: #E4E2F3; }
.hero .btn-quiet { color: var(--gold-soft); }
.hero .btn-quiet:hover { color: #fff; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero .lede { margin-top: 1.5rem; }
.paths { margin: 0; }
.paths figcaption { font-size: .9rem; color: #C9C6E4; margin-top: .75rem; max-width: 30rem; }
.paths .p-sunk { stroke: var(--red); stroke-width: 3; stroke-dasharray: 7 7; fill: none; }
.paths .p-shift { stroke: var(--gold); stroke-width: 4; fill: none; stroke-linecap: round; }
.paths .node { fill: var(--indigo-night); stroke: #fff; stroke-width: 2.5; }
.paths .node-teal { fill: var(--gold); }
.paths .node-sunk { fill: var(--indigo-night); stroke: var(--red); stroke-width: 2.5; }
.paths text { font-family: var(--sans); font-size: 15px; fill: #fff; }
.paths .t-muted { fill: #B9B5DC; }
.paths .t-red { fill: #F09A8F; }
.paths .t-teal { fill: var(--gold); font-weight: 600; }
@media (prefers-reduced-motion: no-preference) {
  .paths .p-shift { stroke-dasharray: 520; stroke-dashoffset: 520; animation: draw 1.6s .4s ease-out forwards; }
  .paths .late { opacity: 0; animation: appear .5s 1.9s ease-out forwards; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }

/* Grids of items (ruled, not carded) */
.ruled { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.25rem 3rem; margin: 0; padding: 0; list-style: none; }
.ruled-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ruled > * { border-top: 2px solid var(--ink); padding-top: 1rem; }
.ruled h3 { margin-bottom: .5rem; }
.ruled p { margin: 0; color: var(--muted); }
.ruled dt { font-weight: 600; margin-bottom: .4rem; }
.ruled dd { margin: 0; color: var(--muted); }
.ruled > div { margin: 0; }
.more { margin-top: 2.25rem; }

/* Two-column text block */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }

/* Research streams */
.stream { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(1.5rem, 4vw, 3.5rem); padding-block: 2.75rem; border-top: 1px solid var(--line); }
.stream:first-of-type { border-top: 2px solid var(--ink); }
.stream .question { font-family: var(--serif); font-style: italic; font-size: 1.15rem; line-height: 1.45; color: var(--ink); margin-top: .9rem; }
.pubs { list-style: none; margin: 0; padding: 0; }
.pubs li { padding: .7rem 0; border-bottom: 1px solid var(--line); font-size: .97rem; }
.pubs li:last-child { border-bottom: 0; }
.pubs cite { font-style: italic; color: var(--muted); }
.pubs-label { font-weight: 600; font-size: .95rem; margin: 1.25rem 0 .25rem; }

/* Steps (true sequence) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; counter-reset: step; }
.steps li { counter-increment: step; border-top: 4px solid var(--gold); padding-top: 1rem; }
.steps li::before { content: counter(step); display: block; font-family: var(--serif); font-size: 2rem; line-height: 1; color: var(--teal); margin-bottom: .6rem; }
.steps h3 { margin-bottom: .4rem; }
.steps p { margin: 0; color: var(--muted); }

/* Plain lists */
.list { margin: 0; padding-left: 1.2rem; max-width: var(--measure); }
.list li { margin-bottom: .55rem; }
.list li::marker { color: var(--red); }

/* Director */
.director h2 { margin-bottom: 1rem; }
.facts { list-style: none; padding: 0; margin: 0; }
.facts li { padding: .65rem 0; border-bottom: 1px solid var(--line); }

/* Form */
.form { display: grid; gap: 1.1rem; max-width: 34rem; }
.form label { display: block; font-weight: 500; margin-bottom: .35rem; font-size: .95rem; }
.form input, .form select, .form textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid #9FAAB4; border-radius: 3px; padding: .7rem .8rem;
}
.form textarea { min-height: 9rem; resize: vertical; }
.form .hidden { position: absolute; left: -9999px; }
.form .note { font-size: .9rem; color: var(--muted); margin: 0; }

/* Footer */
.site-footer { background: var(--indigo-night); color: #D5DCE1; padding-block: 2.5rem; font-size: .92rem; }
.site-footer a { color: #fff; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.25rem 2rem; }
.footer-inner p { margin: 0; max-width: none; }
.footer-name { font-family: var(--serif); font-size: 1.15rem; color: #fff; }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid, .split, .stream { grid-template-columns: 1fr; }
  .ruled-3 { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .ruled, .ruled-3, .steps { grid-template-columns: 1fr; }
  body { font-size: 1rem; }
}

/* Brand mark accent */
.brand-mark { border-left: 4px solid var(--gold); padding-left: .5rem; }
.brand-name { padding-left: calc(.5rem + 4px); }

/* Stalled deployment call-out */
.callout { background: var(--surface); }
.stories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 3rem; margin: 2.25rem 0 0; }
.story { margin: 0; border-left: 4px solid var(--red); padding: .25rem 0 .25rem 1.25rem; }
.story p { font-family: var(--serif); font-size: 1.15rem; line-height: 1.5; margin: 0; }
.story figcaption { margin-top: .75rem; font-size: .92rem; color: var(--muted); }
.callout-close { margin-top: 2.25rem; }
.callout-close p { max-width: 42rem; }

/* News feed */
.news { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 2.5rem; }
.news li { border-top: 1px solid var(--line); padding: 1.1rem 0 1.4rem; }
.news a { color: var(--ink); text-decoration: none; font-family: var(--serif); font-size: 1.08rem; line-height: 1.4; display: block; }
.news a:hover { color: var(--teal); text-decoration: underline; }
.news .meta { display: block; margin-top: .5rem; font-size: .86rem; color: var(--muted); }
.news .meta b { font-weight: 500; color: var(--red); }
.news-status { font-size: .9rem; color: var(--muted); margin-top: 1.25rem; }
.news.loading li { min-height: 6.5rem; background: linear-gradient(90deg, transparent, var(--teal-soft), transparent) 0 0 / 200% 100%; }
@media (prefers-reduced-motion: no-preference) {
  .news.loading li { animation: shimmer 1.4s linear infinite; }
  .news li.fresh { animation: appear .5s ease-out both; opacity: 0; }
}
@keyframes shimmer { to { background-position: -200% 0; } }
@media (max-width: 900px) { .news { grid-template-columns: 1fr 1fr; } .stories { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .news { grid-template-columns: 1fr; } }

/* ===================== Decision-path design (v3) ===================== */
.hero { background: var(--indigo-night); padding-block: clamp(3.5rem, 8vw, 6rem) 0; }
.display { font-size: clamp(2.6rem, 7.2vw, 5.6rem); line-height: 1.02; letter-spacing: -0.02em; max-width: 15ch; color: #fff; }

/* The spine: a gold line that carries the reader down the page */
.spine { position: relative; padding-left: clamp(2.75rem, 6vw, 4.5rem); }
.spine::before { content: ""; position: absolute; left: 10px; top: .9rem; bottom: 0; width: 3px; background: var(--gold); transform-origin: top; }
.spine-end::before { bottom: auto; height: calc(100% - 2.6rem); }
.dot { position: absolute; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: var(--indigo-night); border: 3px solid var(--gold); }
.dot-start { top: .6rem; background: #fff; border-color: #fff; }

.hero-body { padding-bottom: clamp(3rem, 7vw, 5rem); }
.hero .lede { margin-top: 1.75rem; max-width: 34rem; }

/* Red branch: the build-first path that ends in sunk cost */
.branch { position: relative; margin: 2.5rem 0 2.5rem calc(-1 * clamp(2.75rem, 6vw, 4.5rem) + 12px); padding-left: clamp(2.75rem, 6vw, 4.5rem); }
.branch-line { display: flex; align-items: center; gap: 1rem; }
.branch-line::before { content: ""; flex: 1 1 auto; max-width: 30rem; border-top: 3px dashed var(--red); }
.branch-end { flex: none; width: 17px; height: 17px; border-radius: 50%; border: 3px solid var(--red); }
.branch-label { margin: .6rem 0 0; color: #F2A79D; font-size: .95rem; max-width: 30rem; }
.branch-label b { color: #fff; font-weight: 500; }

@media (prefers-reduced-motion: no-preference) {
  .hero .spine::before { animation: grow 1.2s .2s ease-out both; }
  .branch-line::before { transform-origin: left; animation: growx .9s 1.1s ease-out both; }
  .branch-end, .branch-label { animation: appear .4s 1.9s ease-out both; }
}
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes growx { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Checkpoints along the path */
.path-section { padding-block: 0 clamp(3rem, 7vw, 5rem); border-top: 0; }
.path-intro { padding-top: clamp(2.5rem, 6vw, 4rem); padding-bottom: 1rem; }
.path-intro h2 { max-width: 20ch; }
.checkpoint { position: relative; display: grid; grid-template-columns: 3.25rem minmax(0, 1fr) minmax(0, 1.1fr); gap: 0 2.5rem; padding-block: 2.25rem; border-bottom: 1px solid var(--line); }
.checkpoint .dot { top: 2.55rem; left: calc(-1 * clamp(2.75rem, 6vw, 4.5rem) + 3px); }
.checkpoint .num { font-family: var(--serif); font-size: 2.6rem; line-height: 1; color: var(--gold); font-weight: 500; }
.checkpoint h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.45rem, 2.6vw, 1.9rem); line-height: 1.2; }
.checkpoint p { margin: .2rem 0 0; color: var(--muted); }
.arrival { position: relative; padding-top: 2.25rem; }
.arrival .dot { top: 2.35rem; left: calc(-1 * clamp(2.75rem, 6vw, 4.5rem) - 2px); width: 27px; height: 27px; background: var(--gold); border-color: var(--gold); }
.arrival h3 { font-family: var(--serif); font-weight: 500; font-size: 1.6rem; }
.arrival p { color: var(--muted); margin-top: .4rem; }

/* Stuck call-out: gold band */
.stuck { background: var(--gold); color: var(--indigo-night); }
.stuck h2 { color: var(--indigo-night); font-size: clamp(2rem, 4.4vw, 3.2rem); line-height: 1.08; max-width: 12ch; }
.stuck .symptoms { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.stuck .symptoms li { font-family: var(--serif); font-size: 1.2rem; line-height: 1.4; padding: .8rem 0; border-bottom: 1px solid rgba(23, 21, 63, .35); }
.stuck .symptoms li:first-child { border-top: 1px solid rgba(23, 21, 63, .35); }
.stuck p { color: var(--indigo-night); }
.stuck .btn { background: var(--indigo-night); color: #fff; }
.stuck .btn:hover { background: var(--teal); color: #fff; }

/* Index rows (what we study) */
.index { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.index a { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 1.5rem; gap: 1.5rem; align-items: baseline; padding: 1.4rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.index .t { font-family: var(--serif); font-size: clamp(1.25rem, 2.2vw, 1.55rem); line-height: 1.25; }
.index .d { color: var(--muted); font-size: 1rem; }
.index .go { color: var(--red); font-size: 1.2rem; transition: transform .2s ease; }
.index a:hover .t { color: var(--teal); }
.index a:hover .go { transform: translateX(4px); }

/* Offers on indigo */
.offers { background: var(--teal-deep); color: #E4E2F3; }
.offers h2 { color: #fff; }
.offer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 2.5rem; }
.offer-cols > div { padding: 0 2rem; border-left: 1px solid rgba(217, 169, 58, .55); }
.offer-cols > div:first-child { padding-left: 0; border-left: 0; }
.offer-cols h3 { color: var(--gold); font-family: var(--serif); font-weight: 500; font-size: 1.3rem; margin-bottom: .6rem; }
.offer-cols p { margin: 0; }
.offers a { color: var(--gold-soft); }

/* Wire-style news list */
.wire { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.wire li { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.wire .meta { display: block; font-size: .84rem; color: var(--muted); margin-bottom: .25rem; }
.wire .meta b { color: var(--red); font-weight: 500; }
.wire a { font-family: var(--serif); font-size: 1.12rem; line-height: 1.4; color: var(--ink); text-decoration: none; }
.wire a:hover { color: var(--teal); text-decoration: underline; }
.wire.loading li { min-height: 4.4rem; background: linear-gradient(90deg, transparent, var(--teal-soft), transparent) 0 0 / 200% 100%; }
@media (prefers-reduced-motion: no-preference) {
  .wire.loading li { animation: shimmer 1.4s linear infinite; }
  .wire li.fresh { animation: appear .5s ease-out both; opacity: 0; }
}

/* Plain row list (Good Work dimensions) */
.rows { margin: 0; border-top: 2px solid var(--ink); }
.rows > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 1.5rem; padding: 1.2rem 0; border-bottom: 1px solid var(--line); }
.rows dt { font-family: var(--serif); font-size: 1.3rem; }
.rows dd { margin: 0; color: var(--muted); }

/* Studio steps on the spine */
.steps-spine .checkpoint { grid-template-columns: 3.25rem minmax(0, 1fr) minmax(0, 1.4fr); }

@media (max-width: 900px) {
  .checkpoint, .steps-spine .checkpoint { grid-template-columns: 2.75rem minmax(0, 1fr); }
  .checkpoint p { grid-column: 2; margin-top: .6rem; }
  .index a { grid-template-columns: minmax(0, 1fr) 1.5rem; }
  .index .d { grid-column: 1; grid-row: 2; }
  .index .go { grid-row: 1 / span 2; }
  .offer-cols { grid-template-columns: 1fr; gap: 1.75rem; }
  .offer-cols > div { padding: 0 0 0 1.25rem; border-left: 2px solid var(--gold); }
  .offer-cols > div:first-child { padding-left: 1.25rem; border-left: 2px solid var(--gold); }
  .rows > div { grid-template-columns: 1fr; gap: .3rem; }
}
/* v3 fixes */
.path-section .spine::before { top: 0; }
.branch { margin-left: calc(-1 * clamp(2.75rem, 6vw, 4.5rem) + 13px); padding-left: 0; }
.branch-line::before { max-width: calc(30rem + clamp(2.75rem, 6vw, 4.5rem)); }
.branch-label { padding-left: calc(clamp(2.75rem, 6vw, 4.5rem) - 13px); max-width: none; }
/* v4: stretched path heading, two news columns */
.path-intro h2 { max-width: none; font-size: clamp(2rem, 4.6vw, 3.5rem); line-height: 1.08; letter-spacing: -0.015em; }
.path-intro p { max-width: 48rem; }
.news-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem clamp(2rem, 5vw, 4rem); margin-top: 2rem; }
.news-head { font-family: var(--sans); font-weight: 600; font-size: 1rem; color: var(--ink); margin-bottom: .75rem; }
@media (max-width: 900px) { .news-cols { grid-template-columns: 1fr; } }
/* v5: four offers in two rows */
.offer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.25rem 3rem; }
.offer-cols > div, .offer-cols > div:first-child { padding: 0 0 0 1.25rem; border-left: 2px solid var(--gold); }
