:root {
  --bg: #f4f6f8;
  --ink: #1c2430;
  --muted: #5a6572;
  --line: #d5dde5;
  --accent: #2f6f5e;
  --active-accent: #2f6f5e;
  --card: #ffffff;
  --shell: #eef2f5;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  font-family: "Figtree", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1000px 420px at 0% 0%, #e4ece8 0%, transparent 55%),
    var(--bg);
  display: flex;
  flex-direction: column;
}

.crumb-bar {
  padding: 1rem clamp(1.25rem, 3vw, 3.5rem);
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.crumb {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.crumb:hover { color: var(--accent); }
.crumb strong { color: var(--ink); font-weight: 600; }

.shell {
  flex: 1;
  display: grid;
  grid-template-columns: 12.5rem minmax(0, 1fr);
  gap: 0;
  /* Desktop: use the viewport — no artificial ~1120px reading-column cap */
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 clamp(1.25rem, 3vw, 3.5rem) 2.5rem;
}

.rail {
  padding: 0.25rem 0.85rem 1rem 0;
  border-right: 1px solid var(--line);
}

.rail-label,
.work-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.65rem;
}

.venture-rail {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.venture-btn {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  padding: 0.55rem 0.6rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 0;
}

.venture-btn:hover { background: rgba(0, 0, 0, 0.03); }

.venture-btn.is-active {
  border-color: var(--line);
  background: var(--card);
  box-shadow: inset 3px 0 0 var(--venture-accent, var(--active-accent));
}

.venture-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--venture-accent, var(--muted));
  flex-shrink: 0;
}

.venture-select-wrap { display: none; margin-bottom: 0.75rem; }

.venture-select {
  width: 100%;
  font: inherit;
  font-weight: 600;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
}

.work {
  min-width: 0;
  padding: 0 0 0 1.25rem;
}

.title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1rem;
}

h1 {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.85rem, 4vw, 2.45rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.subline {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.subline strong { color: var(--ink); font-weight: 600; }

.filter-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip-group {
  display: inline-flex;
  border: 1px solid var(--line);
  background: var(--card);
}

.chip-group button {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.45rem 0.7rem;
  color: var(--muted);
  cursor: pointer;
}

.chip-group button.is-active {
  color: var(--ink);
  background: color-mix(in srgb, var(--active-accent) 14%, white);
}

.ps-cta-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--accent) 8%, var(--card));
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
}

.ps-cta-banner:hover { border-color: var(--accent); }

.ps-cta-banner:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.ps-cta-banner-label {
  font-family: "Fraunces", Georgia, serif;
  font-size: 0.95rem;
  font-weight: 560;
  color: var(--ink);
  flex-shrink: 0;
}

.ps-cta-banner-body {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
  flex: 1;
  min-width: 14rem;
}

.ps-cta-banner-arrow {
  color: var(--accent);
  font-weight: 700;
  margin-left: auto;
}

.shelf-nav {
  display: flex;
  gap: 0.15rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.shelf-tab {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.shelf-tab:hover { color: var(--ink); }

.shelf-tab.is-active {
  color: var(--ink);
  border-bottom-color: var(--active-accent);
}

.work-grid {
  display: grid;
  grid-template-columns: minmax(18rem, 0.95fr) minmax(22rem, 1.25fr);
  gap: 1.25rem;
  align-items: start;
}

/* Ultra-wide: give the specimen/detail pane real horizontal room */
@media (min-width: 1400px) {
  .shell {
    grid-template-columns: 13.5rem minmax(0, 1fr);
    padding-left: clamp(1.5rem, 4vw, 4.5rem);
    padding-right: clamp(1.5rem, 4vw, 4.5rem);
  }

  .work-grid {
    grid-template-columns: minmax(20rem, 0.85fr) minmax(28rem, 1.35fr);
    gap: 1.5rem;
  }
}

@media (min-width: 1800px) {
  .work-grid {
    grid-template-columns: minmax(22rem, 26rem) minmax(0, 1fr);
    gap: 1.75rem;
  }
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  min-height: 18rem;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 560;
}

.panel-head .count {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}

.item-list { display: flex; flex-direction: column; }

.item-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 0.9rem 1rem;
  font: inherit;
  cursor: pointer;
  color: inherit;
}

.item-row:last-child { border-bottom: 0; }
.item-row:hover { background: var(--shell); }

.item-row.is-active {
  background: color-mix(in srgb, var(--active-accent) 10%, white);
  box-shadow: inset 3px 0 0 var(--active-accent);
}

.item-row-main {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.item-row-main strong { font-size: 0.98rem; }
.item-row-main span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.item-row-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  flex-shrink: 0;
}

.chip {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--active-accent);
}

.status {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.status-ready { color: #1f6b4a; }
.status-placeholder { color: #8a5a12; }
.status-draft { color: #4a5a6a; }

.empty-state,
.detail-empty {
  padding: 1.5rem 1.1rem;
  color: var(--muted);
  line-height: 1.5;
}

.detail-card { padding: 1.1rem 1.15rem 1.35rem; }

.detail-card .eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-card h2 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.45rem;
  margin: 0.35rem 0 0.5rem;
}

.detail-summary {
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.detail-card h3 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 1rem 0 0.45rem;
}

.refs {
  padding-left: 1.1rem;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.45;
}

.muted { color: var(--muted); }

.specimen-wrap { margin-top: 1rem; }

/* Stage chrome — always venture token surface, never Labs shell */
.specimen {
  border: 1px solid var(--color-border, var(--line));
  background: var(--color-surface, var(--shell));
  color: var(--color-text-primary, var(--ink));
  padding: 1rem;
  font-family: var(--font-family-body, "Figtree", system-ui, sans-serif);
}

.specimen-note {
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: var(--color-text-secondary, var(--muted));
  font-family: var(--font-family-mono, var(--font-family-label, inherit));
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

@media (min-width: 1400px) {
  .card-grid {
    gap: 0.75rem;
  }

  .specimen {
    padding: 1.25rem 1.35rem;
  }
}

.p-card {
  background: var(--color-surface-raised, #fff);
  border: 1px solid var(--color-border, var(--line));
  padding: 0.75rem;
  color: var(--color-text-primary, var(--ink));
}

.p-card .card-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-secondary, var(--muted));
  margin-bottom: 0.35rem;
  font-family: var(--font-family-mono, var(--font-family-label, inherit));
}

.p-card h4 {
  font-family: var(--font-family-display, "Fraunces", Georgia, serif);
  font-size: 1rem;
  margin-bottom: 0.3rem;
  color: inherit;
}

.p-card p {
  font-size: 0.8rem;
  color: var(--color-text-secondary, var(--muted));
  line-height: 1.35;
  font-family: var(--font-family-body, inherit);
}

.p-card.is-accent {
  border-color: var(--s-accent, var(--active-accent));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--s-accent, var(--active-accent)) 35%, transparent);
}

.slide-claim {
  font-family: var(--font-family-display, "Fraunces", Georgia, serif);
  font-size: 1.15rem;
  font-weight: 560;
  line-height: 1.3;
  margin: 0 0 0.85rem;
  color: var(--color-text-primary, inherit);
}

.claim-sm { font-size: 1.05rem; }

.slide-kicker {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--s-accent, var(--color-accent, #6ec8b0));
  margin-bottom: 0.4rem;
  font-family: var(--font-family-mono, var(--font-family-label, inherit));
}

.specimen-stage {
  aspect-ratio: 16 / 9;
  max-height: 280px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.specimen-slide,
.specimen-slide-panel {
  flex: 1;
  background: var(--color-surface-raised, var(--color-surface, #111820));
  color: var(--color-text-primary, #f3f6f8);
  border: 1px solid var(--color-border, transparent);
  padding: 1rem 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
}

.specimen-slide .muted {
  color: var(--color-text-secondary, #9aa6b2);
}

.roadmap-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
  margin-top: auto;
}

.roadmap-steps li {
  padding: 0;
  text-align: center;
  border: 1px solid var(--color-border, #2a3540);
  color: var(--color-text-secondary, #9aa6b2);
  background: color-mix(in srgb, var(--color-surface, transparent) 70%, transparent);
}

.roadmap-steps button {
  display: block;
  width: 100%;
  padding: 0.55rem 0.4rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--font-family-mono, inherit);
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  min-height: 44px;
}

.roadmap-steps li.is-done {
  color: var(--color-text-primary, #b8c4ce);
  border-color: var(--color-border, #3a4652);
  opacity: 0.85;
}

.roadmap-steps li.is-active {
  color: var(--color-surface, #111820);
  background: var(--s-accent, #6ec8b0);
  border-color: transparent;
  opacity: 1;
}

.reveal-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 0.65rem;
}

.reveal-btn {
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.45rem 0.7rem;
  min-height: 44px;
  border: 1px solid var(--color-border, var(--line));
  background: var(--color-surface-raised, var(--card));
  color: var(--color-text-primary, inherit);
  cursor: pointer;
  font-family: var(--font-family-mono, inherit);
}

.reveal-btn:hover { border-color: var(--s-accent, var(--active-accent)); }

.reveal-meter {
  font-size: 0.8rem;
  color: var(--color-text-secondary, var(--muted));
  margin-right: auto;
}

.reveal-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: auto;
}

.reveal-list li {
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--color-border, var(--line));
  background: color-mix(in srgb, var(--s-accent, var(--active-accent)) 12%, var(--color-surface-raised, transparent));
  color: var(--color-text-primary, inherit);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-family-body, inherit);
}

.reveal-list li[hidden] { display: none; }

.section-head {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.section-num {
  font-family: var(--font-family-display, "Fraunces", Georgia, serif);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
  color: var(--s-accent, var(--active-accent));
}

.section-eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-secondary, var(--muted));
  margin-bottom: 0.25rem;
  font-family: var(--font-family-mono, var(--font-family-label, inherit));
}

.section-title {
  font-family: var(--font-family-display, "Fraunces", Georgia, serif);
  font-size: 1.2rem;
  line-height: 1.3;
  color: var(--color-text-primary, inherit);
}

.persona-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.persona-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  min-height: 44px;
  border: 1px solid color-mix(in srgb, var(--role, var(--s-accent)) 40%, var(--color-border, var(--line)));
  background: color-mix(in srgb, var(--role, var(--s-accent)) 14%, var(--color-surface-raised, #fff));
  color: var(--color-text-primary, inherit);
  font-size: 0.85rem;
  font-weight: 700;
  font-family: var(--font-family-body, inherit);
}

.persona-chip::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 0;
  background: var(--role, var(--active-accent));
}

/* Dark-stage ventures (VestaOS, Carbon dark-gold, etc.) */
.specimen.is-dark .specimen-note {
  color: color-mix(in srgb, var(--color-text-primary, #fff) 55%, transparent);
}
.specimen.is-dark .reveal-btn {
  background: var(--color-surface-raised);
  color: var(--color-text-primary);
}
.specimen.is-dark .roadmap-steps li.is-active {
  color: var(--color-surface-dark, var(--color-surface, #080808));
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

@media (prefers-reduced-motion: reduce) {
  .reveal-list li {
    transition: none;
  }
}

@media (max-width: 860px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .rail {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0 0 1rem;
    margin-bottom: 1rem;
  }

  .venture-rail { display: none; }
  .venture-select-wrap { display: block; }

  .work { padding-left: 0; }

  .work-grid { grid-template-columns: 1fr; }

  .card-grid,
  .roadmap-steps {
    grid-template-columns: 1fr 1fr;
  }

  .specimen-stage {
    max-height: none;
    aspect-ratio: auto;
  }
}
