/* venpod — one long-form case study in cove's element language.
   Paper / charcoal, one accent, one hairline, radius 0, no containers. */

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; background: #f6f2e7; }
html:has(body.story[data-mode="night"]) { background: #1c1c1c; }

body.story {
  --g: #f6f2e7;
  --paper: #f6f2e7;
  --ink: #191710;
  --mute: #332f26;
  --rule: #cec5b0;
  --rule-hi: #a49a83;
  --acc: #b3261e;
  --acc-ink: #f6f2e7;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  margin: 0;
  background: var(--g);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  color-scheme: light;
  transition: background-color 260ms cubic-bezier(.2,.7,.3,1), color 260ms cubic-bezier(.2,.7,.3,1);
}

body.story[data-mode="night"] {
  --g: #1c1c1c;
  --ink: #e8e5de;
  --mute: #a6a39c;
  --rule: #333333;
  --rule-hi: #4d4d4d;
  --acc: #dc6156;
  --acc-ink: #1c1c1c;
  color-scheme: dark;
  background: #1c1c1c;
  color: var(--ink);
}

body.story[data-ui] {
  --ui-ground: var(--g);
  --ui-ink: var(--ink);
  --ui-muted: var(--mute);
  --ui-rule: var(--rule);
  --ui-rule-strong: var(--rule-hi);
  --ui-accent: var(--acc);
  --ui-accent-ink: var(--acc-ink);
  --ui-dur: 120ms;
  --ui-dur-slow: 180ms;
}

a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; }

.st-skip {
  position: fixed; left: 1rem; top: -3.4rem; z-index: 90;
  background: var(--ink); color: var(--g); padding: .5rem .8rem;
  font: 400 12px/1 var(--mono); letter-spacing: .08em;
}
.st-skip:focus { top: .8rem; }

/* ---------- bar ---------- */

.st-bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1rem;
  padding: .7rem clamp(1rem, 4vw, 3rem);
  background: var(--g);
  border-bottom: 1px solid var(--ink);
}
.st-back, .st-src {
  display: inline-flex; align-items: center; gap: .4em;
  min-height: 28px;
  font: 400 12px/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mute);
  border-bottom: 1px solid transparent;
}
.st-back:hover, .st-src:hover { color: var(--ink); border-bottom-color: var(--rule); }
.st-back:focus-visible, .st-src:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }
.st-mark {
  margin: 0;
  font: 400 12px/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
}
.st-mark span { color: var(--acc); margin-right: .6em; }
.st-tools { margin-left: auto; display: flex; align-items: center; gap: 1.4rem; }
.st-theme { min-width: 0; }
html:not(.st-js) .st-theme { display: none; }

/* ---------- shell ---------- */

.st-shell {
  width: min(100% - 3rem, 78rem);
  margin-inline: auto;
  padding: 2.6rem 0 5rem;
  display: grid;
  grid-template-columns: 11.5rem minmax(0, 1fr);
  gap: 0 3.5rem;
  align-items: start;
}
.st-nav {
  position: sticky;
  top: 4.6rem;
  padding-top: .2rem;
}
.st-nav-h {
  margin: 0 0 .7rem;
  font: 400 12px/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mute);
}
.st-nav ol { list-style: none; margin: 0; padding: 0; }
.st-nav a {
  display: flex;
  gap: .7em;
  min-height: 30px;
  padding: .3rem 0 .3rem .8rem;
  border-left: 1px solid var(--rule);
  font: 400 12.5px/1.35 var(--sans);
  color: var(--mute);
  transition: color 120ms, border-color 120ms;
}
.st-nav a span {
  font: 400 11px/1.5 var(--mono);
  letter-spacing: .08em;
  color: var(--rule-hi);
  min-width: 1.4em;
}
.st-nav a:hover { color: var(--ink); }
.st-nav a.on { color: var(--acc); border-left-color: var(--acc); }
.st-nav a.on span { color: var(--acc); }
.st-nav a:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }

main { min-width: 0; }

/* ---------- hero ---------- */

.st-hero { padding-bottom: .2rem; }
.st-kicker {
  margin: 0 0 1rem;
  font: 400 12px/1 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mute);
}
.st-hero h1 {
  margin: 0;
  max-width: 18ch;
  font: 400 clamp(2.5rem, 1.3rem + 3.6vw, 4.5rem)/0.98 var(--serif);
  letter-spacing: -.03em;
}
.st-lead {
  margin: 1.2rem 0 0;
  max-width: 46ch;
  font: 400 clamp(1.15rem, 1rem + .5vw, 1.35rem)/1.45 var(--serif);
  color: var(--mute);
}
.st-facts {
  margin: 2.2rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  border-top: 1px solid var(--ink);
}
.st-facts > div { padding: .75rem 1.1rem .85rem 0; border-bottom: 1px solid var(--rule); min-width: 0; }
.st-facts > div + div { border-left: 1px solid var(--rule); padding-left: 1.1rem; }
.st-facts dt, .st-band dt {
  margin-bottom: .55rem;
  font: 400 12px/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mute);
}
.st-facts dd { margin: 0; font: 400 14.5px/1.4 var(--sans); overflow-wrap: anywhere; }

/* ---------- figures ---------- */

.st-figure { margin: 2.2rem 0 0; }
.st-figure--lead { margin-top: 2.6rem; }
.st-figure img, .st-figure video {
  display: block;
  width: 100%;
  height: auto;
  background: #0d0d0d;
}
.st-figure video { aspect-ratio: 16 / 9; object-fit: cover; }
.st-figure figcaption {
  margin-top: .55rem;
  padding-top: .5rem;
  border-top: 1px solid var(--rule);
  font: 400 12px/1.5 var(--mono);
  letter-spacing: .04em;
  color: var(--mute);
}
.st-duo { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 1.4rem; }

/* ---------- sections ---------- */

.st-sec { margin-top: 3.6rem; padding-top: 2.4rem; border-top: 1px solid var(--rule); }
.st-sec h2 {
  margin: 0 0 1.2rem;
  font: 400 clamp(1.7rem, 1.2rem + 1.3vw, 2.3rem)/1.06 var(--serif);
  letter-spacing: -.02em;
}
.st-sec h2 span {
  display: inline-block;
  margin-right: .7em;
  font: 400 12px/1 var(--mono);
  letter-spacing: .12em;
  color: var(--acc);
  vertical-align: .45em;
}
.st-sec p {
  margin: 0 0 1.05rem;
  max-width: 66ch;
  font: 400 1.0625rem/1.66 var(--sans);
}
.st-sec p:last-child { margin-bottom: 0; }
.st-sec code {
  font: 400 .92em/1 var(--mono);
  border-bottom: 1px solid var(--rule);
  overflow-wrap: anywhere;
}
.st-pull {
  margin: 1.8rem 0 0 !important;
  padding-left: 1rem;
  border-left: 2px solid var(--acc);
  max-width: 42ch !important;
  font: 400 1.5rem/1.34 var(--serif) !important;
}

/* stages */

.st-stages, .st-rec, .st-limits { list-style: none; margin: 1.9rem 0 0; padding: 0; }
.st-stages li {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: .9rem 0;
  border-top: 1px solid var(--rule);
}
.st-stages li:last-child { border-bottom: 1px solid var(--rule); }
.st-stages b {
  font: 400 12px/1.5 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--acc);
}
.st-stages span { font: 400 15px/1.55 var(--sans); color: var(--ink); }

.st-rec li {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 1rem;
  padding: .6rem 0;
  border-top: 1px solid var(--rule);
}
.st-rec li:last-child { border-bottom: 1px solid var(--rule); }
.st-rec span { font: 400 12px/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.st-rec b { font: 400 14.5px/1.55 var(--sans); }

/* evidence band */

.st-band {
  margin: 2rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  border-top: 1px solid var(--ink);
}
.st-band > div { padding: .8rem 1rem .9rem 0; border-bottom: 1px solid var(--rule); }
.st-band > div + div { border-left: 1px solid var(--rule); padding-left: 1rem; }
.st-band dd {
  margin: 0;
  font: 400 clamp(1.15rem, 1rem + .5vw, 1.5rem)/1.15 var(--serif);
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
}
.st-band dd i { font-style: normal; color: var(--rule-hi); }
.st-note {
  margin: 1.1rem 0 0 !important;
  max-width: none !important;
  padding-top: .8rem;
  border-top: 1px solid var(--rule);
  font: 400 12.5px/1.6 var(--mono) !important;
  letter-spacing: .02em;
  color: var(--mute);
}
.st-note span { display: block; max-width: 66ch; }

.st-limits li { padding: .85rem 0; border-top: 1px solid var(--rule); font: 400 15px/1.6 var(--sans); }
.st-limits li:last-child { border-bottom: 1px solid var(--rule); }
.st-limits b { font-weight: 400; color: var(--acc); }

/* ---------- foot ---------- */

.st-foot {
  margin-top: 3.6rem;
  padding-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 2rem;
  border-top: 1px solid var(--ink);
}
.st-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  font: 400 12px/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  transition: color 120ms, border-color 120ms;
}
.st-link:hover { color: var(--acc); border-bottom-color: var(--acc); }
.st-link:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .st-shell { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .st-nav { position: static; padding: 0 0 1.6rem; }
  .st-nav ol { display: flex; flex-wrap: wrap; gap: .1rem 1.2rem; }
  .st-nav a { border-left: 0; border-bottom: 1px solid var(--rule); padding: .25rem 0; }
  .st-nav a.on { border-bottom-color: var(--acc); }
  .st-nav-h { display: none; }
}

@media (max-width: 760px) {
  .st-duo { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .st-stages li { grid-template-columns: 5rem minmax(0, 1fr); gap: .8rem; }
  .st-rec li { grid-template-columns: 5.6rem minmax(0, 1fr); gap: .8rem; }
}

@media (max-width: 620px) {
  .st-shell { width: calc(100% - 1.6rem); padding-top: 1.6rem; }
  .st-bar { padding: .6rem .8rem; }
  .st-mark { font-size: 11px; letter-spacing: .1em; }
  .st-tools { gap: .9rem; }
  .st-hero h1 { font-size: clamp(2.1rem, 1rem + 8vw, 3.1rem); }
  .st-lead { font-size: 1.1rem; }
  .st-facts { grid-template-columns: minmax(0, 1fr); }
  .st-facts > div + div { border-left: 0; padding-left: 0; }
  .st-sec { margin-top: 2.8rem; padding-top: 1.8rem; }
  .st-sec p { font-size: 1rem; }
  .st-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-band > div + div { padding-left: 0; }
  .st-band > div:nth-child(even) { padding-left: 1rem; border-left: 1px solid var(--rule); }
  .st-band > div:nth-child(3) { border-left: 0; padding-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  body.story, .st-nav a, .st-link, .st-sec, .st-figure img, .st-figure video { transition: none !important; animation: none !important; }
}

@media (pointer: coarse) {
  .st-back, .st-src, .st-link { min-height: 44px; }
  .st-nav a { min-height: 44px; align-items: center; }
}
