/* Gofuso Runway - embedded in Gofuso Zero.
   Generated from runway-src/assets/{tokens,app}.css by the Stage 2 merge.

   Two deliberate differences from the standalone stylesheet:
   1. Every selector is scoped under #rw-root, so nothing here can touch the inbox.
   2. The tokens Zero already defines are NOT redeclared - Runway inherits them,
      which is what makes it follow Zero's light/dark theme with no code of its own.
      Only Runway-specific tokens (the lane palette and timeline metrics) are set. */
/* Layout: .content (Zero's main pane) is position:relative with padding and its own
   scroll. Filling it absolutely lets Runway own its area exactly, ignore that padding,
   and manage its own internal scrolling - so there is never a double scrollbar. */
#rw-root {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  font-family: var(--font);
  overflow: hidden;
}

#rw-root {
  --panel3: rgba(255, 255, 255, .08);
  --acc-soft: rgba(33, 113, 184, .16);
  --today: #f87171;
  --c1: #12A1DD;
  --c2: #8b7cf6;
  --c3: #34d399;
  --c4: #fbbf24;
  --c5: #f472b6;
  --c6: #2dd4bf;
  --c7: #94a3b8;
  --c8: #64748b;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .3);
  --radius-sm: 9px;
  --bar-radius: 6px;
  --lane-w: 288px;
  --row-h: 34px;
  --row-gap: 4px;
  --axis-h: 54px;
  --font: 'Inter', -apple-system, 'Segoe UI', system-ui, Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
}

[data-theme="light"] #rw-root {
  --panel3: rgba(15, 20, 40, .09);
  --acc-soft: rgba(33, 113, 184, .12);
  --today: #dc2626;
  --c1: #0b7fb0;
  --c2: #6d4fd6;
  --c3: #059669;
  --c4: #b45309;
  --c5: #db2777;
  --c6: #0d9488;
  --c7: #64748b;
  --c8: #475569;
  --shadow-sm: 0 2px 8px rgba(20, 25, 60, .08);
}

#rw-root /* Gofuso Runway - shell, #rw-root controls and screens */

#rw-root *, #rw-root *::before, #rw-root *::after { box-sizing: border-box; }

#rw-root button, #rw-root input, #rw-root select { font: inherit; color: inherit; }
#rw-root button { cursor: pointer; }
#rw-root a { color: var(--acc2); }

#rw-root .app { display: flex; flex-direction: column; height: 100%; min-height: 0; }

#rw-root /* ---------------- top bar ---------------- */

.top {
  display: flex; align-items: center; gap: 14px;
  padding: 0 14px; height: 56px; flex: 0 0 auto;
  background: var(--bg2); border-bottom: 1px solid var(--border);
  position: relative; z-index: 60;
}

#rw-root .brand { display: flex; align-items: center; gap: 9px; font-weight: 650; letter-spacing: -.01em; }
#rw-root .brand-mark {
  width: 28px; height: 28px; border-radius: 9px; background: var(--grad);
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 15px;
  box-shadow: 0 2px 10px rgba(18, 161, 221, .35); flex: 0 0 auto;
}
#rw-root .brand-name { font-size: 15px; }
#rw-root .brand-name small { color: var(--text2); font-weight: 500; }

#rw-root .top-sep { width: 1px; height: 24px; background: var(--border); }
#rw-root .spacer { flex: 1 1 auto; }

#rw-root /* segmented control */
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 2px; }
#rw-root .seg button {
  border: 0; background: transparent; color: var(--text2);
  padding: 5px 11px; border-radius: 8px; font-size: 12.5px; font-weight: 500;
  transition: background .15s, color .15s;
}
#rw-root .seg button:hover { color: var(--text); }
#rw-root .seg button[aria-pressed="true"] { background: var(--panel3); color: var(--text); }

#rw-root .btn {
  border: 1px solid var(--border2); background: var(--panel);
  padding: 7px 13px; border-radius: 10px; font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 7px;
  transition: background .15s, border-color .15s;
}
#rw-root .btn:hover { background: var(--panel2); }
#rw-root .rw-btn-primary { background: var(--grad); border-color: transparent; color: #fff; font-weight: 600; }
#rw-root .rw-btn-primary:hover { filter: brightness(1.08); background: var(--grad); }
#rw-root .btn-ghost { border-color: transparent; background: transparent; color: var(--text2); }
#rw-root .btn-ghost:hover { background: var(--panel); color: var(--text); }
#rw-root .btn:disabled { opacity: .45; cursor: not-allowed; }

#rw-root .field {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; padding: 7px 11px; min-width: 0;
}
#rw-root .field:focus { outline: 2px solid var(--acc); outline-offset: -1px; }
#rw-root select.field { padding-right: 26px; }

#rw-root .rw-search { position: relative; }
#rw-root .rw-search input { width: 210px; padding-left: 30px; }
#rw-root .rw-search::before {
  content: ''; position: absolute; left: 10px; top: 50%; width: 13px; height: 13px;
  transform: translateY(-50%); opacity: .5;
  background: currentColor;
  -webkit-mask: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
  mask: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
}

#rw-root /* ---------------- source bar ---------------- */

.sources {
  display: flex; align-items: center; gap: 8px; flex: 0 0 auto;
  padding: 8px 14px; background: var(--bg2);
  border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: thin;
}
#rw-root .chip {
  display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto;
  border: 1px solid var(--border2); background: var(--panel);
  padding: 5px 11px 5px 8px; border-radius: 999px; font-size: 12.5px;
  transition: background .15s, opacity .15s;
}
#rw-root .chip:hover { background: var(--panel2); }
#rw-root .chip[aria-pressed="false"] { opacity: .42; }
#rw-root .chip-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
#rw-root .chip-n { color: var(--text2); font-variant-numeric: tabular-nums; font-size: 11.5px; }
#rw-root .chip-x { opacity: .5; margin-left: 2px; }
#rw-root .chip-x:hover { opacity: 1; }

#rw-root /* ---------------- timeline shell ---------------- */

.rw-main { flex: 1 1 auto; min-height: 0; position: relative; display: flex; }
#rw-root .tl-wrap { flex: 1 1 auto; min-width: 0; position: relative; }

#rw-root .tl { position: absolute; inset: 0; overflow: auto; scrollbar-width: thin; }
#rw-root .tl-inner { position: relative; width: max-content; min-width: 100%; }

#rw-root /* header row: axis sticks to top, #rw-root corner sticks to top-left */
.tl-headrow { display: flex; position: sticky; top: 0; z-index: 30; }
#rw-root .tl-corner {
  position: sticky; left: 0; z-index: 32; flex: 0 0 var(--lane-w); width: var(--lane-w);
  height: var(--axis-h); background: var(--bg2);
  border-right: 1px solid var(--border2); border-bottom: 1px solid var(--border2);
  display: flex; align-items: flex-end; padding: 0 12px 7px;
}
#rw-root .tl-corner-label { font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: .07em; }

#rw-root .tl-axis {
  height: var(--axis-h); background: var(--bg2);
  border-bottom: 1px solid var(--border2); position: relative; flex: 0 0 auto;
}
#rw-root .tl-axis-major, #rw-root .tl-axis-minor { position: absolute; left: 0; right: 0; }
#rw-root .tl-axis-major { top: 0; height: 26px; }
#rw-root .tl-axis-minor { top: 26px; height: 27px; }
#rw-root .tl-maj {
  position: absolute; top: 0; height: 26px; display: flex; align-items: center;
  padding-left: 9px; font-size: 11.5px; font-weight: 600; color: var(--text2);
  border-left: 1px solid var(--border2); white-space: nowrap; overflow: hidden;
}
#rw-root .tl-min {
  position: absolute; top: 0; height: 27px; display: flex; align-items: center; justify-content: center;
  font-size: 10.5px; color: var(--text3); border-left: 1px solid var(--border);
  font-variant-numeric: tabular-nums; overflow: hidden;
}
#rw-root .tl-min.is-weekend { color: var(--text3); background: rgba(255,255,255,.05); }
#rw-root .tl-min span, #rw-root .tl-maj span { pointer-events: none; }

#rw-root /* background grid + today line */
.tl-bg {
  position: absolute; left: var(--lane-w); top: var(--axis-h); bottom: 0;
  z-index: 0; pointer-events: none;
}
#rw-root .tl-grid { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--border); opacity: .55; }
#rw-root .tl-grid.is-weekend { background: rgba(255,255,255,.055); }
#rw-root .tl-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--today); opacity: .85; z-index: 3; }
#rw-root .tl-today span {
  position: absolute; top: 2px; left: 4px; font-size: 10px; font-weight: 700;
  color: var(--today); text-transform: uppercase; letter-spacing: .08em; white-space: nowrap;
}

#rw-root /* rows */
.tl-rows { position: relative; z-index: 1; padding-bottom: 60px; }
#rw-root .tl-row { display: flex; align-items: stretch; min-height: var(--row-h); }
#rw-root .tl-lane {
  position: sticky; left: 0; z-index: 20; flex: 0 0 var(--lane-w); width: var(--lane-w);
  background: var(--bg); border-right: 1px solid var(--border2);
  display: flex; align-items: center; gap: 8px; padding: 0 12px; min-height: var(--row-h);
}
#rw-root .tl-lane-head { background: var(--bg2); }
#rw-root .tl-grouprow { min-height: 30px; }
#rw-root .tl-grouprow .tl-lane { border-top: 1px solid var(--border); }
#rw-root .tl-track-head { border-top: 1px solid var(--border); background: var(--panel); }
#rw-root .tl-lane-label {
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto;
}
#rw-root .tl-count {
  font-size: 10.5px; color: var(--text3); background: var(--panel2);
  padding: 1px 6px; border-radius: 999px; font-variant-numeric: tabular-nums; flex: 0 0 auto;
}
#rw-root .tl-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
#rw-root .tl-track { position: relative; flex: 0 0 auto; min-height: var(--row-h); }

#rw-root /* bars */
.tl-bar {
  position: absolute; top: 4px; height: calc(var(--row-h) - 12px);
  background: var(--c); border-radius: var(--bar-radius);
  display: flex; align-items: center; overflow: hidden;
  cursor: pointer; box-shadow: var(--shadow-sm);
  transition: filter .12s, transform .12s;
}
#rw-root .tl-bar:hover { filter: brightness(1.14); transform: translateY(-1px); }
#rw-root .tl-prog { position: absolute; inset: 0 auto 0 0; background: rgba(0, 0, 0, .28); }
#rw-root [data-theme="light"] .tl-prog { background: rgba(255, 255, 255, .38); }
#rw-root .tl-bar-label {
  position: relative; z-index: 1; padding: 0 8px; font-size: 11.5px; font-weight: 600;
  color: #06121c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .18);
}
#rw-root [data-theme="light"] .tl-bar-label { color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, .25); }

#rw-root .tl-ms { position: absolute; top: 4px; height: calc(var(--row-h) - 12px); display: flex; align-items: center; cursor: pointer; }
#rw-root .tl-ms i {
  width: 13px; height: 13px; background: var(--c); transform: rotate(45deg);
  border-radius: 2px; flex: 0 0 auto; margin-left: -6px; box-shadow: var(--shadow-sm);
}
#rw-root .tl-ms:hover i { filter: brightness(1.2); }
#rw-root .tl-ms-label {
  margin-left: 8px; font-size: 11.5px; color: var(--text2); white-space: nowrap;
  max-width: 260px; overflow: hidden; text-overflow: ellipsis;
}

#rw-root .tl-empty { padding: 40px; color: var(--text3); text-align: center; }

#rw-root /* tooltip */
.tl-tip {
  position: fixed; z-index: 200; display: none; pointer-events: none;
  background: var(--bg2); border: 1px solid var(--border2); border-radius: 10px;
  padding: 8px 11px; box-shadow: var(--shadow); max-width: 380px;
}
#rw-root .tl-tip strong { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 3px; }
#rw-root .tl-tip em { display: block; font-size: 11.5px; color: var(--text2); font-style: normal; }

#rw-root /* ---------------- detail drawer ---------------- */

.drawer {
  flex: 0 0 340px; width: 340px; background: var(--bg2);
  border-left: 1px solid var(--border); overflow-y: auto; padding: 18px;
}
#rw-root .drawer h3 { margin: 0 0 4px; font-size: 15.5px; line-height: 1.3; }
#rw-root .drawer .ref { font-family: var(--mono); font-size: 11px; color: var(--text3); }
#rw-root .drawer dl { margin: 16px 0 0; display: grid; grid-template-columns: 96px 1fr; gap: 9px 12px; }
#rw-root .drawer dt { color: var(--text3); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
#rw-root .drawer dd { margin: 0; font-size: 13px; }
#rw-root .drawer-close { position: absolute; top: 10px; right: 12px; }

#rw-root /* ---------------- screens ---------------- */

.screen {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: var(--bg); z-index: 80; padding: 24px; overflow-y: auto;
}
#rw-root .card {
  width: 100%; max-width: 460px; background: var(--bg2);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
#rw-root .card.wide { max-width: 760px; }
#rw-root .card h1 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.02em; }
#rw-root .card h2 { margin: 0 0 6px; font-size: 17px; }
#rw-root .card p.sub { margin: 0 0 20px; color: var(--text2); font-size: 13.5px; }
#rw-root .card label { display: block; font-size: 12px; color: var(--text2); margin: 12px 0 5px; }
#rw-root .card .field { width: 100%; }
#rw-root .card .actions { margin-top: 20px; display: flex; gap: 10px; align-items: center; }

#rw-root .notice { padding: 10px 13px; border-radius: 10px; font-size: 12.5px; margin-top: 14px; }
#rw-root .notice-err { background: rgba(248, 113, 113, .12); color: var(--red); border: 1px solid rgba(248, 113, 113, .3); }
#rw-root .notice-ok { background: rgba(52, 211, 153, .1); color: var(--green); border: 1px solid rgba(52, 211, 153, .28); }
#rw-root .notice-info { background: var(--acc-soft); color: var(--acc2); border: 1px solid rgba(18, 161, 221, .3); }

#rw-root /* wizard */
.pick-list { max-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; margin-top: 8px; }
#rw-root .pick {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 10px 13px; background: transparent; border: 0; border-bottom: 1px solid var(--border);
}
#rw-root .pick:last-child { border-bottom: 0; }
#rw-root .pick:hover { background: var(--panel); }
#rw-root .pick-main { flex: 1 1 auto; min-width: 0; }
#rw-root .pick-title { font-size: 13.5px; font-weight: 550; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#rw-root .pick-sub { font-size: 11.5px; color: var(--text3); }
#rw-root .pick-badge { font-size: 11px; color: var(--text3); background: var(--panel2); padding: 2px 7px; border-radius: 999px; }

#rw-root .steps { display: flex; gap: 6px; margin-bottom: 18px; font-size: 11.5px; color: var(--text3); align-items: center; }
#rw-root .steps b { color: var(--text); font-weight: 600; }

#rw-root .map-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-top: 6px; }
@media (max-width: 620px) { #rw-root .map-grid { grid-template-columns: 1fr; } }

#rw-root .spinner {
  width: 15px; height: 15px; border-radius: 50%; flex: 0 0 auto;
  border: 2px solid var(--border2); border-top-color: var(--acc2);
  animation: rw-rw-spin .7s linear infinite; display: inline-block;
}
@keyframes rw-spin { to { transform: rotate(360deg); } }

#rw-root .status-line { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text2); }

#rw-root /* ---------------- mobile ---------------- */

@media (max-width: 760px) {
  #rw-root { --lane-w: 148px; }
  #rw-root .top { gap: 8px; padding: 0 10px; }
  #rw-root .brand-name small, #rw-root .top-sep, #rw-root .rw-search input { display: none; }
  #rw-root .rw-search { display: none; }
  #rw-root .drawer { position: absolute; inset: 0 0 0 auto; width: min(340px, 92vw); z-index: 90; box-shadow: var(--shadow); }
  #rw-root .sources { padding: 6px 10px; }
}

#rw-root /* ---- record rows: name in the fixed left column, #rw-root bar carries dates ---- */

.tl-lane-item { justify-content: space-between; gap: 6px; }
#rw-root .tl-item-title {
  font-size: 12.5px; color: var(--text); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; min-width: 0;
}
#rw-root .tl-item-pct {
  font-size: 10.5px; color: var(--text3); font-variant-numeric: tabular-nums; flex: 0 0 auto;
}
#rw-root .tl-item-multi { font-size: 11.5px; color: var(--text3); font-style: italic; }
#rw-root .tl-row:hover .tl-lane-item { background: var(--panel); }
#rw-root .tl-row:hover .tl-item-title { color: var(--acc2); }

#rw-root /* label hung off the end of a bar too narrow to contain it */
.tl-bar.is-narrow { overflow: visible; }
#rw-root .tl-bar-out {
  position: absolute; left: 100%; top: 50%; transform: translateY(-50%);
  margin-left: 7px; font-size: 11.5px; color: var(--text2);
  white-space: nowrap; pointer-events: none; max-width: 320px;
  overflow: hidden; text-overflow: ellipsis;
}

#rw-root /* today marker: readable chip that does not collide with the first lane */
.tl-today span {
  background: var(--today); color: #fff; padding: 1px 5px 2px;
  border-radius: 0 4px 4px 0; top: 0; left: 2px; letter-spacing: .06em;
}

#rw-root [data-theme="light"] .tl-grid.is-weekend { background: rgba(15,20,40,.05); }
#rw-root [data-theme="light"] .tl-min.is-weekend { background: rgba(15,20,40,.045); }
