:root {
  color-scheme: light;
  --paper: #f4f1ea;
  --sheet: #fffdf8;
  --ink: #10110f;
  --muted: #74746e;
  --line: #d1cabd;
  --soft: #e7e1d7;
  --radius: 7px;
  --font-display: Georgia, "Times New Roman", serif;
  --font-ui: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.flip-app {
  min-height: 100vh;
}

.masthead {
  display: grid;
  grid-template-columns: 176px minmax(220px, 460px) 1fr;
  align-items: center;
  gap: 28px;
  min-height: 72px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  gap: 4px;
  width: fit-content;
  color: inherit;
  font-size: 17px;
  text-decoration: none;
}

.wordmark span {
  font-family: var(--font-display);
}

.search-line {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  border-bottom: 1px solid var(--line);
}

.search-line span,
.eyebrow,
.view-tab,
.topic-all,
.board-meta,
.panel-heading button {
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.search-line input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.view-tabs {
  justify-self: end;
  display: flex;
  gap: 22px;
}

.view-tab,
.topic-all,
.topic-button,
.queue-button,
.panel-heading button,
.round-control,
.pill-control,
.close-control,
.tile {
  border: 0;
  background: transparent;
  color: inherit;
}

.view-tab {
  padding: 0;
}

.view-tab.active {
  color: var(--ink);
}

.topic-strip {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 58px;
  padding: 0 28px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}

.topic-all {
  flex: 0 0 auto;
  padding: 0;
}

.topic-list {
  display: flex;
  gap: 16px;
}

.topic-button {
  display: inline-grid;
  grid-template-columns: 8px auto auto;
  align-items: center;
  gap: 8px;
  min-width: max-content;
  padding: 0;
  color: var(--muted);
}

.topic-button[aria-pressed="true"] {
  color: var(--ink);
}

.topic-button[aria-pressed="false"] {
  opacity: 0.36;
}

.topic-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--topic-color);
}

.topic-count {
  color: var(--muted);
  font-size: 13px;
}

.experience {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 0;
  min-height: calc(100vh - 130px);
}

.desk-panel {
  display: grid;
  align-content: start;
  gap: 30px;
  padding: 30px 26px 24px 28px;
  border-right: 1px solid var(--line);
}

.panel-block {
  display: grid;
  gap: 9px;
}

.panel-block strong {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.panel-block span {
  color: var(--muted);
  font-size: 13px;
}

.eyebrow {
  margin: 0;
}

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

.panel-heading button {
  padding: 0;
}

.mini-list {
  display: grid;
  gap: 10px;
}

.queue-button {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--soft);
  text-align: left;
}

.queue-button strong {
  display: -webkit-box;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.queue-button span,
.empty-state {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.board-column {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  min-width: 0;
  padding: 28px clamp(22px, 4vw, 54px) 24px;
}

.board-meta {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.tile-board {
  position: relative;
  height: clamp(560px, calc(100dvh - 252px), 720px);
  min-height: 0;
  overflow: hidden;
  perspective: 1800px;
  touch-action: pan-y;
}

.board-track {
  display: flex;
  height: 100%;
  min-height: 0;
  transition: transform 420ms cubic-bezier(0.2, 0.72, 0.1, 1);
}

.board-page {
  flex: 0 0 100%;
  display: grid;
  height: 100%;
  min-width: 0;
  min-height: 0;
  gap: 12px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(6, minmax(86px, 1fr));
  transform-origin: left center;
}

.tile {
  position: relative;
  display: grid;
  align-content: space-between;
  min-width: 0;
  min-height: 0;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--sheet);
  box-shadow: 0 16px 36px rgba(16, 17, 15, 0.06);
  text-align: left;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.tile::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--topic-color);
  content: "";
}

.tile:hover,
.tile:focus-visible {
  border-color: color-mix(in srgb, var(--topic-color) 55%, var(--line));
  box-shadow: 0 22px 50px rgba(16, 17, 15, 0.1);
  outline: 0;
  transform: translateY(-2px);
}

.tile.hero {
  grid-column: span 6;
  grid-row: span 4;
  padding: clamp(24px, 4vw, 44px);
}

.tile.wide {
  grid-column: span 4;
  grid-row: span 2;
}

.tile.tall {
  grid-column: span 3;
  grid-row: span 3;
}

.tile.medium {
  grid-column: span 3;
  grid-row: span 2;
}

.tile.small {
  grid-column: span 3;
  grid-row: span 1;
}

.tile-kicker,
.tile-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tile-topic {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  overflow: hidden;
}

.tile-kicker > span:last-child {
  flex: 0 0 auto;
  min-width: 4ch;
  margin-right: 6px;
  text-align: right;
}

.tile-topic::before {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--topic-color);
  content: "";
}

.tile h2 {
  margin: 16px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.6vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.96;
}

.tile.hero h2 {
  max-width: 10ch;
  font-size: clamp(2.45rem, 3.8vw, 3.8rem);
  line-height: 0.9;
}

.tile.hero p {
  -webkit-line-clamp: 2;
}

.tile p {
  display: -webkit-box;
  overflow: hidden;
  margin: 10px 0 0;
  color: #30332f;
  font-size: 15px;
  line-height: 1.38;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.tile-visual {
  display: grid;
  grid-template-columns: minmax(66px, auto) minmax(90px, 1fr) 46px;
  align-items: end;
  gap: 12px;
  min-height: 54px;
  margin: 10px 0;
}

.tile-visual.prominent {
  grid-template-columns: minmax(110px, auto) minmax(180px, 1fr) 70px;
  min-height: 66px;
  margin: 14px 0 8px;
}

.visual-stat {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.visual-stat strong {
  color: var(--topic-color);
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 0.9;
}

.tile-visual:not(.prominent) .visual-stat strong {
  font-size: clamp(1.25rem, 2vw, 1.7rem);
}

.visual-stat span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 680;
  letter-spacing: 0.1em;
  line-height: 1.15;
  text-transform: uppercase;
}

.sparkline {
  width: 100%;
  min-width: 0;
  height: 54px;
  overflow: visible;
}

.tile-visual.prominent .sparkline {
  height: 60px;
}

.sparkline path {
  fill: none;
  stroke: var(--soft);
  stroke-width: 1;
}

.sparkline polyline {
  fill: none;
  stroke: var(--topic-color);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.bar-signal {
  display: flex;
  align-items: end;
  gap: 4px;
  height: 52px;
}

.tile-visual.prominent .bar-signal {
  height: 58px;
}

.bar-signal span {
  flex: 1;
  min-width: 3px;
  border-radius: 999px 999px 0 0;
  background: color-mix(in srgb, var(--topic-color) 74%, var(--sheet));
}

.tile.small p {
  display: none;
}

.tile.small h2 {
  margin-bottom: 0;
  font-size: 1.25rem;
  line-height: 1;
}

.tile-actions {
  position: absolute;
  right: 12px;
  bottom: 10px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 160ms ease;
}

.tile:hover .tile-actions,
.tile:focus-within .tile-actions {
  opacity: 1;
}

.tile-action {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.9);
}

.tile-action.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--sheet);
}

.board-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.round-control,
.pill-control,
.close-control {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.72);
}

.round-control {
  width: 40px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
}

.pill-control {
  min-width: 86px;
  padding: 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.pill-control.primary,
.pill-control.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--sheet);
}

.round-control:disabled,
.pill-control:disabled {
  cursor: default;
  opacity: 0.36;
}

.detail-dialog {
  width: min(920px, calc(100vw - 30px));
  max-height: min(820px, calc(100vh - 30px));
  padding: 0;
  border: 0;
  background: transparent;
}

.detail-dialog::backdrop {
  background: rgba(16, 17, 15, 0.48);
}

.detail-sheet {
  position: relative;
  max-height: inherit;
  padding: clamp(30px, 5vw, 62px);
  overflow: auto;
  border-radius: var(--radius);
  background: var(--sheet);
  box-shadow: 0 28px 80px rgba(16, 17, 15, 0.28);
}

.close-control {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  padding: 0;
  font-size: 22px;
}

.detail-hero {
  display: grid;
  gap: 18px;
  max-width: 760px;
  padding-right: 44px;
}

.detail-hero h2 {
  max-width: 12ch;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 6rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.94;
}

.detail-hero p {
  max-width: 62ch;
  margin: 0;
  color: #30332f;
  font-size: 19px;
  line-height: 1.55;
}

.detail-hero .tile-visual {
  max-width: 680px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  margin-top: 44px;
}

.detail-section {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.detail-section h3 {
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.detail-section ul {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.detail-section li {
  color: #30332f;
  font-size: 15px;
  line-height: 1.5;
}

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

  .desk-panel {
    display: none;
  }

  .board-column {
    grid-template-rows: auto auto auto;
    padding-inline: 18px;
  }

  .tile-board {
    height: min(650px, calc(100dvh - 250px));
    min-height: 0;
  }

  .board-page {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(4, minmax(112px, 1fr));
    transform-style: preserve-3d;
  }

  .tile.hero,
  .tile.wide,
  .tile.tall,
  .tile.medium,
  .tile.small {
    grid-column: span 2;
    grid-row: span 2;
  }

  .tile.hero {
    padding: 22px;
  }

  .tile.hero .tile-kicker > span:last-child {
    display: none;
  }

  .tile.hero h2,
  .tile h2 {
    max-width: 12ch;
    font-size: clamp(1.65rem, 5vw, 3rem);
    line-height: 0.98;
  }

  .tile-visual {
    grid-template-columns: minmax(72px, auto) 1fr 48px;
  }

  .tile p {
    display: none;
  }
}

@media (max-width: 720px) {
  .masthead {
    grid-template-columns: 1fr;
    gap: 13px;
    padding: 18px;
  }

  .view-tabs {
    justify-self: start;
    gap: 20px;
  }

  .topic-strip {
    min-height: 54px;
    padding-inline: 18px;
  }

  .board-column {
    gap: 12px;
    padding: 18px;
  }

  .board-meta {
    letter-spacing: 0.06em;
  }

  .tile-board {
    height: calc(100dvh - 460px);
    min-height: 0;
  }

  .board-page {
    gap: 9px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(104px, 1fr));
  }

  .tile.hero,
  .tile.wide,
  .tile.tall,
  .tile.medium,
  .tile.small {
    grid-column: span 1;
    grid-row: span 1;
  }

  .tile.hero {
    grid-column: span 2;
    grid-row: span 2;
  }

  .tile {
    padding: 14px;
  }

  .tile h2,
  .tile.hero h2 {
    font-size: clamp(1.35rem, 7vw, 2.5rem);
  }

  .tile-visual {
    grid-template-columns: minmax(68px, auto) 1fr;
    min-height: 42px;
    margin: 8px 0 6px;
  }

  .tile-visual .bar-signal {
    display: none;
  }

  .tile-visual.prominent {
    grid-template-columns: minmax(84px, auto) 1fr;
    min-height: 58px;
  }

  .sparkline {
    height: 40px;
  }

  .tile-visual.prominent .sparkline {
    height: 54px;
  }

  .visual-stat strong {
    font-size: 1.55rem;
  }

  .tile:not(.hero) h2 {
    font-size: clamp(1.05rem, 5.4vw, 1.7rem);
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .tile:not(.hero) p {
    display: none;
  }

  .tile.hero p {
    display: none;
  }

  .tile:not(.hero) .tile-meta {
    display: none;
  }

  .tile.wide p {
    display: -webkit-box;
    -webkit-line-clamp: 1;
  }

  .tile.wide .tile-meta {
    display: flex;
  }

  .tile:not(.hero) .tile-visual {
    display: none;
  }

  .tile p {
    font-size: 13px;
    line-height: 1.34;
    -webkit-line-clamp: 2;
  }

  .tile-meta {
    font-size: 10px;
  }

  .tile-action {
    width: 28px;
    height: 28px;
  }

  .pill-control {
    min-width: 62px;
    padding-inline: 12px;
  }

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

@media (min-width: 1101px) {
  .tile:not(.hero) p {
    display: none;
  }

  .tile:not(.hero) .tile-visual {
    grid-template-columns: minmax(56px, auto) 1fr;
    min-height: 42px;
    margin: 8px 0 0;
  }

  .tile:not(.hero) .bar-signal {
    display: none;
  }

  .tile:not(.hero) .tile-meta {
    display: none;
  }

}

/* ── MODE STRIP ──────────────────────────────────────────────────────────── */

.mode-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 28px;
  background: var(--ink);
  overflow-x: auto;
}

.mode-label {
  flex-shrink: 0;
  color: rgba(255, 253, 248, 0.4);
  font-size: 11px;
  font-weight: 680;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-right: 4px;
}

.mode-tab {
  flex-shrink: 0;
  padding: 5px 14px;
  border: 1px solid rgba(255, 253, 248, 0.18);
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 253, 248, 0.48);
  font-size: 13px;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.mode-tab.active {
  border-color: var(--sheet);
  background: var(--sheet);
  color: var(--ink);
}

.mode-tab:hover:not(.active) {
  border-color: rgba(255, 253, 248, 0.42);
  color: rgba(255, 253, 248, 0.9);
}

/* ── AMBIENT MODE HIGHLIGHTS ─────────────────────────────────────────────── */

.tile.conn-source {
  border-color: var(--topic-color);
  box-shadow: 0 0 0 2px var(--topic-color), 0 16px 36px rgba(16, 17, 15, 0.12);
  transform: translateY(-2px);
  z-index: 2;
}

.tile.conn-target {
  border-color: color-mix(in srgb, var(--topic-color) 55%, var(--line));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--topic-color) 40%, transparent),
              0 8px 24px rgba(16, 17, 15, 0.08);
  transform: translateY(-1px);
  z-index: 1;
}

.tile.conn-dimmed {
  opacity: 0.22;
  transform: none;
}

.conn-hint {
  margin: 4px 0 0;
  color: var(--topic-color);
  font-size: 10px;
  font-weight: 660;
  letter-spacing: 0.07em;
  opacity: 0;
  transition: opacity 160ms ease;
}

.tile:hover .conn-hint,
.tile:focus-within .conn-hint {
  opacity: 1;
}

/* ── THREAD BADGES ───────────────────────────────────────────────────────── */

.thread-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 5px 0 2px;
  padding: 3px 8px 3px 5px;
  border: 1px solid color-mix(in srgb, var(--thread-color) 28%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--thread-color) 7%, transparent);
  color: var(--thread-color);
  font-size: 10px;
  font-weight: 660;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 120ms ease;
}

.thread-badge.active {
  background: color-mix(in srgb, var(--thread-color) 14%, transparent);
  border-color: color-mix(in srgb, var(--thread-color) 50%, transparent);
}

.thread-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--thread-color);
  flex-shrink: 0;
}

.thread-badge-pos {
  margin-left: 2px;
  opacity: 0.6;
}

/* ── CHAIN STRIP (causal chain mode, in detail sheet) ────────────────────── */

.chain-strip {
  margin: calc(-1 * clamp(30px, 5vw, 62px));
  margin-bottom: 32px;
  padding: 20px clamp(30px, 5vw, 62px);
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--paper);
}

.chain-strip-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.chain-strip-label span {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.chain-cards {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.chain-card {
  flex: 0 0 auto;
  display: grid;
  gap: 3px;
  min-width: 154px;
  max-width: 200px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--sheet);
  text-align: left;
  cursor: pointer;
  transition: border-color 130ms ease, box-shadow 130ms ease;
}

.chain-card::before {
  content: "";
  display: block;
  height: 3px;
  border-radius: 2px;
  background: var(--topic-color);
  margin-bottom: 5px;
}

.chain-card:hover {
  border-color: var(--topic-color);
  box-shadow: 0 3px 10px rgba(16, 17, 15, 0.08);
}

.chain-card.current {
  border-color: var(--topic-color);
  background: color-mix(in srgb, var(--topic-color) 5%, var(--sheet));
}

.chain-card-topic {
  color: var(--muted);
  font-size: 10px;
  font-weight: 680;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.chain-card strong {
  display: -webkit-box;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.chain-card span:last-child {
  color: var(--topic-color);
  font-size: 12px;
  font-weight: 680;
  letter-spacing: 0.02em;
}

.chain-arrow {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
}

/* ── CONSTELLATION ───────────────────────────────────────────────────────── */

.constellation-view {
  position: relative;
  width: 100%;
  height: 100%;
}

.const-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.const-line {
  stroke: var(--soft);
  stroke-width: 0.5;
  fill: none;
  transition: stroke 200ms ease, stroke-width 200ms ease, opacity 200ms ease;
}

.const-line.active {
  stroke: color-mix(in srgb, var(--ink) 60%, transparent);
  stroke-width: 0.9;
}

.const-node {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: opacity 200ms ease;
}

.const-node.dimmed {
  opacity: 0.18;
}

.const-node-dot {
  position: relative;
  z-index: 1;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--topic-color);
  border: 2.5px solid var(--sheet);
  box-shadow: 0 2px 8px rgba(16, 17, 15, 0.18);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.const-node-ring {
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  transition: border-color 180ms ease;
  pointer-events: none;
}

.const-node:hover .const-node-dot,
.const-node.focused .const-node-dot {
  transform: scale(1.55);
  box-shadow: 0 4px 14px rgba(16, 17, 15, 0.26);
}

.const-node.focused .const-node-ring {
  border-color: var(--topic-color);
}

.const-node.connected .const-node-dot {
  transform: scale(1.25);
}

.const-node-label {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  gap: 2px;
  pointer-events: none;
  white-space: nowrap;
}

.const-node-label.right {
  left: calc(100% + 12px);
  text-align: left;
}

.const-node-label.left {
  right: calc(100% + 12px);
  text-align: right;
}

.const-node-label strong {
  color: var(--topic-color);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
}

.const-node-label span {
  display: -webkit-box;
  overflow: hidden;
  max-width: 150px;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.28;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.const-node.focused .const-node-label span {
  font-weight: 600;
}

/* ── MODE-SPECIFIC OVERRIDES ─────────────────────────────────────────────── */

[data-mode="constellation"] .board-controls .round-control {
  opacity: 0.3;
  pointer-events: none;
}

/* ── RESPONSIVE: MODE STRIP ──────────────────────────────────────────────── */

@media (max-width: 720px) {
  .mode-strip {
    padding: 0 18px;
    gap: 6px;
  }

  .mode-label {
    display: none;
  }

  .mode-tab {
    padding: 4px 11px;
    font-size: 12px;
  }

  .const-node-label {
    display: none;
  }

  .const-node-dot {
    width: 22px;
    height: 22px;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   CARD REDESIGN — overrides all previous tile visual rules
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Padding as variable so chart bleed always matches ─────────────────── */

.tile {
  --tile-pad: 16px;
  padding: var(--tile-pad);
}

.tile.hero {
  --tile-pad: clamp(20px, 3.2vw, 38px);
  padding: var(--tile-pad);
}

@media (max-width: 1100px) {
  .tile.hero { --tile-pad: 18px; }
}

@media (max-width: 720px) {
  .tile { --tile-pad: 13px; }
}

/* ── Top color strip (replaces left strip) ─────────────────────────────── */

.tile::before {
  position: absolute;
  inset: 0 0 auto 0;
  width: auto;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--topic-color);
  content: "";
}

/* ── Kicker: topic label uses topic color ──────────────────────────────── */

.tile-topic {
  color: var(--topic-color);
  font-weight: 700;
}

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

/* ── Area chart — bleeds edge-to-edge ──────────────────────────────────── */

.tile-chart {
  margin-inline: calc(-1 * var(--tile-pad));
  margin-top: 10px;
  height: 54px;
  overflow: hidden;
  flex-shrink: 0;
}

.tile.hero .tile-chart {
  height: 90px;
  margin-top: 12px;
}

.tile.small .tile-chart {
  height: 36px;
  margin-top: 6px;
}

.chart-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.chart-area {
  fill: var(--topic-color);
  opacity: 0.13;
}

.chart-line {
  fill: none;
  stroke: var(--topic-color);
  stroke-width: 2px;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.chart-dot {
  fill: var(--topic-color);
  filter: drop-shadow(0 0 3px var(--topic-color));
}

/* ── Stat number ───────────────────────────────────────────────────────── */

.tile-stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 10px;
}

.tile-stat strong {
  color: var(--topic-color);
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.9vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
}

.tile-stat.prominent strong {
  font-size: clamp(1.9rem, 3vw, 3.2rem);
}

.tile-stat.neg strong {
  opacity: 0.85;
}

.tile-stat span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 680;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex-shrink: 0;
  line-height: 1;
}

.tile.small .tile-stat strong {
  font-size: 1.1rem;
}

/* ── Title: smaller, sans on regular tiles; small serif on hero ─────────── */

.tile h2 {
  margin: 8px 0 0;
  font-family: var(--font-ui);
  font-size: clamp(0.88rem, 1.1vw, 1.05rem);
  font-weight: 580;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--ink);
}

.tile.hero h2 {
  max-width: none;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.8vw, 1.8rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.12;
}

.tile.small h2 {
  font-size: 0.82rem;
  line-height: 1.25;
  margin-bottom: 0;
  -webkit-line-clamp: 2;
}

@media (max-width: 1100px) {
  .tile.hero h2,
  .tile h2 {
    max-width: none;
    font-size: clamp(0.9rem, 3.8vw, 1.35rem);
    font-family: var(--font-ui);
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.25;
  }

  .tile.hero h2 {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 4.5vw, 1.8rem);
  }
}

@media (max-width: 720px) {
  .tile h2 {
    font-size: clamp(0.82rem, 3.6vw, 1.05rem);
  }

  .tile.hero h2 {
    font-size: clamp(1rem, 5vw, 1.55rem);
  }

  .tile-chart { height: 44px; }
  .tile.hero .tile-chart { height: 68px; }
  .tile.small .tile-chart { height: 30px; }

  .tile-stat strong { font-size: 1.15rem; }
  .tile.hero .tile-stat strong { font-size: clamp(1.5rem, 6vw, 2.2rem); }
}

/* ── Detail sheet: updated sparkline (spark-* classes) ─────────────────── */

.spark-area {
  fill: var(--topic-color);
  opacity: 0.12;
}

.spark-line {
  fill: none;
  stroke: var(--topic-color);
  stroke-width: 3px;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.spark-dot {
  fill: var(--topic-color);
  filter: drop-shadow(0 0 4px var(--topic-color));
}

/* detail visual-stat neg treatment */
.visual-stat.neg strong {
  opacity: 0.85;
}

/* Hide old sparkline baseline rule — replaced by area fill */
.sparkline path { display: none; }
.sparkline polyline {
  stroke-width: 3px;
}

/* ── Tile meta: single line, tighter ───────────────────────────────────── */

.tile-meta {
  font-size: 10px;
  letter-spacing: 0.04em;
}

/* ── Connection hint: sits just above meta ─────────────────────────────── */

.conn-hint {
  margin-top: 6px;
}

/* ══════════════════════════════════════════════════════════════════════════
   CONTENT-HEIGHT LAYOUT — overrides every fixed-height grid constraint.
   Tiles size to their content; nothing is clipped.
   The horizontal flip animation is unaffected.
   ══════════════════════════════════════════════════════════════════════════ */

/* Board: no fixed height, flip clips only horizontally */
.tile-board {
  height: auto;
  min-height: 180px;
}

/* Track: let each page have its own height */
.board-track {
  height: auto;
  align-items: flex-start;
  transition: transform 300ms cubic-bezier(0.22, 0.72, 0.1, 1);
}

/* Board-column: stop forcing the board row to fill the viewport */
.board-column {
  grid-template-rows: auto auto auto;
}

/* Page: rows auto-size to the tallest tile in each row */
.board-page {
  height: auto;
  min-height: 0;
  grid-template-rows: none;
  grid-auto-rows: auto;
  align-items: start;
}

/* Remove every row span — tiles expand to content height */
.tile.hero,
.tile.wide,
.tile.tall,
.tile.medium,
.tile.small {
  grid-row: auto;
}

/* ── Desktop: 3-col grid — hero 2/3, others 1/3, bottom tile full-width ── */

@media (min-width: 1101px) {
  .board-page {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: auto;
    align-items: start;
  }

  /* Clear any named-area assignments */
  .board-page .tile { grid-area: auto; grid-column: span 1; }

  /* Hero spans 2 of 3 columns */
  .board-page .tile:nth-child(1) { grid-column: span 2; }

  /* 6th tile is a full-width featured strip */
  .board-page .tile:nth-child(6) { grid-column: span 3; }

  /* Show meta on all desktop tiles */
  .tile:not(.hero) .tile-meta { display: flex; }
}

/* ── Tablet: 2-col, hero spans both columns ────────────────────────────── */

@media (max-width: 1100px) {
  .tile-board { height: auto; min-height: 160px; }

  .board-page {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;
    grid-auto-rows: auto;
    align-items: start;
  }

  .tile.hero,
  .tile.wide,
  .tile.tall,
  .tile.medium,
  .tile.small { grid-column: span 1; grid-row: auto; }

  .tile.hero { grid-column: span 2; }

  /* Show description on hero at tablet */
  .tile.hero p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* Show meta on all tiles */
  .tile .tile-meta { display: flex; }
}

/* ── Mobile: 2-col, hero full width ────────────────────────────────────── */

@media (max-width: 720px) {
  .tile-board { height: auto; min-height: 120px; }

  .board-page {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: auto;
    align-items: start;
    gap: 9px;
  }

  .tile.hero,
  .tile.wide,
  .tile.tall,
  .tile.medium,
  .tile.small { grid-column: span 1; grid-row: auto; }

  .tile.hero { grid-column: span 2; }

  /* Remove line-clamp from h2 — titles show fully */
  .tile:not(.hero) h2 {
    display: block;
    overflow: visible;
    -webkit-line-clamp: none;
    -webkit-box-orient: horizontal;
  }

  /* Meta on all tiles */
  .tile .tile-meta { display: flex; }
  .tile:not(.hero) .tile-meta { display: flex; }
}

/* ── Wide tile: horizontal banner layout on desktop ─────────────────────── */

@media (min-width: 1101px) {
  .tile.wide {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    align-items: center;
    column-gap: 0;
  }

  /* Left column: kicker + stat + title + meta */
  .tile.wide .tile-kicker,
  .tile.wide .tile-stat,
  .tile.wide h2,
  .tile.wide p,
  .tile.wide .tile-meta {
    grid-column: 1;
  }

  /* Right column: chart bleeds into right half */
  .tile.wide .tile-chart {
    grid-column: 2;
    grid-row: 1 / 5;
    height: 100%;
    min-height: 90px;
    margin: 0;
    margin-inline: 0;
    align-self: stretch;
  }

  .tile.wide h2 {
    font-family: var(--font-display);
    font-size: clamp(1rem, 1.4vw, 1.45rem);
    font-weight: 650;
  }

  .tile.wide p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   EXECUTIVE READY LAYER
   restrained briefing chrome, priority signals, memo detail view
   ══════════════════════════════════════════════════════════════════════════ */

:root {
  --paper: #f2efe7;
  --sheet: #fffefa;
  --ink: #141411;
  --muted: #706f68;
  --line: #cbc3b6;
  --soft: #e5ded2;
  --coal: #181915;
  --success: #1a6b3c;
  --caution: #a36418;
  --alert: #9d2f24;
}

body {
  background:
    linear-gradient(180deg, rgba(24, 25, 21, 0.035), transparent 210px),
    var(--paper);
}

.mode-strip {
  min-height: 42px;
  border-bottom: 1px solid rgba(255, 253, 248, 0.12);
  background: var(--coal);
}

.masthead {
  grid-template-columns: 190px minmax(260px, 520px) 1fr;
  min-height: 76px;
  background: rgba(255, 253, 248, 0.58);
  backdrop-filter: blur(18px);
}

.wordmark {
  align-items: baseline;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.wordmark::before {
  width: 10px;
  height: 10px;
  margin-right: 7px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ink) 0 48%, transparent 49%);
  content: "";
}

.search-line {
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.7);
}

.view-tabs {
  gap: 8px;
}

.view-tab {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 999px;
}

.view-tab.active {
  border-color: var(--line);
  background: var(--sheet);
  box-shadow: 0 1px 3px rgba(16, 17, 15, 0.06);
}

.exec-brief {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 0.72fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: end;
  padding: 24px 28px 26px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(255, 253, 248, 0.78), rgba(255, 253, 248, 0.42)),
    var(--paper);
}

.brief-lede {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.brief-lede h1 {
  display: -webkit-box;
  overflow: hidden;
  max-width: 980px;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 4.6rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.95;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.brief-lede p:last-child {
  display: -webkit-box;
  overflow: hidden;
  max-width: 78ch;
  margin: 0;
  color: #343631;
  font-size: 15px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.brief-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  box-shadow: 0 12px 32px rgba(16, 17, 15, 0.06);
}

.brief-metric {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 16px 14px 14px;
  background: rgba(255, 253, 248, 0.9);
}

.brief-metric span {
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brief-metric strong {
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.topic-strip {
  min-height: 52px;
  background: rgba(242, 239, 231, 0.88);
}

.topic-button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 999px;
}

.topic-button[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--topic-color) 28%, var(--line));
  background: color-mix(in srgb, var(--topic-color) 5%, var(--sheet));
}

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

.desk-panel {
  gap: 26px;
  background: rgba(255, 253, 248, 0.42);
}

.panel-pulse {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.72);
}

.pulse-meter {
  position: relative;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--success), var(--caution), var(--alert));
}

.pulse-meter span {
  display: block;
  height: 100%;
  border-right: 3px solid var(--ink);
}

.panel-pulse strong {
  font-family: var(--font-ui);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.board-column {
  gap: 16px;
  padding-top: 24px;
}

.board-meta {
  align-items: center;
  min-height: 34px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
}

.tile {
  border-color: rgba(20, 20, 17, 0.11);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), transparent 34%),
    var(--sheet);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 10px 24px rgba(16, 17, 15, 0.055);
}

.tile:hover,
.tile:focus-visible {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.74) inset, 0 16px 34px rgba(16, 17, 15, 0.105);
}

.tile[data-tone="watch"]::after,
.tile[data-tone="upside"]::after {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  content: "";
}

.tile[data-tone="watch"]::after {
  background: var(--alert);
  box-shadow: 0 0 0 4px rgba(157, 47, 36, 0.1);
}

.tile[data-tone="upside"]::after {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(26, 107, 60, 0.1);
}

.tile-exec-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
}

.priority-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--sheet);
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.priority-chip.watch {
  border-color: rgba(157, 47, 36, 0.28);
  background: rgba(157, 47, 36, 0.075);
  color: var(--alert);
}

.priority-chip.upside {
  border-color: rgba(26, 107, 60, 0.28);
  background: rgba(26, 107, 60, 0.075);
  color: var(--success);
}

.priority-chip.monitor {
  border-color: rgba(112, 111, 104, 0.24);
  background: rgba(112, 111, 104, 0.06);
}

.tile h2 {
  margin-top: 10px;
  font-size: clamp(0.96rem, 1.08vw, 1.08rem);
  font-weight: 650;
  line-height: 1.26;
}

.tile.hero h2 {
  font-size: clamp(1.45rem, 2.25vw, 2.35rem);
  line-height: 1.05;
}

.tile.hero p {
  display: -webkit-box;
  margin-top: 12px;
  color: #333630;
  font-size: 16px;
  line-height: 1.52;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.tile-stat {
  align-items: end;
}

.tile-stat strong {
  font-family: var(--font-ui);
  font-weight: 780;
  letter-spacing: -0.045em;
}

.tile-stat.prominent strong {
  font-size: clamp(2.2rem, 4vw, 4.2rem);
}

.tile-chart {
  border-bottom: 1px solid rgba(20, 20, 17, 0.04);
}

.tile-actions {
  opacity: 1;
}

.tile-action {
  border-color: rgba(20, 20, 17, 0.12);
  color: var(--muted);
  font-size: 13px;
}

.board-controls {
  position: static;
  z-index: 4;
  width: fit-content;
  margin: 0 auto;
  padding: 7px;
  border: 1px solid rgba(20, 20, 17, 0.1);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.78);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 32px rgba(16, 17, 15, 0.12);
}

.detail-dialog {
  width: min(1040px, calc(100vw - 30px));
}

.detail-sheet {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), transparent 180px),
    var(--sheet);
}

.decision-band {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 2px;
}

.decision-band > span:not(.priority-chip) {
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  letter-spacing: 0.08em;
  line-height: 20px;
  text-transform: uppercase;
}

.detail-hero h2 {
  max-width: 14ch;
  font-size: clamp(2.35rem, 5.8vw, 5.2rem);
}

.detail-hero .tile-visual {
  max-width: none;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.7);
}

.sparkline .spark-area {
  display: block;
}

.memo-strip {
  display: grid;
  grid-template-columns: 1fr 1fr 1.25fr;
  gap: 1px;
  overflow: hidden;
  max-width: 820px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.memo-strip div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px 16px;
  background: rgba(255, 253, 248, 0.9);
}

.memo-strip span,
.metric-card span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.memo-strip strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-weight: 720;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-cards {
  display: grid;
  gap: 8px;
}

.metric-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
  padding: 11px 0;
  border-bottom: 1px solid var(--soft);
}

.metric-card strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.detail-section li {
  position: relative;
  padding-left: 16px;
}

.detail-section li::before {
  position: absolute;
  top: 0.68em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--topic-color);
  content: "";
}

.constellation-view {
  min-height: clamp(520px, calc(100dvh - 340px), 760px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 253, 248, 0.95), transparent 30%),
    rgba(255, 253, 248, 0.52);
}

@media (max-width: 1100px) {
  .masthead {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px;
  }

  .view-tabs {
    justify-self: start;
  }

  .exec-brief {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 20px 18px;
  }

  .brief-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .tile.hero p {
    font-size: 14px;
    -webkit-line-clamp: 2;
  }
}

@media (max-width: 720px) {
  .search-line {
    grid-template-columns: 1fr;
    gap: 2px;
    min-height: 54px;
    padding-block: 7px;
    border-radius: var(--radius);
  }

  .exec-brief {
    padding-inline: 18px;
  }

  .brief-lede h1 {
    font-size: clamp(1.8rem, 11vw, 3.1rem);
    overflow: visible;
    -webkit-line-clamp: unset;
  }

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

  .brief-metric {
    padding: 13px 12px;
  }

  .tile-exec-line {
    display: none;
  }

  .board-controls {
    width: 100%;
    justify-content: space-between;
  }

  .memo-strip {
    grid-template-columns: 1fr;
  }

  .detail-hero h2 {
    max-width: none;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   DESKTOP PROMOTED MOSAIC
   Stable, intentional boardroom layout: click to promote, click hero to read.
   ══════════════════════════════════════════════════════════════════════════ */

.tile {
  cursor: pointer;
}

.tile.is-active {
  border-color: color-mix(in srgb, var(--topic-color) 58%, var(--line));
}

.tile.is-active::before {
  height: 4px;
}

.tile-action {
  pointer-events: auto;
}

@media (min-width: 1101px) {
  .tile-board {
    height: clamp(760px, calc(100dvh - 220px), 900px);
    min-height: 760px;
    overflow: hidden;
  }

  .board-track {
    height: 100%;
    align-items: stretch;
  }

  .board-page {
    height: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows:
      minmax(170px, 1.08fr)
      minmax(170px, 1.08fr)
      minmax(130px, 0.78fr)
      minmax(135px, 0.82fr);
    gap: 14px;
    align-items: stretch;
  }

  .board-page .tile {
    grid-area: auto;
    grid-column: auto;
    grid-row: auto;
    min-height: 0;
  }

  .board-page .tile:nth-child(1) {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
  }

  .board-page .tile:nth-child(2) {
    grid-column: 3;
    grid-row: 1;
  }

  .board-page .tile:nth-child(3) {
    grid-column: 3;
    grid-row: 2;
  }

  .board-page .tile:nth-child(4) {
    grid-column: 1;
    grid-row: 3;
  }

  .board-page .tile:nth-child(5) {
    grid-column: 2;
    grid-row: 3;
  }

  .board-page .tile:nth-child(6) {
    grid-column: 1 / 4;
    grid-row: 4;
  }

  .tile:not(.hero) h2 {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 6px;
    font-size: clamp(0.86rem, 0.98vw, 0.98rem);
    line-height: 1.18;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .tile:not(.hero) .tile-chart {
    height: 34px;
  }

  .tile.hero {
    --tile-pad: clamp(20px, 2.4vw, 30px);
  }

  .tile.hero .tile-chart {
    height: 72px;
  }

  .tile.hero h2 {
    font-size: clamp(1.35rem, 2vw, 2.1rem);
  }

  .tile.hero p {
    -webkit-line-clamp: 2;
  }

  .tile:not(.hero) .tile-stat {
    margin-top: 6px;
  }

  .tile:not(.hero) .tile-stat strong {
    font-size: clamp(1.25rem, 1.65vw, 1.72rem);
  }

  .tile:not(.hero) .tile-exec-line {
    gap: 4px;
    margin-top: 5px;
    font-size: 9px;
    letter-spacing: 0.06em;
  }

  .tile:not(.hero) .priority-chip {
    min-height: 18px;
    padding-inline: 6px;
    font-size: 9px;
  }

  .tile:not(.hero) .tile-meta {
    font-size: 9px;
  }

  .tile.wide {
    grid-template-columns: minmax(0, 0.9fr) minmax(260px, 1.1fr);
    min-height: 0;
  }

  .tile.wide .tile-chart {
    min-height: 110px;
  }

  .tile.wide h2 {
    -webkit-line-clamp: 2;
  }
}
