/* Workspace layout on top of review.css (the NWA demo review stylesheet). Tokens come from review.css. */
html, body { height: 100%; }
body { display: flex; flex-direction: column; overflow: hidden; }
.topbar { position: static; flex: none; transition: margin-top .18s ease; }
body.compact .topbar { margin-top: calc(-1 * var(--bar)); }
.bar-actions { display: flex; align-items: center; gap: 8px; align-self: center; margin-left: auto; }
.bar-actions a.btn-2 { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); }
.crumbs { font-weight: 600; color: var(--heading); display: inline-flex; align-items: center; gap: 8px; }
.crumbs .mark { width: 20px; height: 23px; flex: none; }
.tip { position: relative; display: inline-flex; }
#feedbackBtn[hidden] { display: none; }
.tip > button:disabled { pointer-events: none; }
.tip[data-why]:hover::after { content: attr(data-why); position: absolute; top: calc(100% + 8px); right: 0; z-index: 40; background: var(--ink); color: #fff; font-size: var(--text-sm); font-weight: 500; padding: 6px 10px; border-radius: 6px; white-space: nowrap; }
.proposal-bar { flex: none; background: var(--surface); border-bottom: 1px solid var(--line); padding: 0 20px; }
.proposal-bar .tabs { border-bottom: 0; }
.tab .pending { font-size: var(--text-xs); font-weight: 500; color: var(--muted); background: var(--neutral-tint); border-radius: 3px; padding: 1px 6px; }
.tab .pending.decide { background: var(--warn-tint); color: var(--warn); }

/* Panes */
.split { flex: 1; display: flex; min-height: 0; }
.left { width: 560px; min-width: 400px; max-width: 70vw; display: flex; flex-direction: column; padding: 14px 0 14px 16px; min-height: 0; }
.gutter { width: 16px; flex: none; cursor: col-resize; position: relative; }
.gutter::after { content: ""; position: absolute; top: 14px; bottom: 14px; left: 7px; width: 2px; border-radius: 1px; }
.gutter:hover::after, .gutter.drag::after { background: var(--line-2); }
.hsplit { flex: none; height: 12px; cursor: row-resize; position: relative; }
.hsplit::after { content: ""; position: absolute; left: 50%; top: 4px; width: 48px; height: 4px; margin-left: -24px; border-radius: 2px; background: var(--line-2); }
.hsplit:hover::after, .hsplit.drag::after { background: var(--muted); }
.work { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.right { flex: 1; min-width: 0; display: flex; padding: 14px 16px 14px 0; }
.right .pane { flex: 1; min-width: 0; }

/* RFP outline */
.index { flex: none; display: flex; flex-direction: column; max-height: 30vh; min-height: 140px; overflow: hidden; }
.index.sized { max-height: none; }
.index .card-head { align-items: center; flex-wrap: wrap; row-gap: 8px; }
.index .card-head .h3 { white-space: nowrap; }
.index .card-head .btn-sm { margin-left: 10px; }
.index .filters { margin-left: auto; }
.table-wrap { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
#list { table-layout: fixed; }
#list th { position: sticky; top: 0; z-index: 1; background: var(--surface); }
#list th, #list td { padding-left: 18px; padding-right: 0; }
#list th:last-child, #list td:last-child { padding-right: 18px; }
#list td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#list td.title { white-space: normal; }
#list td.id { font-weight: 600; }
#list .pill { font-size: inherit; font-weight: 500; }
#list tbody tr { cursor: pointer; scroll-margin-block: 44px; }
#list tbody tr.on { background: var(--accent-tint); }
#list tbody tr.on td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
#list tr.sec-row td { background: var(--surface-2); font-weight: 600; color: var(--heading); padding-top: 10px; padding-bottom: 10px; cursor: default; }
#list tr.sec-row .sec-sum { float: right; display: inline-flex; gap: 6px; font-weight: 500; }
#list tbody tr.sec-row:hover { background: none; }

/* Requirement */
.proposal-bar { display: flex; align-items: flex-end; gap: 24px; }
/* Page views: their own underline, apart from the proposal tab */
.view-tabs { margin-left: 8px; padding-left: 16px; border-left: 1px solid var(--line); }
.view-tabs .tab { border-bottom-width: 1.5px; }
.view-tabs .tab.on { color: var(--heading); border-bottom-color: #e36d19; }
.global { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 16px 18px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-content: start; }
.global[hidden], .index[hidden], .hsplit[hidden], .work[hidden] { display: none; }
.global .label-sm { margin: 10px 0 0; display: flex; align-items: center; gap: 8px; }
.global .rq { margin: 0; white-space: pre-wrap; color: var(--ink); }
.global .ihead { display: flex; align-items: baseline; gap: 10px; }
.global .org-row { grid-template-columns: minmax(160px, 38%) minmax(0, 1fr); padding: 6px 0; }
.global .org-row dt { color: var(--ink); font-size: inherit; }
.global .counts .org-row { grid-template-columns: 160px minmax(0, 1fr); }
.global table.scores { table-layout: fixed; width: 100%; }
.global table.scores td { vertical-align: top; white-space: normal; }
.global table.scores tbody tr[data-goto] { cursor: pointer; }
.global table.scores th.num, .global table.scores td.num { text-align: right; font-variant-numeric: tabular-nums; }
.crit-pts { display: inline-flex; align-items: baseline; gap: 8px; }
.global table.scores tr.total-row td { border-top: 1.5px solid var(--ink); }
.global table.scores tr.sec-row td { background: var(--surface-2); font-weight: 600; color: var(--heading); }
.item { flex: 1 1 auto; min-height: 120px; overflow-y: auto; padding: 16px 18px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-content: start; }
.ihead { display: flex; align-items: baseline; gap: 10px; }
.ihead .id, .ihead .name { font-weight: 600; color: var(--heading); }
.ihead .grow { flex: 1; }
.item .label-sm { margin: 10px 0 0; display: flex; align-items: center; gap: 8px; }
.rq { margin: 0; white-space: pre-wrap; color: var(--ink); }
.ev { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.ev .hl-tag.num { position: static; border: 0; cursor: pointer; font: 600 11px/17px var(--font-body, inherit); padding: 0 5px; justify-self: start; }
.ev .hl-tag.num.on { box-shadow: 0 0 0 2px var(--nwa-teal); }
.evq { color: var(--ink); }
button.cite { background: none; border: 0; padding: 0 4px; border-radius: 3px; cursor: pointer; white-space: nowrap; font: inherit; font-weight: 500; color: var(--accent-strong); text-align: left; }
button.cite.on { background: var(--accent-tint); color: var(--ink); }
ul.plain { margin: 0; padding-left: 18px; display: grid; gap: 4px; color: var(--ink); }
.empty { padding: 28px 18px; color: var(--muted); }

/* Accepted and material gaps */
.gap { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; align-items: baseline; color: var(--ink); }
.gap .pill { justify-self: start; }
.pill[data-tip] { position: relative; cursor: help; }
.pill[data-tip]:hover::after, .pill[data-tip]:focus::after { content: attr(data-tip); position: absolute; left: 0; top: calc(100% + 6px); z-index: 30; width: max-content; max-width: 340px; white-space: normal; font-size: var(--text-sm); font-weight: 500; line-height: 1.4; padding: 7px 10px; border-radius: 6px; background: inherit; color: inherit; box-shadow: 0 0 0 1px currentColor; }

/* Scores */
.sub-ink { color: var(--ink); margin-left: 8px; }
.gap .cite { justify-self: start; }


/* Discuss */
.dsc-msgs { display: grid; gap: 10px; }
.dsc-m { margin: 0; display: grid; gap: 2px; }
.dsc-who { font-size: var(--text-sm); font-weight: 600; color: var(--heading); }
.dsc-m.reviewer .dsc-who { color: var(--ink); }
.dsc-tx { margin: 0; white-space: pre-wrap; color: var(--ink); }
.dsc-f { display: flex; gap: 8px; align-items: flex-end; }
.dsc-f textarea { flex: 1; font: inherit; border: 1px solid var(--line-2); border-radius: 6px; padding: 7px 10px; resize: vertical; min-height: 36px; background: var(--surface); }

/* Decision */
.decide { flex: none; padding: 14px 18px; display: grid; gap: 10px; }
.decide[hidden] { display: none; }
.decide .result button { height: 32px; padding: 0 14px; font-size: 13px; font-weight: 500; }
.decide textarea { font: inherit; border: 1px solid var(--line-2); border-radius: 6px; padding: 8px 10px; resize: vertical; min-height: 48px; height: 52px; }
.decide textarea::placeholder { color: var(--muted); }
.decide .actions .grow { flex: 1; }
.decide .pos { font-weight: 600; color: var(--ink); }
.decide .actions { align-items: center; gap: 10px; }
.decide-toggle.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* PDF */
.pane-head { min-height: 48px; }
.pane-head .spacer { flex: 1; }
.pane-head .sub b { color: var(--ink); font-variant-numeric: tabular-nums; }
.viewer { background: var(--ground); padding: 0 20px 32px; }
.page-box { position: relative; margin: 28px 0 0; background: #fff; border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(17, 16, 16, .06); }
.page-box canvas { display: block; width: 100%; height: 100%; }
.page-box .num { position: absolute; left: 0; top: -21px; font-size: var(--text-sm); color: var(--muted); }
.page-box.cited { border-color: var(--nwa-teal); box-shadow: 0 0 0 1px var(--nwa-teal); }
.page-box .hl { pointer-events: none; border-width: 1.5px; }
.page-box .hl-tag.margin { left: -19px; top: 0; margin-top: -1px; padding: 0 5px; }

.toast { position: fixed; left: 20px; bottom: 20px; background: var(--ink); color: #fff; padding: 9px 14px; border-radius: 6px; font-size: var(--text-sm); opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }

/* RFP page: the RFP and every proposal against it */
body.rfp-page { overflow: auto; display: block; }
.crumbs a.crumb-home { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.crumbs .crumb-sep { color: var(--faint); font-weight: 500; }
.crumbs a.crumb-link, .crumbs .crumb-on { color: var(--heading); text-decoration: none; }
.crumbs a.crumb-link:hover, .crumbs a.crumb-home:hover span { text-decoration: underline; }
.rfp-main { max-width: 1180px; padding: 24px 28px 48px; display: grid; gap: 16px; }
.rfp-head { display: flex; align-items: center; gap: 14px; }
.rfp-head .btn-2 { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); }
.rfp-facts { padding: 6px 18px; }
.rfp-facts dl { margin: 0; }
.rfp-facts .org-row { grid-template-columns: 160px minmax(0, 1fr); padding: 8px 0; }
.rfp-facts .org-row dt { color: var(--ink); font-size: inherit; }
#props th.num, #props td.num { text-align: right; font-variant-numeric: tabular-nums; }
#props td .pill { margin-left: 6px; }
#props td:first-child .pill, #props td.num .pill:only-child { margin-left: 0; }
#props td.firm { font-weight: 600; color: var(--heading); }
#props td.firm a { color: inherit; text-decoration: none; }
#props tbody tr[data-href] { cursor: pointer; }
#props tbody tr[data-href]:hover td.firm a { text-decoration: underline; }
#props td .range { color: var(--ink-2); font-size: var(--text-sm); margin-left: 6px; }
.proposal-bar a.rfp-back { align-self: center; color: var(--heading); font-weight: 600; text-decoration: none; padding-right: 16px; border-right: 1px solid var(--line); white-space: nowrap; }
.proposal-bar a.rfp-back:hover { text-decoration: underline; }
/* The work column scrolls when the requirement and the open decision together are taller than the window,
   so the decision buttons are always reachable; the decision card never shrinks below its contents. */
.work { overflow-y: auto; }
.item { min-height: 96px; }
.decide { flex: none; max-height: none; }

/* Account menu */
.topbar { display: flex; align-items: center; }
.acct { position: relative; margin-left: auto; }
.acct-who { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--nwa-navy); color: #fff; font-weight: 600; cursor: pointer; }
.acct-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; box-shadow: 0 6px 18px rgba(17,16,16,.12); display: grid; gap: 4px; }
.acct-menu[hidden] { display: none; }
.acct-label { margin: 0; font-size: var(--text-xs); color: var(--muted); text-transform: capitalize; }
.acct-mail { margin: 0 0 6px; color: var(--ink); font-weight: 500; }
.acct-item { color: var(--heading); text-decoration: none; font-weight: 500; padding: 4px 0; }
.acct-item:hover { text-decoration: underline; }
/* Sign-in */
body.login-page { display: block; overflow: auto; background: var(--ground); }
.login-panel { max-width: 420px; margin: 12vh 0 0 12vw; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 30px; display: grid; gap: 6px; }
.login-mark .mark { width: 34px; height: 40px; }
.login-brand { margin: 0; font-weight: 600; color: var(--muted); }
.login-lede { margin: 4px 0 10px; color: var(--ink); }
.login-form { display: grid; gap: 8px; }
.login-form input { font: inherit; border: 1px solid var(--line-2); border-radius: 6px; padding: 8px 10px; }
.login-form .btn { justify-self: start; }
/* Users */
.user-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 4px 18px 16px; }
.user-add input, .user-add select, #roster select { font: inherit; border: 1px solid var(--line-2); border-radius: 6px; padding: 6px 8px; background: var(--surface); }
#roster th.num, #roster td.num { text-align: right; }
.user-actions { display: flex; gap: 6px; justify-content: flex-start; }
