/* ==========================================================================
   View-specific composition
   ========================================================================== */

/* --- stage rail (the growth pipeline) ------------------------------------ */
.stage-rail {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--s-3);
  padding: var(--s-4);
  border: 1px solid var(--line-1);
  border-radius: var(--r-lg);
  background: var(--surface-2);
  box-shadow: var(--shadow-1);
}
.stage {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3);
  border-radius: var(--r-md);
  border: 1px solid transparent;
  color: var(--ink-2);
  min-width: 0;
  transition:
    background var(--t-fast) var(--ease-out),
    border-color var(--t-fast) var(--ease-out);
}
.stage:hover {
  background: var(--surface-3);
  border-color: var(--line-1);
  text-decoration: none;
  color: var(--ink-1);
}
/* connecting track between stages */
.stage:not(:last-child)::after {
  content: "";
  position: absolute;
  right: calc(var(--s-3) * -1 - 2px);
  top: 50%;
  width: var(--s-3);
  height: 2px;
  translate: 0 -50%;
  background: var(--line-2);
}
.stage.done:not(:last-child)::after {
  background: var(--good);
}
.stage-dot {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: var(--r-full);
  border: 1px solid var(--line-2);
  background: var(--surface-3);
  font-size: var(--text-2xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
  transition: all var(--t-base) var(--ease-out);
}
.stage-dot .icon {
  width: 14px;
  height: 14px;
}
.stage > span:last-of-type,
.stage-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.stage strong {
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stage small {
  font-size: var(--text-2xs);
  color: var(--ink-4);
}
.stage > .icon {
  margin-left: auto;
  width: 14px;
  height: 14px;
  color: var(--ink-4);
  flex: none;
  opacity: 0;
  transition: all var(--t-fast) var(--ease-out);
}
.stage:hover > .icon {
  opacity: 1;
  translate: 2px 0;
}

.stage.done .stage-dot {
  background: var(--good-soft);
  border-color: var(--good-line);
  color: var(--good);
}
.stage.done small {
  color: var(--good);
}
.stage.current {
  background: var(--brand-softer);
  border-color: var(--brand-line);
}
.stage.current .stage-dot {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--brand-ink);
  box-shadow: var(--glow-brand);
}
.stage.current strong {
  color: var(--ink-1);
}
.stage.current small {
  color: var(--brand);
  font-weight: 640;
}

@media (max-width: 1100px) {
  .stage-rail {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  }
  .stage:not(:last-child)::after {
    display: none;
  }
}

/* --- next move (hero) ---------------------------------------------------- */
.next-move {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-5);
  border-radius: var(--r-lg);
  border: 1px solid var(--brand-line);
  background:
    radial-gradient(
      420px 220px at 88% -10%,
      color-mix(in srgb, var(--signal) 16%, transparent),
      transparent 70%
    ),
    linear-gradient(155deg, var(--brand-soft), transparent 58%),
    var(--surface-2);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}
.next-move::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--signal), transparent);
}
.next-move-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}
.next-move-top .icon {
  width: 18px;
  height: 18px;
  color: var(--brand);
}
.next-move h2 {
  font-size: var(--text-xl);
  letter-spacing: var(--tracking-tighter);
}
.next-move p {
  font-size: var(--text-sm);
  color: var(--ink-2);
  margin: 0;
}
.next-move .mission-last {
  color: var(--ink-1);
}
.mission-select {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-2);
  color: var(--ink-2);
  font-size: var(--text-xs);
}
.mission-select select {
  max-width: min(100%, 32rem);
}
.next-move-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-top: auto;
  padding-top: var(--s-4);
  flex-wrap: wrap;
}
.next-move-foot > span {
  font-size: var(--text-xs);
  color: var(--ink-3);
}

/* --- charts --------------------------------------------------------------- */
.plot {
  position: relative;
}
.plot svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.plot-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-4);
  margin-bottom: var(--s-4);
  flex-wrap: wrap;
}
.plot-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.plot-stat strong {
  font-size: var(--text-metric);
  font-weight: 660;
  line-height: 1;
  letter-spacing: var(--tracking-tighter);
  font-variant-numeric: tabular-nums;
}
.plot-stat span {
  font-size: var(--text-xs);
  color: var(--ink-3);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
  align-items: center;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--ink-2);
}
.legend-swatch {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 2px;
  background: var(--swatch, var(--series-1));
}
.legend-swatch.line {
  height: 2px;
  width: 14px;
  border-radius: var(--r-full);
}

.chart-note {
  margin: var(--s-3) 0 0;
  font-size: var(--text-2xs);
  color: var(--ink-4);
}

/* hover crosshair + tooltip */
.plot-hit {
  fill: transparent;
  cursor: crosshair;
}
.crosshair {
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--t-fast) var(--ease-out);
}
.plot.hovering .crosshair {
  opacity: 1;
}
.chart-tip {
  position: absolute;
  z-index: 5;
  min-width: 132px;
  padding: var(--s-2) var(--s-3);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface-4);
  box-shadow: var(--shadow-3);
  font-size: var(--text-xs);
  pointer-events: none;
  opacity: 0;
  translate: -50% -100%;
  transition: opacity var(--t-fast) var(--ease-out);
}
.plot.hovering .chart-tip {
  opacity: 1;
}
.chart-tip .tip-date {
  display: block;
  margin-bottom: 4px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line-1);
  font-size: var(--text-3xs);
  font-weight: 680;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.tip-row {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  color: var(--ink-2);
}
.tip-row b {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  color: var(--ink-1);
}

/* small multiples */
.sparks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(146px, 1fr));
  gap: var(--s-3);
  margin-top: var(--s-4);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line-1);
}
.spark-tile {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: var(--s-3);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  background: var(--surface-inset);
}
.spark-tile span {
  font-size: var(--text-2xs);
  font-weight: 640;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.spark-tile strong {
  font-size: var(--text-lg);
  font-weight: 660;
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--tracking-tight);
}
.spark-tile .plot,
.spark-tile .metric-spark {
  height: 30px;
  margin-top: 2px;
}
.spark-tile small {
  font-size: var(--text-3xs);
  line-height: 1.35;
  color: var(--ink-4);
}

/* progress ring */
.ring {
  display: grid;
  place-items: center;
  position: relative;
}
.ring svg {
  rotate: -90deg;
  overflow: visible;
}
.ring-track {
  stroke: var(--surface-inset);
}
.ring-fill {
  stroke: var(--brand);
  stroke-linecap: round;
  transition: stroke-dashoffset var(--t-slow) var(--ease-out);
}
.ring-label {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}
.ring-label strong {
  font-size: var(--text-lg);
  font-weight: 680;
  font-variant-numeric: tabular-nums;
}
.ring-label span {
  font-size: var(--text-3xs);
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- coverage ------------------------------------------------------------ */
.coverage {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.coverage-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--s-2) var(--s-3);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--line-1);
}
.coverage-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.coverage-row > span:first-child {
  font-size: var(--text-sm);
  color: var(--ink-2);
}
.coverage-bar {
  grid-column: 1 / -1;
  height: 4px;
  border-radius: var(--r-full);
  background: var(--surface-inset);
  overflow: hidden;
}
.coverage-bar i {
  display: block;
  height: 100%;
  border-radius: var(--r-full);
  background: var(--line-3);
  transition: width var(--t-slow) var(--ease-out);
}
.coverage-row.ready .coverage-bar i {
  background: linear-gradient(90deg, var(--good), var(--signal));
}
.coverage-row.ready > span:first-child {
  color: var(--ink-1);
}

/* --- priorities ---------------------------------------------------------- */
.priority-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3);
  margin: 0 calc(var(--s-2) * -1);
  border-radius: var(--r-md);
  transition: background var(--t-fast) var(--ease-out);
}
.priority-row:hover {
  background: var(--surface-3);
}
.priority-row > div {
  min-width: 0;
  flex: 1;
}
.priority-row strong {
  display: block;
  font-size: var(--text-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.priority-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.priority-marker {
  width: 3px;
  height: 30px;
  flex: none;
  border-radius: var(--r-full);
  background: var(--line-3);
}
.priority-marker.high {
  background: var(--danger);
}
.priority-marker.medium {
  background: var(--warn);
}
.priority-marker.low {
  background: var(--good);
}

/* --- page workspace ------------------------------------------------------- */
.page-banner {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  border: 1px solid var(--line-1);
  border-radius: var(--r-lg);
  background:
    linear-gradient(120deg, var(--brand-softer), transparent 55%),
    var(--surface-2);
}
.page-banner > div:nth-child(2) {
  min-width: 0;
  flex: 1;
}
.page-banner-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: var(--r-md);
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  color: var(--brand);
}
.page-banner-icon .icon {
  width: 19px;
  height: 19px;
}
.page-banner h2 {
  font-size: var(--text-lg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.page-banner a {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  word-break: break-all;
}
.page-banner-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex: none;
  text-align: right;
}

.page-switch {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: 0;
  max-width: 460px;
}
.page-switch .icon {
  width: 15px;
  height: 15px;
  color: var(--ink-3);
  flex: none;
}
.page-switch select {
  margin-top: 0;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--s-4);
}
.preset-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: var(--s-5);
  border: 1px solid var(--line-1);
  border-radius: var(--r-lg);
  background: var(--surface-2);
  transition:
    border-color var(--t-base) var(--ease-out),
    box-shadow var(--t-base) var(--ease-out);
}
.preset-card:hover {
  border-color: var(--brand-line);
  box-shadow: var(--glow-brand);
}
.preset-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-md);
  background: var(--brand-soft);
  color: var(--brand);
  margin-bottom: var(--s-1);
}
.preset-card h3 {
  font-size: var(--text-base);
}
.preset-card p {
  font-size: var(--text-xs);
  color: var(--ink-3);
  margin: 0;
  flex: 1;
}
.preset-card small {
  font-weight: 620;
  color: var(--warn);
}
.preset-card button {
  margin-top: var(--s-2);
}

.research-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: var(--s-2);
  margin: var(--s-4) 0;
}
.research-choices label {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin: 0;
  padding: var(--s-2) var(--s-3);
  border: 1px solid var(--line-1);
  border-radius: var(--r-sm);
  background: var(--surface-inset);
  font-size: var(--text-xs);
  font-weight: 540;
  color: var(--ink-2);
  cursor: pointer;
}
.research-choices label:has(input:checked) {
  border-color: var(--brand-line);
  background: var(--brand-soft);
  color: var(--ink-1);
}
.research-choices small {
  margin-left: auto;
  color: var(--ink-4);
}

.recommendation {
  padding: var(--s-4);
  margin-bottom: var(--s-3);
  border: 1px solid var(--line-1);
  border-left: 2px solid var(--warn);
  border-radius: var(--r-md);
  background: var(--surface-inset);
}
.recommendation:last-child {
  margin-bottom: 0;
}
.recommendation-head {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: var(--s-2);
}
.recommendation h3 {
  font-size: var(--text-sm);
  margin-bottom: 3px;
}
.recommendation p {
  font-size: var(--text-xs);
  color: var(--ink-3);
  margin: 0;
}
.recommendation-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-top: var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px solid var(--line-1);
}

.focus-query {
  padding: var(--s-3);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  background: var(--surface-inset);
  margin-bottom: var(--s-2);
}
.focus-query strong {
  display: block;
  font-size: var(--text-sm);
}
.focus-query small {
  display: block;
  margin-bottom: var(--s-2);
}

.trust-pillar {
  margin-top: var(--s-4);
}
.trust-pillar:first-of-type {
  margin-top: 0;
}
.trust-pillar h4 {
  margin: 0;
  padding-bottom: var(--s-2);
  font-size: var(--text-2xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line-2);
}
.trust-row {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--line-1);
}
.trust-row:last-child {
  border-bottom: 0;
}
.trust-row > div {
  flex: 1;
  min-width: 0;
}
.trust-row h3 {
  font-size: var(--text-sm);
  margin-bottom: 2px;
}
.trust-row p {
  font-size: var(--text-xs);
  color: var(--ink-3);
  margin: 0;
}
.trust-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: var(--r-sm);
}
.trust-icon .icon {
  width: 14px;
  height: 14px;
}
.trust-icon.teal {
  background: var(--good-soft);
  color: var(--good);
}
.trust-icon.amber {
  background: var(--warn-soft);
  color: var(--warn);
}

.metadata-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-2) var(--s-4);
  margin: 0;
  font-size: var(--text-sm);
}
.metadata-list dt {
  font-size: var(--text-xs);
  font-weight: 620;
  color: var(--ink-3);
  white-space: nowrap;
}
.metadata-list dd {
  margin: 0;
  color: var(--ink-1);
  word-break: break-word;
}

/* --- intelligence -------------------------------------------------------- */
.insight-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-6);
  padding: var(--s-6);
  border: 1px solid var(--line-1);
  border-radius: var(--r-lg);
  background:
    radial-gradient(
      460px 200px at 90% 0%,
      color-mix(in srgb, var(--signal) 14%, transparent),
      transparent 70%
    ),
    linear-gradient(140deg, var(--brand-soft), transparent 60%),
    var(--surface-2);
  flex-wrap: wrap;
}
.insight-hero h2 {
  font-size: var(--text-xl);
  margin: var(--s-1) 0 var(--s-2);
}
.insight-hero p {
  max-width: 56ch;
  margin: 0;
  font-size: var(--text-sm);
}
.insight-credit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--s-4) var(--s-6);
  border-radius: var(--r-md);
  background: var(--surface-inset);
  border: 1px solid var(--line-1);
  flex: none;
}
.insight-credit strong {
  font-size: var(--text-metric);
  font-weight: 680;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--signal);
}
.insight-credit span {
  font-size: var(--text-2xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--s-3);
}
.tool-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--s-4);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  background: var(--surface-2);
  transition:
    border-color var(--t-fast) var(--ease-out),
    translate var(--t-fast) var(--ease-out);
}
.tool-card:hover {
  border-color: var(--brand-line);
  translate: 0 -2px;
}
.tool-card .icon {
  width: 16px;
  height: 16px;
  color: var(--brand);
}
.tool-card strong {
  font-size: var(--text-sm);
}
.tool-card small {
  flex: 1;
}
.tool-card button {
  margin-top: var(--s-2);
  align-self: flex-start;
}

.insight-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--s-2);
  margin-bottom: var(--s-3);
}
.insight-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--s-3);
  border-radius: var(--r-sm);
  background: var(--surface-inset);
  border: 1px solid var(--line-1);
}
.insight-metric span {
  font-size: var(--text-2xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-3);
}
.insight-metric strong {
  font-size: var(--text-md);
  font-variant-numeric: tabular-nums;
}
.insight-callout {
  padding: var(--s-3) var(--s-4);
  border-left: 2px solid var(--signal);
  border-radius: var(--r-sm);
  background: var(--signal-soft);
  font-size: var(--text-xs);
}

/* ------------------------------------------------------- growth plan */
/* The per-target improvement cycle: the six stages wear the pipeline's
 * visual language — done / current / needed — on a connected rail. */
.target-goal {
  min-width: 0;
}
.target-goal + .target-goal {
  margin-top: var(--s-5);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line-1);
}
.plan-target-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
  margin-bottom: var(--s-2);
}
.plan-target-head > div {
  min-width: 0;
}
.plan-target-head h3 {
  font-size: var(--text-lg);
  letter-spacing: var(--tracking-tight);
}
.plan-target-head small {
  display: block;
  margin-top: 2px;
}
.plan-objective {
  font-size: var(--text-sm);
  color: var(--ink-2);
  max-width: 78ch;
}
.plan-rail {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--s-2);
  margin: var(--s-4) 0 0;
  padding: 0;
  list-style: none;
}
.plan-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-2);
  padding: var(--s-3);
  border-radius: var(--r-md);
  border: 1px solid var(--line-1);
  background: var(--surface-inset);
  min-width: 0;
}
.plan-step + .plan-step::before {
  content: "";
  position: absolute;
  top: 22px;
  left: calc(var(--s-2) * -1);
  width: var(--s-2);
  height: 1px;
  background: var(--line-2);
}
.plan-step-dot {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: var(--r-full);
  border: 1px solid var(--line-2);
  background: var(--surface-3);
  font-size: var(--text-3xs);
  font-weight: 720;
  color: var(--ink-3);
}
.plan-step-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.plan-step-text strong {
  font-size: var(--text-xs);
  line-height: var(--leading-snug);
  overflow-wrap: break-word;
}
.plan-step-text small {
  font-size: var(--text-3xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-4);
}
.plan-step.done {
  border-color: var(--good-line);
  background: var(--good-soft);
}
.plan-step.done .plan-step-dot {
  background: var(--good);
  border-color: var(--good);
  color: var(--brand-ink);
}
.plan-step.done .plan-step-text small {
  color: var(--good);
}
.plan-step.current {
  border-color: var(--brand-line);
  background: var(--brand-soft);
  box-shadow: var(--shadow-1);
}
.plan-step.current .plan-step-dot {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--brand-ink);
}
.plan-step.current .plan-step-text small {
  color: var(--brand);
}
.plan-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
  margin-top: var(--s-4);
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-md);
  border: 1px solid var(--brand-line);
  background: linear-gradient(120deg, var(--brand-soft), transparent 65%);
}
.plan-next-copy {
  min-width: 0;
}
.plan-next-copy .kicker {
  margin-bottom: 2px;
}
.plan-next-copy strong {
  display: block;
  font-size: var(--text-base);
}
.plan-next-copy p {
  margin: 2px 0 0;
  font-size: var(--text-xs);
  color: var(--ink-3);
  max-width: 62ch;
}
.plan-rules {
  margin-top: var(--s-3);
}
.plan-rules summary {
  color: var(--ink-3);
}
.plan-rules ul {
  margin: var(--s-3) 0;
  padding-left: 1.1rem;
  font-size: var(--text-xs);
  color: var(--ink-2);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.plan-list-title {
  margin: var(--s-4) 0 var(--s-3);
}
.plan-priorities {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: priority;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.plan-priority {
  counter-increment: priority;
  position: relative;
  padding: var(--s-3) var(--s-4) var(--s-3) var(--s-10);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  background: var(--surface-inset);
}
.plan-priority::before {
  content: counter(priority, decimal-leading-zero);
  position: absolute;
  left: var(--s-4);
  top: var(--s-3);
  font-size: var(--text-xs);
  font-weight: 720;
  font-variant-numeric: tabular-nums;
  color: var(--brand);
}
.plan-priority-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
  flex-wrap: wrap;
}
.plan-priority p {
  margin: var(--s-1) 0 0;
  font-size: var(--text-xs);
  color: var(--ink-3);
}
.plan-priority-action {
  color: var(--ink-2) !important;
  font-weight: 560;
}
@media (max-width: 1100px) {
  .plan-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  /* no connector across wrapped rows */
  .plan-step:nth-child(3n + 1)::before {
    display: none;
  }
}
@media (max-width: 640px) {
  .plan-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .plan-step::before {
    display: none !important;
  }
}

/* ------------------------------------------------- textfocus audit view */
.tf-section {
  margin-top: var(--s-4);
  padding-top: var(--s-3);
  border-top: 1px solid var(--line-1);
}
.tf-section h4 {
  margin: 0 0 var(--s-2);
  font-size: var(--text-2xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-3);
}
.tf-text {
  margin: 0;
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  overflow-wrap: break-word;
}
/* Tables inside an audit section are ordinary content, not a card's
 * full-bleed footer: cancel .table-wrap's negative margins there. */
.tf-section .table-wrap {
  margin: var(--s-2) 0 0;
  max-width: 100%;
  border: 1px solid var(--line-1);
  border-radius: var(--r-sm);
}
.tf-kv {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--s-2);
  margin: 0;
}
.tf-kv > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-sm);
  background: var(--surface-inset);
  border: 1px solid var(--line-1);
  min-width: 0;
}
.tf-kv dt {
  font-size: var(--text-3xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-3);
}
.tf-kv dd {
  margin: 0;
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  overflow-wrap: break-word;
}
.tf-bars {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  margin-bottom: var(--s-3);
}
.tf-bar {
  display: grid;
  grid-template-columns: minmax(180px, 2fr) 3fr auto;
  align-items: center;
  gap: var(--s-3);
  font-size: var(--text-xs);
}
.tf-bar-track {
  height: 6px;
  border-radius: var(--r-full);
  background: var(--neutral-soft);
  overflow: hidden;
}
.tf-bar-track i {
  display: block;
  height: 100%;
  border-radius: var(--r-full);
}
.tf-bar-track i.good {
  background: var(--good);
}
.tf-bar-track i.warn {
  background: var(--warn);
}
.tf-bar-track i.risk {
  background: var(--danger);
}
.tf-bar-value {
  font-variant-numeric: tabular-nums;
  min-width: 2.75em;
  text-align: right;
}
.tf-bar-value.good {
  color: var(--good);
}
.tf-bar-value.warn {
  color: var(--warn);
}
.tf-bar-value.risk {
  color: var(--danger);
}
.tf-yes {
  color: var(--good);
  font-weight: 640;
}
.tf-no {
  color: var(--ink-3);
}
.tf-extract {
  margin-top: var(--s-3);
}
.tf-extract summary {
  cursor: pointer;
  font-size: var(--text-xs);
  color: var(--ink-3);
}
.tf-extract pre {
  margin-top: var(--s-2);
  max-height: 320px;
  overflow: auto;
}
@media (max-width: 640px) {
  .tf-bar {
    grid-template-columns: 1fr auto;
  }
  .tf-bar-track {
    grid-column: 1 / -1;
    order: 3;
  }
}

/* --- keyword research ---------------------------------------------------- */
.provider-card {
  border-left: 2px solid var(--brand);
}
.keyword-context {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
  align-items: center;
  padding: var(--s-3) var(--s-4);
  margin: var(--s-3) 0;
  border-radius: var(--r-md);
  background: var(--surface-inset);
  border: 1px solid var(--line-1);
  font-size: var(--text-xs);
  color: var(--ink-3);
}
.keyword-context strong {
  color: var(--ink-1);
}

.select-all-row {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: var(--s-3);
  font-size: var(--text-xs);
  color: var(--ink-2);
  cursor: pointer;
}
.candidate-submit {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-wrap: wrap;
  padding: var(--s-3) var(--card-pad, var(--s-5));
  margin: 0 calc(var(--card-pad, var(--s-5)) * -1)
    calc(var(--card-pad, var(--s-5)) * -1);
  max-width: calc(100% + var(--card-pad, var(--s-5)) * 2);
  border-top: 1px solid var(--line-1);
  background: var(--surface-inset);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.candidate-submit > span {
  font-size: var(--text-xs);
  color: var(--ink-3);
  margin-right: auto;
  font-variant-numeric: tabular-nums;
}

/* --- reports -------------------------------------------------------------- */
.report-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-8);
  padding: var(--s-6);
  border: 1px solid var(--line-1);
  border-radius: var(--r-lg);
  background:
    radial-gradient(
      500px 240px at 88% 10%,
      color-mix(in srgb, var(--brand) 16%, transparent),
      transparent 68%
    ),
    var(--surface-2);
  overflow: hidden;
}
.report-hero h2 {
  font-size: var(--text-2xl);
  margin: var(--s-1) 0 var(--s-3);
  letter-spacing: var(--tracking-tighter);
}
.report-hero p {
  max-width: 50ch;
  font-size: var(--text-sm);
}
.paper {
  position: relative;
  width: 200px;
  flex: none;
  padding: var(--s-4);
  border-radius: var(--r-md);
  border: 1px solid var(--line-2);
  background: var(--surface-inset);
  box-shadow: var(--shadow-2);
  rotate: -3deg;
  transition: rotate var(--t-slow) var(--ease-out);
}
.report-hero:hover .paper {
  rotate: -1deg;
}
.paper > span {
  font-size: var(--text-3xs);
  letter-spacing: 0.1em;
  color: var(--ink-4);
}
.paper > b {
  display: block;
  margin: 4px 0 var(--s-3);
  font-size: var(--text-sm);
}
.paper-metrics {
  display: flex;
  gap: 5px;
  margin-bottom: var(--s-3);
}
.paper-metrics i {
  flex: 1;
  height: 22px;
  border-radius: var(--r-xs);
  background: var(--brand-soft);
}
.paper-plot {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 42px;
  margin-bottom: var(--s-3);
}
.paper-plot i {
  flex: 1;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, var(--brand), var(--brand-soft));
}
.paper-plot i:nth-child(1) {
  height: 42%;
}
.paper-plot i:nth-child(2) {
  height: 66%;
}
.paper-plot i:nth-child(3) {
  height: 38%;
}
.paper-plot i:nth-child(4) {
  height: 88%;
}
.paper-plot i:nth-child(5) {
  height: 58%;
}
.paper-plot i:nth-child(6) {
  height: 100%;
}
.paper-lines i {
  display: block;
  height: 4px;
  margin-bottom: 5px;
  border-radius: var(--r-full);
  background: var(--line-2);
}
.paper-lines i:nth-child(2) {
  width: 82%;
}
.paper-lines i:nth-child(3) {
  width: 58%;
}

.readiness {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--s-3);
}
.readiness > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: var(--s-4);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.readiness .icon {
  width: 16px;
  height: 16px;
  color: var(--brand);
  margin-bottom: var(--s-1);
}
.readiness strong {
  font-size: var(--text-xl);
  font-weight: 680;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.readiness span {
  font-size: var(--text-2xs);
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.report-row {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-3);
  margin: 0 calc(var(--s-2) * -1);
  border-radius: var(--r-md);
  transition: background var(--t-fast) var(--ease-out);
}
.report-row:hover {
  background: var(--surface-3);
}
.report-row > div:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.report-row h3 {
  font-size: var(--text-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.report-file {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: var(--r-sm);
  background: var(--brand-soft);
  color: var(--brand);
}
.report-file .icon {
  width: 16px;
  height: 16px;
}
.report-row-actions {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex: none;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.download-link {
  font-size: var(--text-2xs);
  font-weight: 600;
  color: var(--ink-3);
}

/* --- knowledge ----------------------------------------------------------- */
.evidence-hit {
  padding: var(--s-4);
  margin-bottom: var(--s-3);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.evidence-hit .card-head {
  margin-bottom: var(--s-2);
}
.evidence-hit h3 {
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  gap: var(--s-2);
}
.hit-rank {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: var(--r-xs);
  background: var(--brand-soft);
  color: var(--brand);
  font-size: var(--text-3xs);
  font-weight: 720;
}
.score-bar {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-top: var(--s-2);
  font-size: var(--text-2xs);
  color: var(--ink-4);
}
.score-bar i {
  display: block;
  height: 3px;
  min-width: 2px;
  border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--brand), var(--signal));
}

/* --- integrations --------------------------------------------------------- */
.integration-card {
  display: flex;
  flex-direction: column;
}
.integration-card p {
  font-size: var(--text-xs);
}
.integration-card .actions {
  margin-top: auto;
  padding-top: var(--s-3);
}
.integration-card > small {
  display: block;
  margin-top: var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px solid var(--line-1);
  line-height: var(--leading-normal);
}

/* --- command palette ------------------------------------------------------ */
#palette {
  width: min(600px, calc(100vw - var(--s-6)));
  padding: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-top: 12vh;
  margin-bottom: auto;
}
#palette::backdrop {
  background: #04070ee0;
  backdrop-filter: blur(6px);
}
.palette-input {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--line-1);
}
.palette-input .icon {
  width: 17px;
  height: 17px;
  color: var(--ink-3);
  flex: none;
}
.palette-input input {
  border: 0;
  background: none;
  padding: 0;
  font-size: var(--text-md);
}
.palette-input input:focus {
  box-shadow: none;
  background: none;
}
.palette-list {
  max-height: 55dvh;
  overflow-y: auto;
  padding: var(--s-2);
}
.palette-group {
  padding: var(--s-3) var(--s-3) var(--s-1);
  font-size: var(--text-3xs);
  font-weight: 700;
  letter-spacing: var(--tracking-kicker);
  text-transform: uppercase;
  color: var(--ink-4);
}
.palette-item {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  width: 100%;
  padding: var(--s-2) var(--s-3);
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  color: var(--ink-2);
  font-size: var(--text-sm);
  font-weight: 540;
  text-align: left;
  cursor: pointer;
}
.palette-item .icon {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--ink-4);
}
.palette-item small {
  margin-left: auto;
  flex: none;
}
.palette-item[aria-selected="true"] {
  background: var(--brand-soft);
  color: var(--ink-1);
}
.palette-item[aria-selected="true"] .icon {
  color: var(--brand);
}
.palette-foot {
  display: flex;
  gap: var(--s-4);
  padding: var(--s-3) var(--s-5);
  border-top: 1px solid var(--line-1);
  background: var(--surface-inset);
  font-size: var(--text-2xs);
  color: var(--ink-4);
}
.palette-foot span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.palette-empty {
  padding: var(--s-8);
  text-align: center;
  color: var(--ink-4);
  font-size: var(--text-sm);
}

/* --- misc ----------------------------------------------------------------- */
.history-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: 0;
  font-size: var(--text-xs);
  color: var(--ink-3);
  cursor: pointer;
}
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1px;
  background: var(--line-1);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  overflow: hidden;
}
.stat-strip > div {
  padding: var(--s-3) var(--s-4);
  background: var(--surface-2);
}
.stat-strip span {
  display: block;
  font-size: var(--text-2xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-3);
}
.stat-value {
  font-size: var(--text-xl);
  font-weight: 660;
  line-height: 1.2;
}

/* A short side card should keep its natural height beside a tall plot. */
.grid-main.top {
  align-items: start;
}
.side-stack {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  min-width: 0;
}
.side-stack > * {
  margin: 0;
}

/* Provider cards: keep every header identical regardless of title length, and
   give the action cluster room to sit on one line. */
.integration-card .card-head {
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-2);
  margin-bottom: var(--s-3);
}
.integration-card .card-head h2 {
  font-size: var(--text-md);
}
.integration-card .actions {
  gap: var(--s-2);
}
.integration-card .actions button {
  flex: 0 1 auto;
}

/* ------------------------------------------------------------ narrow widths */

/* ---------------------------------------------------------- page-one funnel */
/* The pipeline board on Mission control, and the per-target rail that repeats
   on every screen a target appears on. One spine, one look. */

.funnel {
  display: flex;
  flex-direction: column;
}
.funnel-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: var(--s-4);
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--line-1);
  align-items: start;
}
.funnel-row:last-child {
  border-bottom: 0;
}
.funnel-row.quiet {
  padding: var(--s-2) 0;
}
.funnel-row.goal {
  background: linear-gradient(90deg, var(--brand-softer), transparent 70%);
  border-radius: var(--r-md);
  padding-inline: var(--s-3);
  margin-inline: calc(var(--s-3) * -1);
}
.funnel-stage {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding-top: 2px;
}
.funnel-stage b {
  font-size: var(--text-sm);
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.funnel-cards {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  align-items: center;
  min-width: 0;
}
.funnel-card {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-2) var(--s-3);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  background: var(--surface-2);
  max-width: 100%;
}
.funnel-card-main {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.funnel-card-main strong {
  font-size: var(--text-xs);
  color: var(--ink-1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 32ch;
}
.funnel-card-main small {
  font-size: var(--text-3xs);
  color: var(--ink-4);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 36ch;
}
.funnel-card-main .funnel-gap {
  color: var(--warn);
}
.funnel-none {
  font-size: var(--text-2xs);
  color: var(--ink-4);
  font-style: italic;
}

/* The single-target rail: seven dots to page one. */
.target-rail {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-width: 0;
}
.target-rail-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
}
.rail-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--line-2);
}
.rail-dot.done {
  background: var(--good);
  border-color: var(--good);
}
.rail-dot.current {
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-softer);
}
.target-rail-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.target-rail-text strong {
  font-size: var(--text-xs);
  color: var(--ink-1);
}
.target-rail-text small {
  font-size: var(--text-3xs);
  color: var(--ink-4);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 40ch;
}
.workspace-pipeline {
  display: flex;
  flex-direction: column;
  padding: var(--s-2) var(--card-pad, var(--s-5));
}
.target-rail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-2) 0;
  border-bottom: 1px solid var(--line-1);
}
.target-rail-row:last-child {
  border-bottom: 0;
}
.target-rail-query {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.next-hint {
  display: block;
  margin-top: 2px;
  font-size: var(--text-3xs);
  color: var(--ink-4);
}
td .next-hint + button {
  margin-top: var(--s-2);
}

/* ------------------------------------------------------- growth workflows */
/* All ten workflows visible and selectable at once; the active one carries
   the brand edge, and every card shows its live record count. */

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  grid-auto-rows: 1fr;
  gap: var(--s-3);
}
.workflow-pick {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  padding: var(--s-4);
  border: 1px solid var(--line-1);
  border-radius: var(--r-lg);
  background: var(--surface-2);
  text-align: left;
  color: inherit;
  min-width: 0;
  /* Buttons default to nowrap; these cards carry real sentences. */
  white-space: normal;
  height: auto;
  transition:
    border-color var(--t-base) var(--ease-out),
    box-shadow var(--t-base) var(--ease-out),
    background var(--t-base) var(--ease-out);
}
.workflow-pick:hover {
  border-color: var(--brand-line);
  box-shadow: var(--glow-brand);
  background: var(--surface-2);
}
.workflow-pick.active {
  border-color: var(--brand);
  background: var(--brand-softer);
  box-shadow: var(--glow-brand);
}
.workflow-pick .preset-icon {
  margin: 0;
  flex: none;
}
.workflow-pick-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.workflow-pick-text strong {
  font-size: var(--text-sm);
  color: var(--ink-1);
  line-height: var(--leading-snug);
  overflow-wrap: break-word;
}
.workflow-pick-text small {
  font-size: var(--text-3xs);
  color: var(--ink-3);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.workflow-count {
  flex: none;
  min-width: 26px;
  text-align: center;
  padding: 2px 7px;
  border-radius: var(--r-full);
  background: var(--brand-soft);
  color: var(--brand);
  font-size: var(--text-2xs);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.workflow-count.none {
  background: var(--neutral-soft);
  color: var(--ink-4);
}

/* ------------------------------------------------------------------ system */
/* The System screen. Two kinds of figure sit side by side here — a fixed
   release record and live readings from the server — so the live ones are
   always labelled, never styled differently enough to look like a separate
   product. */

.delta {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  font-size: var(--text-2xs);
  color: var(--ink-3);
  white-space: nowrap;
}
.delta .icon {
  width: 12px;
  height: 12px;
  color: var(--ink-4);
}
.delta small {
  color: var(--ink-4);
}
.delta.down small {
  color: var(--good);
}
.metric-delta {
  margin-top: var(--s-2);
}

.verify-top {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  flex-wrap: wrap;
}
.verify-top > div {
  flex: 1;
  min-width: min(100%, 260px);
}
.verify-top h3 {
  font-size: var(--text-md);
  margin-bottom: var(--s-1);
}
.verify-top p {
  font-size: var(--text-xs);
  color: var(--ink-3);
  line-height: var(--leading-normal);
  margin-bottom: var(--s-3);
}
.verify-facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-5);
}
.verify-facts span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: var(--text-sm);
  color: var(--ink-1);
  font-variant-numeric: tabular-nums;
}
.verify-facts small {
  font-size: var(--text-3xs);
  letter-spacing: var(--tracking-kicker);
  text-transform: uppercase;
  color: var(--ink-4);
}

.verify-grid {
  align-items: start;
}

.suite-notes {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  margin-top: var(--s-4);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line-1);
  font-size: var(--text-2xs);
  color: var(--ink-3);
}
.suite-notes b {
  color: var(--ink-2);
  font-weight: 600;
}

.split-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-5);
}
.split-cols .kicker {
  display: block;
  margin-bottom: var(--s-2);
}
.split-cols .table-note {
  margin-top: var(--s-2);
}
.split-cols .row-item > span {
  flex: none;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.chip-row,
.area-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

.defect-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.defect {
  padding: var(--s-4);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.defect-head {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
}
.defect-head > div {
  flex: 1;
  min-width: 0;
}
.defect-head h3 {
  font-size: var(--text-sm);
  line-height: var(--leading-snug);
  margin-bottom: var(--s-2);
}
.defect-id {
  flex: none;
  padding: 2px 8px;
  border-radius: var(--r-sm);
  background: var(--surface-inset);
  border: 1px solid var(--line-1);
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.defect-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
}
.defect-evidence {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-3xs);
  color: var(--ink-4);
  white-space: nowrap;
}
.defect-evidence .icon {
  width: 12px;
  height: 12px;
}
.defect .disclosure {
  margin-top: var(--s-3);
}
.defect-detail p {
  font-size: var(--text-xs);
  color: var(--ink-2);
  line-height: var(--leading-normal);
}
.defect-detail p + p {
  margin-top: var(--s-2);
}
.defect-detail b {
  display: inline-block;
  min-width: 42px;
  color: var(--ink-4);
  font-size: var(--text-3xs);
  letter-spacing: var(--tracking-kicker);
  text-transform: uppercase;
}

.formula {
  padding: var(--s-4);
  border: 1px solid var(--brand-line);
  border-radius: var(--r-md);
  background: var(--brand-softer);
  text-align: center;
  margin-bottom: var(--s-4);
}
.formula code {
  font-size: var(--text-md);
  color: var(--ink-1);
}

.guard-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  margin-top: var(--s-4);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line-1);
}
.guard-list.flush {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  gap: var(--s-3);
}
.guard-list span {
  display: flex;
  align-items: flex-start;
  gap: var(--s-2);
  font-size: var(--text-xs);
  color: var(--ink-2);
}
.guard-list .icon {
  flex: none;
  margin-top: 2px;
  color: var(--good);
}

.method-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-bottom: var(--s-4);
}
.method {
  display: inline-flex;
  align-items: baseline;
  gap: var(--s-2);
  padding: 4px 10px;
  border: 1px solid var(--line-1);
  border-radius: var(--r-sm);
  background: var(--surface-inset);
  font-size: var(--text-sm);
  color: var(--ink-1);
  font-variant-numeric: tabular-nums;
}
.method b {
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  letter-spacing: var(--tracking-kicker);
  color: var(--ink-4);
}

.release-stamp {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-top: var(--s-5);
  font-size: var(--text-2xs);
  color: var(--ink-4);
}
.release-stamp .icon {
  width: 13px;
  height: 13px;
}

@media (max-width: 760px) {
  .split-cols {
    grid-template-columns: minmax(0, 1fr);
  }
  .verify-facts {
    gap: var(--s-4);
  }
}

@media (max-width: 760px) {
  .report-hero,
  .insight-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-5);
  }
  .paper {
    width: 100%;
    max-width: 220px;
    rotate: none;
  }
  .insight-credit {
    width: 100%;
  }
  .report-row {
    flex-wrap: wrap;
  }
  .report-row-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .page-banner {
    flex-wrap: wrap;
  }
  .page-banner-meta {
    align-items: flex-start;
    text-align: left;
  }
}

@media (max-width: 620px) {
  .funnel-row {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-2);
  }
  .target-rail-row {
    flex-wrap: wrap;
  }
  .card {
    --card-pad: var(--s-4);
  }
  .preset-grid,
  .tool-grid,
  .research-choices,
  .sparks,
  .readiness,
  .metadata-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .metadata-list dt {
    margin-top: var(--s-2);
  }
  .title-row {
    align-items: flex-start;
  }
  .keyword-context {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-1);
  }
  .plot-head,
  .next-move-foot,
  .recommendation-footer {
    flex-wrap: wrap;
  }
}

/* ------------------------------------------------------- rank tracker */
.rank-tracker-section {
  min-width: 0;
}
.rank-page > summary .rank-page-chips {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
}
.rank-summary {
  margin-bottom: var(--s-3);
}
.position-chip.top {
  background: var(--good-soft);
  border-color: var(--good-line);
  color: var(--good);
}
.rank-best {
  white-space: nowrap;
}
.rank-best small,
.rank-tracker-section td small {
  display: block;
  color: var(--ink-4);
  font-size: var(--text-3xs);
}

/* Rank tracker controls stay within this section; other Results views keep
   their own layout. Keyword rows are paged after filtering and sorting. */
.rank-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(140px, 1fr));
  gap: var(--s-3);
  margin-block: var(--s-4);
}
.rank-toolbar label {
  min-width: 0;
}
.rank-toolbar input,
.rank-toolbar select {
  width: 100%;
}
.rank-list-controls,
.rank-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  flex-wrap: wrap;
}
.rank-list-controls {
  padding-block: var(--s-2);
  font-size: var(--text-xs);
  color: var(--ink-3);
}
.rank-pagination {
  padding-top: var(--s-3);
  font-size: var(--text-xs);
}
.rank-row-count {
  color: var(--ink-3);
  font-size: var(--text-xs);
  margin: 0 0 var(--s-3);
}
.rank-filter-chip {
  border-radius: 999px;
  padding: 7px 12px;
  font-size: var(--text-xs);
}
.rank-filter-chip[aria-pressed="true"] {
  background: var(--good-soft);
  border-color: var(--good-line);
  color: var(--good);
}
.rank-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  padding: 6px 0;
  background: transparent;
  font: inherit;
  color: inherit;
  text-align: left;
  white-space: nowrap;
  box-shadow: none;
}
.rank-sort-button:hover {
  color: var(--good);
  background: transparent;
}
.rank-sort-button span {
  color: var(--ink-4);
}
.rank-sort-extras {
  display: flex;
  gap: var(--s-3);
  font-size: var(--text-3xs);
  font-weight: 400;
  text-transform: none;
}
.rank-tracker-section th[aria-sort="ascending"],
.rank-tracker-section th[aria-sort="descending"] {
  color: var(--good);
}
.rank-page > summary > span:first-child {
  min-width: 0;
}
.rank-page > summary small {
  overflow-wrap: anywhere;
}
.rank-page td:first-child {
  min-width: 180px;
  overflow-wrap: anywhere;
}
.rank-refresh-status:empty {
  display: none;
}
.rank-refresh-status {
  font-size: var(--text-xs);
}
@media (max-width: 1100px) {
  .rank-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 620px) {
  .rank-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Keyword research: one decision at a time, with a visible path to deliverables. */
.research-steps { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:22px 0; }
.research-steps button { display:flex; align-items:center; gap:12px; text-align:left; padding:16px; white-space:normal; }
.research-steps button[aria-current="step"] { border-color:var(--brand); background:var(--brand-soft); }
.research-steps strong,.research-steps small { display:block; }
.research-steps small { font-weight:400; margin-top:4px; color:var(--ink-3); }
.research-step-number { display:grid; place-items:center; width:30px; height:30px; flex:none; border:1px solid var(--line-1); border-radius:50%; }
.research-overview { display:grid; grid-template-columns:minmax(0,2fr) minmax(220px,1fr); gap:32px; padding:26px; margin-bottom:22px; border:1px solid var(--line-1); border-radius:14px; background:var(--surface-2); }
.research-overview h2 { margin:6px 0 10px; }
.research-overview p { max-width:760px; }
.research-overview .actions { margin:16px 0; }
.research-overview small { display:block; color:var(--ink-3); }
.research-counts { display:grid; align-content:center; gap:12px; border-left:1px solid var(--line-1); padding-left:24px; }
.research-counts div { display:flex; align-items:center; gap:14px; }
.research-counts strong { min-width:64px; font-size:24px; font-variant-numeric:tabular-nums; }
.research-counts span { color:var(--ink-3); }
.research-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:14px; padding:4px 0 18px; }
.research-toolbar .search-field { flex:1; min-width:200px; }
.research-toolbar .select-all-row { margin:0; }
.research-pagination { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:18px 0 2px; color:var(--ink-3); }
[data-research-table] tbody tr[hidden] { display:none; }
.research-coverage { display:flex; flex-direction:column; justify-content:center; gap:8px; }
.research-coverage strong { font-family:var(--font-display); font-size:44px; }
.research-coverage progress,.cluster-progress progress { width:100%; accent-color:var(--brand); height:8px; }
.cluster-progress { display:block; }
.cluster-progress progress { display:block; margin:12px 0; }
.cluster-map-layout { display:grid; grid-template-columns:minmax(210px,0.8fr) minmax(0,2fr); gap:24px; align-items:start; }
.cluster-map-branches { max-height:780px; overflow:auto; padding:0 8px 8px 0; }
.cluster-map-root { padding:14px; border:1px solid var(--line-1); border-radius:8px; margin-bottom:18px; }
.cluster-map-root strong,.cluster-map-root small { display:block; }
.cluster-map-root small { margin-top:6px; color:var(--ink-3); }
.cluster-map-node { position:relative; display:block; width:calc(100% - 16px); margin:0 0 12px 16px; padding:16px; text-align:left; white-space:normal; overflow-wrap:anywhere; }
.cluster-map-node:before { content:''; position:absolute; top:-18px; left:-16px; height:calc(50% + 18px); width:15px; border-left:1px solid var(--line-1); border-bottom:1px solid var(--line-1); }
.cluster-map-node[aria-pressed="true"] { border-color:var(--brand); background:var(--brand-soft); box-shadow:inset 3px 0 var(--brand); }
.cluster-map-node strong,.cluster-map-node small,.cluster-keyword-preview { display:block; }
.cluster-map-node strong { margin:6px 0; }
.cluster-map-node small,.cluster-keyword-preview { color:var(--ink-3); font-weight:400; font-size:12px; }
.cluster-keyword-preview { margin-top:12px; line-height:1.6; }
.cluster-map-detail { min-width:0; padding-left:22px; border-left:1px solid var(--line-1); }
.cluster-map-detail h3 { margin:6px 0; overflow-wrap:anywhere; }
.cluster-map-detail .table-wrap { margin-top:20px; }
.cluster-map-detail td { padding:14px 10px; }
.cluster-map-detail .small-button { margin:3px; }
.cluster-next { padding:18px; margin:20px 0; background:var(--surface-2); border:1px solid var(--line-1); border-radius:10px; }
.cluster-suggestions { display:grid; gap:10px; margin:16px 0; }
.cluster-suggestions > div { display:flex; gap:12px; flex-wrap:wrap; align-items:center; padding:12px; border:1px solid var(--line-1); border-radius:8px; }
.cluster-suggestions small { color:var(--ink-3); }
@media(max-width:900px) {
  .research-steps { gap:6px; }
  .research-steps button { padding:10px; gap:8px; }
  .research-steps small { display:none; }
  .research-overview,.cluster-map-layout { grid-template-columns:1fr; }
  .research-counts { border-left:0; padding-left:0; grid-template-columns:repeat(3,1fr); }
  .research-counts div { display:block; }
  .research-counts span { display:block; }
  .cluster-map-branches { max-height:360px; }
  .cluster-map-detail { border-left:0; padding-left:0; }
}
@media(max-width:520px) {
  .research-steps button { display:block; font-size:11px; }
  .research-step-number { margin-bottom:8px; }
  .research-overview { padding:18px; }
  .research-pagination { align-items:flex-start; flex-direction:column; }
}

/* Road to Rank #1: connected work areas */
.work-context { display:flex; align-items:center; flex-wrap:wrap; gap:20px; padding:18px 22px; margin-bottom:24px; border:1px solid var(--line-1); border-left:3px solid var(--brand); border-radius:12px; background:var(--surface-2); }
.work-context label { flex:0 1 280px; min-width:180px; }
.work-context label span,.work-context small { display:block; color:var(--ink-3); font-size:12px; margin:0 0 5px; }
.work-context > div { flex:1; min-width:220px; overflow-wrap:anywhere; }
.work-context strong { display:block; font-size:13px; margin-bottom:5px; }
.work-context select { width:100%; }
.work-summary { display:flex; align-items:center; flex-wrap:wrap; gap:18px 30px; padding:18px 0; margin-bottom:12px; color:var(--ink-3); }
.work-summary strong { color:var(--ink-1); font-size:23px; margin-right:6px; }
.work-summary .actions { margin-left:auto; }
.work-tools { display:flex; flex-wrap:wrap; align-items:end; gap:12px; margin-bottom:20px; }
.work-tools label { display:grid; gap:5px; min-width:130px; font-size:12px; color:var(--ink-3); }
.work-tools .work-search { flex:1; min-width:200px; }
.work-tools label.check-row { display:flex; align-items:center; min-height:40px; }
.work-tools input,.work-tools select { width:100%; }
.work-tools .check-row input { width:auto; }
.work-item { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:20px 0; border-bottom:1px solid var(--line-1); }
.work-item:last-child { border-bottom:0; }
.work-item > div:first-child { min-width:0; flex:1; overflow-wrap:anywhere; }
.work-item small { display:block; color:var(--ink-3); margin:6px 0; overflow-wrap:anywhere; }
.work-item h3 { margin:0 0 8px; }
.work-item .actions { flex:0 1 auto; }
.work-tabs { margin-bottom:24px; }
.brief-excerpt { white-space:pre-wrap; font-size:13px; line-height:1.7; padding:18px; margin-top:14px; border-radius:8px; background:var(--surface-2); color:var(--ink-2); }
[id^="work-list-"] .table-wrap td { vertical-align:top; max-width:330px; }
[id^="work-list-"] .table-wrap small { overflow-wrap:anywhere; }
[id^="work-list-"] details { margin:6px 0; font-size:12px; }
[id^="work-list-"] summary { cursor:pointer; }
[id^="work-list-"] .actions { gap:6px; }
@media(max-width:800px) {
  .work-context { gap:12px; padding:16px; }
  .work-context label,.work-context > div { flex:1 1 100%; min-width:0; }
  .work-tabs { max-width:100%; overflow-x:auto; flex-wrap:nowrap; }
  .work-tabs button { flex-shrink:0; }
  .work-item { align-items:flex-start; flex-direction:column; gap:10px; }
}

/* Operating order: baseline through proof, with explicit handoffs. */
.journey { margin-bottom:24px; padding:16px 20px; border:1px solid var(--line-1); border-radius:12px; background:var(--surface-2); }
.journey > nav ol { display:grid; grid-template-columns:repeat(10,minmax(0,1fr)); list-style:none; gap:5px; margin:0 0 14px; padding:0; }
.journey-step { width:100%; display:flex; justify-content:center; align-items:center; gap:7px; padding:8px 4px; border-color:transparent; background:transparent; color:var(--ink-3); font-size:11px; white-space:normal; }
.journey-step.active { color:var(--ink-1); background:var(--brand-soft); border-color:var(--brand); }
.journey-number { display:inline-flex; align-items:center; justify-content:center; width:20px; height:20px; border:1px solid var(--line-1); border-radius:50%; flex-shrink:0; font-size:10px; }
.step-progress { margin:0 0 14px; padding:12px 14px; border:1px solid var(--line-1); border-radius:10px; background:var(--surface-1); }
.step-progress-top { display:flex; align-items:end; justify-content:space-between; gap:12px; }
.step-progress-top > div { min-width:0; }
.step-progress-top span { display:block; color:var(--ink-3); font-size:11px; }
.step-progress-top strong { display:block; margin-top:3px; color:var(--ink-1); font-size:13px; overflow-wrap:anywhere; }
.step-progress-top b { flex-shrink:0; color:var(--brand); font-size:12px; white-space:nowrap; }
.step-progress progress { display:block; width:100%; height:12px; margin:9px 0 5px; border:0; border-radius:99px; overflow:hidden; background:var(--line-1); accent-color:var(--brand); }
.step-progress progress::-webkit-progress-bar { border-radius:99px; background:var(--line-1); }
.step-progress progress::-webkit-progress-value { border-radius:99px; background:var(--brand); }
.step-progress progress::-moz-progress-bar { border-radius:99px; background:var(--brand); }
.step-progress > small { display:block; color:var(--ink-3); overflow-wrap:anywhere; }
.step-progress.compact { max-width:320px; margin:0 0 10px; padding:8px 10px; }
.step-progress.compact + .step-progress.compact { margin-top:8px; }
.step-progress.compact .step-progress-top { align-items:start; flex-direction:column; gap:2px; }
.step-progress.compact .step-progress-top strong { font-size:11px; }
.step-progress.compact .step-progress-top b { font-size:11px; }
.step-progress.compact progress { height:8px; margin:6px 0 4px; }
.step-progress.compact > small { font-size:11px; }
.journey-handoff { display:flex; justify-content:space-between; align-items:center; gap:16px; border-top:1px solid var(--line-1); padding-top:12px; }
.journey-handoff > div:first-child { min-width:0; }
.journey-handoff strong { font-size:11px; color:var(--ink-2); }
.journey-handoff p { margin:4px 0 0; color:var(--ink-3); font-size:12px; }
.journey-handoff small { display:block; margin-top:7px; color:var(--ink-3); overflow-wrap:anywhere; }
.journey-label { color:var(--ink-1); font-weight:700; }
.journey-handoff .actions { flex-shrink:0; gap:6px; }
.journey-proof { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top:12px; padding-top:12px; border-top:1px solid var(--line-1); font-size:12px; color:var(--ink-3); }
.journey-proof button { max-width:45%; text-align:left; white-space:normal; }
.dash-target-goal { color:var(--ink-2); font-size:12px; margin:10px 0; }
.dash-target-bottom { flex-wrap:wrap; gap:8px; }
@media(max-width:1000px) { .journey-handoff { align-items:flex-start; flex-direction:column; gap:10px; } }
@media(max-width:650px) {
  .journey { padding:12px; }
  .journey ol { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .journey-step { justify-content:flex-start; }
  .journey-handoff .actions { flex-wrap:wrap; }
  .journey-proof { align-items:flex-start; flex-direction:column; }
  .journey-proof button { max-width:100%; }
}

/* ------------------------------------------- line-by-line step checklist */
.nav-step { display:inline-flex; align-items:center; justify-content:center; width:18px; height:18px; flex-shrink:0; border:1px solid var(--line-1); border-radius:50%; font:600 10px/1 var(--font-mono, monospace); font-style:normal; color:var(--ink-3); }
.nav a.active .nav-step { border-color:var(--brand); color:var(--brand); }
.step-tasks { margin:0 0 14px; padding:12px 14px; border:1px solid var(--line-1); border-radius:10px; background:var(--surface-1); }
.step-tasks-head { display:flex; justify-content:space-between; align-items:baseline; gap:12px; margin-bottom:8px; }
.step-tasks-head strong { font-size:13px; color:var(--ink-1); }
.step-tasks-head b { color:var(--brand); font-size:12px; white-space:nowrap; }
.journey .step-tasks ol { display:block; margin:0; padding:0; list-style:none; }
.step-task { display:grid; grid-template-columns:24px minmax(0,1fr) auto; align-items:center; gap:10px 12px; padding:8px 0; border-top:1px solid var(--line-1); }
.step-task:first-child { border-top:0; }
.step-task-mark { display:inline-flex; align-items:center; justify-content:center; width:22px; height:22px; border:1px solid var(--line-1); border-radius:50%; font:600 11px/1 var(--font-mono, monospace); color:var(--ink-3); background:var(--surface-2); }
.step-task.done .step-task-mark { border-color:var(--good-line); background:var(--good-soft); color:var(--good); }
.step-task.next .step-task-mark { border-color:var(--brand); color:var(--brand); }
.step-task.done .step-task-body strong { color:var(--ink-3); text-decoration:line-through; text-decoration-color:var(--line-2, var(--line-1)); }
.step-task-body { min-width:0; }
.step-task-body strong { display:block; font-size:13px; color:var(--ink-1); overflow-wrap:anywhere; }
.step-task-body > small { display:block; margin-top:2px; color:var(--ink-3); overflow-wrap:anywhere; }
.step-task-tag { display:inline-block; margin-left:6px; padding:1px 6px; border:1px solid var(--line-1); border-radius:99px; font-size:10px; font-weight:600; letter-spacing:.02em; text-transform:uppercase; color:var(--ink-3); vertical-align:middle; text-decoration:none; }
.step-task-tag.next { border-color:var(--brand); color:var(--brand); background:var(--brand-soft); }
.step-task.optional .step-task-body strong { font-weight:500; }
.step-task-action { white-space:nowrap; }
.journey-highlight { outline:2px solid var(--brand); outline-offset:6px; border-radius:8px; transition:outline-color .6s; }
.journey-footer { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top:28px; padding-top:16px; border-top:1px solid var(--line-1); }
.journey-footer-pending { color:var(--ink-3); font-size:var(--text-xs); text-align:right; }
.journey-board { margin:0 0 14px; padding:4px 0 0; }
.journey .journey-board ol { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; margin:0 0 12px; padding:0; list-style:none; }
.journey-board-step { display:grid; grid-template-columns:22px minmax(0,1fr); grid-template-rows:auto auto; column-gap:10px; row-gap:6px; align-items:center; width:100%; padding:10px 12px; border:1px solid var(--line-1); border-radius:10px; background:var(--surface-1); text-align:left; white-space:normal; }
.journey-board-step:hover { border-color:var(--brand); }
.journey-board-title { display:flex; flex-direction:column; min-width:0; }
.journey-board-title strong { font-size:13px; color:var(--ink-1); }
.journey-board-title small { color:var(--ink-3); }
.journey-board-step progress { grid-column:1 / -1; display:block; width:100%; height:6px; border:0; border-radius:99px; overflow:hidden; background:var(--line-1); accent-color:var(--brand); }
.journey-board-step progress::-webkit-progress-bar { background:var(--line-1); border-radius:99px; }
.journey-board-step progress::-webkit-progress-value { background:var(--brand); border-radius:99px; }
.journey-board-step progress::-moz-progress-bar { background:var(--brand); border-radius:99px; }
.journey-board-row.done .journey-number { border-color:var(--good-line); background:var(--good-soft); color:var(--good); }
.journey-board-row.partial .journey-number { border-color:var(--brand); color:var(--brand); }
.journey-board-next { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:10px 12px; border:1px solid var(--brand); border-radius:10px; background:var(--brand-soft); }
.journey-board-next small { display:block; color:var(--ink-3); }
@media (max-width:1000px) {
  .journey > nav ol { grid-template-columns:repeat(5,minmax(0,1fr)); }
  .journey .journey-board ol { grid-template-columns:1fr; }
  .step-task { grid-template-columns:24px minmax(0,1fr); }
  .step-task-action { grid-column:2; }
  .journey-footer { flex-direction:column; align-items:stretch; }
  .journey-footer .small-button { text-align:center; }
}

/* ------------------------------------------- compact workflow guide (Phase 2)
   The guide used to print a 10-step rail, the full checklist, a progress card
   and an Output/Current/Next block above EVERY screen: 449-795px tall, which
   put the page's own heading below the fold on 10 of 13 screens and repeated
   the same "do this next" sentence 5-6 times. The same information is intact,
   but the screen now opens with one line and one primary button; the detail is
   one click away in `.journey-detail`. */
.journey.compact { margin-bottom:20px; padding:0; border:0; border-radius:0; background:none; }

/* One next action, one line. */
.next-bar { display:flex; align-items:center; gap:14px; padding:11px 14px;
  border:1px solid var(--line-1); border-left:3px solid var(--brand); border-radius:10px;
  background:var(--surface-2); }
.next-bar-label { flex-shrink:0; color:var(--brand); font-size:11px; font-weight:700;
  letter-spacing:.06em; text-transform:uppercase; }
.next-bar-text { min-width:0; flex:1; }
.next-bar-text strong { display:block; font-size:14px; font-weight:600; color:var(--ink-1); overflow-wrap:anywhere; }
.next-bar-text small { display:block; margin-top:2px; color:var(--ink-3); font-size:12px; overflow-wrap:anywhere; }
.next-bar-actions { display:flex; flex-shrink:0; gap:7px; }

/* Collapsed step detail. */
.journey-detail { margin-top:10px; }
.journey-detail > summary { display:flex; align-items:center; gap:10px;
  padding:7px 12px; border:1px solid var(--line-1); border-radius:8px;
  background:var(--surface-1); color:var(--ink-3); font-size:12px; cursor:pointer; list-style:none; }
.journey-detail > summary::-webkit-details-marker { display:none; }
.journey-detail > summary::after { content:"▾"; margin-left:auto; flex-shrink:0; color:var(--ink-4, var(--ink-3)); }
.journey-detail[open] > summary::after { content:"▴"; }
.journey-detail > summary:hover { border-color:var(--brand); color:var(--ink-1); }
.journey-detail > summary b { flex-shrink:0; color:var(--ink-2); font-weight:600; }
.journey-detail-body { margin-top:12px; padding:16px 20px; border:1px solid var(--line-1);
  border-radius:12px; background:var(--surface-2); }
.journey-detail-body > nav ol { display:grid; grid-template-columns:repeat(10,minmax(0,1fr));
  list-style:none; gap:5px; margin:0 0 14px; padding:0; }
.journey-detail-body .step-tasks:last-child,
.journey-detail-body .journey-handoff:last-child { margin-bottom:0; }
.journey-detail-body .journey-handoff { border-top:1px solid var(--line-1); padding-top:12px; }

/* The proof note is a sentence, not a card with its own buttons. */
.journey.compact .journey-proof { display:block; margin:10px 0 0; padding:0; border:0;
  color:var(--ink-3); font-size:12px; }

@media (max-width:1000px) {
  .journey-detail-body > nav ol { grid-template-columns:repeat(5,minmax(0,1fr)); }
}
@media (max-width:650px) {
  .next-bar { flex-direction:column; align-items:stretch; gap:10px; }
  .next-bar-actions { flex-wrap:wrap; }
  .journey-detail-body { padding:12px; }
  .journey-detail-body > nav ol { grid-template-columns:repeat(4,minmax(0,1fr)); }
}

/* ----------------------------------- flat page-library rows (Phase 2)
   Replaces the per-row progress card + repeated heading/description/filled
   button. One line of stage text with a thin bar, and link-style actions. */
.page-stage { display:flex; align-items:center; gap:8px; }
.page-stage-bar { flex:none; width:46px; height:4px; border-radius:2px; overflow:hidden; background:var(--line-2, var(--line-1)); }
.page-stage-bar i { display:block; height:100%; background:var(--brand); }
.page-stage-text { color:var(--ink-3); font-size:12px; white-space:nowrap; }
.page-next { white-space:nowrap; }
.page-next .small-button + .small-button { margin-left:4px; }
/* A row action should read as a link, not compete with the screen's one
   primary button. 39.9 filled buttons per screen was the measured average. */
.small-button.link-button { padding:2px 4px; border-color:transparent; background:transparent; color:var(--brand); font-weight:600; }
.small-button.link-button:hover { background:var(--brand-soft); border-color:transparent; }

/* Mission control board: 10 rows of card + progress bar stacked 2-up pushed the
   dashboard's own heading to 949px. Five across, one line each, no per-row
   progress bar (the count already says "2 of 3 tasks"). */
.journey .journey-board ol { grid-template-columns:repeat(5,minmax(0,1fr)); gap:5px; }
.journey-board-step { grid-template-columns:20px minmax(0,1fr); grid-template-rows:auto;
  row-gap:0; column-gap:8px; padding:7px 9px; border-radius:8px; }
.journey-board-step .journey-board-title strong { font-size:12px; }
.journey-board-step .journey-board-title small { font-size:11px; }
.journey-board-next { padding:8px 11px; border-radius:8px; }
@media (max-width:1000px) { .journey .journey-board ol { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:650px) { .journey .journey-board ol { grid-template-columns:1fr; } }
