
.brand-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}
.sortie-logo {
  display: inline-flex;
  align-items: baseline;
  color: #0f172a;
  font-family: "Avenir Next", Avenir, "Montserrat", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}
.sortie-logo .aero {
  color: #f05a28;
}
.top-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}
.top-nav a {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  background: #fbfcfe;
  color: var(--focus);
  font-size: 13px;
  text-decoration: none;
}
.top-nav a.active {
  color: #fff;
  border-color: var(--focus);
  background: var(--focus);
}
.theme-select {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 28px 5px 10px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
}
html[data-theme="ops"] {
  --bg: #eef1ed;
  --panel: #fffdf5;
  --ink: #263238;
  --muted: #59636a;
  --line: #bfc7bf;
  --strong: #111827;
  --due: #9f1d14;
  --soon: #8a4b0b;
  --watch: #245b78;
  --verify: #6a4b00;
  --ok: #286247;
  --focus: #405565;
}
html[data-theme="aero"] {
  --bg: #0f1720;
  --panel: #17212b;
  --ink: #e5edf5;
  --muted: #aab8c6;
  --line: #334454;
  --strong: #f8fbff;
  --due: #ff8a80;
  --soon: #ffbf69;
  --watch: #7db7ff;
  --verify: #f2d27c;
  --ok: #7dd3a8;
  --focus: #45b6c9;
}
html[data-theme] body,
html[data-theme] html { background: var(--bg); color: var(--ink); }
html[data-theme] header,
html[data-theme] .panel,
html[data-theme] .metric,
html[data-theme] .card,
html[data-theme] .table-panel,
html[data-theme] .chart-wrap,
html[data-theme] .details,
html[data-theme] .reference-box,
html[data-theme] .field input,
html[data-theme] .field select,
html[data-theme] input,
html[data-theme] select,
html[data-theme] table,
html[data-theme] th {
  background: var(--panel);
  color: var(--ink);
}
html[data-theme] .top-nav a,
html[data-theme] .badge,
html[data-theme] .pill,
html[data-theme] .fuel-signal,
html[data-theme] .activity-flags span,
html[data-theme] .expand-icon {
  background: var(--panel);
}
html[data-theme] .top-nav a.active {
  color: #fff;
  border-color: var(--focus);
  background: var(--focus);
}
html[data-theme="ops"] body { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
html[data-theme="ops"] h1,
html[data-theme="ops"] h2,
html[data-theme="ops"] h3 { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
html[data-theme="ops"] .panel,
html[data-theme="ops"] .metric,
html[data-theme="ops"] .card,
html[data-theme="ops"] .field input,
html[data-theme="ops"] .field select {
  border-radius: 3px;
}
html[data-theme="ops"] .top-nav a,
html[data-theme="ops"] .theme-select,
html[data-theme="ops"] .badge,
html[data-theme="ops"] .pill,
html[data-theme="ops"] .fuel-signal {
  border-radius: 3px;
}
html[data-theme="aero"] body,
html[data-theme="aero"] header,
html[data-theme="aero"] .app {
  background: var(--bg);
}
html[data-theme="aero"] a,
html[data-theme="aero"] .top-nav a,
html[data-theme="aero"] .theme-select,
html[data-theme="aero"] .sortie-logo {
  color: var(--focus);
}
html[data-theme="aero"] .sortie-logo .aero {
  color: #ff9a62;
}
html[data-theme="aero"] .top-nav a.active {
  color: #061017;
}
html[data-theme="aero"] .subtitle,
html[data-theme="aero"] p,
html[data-theme="aero"] .muted,
html[data-theme="aero"] .note,
html[data-theme="aero"] .detail,
html[data-theme="aero"] .section-head span,
html[data-theme="aero"] .table-head span {
  color: var(--muted);
}
html[data-theme="aero"] .card,
html[data-theme="aero"] .metric,
html[data-theme="aero"] .notice,
html[data-theme="aero"] .reference-box,
html[data-theme="aero"] .chart-wrap {
  box-shadow: 0 0 0 1px rgba(69, 182, 201, 0.08);
}

:root {
  --bg: #f5f7fa;
  --panel: #ffffff;
  --ink: #18212d;
  --muted: #64748b;
  --line: #d8e0e8;
  --strong: #0f172a;
  --due: #b42318;
  --soon: #b54708;
  --watch: #175cd3;
  --verify: #7a4a00;
  --ok: #067647;
  --focus: #0b7285;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--focus); text-decoration: none; }
header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 28px 18px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
h1 {
  margin: 0 0 6px;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.08;
  color: var(--strong);
  letter-spacing: 0;
}
p { margin: 0; color: var(--muted); line-height: 1.45; max-width: 900px; }
main {
  padding: 16px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
}
.sidebar {
  align-self: start;
  position: sticky;
  top: 16px;
  padding: 16px;
}
h2 { margin: 0 0 12px; font-size: 18px; color: var(--strong); }
h3 { margin: 0; font-size: 17px; color: var(--strong); }
.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfe;
}
.metric strong { display: block; font-size: 24px; color: var(--strong); line-height: 1; margin-bottom: 6px; }
.metric span { color: var(--muted); font-size: 12px; }
.assumptions {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.assumptions b { color: var(--ink); }
.content {
  display: grid;
  gap: 16px;
}
.section {
  overflow: hidden;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.section-head span {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.cards {
  display: grid;
  gap: 10px;
  padding: 12px;
}
.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}
.card-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.card-toggle:focus-visible {
  outline: 3px solid rgba(11, 114, 133, 0.22);
  outline-offset: 4px;
  border-radius: 6px;
}
.card-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.card-summary strong {
  display: block;
  color: var(--strong);
  line-height: 1.3;
}
.card-summary small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.expand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--focus);
  background: #fbfcfe;
  font-weight: 700;
}
.card.open .expand-icon { transform: rotate(45deg); }
.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  color: var(--muted);
  background: #fbfcfe;
  font-size: 12px;
  white-space: nowrap;
}
.badge.due { color: var(--due); border-color: #efb5ae; background: #fff5f3; }
.badge.soon { color: var(--soon); border-color: #f5c28f; background: #fff8ed; }
.badge.watch { color: var(--watch); border-color: #b8cdf7; background: #f2f6ff; }
.badge.verify { color: var(--verify); border-color: #e5c987; background: #fff9e8; }
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.card-body {
  display: none;
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.card.open .card-body { display: block; }
.extract-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 14px 0;
  border: 1px solid var(--focus);
  border-radius: 8px;
  padding: 9px 10px;
  color: #fff;
  background: var(--focus);
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
}
.workpack-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
.workpack-panel {
  border: 1px solid #b8cdf7;
  border-radius: 8px;
  padding: 12px;
  background: #f2f6ff;
  margin-top: 14px;
}
.workpack-panel strong {
  display: block;
  color: var(--strong);
  margin-bottom: 5px;
}
.workpack-panel span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
.detail {
  display: grid;
  grid-template-columns: 106px minmax(0, 1fr);
  gap: 6px 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.detail b { color: var(--muted); font-weight: 550; }
.detail span { color: var(--ink); overflow-wrap: anywhere; }
.note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
.planning-basis {
  padding: 16px;
  margin-bottom: 16px;
}
.planning-basis .metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.planning-basis .assumptions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.plan-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
  gap: 16px;
  align-items: start;
}
.board-column {
  overflow: hidden;
}
.board-column.work-plan {
  border-color: #b8cdf7;
  background: #fbfdff;
}
.work-lanes {
  display: grid;
  gap: 12px;
  padding: 12px;
}
.drop-zone {
  min-height: 140px;
  padding: 10px;
  display: grid;
  gap: 10px;
  align-content: start;
}
.lane {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.lane-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}
.lane-head strong {
  color: var(--strong);
}
.lane-head span {
  color: var(--muted);
  font-size: 12px;
}
.bucket-immediate { border-color: #efb5ae; background: #fffafa; }
.bucket-immediate > .lane-head,
.bucket-immediate.group-head-wrap { background: #fff5f3; }
.bucket-50 { border-color: #f5c28f; background: #fffdf8; }
.bucket-50 > .lane-head,
.bucket-50.group-head-wrap { background: #fff8ed; }
.bucket-annual { border-color: #b8cdf7; background: #fbfdff; }
.bucket-annual > .lane-head,
.bucket-annual.group-head-wrap { background: #f2f6ff; }
.bucket-forward { border-color: #c7b9ea; background: #fdfcff; }
.bucket-forward > .lane-head,
.bucket-forward.group-head-wrap { background: #f7f3ff; }
.drop-zone.drag-over {
  outline: 3px solid rgba(11, 114, 133, 0.2);
  outline-offset: -6px;
  background: #eefbfc;
}
.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 20px;
  color: var(--muted);
  text-align: center;
  background: #fff;
}
.backlog-group {
  display: grid;
  gap: 10px;
}
.backlog-group + .backlog-group {
  margin-top: 16px;
}
.group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 2px 0;
}
.group-head-wrap {
  border: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
  padding: 8px 10px;
}
.group-head-wrap + .group-note {
  margin: 6px 10px 8px;
}
.backlog-group .drop-zone {
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 8px 8px;
}
.group-head h4 {
  margin: 0;
  color: var(--strong);
  font-size: 15px;
}
.group-head span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.group-note {
  margin: -4px 2px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.card {
  cursor: grab;
  border-left-width: 5px;
}
.card.bucket-immediate { border-left-color: var(--due); }
.card.bucket-50 { border-left-color: var(--soon); }
.card.bucket-annual { border-left-color: var(--watch); }
.card.bucket-forward { border-left-color: #7c3aed; }
.card.dragging {
  opacity: 0.55;
}
.card-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 10px;
}
.move-button {
  border: 1px solid var(--focus);
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  background: var(--focus);
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}
.move-button.secondary {
  color: var(--focus);
  background: #fbfcfe;
}
@media (max-width: 880px) {
  header { display: block; padding: 18px 16px; }
  main { padding: 10px; }
  .sidebar { position: static; }
  .planning-basis .metric-grid,
  .planning-basis .assumptions,
  .plan-board { grid-template-columns: 1fr; }
}
