@font-face {
  font-family: "Monument";
  src: url("/gtm-dashboard-pilot/assets/monument-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Monument Semi Mono";
  src: url("/gtm-dashboard-pilot/assets/monument-semi-mono.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #101010;
  --paper: #ffffff;
  --field: #f5f5f5;
  --surface-raised: #fafaf8;
  --surface-muted: #ededeb;
  --surface-hover: #f8f8f5;
  --lane-surface: rgba(255,255,255,0.82);
  --line: #e2e2de;
  --soft-line: #ecece9;
  --cell-line: rgba(226, 226, 222, 0.62);
  --calculated-fill: rgba(16, 16, 16, 0.018);
  --muted: #73736e;
  --faint: #a4a49e;
  --glass: rgba(245, 245, 245, 0.96);
  --footer-glass: rgba(255,255,255,0.97);
  --overlay: rgba(16,16,16,0.34);
  --scroll-thumb: #d8d8d3;
  --shadow-soft: 0 7px 20px rgba(16,16,16,0.055);
  --shadow-popover: 0 12px 30px rgba(16,16,16,0.10);
  --shadow-modal: 0 30px 80px rgba(16,16,16,0.18);
  --logo-filter: invert(1);
  --selection-ink: #101010;
  --orange: #ff5f33;
  --red: #e5483f;
  --yellow: #ffd82c;
  --green: #36cf5c;
  --blue: #2f5fff;
  --financial: var(--orange);
  --north-star: var(--yellow);
  --acquisition: var(--green);
  --creation: var(--blue);
  --ease: cubic-bezier(0.45, 0.05, 0.3, 1);
  --fast: 150ms;
  --standard: 210ms;
  --shell-pad: clamp(20px, 3.2vw, 52px);
  --type-meta: 8px;
  --type-utility: 10px;
  --type-value: 11px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f4f3ee;
  --paper: #1a1b19;
  --field: #141514;
  --surface-raised: #20211f;
  --surface-muted: #262824;
  --surface-hover: #242622;
  --lane-surface: rgba(26,27,25,0.88);
  --line: #343630;
  --soft-line: #2a2c27;
  --cell-line: rgba(244,243,238,0.075);
  --calculated-fill: rgba(244,243,238,0.025);
  --muted: #aaa9a2;
  --faint: #777970;
  --glass: rgba(20,21,20,0.90);
  --footer-glass: rgba(26,27,25,0.96);
  --overlay: rgba(3,4,3,0.68);
  --scroll-thumb: #3b3d37;
  --shadow-soft: 0 10px 28px rgba(0,0,0,0.24);
  --shadow-popover: 0 18px 42px rgba(0,0,0,0.30);
  --shadow-modal: 0 34px 100px rgba(0,0,0,0.44);
  --logo-filter: none;
}

* {
  box-sizing: border-box;
}

html {
  color: var(--ink);
  background: var(--field);
  font-family: "Monument", "Helvetica Neue", Arial, sans-serif;
  scroll-behavior: smooth;
}

.inertial-scroll-active {
  scroll-behavior: auto !important;
}

body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  background: var(--field);
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}

::selection {
  color: var(--selection-ink);
  background: rgba(255, 216, 44, 0.72);
}

.mono,
.eyebrow,
.kbd,
.column-label,
.stage-label,
.field-label,
.status-mark,
.meta,
.variant-number,
.hud,
.view-control,
.score-label,
.score-delta {
  font-family: "Monument Semi Mono", ui-monospace, monospace;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.prototype {
  --accent: var(--orange);
  --footer-control-height: 30px;
  height: 100vh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--field);
}

html[data-theme="dark"] .prototype,
html[data-theme="dark"] .prototype-boot {
  background:
    radial-gradient(ellipse at 76% 108%, rgba(255,255,255,0.045) 0, rgba(255,255,255,0.012) 30%, transparent 58%),
    linear-gradient(145deg, #141514 0%, #111311 100%);
}

html[data-theme="dark"] .prototype::before {
  width: 118vw;
  height: 72vh;
  position: fixed;
  z-index: 0;
  left: -12vw;
  bottom: -46vh;
  border: 1px solid rgba(183,183,183,0.12);
  border-radius: 50%;
  content: "";
  pointer-events: none;
  transform: rotate(-7deg);
}

.app-header {
  min-height: 76px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 0 var(--shell-pad);
  border-bottom: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(18px);
  position: relative;
  z-index: 30;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.formwork-logo {
  width: clamp(122px, 12vw, 154px);
  height: auto;
  display: block;
  filter: var(--logo-filter);
}

.wordmark {
  font-size: 17px;
  letter-spacing: -0.055em;
}

.brand-dots {
  display: flex;
  gap: 4px;
}

.brand-dots i,
.category-dot {
  width: 5px;
  height: 5px;
  display: inline-block;
  border-radius: 0;
  background: var(--dot);
}

.dot-orange { background: var(--orange) !important; }
.dot-yellow { background: var(--yellow) !important; }
.dot-green { background: var(--green) !important; }
.dot-blue { background: var(--blue) !important; }

.score-accent-0 { --item-color: var(--orange); }
.score-accent-1 { --item-color: var(--yellow); }
.score-accent-2 { --item-color: var(--green); }
.score-accent-3 { --item-color: var(--blue); }

.family-financial {
  --row-color: var(--orange);
  --row-wash: rgba(255,95,51,.13);
  --group-color: var(--orange);
  --group-wash: rgba(255,95,51,.13);
}

.family-north-star {
  --row-color: var(--yellow);
  --row-wash: rgba(255,216,44,.18);
  --group-color: var(--yellow);
  --group-wash: rgba(255,216,44,.18);
}

.family-acquisition {
  --row-color: var(--green);
  --row-wash: rgba(54,207,92,.13);
  --group-color: var(--green);
  --group-wash: rgba(54,207,92,.13);
}

.family-creation {
  --row-color: var(--blue);
  --row-wash: rgba(47,95,255,.11);
  --group-color: var(--blue);
  --group-wash: rgba(47,95,255,.11);
}

.family-financial .category-dot { background: var(--orange); }
.family-north-star .category-dot { background: var(--yellow); }
.family-acquisition .category-dot { background: var(--green); }
.family-creation .category-dot { background: var(--blue); }

.top-nav {
  display: flex;
  align-self: stretch;
  align-items: center;
  gap: 32px;
}

.top-nav button {
  height: 100%;
  padding: 3px 0 0;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}

.top-nav button:hover,
.top-nav button.active {
  color: var(--ink);
}

.top-nav button.active {
  border-bottom-color: var(--ink);
}

.header-context {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.theme-toggle {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  font-family: "Monument Semi Mono", monospace;
  font-size: var(--type-meta);
  text-transform: uppercase;
  transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease), background var(--fast) var(--ease);
}

.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--ink);
  background: var(--surface-hover);
}

.theme-icon {
  width: 10px;
  height: 10px;
  display: inline-block;
  border: 1px solid currentColor;
  background: linear-gradient(90deg, currentColor 0 50%, transparent 50%);
}

.actor-chip {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-family: "Monument Semi Mono", monospace;
  font-size: var(--type-meta);
  text-transform: uppercase;
}

.actor-chip > span:last-child {
  max-width: 88px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.actor-chip .person-avatar {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
}

.sign-out-link {
  color: var(--faint);
  font-family: "Monument Semi Mono", monospace;
  font-size: var(--type-meta);
  text-decoration: none;
  text-transform: uppercase;
}

.sign-out-link:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.period-select {
  min-width: 142px;
  padding: 8px 28px 8px 10px;
  border: 1px solid transparent;
  background: transparent;
  font-family: "Monument Semi Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.period-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.presence-stack {
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  padding-left: 4px;
  isolation: isolate;
}

.presence-stack[data-count="0"] {
  display: none;
}

.presence-avatar {
  --presence-ring: var(--orange);
  width: 20px;
  height: 20px;
  display: inline-flex;
  position: relative;
  flex: 0 0 20px;
  margin-left: -4px;
  transition: filter var(--fast) var(--ease), opacity var(--fast) var(--ease), transform var(--fast) var(--ease);
}

.presence-avatar:first-child {
  margin-left: 0;
}

.presence-avatar .person-avatar {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
  border-color: var(--paper);
  background: var(--surface-muted);
}

.presence-avatar.is-viewing .person-avatar {
  opacity: .78;
  filter: grayscale(1) contrast(.96);
}

.presence-avatar.is-editing {
  z-index: 2;
}

.presence-avatar.is-editing .person-avatar {
  border-color: var(--paper);
  box-shadow: 0 0 0 1px var(--paper), 0 0 0 2px var(--presence-ring);
}

.presence-avatar.presence-accent-0 { --presence-ring: var(--orange); }
.presence-avatar.presence-accent-1 { --presence-ring: var(--yellow); }
.presence-avatar.presence-accent-2 { --presence-ring: var(--green); }
.presence-avatar.presence-accent-3 { --presence-ring: var(--blue); }

.presence-overflow {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  margin-left: -3px;
  padding: 0 4px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--paper);
  font-family: "Monument Semi Mono", monospace;
  font-size: 7px;
  line-height: 1;
}

.metric-sync {
  min-width: 6px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  color: var(--muted);
  font-family: "Monument Semi Mono", monospace;
  font-size: var(--type-meta);
  text-transform: uppercase;
}

.metric-sync-label {
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateX(8px);
  white-space: nowrap;
  transition: max-width 300ms var(--ease), opacity 180ms var(--ease), transform 300ms var(--ease);
}

.metric-sync[data-expanded="true"] .metric-sync-label {
  max-width: 88px;
  opacity: 1;
  transform: translateX(0);
}

.metric-sync-mark {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  display: block;
  border-radius: 0;
  background: var(--green);
  transition: background-color 180ms var(--ease), transform 180ms var(--ease);
}

.metric-sync[data-state="pending"] .metric-sync-mark {
  background: var(--yellow);
  transform: scale(1.08);
}

.metric-sync[data-state="failed"] .metric-sync-mark {
  background: var(--red);
}

.metric-sync[data-state="saved"] .metric-sync-mark,
.metric-sync[data-state="idle"] .metric-sync-mark {
  background: var(--green);
}

.prototype-boot {
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  display: grid;
  grid-template-rows: 76px minmax(0, 1fr);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--field);
}

.prototype-boot::before {
  width: min(1180px, 92vw);
  aspect-ratio: 1.85;
  position: absolute;
  z-index: -1;
  right: -24vw;
  bottom: -34vw;
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  border-radius: 50%;
  content: "";
  pointer-events: none;
  transform: rotate(-11deg);
}

.boot-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 var(--shell-pad);
  border-bottom: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(18px);
  position: relative;
  z-index: 2;
}

.boot-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.boot-product-name,
.boot-art-kicker,
.boot-art-index,
.boot-footnote {
  font-family: "Monument Semi Mono", ui-monospace, monospace;
  font-size: var(--type-meta);
  letter-spacing: .035em;
  text-transform: uppercase;
}

.boot-product-name {
  color: var(--muted);
}

.boot-stage {
  width: min(1120px, calc(100vw - (2 * var(--shell-pad))));
  min-height: min(630px, calc(100vh - 140px));
  max-height: calc(100vh - 112px);
  align-self: center;
  justify-self: center;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, .92fr);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  box-shadow: 0 28px 80px rgba(16,16,16,.075);
  position: relative;
  overflow: hidden;
  animation: boot-frame-in 720ms var(--ease) both;
}

.boot-art {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(28px, 4vw, 56px);
  border-right: 1px solid var(--line);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface-raised) 88%, transparent), color-mix(in srgb, var(--paper) 96%, transparent));
  position: relative;
  overflow: hidden;
}

.boot-art::before {
  width: 128%;
  aspect-ratio: 1.7;
  position: absolute;
  right: -66%;
  bottom: -23%;
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  border-radius: 50%;
  content: "";
  transform: rotate(-16deg);
}

.boot-art::after {
  width: 10px;
  height: 10px;
  position: absolute;
  right: 31%;
  top: 28%;
  border: 1px solid var(--faint);
  content: "";
  opacity: .44;
}

.boot-art-kicker,
.boot-art-index {
  color: var(--muted);
  position: relative;
  z-index: 1;
}

.boot-art strong {
  display: flex;
  flex-direction: column;
  color: var(--ink);
  font-size: clamp(68px, 8vw, 124px);
  font-weight: 400;
  letter-spacing: -.075em;
  line-height: .78;
  position: relative;
  z-index: 1;
}

.boot-art strong span:last-child {
  align-self: flex-end;
  margin-right: 8%;
}

.boot-art-index {
  align-self: flex-end;
  padding-bottom: 10px;
}

.boot-spectrum {
  height: 6px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  left: 0;
  transform-origin: left;
  animation: boot-spectrum-in 900ms 180ms var(--ease) both;
}

.boot-spectrum i:nth-child(1) { background: var(--orange); }
.boot-spectrum i:nth-child(2) { background: var(--yellow); }
.boot-spectrum i:nth-child(3) { background: var(--green); }
.boot-spectrum i:nth-child(4) { background: var(--blue); }

.boot-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(38px, 5.5vw, 76px);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  position: relative;
  animation: boot-copy-in 620ms 100ms var(--ease) both;
}

.boot-panel h1 {
  max-width: 470px;
  margin: 16px 0 14px;
  font-size: clamp(32px, 4vw, 54px);
  font-weight: 400;
  letter-spacing: -.062em;
  line-height: .98;
}

.boot-panel p {
  max-width: 390px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.62;
}

.boot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 30px;
}

.boot-actions a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.boot-sign-in {
  min-width: 184px;
  justify-content: space-between;
  gap: 22px;
}

.button-signal {
  width: 5px;
  height: 5px;
  display: block;
  background: var(--green);
  box-shadow: 9px 0 0 var(--blue);
}

.boot-footnote {
  position: absolute;
  right: clamp(38px, 5.5vw, 76px);
  bottom: clamp(30px, 4vw, 50px);
  color: var(--faint);
}

.boot-progress {
  width: 100%;
  height: 2px;
  display: block;
  margin-top: 28px;
  overflow: hidden;
  background: var(--line);
  position: relative;
}

.boot-progress::after {
  width: 36%;
  height: 100%;
  content: "";
  background: var(--orange);
  position: absolute;
  animation: boot-progress 1.1s var(--ease) infinite;
}

@keyframes boot-progress {
  from { transform: translateX(-110%); }
  to { transform: translateX(390%); }
}

@keyframes boot-frame-in {
  from { opacity: 0; transform: translateY(12px) scale(.995); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes boot-copy-in {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes boot-spectrum-in {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

html[data-theme="dark"] .boot-stage {
  background: rgba(26,27,25,.9);
  box-shadow: 0 34px 100px rgba(0,0,0,.32);
}

html[data-theme="dark"] .boot-art {
  background:
    radial-gradient(circle at 22% 24%, rgba(255,255,255,.035), transparent 34%),
    linear-gradient(145deg, rgba(32,33,31,.96), rgba(20,21,20,.96));
}

html[data-theme="dark"] .boot-panel {
  background: rgba(26,27,25,.92);
}

.score-rail {
  height: 108px;
  display: block;
  padding-right: 28px;
  margin: 18px var(--shell-pad) 14px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--paper);
  position: relative;
  z-index: 10;
  transition:
    height 320ms var(--ease),
    margin-top 320ms var(--ease),
    margin-bottom 320ms var(--ease),
    background-color var(--standard) var(--ease);
}

.score-items {
  height: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  opacity: 1;
  transform: translateY(0);
  transform-origin: top;
  transition: opacity 160ms var(--ease), transform 260ms var(--ease);
}

.score-toggle {
  width: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--line);
  color: var(--faint);
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  position: absolute;
  z-index: 3;
  top: 0;
  right: 0;
  bottom: 0;
  transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease), background-color var(--fast) var(--ease);
}

.score-toggle:hover {
  color: var(--ink);
  background: var(--surface-hover);
}

.score-toggle-mark {
  width: 6px;
  height: 6px;
  display: block;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(2px) rotate(225deg);
  transition: transform 260ms var(--ease);
}

.score-collapsed-summary {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  color: var(--faint);
  font-family: "Monument Semi Mono", ui-monospace, monospace;
  font-size: 7px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  inset: 0 28px 0 0;
  transform: translateY(5px);
  transition: opacity 150ms var(--ease), transform 260ms var(--ease);
}

.score-collapsed-summary .brand-dots {
  gap: 3px;
}

.score-collapsed-summary .brand-dots i {
  width: 3px;
  height: 3px;
}

.score-rail.is-collapsed {
  height: 28px;
  margin-top: 8px;
  margin-bottom: 8px;
  background: var(--field);
  background: color-mix(in srgb, var(--paper) 58%, transparent);
}

.score-rail.is-collapsed .score-items {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-7px);
}

.score-rail.is-collapsed .score-toggle {
  background: transparent;
}

.score-rail.is-collapsed .score-toggle:hover {
  background: var(--surface-hover);
}

.score-rail.is-collapsed .score-toggle-mark {
  transform: translateY(-2px) rotate(45deg);
}

.score-rail.is-collapsed .score-collapsed-summary {
  opacity: 1;
  transform: translateY(0);
}

.score-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr;
  align-items: end;
  gap: 3px 12px;
  padding: 17px 22px 15px;
  border: 0;
  border-right: 1px solid var(--line);
  text-align: left;
  background: transparent;
  position: relative;
  transition: background var(--standard) var(--ease), transform var(--standard) var(--ease);
}

.score-heading {
  min-width: 0;
  grid-column: 1 / -1;
  align-self: start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.score-item:last-child {
  border-right: 0;
}

.score-item:hover {
  background: var(--surface-hover);
}

.score-label {
  color: var(--muted);
  font-size: var(--type-meta);
  line-height: 1;
}

.score-value {
  align-self: end;
  font-size: clamp(30px, 3.2vw, 48px);
  line-height: 0.85;
  letter-spacing: -0.06em;
  white-space: nowrap;
}

.score-delta {
  align-self: end;
  color: var(--muted);
  font-size: var(--type-meta);
}

.score-dot {
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 0;
  background: var(--item-color, var(--orange));
}

.page-stage {
  height: 100%;
  min-height: 0;
  padding: 0 var(--shell-pad) 46px;
  position: relative;
  z-index: 1;
}

.metrics-stage {
  overflow: hidden auto;
  overflow-anchor: none;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
}

.prototype.metrics-entering .metrics-layout {
  animation: metrics-enter 440ms var(--ease) both;
}

@keyframes metrics-enter {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.deliverables-stage {
  overflow: hidden;
}

.prototype.page-switching .page-stage {
  animation: page-in var(--standard) var(--ease);
}

@keyframes page-in {
  from { opacity: 0; transform: translateX(9px); }
  to { opacity: 1; transform: translateX(0); }
}

.metrics-layout {
  min-height: 100%;
}

.metrics-scroll {
  min-width: 0;
  overflow: visible;
}

.metric-grid {
  min-width: 0;
}

.metric-header,
.metric-row {
  display: grid;
  grid-template-columns: minmax(138px, 1.45fr) repeat(4, minmax(40px, .48fr)) minmax(54px, .62fr) minmax(52px, .58fr) minmax(52px, .58fr) minmax(68px, .78fr) minmax(54px, .62fr) minmax(68px, .78fr);
  align-items: stretch;
}

.metric-header {
  height: 38px;
  margin-bottom: 10px;
  position: sticky;
  top: 0;
  z-index: 14;
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(10px);
}

.column-label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 11px;
  color: var(--faint);
  font-size: var(--type-meta);
  white-space: nowrap;
}

.column-label:first-child {
  justify-content: flex-start;
  padding-left: 20px;
}

.metric-family {
  margin-bottom: 14px;
  position: relative;
  border: 1px solid var(--line);
  background: var(--paper);
}

.metric-family::before {
  height: 3px;
  position: absolute;
  z-index: 2;
  inset: -1px -1px auto;
  content: "";
  background: var(--group-color);
}

.metric-group-label {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 14px 0;
  border-bottom: 1px solid var(--soft-line);
  background: linear-gradient(90deg, var(--group-wash), transparent 36%);
}

.metric-group-name {
  font-size: 17px;
  letter-spacing: -0.035em;
}

.metric-group-note,
.metric-group-count {
  color: var(--muted);
  font-family: "Monument Semi Mono", monospace;
  font-size: var(--type-meta);
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.metric-group-note {
  margin-left: 2px;
}

.metric-group-count {
  margin-left: auto;
}

.metric-family-rows {
  display: grid;
  gap: 5px;
  padding: 7px;
}

.metric-row {
  min-height: 58px;
  position: relative;
  border: 1px solid var(--soft-line);
  background: var(--surface-raised);
  isolation: isolate;
  transform-origin: center;
  transition: opacity var(--standard) var(--ease), transform var(--standard) var(--ease), background var(--standard) var(--ease), border-color var(--standard) var(--ease), box-shadow var(--standard) var(--ease);
}

.metric-row:last-child {
  border-bottom: 1px solid var(--soft-line);
}

.metric-row::before {
  width: 3px;
  position: absolute;
  z-index: 2;
  inset: 0 auto 0 0;
  content: "";
  background: var(--row-color);
  transform: scaleY(0);
  transition: transform var(--standard) var(--ease);
}

.metric-row.active {
  z-index: 5;
  border-color: var(--row-color);
  background: var(--row-wash);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px) scale(1.004);
}

.metric-row.active::before {
  transform: scaleY(1);
}

.metric-grid.has-active .metric-row:not(.active) {
  opacity: 0.58;
}

.metric-grid.has-active .metric-row.active + .metric-row,
.metric-grid.has-active .metric-row:has(+ .metric-row.active) {
  opacity: 0.82;
}

.metric-name {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
}

.metric-name-copy {
  min-width: 0;
}

.metric-name strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: -0.018em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-cell {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 7px 8px;
  position: relative;
  border-left: 1px solid var(--cell-line);
  font-family: "Monument Semi Mono", monospace;
  font-size: var(--type-value);
  font-variant-numeric: tabular-nums;
}

.metric-cell button {
  max-width: 100%;
  padding: 6px 0 4px;
  border: 0;
  border-bottom: 1px solid transparent;
  overflow: hidden;
  background: transparent;
  font: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: border-color var(--fast) var(--ease), color var(--fast) var(--ease), opacity var(--fast) var(--ease);
}

.metric-cell.editable button:hover,
.metric-cell.cursor button {
  border-bottom-color: var(--ink);
}

.metric-cell.cursor::after {
  position: absolute;
  inset: 5px;
  border: 1px solid var(--ink);
  content: "";
  opacity: 0.22;
  pointer-events: none;
}

.metric-cell.calculated {
  background: var(--calculated-fill);
}

.metric-cell.owner-source {
  justify-content: flex-end;
  overflow: hidden;
  font-size: var(--type-meta);
}

.metric-cell.owner-source .identity-button {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  border-bottom: 0;
  overflow: visible;
}

.identity-disclosure {
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  overflow: hidden;
  color: var(--muted);
}

.person-avatar,
.source-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: inline-grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-muted);
  color: var(--muted);
  font-family: "Monument Semi Mono", monospace;
  font-size: 7px;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.person-avatar img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  display: block;
  object-fit: cover;
  filter: saturate(.78) contrast(1.03);
}

.person-avatar.avatar-failed img {
  display: none;
}

.remote-presence-stack {
  display: inline-flex;
  align-items: center;
  position: absolute;
  z-index: 12;
  pointer-events: none;
}

.remote-presence-stack .presence-avatar {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
  margin-left: -3px;
}

.remote-presence-stack .presence-avatar:first-child {
  margin-left: 0;
}

.remote-presence-stack .presence-avatar .person-avatar {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
  font-size: 6px;
}

.remote-presence-stack .presence-overflow {
  min-width: 16px;
  height: 16px;
  margin-left: -2px;
  padding: 0 3px;
  font-size: 6px;
}

.remote-presence-metric-cell {
  top: 1px;
  right: 2px;
  transform: translate(28%, -28%);
}

.remote-presence-metric-row,
.remote-presence-deliverable-card {
  top: -7px;
  right: 8px;
}

.remote-presence-modal {
  top: 24px;
  right: 70px;
}

.metric-cell .person-avatar,
.metric-cell .source-icon {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
  opacity: .62;
  transition: opacity var(--standard) var(--ease), filter var(--standard) var(--ease);
}

.identity-label {
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translateX(-5px);
  transition: max-width var(--standard) var(--ease), opacity var(--fast) var(--ease), transform var(--standard) var(--ease);
}

.metric-row.active .identity-label {
  max-width: 74px;
  opacity: 1;
  transform: translateX(0);
}

.metric-row.active .metric-cell .person-avatar,
.metric-row.active .metric-cell .source-icon {
  opacity: 1;
  filter: grayscale(0);
}

.metric-row.active .metric-cell .remote-presence-stack .presence-avatar.is-viewing .person-avatar {
  opacity: .78;
  filter: grayscale(1) contrast(.96);
}

.metric-cell.missing-target-cell {
  justify-content: flex-start;
  padding-left: 12px;
}

.missing-target-action {
  width: 100%;
  text-align: left;
}

.set-target {
  color: var(--faint);
  font-size: var(--type-meta);
  opacity: 0;
  text-transform: uppercase;
}

.metric-row.active .set-target {
  opacity: 1;
}

.status-mark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--type-meta);
  white-space: nowrap;
}

.status-glyph {
  font-family: "Monument", sans-serif;
  font-size: 13px;
}

.status-unset {
  opacity: 0;
  transition: opacity var(--standard) var(--ease);
}

.metric-row.active .status-unset {
  opacity: 1;
}

.cell-editor {
  width: 100%;
  min-width: 0;
  padding: 5px 1px 4px;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  outline: 0;
  background: transparent;
  text-align: right;
  font: inherit;
}

select.cell-editor {
  text-align: left;
}

.metric-cell.rejected {
  animation: rejected 280ms var(--ease);
}

.metric-cell.pending::before {
  width: 12px;
  height: 2px;
  position: absolute;
  right: 7px;
  bottom: 5px;
  content: "";
  overflow: hidden;
  background: linear-gradient(90deg, transparent, var(--row-color), transparent);
  animation: pending-save 760ms linear infinite;
}

@keyframes pending-save {
  from { transform: translateX(-6px); opacity: .35; }
  50% { opacity: 1; }
  to { transform: translateX(6px); opacity: .35; }
}

@keyframes rejected {
  0%, 100% { transform: translateX(0); }
  35% { transform: translateX(-4px); box-shadow: inset 0 -1px 0 var(--orange); }
  68% { transform: translateX(2px); box-shadow: inset 0 -1px 0 var(--orange); }
}

.board-action-dock {
  position: absolute;
  z-index: 45;
  left: var(--shell-pad);
  bottom: 12px;
  height: var(--footer-control-height);
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: none;
  font-family: "Monument Semi Mono", monospace;
  backdrop-filter: none;
}

.board-view-menu {
  display: flex;
  position: relative;
}

.view-popover {
  width: 168px;
  position: absolute;
  z-index: 45;
  left: 0;
  bottom: calc(100% + 8px);
  padding: 6px;
  border: 1px solid var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow-popover);
}

.view-popover button {
  width: 100%;
  display: block;
  padding: 9px 8px;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 10px;
}

.view-popover button:hover:not(:disabled) {
  background: var(--field);
}

.view-popover button:disabled {
  color: var(--faint);
  cursor: default;
}

.quiet-button,
.primary-button,
.icon-button,
.view-control,
.board-add-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--paper);
  font-size: 11px;
}

.quiet-button,
.primary-button,
.view-control {
  padding: 8px 13px;
}

.quiet-button:hover,
.view-control:hover {
  border-color: var(--ink);
}

.primary-button {
  border-color: var(--ink);
  color: var(--paper);
  background: var(--ink);
}

.primary-button:hover {
  filter: brightness(.86);
}

.board-action-dock .search-shell,
.board-action-dock .board-view-menu,
.board-action-dock .view-control,
.board-action-dock .board-add-button {
  height: 100%;
  border: 0;
  min-height: 0;
}

.board-action-dock .search-shell,
.board-action-dock .board-view-menu {
  border-right: 1px solid var(--line);
}

.board-action-dock .view-control {
  min-width: 52px;
  padding: 0 12px;
  color: var(--faint);
  background: transparent;
  font-size: 8px;
}

.board-action-dock .search-shell {
  width: 32px;
  background: transparent;
}

.board-action-dock .search-shell::before {
  width: 32px;
  inset: 0 auto 0 0;
  display: grid;
  place-items: center;
  font-size: 11px;
}

.board-action-dock .search-shell:hover,
.board-action-dock .view-control:hover {
  color: var(--ink);
  background: var(--surface-hover);
}

.board-add-button {
  width: 34px;
  padding: 0;
  border-color: var(--ink);
  color: var(--paper);
  background: var(--ink);
  font-size: 16px;
  line-height: 1;
}

.board-add-button:hover {
  filter: brightness(.86);
}

.search-shell {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: var(--paper);
  position: relative;
  transition: width var(--standard) var(--ease), border-color var(--fast) var(--ease);
}

.search-shell:focus-within,
.search-shell.has-value {
  width: 190px;
  border-color: var(--ink);
}

.search-shell::before {
  position: absolute;
  left: 11px;
  top: 9px;
  content: "⌕";
  font-size: 13px;
}

.search-shell input {
  width: 100%;
  height: 100%;
  padding: 0 10px 0 31px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 10px;
  opacity: 0;
}

.search-shell:focus-within input,
.search-shell.has-value input {
  opacity: 1;
}

.filter-count {
  min-width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  margin-left: 5px;
  border-radius: 0;
  color: var(--paper);
  background: var(--ink);
  font-family: "Monument Semi Mono", monospace;
  font-size: 7px;
}

.board-wrap {
  height: 100%;
  min-height: 0;
  border: 1px solid var(--line);
  background: var(--paper);
  overflow: auto hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
}

.board {
  --lane-min: 272px;
  --empty-lane-width: 34px;
  --empty-lane-open-width: 188px;
  width: max-content;
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: stretch;
}

.lane {
  width: auto;
  min-width: var(--lane-min);
  flex: 1 0 var(--lane-min);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--lane-surface);
  transition: flex-basis var(--standard) var(--ease), min-width var(--standard) var(--ease), background var(--standard) var(--ease);
}

.lane:last-child {
  border-right: 0;
}

.lane.empty {
  width: auto;
  min-width: var(--empty-lane-width);
  flex: 0 0 var(--empty-lane-width);
}

.lane.empty:hover,
.lane.empty.drag-target {
  width: auto;
  min-width: var(--empty-lane-open-width);
  flex-basis: var(--empty-lane-open-width);
  background: var(--surface-raised);
}

.lane-header {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 15px;
  border-bottom: 1px solid var(--line);
}

.stage-label {
  overflow: hidden;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lane-count {
  color: var(--faint);
  font-family: "Monument Semi Mono", monospace;
  font-size: 8px;
}

.lane.empty .lane-header {
  min-height: 100%;
  padding: 14px 0;
  flex-direction: column;
  justify-content: flex-start;
}

.lane.empty .stage-label {
  writing-mode: vertical-rl;
}

.lane.empty:hover .lane-header,
.lane.empty.drag-target .lane-header {
  min-height: 54px;
  padding: 0 15px;
  flex-direction: row;
  justify-content: space-between;
}

.lane.empty:hover .stage-label,
.lane.empty.drag-target .stage-label {
  writing-mode: horizontal-tb;
}

.lane-cards {
  min-height: 0;
  flex: 1;
  padding: 10px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
}

.lane.empty .lane-cards {
  display: none;
}

.lane.empty:hover .lane-cards,
.lane.empty.drag-target .lane-cards {
  display: block;
}

.deliverable-card {
  width: 100%;
  margin: 0 0 9px;
  padding: 13px 13px 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  position: relative;
  text-align: left;
  transition: transform var(--standard) var(--ease), border-color var(--standard) var(--ease), opacity var(--standard) var(--ease), background var(--standard) var(--ease);
}

.card-open-control {
  width: 100%;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.card-open-control:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 4px;
}

.card-context-control {
  margin: 0;
}

.deliverable-card:hover,
.deliverable-card.active {
  z-index: 3;
  border-color: var(--ink);
  transform: translateY(-2px) scale(1.012);
}

.deliverable-card.dragging {
  opacity: 0.35;
}

.deliverable-card.syncing {
  cursor: progress;
  opacity: .72;
  pointer-events: none;
}

.deliverable-card.syncing::after {
  width: 24px;
  height: 2px;
  position: absolute;
  right: 11px;
  bottom: 8px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
  animation: pending-save 760ms linear infinite;
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.card-type,
.card-owner,
.card-due,
.lane-age,
.card-plan {
  color: var(--muted);
  font-family: "Monument Semi Mono", monospace;
  font-size: var(--type-meta);
  line-height: 1.35;
  text-transform: uppercase;
}

.overdue {
  color: var(--ink);
}

.overdue::before {
  width: 5px;
  height: 5px;
  display: inline-block;
  margin: 0 5px 1px 0;
  border-radius: 0;
  background: var(--orange);
  content: "";
}

.card-title {
  margin: 0 0 17px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.16;
  letter-spacing: -0.025em;
}

.card-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.card-owner {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  transition: visibility 0s;
}

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

.deliverable-card.has-current-task:hover .card-owner .person-avatar,
.deliverable-card.has-current-task.active .card-owner .person-avatar {
  display: none;
}

.deliverable-card.has-current-task:hover .card-owner-name::before,
.deliverable-card.has-current-task.active .card-owner-name::before {
  color: var(--faint);
  content: "Owner · ";
}

.active-card-details {
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height var(--standard) var(--ease), opacity var(--standard) var(--ease), margin var(--standard) var(--ease);
}

.deliverable-card.active .active-card-details,
.deliverable-card:hover .active-card-details {
  max-height: 220px;
  margin-top: 13px;
  opacity: 1;
}

.card-active-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 9px;
  border-top: 1px solid var(--soft-line);
}

.current-task {
  width: 100%;
  margin-top: 10px;
  padding: 11px;
  border: 1px solid transparent;
  border-radius: 0;
  color: inherit;
  background: var(--field);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease), transform var(--fast) var(--ease);
}

.current-task:hover,
.current-task:focus-visible {
  border-color: var(--ink);
  background: var(--surface-hover);
  outline: 0;
  transform: translateY(-1px);
}

.current-task.is-empty strong {
  color: var(--muted);
}

.current-task .eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--faint);
  font-size: var(--type-meta);
}

.current-task strong {
  display: block;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
}

.current-task .task-meta {
  display: block;
  color: var(--muted);
  font-family: "Monument Semi Mono", monospace;
  font-size: var(--type-meta);
  text-transform: uppercase;
}

.current-task > .task-meta {
  margin-top: 7px;
}

.task-accountability {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
}

.task-accountability-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.task-person {
  overflow: hidden;
  font-size: var(--type-utility);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board.has-active .deliverable-card:not(.active) {
  opacity: 0.62;
}

.modal-layer {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  background: var(--overlay);
  backdrop-filter: blur(3px);
}

.modal-layer.workspace-entering {
  animation: modal-fade var(--standard) var(--ease);
}

@keyframes modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.deliverable-modal {
  --modal-accent: var(--faint);
  width: min(1120px, calc(100vw - 56px));
  height: min(860px, calc(100vh - 56px));
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid var(--ink);
  overflow: hidden;
  background: var(--paper);
  position: relative;
  box-shadow: var(--shadow-modal);
}

.modal-layer.workspace-entering > .deliverable-modal,
.modal-layer.workspace-entering > .task-modal {
  animation: modal-in var(--standard) var(--ease);
}

.modal-stage-briefed,
.modal-stage-scheduled { --modal-accent: var(--blue); }
.modal-stage-in-production { --modal-accent: var(--yellow); }
.modal-stage-review { --modal-accent: var(--orange); }
.modal-stage-approved,
.modal-stage-published { --modal-accent: var(--green); }

.modal-accent {
  height: 4px;
  position: absolute;
  z-index: 4;
  inset: 0 0 auto;
  background: var(--modal-accent);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  min-height: 92px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 23px 27px 18px;
  position: relative;
  border-bottom: 1px solid var(--line);
}

.modal-title {
  margin: 0;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.03;
  letter-spacing: -0.048em;
}

.legacy-status {
  color: var(--muted);
  font-family: "Monument Semi Mono", monospace;
  font-size: var(--type-meta);
  text-transform: uppercase;
}

.modal-status-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.stage-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Monument Semi Mono", monospace;
  font-size: var(--type-meta);
  text-transform: uppercase;
}

.stage-badge i {
  width: 6px;
  height: 6px;
  background: var(--modal-accent);
}

.icon-button {
  width: 34px;
  padding: 0;
  font-size: 19px;
}

.modal-body {
  min-width: 0;
  min-height: 0;
  padding: 0 27px 48px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
}

.modal-section {
  padding: 28px 0 32px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 12px;
}

.modal-section:last-child {
  border-bottom: 0;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.section-heading h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.form-grid .wide {
  grid-column: 1 / -1;
}

.field {
  display: block;
}

.field-label {
  display: block;
  margin: 0 0 7px;
  color: var(--muted);
  font-size: var(--type-meta);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 0 9px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  outline: 0;
  background: transparent;
  font-size: 12px;
  line-height: 1.35;
  transition: border-color var(--fast) var(--ease);
}

.field textarea {
  min-height: 82px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-bottom-color: var(--modal-accent, var(--ink));
}

.field input[readonly],
.field select:disabled {
  color: var(--muted);
  opacity: 1;
}

.prompt-field {
  position: relative;
}

.prompt-field .quiet-button {
  position: absolute;
  right: 0;
  top: -7px;
}

.task-list {
  border-top: 1px solid var(--line);
}

.task-empty {
  padding: 18px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.task-row {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border: 0;
  border-bottom: 1px solid var(--soft-line);
  background: transparent;
  text-align: left;
}

.task-check {
  width: 15px;
  height: 15px;
  border: 1px solid var(--ink);
  background: transparent;
}

.task-row.completed {
  opacity: 0.45;
}

.task-row.completed .task-title {
  text-decoration: line-through;
}

.task-title {
  display: block;
  font-size: 12px;
}

.task-row .task-meta {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-family: "Monument Semi Mono", monospace;
  font-size: var(--type-meta);
  text-transform: uppercase;
}

.task-divider {
  padding: 16px 0 7px;
  color: var(--faint);
  font-family: "Monument Semi Mono", monospace;
  font-size: var(--type-meta);
  text-transform: uppercase;
}

.modal-footer {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 27px;
  border-top: 1px solid var(--line);
  background: var(--footer-glass);
}

.footer-note {
  color: var(--faint);
  font-family: "Monument Semi Mono", monospace;
  font-size: var(--type-meta);
  text-transform: uppercase;
}

.footer-note.form-error {
  color: var(--orange);
}

.task-footer-context {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.task-footer-context .footer-note:empty {
  display: none;
}

.is-saving {
  cursor: progress;
}

.footer-actions {
  display: flex;
  gap: 9px;
}

.task-modal {
  --modal-accent: var(--blue);
  width: min(620px, calc(100vw - 56px));
  max-height: calc(100vh - 72px);
  position: relative;
  border: 1px solid var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow-modal);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
}

.task-modal.task-status-in-progress,
.task-modal.task-status-review { --modal-accent: var(--yellow); }
.task-modal.task-status-blocked { --modal-accent: var(--orange); }
.task-modal.task-status-done,
.task-modal.task-status-complete,
.task-modal.task-status-completed { --modal-accent: var(--green); }
.task-modal.task-status-paused { --modal-accent: var(--faint); }
.task-time-modal { --modal-accent: var(--green); }

.task-modal .modal-header,
.task-modal .modal-footer,
.task-modal .form-grid {
  padding-left: 25px;
  padding-right: 25px;
}

.task-modal .form-grid {
  padding-top: 25px;
  padding-bottom: 30px;
}

.toast {
  position: fixed;
  z-index: 160;
  left: 50%;
  bottom: 74px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 13px;
  color: var(--paper);
  background: var(--ink);
  font-family: "Monument Semi Mono", monospace;
  font-size: 8px;
  text-transform: uppercase;
  transform: translateX(-50%);
  animation: toast-in var(--standard) var(--ease);
}

.toast button {
  padding: 0 0 2px;
  border: 0;
  border-bottom: 1px solid var(--paper);
  color: var(--paper);
  background: transparent;
  font: inherit;
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.prototype-switcher {
  min-width: 488px;
  height: 50px;
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: 12px;
  display: grid;
  grid-template-columns: 34px repeat(3, 1fr) 34px;
  align-items: stretch;
  border: 1px solid rgba(16,16,16,0.16);
  background: rgba(255,255,255,0.94);
  box-shadow: 0 10px 35px rgba(16,16,16,0.10);
  backdrop-filter: blur(12px);
  transform: translateX(-50%);
}

.prototype-switcher button {
  padding: 0 12px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  text-align: left;
}

.prototype-switcher button:last-child {
  border-right: 0;
}

.prototype-switcher button.active {
  color: var(--paper);
  background: var(--ink);
}

.prototype-switcher .arrow-button {
  padding: 0;
  text-align: center;
  font-size: 15px;
}

.variant-number {
  display: block;
  margin-bottom: 2px;
  font-size: 6px;
  opacity: 0.65;
}

.hud {
  position: fixed;
  z-index: 70;
  right: calc(var(--shell-pad) + 42px);
  bottom: 18px;
  display: flex;
  gap: 15px;
  color: var(--faint);
  font-size: 7px;
  pointer-events: none;
}

.utility-menu {
  position: fixed;
  z-index: 80;
  right: var(--shell-pad);
  bottom: 12px;
}

.utility-trigger {
  width: 32px;
  height: var(--footer-control-height);
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--faint);
  background: var(--paper);
  font-family: "Monument Semi Mono", monospace;
  font-size: 8px;
  letter-spacing: 1px;
  transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease), background var(--fast) var(--ease);
}

.utility-trigger:hover,
.utility-trigger[aria-expanded="true"] {
  color: var(--ink);
  border-color: var(--ink);
  background: var(--surface-hover);
}

.utility-popover {
  width: 238px;
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  padding: 12px;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 12px 30px rgba(16,16,16,0.12);
}

.utility-identity {
  display: grid;
  gap: 4px;
  padding-bottom: 11px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.utility-identity .actor-chip > span:last-child {
  max-width: 166px;
}

.utility-email {
  overflow: hidden;
  color: var(--faint);
  font-family: "Monument Semi Mono", monospace;
  font-size: var(--type-meta);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.utility-actions {
  display: grid;
  gap: 4px;
}

.utility-actions .theme-toggle,
.utility-actions .sound-toggle,
.utility-actions .sign-out-link {
  width: 100%;
  min-height: 32px;
  justify-content: flex-start;
  padding: 7px 8px;
  border: 1px solid transparent;
  color: var(--muted);
  background: transparent;
  font-family: "Monument Semi Mono", monospace;
  font-size: var(--type-meta);
  line-height: 1;
  text-align: left;
  text-decoration: none;
  text-transform: uppercase;
}

.utility-actions .theme-toggle:hover,
.utility-actions .sound-toggle:hover,
.utility-actions .sign-out-link:hover {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface-hover);
  text-decoration: none;
}

.sound-settings {
  display: grid;
  gap: 2px;
  padding: 4px 0;
  margin: 2px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.sound-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sound-glyph {
  width: 12px;
  height: 10px;
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
}

.sound-glyph i {
  width: 2px;
  display: block;
  background: currentColor;
}

.sound-glyph i:nth-child(1) { height: 4px; }
.sound-glyph i:nth-child(2) { height: 8px; }
.sound-glyph i:nth-child(3) { height: 6px; }

.sound-toggle[aria-pressed="false"] .sound-glyph i {
  height: 2px;
}

.sound-state {
  margin-left: auto;
  color: var(--faint);
}

.sound-volume {
  min-height: 30px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 22px;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  color: var(--faint);
  font-family: "Monument Semi Mono", monospace;
  font-size: var(--type-meta);
  line-height: 1;
  text-transform: uppercase;
}

.sound-volume input {
  width: 100%;
  height: 12px;
  margin: 0;
  appearance: none;
  background: transparent;
}

.sound-volume input::-webkit-slider-runnable-track {
  height: 1px;
  background: var(--line);
}

.sound-volume input::-webkit-slider-thumb {
  width: 7px;
  height: 7px;
  margin-top: -3px;
  appearance: none;
  border: 0;
  border-radius: 0;
  background: var(--ink);
}

.sound-volume input::-moz-range-track {
  height: 1px;
  border: 0;
  background: var(--line);
}

.sound-volume input::-moz-range-thumb {
  width: 7px;
  height: 7px;
  border: 0;
  border-radius: 0;
  background: var(--ink);
}

.sound-volume input:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}

.sound-volume input:disabled,
.sound-volume:has(input:disabled) {
  opacity: .42;
}

.sound-volume output {
  color: var(--muted);
  text-align: right;
}

.kbd {
  display: inline-block;
  min-width: 15px;
  padding: 2px 3px;
  margin-right: 4px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--paper);
  font-size: 6px;
  text-align: center;
}

/* Variant B: Control Surface */
.v-control .app-header {
  min-height: 62px;
  border-bottom: 0;
  color: var(--paper);
  background: var(--ink);
}

.v-control .wordmark {
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.v-control .top-nav button {
  color: rgba(255,255,255,0.5);
  border-bottom-color: transparent;
  font-family: "Monument Semi Mono", monospace;
  font-size: 9px;
  text-transform: uppercase;
}

.v-control .top-nav button.active {
  color: var(--ink);
  border-bottom-color: transparent;
  background: var(--paper);
  padding-left: 16px;
  padding-right: 16px;
}

.v-control .period-select {
  color: var(--paper);
}

.v-control .metric-sync {
  color: rgba(255,255,255,0.5);
}

.v-control .score-rail {
  height: 94px;
  margin-top: 12px;
  border-color: var(--ink);
}

.v-control .score-item {
  border-right-color: var(--ink);
  padding: 13px 18px;
}

.v-control .score-value {
  font-family: "Monument Semi Mono", monospace;
  font-size: clamp(27px, 2.6vw, 39px);
  letter-spacing: -0.04em;
}

.v-control .score-item::before {
  align-self: start;
  justify-self: start;
  color: var(--faint);
  content: attr(data-index);
  font-family: "Monument Semi Mono", monospace;
  font-size: 6px;
  position: absolute;
}

.v-control .metrics-layout,
.v-control .board-wrap {
  border-color: var(--ink);
}

.v-control .category-rail {
  background: var(--ink);
  border-right-color: var(--ink);
}

.v-control .rail-heading,
.v-control .category-button {
  color: rgba(255,255,255,0.45);
  border-bottom-color: #30302e;
}

.v-control .category-button:hover,
.v-control .category-button.active {
  color: var(--paper);
  background: #242422;
}

.v-control .metric-row {
  min-height: 60px;
  margin: 5px 7px;
  border: 1px solid #e7e7e3;
}

.v-control .metric-row::before {
  width: 142px;
  right: auto;
  background: var(--row-color);
  transform: scaleX(0);
  transform-origin: left;
  mix-blend-mode: multiply;
}

.v-control .metric-row.active::before {
  transform: scaleX(1);
}

.v-control .metric-row.active .metric-name {
  color: var(--ink);
}

.v-control .metric-row.active .metric-name-copy {
  z-index: 2;
}

.v-control .metric-row.active .category-dot {
  background: var(--ink);
  z-index: 2;
}

.v-control .metric-cell.cursor::before,
.v-control .metric-cell.cursor::after {
  width: 7px;
  height: 7px;
  position: absolute;
  z-index: 3;
  content: "";
  pointer-events: none;
}

.v-control .metric-cell.cursor::before {
  inset: 4px auto auto 4px;
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}

.v-control .metric-cell.cursor::after {
  inset: auto 4px 4px auto;
  border: 0;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  opacity: 1;
}

.v-control .lane {
  border-right-color: var(--ink);
}

.v-control .lane-header {
  min-height: 46px;
  color: var(--paper);
  border-bottom-color: var(--ink);
  background: var(--ink);
}

.v-control .lane.empty .lane-header {
  min-height: 100%;
}

.v-control .lane.empty:hover .lane-header,
.v-control .lane.empty.drag-target .lane-header {
  min-height: 46px;
}

.v-control .lane-count {
  color: rgba(255,255,255,0.45);
}

.v-control .deliverable-card {
  border-color: #d8d8d3;
}

.v-control .deliverable-card.active,
.v-control .deliverable-card:hover {
  border-color: var(--ink);
  box-shadow: inset 0 4px 0 var(--orange);
  transform: translateY(-1px);
}

.v-control .current-task {
  color: var(--paper);
  background: var(--ink);
}

.v-control .current-task .eyebrow,
.v-control .current-task .task-meta {
  color: rgba(255,255,255,0.52);
}

.v-control .deliverable-modal {
  border: 3px solid var(--ink);
}

.v-control .modal-header {
  box-shadow: inset 0 4px 0 var(--orange);
}

.v-control .hud {
  padding: 8px 10px;
  color: rgba(255,255,255,0.64);
  background: var(--ink);
}

.v-control .hud .kbd {
  color: var(--paper);
  border-color: #5a5a56;
  background: transparent;
}

/* Variant C: Spatial Runway */
.v-runway .app-header {
  min-height: 86px;
  border-bottom-color: transparent;
}

.v-runway .score-rail {
  height: 118px;
  margin-top: 0;
  border-right: 0;
  border-left: 0;
}

.v-runway .score-item {
  padding-left: 0;
  margin-right: 26px;
}

.v-runway .metrics-layout {
  grid-template-columns: 104px minmax(0, 1fr);
  border-top-color: var(--ink);
}

.v-runway .category-rail {
  background: var(--field);
}

.v-runway .metric-header {
  background: var(--field);
}

.v-runway .metric-group-label {
  height: 74px;
  display: flex;
  align-items: flex-end;
  padding: 0 20px 5px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  color: var(--group-color);
  background: var(--paper);
  font-size: clamp(36px, 5vw, 72px);
  line-height: 0.8;
  letter-spacing: -0.065em;
  opacity: 0.14;
}

.v-runway .metric-row {
  min-height: 70px;
  background: var(--paper);
}

.v-runway .metric-row::after {
  height: 1px;
  position: absolute;
  z-index: -1;
  left: 22px;
  right: 15px;
  top: 50%;
  content: "";
  background: var(--row-color);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: opacity var(--standard) var(--ease), transform var(--standard) var(--ease);
}

.v-runway .metric-row.active {
  transform: translateX(9px);
}

.v-runway .metric-row.active::after {
  opacity: 0.5;
  transform: scaleX(1);
}

.v-runway .metric-cell {
  background: var(--paper);
  border-left: 0;
}

.v-runway .metric-cell > * {
  background: var(--paper);
}

.v-runway .board-wrap {
  border-top-color: var(--ink);
  border-right: 0;
  border-left: 0;
  background: transparent;
}

.v-runway .lane {
  width: 286px;
  min-width: 286px;
  padding: 0 7px;
  border-right: 0;
  background: #ededE9;
}

.v-runway .lane + .lane {
  border-left: 7px solid var(--field);
}

.v-runway .lane.empty {
  width: 36px;
  min-width: 36px;
  padding: 0;
}

.v-runway .lane.empty:hover,
.v-runway .lane.empty.drag-target {
  width: 188px;
  min-width: 188px;
}

.v-runway .lane-header {
  min-height: 60px;
  padding: 0 10px;
  border-bottom-color: rgba(16,16,16,0.14);
}

.v-runway .lane.empty .lane-header {
  min-height: 100%;
}

.v-runway .lane.empty:hover .lane-header,
.v-runway .lane.empty.drag-target .lane-header {
  min-height: 60px;
}

.v-runway .deliverable-card {
  padding: 16px;
  border: 0;
  box-shadow: none;
}

.v-runway .deliverable-card.active,
.v-runway .deliverable-card:hover {
  box-shadow: inset 3px 0 0 var(--orange);
  transform: translateY(-4px) scale(1.016);
}

.v-runway .current-task {
  padding: 14px;
  border-left: 2px solid var(--orange);
}

.v-runway .deliverable-modal {
  border: 0;
  box-shadow: 0 30px 100px rgba(16,16,16,.22);
}

.v-runway .modal-header {
  min-height: 124px;
  padding-top: 34px;
}

.v-runway .modal-title {
  max-width: 700px;
  font-size: 38px;
}

.v-runway .modal-section {
  padding-top: 38px;
  padding-bottom: 44px;
}

.v-runway .section-heading h3 {
  font-size: 23px;
}

:where(.metrics-stage, .board-wrap, .lane-cards, .modal-body, .task-modal, .field textarea)::-webkit-scrollbar {
  width: 3px;
  height: 3px;
}

:where(.metrics-stage, .board-wrap, .lane-cards, .modal-body, .task-modal, .field textarea)::-webkit-scrollbar-track,
:where(.metrics-stage, .board-wrap, .lane-cards, .modal-body, .task-modal, .field textarea)::-webkit-scrollbar-corner {
  background: transparent;
}

:where(.metrics-stage, .board-wrap, .lane-cards, .modal-body, .task-modal, .field textarea)::-webkit-scrollbar-thumb {
  border: 0;
  border-radius: 0;
  background: var(--scroll-thumb);
}

:where(.metrics-stage, .board-wrap, .lane-cards, .modal-body, .task-modal, .field textarea):hover::-webkit-scrollbar-thumb,
:where(.metrics-stage, .board-wrap, .lane-cards, .modal-body, .task-modal, .field textarea):focus-within::-webkit-scrollbar-thumb {
  background: var(--faint);
}

:where(.metrics-stage, .board-wrap, .lane-cards, .modal-body, .task-modal, .field textarea)::-webkit-scrollbar-thumb:hover {
  background: var(--faint);
}

@supports (-moz-appearance: none) {
  :where(.metrics-stage, .board-wrap, .lane-cards, .modal-body, .task-modal, .field textarea) {
    scrollbar-width: thin;
    scrollbar-color: var(--scroll-thumb) transparent;
  }

  :where(.metrics-stage, .board-wrap, .lane-cards, .modal-body, .task-modal, .field textarea):hover,
  :where(.metrics-stage, .board-wrap, .lane-cards, .modal-body, .task-modal, .field textarea):focus-within {
    scrollbar-color: var(--faint) transparent;
  }
}

@media (max-width: 1250px) {
  .hud { display: none; }
}

@media (max-width: 800px) {
  :root { --shell-pad: 18px; }
  .app-header { grid-template-columns: auto 1fr auto; gap: 16px; }
  .formwork-logo { width: 112px; }
  .brand-dots { display: none; }
  .boot-lockup .brand-dots { display: flex; }
  .boot-product-name { display: none; }
  .boot-stage {
    width: calc(100vw - 36px);
    min-height: 0;
    max-height: calc(100vh - 112px);
    grid-template-columns: 1fr;
    grid-template-rows: minmax(150px, .55fr) minmax(320px, 1fr);
  }
  .boot-art {
    padding: 22px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .boot-art strong {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    font-size: clamp(42px, 14vw, 72px);
    line-height: .82;
  }
  .boot-art strong span:last-child { align-self: auto; margin-right: 0; }
  .boot-art-index { display: none; }
  .boot-panel { padding: 34px 28px 64px; }
  .boot-panel h1 { font-size: clamp(32px, 10vw, 44px); }
  .boot-footnote { right: 28px; bottom: 25px; }
  .top-nav { justify-content: center; gap: 18px; }
  .score-item { padding: 14px 12px 12px; }
  .metric-header,
  .metric-row {
    grid-template-columns: minmax(124px, 1.35fr) repeat(4, minmax(36px, .45fr)) minmax(48px, .55fr) minmax(48px, .55fr) minmax(48px, .55fr) minmax(62px, .7fr) minmax(48px, .55fr) minmax(62px, .72fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
  .metric-row.active,
  .deliverable-card.active,
  .deliverable-card:hover,
  .v-runway .metric-row.active {
    transform: none;
  }
}
