@charset "UTF-8";
/* =========================================================
   Tokens
   ========================================================= */
:root {
  --page-bg: #f8f8f8;
  --hero-bg: #202124;
  --fact-bg: #2a2b2f;

  --text: rgba(0, 0, 0, 0.9);
  --ink: #1e1e1e;
  --grey: #5f6269;
  --muted: #8a8d95;
  --brand: #007be5;
  --border: #e6e6e6;
  --border-warm: #dcddd9;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-alt: "Figtree", var(--font);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: var(--font);
  font-optical-sizing: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, p, dl, dd, ul {
  margin: 0;
  padding: 0;
}

ul { list-style: none; }

img {
  display: block;
  max-width: none;
  flex-shrink: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  cursor: pointer;
}

b {
  font-weight: 600;
  color: var(--ink);
}

/* =========================================================
   Type scale (Figma UI3 tokens)
   ========================================================= */
.t-small {
  font-size: 9px;
  line-height: 14px;
  font-weight: 450;
  letter-spacing: 0.045px;
}

.t-small-strong {
  font-size: 9px;
  line-height: 14px;
  font-weight: 550;
  letter-spacing: 0.045px;
}

.t-medium {
  font-size: 11px;
  line-height: 16px;
  font-weight: 450;
  letter-spacing: 0.055px;
}

.body-large {
  font-size: 13px;
  line-height: 22px;
  font-weight: 450;
  letter-spacing: -0.0325px;
}

.heading-small {
  font-size: 13px;
  line-height: 22px;
  font-weight: 550;
  letter-spacing: -0.0325px;
  color: var(--text);
}

.heading-medium {
  font-size: 22px;
  line-height: 25px;
  font-weight: 550;
  letter-spacing: -0.11px;
  color: var(--ink);
}

.heading-large {
  font-size: 24px;
  line-height: 32px;
  font-weight: 550;
  letter-spacing: -0.408px;
  color: var(--ink);
}

.display {
  font-size: clamp(32px, 3.175vw, 48px);
  line-height: 1.03;
  font-weight: 500;
  letter-spacing: -0.027em;
  color: var(--text);
}

.display--narrow {
  max-width: 900px;
}

.lead {
  font-size: 19px;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: -0.0475px;
  color: var(--grey);
}

.c-ink { color: var(--ink); }
.c-text { color: var(--text); }
.c-grey { color: var(--grey); }
.c-muted { color: var(--muted); }
.c-brand { color: var(--brand); }
.c-grey8b { color: #8b8b8b; }

/* =========================================================
   Page layout
   ========================================================= */
.page {
  padding-bottom: 120px;
}

.layout {
  display: grid;
  grid-template-columns: var(--panel-w, 324px) minmax(0, 1fr);
  align-items: start;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 64px;
  width: 100%;
  min-width: 0;
  max-width: 1188px;
  margin: 0 auto;
  padding: 40px 48px 0 38px;
}

/* =========================================================
   Figma-style tab bar
   ========================================================= */
.app-tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: stretch;
  height: 40px;
  background: #f0f0f0;
  box-shadow: inset 0 -1px 0 var(--border);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.005em;
  overflow: hidden;
}

.app-tabs__home {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  flex-shrink: 0;
  color: rgba(0, 0, 0, 0.55);
  box-shadow: inset -1px 0 0 var(--border);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.app-tabs__home:hover { color: var(--text); background: #e6e6e6; }

.app-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 0;
  min-width: 0;
  padding: 0 12px;
  color: rgba(0, 0, 0, 0.5);
  user-select: none;
}

.app-tab + .app-tab::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: #d9d9d9;
}

.app-tab.is-active {
  flex: none;
  gap: 4px;
  padding: 0 12px 0 14px;
  color: var(--text);
  background: #fff;
  box-shadow: inset -1px 0 0 var(--border);
}

.app-tab.is-active + .app-tab::before { display: none; }

.app-tab__icon { flex-shrink: 0; }

.app-tab__label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
  mask-image: linear-gradient(90deg, #000 85%, transparent);
}

.app-tab.is-active .app-tab__label { flex: none; -webkit-mask-image: none; mask-image: none; }
.app-tab.is-active .app-tab__close { margin-left: 8px; }

.app-tab__close { flex-shrink: 0; color: rgba(0, 0, 0, 0.55); }

.stack-16 { display: flex; flex-direction: column; gap: 16px; }
.stack-18 { display: flex; flex-direction: column; gap: 18px; }
.stack-20 { display: flex; flex-direction: column; gap: 20px; }

/* =========================================================
   Badges & shared bits
   ========================================================= */
.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 6px;
  background: var(--border);
  color: var(--text);
  font-size: 11px;
  line-height: 16px;
  font-weight: 450;
  letter-spacing: 0.055px;
  white-space: nowrap;
}

.badge--success { background: #cff7d3; }

.badge--strong {
  background: #2c2c2c;
  color: rgba(255, 255, 255, 0.9);
}

.hairline {
  width: 100%;
  height: 0;
  margin-top: -1px;
  border-top: 1px solid rgba(0, 0, 0, 0.102);
}

.scroll-x {
  width: 100%;
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 48px max(48px, calc((100% - 1416px) / 2)) 49px;
  background: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px) 0 0 / 20px 20px, var(--hero-bg);
  overflow: hidden;
}

.hero__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px 0 12px;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  border-radius: 9999px;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.hero-control:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.hero-control:active {
  background: rgba(255, 255, 255, 0.18);
}

.hero-control:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.hero-control svg {
  transition: transform 0.15s ease;
}

.hero-control:hover svg {
  transform: translateX(-2px);
}

.hero-control__label {
  font-size: 14px;
  line-height: 20px;
  font-weight: 450;
  letter-spacing: 0.07px;
  white-space: nowrap;
}

.hero__title-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hero__logo {
  width: 109px;
  height: 30.44px;
}

.hero__kicker { color: rgba(255, 255, 255, 0.7); font-size: 15px; line-height: 20px; font-weight: 500; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero__title {
  font-size: clamp(40px, 6.35vw, 96px);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: #fff;
}

/* The title drawn as a selected Figma layer */
.hero__title { position: relative; align-self: flex-start; margin: 4px -8px 4px; padding: 2px 8px; }
.hero__title-frame { position: absolute; inset: 0; outline: 1.5px solid #0c8ce9; pointer-events: none; }
.hero__title-frame i { position: absolute; width: 8px; height: 8px; background: #fff; box-shadow: 0 0 0 1.5px #0c8ce9; }
.hero__title-frame i:nth-of-type(1) { top: -4px; left: -4px; }
.hero__title-frame i:nth-of-type(2) { top: -4px; right: -4px; }
.hero__title-frame i:nth-of-type(3) { bottom: -4px; left: -4px; }
.hero__title-frame i:nth-of-type(4) { bottom: -4px; right: -4px; }

.hero__frame-label { display: flex; align-items: center; gap: 6px; margin: -12px 0 8px; color: rgba(255, 255, 255, 0.55); font-size: 12px; line-height: 16px; }
.hero__frame-label svg { width: 12px; height: 12px; fill: currentColor; }

.hero__media img {
  width: calc(100% + 2.5px);
  height: auto;
  margin: -1.25px 0 -1.25px -1.25px;
}

/* A GIF-style loop of the prototype; script.js moves the camera per state */
.hero__loop { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 12px; background: #f5f5f5; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15), 0 24px 60px rgba(0, 0, 0, 0.35); }
.hero__loop iframe { position: absolute; top: 0; left: 0; width: 1440px; height: 900px; border: 0; pointer-events: none; transform-origin: 0 0; transition: transform 1.2s cubic-bezier(0.45, 0, 0.2, 1); }
@media (prefers-reduced-motion: reduce) { .hero__loop iframe { transition: none; } }

.hero-story { display: flex; flex-direction: column; gap: 16px; margin: -8px 0 8px; }
.hero-story__line { width: 100%; color: rgba(255, 255, 255, 0.72); font-size: clamp(20px, 2.1vw, 30px); line-height: 1.47; font-weight: 450; letter-spacing: -0.017em; }
.hero-story__line b { display: inline-block; padding: 0 0.33em; border-radius: 10px; background: color-mix(in srgb, var(--c, #fff) 18%, transparent); color: var(--c, #fff); font-weight: 600; line-height: 1.33; }

/* =========================================================
   Sidebar — Figma-style left panel
   ========================================================= */
.panel {
  --panel-text-secondary: rgba(0, 0, 0, 0.5);
  --panel-text-tertiary: rgba(0, 0, 0, 0.3);
  --panel-icon: rgba(0, 0, 0, 0.55);
  --panel-hover: #f5f5f5;
  --panel-selected: #e5f4ff;
  --panel-selected-strong: #bde3ff;
  position: sticky;
  top: 40px;
  z-index: 10;
  display: flex;
  height: calc(100vh - 40px);
  color: var(--text);
  background: #fff;
  box-shadow: inset -1px 0 0 var(--border);
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 0.005em;
}

.panel__main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.panel__file {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 12px 12px 14px 16px;
  box-shadow: inset 0 -1px 0 var(--border);
}

.panel__file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.panel__file-name {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  height: 24px;
  padding: 0 4px 0 0;
  font-size: 13px;
  font-weight: 600;
  background: none;
  border-radius: 5px;
}

.panel__file-name span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.panel__file-name svg { flex-shrink: 0; color: var(--panel-icon); }

.panel__file-name:hover svg,
.panel__file-name[aria-expanded="true"] svg { color: var(--text); }

.panel__file-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  margin-bottom: 8px;
  color: var(--panel-text-secondary);
}

.panel__folder {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.panel__folder svg { flex-shrink: 0; transition: transform 0.15s ease; }

.panel__folder:hover { color: var(--text); }
.panel__folder:hover svg { transform: translateX(-2px); }
.panel__folder:focus-visible { outline: 2px solid #0d99ff; outline-offset: 2px; border-radius: 2px; }

.panel__current { display: none; }

.panel__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--panel-icon);
  background: none;
  border-radius: 5px;
}

.panel__icon-btn:hover,
.panel__icon-btn[aria-pressed="true"] { color: var(--text); background: var(--panel-hover); }

.panel__icon-btn--static:hover { color: var(--panel-icon); background: none; }

.panel__group-actions { display: flex; gap: 2px; }

.panel__menu {
  position: absolute;
  z-index: 5;
  top: 64px;
  left: 12px;
  min-width: 200px;
  padding: 8px 0;
  color: #fff;
  background: #1e1e1e;
  border-radius: 13px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), 0 10px 24px rgba(0, 0, 0, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.panel__menu.is-open { opacity: 1; visibility: visible; transform: none; }

.panel__menu a,
.panel__menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: calc(100% - 16px);
  height: 24px;
  margin: 0 8px;
  padding: 0 8px;
  font-size: 11px;
  text-align: left;
  background: none;
  border-radius: 5px;
}

.panel__menu a:hover,
.panel__menu button:hover { background: #0d99ff; }

.panel__menu hr {
  margin: 8px 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.panel__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.panel__group { padding: 8px; }

.panel__group + .panel__group { box-shadow: inset 0 1px 0 var(--border); }

.panel__group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 32px;
  padding: 0 0 0 8px;
  font-weight: 600;
}

.panel__search {
  display: none;
  align-items: center;
  gap: 6px;
  height: 28px;
  margin: 0 0 6px;
  padding: 0 8px;
  background: var(--panel-hover);
  border-radius: 5px;
}

.panel__search.is-open { display: flex; }

.panel__search svg { flex-shrink: 0; color: var(--panel-text-secondary); }

.panel__search input {
  flex: 1;
  min-width: 0;
  font: inherit;
  color: var(--text);
  background: none;
  border: 0;
  outline: none;
}

.panel__pages,
.panel__layers {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.panel__page {
  display: flex;
  align-items: center;
  height: 32px;
  padding: 0 8px;
  border-radius: 5px;
  transition: background-color 0.12s ease;
}

.panel__page:hover { background: var(--panel-hover); }

.panel__page.is-active {
  font-weight: 600;
  background: var(--panel-hover);
}

.panel__page--try { height: 40px; margin: 6px 0; padding: 0; overflow: hidden; border-radius: 8px; background: var(--brand); color: #fff; font-weight: 600; transition: background-color 0.12s ease, box-shadow 0.12s ease; }
.panel__page--try:hover { background: #0a6fd0; }
.panel__page--try.is-active { background: var(--brand); box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(0, 123, 229, 0.35); }
.panel__page-stub { display: grid; flex: none; place-items: center; width: 40px; height: 100%; border-right: 1.5px dashed rgba(255, 255, 255, 0.5); background: #0565bd; }
.panel__page-stub svg { width: 13px; height: 13px; fill: #fff; }
.panel__page--try .panel__page-name { padding-left: 10px; }
.panel__page-tag { margin: 0 12px 0 auto; font-size: 11px; font-weight: 600; opacity: 0.85; }

.panel__page-group {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 8px;
  color: var(--panel-text-secondary);
  user-select: none;
}

.panel__page-group:not(:first-child) { margin-top: 4px; }

.panel__page-group::before,
.panel__page-group::after {
  content: "";
  height: 1px;
  background: var(--border);
}

.panel__page-group::before { width: 12px; flex-shrink: 0; }
.panel__page-group::after { flex: 1; }

.panel__subs { display: flex; flex-direction: column; margin: 2px 0 2px 16px; padding-left: 8px; border-left: 1px solid var(--border); }
.panel__sub { display: flex; align-items: center; height: 28px; padding: 0 8px; border-radius: 5px; color: var(--panel-text-secondary); font-size: 12px; transition: background-color 0.12s ease, color 0.12s ease; }
.panel__sub:hover { background: var(--panel-hover); color: inherit; }
.panel__sub.is-active { color: inherit; font-weight: 600; box-shadow: inset 2px 0 0 var(--brand); border-radius: 0 5px 5px 0; }

.panel__page[hidden],
.panel__page-group[hidden],
.panel__subs[hidden] { display: none; }

.panel__empty {
  padding: 6px 8px;
  color: var(--panel-text-secondary);
}

.panel__layer {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 8px 0 4px;
  border-radius: 5px;
  transition: background-color 0.12s ease;
}

.panel__layer:hover { box-shadow: inset 0 0 0 1px var(--panel-selected-strong); }

.panel__layer-caret {
  display: inline-flex;
  width: 16px;
  justify-content: center;
  color: var(--panel-text-tertiary);
}

.panel__layer-icon { flex-shrink: 0; color: var(--panel-icon); }

.panel__layer-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.panel__layer.is-selected { background: var(--panel-selected); }
.panel__layer.is-selected:hover { box-shadow: none; }
.panel__layer.is-selected .panel__layer-caret { color: var(--panel-text-secondary); }

.panel__layers { animation: panel-fade 0.2s ease; }

@keyframes panel-fade {
  from { opacity: 0; transform: translateY(-2px); }
  to { opacity: 1; transform: none; }
}

.panel.is-collapsed .panel__body { display: none; }
.panel.is-collapsed .panel__file { box-shadow: none; }

.panel__resizer {
  position: absolute;
  top: 0;
  right: -4px;
  bottom: 0;
  z-index: 2;
  width: 8px;
  cursor: col-resize;
  touch-action: none;
}

.panel__resizer::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 3px;
  width: 2px;
  background: var(--brand);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.panel__resizer:hover::after,
.panel__resizer:focus-visible::after,
.panel.is-resizing .panel__resizer::after { opacity: 1; }

.panel__resizer:focus-visible { outline: none; }

html.is-panel-resizing,
html.is-panel-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}

/* =========================================================
   Sections & cards
   ========================================================= */
.content [id] {
  scroll-margin-top: 64px;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 13px;
  line-height: 22px;
  font-weight: 550;
  letter-spacing: -0.0325px;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.3s ease;
}

.section-label svg { flex-shrink: 0; }

.section.is-current > .section-label { color: var(--brand); }

.card {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 48px 32px;
  background: #fff;
  outline: 1px solid var(--border);
  outline-offset: -1px;
  overflow: hidden;
  transition: outline-color 0.3s ease, outline-width 0.3s ease, outline-offset 0.3s ease;
}

.section.is-current > .card {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}

.card--intro { gap: 28px; }

.card--overview {
  min-height: 900px;
  background: #eef3ff;
  outline-color: transparent;
}

.premise {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Author notes: FigJam stickies hanging off a box's top-right corner.
   The tilt and shadow sit on .note, as a filter, so the folded corner's clip-path keeps the shadow. */
.has-note { position: relative; container-type: inline-size; }
.premise.has-note { padding-right: 168px; }

.note {
  position: absolute;
  top: -16px;
  right: -14px;
  z-index: 2;
  width: 160px;
  transform: rotate(var(--tilt, 2deg));
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.08)) drop-shadow(0 6px 10px rgba(0, 0, 0, 0.1));
  transition: transform 0.2s, filter 0.2s;
}

.note:hover {
  transform: rotate(0) scale(1.08);
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.1)) drop-shadow(0 12px 20px rgba(0, 0, 0, 0.16));
}

.note__paper {
  position: relative;
  margin: 0;
  padding: 12px 12px 26px;
  background: var(--st, #ffe67a);
  color: #1e1e1e;
  font-family: var(--font-alt);
  font-size: 14px;
  line-height: 20px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
}

.note__paper::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 20px;
  height: 20px;
  background: linear-gradient(to top left, transparent 50%, rgba(0, 0, 0, 0.16) 50%);
}

.note__paper small {
  position: absolute;
  right: 28px;
  bottom: 6px;
  color: rgba(0, 0, 0, 0.45);
  font-family: var(--font);
  font-size: 10px;
}

/* Too narrow to hang over the content: the note sits above it instead */
@container (max-width: 360px) {
  .note { position: relative; top: auto; right: auto; align-self: flex-end; justify-self: end; margin: -8px -6px 8px 0; }
  .premise.has-note, .insight__frame.has-note { padding-right: 0; }
}

/* ---------- Introduction ---------- */
/* The title's key phrase is outlined like an agent suggestion on the canvas */
.intro-title { padding-top: 14px; }
.intro-sel { position: relative; display: inline-block; margin: 0 -2px; padding: 0 6px; border-radius: 3px; outline: 1.5px dashed #7c5cff; outline-offset: 2px; background: rgba(124, 92, 255, 0.06); }
.intro-sel::before { content: "1 · Title"; position: absolute; top: -26px; right: -4px; padding: 2px 7px; border-radius: 4px; background: #d9822b; color: #fff; font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: 0; white-space: nowrap; }
.intro-sel i { position: absolute; width: 7px; height: 7px; background: #fff; border: 1.5px solid #7c5cff; }
.intro-sel i:nth-child(1) { top: -6px; left: -6px; }
.intro-sel i:nth-child(2) { top: -6px; right: -6px; }
.intro-sel i:nth-child(3) { bottom: -6px; left: -6px; }
.intro-sel i:nth-child(4) { bottom: -6px; right: -6px; }
.intro-props { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.intro-props div { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: baseline; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.intro-props span { color: rgba(0, 0, 0, 0.5); font-size: 11px; font-weight: 500; }
.intro-props strong { color: var(--ink); font-size: 14px; line-height: 20px; font-weight: 500; }
@media (max-width: 700px) { .intro-props div { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; } }

.quiet-meta {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.menu-divider {
  position: relative;
  height: 16px;
}

.menu-divider::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 7.5px;
  height: 1px;
  border-radius: 2px;
  background: #383838;
}

.quiet-meta__row {
  display: flex;
  gap: 48px;
}

.quiet-meta__item {
  display: flex;
  flex: 1 0 0;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.quiet-meta__value {
  font-size: 16px;
  line-height: 1.35;
  font-weight: 400;
  color: var(--text);
}

/* ---------- Quick overview ---------- */
.callout {
  display: flex;
  align-items: stretch;
  gap: 18px;
}

.callout__marker {
  width: 6px;
  flex-shrink: 0;
}

.callout__content {
  display: flex;
  flex: 1 0 0;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 12px 16px 12px 4px;
}

.callout__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pill {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 16px;
  font-weight: 450;
  letter-spacing: 0.055px;
  white-space: nowrap;
}

.callout--red .callout__marker,
.callout--red .pill { background: #c83b45; }
.callout--red .pill { color: #fff5f5; }

.callout--blue .callout__marker,
.callout--blue .pill { background: #315edb; }
.callout--blue .pill { color: #fff; }

.statement {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.statement--red { --tone: #c83b45; --tint: #fdf3f3; --line: #f3d4d6; --hl: #f6c6cb; }
.statement--blue { --tone: #315edb; --tint: #f1f5ff; --line: #d5e0fb; --hl: #c3d4ff; }

.statement__label,
.eyebrow {
  margin: 0;
  color: var(--tone, var(--muted));
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.statement__title {
  margin: 0;
  max-width: 760px;
  color: var(--ink);
  font-size: 30px;
  line-height: 38px;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.statement__title mark {
  padding: 0 6px;
  border-radius: 6px;
  background: var(--hl);
  color: inherit;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.statement__points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.statement__points li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--tint);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--grey);
  font-size: 13.5px;
  line-height: 20px;
}

.statement__points b {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.premise .display {
  text-wrap: balance;
}

.statement__title mark.is-fix {
  background: #dcefe6;
  color: inherit;
}

/* Quick overview stage picker: three stages along one run, each pairing today with the proposal */
.qv-picker {
  gap: 24px;
  margin-top: 14px;
}

.qv-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--border);
}

.qv-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.qv-tab i {
  display: grid;
  flex: none;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f1f1f4;
  font-size: 10px;
  font-style: normal;
  transition: background 0.15s, color 0.15s;
}

.qv-tab:hover { background: #f6f6f8; color: var(--grey); }
.qv-tab.is-on { background: var(--t); color: var(--c); }
.qv-tab.is-on i { background: var(--c); color: #fff; }

.qv-pane__q {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 20px;
}

.qv-pane__q b {
  color: var(--ink);
  font-size: 17px;
  line-height: 24px;
  font-weight: 600;
}

.qv-pane__badge {
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--t);
  color: var(--c);
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.qv-panes {
  display: grid;
  padding: 24px;
  border-radius: 16px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--border);
  container-type: inline-size;
}

.qv-pane .ov-nav {
  margin-top: auto;
  padding-top: 20px;
  box-shadow: inset 0 1px 0 var(--border);
}

/* Panes share one cell so switching never changes the height */
.qv-pane { display: flex; flex-direction: column; grid-area: 1 / 1; visibility: hidden; }
.qv-pane.is-on { visibility: visible; }

.qv-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 14px;
  margin-bottom: 24px;
}

.qv-side {
  display: grid;
  grid-row: 1 / span 2;
  grid-template-rows: subgrid;
  gap: 10px;
}

.qv-side__text { display: flex; flex-direction: column; gap: 10px; }

.qv-side:first-child { grid-column: 1; }
.qv-side:last-child { grid-column: 3; }
.qv-side:last-child .proof-visual { background: var(--t); }

.qv-side h4 {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}

.qv-side p {
  margin: 0;
  color: var(--grey);
  font-size: 13px;
  line-height: 20px;
}

.qv-arrow {
  display: grid;
  grid-column: 2;
  grid-row: 1;
  place-items: center;
  align-self: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--t);
  color: var(--c);
  font-weight: 600;
}

.qv-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  align-content: flex-start;
  gap: 6px;
}

.qv-chips span {
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--t);
  color: var(--c);
  font-size: 12px;
  line-height: 18px;
  font-weight: 500;
}

.proof-visual.qv-shot { height: auto; }
.qv-pair > .qv-side:first-child .qv-shot { background: #f4f4f5; }
.qv-shot .proof-visual__toolbar { justify-content: flex-start; }
.qv-shot .proof-visual__toolbar img { display: none; }
.qv-shot .proof-visual__toolbar .eyebrow { display: inline-flex; align-items: center; gap: 8px; }
.qv-shot .proof-visual__toolbar .eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.qv-shot__stage {
  display: flex;
  flex: 1;
  justify-content: center;
  align-items: flex-start;
}

.qv-shot__stage > .chat {
  flex: none;
  width: 285px;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 0 0 1px var(--fig-edge);
  overflow: hidden;
}

.qv-shot__stage > .chat .chat__thread {
  flex: none;
  padding-top: 4px;
  overflow: visible;
}

/* Panels shrink like a scaled screenshot so today and proposed stay side by side */
@container (max-width: 682px) {
  .qv-shot__stage > .chat { zoom: 0.84; }
}

@container (max-width: 590px) {
  .qv-shot__stage > .chat { zoom: 1; }
  .qv-pair { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .qv-side { display: flex; flex-direction: column; grid-row: auto; grid-column: auto !important; }
  .qv-arrow { grid-column: auto; grid-row: auto; margin: 0 auto; transform: rotate(90deg); }
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.proof-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px;
  background: #fff;
  outline: 1px solid var(--border);
  outline-offset: -1px;
  border-radius: 12px;
  overflow: hidden;
}

.proof-visual {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 220px;
  padding: 14px;
  background: #eef3ff;
  border-radius: 12px;
  overflow: hidden;
}

.proof-visual__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.proof-visual__content {
  display: flex;
  flex: 1 0 0;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  padding: 10px;
  background: #fff;
  outline: 1px solid var(--border);
  outline-offset: -1px;
  border-radius: 8px;
  overflow: hidden;
}

.scope-summary,
.selected-change__meta {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-size: 9px;
  line-height: 14px;
  font-weight: 550;
  letter-spacing: 0.045px;
  white-space: nowrap;
}

.scope-summary {
  padding: 8px;
  background: #f5f5f5;
  border-radius: 5px;
}

.scope-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.scope-rows span {
  display: block;
  height: 7px;
  border-radius: 999px;
  background: #dce4f5;
}

.live-changes {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.change-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  background: #f5f5f5;
  border-radius: 5px;
  font-size: 9px;
  line-height: 14px;
  font-weight: 450;
  letter-spacing: 0.045px;
  white-space: nowrap;
}

.change-row--active { background: #eef3ff; }

.change-row__name {
  flex: 1 0 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
}

.selected-change {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  background: #eef3ff;
  outline: 1px solid #b8c8f3;
  outline-offset: -1px;
  border-radius: 6px;
  white-space: nowrap;
}

.selected-change p {
  overflow: hidden;
  text-overflow: ellipsis;
}

.review-actions {
  display: flex;
  gap: 8px;
}

.review-actions span {
  display: flex;
  flex: 1 0 0;
  align-items: center;
  justify-content: center;
  height: 28px;
  border-radius: 5px;
  font-size: 9px;
  line-height: 14px;
  font-weight: 550;
  letter-spacing: 0.045px;
}

.review-actions__revert {
  outline: 1px solid var(--border);
  outline-offset: -1px;
  color: var(--ink);
}

.review-actions__accept {
  background: #315edb;
  color: #fff;
}

.proof-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.proof-content__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.workspace img {
  width: 100%;
  height: auto;
  border-radius: 11px;
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.09);
}

/* ---------- Primary research ---------- */
/* A FigJam-style canvas: the story is a selected frame, the sources are named frames */
.narrative {
  --link: #9747ff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1.25fr);
  padding: 48px 32px 40px;
  background: radial-gradient(#d4d4d8 1px, transparent 1px) 0 0 / 20px 20px, #f7f7f8;
  box-shadow: inset 0 0 0 1px var(--border);
  border-radius: 12px;
}

.narrative__personal {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px;
  background: #f3edfb;
  outline: 1.5px solid #0c8ce9;
}

.narrative__personal::before,
.source::before {
  content: attr(data-name);
  position: absolute;
  top: -20px;
  left: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 16px;
  font-weight: 500;
  white-space: nowrap;
}

.narrative__personal::before { color: #0c8ce9; }

.narrative__personal::after {
  content: "Fill × Hug";
  position: absolute;
  bottom: -24px;
  left: 50%;
  padding: 1px 6px;
  border-radius: 3px;
  background: #0c8ce9;
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  font-weight: 600;
  transform: translateX(-50%);
}

.narrative__personal > i {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #fff;
  box-shadow: 0 0 0 1.5px #0c8ce9;
}

.narrative__personal > i:nth-of-type(1) { top: -4px; left: -4px; }
.narrative__personal > i:nth-of-type(2) { top: -4px; right: -4px; }
.narrative__personal > i:nth-of-type(3) { bottom: -4px; left: -4px; }
.narrative__personal > i:nth-of-type(4) { bottom: -4px; right: -4px; }

.narrative__personal .note { position: static; align-self: flex-end; margin: -12px -8px 0 0; }

.narrative__personal-meta {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: auto;
}

.marker-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Branch from the story to the middle of each of the three equal-height sources */
.narrative__link {
  position: relative;
  background:
    linear-gradient(var(--link), var(--link)) 0 50% / 50% 1.5px no-repeat,
    linear-gradient(var(--link), var(--link)) 100% 16.667% / 50% 1.5px no-repeat,
    linear-gradient(var(--link), var(--link)) 100% 50% / 50% 1.5px no-repeat,
    linear-gradient(var(--link), var(--link)) 100% 83.333% / 50% 1.5px no-repeat;
}

.narrative__link::before {
  content: "";
  position: absolute;
  top: 16.667%;
  bottom: 16.667%;
  left: calc(50% - 0.75px);
  border-left: 1.5px solid var(--link);
}

.narrative__link::after {
  content: "";
  position: absolute;
  top: calc(50% - 6px);
  left: calc(50% - 6px);
  width: 12px;
  height: 12px;
  border: 2px solid var(--link);
  border-radius: 50%;
  background: #fff;
}

.narrative__sources {
  display: grid;
  grid-auto-rows: 1fr;
  gap: 32px;
  min-width: 0;
  padding-top: 4px;
}

.source {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px;
  background: #fff;
  box-shadow: inset 0 0 0 1px #e3e3e6, 0 1px 3px rgba(0, 0, 0, 0.04);
}

.source__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 12px;
}

.source__body {
  display: flex;
  flex: 1 0 0;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.source__head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.source__head .badge {
  min-width: 0;
  height: auto;
  min-height: 24px;
  padding: 4px 10px;
  white-space: normal;
}

.split-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.split-heading__note {
  width: 350px;
  flex-shrink: 0;
}

.split-heading__note--wide {
  width: 601px;
}

/* Oversight matrix: 16 issues in stage tabs. Tab widths follow each stage's issue count. */
.ov { padding: 0; }

.ov-before { --c: #5b43d6; --t: #efedff; --l: #ddd6ff; }
.ov-during { --c: #0a6dc2; --t: #e8f3fc; --l: #cfe3f6; }
.ov-after { --c: #087a55; --t: #e8f6f0; --l: #c9eadb; }

.ov-top {
  gap: 12px;
  margin-bottom: 28px;
}

.ov-top p:last-child { margin: 0; }

/* Matches .ov-top; the card's 40px gap already separates it from the chart */
.cchart-top { gap: 12px; margin-bottom: -12px; }
.synthesis-top { gap: 12px; margin-bottom: 8px; }

.ov-body { scroll-margin-top: 24px; }
.ov-body [hidden] { display: none; }

.ov-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}

.ov-tab {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.ov-tab i {
  height: 4px;
  border-radius: 2px;
  background: #e9e9e9;
  transition: background 0.2s ease;
}

.ov-tab:hover i { background: var(--l); }
.ov-tab.is-on i { background: var(--c); }

.ov-tab__label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.ov-tab__num {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--t);
  color: var(--c);
  font-size: 10px;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

.ov-tab.is-on .ov-tab__label { color: var(--ink); }
.ov-tab.is-on .ov-tab__num { background: var(--c); color: #fff; }

.ov-list {
  margin: 0;
  padding: 0;
  list-style: none;
  outline: 1px solid #d9d9d5;
  outline-offset: -1px;
  overflow: hidden;
}

.ov-list__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 16px 20px;
  background: var(--t);
}

.ov-list__head > span:last-child {
  color: #5f5f5f;
  font-size: 13px;
  line-height: 22px;
  font-weight: 450;
}

/* The gradient draws the grid's column dividers */
.ov-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 210px;
  align-items: center;
  background: linear-gradient(to right, #f7f7f5 0 56px, #d9d9d5 56px 57px, #fff 57px calc(100% - 210px), #d9d9d5 calc(100% - 210px) calc(100% - 209px), #fff calc(100% - 209px));
  box-shadow: inset 0 1px 0 #d9d9d5;
}

.ov-row__n {
  color: var(--muted);
  font-size: 11px;
  line-height: 16px;
  font-weight: 550;
  letter-spacing: 0.055px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.ov-row__txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 14px 18px;
}

.ov-row__txt b {
  color: var(--ink);
  font-size: 15px;
  line-height: 22px;
  font-weight: 550;
  letter-spacing: -0.0325px;
}

.ov-row__txt span {
  color: #5f5f5f;
  font-size: 12px;
  line-height: 18px;
  font-weight: 450;
}

.ov-row__tag {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  height: 24px;
  margin-left: 16px;
  padding: 0 10px;
  border-radius: 6px;
  background: var(--t);
  color: var(--c);
  font-size: 11px;
  line-height: 16px;
  font-weight: 550;
  letter-spacing: 0.055px;
  white-space: nowrap;
}

.ov-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

.ov-nav__btn {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  border: 0;
  border-radius: 12px;
  background: none;
  font: inherit;
  cursor: pointer;
  transition: background 0.15s;
}

.ov-nav__btn small {
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
  font-weight: 550;
}

.ov-nav__btn span {
  color: var(--c);
  font-size: 15px;
  line-height: 21px;
  font-weight: 550;
}

.ov-nav__btn:hover { background: var(--t); }

.ov-nav__btn--prev {
  justify-self: start;
  align-items: flex-start;
  text-align: left;
}

.ov-nav__btn--next {
  justify-self: end;
  align-items: flex-end;
  text-align: right;
  background: var(--t);
  box-shadow: inset 0 0 0 1px var(--l);
}

.ov-nav__btn--next:hover { background: var(--l); }

.ov-nav__pos {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ov-nav__pos i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #dcdce0;
}

.ov-nav__pos i.is-on {
  width: 18px;
  border-radius: 3px;
  background: var(--c);
}

.ov-body { container-type: inline-size; }

/* Narrow column: the group tag drops under the issue text */
@container (max-width: 720px) {
  .ov-tab__label { align-items: flex-start; white-space: normal; }
  .ov-row {
    grid-template-columns: 44px minmax(0, 1fr);
    background: linear-gradient(to right, #f7f7f5 0 44px, #d9d9d5 44px 45px, #fff 45px);
  }
  .ov-row__n { grid-row: span 2; }
  .ov-row__txt { padding-bottom: 8px; }
  .ov-row__tag { margin: 0 0 14px 18px; }
}

@container (max-width: 480px) {
  .ov-nav { grid-template-columns: 1fr 1fr; }
  .ov-nav__pos { display: none; }
}

.stage-id {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Confidence chart: one bar per stage, its height showing how much control the designer has */
.cchart {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  box-shadow: inset 0 0 0 1px var(--border);
}

.cchart__col { display: flex; flex-direction: column; }
.cchart__col + .cchart__col { box-shadow: inset 1px 0 0 var(--border); }

.cchart__head { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 18px 16px; }
.cchart__head p { min-height: 34px; margin: 0; color: var(--muted); font-size: 12px; line-height: 17px; }

.cchart__badge {
  padding: 3px 10px;
  background: var(--t);
  color: var(--c);
  font-size: 12px;
  line-height: 18px;
  font-weight: 550;
  white-space: nowrap;
}

.cchart__well {
  display: flex;
  align-items: flex-end;
  height: 220px;
  margin: 0 16px;
  background: repeating-linear-gradient(0deg, transparent 0 43px, var(--border) 43px 44px);
}

.cchart__bar {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  height: var(--h);
  padding: 14px 12px;
  background: var(--t);
  box-shadow: inset 0 3px 0 var(--c);
  color: var(--c);
}

.cchart__bar img { position: absolute; top: -16px; right: 10px; width: 30px; height: 30px; }
.cchart__bar b { color: var(--c); font-size: 22px; line-height: 1; font-weight: 600; letter-spacing: -0.02em; }
.cchart__bar span { font-size: 12px; font-weight: 550; }

.cchart__body { display: flex; flex-direction: column; gap: 14px; padding: 18px 16px; }
.cchart__q { margin: 0; color: var(--ink); font-size: 13px; line-height: 18px; font-weight: 550; }
.cchart__body ul { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cchart__body li { display: flex; align-items: flex-start; gap: 8px; color: var(--grey); font-size: 12px; line-height: 17px; }
.cchart__body li::before { content: ""; flex: none; margin-top: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--c); }

.dashed-divider {
  height: 1px;
  margin-bottom: -1px;
  background: repeating-linear-gradient(90deg, #a9abb1 0 2px, transparent 2px 4px);
}

/* The insight as a selected frame on the canvas, with the three stages as smaller frames below */
.insight {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 56px 32px 40px;
  background: radial-gradient(#d4d4d8 1px, transparent 1px) 0 0 / 20px 20px, #f7f7f8;
  box-shadow: inset 0 0 0 1px var(--border);
}

.insight__frame {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px 176px 28px 28px;
  background: #fff;
  outline: 1.5px solid #0c8ce9;
}

.insight__frame > p { margin: 0; }

.insight__frame::before,
.insight__stage::before {
  content: attr(data-name);
  position: absolute;
  left: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.insight__frame::before { top: -20px; color: #0c8ce9; }

.insight__frame > i {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #fff;
  box-shadow: 0 0 0 1.5px #0c8ce9;
}

.insight__frame > i:nth-of-type(1) { top: -4px; left: -4px; }
.insight__frame > i:nth-of-type(2) { top: -4px; right: -4px; }
.insight__frame > i:nth-of-type(3) { bottom: -4px; left: -4px; }
.insight__frame > i:nth-of-type(4) { bottom: -4px; right: -4px; }

.insight__frame .note { top: -28px; right: -22px; }

.insight__quote {
  font-size: clamp(22px, 2vw, 26px);
  line-height: 1.3;
  font-weight: 550;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.insight__stages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.insight__stage {
  position: relative;
  margin: 0;
  padding: 12px 14px;
  background: var(--t);
  color: var(--c);
  font-size: 13px;
  line-height: 19px;
  font-weight: 550;
}

.insight__stage::before { top: -18px; }

/* How might we: each question paired with the gap from the insight that it answers */
.hmw-top { gap: 12px; margin-bottom: 10px; }

.hmw { display: flex; flex-direction: column; box-shadow: inset 0 0 0 1px var(--border); }

.hmw__labels,
.hmw__row {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) 32px minmax(0, 1.2fr);
  align-items: center;
}

.hmw__labels {
  padding: 12px 20px;
  background: #fafafa;
  box-shadow: inset 0 -1px 0 var(--border);
  color: var(--muted);
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hmw__row { padding: 20px; }
.hmw__row + .hmw__row { box-shadow: inset 0 1px 0 var(--border); }

.hmw__gap { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }

.hmw__gap p {
  margin: 0;
  color: var(--grey);
  font-size: 14px;
  line-height: 20px;
  text-decoration: line-through;
  text-decoration-color: rgba(0, 0, 0, 0.25);
}

.hmw__tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  background: var(--t);
  color: var(--c);
  font-size: 12px;
  font-weight: 500;
}

.hmw__arrow { color: var(--c); font-size: 18px; text-align: center; }

.hmw__q { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; background: var(--t); }
.hmw__q p { margin: 0; color: var(--ink); font-size: 14px; line-height: 21px; }
.hmw__q .hmw__title { color: var(--c); font-size: 15px; font-weight: 600; }

/* ---------- Design principles ---------- */

/* Validation, Outcome, Reflection */
.nx-tbd { color: var(--muted); font-style: italic; }
.nx-tbd::before { content: "[ "; font-style: normal; }
.nx-tbd::after { content: " ]"; font-style: normal; }

.nx-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.nx-stats > div,
.nx-changes > div,
.nx-stats__value { font-size: 20px; line-height: 28px; font-weight: 550; }

.nx-checks { margin: 0; padding: 0; list-style: none; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--border); }
.nx-checks li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 16px 20px; }
.nx-checks li + li { box-shadow: inset 0 1px 0 var(--border); }
.nx-checks__num { color: var(--muted); font-size: 11px; line-height: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.nx-checks__title { color: var(--text); font-size: 14px; line-height: 20px; font-weight: 550; }
.nx-checks__how { margin-top: 2px; color: var(--grey); font-size: 13px; line-height: 18px; }
.nx-result { padding: 1px 6px; border-radius: 5px; background: #f4f4f5; color: var(--grey); font-size: 11px; line-height: 16px; font-weight: 550; white-space: nowrap; }

.nx-changes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.nx-try { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 44px 36px 48px; background-color: var(--brand); background-image: radial-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px); background-size: 16px 16px; text-align: center; }
.nx-try__eyebrow { color: rgba(255, 255, 255, 0.8); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.nx-try__title { margin-top: -10px; color: #fff; font-size: 32px; line-height: 38px; font-weight: 600; letter-spacing: -0.6px; }
.nx-try__box { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 600px; padding: 16px 16px 12px 20px; border: 1px solid #fff; border-radius: 16px; background: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.22), 0 20px 40px rgba(0, 40, 100, 0.28); font: inherit; text-align: left; cursor: pointer; }
.nx-try__foot { display: flex; align-items: center; gap: 4px; margin-left: -6px; color: var(--grey); }
.nx-try__foot .i { width: 16px; height: 16px; flex: none; }
.nx-try__tool { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; }
.nx-try__mode { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 8px; border-radius: 8px; color: var(--ink); font-size: 13px; font-weight: 500; }
.nx-try__mode .i:last-child { width: 12px; height: 12px; color: var(--muted); }
.nx-try__mic { display: grid; place-items: center; width: 32px; height: 32px; margin-left: auto; border-radius: 50%; background: #e5f4ff; color: var(--brand); }
.nx-try__text { color: var(--ink); font-size: 17px; line-height: 30px; }
.nx-try__text::after { content: ""; display: inline-block; width: 2px; height: 20px; margin-left: 2px; vertical-align: -4px; background: var(--brand); animation: nx-caret 1s steps(1) infinite; }
@keyframes nx-caret { 50% { opacity: 0; } }
.nx-try__at { display: inline-flex; align-items: center; gap: 4px; padding: 0 7px; border-radius: 6px; background: #efedff; color: #5b43d6; font-size: 15px; line-height: 24px; font-weight: 550; white-space: nowrap; }
.nx-try__at::before { content: "#"; opacity: 0.6; }
.nx-try__send { display: grid; flex: none; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; transition: transform 0.15s ease; }
.nx-try__box:hover .nx-try__send, .nx-try__box:focus-visible .nx-try__send { transform: scale(1.08); }
.nx-try__hint { color: rgba(255, 255, 255, 0.78); font-size: 13px; }
.nx-try__text { min-height: 60px; }
.nx-try__at.is-new { animation: nx-pop 0.25s ease; }
@keyframes nx-pop { from { transform: scale(0.7); opacity: 0; } }
.nx-try.is-ready .nx-try__send { animation: nx-pulse 1.4s ease-in-out infinite; }
@keyframes nx-pulse { 50% { box-shadow: 0 0 0 8px rgba(0, 123, 229, 0.18); } }
@media (prefers-reduced-motion: reduce) { .nx-try__text::after, .nx-try__at.is-new, .nx-try.is-ready .nx-try__send { animation: none; } }

.nx-try-dialog { width: calc(100vw - 32px); max-width: none; height: calc(100vh - 32px); max-height: none; padding: 0; overflow: hidden; border: 0; border-radius: 16px; background: #1e1e1e; }
.nx-try-dialog[open] { display: flex; flex-direction: column; }
.nx-try-dialog::backdrop { background: rgba(16, 16, 20, 0.6); backdrop-filter: blur(4px); }
.nx-try-dialog__bar { display: flex; align-items: center; gap: 16px; height: 44px; padding: 0 8px 0 16px; color: rgba(255, 255, 255, 0.7); font-size: 13px; }
.nx-try-dialog__bar span { margin-right: auto; color: #fff; font-weight: 550; }
.nx-try-dialog__bar a { color: rgba(255, 255, 255, 0.7); }
.nx-try-dialog__bar button { padding: 6px 12px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, 0.12); color: #fff; font: inherit; cursor: pointer; }
.nx-try-dialog iframe { flex: 1; width: 100%; border: 0; background: #fff; }



/* Reflection */
.rf .premise .lead { margin: 0; max-width: 760px; }
.rf-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 24px; list-style: none; background-color: #f5f5f5; background-image: radial-gradient(#d6d6d9 1px, transparent 1px); background-size: 16px 16px; }
.rf-sticky { display: flex; flex-direction: column; gap: 8px; min-height: 176px; padding: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 4px 10px rgba(0,0,0,.06); }
.rf-sticky:nth-child(1) { background: #c2e5ff; transform: rotate(-1deg); }
.rf-sticky:nth-child(2) { background: #ffe0c2; transform: rotate(.8deg); }
.rf-sticky:nth-child(3) { background: #cdf4d3; transform: rotate(-.5deg); }
.rf-sticky__k { margin: 0; color: rgba(0,0,0,.55); font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.rf-sticky__title { margin: 0; color: var(--ink, #1e1e1e); font-size: 17px; line-height: 23px; font-weight: 600; letter-spacing: -0.01em; }
.rf-sticky__body { margin: auto 0 0; color: rgba(0,0,0,.7); font-size: 13px; line-height: 19px; }
/* Contact: a sticky board, same paper as Reflection */
.ct { align-items: center; gap: 28px; padding: 72px 32px; text-align: center; background-color: #f5f5f5; background-image: radial-gradient(#d6d6d9 1px, transparent 1px); background-size: 16px 16px; }
.ct__k { margin: 0; color: var(--muted); font-size: 14px; letter-spacing: -0.01em; }
.ct__title { margin: -12px 0 8px; color: var(--ink); font-size: clamp(48px, 7vw, 96px); line-height: .95; font-weight: 500; letter-spacing: -0.045em; }
.ct-board { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.ct-sticky { display: flex; flex-direction: column; justify-content: space-between; width: 220px; height: 176px; padding: 16px; color: inherit; text-align: left; text-decoration: none; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 4px 10px rgba(0,0,0,.06); transition: transform .2s; }
.ct-sticky:hover { transform: rotate(0) translateY(-4px) !important; }
.ct-sticky:nth-child(1) { background: #c2e5ff; transform: rotate(-1.5deg); }
.ct-sticky:nth-child(2) { background: #ffe0c2; transform: rotate(1deg); }
.ct-sticky:nth-child(3) { background: #cdf4d3; transform: rotate(-.6deg); }
.ct-sticky__k { margin: 0; color: rgba(0,0,0,.55); font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.ct-sticky__t { margin: 0; color: var(--ink); font-family: var(--font-alt); font-size: 22px; line-height: 27px; }
.ct-sticky__a { color: rgba(0,0,0,.6); font-size: 13px; }
.rf-close { padding-top: 24px; border-top: 1px solid var(--border); }
.rf-close__k { margin: 0 0 8px; color: var(--muted); font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.rf-close__text { max-width: 640px; margin: 0; font-size: 22px; line-height: 30px; font-weight: 500; letter-spacing: -0.01em; text-wrap: pretty; }

/* Concept validation */
.cv .ide-eyebrow { color: var(--brand); }
.cv-dev { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--border); background: #fff; }
.cv-dev__canvas { display: flex; flex-direction: column; justify-content: center; padding: 28px 20px 36px; background-color: #f5f5f5; background-image: radial-gradient(#d6d6d9 1px, transparent 1px); background-size: 16px 16px; }
.cv-dev__canvas .cv-fname { color: #0fa958; }
.cv-dev__sel { position: relative; padding: 16px; background: #fff; outline: 1px solid #0fa958; }
.cv-dev__sel > i { position: absolute; width: 7px; height: 7px; background: #fff; border: 1px solid #0fa958; }
.cv-dev__sel > i:nth-of-type(1) { top: -4px; left: -4px; }
.cv-dev__sel > i:nth-of-type(2) { top: -4px; right: -4px; }
.cv-dev__sel > i:nth-of-type(3) { bottom: -4px; left: -4px; }
.cv-dev__sel > i:nth-of-type(4) { bottom: -4px; right: -4px; }
.cv-dev__sel h4 { margin: 0; color: var(--ink); font-size: 16px; line-height: 22px; font-weight: 600; }
.cv-dev__sel p { margin: 2px 0 0; color: var(--grey); font-size: 13px; line-height: 18px; }
.cv-dev__code { display: flex; flex-direction: column; min-width: 0; border-left: 1px solid var(--border); }
.cv-dev__head { display: flex; align-items: center; justify-content: space-between; margin: 0; padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--ink); font-size: 12px; font-weight: 600; }
.cv-dev__head span { padding: 1px 6px; background: #e8f7ef; color: #0a7a42; font-size: 11px; font-weight: 500; }
.cv-dev pre { margin: 0; padding: 14px; color: #3a3d44; font: 12px/20px ui-monospace, "SF Mono", Menlo, monospace; white-space: pre-wrap; }
.cv-dev .k { color: #8a3ffc; }
.cv-dev .s { color: #0a7a42; }
.cv-dev .n { color: #c2410c; font-weight: 600; }
.cv-dev .c { color: var(--muted); }

.cv-sc { display: grid; grid-template-columns: 250px minmax(0, 1fr); border: 1px solid var(--border); }
.cv-sc__layers { border: 0; border-right: 1px solid var(--border); }
.cv-sc .cv-layers li { display: block; padding: 0; }
.cv-sc__layers button { box-sizing: border-box; display: grid; grid-template-columns: 16px 1fr; gap: 8px; align-items: center; width: 100%; padding: 9px 12px; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.cv-sc__layers button:hover { background: #f7f7f8; }
.cv-sc__layers button:focus-visible { outline: 2px solid #0d99ff; outline-offset: -2px; }
.cv-sc__layers button[aria-pressed="true"] { background: #e5f4ff; box-shadow: inset 2px 0 0 #0d99ff; }
.cv-sc__layers button > .i { width: 14px; height: 14px; color: var(--c); }
.cv-sc__layers .cv-layers__name { display: block; }
.cv-sc__canvas { display: flex; flex-direction: column; padding: 28px 24px 32px; background-color: #f5f5f5; background-image: radial-gradient(#d6d6d9 1px, transparent 1px); background-size: 16px 16px; }
.cv-sc__item .cv-fname { color: #0d99ff; }
.cv-sc__frame { position: relative; display: flex; flex-direction: column; gap: 12px; margin-bottom: 66px; padding: 18px 18px 34px; background: #fff; outline: 1px solid #0d99ff; }
.cv-sc__frame > i { position: absolute; width: 7px; height: 7px; background: #fff; border: 1px solid #0d99ff; }
.cv-sc__frame > i:nth-of-type(1) { top: -4px; left: -4px; }
.cv-sc__frame > i:nth-of-type(2) { top: -4px; right: -4px; }
.cv-sc__frame > i:nth-of-type(3) { bottom: -4px; left: -4px; }
.cv-sc__frame > i:nth-of-type(4) { bottom: -4px; right: -4px; }
.cv-sc__stage { display: inline-flex; align-items: center; gap: 5px; color: var(--c); font-size: 11px; line-height: 16px; font-weight: 600; white-space: nowrap; }
.cv-sc__stage::before { content: ""; width: 7px; height: 7px; background: var(--c); }
.cv-sc__frame h4 { margin: 0; color: var(--ink); font-size: 18px; line-height: 24px; font-weight: 600; }
.cv-sc__stk { position: absolute; right: -10px; top: calc(100% - 18px); z-index: 2; width: 76%; margin: 0; padding: 12px 12px 22px; background: color-mix(in srgb, var(--c) 16%, #fff); clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%); color: var(--ink); font-family: var(--font-alt); font-size: 13px; line-height: 18px; font-weight: 600; transform: rotate(-1.5deg); }
.cv-sc__stk::after { content: ""; position: absolute; right: 0; bottom: 0; width: 14px; height: 14px; background: linear-gradient(to top left, transparent 50%, rgba(0, 0, 0, 0.14) 50%); }
.cv-sc__props { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; align-items: baseline; margin: 2px 0 0; padding-top: 12px; border-top: 1px solid #f0f0f0; }
.cv-sc__props dt { color: var(--muted); font-size: 10px; line-height: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.cv-sc__props dd { margin: 0; color: var(--grey); font-size: 12px; line-height: 17px; }
.cv-sc__chips { display: flex; flex-wrap: wrap; gap: 4px; }
.cv-sc__chips span { padding: 1px 6px; background: #f2f2f4; color: var(--grey); font-size: 11px; line-height: 18px; white-space: nowrap; }

.cv-eq { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: -8px 0 0; color: var(--grey); font-size: 16px; line-height: 24px; }
.cv-eq b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.cv-eq em { color: var(--muted); font-style: normal; }
.cv-eq__total { padding: 0 6px; background: #e5f4ff; color: #0d99ff; }
.cv-eq__total b { color: #0d99ff; }
.cv-eq small { padding-left: 12px; border-left: 1px solid var(--border); font-size: 16px; }
.cv-canvas { margin-top: 8px; padding: 36px 28px 44px; background-color: #f5f5f5; background-image: radial-gradient(#d6d6d9 1px, transparent 1px); background-size: 16px 16px; }
.cv-canvas__top { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: end; }
.cv-canvas__side { display: flex; flex-direction: column; gap: 14px; }
.cv-fname { display: flex; align-items: center; gap: 4px; margin: 0 0 4px; color: var(--muted); font-size: 11px; line-height: 16px; white-space: nowrap; }
.cv-fname .i { width: 12px; height: 12px; flex: none; }
.cv-frame.is-sel .cv-fname { color: #0d99ff; }
.cv-hero { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 24px; background: #fff; outline: 1px solid #0d99ff; }
.cv-hero > i { position: absolute; width: 7px; height: 7px; background: #fff; border: 1px solid #0d99ff; }
.cv-hero > i:nth-of-type(1) { top: -4px; left: -4px; }
.cv-hero > i:nth-of-type(2) { top: -4px; right: -4px; }
.cv-hero > i:nth-of-type(3) { bottom: -4px; left: -4px; }
.cv-hero > i:nth-of-type(4) { bottom: -4px; right: -4px; }
.cv-hero__big { margin: 0; color: var(--ink); font-size: 72px; line-height: 72px; font-weight: 600; letter-spacing: -2.5px; font-variant-numeric: tabular-nums; }
.cv-hero__big small { font-size: 32px; letter-spacing: -1px; }
.cv-hero__label { margin: 0; color: var(--grey); font-size: 14px; line-height: 20px; }
.cv-badge { position: absolute; left: 50%; bottom: -26px; padding: 2px 6px; border-radius: 2px; background: #0d99ff; color: #fff; font-size: 11px; line-height: 16px; font-weight: 500; white-space: nowrap; transform: translateX(-50%); font-variant-numeric: tabular-nums; }
.cv-mini { margin: 0; padding: 10px 12px; background: #fff; color: var(--ink); font-size: 20px; line-height: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cv-group { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.cv-cap { margin: 0; color: var(--muted); font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.cv-layers { border: 1px solid var(--border); background: #fff; font-size: 12px; }
.cv-layers__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0; padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--ink); font-size: 12px; font-weight: 600; }
.cv-layers__head span { color: var(--muted); font-weight: 450; }
.cv-layers ol { margin: 0; padding: 0; list-style: none; }
.cv-layers li { display: grid; grid-template-columns: 16px 1fr auto 44px; gap: 10px; align-items: center; padding: 9px 12px; }
.cv-layers li + li { border-top: 1px solid #f2f2f2; }
.cv-layers li.is-sel { background: #e5f4ff; box-shadow: inset 2px 0 0 #0d99ff; }
.cv-layers li > .i { width: 14px; height: 14px; color: var(--c); }
.cv-layers__name { margin: 0; color: var(--ink); font-size: 13px; line-height: 18px; font-weight: 500; }
.cv-layers__name small { display: block; color: var(--muted); font-size: 11px; line-height: 16px; font-weight: 450; }
.cv-layers li > b { color: var(--ink); font-size: 14px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.cv-dots { display: inline-flex; gap: 2px; }
.cv-dots i { width: 7px; height: 7px; background: var(--c); }
.cv-dots i.off { background: #e2e3e6; }
.cv-obs { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.cv-stickies { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.cv-stickies > li { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px 16px 32px; background: var(--st); font-family: var(--font-alt); clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%); transform: rotate(var(--tilt, 0deg)); }
.cv-stickies > li::after { content: ""; position: absolute; right: 0; bottom: 0; width: 20px; height: 20px; background: linear-gradient(to top left, transparent 50%, rgba(0, 0, 0, 0.14) 50%); }
.cv-stickies h4 { margin: 0; color: #1e1e1e; font-size: 15px; line-height: 21px; font-weight: 600; }
.cv-stamp { align-self: flex-start; margin: 0; padding: 2px 8px; border-radius: 999px; color: #fff; font-family: var(--font); font-size: 11px; line-height: 16px; font-weight: 700; transform: rotate(-3deg); }
.cv-stamp.is-good { background: #087a55; }
.cv-stamp.is-warn { background: #b2560d; }
.cv-next { margin: 0; color: rgba(0, 0, 0, 0.72); font-size: 13px; line-height: 19px; }
.cv-next::before { content: "→ "; color: #1e1e1e; font-weight: 700; }



@media (max-width: 860px) {
  .nx-stats, .rf-board, .nx-changes { grid-template-columns: minmax(0, 1fr); }
  .cv-stickies, .cv-canvas__top { grid-template-columns: minmax(0, 1fr); }
  .cv-hero__big { font-size: 56px; line-height: 56px; }
  .cv-dots { display: none; }
  .cv-layers li { grid-template-columns: 16px 1fr 44px; }
}
@media (max-width: 640px) {
  .cv-dev { grid-template-columns: minmax(0, 1fr); }
  .cv-dev__code { border-left: 0; border-top: 1px solid var(--border); }
  .cv-sc { grid-template-columns: minmax(0, 1fr); }
  .cv-sc__layers { border-right: 0; border-bottom: 1px solid var(--border); }
}

.progression {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.progression__arrow {
  width: 23px;
  height: 16px;
}

.progression__stop {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--border);
  font-size: 13px;
  line-height: 18px;
  font-weight: 550;
  white-space: nowrap;
}

.progression__num {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f4f4f5;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.principles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px 32px;
  padding: 56px 32px 40px;
  background: radial-gradient(#d4d4d8 1px, transparent 1px) 0 0 / 20px 20px, #f7f7f8;
  box-shadow: inset 0 0 0 1px var(--border);
}

.principle {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  outline: 1.5px solid #0c8ce9;
  container-type: inline-size;
}

.principle::before {
  content: attr(data-name);
  position: absolute;
  top: -20px;
  left: 0;
  color: #0c8ce9;
  font-size: 11px;
  line-height: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.principle > i {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #fff;
  box-shadow: 0 0 0 1.5px #0c8ce9;
}

.principle > i:nth-of-type(1) { top: -4px; left: -4px; }
.principle > i:nth-of-type(2) { top: -4px; right: -4px; }
.principle > i:nth-of-type(3) { bottom: -4px; left: -4px; }
.principle > i:nth-of-type(4) { bottom: -4px; right: -4px; }

.principle__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
}

.principle__body p { margin: 0; }

.principle__num {
  color: #c9cad0;
  font-size: 24px;
  line-height: 24px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.principle__meta {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  border-top: 1px dashed #d0d0d0;
}

.principle__meta > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 24px;
}

.principle__meta > div + div { border-left: 1px dashed #d0d0d0; }

@container (max-width: 440px) {
  .principle__meta { grid-template-columns: minmax(0, 1fr); }
  .principle__meta > div + div { border-left: 0; border-top: 1px dashed #d0d0d0; }
}

.principle__label {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.principle__stages,
.principle__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.principle__tags span {
  padding: 2px 8px;
  background: #f4f4f5;
  color: var(--grey);
  font-size: 12px;
  line-height: 18px;
  white-space: nowrap;
}

.stage-pill {
  padding: 2px 8px;
  border-radius: 5px;
  background: var(--t);
  color: var(--c);
  font-size: 12px;
  line-height: 18px;
  font-weight: 550;
  white-space: nowrap;
}

.stage-pill--before { --c: #5b43d6; --t: #efedff; }
.stage-pill--while { --c: #0a6dc2; --t: #e8f3fc; }
.stage-pill--after { --c: #087a55; --t: #e8f6f0; }

@keyframes evidence-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

.focus { box-shadow: inset 0 0 0 1px var(--border); }

.focus__row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
}

.focus__row + .focus__row { border-top: 1px solid var(--border); }

.focus__side {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px;
}

.focus__side--in { background: #ecf7f0; color: #036838; }
.focus__side--out { background: #f6f6f4; color: var(--grey); }

.focus__count {
  font-size: 28px;
  line-height: 32px;
  font-weight: 600;
}

.focus__label {
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.focus__in,
.focus__out {
  margin: 0;
  padding: 20px 24px;
  list-style: none;
}

.focus__in {
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  gap: 8px 24px;
}

.focus__in li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  line-height: 20px;
}

.focus__in svg { flex-shrink: 0; color: #036838; }

.focus__out {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
}

.focus__out li {
  color: var(--grey);
  font-size: 13px;
  line-height: 20px;
}

.focus__out b { color: var(--ink); font-weight: 600; }

/* ---------- Existing patterns ---------- */
.pattern {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pattern-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.pattern-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  outline: 1px solid #939393;
  outline-offset: -1px;
  border-radius: 4px;
  font-family: var(--font-alt);
  font-size: 14px;
  line-height: normal;
  white-space: nowrap;
}

.pattern-tab[role="button"] { cursor: pointer; }

.pattern-tab[role="button"]:hover:not(.is-active) { background: #fafafa; }

.pattern-tab:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -2px;
}

.pattern-tab.is-active {
  background: color-mix(in srgb, currentColor 8%, #fff);
  outline: 0.5px solid currentColor;
  outline-offset: -0.5px;
}

.pattern-tab__label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.pattern-tab__label--wide { gap: 10px; }

.stage__canvas {
  display: flex;
  flex-direction: column;
  height: 370px;
  background: #f2f2f2;
  outline: 1px solid var(--border);
  outline-offset: -1px;
  border-radius: 13px 13px 0 0;
  overflow: hidden;
}

.stage__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  background: #fff;
  box-shadow: inset 0 -1px 0 var(--border);
}

.stage__media {
  flex: 1;
  min-height: 0;
  width: 100%;
  object-fit: contain;
}

.stage__title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  white-space: nowrap;
}

.playback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: #fff;
  outline: 1px solid var(--border);
  outline-offset: -1px;
  border-radius: 9999px;
}

.stage [hidden] { display: none !important; }

.stage__placeholder {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  animation: evidence-in 0.25s ease;
}

.stage__illustration {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transform: scale(2.4);
}

.stage__illustration--row { flex-direction: row; }

.stage__timeline {
  --step: #315edb;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px;
  background: #fff;
  outline: 1px solid var(--border);
  outline-offset: -1px;
}

.stage__steps {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stage__step {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.stage__seg {
  position: relative;
  height: 4px;
  border-radius: 2px;
  background: #e9e9e9;
  overflow: hidden;
}

.stage__seg i {
  position: absolute;
  inset: 0;
  width: 0;
  background: var(--step);
}

.stage__label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 11px;
  line-height: 16px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s ease;
}

.stage__name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.stage__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  color: var(--step);
  background: #eef2fd;
  transition: color 0.2s ease, background 0.2s ease;
}

.stage__step.is-active .stage__label { color: var(--ink); }
.stage__step.is-active .stage__num { color: #fff; background: var(--step); }

.stage__caption {
  min-height: 36px;
  font-size: 12px;
  line-height: 18px;
  color: var(--grey);
}

.stage__caption b { font-weight: 600; color: var(--ink); }

.evidence {
  display: flex;
}

.evidence__item {
  display: flex;
  flex: 1 0 0;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  padding: 16px 18px;
  background: #fff;
  box-shadow: inset 0 1px 0 var(--border), inset 0 -1px 0 var(--border);
}

.evidence__item--borrowed { background: #eaf7ec; }

.evidence__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 9999px;
  background: #fff;
  line-height: normal;
}

.evidence__copy {
  display: flex;
  flex: 1 0 0;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.thumbs[hidden] { display: none; }

.thumb {
  display: flex;
  flex-direction: column;
  position: relative;
  background: #fff;
  border-radius: 5px;
  overflow: hidden;
}

/* Border sits above the zoomed media, which would otherwise paint over an inset outline */
.thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--border);
  pointer-events: none;
  transition: box-shadow 0.15s ease;
}

.thumb[role="button"] { cursor: pointer; }
.thumb[role="button"]:not(.is-selected):hover::after { box-shadow: inset 0 0 0 1px #c7c7c7; }
.thumb[role="button"]:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.thumb.is-selected::after { box-shadow: inset 0 0 0 2px var(--brand); }

.thumb__visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 88px;
  background: #f2f2f2;
  overflow: hidden;
}

.thumb__media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus, center);
  transform: scale(var(--zoom, 1));
  transform-origin: var(--focus, center);
}

.thumb__visual--row {
  flex-direction: row;
  gap: 8px;
}

.thumb__label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 10px;
  font-size: 9px;
  line-height: 14px;
  font-weight: 550;
  letter-spacing: 0.045px;
  color: var(--ink);
  white-space: nowrap;
}

.thumb__logo { align-self: flex-start; margin: 1px 0; }

.thumb__label p {
  overflow: hidden;
  text-overflow: ellipsis;
}

.line {
  display: block;
  height: 4px;
  flex-shrink: 0;
  border-radius: 9999px;
  background: #cdd0d2;
}

.diff-panel {
  width: 146px;
  background: #fff;
  outline: 1px solid var(--border);
  outline-offset: -1px;
  border-radius: 5px;
  overflow: hidden;
}

.diff-panel__chrome {
  display: flex;
  gap: 5px;
  padding: 7px 10px;
}

.diff-panel__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  font-size: 9px;
  line-height: 14px;
  font-weight: 550;
  letter-spacing: 0.045px;
}

.doc-panel {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 98px;
  padding: 10px;
  background: #fff;
  border-radius: 5px;
}

.doc-panel__sentence {
  display: flex;
  align-items: center;
  gap: 6px;
}

.popover,
.review-popover {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #fff;
  border-radius: 5px;
  box-shadow: 0 6px 18px -4px rgba(0, 0, 0, 0.14);
}

.popover { padding: 7px; }
.review-popover { padding: 8px; }

.popover__buttons {
  display: flex;
  gap: 6px;
}

.popover__buttons span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 18px;
  border-radius: 3px;
  font-size: 8px;
  line-height: normal;
}

.history-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 146px;
  padding: 10px;
  background: #fff;
  border-radius: 5px;
}

.history-panel__item,
.plan-panel__item {
  display: flex;
  align-items: center;
}

.history-panel__item { gap: 7px; }
.plan-panel__item { gap: 6px; }

.ledger-frame {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 36px;
  padding: 6px;
  background: #fff;
  border-radius: 5px;
}

.ledger-block {
  display: block;
  height: 26px;
  border-radius: 3px;
}

.ledger-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 104px;
  padding: 8px;
  background: #fff;
  border-radius: 5px;
}

.ledger-card--wide { width: 140px; }

.ledger-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.ledger-old,
.ledger-new {
  display: block;
  height: 4px;
  flex-shrink: 0;
  border-radius: 9999px;
}

.ledger-old { background: #f3b5ae; }
.ledger-new { background: #9fd9b6; }

.ledger-diff {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 5px;
  background: #f7f7f7;
  border-radius: 3px;
}

.ledger-card--danger { outline: 1px solid #f3b5ae; outline-offset: -1px; }

.mini-btn {
  flex-shrink: 0;
  padding: 1px 4px;
  border-radius: 3px;
  background: #f0f0f0;
  color: #5e5e5e;
  font-size: 6px;
  line-height: 9px;
  font-weight: 550;
}

.mini-btn--keep { background: #e5f5ea; color: #087a55; }
.mini-btn--warn { background: #fbe8e6; color: #c4483d; }

.count-pill {
  flex-shrink: 0;
  padding: 0 4px;
  border-radius: 9999px;
  background: #f1ebfa;
  color: #7b4bc2;
  font-size: 6px;
  line-height: 9px;
  font-weight: 550;
}

.flag-dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
}

.swatch {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 2px;
}

.avatar {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  border-radius: 50%;
}

.avatar--bot {
  border-radius: 2px;
  background: #7b4bc2;
}

.plan-panel {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 88px;
  padding: 8px;
  background: #fff;
  border-radius: 5px;
}

.checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  background: #fff;
  outline: 1px solid #c6c9cc;
  outline-offset: -1px;
  border-radius: 2px;
  font-size: 6px;
  line-height: normal;
  color: #fff;
}

.checkbox--on {
  background: #2c2c2c;
  outline-color: #2c2c2c;
}

.review-popover__accept {
  align-self: flex-start;
  padding: 4px 7px;
  border-radius: 3px;
  background: #2c2c2c;
  color: #fff;
  font-size: 9px;
  line-height: 14px;
  font-weight: 550;
  letter-spacing: 0.045px;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1024px) {
  .page { padding-bottom: 80px; }

  .layout {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 24px;
    margin-top: 48px;
    padding: 0 32px;
  }

  .app-tabs,

  .content { padding: 0; }

  .panel {
    top: 0;
    height: auto;
    max-height: none;
    margin: 0 -32px;
    box-shadow: 0 1px 0 var(--border);
  }

  .panel__resizer { display: none; }

  .panel__file { padding: 10px 24px 10px 32px; box-shadow: none; }

  .panel__file-meta { order: 1; margin: 2px 0 0; }
  .panel__menu { top: 40px; }

  .panel__folder svg { display: none; }

  .panel__current { display: inline; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--text); }
  .panel__current::before { content: "/"; margin-right: 4px; color: var(--panel-text-tertiary); }

  .panel__body {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: min(70vh, 560px);
    background: #fff;
    box-shadow: 0 1px 0 var(--border), 0 12px 24px rgba(0, 0, 0, 0.08);
  }

  .panel__group { padding: 8px 24px; }

  .content [id] { scroll-margin-top: 72px; }

  .narrative { grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1.25fr); padding: 44px 20px 36px; }

  .split-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .split-heading__note,
  .split-heading__note--wide { width: auto; max-width: 601px; }

  .scroll-x {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .principles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .hero { padding: 32px 32px 33px; gap: 28px; }

  .note { position: relative; top: auto; right: auto; align-self: flex-end; justify-self: end; margin: -8px -6px 8px 0; }
  .premise.has-note, .insight__frame.has-note { padding-right: 0; }

  .proof-grid { grid-template-columns: minmax(0, 1fr); }

  .narrative { grid-template-columns: minmax(0, 1fr); row-gap: 52px; }

  .narrative__link { display: none; }
  .narrative__sources { grid-auto-rows: auto; }

  .principles,
  .focus__out { grid-template-columns: minmax(0, 1fr); }

  .hmw__labels,
  .hmw__arrow { display: none; }
  .hmw__row { grid-template-columns: minmax(0, 1fr); gap: 12px; }

  .principles { gap: 48px; }

  .focus__row { grid-template-columns: minmax(0, 1fr); }
  .focus__side { flex-direction: row; align-items: baseline; gap: 10px; padding: 14px 20px; }
  .focus__in, .focus__out { padding: 16px 20px; }

  .pattern-tabs,
  .thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .br-desktop { display: none; }
}

@media (max-width: 600px) {
  .hero {
    padding: 20px 20px 24px;
  }

  .hero__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .hero-control__label { font-size: 13px; }


  .layout { padding: 0 16px; margin-top: 32px; }

  .panel { margin: 0 -16px; }
  .panel__file { padding: 10px 12px 10px 16px; }
  .panel__group { padding: 8px 12px; }

  .content { gap: 48px; }

  .card { padding: 32px 20px; gap: 32px; }

  .lead { font-size: 16px; }

  .quiet-meta__row {
    flex-direction: column;
    gap: 20px;
  }

  .callout { gap: 12px; }
  .callout__content { padding-right: 0; }
  .statement__title { font-size: 24px; line-height: 31px; }
  .statement__points { grid-template-columns: minmax(0, 1fr); }

  .narrative { padding: 40px 16px 32px; }
  .narrative__personal { padding: 20px; }

  .source {
    flex-direction: column;
    align-items: flex-start;
  }

  .progression { justify-content: flex-start; }
  .progression__arrow { display: none; }

  .principles { padding: 44px 16px 32px; gap: 40px; }
  .principle__body { padding: 20px; }
  .principle__meta > div { padding: 14px 20px; }

  .pattern-tabs,
  .thumbs { grid-template-columns: minmax(0, 1fr); }

  .stage__canvas { height: 260px; }
  .stage__step:not(.is-active) .stage__name { display: none; }

  .evidence { flex-direction: column; }
  .evidence__item + .evidence__item { box-shadow: inset 0 -1px 0 var(--border); }

  .cchart { grid-template-columns: minmax(0, 1fr); }
  .cchart__col + .cchart__col { box-shadow: inset 0 1px 0 var(--border); }
  .cchart__head p { min-height: 0; }
  .cchart__well { height: 140px; }

  .insight { padding: 44px 16px 32px; }
  .insight__frame { padding: 20px; }
  .insight__stages { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}

/* ---------- Existing patterns viewer (patterns.js) ---------- */
.pv {
  --pv-ink: #1e1e1e;
  --pv-muted: #6b6b6b;
  --pv-faint: #8b8b8b;
  --pv-bg: #f5f5f4;
  --pv-surface: #fff;
  --pv-green: #087a55;
  --pv-green-bg: #ecf7f1;
  --accent: #315edb;
  container: pv / inline-size;
  display: grid;
  gap: 18px;
  color: var(--pv-ink);
  line-height: 1.5;
}
:where(.pv) p { margin: 0; }
:where(.pv) button { font: inherit; color: inherit; cursor: pointer; }
:where(.pv) img { display: block; }

.pv-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 4px; background: #fff; box-shadow: inset 0 0 0 1px var(--border); }
.pv-tab { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; padding: 10px 12px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; line-height: 20px; font-weight: 600; text-align: center; cursor: pointer; transition: background .15s, color .15s; }
.pv-tab:hover { background: #f6f6f8; color: var(--grey); }
.pv-tab[aria-selected="true"] { background: color-mix(in srgb, var(--accent) 10%, #fff); color: var(--accent); }
.pv-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pv-tab__num { display: grid; flex: none; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #f1f1f4; font-size: 10px; font-variant-numeric: tabular-nums; }
.pv-tab[aria-selected="true"] .pv-tab__num { background: var(--accent); color: #fff; }
.pv-tab__text { min-width: 0; }

.pv-principle h3 { margin: 0 0 2px; font-size: 24px; font-weight: 550; line-height: 32px; letter-spacing: -0.408px; }
.pv-principle p { color: var(--pv-muted); font-size: 14px; }

.pv-split { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; }
.pv-toollist { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.pv-toolbtn { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; width: 100%; padding: 12px; border: 1px solid transparent; background: none; text-align: left; }
.pv-toolbtn:hover { background: var(--pv-bg); }
.pv-toolbtn[aria-current="true"] { border-color: color-mix(in srgb, var(--accent) 35%, white); background: color-mix(in srgb, var(--accent) 5%, white); }
.pv-toolbtn__num { align-self: start; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--pv-bg); color: var(--pv-muted); font-size: 11px; font-weight: 600; }
.pv-toolbtn[aria-current="true"] .pv-toolbtn__num { background: var(--accent); color: #fff; }
.pv-toolbtn__meta { font-size: 12px; color: var(--pv-faint); }
.pv-toolid { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.pv-toolid img { height: 12px; width: auto; }
.pv-toolid__title { font-size: 14px; font-weight: 500; line-height: 1.35; }
.pv-eq { display: none; gap: 2px; align-items: flex-end; height: 12px; }
.pv-toolbtn[aria-current="true"] .pv-eq { display: flex; }
.pv-eq i { width: 2px; background: var(--accent); animation: pv-eq 0.9s ease-in-out infinite; }
.pv-eq i:nth-child(2) { animation-delay: -.3s; }
.pv-eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes pv-eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }

.pv-split__main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }

@container pv (max-width: 640px) {
  .pv-split { grid-template-columns: minmax(0, 1fr); }
  .pv-toollist { grid-auto-flow: column; grid-auto-columns: minmax(180px, 1fr); overflow-x: auto; }
}
.pv-takeaway { font-size: 17px; font-weight: 500; line-height: 1.4; letter-spacing: -0.01em; }
.pv-takeaway__label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.pv-split__foot { display: flex; justify-content: flex-end; }
.pv-btn { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 7px 12px; border: 1px solid var(--border); background: var(--pv-surface); font-size: 13px; text-align: left; }
.pv-btn:hover { background: var(--pv-bg); }
.pv-btn svg { flex: none; width: 14px; height: 14px; }
.pv-btn__why { color: var(--pv-muted); }

.pv-player { display: grid; gap: 12px; }
.pv-player__screen { position: relative; background: #ececeb; overflow: hidden; aspect-ratio: 2.6 / 1; }
.pv-player__screen video { width: 100%; height: 100%; object-fit: contain; display: block; }
.pv-player__notes { position: absolute; inset: 0; pointer-events: none; }
.pv-note { position: absolute; border: 2px solid #ffd43b; border-radius: 6px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .45); opacity: 0; transition: opacity .25s; }
.pv-note.is-on { opacity: 1; }
.pv-note__label { position: absolute; left: -2px; top: calc(100% + 6px); padding: 3px 8px; border-radius: 4px; background: #ffd43b; color: #1e1e1e; font-size: 12px; font-weight: 600; line-height: 1.4; width: max-content; max-width: min(460px, 80vw); }
.pv-note--above .pv-note__label { top: auto; bottom: calc(100% + 6px); }
.pv-note--right .pv-note__label { left: auto; right: -2px; }
.pv-player__overlay { position: absolute; inset: 0; display: grid; place-items: center; border: 0; background: rgba(0, 0, 0, .18); color: #fff; }
.pv-player__overlay[hidden] { display: none; }
.pv-player__overlay svg { width: 56px; height: 56px; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .3)); }
.pv-player__controls { display: flex; align-items: center; gap: 6px; }
.pv-player__time { margin-left: 4px; font-size: 12px; color: var(--pv-muted); font-variant-numeric: tabular-nums; }
.pv-icon-btn { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--border); background: var(--pv-surface); }
.pv-icon-btn:hover { background: var(--pv-bg); }
.pv-icon-btn svg { width: 16px; height: 16px; }
.pv-player__caption { font-size: 14px; color: var(--pv-muted); min-height: 42px; }
.pv-player__caption b { color: var(--pv-ink); font-weight: 600; }

.pv-chapters { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.pv-chapters li { flex: 1 1 0; min-width: 0; }
.pv-chapter { display: grid; gap: 8px; width: 100%; padding: 4px 0; border: 0; background: none; text-align: left; }
.pv-chapter__track { display: block; height: 4px; border-radius: 2px; background: #e9e9e9; overflow: hidden; }
.pv-chapter__track i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--accent); }
.pv-chapter__label { display: flex; align-items: flex-start; gap: 6px; min-width: 0; font-size: 12px; color: var(--pv-faint); }
.pv-chapter__num { display: inline-grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 10%, white); color: var(--accent); font-size: 11px; font-weight: 600; }
.pv-chapter__name { min-width: 0; overflow: hidden; line-height: 20px; white-space: nowrap; text-overflow: ellipsis; }
.pv-chapter:hover .pv-chapter__label,
.pv-chapter.is-active .pv-chapter__label { color: var(--pv-ink); }
.pv-chapter.is-active .pv-chapter__num { background: var(--accent); color: #fff; }

.pv-evidence { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--border); overflow: hidden; }
.pv-evidence__item { display: flex; gap: 12px; padding: 14px 16px; font-size: 13px; color: var(--pv-muted); }
.pv-evidence__item--yes { background: var(--pv-green-bg); color: var(--pv-ink); }
.pv-evidence__icon { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--pv-surface); color: var(--pv-faint); font-size: 13px; }
.pv-evidence__item--yes .pv-evidence__icon { color: var(--pv-green); }
.pv-evidence__label { margin-bottom: 2px; font-size: 12px; font-weight: 600; color: var(--pv-faint); }
.pv-evidence__item--yes .pv-evidence__label { color: var(--pv-green); }

.pv-ev { border: 1px solid var(--border); }
.pv-ev__label { margin-bottom: 4px; font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--pv-faint); }
.pv-ev__need { padding: 16px; background: #eaf4fd; border-bottom: 1px solid #d4e7f9; }
.pv-ev__need .pv-ev__label { color: #0c8ce9; }
.pv-ev__need p:last-child { font-size: 16px; line-height: 24px; font-weight: 500; color: var(--pv-ink); }
.pv-ev__row { display: grid; grid-template-columns: 1fr 1fr; }
.pv-ev__cell { padding: 12px 16px; font-size: 13px; line-height: 20px; color: var(--pv-muted); }
.pv-ev__cell + .pv-ev__cell { border-left: 1px solid var(--border); }
.pv-ev__cell--yes .pv-ev__label { color: var(--pv-green); }
.pv-ev__cell ul { display: grid; gap: 4px; margin: 6px 0 0; padding: 0; list-style: none; }
.pv-ev__cell li { position: relative; padding-left: 13px; line-height: 19px; color: var(--pv-ink); }
.pv-ev__cell li::before { content: ""; position: absolute; left: 0; top: 7px; width: 5px; height: 5px; background: var(--pv-green); }

@media (max-width: 820px) {
  .pv-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pv-split { grid-template-columns: minmax(0, 1fr); }
  .pv-toollist { grid-auto-flow: column; grid-auto-columns: minmax(180px, 1fr); overflow-x: auto; }
  .pv-evidence { grid-template-columns: minmax(0, 1fr); }
  .pv-ev__row { grid-template-columns: minmax(0, 1fr); }
  .pv-ev__cell + .pv-ev__cell { border-left: 0; border-top: 1px solid var(--border); }
  .pv-chapters { overflow-x: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .pv-eq i { animation: none; height: 8px; }
}

/* =========================================================
   Pattern synthesis matrix
   ========================================================= */
.syn-mx {
  display: grid;
  grid-template-columns: 104px repeat(3, minmax(0, 1fr)) 184px;
  gap: 1px;
  background: var(--border);
  outline: 1px solid var(--border);
  outline-offset: -1px;
  overflow: hidden;
}

.syn-mx > * { background: #fff; }

.syn-mx__head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #fafafa;
  color: var(--grey);
  font-size: 9px;
  line-height: 14px;
  font-weight: 550;
  letter-spacing: 0.045px;
}

.syn-mx__head:first-child,
.syn-mx__head:nth-child(5) { color: var(--muted); }

.syn-mx__p {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 14px;
  background: var(--syn-tint);
  color: var(--syn-accent);
}

.syn-mx__p span { font-size: 9px; line-height: 14px; font-weight: 550; }
.syn-mx__p b { font-size: 15px; line-height: 1.2; font-weight: 450; }

.syn-mx__cell {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  align-content: start;
  gap: 6px;
  min-height: 76px;
  padding: 8px;
}
.syn-mx__cell.is-empty { background: repeating-linear-gradient(135deg, #fff 0 7px, #f1f1f3 7px 8px); }

.syn-tok {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  min-width: 0;
  padding: 8px 9px;
  border-radius: 6px;
  background: #fafafa;
  box-shadow: inset 0 0 0 1px #eceef1;
}

button.syn-tok {
  width: 100%;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

button.syn-tok:hover {
  background: #fff;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--syn-accent) 45%, white), 0 1px 2px rgba(0, 0, 0, 0.06);
}

button.syn-tok:active {
  transform: scale(0.96);
  background: color-mix(in srgb, var(--syn-accent) 8%, white);
  box-shadow: inset 0 0 0 1px var(--syn-accent);
}

button.syn-tok:focus-visible {
  outline: 2px solid var(--syn-accent);
  outline-offset: 2px;
}

.pv { scroll-margin-top: 72px; }

.pv-toolbtn.is-flash { animation: pv-flash 1.2s ease-out 1; }

@keyframes pv-flash {
  0%, 30% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent); }
  100% { box-shadow: 0 0 0 0 transparent; }
}

@media (prefers-reduced-motion: reduce) {
  button.syn-tok { transition: none; }
  button.syn-tok:active { transform: none; }
  .pv-toolbtn.is-flash { animation: none; }
}

.syn-tok b {
  font-size: 11px;
  line-height: 15px;
  font-weight: 550;
  letter-spacing: 0.055px;
  color: var(--syn-accent);
}

.syn-tok__logo {
  display: block;
  width: auto;
  max-width: 64px;
  height: 11px;
  object-fit: contain;
  object-position: left center;
}

.syn-tok--new {
  background: #fff;
  box-shadow: none;
  outline: 1px dashed #c9ccd2;
  outline-offset: -1px;
}

.syn-tok--new b { color: var(--ink); }

.syn-tok--new i {
  padding: 0 6px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 9px;
  line-height: 14px;
  font-style: normal;
  font-weight: 550;
}

.syn-mx__out {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 14px;
}

.syn-mx__out b {
  font-size: 13px;
  line-height: 18px;
  font-weight: 550;
  color: var(--syn-accent);
}

.syn-mx__out span {
  font-size: 9px;
  line-height: 14px;
  font-weight: 450;
  letter-spacing: 0.045px;
  color: var(--grey);
}

@media (max-width: 820px) {
  .syn-mx { grid-template-columns: minmax(0, 1fr); }
  .syn-mx__head { display: none; }
  .syn-mx__cell.is-empty { display: none; }
  .syn-mx__cell { min-height: 0; }

  .syn-mx__cell::before {
    content: attr(data-stage);
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 9px;
    line-height: 14px;
    font-weight: 550;
    letter-spacing: 0.045px;
  }
}
