:root {
  color-scheme: light;
  --paper: #f8f7f4;
  --surface: #fffefa;
  --ink: #171713;
  --on-ink: #fffdf6;
  --muted: #625f56;
  --navy: #1f335f;
  --gold: #baa169;
  --brass: #775e33;
  --line: #dfdcd4;
  --fine: #ebe8e1;
  --wash: #f1efe9;
  --focus: #2b4b81;
  --ready: #767d82;
  --progress: #4b6591;
  --blocked: #a6733c;
  --done: #527965;
  --connector: #718195;
  --connector-muted: #bdc2c3;
  --connector-active: #8d6b2d;
  --released-highlight: #d9e8ca;
  --radius: 8px;
  --display: "Bodoni Moda", Didot, "Bodoni MT", Georgia, serif;
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(16px, 4.15vw, 64px);
  font: 16px/1.5 var(--sans);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #111821;
  --surface: #18222f;
  --ink: #f4f1e9;
  --on-ink: #142030;
  --muted: #bbc4d0;
  --navy: #adc9f3;
  --gold: #cbb175;
  --brass: #dec18a;
  --line: #3d4b5e;
  --fine: #303d4f;
  --wash: #202c3b;
  --focus: #a9c9f4;
  --ready: #a7b1bb;
  --progress: #90b2e2;
  --blocked: #dbad6d;
  --done: #9bc7a9;
  --connector: #9aafc7;
  --connector-muted: #687e96;
  --connector-active: #dfc086;
  --released-highlight: #2b493c;
  --control-line: #6b7d93;
  --table-head: #1d2836;
  --table-hover: #233343;
  --blue-wash: #273c55;
  --gold-wash: #3e3224;
  --green-wash: #213b32;
  --error-ink: #ffc2b4;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 86px; scrollbar-gutter: stable; }
body { margin: 0; background: var(--paper); color: var(--ink); }
body:has(dialog[open]) { overflow: hidden; }
button, input, select, textarea { color: inherit; font: inherit; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
button, a { -webkit-tap-highlight-color: transparent; }
svg { display: block; }
.shell { min-height: 100vh; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 6;
  border-bottom: 1px solid var(--line);
  background: #faf9f6f5;
  backdrop-filter: blur(14px);
}
.site-header-inner {
  width: min(100%, 1536px);
  min-height: 68px;
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
}
.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}
.brandmark { width: 151px; height: auto; overflow: visible; }
.logo-accent { fill: var(--gold); }
.brand-context {
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 12px;
  white-space: nowrap;
  font-size: .75rem;
}
.main-nav { display: flex; gap: clamp(12px, 1.6vw, 27px); align-self: stretch; }
.main-nav button {
  position: relative;
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 1px 1px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: .875rem;
  white-space: nowrap;
}
.main-nav button span, .top-actions span[data-icon] { display: flex; }
.main-nav svg { width: 16px; height: 16px; }
.main-nav button:hover, .main-nav button[aria-current="page"] { color: var(--ink); }
.main-nav button[aria-current="page"] { font-weight: 650; }
.main-nav button[aria-current="page"]::after {
  position: absolute;
  content: "";
  inset: auto 0 -1px;
  height: 2px;
  background: var(--brass);
}
.top-actions { display: flex; justify-self: end; align-items: center; gap: 7px; }
.top-actions button, .primary, .quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 35px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: .84rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 150ms, border-color 150ms, color 150ms;
}
.top-actions svg { width: 16px; height: 16px; }
.top-actions .find-button { background: transparent; font-weight: 450; color: var(--muted); }
.top-actions .primary, .primary { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.top-actions .primary:hover, .primary:hover { background: var(--navy); border-color: var(--navy); }
.primary:disabled { background: var(--wash); border-color: var(--line); color: var(--muted); cursor: not-allowed; opacity: 1; }
.quiet:hover, .top-actions .find-button:hover { background: var(--wash); border-color: #c8c2b6; }
kbd { font: .69rem/1.25 var(--sans); color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 2px 4px; }
main { min-width: 0; }
.content { width: min(100%, 1536px); margin-inline: auto; padding: 0 var(--gutter) 32px; }
.intro {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 30px;
  min-height: 139px;
  padding: clamp(26px, 4.1vw, 56px) 0 24px;
  margin: 0;
}
.overview-intro { gap: clamp(20px, 6vw, 88px); padding-bottom: 29px; }
.intro h1 {
  margin: 0;
  font: 400 clamp(2.48rem, 4.3vw, 4.45rem)/1.02 var(--display);
  letter-spacing: -.055em;
}
.intro h1 em { font-weight: 400; }
.intro p { margin: 12px 0 0; color: var(--muted); font-size: .94rem; }
#intro-insight { flex: 0 1 245px; min-width: 165px; padding-bottom: 2px; }
.insight-head { display: flex; gap: 10px; justify-content: space-between; align-items: baseline; font-size: .82rem; color: var(--muted); }
.insight-head strong { color: var(--ink); font-weight: 550; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.insight-foot { display: block; color: var(--muted); font-size: .78rem; }
.insight-head + .progress-track { margin: 6px 0 7px; }
.progress-track { display: flex; gap: 1px; overflow: hidden; height: 5px; background: var(--fine); border-radius: 5px; }
.progress-track span { width: var(--share); }
.progress-track .done { background: var(--done); }
.progress-track .in_progress { background: var(--progress); }
.progress-track .ready { background: #c2c5c2; }
.progress-track .blocked { background: #bf9866; }

.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.metric {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr;
  align-items: center;
  gap: 8px 4px;
  min-width: 0;
  padding: 14px clamp(12px, 1.65vw, 24px) 15px;
  text-align: left;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  transition: background-color 150ms;
}
.metric:last-child { border-right: 0; }
.metric:hover { background: var(--wash); }
.metric:focus-visible { outline-offset: -3px; }
.metric-label { grid-row: 1; grid-column: 1; color: var(--muted); font-size: .82rem; font-weight: 550; }
.metric strong {
  grid-row: 2;
  grid-column: 1 / -1;
  color: var(--ink);
  font-size: clamp(1.65rem, 2.3vw, 2.3rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.06em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.metric-icon { color: var(--muted); display: inline-flex; flex: 0 0 auto; align-items: center; }
.metric > .metric-icon { grid-row: 1; grid-column: 2; }
.metric-icon svg { width: 16px; height: 16px; }
.metric-icon.in_progress { color: var(--progress); }
.metric-icon.blocked { color: var(--brass); }
.metric-icon.done { color: var(--done); }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; gap: 18px; }
.surface { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--fine);
}
.section-head h2, .streams-overview h2 {
  margin: 0;
  font: 400 1.59rem/1.12 var(--display);
  letter-spacing: -.035em;
}
.section-head p { margin: 5px 0 0; color: var(--muted); font-size: .84rem; }
.text-button {
  border: 0;
  padding: 3px 0;
  background: transparent;
  color: var(--navy);
  font-size: .82rem;
  font-weight: 650;
  text-align: left;
}
.text-button:hover, .task-name:hover { text-decoration: underline; text-underline-offset: 3px; color: var(--navy); }
.blockers-surface .section-head { box-shadow: inset 0 2px 0 var(--gold); border-radius: var(--radius) var(--radius) 0 0; }
.attention-list, .blocker-list { padding: 0; margin: 0; list-style: none; }
.attention-list > li { padding: 11px 18px; border-bottom: 1px solid var(--fine); }
.attention-list > li:last-child { border-bottom: 0; }
.queue-item, .blocker-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.queue-item > div { min-width: 0; }
.attention-list .task-name { font-size: .875rem; }
.queue-item time { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.blocker-list { margin-top: 5px; padding-left: 8px; border-left: 1px solid #c2a574; }
.blocker-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 1px 0; color: var(--muted); font-size: .78rem; }
.blocker-list .task-name { font-size: .8rem; font-weight: 500; }
.blocker-list li span { text-align: right; }
.activity-panel { margin-top: 21px; }
.empty { margin: 0; padding: 18px; color: var(--muted); font-size: .88rem; }

.streams-overview { margin-top: 26px; }
.streams-overview h2 { margin-bottom: 12px; }
.stream-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.stream-card {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 11px 2px 6px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  text-align: left;
  transition: border-color 150ms;
}
.stream-card:hover { border-top-color: var(--brass); }
.stream-card:hover strong { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.stream-label { display: flex; align-items: center; gap: 8px; font-size: .93rem; }
.stream-label strong { font-weight: 620; }
.stream-summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .8rem; }
.workspace-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .76rem;
}

.filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 13px 17px; border-bottom: 1px solid var(--fine); }
.filters select, .filters input {
  min-height: 36px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background-color: var(--surface);
  font-size: .87rem;
}
.filters > input { flex: 1; min-width: 145px; }
.table-scroll, .gantt-scroll { overflow: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: .875rem; }
.task-table { min-width: 660px; }
.time-table { min-width: 640px; }
thead { color: var(--muted); background: #f7f6f1; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--fine); vertical-align: middle; }
th { font-weight: 620; font-size: .8rem; white-space: nowrap; }
td:first-child, th:first-child { padding-left: 17px; }
td:last-child, th:last-child { padding-right: 17px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f9f8f4; }
td.title-cell { min-width: 225px; }
.task-label { display: flex; align-items: center; gap: 5px; padding-left: calc(var(--depth) * 14px); }
.task-name { border: 0; padding: 1px 0; background: transparent; text-align: left; text-decoration: none; font-size: inherit; font-weight: 610; color: var(--ink); }
.toggle, .group-toggle { border: 0; background: transparent; padding: 0; }
.toggle { display: grid; place-items: center; color: var(--muted); width: 17px; height: 21px; flex: 0 0 17px; }
.group-toggle { display: inline-flex; align-items: center; gap: 7px; font-weight: 650; }
.group-toggle svg, .toggle svg { width: 13px; height: 13px; transition: transform 140ms ease; }
.group-toggle[aria-expanded="true"] svg, .toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
.toggle:hover, .group-toggle:hover { color: var(--navy); }
.tree-spacer { flex: 0 0 17px; height: 1px; }
.subnote { display: block; color: var(--muted); font-size: .76rem; line-height: 1.4; margin-top: 2px; }
.stream-row td { background: #f1efe9; font-size: .83rem; }
.stream-row span { margin-left: 4px; color: var(--muted); font-size: .75rem; }
.owner { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; white-space: nowrap; }
.avatar { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; font-size: .58rem; font-weight: 700; }
.avatar.blue { background: #e7edf4; color: #2d476b; }
.avatar.gold { background: #f0e9db; color: #755826; }
.avatar.green { background: #e6ede6; color: #3e5d4c; }
.pill { display: inline-block; border-radius: 4px; padding: 2px 6px; font-size: .75rem; font-weight: 620; white-space: nowrap; }
.pill.ready { color: #545e61; background: #eef0ee; }
.pill.in_progress { color: #35527e; background: #e9eef5; }
.pill.blocked { color: #835720; background: #f5ebdb; }
.pill.done { color: #375c49; background: #e8f0e8; }
.when, .duration { white-space: nowrap; font-variant-numeric: tabular-nums; }

.chart-controls, .segmented { display: flex; gap: 7px; align-items: center; }
.segmented { gap: 2px; border: 1px solid var(--line); background: var(--wash); border-radius: 6px; padding: 2px; }
.segmented button { min-height: 29px; padding: 3px 9px; color: var(--muted); border: 1px solid transparent; border-radius: 4px; background: transparent; font-size: .83rem; }
.segmented button:hover { color: var(--ink); }
.segmented button[aria-pressed="true"] { color: var(--ink); background: var(--surface); border-color: var(--line); }
.dependencies-toggle[aria-pressed="true"] { color: var(--navy); background: #edf0f5; border-color: #d4dce8; }
.overlap-strip { display: flex; align-items: center; gap: 9px; padding: 8px 16px; background: #eff2ee; border-bottom: 1px solid #dfe6dd; font-size: .86rem; }
.overlap-icon { color: var(--done); }
.overlap-strip small { display: block; color: var(--muted); font-size: .75rem; }
.overlap-strip .text-button { margin-left: auto; flex: 0 0 auto; }
.gantt-grid { position: relative; }
.gantt-grid-row { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 44px; }
.gantt-label {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 0;
  padding: 7px 10px 7px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--fine);
  background: var(--surface);
  font-size: .85rem;
}
.gantt-label .task-name { display: block; }
.gantt-label .task-label > div { flex: 1 1 auto; min-width: 0; }
.trace-row-button { flex: 0 0 auto; margin-left: 4px; font-size: .74rem; }
.trace-row-button[aria-pressed="true"] { color: var(--brass); }
.gantt-head, .gantt-head .gantt-label { background: #f7f6f1; font-weight: 650; }
.gantt-group, .gantt-group .gantt-label { background: var(--wash); min-height: 33px; }
.gantt-group .subnote { display: inline; margin-left: 4px; }
.gantt-days { display: flex; color: var(--muted); font-size: .76rem; }
.gantt-days span { width: var(--span); border-right: 1px solid var(--fine); border-bottom: 1px solid var(--fine); padding: 9px 0; text-align: center; white-space: nowrap; }
.gantt-days .weekend { background: var(--wash); }
.gantt-lane { position: relative; border-bottom: 1px solid var(--fine); background: linear-gradient(to right, var(--fine) 1px, transparent 1px); background-size: var(--tick) 100%; }
.gantt-focused .gantt-label, .gantt-focused .gantt-lane { background-color: #ecf2e9; }
.trace-related .gantt-label, .trace-related .gantt-lane { background-color: #f6f0e5; }
.trace-root .gantt-label, .trace-root .gantt-lane { background-color: #eee2c9; }
.gantt-bar, .target-bar { position: absolute; left: var(--left); width: var(--width); }
.gantt-bar {
  z-index: 2;
  top: 12px;
  height: 17px;
  min-width: 8px;
  padding: 0;
  border: 1px solid #64717b;
  border-radius: 4px;
  background: #8997a0;
}
.gantt-bar.in_progress { background: #5875a1; border-color: #405e89; }
.gantt-bar.blocked { background: #c79b60; border-color: #a07742; }
.gantt-bar.done { background: #789e87; border-color: #537962; }
.gantt-bar:hover, .gantt-focused .gantt-bar { box-shadow: 0 0 0 2px #182e413b; }
.gantt-bar.uncertain { background-image: repeating-linear-gradient(130deg, transparent 0 5px, #fff7 6px 8px, transparent 9px 12px); }
.target-bar { top: 33px; height: 0; border-bottom: 2px dashed #6f7b83; }
.today-marker { position: absolute; inset: 0 auto 0 var(--left); width: 2px; background: #9c7a4b78; z-index: 1; }
.gantt-links { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.gantt-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; color: var(--muted); font-size: .8rem; }
.legend { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
.legend span { display: inline-flex; gap: 5px; align-items: center; white-space: nowrap; }
.dot { display: inline-block; flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--ready); }
.dot.in_progress { background: var(--progress); }
.dot.blocked { background: var(--blocked); }
.dot.done { background: var(--done); }
.legend-target { width: 15px; border-bottom: 2px dashed #6f7b83; }
.legend-proposed { width: 15px; height: 8px; border: 1px solid var(--brass); border-radius: 2px; background: #efdfbc; }
.gantt-compare .gantt-lane { min-height: 59px; }
.gantt-compare .target-bar { top: 51px; }
.gantt-proposed {
  position: absolute; z-index: 2; left: var(--left); width: var(--width); top: 33px; height: 13px;
  min-width: 7px; border: 1px solid var(--brass); border-radius: 4px; background: #ead8b1;
}
.gantt-dates-moving .gantt-proposed { animation: show-proposed 310ms cubic-bezier(.2,.75,.3,1) both; }
.gantt-proposed.uncertain { background: repeating-linear-gradient(130deg, #ead8b1 0 5px, #f6edd7 5px 8px); }
@keyframes show-proposed { from { left: var(--from-left); opacity: .35; } }

.trace-panel, .schedule-draft { margin: 14px 16px; border: 1px solid #ddd3bf; border-radius: var(--radius); background: #fcfaf4; }
.trace-panel { border-top: 2px solid var(--brass); }
.schedule-draft { border-top: 2px solid var(--navy); background: #f8f8f5; }
.trace-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.trace-header p { margin: 0 0 3px; color: var(--brass); font-size: .77rem; font-weight: 650; }
.trace-header h3 { margin: 0; color: var(--ink); font: 400 clamp(1.12rem, 2.5vw, 1.48rem)/1.2 var(--display); }
.trace-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 10px; }
.trace-actions .quiet { min-height: 30px; padding: 4px 8px; font-size: .79rem; }
.trace-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.trace-columns > div { min-width: 0; padding: 9px 14px; }
.trace-columns > div + div { border-left: 1px solid var(--fine); }
.trace-columns h4 { margin: 0 0 4px; color: var(--ink); font-size: .86rem; font-weight: 650; }
.trace-columns h4 span { margin-left: 4px; color: var(--muted); font-weight: 500; }
.trace-columns ul { list-style: none; margin: 0; padding: 0; }
.trace-columns li { display: flex; align-items: center; justify-content: space-between; gap: 7px; padding: 5px 0; font-size: .82rem; }
.trace-columns li + li { border-top: 1px solid var(--fine); }
.trace-columns small, .draft-table small { display: block; color: var(--muted); font-size: .72rem; }
.draft-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 7px 10px; padding: 10px 14px; }
.draft-controls label { display: grid; gap: 3px; min-width: 0; color: var(--muted); font-size: .78rem; }
.draft-controls input { min-width: 0; max-width: 100%; min-height: 35px; padding: 5px 7px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 5px; }
.draft-controls .subnote { align-self: center; }
.draft-summary { margin: 0; padding: 4px 14px 8px; color: var(--muted); font-size: .8rem; }
.draft-result .error { margin: 0 14px 7px; }
.draft-table { min-width: 540px; }
.draft-table th, .draft-table td { padding-inline: 12px; }

.time-totals { display: flex; flex-wrap: wrap; gap: 0; margin-bottom: 15px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.time-total { flex: 1 1 98px; padding: 11px clamp(9px, 1.35vw, 18px); border-right: 1px solid var(--fine); }
.time-total:last-child { border-right: 0; }
.time-total span { color: var(--muted); font-size: .82rem; }
.time-total strong { display: block; font-size: 1.42rem; font-weight: 540; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.time-week { margin-bottom: 15px; }
.date-field { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .81rem; }
.week-chart { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; padding: 10px 15px; }
.day-column { display: grid; justify-items: center; align-items: end; gap: 7px; padding: 7px 2px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); font-size: .77rem; white-space: nowrap; transition: background-color 150ms, border-color 150ms; }
.day-column:hover, .day-column[aria-pressed="true"] { background: #f0f1ee; border-color: #e0e4de; }
.day-column strong { color: var(--ink); font-size: .84rem; }
.day-track { position: relative; width: min(55%, 28px); height: 75px; overflow: hidden; border-radius: 4px; background: #edece7; }
.day-track span { position: absolute; inset: auto 0 0; height: var(--fraction); background: var(--navy); border-radius: inherit; }

dialog {
  width: min(100% - 24px, 510px);
  max-height: min(92vh, 850px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 14px 48px #1b19182e;
}
dialog::backdrop { background: #23201861; backdrop-filter: blur(2px); }
dialog[open] { animation: dialog-enter 170ms ease-out both; }
@keyframes dialog-enter { from { opacity: 0; transform: translateY(8px); } }
#task-dialog { width: min(100% - 16px, 570px); margin: 8px 8px 8px auto; height: calc(100% - 16px); max-height: none; }
#task-dialog[open] { animation-name: drawer-enter; }
@keyframes drawer-enter { from { opacity: 0; transform: translateX(18px); } }
dialog form { display: flex; flex-direction: column; height: 100%; }
.drawer-head, .drawer-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 13px 16px; background: var(--paper); }
.drawer-head { border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font: 400 1.75rem/1.13 var(--display); letter-spacing: -.035em; text-wrap: pretty; }
.drawer-head p { margin: 3px 0 0; color: var(--muted); font-size: .79rem; }
.drawer-foot { border-top: 1px solid var(--line); justify-content: flex-end; }
#task-dialog .drawer-foot { justify-content: space-between; flex-wrap: wrap; }
.task-footer-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 10px; }
.task-footer-actions:last-child { margin-left: auto; }
.drawer-content { display: grid; flex: 1 1 auto; align-content: start; gap: 13px; overflow-y: auto; padding: 16px; }
#task-blockers:empty, #task-activity:empty { display: none; }
.drawer-content label { display: grid; gap: 4px; font-weight: 620; font-size: .87rem; }
.drawer-content input, .drawer-content select, .drawer-content textarea {
  width: 100%;
  min-height: 36px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background-color: #fff;
  font-weight: 400;
}
.filters select, .drawer-content select {
  appearance: none;
  padding-right: 29px;
  background-image: linear-gradient(45deg, transparent 47%, var(--muted) 50% 63%, transparent 66%), linear-gradient(-45deg, transparent 47%, var(--muted) 50% 63%, transparent 66%);
  background-position: right 12px center, right 7px center;
  background-size: 5px 7px, 5px 7px;
  background-repeat: no-repeat;
}
.drawer-content textarea { resize: vertical; }
.optional { color: var(--muted); font-size: .74rem; font-weight: 400; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.icon-button { display: inline-grid; place-items: center; flex: 0 0 33px; width: 33px; height: 33px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.icon-button svg { width: 16px; height: 16px; }
.icon-button:hover { background: var(--wash); }
fieldset, .drawer-section { min-width: 0; padding: 7px 9px; margin: 0; border: 1px solid var(--line); border-radius: 6px; }
legend, .drawer-section summary { font-size: .86rem; font-weight: 650; }
.drawer-section summary { cursor: pointer; }
.drawer-section-body { display: grid; gap: 8px; padding-top: 7px; }
.task-details { padding: 0; background: var(--surface); }
.task-details > summary { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; padding: 9px 11px; list-style: none; }
.task-details > summary::-webkit-details-marker { display: none; }
.task-details-heading { display: inline-flex; align-items: center; gap: 8px; }
.task-details-heading::before {
  content: ""; width: 6px; height: 6px; border: solid var(--muted); border-width: 0 1.5px 1.5px 0;
  rotate: -45deg; transition: rotate 160ms;
}
.task-details[open] .task-details-heading::before { rotate: 45deg; }
.task-details-badges { display: flex; align-items: center; gap: 4px 8px; min-width: 0; flex-wrap: wrap; color: var(--muted); font-size: .73rem; font-weight: 500; }
#task-detail-milestone { display: inline-flex; align-items: center; gap: 5px; color: var(--brass); }
#task-detail-milestone .milestone-mark { width: 5px; height: 5px; }
.task-details .drawer-section-body { gap: 12px; padding: 11px; border-top: 1px solid var(--fine); }
.task-status-field { position: relative; display: block; min-width: 0; }
.task-status-field .dot { position: absolute; top: calc(50% - 3.5px); left: 10px; pointer-events: none; }
.task-status-field select { padding-left: 25px; }
.task-collaborators { border-top: 0; padding-top: 0; }
.collaborator-chips {
  display: flex; flex-wrap: wrap; gap: 5px; max-height: 75px; overflow: auto;
  list-style: none; margin: 0; padding: 2px;
}
.collaborator-chip {
  display: inline-flex; align-items: center; gap: 3px; max-width: 100%;
  border: 1px solid var(--fine); border-radius: 16px; padding: 2px 4px 2px 5px; background: var(--paper);
}
.collaborator-chip .owner, #collaborator-options .owner { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.collaborator-chip .avatar, #collaborator-options .avatar { flex: 0 0 auto; }
.collaborator-chip button { flex: 0 0 23px; min-height: 23px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); }
.collaborator-chip button:hover { background: var(--wash); color: var(--ink); }
.collaborator-chip button:focus-visible { outline-offset: -2px; }
.collaborator-chip button svg { width: 13px; height: 13px; }
#collaborator-options { max-height: 157px; }
#collaborator-options button { padding: 5px 8px; }
.rehearsal { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 13px; padding: 5px 10px 5px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.rehearsal p { margin: 0; font-size: .82rem; color: var(--muted); }
.plan-group-heading, .people-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.plan-group-heading .text-button { margin-right: 1px; }
.row-add-child { margin-left: auto; flex: 0 0 27px; min-height: 27px; display: grid; place-items: center; border-radius: 4px; }
.row-add-child:hover { background: var(--wash); }
.row-add-child svg { width: 15px; height: 15px; }
.task-dates { white-space: nowrap; font-variant-numeric: tabular-nums; }
#task-assignment-actions { display: flex; justify-content: flex-end; margin-top: -9px; }
#task-assignment-actions:has(button[hidden]) { display: none; }
.task-editor-section { display: grid; gap: 6px; min-width: 0; padding-top: 8px; border-top: 1px solid var(--fine); }
.task-editor-section h3 { margin: 0; font-size: .87rem; font-weight: 650; }
.task-editor-section p { margin: 0; }
.task-section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.task-picker { min-width: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.task-picker summary { cursor: pointer; padding: 6px 9px; font-size: .85rem; }
.task-picker[open] summary { border-bottom: 1px solid var(--fine); }
.task-picker-body { padding: 7px; }
.task-picker:not([open]) > .task-picker-body { display: none; }
.picker-results, .selected-prerequisites { margin: 0; padding: 0; list-style: none; }
.picker-results { margin-top: 4px; max-height: 200px; padding: 2px; overflow: auto; }
.picker-results > li.subnote { padding: 5px; }
.picker-results button { width: 100%; padding: 7px 8px; text-align: left; background: transparent; border: 0; border-radius: 4px; }
.picker-results button:not(:disabled):is(:hover, :focus-visible) { background: var(--wash); outline-offset: -2px; }
.picker-results button:disabled { opacity: .8; cursor: default; }
.picker-results strong, .selected-prerequisites strong { display: block; color: var(--ink); font-size: .84rem; font-weight: 620; }
.picker-results small, .selected-prerequisites small { display: block; color: var(--muted); font-size: .75rem; }
.picker-results .picker-reason { color: #853424; }
.selected-prerequisites:empty { display: none; }
.selected-prerequisites li { display: flex; align-items: center; justify-content: space-between; gap: 7px; padding: 5px 0; }
.task-editor-section input[aria-invalid="true"] { border-color: #b16a5b; }
.drawer-note { padding: 8px 10px; background: #f6eee1; color: #74511e; border-left: 2px solid var(--gold); font-size: .85rem; }
.drawer-note ul { margin: 3px 0 0; padding-left: 17px; }
.task-summary { background: #f3f2ed; border: 1px solid var(--fine); border-radius: 6px; padding: 9px 10px; }
.task-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.task-stats div > span:first-child { display: block; color: var(--muted); font-size: .76rem; }
.task-stats strong { font-size: .86rem; }
.task-shortcuts { display: flex; flex-wrap: wrap; gap: 5px 13px; margin-top: 7px; border-top: 1px solid var(--line); padding-top: 4px; }
.activity h3 { margin: 0 0 4px; font-size: .86rem; }
.activity ul { margin: 0; padding-left: 17px; color: var(--muted); font-size: .8rem; }
.error { background: #faece7; color: #853424; padding: 8px 11px; border-radius: 6px; margin: 0 0 12px; }
#search-dialog { margin-top: min(10vh, 92px); width: min(560px, 100% - 24px); }
.search-head { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-bottom: 1px solid var(--line); }
.search-head > span { color: var(--muted); }
.search-head input { flex: 1; min-width: 0; padding: 5px 3px; border: 0; background: transparent; }
.search-results { max-height: min(62vh, 480px); overflow-y: auto; padding: 6px; }
.search-result { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; width: 100%; padding: 7px; border: 1px solid transparent; border-radius: 5px; background: transparent; text-align: left; }
.search-result:hover, .search-result:focus-visible { background: var(--wash); border-color: var(--fine); }
.search-result strong, .search-result small { display: block; }
.search-result strong { font-size: .875rem; }
.search-result small, .result-icon { color: var(--muted); font-size: .77rem; }
#toast { position: fixed; right: 18px; bottom: 16px; z-index: 9; max-width: calc(100% - 36px); padding: 9px 13px; border-radius: 6px; background: var(--ink); color: var(--on-ink); font-size: .88rem; }
#toast a { color: inherit; margin-left: 6px; text-underline-offset: 3px; }
.preview:not(.rehearsing) #add-task, .preview:not(.rehearsing) .edit-only,
.preview #top-log, .preview #task-log, .preview #time-form [type=submit],
.preview [data-action=log-time], .preview [data-action=edit-time] { display: none !important; }

.signed-out .main-nav, .signed-out .top-actions { display: none; }
.view-only #add-task, .view-only #top-log, .view-only #task-log, .view-only .edit-only,
.view-only #task-form [type=submit], .view-only [data-action=log-time] { display: none; }
.account-button { width: 35px; padding: 0 !important; }
.account-button .avatar { width: 25px; height: 25px; font-size: .68rem; }
.signin-inner { width: min(392px, calc(100% - 40px)); margin: clamp(36px, 11vh, 116px) auto 64px; }
.signin-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 20px; }
.signin-inner h1 { margin: 0; font: 400 clamp(2.35rem, 5vw, 3.45rem)/1.07 var(--display); letter-spacing: -.05em; }
.theme-setting, .drawer-content .theme-setting { display: inline-flex; align-items: center; gap: 8px; justify-self: start; color: var(--muted); font-size: .8rem; font-weight: 620; }
.theme-setting select, .drawer-content .theme-setting select { width: auto; min-height: 34px; padding: 4px 26px 4px 8px; border: 1px solid var(--control-line, var(--line)); border-radius: 5px; background-color: var(--surface); color: var(--ink); }
.signin-head .theme-setting select { padding-right: 7px; }
.access-form { display: grid; gap: 12px; align-content: start; }
.access-form label { display: grid; gap: 4px; font-weight: 620; font-size: .875rem; }
.access-form input, .access-form select { min-height: 38px; min-width: 0; padding: 7px 9px; background-color: var(--surface); border: 1px solid var(--line); border-radius: 5px; font-weight: 400; }
.access-form .primary, .access-form .text-button { justify-self: start; }
.access-form p { margin: 0; }
#signin-form .primary { justify-self: stretch; margin-top: 2px; }
#account-details { display: grid; gap: 4px; }
#account-details span { color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
#account-error { margin-inline: 16px; }
#member-identity { font-size: .88rem; font-weight: 600; overflow-wrap: anywhere; }
#invite-result input { width: 100%; }

.metrics { border-radius: 0; border-inline: 0; background: transparent; }
.metric { grid-template-columns: 1fr; padding-block: 12px; }
.metric:first-child { padding-left: 3px; }
.metric strong { letter-spacing: -.045em; }
.metrics .metric:last-child .metric-label { grid-column: 1; }
.brief-section { min-width: 0; border-block: 1px solid var(--line); }
.brief-section > .section-head { padding-inline: 0; }
.brief-section .attention-list > li { padding-inline: 0; }
.queue-owner { color: var(--muted); font-size: .81rem; text-align: right; white-space: nowrap; }
.blocker-heading > strong { font-size: .875rem; font-weight: 600; }
.blocker-count { flex: 0 0 auto; color: var(--brass); font-size: .79rem; font-variant-numeric: tabular-nums; }
.affected-tasks { margin-top: 4px; color: var(--muted); font-size: .76rem; }
.affected-tasks summary { width: fit-content; cursor: pointer; }
.affected-tasks ul { margin: 3px 0 1px; padding-left: 16px; }
.affected-tasks .task-name { font-size: .8rem; font-weight: 500; }
.overview-summary { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(285px, 1fr); align-items: center; gap: clamp(18px, 3vw, 38px); margin-bottom: 20px; }
.overview-summary .metrics { margin-bottom: 0; }
.milestone-panel { min-width: 0; padding: 13px 15px 12px; border: 1px solid #e0d5bf; border-left: 3px solid var(--gold); border-radius: 6px; background: #f6f1e7; }
.milestone-panel header { display: flex; justify-content: space-between; gap: 6px 12px; align-items: center; }
.milestone-panel h2 { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--brass); font: 650 .77rem/1.4 var(--sans); }
.milestone-mark { display: inline-block; flex: 0 0 auto; width: 7px; height: 7px; margin-inline: 1px; background: var(--brass); transform: rotate(45deg); }
.milestone-title { margin-top: 2px; font: 400 clamp(1.2rem, 1.65vw, 1.6rem)/1.2 var(--display); letter-spacing: -.025em; }
.milestone-title .task-name { font-weight: 400; }
.milestone-panel dl { margin: 8px 0 0; display: flex; gap: 5px 16px; flex-wrap: wrap; }
.milestone-panel dl div { display: flex; gap: 5px; font-size: .79rem; }
.milestone-panel dt, .milestone-panel p span { color: var(--muted); }
.milestone-panel dd { margin: 0; font-weight: 580; }
.milestone-panel p { margin: 6px 0 0; font-size: .8rem; }
.milestone-blocker .task-name { font-weight: 590; }
.scope-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 9px; }
.scope-bar .subnote { margin: 0; }
.scope-switch { position: relative; isolation: isolate; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.scope-switch::before {
  content: ""; position: absolute; z-index: -1; inset: 2px auto 2px 2px;
  width: calc((100% - 6px) / 2); border: 1px solid var(--line); border-radius: 4px;
  background: var(--surface); transition: transform 210ms cubic-bezier(.2,.7,.3,1);
}
.scope-switch[data-scope="mine"]::before { transform: translateX(calc(100% + 2px)); }
.scope-switch button[aria-pressed="true"] { background: transparent; border-color: transparent; }
.scope-meta { display: flex; align-items: center; gap: 8px; }
.scope-meta:empty { display: none; }
.overview-work { display: flow-root; }
.week-preview { margin-top: 24px; }
.preview-controls { display: flex; flex-wrap: wrap; justify-content: end; align-items: center; gap: 6px 9px; }
.preview-controls .quiet { min-height: 31px; padding: 4px 8px; font-size: .78rem; }
.preview-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.preview-day { display: grid; align-content: start; gap: 1px; min-width: 0; min-height: 74px; padding: 8px 10px; border: 0; border-right: 1px solid var(--line); background: transparent; text-align: left; transition: background-color 150ms; }
.preview-day:last-child { border-right: 0; }
.preview-day:hover { background: var(--wash); }
.preview-day[aria-pressed="true"] { background: #f2ece0; box-shadow: inset 0 -2px var(--brass); }
.preview-day:focus-visible { outline-offset: -3px; }
.preview-day span, .preview-day small { color: var(--muted); font-size: .76rem; }
.preview-day strong { font-size: .91rem; font-weight: 630; }
.preview-tasks .milestone-mark { margin-right: 9px; }
.preview-tasks .subnote { margin-top: 1px; }
.stream-next { display: block; margin-top: 6px; color: var(--muted); font-size: .79rem; line-height: 1.35; }
.stream-next strong { color: var(--ink); font-weight: 590; }
.gantt-days .week-window { color: var(--ink); background: #eee4d0; }
.gantt-preview-band { position: absolute; left: var(--left); top: 0; width: var(--width); height: 100%; background: #eddbb427; pointer-events: none; }
.gantt-milestone { position: absolute; right: -4px; top: calc(50% - 4px); width: 7px; height: 7px; background: var(--brass); border: 1px solid var(--paper); transform: rotate(45deg); }
.drawer-content .milestone-option {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px;
  padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper);
}
.milestone-option-copy strong, .milestone-option-copy small { display: block; }
.milestone-option-copy strong { font-size: .84rem; }
.milestone-option-copy small { color: var(--muted); font-size: .75rem; font-weight: 400; }
.milestone-option input {
  appearance: none; display: grid; align-items: center; width: 35px; min-height: 0; height: 21px; margin: 0;
  padding: 2px; border: 1px solid #a19c90; border-radius: 20px; background: #efede6; cursor: pointer;
  transition: background-color 160ms, border-color 160ms;
}
.milestone-option input::after {
  content: ""; width: 15px; height: 15px; border-radius: 50%;
  background: white; box-shadow: 0 1px 2px #23201840; transition: transform 160ms;
}
.milestone-option input:checked { background: var(--brass); border-color: var(--brass); }
.milestone-option input:checked::after { transform: translateX(14px); }
.milestone-option input:disabled { opacity: .7; cursor: default; }
.people-layout { display: grid; gap: 25px; max-width: 1040px; }
.people-section { min-width: 0; border-block: 1px solid var(--line); }
.people-section .section-head { padding-inline: 0; }
.people-section .empty { padding-inline: 0; }
.task-contacts summary { cursor: pointer; padding: 13px 0; font-weight: 620; }
.task-contacts summary .subnote { margin-left: 5px; font-weight: 400; }
.task-contacts-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 0 0 9px; }
.task-contacts-header p { margin: 0; color: var(--muted); font-size: .83rem; }
.access-table { min-width: 520px; }
.access-table td, .access-table th { padding-inline: 10px; }
.access-table :is(td, th):first-child { padding-left: 0; }
.access-table td strong { font-size: .87rem; font-weight: 620; }
.access-table small, .access-events small { display: block; color: var(--muted); font-size: .79rem; overflow-wrap: anywhere; }
.access-table .access-action { white-space: nowrap; text-align: right; }
.member-person { display: flex; align-items: center; gap: 8px; }
.member-person .avatar { flex: 0 0 26px; width: 26px; height: 26px; }
.self-label { display: inline; margin-left: 4px; }
.membership-state { font-size: .79rem; color: var(--brass); }
.membership-state.active { color: var(--done); }
.access-events { list-style: none; margin: 0; padding: 0; }
.access-events li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--fine); font-size: .88rem; }
.access-events li:last-child { border-bottom: 0; }
.access-events time { color: var(--muted); font-size: .77rem; white-space: nowrap; }
.directory-state { color: var(--muted); }

[data-theme="dark"] .site-header { background: #111821f5; }
[data-theme="dark"] :is(.quiet, .top-actions .find-button):hover { border-color: var(--control-line); }
[data-theme="dark"] .progress-track .ready { background: var(--ready); }
[data-theme="dark"] .progress-track .blocked { background: var(--blocked); }
[data-theme="dark"] .blocker-list { border-color: var(--gold); }
[data-theme="dark"] :is(thead, .gantt-head, .gantt-head .gantt-label) { background: var(--table-head); }
[data-theme="dark"] tbody tr:hover { background: var(--table-hover); }
[data-theme="dark"] .stream-row td { background: var(--wash); }
[data-theme="dark"] :is(.avatar.blue, .pill.in_progress, .dependencies-toggle[aria-pressed="true"]) { background: var(--blue-wash); color: var(--navy); }
[data-theme="dark"] .dependencies-toggle[aria-pressed="true"] { border-color: var(--control-line); }
[data-theme="dark"] :is(.avatar.gold, .pill.blocked, .drawer-note) { background: var(--gold-wash); color: var(--brass); }
[data-theme="dark"] :is(.avatar.green, .pill.done) { background: var(--green-wash); color: var(--done); }
[data-theme="dark"] .pill.ready { background: var(--wash); color: var(--muted); }
[data-theme="dark"] .overlap-strip { background: var(--green-wash); border-color: var(--line); }
[data-theme="dark"] .gantt-focused :is(.gantt-label, .gantt-lane) { background-color: var(--green-wash); }
[data-theme="dark"] .trace-related :is(.gantt-label, .gantt-lane) { background-color: #312a23; }
[data-theme="dark"] .trace-root :is(.gantt-label, .gantt-lane) { background-color: var(--gold-wash); }
[data-theme="dark"] .gantt-bar { background-color: #8a99a9; border-color: #a8b8c8; }
[data-theme="dark"] .gantt-bar.in_progress { background-color: #7095c9; border-color: #a2bff0; }
[data-theme="dark"] .gantt-bar.blocked { background-color: #b68b55; border-color: #deb579; }
[data-theme="dark"] .gantt-bar.done { background-color: #75a48b; border-color: #9dcbb2; }
[data-theme="dark"] :is(.gantt-bar:hover, .gantt-focused .gantt-bar) { box-shadow: 0 0 0 2px var(--focus); }
[data-theme="dark"] :is(.target-bar, .legend-target) { border-color: var(--ready); }
[data-theme="dark"] .today-marker { background: var(--gold); }
[data-theme="dark"] :is(.legend-proposed, .gantt-proposed) { background: #887040; }
[data-theme="dark"] .gantt-proposed.uncertain { background: repeating-linear-gradient(130deg, #887040 0 5px, #55452d 5px 8px); }
[data-theme="dark"] :is(.trace-panel, .schedule-draft, .milestone-panel) { background: var(--gold-wash); border-color: var(--line); }
[data-theme="dark"] .schedule-draft { background: var(--surface); border-top-color: var(--navy); }
[data-theme="dark"] .milestone-panel { border-left-color: var(--gold); }
[data-theme="dark"] :is(.day-column:hover, .day-column[aria-pressed="true"], .day-track, .task-summary) { background: var(--wash); border-color: var(--line); }
[data-theme="dark"] dialog { box-shadow: 0 14px 48px #0007; }
[data-theme="dark"] dialog::backdrop { background: #070b13a8; }
[data-theme="dark"] :is(.drawer-content, .access-form) :is(input, select, textarea) { background-color: var(--paper); border-color: var(--control-line); }
[data-theme="dark"] :is(.picker-results .picker-reason, .error) { color: var(--error-ink); }
[data-theme="dark"] .task-editor-section input[aria-invalid="true"] { border-color: var(--error-ink); }
[data-theme="dark"] .error { background: #492e2b; }
[data-theme="dark"] :is(.preview-day[aria-pressed="true"], .gantt-days .week-window) { background: var(--gold-wash); }
[data-theme="dark"] .gantt-preview-band { background: #cbb17522; }
[data-theme="dark"] .milestone-option input { background: var(--wash); }
[data-theme="dark"] .milestone-option input:checked { background: var(--brass); }
[data-theme="dark"] .milestone-option input:checked::after { background: var(--on-ink); }

@media (max-width: 1350px) {
  .brand-context { display: none; }
  .site-header-inner { gap: 16px; }
}
@media (max-width: 1020px) {
  .site-header-inner { grid-template-columns: 1fr auto; gap: 0 14px; padding-top: 9px; }
  .main-nav { grid-column: 1 / -1; grid-row: 2; gap: 20px; min-height: 41px; }
  .top-actions { grid-column: 2; grid-row: 1; }
  html { scroll-padding-top: 100px; }
}
@media (max-width: 820px) {
  .intro { min-height: 116px; }
  .intro h1 { font-size: clamp(2.25rem, 5.6vw, 3.4rem); }
  .workspace-grid { gap: 12px; }
  .section-head { padding-inline: 13px; }
  .attention-list > li { padding-inline: 13px; }
  .overview-summary { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .milestone-title { font-size: 1.45rem; }
}
@media (max-width: 640px) {
  .site-header-inner { padding-top: 8px; }
  .brandmark { width: 128px; }
  .top-actions { gap: 5px; }
  .top-actions button { min-height: 33px; min-width: 33px; padding-inline: 7px; }
  .top-actions kbd { display: none; }
  .main-nav { gap: 0; justify-content: space-between; }
  .main-nav button { min-height: 39px; font-size: .81rem; gap: 5px; }
  .main-nav svg { width: 14px; height: 14px; }
  .top-actions .account-button { min-width: 33px; width: 33px; }
  .intro { padding: 28px 0 19px; }
  .overview-intro { display: grid; gap: 17px; }
  .intro h1 { font-size: clamp(2.23rem, 7.2vw, 3.05rem); }
  .intro p { margin-top: 8px; font-size: .86rem; }
  #intro-insight { min-width: 0; width: 100%; max-width: none; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 17px; }
  .metric { border-bottom: 1px solid var(--line); padding: 10px 12px; }
  .metric:first-child { padding-left: 12px; }
  .metric:nth-child(2n) { border-right: 0; }
  .metric:last-child { grid-column: 1 / -1; grid-template-columns: auto auto 1fr; grid-template-rows: auto; border-bottom: 0; gap: 8px; }
  .metric:last-child .metric-icon { grid-column: 1; }
  .metric:last-child .metric-label { grid-column: 2; }
  .metric:last-child strong { grid-column: 3; grid-row: 1; justify-self: end; font-size: 1.38rem; }
  .metrics .metric:last-child { grid-template-columns: 1fr auto; }
  .metrics .metric:last-child strong { grid-column: 2; }
  .workspace-grid, .stream-grid { grid-template-columns: minmax(0, 1fr); }
  .plan-group-heading { justify-content: flex-start; gap: 14px; }
  .task-table .task-label > div { min-width: 0; max-width: 205px; }
  .row-add-child { margin-left: 0; }
  .stream-grid { gap: 8px; }
  .streams-overview { margin-top: 20px; }
  .chart-heading { flex-wrap: wrap; }
  .gantt-grid-row { grid-template-columns: 164px minmax(0, 1fr); }
  .gantt-label { padding-left: 6px; }
  .gantt-label .task-label { padding-left: calc(var(--depth) * 7px); }
  .gantt-label .task-name { overflow-wrap: anywhere; }
  .gantt-label .task-label { flex-wrap: wrap; }
  .trace-row-button { margin-left: 0; }
  .trace-panel, .schedule-draft { margin-inline: 8px; }
  .trace-columns { grid-template-columns: minmax(0, 1fr); }
  .trace-columns > div + div { border-left: 0; border-top: 1px solid var(--fine); }
  .week-chart { gap: 3px; padding-inline: 6px; }
  .week-preview .section-head { flex-wrap: wrap; }
  .preview-controls { justify-content: start; }
  .preview-day { min-height: 66px; padding-inline: 3px; }
  .preview-day strong { font-size: .74rem; }
  .preview-day span, .preview-day small { font-size: .67rem; }
}
@media (max-width: 460px) {
  .top-actions .button-label { display: none; }
  .queue-item .owner { font-size: .75rem; }
  .main-nav svg { display: none; }
  .queue-owner { max-width: 36%; white-space: normal; font-size: .75rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
