/* Forward Deployed OS pieces, drawn in Growth OS's tokens (base.css is Growth OS's own stylesheet). Everything here is
   scoped to .fd (the page and the drawer) so it never changes how a Growth OS class looks. */
.fd { --r: 16px; }
.fd .page-head { align-items: flex-end; }
.fd .head-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fd .stack { display: grid; gap: 16px; }
.fd .grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.fd .grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.fd .span2 { grid-column: span 2; }
@media (max-width: 1000px) { .fd .grid3, .fd .grid2 { grid-template-columns: minmax(0, 1fr); } .fd .span2 { grid-column: auto; } }
.fd .card { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; border-radius: var(--r); }
.fd .card h3 { font-size: 15px; font-weight: 650; margin: 0; display: flex; align-items: center; gap: 8px; }
.fd .chead { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.fd .inner { background: var(--rail, var(--panel-2)); border: 0; border-radius: 14px; }
.fd .empty { text-align: left; padding: 12px 14px; margin: 0; }
.fd p { margin: 0; }
.fd .small { font-size: 12.5px; }

/* Mine / Team and the stat pills */
.fd .whose { display: inline-flex; background: var(--sunk); border-radius: 999px; padding: 3px; }
.fd .whose button { border: 0; background: transparent; color: var(--muted); padding: 5px 13px; font-size: 13px; font-weight: 600; }
.fd .whose button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.fd .pills { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.fd .pills button { background: var(--card, var(--panel)); border: 0; border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; color: var(--ink-2); font-weight: 500; font-size: 12.5px; }
.fd .pills button b { font-family: "Inter Tight", var(--font); font-size: 28px; font-weight: 700; color: var(--ink); letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.fd .pills button:hover { box-shadow: inset 0 0 0 1px var(--accent); }
@media (max-width: 760px) { .fd .pills { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Segments and toolbars */
.fd .seg { margin: 0; }
.fd .seg button[aria-selected="true"] { background: var(--sel-bg); border-color: var(--sel-bg); color: var(--sel-ink); }
.fd .tools { margin: 0; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fd .tools select { width: auto; }

/* Agenda */
.fd .agenda { list-style: none; margin: 0; padding: 0; }
.fd .agenda li { display: grid; grid-template-columns: 76px 1fr; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); }
.fd .agenda li:first-child { border-top: 0; }
.fd .agenda li.past { opacity: .5; }
.fd .time { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12px; color: var(--muted); white-space: nowrap; padding-top: 2px; }
.fd .agenda .what span { display: block; color: var(--muted); font-size: 13px; }
.fd .agenda a { color: var(--link, var(--accent)); }

/* Items */
.fd .fdlist { list-style: none; margin: 0; padding: 0; background: var(--rail, var(--panel-2)); border: 0; border-radius: 14px; display: block; }
.fd .item { display: grid; grid-template-columns: 10px 1fr; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); }
.fd .item:first-child { border-top: 0; }
.fd .item .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; background: var(--muted); }
.fd .k-action .dot { background: var(--c1); } .fd .k-check .dot { background: var(--c3); } .fd .k-decision .dot { background: #7a4fd0; } .fd .k-waiting .dot { background: var(--c4); } .fd .k-done .dot { background: var(--ok); }
.fd .item .t { font-weight: 600; cursor: pointer; white-space: normal; }
.fd .item.is-done .t { text-decoration: line-through; color: var(--muted); }
.fd .item .d { margin: 2px 0 0; color: var(--ink-2); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.fd .item.open .d { display: block; }
.fd .imeta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.fd .pill.ac { cursor: pointer; background: var(--accent-soft); color: var(--accent); }
.fd .pill.unclear { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.fd .src { font-size: 12.5px; color: var(--link, var(--accent)); text-decoration: none; }
.fd .src:hover { text-decoration: underline; }
.fd .focus { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fd .fcard { background: var(--rail, var(--panel-2)); border-radius: 14px; padding: 12px 14px; display: grid; grid-template-columns: 28px 1fr; gap: 10px; border: 0; }
.fd .fnum { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; display: grid; place-items: center; }

/* Accounts */
.fd .accts { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.fd .acct { background: var(--card, var(--panel)); border: 0; border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; align-items: stretch; gap: 8px; text-align: left; color: var(--ink); font-weight: 400; }
.fd .card .acct { background: var(--rail, var(--panel-2)); }
.fd .acct:hover { box-shadow: inset 0 0 0 1px var(--accent); background: var(--card, var(--panel)); }
.fd .acct .an { font-family: "Inter Tight", var(--font); font-weight: 700; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.fd .health { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.fd .h-green { background: var(--ok); } .fd .h-yellow { background: var(--warn); } .fd .h-red { background: var(--bad); }
.fd .stagebar { display: flex; gap: 3px; }
.fd .stagebar i { flex: 1; height: 6px; border-radius: 999px; background: var(--line); }
.fd .stagebar i.on { background: var(--accent); }
.fd .acct .arow { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.fd .acct .arow b { color: var(--ink); }
.fd .fdboard { display: grid; grid-template-columns: repeat(6, minmax(190px, 1fr)); gap: 10px; overflow-x: auto; }
.fd .fdboard .col { background: var(--sunk); border-radius: var(--r); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.fd .fdboard .col h4 { margin: 0 0 2px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: flex; justify-content: space-between; }

/* Tables */
.fd .tablewrap { overflow-x: auto; background: var(--rail, var(--panel-2)); border-radius: 14px; }
.fd table { border-collapse: collapse; width: 100%; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.fd th, .fd td { text-align: left; padding: 9px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.fd thead th { border-top: 0; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.fd td.num, .fd th.num { text-align: right; }
.fd td a { color: var(--link, var(--accent)); }
.fd .st { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--panel-2); color: var(--ink-2); white-space: nowrap; }
.fd .st-signed, .fd .st-delivered { color: var(--ok); background: var(--ok-soft); }
.fd .st-sent { color: var(--accent); background: var(--accent-soft); }

/* Impact */
.fd .mstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.fd .mstats > div { background: var(--card, var(--panel)); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.fd .mstats .n { font-family: "Inter Tight", var(--font); font-size: 28px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.fd .mstats .l { font-size: 12.5px; color: var(--ink-2); }
.fd .fdhb { display: grid; gap: 8px; padding: 12px 14px; }
.fd .fdhbr { display: grid; grid-template-columns: minmax(80px, 150px) 1fr auto; gap: 12px; align-items: center; font-size: 13.5px; }
.fd .fdhbr .bar { height: 18px; border-radius: 6px; background: #2a78d6; }
.fd .fdhbr .bar.zero { background: transparent; }

/* Forms in the drawer */
.fd .form { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; align-items: center; }
.fd .form label { margin: 0; }
.fd .form .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .fd .form { grid-template-columns: minmax(0, 1fr); } }
.drawer-panel.fd h2 { font-size: 20px; display: flex; align-items: center; gap: 8px; }
.drawer-panel.fd > h3 { font-size: 14px; margin: 6px 0 -6px; }

/* Settings */
.fd .people { list-style: none; margin: 0; padding: 0; }
.fd .people li { display: flex; gap: 10px; align-items: center; padding: 9px 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.fd .people li:first-child { border-top: 0; }
.fd .people .pn { flex: 1; min-width: 180px; }
.fd .people select { width: auto; }
.fd .addperson { padding: 12px 14px; border-top: 1px solid var(--line); }
.fd .addperson input { width: auto; flex: 1; min-width: 160px; }

/* Time tracking */
.fd .clock { display: inline-flex; align-items: center; }
.fd .clock .on { display: inline-flex; align-items: center; gap: 8px; background: var(--ok-soft); color: var(--ok); border-radius: 999px; padding: 4px 4px 4px 12px; font-size: 13px; font-weight: 600; }
.fd .clock .on .tick { font-family: "IBM Plex Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.fd .clock .on .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: fdpulse 1.6s infinite; }
@keyframes fdpulse { 50% { opacity: .3; } }
.fd .clock .on button { border: 0; background: var(--ok); color: #fff; padding: 4px 11px; font-weight: 600; }
.fd .burn { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; min-width: 80px; }
.fd .burn span { display: block; height: 100%; background: #2a78d6; border-radius: 999px; }
.fd .burn.over span { background: var(--bad); }
.fd .li-row { display: grid; grid-template-columns: 1fr 150px auto; gap: 12px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); }
.fd .li-row:first-child { border-top: 0; }
.fd .li-row .lt { font-weight: 600; }
.fd .li-row .lh { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .fd .li-row { grid-template-columns: minmax(0, 1fr); } }
.fd table.tsheet td, .fd table.tsheet th { text-align: right; white-space: nowrap; }
.fd table.tsheet td:first-child, .fd table.tsheet th:first-child { text-align: left; white-space: normal; }
.fd table.tsheet tfoot td { font-weight: 700; border-top: 2px solid var(--line); }
.fd table.tsheet .today { background: var(--accent-soft); }

/* Toast with Undo */
.fdtoast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 60; background: var(--accent); color: var(--accent-ink); border-radius: 12px; padding: 9px 9px 9px 14px; font-weight: 550; display: flex; gap: 12px; align-items: center; box-shadow: 0 10px 30px rgba(10,14,20,.25); max-width: calc(100% - 32px); }
.fdtoast button { border: 0; background: transparent; color: inherit; font-weight: 700; text-decoration: underline; padding: 4px 6px; }
@media (max-width: 760px) { .fdtoast { bottom: calc(84px + env(safe-area-inset-bottom)); } }
.nav nav a.on { background: var(--nav-on-bg); color: var(--nav-on-ink); }
.nav-foot .me { flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.25; }
.nav-foot .me b { font-weight: 600; color: var(--nav-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.nav-foot .me span { font-size: 11.5px; color: var(--nav-dim); }
.nav .brand .brand-name { line-height: 1.15; }

/* Revenue */
.fd table.rev td, .fd table.rev th { white-space: nowrap; }
.fd table.rev td:first-child { white-space: normal; min-width: 200px; }
.fd table.rev tfoot td { font-weight: 700; border-top: 2px solid var(--line); }
.fd table.rev tr.drift td { background: var(--warn-soft); }
.nav nav a[hidden] { display: none !important; }
.fd .stack > *, .fd #revBox > * { min-width: 0; }
.fd #revBox { display: grid; gap: 16px; }

/* Update with AI */
.fd .ai-acts .item { align-items: flex-start; justify-content: space-between; gap: 12px; }
.fd .ai-row { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-weight: 400; cursor: pointer; }
.fd .ai-row input { margin-top: 4px; }

/* Planner */
.fd .fpgrid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.fd .fpg-h { font-size: 12px; color: var(--muted); font-weight: 600; padding: 0 4px; }
.fd .fpday { min-height: 104px; border: 1px solid var(--line); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 4px; background: var(--panel); min-width: 0; }
.fd .fpday.past { opacity: .55; }
.fd .fpday.today { border: 2px solid var(--accent); }
.fd .fpd-h { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--ink-2); font-weight: 600; }
.fd .bd { font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: #0F2A4A; color: #fff; }
.fd .fpev { all: unset; box-sizing: border-box; font-size: 12px; line-height: 1.3; padding: 3px 6px 3px 8px; border-radius: 6px; border-left: 3px solid; background: var(--bg-2, rgba(127,127,127,.08)); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd .fpev:hover { background: var(--accent-soft); }
.fd .pk-call { border-color: #2a78d6 !important; }
.fd .pk-due { border-color: #1baf7a !important; }
.fd .pk-they { border-color: #eda100 !important; }
.fd .pk-late { border-color: var(--bad) !important; }
.fd .pk-deliv { border-color: #e87ba4 !important; }
.fd .pk-live { border-color: #eb6834 !important; }
.fd .legend i.pk-call { background: #2a78d6; } .fd .legend i.pk-due { background: #1baf7a; } .fd .legend i.pk-they { background: #eda100; }
.fd .legend i.pk-late { background: var(--bad); } .fd .legend i.pk-deliv { background: #e87ba4; } .fd .legend i.pk-live { background: #eb6834; } .fd .legend i.bdk { background: #0F2A4A; }
[data-theme=dark] .fd .pk-call { border-color: #3987e5 !important; } [data-theme=dark] .fd .pk-due { border-color: #199e70 !important; } [data-theme=dark] .fd .pk-they { border-color: #c98500 !important; }
[data-theme=dark] .fd .pk-deliv { border-color: #d55181 !important; } [data-theme=dark] .fd .pk-live { border-color: #d95926 !important; }
[data-theme=dark] .fd .bd, [data-theme=dark] .fd .legend i.bdk { background: #7FB8EE; color: #0F2A4A; }
@media (max-width: 760px) { .fd .fpgrid { grid-template-columns: minmax(0, 1fr); } .fd .fpg-h { display: none; } .fd .fpday { min-height: 0; } .fd .fpday:not(.busy):not(.today) { display: none; } }
.fd input[type=checkbox] { width: auto; flex: none; }
.fd textarea { flex-shrink: 0; min-height: 5.5em; }
.fd .ai-row { font-size: 14px; color: var(--ink); }
.fd .ai-row > span { flex: 1; min-width: 0; }
.fd .ai-acts .item > span:last-child { flex: none; }
.fd .ai-acts .item { display: flex !important; grid-template-columns: none; }
.fd .ai-acts .ai-row { flex: 1; min-width: 0; }

/* Build fee */
.fd .bfgrid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: stretch; }
.fd .bfleft { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.fd .bfscope { flex: 1; display: flex; flex-direction: column; }
.fd .bfscope #qScope { flex: 1; min-height: 120px; }
.fd .bfsign .bfsteps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fd .bfsign .bfstep { flex-direction: column; align-items: flex-start; }
@media (max-width: 760px) { .fd .bfsign .bfsteps { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1100px) { .fd .bfgrid { grid-template-columns: minmax(0, 1fr); } }
.fd .bfside { display: flex; flex-direction: column; gap: 10px; }
.fd .bfbig { font-family: "Inter Tight", var(--font); font-size: 34px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.fd .bfopts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fd .bfopts label, .fd .bfhead label { margin: 0 0 4px; }
.fd .bfhead { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fd .bfdl { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; margin: 4px 0 0; font-size: 13.5px; }
.fd .bfdl dt { color: var(--ink-2); } .fd .bfdl dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.fd .bfdl .total { border-top: 1px solid var(--line); padding-top: 5px; color: var(--ink); font-weight: 650; }
.fd .bfwarn { color: var(--bad); font-weight: 600; }
.fd .bfsteps { display: grid; gap: 6px; }
.fd .bfstep { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13.5px; padding: 8px 10px; border-radius: 8px; background: var(--bg-2, rgba(127,127,127,.07)); }
.fd .bfstep.done { background: var(--accent-soft); } .fd .bfstep.na { opacity: .6; }
.fd .tablewrap { overflow-x: auto; }
.fd table.bf { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 760px; }
.fd table.bf th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.fd table.bf td { padding: 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.fd table.bf .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fd table.bf select { width: 160px; } .fd .bfask { min-width: 210px; }
.fd .bfchips { display: flex; flex-wrap: nowrap; gap: 4px; }
.fd .bfchip { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-size: 12px; font-weight: 500; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px 2px 5px; cursor: pointer; }
.fd .bfchip:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); }
.fd .bfchip input { width: 13px; height: 13px; margin: 0; }

/* Included hours: used (navy), this ask (sky), left (light). */
.fd .hrsbar { display: flex; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; gap: 2px; margin: 6px 0 2px; }
.fd .hrsbar span { display: block; height: 100%; background: var(--ink); border-radius: 4px; }
.fd .hrsbar span.this { background: var(--lime); }
.fd .hrsbar span.full { background: var(--bad); }
.fd .bfhead .full { grid-column: 1 / -1; }
