  *, *::before, *::after { box-sizing: border-box; }
  :root {
    /* Marketing Cloud Planner palette — mono-navy (brand) + warm neutral grays. Teal and magenta from the brand secondary palettes are reserved for marketing surfaces only. */
    --bg: #F5F6F8;                /* soft-gray canvas */
    --surface: #FFFFFF;
    --paper: #FAFAFA;             /* off-white alt surface */
    --text: #111111;              /* ink, primary text */
    --text-soft: #3F3F3F;         /* charcoal */
    --muted: #666666;             /* graphite, secondary text */
    --muted-soft: #8A8A8A;
    --border: #E8EAED;            /* border-gray */
    --border-strong: #CBD0D5;

    /* Navy scale, the only chromatic hue (brand mono-navy) */
    --blue-100: #EFF5FC;          /* pale navy tint, brand */
    --blue-200: #C8D1E4;          /* mid-pale navy, borders */
    --blue-400: #3A4F8E;          /* mid navy */
    --blue-500: #182B6B;          /* brand deep navy, primary */
    --blue-600: #2A3A85;          /* slightly lifted navy, CTA hover */
    --blue-800: #0E2152;          /* deepest navy */

    /* Brand accent colors, selective placement only. */
    --accent-now: #03CD8A;        /* brand teal: now / active markers */
    --accent-cta: #CB0EFF;        /* brand magenta: primary CTAs + brand utilities */

    /* Phase tokens (Gantt modal only) — chart legibility encoding */
    --setup: #666666;             /* graphite */
    --datacloud: var(--blue-500);
    --channels: var(--blue-400);  /* mid-blue */
    --seg: #F4B82E;               /* gold-accent */
    --flows: #29C45A;             /* success */
    --launch: #FF4D4F;            /* alert */

    /* Primary accent aliases (consumed throughout the file) */
    --today: var(--blue-500);
    --today-deep: var(--blue-800);
    --today-tint: var(--blue-100);
    --brand: var(--blue-500);
    --brand-tint: var(--blue-100);
    --brand-border: var(--blue-200);

    /* Semantic — pill-only */
    --success-bg: #E9FBEF;
    --success-fg: #29C45A;
    --danger-bg: #FFEDEE;
    --danger-fg: #FF4D4F;
    --alert: var(--danger-fg);
    --ok: var(--success-fg);
  }
  body {
    margin: 0;
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    line-height: 1.55;
  }

  /* ========= MAIN-HEAD (title + code chip inside main column) ========= */
  .main-head {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 32px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    position: sticky; top: 0; z-index: 5;
    height: 60px;
    box-sizing: border-box;
    transition: padding-left 0.22s ease;
  }
  .layout.rail-collapsed .main-head { padding-left: 56px; }

  /* Floating seam toggle — sits on the divider between rail and main */
  .rail-seam-toggle {
    position: absolute;
    top: 15px;
    left: 280px;
    transform: translateX(-50%);
    z-index: 30;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--accent-now);
    border: 1px solid var(--accent-now);
    box-shadow: 0 2px 6px -2px rgba(3, 205, 138, 0.30);
    color: #FFFFFF;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    padding: 0;
    transition: left 0.22s ease, transform 0.22s ease, filter 0.12s;
  }
  .rail-seam-toggle:hover { filter: brightness(1.08); }
  .rail-seam-toggle svg { width: 13px; height: 13px; }
  .rail-seam-toggle .icon-expand { display: none; }
  body[data-rail="closed"] .rail-seam-toggle .icon-collapse { display: none; }
  body[data-rail="closed"] .rail-seam-toggle .icon-expand { display: block; }
  .layout.rail-collapsed .rail-seam-toggle {
    left: 14px;
    transform: translateX(0);
  }

  .main-head-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }
  .main-head-title-sub {
    font-weight: 500;
    color: var(--muted);
    font-size: 16px;
    letter-spacing: -0.01em;
  }

  .code-chip {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--brand);
    background: var(--brand-tint);
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid var(--brand-border);
    font-weight: 600;
    white-space: nowrap;
    cursor: default;
    position: relative;
  }
  .code-chip[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--text);
    color: var(--surface);
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 40;
    box-shadow: 0 4px 12px -4px rgba(15, 23, 42, 0.25);
  }
  .code-chip[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateY(0);
  }

  /* ========= LAYOUT ========= */
  .layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
    transition: grid-template-columns 0.22s ease;
    position: relative;
  }
  .layout.rail-collapsed { grid-template-columns: 0 minmax(0, 1fr); }
  .layout.rail-collapsed .left-rail { border-right: none; }

  /* ========= LEFT RAIL ========= */
  .left-rail {
    background: var(--surface);
    border-right: 1px solid var(--border);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  .rail-head {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    flex: none;
    height: 60px;
    box-sizing: border-box;
  }
  .rail-brand-icon {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    flex: none;
  }
  .rail-brand-icon img { width: 100%; height: 100%; object-fit: contain; display: block; }
  .rail-brand-icon svg { width: 18px; height: 18px; }
  .rail-brand-text {
    min-width: 0;
    line-height: 1.15;
  }
  .rail-brand-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .rail-brand-edition {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: -0.005em;
    margin-top: 1px;
  }
  .rail-section-label {
    padding: 18px 20px 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: var(--muted);
    flex: none;
  }

  .weeks-tree {
    list-style: none;
    padding: 0 0 8px;
    margin: 0;
    overflow-y: auto;
    flex: 1;
  }
  .weeks-tree::-webkit-scrollbar { width: 6px; }
  .weeks-tree::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }

  .week-node {
    border-left: 3px solid transparent;
  }

  .week-row {
    display: grid;
    grid-template-columns: 22px 1fr auto;
    align-items: center;
    gap: 6px;
    padding: 10px 14px 10px 11px;
    cursor: pointer;
    user-select: none;
    border-radius: 8px;
  }
  .week-row:hover { background: var(--paper); }
  .week-node.current .week-row {
    background: var(--today);
    color: #ffffff;
    margin: 0 10px;
  }
  .week-node.current .week-row:hover { background: var(--today-deep); }
  .week-toggle {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted-soft);
    transition: transform 0.2s ease, color 0.12s;
    flex: none;
  }
  .week-toggle svg { width: 11px; height: 11px; }
  .week-node.open .week-toggle { color: var(--text); transform: rotate(90deg); }
  .week-node.current .week-toggle { color: #ffffff; }
  .week-node.current.open .week-toggle { color: #ffffff; }
  .week-name {
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: -0.005em;
    line-height: 1.3;
  }
  .week-node.current .week-name { color: #ffffff; }
  .week-node.current .week-mini { color: rgba(255, 255, 255, 0.78); }
  .week-mini {
    font-size: 10.5px;
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
  }
  .week-tasks {
    display: none;
    padding: 0 14px 8px 38px;
    list-style: none;
    margin: 0;
  }
  .week-node.open .week-tasks { display: block; }
  .week-tasks li {
    padding: 6px 8px;
    border-radius: 5px;
    font-size: 13px;
    color: var(--text-soft);
    cursor: pointer;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .week-tasks li:hover { background: var(--paper); color: var(--text); }
  .task-marker {
    width: 6px; height: 6px;
    border-radius: 50%;
    flex: none;
  }
  .task-marker.done { background: var(--ok); }
  .task-marker.in-progress { background: var(--today); }
  .task-marker.input-pending { background: var(--alert); }
  .task-marker.upcoming { background: var(--border-strong); }

  /* Collapsed rail */
  .layout.rail-collapsed .rail-head,
  .layout.rail-collapsed .rail-section-label,
  .layout.rail-collapsed .weeks-tree { display: none; }

  /* ========= MAIN CONTENT ========= */
  .main-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }
  .main-body {
    padding: 32px 36px 80px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    flex: 1;
  }

  /* ========= TIMELINE STRIP ========= */
  .timeline-strip {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px 24px 18px;
    margin-bottom: 32px;
    position: relative;
  }
  .strip-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .strip-title {
    font-size: 11.5px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 800;
  }
  .strip-title strong { color: var(--text); }
  .expand-link {
    font-size: 13px;
    color: var(--text);
    background: transparent;
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .expand-link svg { width: 14px; height: 14px; flex: none; }
  .expand-link:hover { background: var(--paper); border-color: var(--border-strong); color: var(--today-deep); }
  .strip-actions { display: inline-flex; align-items: center; gap: 8px; }
  .strip-reset {
    font-size: 13px;
    color: var(--muted);
    background: transparent;
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .strip-reset svg { width: 13px; height: 13px; flex: none; }
  .strip-reset:hover { background: var(--paper); border-color: var(--border-strong); color: var(--text); }
  .strip-reset[hidden] { display: none; }

  .strip-weeks {
    display: flex;
    flex-direction: row;
    gap: 0;
    border-radius: 10px;
    border: 1px solid var(--border);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    position: relative;
    /* trailing fade hint that scroll continues */
    mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 24px), transparent 100%);
  }
  .strip-weeks.no-scroll { mask-image: none; }
  .strip-weeks::-webkit-scrollbar { height: 6px; }
  .strip-weeks::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
  .strip-weeks::-webkit-scrollbar-track { background: transparent; }
  .strip-week {
    padding: 14px 16px 18px;
    border-right: 1px solid var(--border);
    background: var(--paper);
    min-height: 140px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    flex: 0 0 220px;
    min-width: 220px;
    scroll-snap-align: start;
  }
  .strip-week:last-child { border-right: none; }
  .strip-week.current {
    background: var(--today-tint);
    box-shadow: inset 0 -3px 0 var(--today);
  }
  .strip-week.past .week-num,
  .strip-week.past .week-dates { color: var(--muted-soft); }
  .week-num {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--muted);
  }
  .strip-week.current .week-num {
    color: var(--today-deep);
  }
  .strip-week.current .week-num::after {
    content: ' · NOW';
    color: var(--accent-now);
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.1em;
  }
  .week-dates {
    font-size: 11px;
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
    margin-top: -8px;
  }
  .strip-pills {
    display: flex;
    flex-direction: column;
    gap: 6px;
    /* Cap at 5 pills (~24px each + 6px gaps). Sixth pill onwards scrolls. */
    max-height: 152px;
    overflow-y: auto;
    /* Breathing room so hover lift on the top pill isn't clipped by overflow:auto */
    padding: 4px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
  }
  .strip-pills::-webkit-scrollbar { width: 4px; }
  .strip-pills::-webkit-scrollbar-track { background: transparent; }
  .strip-pills::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
  /* Fade-out at bottom signals more content below — only when actually overflowing */
  .strip-pills.has-more {
    -webkit-mask-image: linear-gradient(to bottom, black 78%, transparent 100%);
            mask-image: linear-gradient(to bottom, black 78%, transparent 100%);
  }
  .strip-pill {
    background: var(--today);
    color: white;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: inherit;
    transition: filter 0.15s, transform 0.15s;
  }
  .strip-pill:hover { filter: brightness(1.1); transform: translateY(-1px); }
  .strip-pills > .strip-pill { flex: 0 0 auto; }
  .strip-pill.input-pending { background: var(--alert); }
  .strip-pill.upcoming { background: transparent; color: var(--today-deep); border: 1px dashed var(--today); }
  .strip-pill.done { background: var(--success-bg); color: var(--success-fg); border: 1px solid var(--success-fg); }
  .strip-pill.faded { opacity: 0.42; }
  .strip-pill.faded:hover { opacity: 1; filter: none; transform: translateY(-1px); }
  .strip-today-badge { background: var(--accent-now); color: white; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 999px; letter-spacing: 0.04em; text-transform: uppercase; margin-left: 6px; vertical-align: middle; }
  .strip-dates { color: var(--muted); font-weight: 500; font-size: 12.5px; margin-left: 2px; }

  /* ========= TASKS SECTION ========= */
  .tasks-section { margin-top: 8px; }
  .section-label-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 0 4px;
    margin-bottom: 14px;
  }
  .section-label {
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
  }
  .section-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 2px 7px;
    border-radius: 999px;
  }
  /* task card */
  .task-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .task-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
  }
  .task-card.open { border-color: var(--border-strong); }

  .task-head {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 14px;
    padding: 18px 24px;
    cursor: pointer;
    user-select: none;
    transition: background 0.12s;
  }
  .task-head:hover { background: var(--paper); }
  .task-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
  }
  .task-title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin: 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .status-pill {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 10.5px; font-weight: 700;
    letter-spacing: 0.04em; text-transform: uppercase;
    padding: 3px 9px; border-radius: 999px;
    flex: none;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
    transition: filter 0.12s, box-shadow 0.12s;
  }
  button.status-pill { line-height: 1; }
  .status-pill:hover { filter: brightness(0.96); }
  .status-pill:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--brand);
  }
  .status-caret {
    width: 10px; height: 10px;
    margin-left: 2px;
    opacity: 0.7;
    flex: none;
  }
  .status-pill::before {
    content: ''; display: inline-block;
    width: 6px; height: 6px; border-radius: 50%;
    background: currentColor;
  }
  .status-pill.done { background: var(--success-bg); color: var(--success-fg); }
  .status-pill.in-progress { background: var(--blue-100); color: var(--blue-600); }
  .status-pill.input-pending { background: var(--danger-bg); color: var(--danger-fg); }
  .status-pill.upcoming { background: var(--bg); color: var(--muted); }
  .chevron {
    width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.18s, color 0.12s;
    color: var(--muted-soft);
    flex: none;
  }
  .chevron svg { width: 18px; height: 18px; }
  .task-head:hover .chevron { color: var(--text); }
  .task-card.open .chevron { transform: rotate(90deg); color: var(--text); }

  .task-body {
    display: none;
    border-top: 1px solid var(--border);
  }
  .task-card.open .task-body { display: block; }

  .task-cols {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
  }
  .task-col {
    padding: 22px 24px;
    border-right: 1px solid var(--border);
  }
  .task-col:last-child { border-right: none; }
  .col-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .col-label .num {
    display: inline-flex;
    width: 18px; height: 18px;
    align-items: center; justify-content: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 10px;
    color: var(--muted);
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
  }
  .col-body { font-size: 13.5px; line-height: 1.55; color: var(--text-soft); }

  .input-row {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 4px 0;
    font-size: 13.5px;
  }
  .input-icon {
    flex: none;
    width: 18px; height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center; justify-content: center;
    font-size: 11px; font-weight: 800;
    margin-top: 2px;
  }
  .input-row.received .input-icon { background: #d1fae5; color: #065f46; }
  .input-row.pending .input-icon { background: #fee2e2; color: #991b1b; }
  .input-row.none { color: var(--muted); padding-left: 0; font-style: italic; }
  .input-row .when {
    color: var(--muted);
    font-size: 12px;
    display: block;
    margin-top: 2px;
  }
  .result-list {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 6px;
    font-size: 13.5px;
  }
  .result-list li {
    padding-left: 20px;
    position: relative;
    color: var(--text-soft);
    line-height: 1.5;
  }
  .result-list li::before {
    content: '✓';
    position: absolute;
    left: 0; top: 0;
    color: var(--ok);
    font-weight: 700;
  }

  .task-references {
    background: var(--paper);
    border-top: 1px solid var(--border);
    padding: 18px 24px 20px;
  }
  .task-references .col-label { margin-bottom: 12px; }
  .ref-list {
    list-style: none;
    padding: 0; margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .ref-list a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text);
    font-size: 13px;
    padding: 4px 0;
  }
  .ref-list a:hover { color: var(--brand); }
  .ref-list a:hover .ref-ext { color: var(--brand); }
  .ref-list a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--brand-border); }
  .ref-ext {
    width: 13px; height: 13px;
    color: var(--muted-soft);
    flex: none;
    transition: color 0.12s;
  }
  .ref-plain {
    font-size: 13px;
    color: var(--muted);
    padding: 4px 0;
  }

  /* ========= GANTT MODAL (preserved) ========= */
  .gantt-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 50;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 32px;
  }
  .gantt-modal.shown { display: flex; }
  .gantt-modal-card {
    background: var(--surface);
    border-radius: 16px;
    max-width: 1480px;
    width: 100%;
    max-height: calc(100vh - 64px);
    overflow: hidden;
    box-shadow: 0 24px 80px -16px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
  }
  .gantt-modal-head {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    background: var(--surface); z-index: 1;
    gap: 16px;
    flex: none;
  }
  .gantt-modal-title { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
  .gantt-modal-sub { font-size: 12px; color: var(--muted); margin-left: 10px; font-weight: 500; }
  .gantt-modal-actions { display: flex; align-items: center; gap: 8px; }
  .gantt-scroll-btn {
    width: 32px; height: 32px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 6px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--muted);
    padding: 0;
  }
  .gantt-scroll-btn:hover { background: var(--paper); color: var(--text); border-color: var(--border-strong); }
  .gantt-scroll-btn svg { width: 14px; height: 14px; }
  .gantt-modal-close {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
  }
  .gantt-modal-close:hover { background: var(--paper); }
  .gantt-modal-body {
    padding: 20px 24px 24px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  /* ========= GANTT (modal — swimlanes with embedded task chips) ========= */
  .gantt-scroll {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    flex-shrink: 0;
  }
  .gantt-scroll::-webkit-scrollbar { height: 10px; }
  .gantt-scroll::-webkit-scrollbar-track { background: var(--paper); border-radius: 6px; }
  .gantt-scroll::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; }
  .gantt-scroll::-webkit-scrollbar-thumb:hover { background: var(--muted-soft); }

  .gantt-board {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
  }
  .gantt-phases {
    border-right: 1px solid var(--border);
    background: var(--paper);
    position: sticky;
    left: 0;
    z-index: 4;
  }
  .gph-header {
    height: 52px;
    border-bottom: 1px solid var(--border);
    padding: 0 16px;
    display: flex;
    align-items: center;
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
  }
  .gph-row {
    min-height: 116px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 13.5px;
    box-sizing: border-box;
  }
  .gph-row:last-child { border-bottom: none; }
  .gph-row .phase-dot { width: 8px; height: 8px; border-radius: 2px; flex: none; }

  .gantt-grid-area {
    position: relative;
  }
  .gantt-weeks-row {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    height: 52px;
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 3;
    background: var(--surface);
  }
  .gw {
    border-right: 1px solid var(--border);
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
  }
  .gw:last-child { border-right: none; }
  .gw .wnum {
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: -0.005em;
  }
  .gw .wdate {
    font-size: 10.5px;
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
  }
  .gw.current { background: var(--today-tint); }
  .gw.current .wnum { color: var(--today-deep); }
  .gw.current .wnum::after {
    content: ' · NOW';
    color: var(--accent-now);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.06em;
  }

  .gantt-rows { position: relative; }
  .gantt-rows .current-week-band {
    position: absolute;
    top: 0; bottom: 0;
    left: 0%; width: 16.66%;
    background: linear-gradient(to bottom, rgba(13,131,242,0.08), rgba(13,131,242,0.03));
    border-left: 1px dashed rgba(13,131,242,0.4);
    border-right: 1px dashed rgba(13,131,242,0.4);
    pointer-events: none;
    z-index: 1;
  }
  .grow {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    min-height: 116px;
    border-bottom: 1px solid var(--border);
    position: relative;
    box-sizing: border-box;
  }
  .grow:last-child { border-bottom: none; }
  .gcell {
    border-right: 1px solid var(--border);
    padding: 8px 6px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    position: relative;
    z-index: 2;
    min-width: 0;
  }
  .gcell > .task-chip { max-width: 100%; }
  .gcell:last-child { border-right: none; }

  .task-chip {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--muted-soft);
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 11.5px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.25;
    color: var(--text);
    transition: background 0.12s, border-color 0.12s, transform 0.12s, box-shadow 0.12s;
  }
  .task-chip:hover {
    background: var(--surface);
    border-color: var(--text);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px -4px rgba(15,23,42,0.18);
    z-index: 3;
  }
  .task-chip.setup { border-left-color: var(--setup); }
  .task-chip.datacloud { border-left-color: var(--datacloud); }
  .task-chip.channels { border-left-color: var(--channels); }
  .task-chip.seg { border-left-color: var(--seg); }
  .task-chip.flows { border-left-color: var(--flows); }
  .task-chip.launch { border-left-color: var(--launch); }
  .task-chip.done { opacity: 0.55; }
  .task-chip.done .task-chip-name { text-decoration: line-through; text-decoration-color: var(--muted-soft); }
  .task-chip.more-chip {
    background: var(--bg);
    color: var(--muted);
    border: 1px dashed var(--brand-border);
    border-left: 1px dashed var(--brand-border);
    align-self: flex-start;
    padding: 4px 8px;
    min-width: 0;
  }
  .task-chip.more-chip:hover {
    background: var(--brand-tint);
    border-color: var(--brand);
    color: var(--brand);
    transform: translateY(-1px);
  }
  .more-chip-icon { width: 12px; height: 12px; display: block; }
  .task-chip-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .task-chip-status {
    flex: none;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--border-strong);
  }
  .task-chip-status.done { background: var(--ok); }
  .task-chip-status.in-progress { background: var(--today); animation: pulse-dot 2s ease-in-out infinite; }
  .task-chip-status.input-pending { background: var(--alert); }
  .task-chip-status.upcoming { background: var(--border-strong); }
  @keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(13,131,242,0.6); }
    50% { box-shadow: 0 0 0 5px rgba(13,131,242,0); }
  }

  .gantt-rows .today-line {
    position: absolute;
    top: 0; bottom: 0;
    width: 2px;
    background: var(--accent-now);
    z-index: 5;
    pointer-events: none;
  }
  .gantt-rows .today-line::before {
    content: attr(data-label);
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-now);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 3px;
    white-space: nowrap;
    letter-spacing: 0.04em;
  }

  .gantt-legend {
    display: flex;
    gap: 18px;
    padding: 14px 4px 0;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--muted);
  }
  .legend-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .legend-divider { width: 1px; height: 16px; background: var(--border); }
  .legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex: none;
  }
  .legend-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex: none;
  }
  .gantt { display: grid; grid-template-columns: 200px 1fr; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
  .phases-col { border-right: 1px solid var(--border); background: var(--paper); }
  .week-header-cell {
    height: 56px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center;
    padding: 0 18px;
    font-size: 11px; color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700;
  }
  .phase-cell {
    height: 60px;
    display: flex; align-items: center;
    padding: 0 18px;
    border-bottom: 1px solid var(--border);
    font-weight: 600; font-size: 14px;
    gap: 10px;
  }
  .phase-cell:last-child { border-bottom: none; }
  .phase-dot { width: 8px; height: 8px; border-radius: 2px; flex: none; }
  .grid-area { position: relative; overflow-x: auto; }
  .weeks-row {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    height: 56px;
    border-bottom: 1px solid var(--border);
    position: relative; z-index: 3;
  }
  .week-h {
    border-right: 1px solid var(--border);
    padding: 8px 10px;
    display: flex; flex-direction: column; justify-content: center; gap: 2px;
  }
  .week-h:last-child { border-right: none; }
  .week-h .wnum { font-weight: 700; font-size: 12px; }
  .week-h .wdate { font-size: 10px; color: var(--muted); }
  .week-h.current { background: var(--today-tint); }
  .week-h.current .wnum { color: var(--today-deep); }
  .week-h.current .wnum::after {
    content: ' · now'; font-size: 9px; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.06em; color: var(--today);
  }
  .rows { position: relative; }
  .current-week-band {
    position: absolute; top: 0; bottom: 0;
    left: 25%; width: 12.5%;
    background: linear-gradient(to bottom, rgba(13,131,242,0.10), rgba(13,131,242,0.04));
    border-left: 1px dashed rgba(13,131,242,0.4);
    border-right: 1px dashed rgba(13,131,242,0.4);
    pointer-events: none; z-index: 1;
  }
  .row {
    display: grid; grid-template-columns: repeat(8, 1fr);
    height: 60px;
    border-bottom: 1px solid var(--border);
    position: relative;
  }
  .row:last-child { border-bottom: none; }
  .cell { border-right: 1px solid var(--border); }
  .cell:last-child { border-right: none; }
  .bar {
    position: absolute; top: 10px; bottom: 10px;
    border-radius: 8px;
    padding: 0 12px;
    display: flex; align-items: center;
    font-size: 12.5px; font-weight: 500;
    color: white;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
    z-index: 2; border: none; text-align: left;
  }
  .bar::before {
    content: ''; position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px; background: rgba(255,255,255,0.4);
  }
  .bar.done { opacity: 0.55; }
  .bar.setup { background: var(--setup); }
  .bar.datacloud { background: var(--datacloud); }
  .bar.channels { background: var(--channels); }
  .bar.seg { background: var(--seg); }
  .bar.flows { background: var(--flows); }
  .bar.launch { background: var(--launch); }
  .today-line {
    position: absolute; top: 0; bottom: 0;
    width: 2px; background: var(--today);
    z-index: 5; pointer-events: none;
  }
  .today-line::before {
    content: 'Today · May 1';
    position: absolute; top: -24px; left: 50%;
    transform: translateX(-50%);
    background: var(--today); color: white;
    font-size: 10px; font-weight: 700;
    padding: 3px 8px; border-radius: 3px;
    white-space: nowrap; letter-spacing: 0.04em;
  }

  /* ========= RESPONSIVE ========= */
  @media (max-width: 1100px) {
    .task-cols { grid-template-columns: repeat(2, 1fr); }
    .task-col { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
    .task-col:nth-child(2) { border-right: none; }
    .task-col:nth-child(3), .task-col:nth-child(4) { border-bottom: none; }
  }
  @media (max-width: 900px) {
    .layout { grid-template-columns: 1fr; }
    .left-rail {
      position: fixed;
      top: 0;
      left: 0;
      bottom: 0;
      width: 280px;
      z-index: 15;
      transform: translateX(-100%);
      transition: transform 0.22s ease;
      box-shadow: 8px 0 24px -8px rgba(0,0,0,0.18);
    }
    .layout.rail-mobile-open .left-rail { transform: translateX(0); }
    .layout.rail-collapsed { grid-template-columns: 1fr; }
    .main-body { padding: 24px 20px 60px; }
    .main-head { padding-left: 56px; padding-right: 20px; }
    .rail-seam-toggle { left: 14px; transform: translateX(0); }
    .rail-brand-icon { display: none; }
    .rail-head { padding-left: 56px; }
  }
  @media (max-width: 700px) {
    .task-cols { grid-template-columns: 1fr; }
    .task-col { border-right: none; border-bottom: 1px solid var(--border); }
    .task-col:last-child { border-bottom: none; }
    .strip-week { flex-basis: 200px; min-width: 200px; min-height: 120px; }
    .task-head { padding: 16px 18px; gap: 10px; }
    .task-title { white-space: normal; overflow: visible; text-overflow: clip; }
    .task-title-wrap { flex-wrap: wrap; }

    /* Gantt modal: collapse phase column to an icon-only sticky strip, and
       let the week grid expand horizontally so chips stay readable. */
    .gantt-scroll { overflow-x: auto; overflow-y: hidden; }
    .gantt-board {
      grid-template-columns: 48px minmax(0, 1fr);
      width: max-content;
      min-width: 100%;
    }
    .gph-header {
      padding: 0;
      justify-content: center;
      font-size: 0;
    }
    .gph-row {
      padding: 14px 6px;
      font-size: 0;
      justify-content: center;
    }
    .gph-row .phase-dot { width: 12px; height: 12px; border-radius: 4px; }
    .gantt-weeks-row,
    .grow { grid-template-columns: repeat(6, 120px); }
  }

  /* ========= STATUS POPOVER ========= */
  .status-popover {
    position: absolute;
    z-index: 50;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 12px 28px -10px rgba(15, 23, 42, 0.22), 0 4px 10px -4px rgba(15, 23, 42, 0.10);
    padding: 6px;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .status-popover[hidden] { display: none; }
  .status-popover-item {
    appearance: none;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    color: var(--text);
    padding: 8px 10px;
    border-radius: 7px;
    display: grid;
    grid-template-columns: 14px 1fr auto;
    gap: 10px;
    align-items: center;
    text-align: left;
    line-height: 1.2;
  }
  .status-popover-item:hover,
  .status-popover-item:focus-visible {
    background: var(--paper);
    outline: none;
  }
  .status-popover-item.current { color: var(--text); font-weight: 600; }
  .status-popover-label { white-space: nowrap; }
  .status-check { width: 14px; height: 14px; color: var(--brand); flex: none; }
  .status-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    display: inline-block;
  }
  .status-dot.upcoming      { background: var(--muted-soft); }
  .status-dot.in-progress   { background: var(--blue-600); }
  .status-dot.input-pending { background: var(--danger-fg); }
  .status-dot.done          { background: var(--success-fg); }
