/* BUGS_LOG.md #671 (U1) -- 14 themes, one set of tokens each. Every text colour passes 4.5 : 1 on the surfaces it is
   used on (checked by docbid/theme_checks.py); status colours are never the only signal (icon + word). */
/* Light */
:root, [data-theme="light"] {
  --bg: #F4F5F7;
  --card: #FFFFFF;
  --border: #E2E4E9;
  --paper-border-strong: #8A8F99;
  --text: #111827;
  --text-muted: #374151;
  --text-faint: #4B5563;
  --rail-bg: #FFFFFF;
  --rail-raised: #EEF2F7;
  --rail-border: #E2E4E9;
  --rail-text: #111827;
  --rail-text-muted: #4B5563;
  --rail-accent: #1D4ED8;
  --accent: #1D4ED8;
  --accent-tint: #E8EFFD;
  --accent-strong: #1E3A8A;
  --on-accent: #FFFFFF;
  --green: #166534;
  --green-tint: #E3F5E9;
  --amber: #8A4B00;
  --amber-tint: #FDF1DC;
  --red: #B42318;
  --red-tint: #FDE8E6;
  --violet: #6B21A8;
  --violet-tint: #F3E8FF;
  --blue: #1D4ED8;
  --blue-tint: #E8EFFD;
  --hover-bg: rgba(17,24,39,0.05);
  --bg-subtle: #EEF2F7;
  --border-color: #E2E4E9;
  --font-heading: "Inter", sans-serif;
  --font: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --radius: 8px;
  --radius-sm: 4px;
  --radius-md: 8px;
  color-scheme: light;
}
/* Dark */
[data-theme="dark"] {
  --bg: #0F1115;
  --card: #1A1D24;
  --border: #2C313B;
  --paper-border-strong: #6B7280;
  --text: #E6E8EC;
  --text-muted: #B6BCC6;
  --text-faint: #9CA3AF;
  --rail-bg: #0B0D11;
  --rail-raised: #1D212A;
  --rail-border: #2C313B;
  --rail-text: #E6E8EC;
  --rail-text-muted: #A7AEB9;
  --rail-accent: #8AB4F8;
  --accent: #8AB4F8;
  --accent-tint: #1D2A44;
  --accent-strong: #B3CEFB;
  --on-accent: #0B0D10;
  --green: #6EE7A0;
  --green-tint: #12301F;
  --amber: #FBBF5A;
  --amber-tint: #33260C;
  --red: #FCA5A5;
  --red-tint: #3A1717;
  --violet: #D2B4FE;
  --violet-tint: #2C1D45;
  --blue: #93C5FD;
  --blue-tint: #1A2840;
  --hover-bg: rgba(255,255,255,0.07);
  --bg-subtle: #1A1D24;
  --border-color: #2C313B;
  --font-heading: "Inter", sans-serif;
  --font: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --radius: 8px;
  --radius-sm: 4px;
  --radius-md: 8px;
  color-scheme: dark;
}
/* Dimmed */
[data-theme="dimmed"] {
  --bg: #22272E;
  --card: #2D333B;
  --border: #444C56;
  --paper-border-strong: #768390;
  --text: #CDD9E5;
  --text-muted: #ADBAC7;
  --text-faint: #9DA9B6;
  --rail-bg: #1C2128;
  --rail-raised: #2D333B;
  --rail-border: #444C56;
  --rail-text: #CDD9E5;
  --rail-text-muted: #ADBAC7;
  --rail-accent: #6CB6FF;
  --accent: #6CB6FF;
  --accent-tint: #25364D;
  --accent-strong: #96D0FF;
  --on-accent: #1C2128;
  --green: #8DDB9F;
  --green-tint: #21362A;
  --amber: #E6C46C;
  --amber-tint: #3A3220;
  --red: #F4A3A3;
  --red-tint: #46282C;
  --violet: #DCBDFB;
  --violet-tint: #3A2D4D;
  --blue: #96D0FF;
  --blue-tint: #25364D;
  --hover-bg: rgba(255,255,255,0.07);
  --bg-subtle: #2D333B;
  --border-color: #444C56;
  --font-heading: "Inter", sans-serif;
  --font: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --radius: 8px;
  --radius-sm: 4px;
  --radius-md: 8px;
  color-scheme: dark;
}
/* High contrast */
[data-theme="contrast"] {
  --bg: #FFFFFF;
  --card: #FFFFFF;
  --border: #000000;
  --paper-border-strong: #000000;
  --text: #000000;
  --text-muted: #1F1F1F;
  --text-faint: #2B2B2B;
  --rail-bg: #FFFFFF;
  --rail-raised: #E8E8E8;
  --rail-border: #000000;
  --rail-text: #000000;
  --rail-text-muted: #1F1F1F;
  --rail-accent: #0033CC;
  --accent: #0033CC;
  --accent-tint: #E6ECFF;
  --accent-strong: #001F80;
  --on-accent: #FFFFFF;
  --green: #00591F;
  --green-tint: #E2F5E8;
  --amber: #6B3A00;
  --amber-tint: #FFF0D6;
  --red: #A30000;
  --red-tint: #FFE5E5;
  --violet: #4B0082;
  --violet-tint: #F1E6FF;
  --blue: #0033CC;
  --blue-tint: #E6ECFF;
  --hover-bg: rgba(17,24,39,0.05);
  --bg-subtle: #E8E8E8;
  --border-color: #000000;
  --font-heading: "Inter", sans-serif;
  --font: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --radius: 8px;
  --radius-sm: 4px;
  --radius-md: 8px;
  color-scheme: light;
}
/* Calm graphite */
[data-theme="graphite"] {
  --bg: #F7F6F3;
  --card: #FFFFFF;
  --border: #E3E1DC;
  --paper-border-strong: #8C8880;
  --text: #1C1B19;
  --text-muted: #4A4844;
  --text-faint: #5C5A55;
  --rail-bg: #F0EEEA;
  --rail-raised: #E6E3DD;
  --rail-border: #DAD6CF;
  --rail-text: #1C1B19;
  --rail-text-muted: #4A4844;
  --rail-accent: #0B5F58;
  --accent: #0F766E;
  --accent-tint: #DDF2EF;
  --accent-strong: #0B4F4A;
  --on-accent: #FFFFFF;
  --green: #1F6B3A;
  --green-tint: #E1F0E5;
  --amber: #7A4A0A;
  --amber-tint: #F6E9D2;
  --red: #9B2C1F;
  --red-tint: #F6E1DC;
  --violet: #5E3A8C;
  --violet-tint: #EEE6F7;
  --blue: #1E4FA8;
  --blue-tint: #E6EEFA;
  --hover-bg: rgba(17,24,39,0.05);
  --bg-subtle: #E6E3DD;
  --border-color: #E3E1DC;
  --font-heading: "Inter", sans-serif;
  --font: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --radius: 8px;
  --radius-sm: 4px;
  --radius-md: 8px;
  color-scheme: light;
}
/* Navy & Amber */
[data-theme="navy"] {
  --bg: #F6F7F9;
  --card: #FFFFFF;
  --border: #E4E7EC;
  --paper-border-strong: #8C93A1;
  --text: #16192B;
  --text-muted: #4B5263;
  --text-faint: #5A6170;
  --rail-bg: #14213D;
  --rail-raised: #1B2C4C;
  --rail-border: #2E4166;
  --rail-text: #E7E9F0;
  --rail-text-muted: #B8C0D4;
  --rail-accent: #F2C66D;
  --accent: #8C6521;
  --accent-tint: #F8EFDC;
  --accent-strong: #5F4413;
  --on-accent: #FFFFFF;
  --green: #2F6B45;
  --green-tint: #DEEBE0;
  --amber: #7A4A0A;
  --amber-tint: #F3E3CC;
  --red: #A23B34;
  --red-tint: #F3DEDC;
  --violet: #5E3A8C;
  --violet-tint: #EEE6F7;
  --blue: #1E4FA8;
  --blue-tint: #E6EEFA;
  --hover-bg: rgba(17,24,39,0.05);
  --bg-subtle: #EEF0F4;
  --border-color: #E4E7EC;
  --font-heading: "IBM Plex Serif", serif;
  --font: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --radius: 8px;
  --radius-sm: 4px;
  --radius-md: 8px;
  color-scheme: light;
}
/* Clean Blue */
[data-theme="blue"] {
  --bg: #FAFAFA;
  --card: #FFFFFF;
  --border: #E5E7EB;
  --paper-border-strong: #8B919C;
  --text: #111827;
  --text-muted: #4B5563;
  --text-faint: #4B5563;
  --rail-bg: #FFFFFF;
  --rail-raised: #F3F4F6;
  --rail-border: #E5E7EB;
  --rail-text: #111827;
  --rail-text-muted: #4B5563;
  --rail-accent: #2563EB;
  --accent: #2563EB;
  --accent-tint: #EFF6FF;
  --accent-strong: #1E40AF;
  --on-accent: #FFFFFF;
  --green: #047857;
  --green-tint: #ECFDF5;
  --amber: #92400E;
  --amber-tint: #FFFBEB;
  --red: #B91C1C;
  --red-tint: #FEF2F2;
  --violet: #6D28D9;
  --violet-tint: #F5F3FF;
  --blue: #1D4ED8;
  --blue-tint: #EFF6FF;
  --hover-bg: rgba(17,24,39,0.05);
  --bg-subtle: #F3F4F6;
  --border-color: #E5E7EB;
  --font-heading: "Inter", sans-serif;
  --font: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --radius: 8px;
  --radius-sm: 4px;
  --radius-md: 8px;
  color-scheme: light;
}
/* Classic Editorial */
[data-theme="editorial"] {
  --bg: #FBF8F2;
  --card: #FFFFFF;
  --border: #E5DFD2;
  --paper-border-strong: #948A74;
  --text: #2B2A26;
  --text-muted: #5E594D;
  --text-faint: #5E594D;
  --rail-bg: #FBF8F2;
  --rail-raised: #F2ECDF;
  --rail-border: #D3C9B4;
  --rail-text: #2B2A26;
  --rail-text-muted: #5E594D;
  --rail-accent: #2F5233;
  --accent: #2F5233;
  --accent-tint: #E8F0E6;
  --accent-strong: #1F3A22;
  --on-accent: #FFFFFF;
  --green: #2F5233;
  --green-tint: #E8F0E6;
  --amber: #7A4A0A;
  --amber-tint: #F5EBD8;
  --red: #A23B34;
  --red-tint: #F3DEDC;
  --violet: #5E3A8C;
  --violet-tint: #EEE6F7;
  --blue: #1E4FA8;
  --blue-tint: #E6EEFA;
  --hover-bg: rgba(17,24,39,0.05);
  --bg-subtle: #F2ECDF;
  --border-color: #E5DFD2;
  --font-heading: "IBM Plex Serif", serif;
  --font: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --radius: 3px;
  --radius-sm: 3px;
  --radius-md: 3px;
  color-scheme: light;
}
/* Midnight */
[data-theme="midnight"] {
  --bg: #0B1220;
  --card: #111A2E;
  --border: #24324F;
  --paper-border-strong: #5B6B8A;
  --text: #E2E8F0;
  --text-muted: #B4C0D3;
  --text-faint: #A0AEC4;
  --rail-bg: #08101C;
  --rail-raised: #111A2E;
  --rail-border: #24324F;
  --rail-text: #E2E8F0;
  --rail-text-muted: #A0AEC4;
  --rail-accent: #22D3EE;
  --accent: #22D3EE;
  --accent-tint: #0E2F3D;
  --accent-strong: #7DE7F7;
  --on-accent: #0B1220;
  --green: #4ADE80;
  --green-tint: #0F2E1E;
  --amber: #FBBF24;
  --amber-tint: #33280A;
  --red: #FCA5A5;
  --red-tint: #3A1621;
  --violet: #C4B5FD;
  --violet-tint: #251C47;
  --blue: #93C5FD;
  --blue-tint: #172A4A;
  --hover-bg: rgba(255,255,255,0.07);
  --bg-subtle: #111A2E;
  --border-color: #24324F;
  --font-heading: "Inter", sans-serif;
  --font: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --radius: 8px;
  --radius-sm: 4px;
  --radius-md: 8px;
  color-scheme: dark;
}
/* Slate & Violet */
[data-theme="violet"] {
  --bg: #F8FAFC;
  --card: #FFFFFF;
  --border: #E2E8F0;
  --paper-border-strong: #8794A8;
  --text: #0F172A;
  --text-muted: #475569;
  --text-faint: #475569;
  --rail-bg: #FFFFFF;
  --rail-raised: #F1F5F9;
  --rail-border: #E2E8F0;
  --rail-text: #0F172A;
  --rail-text-muted: #475569;
  --rail-accent: #6D28D9;
  --accent: #6D28D9;
  --accent-tint: #EDE9FE;
  --accent-strong: #4C1D95;
  --on-accent: #FFFFFF;
  --green: #15803D;
  --green-tint: #E7F7EC;
  --amber: #92400E;
  --amber-tint: #FEF3C7;
  --red: #B91C1C;
  --red-tint: #FEE2E2;
  --violet: #6D28D9;
  --violet-tint: #EDE9FE;
  --blue: #1D4ED8;
  --blue-tint: #E8EFFD;
  --hover-bg: rgba(17,24,39,0.05);
  --bg-subtle: #F1F5F9;
  --border-color: #E2E8F0;
  --font-heading: "Inter", sans-serif;
  --font: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --radius: 8px;
  --radius-sm: 4px;
  --radius-md: 8px;
  color-scheme: light;
}
/* Ocean */
[data-theme="ocean"] {
  --bg: #F0F7FB;
  --card: #FFFFFF;
  --border: #CFE3EE;
  --paper-border-strong: #6F8899;
  --text: #0C2233;
  --text-muted: #3E5566;
  --text-faint: #3E5566;
  --rail-bg: #0369A1;
  --rail-raised: #035A8A;
  --rail-border: #0B5F8F;
  --rail-text: #FFFFFF;
  --rail-text-muted: #DCEFFA;
  --rail-accent: #FFE7A3;
  --accent: #0369A1;
  --accent-tint: #E0F0FA;
  --accent-strong: #024A72;
  --on-accent: #FFFFFF;
  --green: #15803D;
  --green-tint: #E7F7EC;
  --amber: #92400E;
  --amber-tint: #FEF3C7;
  --red: #B91C1C;
  --red-tint: #FEE2E2;
  --violet: #6D28D9;
  --violet-tint: #F0EBFD;
  --blue: #1E4FA8;
  --blue-tint: #E6EEFA;
  --hover-bg: rgba(17,24,39,0.05);
  --bg-subtle: #E3EEF5;
  --border-color: #CFE3EE;
  --font-heading: "Inter", sans-serif;
  --font: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --radius: 8px;
  --radius-sm: 4px;
  --radius-md: 8px;
  color-scheme: light;
}
/* Sand */
[data-theme="sand"] {
  --bg: #FBF7F0;
  --card: #FFFFFF;
  --border: #E8DFD2;
  --paper-border-strong: #998B78;
  --text: #2A211A;
  --text-muted: #5E5246;
  --text-faint: #5E5246;
  --rail-bg: #F6EFE3;
  --rail-raised: #EFE5D4;
  --rail-border: #E8DFD2;
  --rail-text: #2A211A;
  --rail-text-muted: #5E5246;
  --rail-accent: #9A3412;
  --accent: #9A3412;
  --accent-tint: #FBE9DF;
  --accent-strong: #6B230B;
  --on-accent: #FFFFFF;
  --green: #3F6212;
  --green-tint: #EEF4DF;
  --amber: #854D0E;
  --amber-tint: #FAEFD5;
  --red: #B91C1C;
  --red-tint: #FCE5E5;
  --violet: #6B2F86;
  --violet-tint: #F3E8F7;
  --blue: #1E4FA8;
  --blue-tint: #E6EEFA;
  --hover-bg: rgba(17,24,39,0.05);
  --bg-subtle: #EFE5D4;
  --border-color: #E8DFD2;
  --font-heading: "Inter", sans-serif;
  --font: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --radius: 8px;
  --radius-sm: 4px;
  --radius-md: 8px;
  color-scheme: light;
}
/* Mono */
[data-theme="mono"] {
  --bg: #FFFFFF;
  --card: #FFFFFF;
  --border: #D4D4D4;
  --paper-border-strong: #737373;
  --text: #0A0A0A;
  --text-muted: #404040;
  --text-faint: #404040;
  --rail-bg: #FAFAFA;
  --rail-raised: #EDEDED;
  --rail-border: #D4D4D4;
  --rail-text: #0A0A0A;
  --rail-text-muted: #404040;
  --rail-accent: #000000;
  --accent: #0A0A0A;
  --accent-tint: #EDEDED;
  --accent-strong: #000000;
  --on-accent: #FFFFFF;
  --green: #0A0A0A;
  --green-tint: #EDEDED;
  --amber: #0A0A0A;
  --amber-tint: #F5F5F5;
  --red: #0A0A0A;
  --red-tint: #E5E5E5;
  --violet: #0A0A0A;
  --violet-tint: #EDEDED;
  --blue: #0A0A0A;
  --blue-tint: #EDEDED;
  --hover-bg: rgba(17,24,39,0.05);
  --bg-subtle: #EDEDED;
  --border-color: #D4D4D4;
  --font-heading: "Inter", sans-serif;
  --font: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --radius: 8px;
  --radius-sm: 4px;
  --radius-md: 8px;
  color-scheme: light;
}
/* Forest dark */
[data-theme="forest"] {
  --bg: #0F1A14;
  --card: #16241C;
  --border: #2B3D32;
  --paper-border-strong: #5F7A69;
  --text: #E3EFE7;
  --text-muted: #B9CCBF;
  --text-faint: #A3B8AA;
  --rail-bg: #0B140F;
  --rail-raised: #16241C;
  --rail-border: #2B3D32;
  --rail-text: #E3EFE7;
  --rail-text-muted: #A3B8AA;
  --rail-accent: #4ADE80;
  --accent: #4ADE80;
  --accent-tint: #163522;
  --accent-strong: #86EFAC;
  --on-accent: #0F1A14;
  --green: #86EFAC;
  --green-tint: #163522;
  --amber: #FBBF24;
  --amber-tint: #33280A;
  --red: #FCA5A5;
  --red-tint: #3A1717;
  --violet: #D8B4FE;
  --violet-tint: #2C1D45;
  --blue: #93C5FD;
  --blue-tint: #1A2840;
  --hover-bg: rgba(255,255,255,0.07);
  --bg-subtle: #16241C;
  --border-color: #2B3D32;
  --font-heading: "Inter", sans-serif;
  --font: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --radius: 8px;
  --radius-sm: 4px;
  --radius-md: 8px;
  color-scheme: dark;
}

/* Aliases -- lets the richer criterion/citation/comparison CSS below
   (originally written against the old single-theme token names) work
   correctly across all 5 themes without rewriting every rule. */
:root, [data-theme] {
  --gold: var(--accent); --gold-dark: var(--accent-strong); --gold-tint: var(--accent-tint);
  --paper: var(--bg); --paper-card: var(--card); --paper-border: var(--border);
  --ink: var(--rail-bg); --ink-raised: var(--rail-raised); --ink-border: var(--rail-border);
  --ink-text: var(--rail-text); --ink-text-muted: var(--rail-text-muted);
  --font-body: var(--font);
  --font-display: var(--font-heading);
  --danger: var(--red);
  --amber-bg: var(--amber-tint); --green-bg: var(--green-tint); --red-bg: var(--red-tint);
  --font-sans: var(--font);
}

* { box-sizing: border-box; }
html, body { margin:0; padding:0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: calc(15px * var(--fs, 1)); }
.app { display: flex; flex-direction: column; min-height: 100vh; height: 100vh; overflow: hidden; }
.app-body { display: grid; grid-template-columns: 245px 1fr; flex: 1; min-height: 0; }
.app.sidebar-collapsed .app-body { grid-template-columns: 0 1fr; }
.app.sidebar-collapsed .rail { overflow: hidden; padding: 0; border: none; min-width: 0; }

/* ---------- Top header ---------- */
.app-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.app-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; gap: 16px;
}
.header-logo {
  display: flex; align-items: center; gap: 10px;
  width: 225px; flex-shrink: 0; text-decoration: none; color: inherit;
}
.header-logo .brand-name { font-family: var(--font-heading); font-weight: 700; font-size: calc(17px * var(--fs, 1)); color: var(--text); }
.header-logo .brand-sub { color: var(--text-muted); }
.header-right {
  display: flex; align-items: center; justify-content: space-between;
  flex: 1; min-width: 0; gap: 12px;
}
.header-actions { display: flex; align-items: center; gap: 18px; margin-left: auto; }
select.tender-select.header-tender-select {
  width: min(240px, 32vw); font-size: calc(13px * var(--fs, 1)); padding: 7px 10px;
  border-radius: 10px; margin: 0;
}
.header-text-links { display: flex; align-items: center; gap: 8px; }
.header-text-link {
  border: none; background: transparent; cursor: pointer;
  color: var(--text-muted); font-family: var(--font); font-size: calc(14px * var(--fs, 1));
  padding: 6px 10px; border-radius: 8px;
}
.header-text-link:hover, .header-text-link[aria-expanded="true"] { color: var(--accent); }
.header-icon-row { display: flex; align-items: center; gap: 8px; }
.header-icon-btn {
  position: relative; width: 40px; height: 40px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; background: transparent; color: var(--text); cursor: pointer;
  border-radius: 10px;
}
.header-icon-btn:hover, .header-icon-btn[aria-expanded="true"] { color: var(--accent); background: var(--accent-tint); }
.header-badge {
  position: absolute; top: 8px; right: 8px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent);
  animation: header-badge-blink 1.4s ease-in-out infinite;
}
@keyframes header-badge-blink {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); }
  50% { opacity: 0.45; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 0%, transparent); }
}

.header-dropdown { position: relative; }
.header-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 50;
  min-width: 220px; padding: 8px;
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 16px 40px rgba(20, 24, 40, 0.12);
  display: flex; flex-direction: column; gap: 2px;
}
.header-menu[hidden] { display: none !important; }
.header-menu button[hidden], .header-menu a[hidden] { display: none !important; }
.header-dropdown:first-child .header-menu { left: 0; right: auto; }
.header-menu-wide { min-width: 260px; padding: 12px 14px; }
.header-menu-title { font-size: calc(12px * var(--fs, 1)); font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
.header-menu button, .header-menu a {
  width: 100%; text-align: left; border: none; background: transparent;
  color: var(--text); font-family: var(--font); font-size: calc(13.5px * var(--fs, 1));
  padding: 8px 12px; border-radius: 999px; cursor: pointer;
  text-decoration: none; box-sizing: border-box;
}
.header-menu button:hover, .header-menu a:hover { background: var(--accent-tint); color: var(--accent); }
.header-menu button.theme-option.active { color: var(--accent); font-weight: 600; background: var(--accent-tint); }

.header-profile {
  display: flex; align-items: center; gap: 8px;
  border: none; background: transparent; cursor: pointer;
  padding: 4px 4px 4px 4px; border-radius: 999px; color: var(--text);
  font-family: var(--font);
}
.header-profile:hover, .header-profile[aria-expanded="true"] { background: var(--accent-tint); }
.profile-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--on-accent); font-size: calc(12px * var(--fs, 1)); font-weight: 600;
  box-shadow: 0 0 0 2px var(--card), 0 2px 8px rgba(20, 24, 40, 0.16);
  flex-shrink: 0;
}
.profile-name { font-size: calc(14px * var(--fs, 1)); font-weight: 400; padding-right: 6px; }
.profile-card { min-width: 240px; padding: 0; overflow: hidden; }
.profile-card-head { padding: 16px 16px 8px; }
.profile-card-name { font-size: calc(16px * var(--fs, 1)); font-weight: 600; }
.profile-card-note { font-size: calc(12px * var(--fs, 1)); color: var(--text-muted); margin-top: 2px; }
/* BUGS_LOG.md #683 -- Preferences right under the name; Sign out set apart at the bottom (a line and space between,
   a quiet outlined button), inside the card -- it used to run past the card's right edge */
.profile-card-actions { display: flex; flex-direction: column; padding: 0 12px 12px; gap: 0; }
.profile-card-actions .profile-pref-link { width: 100%; margin: 4px 0 0; box-sizing: border-box; }
.profile-card-sep { height: 1px; background: var(--border); margin: 18px 0 12px; }
.profile-signout {
  width: 100% !important; box-sizing: border-box; margin: 0 !important;
  background: transparent !important; color: var(--text) !important; border: 1px solid var(--paper-border-strong) !important;
  text-align: center !important; font-weight: 600; border-radius: var(--radius) !important;
  font-size: calc(13px * var(--fs, 1)) !important; padding: 9px 12px !important;
}
.profile-signout:hover { background: var(--hover-bg) !important; }

.page-toolbar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.page-toolbar-inner {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 20px;
}
.page-back {
  display: inline-flex; align-items: center; gap: 8px;
  width: 225px; flex-shrink: 0;
  border: none; background: transparent; color: var(--text-muted);
  font-family: var(--font); font-size: calc(13.5px * var(--fs, 1)); cursor: pointer;
}
.page-back:hover { color: var(--accent); }
.page-name {
  flex: 1; min-width: 0; font-size: calc(20px * var(--fs, 1)); font-weight: 700; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.page-actions { display: flex; align-items: center; gap: 6px; }

/* ---------- Rail (Thunder-style accordion tree) ---------- */
.rail {
  background: var(--rail-bg);
  color: var(--rail-text);
  display: flex;
  flex-direction: column;
  padding: 18px 20px 16px;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  border-right: 1px solid var(--rail-border);
}
.rail-brand {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 12px; text-decoration: none; color: inherit;
}
.rail-brand img { width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; }
.rail-brand-name { display: block; font-size: 12px; font-weight: 600; color: var(--rail-text-muted); }
.rail-brand-sub { display: block; margin-top: 1px; font-size: 18px; font-weight: 800; letter-spacing: -0.03em; color: var(--rail-text); }
.rail-org {
  margin: 0 0 16px; padding: 10px 12px; border-radius: 14px;
  background: var(--rail-raised); border: 1px solid var(--rail-border);
}
.rail-org img { display: block; width: 80%; height: auto; max-height: 96px; object-fit: contain; margin: 0 auto; }
.rail-header { margin-bottom: 18px; flex-shrink: 0; }
.rail-header .field-label { margin-top: 0; color: var(--rail-text-muted); }
.brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: calc(17px * var(--fs, 1));
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-copy { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.brand-name span { color: var(--accent); }
.brand-sub {
  font-family: var(--font);
  font-size: calc(12px * var(--fs, 1));
  font-weight: 500;
  color: var(--rail-text-muted);
  margin-top: 3px;
}
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--on-accent); flex-shrink: 0;
}
.field-label { font-family: var(--font-mono); font-size: calc(12px * var(--fs, 1)); color: var(--text-muted);   /* #680: on panels, not the rail */ text-transform: uppercase; letter-spacing: 0.06em; margin: 12px 0 6px; }
select.theme-select, select.tender-select {
  width: 100%; font-size: calc(12.5px * var(--fs, 1)); padding: 8px 10px; border-radius: 10px;
  border: 1px solid var(--rail-border); background: var(--rail-raised); color: var(--rail-text); font-family: var(--font);
}

.nav-sidebar { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.nav-sidebar-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; flex: 1; min-height: 0;
}
.nav-sidebar-list > li { margin-bottom: 16px; }
.nav-sidebar-list > li:last-child { margin-bottom: 0; }
.nav-sidebar-grow { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.nav-sidebar-grow .nav-group-body { flex: 1; min-height: 0; display: none; flex-direction: column; }
.nav-sidebar-grow .nav-group-toggle[aria-expanded="true"] + .nav-group-body { display: flex; }
.bidder-list { flex: 1; min-height: 0; overflow-y: auto; }

.nav-group-toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 0; border: none; background: transparent;
  color: var(--rail-text); font-family: var(--font); cursor: pointer; text-align: left;
}
.nav-title { display: block; font-size: calc(14.5px * var(--fs, 1)); font-weight: 500; line-height: 1.3; }
.nav-plus {
  flex-shrink: 0; opacity: 0.7; color: var(--rail-text);
  transition: transform 0.3s ease, color 0.3s ease, opacity 0.3s ease;
}
.nav-group-toggle[aria-expanded="false"] .nav-plus { transform: rotate(0deg); }
.nav-group-toggle[aria-expanded="true"] .nav-plus { transform: rotate(135deg); }
.nav-group-toggle:hover { color: var(--rail-accent); }   /* #680: in the rail, the rail's accent */
.nav-group-toggle:hover .nav-plus { color: var(--rail-accent); opacity: 1; }

.nav-group-body { display: none; }
.nav-group-toggle[aria-expanded="true"] + .nav-group-body { display: block; }

.nav-tree {
  list-style: none; margin: 0; padding: 14px 0 0;
  position: relative;
}
.nav-tree::before {
  content: "";
  position: absolute;
  top: 0; left: 5px;
  width: 2px;
  height: calc(100% - 18px);
  background: var(--rail-border);
}
.nav-tree-item {
  position: relative;
  padding: 4px 0 4px 24px;
}
.nav-tree-item::before {
  content: "";
  position: absolute;
  left: 5px; top: 4px;
  width: 12px; height: 12px;
  border-left: 2px solid var(--rail-border);
  border-bottom: 2px solid var(--rail-border);
  border-radius: 0 8px 0 8px;
}
.nav-link {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 0; border: none; background: transparent;
  color: var(--rail-text); font-family: var(--font); font-size: calc(13.5px * var(--fs, 1));
  line-height: 22px; font-weight: 400; text-align: left; cursor: pointer;
  text-decoration: none;
  transition: color 0.3s ease, font-weight 0.3s ease;
}
.nav-link:hover, .nav-link:focus, .nav-link.active {
  color: var(--rail-accent);
  font-weight: 500;
}
.nav-link.disabled, .nav-link.disabled:hover {
  opacity: 0.4; cursor: default; color: var(--rail-text); font-weight: 400;
}
.animated-icon.disabled, .animated-icon.disabled:hover {
  opacity: 0.4; pointer-events: none; cursor: default;
}
.animated-icon.disabled:hover .module-box {
  background: var(--bg); color: var(--text); border-color: var(--border);
}
.animated-icon.disabled:hover .module-title { color: inherit; font-weight: inherit; }

.compare-hint { font-size: calc(12px * var(--fs, 1)); color: var(--rail-text-muted); padding: 6px 0 0 24px; line-height: 1.4; }
.nav-tree-empty, .loading-row {
  color: var(--rail-text-muted); font-size: calc(12.5px * var(--fs, 1)); padding: 4px 0 4px 24px; list-style: none;
}

.bidder-tab-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* BUGS_LOG.md #588 (Part 57.8) -- a long count ("60/(133+41 NA+1 NEXT STAGE)") squeezed the name to nothing: the name keeps
   room for itself and the count goes to its own line when both do not fit */
.nav-link.bidder-tab { flex-wrap: wrap; row-gap: 0; }
.nav-link.bidder-tab .bidder-tab-name { min-width: 5em; }
.bidder-tab-frac { font-family: var(--font-mono); font-size: calc(12px * var(--fs, 1)); color: var(--rail-text-muted); white-space: nowrap; flex-shrink: 0; }
.bidder-tab.active .bidder-tab-frac { color: var(--rail-accent); }   /* #680: the rail's own accent (Ocean / Navy rails are dark) */

.rail-bottom { flex-shrink: 0; border-top: 1px solid var(--rail-border); padding-top: 10px; margin-top: 10px; }
.ollama-status { display: flex; align-items: center; gap: 8px; padding: 8px 2px 6px; font-family: var(--font-mono); font-size: calc(12px * var(--fs, 1)); color: var(--text-muted); }   /* #680: in the status menu (a panel) */
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--rail-text-muted); display: inline-block; flex-shrink: 0; }
.status-dot.connected { background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent); }
.status-dot.unreachable { background: var(--red); }
/* BUGS_LOG.md #618 (Nikhil 24 Oct: "Idle state orange, busy red, offline grey, connected green") */
.status-dot.busy { background: var(--red); }
/* #620 (Nikhil 25 Oct: "all look red, change color of idle to lighter orange") -- a light orange of its own, the same in
   every theme, apart from busy's red at 8 px */
.status-dot.idle { background: #F5A524; box-shadow: inset 0 0 0 1px #C98100; }   /* a ring: seen on white too */
.field-hint.semantic-missing { color: var(--red); }
.status-dot.offline { background: var(--text-faint, #9aa0ae); }
.rail-signout {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  width: 100%; margin-top: 4px; padding: 0; border: none; background: transparent;
  color: var(--rail-text); font-family: var(--font); font-size: calc(13.5px * var(--fs, 1)); font-weight: 500;
  text-align: left; cursor: pointer;
}
.rail-signout:hover { color: var(--rail-accent); }
.rail-signout-user { font-size: calc(12px * var(--fs, 1)); font-weight: 400; color: var(--rail-text-muted); }

/* Sign-in: a full-page split, fixed colours so a saved theme does not restyle it. */
#login-overlay.login-screen {
  display: block;
  padding: 0;
  background: #eef1f8;
  overflow: auto;
}
.login-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  min-height: 100%;
}
.login-hero {
  position: relative;
  color: #f4f7ff;
  padding: 36px 48px 40px;
  background-color: #071633;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    radial-gradient(ellipse at 18% 0%, rgba(70, 120, 230, 0.38), transparent 52%);
  background-size: 52px 52px, 52px 52px, auto;
  display: flex;
  flex-direction: column;
}
.login-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  align-self: flex-start;
  background: #fff;
  color: #1a2744;
  border-radius: 18px;
  padding: 8px 18px 8px 8px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}
.login-logo-mark {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: block;
  object-fit: contain;
}
.login-logo-name {
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.03em;
  color: #1b2a4a;
}
.login-logo-name span { color: #2454e6; font-weight: 700; }
.login-kicker {
  margin: 32px 0 0;
  color: #f5a018;
  font-weight: 700;
  font-size: 65px;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.login-tagline {
  margin: 6px 0 12px;
  color: #c5d0e6;
  font-weight: 500;
  font-size: 26px;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.login-hero h1 {
  margin: 0;
  max-width: 11em;
  font-size: clamp(36px, 4vw, 52px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: #f7f9ff;
}
.login-lead {
  max-width: 38em;
  margin: 22px 0 0;
  color: rgba(232, 238, 250, 0.94);
  font-size: 15px;
  line-height: 1.55;
}
.login-features {
  margin-top: auto;
  padding-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.login-features article {
  background: rgba(6, 16, 40, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  padding: 16px 16px 18px;
}
.login-features h2 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
.login-features p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(226, 234, 248, 0.9);
}
.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f7fb;
  padding: 40px 28px;
}
.login-panel-inner { width: min(420px, 100%); }
.login-org {
  display: block;
  width: 168px;
  max-height: 84px;
  height: auto;
  object-fit: contain;
  margin: 0 auto 28px;
}
.login-access {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  color: #5b6478;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.login-panel h2 {
  margin: 0;
  color: #1a2b6b;
  font-size: 28px;
  letter-spacing: -0.03em;
  font-weight: 700;
}
.login-hint { margin: 8px 0 26px; color: #5c6578; font-size: 14.5px; }
.login-field { margin-bottom: 16px; }
.login-field label {
  display: block;
  margin-bottom: 8px;
  color: #1e2a4a;
  font-size: 14px;
  font-weight: 600;
}
.login-field input {
  width: 100%;
  box-sizing: border-box;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #d5dbe8;
  border-radius: 12px;
  background: #fff;
  color: #15203b;
  font: 400 15px/1.2 Inter, sans-serif;
}
.login-field input:focus {
  outline: 2px solid #2454e6;
  outline-offset: 1px;
  border-color: #2454e6;
}
.login-password-wrap { position: relative; }
.login-password-wrap input { padding-right: 46px; }
#login-password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #667089;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#login-password-toggle:hover { background: #eef1f8; color: #1a2b6b; }
.login-error {
  color: #b42318;
  font-size: 13.5px;
  margin: 0 0 12px;
}
.login-error[hidden] { display: none; }
#login-submit.login-submit {
  width: 100%;
  height: 48px;
  margin-top: 6px;
  border: none;
  border-radius: 12px;
  background: #e2000e;
  color: #fff;
  font: 600 15px/1 Inter, sans-serif;
  cursor: pointer;
}
#login-submit.login-submit::before { content: "→  "; }
#login-submit.login-submit:hover:not(:disabled) { background: #243cc0; }
#login-submit.login-submit:disabled { opacity: 0.7; cursor: default; }
.login-note {
  margin: 22px 0 0;
  color: #6a7386;
  font-size: 13px;
  line-height: 1.5;
}
@media (max-width: 980px) {
  .login-split { grid-template-columns: 1fr; }
  .login-hero { padding: 28px 22px 32px; }
  .login-kicker { margin-top: 32px; }
  .login-features { grid-template-columns: 1fr; }
  .login-panel { padding: 32px 20px 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-plus, .nav-link, .nav-group-toggle { transition: none; }
  .btn:hover:not(:disabled) { transform: none; }
}

/* Compat aliases for any leftover class names */
.primary-nav-item { display: none; }
.sys-link { display: none; }

/* ---------- Main content shell ---------- */
.main { display:flex; flex-direction:column; min-height:0; height:100%; overflow:auto; }
.summary-bar { padding: 22px 40px; border-bottom: 1px solid var(--border); background: var(--card); }
.summary-top { display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.summary-donut-and-name { display:flex; align-items:center; gap:16px; }
.summary-donut { flex-shrink:0; }
.summary-bidder-name { font-family: var(--font-heading); font-weight:600; font-size:calc(22px * var(--fs, 1)); margin:0; }
.summary-overall { font-family: var(--font-mono); font-size:calc(12px * var(--fs, 1)); letter-spacing:0.06em; text-transform:uppercase; padding:5px 12px; border-radius:999px; }
.summary-overall.MET { background: var(--green-tint); color: var(--green); }
.summary-overall.NOT_MET { background: var(--red-tint); color: var(--red); }
.summary-overall.NEEDS_REVIEW { background: var(--amber-tint); color: var(--amber); }
.summary-overall.NA { background: var(--bg-subtle); color: var(--text-muted); box-shadow: inset 0 0 0 1px var(--border); }
.summary-overall.NEXT_STAGE_EVALUATION { background: var(--blue-tint, #eaf2fb); color: var(--blue, #4a90d9); }
.count-bar { display:flex; height:10px; border-radius:5px; overflow:hidden; background: var(--border); }
.count-seg { height:100%; }
.count-seg.met { background: var(--green); } .count-seg.not_met { background: var(--red); } .count-seg.needs_review { background: var(--amber); }
.count-seg.na { background: var(--text-muted); }
/* BUGS_LOG.md #315 -- same fix class as NA above: a 5th real verdict
   needs its own visible color, or the segment/swatch renders invisible. */
.count-seg.next_stage_evaluation { background: var(--blue, #4a90d9); }
.count-legend { display:flex; gap:22px; margin-top:10px; font-family: var(--font-mono); font-size:calc(12.5px * var(--fs, 1)); color: var(--text-muted); }
.count-legend span.swatch { display:inline-block; width:8px;height:8px;border-radius:2px; margin-right:6px; }
.count-legend .swatch.met{background:var(--green)} .count-legend .swatch.not_met{background:var(--red)} .count-legend .swatch.needs_review{background:var(--amber)}
.count-legend .swatch.na{background:var(--text-muted)}
.count-legend .swatch.next_stage_evaluation{background:var(--blue, #4a90d9)}
.dossier { flex:1; padding: 28px 40px 60px; overflow-y:auto; }
.dossier-empty { max-width: 460px; margin-top: 40px; }
.dossier-empty-title { font-family: var(--font-heading); font-size:calc(20px * var(--fs, 1)); font-weight:600; margin:0 0 8px; }
.dossier-empty-body { color: var(--text-muted); line-height:1.6; margin:0; }

/* ---------- Manage Tender: one persistent page ---------- */
/* No max-width at all now, matching .dossier (bidder reports, line 127)
   exactly -- Nikhil's direct follow-up request ("use full space") after
   the earlier 1600px cap was itself a real improvement over 900px but
   still not genuinely using the full available viewport on a wide
   screen. */
.manage-view { padding: 28px 36px 60px; overflow-y:auto; flex:1; display:none; }
.manage-view.visible { display:block; }
.dashboard-view, .tenders-view { padding: 8px 36px 60px; overflow-y: auto; flex: 1; display: none; }
.dashboard-view.visible, .tenders-view.visible { display: block; }

.analytics-row {
  display: grid; grid-template-columns: 1.55fr 1fr; gap: 16px; margin-bottom: 16px;
  align-items: stretch;
}
.analytics-row.even { grid-template-columns: 1fr 1fr; }
.chart-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 20px;
  padding: 18px 20px 14px;
  height: 300px;
  display: flex; flex-direction: column; min-width: 0;
}
.chart-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 4px; flex-shrink: 0; }
.chart-card-title { font-size: calc(15px * var(--fs, 1)); font-weight: 600; margin: 0; }
.chart-card-meta { display: flex; gap: 16px; font-size: calc(12px * var(--fs, 1)); color: var(--text-muted); }
.chart-card-meta strong { display: block; font-size: calc(16px * var(--fs, 1)); color: var(--text); font-weight: 700; }
.chart-body {
  flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center;
}
.chart-legend { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 8px; font-size: calc(12px * var(--fs, 1)); color: var(--text-muted); flex-shrink: 0; }
.chart-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.chart-svg { width: 100%; height: 188px; display: block; }
.chart-svg.chart-svg-ring { width: 168px; height: 168px; }
.stat-delta { font-size: calc(12px * var(--fs, 1)); font-weight: 600; }
.stat-delta.up { color: var(--green); }
.stat-delta.down { color: var(--red); }
.stat-delta.flat { color: var(--text-muted); }

.tender-list-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 20px;
  overflow: hidden; margin-top: 6px;
}
.tender-list-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 22px 12px;
}
.tender-list-head h2 { margin: 0; font-size: calc(16px * var(--fs, 1)); font-weight: 600; }
.tender-list-tools { display: flex; align-items: center; gap: 10px; }
.tender-search {
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  border-radius: 999px; padding: 8px 14px; font-size: calc(13px * var(--fs, 1)); font-family: var(--font); min-width: 220px;
}
.tender-table-wrap { overflow-x: auto; }
table.tender-table {
  width: 100%; border-collapse: collapse; font-size: calc(13px * var(--fs, 1));
}
table.tender-table th, table.tender-table td {
  padding: 12px 16px; text-align: left; border-top: 1px solid var(--border);
  vertical-align: middle;
}
table.tender-table th {
  font-size: calc(12px * var(--fs, 1)); letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--text-muted); font-weight: 600; border-top: none;
}
table.tender-table tbody tr { cursor: pointer; }
table.tender-table tbody tr:hover { background: var(--accent-tint); }
table.tender-table .bid-id { font-family: var(--font-mono); font-weight: 600; white-space: nowrap; }
table.tender-table .bid-id a { color: var(--accent); text-decoration: none; }
table.tender-table .bid-id a:hover { text-decoration: underline; }
table.tender-table .tender-name { font-weight: 600; }
table.tender-table .muted { color: var(--text-muted); white-space: nowrap; }
.status-chip {
  display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px;
  font-size: calc(12px * var(--fs, 1)); font-weight: 600; text-transform: capitalize;
}
.status-chip.draft { background: var(--bg-subtle); color: var(--text-muted); box-shadow: inset 0 0 0 1px var(--border); }
.status-chip.extracted { background: var(--accent-tint); color: var(--accent); }
.status-chip.in_review { background: var(--amber-tint); color: var(--amber); }
.status-chip.complete { background: var(--green-tint); color: var(--green); }
.eval-cell { min-width: 160px; }
.eval-bar { display: flex; height: 7px; border-radius: 999px; overflow: hidden; background: var(--border); margin-bottom: 6px; }
.eval-bar span { display: block; height: 100%; }
.eval-bar .classified { background: var(--green); }
.eval-bar .pending { background: var(--amber); }
.eval-label { font-size: calc(12px * var(--fs, 1)); color: var(--text-muted); }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
.stat-card {
  border-radius: 18px;
  padding: 22px 22px 16px;
  min-height: 148px;
  display: flex; flex-direction: column; justify-content: space-between;
  color: var(--text);
}
.stat-lilac { background: var(--violet-tint); }
.stat-mint { background: var(--green-tint); }
.stat-sky { background: var(--accent-tint); }
.stat-rose { background: var(--red-tint); }
[data-theme="navy"] .stat-lilac,
[data-theme="navy"] .stat-mint,
[data-theme="navy"] .stat-sky,
[data-theme="navy"] .stat-rose,
.stat-kicker { font-size: calc(13px * var(--fs, 1)); font-weight: 600; opacity: 0.75; }
.stat-value { font-size: calc(34px * var(--fs, 1)); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; margin: 10px 0 8px; }
.stat-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.stat-meta { font-size: calc(12px * var(--fs, 1)); color: var(--text-muted); }
.stat-spark { width: 72px; height: 28px; color: color-mix(in srgb, var(--text) 45%, transparent); flex-shrink: 0; }

.dash-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}
.dash-panel-tabs {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border);
}
.dash-tab {
  border: none; background: transparent; cursor: pointer;
  text-align: left; padding: 16px 18px; font-family: var(--font); color: var(--text);
  text-decoration: none; display: block;
}
.dash-tab + .dash-tab { border-left: 1px solid var(--border); }
.dash-tab[hidden] { display: none !important; }
.dash-tab strong { display: block; font-size: calc(14px * var(--fs, 1)); }
.dash-tab span { display: block; margin-top: 4px; font-size: calc(12px * var(--fs, 1)); color: var(--text-muted); }
.dash-tab:hover { background: var(--accent-tint); }
.dash-panel-body {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 28px 24px;
}
.dash-panel-kicker { font-size: calc(12px * var(--fs, 1)); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.dash-panel-title { margin: 6px 0 8px; font-size: calc(22px * var(--fs, 1)); font-weight: 700; }
.dash-panel-copy { margin: 0; color: var(--text-muted); font-size: calc(14px * var(--fs, 1)); max-width: 520px; line-height: 1.5; }
.dash-panel-actions { display: flex; gap: 10px; flex-shrink: 0; }

.menu-grid-overlay {
  position: fixed; inset: 0; z-index: 70;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  display: flex; align-items: stretch; justify-content: center;
}
.menu-grid-overlay[hidden] { display: none !important; }
.menu-grid-dialog {
  width: min(1080px, 100%); max-height: 100%; overflow: auto;
  background: var(--card); padding: 28px 36px 48px;
}
.menu-grid-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.menu-grid-head h2 { margin: 0; font-size: calc(22px * var(--fs, 1)); }
.menu-grid-body h3 { margin: 18px 0 12px; font-size: calc(15px * var(--fs, 1)); font-weight: 600; }
.module-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 22px;
}
.module-item .animated-icon {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  border: none; background: transparent; cursor: pointer; color: var(--text);
  font-family: var(--font); min-width: 92px; text-decoration: none;
}
.module-box {
  width: 88px; height: 88px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.module-item .animated-icon:hover .module-box {
  background: linear-gradient(136deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: var(--on-accent); border-color: transparent;
}
.module-item[hidden] { display: none !important; }
.module-item .animated-icon:hover .module-title { color: var(--accent); font-weight: 700; }
.manage-title { font-family: var(--font-heading); font-size:calc(22px * var(--fs, 1)); font-weight:700; margin:0; }
.manage-title-row { display:flex; align-items:baseline; justify-content:space-between; gap:16px; margin-bottom:4px; }
.manage-sub { font-size:calc(13px * var(--fs, 1)); color: var(--text-muted); margin-bottom:20px; }
.section-card { background: var(--card); border:1px solid var(--border); border-radius: 14px; margin-bottom:16px; overflow:hidden; box-shadow: 0 1px 2px rgba(16,24,40,0.04); }
.section-card:hover { box-shadow: 0 8px 24px rgba(16,24,40,0.06); }
.section-card.hidden-section { display:none; }
.section-head { display:flex; align-items:center; justify-content:space-between; padding: 14px 20px; border-bottom:1px solid var(--border); }
.section-head-left { display:flex; align-items:center; gap:10px; }
.section-head-right { display:flex; align-items:center; gap:10px; }
.section-num { width:24px;height:24px; border-radius:50%; background: var(--bg); color:var(--text-muted); font-size:calc(12px * var(--fs, 1)); font-weight:700; display:flex; align-items:center; justify-content:center; flex-shrink:0; font-family: var(--font-mono); }
.section-num.done { background: var(--green-tint); color: var(--green); }
.section-title-text { font-weight:600; font-size:calc(14.5px * var(--fs, 1)); white-space:nowrap; }
.section-status { font-size:calc(12px * var(--fs, 1)); color: var(--text-muted); }
.section-status.done { color: var(--green); font-weight:500; }
.section-body { padding: 16px 20px; }
.inline-row { display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:10px; }
.text-input, .select-input { font-size:calc(13px * var(--fs, 1)); padding:8px 11px; border-radius:6px; border:1px solid var(--paper-border-strong); background:var(--card); color: var(--text); }
.text-input { flex:1; min-width:180px; }
.btn { font-size:calc(12.5px * var(--fs, 1)); font-weight:600; padding:8px 16px; border-radius:10px; border:none; cursor:pointer; font-family: var(--font); transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }   /* #749 -- was the left rail's colours: on a white page the button showed as plain text ("Re-run extraction") */
.btn-secondary { background: var(--bg); color: var(--text); border:1px solid var(--border); }
.btn-run { background: var(--accent); color: var(--on-accent); }
.btn:disabled { opacity:0.5; cursor:default; }
.empty-state { text-align:center; padding: 22px 10px; color: var(--text-faint); font-size:calc(13px * var(--fs, 1)); }
.bidder-manage-row { border:1px solid var(--border); border-radius:8px; padding:12px 14px; margin-bottom:8px; }
.bidder-manage-top { display:flex; justify-content:space-between; align-items:center; flex-wrap:nowrap; gap:10px; }
.bidder-manage-right { display:flex; align-items:center; gap:14px; flex-shrink:0; }
.bidder-manage-name { font-weight:600; font-size:calc(13.5px * var(--fs, 1)); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bidder-manage-meta { font-size:calc(12px * var(--fs, 1)); color: var(--text-muted); white-space:nowrap; }
.text-link { font-size:calc(12px * var(--fs, 1)); color: var(--accent); cursor:pointer; opacity:0.85; white-space:nowrap; }
.text-link:hover { opacity:1; text-decoration:underline; }
.remove-link { font-size:calc(12px * var(--fs, 1)); color: var(--red); cursor:pointer; opacity:0.7; white-space:nowrap; }
.remove-link:hover { opacity:1; text-decoration:underline; }
.bidder-manage-upload { margin-top:10px; padding-top:10px; border-top:1px dashed var(--border); display:flex; gap:10px; align-items:center; }
.file-chosen-label { font-size:calc(12.5px * var(--fs, 1)); color: var(--text-muted); }
.bidder-add-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
@media (max-width: 900px) {
  .bidder-add-grid { grid-template-columns: 1fr; }
}
.bidder-add-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--card, #fff);
}
.bidder-add-title { margin: 0 0 4px; font-size: calc(13.5px * var(--fs, 1)); font-weight: 650; }
.bidder-add-hint { margin: 0 0 10px; font-size: calc(12px * var(--fs, 1)); color: var(--text-muted); line-height: 1.4; }
.doc-list { display:none; margin-top:10px; padding-top:10px; border-top:1px dashed var(--border); font-size:calc(12.5px * var(--fs, 1)); color: var(--text-muted); }
.doc-list.open { display:block; }
.doc-row { display:flex; justify-content:space-between; align-items:center; padding:4px 0; }
.doc-name { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.doc-delete { color: var(--red); cursor:pointer; opacity:0.6; font-size:calc(12px * var(--fs, 1)); flex-shrink:0; margin-left:10px; white-space:nowrap; }
.doc-delete:hover { opacity:1; text-decoration:underline; }
.run-log-box { background: var(--rail-bg); color: var(--rail-text); font-family: var(--font-mono); font-size:calc(12.5px * var(--fs, 1)); line-height:1.7; padding:14px 16px; border-radius:8px; height:150px; overflow-y:auto; margin-top:10px; white-space:pre-wrap; }
/* A grid that wraps, not a flex row that squeezes: four fields in a 560px
   modal left every label wrapping over three lines. Fields top-align, so a
   short control no longer floats in the middle of a tall column. */
.model-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px 16px;
  margin-bottom: 12px;
  align-items: start;
}
.model-field { display:flex; flex-direction:column; justify-content:flex-start; }
.model-field label { display:block; font-size:calc(12px * var(--fs, 1)); color: var(--text-faint); text-transform:uppercase; margin-bottom:4px; line-height:1.3; }

.system-settings-panel { display:none; position:fixed; inset:0; background: rgba(20,20,25,0.4); z-index:60; align-items:center; justify-content:center; }
.system-settings-panel.open { display:flex; }
/* Wider, and scrolls within itself with the title and close button pinned --
   the panel had grown past the viewport, so closing it meant scrolling back
   up to find the x. */
.system-settings-inner {
  background: var(--card);
  border-radius: var(--radius-md);
  width: min(780px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
  padding: 0 26px 22px;
}
.system-settings-inner.system-settings-wide { width: min(720px, 94vw); }
.system-settings-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--card);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: calc(14px * var(--fs, 1));
  padding: 20px 0 12px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border-color, #eee);
}
.drawer-close { border:none; background:none; font-size:calc(20px * var(--fs, 1)); cursor:pointer; color: var(--text-muted); }
.system-settings-note { font-size:calc(12.5px * var(--fs, 1)); color: var(--text-muted); line-height:1.6; margin: 0 0 16px; }
.stamp-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.stamp {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: calc(13px * var(--fs, 1));
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 10px 22px;
  border-radius: 999px 999px 999px 4px / 60% 60% 60% 8%;
  transform: rotate(-4deg);
  display: inline-block;
  border: 2px solid;
  position: relative;
}

.stamp::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px dashed currentColor;
  border-radius: inherit;
  opacity: 0.5;
}

.stamp.MET { color: var(--green); border-color: var(--green); background: var(--green-tint); }
.stamp.NOT_MET { color: var(--red); border-color: var(--red); background: var(--red-tint); }
.stamp.NEEDS_REVIEW { color: var(--amber); border-color: var(--amber); background: var(--amber-tint); }
.stamp.NA { color: var(--text-muted); border-color: var(--text-muted); background: var(--bg-subtle); }
/* BUGS_LOG.md #315 -- same fix class as NA above: a 5th real verdict
   needs its own stamp styling, or the override picker/stamp renders
   with no visible color for this state. */
.stamp.NEXT_STAGE_EVALUATION { color: var(--blue, #4a90d9); border-color: var(--blue, #4a90d9); background: var(--blue-tint, #eaf2fb); }

.criterion-entry {
  background: var(--paper-card);
  border: 1px solid var(--paper-border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
}

.criterion-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  cursor: pointer;
}

.criterion-id {
  font-family: var(--font-mono);
  font-size: calc(12px * var(--fs, 1));
  color: var(--gold-dark);
  background: var(--gold-tint);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.criterion-category {
  font-weight: 500;
  font-size: calc(14.5px * var(--fs, 1));
  flex: 1;
}

.criterion-verdict-badge {
  font-family: var(--font-mono);
  font-size: calc(12px * var(--fs, 1));
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.criterion-verdict-badge.MET { background: var(--green-tint); color: var(--green); }
.criterion-verdict-badge.NOT_MET { background: var(--red-tint); color: var(--red); }
.criterion-verdict-badge.NEEDS_REVIEW { background: var(--amber-tint); color: var(--amber); }
.criterion-verdict-badge.NA { background: var(--bg-subtle); color: var(--text-muted); box-shadow: inset 0 0 0 1px var(--border); }
.criterion-verdict-badge.NEXT_STAGE_EVALUATION { background: var(--blue-tint, #eaf2fb); color: var(--blue, #4a90d9); }

.verdict-pair {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.verdict-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-end;
}

.verdict-col-label {
  font-size: calc(12px * var(--fs, 1));
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.criterion-verdict-badge.reference {
  opacity: 0.65;
}

.user-verdict-badge {
  font-family: var(--font-mono);
  font-size: calc(12px * var(--fs, 1));
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.user-verdict-badge.MET { background: var(--green-tint); color: var(--green); }
.user-verdict-badge.NOT_MET { background: var(--red-tint); color: var(--red); }
.user-verdict-badge.NEEDS_REVIEW { background: var(--amber-tint); color: var(--amber); }
.user-verdict-badge.NA { background: var(--bg-subtle); color: var(--text-muted); box-shadow: inset 0 0 0 1px var(--border); }
.user-verdict-badge.NEXT_STAGE_EVALUATION { background: var(--blue-tint, #eaf2fb); color: var(--blue, #4a90d9); }

.verdict-picker {
  display: none;
  gap: 6px;
  padding: 10px 18px;
  border-top: 1px solid var(--paper-border);
}

.verdict-picker.open {
  display: flex;
}

.verdict-pick-btn {
  font-family: var(--font-mono);
  font-size: calc(12px * var(--fs, 1));
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--paper-border);
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
}

.verdict-pick-btn.current.MET { background: var(--green-tint); color: var(--green); border-color: var(--green); }
.verdict-pick-btn.current.NOT_MET { background: var(--red-tint); color: var(--red); border-color: var(--red); }
.verdict-pick-btn.current.NEEDS_REVIEW { background: var(--amber-tint); color: var(--amber); border-color: var(--amber); }
.verdict-pick-btn.current.NA { background: var(--bg-subtle); color: var(--text-muted); box-shadow: inset 0 0 0 1px var(--border); border-color: var(--text-muted); }
/* BUGS_LOG.md #315 -- same fix class as NA above. */
.verdict-pick-btn.current.NEXT_STAGE_EVALUATION { background: var(--blue-tint, #eaf2fb); color: var(--blue, #4a90d9); border-color: var(--blue, #4a90d9); }

.override-note {
  font-size: calc(12px * var(--fs, 1));
  color: var(--text-faint);
  font-style: italic;
  padding: 0 18px 10px;
}

.overall-verdict-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
  margin-bottom: 8px;
}

.overall-verdict-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.date-flag-marker {
  font-size: calc(12px * var(--fs, 1));
  color: var(--amber);
  background: var(--amber-tint);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.date-flag-callout {
  font-size: calc(13px * var(--fs, 1));
  color: var(--text-muted);
  background: var(--amber-tint);
  border-left: 3px solid var(--amber);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.docs-flag-marker {
  font-size: calc(12px * var(--fs, 1));
  color: var(--amber);
  background: var(--amber-tint);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

/* BUGS_LOG.md #260 -- real, per-row signals: a scoring criterion's
   computed marks (a real, visible number, not buried in prose), and
   a criterion whose own shape needed a dedicated evaluator that
   didn't actually run for it specifically (not a per-tab guess). */
.marks-badge {
  font-size: calc(12px * var(--fs, 1));
  font-weight: 600;
  color: var(--accent, #0969da);
  background: var(--hover-bg, rgba(9,105,218,0.1));
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.review-flag-marker {
  font-size: calc(12px * var(--fs, 1));
  color: var(--amber);
  background: var(--amber-tint);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.docs-flag-callout {
  font-size: calc(13px * var(--fs, 1));
  color: var(--text-muted);
  background: var(--amber-tint);
  border-left: 3px solid var(--amber);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.criterion-chevron {
  color: var(--text-faint);
  font-size: calc(13px * var(--fs, 1));
  transition: transform 0.15s ease;
}

.criterion-entry.open .criterion-chevron { transform: rotate(90deg); }

.criterion-body {
  display: none;
  padding: 0 18px 18px 18px;
  border-top: 1px solid var(--paper-border);
}

.criterion-entry.open .criterion-body { display: block; padding-top: 14px; }

.criterion-description {
  font-size: calc(13.5px * var(--fs, 1));
  color: var(--text-muted);
  font-style: italic;
  margin: 0 0 12px;
}

.criterion-reason {
  font-size: calc(13.5px * var(--fs, 1));
  line-height: 1.6;
  margin: 0 0 12px;
}

.citation-line {
  font-family: var(--font-mono);
  font-size: calc(12.5px * var(--fs, 1));
  background: var(--paper);
  border: 1px solid var(--paper-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
  margin-bottom: 8px;
}

.citation-line:hover { border-color: var(--gold); }

.citation-line .cf { color: var(--gold-dark); }
.citation-line .cp { color: var(--text-muted); }
.citation-line .cq { color: var(--text); }

/* BUGS_LOG.md #338 -- the block-level .citation-line styling above
   (padding/border/margin-bottom) is designed for a standalone citation
   card, not text embedded mid-sentence inside a reason's own prose.
   A distinct, inline-appropriate style for the SAME .citation-line class
   when it wraps a reason's own in-text citation: an underline and the
   same pointer/hover affordance, without breaking the surrounding
   sentence's own flow. */
.criterion-reason .citation-line,
#citation-panel-body p .citation-line {
  font-family: inherit;
  font-size: inherit;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: 0;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
  color: var(--gold-dark);
}
.criterion-reason .citation-line:hover,
#citation-panel-body p .citation-line:hover {
  color: var(--gold);
}

/* BUGS_LOG.md #349 -- a criterion's own RFP source-location reference.
   .criterion-source-hint is the plain, muted label line; .rfp-source-line
   is only the clickable part within it (when a real page number was
   found), styled the same inline way as the reason's own in-text
   citations just above -- same underline/hover affordance, kept
   visually distinct from a bidder-evidence citation by color so the two
   different documents they open are never visually conflated. */
.criterion-source-hint {
  font-size: calc(12.5px * var(--fs, 1));
  color: var(--text-muted);
  margin: 4px 0 0;
}
.rfp-source-line {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
  color: var(--text-muted);
}
.rfp-source-line:hover {
  color: var(--text);
}

.additional-citation-label {
  font-size: calc(12px * var(--fs, 1));
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 12px 0 6px;
}

.exemption-line {
  font-size: calc(13px * var(--fs, 1));
  color: var(--gold-dark);
  background: var(--gold-tint);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-top: 8px;
}

/* ---------- Citation overlay ---------- */

.citation-overlay, .live-run-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 33, 61, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

/* Belt-and-braces fix: the rule above sets display:flex unconditionally,
   which in some browsers can tie with (or beat) the built-in [hidden]
   rule at equal specificity, leaving the overlay visually stuck open
   even after JS sets .hidden = true. This selector is more specific
   (class + attribute) and !important, so [hidden] always wins here,
   regardless of browser. */
.citation-overlay[hidden], .live-run-overlay[hidden] {
  display: none !important;
}
.citation-panel-body {
  padding: 20px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: calc(13px * var(--fs, 1));
  line-height: 1.7;
  white-space: pre-wrap;
}

.citation-panel-body mark {
  background: var(--gold-tint);
  color: var(--gold-dark);
  padding: 1px 3px;
  border-radius: 3px;
}

.citation-unavailable { color: var(--text-faint); font-style: italic; }

/* ---------- Live run panel ---------- */

.live-run-body { padding: 20px; overflow-y: auto; }

.live-run-note {
  font-size: calc(13px * var(--fs, 1));
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 16px;
}

.live-run-note code {
  font-family: var(--font-mono);
  background: var(--paper);
  padding: 1px 5px;
  border-radius: 3px;
}

.live-run-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

select {
  flex: 1;
  font-family: var(--font-body);
  font-size: calc(13.5px * var(--fs, 1));
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--paper-border-strong);
  background: var(--card); color: var(--text);
  color: var(--text);
}

.button-primary {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: calc(13.5px * var(--fs, 1));
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
}

.button-primary:hover { background: var(--accent-strong); }
.button-primary:disabled { opacity: 0.5; cursor: default; }

.button-run-all { background: var(--gold-dark); }
.button-run-all:hover { background: var(--gold); }

.live-run-queue {
  font-family: var(--font-mono);
  font-size: calc(12px * var(--fs, 1));
  color: var(--text-muted);
  margin: -8px 0 14px;
}

.live-run-log {
  background: var(--ink);
  color: var(--ink-text);
  font-family: var(--font-mono);
  font-size: calc(12px * var(--fs, 1));
  line-height: 1.6;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  height: 320px;
  overflow-y: auto;
  margin: 0;
  white-space: pre-wrap;
}

@media (max-width: 1100px) {
  .stats-grid, .dash-panel-tabs { grid-template-columns: repeat(2, 1fr); }
  .analytics-row, .analytics-row.even { grid-template-columns: 1fr; }
  .chart-card { height: auto; min-height: 280px; }
}
@media (max-width: 860px) {
  .app-body { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; }
  .header-logo, .page-back { width: auto; }
  .profile-name { display: none; }
  .header-tender-select { width: min(160px, 40vw); }
  .stats-grid, .dash-panel-tabs { grid-template-columns: 1fr; }
  .dash-panel-body { flex-direction: column; align-items: flex-start; }
  .dossier, .summary-bar, .dashboard-view, .tenders-view, .manage-view { padding-left: 20px; padding-right: 20px; }
}

/* ---------- Comparison view ---------- */

.comparison-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.comparison-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: calc(20px * var(--fs, 1));
  margin: 0;
}

.comparison-actions { display: flex; gap: 10px; }

.link-button {
  font-family: var(--font-body);
  font-size: calc(13px * var(--fs, 1));
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid var(--paper-border-strong);
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  background: var(--paper-card);
  cursor: pointer;
}

.link-button:hover { border-color: var(--gold); color: var(--gold-dark); }
.link-button:disabled { opacity: 0.5; cursor: default; }
.link-button:disabled:hover { border-color: var(--paper-border-strong); color: var(--text-muted); }

.comparison-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--paper-border);
  border-radius: var(--radius-md);
  background: var(--paper-card);
  margin-bottom: 24px;
}

table.comparison-table {
  border-collapse: collapse;
  width: 100%;
  font-size: calc(13.5px * var(--fs, 1));
}

table.comparison-table th, table.comparison-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--paper-border);
  text-align: left;
  white-space: nowrap;
}

table.comparison-table th {
  font-family: var(--font-mono);
  font-size: calc(12px * var(--fs, 1));
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--paper);
}

table.comparison-table td.category-cell {
  white-space: normal;
  min-width: 200px;
  font-weight: 500;
}

table.comparison-table td.pq-id-cell {
  font-family: var(--font-mono);
  color: var(--gold-dark);
}

/* Grouped matrix's chapter/section column -- direct feedback: the section
   text was taking the full un-wrapped width (inheriting the table's
   default white-space:nowrap), pushing bidder columns almost off-screen.
   Constrained to roughly half the effective width Flat view's combined
   PQ+Category columns use, with real text wrapping instead of forcing
   one long line. */
table.comparison-table td.comparison-section-cell {
  white-space: normal;
  width: 50%;
  line-height: 1.35;
}
table.comparison-table td.comparison-section-cell.chapter-row {
  font-weight: 600;
}
.section-expand-arrow {
  display: inline-block;
  width: 12px;
  color: var(--text-muted);
  font-size: calc(12px * var(--fs, 1));
}

/* Criteria management table (Add/Edit/Delete PQs) -- DELIBERATELY its own
   class, not a reuse of .comparison-table. The first version reused
   .comparison-table directly, which forces white-space:nowrap on every
   cell -- correct for that table's short verdict badges, but wrong here:
   this table has a long free-text description column, and nowrap made it
   overflow straight through the neighbouring columns instead of wrapping,
   a real rendering bug caught from a live screenshot. table-layout:fixed
   with explicit widths on the narrow columns + normal wrapping on the
   wide one is the actual fix, not a tweak of the old rule. */
table.criteria-table {
  border-collapse: collapse;
  width: 100%;
  table-layout: fixed;
  font-size: calc(13.5px * var(--fs, 1));
}

table.criteria-table th, table.criteria-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--paper-border);
  text-align: left;
  vertical-align: top;
  white-space: normal;
  overflow-wrap: break-word;
}

table.criteria-table th {
  font-family: var(--font-mono);
  font-size: calc(12px * var(--fs, 1));
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--paper);
}

/* Column layout rewritten per Nikhil's direct UI feedback on the real
   rendered page: PQ id hidden entirely (shown via title="" hover tooltip
   on the Bookmark cell instead, not a dedicated column); Section split
   into two real columns (Bookmark = the real chapter, Section = the real
   sub-heading -- previously combined into one, matching what the Grouped
   view's own two-level hierarchy already exposes); Edit/Delete are now
   their own narrow columns, not one combined "Actions" cell; Description
   and Threshold get the real room freed up by removing the wide PQ
   column, rather than leaving it as blank space. */
/* Still used by the multi-bidder comparison table (out of scope for this
   round of changes -- addressed when the comparison report itself is
   built/reviewed next), kept minimal so that table doesn't go unstyled
   in the meantime. */
table.criteria-table td.pq-id-cell, table.comparison-table td.pq-id-cell { font-family: var(--font-mono); color: var(--gold-dark); width: 100px; }

table.criteria-table td.bookmark-cell { color: var(--text-muted); width: 110px; }
table.criteria-table td.section-cell { color: var(--text-muted); width: 160px; }
table.criteria-table td.category-cell { font-weight: 500; width: 130px; }
table.criteria-table td.description-cell { width: auto; }
table.criteria-table td.threshold-cell { width: auto; }
table.criteria-table td.citation-cell { width: 160px; font-size: calc(12px * var(--fs, 1)); color: var(--text-muted); }
table.criteria-table td.mandatory-cell { width: 60px; white-space: nowrap; }
table.criteria-table td.edit-cell { width: 40px; white-space: nowrap; }
table.criteria-table td.delete-cell { width: 50px; white-space: nowrap; }

/* Grouped view's inner per-section table -- no Bookmark/Section columns
   (those ARE the rollup levels); Category kept modest, Description and
   Threshold (added back -- was missing entirely, a real gap, not a width
   tweak) get the dominant share of the row. */
table.criteria-table.grouped-inner td.category-cell { width: 140px; }
table.criteria-table.grouped-inner td.description-cell { width: auto; }
table.criteria-table.grouped-inner td.threshold-cell { width: auto; }
table.criteria-table.grouped-inner td.citation-cell { width: 150px; }
table.criteria-table.grouped-inner td.mandatory-cell { width: 60px; white-space: nowrap; }

/* Small, deliberately understated status dot -- replaces the old
   PQ-column-based [EDITED]/[DELETED] text badge now that the id column
   itself is gone (hover-only). A colored dot before the Bookmark text is
   enough signal without needing a whole column back for it. */
.criterion-status-dot { display:inline-block; width:7px; height:7px; border-radius:50%; margin-right:6px; vertical-align:middle; }
.criterion-status-dot.edited { background: var(--amber); }
.criterion-status-dot.deleted { background: var(--red); }

/* Collapsible sections -- click a section header to show/hide its body,
   so a page with several done sections doesn't stay permanently sprawled
   out. Chevron rotates to show state; body height/visibility toggles via
   the .collapsed class, added/removed in JS. */
.section-head { cursor: pointer; user-select: none; }
.section-body.collapsed { display: none; }
.section-chevron { display:inline-block; transition: transform 0.15s ease; color: var(--text-muted); font-size: calc(12px * var(--fs, 1)); margin-left: 6px; }
.section-chevron.collapsed { transform: rotate(-90deg); }

.criteria-count-note { font-size: calc(12px * var(--fs, 1)); color: var(--text-muted); margin: 4px 0 12px; }

.category-banner {
  background: var(--amber-tint); border: 0.5px solid var(--amber); border-radius: var(--radius-md);
  padding: 12px 14px; margin: 10px 0; font-size: calc(13px * var(--fs, 1));
}
.category-banner-title { color: var(--amber); font-weight: 600; margin: 0 0 4px; }
.category-banner-body { color: var(--text); margin: 0 0 10px; }
.log-toggle-link { font-size: calc(12px * var(--fs, 1)); color: var(--text-muted); cursor: pointer; text-decoration: underline; margin-top: 8px; display: inline-block; }

/* Description/Threshold cells in the criteria table -- clamp to a few
   lines with an ellipsis instead of stretching every row to fit the
   longest requirement (some run to a full paragraph). Clicking opens the
   full text in a small popup (openCriteriaDetail in app.js). */
.clamp-cell {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
}
.clamp-cell:hover { text-decoration: underline; text-decoration-style: dotted; text-decoration-color: var(--text-muted); }

.verdict-cell-badge {
  font-family: var(--font-mono);
  font-size: calc(12px * var(--fs, 1));
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  display: inline-block;
}

.verdict-cell-badge.MET { background: var(--green-tint); color: var(--green); }
.verdict-cell-badge.NOT_MET { background: var(--red-tint); color: var(--red); }
.verdict-cell-badge.NEEDS_REVIEW { background: var(--amber-tint); color: var(--amber); }
.verdict-cell-badge:hover { filter: brightness(0.95); }

.comparison-overall-row td { font-weight: 500; background: var(--paper); }

/* ---------- Ollama status indicator ---------- */


/* ---------- Restored: lost during CSS reassembly, found via a real vs. old selector diff ---------- */
.tender-select {
  margin-top: 10px;
  width: 100%;
  font-family: var(--font-mono);
  font-size: calc(12px * var(--fs, 1));
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--ink-border);
  background: var(--ink-raised);
  color: var(--ink-text);
  cursor: pointer;
}
.tender-select:hover { border-color: var(--gold); }

.citation-panel, .live-run-panel {
  background: var(--paper-card);
  border-radius: var(--radius-md);
  width: min(640px, 90vw);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--paper-border-strong);
}

.citation-panel-header, .live-run-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--paper-border);
  font-family: var(--font-mono);
  font-size: calc(13px * var(--fs, 1));
  color: var(--text-muted);
}

.icon-button {
  background: none;
  border: none;
  font-size: calc(20px * var(--fs, 1));
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
}

#run-status-banner {
  position: sticky;
  top: 0;
  z-index: 1000;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px;
  background: var(--accent-tint);
  color: var(--accent-strong);
  font-size: calc(14px * var(--fs, 1));
  font-weight: 600;
  border-bottom: 2px solid var(--accent);
}

/* BUGS_LOG.md #687 -- the run banner's buttons big and solid enough to find at a glance */
.run-status-actions { display: inline-flex; gap: 10px; align-items: center; }
#run-status-stop-btn, #run-status-view-btn, #run-status-continue-btn, #run-status-close-btn {
  font-size: calc(14px * var(--fs, 1)); font-weight: 600; min-height: 38px; padding: 0 20px;
  border-radius: var(--radius); cursor: pointer; font-family: var(--font);
}
#run-status-stop-btn { border: 1px solid var(--red); background: var(--red); color: var(--on-accent); }
#run-status-stop-btn:disabled { opacity: 0.6; cursor: default; }
#run-status-view-btn { border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent); }
#run-status-stop-btn:focus-visible, #run-status-view-btn:focus-visible { outline: 3px solid var(--accent-strong); outline-offset: 2px; }

.feedback-block { margin: 0 0 12px; }
.feedback-block label { display:block; font-size:calc(12px * var(--fs, 1)); color: var(--text-muted); margin-bottom:6px; }
.feedback-textarea {
  width: 100%; min-height: 72px; resize: vertical;
  font-size: calc(13px * var(--fs, 1)); padding: 8px 11px; border-radius: 6px;
  border: 1px solid var(--paper-border-strong); background: var(--card); color: var(--text);
  font-family: var(--font); line-height: 1.45;
}
.extraction-history-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 0 0 10px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--bg);
}
.extraction-history-bar label { font-size: calc(12px * var(--fs, 1)); color: var(--text-muted); white-space: nowrap; }
.extraction-history-bar .select-input { min-width: 260px; flex: 1; }
.version-banner {
  font-size: calc(13px * var(--fs, 1)); color: var(--amber, #9a6a00);
  background: var(--amber-tint);
  border-radius: 6px; padding: 8px 12px; margin-bottom: 10px;
}
.diff-panel {
  font-size: calc(13px * var(--fs, 1)); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; margin-bottom: 10px; background: var(--card);
}
.diff-counts { color: var(--text-muted); margin: 6px 0 8px; }
.diff-section-title { font-weight: 600; margin: 8px 0 4px; }
.diff-panel ul { margin: 0 0 8px; padding-left: 18px; }
.diff-field { margin: 4px 0 8px; }
.diff-field-name { display: block; font-size: calc(12px * var(--fs, 1)); color: var(--text-muted); text-transform: uppercase; }
.diff-from { color: var(--red); text-decoration: line-through; }
.diff-to { color: var(--green, #1e7a34); }
.page-link { color: var(--accent); font-weight: 600; text-decoration: none; white-space: nowrap; margin-right: 4px; }
.page-link:hover { text-decoration: underline; }
.citation-quote { cursor: pointer; }

#pdf-viewer-overlay { z-index: 60; }
#pdf-viewer-overlay.pdf-viewer-overlay--full {
  padding: 0;
  background: var(--bg);   /* #680: the full-screen viewer in the theme's own colours */
}
.pdf-viewer-panel {
  background: var(--paper-card);
  border-radius: var(--radius-md);
  width: min(1100px, 96vw);
  height: min(92vh, 1200px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--paper-border-strong);
}
.pdf-viewer-panel--full {
  width: 100vw;
  height: 100vh;
  max-height: 100vh;
  max-width: 100vw;
  border-radius: 0;
  border: none;
}
.pdf-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--paper-border);
  font-family: var(--font-mono);
  font-size: calc(13px * var(--fs, 1));
  color: var(--text-muted);
  flex-wrap: wrap;
}
.pdf-viewer-nav { display: flex; align-items: center; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
.pdf-viewer-sep { width: 1px; height: 18px; background: var(--paper-border); margin: 0 4px; }
#pdf-viewer-page-label { color: var(--text); font-weight: 600; min-width: 110px; text-align: center; }
#pdf-viewer-zoom-label { color: var(--text); font-weight: 600; min-width: 48px; text-align: center; }
.pdf-viewer-quote {
  font-size: calc(12.5px * var(--fs, 1));
  line-height: 1.45;
  color: var(--text);
  background: var(--gold-tint, #f7f1e1);
  padding: 8px 16px;
  border-bottom: 1px solid var(--paper-border);
  white-space: normal;
}
.pdf-viewer-stage {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: var(--bg-subtle);   /* #680 */
  padding: 12px;
  text-align: center;
}
.pdf-viewer-page-wrap {
  display: inline-block;
  line-height: 0;
  vertical-align: top;
}
#pdf-viewer-canvas {
  display: block;
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
  background: #fff;
  max-width: none;
}
/* BUGS_LOG.md #250/#252 -- evaluation-shape tab view, real tab buckets by
   what kind of evaluation each criterion needs, not RFP section. */
.shape-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--border-color); margin-bottom: 14px; }
.shape-tab { padding: 8px 14px; border: none; background: none; cursor: pointer; font-size: calc(13px * var(--fs, 1)); color: var(--text-muted); border-bottom: 2px solid transparent; }
.shape-tab.active { color: var(--accent, #0969da); border-bottom-color: var(--accent, #0969da); font-weight: 600; }
.shape-tab:hover { background: var(--hover-bg, rgba(0,0,0,0.04)); }
.shape-tab-count { background: var(--hover-bg, rgba(0,0,0,0.06)); padding: 1px 7px; border-radius: 10px; font-size: calc(12px * var(--fs, 1)); margin-left: 4px; }
.shape-tab.active .shape-tab-count { background: var(--accent, #0969da); color: var(--on-accent); }
.shape-tab.needs-review { color: var(--amber); }
.shape-tab.needs-review.active { color: var(--amber); border-bottom-color: var(--amber); }
.shape-tab.needs-review .shape-tab-count { background: var(--amber-tint); color: var(--amber); }
.shape-tab.needs-review.active .shape-tab-count { background: var(--amber); color: var(--on-accent); }
.shape-tab .review-dot { font-size: calc(12px * var(--fs, 1)); color: var(--amber); }
.shape-panel-note { background: var(--amber-tint); color: var(--amber); border: 1px solid var(--amber); border-radius: 6px; padding: 8px 12px; font-size: calc(12.5px * var(--fs, 1)); margin-bottom: 12px; }

/* Attention ordering and the collapsed-row reason line.
   The app presents facts for a human decision, so the screen leads with the
   rows that need judgement and says something useful before anything is
   clicked. Presentation only -- no verdict or mark is changed by either. */
.criterion-reason-line {
  margin: 2px 0 6px 0;
  padding-left: 2px;
  font-size: calc(12px * var(--fs, 1));
  line-height: 1.45;
  color: var(--text-muted);
}
.attention-marker {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 7px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  font-size: calc(12px * var(--fs, 1));
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Admin settings modal: grouping and hint text.
   The fields were a flat grid of equal-weight controls with long prose
   crammed into narrow columns, so a rarely-touched override looked as
   important as the model pickers. Headings separate the groups; hints are
   one short line under their own field. */
.settings-group-label {
  margin: 18px 0 8px 0;
  font-size: calc(12px * var(--fs, 1));
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted, #888);
}
.settings-group-sub {
  display: block;
  margin-top: 3px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  font-size: calc(12px * var(--fs, 1));
  opacity: .85;
}
.settings-rule { margin: 20px 0; border: none; border-top: 1px solid var(--border-color, #ddd); }
.field-optional {
  font-weight: 400;
  font-size: calc(12px * var(--fs, 1));
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted, #999);
  margin-left: 4px;
}
.field-hint {
  display: block;
  margin-top: 4px;
  font-size: calc(12px * var(--fs, 1));
  line-height: 1.45;
  color: var(--text-muted, #888);
}
.settings-switch {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border-color, #ddd);
  border-radius: 8px;
  cursor: pointer;
}
.settings-switch input { margin-top: 3px; }
.settings-switch strong { font-weight: 600; font-size: calc(13px * var(--fs, 1)); }
.settings-switch .field-hint { margin-top: 3px; }

/* App-computed scoring block, appended under the self-assessed sheet in the
   Scoring Mode tab. Kept visually distinct from the claims above it: one is
   what the bidder says, the other is what the evidence supports. */
.computed-scoring-block { margin-top: 28px; border-top: 2px solid var(--border-color, #ddd); padding-top: 18px; }
.computed-scoring-head { margin: 0 0 6px 0; font-size: calc(15px * var(--fs, 1)); }
.computed-scoring-sub { margin: 0 0 14px 0; font-size: calc(12.5px * var(--fs, 1)); line-height: 1.5; color: var(--text-muted, #777); }
.computed-sub-head { margin: 20px 0 8px 0; font-size: calc(12px * var(--fs, 1)); text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted, #888); }
.computed-table { width: 100%; border-collapse: collapse; font-size: calc(13px * var(--fs, 1)); }
.computed-table td { padding: 6px 8px; border-bottom: 1px solid var(--border-color, #eee); }
.computed-total td { border-top: 2px solid var(--border-color, #ddd); border-bottom: none; font-size: calc(14px * var(--fs, 1)); }
.computed-gate { padding: 6px 8px; font-size: calc(12.5px * var(--fs, 1)); }
.gate-status { display: inline-block; min-width: 128px; font-size: calc(12px * var(--fs, 1)); text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted, #888); }
.gate-pass { color: var(--green, #2e7d32); }
.gate-fail { color: var(--red, #c62828); }
.computed-criterion { padding: 7px 8px; border-bottom: 1px solid var(--border-color, #eee); font-size: calc(13px * var(--fs, 1)); }
.computed-criterion summary { cursor: pointer; }
.computed-criterion code { font-size: calc(12px * var(--fs, 1)); color: var(--text-muted, #777); margin-right: 6px; }
.computed-note { margin: 6px 0 4px 18px; font-size: calc(12px * var(--fs, 1)); color: var(--text-muted, #888); }
.evidence-row { margin: 3px 0 0 18px; font-size: calc(12px * var(--fs, 1)); line-height: 1.5; }
.evidence-excluded { color: var(--text-muted, #999); }
.evidence-page { color: var(--text-muted, #999); margin: 0 6px; }
.evidence-weight { color: var(--text-muted, #888); }

/* Computed-scoring evidence reuses .citation-line, so it inherits the card
   look from the evidence pages. Only the additions need styling. */
.computed-criterion .citation-line { margin: 6px 0 8px 18px; }
.computed-criterion .evidence-meta { margin-top: 6px; font-family: var(--font-sans, inherit); font-size: calc(12px * var(--fs, 1)); color: var(--text-muted, #888); }
.citation-excluded { opacity: .72; }
.evidence-excluded-reason { color: var(--text-muted, #999); }

/* Computed criteria use the same .criterion-entry card as a self-assessed
   row, so the two readings look like siblings. Only the background tint
   distinguishes them: the bidder's claim vs what the evidence supports. */
.computed-criterion { background: var(--paper, #fbfaf7); margin-bottom: 6px; padding: 8px 12px; }
.computed-criterion > summary { cursor: pointer; list-style: none; }
.computed-criterion > summary::-webkit-details-marker { display: none; }
.computed-summary-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; }
.computed-badge { background: var(--paper, #f3f1ea); border: 1px solid var(--paper-border, #e2ddcf); white-space: nowrap; }
.computed-scoring-block .computed-note { margin: 6px 0 2px 0; font-size: calc(12px * var(--fs, 1)); font-style: italic; color: var(--text-muted, #888); }

/* Demo item 1 -- bidder | app | evaluator */
.scoring-compare-block { margin-bottom: 18px; }
.cmp-table { width: 100%; border-collapse: collapse; margin: 6px 0 14px 0; font-size: calc(12.5px * var(--fs, 1)); }
.cmp-table th, .cmp-table td { border: 1px solid var(--border-color, #ddd); padding: 5px 7px; vertical-align: top; text-align: left; }
.cmp-table th { background: var(--hover-bg, rgba(0,0,0,0.04)); font-weight: 600; }
.cmp-table td:nth-child(2), .cmp-table td:nth-child(3), .cmp-table td:nth-child(4) { white-space: nowrap; }
.cmp-summary { max-width: 900px; }
.cmp-group { margin: 16px 0 4px 0; font-size: calc(13.5px * var(--fs, 1)); }
.cmp-muted { color: var(--text-muted, #888); font-size: calc(12px * var(--fs, 1)); }
.cmp-partial { color: var(--amber, #b26a00); font-size: calc(12px * var(--fs, 1)); }
.cmp-flag { color: var(--amber, #b26a00); font-size: calc(12px * var(--fs, 1)); margin-top: 2px; }
tr.cmp-diverges td { background: var(--amber-tint); }
tr.cmp-decided td:last-child { background: var(--green-tint); }
.cmp-verdict { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-width: 230px; }
.cmp-verdict .cmp-marks { width: 64px; }
.cmp-verdict .cmp-note { flex: 1 1 120px; min-width: 100px; }
.cmp-verdict .btn { font-size: calc(12px * var(--fs, 1)); padding: 2px 8px; }
.cmp-by { width: 100%; font-size: calc(12px * var(--fs, 1)); color: var(--text-muted, #888); }
.cmp-evidence { margin-top: 4px; }
.cmp-evidence > summary { cursor: pointer; font-size: calc(12px * var(--fs, 1)); color: var(--text-muted, #777); }
.cmp-evidence-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.cmp-evidence-head { font-weight: 600; font-size: calc(12px * var(--fs, 1)); margin-bottom: 2px; }
.cmp-gates { font-size: calc(12px * var(--fs, 1)); margin: 0 0 8px 0; line-height: 1.6; }
.cmp-note-line { color: var(--amber, #b26a00); font-size: calc(12px * var(--fs, 1)); margin: 2px 0; }
.cmp-detail-divider { margin-top: 24px; border-top: 2px solid var(--border-color, #ddd); padding-top: 14px; }

/* Nikhil: the app-computed detail read smaller than the comparison above it.
   One readable scale for the whole Scoring Mode tab -- comparison, the
   bidder's sheet detail and the app's evidence alike. Scoped to this tab. */
#shape-panel-body-scoring_mode { font-size: calc(15px * var(--fs, 1)); line-height: 1.5; }
#shape-panel-body-scoring_mode .computed-scoring-head { font-size: calc(18px * var(--fs, 1)); margin-bottom: 8px; }
#shape-panel-body-scoring_mode .computed-scoring-sub,
#shape-panel-body-scoring_mode .cmp-gates,
#shape-panel-body-scoring_mode .computed-gate { font-size: calc(14px * var(--fs, 1)); }
#shape-panel-body-scoring_mode .cmp-table,
#shape-panel-body-scoring_mode .computed-table { font-size: calc(14.5px * var(--fs, 1)); }
#shape-panel-body-scoring_mode .cmp-table th,
#shape-panel-body-scoring_mode .cmp-table td { padding: 8px 10px; }
#shape-panel-body-scoring_mode .computed-table td { padding: 8px 10px; }
#shape-panel-body-scoring_mode .cmp-group,
#shape-panel-body-scoring_mode .computed-sub-head { font-size: calc(16px * var(--fs, 1)); margin-top: 22px; }
#shape-panel-body-scoring_mode .computed-criterion { font-size: calc(15px * var(--fs, 1)); padding: 12px 16px; margin-bottom: 10px; }
#shape-panel-body-scoring_mode .computed-criterion code { font-size: calc(13px * var(--fs, 1)); }
#shape-panel-body-scoring_mode .computed-note,
#shape-panel-body-scoring_mode .computed-scoring-block .computed-note { font-size: calc(13.5px * var(--fs, 1)); }
#shape-panel-body-scoring_mode .citation-line { font-size: calc(14px * var(--fs, 1)); padding: 12px 14px; margin: 8px 0 10px 0; line-height: 1.55; }
#shape-panel-body-scoring_mode .computed-criterion .citation-line { margin-left: 0; }
#shape-panel-body-scoring_mode .additional-citation-label { font-size: calc(12.5px * var(--fs, 1)); }
#shape-panel-body-scoring_mode .evidence-meta,
#shape-panel-body-scoring_mode .computed-criterion .evidence-meta { font-size: calc(13.5px * var(--fs, 1)); }
#shape-panel-body-scoring_mode .criterion-entry { font-size: calc(15px * var(--fs, 1)); }
#shape-panel-body-scoring_mode .marks-badge { font-size: calc(14px * var(--fs, 1)); }
#shape-panel-body-scoring_mode .cmp-muted,
#shape-panel-body-scoring_mode .cmp-flag,
#shape-panel-body-scoring_mode .cmp-by,
#shape-panel-body-scoring_mode .cmp-evidence > summary,
#shape-panel-body-scoring_mode .cmp-evidence-head { font-size: calc(13px * var(--fs, 1)); }
#shape-panel-body-scoring_mode .cmp-partial { font-size: calc(12px * var(--fs, 1)); }
#shape-panel-body-scoring_mode .cmp-verdict .btn { font-size: calc(13.5px * var(--fs, 1)); padding: 4px 12px; }
#shape-panel-body-scoring_mode .cmp-verdict input { font-size: calc(14px * var(--fs, 1)); padding: 4px 6px; }
#shape-panel-body-scoring_mode .cmp-verdict .cmp-marks { width: 80px; }
#shape-panel-body-scoring_mode .cmp-evidence-cols { gap: 16px; }
#shape-panel-body-scoring_mode .sa-evidence > summary { font-size: calc(13px * var(--fs, 1)); }

/* BUGS_LOG.md #428 -- amendments review: summary, side-by-side, criteria now/after */
#addenda-review .adr { font-size: calc(14px * var(--fs, 1)); line-height: 1.5; margin-top: 12px; }
.adr-summary { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.adr-stat { flex: 1 1 140px; border: 1px solid var(--border, #ddd); border-radius: 8px; padding: 10px 12px; background: var(--card, #fff); color: var(--text-muted, #666); font-size: calc(12.5px * var(--fs, 1)); }
.adr-stat .adr-num { font-size: calc(22px * var(--fs, 1)); font-weight: 700; color: var(--text, #222); }
.adr-stat-decide { border-color: var(--amber); background: var(--amber-tint); }
.adr-due { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border, #ddd); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; cursor: pointer; }
.adr-due input { margin-top: 4px; }
.adr-muted { color: var(--text-muted, #777); font-size: calc(12.5px * var(--fs, 1)); }
.adr-fold { margin: 8px 0; }
.adr-fold > summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.adr-notes { margin: 6px 0 6px 18px; font-size: calc(13px * var(--fs, 1)); color: var(--amber); }
.adr-docs, .adr-crit { width: 100%; border-collapse: collapse; font-size: calc(13.5px * var(--fs, 1)); margin: 6px 0; }
.adr-docs th, .adr-docs td, .adr-crit th, .adr-crit td { border: 1px solid var(--border, #e2e2e2); padding: 6px 8px; vertical-align: top; text-align: left; }
.adr-docs th, .adr-crit th { background: var(--hover-bg, rgba(0,0,0,0.04)); font-weight: 600; }
.adr-section { margin: 18px 0 2px 0; font-size: calc(16px * var(--fs, 1)); }
.adr-section-sub { margin-bottom: 6px; }
.adr-card { border: 1px solid var(--border, #ddd); border-radius: 8px; padding: 12px 14px; margin: 10px 0; background: var(--card, #fff); }
.adr-head { font-size: calc(14.5px * var(--fs, 1)); margin-bottom: 6px; }
.adr-badge { display: inline-block; font-size: calc(12px * var(--fs, 1)); font-weight: 700; padding: 2px 8px; border-radius: 10px; margin-right: 6px; }
.adr-badge-ok { background: var(--green-tint); color: var(--green); }
.adr-badge-decide { background: var(--amber-tint); color: var(--amber); }
.adr-badge-info { background: var(--hover-bg, rgba(0,0,0,0.06)); color: var(--text-muted, #666); }
.adr-badge-warn { background: var(--red-tint); color: var(--red); }
.adr-info { color: var(--text-muted, #666); font-size: calc(13px * var(--fs, 1)); margin: 2px 0 6px 0; }
.adr-sbs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 8px 0; }
.adr-col { border: 1px solid var(--border, #e2e2e2); border-radius: 6px; overflow: hidden; }
.adr-col-head { font-size: calc(12.5px * var(--fs, 1)); font-weight: 600; padding: 6px 10px; background: var(--hover-bg, rgba(0,0,0,0.04)); display: flex; justify-content: space-between; gap: 8px; }
.adr-text { padding: 8px 10px; max-height: 240px; overflow: auto; font-size: calc(13.5px * var(--fs, 1)); }
.adr-del { background: var(--red-tint); color: var(--red); text-decoration: line-through; }
.adr-ins { background: var(--green-tint); color: var(--green); text-decoration: none; font-weight: 600; }
.adr-link { font-weight: 500; white-space: nowrap; }
.adr-tick { width: 28px; text-align: center; }
.adr-id { white-space: nowrap; }
.adr-thr { margin-top: 4px; font-size: calc(12.5px * var(--fs, 1)); color: var(--text-muted, #555); }
.adr-flag { margin-top: 4px; font-size: calc(12px * var(--fs, 1)); color: var(--amber); }
.adr-judge { margin-top: 4px; font-size: calc(12.5px * var(--fs, 1)); color: var(--amber); font-weight: 600; }
.adr-later { margin-top: 4px; font-size: calc(12.5px * var(--fs, 1)); color: var(--amber); }
/* BUGS_LOG.md #441 -- amendments review by criterion */
.adr-crit-card .adr-now { margin: 6px 0 8px; padding: 8px 10px; background: var(--bg-subtle, #f6f7f9); border-radius: 6px; }
.adr-prop { margin: 8px 0; padding: 8px 10px; border: 1px solid var(--border, #dde1e6); border-radius: 6px; }
.adr-prop-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; cursor: pointer; }
.adr-prop-head input { transform: scale(1.2); }
.adr-src { color: var(--text-muted, #5f6b7a); font-size: calc(13px * var(--fs, 1)); }
.adr-prop .adr-why { margin-top: 4px; max-width: none; }   /* #444: the old table column's 220px squeezed the card */
.adr-prop .adr-dismiss { margin-top: 6px; }
.adr-hist { margin-top: 8px; padding: 8px 10px; border-left: 3px solid var(--green); background: var(--green-tint); }
.adr-hist ol { margin: 4px 0 6px 18px; padding: 0; }
.adr-diff { margin-top: 6px; }
.adr-match { white-space: nowrap; font-size: calc(12.5px * var(--fs, 1)); }
.adr-yes { color: var(--green); }
.adr-no { color: var(--text-muted, #999); }
.adr-related { margin-top: 6px; font-size: calc(13px * var(--fs, 1)); color: var(--amber); }
.adr-footer { position: sticky; bottom: 0; display: flex; gap: 12px; align-items: center; justify-content: flex-end; padding: 10px 12px; margin-top: 10px; background: var(--card, #fff); border-top: 2px solid var(--border, #ddd); }
.adr-pagetext { white-space: pre-wrap; font-size: calc(12.5px * var(--fs, 1)); }
@media (max-width: 900px) { .adr-sbs { grid-template-columns: 1fr; } }

/* BUGS_LOG.md #429 -- clearer sections; applied changes shown, not hidden */
.adr-stat { text-decoration: none; cursor: pointer; }
.adr-stat:hover { border-color: var(--accent, #3b6fd8); }
.adr-stat-done { border-color: var(--green); background: var(--green-tint); }
.adr-section-box { border-left: 4px solid var(--border, #ccc); padding: 2px 0 4px 14px; margin: 18px 0 8px 0; }
.adr-section-box > summary.adr-section, .adr-section-box > .adr-section { font-size: calc(17px * var(--fs, 1)); font-weight: 700; margin: 4px 0 6px 0; cursor: pointer; }
.adr-section-decide { border-left-color: var(--amber); }
.adr-section-matched { border-left-color: var(--accent); }
.adr-section-applied { border-left-color: var(--green); }
.adr-section-info { border-left-color: var(--paper-border-strong); }
.adr-empty .adr-section { color: var(--text-muted, #999); font-weight: 500; cursor: default; }
.adr-badge-done { background: var(--green-tint); color: var(--green); }
.adr-done th { background: var(--green-tint); }
.adr-done-row td { background: var(--green-tint); }

/* BUGS_LOG.md #430 -- item first, plain reasons, undo */
.adr-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.adr-item { font-size: calc(18px * var(--fs, 1)); font-weight: 800; padding: 3px 12px; border-radius: 6px; background: var(--accent, #3b6fd8); color: var(--on-accent); }
.adr-doc { font-size: calc(14px * var(--fs, 1)); color: var(--text-muted, #555); }
.adr-why { font-size: calc(12.5px * var(--fs, 1)); max-width: 220px; }
.adr-how { border: 1px solid var(--border, #ddd); border-radius: 8px; padding: 10px 14px; margin: 0 0 10px 0; background: var(--hover-bg, rgba(0,0,0,0.03)); font-size: calc(13.5px * var(--fs, 1)); }
.adr-how ul { margin: 6px 0 0 18px; }
.adr-undo-row { display: flex; align-items: center; gap: 10px; margin: 6px 0 4px 0; }

/* BUGS_LOG.md #431 -- unread pages, read-yourself, model readings */
.adr-unread { border: 2px solid var(--red); background: var(--red-tint); border-radius: 8px; padding: 10px 14px; margin: 0 0 10px 0; }
.adr-unread ul { margin: 6px 0 0 18px; }
.adr-warn-text { color: var(--amber); }
/* BUGS_LOG.md #901 -- what the app merged by itself, above the amendment cards */
.adr-merged { border: 1px solid var(--border, #ddd); border-left: 4px solid var(--accent); border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; background: var(--card, #fff); }
.adr-merged ul { margin: 6px 0 6px 18px; padding: 0; }
.adr-merged li { margin: 2px 0; }
.adr-badge-model { background: var(--violet-tint); color: var(--violet); }
.adr-section-read { border-left-color: var(--violet); }
.adr-stat-read { border-color: var(--violet); }
.adr-model-status { border: 1px solid var(--violet); background: var(--violet-tint); border-radius: 6px; padding: 8px 12px; margin: 6px 0 10px 0; font-size: calc(13.5px * var(--fs, 1)); }
.adr-from-model { margin: 4px 0 6px 0; font-size: calc(13px * var(--fs, 1)); color: var(--violet); }

/* BUGS_LOG.md #436 -- criteria check */
.hc { border: 1px solid var(--border, #ddd); border-radius: 8px; padding: 12px 14px; margin: 14px 0; font-size: calc(14px * var(--fs, 1)); }
.hc-head { font-size: calc(15px * var(--fs, 1)); margin-bottom: 6px; }
.hc-need { color: var(--amber); font-weight: 700; }
/* BUGS_LOG.md #792 -- a long row on the criteria check's card: its start, "show all" opens the whole text */
.hc-more > summary { list-style: none; cursor: pointer; }
.hc-more > summary::-webkit-details-marker { display: none; }
.hc-more-link { color: var(--accent); font-weight: 600; white-space: nowrap; }
.hc-more[open] > summary { display: none; }
.hc-card { border-left: 4px solid var(--amber); padding: 8px 12px; margin: 10px 0; background: var(--amber-tint); border-radius: 4px; }
.hc-title { font-weight: 700; margin-bottom: 4px; }
.hc-actions { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hc-input { padding: 4px 8px; min-width: 220px; }

/* BUGS_LOG.md #437 -- confident model verdicts */
.adr-model-yes { margin-top: 4px; color: var(--green); font-size: calc(12.5px * var(--fs, 1)); }
.adr-model-no { margin-top: 4px; color: var(--violet); font-size: calc(12.5px * var(--fs, 1)); }
.adr-aside { margin: 6px 0; font-size: calc(13px * var(--fs, 1)); }
.adr-aside > summary { cursor: pointer; color: var(--text-muted, #666); }
.hc-evidence { margin-top: 6px; font-size: calc(13px * var(--fs, 1)); color: var(--green); }
/* BUGS_LOG.md #445 -- evaluation workbook panel */
.cmp-xlsx-panel { clear: both; margin: 8px 0 12px; padding: 10px 12px; border: 1px solid var(--border, #dde1e6); border-radius: 6px; background: var(--bg-subtle, #f6f7f9); }
.cmp-xlsx-row { margin-bottom: 8px; }
.cmp-xlsx-row label { display: block; font-weight: 600; margin-bottom: 3px; }
.cmp-xlsx-row textarea { width: 100%; font: inherit; }
/* BUGS_LOG.md #455 -- bid structure decision */
.bid-structure-box { margin: 10px 0 12px; padding: 10px 12px; border: 1px solid var(--amber); border-left: 4px solid var(--amber); border-radius: 6px; background: var(--amber-tint); }
.bid-structure-box.confirmed { border-color: var(--green); border-left-color: var(--green); background: var(--green-tint); }
.bid-structure-box .btn { margin-right: 6px; margin-top: 4px; }
/* BUGS_LOG.md #460 -- who the documents say the bidder is */
.doc-identity-box { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--amber); border-left: 4px solid var(--amber); border-radius: 6px; background: var(--amber-tint); }
.doc-identity-box.ok { border-color: var(--border, #dde1e6); border-left-color: var(--accent); background: var(--bg-subtle, #f6f7f9); }
.doc-identity-row { margin: 4px 0; }
.doc-identity-row .btn { margin-left: 8px; }

/* ---------- Pre-bid queries ---------- */
.main:has(#prebid-view.visible) { overflow: hidden; }
.manage-view.pb-view { padding: 20px 36px 16px; overflow: hidden; min-height: 0; }
.manage-view.pb-view.visible {
  display: flex; flex-direction: column;
  flex: 1; height: 100%; max-height: 100%;
  min-height: 0; overflow: hidden;
}
.pb-head { flex: none; }
.pb-view .spacer, .pb-modal .spacer { flex: 1; }
.pb-head .manage-title-row { margin-bottom: 2px; }
#pb-stats[hidden] { display: none !important; }
.pb-view.pb-stats-hidden .pb-tabs { margin-top: 0; margin-bottom: 8px; }
.pb-view.pb-stats-hidden .pb-toolbar { margin-bottom: 8px; }
.pb-scope { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0 4px; }
.pb-scope label { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; font-size: calc(12.5px * var(--fs, 1)); }
.pb-scope .select-input { flex: 1; min-width: 240px; max-width: 560px; }
.pb-kpis { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 12px; }
.pb-kpi {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: calc(12px * var(--fs, 1)); font-weight: 600;
  background: var(--bg); border: 1px solid var(--border); color: var(--text-muted);
  cursor: pointer;
}
.pb-kpi b { color: var(--text); font-size: calc(13px * var(--fs, 1)); }
.pb-kpi.active { box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent); }
.pb-kpi.pb-kpi-acc { background: var(--green-tint); color: var(--green); border-color: transparent; }
.pb-kpi.pb-kpi-needs { background: var(--amber-tint); color: var(--amber); border-color: transparent; }
.pb-kpi.pb-kpi-dr { background: var(--amber-tint); color: var(--amber); border-color: transparent; }
.pb-job {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 12px; margin-bottom: 10px; border-radius: 10px;
  background: var(--accent-tint); color: var(--accent); font-size: calc(13px * var(--fs, 1));
}
.pb-job.done { background: var(--green-tint); color: var(--green); }
.pb-job.failed { background: var(--red-tint); color: var(--red); }
.pb-job.confirm { background: var(--amber-tint); color: var(--amber); }
.pb-job-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.pb-warn {
  padding: 8px 12px; margin-bottom: 10px; border-radius: 10px; font-size: calc(13px * var(--fs, 1));
  background: var(--amber-tint); color: var(--amber);
}
.pb-tabs { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.pb-head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; flex: none; }
.pb-tab {
  padding: 8px 14px; border: none; background: none; cursor: pointer;
  font-size: calc(13px * var(--fs, 1)); color: var(--text-muted); border-bottom: 2px solid transparent;
  font-family: var(--font);
}
.pb-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.pb-tab:hover { color: var(--accent); }
.pb-tab-count {
  background: var(--bg); padding: 1px 7px; border-radius: 10px; font-size: calc(12px * var(--fs, 1)); margin-left: 4px;
  border: 1px solid var(--border); color: var(--text-muted);
}
.pb-tab.active .pb-tab-count { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.pb-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.pb-pane { display: none; flex: 1; min-height: 0; flex-direction: column; }
.pb-pane.active { display: flex; }
#pb-pane-analytics.active { overflow: hidden; }
.pb-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; flex: none; }
.pb-toolbar .text-input, .pb-toolbar .select-input { min-width: 140px; flex: 0 1 180px; }
.pb-drop {
  border: 1.5px dashed var(--paper-border-strong); border-radius: 14px; padding: 22px 18px;
  text-align: center; color: var(--text-muted); font-size: calc(13.5px * var(--fs, 1)); background: var(--card);
  cursor: pointer; margin-bottom: 12px; flex: none;
}
.pb-drop.over, .pb-drop:hover { border-color: var(--accent); background: var(--accent-tint); color: var(--accent); }
.pb-drop b { color: var(--text); }
.pb-split {
  flex: 1; min-height: 0; height: 100%;
  display: grid; grid-template-columns: minmax(240px, 34%) 1fr;
  grid-template-rows: minmax(0, 1fr);
  border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--card);
}
.pb-list {
  overflow-x: hidden; overflow-y: auto; min-height: 0; height: 100%; max-height: 100%;
  border-right: 1px solid var(--border); background: var(--card);
  overscroll-behavior: contain;
}
.pb-detail {
  overflow-x: hidden; overflow-y: auto; min-height: 0; height: 100%; max-height: 100%;
  padding: 16px 18px; background: var(--bg); display: flex; flex-direction: column;
  overscroll-behavior: contain;
}
.pb-doc {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px;
  border-bottom: 1px solid var(--border); cursor: pointer;
}
.pb-doc:hover { background: var(--accent-tint); }
.pb-doc.active { background: var(--accent-tint); box-shadow: inset 3px 0 0 var(--accent); }
.pb-doc-name { font-weight: 600; font-size: calc(13.5px * var(--fs, 1)); }
.pb-doc-meta { font-size: calc(12px * var(--fs, 1)); color: var(--text-muted); margin-top: 2px; }
.pb-ver-tag { display: inline-block; margin-left: 6px; font-size: calc(12px * var(--fs, 1)); font-weight: 600; color: var(--accent); vertical-align: middle; }
.pb-ver-line { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.pb-ver { max-width: 280px; }
.pb-doc-actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pb-qrow {
  padding: 10px 12px; border-bottom: 1px solid var(--border); cursor: pointer;
  scroll-margin-top: 36px;
}
.pb-qrow:hover { background: var(--accent-tint); }
.pb-qrow.active { background: var(--accent-tint); box-shadow: inset 3px 0 0 var(--accent); }
.pb-qrow.needs-answer { box-shadow: inset 3px 0 0 var(--amber); }
.pb-qrow.needs-answer.active { box-shadow: inset 3px 0 0 var(--accent); }
.pb-qrow-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pb-qid { font-family: var(--font-mono); font-size: calc(12px * var(--fs, 1)); font-weight: 600; color: var(--accent); }
.pb-qrow-query { font-size: calc(13px * var(--fs, 1)); margin-top: 4px; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pb-qrow-about { font-size: calc(12px * var(--fs, 1)); color: var(--text-muted); margin-top: 4px; }
.pb-group { border-bottom: 1px solid var(--border); }
.pb-group-head {
  position: sticky; top: 0; z-index: 1; padding: 8px 12px; font-size: calc(12px * var(--fs, 1)); font-weight: 600;
  background: var(--card); color: var(--text-muted); border-bottom: 1px solid var(--border);
}
.pb-st {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px;
  font-size: calc(12px * var(--fs, 1)); font-weight: 600; text-transform: capitalize;
}
.pb-st-new { background: var(--bg-subtle); color: var(--text-muted); box-shadow: inset 0 0 0 1px var(--border); }
.pb-st-drafted { background: var(--amber-tint); color: var(--amber); }
.pb-st-accepted { background: var(--green-tint); color: var(--green); text-transform: none; }
.pb-st-rejected { background: var(--red-tint); color: var(--red); }
.pb-st-needs { background: var(--amber-tint); color: var(--amber); text-transform: none; }
.pb-draft-from { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); }
.pb-file-answer {
  margin-bottom: 8px; padding: 8px 10px; border-radius: 10px;
  background: var(--green-tint); border: 1px solid transparent;
}
.pb-cite {
  display: inline-flex; align-items: center; gap: 4px; cursor: pointer;
  color: var(--accent); font-size: calc(12.5px * var(--fs, 1)); font-weight: 500;
}
.pb-cite:hover { text-decoration: underline; }
.pb-cite-card { cursor: pointer; }
.pb-cite-card:hover { border-color: var(--accent); }
.pb-quote {
  border-left: 3px solid var(--paper-border-strong); padding: 6px 10px; margin: 8px 0;
  color: var(--text-muted); font-style: italic; font-size: calc(13px * var(--fs, 1));
}
.pb-block { margin: 12px 0; }
.pb-rich { font-size: calc(13.5px * var(--fs, 1)); line-height: 1.55; color: var(--text); }
.pb-rich p { margin: 0 0 8px; }
.pb-rich p:last-child { margin-bottom: 0; }
.pb-rich ul, .pb-rich ol { margin: 6px 0 10px; padding-left: 1.3em; }
.pb-rich li { margin: 4px 0; }
.pb-rich-alpha { list-style: lower-alpha; }
.pb-rich-num { padding-left: 1.4em; }
.pb-quote .pb-rich { font-style: italic; color: var(--text-muted); }
.pb-label { display: block; font-size: calc(12px * var(--fs, 1)); color: var(--text-faint); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.pb-answer {
  width: 100%; min-height: 110px; resize: vertical; font-family: var(--font); font-size: calc(13.5px * var(--fs, 1));
  padding: 8px 11px; border-radius: 8px; border: 1px solid var(--paper-border-strong);
  background: var(--card); color: var(--text); line-height: 1.5;
}
.pb-cite-card {
  border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; margin: 6px 0;
  background: var(--card); font-size: calc(13px * var(--fs, 1));
}
.pb-cite-card.unverified { border-color: var(--amber); }
.pb-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.btn.btn-sm { padding: 4px 10px; font-size: calc(12px * var(--fs, 1)); border-radius: 8px; }
.btn.btn-danger { background: var(--red-tint); color: var(--red); }
.pb-empty { color: var(--text-faint); text-align: center; padding: 40px 16px; font-size: calc(13.5px * var(--fs, 1)); }
.pb-viewer { height: 100%; min-height: 420px; display: flex; flex-direction: column; }
.pb-viewer iframe { flex: 1; width: 100%; border: 0; background: var(--card); min-height: 0; }
.pb-docx {
  flex: 1; overflow: auto; padding: 18px 22px; background: var(--card);
  font-size: calc(13.5px * var(--fs, 1)); line-height: 1.55;
}
.pb-docx table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: calc(12.5px * var(--fs, 1)); }
.pb-docx td { border: 1px solid var(--border); padding: 6px 8px; vertical-align: top; }
.pb-docx tr.pb-row-hit td { background: var(--amber-tint); outline: 2px solid var(--amber); }
.pb-docx h2, .pb-docx h3, .pb-docx h4 { margin: 14px 0 8px; }
.pb-chat { flex: 1; min-height: 0; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--card); }
.pb-chat-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); flex: none; }
.pb-chat-head select { max-width: 220px; }
.pb-msgs { flex: 1; overflow: auto; padding: 16px; min-height: 0; }
.pb-msg { display: flex; gap: 10px; margin-bottom: 16px; align-items: flex-start; }
.pb-msg.user { justify-content: flex-end; }
.pb-col { min-width: 0; max-width: 100%; }
.pb-avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--on-accent);
  font-size: calc(12px * var(--fs, 1)); font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none;
}
.pb-bubble { max-width: 85%; white-space: pre-wrap; word-wrap: break-word; line-height: 1.55; font-size: calc(14px * var(--fs, 1)); }
.pb-msg.user .pb-bubble {
  background: var(--accent-tint); color: var(--text); padding: 8px 12px; border-radius: 12px 12px 4px 12px;
}
.pb-act { font-size: calc(12px * var(--fs, 1)); color: var(--text-muted); margin: 4px 0; }
.pb-act.error { color: var(--red); }
.pb-proposal {
  border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin: 8px 0;
  background: var(--card);
}
.pb-proposal.accepted { border-color: var(--green); }
.pb-proposal.rejected { opacity: .6; }
.pb-composer { border-top: 1px solid var(--border); padding: 10px 12px; flex: none; }
.pb-composer-row { display: flex; align-items: flex-end; gap: 8px; }
.pb-composer textarea {
  flex: 1; min-height: 44px; max-height: 160px; resize: none; border: 1px solid var(--paper-border-strong);
  border-radius: 12px; padding: 8px 12px; font-family: var(--font); font-size: calc(14px * var(--fs, 1)); background: var(--bg); color: var(--text);
}
.pb-send {
  width: 36px; height: 36px; border-radius: 50%; border: none; background: var(--accent); color: var(--on-accent);
  cursor: pointer; font-size: calc(16px * var(--fs, 1)); font-weight: 700; flex: none;
}
.pb-send:disabled { opacity: .4; }
.pb-modal-back {
  position: fixed; inset: 0; z-index: 80; background: color-mix(in srgb, var(--text) 28%, transparent);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.pb-modal {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  max-width: 720px; width: 100%; max-height: 80vh; overflow: auto; padding: 18px 20px;
  box-shadow: 0 16px 40px rgba(20,24,40,.18);
}
.pb-toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 100; max-width: 440px;
  background: var(--text); color: var(--card); padding: 11px 16px;   /* #680: the theme's text and surface, swapped */ border-radius: 12px; font-size: calc(13.5px * var(--fs, 1));
  box-shadow: 0 16px 40px rgba(20,24,40,.18);
}
.pb-toast.err { background: var(--red-tint); color: var(--red); border: 1px solid var(--red); }
.pb-export {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; min-width: 280px; box-shadow: 0 12px 28px rgba(20,24,40,.12);
}
.pb-export-wrap { position: relative; }
.pb-similar { font-size: calc(12.5px * var(--fs, 1)); color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.pb-similar a { color: var(--accent); cursor: pointer; }
.pb-note { font-size: calc(12.5px * var(--fs, 1)); color: var(--text-muted); }

/* Full screen review: hide chrome so the query list + reply use the viewport */
body.prebid-fs .app-header,
body.prebid-fs .page-toolbar,
body.prebid-fs .rail { display: none !important; }
body.prebid-fs .app-body { grid-template-columns: 1fr; }
body.prebid-fs .main { height: 100vh; overflow: hidden; }
body.prebid-fs #prebid-view,
#prebid-view:fullscreen,
#prebid-view.pb-fs {
  position: fixed; inset: 0; z-index: 50;
  padding: 12px 16px 10px;
  background: var(--bg);
  max-height: 100vh; height: 100vh;
  width: 100%;
}
body.prebid-fs .pb-head .manage-sub { display: none; }
body.prebid-fs .pb-kpis { margin: 6px 0 8px; }
body.prebid-fs .pb-split { grid-template-columns: minmax(280px, 30%) 1fr; }
body.prebid-fs .pb-answer { min-height: 180px; }

.pb-an-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex: none; margin-bottom: 10px;
}
.pb-an-kpis {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px; margin-bottom: 12px; flex: none;
}
.pb-an-stat {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 12px 14px;
}
.pb-an-stat b { display: block; font-size: calc(22px * var(--fs, 1)); font-weight: 700; color: var(--text); line-height: 1.15; }
.pb-an-stat span { display: block; margin-top: 4px; font-size: calc(12px * var(--fs, 1)); color: var(--text-muted); line-height: 1.35; }
.pb-an-grid {
  flex: 1; min-height: 0; overflow: auto;
  display: grid; grid-template-columns: 1.25fr 1fr 0.9fr; gap: 12px; align-items: start;
}
.pb-an-table {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 12px 12px 8px; min-width: 0;
}
.pb-an-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.pb-an-head h3 { margin: 0; font-size: calc(14px * var(--fs, 1)); font-weight: 600; }
.pb-an-rows { display: flex; flex-direction: column; gap: 2px; }
.pb-an-row {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(48px, 1fr) 36px;
  grid-template-rows: auto auto;
  column-gap: 8px; row-gap: 2px; align-items: center;
  width: 100%; border: none; background: none; text-align: left;
  padding: 7px 8px; border-radius: 10px; cursor: pointer; font-family: var(--font); color: var(--text);
}
.pb-an-row:hover { background: var(--accent-tint); }
.pb-an-name { font-size: calc(13px * var(--fs, 1)); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-an-n { font-size: calc(13px * var(--fs, 1)); font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.pb-an-meta {
  grid-column: 1 / -1; font-size: calc(12px * var(--fs, 1)); color: var(--text-muted);
}
.pb-bar-track {
  display: block; height: 8px; border-radius: 99px; overflow: hidden;
  background: var(--border); min-width: 32px;
}
.pb-stack { display: flex; height: 100%; width: 100%; }
.pb-stack i { display: block; height: 100%; }
.pb-stack .acc { background: var(--green); }
.pb-stack .dr { background: var(--amber); }
.pb-stack .nw { background: var(--text-muted); }
.pb-stack .rj { background: var(--red); }

@media (max-width: 860px) {
  .pb-split { grid-template-columns: 1fr; }
  .pb-list { max-height: 40vh; border-right: none; border-bottom: 1px solid var(--border); }
  .pb-an-grid { grid-template-columns: 1fr; }
  body.prebid-fs .pb-split { grid-template-columns: 1fr; }
}

/* BUGS_LOG.md #537 -- the tender's check list as cards (bidder page, Check list tab) */
.cl-tab-flag { color: var(--red); font-size: calc(12px * var(--fs, 1)); margin-left: 2px; }
.cl-board { display: flex; flex-direction: column; gap: 12px; }
.cl-summary { background: var(--paper-card); border: 1px solid var(--paper-border); border-radius: var(--radius-md); padding: 12px 14px; }
.cl-summary-line { font-size: calc(14px * var(--fs, 1)); font-weight: 500; }
.cl-source { font-size: calc(12px * var(--fs, 1)); margin-top: 4px; }
/* BUGS_LOG.md #788 -- the check list under a stage chip */
.cl-stage-note { margin-top: 4px; padding: 6px 10px; border-radius: 6px; background: var(--accent-tint); font-size: calc(13px * var(--fs, 1)); }
.cl-red { color: var(--red); font-weight: 600; }
.cl-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cl-chip { border: 1px solid var(--paper-border); background: transparent; color: var(--text); border-radius: 999px; padding: 4px 12px; font-size: calc(12.5px * var(--fs, 1)); cursor: pointer; font-family: inherit; }
.cl-chip:hover:not([disabled]) { border-color: var(--accent); }
.cl-chip[disabled] { opacity: .45; cursor: default; }
.cl-chip-n { color: var(--text-muted); margin-left: 2px; }
.cl-chip.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.cl-chip.active .cl-chip-n { color: var(--on-accent); }
.cl-chip-flag:not(.active):not([disabled]) { color: var(--red); border-color: var(--red); }
.cl-section { border: 1px solid var(--paper-border); border-radius: var(--radius-md); background: var(--paper); }
.cl-section > summary { cursor: pointer; padding: 10px 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; list-style: none; }
.cl-section > summary::-webkit-details-marker { display: none; }
.cl-section > summary::before { content: "\25B8"; color: var(--text-muted); margin-right: 6px; }
.cl-section[open] > summary::before { content: "\25BE"; }
.cl-section-name { font-weight: 600; font-size: calc(14px * var(--fs, 1)); flex: 1; }
.cl-section-tally { font-size: calc(12px * var(--fs, 1)); color: var(--text-muted); }
.cl-cards { display: flex; flex-direction: column; gap: 10px; padding: 0 12px 12px; }
.cl-card { background: var(--paper-card); border: 1px solid var(--paper-border); border-left: 4px solid var(--paper-border-strong); border-radius: var(--radius-md); overflow: hidden; }
.cl-card.cl-MET { border-left-color: var(--green); }
.cl-card.cl-NOT_MET { border-left-color: var(--red); }
.cl-card.cl-NEEDS_REVIEW { border-left-color: var(--amber); }
.cl-card.cl-NA { border-left-color: var(--text-faint); }
.cl-card-head { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px 6px; }
.cl-line-id { font-family: var(--font-mono); font-size: calc(12px * var(--fs, 1)); font-weight: 600; background: var(--hover-bg, rgba(0,0,0,0.05)); border-radius: var(--radius-sm); padding: 2px 7px; white-space: nowrap; }
.cl-line-text { flex: 1; font-size: calc(14px * var(--fs, 1)); line-height: 1.45; }
.cl-status { font-family: var(--font-mono); font-size: calc(12px * var(--fs, 1)); text-transform: uppercase; letter-spacing: .04em; padding: 3px 9px; border-radius: var(--radius-sm); white-space: nowrap; }
.cl-status.MET { background: var(--green-tint); color: var(--green); }
.cl-status.NOT_MET { background: var(--red-tint); color: var(--red); }
.cl-status.NEEDS_REVIEW { background: var(--amber-tint); color: var(--amber); }
.cl-status.NA { background: var(--bg-subtle); color: var(--text-muted); box-shadow: inset 0 0 0 1px var(--border); }
.cl-card-body { padding: 0 14px 10px; }
.cl-facts { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: calc(12.5px * var(--fs, 1)); margin-bottom: 4px; }
.cl-fact-label { font-size: calc(12px * var(--fs, 1)); text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); margin-right: 4px; }
.cl-finding { font-size: calc(13px * var(--fs, 1)); margin: 4px 0 8px; }
.cl-why { font-size: calc(12.5px * var(--fs, 1)); color: var(--text-muted); margin: -4px 0 8px; }
.cl-more > summary { cursor: pointer; font-size: calc(12.5px * var(--fs, 1)); color: var(--accent); margin: 2px 0 8px; }
.cl-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px dashed var(--paper-border); padding-top: 8px; margin-top: 4px; }
.cl-by { font-size: calc(12px * var(--fs, 1)); }
.cl-card .verdict-picker { padding: 8px 0 0; border-top: none; flex-wrap: wrap; }
.cl-empty { padding: 14px; color: var(--text-muted); }
@media (max-width: 700px) {
  .cl-card-head { flex-wrap: wrap; }
  .cl-status { order: 3; }
}

/* BUGS_LOG.md #537 -- Compare bidders: tabs, and the Scoring tab across bidders */
.cmp-tabs { margin-bottom: 18px; }
.cmp-sc-open { border: none; background: none; padding: 2px 0; font: inherit; color: var(--text); cursor: pointer; text-decoration: underline dotted var(--text-faint); text-underline-offset: 3px; }
.cmp-sc-open:hover { color: var(--accent); text-decoration-color: var(--accent); }
.cmp-sc-max { color: var(--text-muted); white-space: nowrap; }
.cmp-sc-gate td { font-size: calc(13px * var(--fs, 1)); }
.cmp-by-eval { color: var(--accent); font-size: calc(12px * var(--fs, 1)); }
.cmp-sc-table { border: 1px solid var(--paper-border); border-radius: var(--radius-md); margin-bottom: 8px; background: var(--paper-card); }
.cmp-sc-table > summary { cursor: pointer; padding: 9px 12px; font-weight: 600; font-size: calc(14px * var(--fs, 1)); }
.cmp-sc-table[open] > summary { border-bottom: 1px solid var(--paper-border); }
.cmp-sc-table .comparison-table { margin: 0; }

/* BUGS_LOG.md #539 -- check-list words on the status button; Compare bidders check-list grid; a line
   opened from Compare bidders on the Scoring tab */
.cl-picker { flex-direction: column; align-items: flex-start; gap: 6px; }
.cl-picker .cl-pick { text-transform: none; font-family: var(--font); font-size: calc(13px * var(--fs, 1)); letter-spacing: 0; color: var(--text); }
.cl-pick-then { color: var(--text-muted); margin-left: 4px; }
.cl-pick-then.cl-red { color: var(--red); }
.cl-pick-note { font-size: calc(12px * var(--fs, 1)); color: var(--amber); }
.cmp-cl-score { border-collapse: collapse; width: 100%; margin: 10px 0 4px; background: var(--paper-card); border: 1px solid var(--paper-border); border-radius: var(--radius-md); overflow: hidden; font-size: calc(13.5px * var(--fs, 1)); }
.cmp-cl-score th, .cmp-cl-score td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--paper-border); }
.cmp-cl-score th { font-size: calc(12px * var(--fs, 1)); text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); font-weight: 600; background: var(--paper); }
.cmp-cl-score tr:last-child td { border-bottom: none; }
.cmp-cl-bidder { border: none; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--accent); cursor: pointer; text-align: left; }
.cmp-cl-bidder:hover { text-decoration: underline; }
.cmp-cl-note { font-size: calc(12px * var(--fs, 1)); margin: 0 0 12px; }
.cmp-cl-board { margin-top: 6px; }
.cmp-cl-gridwrap { overflow-x: auto; padding: 0 12px 12px; }
.cmp-cl-grid { border-collapse: collapse; width: 100%; font-size: calc(13px * var(--fs, 1)); background: var(--paper-card); }
.cmp-cl-grid th { font-size: calc(12px * var(--fs, 1)); text-transform: uppercase; letter-spacing: .03em; color: var(--text-muted); text-align: left; padding: 8px; border-bottom: 1px solid var(--paper-border); vertical-align: bottom; max-width: 160px; }
.cmp-cl-grid td { padding: 7px 8px; border-bottom: 1px solid var(--paper-border); vertical-align: top; }
.cmp-cl-line { min-width: 240px; max-width: 520px; line-height: 1.4; }
.cmp-cl-cell { border: none; cursor: pointer; font-size: calc(12px * var(--fs, 1)); text-align: left; white-space: normal; max-width: 170px; }
.cmp-cl-cell:hover { outline: 2px solid var(--accent); outline-offset: 1px; }
.cmp-cl-detail p { margin: 0 0 10px; }
tr.cmp-focus td { background: var(--accent-tint); transition: background .3s; }

/* BUGS_LOG.md #541 -- the tender's page: Scoring tab (the RFP's scoring table) */
.tender-extra-panel { margin-top: 6px; }
.sc-board { display: flex; flex-direction: column; gap: 10px; }
.sc-table { max-width: 640px; }
.sc-num { text-align: right; white-space: nowrap; width: 110px; }
.sc-rules { margin: 0; padding-left: 20px; font-size: calc(13.5px * var(--fs, 1)); }
.sc-rules li { margin-bottom: 6px; }
.sc-rules details > summary, .sc-lines details > summary { cursor: pointer; font-size: calc(12px * var(--fs, 1)); color: var(--accent); margin-top: 2px; }
.sc-words { white-space: pre-wrap; font-family: var(--font-mono); font-size: calc(12px * var(--fs, 1)); color: var(--text-muted); background: var(--paper); border: 1px solid var(--paper-border); border-radius: var(--radius-sm); padding: 8px 10px; margin-top: 4px; }
.sc-lines .sc-id { white-space: nowrap; color: var(--text-muted); width: 60px; }
.sc-lines tr.sc-heading td { font-weight: 600; background: var(--paper); }
.sc-label { color: var(--text-muted); font-weight: 500; }
.sc-flag { font-size: calc(12px * var(--fs, 1)); color: var(--amber); margin-top: 2px; }
.sc-note { font-size: calc(12px * var(--fs, 1)); }
.sc-notes { padding: 10px 12px; border-left: 3px solid var(--amber); font-size: calc(13px * var(--fs, 1)); }

/* BUGS_LOG.md #542 -- the tender's check list (tender page), in the same cards as a bidder's */
.tcl-actions { margin-top: 10px; }
.cl-badge { display: inline-block; font-size: calc(12px * var(--fs, 1)); padding: 2px 8px; border-radius: 999px; background: var(--accent-tint); color: var(--accent-strong); white-space: nowrap; }
.cl-applies { align-self: flex-start; }
.cl-ref { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: baseline; margin-right: 14px; font-size: calc(12.5px * var(--fs, 1)); }
.cl-rfp-link { border: 1px solid var(--paper-border); background: var(--paper); color: var(--accent); border-radius: var(--radius-sm); padding: 0 6px; font-size: calc(12px * var(--fs, 1)); cursor: pointer; font-family: var(--font-mono); }
.cl-rfp-link:hover { border-color: var(--accent); }
.cl-conds { margin: 6px 0 4px; padding-left: 18px; font-size: calc(13px * var(--fs, 1)); }
.cl-conds li { margin-bottom: 6px; }
.cl-quote { font-size: calc(12px * var(--fs, 1)); color: var(--text-muted); font-style: italic; margin-top: 2px; }

/* BUGS_LOG.md #557 (D52) -- the Scoring tab's "All marks" block: every row, who marks it, totals */
.scoring-overview-block { margin-bottom: 26px; }
.so-totals { max-width: 640px; margin-bottom: 8px; }
.so-num { text-align: right; }
.so-pass { padding: 6px 8px; font-size: calc(13px * var(--fs, 1)); margin-bottom: 14px; }
.so-rows th { text-align: left; font-size: calc(12px * var(--fs, 1)); text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted, #888); padding: 6px 8px; border-bottom: 1px solid var(--border-color, #ddd); }
.so-rows td { vertical-align: top; }
.so-parent td { background: var(--paper, #fbfaf7); }
.so-group td { background: var(--accent-tint); border-top: 2px solid var(--border); padding-top: 10px; }
.so-group .evidence-meta { margin-left: 8px; }
.so-max { text-align: right; white-space: nowrap; }
.so-who { display: inline-block; font-size: calc(12px * var(--fs, 1)); padding: 1px 8px; border-radius: 10px; border: 1px solid var(--border-color, #ccc); white-space: nowrap; }
.so-who-app { color: var(--accent, #2f5bd3); border-color: var(--accent, #2f5bd3); }
.so-who-committee { color: var(--amber, #b26a00); border-color: var(--amber, #b26a00); }
.so-who-evaluator { color: var(--text-muted, #777); }
.so-note { font-size: calc(12px * var(--fs, 1)); color: var(--text-muted, #888); padding: 4px 0; }
.so-bonus { font-size: calc(12px * var(--fs, 1)); margin-top: 4px; color: var(--text-muted, #777); }
.so-proposal summary { cursor: pointer; font-size: calc(12.5px * var(--fs, 1)); }
.so-point { margin: 6px 0 6px 12px; font-size: calc(12.5px * var(--fs, 1)); }
.so-pmarks { margin-left: 6px; }
.so-differ { color: var(--amber, #b26a00); font-size: calc(12px * var(--fs, 1)); }
.so-item { margin: 8px 0 4px 8px; }
.so-item-head { font-weight: 600; font-size: calc(12.5px * var(--fs, 1)); }
.so-entry input { width: 64px; }
.so-entry { white-space: nowrap; }
/* BUGS_LOG.md #898 -- a mark the app filled in, not yet the evaluator's: grey and tagged until accepted */
.so-prefill input { color: var(--text-muted); font-style: italic; border-style: dashed; }
.so-tag { display: block; white-space: normal; font-size: calc(12px * var(--fs, 1)); color: var(--text-muted); }
.so-tag-none { color: var(--amber); font-weight: 600; }
.so-accept { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0; }
.so-proposal .citation-line, .so-row .citation-line { margin: 4px 0 6px 12px; }

/* BUGS_LOG.md #590 -- a criterion's stage label (E-1, T-1, C-1 ...) with its original id beneath */
.crit-label { display: block; font-weight: 700; color: var(--text, #222); }
.crit-orig { display: block; font-size: calc(12px * var(--fs, 1)); opacity: .75; }
.criterion-id:has(.crit-label), span.pq-id-cell:has(.crit-label) { display: inline-block; text-align: center; line-height: 1.2; }
td.pq-id-cell:has(.crit-label) { text-align: center; line-height: 1.2; }
.criterion-id .crit-label { color: inherit; }
.crit-disagree-note { margin-top: 4px; color: var(--amber, #b26a00); }
#crit-stage-table.crit-dis-only tbody tr:not(.crit-disagree) { display: none; }
/* BUGS_LOG.md #593 -- marks that cannot be changed now (the stage holding the scoring table is not open, or passed) */
.stage-frozen-note { margin: 6px 0 10px; padding: 8px 10px; border: 1px solid var(--border, #ddd); border-radius: 6px; background: var(--amber-tint, #fff7e6); color: var(--amber, #b26a00); font-size: calc(13px * var(--fs, 1)); }
.stage-frozen .so-entry input, .stage-frozen .so-save, .stage-frozen .so-clear, .stage-frozen .so-accept-all, .stage-frozen .cmp-marks, .stage-frozen .cmp-note, .stage-frozen .cmp-save, .stage-frozen .cmp-clear { pointer-events: none; opacity: .45; }
/* BUGS_LOG.md #595 -- a price rule stated two ways / read only from the wording / read elsewhere by the wording */
.price-rule-flag { margin-top: 4px; color: var(--amber, #b26a00); }
.price-rule-also { margin-top: 4px; color: var(--text-muted, #777); font-size: calc(12px * var(--fs, 1)); }
/* D89 -- a price rule whose sentence is on the page nearly word for word */
.price-rule-close { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 8px; font-size: calc(12px * var(--fs, 1));
  border: 1px solid var(--amber, #c98a00); color: var(--amber, #c98a00); white-space: nowrap; }

/* BUGS_LOG.md #646 -- models used, on the tender page */
.models-used { margin-top: 12px; }
.models-used-title { font-weight: 600; margin-bottom: 4px; }
.models-used-line { font-size: calc(13px * var(--fs, 1)); margin-bottom: 6px; }
.models-used-table { border-collapse: collapse; font-size: calc(12px * var(--fs, 1)); width: 100%; }
.models-used-table th, .models-used-table td { border: 1px solid var(--border, #dde1e6); padding: 4px 8px; text-align: left; vertical-align: top; }
.models-used-table th { background: var(--bg-subtle, #f6f7f9); font-weight: 600; }
.models-used-bidder, .models-used-check { margin: 4px 0; }
.models-used-bidder > summary, .models-used-check > summary { cursor: pointer; font-size: calc(13px * var(--fs, 1)); }
.models-used-check { margin-left: 18px; }
.models-used-bidder .models-used-line, .models-used-check .models-used-line { font-size: calc(12px * var(--fs, 1)); margin: 2px 0 2px 16px; }
.models-changed { font-size: calc(12px * var(--fs, 1)); color: var(--amber); background: var(--amber-tint); border: 1px solid var(--amber); border-radius: 4px; padding: 0 5px; }
/* BUGS_LOG.md #651 -- a check or extraction read back from server.log */
.models-from-log { font-size: calc(12px * var(--fs, 1)); color: var(--text-muted, #666); border: 1px solid var(--border, #ddd); border-radius: 4px; padding: 0 5px; }
.models-used-table td:nth-last-child(-n+3) { white-space: nowrap; }
.models-used-total td { font-weight: 600; background: var(--bg-subtle, #f6f7f9); }
.models-used-hours { width: auto; min-width: 520px; margin: 4px 0 6px 16px; }

/* BUGS_LOG.md #671 (U1) -- text size and density, from the user's Preferences */
/* BUGS_LOG.md #685 (Nikhil 29 Oct: "make 130% as 100% and move 2 steps down and 2 steps up") -- the default is the
   old 130 %; two steps either side */
:root { --fs: 1.3; }
:root[data-text-size="80"] { --fs: 1.04; }
:root[data-text-size="90"] { --fs: 1.17; }
:root[data-text-size="110"] { --fs: 1.43; }
:root[data-text-size="120"] { --fs: 1.56; }
:root[data-density="compact"] .manage-view { padding: 16px 20px 40px; }
:root[data-density="compact"] .section-card { margin-bottom: 10px; }
:root[data-density="compact"] .section-head { padding: 8px 14px; }
:root[data-density="compact"] .section-body { padding: 10px 14px; }
:root[data-density="compact"] table.tender-table th, :root[data-density="compact"] table.tender-table td,
:root[data-density="compact"] table.comparison-table th, :root[data-density="compact"] table.comparison-table td,
:root[data-density="compact"] table.criteria-table th, :root[data-density="compact"] table.criteria-table td { padding-top: 4px; padding-bottom: 4px; }
.profile-pref-link { display: block; width: calc(100% - 24px); margin: 6px 12px 0; padding: 10px 12px; text-align: left;
  border: 1px solid var(--border); background: var(--card); color: var(--text); border-radius: var(--radius); font: 600 calc(13px * var(--fs, 1)) var(--font); cursor: pointer; }
.profile-pref-link:hover { background: var(--hover-bg); }
.pref-check { display: flex; gap: 10px; align-items: center; margin: 4px 0 12px; font-size: calc(14px * var(--fs, 1)); color: var(--text); }
.pref-check input { width: 18px; height: 18px; }
#preferences-panel.open { display: flex; }
/* High contrast: links underlined, focus rings thick (#671 U1) */
[data-theme="contrast"] a, [data-theme="contrast"] .text-link, [data-theme="contrast"] .link-button { text-decoration: underline; }
[data-theme="contrast"] :focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
/* BUGS_LOG.md #675 -- an Admin's links and the New tender buttons stay hidden for those without the right */
.creator-only[hidden], .admin-only[hidden] { display: none !important; }
/* BUGS_LOG.md #677 / #680 -- the app's own dialogs (static/js/dialog.js): the theme's surface, text and accent */
.ui-dialog-backdrop { position: fixed; inset: 0; z-index: 2000; background: rgba(0, 0, 0, 0.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.ui-dialog { background: var(--card); color: var(--text); border: 1px solid var(--paper-border-strong); border-radius: var(--radius-md, 8px); box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35); width: min(480px, 100%); padding: 20px 22px 16px; font-family: var(--font); }
.ui-dialog-danger { border-top: 4px solid var(--red); }
.ui-dialog-title { margin: 0 0 8px; font-size: calc(17px * var(--fs, 1)); font-weight: 600; color: var(--text); font-family: var(--font-heading); }
.ui-dialog-message { margin: 0 0 16px; font-size: calc(15px * var(--fs, 1)); line-height: 1.5; white-space: pre-wrap; color: var(--text); }
.ui-dialog-input { width: 100%; margin: 0 0 16px; font-size: calc(15px * var(--fs, 1)); }
textarea.ui-dialog-input { min-height: 90px; resize: vertical; }
.ui-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.ui-dialog-actions .btn { min-height: 40px; padding: 0 18px; font-size: calc(14px * var(--fs, 1)); font-weight: 600; }
.ui-dialog-ok { background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent); }
.ui-dialog-ok-danger { background: var(--red); color: var(--on-accent); border-color: var(--red); }
.ui-dialog-actions .btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
/* BUGS_LOG.md #823 -- a long message (the Apply list of 20 versions) scrolls inside the dialog; its buttons stay on screen */
.ui-dialog { max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.ui-dialog-message { overflow-y: auto; min-height: 0; flex: 1 1 auto; }
.ui-dialog-title, .ui-dialog-actions, .ui-dialog-input { flex: 0 0 auto; }

/* ============================================================================================================
   BUGS_LOG.md #671 U2-U7 -- the common frame (top bar links), My work, the journey bar, "Your next step",
   Reports, Admin home, To do. Theme tokens only; sizes follow the text size (--fs).
   ============================================================================================================ */
.top-nav { display: flex; gap: 4px; margin-left: 24px; flex-wrap: wrap; }
.top-nav a { padding: 8px 14px; border-radius: var(--radius); color: var(--text); text-decoration: none; font-weight: 500;
  font-size: calc(14px * var(--fs, 1)); }
.top-nav a:hover { background: var(--hover-bg); }
.top-nav a.active { background: var(--accent-tint); color: var(--accent-strong); font-weight: 700; }
.jr-view { display: none; padding: 8px 28px 40px; }
.jr-view.visible { display: block; }
.jr-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 4px 0 2px; }
.jr-title { margin: 0; font-size: calc(22px * var(--fs, 1)); flex: 1 1 260px; color: var(--text); }
.jr-search { width: 260px; max-width: 100%; }
.jr-hello { margin: 0; color: var(--text-muted); font-size: calc(14px * var(--fs, 1)); flex: 1 1 240px; }
.jr-head { margin-bottom: 14px; }
.jr-h2 { font-size: calc(16px * var(--fs, 1)); margin: 22px 0 10px; color: var(--text); }
.jr-muted { color: var(--text-muted); font-weight: 400; }
.jr-grid { display: grid; gap: 14px; }
.jr-grid-needs { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.jr-grid-charts { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin-top: 14px; }
.jr-grid-tenders { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.jr-card { background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px;
  display: flex; flex-direction: column; gap: 8px; text-decoration: none; min-width: 0; }
a.jr-card:hover, .jr-tender-link:hover .jr-tender-name { border-color: var(--accent); }
.jr-lbl { font-size: calc(12px * var(--fs, 1)); font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.jr-big { font-size: calc(28px * var(--fs, 1)); font-weight: 700; line-height: 1.1; color: var(--text); }
.jr-sub { font-size: calc(13px * var(--fs, 1)); color: var(--text-muted); }
.jr-count-on { border: 2px solid var(--amber); }
.jr-count-on .jr-big { color: var(--amber); }
.jr-bar-row { display: grid; grid-template-columns: minmax(120px, 46%) 1fr auto; gap: 10px; align-items: center; font-size: calc(13px * var(--fs, 1)); }
.jr-bar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.jr-bar-track { height: 12px; background: var(--bg-subtle); border-radius: 6px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--border); }
.jr-bar-fill { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.jr-bar-fill.jr-bar-done { background: var(--green); }
.jr-bar-n { color: var(--text); }
.jr-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: calc(13px * var(--fs, 1)); color: var(--text); }
.jr-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: middle; }
.jr-dot-amber { background: var(--amber); } .jr-dot-accent { background: var(--accent); } .jr-dot-green { background: var(--green); }
.jr-tender { padding: 0; }
.jr-tender-link { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; color: var(--text); text-decoration: none; }
.jr-tender-hot { border: 2px solid var(--amber); }
.jr-tender-top { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; }
.jr-tender-name { font-weight: 700; font-size: calc(16px * var(--fs, 1)); overflow-wrap: anywhere; }
.jr-role { font-size: calc(12px * var(--fs, 1)); color: var(--text-muted); white-space: nowrap; }
.jr-tender-step { font-size: calc(14px * var(--fs, 1)); color: var(--text); }
.jr-tender-needs { font-size: calc(13px * var(--fs, 1)); font-weight: 600; }
.jr-tender-meta { font-size: calc(12px * var(--fs, 1)); color: var(--text-muted); }
.jr-dl { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 16px; }
.jr-warn { color: var(--amber); } .jr-ok { color: var(--green); }
.jr-segs { display: flex; gap: 3px; }
.jr-seg { height: 8px; flex: 1; border-radius: 4px; background: var(--border); }
.jr-seg-done { background: var(--green); } .jr-seg-here { background: var(--accent); } .jr-seg-next { background: var(--paper-border-strong); }
.jr-fold { margin-top: 14px; }
.jr-fold > summary { cursor: pointer; padding: 10px 0; color: var(--text); font-size: calc(14px * var(--fs, 1)); }
.jr-empty { padding: 24px; color: var(--text-muted); }
.jr-table td, .jr-table th { white-space: normal; }
/* the journey bar */
.jr-root { margin: 4px 0 16px; }
.jr-bar ol { list-style: none; display: flex; gap: 6px; margin: 0 0 12px; padding: 0; overflow-x: auto; }
.jr-step { flex: 1 1 0; min-width: 140px; }
.jr-step-btn { width: 100%; height: 100%; text-align: left; display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px;
  border-radius: 12px; border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer; font: inherit; }
.jr-step-btn:hover { border-color: var(--accent); }
.jr-step-mark { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  font-size: calc(13px * var(--fs, 1)); background: var(--bg-subtle); color: var(--text-muted); box-shadow: inset 0 0 0 1px var(--border); }
.jr-step-done .jr-step-mark { background: var(--green-tint); color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.jr-step-here .jr-step-btn { border: 2px solid var(--accent); background: var(--accent-tint); }
.jr-step-here .jr-step-mark { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.jr-step-locked .jr-step-btn { background: var(--bg-subtle); }
.jr-step-text { display: flex; flex-direction: column; min-width: 0; }
.jr-step-state { font-size: calc(12px * var(--fs, 1)); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.jr-step-here .jr-step-state { color: var(--accent-strong); }
.jr-step-label { font-weight: 600; font-size: calc(14px * var(--fs, 1)); color: var(--text); overflow-wrap: anywhere; }
.jr-step-detail { font-size: calc(12px * var(--fs, 1)); color: var(--text-muted); }
.jr-next { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-radius: 14px; background: var(--card); border: 1px solid var(--paper-border-strong); }
.jr-kicker { font-size: calc(12px * var(--fs, 1)); font-weight: 700; color: var(--accent-strong); text-transform: uppercase; letter-spacing: .05em; }
.jr-next-title { margin: 2px 0 4px; font-size: calc(19px * var(--fs, 1)); color: var(--text); }
.jr-next-detail { margin: 0; color: var(--text-muted); font-size: calc(14px * var(--fs, 1)); }
.jr-next-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.jr-next-actions .btn { min-height: 42px; padding: 0 20px; font-size: calc(14px * var(--fs, 1)); }
.jr-row-chip { margin-left: 10px; font-size: calc(12px * var(--fs, 1)); font-weight: 600; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.jr-chip-warn { background: var(--amber-tint); color: var(--amber); }
.jr-chip-ok { background: var(--green-tint); color: var(--green); }
.jr-chip-muted { background: var(--bg-subtle); color: var(--text-muted); box-shadow: inset 0 0 0 1px var(--border); }
/* Reports */
.jr-rep-group { margin: 6px 0 14px; }
.jr-rep-h { margin: 0 0 6px; font-size: calc(13px * var(--fs, 1)); text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.jr-rep-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.jr-rep-item { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 14px; border-top: 1px solid var(--border); background: var(--card); }
.jr-rep-item:first-child { border-top: none; }
.jr-rep-text { display: flex; flex-direction: column; min-width: 0; }
.jr-rep-name { font-weight: 600; color: var(--text); }
.jr-rep-inside { font-size: calc(12px * var(--fs, 1)); color: var(--text-muted); }
.jr-rep-files { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.jr-rep-tender { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 0 16px; margin-top: 10px; }
.jr-rep-body { padding: 0 0 12px; }
@media (max-width: 760px) { .top-nav { margin-left: 0; order: 3; width: 100%; } .jr-rep-item { flex-direction: column; align-items: flex-start; } }
/* #671 U3 -- criteria as cards */
.cc-group { margin: 10px 0 16px; }
.cc-h { margin: 0 0 8px; font-size: calc(15px * var(--fs, 1)); color: var(--text); }
.cc-muted { color: var(--text-muted); font-weight: 400; }
.cc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.cc-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; color: var(--text); }
.cc-card.cc-deleted { opacity: .6; }
.cc-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cc-kind { font-size: calc(12px * var(--fs, 1)); font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--accent-tint); color: var(--accent-strong); }
.cc-flag { font-size: calc(12px * var(--fs, 1)); color: var(--amber); font-weight: 600; }
.cc-desc { font-size: calc(14px * var(--fs, 1)); cursor: pointer; }
.cc-docs { font-size: calc(12px * var(--fs, 1)); color: var(--text-muted); }
.cc-foot { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; font-size: calc(12px * var(--fs, 1)); margin-top: auto; }
.cc-more { margin-top: 8px; }
.cc-more > summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: 6px 0; font-size: calc(13px * var(--fs, 1)); }
.cc-more > .cc-grid { margin-top: 8px; }
.cc-after { background: var(--bg-subtle); border-radius: 12px; padding: 4px 14px; }
.cc-after > summary { color: var(--text); }
.cc-after-list { margin: 6px 0 10px; padding-left: 18px; font-size: calc(13px * var(--fs, 1)); color: var(--text); }
/* #671 U4 -- the bidder page: counts, More, "Needs your decision" first, the rest folded */
.dd-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 10px 0 12px; }
.dd-counts { display: flex; flex-wrap: wrap; gap: 8px; }
.dd-chip { font-size: calc(13px * var(--fs, 1)); font-weight: 600; padding: 3px 12px; border-radius: 999px; }
.dd-met { background: var(--green-tint); color: var(--green); }
.dd-notmet { background: var(--red-tint); color: var(--red); }
.dd-review { background: var(--amber-tint); color: var(--amber); }
.dd-na { background: var(--bg-subtle); color: var(--text-muted); box-shadow: inset 0 0 0 1px var(--border); }
.dd-more { position: relative; }
.dd-more > summary { list-style: none; cursor: pointer; }
.dd-more > summary::-webkit-details-marker { display: none; }
.dd-more-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 280px; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 6px; box-shadow: 0 16px 40px rgba(20, 24, 40, 0.18); }
.dd-more-menu button { text-align: left; background: transparent; border: none; padding: 9px 12px; border-radius: 8px; color: var(--text);
  font: inherit; font-size: calc(14px * var(--fs, 1)); cursor: pointer; }
.dd-more-menu button:hover { background: var(--hover-bg); }
.dd-more-menu .dd-danger { color: var(--red); border-top: 1px solid var(--border); border-radius: 0 0 8px 8px; margin-top: 4px; }
.dd-decide { margin: 0 0 16px; }
.dd-h { font-size: calc(17px * var(--fs, 1)); margin: 6px 0 2px; color: var(--text); }
.dd-n { display: inline-block; min-width: 26px; padding: 0 8px; border-radius: 999px; background: var(--amber-tint); color: var(--amber); text-align: center; }
.dd-sub { margin: 0 0 10px; color: var(--text-muted); font-size: calc(13px * var(--fs, 1)); }
.dd-row { background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--amber); border-radius: 12px; padding: 12px 16px; margin: 0 0 10px; }
.dd-top { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.dd-id { font-weight: 700; color: var(--text); }
.dd-cat { color: var(--text-muted); font-size: calc(13px * var(--fs, 1)); }
.dd-flag { color: var(--amber); font-weight: 700; font-size: calc(13px * var(--fs, 1)); margin-left: auto; }
.dd-desc { margin: 6px 0; font-weight: 600; color: var(--text); }
.dd-reason { margin: 4px 0 6px; color: var(--text); font-size: calc(13px * var(--fs, 1)); }
.dd-fold > summary { cursor: pointer; color: var(--accent); font-size: calc(13px * var(--fs, 1)); padding: 4px 0; }
.dd-fold > p { margin: 4px 0; font-size: calc(13px * var(--fs, 1)); color: var(--text); }
.dd-muted { color: var(--text-muted); }
.dd-decision { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.dd-lbl { font-size: calc(12px * var(--fs, 1)); font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.dd-pick { background: var(--card); border: 1px solid var(--paper-border-strong); color: var(--text); min-height: 36px; padding: 0 14px; border-radius: var(--radius); }
.dd-pick:hover { background: var(--hover-bg); }
.dd-note { flex: 1 1 220px; min-width: 160px; }
.dd-all { margin-top: 8px; }
.dd-all-sum { cursor: pointer; font-weight: 600; color: var(--text); padding: 10px 0; font-size: calc(15px * var(--fs, 1)); }
.dd-docs { margin: 6px 0 12px; }
.dd-docs > summary { font-weight: 600; color: var(--text); font-size: calc(14px * var(--fs, 1)); }
.dd-overall { margin: 18px 0 8px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }

/* BUGS_LOG.md #671 U6 -- the bell's count, its items, Admin home */
.header-count {
  position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
  border-radius: 999px; background: var(--accent); color: var(--on-accent);
  font-size: calc(12px * var(--fs, 1)); font-weight: 700; line-height: 18px; text-align: center; pointer-events: none;
}
.header-dropdown .header-menu.notify-menu { left: auto; right: -60px; }
.notify-menu { width: min(420px, calc(100vw - 32px)); max-height: 70vh; overflow-y: auto; }
.nt-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.nt-head .header-menu-title { margin: 0; }
.header-menu .nt-mark { width: auto; padding: 4px 10px; font-size: calc(12px * var(--fs, 1)); color: var(--accent); }
.header-menu a.nt-item { display: flex; flex-direction: column; gap: 2px; border-radius: 10px; padding: 8px 10px; white-space: normal; }
.nt-item.nt-unread { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.nt-item .nt-text { font-weight: 600; }
.nt-item.nt-info .nt-text { font-weight: 500; }
.nt-item .nt-meta { font-size: calc(12px * var(--fs, 1)); color: var(--text-muted); }
.nt-empty { font-size: calc(13px * var(--fs, 1)); color: var(--text-muted); padding: 4px 2px 10px; }
.nt-sep { border: none; border-top: 1px solid var(--border); margin: 10px 0; }
.ah-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 16px; }
.ah-card { background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 14px; padding: 16px; min-width: 0; }
.ah-wide { grid-column: span 2; }
@media (max-width: 760px) { .ah-wide { grid-column: auto; } }
.ah-card h2 { font-size: calc(15px * var(--fs, 1)); margin: 0 0 10px; }
.ah-logo-preview {
  display: block; width: 180px; max-width: 100%; height: auto; max-height: 96px;
  object-fit: contain; margin: 4px 0 8px; padding: 10px 12px; box-sizing: border-box;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
}
.ah-logo-fields { display: grid; gap: 2px; max-width: 520px; }
.ah-logo-fields .text-input { width: 100%; min-width: 0; box-sizing: border-box; }
.ah-logo-file { font-family: var(--font); font-size: calc(13px * var(--fs, 1)); color: var(--text); }
.ah-list { list-style: none; margin: 0; padding: 0; }
.ah-list li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border);
  font-size: calc(13px * var(--fs, 1)); }
.ah-list li:last-child { border-bottom: none; }
.ah-list .ah-muted { color: var(--text-muted); }
.ah-links { display: flex; flex-wrap: wrap; gap: 8px; }
.ah-ok { color: var(--green); font-weight: 600; }
.ah-bad { color: var(--red); font-weight: 600; }
.ah-table { width: 100%; border-collapse: collapse; font-size: calc(13px * var(--fs, 1)); }
.ah-table th, .ah-table td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--border); }
.ah-table td.ah-num, .ah-table th.ah-num { text-align: right; }
.ah-table-wrap { overflow-x: auto; }

/* BUGS_LOG.md #671 U7 -- To do, the steps down the left side, all bidders in one grid */
.td-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.td-filter { border: 1px solid var(--border); background: var(--card); color: var(--text); border-radius: 999px; padding: 6px 12px;
  font-family: var(--font); font-size: calc(13px * var(--fs, 1)); cursor: pointer; }
.td-filter b { margin-left: 4px; }
.td-filter.td-on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.td-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.td-item[hidden] { display: none; }
.td-link { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 16px;
  background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 12px; text-decoration: none; }
.td-link:hover { border-color: var(--accent); background: var(--hover-bg); }
.td-kind { font-size: calc(12px * var(--fs, 1)); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.td-decide .td-kind, .td-final .td-kind { color: var(--amber); }
.td-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.td-what { font-size: calc(14px * var(--fs, 1)); }
.td-where { font-size: calc(12px * var(--fs, 1)); color: var(--text-muted); }
.td-go { font-size: calc(20px * var(--fs, 1)); color: var(--text-muted); }
@media (max-width: 640px) { .td-link { grid-template-columns: minmax(0, 1fr) auto; } .td-kind { grid-column: 1 / -1; } }
.jr-side-wrap { display: flex; gap: 20px; align-items: flex-start; }
.jr-side-rail { flex: 0 0 240px; position: sticky; top: 12px; max-height: calc(100vh - 100px); overflow-y: auto; }
.jr-side-main { flex: 1 1 auto; min-width: 0; }
.jr-side-rail .jr-bar ol { flex-direction: column; overflow: visible; }
.jr-side-rail .jr-step { min-width: 0; flex: 0 0 auto; }
@media (max-width: 900px) {
  .jr-side-wrap { display: block; }
  .jr-side-rail { position: static; max-height: none; margin-bottom: 12px; }
}
.gd-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.gd-table { border-collapse: collapse; width: 100%; font-size: calc(13px * var(--fs, 1)); }
.gd-table th, .gd-table td { border-bottom: 1px solid var(--border); padding: 6px 8px; text-align: center; vertical-align: middle; }
.gd-table thead th { background: var(--bg-subtle); position: sticky; top: 0; white-space: nowrap; }
.gd-table thead th:first-child { text-align: left; }
.gd-table tbody th { text-align: left; font-weight: 500; min-width: 240px; max-width: 420px; }
.gd-id { font-weight: 700; }
.gd-desc { color: var(--text-muted); }
.gd-met { color: var(--green); font-weight: 700; }
.gd-notmet { color: var(--red); font-weight: 700; }
.gd-na, .gd-none { color: var(--text-muted); }
.gd-cell { min-width: 34px; min-height: 30px; border-radius: 8px; border: 1px solid var(--amber); background: var(--amber-tint);
  color: var(--text); font-weight: 700; cursor: pointer; font-size: calc(14px * var(--fs, 1)); }
.gd-cell.gd-sel { outline: 2px solid var(--accent); outline-offset: 1px; }
.gd-panel { margin-top: 12px; padding: 14px 16px; border: 1px solid var(--accent); border-radius: 12px; background: var(--card); }
.gd-p-desc { margin: 6px 0; }
.gd-p-reason { color: var(--text-muted); font-size: calc(13px * var(--fs, 1)); }
.gd-p-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.gd-p-actions .text-input { flex: 1 1 220px; }


/* BUGS_LOG.md #691 / #692 (Nikhil 30 Oct 11:18: "Left bar to hide and cards not more than 3 in a row evenly spaced.
   Please follow the final journey we decided"; 12:07 "3 for comfortable layout and 4-5 for compact") -- the frame of
   the design canvas: no left bar (a Preferences choice brings it back), no Back strip, the page title on the page,
   the content centred; every row of cards at most 3 (Comfortable) or 4-5 (Compact), evenly spaced, fewer on a
   narrow window. */
.app.no-rail .app-body { grid-template-columns: minmax(0, 1fr); }
.app.no-rail .rail { display: none; }
.page-back, #page-refresh, #sidebar-toggle { display: none !important; }
.page-toolbar { border-bottom: none; }
.page-toolbar-inner { max-width: 1320px; margin: 0 auto; width: 100%; padding: 22px 28px 4px; }
.page-name { font-size: calc(24px * var(--fs, 1)); }
.jr-view, .manage-view { max-width: 1320px; margin: 0 auto; width: 100%; box-sizing: border-box; }
.jr-view { padding: 8px 28px 48px; }
.manage-view { padding: 12px 28px 60px; }
body:not(.on-tender) .header-tender-select { display: none; }
#apps-menu-toggle, #admin-menu { display: none !important; }
.header-admin-link { font-family: var(--font); font-size: calc(15px * var(--fs, 1)); color: var(--text); text-decoration: none;
  padding: 8px 12px; border-radius: 10px; }
.header-admin-link:hover, .header-admin-link.active { background: var(--accent-tint); color: var(--accent-strong, var(--accent)); }
.profile-role { color: var(--text-muted); font-weight: 500; font-size: calc(14px * var(--fs, 1)); margin-left: -2px; padding-right: 6px; white-space: nowrap; }
.top-nav a[hidden] { display: none; }
.jr-grid-needs, .jr-grid-charts, .jr-grid-tenders, .ah-grid, .jr-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
[data-density="compact"] .jr-grid-needs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
[data-density="compact"] .jr-grid-needs.jr-n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
[data-density="compact"] .jr-grid-charts, [data-density="compact"] .jr-grid-tenders,
[data-density="compact"] .ah-grid, [data-density="compact"] .jr-grid-3 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.jr-grid-charts.jr-n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1100px) {
  .jr-grid-needs, .jr-grid-charts, .jr-grid-tenders, .ah-grid, .jr-grid-3,
  [data-density="compact"] .jr-grid-needs, [data-density="compact"] .jr-grid-charts,
  [data-density="compact"] .jr-grid-tenders, [data-density="compact"] .ah-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .jr-grid-needs, .jr-grid-charts, .jr-grid-tenders, .ah-grid, .jr-grid-3,
  [data-density="compact"] .jr-grid-needs, [data-density="compact"] .jr-grid-charts,
  [data-density="compact"] .jr-grid-tenders, [data-density="compact"] .ah-grid { grid-template-columns: 1fr; }
  .page-toolbar-inner, .jr-view, .manage-view { padding-left: 16px; padding-right: 16px; }
}

.jr-bars { display: flex; align-items: flex-end; gap: 8px; height: 140px; margin-top: 8px; }
.jr-bars-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; min-width: 0; }
.jr-bars-bar { width: 100%; min-height: 2px; background: var(--accent); border-radius: 4px 4px 0 0; }
.jr-bars-today { background: var(--blue, var(--accent)); opacity: .55; }
.jr-bars-n { font-size: calc(12px * var(--fs, 1)); color: var(--text-muted); min-height: 1em; }
.jr-bars-day { font-size: calc(12px * var(--fs, 1)); color: var(--text-muted); }
.jr-ring { display: flex; align-items: center; gap: 16px; margin-top: 8px; flex-wrap: wrap; }
.jr-ring-n { font-size: calc(22px * var(--fs, 1)); font-weight: 700; fill: var(--text); font-family: var(--font); }
.jr-more { display: flex; align-items: center; justify-content: center; border-style: dashed; color: var(--accent);
  font-family: var(--font); font-size: calc(15px * var(--fs, 1)); font-weight: 600; cursor: pointer; min-height: 120px; }
.jr-more:hover { background: var(--accent-tint); }
.jr-more[hidden] { display: none; }
.jr-tender-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 6px; }
.jr-tender-date { color: var(--text-muted); font-size: calc(13px * var(--fs, 1)); white-space: nowrap; }
/* #699 -- two more rows of cards per click; the closed ones greyed; #701 -- the compact table */
#jr-tender-list [hidden], .jr-grid > [hidden] { display: none !important; }
.jr-fewer-row { margin-top: 10px; text-align: center; }
.jr-tender-closed { opacity: .72; }
.jr-tender-closed:hover { opacity: 1; }

/* #691 canvas board 1 -- the steps as one line in a card (a coloured rule over each), the next step as a band */
.jr-root > .jr-bar, .jr-root nav.jr-bar { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px 12px; margin-bottom: 14px; }
.jr-root .jr-bar ol { gap: 12px; margin: 0; }
.jr-root .jr-step-btn { border: none; border-top: 4px solid var(--border); border-radius: 0; background: transparent; padding: 10px 2px 4px; }
.jr-root .jr-step-btn:hover { border-top-color: var(--accent); background: var(--hover-bg); }
.jr-root .jr-step-done .jr-step-btn { border-top-color: var(--green); }
.jr-root .jr-step-here .jr-step-btn { border: none; border-top: 4px solid var(--accent); background: transparent; }
.jr-root .jr-step-locked .jr-step-btn { background: transparent; }
.jr-root .jr-step-mark { display: none; }
.jr-root .jr-step-done .jr-step-state { color: var(--green); }
.jr-root .jr-next { background: var(--accent-tint); border: 2px solid var(--accent); margin-bottom: 14px; }
.jr-side-rail .jr-bar { background: transparent; border: none; padding: 0; }
.jr-side-rail .jr-step-btn { border-top: none; border-left: 4px solid var(--border); padding: 8px 10px; }
.jr-side-rail .jr-step-done .jr-step-btn { border-left-color: var(--green); }
.jr-side-rail .jr-step-here .jr-step-btn { border: none; border-left: 4px solid var(--accent); background: var(--accent-tint); }
.jr-bidders { padding: 0; margin-bottom: 14px; overflow: hidden; }
.jr-bt-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.jr-bt-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.jr-bt-wrap { overflow-x: auto; }
.jr-bt { width: 100%; border-collapse: collapse; font-size: calc(14px * var(--fs, 1)); }
.jr-bt th, .jr-bt td { text-align: left; padding: 12px 20px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.jr-bt thead th { font-size: calc(12px * var(--fs, 1)); text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); font-weight: 700; }
.jr-bt tbody th { font-weight: 600; }
.jr-bt tbody th a { color: var(--text); }
.jr-bt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
td.jr-bt-chips { display: table-cell; }
td.jr-bt-chips .dd-chip { display: inline-block; margin: 2px 4px 2px 0; }
.jr-bt-act { text-align: right !important; white-space: nowrap; }
.jr-bt-act .btn + .btn { margin-left: 8px; }
.jr-bt-last { padding: 10px 20px; margin: 0; }
.dd-next { background: var(--bg-subtle); color: var(--text-muted); }
.dd-review { background: var(--amber-tint); color: var(--amber); }
.dd-notmet { background: var(--red-tint); color: var(--red); }
.bidder-manage-meta .dd-chip { display: inline-block; margin: 0 4px 0 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.jr-danger-foot { margin: 28px 0 0; padding-top: 14px; border-top: 1px solid var(--border); }

/* #691 canvas board 2 -- checks to decide: the first open, the rest one line each */
.dd-row:not(.dd-open) { padding: 10px 16px; }
.dd-row:not(.dd-open) > :not(.dd-top):not(.dd-desc) { display: none; }
.dd-row:not(.dd-open) .dd-desc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-muted); }
.dd-row .dd-top { cursor: pointer; }
.dd-row .dd-top:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

#run-status-continue-btn { border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent); }
#run-status-close-btn { border: 1px solid var(--border); background: var(--card); color: var(--text); padding: 0 14px; }
#run-status-continue-btn[hidden], #run-status-close-btn[hidden], #run-status-view-btn[hidden] { display: none; }

/* #696 -- Admin home: health, tools and people in one row (at most 3), the hours and the latest changes full width */
.ah-full { margin-top: 16px; }
.ah-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ah-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: 12px; background: var(--card); color: var(--text); font-family: var(--font); cursor: pointer; }
.ah-tile b { font-size: calc(14px * var(--fs, 1)); }
.ah-tile span { font-size: calc(12.5px * var(--fs, 1)); color: var(--text-muted); }
.ah-tile:hover { border-color: var(--accent); background: var(--accent-tint); }
.ah-full .ah-list { columns: 2; column-gap: 32px; }
.ah-full .ah-list li { break-inside: avoid; }
@media (max-width: 900px) { .ah-full .ah-list { columns: 1; } .ah-tiles { grid-template-columns: 1fr; } }
.dd-back { display: inline-block; margin: 0 0 10px; color: var(--accent); text-decoration: none; font-weight: 600; }
.dd-back:hover { text-decoration: underline; }
/* #691 / #692 -- the bidder page as canvas board 2: one line of counts (the chips), no second summary band */
#summary-bar { display: none !important; }
#dossier { max-width: 1320px; margin: 0 auto; width: 100%; box-sizing: border-box; padding: 8px 28px 60px; }
.dd-meta { color: var(--text-muted); margin: -4px 0 12px; font-size: calc(14px * var(--fs, 1)); }
.page-toolbar-inner { flex-wrap: wrap; }
.page-tender-back { flex-basis: 100%; color: var(--accent); text-decoration: none; font-weight: 600; font-size: calc(14px * var(--fs, 1)); }
.page-tender-back:hover { text-decoration: underline; }
.page-tender-back[hidden] { display: none; }
@media (max-width: 760px) {
  .header-tender-select { display: none !important; }
  .top-nav { gap: 2px; }
  .top-nav a { padding: 6px 8px; }
  .profile-role { display: none; }
}
/* D132 review M1 -- the pre-bid workspace in full screen fills the screen (the 1320px column is for pages) */
#prebid-view.pb-fs, body.prebid-fs #prebid-view, #prebid-view:fullscreen { max-width: none !important; margin: 0 !important; }
@media (max-width: 860px) { .profile-role { display: none; } }
@media (max-width: 860px) { .profile-role { display: none; } }
.dd-doc-link { color: var(--text); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.dd-doc-link:hover { color: var(--accent); }
@media (max-width: 640px) { .jr-root .jr-bar ol { flex-direction: column; overflow: visible; } .jr-root .jr-step { min-width: 0; } }
.jr-bt-wrap { position: relative; }

/* ---------------------------------------------------------------- D133 (BUGS_LOG.md #699-#713) */
/* #701 -- where each layout choice applies */
.pref-where { display: block; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--text-muted); font-size: calc(12px * var(--fs, 1)); margin-top: 2px; }
/* #702 -- with the side menu shown, the page title lines up with the page below it (the bar is 245px wide) */
.app:not(.no-rail):not(.sidebar-collapsed) .page-toolbar-inner { max-width: calc(1320px + 245px); padding-left: calc(245px + 28px); }
@media (max-width: 640px) { .app:not(.no-rail):not(.sidebar-collapsed) .page-toolbar-inner { padding-left: 16px; } }
/* #700 -- the bell says only that a model server is down; the lights are on Admin home's Health card */
.notify-down { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; margin: 0 0 8px; border-radius: 10px;
  background: color-mix(in srgb, var(--red) 8%, var(--card)); color: var(--text); font-size: calc(13px * var(--fs, 1)); }
.notify-down .status-dot { margin-top: 4px; flex: none; }
.notify-down[hidden] { display: none; }
.ah-lights { margin: 4px 0 6px; }
.ah-lights .ollama-status { padding: 6px 0; font-family: var(--font); font-size: calc(14px * var(--fs, 1)); color: var(--text); }
/* #705 -- the banner after a check ends: open the bidder */
#run-status-open-btn { font-size: calc(14px * var(--fs, 1)); font-weight: 600; min-height: 38px; padding: 0 20px; border-radius: var(--radius);
  cursor: pointer; font-family: var(--font); border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent); }
#run-status-open-btn[hidden] { display: none; }
/* #706 -- the older bidders section keeps the actions only */
.jr-bidders-note { margin: 0 0 10px; }
/* #711 -- the undertakings as one group; #713 -- find a criterion */
.dd-group { background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--amber); border-radius: 12px; padding: 10px 16px; margin: 0 0 12px; }
.dd-group > summary { cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.dd-group-title { font-weight: 700; color: var(--text); }
.dd-group[open] > summary { margin-bottom: 10px; }
.dd-group-all { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 12px; }
.dd-group-all .dd-note { flex: 1 1 240px; }
.dd-group .dd-row { margin-left: 0; }
.dd-find { margin: 6px 0 16px; }
.dd-find input { width: 100%; max-width: 560px; }
.dd-find-out:not(:empty) { margin-top: 10px; }
.dd-find-out .dd-row { border-left-color: var(--accent); }
/* #707 -- the marks once; how they were worked out folded under them */
.sm-workings { margin-top: 18px; }
.sm-workings > summary { font-weight: 600; }
.so-locked { margin-top: 8px; }
/* #715 -- Reports: the workspace's figures as one download */
.jr-rep-ws { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
#ah-activity .chart-card { margin: 0; }
.dd-find-out .dd-flag { color: var(--text); }
.dd-group > summary .dd-muted { font-size: calc(13px * var(--fs, 1)); }

/* ---------------------------------------------------------------- D134 (BUGS_LOG.md #716-#724) */
/* #719 -- the steps down the left side follow the page (no scroll box of their own); the chips stay on one line */
.jr-side-rail { max-height: none; overflow: visible; }
.jr-side-rail .jr-step-detail { font-size: calc(12px * var(--fs, 1)); }
.jr-side-main .jr-bt-chips { white-space: nowrap; }
.jr-side-main .jr-bt-chips .dd-chip { font-size: calc(12px * var(--fs, 1)); padding: 1px 6px; }
/* #718 -- removing a tender: a button, not a small link */
.jr-remove-btn { border: 1px solid var(--red); color: var(--red); background: var(--card); font-weight: 600; }
.jr-remove-btn:hover { background: color-mix(in srgb, var(--red) 8%, var(--card)); }
.jr-settings-note { margin: 0 0 10px; }
/* #724 -- where you are: My work > tender > stage > bidder */
.page-crumbs { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: calc(14px * var(--fs, 1)); }
.page-crumbs a { color: var(--accent); text-decoration: none; font-weight: 600; }
.page-crumbs a:hover { text-decoration: underline; }
.page-crumbs span[aria-current] { color: var(--text-muted); }
.page-crumbs-sep { color: var(--text-muted); }
.page-crumbs[hidden] { display: none; }
/* #724 -- a tender's home as cards; a part per page */
.jr-part-hidden { display: none !important; }
.jr-grid-home { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 14px; }
.jr-grid-home-small { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.jr-hc { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--text); min-height: 118px; }
.jr-hc:hover { border-color: var(--accent); box-shadow: 0 2px 10px color-mix(in srgb, var(--accent) 12%, transparent); }
.jr-hc-state { font-size: calc(12px * var(--fs, 1)); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); }
.jr-hc-title { font-size: calc(17px * var(--fs, 1)); font-weight: 700; }
.jr-hc-detail { color: var(--text-muted); font-size: calc(13px * var(--fs, 1)); }
.jr-hc-go { margin-top: auto; color: var(--accent); font-weight: 600; font-size: calc(13px * var(--fs, 1)); }
.jr-hc-done { border-left: 5px solid var(--green); }
.jr-hc-done .jr-hc-state { color: var(--green); }
.jr-hc-here { border: 2px solid var(--accent); background: var(--accent-tint); }
.jr-hc-here .jr-hc-state { color: var(--accent); }
.jr-hc-locked { opacity: .62; }
.jr-hc-small { min-height: 84px; }
.jr-hc-small .jr-hc-title { font-size: calc(15px * var(--fs, 1)); }
.jr-cards .manage-title-row .jr-remove-btn { display: none; }
.jr-sb { display: flex; flex-direction: column; gap: 8px; }
.jr-sb .jr-tender-name { color: var(--text); text-decoration: none; }
.jr-sb .jr-tender-name:hover { color: var(--accent); }
.jr-sb .btn { align-self: flex-start; margin-top: auto; }
.jr-sb-chips { display: flex; flex-wrap: wrap; gap: 4px; }
/* #724 -- a bidder within a stage: one check at a time; the folds drawn as cards */
.dd-focus-nav { display: flex; align-items: center; gap: 8px; margin: 4px 0 8px; }
.dd-focus-pos { font-weight: 700; margin-right: auto; }
.dd-done { font-size: calc(15px * var(--fs, 1)); color: var(--green); font-weight: 600; }
.dd-cards .dd-card-main { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px 18px; margin-bottom: 14px; }
.dd-cards > details.dd-fold, .dd-cards > details.dd-all { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 12px 18px; margin: 0 0 12px; }
.dd-cards > details.dd-fold > summary, .dd-cards > details.dd-all > summary { font-weight: 700; font-size: calc(15px * var(--fs, 1)); color: var(--text); cursor: pointer; }
.dd-cards .dd-overall { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 12px 18px; }
.dd-singles-note { margin: 10px 0 6px; font-weight: 600; }
@media (max-width: 1100px) { .jr-grid-home { grid-template-columns: repeat(2, minmax(0, 1fr)); } .jr-grid-home-small { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .jr-grid-home, .jr-grid-home-small { grid-template-columns: 1fr; } }
/* #724 -- the bidders as cards; each card holds its documents, add and remove */
.jr-bidders-cards { margin-bottom: 16px; }
.jr-bidders-cards .jr-bt-head { margin-bottom: 12px; }
.jr-bc { display: flex; flex-direction: column; gap: 8px; }
.jr-bc .jr-tender-name { color: var(--text); text-decoration: none; }
.jr-bc .jr-tender-name:hover { color: var(--accent); }
.jr-bc-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.jr-bc-more > summary { cursor: pointer; color: var(--accent); font-size: calc(13px * var(--fs, 1)); }
.jr-bc-slot .bidder-manage-row { border: none; padding: 6px 0 0; margin: 0; }
.jr-bc-slot .bidder-manage-name, .jr-bc-slot .jr-row-chip { display: none; }
.jr-cards .jr-bidders-note { display: none; }

/* ---------------------------------------------------------------------------------------------- D136 (#726-#729) */
/* #727 -- a bidder's card (the Bidders page, a stage) opens the bidder wherever it is clicked */
.jr-bc[data-href], .jr-sb[data-href] { cursor: pointer; }
.jr-bc[data-href]:hover, .jr-sb[data-href]:hover { border-color: var(--accent); box-shadow: 0 2px 10px color-mix(in srgb, var(--accent) 12%, transparent); }
.jr-bc .jr-bc-more, .jr-bc .jr-bc-acts { cursor: auto; }
/* #729 -- "Add a bidder" and "Run options & log" as their own cards, distinct from the bidders' */
.jr-bp-acts { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 14px; }
.jr-hc-act { min-height: 84px; display: grid; grid-template-columns: auto 1fr; column-gap: 14px; row-gap: 2px; align-items: center;
  background: var(--accent-tint); border: 1px dashed color-mix(in srgb, var(--accent) 55%, var(--border-color)); }
.jr-hc-act .jr-hc-icon { grid-row: 1 / span 2; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; background: var(--accent); color: #fff; font-size: calc(18px * var(--fs, 1)); font-weight: 700; }
.jr-hc-act .jr-hc-title { color: var(--accent); }
.jr-hc-act:hover { border-style: solid; }
@media (max-width: 640px) { .jr-bp-acts { grid-template-columns: 1fr; } }
/* #729 -- the bidders' own rows (documents, add, remove) are in their cards; not listed again on "Add a bidder" */
body.pages-cards #manage-view[data-part="add"] #bidder-rows-container { display: none; }
/* #726 -- a tender's page while it is read */
.jr-opening { padding: 24px 0; }
/* #729 -- a part shown on its own page needs no section number */
#manage-view.jr-cards .section-num { display: none; }

/* ---------------------------------------------------------------------------------------------- D137 (#731-#734) */
/* #731 -- the back arrow first on the breadcrumb line, naming the page one level up */
.page-crumbs-back { display: inline-flex; align-items: center; margin-right: 14px; padding: 2px 10px; border: 1px solid var(--border-color);
  border-radius: 999px; background: var(--card); font-weight: 600; text-decoration: none; }
.page-crumbs-back:hover { border-color: var(--accent); }
/* #732 -- in Cards each block of RFP & criteria and of Stages and gates is on its own page (the long page shows all) */
#manage-view.jr-cards:not([data-part="criteria"]) [data-sub="criteria"],
#manage-view.jr-cards:not([data-part="addenda"]) [data-sub="addenda"],
#manage-view.jr-cards:not([data-part="rfpcheck"]) [data-sub="rfpcheck"],
#manage-view.jr-cards:not([data-part="extraction"]) [data-sub="extraction"],
#manage-view.jr-cards:not([data-part="gate"]) [data-sub="gate"],
#manage-view.jr-cards:not([data-part="history"]) [data-sub="history"],
#manage-view.jr-cards:not([data-part="critstages"]) [data-sub="critstages"],
#manage-view.jr-cards:not([data-part="stagesetup"]) [data-sub="stagesetup"] { display: none !important; }
/* #733 -- a part's own page: the page title names it; the section's own heading repeated it */
#manage-view.jr-cards .section-card > .section-head { display: none; }
#manage-view.jr-cards .section-card > .section-body { padding-top: 16px; }

/* ---------------------------------------------------------------------------------------------- D138 (#735-#743) */
/* #743 (Nikhil 31 Oct 19:08: "improve readability of All, Stage 1, Stage 2 ... same for post award section") */
#crit-stage-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-bottom: none; margin: 10px 0 !important; }
#crit-stage-chips > span:first-child { font-size: calc(14px * var(--fs, 1)) !important; font-weight: 600; color: var(--text) !important; }
#crit-stage-chips .crit-stage-chip { border: 1px solid var(--border-color); border-radius: 999px; padding: 6px 14px; margin: 0;
  font-size: calc(14px * var(--fs, 1)); color: var(--text); background: var(--card); border-bottom-width: 1px; }
#crit-stage-chips .crit-stage-chip:hover { border-color: var(--accent); }
#crit-stage-chips .crit-stage-chip.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.cc-after { padding: 6px 16px; }
.cc-after > summary { font-size: calc(15px * var(--fs, 1)); padding: 8px 0; }
.cc-after-list { list-style: none; padding: 0; margin: 4px 0 12px; font-size: calc(14px * var(--fs, 1)); line-height: 1.55; }
.cc-after-list > li { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 9px 4px; border-top: 1px solid var(--border-color); }
.cc-after-list > li:first-child { border-top: none; }
.cc-after-id .criterion-id-tag { margin: 0; font-size: calc(13px * var(--fs, 1)) !important; font-weight: 600 !important; color: var(--text) !important; }
.cc-after-text { color: var(--text); }
@media (max-width: 640px) { .cc-after-list > li { grid-template-columns: 1fr; gap: 2px; } }
/* #740 -- the tender home's small row: three cards (Pre-bid queries, Reports & downloads, Tender settings) */
.jr-grid-home-small { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
/* #737 -- a stage's own gate: this stage's checks and "Review N checks" beside each bidder */
.sp-gate { padding: 14px 16px; overflow-x: auto; }
.sp-gate #gate-table { width: 100%; }
.sp-gate > .computed-sub-head { display: none; }                /* the page's heading names the gate */
.gate-checks-cell { white-space: normal; min-width: 190px; }
.gate-checks-cell .jr-sb-chips { margin-bottom: 6px; }
.gate-bidder-link { font-weight: 600; color: var(--accent); text-decoration: none; }
.gate-bidder-link:hover { text-decoration: underline; }
.jr-hc-info { cursor: default; }
.jr-hc-info:hover { border-color: var(--border-color); box-shadow: none; }
/* #742 -- the marks table while its stage is not open: a heading, not a small grey link */
.so-locked > summary.so-locked-sum { cursor: pointer; padding: 10px 14px; border: 1px solid var(--border-color); border-radius: 10px; background: var(--card); }
.so-locked-title { font-weight: 700; font-size: calc(16px * var(--fs, 1)); color: var(--text); }
.so-locked-hint { color: var(--text-muted); font-size: calc(13px * var(--fs, 1)); margin-left: 6px; }

/* ---------------------------------------------------------------------------------------------- D139 (#744-#750) */
/* #744 -- the grid's decision card above the table, kept in view at the top while the table scrolls */
#grid-section, #manage-view[data-part="grid"] { overflow: visible; }   /* sticky needs no clipping box between it and the page's scroller */
.gd-panel { position: sticky; top: 8px; z-index: 5; margin: 0 0 12px; max-height: 62vh; overflow: auto;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--text) 12%, transparent); }
.gd-p-ev { margin: 6px 0 8px; }
.gd-p-ev .dd-fold { margin: 4px 0; }
.gd-p-open { align-self: center; color: var(--accent); font-size: calc(13px * var(--fs, 1)); margin-left: 4px; }
/* #750 (Q2) -- at phone width the top bar's links take a row of their own (they ran over the bell) */
@media (max-width: 760px) {
  .app-header-inner { flex-wrap: wrap; row-gap: 6px; padding: 10px 14px; }
  .header-logo { width: auto; }
  .header-right { flex: 1 1 auto; justify-content: flex-end; }
  .top-nav { order: 3; width: 100%; margin-left: 0; flex-wrap: nowrap; overflow-x: auto; }
}

/* ---------------------------------------------------------------------------------------------- D140 (#751-#753) */
/* #752 -- a settled cell is a button too (its evidence, its status, change it); quieter than a "?" */
.gd-cell.gd-done { background: transparent; border: 1px solid transparent; }
.gd-cell.gd-done:hover, .gd-cell.gd-done:focus-visible { border-color: var(--border-color); background: var(--hover-bg, var(--bg-subtle)); }
.gd-cell.gd-met { color: var(--green); }
.gd-cell.gd-notmet { color: var(--red); }
.gd-cell.gd-na { color: var(--text-muted); }
.gd-p-now { margin: 4px 0 6px; font-size: calc(14px * var(--fs, 1)); }
.gd-p-nodoc { margin: 6px 0; color: var(--text-muted); font-size: calc(14px * var(--fs, 1)); }
/* #754 -- each bidder's "?" count under its name in the grid */
.gd-th-n { display: block; font-weight: 500; font-size: calc(12px * var(--fs, 1)); white-space: nowrap; }
/* #756 -- each bidder's ✓ ✕ ? – under its name; "Only the checks with a ?" hides the settled rows */
.gd-n-met { color: var(--green); } .gd-n-not { color: var(--red); } .gd-n-q { color: var(--amber); } .gd-n-na { color: var(--text-muted); }
.gd-only { margin-left: 10px; white-space: nowrap; font-weight: 600; color: var(--text); }
.gd-only-open .gd-table tbody tr.gd-settled { display: none; }

/* BUGS_LOG.md #760 -- the line that says a decision was saved (and Undo) */
.dd-saved { margin: 4px 0 12px; padding: 8px 12px; border-radius: 8px; border-left: 4px solid var(--green);
  background: var(--green-tint); color: var(--text);
  font-size: calc(14px * var(--fs, 1)); }
.dd-saved .dd-undo { background: none; border: 0; padding: 0 2px; color: var(--accent, #1d4ed8); font: inherit;
  text-decoration: underline; cursor: pointer; }
.dd-saved .dd-undo:disabled { opacity: .5; cursor: default; }

/* BUGS_LOG.md #795 step 5 -- the word rules' switches (System settings) */
.wr-row { display: flex; gap: 6px; align-items: baseline; padding: 3px 0; font-size: calc(13px * var(--fs, 1)); }
.wr-row code { font-size: calc(12px * var(--fs, 1)); }
/* BUGS_LOG.md #933 -- a switch with a sentence of words: one paragraph, not its bold words laid out as columns */
.wr-row.wr-para { display: block; line-height: 1.45; }
.wr-row.wr-para > input { margin-right: 6px; vertical-align: baseline; }
.wr-pat { color: var(--text-muted); font-family: ui-monospace, monospace; font-size: calc(12px * var(--fs, 1)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.wr-head { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.wr-group { border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px; margin: 4px 0; }
.wr-group > summary { cursor: pointer; font-weight: 600; }

/* BUGS_LOG.md #809 / #813 / #814 -- the kind of an amendment's change and where it lands */
.adr-places { margin: 4px 0; font-size: calc(12.5px * var(--fs, 1)); color: var(--text-muted); }
.adr-place { display: inline-block; padding: 1px 8px; margin-right: 4px; border-radius: 10px; background: var(--paper, #f3f4f6); border: 1px solid var(--paper-border, #e2e5ea); color: var(--text); }
.adr-qa { margin: 4px 0 6px; padding: 6px 10px; border-left: 3px solid var(--border, #dde1e6); font-size: calc(13px * var(--fs, 1)); }
.adr-qa > div + div { margin-top: 3px; }
/* #812 -- a proposal's lines never draw over the next (the fold's summary sits below the reasons) */
.adr-prop .adr-why, .adr-prop .adr-diff { position: static; clear: both; }
.adr-prop { overflow: hidden; }


/* BUGS_LOG.md #907 -- disqualification conditions */
.dq-banner { border: 1.5px solid var(--red); background: var(--red-tint); color: var(--red); border-radius: 8px;
  padding: 10px 14px; margin: 0 0 10px; font-size: calc(13px * var(--fs, 1)); }
.dq-banner strong { letter-spacing: 0.04em; }
.shape-tab.dq-hit { border-color: var(--red); color: var(--red); }
.dq-box { border-left: 3px solid var(--red); background: var(--bg-subtle); padding: 6px 10px;
  margin: 6px 0; font-size: calc(12px * var(--fs, 1)); }
.dq-box ul { margin: 4px 0 0 16px; padding: 0; }
.dq-nums { color: var(--text-muted); }
.dq-quote { color: var(--text-muted); margin-top: 2px; }
.dq-info-note { color: var(--text-muted); font-style: italic; margin: 0 0 8px; font-size: calc(12px * var(--fs, 1)); }
.dq-tag { color: var(--red); font-weight: 700; font-size: calc(12px * var(--fs, 1)); letter-spacing: 0.03em; }

/* BUGS_LOG.md #914 -- one requirement, several rows; information only */
.crit-group { border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 8px; padding: 8px 10px;
  margin: 0 0 10px; background: var(--bg-subtle); }
.crit-group-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.crit-group-title { font-weight: 600; }
.crit-group-join, .crit-group-note, .crit-group-tag { color: var(--text-muted); font-size: calc(12px * var(--fs, 1)); }
.crit-group-note { margin: 0 0 6px; }
.crit-group-parts { padding-left: 8px; }
.crit-group-tag { margin-bottom: 2px; }
.info-only { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 8px; }
.info-only > summary { cursor: pointer; color: var(--text-muted); font-weight: 600; }
.info-only-sub { color: var(--text-muted); font-size: calc(12px * var(--fs, 1)); margin: 6px 0; }
.info-only-h { font-weight: 600; margin: 10px 0 4px; }

/* BUGS_LOG.md #914 step 2 -- a criterion's parts inside its card */
.crit-parts { margin: 8px 0; padding: 8px 10px; border-left: 3px solid var(--accent); background: var(--accent-tint); border-radius: 4px; }
.crit-parts-head { font-weight: 600; margin-bottom: 4px; }
.crit-parts-list { margin: 0; padding-left: 18px; }
.crit-part { margin: 4px 0; }
.crit-part-reason { color: var(--text-muted); font-size: 0.95em; }
.crit-part-from { color: var(--text-muted); font-size: 0.9em; }

/* BUGS_LOG.md #920 -- a disqualification condition's evidence in the bid, on the card */
.dq-evidence { margin: 0 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.dq-ev-label { color: var(--text-muted); font-size: 0.92em; margin-top: 4px; }
.dq-ev-none { color: var(--text-muted); }

/* BUGS_LOG.md #928 -- the reason box in a card's status picker */
.verdict-picker .pick-note { flex: 1 1 260px; min-width: 200px; margin-left: 6px; }

/* BUGS_LOG.md #931 -- a check the app decided (who decides: the app) */
.app-decided-tag { display: inline-block; margin-top: 3px; font-size: calc(12px * var(--fs, 1)); color: var(--text-muted); border: 1px dashed var(--border); border-radius: 4px; padding: 0 5px; }

/* Signed-in workspace: the Bid Assist pearl shell. The login screen is outside .app. */
.app {
  --bg: #f3eee5;
  --card: #fffdfa;
  --border: rgba(61, 60, 53, 0.12);
  --text: #292b27;
  --text-muted: #63685f;
  --text-faint: #8a8f86;
  --rail-bg: #fffdf9;
  --rail-raised: #f7f3ec;
  --rail-border: rgba(56, 58, 52, 0.11);
  --rail-text: #292b27;
  --rail-text-muted: #787c75;
  --rail-accent: #a86f00;
  --accent: #e2a214;
  --accent-tint: #fff4d6;
  --accent-strong: #a86f00;
  --on-accent: #292b27;
  --green: #2f7448;
  --green-tint: #e7f6ee;
  --amber: #875900;
  --amber-tint: #fff4d6;
  --red: #a13f37;
  --red-tint: #fdeceb;
  --hover-bg: rgba(41, 43, 39, 0.05);
  --bg-subtle: #f7f3ec;
  --border-color: rgba(61, 60, 53, 0.12);
  --font-heading: "Manrope", sans-serif;
  --font: "Manrope", sans-serif;
  --radius: 16px;
  font-family: "Manrope", sans-serif;
}
.app .app-body { grid-template-columns: 268px minmax(0, 1fr); }
.app .app-header {
  background: rgba(255, 253, 249, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.7);
}
.app .page-toolbar { background: transparent; border-bottom: 1px solid rgba(61, 60, 53, 0.08); }
.app .nav-link { border-radius: 12px; }
.app .nav-link:hover,
.app .nav-link.active { background: var(--accent-tint); color: var(--accent-strong); }
.app .jr-card,
.app .section-card {
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(80, 72, 54, 0.06);
}

/* Bid Assist rail. Shown even when Preferences hid the old side menu; the toolbar button still collapses it. */
.app.no-rail:not(.sidebar-collapsed) .app-body { grid-template-columns: 268px minmax(0, 1fr); }
.app.no-rail:not(.sidebar-collapsed) .rail { display: flex; }
.desk-rail { flex: 1; min-height: 0; overflow: auto; padding-bottom: 18px; }
.desk-nav-label {
  margin: 16px 4px 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-faint);
}
.desk-rail .desk-link,
.desk-rail .nav-link.desk-link {
  display: flex; align-items: center; gap: 10px; width: 100%;
  margin: 2px 0; padding: 8px 10px; border: none; background: transparent;
  border-radius: 12px; color: var(--rail-text); text-decoration: none;
  font: 600 13.5px/1.3 var(--font); text-align: left; cursor: pointer;
}
.desk-rail .desk-sub .desk-link,
.desk-rail .desk-sub .nav-link.desk-link { padding-left: 38px; font-weight: 600; }
.desk-rail .desk-link svg { flex: 0 0 auto; color: var(--text-muted); }
.desk-rail .desk-chevron { margin-left: auto; transition: transform .15s ease; }
.desk-rail .nav-group-toggle[aria-expanded="false"] .desk-chevron { transform: rotate(-90deg); }
.desk-rail .desk-link:hover,
.desk-rail .nav-link.desk-link:hover { background: var(--rail-raised); color: var(--rail-text); }
.desk-rail .nav-link.desk-link.active,
.desk-rail .desk-link.active { background: var(--accent-tint); color: var(--accent-strong); }
.desk-rail .nav-link.disabled { opacity: .45; pointer-events: none; }
.desk-rail .nav-tree { list-style: none; margin: 0; padding: 0; }
.desk-rail .nav-tree::before { display: none; }
.desk-rail .nav-tree-item { padding: 0; }
.desk-rail .nav-tree-item::before { display: none; }
.desk-rail .bidder-list .nav-link { padding: 8px 10px 8px 38px; border-radius: 12px; margin: 2px 0; }
.desk-rail .bidder-list .nav-link:hover,
.desk-rail .bidder-list .nav-link.active { background: var(--accent-tint); color: var(--accent-strong); }
.desk-rail .nav-sidebar-grow { min-height: 0; }
.desk-rail .bidder-list { max-height: 280px; overflow: auto; }
.desk-rail .nav-tree-empty { padding: 8px 10px 8px 38px; color: var(--text-faint); font-size: 13px; }

/* Bid Assist shell: the rail is full height. The header and the Back / page-name
   row live only in the column beside it. The old My work / Reports / Admin links
   stay in the markup for routing, and stay out of the header. */
.app {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr);
}
.app > .app-header { grid-column: 2; grid-row: 1; position: static; }
.app > .page-toolbar { grid-column: 2; grid-row: 2; }
.app > .app-body { display: contents; }
.app > .app-body > .rail { grid-column: 1; grid-row: 1 / -1; height: auto; min-height: 0; }
.app > .app-body > .main { grid-column: 2; grid-row: 3; height: auto; min-height: 0; }
.app.sidebar-collapsed { grid-template-columns: 0 minmax(0, 1fr); }
.app .app-header-inner { justify-content: flex-start; align-items: center; gap: 6px; padding: 8px 16px; }
.app .top-nav { display: flex !important; margin-left: 2px; align-items: center; }
.app .top-nav a { border-radius: 10px; font-weight: 650; }
.app .top-nav a.active { background: var(--accent-tint); color: var(--accent-strong); }
.app .header-right { flex: 1; margin-left: auto; justify-content: flex-end; gap: 8px; }
.app #apps-menu-toggle { display: inline-flex !important; flex: 0 0 auto; }
.app .page-toolbar-inner,
.app:not(.no-rail):not(.sidebar-collapsed) .page-toolbar-inner {
  max-width: none; margin: 0; width: auto; padding: 8px 16px; flex-wrap: nowrap;
}
.app .page-back { width: auto; color: var(--text); font-weight: 650; }
.app .page-name { font-size: 18px; font-weight: 800; letter-spacing: -0.03em; }
.app .page-toolbar-inner:has(#page-crumbs:not([hidden])) #page-title { display: none; }
.app .page-crumbs { flex: 1; min-width: 0; flex-basis: auto; }
.app #page-back,
.app .page-back,
.app #page-refresh,
.app #sidebar-toggle { display: inline-flex !important; }
