/* ============================================================
   CASE-STUDY PAGES — shared stylesheet (used by every /work/ page)
   Warm Editorial tokens per brand-spec.md. Same nav + footer as
   the landing page. This page type's one signature: the 2px
   terracotta reading-progress hairline.
   ============================================================ */

/* == Tokens == */
:root {
  --bg: #FAF7F2;
  --fg: #1C1A17;
  --accent: #C0512F;
  --accent-2: #2F5B4F;
  --muted: #8A817A;
  --surface: #FFFFFF;
  --hairline: rgba(28, 26, 23, 0.12);

  --font-display: 'Fraunces', 'GT Sectra', 'Times New Roman', serif;
  --font-body: 'Public Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: 'Fragment Mono', 'JetBrains Mono', ui-monospace, Menlo, monospace;

  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --container: 1200px;
}

/* == Base == */
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 1px;
}
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 32px;
}
.mono {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 400;
}
.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 300;
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--hairline);
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: top 150ms var(--ease-standard);
}
.skip-link:focus-visible { top: 16px; }

/* == Reading progress — the case page's one signature == */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--accent);
  z-index: 200;
}

/* == Nav (same as landing) == */
.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(250, 247, 242, 0.82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.site-nav .container {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-block: 24px;
  transition: padding 250ms var(--ease-standard);
}
.site-nav.compact .container { padding-block: 12px; }
.wordmark {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 20px;
  font-weight: 550;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.nav-links {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.nav-links a { text-decoration: none; padding-block: 2px; }
.nav-links a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}
.nav-links .dot { color: var(--muted); user-select: none; }

/* == Case header == */
.case { padding-top: 150px; }
.crumb { margin: 0 0 44px; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--fg); }
.eyebrow { margin: 0 0 22px; color: var(--muted); }
.case-title {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: clamp(56px, 6vw, 80px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 16ch;
}
.thesis-line {
  margin: 0 0 56px;
  font-size: 20px;
  line-height: 1.5;
  max-width: 55ch;
}

/* == Hero media + placeholder frames == */
.frame {
  margin: 0;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  overflow: hidden;
}
.ph-img {
  background: rgba(28, 26, 23, 0.045);
  display: grid;
  place-items: center;
  padding: 24px;
}
.ph-label {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  line-height: 1.8;
  max-width: 46ch;
}
.case-hero { aspect-ratio: 16 / 9; }
@keyframes hero-in {
  from { opacity: 0; transform: scale(1.04); }
  to   { opacity: 1; transform: scale(1); }
}
html.js .case-hero { animation: hero-in 300ms var(--ease-standard) both; }

/* == At-a-glance strip == */
.glance {
  margin: 64px 0 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid var(--hairline);
}
.g-item { padding: 18px 20px 20px; margin: 0; }
.g-item + .g-item { border-left: 1px solid var(--hairline); }
.g-item dt { font-size: 11px; color: var(--muted); margin: 0 0 8px; }
.g-item dd { margin: 0; font-size: 13px; line-height: 1.7; }

/* == Numbered sections == */
.case-sec { padding-top: 112px; }
.sec-head {
  display: flex;
  align-items: baseline;
  gap: 20px;
}
.sec-head .idx { color: var(--muted); font-size: 13px; }
.sec-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.sec-head .rule-draw {
  flex: 1;
  height: 1px;
  background: var(--hairline);
  align-self: center;
}
/* headers fade in once, with their rule (observer adds .in) */
html.js .sec-head { opacity: 0; transition: opacity 300ms var(--ease-standard); }
html.js .sec-head.in { opacity: 1; }
html.js .sec-head .rule-draw {
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 300ms var(--ease-standard) 60ms;
}
html.js .sec-head.in .rule-draw { transform: scaleX(1); }
.sec-body {
  margin-top: 36px;
  padding-left: 56px;
  max-width: 70ch;
}
.sec-body p { margin: 0 0 20px; font-size: 17px; line-height: 1.7; }
.sec-body p:last-child { margin-bottom: 0; }
.slot { color: var(--muted); }

/* == 03 Product Decisions — the visual centerpiece == */
.decisions {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: d;
}
.decision {
  counter-increment: d;
  display: grid;
  grid-template-columns: 48px 1fr;
  padding: 30px 0 34px;
  border-top: 1px solid var(--hairline);
}
.decision:first-child { border-top: 0; padding-top: 0; }
.decision::before {
  content: counter(d);
  grid-row: 1 / 3;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding-top: 7px;
}
.decision .claim {
  grid-column: 2;
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 24px;
  font-weight: 550;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.decision .why {
  grid-column: 2;
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
  max-width: 62ch;
}

/* == 05 In Use — the ONLY pinned scene on the page == */
.inuse {
  display: grid;
  grid-template-columns: 7fr 4fr;
  column-gap: 48px;
  align-items: start;
}
.inuse-media {
  position: sticky;
  top: 104px;
  aspect-ratio: 16 / 10;
}
.inuse-captions {
  display: flex;
  flex-direction: column;
  gap: 44vh;
  padding: 18vh 0 30vh;
}
.beat .beat-idx { display: block; color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.beat p { margin: 0; font-size: 17px; line-height: 1.7; }

/* == Prev/next pager == */
.case-pager {
  margin-top: 128px;
  border-block: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 28px 0;
}
.case-pager a {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.case-pager a:hover {
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
}

/* == Contact footer (same as landing) == */
.contact {
  margin-top: 128px;
  border-top: 1px solid var(--hairline);
  padding: 160px 0 96px;
}
.contact-title {
  margin: 0 0 48px;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 56px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 20ch;
}
.contact-email-row {
  margin: 0 0 44px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.email-link {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: clamp(22px, 3.2vw, 34px);
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  position: relative;
}
.email-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 150ms var(--ease-standard);
}
.email-link:hover::after,
.email-link:focus-visible::after { transform: scaleX(1); }
.copy-btn {
  font-size: 11px;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--hairline);
  border-radius: 3px;
  padding: 8px 13px 7px;
  cursor: pointer;
  min-width: 58px;
  transition: border-color 150ms var(--ease-standard);
}
.copy-btn:hover,
.copy-btn.copied { border-color: var(--fg); }
.contact-links {
  margin: 0 0 88px;
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: 13px;
  flex-wrap: wrap;
}
.contact-links a { text-decoration: none; padding-block: 2px; }
.contact-links a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}
.contact-links .dot { color: var(--muted); user-select: none; }
.colophon { margin: 0; font-size: 12px; color: var(--muted); }

/* == AI Office demo vignette (case-page hero) ==
      Poster is static; three.js loads only on ▶ click. The BLOCKED
      label is this screen's terracotta use. */
.demo-stage { position: relative; background: var(--bg); }
.demo-poster,
.demo-scene { position: absolute; inset: 0; }
.demo-still { display: block; width: 100%; height: 100%; color: var(--fg); }
.demo-run {
  position: absolute;
  left: 50%;
  bottom: 9%;
  transform: translateX(-50%);
  font-size: 12px;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 3px;
  padding: 12px 22px 11px;
  cursor: pointer;
  transition: border-color 150ms var(--ease-standard);
}
.demo-run:hover { border-color: var(--fg); }
.demo-run:disabled { color: var(--muted); cursor: default; }
.demo-scene canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.demo-labels {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.demo-label {
  position: absolute;
  transform: translate(-50%, -100%);
  font-size: 10px;
  letter-spacing: 0.08em;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  padding: 3px 7px 2px;
  white-space: nowrap;
}
.demo-label.st-thinking { color: var(--muted); }
.demo-label.st-working { color: var(--fg); border-color: var(--fg); }
.demo-label.st-blocked { color: var(--accent); border-color: var(--accent); }
.demo-label.st-done { color: var(--muted); }
.demo-hud {
  position: absolute;
  left: 16px;
  bottom: 14px;
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  max-width: 58%;
}
.demo-controls {
  position: absolute;
  right: 14px;
  bottom: 12px;
  display: flex;
  gap: 8px;
}
.demo-btn {
  font-size: 11px;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 3px;
  padding: 7px 12px 6px;
  cursor: pointer;
  min-width: 64px;
  transition: border-color 150ms var(--ease-standard);
}
.demo-btn:hover { border-color: var(--fg); }
.demo-caption {
  position: absolute;
  left: 16px;
  top: 14px;
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}
.demo-honesty {
  margin: 12px 0 0;
  font-size: 11px;
  color: var(--muted);
}

/* == DayMaxing check-in widget (case-page hero) ==
      Seeded local state, resets on reload. Terracotta appears only
      on the level-up moment. */
.widget-stage {
  aspect-ratio: auto;
  background: var(--bg);
  overflow: visible;
}
.dm {
  padding: 26px 30px 30px;
  display: grid;
  gap: 24px;
}
.dm-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}
.dm-day { color: var(--muted); font-size: 12px; }
.dm-right { display: flex; align-items: center; gap: 14px; }
.dm-xp {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  background: transparent;
  border: 0;
  padding: 4px 6px;
  cursor: not-allowed;
  color: var(--fg);
}
.dm-lock {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  align-self: center;
}
.dm-xp-num {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 34px;
  font-weight: 550;
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.dm-xp-unit { font-size: 11px; color: var(--muted); }
@keyframes dm-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.dm-toast {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 3px;
  padding: 8px 12px;
  font-size: 11px;
  color: var(--fg);
  z-index: 5;
  white-space: nowrap;
}
html.js .dm-toast.in { animation: dm-in 150ms var(--ease-standard) both; }
.dm-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.dm-stat header { display: grid; gap: 9px; margin-bottom: 10px; }
.dm-stat-label { font-size: 11px; color: var(--muted); }
.dm-bar { display: block; height: 3px; background: var(--hairline); }
.dm-fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--fg);
  transition: width 250ms var(--ease-standard);
}
.dm-list { list-style: none; margin: 0; padding: 0; }
.dm-habit {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 6px;
  min-height: 42px;
  cursor: pointer;
  border-radius: 3px;
}
.dm-habit:hover { background: var(--surface); }
.dm-habit input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.dm-check {
  width: 17px;
  height: 17px;
  flex: none;
  border: 1px solid var(--fg);
  border-radius: 2px;
  display: grid;
  place-items: center;
  font-size: 11px;
  line-height: 1;
  color: var(--bg);
  transition: background 150ms var(--ease-standard);
}
.dm-habit input:checked ~ .dm-check { background: var(--fg); }
.dm-habit input:checked ~ .dm-check::after { content: "✓"; }
.dm-habit input:focus-visible ~ .dm-check {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.dm-name { flex: 1; font-size: 14px; line-height: 1.4; }
.dm-habit input:checked ~ .dm-name { color: var(--muted); }
.dm-plus { font-size: 10px; color: var(--muted); }
.dm-week {
  border-top: 1px solid var(--hairline);
  padding-top: 18px;
  display: grid;
  gap: 10px;
}
.dm-week-head {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}
.dm-meter {
  position: relative;
  height: 5px;
  background: var(--hairline);
}
.dm-meter-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--fg);
  transition: width 250ms var(--ease-standard);
}
.dm-tick {
  position: absolute;
  left: 85%;
  top: -4px;
  bottom: -4px;
  width: 1px;
  background: var(--fg);
  opacity: 0.55;
}
.dm-levelup {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 26px;
  font-weight: 550;
  letter-spacing: -0.01em;
  color: var(--accent);
}
html.js .dm-levelup.in { animation: dm-in 250ms var(--ease-standard) both; }

/* == AI Automator chat replay (case-page hero) ==
      Paper chat frame, ink bubbles — evocative of a messaging
      thread, not a pixel clone. All names and data fictional. */
.wa {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 560px;
}
.wa-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 18px;
  border-bottom: 1px solid var(--hairline);
  font-size: 11px;
  color: var(--fg);
}
.wa-head-time { color: var(--muted); }
.wa-thread {
  overflow-y: auto;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wa-msg {
  max-width: 72%;
  padding: 10px 14px 9px;
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid var(--hairline);
}
html.js .wa-msg { animation: dm-in 200ms var(--ease-standard) both; }
.wa-parent {
  align-self: flex-end;
  background: var(--surface);
  border-radius: 10px 10px 2px 10px;
}
.wa-bot {
  align-self: flex-start;
  background: rgba(28, 26, 23, 0.045);
  border-radius: 10px 10px 10px 2px;
}
.wa-staff {
  align-self: flex-start;
  background: var(--surface);
  border-radius: 10px 10px 10px 2px;
}
.wa-name {
  display: block;
  margin-bottom: 5px;
  font-size: 9px;
  color: var(--muted);
}
.wa-text { display: block; }
.wa-meta {
  display: block;
  margin-top: 6px;
  font-size: 9px;
  color: var(--muted);
  text-align: right;
}
.wa-system {
  align-self: center;
  max-width: 100%;
  border: 0;
  background: transparent;
  padding: 8px 0;
  font-size: 10px;
  color: var(--fg);
  text-align: center;
}
.wa-controls {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--hairline);
}

/* == DayMaxing "In Use" vignettes ==
      Four 2D scenes in the pinned frame; the active caption cross-
      fades to its vignette (250ms) and plays it once. End states are
      the CSS defaults — keyframes animate FROM, so reduced motion
      gets static end-state frames for free. Terracotta appears only
      on the 50% HARDER stamp. */
.vig-frame { background: var(--bg); }
.vig-stack { position: absolute; inset: 0; }
.vig {
  position: absolute;
  inset: 0;
  padding: 24px 26px;
  opacity: 0;
  transition: opacity 250ms var(--ease-standard);
  display: grid;
  align-content: start;
  gap: 18px;
}
.vig.active { opacity: 1; }
.vig-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 10px;
  color: var(--muted);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hairline);
}
.vg-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.vg-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  background: var(--surface);
}
.vg-name { flex: 1; font-size: 13px; line-height: 1.4; }
.vg-days { display: flex; gap: 4px; }
.vg-days span {
  width: 15px;
  height: 15px;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  display: grid;
  place-items: center;
  font-size: 8px;
  color: var(--muted);
}
.vg-carry { font-size: 8px; color: var(--muted); }
.vg-tag {
  font-size: 9px;
  color: var(--muted);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  padding: 2px 6px;
}
.vg-checkbox {
  width: 15px;
  height: 15px;
  flex: none;
  border: 1px solid var(--fg);
  border-radius: 2px;
  display: grid;
  place-items: center;
  font-size: 10px;
  line-height: 1;
  color: var(--bg);
}
.vg-c1, .vg-c2 { background: var(--fg); }
.vg-c1::after, .vg-c2::after { content: "✓"; }
.vg-xpwrap { display: inline-flex; align-items: baseline; gap: 6px; color: var(--fg); }
.vg-xpwrap .dm-lock { align-self: center; }
.vg-xp {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 24px;
  font-weight: 550;
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.vg-xpu { font-size: 9px; color: var(--muted); }
.vg-rings { display: flex; gap: 24px; }
.vg-ringwrap { display: grid; justify-items: center; gap: 4px; }
.vg-ringwrap .mono { font-size: 9px; color: var(--muted); }
.vg-ringwrap svg { width: 52px; height: 52px; transform: rotate(-90deg); }
.vg-track, .vg-ring { fill: none; stroke-width: 3; }
.vg-track { stroke: var(--hairline); }
.vg-ring { stroke: var(--fg); stroke-linecap: round; stroke-dasharray: 100.53; }
.vg-ring-int { stroke-dashoffset: 38; }
.vg-ring-str { stroke-dashoffset: 55; }
.vg-dots { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; max-width: 340px; }
.vg-day { display: grid; justify-items: center; gap: 6px; }
.vg-day .mono { font-size: 8px; color: var(--muted); }
.vg-dot { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--fg); }
.vg-on { background: var(--fg); }
.vg-weekbar { position: relative; height: 5px; background: var(--hairline); max-width: 340px; }
.vg-weekfill { position: absolute; inset: 0 auto 0 0; width: 100%; background: var(--fg); }
.vg-wtick { position: absolute; left: 85%; top: -4px; bottom: -4px; width: 1px; background: var(--fg); opacity: 0.55; }
.vg-award { color: var(--fg); }
.vg-streak { position: relative; width: fit-content; padding: 4px 2px; }
.vg-streak-num {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 46px;
  font-weight: 550;
  line-height: 1;
  opacity: 0.35;
}
.vg-strike {
  position: absolute;
  left: -6px;
  right: -6px;
  top: 55%;
  height: 2px;
  background: var(--fg);
  transform: scaleX(1);
  transform-origin: left center;
}
.vg-missed { color: var(--muted); }
.vg-makeup { max-width: 440px; }
.vg-stamp {
  font-size: 9px;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 2px;
  padding: 3px 7px 2px;
  transform: rotate(-6deg);
}

/* from-only keyframes — the element's own styles are the end state */
@keyframes vg-rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes vg-fade { from { opacity: 0; } }
@keyframes vg-checkfill { from { background: transparent; color: transparent; } }
@keyframes vg-draw { from { stroke-dashoffset: 100.53; } }
@keyframes vg-dotfill { from { background: transparent; } }
@keyframes vg-bar47 { from { width: 57.1%; } }
@keyframes vg-strike-in { from { transform: scaleX(0); } }
@keyframes vg-dim { from { opacity: 1; } }
@keyframes vg-slide { from { opacity: 0; transform: translateX(24px); } }
@keyframes vg-pop { from { opacity: 0; transform: rotate(-6deg) scale(0.8); } }

html.js .vig-1.play .vg-p1 { animation: vg-rise 250ms var(--ease-standard) 100ms both; }
html.js .vig-1.play .vg-p2 { animation: vg-rise 250ms var(--ease-standard) 280ms both; }
html.js .vig-1.play .vg-p3 { animation: vg-rise 250ms var(--ease-standard) 460ms both; }
html.js .vig-1.play .vg-p4 { animation: vg-rise 250ms var(--ease-standard) 680ms both; }
html.js .vig-1.play .vg-carry { animation: vg-fade 250ms var(--ease-standard) 1000ms both; }
html.js .vig-2.play .vg-c1 { animation: vg-checkfill 200ms var(--ease-standard) 400ms both; }
html.js .vig-2.play .vg-c2 { animation: vg-checkfill 200ms var(--ease-standard) 1100ms both; }
html.js .vig-2.play .vg-ring-int { animation: vg-draw 600ms var(--ease-standard) 650ms both; }
html.js .vig-2.play .vg-ring-str { animation: vg-draw 600ms var(--ease-standard) 1350ms both; }
html.js .vig-3.play .vg-d5 { animation: vg-dotfill 200ms var(--ease-standard) 300ms both; }
html.js .vig-3.play .vg-d6 { animation: vg-dotfill 200ms var(--ease-standard) 900ms both; }
html.js .vig-3.play .vg-d7 { animation: vg-dotfill 200ms var(--ease-standard) 1500ms both; }
html.js .vig-3.play .vg-weekfill { animation: vg-bar47 1400ms var(--ease-standard) 300ms both; }
html.js .vig-3.play .vg-award { animation: vg-rise 250ms var(--ease-standard) 1750ms both; }
html.js .vig-4.play .vg-strike { animation: vg-strike-in 300ms var(--ease-standard) 400ms both; }
html.js .vig-4.play .vg-streak-num { animation: vg-dim 300ms var(--ease-standard) 400ms both; }
html.js .vig-4.play .vg-missed { animation: vg-fade 250ms var(--ease-standard) 700ms both; }
html.js .vig-4.play .vg-makeup { animation: vg-slide 300ms var(--ease-standard) 1100ms both; }
html.js .vig-4.play .vg-stamp { animation: vg-pop 220ms var(--ease-standard) 1500ms both; }

/* == AI Office "In Use" vignettes — flat ink-line scenes ==
      Same system; terracotta appears only on the BLOCKED state. */
.ao-cmdbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  background: var(--surface);
}
.ao-cmdtag {
  font-size: 9px;
  color: var(--muted);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  padding: 2px 6px;
}
.ao-cmdtext { font-size: 13px; }
.ao-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.ao-chip {
  font-size: 9px;
  color: var(--fg);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  padding: 4px 9px 3px;
}
.ao-chip-sel { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.ao-dispatch { margin: 0; font-size: 10px; color: var(--muted); }
.ao-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.ao-desks { display: grid; gap: 8px; }
.ao-desk {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  background: var(--surface);
}
.ao-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fg); flex: none; }
.ao-nm { flex: 1; font-size: 10px; color: var(--fg); }
.ao-st { display: grid; font-size: 9px; color: var(--muted); text-align: right; }
.ao-st span { grid-area: 1 / 1; }
.ao-a { opacity: 0; }  /* end state: THINKING has passed */
.ao-b { opacity: 1; }  /* end state: WORKING */
.ao-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: 10px;
  color: var(--muted);
}
.ao-feed li { border-bottom: 1px solid var(--hairline); padding-bottom: 8px; }
.ao-feed-wide { max-width: 420px; }
.ao-tool {
  color: var(--fg);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  padding: 2px 6px;
  margin-right: 8px;
}
.ao-stage4 { position: relative; display: grid; gap: 14px; max-width: 400px; }
.ao-big { padding: 14px 16px; }
.ao-big .ao-nm { font-size: 11px; }
.ao-big .ao-st { font-size: 10px; }
.ao-blk { opacity: 0; color: var(--accent); }  /* hidden at end; terracotta while blocked */
.ao-wrk { opacity: 1; }
.ao-cursor {
  position: absolute;
  width: 16px;
  height: 16px;
  right: 44px;
  top: 34px;
  color: var(--fg);
  opacity: 0;  /* gone at end */
}
.ao-note { margin: 0; font-size: 10px; color: var(--muted); }

@keyframes ao-select { from { background: transparent; color: var(--fg); } }
@keyframes ao-swap-out { from { opacity: 1; } }
@keyframes ao-blocked {
  0% { opacity: 0; }
  15% { opacity: 1; }
  75% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes ao-working-return {
  0% { opacity: 1; }
  15% { opacity: 0; }
  75% { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes ao-cursor-in {
  0% { opacity: 0; transform: translate(34px, 28px); }
  40% { opacity: 1; transform: translate(0, 0) scale(1); }
  50% { transform: scale(0.88); }
  60% { transform: scale(1); }
  85% { opacity: 1; }
  100% { opacity: 0; }
}

html.js .vig-1.play .ao-goal { animation: vg-rise 250ms var(--ease-standard) 150ms both; }
html.js .vig-1.play .ao-pick { animation: vg-rise 250ms var(--ease-standard) 500ms both; }
html.js .vig-1.play .ao-chip-sel { animation: ao-select 250ms var(--ease-standard) 950ms both; }
html.js .vig-1.play .ao-dispatch { animation: vg-fade 250ms var(--ease-standard) 1350ms both; }
html.js .vig-2.play .ao-k1 .ao-a { animation: ao-swap-out 250ms var(--ease-standard) 400ms both; }
html.js .vig-2.play .ao-k1 .ao-b { animation: vg-fade 250ms var(--ease-standard) 400ms both; }
html.js .vig-2.play .ao-k2 .ao-a { animation: ao-swap-out 250ms var(--ease-standard) 900ms both; }
html.js .vig-2.play .ao-k2 .ao-b { animation: vg-fade 250ms var(--ease-standard) 900ms both; }
html.js .vig-2.play .ao-k3 .ao-a { animation: ao-swap-out 250ms var(--ease-standard) 1400ms both; }
html.js .vig-2.play .ao-k3 .ao-b { animation: vg-fade 250ms var(--ease-standard) 1400ms both; }
html.js .vig-2.play .ao-k4 .ao-a { animation: ao-swap-out 250ms var(--ease-standard) 1900ms both; }
html.js .vig-2.play .ao-k4 .ao-b { animation: vg-fade 250ms var(--ease-standard) 1900ms both; }
html.js .vig-2.play .ao-f1 { animation: vg-rise 220ms var(--ease-standard) 250ms both; }
html.js .vig-2.play .ao-f2 { animation: vg-rise 220ms var(--ease-standard) 600ms both; }
html.js .vig-2.play .ao-f3 { animation: vg-rise 220ms var(--ease-standard) 950ms both; }
html.js .vig-2.play .ao-f4 { animation: vg-rise 220ms var(--ease-standard) 1300ms both; }
html.js .vig-2.play .ao-f5 { animation: vg-rise 220ms var(--ease-standard) 1650ms both; }
html.js .vig-3.play .ao-f1 { animation: vg-rise 220ms var(--ease-standard) 400ms both; }
html.js .vig-3.play .ao-f2 { animation: vg-rise 220ms var(--ease-standard) 950ms both; }
html.js .vig-3.play .ao-f3 { animation: vg-rise 220ms var(--ease-standard) 1500ms both; }
html.js .vig-3.play .ao-a { animation: ao-swap-out 250ms var(--ease-standard) 1600ms both; }
html.js .vig-3.play .ao-b { animation: vg-fade 250ms var(--ease-standard) 1600ms both; }
html.js .vig-4.play .ao-blk { animation: ao-blocked 2000ms var(--ease-standard) 300ms both; }
html.js .vig-4.play .ao-wrk { animation: ao-working-return 2000ms var(--ease-standard) 300ms both; }
html.js .vig-4.play .ao-cursor { animation: ao-cursor-in 1600ms var(--ease-standard) 500ms both; }
html.js .vig-4.play .ao-note { animation: vg-fade 250ms var(--ease-standard) 1600ms both; }

/* == AI Automator "In Use" vignettes — the staff/system side ==
      Terracotta appears only on the notification ping (transient). */
.au-cols { display: grid; grid-template-columns: 1.2fr 1fr; gap: 22px; align-items: start; }
.au-cal-grid {
  display: grid;
  grid-template-columns: 36px repeat(5, 1fr);
  gap: 4px;
  align-items: stretch;
}
.au-d { font-size: 8px; color: var(--muted); text-align: center; }
.au-t { font-size: 7px; color: var(--muted); text-align: right; padding-right: 2px; align-self: center; }
.au-c {
  height: 24px;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  display: grid;
  place-items: center;
  font-size: 7px;
  color: var(--fg);
  position: relative;
}
.au-busy { background: rgba(28, 26, 23, 0.07); }
.au-open { border-color: var(--fg); }
.au-cell-booked { border-color: var(--fg); }
.au-booked {
  position: absolute;
  inset: 1px;
  background: rgba(28, 26, 23, 0.07);
  border-radius: 1px;
  display: grid;
  place-items: center;
}
.au-snippet {
  border: 1px solid var(--hairline);
  border-radius: 10px 10px 10px 2px;
  background: rgba(28, 26, 23, 0.045);
  padding: 12px 14px;
}
.au-snip-tag { display: block; margin-bottom: 6px; font-size: 8px; color: var(--muted); }
.au-snippet p { margin: 0; font-size: 12px; line-height: 1.5; }
.au-side { display: grid; gap: 12px; }
.au-parentline { margin: 0; font-size: 10px; color: var(--muted); }
.au-openlist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
  font-size: 10px;
  color: var(--fg);
}
.au-openlist li {
  position: relative;
  width: fit-content;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 6px;
}
.au-gone { opacity: 0.35; }
.au-strikeline {
  position: absolute;
  left: -3px;
  right: -3px;
  top: 45%;
  height: 1.5px;
  background: var(--fg);
  transform: scaleX(1);
  transform-origin: left center;
}
.au-night { display: grid; gap: 12px; max-width: 480px; }
.au-tl {
  position: relative;
  height: 10px;
  border: 1px solid var(--hairline);
  border-radius: 2px;
}
.au-tl-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  background: rgba(28, 26, 23, 0.06);
}
.au-tick { position: absolute; top: -9px; display: flex; gap: 2px; }
.au-tick .q { width: 2px; height: 8px; background: var(--fg); }
.au-tick .r { width: 2px; height: 6px; margin-top: 2px; background: var(--muted); }
.au-tick i { display: block; }
.au-tl-labels { display: flex; justify-content: space-between; font-size: 8px; color: var(--muted); }
.au-phone {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  color: var(--muted);
}
.au-phone svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}
.au-phone .mono { font-size: 9px; }
.au-esc { display: grid; gap: 16px; max-width: 440px; }
.au-flagrow { display: flex; align-items: center; gap: 12px; }
.au-flag {
  font-size: 9px;
  color: var(--fg);
  border: 1px solid var(--fg);
  border-radius: 2px;
  padding: 3px 7px 2px;
  flex: none;
}
.au-q { font-size: 12px; color: var(--muted); }
.au-notif {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px 14px;
}
.au-notif-body { display: grid; gap: 3px; }
.au-notif-name { font-size: 10px; color: var(--fg); }
.au-notif-sub { font-size: 8px; color: var(--muted); }
.au-ping {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;  /* transient — gone at end state */
}
.au-tapring {
  position: absolute;
  right: 18px;
  top: 50%;
  margin-top: -11px;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--fg);
  border-radius: 50%;
  opacity: 0;  /* gone at end */
}
.au-transfer { margin: 0; font-size: 10px; color: var(--fg); }

@keyframes au-openmark { from { border-color: var(--hairline); color: transparent; } }
@keyframes au-drop { from { opacity: 0; transform: translateY(-12px); } }
@keyframes au-sweep { from { width: 0; } }
@keyframes au-ping-in {
  0% { opacity: 0; transform: scale(0.5); }
  20% { opacity: 1; transform: scale(1); }
  75% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes au-tap {
  0% { opacity: 0; transform: scale(0.4); }
  30% { opacity: 0.7; }
  100% { opacity: 0; transform: scale(1.25); }
}

html.js .vig-1.play .au-cal1 { animation: vg-rise 250ms var(--ease-standard) 150ms both; }
html.js .vig-1.play .au-w1 { animation: vg-dotfill 200ms var(--ease-standard) 450ms both; }
html.js .vig-1.play .au-w2 { animation: vg-dotfill 200ms var(--ease-standard) 650ms both; }
html.js .vig-1.play .au-w3 { animation: vg-dotfill 200ms var(--ease-standard) 850ms both; }
html.js .vig-1.play .au-open { animation: au-openmark 250ms var(--ease-standard) 1200ms both; }
html.js .vig-1.play .au-snip1 { animation: vg-slide 300ms var(--ease-standard) 1600ms both; }
html.js .vig-2.play .au-parentline { animation: vg-fade 250ms var(--ease-standard) 400ms both; }
html.js .vig-2.play .au-booked { animation: au-drop 300ms var(--ease-standard) 900ms both; }
html.js .vig-2.play .au-gone { animation: vg-dim 300ms var(--ease-standard) 1400ms both; }
html.js .vig-2.play .au-strikeline { animation: vg-strike-in 300ms var(--ease-standard) 1400ms both; }
html.js .vig-3.play .au-tl-fill { animation: au-sweep 1800ms linear 200ms both; }
html.js .vig-3.play .au-n1 { animation: vg-fade 200ms var(--ease-standard) 500ms both; }
html.js .vig-3.play .au-n2 { animation: vg-fade 200ms var(--ease-standard) 900ms both; }
html.js .vig-3.play .au-n3 { animation: vg-fade 200ms var(--ease-standard) 1300ms both; }
html.js .vig-3.play .au-n4 { animation: vg-fade 200ms var(--ease-standard) 1650ms both; }
html.js .vig-4.play .au-flagrow { animation: vg-rise 250ms var(--ease-standard) 300ms both; }
html.js .vig-4.play .au-notif-el { animation: au-drop 300ms var(--ease-standard) 800ms both; }
html.js .vig-4.play .au-ping { animation: au-ping-in 1400ms var(--ease-standard) 800ms both; }
html.js .vig-4.play .au-tapring { animation: au-tap 500ms var(--ease-standard) 1500ms both; }
html.js .vig-4.play .au-transfer { animation: vg-fade 250ms var(--ease-standard) 1800ms both; }

/* == Reduced motion — keep the progress bar (positional info),
      strip transforms, keep opacity fades == */
@media (prefers-reduced-motion: reduce) {
  html.js .case-hero { animation-name: fade-only !important; }
  html.js .sec-head .rule-draw {
    transform: none !important;
    transition: none !important;
  }
  .email-link::after { transition: none !important; }
  .site-nav .container { transition: none !important; }
  /* the pinned In Use scene degrades to static stacked media */
  .inuse { grid-template-columns: 1fr; }
  .inuse-media { position: relative !important; }
  .inuse-captions { gap: 40px; padding: 40px 0 0; }
  /* check-in widget: bars snap, toast/level-up keep opacity fades */
  .dm-fill, .dm-meter-fill, .dm-check { transition: none !important; }
  html.js .dm-toast.in,
  html.js .dm-levelup.in { animation-name: fade-only !important; }
  /* chat replay renders as a static transcript */
  html.js .wa-msg { animation: none !important; }
  /* In Use vignettes: static end-state frames, no crossfade */
  .vig { transition: none !important; }
  html.js .vig.play * { animation: none !important; }
}
@keyframes fade-only {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* == Responsive (full pass lands with the polish prompt) == */
@media (max-width: 1023px) {
  /* the pinned scene degrades to static stacked media */
  .inuse { grid-template-columns: 1fr; }
  .inuse-media { position: relative; }
  .inuse-captions { gap: 40px; padding: 40px 0 0; }
}
@media (max-width: 900px) {
  .sec-body { padding-left: 0; }
  .glance { grid-template-columns: 1fr 1fr; }
  .g-item:nth-child(even) { border-left: 1px solid var(--hairline); }
  .g-item:nth-child(odd) { border-left: 0; }
  .g-item:nth-child(n+3) { border-top: 1px solid var(--hairline); }
}
@media (max-width: 640px) {
  .container { padding-inline: 20px; }
  /* nav: wordmark keeps one line on its own row; links sit in one
     compact row, nothing breaks mid-link */
  .site-nav .container {
    padding-block: 12px;
    flex-wrap: wrap;
    row-gap: 4px;
  }
  .wordmark { font-size: 18px; white-space: nowrap; width: 100%; }
  .nav-links { gap: 14px; font-size: 12.5px; }
  .nav-links a { white-space: nowrap; }
  .nav-links .dot { display: none; }
  .case { padding-top: 120px; }
  .case-sec { padding-top: 80px; }
  .sec-head h2 { font-size: 24px; }
  .decision { grid-template-columns: 36px 1fr; }
  .decision .claim { font-size: 20px; }
  .case-pager a { font-size: 18px; }
  .contact { padding: 96px 0 64px; margin-top: 96px; }
  .contact-title { font-size: 36px; }
  .contact-links { margin-bottom: 64px; }
  .email-link { font-size: 18px; }
  .sec-body p, .decision .why, .thesis-line { max-width: 100%; }
  .dm { padding: 20px 18px 22px; }
  .dm-stats { grid-template-columns: 1fr; gap: 18px; }
  .dm-toast { white-space: normal; max-width: 240px; text-align: right; }
  .wa { height: 460px; }
  .wa-msg { max-width: 86%; }
  .vig { padding: 16px 14px; gap: 14px; }
  .vg-rings svg { width: 44px; height: 44px; }
  .ao-cols { grid-template-columns: 1fr; }
  .au-cols { grid-template-columns: 1fr; }
  html.js .vig-1.play .au-snip1 { animation-name: vg-rise; }
}
