/* ============================================================
   Apollo Energy Group — 90-Day Gantt
   Brand palette pulled from the Apollo "A" logo
   ============================================================ */
:root {
  --ink:      #0a2540;
  --ink-2:    #1a3a5c;
  --ink-3:    #5a7591;
  --steel:    #1259a8;
  --teal:     #0f8db0;
  --cyan:     #14c0d4;
  --aqua:     #4cd0c8;
  --green:    #4eb52e;
  --lime:     #8fcf4d;
  --paper:    #f3f4f1;
  --paper-2:  #e6e8e2;
  --card:     #ffffff;
  --line:     rgba(10,37,64,0.13);
  --line-2:   rgba(10,37,64,0.22);
  --shade:    rgba(10,37,64,0.05);
  --warn:     #d97a3a;
  --rose:     #c4536b;
  --gold:     #d6a83a;

  --gradient: linear-gradient(90deg,#0e4f8e 0%,#14c0d4 48%,#4eb52e 100%);
  --gradient-soft: linear-gradient(90deg,rgba(14,79,142,.20) 0%,rgba(20,192,212,.20) 50%,rgba(78,181,46,.20) 100%);
  --gradient-vert: linear-gradient(180deg,#0e4f8e 0%,#14c0d4 50%,#4eb52e 100%);

  --shadow-1: 0 1px 2px rgba(10,37,64,.08), 0 2px 6px rgba(10,37,64,.05);
  --shadow-2: 0 4px 14px rgba(10,37,64,.12), 0 2px 4px rgba(10,37,64,.06);
  --shadow-3: 0 24px 60px -20px rgba(10,37,64,.32), 0 8px 18px -8px rgba(10,37,64,.22);

  --radius-s: 4px;
  --radius:   8px;
  --radius-l: 14px;

  --row-h: 38px;
  --grp-h: 32px;
  --col-w: 300px;
  --side-w: 0px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: "Inter Tight","Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-feature-settings: "ss01","cv11","tnum";
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: transparent; }
input, select, textarea { outline: none; }

/* ---------- App shell ---------- */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1100px 600px at 100% -10%, rgba(20,192,212,.10), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(78,181,46,.10), transparent 55%),
    var(--paper);
}

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 40;
  display: grid;
  grid-template-columns: minmax(240px,auto) 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px 22px 12px;
  background: rgba(243,244,241,.88);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand-meta { white-space: nowrap; }
.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: inherit;
}
.brand-mark {
  width: 56px; height: 40px;
  background: url("apollo-logo.jpg") center/contain no-repeat;
  filter: drop-shadow(0 1px 2px rgba(14,46,77,.18));
}
.brand-meta { line-height: 1.05; }
.brand-meta .eyebrow {
  font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
}
.brand-meta .title { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }

.head-mid {
  display: flex; align-items: baseline; gap: 14px;
  justify-content: center;
}
.doc-title {
  font-family: "Fraunces","Source Serif Pro",Georgia,serif;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.015em;
}
.doc-sub {
  font-size: 12px; color: var(--ink-3);
  font-feature-settings: "tnum";
}
.doc-sub b { color: var(--ink); font-weight: 600; }
.gradient-rule {
  height: 3px; border-radius: 2px;
  background: var(--gradient);
}

.head-right { display: flex; align-items: center; gap: 8px; }

/* ---------- Toolbar ---------- */
.toolbar {
  position: sticky; top: 67px; z-index: 35;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 10px 22px;
  background: rgba(243,244,241,.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.toolbar > * { flex-shrink: 0; }
.tb-group {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 6px 4px 4px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-1);
}
.tb-label {
  font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
  padding: 0 8px 0 8px;
  white-space: nowrap;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px;
  font-size: 12px; font-weight: 500;
  color: var(--ink-2);
  background: var(--paper-2);
  border-radius: 999px;
  transition: all .15s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.chip:hover { background: #e3e1d6; color: var(--ink); }
.chip.is-on {
  background: var(--ink);
  color: #f6f4ee;
  border-color: var(--ink);
}
.chip.is-on .x { opacity: .8; }
.chip .x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; border-radius: 50%;
  font-size: 10px; line-height: 1;
  background: rgba(255,255,255,.18);
}

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px;
  font-size: 12px; font-weight: 600; color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-1);
  transition: all .15s ease;
  white-space: nowrap;
}
.btn:hover { border-color: var(--line-2); background: #fff; transform: translateY(-1px); }
.btn.primary {
  color: #fff; border-color: transparent;
  background: var(--gradient);
  background-size: 140% 100%;
  background-position: 0 0;
}
.btn.primary:hover { background-position: 100% 0; }
.btn.ghost { background: transparent; box-shadow: none; }
.btn .icon { width: 14px; height: 14px; display: inline-block; }

.search {
  display: flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 10px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 8px; box-shadow: var(--shadow-1);
  width: 220px;
}
.search input { flex: 1; border: 0; background: transparent; font-size: 12px; }
.search .icon { color: var(--ink-3); }

.tb-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.seg {
  display: inline-flex;
  background: var(--paper-2);
  border-radius: 8px;
  padding: 3px;
  border: 1px solid var(--line);
}
.seg button {
  height: 24px; padding: 0 10px;
  font-size: 11.5px; font-weight: 600; color: var(--ink-3);
  border-radius: 6px;
  letter-spacing: .02em;
  white-space: nowrap;
}
.seg button.is-on {
  color: var(--ink);
  background: var(--card);
  box-shadow: var(--shadow-1);
}

/* ---------- Stats strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  padding: 14px 22px 0;
}
.stat {
  position: relative;
  padding: 12px 14px 12px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.stat::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--gradient-vert);
  opacity: .9;
}
.stat .k {
  font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
}
.stat .v {
  font-size: 24px; font-weight: 600; letter-spacing: -0.02em;
  font-feature-settings: "tnum"; line-height: 1.1; margin-top: 2px;
}
.stat .v small { font-size: 12px; color: var(--ink-3); font-weight: 500; margin-left: 4px; }
.stat .bar {
  margin-top: 8px; height: 4px; border-radius: 2px;
  background: var(--paper-2); overflow: hidden;
}
.stat .bar i {
  display: block; height: 100%;
  background: var(--gradient);
}

/* ---------- Main grid: pivot table + timeline ---------- */
.workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 14px 22px 22px;
}
.gantt-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-2);
  overflow: hidden;
  position: relative;
}
.gantt {
  display: grid;
  grid-template-columns: var(--col-w) var(--side-w) minmax(0, 1fr);
  position: relative;
}
.gantt.no-side { grid-template-columns: var(--col-w) 1fr; }
.gantt-side {
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfaf6 0%, #ffffff 60%);
  min-width: 0;
}
.gantt-fields {
  border-right: 1px solid var(--line);
  background: #fdfcf8;
  min-width: 0;
}
.gantt-tl {
  background:
    repeating-linear-gradient(90deg, transparent 0, transparent calc(var(--cell-w) - 1px), rgba(10,37,64,0.06) calc(var(--cell-w) - 1px), rgba(10,37,64,0.06) var(--cell-w));
  position: relative; min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
}
.gantt-tl::-webkit-scrollbar { height: 10px; }
.gantt-tl::-webkit-scrollbar-track { background: var(--paper-2); }
.gantt-tl::-webkit-scrollbar-thumb { background: rgba(10,37,64,.25); border-radius: 6px; }
.gantt-tl::-webkit-scrollbar-thumb:hover { background: rgba(10,37,64,.4); }

/* Header row */
.row-head {
  display: flex; align-items: center;
  height: 56px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(246,244,238,.6);
  font-size: 10.5px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-3);
  position: sticky; top: 0; z-index: 5;
}

.tl-axis {
  position: sticky; top: 0; z-index: 5;
  height: 56px;
  background: linear-gradient(180deg, #fbfaf6, #fff);
  border-bottom: 1px solid var(--line);
}
.tl-weeks { display: flex; height: 26px; border-bottom: 1px dashed var(--line); }
.tl-week {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
  border-right: 1px solid var(--line);
}
.tl-days { display: flex; height: 30px; }
.tl-day {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--ink-2);
  border-right: 1px dashed rgba(14,46,77,.07);
  font-feature-settings: "tnum";
}
.tl-day.is-mon { background: rgba(14,46,77,.025); }
.tl-day.is-today { background: rgba(20,192,212,.20); color: var(--ink); font-weight: 700; }
.tl-day .dnum { font-weight: 600; font-size: 12px; }
.tl-day .dlbl { font-size: 9px; color: var(--ink-3); margin-left: 3px; letter-spacing: .04em; }

/* Body */
.body { position: relative; }

.group-row {
  display: flex; align-items: center;
  height: var(--grp-h);
  padding: 0 8px 0 14px;
  background: linear-gradient(180deg, #eef0ea, #e6e8e2);
  border-top: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line);
  font-size: 11px; font-weight: 700;
  letter-spacing: .04em;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
}
.group-row .caret {
  width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center;
  margin-right: 4px; transition: transform .18s ease;
}
.group-row.is-collapsed .caret { transform: rotate(-90deg); }
.group-row .swatch {
  width: 10px; height: 10px; border-radius: 3px; margin-right: 8px;
  background: var(--gradient);
}
.group-row .gname { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 13.5px; letter-spacing: -0.01em; }
.group-row .gcount { color: var(--ink-3); margin-left: 8px; font-weight: 500; font-size: 11px; }
.group-row .gactions { margin-left: auto; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.group-row:hover .gactions { opacity: 1; }
.group-row .gicon { padding: 4px; border-radius: 4px; color: var(--ink-3); }
.group-row .gicon:hover { background: rgba(14,46,77,.08); color: var(--ink); }

.task-row {
  display: flex; align-items: center;
  height: var(--row-h);
  padding: 0 8px 0 14px;
  border-bottom: 1px solid var(--shade);
  position: relative;
  transition: background .12s ease;
}
.task-row:hover { background: rgba(45,201,214,.06); }
.task-row.is-selected { background: rgba(45,201,214,.10); }
.task-row.is-selected::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px;
  background: var(--gradient-vert); border-radius: 2px;
}
.task-row .checkbox {
  width: 14px; height: 14px; border-radius: 3px;
  border: 1.5px solid var(--ink-3);
  display: inline-flex; align-items: center; justify-content: center;
  margin-right: 8px;
  flex: 0 0 14px;
}
.task-row.is-checked .checkbox {
  background: var(--gradient); border-color: transparent;
  color: #fff;
}
.task-row .grip {
  width: 10px; opacity: 0; color: var(--ink-3); cursor: grab;
  font-size: 11px; line-height: 1; margin-right: 4px;
  flex: 0 0 10px;
}
.task-row:hover .grip { opacity: 1; }
.task-row .tname {
  flex: 1; font-size: 13px; font-weight: 500; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: -0.005em;
}
.task-row .tname input {
  width: 100%; border: 0; padding: 4px 6px; border-radius: 4px;
  background: var(--paper); font-size: 13px; font-weight: 500;
}
.task-row .meta {
  display: flex; align-items: center; gap: 6px;
  margin-left: auto;
  font-size: 11px; color: var(--ink-3);
}
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  height: 18px; padding: 0 7px;
  font-size: 10px; font-weight: 600; letter-spacing: .04em;
  border-radius: 999px;
  background: var(--paper-2); color: var(--ink-2);
  white-space: nowrap;
}
.tag.dot::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan);
}
.tag.s-plan::before    { background: #8aa8c4; }
.tag.s-build::before   { background: var(--steel); }
.tag.s-engage::before  { background: var(--cyan); }
.tag.s-convert::before { background: var(--green); }
.tag.s-blocked::before { background: var(--rose); }
.tag.s-done::before    { background: var(--green); }

.fields-head, .fields-row {
  display: grid;
  grid-template-columns: var(--fields-cols);
  align-items: center;
  gap: 0;
}
.fields-head {
  height: 56px;
  border-bottom: 1px solid var(--line);
  background: rgba(246,244,238,.6);
  position: sticky; top: 0; z-index: 5;
}
.fld-h {
  padding: 0 12px;
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
  display: flex; align-items: center; gap: 4px;
  border-right: 1px solid var(--shade);
  height: 100%;
  cursor: pointer; user-select: none;
}
.fld-h:hover { color: var(--ink); background: rgba(14,46,77,.03); }
.fld-h .sort { font-size: 9px; opacity: .6; }
.fields-row {
  height: var(--row-h);
  border-bottom: 1px solid var(--shade);
}
.fld {
  padding: 0 12px; font-size: 12px; color: var(--ink-2);
  border-right: 1px solid var(--shade);
  height: 100%;
  display: flex; align-items: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fld.editable:hover { background: rgba(45,201,214,.06); cursor: text; }
.fld input, .fld select {
  width: 100%; height: 26px;
  border: 1px solid var(--line); border-radius: 4px;
  background: #fff; padding: 0 6px; font-size: 12px;
}
.fld .pill {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px; font-size: 11px; font-weight: 600;
  border-radius: 999px;
  background: var(--paper-2); color: var(--ink-2);
}
.fld .avatar {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--gradient);
  color: #fff; font-size: 10px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  margin-right: 6px; letter-spacing: -.02em;
}
.fld .nbr { font-feature-settings: "tnum"; font-weight: 600; color: var(--ink); }
.progress-mini {
  display: flex; align-items: center; gap: 8px;
  width: 100%;
}
.progress-mini .track {
  flex: 1; height: 6px; border-radius: 3px;
  background: var(--paper-2); overflow: hidden;
}
.progress-mini .track i {
  display: block; height: 100%; background: var(--gradient);
  transition: width .25s ease;
}
.progress-mini .pct { font-size: 11px; font-weight: 600; color: var(--ink); font-feature-settings: "tnum"; min-width: 30px; text-align: right; }

/* Timeline body */
.tl-body { position: relative; }
.tl-row {
  position: relative;
  height: var(--row-h);
  border-bottom: 1px solid var(--shade);
}
.tl-row.is-grp {
  height: var(--grp-h);
  background: linear-gradient(180deg,#eef0ea,#e6e8e2);
  border-top: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line);
}
.tl-row.is-grp .grp-summary {
  position: absolute; top: 50%; transform: translateY(-50%);
  height: 8px; border-radius: 4px;
  background: linear-gradient(90deg, rgba(28,93,142,.35), rgba(45,201,214,.35), rgba(108,194,74,.35));
  border: 1px dashed rgba(14,46,77,.25);
}
.tl-today {
  position: absolute; top: 0; bottom: 0;
  width: 0; border-left: 2px solid var(--rose);
  z-index: 4; pointer-events: none;
}
.tl-today::before {
  content: "TODAY";
  position: absolute; top: 4px; left: 4px;
  font-size: 9px; font-weight: 700; letter-spacing: .14em;
  color: var(--rose);
  background: rgba(196,83,107,.10);
  padding: 1px 5px; border-radius: 3px;
}
.tl-week-band {
  position: absolute; top: 0; bottom: 0;
  background: rgba(14,46,77,0.018);
  z-index: 0;
}

.bar {
  position: absolute;
  top: 5px; bottom: 5px;
  background: var(--gradient);
  border-radius: 5px;
  display: flex; align-items: center;
  padding: 0 10px;
  color: #fff;
  font-size: 11.5px; font-weight: 600;
  letter-spacing: -0.005em;
  box-shadow: 0 2px 6px rgba(14,79,142,.30), inset 0 1px 0 rgba(255,255,255,.35), inset 0 -1px 0 rgba(0,0,0,.08);
  cursor: grab;
  user-select: none;
  overflow: hidden;
  transition: box-shadow .15s ease, transform .15s ease;
  z-index: 2;
}
.bar:hover { box-shadow: 0 6px 16px rgba(28,93,142,.32), inset 0 1px 0 rgba(255,255,255,.35); transform: translateY(-1px); }
.bar.is-selected { outline: 2px solid var(--ink); outline-offset: 1px; z-index: 3; }
.bar.dragging { cursor: grabbing; opacity: .92; transform: rotate(.2deg); }
.bar .progress-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,0));
  pointer-events: none;
}
.bar .label { position: relative; z-index: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.bar .meta-inline { position: relative; z-index: 1; font-size: 10px; opacity: .85; margin-left: 8px; }
.bar .handle {
  position: absolute; top: 0; bottom: 0; width: 8px;
  cursor: ew-resize;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.45));
  opacity: 0; transition: opacity .12s;
}
.bar .handle.l { left: 0; background: linear-gradient(90deg, rgba(255,255,255,.45), transparent); }
.bar .handle.r { right: 0; }
.bar:hover .handle { opacity: 1; }

.bar.s-plan    { background: linear-gradient(90deg,#5b7d9e,#8aa6c0); }
.bar.s-build   { background: linear-gradient(90deg,#0e4f8e,#14c0d4); }
.bar.s-engage  { background: linear-gradient(90deg,#0e4f8e,#14c0d4,#4eb52e); }
.bar.s-convert { background: linear-gradient(90deg,#14c0d4,#4eb52e); }
.bar.s-blocked { background: linear-gradient(90deg,#7a2e44,#c4435c); }
.bar.s-done    { background: linear-gradient(90deg,#3e8a26,#8fcf4d); opacity: .9; }

.milestone {
  position: absolute; top: 50%;
  transform: translate(-50%,-50%) rotate(45deg);
  width: 16px; height: 16px;
  background: var(--gradient);
  border: 2px solid #fff;
  box-shadow: var(--shadow-1);
  z-index: 3;
}
.milestone.is-selected { outline: 2px solid var(--ink); outline-offset: 1px; }

.dep-line {
  position: absolute; pointer-events: none; z-index: 1;
}
.dep-line svg { display: block; overflow: visible; }
.dep-line path {
  stroke: rgba(10,37,64,.55);
  stroke-width: 1.5; fill: none;
  stroke-dasharray: 3 3;
}

/* ---------- Add row ---------- */
.add-row {
  display: flex; align-items: center; gap: 8px;
  height: 34px;
  padding: 0 14px;
  font-size: 12px; color: var(--ink-3); font-weight: 500;
  cursor: pointer;
}
.add-row:hover { color: var(--ink); background: rgba(45,201,214,.06); }
.add-row .plus {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--paper-2); color: var(--ink-2);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; line-height: 1;
}

/* ---------- Detail Drawer ---------- */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 460px; max-width: 92vw;
  background: #fff;
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-3);
  z-index: 60;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s cubic-bezier(.6,.0,.2,1);
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg,#fbfaf6,#fff);
}
.drawer-head .swatch {
  width: 8px; height: 36px; border-radius: 3px;
  background: var(--gradient-vert);
}
.drawer-head h3 {
  margin: 0; font-family: "Fraunces", Georgia, serif;
  font-size: 18px; font-weight: 600; letter-spacing: -.01em;
  flex: 1; line-height: 1.2;
}
.drawer-body { flex: 1; overflow: auto; padding: 18px; }
.drawer-body label { display: block; margin-bottom: 14px; }
.drawer-body label > span {
  display: block; font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 600;
  margin-bottom: 6px;
}
.drawer-body input[type="text"],
.drawer-body input[type="number"],
.drawer-body select,
.drawer-body textarea {
  width: 100%; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--paper); font-size: 13px;
}
.drawer-body input[type="range"] { width: 100%; }
.drawer-body textarea { min-height: 80px; resize: vertical; }
.drawer .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.kv-list { display: grid; grid-template-columns: 110px 1fr; gap: 6px 14px; font-size: 12.5px; align-items: center; }
.kv-list dt { color: var(--ink-3); font-weight: 500; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }

.dep-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.dep-pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 8px;
  font-size: 11px; font-weight: 500;
  background: var(--paper-2); color: var(--ink);
  border-radius: 999px; border: 1px solid var(--line);
}
.dep-pill button { font-size: 14px; line-height: 1; color: var(--ink-3); }

.drawer-foot {
  display: flex; gap: 8px; align-items: center;
  padding: 14px 18px; border-top: 1px solid var(--line);
  background: linear-gradient(0deg,#fbfaf6,#fff);
}

/* ---------- Menu/Popover ---------- */
.popover {
  position: absolute; z-index: 70;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-3);
  min-width: 240px;
  padding: 6px;
}
.popover .pv-h {
  padding: 8px 10px 6px;
  font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 600;
}
.popover .pv-item {
  display: flex; align-items: center; gap: 8px;
  width: 100%; text-align: left;
  padding: 8px 10px;
  font-size: 12.5px; color: var(--ink);
  border-radius: 6px;
}
.popover .pv-item:hover { background: var(--paper); }
.popover .pv-item .check { color: var(--green); margin-left: auto; }
.popover .pv-item.danger { color: var(--rose); }

/* ---------- Footer ---------- */
.footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-top: 1px solid var(--line);
  font-size: 11px; color: var(--ink-3);
}
.footer .l { display: flex; align-items: center; gap: 14px; }
.footer .legend { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.footer .legend span { display: inline-flex; align-items: center; gap: 6px; }
.footer .legend i {
  width: 12px; height: 12px; border-radius: 3px;
}
.footer .badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--gradient);
  color: #fff;
  padding: 3px 9px; border-radius: 999px;
  font-weight: 600; letter-spacing: .04em; font-size: 10px;
}

/* ---------- Cover ---------- */
.cover {
  padding: 22px;
}
.cover-card {
  position: relative;
  border-radius: var(--radius-l);
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}
.cover-band {
  height: 6px; background: var(--gradient);
}
.cover-inner {
  display: grid; grid-template-columns: 1.4fr 1fr;
  padding: 28px 32px;
  gap: 28px;
}
.cover-eyebrow {
  font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
}
.cover-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: 38px; font-weight: 600; letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 6px 0 10px;
}
.cover-title b { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 700; }
.cover-lede { font-size: 14px; color: var(--ink-2); max-width: 56ch; line-height: 1.55; }
.cover-meta { display: flex; gap: 22px; margin-top: 18px; }
.cover-meta div .k { font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.cover-meta div .v { font-size: 14px; font-weight: 600; }

.cover-lanes { display: flex; flex-direction: column; gap: 8px; }
.cover-lane {
  position: relative;
  display: flex; align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 8px;
  background: #fbfbf8;
  overflow: hidden;
}
.cover-lane .ln { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; width: 22px; }
.cover-lane .name { font-weight: 600; flex: 1; font-size: 13px; }
.cover-lane .pct { font-feature-settings: "tnum"; font-weight: 700; font-size: 14px; }
.cover-lane .lbar { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--gradient); border-radius: 0; }
.cover-lane::before { content:""; position:absolute; inset:0; background: linear-gradient(90deg, rgba(20,192,212,.06), transparent 40%); pointer-events:none; }

/* ---------- Misc ---------- */
.kbd {
  font-family: ui-monospace, SF Mono, Menlo, monospace;
  font-size: 10px;
  background: var(--paper-2); padding: 1px 5px; border-radius: 4px;
  border: 1px solid var(--line);
  color: var(--ink-2);
}

.drag-cursor { cursor: grabbing !important; }
.drag-cursor * { cursor: grabbing !important; }

/* ---------- Header nav (Capture Plan / Profiles / Billing) ---------- */
.head-nav {
  display: flex; gap: 4px;
  background: var(--paper-2);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.head-tab {
  height: 28px; padding: 0 14px;
  font-size: 12px; font-weight: 600;
  color: var(--ink-3);
  border-radius: 999px;
  letter-spacing: -.005em;
  white-space: nowrap;
}
.head-tab:hover { color: var(--ink); }
.head-tab.is-on {
  background: var(--card); color: var(--ink);
  box-shadow: var(--shadow-1);
}

.head-window {
  font-size: 11.5px; color: var(--ink-3);
  font-feature-settings: "tnum"; padding-right: 4px;
  white-space: nowrap;
}
.head-window .k {
  font-size: 9px; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 700; margin-right: 6px; color: var(--ink-3);
}
.head-window b { color: var(--ink); font-weight: 600; }

/* ---------- Mission bar ---------- */
.mission { padding: 18px 22px 0; }
.mission-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-2);
  padding: 22px 26px 18px;
  position: relative;
  overflow: hidden;
}
.mission-card::before {
  content: ""; position: absolute;
  top: -120px; right: -120px;
  width: 320px; height: 320px;
  background: radial-gradient(closest-side, rgba(20,192,212,.12), transparent 70%);
  pointer-events: none;
}
.mission-eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-size: 10.5px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--ink-3);
  font-weight: 600;
  margin-bottom: 14px;
}
.mission-eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gradient);
}
.mission-eyebrow .m-meta {
  margin-left: auto;
  font-size: 11.5px; color: var(--ink-3);
  letter-spacing: 0; text-transform: none;
  font-weight: 500;
  font-feature-settings: "tnum";
}
.mission-eyebrow .m-meta b { color: var(--ink); font-weight: 600; }

.mission-row {
  display: grid;
  grid-template-columns: minmax(180px, 220px) 1fr minmax(180px, 220px);
  gap: 22px;
  align-items: stretch;
}
.mission-title {
  margin: 0;
  text-align: center;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: clamp(34px, 4.2vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.mission-title i { font-style: italic; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mission-title .mt-eyebrow {
  display: block;
  font-family: "Inter Tight", sans-serif;
  font-size: 10.5px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--ink-3);
  font-weight: 700; margin-bottom: 6px;
}
.mission-title .mt-instruction {
  display: block;
  margin-top: 10px;
  font-family: "Inter Tight", sans-serif;
  font-size: 12.5px; font-weight: 500;
  color: var(--ink-3);
  letter-spacing: -.005em;
  line-height: 1.45;
  max-width: 64ch;
  align-self: center;
}

.flank-btn {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 14px 16px;
  background: linear-gradient(180deg, #fbfaf6, #f6f4ee);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  text-align: left;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  overflow: hidden;
}
.flank-btn:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.flank-btn::before {
  content: ""; position: absolute;
  top: 0; bottom: 0; width: 4px;
  background: var(--gradient-vert);
}
.flank-btn.left::before { left: 0; }
.flank-btn.right::before { right: 0; }
.flank-btn.right { padding-right: 22px; align-items: flex-end; text-align: right; }
.flank-btn .fb-eyebrow {
  font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 700;
}
.flank-btn .fb-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: 22px; font-weight: 600; letter-spacing: -.02em;
  margin-top: 4px; line-height: 1.05;
  color: var(--ink);
}
.flank-btn .fb-meta {
  font-size: 11px; color: var(--ink-3); margin-top: 8px;
  font-weight: 500;
}
.flank-btn .fb-arrow {
  position: absolute;
  bottom: 12px;
  font-size: 18px; font-weight: 600;
  background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.flank-btn.left .fb-arrow { right: 16px; }
.flank-btn.right .fb-arrow { left: 16px; transform: scaleX(-1); }
.flank-btn:hover .fb-arrow { transform: translateX(2px); }
.flank-btn.right:hover .fb-arrow { transform: scaleX(-1) translateX(2px); }

/* ---------- Integrations rail ---------- */
.integrations-rail {
  margin-top: 18px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #fbfaf6, #f6f4ee);
  border: 1px solid var(--line);
  border-radius: 12px;
  position: relative;
}
.ir-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 10px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--ink-3);
  font-weight: 700;
  padding: 0 0 8px;
}
.ir-pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: #4eb52e;
  box-shadow: 0 0 0 0 rgba(78,181,46,.6);
  animation: irpulse 1.8s ease-out infinite;
}
@keyframes irpulse {
  0%   { box-shadow: 0 0 0 0 rgba(78,181,46,.6); }
  70%  { box-shadow: 0 0 0 8px rgba(78,181,46,0); }
  100% { box-shadow: 0 0 0 0 rgba(78,181,46,0); }
}
.ir-items {
  display: flex; gap: 6px; align-items: center;
  flex-wrap: wrap;
}
.ir-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px;
  font-size: 12px; font-weight: 600;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: all .15s ease;
  white-space: nowrap;
}
.ir-chip:hover { border-color: var(--line-2); transform: translateY(-1px); box-shadow: var(--shadow-1); }
.ir-chip.is-open { background: var(--ink); color: #f6f4ee; border-color: var(--ink); }
.ir-chip .ir-glyph {
  font-size: 13px; opacity: .85;
}
.ir-spacer { flex: 1; }
.ir-22 {
  font-size: 11px; color: var(--ink-3); font-style: italic;
  letter-spacing: -.005em;
}

.ir-panel {
  margin-top: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  box-shadow: var(--shadow-1);
}
.irp-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 12px;
}
.irp-head .irp-glyph {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--gradient);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px;
}
.irp-head .irp-title { font-weight: 700; font-size: 13.5px; }
.irp-head .irp-hint  { font-size: 12px; color: var(--ink-3); }
.irp-head .btn { margin-left: auto; }
.irp-body { display: flex; flex-direction: column; gap: 10px; }
.irp-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.irp-fine { font-size: 11px; color: var(--ink-3); }
.irp-field { display: flex; align-items: center; gap: 10px; }
.irp-field span {
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 700; min-width: 110px;
}
.irp-field input {
  flex: 1; padding: 7px 10px;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--paper); font-size: 12.5px;
}
.irp-drop {
  border: 1.5px dashed var(--line-2);
  border-radius: 8px;
  padding: 18px;
  text-align: center;
  background: var(--paper);
  display: flex; flex-direction: column; gap: 4px;
}
.irp-drop strong { font-size: 13px; }
.irp-drop span { font-size: 11px; color: var(--ink-3); font-family: ui-monospace, Menlo, monospace; }
.irp-code {
  background: #0a2540; color: #c8e3f0;
  padding: 12px 14px; border-radius: 6px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px; overflow-x: auto;
  margin: 0;
}

/* ---------- Mission rule + Mode bar ---------- */
.mission-rule {
  height: 4px;
  margin: 18px -26px 14px;
  background: var(--gradient);
  position: relative;
}
.mission-rule::before, .mission-rule::after {
  content: ""; position: absolute; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; border-radius: 50%;
  background: #fff; border: 2px solid var(--ink);
}
.mission-rule::before { left: 26px; }
.mission-rule::after { right: 26px; }

.mode-bar {
  display: grid;
  grid-template-columns: auto repeat(8, 1fr);
  gap: 6px;
  align-items: stretch;
}
.mode-bar .mb-label {
  align-self: center;
  padding: 0 14px 0 4px;
  font-size: 10.5px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--ink-3);
  font-weight: 700;
}
.mode-btn {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 8px 10px 8px 12px;
  background: var(--paper-2);
  border: 1px solid transparent;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  transition: all .15s ease;
  min-height: 60px;
  overflow: hidden;
}
.mode-btn:hover { background: #e3e1d6; }
.mode-btn .mb-letter {
  font-family: "Fraunces", Georgia, serif;
  font-size: 22px; font-weight: 700; letter-spacing: -.02em;
  color: var(--ink);
  line-height: 1;
}
.mode-btn .mb-name {
  font-size: 12.5px; font-weight: 700; letter-spacing: -.005em;
  color: var(--ink); margin-top: 2px;
}
.mode-btn .mb-desc {
  font-size: 10.5px; color: var(--ink-3);
  margin-top: 1px; font-weight: 500;
  line-height: 1.25;
}
.mode-btn.is-on {
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: 0 4px 12px rgba(10,37,64,.22);
}
.mode-btn.is-on .mb-letter,
.mode-btn.is-on .mb-name { color: #f6f4ee; }
.mode-btn.is-on .mb-desc { color: rgba(255,255,255,.7); }
.mode-btn.is-on::after {
  content: ""; position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--gradient);
}

/* ---------- Cover (legacy) — hidden but kept for bundlers ---------- */
.cover { display: none; }

/* ---------- Empty fields head when nothing visible ---------- */
.gantt-fields:empty { border-right: 0; }

/* ---------- Kanban (Mode B) ---------- */
.kanban {
  display: grid;
  grid-template-columns: repeat(6, minmax(220px, 1fr));
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-2);
  padding: 18px;
  overflow-x: auto;
}
.kb-col {
  background: linear-gradient(180deg, #fbfaf6, #f6f4ee);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex; flex-direction: column;
  min-width: 220px;
  overflow: hidden;
}
.kb-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.kb-head .dot { width: 8px; height: 8px; border-radius: 50%; }
.kb-head .name { font-weight: 700; font-size: 13px; flex: 1; }
.kb-head .count {
  background: var(--paper-2); color: var(--ink-2);
  padding: 1px 8px; font-size: 11px; font-weight: 600;
  border-radius: 999px; font-feature-settings: "tnum";
}
.kb-body {
  padding: 10px;
  display: flex; flex-direction: column; gap: 8px;
  min-height: 100px;
}
.kb-empty {
  font-size: 11px; color: var(--ink-3);
  font-style: italic; padding: 8px; text-align: center;
}
.kb-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px 8px;
  box-shadow: var(--shadow-1);
  cursor: pointer;
  transition: all .15s ease;
  position: relative;
  overflow: hidden;
}
.kb-card:hover { border-color: var(--line-2); transform: translateY(-1px); box-shadow: var(--shadow-2); }
.kb-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.kb-name { font-size: 12.5px; font-weight: 600; letter-spacing: -.005em; line-height: 1.3; padding-left: 4px; }
.kb-meta { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; padding-left: 4px; }
.kb-pill {
  font-size: 10px; font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(20,192,212,.12);
  color: var(--ink-2);
}
.kb-pill.subtle { background: var(--paper-2); color: var(--ink-3); font-weight: 500; }
.kb-foot {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px;
  padding-left: 4px;
  font-size: 10.5px; color: var(--ink-3);
}
.kb-avatar {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--gradient);
  color: #fff; font-size: 9px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.kb-list { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-prog {
  width: 50px; height: 4px;
  background: var(--paper-2); border-radius: 3px; overflow: hidden;
}
.kb-prog i { display: block; height: 100%; background: var(--gradient); }

/* ---------- Heatmap (Mode C) ---------- */
.heat-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-2);
  padding: 18px;
  overflow-x: auto;
}
.heat-head {
  display: grid;
  grid-template-columns: 200px repeat(13, 1fr);
  gap: 4px;
  margin-bottom: 4px;
}
.heat-w {
  text-align: center;
  font-size: 10px; color: var(--ink-3); font-weight: 600;
  letter-spacing: .04em;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
}
.heat-w .hw-num { font-size: 11px; color: var(--ink-2); font-weight: 700; }
.heat-w .hw-date { font-size: 9.5px; }
.heat-row {
  display: grid;
  grid-template-columns: 200px repeat(13, 1fr);
  gap: 4px;
  margin-bottom: 4px;
}
.heat-lane {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 12px;
  padding: 0 8px;
}
.heat-lane i { width: 4px; height: 22px; border-radius: 2px; }
.heat-c {
  height: 36px;
  border-radius: 4px;
  border: 1px solid var(--line);
  position: relative;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  color: var(--ink);
}
.heat-c.is-now { box-shadow: inset 0 0 0 2px var(--rose); }
.heat-c .heat-n { font-feature-settings: "tnum"; }
.heat-c .heat-pip {
  position: absolute; bottom: 3px;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--ink);
  opacity: .5;
}
.heat-foot {
  margin-top: 12px;
  font-size: 11px; color: var(--ink-3);
  font-style: italic;
}

/* ---------- Workload (Mode D) ---------- */
.wkl-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-2);
  padding: 18px;
  overflow-x: auto;
}
.wkl-head, .wkl-row {
  display: grid;
  grid-template-columns: 220px repeat(13, 1fr) 60px;
  gap: 4px;
  align-items: center;
}
.wkl-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
.wkl-corner, .wkl-wcol, .wkl-tot {
  font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3); font-weight: 700;
  padding: 0 6px;
  text-align: center;
}
.wkl-corner { text-align: left; }
.wkl-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--shade);
}
.wkl-name {
  display: flex; align-items: center; gap: 10px;
  padding-left: 6px;
}
.wkl-name .wkl-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--gradient);
  color: #fff; font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.wkl-name .wkl-fn { font-weight: 600; font-size: 13px; }
.wkl-name .wkl-rl { font-size: 10.5px; color: var(--ink-3); }
.wkl-cell {
  position: relative;
  padding: 4px 4px 16px;
  border-radius: 4px;
  background: var(--paper);
}
.wkl-cell.is-over { background: rgba(196,83,107,.13); }
.wkl-bar {
  height: 8px; border-radius: 4px;
  background: rgba(10,37,64,.06);
  overflow: hidden;
}
.wkl-bar i {
  display: block; height: 100%;
  background: var(--gradient);
}
.wkl-cell.is-over .wkl-bar i { background: linear-gradient(90deg, var(--rose), #e88a9b); }
.wkl-num {
  position: absolute;
  bottom: 1px; right: 5px;
  font-size: 10px; font-weight: 700;
  color: var(--ink); font-feature-settings: "tnum";
}
.wkl-tot.v {
  font-size: 13px; font-weight: 700;
  color: var(--ink); font-feature-settings: "tnum";
  text-align: right; padding-right: 4px;
}
.wkl-foot {
  margin-top: 12px;
  font-size: 11px; color: var(--ink-3);
  font-style: italic;
}

/* ---------- Pipeline (Mode E) ---------- */
.pipe-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-2);
  padding: 24px;
}
.pipe-funnel { display: flex; flex-direction: column; gap: 8px; align-items: center; padding: 12px 0 22px; }
.pipe-stage { width: 100%; display: flex; flex-direction: column; align-items: center; }
.pipe-bar {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  height: 38px;
  padding: 0 18px;
  border-radius: 6px;
  color: #fff;
  box-shadow: var(--shadow-1);
}
.pipe-name { font-weight: 700; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.pipe-num { font-weight: 700; font-size: 18px; font-feature-settings: "tnum"; }
.pipe-arrow {
  margin-top: 4px; height: 22px;
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 600; color: var(--ink-3);
}
.pipe-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.pipe-col h4 {
  display: flex; align-items: center; gap: 6px;
  margin: 0 0 8px;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 700; color: var(--ink);
}
.pipe-col h4 i { width: 8px; height: 8px; border-radius: 50%; }
.pipe-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.pipe-col li {
  font-size: 12px;
  padding: 6px 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.pipe-col li.more, .pipe-col li.empty { background: transparent; border: 0; color: var(--ink-3); font-style: italic; padding: 4px 0; }

/* ---------- Calendar (Mode F) ---------- */
.cal-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  background: transparent;
}
.cal-week {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: var(--shadow-1);
}
.cal-week.is-now {
  border-color: var(--cyan);
  box-shadow: var(--shadow-2), 0 0 0 2px rgba(20,192,212,.18);
}
.cal-week header {
  display: flex; align-items: baseline; gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 8px;
}
.cw-num { font-family: "Fraunces", Georgia, serif; font-size: 18px; font-weight: 600; }
.cw-dates { font-size: 11px; color: var(--ink-3); flex: 1; }
.cw-count {
  font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-3);
}
.cal-week ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.cal-week li {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px;
  padding: 6px 8px;
  background: var(--paper);
  border-radius: 4px;
}
.cal-week li i { width: 4px; height: 14px; border-radius: 2px; flex: 0 0 4px; }
.cal-week li .ct-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-week li .ct-meta { font-size: 10.5px; color: var(--ink-3); font-feature-settings: "tnum"; }
.cal-week li.empty { background: transparent; color: var(--ink-3); font-style: italic; }

/* ---------- Region (Mode G) ---------- */
.reg-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.reg-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  box-shadow: var(--shadow-1);
}
.reg-card header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.reg-card h3 { margin: 0; font-family: "Fraunces", Georgia, serif; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.reg-card header span { font-size: 11px; color: var(--ink-3); }
.reg-bars { display: flex; flex-direction: column; gap: 5px; padding: 8px 0; border-bottom: 1px dashed var(--line); margin-bottom: 8px; }
.reg-bar { display: grid; grid-template-columns: 50px 1fr 28px; gap: 8px; align-items: center; }
.reg-bar .rb-name { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.reg-bar .rb-track { height: 6px; background: var(--paper-2); border-radius: 3px; overflow: hidden; }
.reg-bar .rb-track i { display: block; height: 100%; }
.reg-bar .rb-n { font-size: 11px; font-weight: 700; text-align: right; font-feature-settings: "tnum"; }
.reg-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 3px; }
.reg-list li { font-size: 12px; padding: 4px 8px; background: var(--paper); border-radius: 4px; }
.reg-list li.more, .reg-list li.empty { background: transparent; color: var(--ink-3); font-style: italic; padding: 4px 0; }

/* ---------- Activity (Mode H) ---------- */
.act-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-2);
  padding: 22px;
  position: relative;
}
.act-rail { position: absolute; left: 110px; top: 22px; bottom: 22px; width: 2px; background: var(--gradient-vert); opacity: .35; }
.act-row {
  display: grid;
  grid-template-columns: 96px 18px 1fr;
  gap: 10px; align-items: flex-start;
  padding: 8px 0;
}
.act-day { text-align: right; font-size: 11px; color: var(--ink-3); padding-top: 6px; }
.act-day .ad-d { font-weight: 700; color: var(--ink); }
.act-day .ad-w { font-feature-settings: "tnum"; }
.act-dot {
  width: 14px; height: 14px; border-radius: 50%;
  margin-top: 8px;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
}
.act-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 12px;
}
.act-row.is-future .act-card { background: #fff; border-style: dashed; }
.act-card .ac-h { display: flex; gap: 10px; align-items: baseline; }
.act-card .ac-status { font-size: 10.5px; font-weight: 700; }
.act-card .ac-name { font-weight: 600; font-size: 13px; }
.act-card .ac-m { display: flex; gap: 6px; font-size: 10.5px; color: var(--ink-3); margin-top: 2px; }

/* ---------- TodoPage ---------- */
.todo-page { padding: 24px 22px 60px; }
.tp-header { max-width: 1200px; margin: 0 auto 18px; }
.tp-eyebrow {
  font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 700;
}
.tp-header h1 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 38px; font-weight: 600; letter-spacing: -.025em;
  margin: 4px 0 8px; line-height: 1.05;
}
.tp-header p { max-width: 70ch; font-size: 13.5px; color: var(--ink-2); margin: 0 0 16px; line-height: 1.5; }
.tp-stats { display: flex; gap: 14px; flex-wrap: wrap; }
.tp-stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  box-shadow: var(--shadow-1);
  min-width: 110px;
}
.tp-stat .k { font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.tp-stat .v { font-size: 22px; font-weight: 600; font-feature-settings: "tnum"; letter-spacing: -.02em; }
.tp-stat .v small { font-size: 12px; color: var(--ink-3); }

.tp-toolbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--shadow-1);
  margin: 0 auto 10px;
  max-width: 1200px;
}
.tp-tb-left, .tp-tb-right { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tp-tb-right { margin-left: auto; }
.tp-lbl {
  font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 700;
  margin-right: 4px;
}
.tp-lbl.tight { margin-right: 0; }
.tp-toolbar .search input {
  border: 1px solid var(--line); border-radius: 6px;
  padding: 6px 10px; font-size: 12px; background: var(--paper);
  width: 220px;
}

.tp-group-filter {
  max-width: 1200px; margin: 0 auto 16px;
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 14px;
  background: linear-gradient(180deg, #fbfaf6, #f6f4ee);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.tp-group-filter .tp-lbl { padding-top: 4px; }
.tp-gf-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex: 1; }
.gf-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px;
  font-size: 11.5px; font-weight: 600;
  background: var(--paper-2);
  color: var(--ink-3);
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: line-through;
  opacity: .65;
}
.gf-chip i { width: 8px; height: 8px; border-radius: 2px; }
.gf-chip .gf-n {
  background: rgba(10,37,64,.08); color: var(--ink-3);
  font-size: 10px; font-weight: 700;
  padding: 0 6px; border-radius: 999px; font-feature-settings: "tnum";
}
.gf-chip.is-on {
  background: var(--ink); color: #f6f4ee;
  text-decoration: none; opacity: 1;
}
.gf-chip.is-on .gf-n { background: rgba(255,255,255,.18); color: #fff; }
.gf-link { font-size: 11px; color: var(--ink-3); text-decoration: underline; padding: 0 6px; }

.tp-body { max-width: 1200px; margin: 0 auto; }
.tp-empty {
  background: var(--card); border: 1px dashed var(--line-2);
  border-radius: 10px; padding: 30px;
  text-align: center; color: var(--ink-3);
}
.tp-group {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.tp-gh {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  background: linear-gradient(180deg, #fbfaf6, #f6f4ee);
  border-bottom: 1px solid var(--line);
}
.tp-gs { width: 14px; height: 14px; border-radius: 4px; }
.tp-gh h2 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 22px; font-weight: 600; letter-spacing: -.02em; flex: 1;
}
.tp-gh .tp-gn { font-size: 11px; color: var(--ink-3); }

.tp-projects { list-style: none; padding: 0; margin: 0; }
.tp-project { border-bottom: 1px solid var(--shade); }
.tp-project:last-child { border-bottom: 0; }
.tp-p-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  cursor: pointer;
  transition: background .12s ease;
}
.tp-p-head:hover { background: rgba(45,201,214,.05); }
.tp-caret {
  font-size: 12px; color: var(--ink-3);
  transition: transform .15s ease;
  flex: 0 0 12px;
}
.tp-project.is-open .tp-caret { transform: rotate(90deg); color: var(--ink); }
.tp-pln { width: 4px; height: 22px; border-radius: 2px; flex: 0 0 4px; }
.tp-p-name { flex: 1; font-weight: 600; font-size: 13.5px; letter-spacing: -.005em; min-width: 200px; }
.tp-p-meta { display: flex; align-items: center; gap: 6px; }
.tp-p-meta .pill {
  font-size: 10.5px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(20,192,212,.13); color: var(--ink-2);
}
.tp-p-meta .pill.subtle { background: var(--paper-2); color: var(--ink-3); font-weight: 500; }
.tp-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--gradient);
  color: #fff; font-size: 9.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.tp-prog { display: inline-flex; align-items: center; gap: 6px; min-width: 70px; }
.tp-prog i {
  display: inline-block; width: 50px; height: 5px;
  background: var(--paper-2); border-radius: 3px; overflow: hidden;
  position: relative;
}
.tp-prog i b {
  display: block; height: 100%;
  background: var(--gradient);
}
.tp-prog span { font-size: 10.5px; font-weight: 700; color: var(--ink-2); font-feature-settings: "tnum"; }
.tp-open-board {
  font-size: 11px; font-weight: 700;
  color: var(--ink-2);
  padding: 4px 10px; border-radius: 6px;
  background: var(--paper-2); border: 1px solid transparent;
}
.tp-open-board:hover { background: var(--ink); color: #fff; }

.tp-subs {
  list-style: none; padding: 4px 18px 14px 50px; margin: 0;
  background: var(--paper);
  border-top: 1px solid var(--shade);
}
.tp-sub {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  font-size: 12.5px;
  border-bottom: 1px solid var(--shade);
}
.tp-sub:last-child { border-bottom: 0; }
.tp-check {
  width: 16px; height: 16px; border-radius: 4px;
  border: 1.5px solid var(--ink-3);
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 16px;
  color: #fff; font-size: 10px;
}
.tp-check[data-on="true"] { background: var(--gradient); border-color: transparent; }
.tp-sub-title { flex: 1; }
.tp-sub.s-done .tp-sub-title { color: var(--ink-3); text-decoration: line-through; }
.tp-sub-tags { display: flex; gap: 6px; align-items: center; }
.tp-sub-tags .pill {
  font-size: 10.5px; font-weight: 600;
  padding: 1px 7px; border-radius: 999px;
  background: var(--paper-2); color: var(--ink-3);
}
.tp-sub-tags .pill.subtle { background: transparent; }

@media (max-width: 1200px) {
  .mission-row { grid-template-columns: 1fr; }
  .flank-btn { flex-direction: row; align-items: center; }
  .flank-btn .fb-arrow { position: static; margin-left: auto; }
  .mode-bar { grid-template-columns: 1fr; }
}
