/* Harwood Office — one screen at any window size. The page never scrolls:
   charts sit in a carousel and the to-do list scrolls inside its own column. */
html, body { height: 100%; overflow: hidden; }
body { display: grid; grid-template-rows: auto minmax(0, 1fr); font-size: 15px; }

.topbar { display: flex; align-items: center; gap: 28px; padding: 0 28px; height: 52px; border-bottom: 2px solid var(--ink); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; color: var(--ink); text-decoration: none; }
.topbar nav { display: flex; gap: 2px; height: 100%; }
.topbar nav a { display: flex; align-items: center; padding: 0 12px; font-weight: 600; font-size: 14px; color: var(--muted);
                text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.topbar nav a.on { color: var(--ink); border-bottom-color: var(--brand); }
.topbar nav a.soon { color: var(--faint); cursor: default; }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 13.5px; color: var(--muted); }
.topbar .sync { height: 32px; padding: 0 12px; border: 1.5px solid var(--ink); font-weight: 700; font-size: 13px; color: var(--ink); }
.topbar .sync[disabled] { opacity: 0.5; }
.demo-flag { font: 700 11px var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: #fff; background: var(--brand); padding: 4px 8px; }

.body { display: grid; grid-template-columns: minmax(0, 1fr) clamp(340px, 30vw, 440px); min-height: 0; }
.main { display: grid; grid-template-rows: auto auto minmax(0, 1fr); min-height: 0; padding: 0 28px; }

.brief { padding: clamp(10px, 1.8vh, 18px) 0 clamp(8px, 1.2vh, 12px); }
.brief h1 { font-size: clamp(19px, 2.4vh, 24px); font-weight: 800; letter-spacing: -0.015em; line-height: 1.25; }
.brief p { color: var(--ink-2); margin-top: 2px; font-size: clamp(13.5px, 1.7vh, 15px); }
.brief .late { color: var(--imm); font-weight: 700; }
.brief .problem { color: var(--imm); font-weight: 600; }
.brief a { color: var(--brand); font-weight: 700; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1.5px solid var(--ink); border-bottom: 1px solid var(--rule); }
.kpi { padding: clamp(8px, 1.4vh, 14px) 0; min-width: 0; }
.kpi + .kpi { border-left: 1px solid var(--rule); padding-left: 24px; }
.kpi .label { font-size: 13px; font-weight: 600; color: var(--muted); }
.kpi .value { display: block; font-size: clamp(26px, 4vh, 36px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.kpi .value.empty { color: var(--faint); }
.kpi .note { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.kpi .note .up { color: var(--ok); font-weight: 700; } .kpi .note .down, .kpi .note .late { color: var(--imm); font-weight: 700; }

/* carousel */
.carousel { display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; padding: clamp(10px, 1.6vh, 16px) 0; }
.tabsrow { display: flex; align-items: center; gap: 6px; }
.tabsrow .tab { height: 32px; padding: 0 12px; font-size: 13px; font-weight: 700; color: var(--muted); border: 1.5px solid transparent; white-space: nowrap; }
.tabsrow .tab.on { color: var(--ink); border-color: var(--ink); }
.tabsrow .arrows { margin-left: auto; display: flex; gap: 6px; }
.tabsrow .arrows button { width: 36px; height: 32px; border: 1.5px solid var(--ink); font-size: 18px; line-height: 1; }
.viewport { overflow: hidden; min-height: 0; position: relative; margin-top: 10px; }
.track { display: flex; height: 100%; transition: transform 0.35s ease; }
@media (prefers-reduced-motion: reduce) { .track { transition: none; } }
.slide { flex: 0 0 100%; height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; }
.slide h2 { font-size: clamp(16px, 2.1vh, 19px); font-weight: 800; }
.slide h2 span { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-top: 1px; }
.slide .nodata { align-self: center; justify-self: start; color: var(--muted); font-size: 15px; }
.slide .nodata a { color: var(--brand); font-weight: 700; }

.cols { position: relative; display: grid; grid-template-rows: minmax(0, 1fr); align-items: stretch; padding: 22px 0 24px; min-height: 0; }
.cols .plot { position: absolute; left: 0; right: 0; top: 22px; bottom: 24px; pointer-events: none; z-index: 1; }
.cols .target { position: absolute; left: 0; right: 0; border-top: 1px solid var(--ink); }
.cols .target span { position: absolute; right: 0; top: -18px; font-size: 12px; color: var(--muted); background: var(--paper); padding-left: 6px; }
.cols .base { position: absolute; left: 0; right: 0; bottom: 0; border-top: 1px solid #e3dfd9; }
.cols .c { position: relative; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.cols .colbar { position: relative; width: min(28px, 55%); background: #d3cfc8; border-radius: 4px 4px 0 0; min-height: 1px; }
.cols .c.now .colbar, .cols.ink .colbar { background: #2b2925; }
.cols .c .m { position: absolute; bottom: -21px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.cols .v { position: absolute; left: 50%; transform: translateX(-50%); top: -20px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }

.hbars { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-auto-rows: minmax(0, 52px); align-content: space-evenly; column-gap: 14px; align-items: center; padding: 10px 0 0; min-height: 0; }
.hbars .l { font-size: 14px; color: var(--ink-2); text-align: right; white-space: nowrap; }
.hbars .t { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hbars .b { height: 18px; background: #2b2925; border-radius: 0 4px 4px 0; flex: none; min-width: 2px; }
.hbars .b.late { background: var(--imm); }
.hbars .v { font-size: 13px; font-weight: 700; white-space: nowrap; }
.stack { display: flex; gap: 2px; height: 18px; flex: 0 0 70%; }
.stack i { display: block; height: 100%; }
.stack i:last-child { border-radius: 0 4px 4px 0; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-2); margin-top: 4px; font-weight: 500; }
.legend i { display: inline-block; width: 10px; height: 10px; margin-right: 5px; vertical-align: -1px; }
.split { display: grid; grid-template-columns: 1.3fr 1fr; gap: 36px; min-height: 0; }
.payers { list-style: none; border-top: 1.5px solid var(--ink); align-self: center; }
.payers li { display: grid; grid-template-columns: 1fr auto; padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.payers li b { font: 700 13px var(--mono); }
.payers .h { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.weeklist { list-style: none; border-top: 1.5px solid var(--ink); margin-top: 10px; overflow: auto; align-self: start; }
.weeklist li { display: grid; grid-template-columns: 80px 56px minmax(0, 1fr) auto; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--rule); font-size: 14.5px; }
.weeklist b { font: 700 13px var(--mono); }
.weeklist .tm { font: 600 13px var(--mono); color: var(--muted); }
.weeklist .wh { color: var(--muted); font-size: 13px; }

/* to-do */
.todo { border-left: 2px solid var(--ink); display: grid; grid-template-rows: auto auto auto minmax(0, 1fr) auto; min-height: 0; padding: clamp(12px, 1.8vh, 18px) 22px 0 20px; }
.todo h2 { font-size: 16px; font-weight: 800; display: flex; justify-content: space-between; align-items: baseline; }
.todo h2 em { font: 700 12px var(--mono); font-style: normal; color: var(--muted); }
.add { display: flex; margin-top: 10px; }
.add input { flex: 1; min-width: 0; height: 40px; border: 1.5px solid var(--ink); border-right: none; padding: 0 12px; font: inherit; font-size: 14px; }
.add input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--brand); }
.add button { height: 40px; padding: 0 14px; background: var(--ink); color: #fff; font-weight: 700; font-size: 13.5px; }
.filters { display: flex; margin: 10px 0 8px; }
.filters button { flex: 1; height: 30px; border: 1.5px solid var(--ink); font-size: 12.5px; font-weight: 700; }
.filters button + button { border-left: none; }
.filters button.on { background: var(--ink); color: #fff; }
.list { list-style: none; overflow-y: auto; border-top: 1.5px solid var(--ink); min-height: 0; overscroll-behavior: contain; }
.list li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; column-gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.list input[type="checkbox"] { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--ink); }
.list .txt { font-size: 14px; font-weight: 700; line-height: 1.3; }
.list .meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.list .lnk { font: 600 12px var(--mono); color: var(--brand); margin-top: 2px; }
.list .src { font: 700 10.5px var(--sans); letter-spacing: 0.08em; text-transform: uppercase; margin-right: 6px; }
.list .src.email { color: var(--brand); } .list .src.me { color: var(--ink); }
.list .go { height: 30px; padding: 0 10px; border: 1.5px solid var(--ink); font-size: 12.5px; font-weight: 700; white-space: nowrap; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; }
.list li.done .txt { text-decoration: line-through; color: var(--faint); }
.list li.done .go { display: none; }
.list .empty { color: var(--muted); font-style: italic; border: none; display: block; }
.foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 0 clamp(10px, 1.6vh, 16px); font-size: 12.5px; color: var(--muted); }
.foot button { font-size: 12.5px; font-weight: 700; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* settings */
.settings { overflow-y: auto; padding: 24px 28px 48px; max-width: 760px; }
.settings h1 { font-size: 24px; font-weight: 800; }
.settings .intro { color: var(--ink-2); margin: 4px 0 18px; }
.conn { border-top: 1.5px solid var(--ink); padding: 16px 0 20px; }
.conn h2 { font-size: 17px; font-weight: 800; display: flex; justify-content: space-between; align-items: baseline; }
.conn h2 .st { font: 700 11px var(--sans); letter-spacing: 0.1em; text-transform: uppercase; }
.conn h2 .st.ok { color: var(--ok); } .conn h2 .st.no { color: var(--muted); }
.conn ol { margin: 8px 0 12px 20px; font-size: 14px; color: var(--ink-2); }
.conn ol li { margin: 3px 0; }
.conn code { font: 600 12.5px var(--mono); background: var(--tint); padding: 1px 5px; }
.conn label { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 10px 0 4px; }
.conn input { width: 100%; height: 42px; border: 1.5px solid var(--rule); padding: 0 12px; font: inherit; font-size: 14.5px; }
.conn input:focus { outline: none; border-color: var(--ink); }
.conn .row { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.conn .btn { height: 40px; font-size: 14px; text-decoration: none; }
.flash { padding: 10px 14px; margin-bottom: 14px; font-weight: 600; border-left: 5px solid var(--ok); background: #eef6f0; }
.flash.bad { border-left-color: var(--imm); background: #fbeeee; }

/* ---- pipeline ---- */
.body.pipe, .body.price { grid-template-columns: minmax(0, 1fr) clamp(360px, 32vw, 460px); }
.ledger { display: grid; grid-template-rows: auto auto minmax(0, 1fr); min-height: 0; padding: 0 28px; }
.ledger-top { display: flex; justify-content: space-between; align-items: flex-end; padding: 18px 0 10px; }
.ledger-top h1, .calc h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.01em; }
.sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.stagebar { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid var(--rule); }
.stab { padding: 10px 11px 8px; font-size: 13.5px; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.stab.on { color: var(--ink); border-bottom-color: var(--ink); }
.stab em { font: 700 11px var(--mono); font-style: normal; margin-left: 5px; }
.table-wrap { overflow-y: auto; min-height: 0; overscroll-behavior: contain; }
table.jobs { width: 100%; border-collapse: collapse; }
table.jobs th { position: sticky; top: 0; background: var(--paper); text-align: left; font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em;
                text-transform: uppercase; color: var(--muted); padding: 9px 10px 9px 0; border-bottom: 1.5px solid var(--ink); }
table.jobs td { padding: 0 10px 0 0; height: 56px; border-bottom: 1px solid var(--rule); font-size: 14.5px; vertical-align: middle; }
table.jobs tbody tr { cursor: pointer; }
table.jobs tbody tr:hover td { background: var(--tint); }
table.jobs tr.sel td { background: var(--brand-tint); }
table.jobs tr.sel td:first-child { box-shadow: inset 5px 0 0 var(--brand); padding-left: 10px; }
table.jobs td small { display: block; color: var(--muted); font-size: 12px; }
table.jobs .num { font-family: var(--mono); text-align: right; white-space: nowrap; }
table.jobs .stage { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }
table.jobs .margin.good { color: var(--ok); } table.jobs .margin.thin { color: var(--prog); }
table.jobs .act { font-weight: 700; font-size: 13.5px; padding-left: 14px; }
table.jobs .act.late { color: var(--imm); }
table.jobs .emptyrow { color: var(--muted); font-style: italic; }

.editor, .result { border-left: 2px solid var(--ink); overflow-y: auto; min-height: 0; padding: 20px 24px 28px; }
.editor h2, .result h2 { font-size: 19px; font-weight: 800; }
.edhint p { color: var(--muted); margin-top: 6px; font-size: 14px; }
.nextline { margin: 6px 0 10px; font-weight: 700; }
.nextline.late { color: var(--imm); }
.jobform { margin-top: 12px; border-top: 1.5px solid var(--ink); padding-top: 6px; }
.fld { display: block; margin-top: 10px; }
.fld span { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.fld input, .fld select, .fld textarea { width: 100%; height: 40px; border: 1.5px solid var(--rule); padding: 0 10px; font: inherit; font-size: 14.5px; background: #fff; }
.fld textarea { height: auto; padding: 8px 10px; resize: vertical; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-color: var(--ink); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 12px; }
.row { display: flex; gap: 10px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.row .btn { height: 40px; font-size: 14px; text-decoration: none; }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.err { color: var(--imm); font-weight: 600; font-size: 13.5px; min-height: 1em; margin-top: 8px; }

/* ---- pricing ---- */
.calc { overflow-y: auto; min-height: 0; padding: 18px 28px 28px; }
.calcform { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; margin-top: 12px; border-top: 1.5px solid var(--ink); padding-top: 4px; max-width: 760px; }
.calcform .check { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 14.5px; }
.calcform .check input { width: 20px; height: 20px; accent-color: var(--ink); }
.settings-note { margin-top: 22px; max-width: 760px; border-top: 1px solid var(--rule); padding-top: 12px; font-size: 13.5px; color: var(--ink-2); }
.settings-note h2 { font-size: 13px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 4px; }
.settings-note p { margin-top: 4px; }
.result .flag { background: var(--brand); color: #fff; font-weight: 700; font-size: 12.5px; padding: 8px 10px; margin-bottom: 12px; }
.result .lbl { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.result .fee { font-size: 40px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.result .fee small { font-size: 14px; font-weight: 600; color: var(--muted); }
.result .lines { list-style: none; margin-top: 10px; }
.result .lines li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--rule); font-size: 13.5px; }
.result .lines li span:last-child { font-family: var(--mono); white-space: nowrap; }
.result .lines .tot { font-weight: 800; border-bottom: 2px solid var(--ink); }
.result .lines .profit { font-weight: 800; color: var(--ok); }
.result .lines .profit.thin { color: var(--prog); }
.result .btn.big { width: 100%; margin-top: 16px; }

/* Online sign-in (Amendment A6): the page waits behind this until Clerk says you're in. */
.signin-veil { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px;
  background: var(--paper, #f4f1ea); overflow-y: auto; }
.signin-box { display: grid; gap: 16px; justify-items: center; }
.signin-brand { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 700; letter-spacing: .02em; }
.userbtn { display: inline-flex; align-items: center; margin-left: 12px; }
