/* RAW Circuit: shared presentation layer. Ticket behavior remains in index.html. */
/* BRAND-COLORS.md, copied exactly (ground rule 9; test/brand-colors.test.js). The role tokens below are these. */
:root{color-scheme:light;--raw-obsidian:#191919;--raw-ignite:#E6341A;--raw-ignite-ink:#BF2A13;--raw-ignite-light:#FF6B52;--raw-steel:#EFEFEF;--raw-white:#FFFFFF;--raw-gray:#5C5C5C;--raw-gray-light:#A8A8A8;--raw-surface-dark:#262626;--raw-text-dark:#EFEFEF;--ink:var(--raw-obsidian);--muted:#5C5C5C;--line:#D6D6D6;--panel:#fff;--page:var(--raw-steel);--teal:var(--raw-ignite-ink);--teal-bg:#FCEBE8;--red:#a73546;--red-bg:#fff0f2;--amber:#81541a;--amber-bg:#fff3dd;--purple:var(--raw-ignite-ink);--surface2:#F5F5F5;--button-text:#fff;--shadow:0 8px 30px #19191912}
:root[data-circuit-theme=dark]{color-scheme:dark;--ink:var(--raw-text-dark);--muted:#A8A8A8;--line:#3A3A3A;--panel:var(--raw-surface-dark);--page:var(--raw-obsidian);--teal:var(--raw-ignite-light);--teal-bg:#3A1F1A;--red:#ffb4c0;--red-bg:#48283e;--amber:#f0ca8a;--amber-bg:#403326;--purple:var(--raw-ignite-light);--surface2:#2E2E2E;--button-text:var(--raw-obsidian);--shadow:0 16px 50px #0005}
body{line-height:1.5;background:var(--page)}
button,input,select,textarea{color:var(--ink);background:var(--panel)}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--teal);outline-offset:2px}
tr.row:focus-visible,th[tabindex]:focus-visible{outline:2px solid var(--teal);outline-offset:-2px}
button{border-color:var(--line);border-radius:7px;min-height:36px}button.primary,.auth-btn{background:var(--teal);border-color:var(--teal);color:var(--button-text)}
#auth-screen{background:var(--page)}.auth-card{background:var(--panel);color:var(--ink);border:1px solid var(--line);border-top:2px solid var(--purple);border-radius:8px;box-shadow:var(--shadow)}.auth-logo{background:#fff}.auth-subtitle,.auth-note{color:var(--muted)}
header{height:auto;min-height:70px;padding:12px 28px;background:var(--panel);color:var(--ink);border-top:2px solid var(--purple);border-bottom:1px solid var(--line);box-shadow:none}.header-title,.header-divider,.user-pill,.sign-out-btn{color:var(--muted)}.user-pill{background:var(--surface2)}.user-avatar{background:var(--teal);color:var(--button-text)}.sign-out-btn{border-color:var(--line)}.env-badge{color:var(--purple);border-color:var(--purple);background:transparent;border-radius:4px}
.appearance-control{display:grid;place-items:center;width:34px;height:34px;min-height:34px;padding:0;border:1px solid var(--line);border-radius:50%;background:var(--surface2);color:var(--muted);flex:none}.appearance-control span{display:flex;pointer-events:none}
.circuit-intro{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:0 0 16px;padding:24px 26px 20px;background:linear-gradient(120deg,var(--panel),transparent);border:1px solid var(--line);border-top:2px solid var(--purple);border-radius:6px}.circuit-intro span{color:var(--purple);font-size:11px;letter-spacing:1.2px;font-weight:700}.circuit-intro h1{font-size:27px;line-height:1.2;letter-spacing:-.6px;margin:6px 0}.circuit-intro p{margin:0;color:var(--muted);font-size:13px}.circuit-intro svg{width:210px;height:70px;color:var(--teal);opacity:.18;flex:none}
main{padding:20px 28px;grid-template-columns:minmax(0,1fr);gap:18px}main>section{min-width:0;overflow-x:auto}.toolbar{padding:12px 14px;margin-bottom:12px;background:var(--panel);border:1px solid var(--line);border-radius:6px}.toolbar input,.toolbar select,textarea,dialog input,dialog select,dialog textarea{background:var(--surface2);color:var(--ink);border-color:var(--line)}
table,.detail-dialog,dialog,.msg{background:var(--panel);border-color:var(--line);border-radius:6px;box-shadow:0 3px 14px #19191908}table{min-width:940px}th{background:var(--surface2);color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.04em}th:nth-child(2),td:nth-child(2){min-width:190px}th:nth-child(3),td:nth-child(3){min-width:190px}th:last-child,td:last-child{min-width:170px}td{padding-block:12px}tr.row:hover,tr.row.selected{background:var(--surface2)}.detail-dialog{border-top:2px solid var(--purple)}.pill{border-radius:4px}.msg.out{background:var(--teal-bg);border-color:var(--teal)}#toast{background:var(--ink);color:var(--page)}
@media(max-width:960px){header{padding-inline:16px}.circuit-intro{padding:18px}.circuit-intro svg{display:none}main{padding:16px;grid-template-columns:1fr}.header-right{gap:8px}}
@media(max-width:600px){.header-title,.header-divider,.user-pill span{display:none}.header-mark img{max-width:58px}.auth-card{padding:24px 18px}.toolbar>*{flex:1 1 140px}.toolbar .grow{display:none}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;animation:none!important}}
.auth-card>.appearance-control{margin:0 0 16px auto}
/* Sign-in card: the product name larger and in the main ink, and the environment line as a
   yellow caution badge. The old brown (#784600) read 2.1:1 on the dark card. The badge is 11:1 in both modes and
   never shows empty: prod has no environment line. */
.auth-subtitle{font-size:1.05rem;font-weight:600;letter-spacing:.06em;color:var(--ink)}
.auth-env{display:inline-block;margin:0 0 1rem;padding:.3rem .75rem;border:1px solid #d9a800;border-radius:6px;background:#ffd23f;color:#2b2100;font-size:.95rem;font-weight:800;letter-spacing:.04em}
.auth-env:empty,.auth-env[hidden]{display:none}
/* Sign-in card: the product name on the top row beside the appearance control, above the logo,
   and the DEV badge evenly spaced between the logo and the sign-in button. The control is pinned to the card's corner
   so the name can share its row; the name's side padding keeps it clear of the control, more on a phone,
   where the card's own padding is narrower. The logo owns the gap below it, so prod, which has no badge, keeps the same gap. */
.auth-card{position:relative;padding-top:1.6rem}
.auth-card>.appearance-control{position:absolute;top:1.1rem;right:1.1rem;margin:0}
.auth-card>.auth-subtitle{min-height:34px;display:flex;align-items:center;justify-content:center;margin:0 0 1rem;padding:0 16px;font-size:1.15rem}
.auth-card>.auth-logo-wrap{margin-bottom:1.4rem}
.auth-card>.auth-env{margin:0 0 1.4rem}
@media(max-width:600px){.auth-card>.auth-subtitle{padding:0 42px}}
/* Compact working headers. */
.circuit-intro{padding:14px 20px;margin-bottom:12px;gap:12px}
.circuit-intro h1{font-size:22px;line-height:1.25;letter-spacing:-.4px;margin:0 0 4px}
.circuit-intro p{margin:0;font-size:14px;line-height:1.45}
.circuit-intro>div>span,.circuit-intro>svg{display:none}
@media(max-width:600px){
  .circuit-intro{padding:12px 16px;margin-bottom:10px}
  .circuit-intro h1{font-size:20px}
  .circuit-intro p{font-size:13px}
}

/* Narrow screens: the header wraps. */
@media(max-width:600px){
  #app>header:not(.top),.brand-bar{flex-wrap:wrap;gap:8px;padding:10px 16px}
  .header-left,.brand-left{display:contents}
  .header-right{margin-left:auto;gap:6px;flex-shrink:0}
}

.workspace-tools{--workspace-line:var(--line);--workspace-panel:var(--panel);--workspace-accent:var(--teal)}

/* ⚙ Tools ▾: a teal-outline button on the right of its bar, whose
   panel drops down under it, right-aligned, over the content. Opening it re-flows nothing and never
   moves the button. A native disclosure, so the summary opens and closes it from the keyboard; the
   page closes it on Escape and on a click outside. */
.workspace-tools{position:relative;flex:0 0 auto;min-width:0;margin-left:auto}
.workspace-tools>summary{cursor:pointer;list-style:none;display:inline-flex;align-items:center;min-height:40px;padding:8px 12px;
  border:1px solid var(--workspace-accent);border-radius:6px;background:var(--workspace-panel);
  color:var(--workspace-accent);font-size:14px;font-weight:600;line-height:22px;white-space:nowrap}
.workspace-tools>summary::-webkit-details-marker{display:none}
.workspace-tools>summary:hover,.workspace-tools[open]>summary{background:var(--teal-bg)}
.workspace-tools>summary:focus-visible{outline:2px solid var(--workspace-accent);outline-offset:3px}
.workspace-tools .workspace-tool-list{position:absolute;top:calc(100% + 6px);right:0;z-index:60;
  display:flex;flex-direction:column;align-items:stretch;gap:6px;width:max-content;min-width:220px;
  max-width:min(320px,calc(100vw - 32px));padding:8px;border:1px solid var(--workspace-line);border-radius:6px;
  background:var(--workspace-panel);box-shadow:var(--shadow)}
.workspace-tool-list>button,.workspace-tool-list>a{min-height:40px;justify-content:flex-start;text-align:left}

.toolbar select,.toolbar input{min-height:40px;padding:8px;border:1px solid var(--line);border-radius:6px;font-size:14px}
.toolbar>.primary{min-height:40px}
td{font-size:14px}
.ticket-no{white-space:nowrap}
@media(max-width:600px){
  .toolbar{gap:8px;padding:10px}
  .toolbar>.primary{flex:1 1 180px}
  .toolbar>.workspace-tools{flex:0 0 auto;margin-left:auto}
  .toolbar>#f-q{flex:1 0 100%;min-width:0!important;width:100%}
  .toolbar>.work-views{flex:1 0 100%}.work-views>button{flex:1 1 auto}
  .toolbar>#f-status,.toolbar>#f-queue{flex:1 1 calc(50% - 8px);min-width:0}
  .toolbar>#refreshed:empty{display:none}
  .rollup{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:8px;padding-bottom:6px;scroll-snap-type:x proximity}
  .rollup-card{flex:0 0 170px;scroll-snap-align:start}
}

/* Phone workspaces keep the first useful record close to the controls. */
@media(max-width:640px){.circuit-intro p{display:none}.circuit-intro{padding-block:8px}.circuit-intro h1{margin:0;font-size:18px}}

/* The Overdue and Due today pills in the dark palette (the light ones are in index.html). */
:root[data-circuit-theme=dark] .pill-overdue{background:#4c1d1d;color:#fecaca}
:root[data-circuit-theme=dark] .pill-today{background:#45300c;color:#fde68a}

/* dialog-chrome -- every pop-up window (test/dialog-chrome.test.js). A long window never makes a
   person scroll back to the top to close it: the title row and its close button stay at the top while the
   body scrolls under them; a window with nothing to save ends with a Close button of its own;
   Escape closes it; and every title is 1.3rem, 700, in the heading color. The header takes over
   the window's top padding, so it sticks to the very top edge with no strip above it. */
dialog,.detail-dialog,.report-dialog{padding-top:0}
.dialog-head{position:sticky;top:0;z-index:5;display:flex;justify-content:space-between;align-items:flex-start;gap:12px;background:var(--panel);border-bottom:1px solid var(--line);margin:0 -18px 12px;padding:14px 18px 10px}
.dialog-head h2,dialog h2{margin:0;font-size:1.3rem;font-weight:700;line-height:1.3;letter-spacing:-.01em;color:var(--ink);min-width:0;overflow-wrap:anywhere}
.detail-dialog .dialog-head{margin:0 -20px 10px;padding:16px 20px 10px}
.dialog-x,.detail-close{flex-shrink:0;min-width:36px;min-height:36px;padding:0 6px;border:0;border-radius:6px;background:transparent;color:var(--muted);font-size:1.2rem;line-height:1;cursor:pointer}
.dialog-x:hover,.detail-close:hover{background:var(--surface2);color:var(--ink)}
.dialog-foot{display:flex;justify-content:flex-end;gap:8px;margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}
.report-dialog .dialog-head{flex-wrap:wrap;align-items:center}.report-dialog .dialog-head h2{flex:1 1 auto}
@media(max-width:720px){.report-dialog .dialog-head .report-range{order:3;flex-basis:100%}}
/* end dialog-chrome */
/* The import page's "← Queue" link is its own control in the top bar (an a.back, not a .btn), so it
   takes the navy bar's button colors here, beside the shared block. */
#app>header:first-child .back{background:transparent;color:#fff;border-color:rgba(255,255,255,.4)}
#app>header:first-child .back:hover{background:rgba(255,255,255,.08);border-color:var(--raw-ignite)}
/* shared:ai-mark-dark -- pinned by test/brand-colors.test.js. BRAND-COLORS.md's
   Ignite light reads 5.4:1 on a dark card but less on the AI box's own ignite tint, so in dark mode the
   AI marks take the same hue lightened: the shade the file allows where text would fail. */
:root[data-circuit-theme=dark] :is(.ai-label,.ai-fill-note,.ai-filled,.ai-filled span,#entry-mode.entry-mode-filled){color:color-mix(in srgb,var(--raw-ignite-light) 75%,#fff)}
/* end shared:ai-mark-dark */
/* shared:navy-header -- pinned by test/brand-colors.test.js and test/parity.test.js.
   BRAND-COLORS.md, ground rule 9: the top bar is RAW Obsidian in both modes, its text white, and its
   own accents -- the underline, the DEV badge, the avatar and focus rings -- Ignite. The selector is
   the header that opens #app on the board and on the import page, never a header card inside <main>.
   The block sets the whole header, not only its colors: every part's type, size, spacing and the
   breakpoints, so the two pages' headers cannot drift apart through their own font stacks. The
   anatomy and every value are DESIGN.md's "UI standard"; a page keeps only its own title text. */
#app>header:first-child{background:var(--raw-obsidian);color:#fff;border-top-color:var(--raw-obsidian);border-bottom-color:var(--raw-ignite)}
#app>header:first-child :is(.header-title,.brand-title,.who,.user-pill,.sign-out-btn){color:#fff}
#app>header:first-child #header-title{font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;font-size:.85rem;font-weight:400;letter-spacing:.06em;text-transform:uppercase;line-height:1.5;color:#fff}
#app>header:first-child :is(.header-divider,.brand-divider){color:rgba(255,255,255,.6)}
#app>header:first-child .user-pill{background:rgba(255,255,255,.1)}
#app>header:first-child .user-avatar{background:var(--raw-ignite);color:var(--raw-obsidian)}
#app>header:first-child :is(.sign-out-btn,.btn,.appearance-control){background:transparent;color:#fff;border-color:rgba(255,255,255,.4)}
#app>header:first-child :is(.sign-out-btn,.btn,.appearance-control):hover{background:rgba(255,255,255,.08);color:#fff;border-color:var(--raw-ignite)}
#app>header:first-child .env-badge{background:var(--raw-ignite-light);border-color:var(--raw-ignite-light);color:var(--raw-obsidian)}
#app>header:first-child :focus-visible{outline-color:var(--raw-ignite)}
#app>header:first-child{display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;gap:18px;box-sizing:border-box;height:auto;min-height:70px;padding:12px 28px;box-shadow:none;border-width:2px 0 1px;border-style:solid;font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;font-size:14px;font-weight:400;font-style:normal;line-height:1.5;letter-spacing:normal;text-transform:none}
#app>header:first-child .header-left{display:flex;align-items:center;gap:12px;min-width:0;margin:0;padding:0}
#app>header:first-child .header-mark{display:inline-flex;align-items:center;flex-shrink:0;margin:0;padding:0}
#app>header:first-child .header-mark img{display:block;height:34px;width:auto;max-width:none;margin:0;padding:0}
#app>header:first-child .header-divider{font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:normal;margin:0;padding:0;opacity:1}
#app>header:first-child #header-title{margin:0;padding:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#app>header:first-child .env-badge[hidden]{display:none}
#app>header:first-child .env-badge{display:inline-flex;align-items:center;box-sizing:border-box;min-height:0;margin:0;padding:1px 8px;border-width:1px;border-style:solid;border-radius:4px;font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;font-size:10.5px;font-weight:700;line-height:16px;letter-spacing:.08em;text-transform:uppercase;white-space:nowrap;cursor:pointer}
#app>header:first-child .header-right{display:flex;align-items:center;gap:16px;flex-shrink:0;margin:0;padding:0}
#app>header:first-child [data-appearance]:not([hidden]){display:grid}
#app>header:first-child [data-appearance]{place-items:center;box-sizing:border-box;width:34px;height:34px;min-height:34px;flex:0 0 auto;margin:0;padding:0;border-width:1px;border-style:solid;border-radius:50%;font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;font-size:14px;line-height:1.5;cursor:pointer}
#app>header:first-child .user-pill{display:flex;align-items:center;gap:8px;box-sizing:border-box;margin:0;padding:3.2px 12px 3.2px 4px;border:0;border-radius:999px;font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;font-size:12.8px;font-weight:400;line-height:1.5;letter-spacing:normal;white-space:nowrap}
#app>header:first-child .user-avatar{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:22px;height:22px;margin:0;padding:0;border-radius:50%;font-size:10.4px;font-weight:700;line-height:1.5;letter-spacing:normal}
#app>header:first-child :is(#user-name,#who){font-size:12.8px;font-weight:400;line-height:1.5;color:#fff;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#app>header:first-child .sign-out-btn{box-sizing:border-box;min-height:36px;margin:0;padding:4.8px 11.2px;border-width:1px;border-style:solid;border-radius:6px;font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;font-size:12.48px;font-weight:400;line-height:1.5;letter-spacing:normal;white-space:nowrap;cursor:pointer}
/* When space runs short the header gives way in one order, and no part ever
   wraps its own text: first the signed-in name goes and the avatar stays, then the title shortens
   with an ellipsis (the whole name is its title attribute), then below 600px the title and the "/" go. 1440px at 125% zoom is 1152px wide, at 150% 960px. */
@media(max-width:1100px){#app>header:first-child #user-name{display:none}#app>header:first-child .user-pill:not(:has(.user-avatar)){display:none}#app>header:first-child .user-pill{padding:5px}}
@media(max-width:960px){#app>header:first-child{padding-inline:16px}#app>header:first-child .header-right{gap:8px}}
@media(max-width:850px){#app>header:first-child{padding:10px 16px;gap:10px}}
@media(max-width:800px){
#app>header:first-child{flex-wrap:wrap;gap:8px;padding:10px 16px}
#app>header:first-child .header-left{display:contents}
#app>header:first-child #header-title{flex:1 1 0;max-width:max-content}
#app>header:first-child .header-right{margin-left:auto;gap:6px;flex-shrink:0}
}
@media(max-width:600px){
#app>header:first-child .header-mark img{max-width:54px}
#app>header:first-child :is(#header-title,.header-divider){display:none}
#app>header:first-child .sign-out-btn{padding-inline:9px}
}
#app>header:first-child .user-pill:has(#who:empty){display:none}
/* end shared:navy-header */
/* shared:ui-standard -- pinned by test/parity.test.js. The standard, written down so it cannot
   drift: every part of the interface set whole -- type, size, weight, line height, letter spacing,
   padding, border widths, radius and height -- from DESIGN.md's "UI standard", which is this block
   in prose. :not(#_) lifts a rule above any page rule without an id; the colors are DESIGN.md's
   (BRAND-COLORS.md, ground rule 9), as --ui-*. A state color (a red Overdue, a tile's strip) stays
   the page's: only the shape and the type are set here. */
:root{--ui-font:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;--ui-surface:#FFFFFF;--ui-surface-2:#F5F5F5;--ui-line:#D6D6D6;--ui-ink:#191919;--ui-muted:#5C5C5C;--ui-accent:var(--raw-ignite-ink);--ui-accent-tint:#FCEBE8;--ui-on-accent:#FFFFFF;--ui-warn:#81541A;--ui-crit:#A73546}
:root[data-circuit-theme=dark]{--ui-surface:#262626;--ui-surface-2:#2E2E2E;--ui-line:#3A3A3A;--ui-ink:#EFEFEF;--ui-muted:#A8A8A8;--ui-accent:var(--raw-ignite-light);--ui-accent-tint:#3A1F1A;--ui-on-accent:var(--raw-obsidian);--ui-warn:#F0CA8A;--ui-crit:#FFB4C0}
html body{font-family:var(--ui-font);font-size:14px;line-height:1.5}
html body :is(#app,dialog):not(#_) :is(button,input,select,textarea,summary,h1,h2,h3,h4,p,span,div,td,th,label,a,strong,b,li,small,em){font-family:var(--ui-font)}
/* The page intro: the card that opens every board, its heading and its one-line lead. */
#app:not(#_) :is(.circuit-intro,#main>header.top){padding:14px 20px;gap:12px;margin-bottom:12px;align-items:center;flex-wrap:wrap;min-height:auto;flex-shrink:0;font-size:14px;line-height:1.5;background-image:linear-gradient(120deg,var(--ui-surface),transparent)}
#app:not(#_) :is(.circuit-intro h1,#main>header.top h1){font-size:22px;font-weight:700;line-height:1.25;letter-spacing:-.4px;margin:0 0 4px;min-height:0}
#app:not(#_) :is(.circuit-intro p,#main>header.top .sub){font-size:14px;font-weight:400;line-height:1.45;margin:0}
/* Summary tiles: a row of equal tiles (two a row on a phone), each the value above its label, then
   any note. */
#app:not(#_) :is(.summary-strip,.stats,.rollup:has(>.rollup-card),.report-headline):not([hidden]){display:grid}
#app:not(#_) :is(.summary-strip,.stats,.rollup:has(>.rollup-card),.report-headline){grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px;align-items:stretch;flex-shrink:0;padding:0;margin-bottom:12px;overflow:visible}
#app:not(#_) :is(.stat,.report-tile,.tile,.rollup-card):not([hidden]){display:flex}
#app:not(#_) :is(.stat,.report-tile,.tile,.rollup-card){flex-direction:column;align-items:stretch;gap:2px;padding:12px 16px;border-radius:8px;box-shadow:none;min-height:auto;text-align:left;font-size:14px;line-height:1.5}
#app:not(#_) .rollup-card>.rollup-main{display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:left}
#app:not(#_) :is(.stat .stat-val,.report-tile strong,.tile .v,.rollup-card .n){order:1;flex:none;font-size:24px;font-weight:700;line-height:1.2;letter-spacing:-.5px;margin:0;min-height:0}
#app:not(#_) :is(.stat .stat-label,.report-tile>span,.tile .k,.rollup-card .q){order:2;flex:none;font-size:11px;font-weight:600;line-height:1.5;letter-spacing:.06em;text-transform:uppercase;margin:0;min-height:0;color:var(--ui-muted)}
#app:not(#_) :is(.tile .n,.tile .tile-hint,.rollup-card .sub){order:3}
/* Tables: the header row and the cells. A heading and every cell start at the start, except a figure
   column (a count, an amount, a percent, a date in a row of figures): its heading and its cells carry
   class num, and sit on the right in tabular figures, so the numbers line up under
   their heading. The num rule outranks the cell rule, so a right-aligned figure cell never loses to it. */
#app:not(#_) :is(thead th){font-size:11px;font-weight:700;line-height:1.5;letter-spacing:.05em;text-transform:uppercase;white-space:normal;padding:8px 12px;border-width:0 0 1px;border-style:solid;border-color:var(--ui-line);background-color:var(--ui-surface-2);color:var(--ui-muted);text-align:start}
#app:not(#_) :is(tbody td){font-size:14px;font-weight:400;line-height:1.5;padding:10px 12px;border-width:0 0 1px;border-style:solid;border-color:var(--ui-line);border-radius:0;box-shadow:none;text-align:start}
:is(#app,dialog):not(#_) :is(th.num,td.num){text-align:right;font-variant-numeric:tabular-nums}
/* Pills: a flag (Overdue, Hard gate) and a status (Signed, Open); their colors are the state's. */
#app:not(#_) :is(.pill-overdue,.b.gate,.badge,.b.plain,.status-pill,.sev-chip){align-items:center;gap:4px;font-size:11px;font-weight:700;line-height:16px;letter-spacing:.04em;text-transform:uppercase;white-space:nowrap;padding:2px 8px;border-width:0;border-radius:4px;min-height:0}
/* Buttons: the primary action, the secondary ones (the Tools list) and the Tools menu itself. */
#app:not(#_) :is(.split-btn-main,button.small,button.primary,#add-task,#new-project,.workspace-tool-list button,.workspace-tools>summary,button.ghost){align-items:center;justify-content:center;gap:6px;min-height:40px;padding:8px 14px;border-width:1px;border-style:solid;border-radius:6px;font-size:14px;font-weight:400;line-height:1.5;letter-spacing:normal;white-space:nowrap;text-align:center}
#app:not(#_) :is(.split-btn-main,button.small.primary,button.primary,#add-task,#new-project){font-weight:600}
#app:not(#_) :is(.workspace-tool-list button,button.ghost){color:var(--ui-muted);border-color:var(--ui-line)}
#app:not(#_) .workspace-tools>summary{font-weight:600}
/* Row actions (Assign to me), one rule (test/parity.test.js). */
#app:not(#_) .act-btn{min-height:32px;padding:4px 12px;border-width:1px;border-radius:6px;font-size:13px;font-weight:600;line-height:1.2}
/* An icon before a button's words (New ticket). */
#app:not(#_) :is(.act-btn,button.primary)>svg.act-ico{display:inline-block;flex:none;width:14px;height:14px;margin:0 6px 0 0;vertical-align:-2px}
/* Fields: search boxes and selects. A search box with an icon keeps its own left padding. */
#app:not(#_) :is(#search,#q-contacts,#q,#f-q,.filter-select,#pipeline select,#f-status,#f-queue){min-height:40px;padding-top:8px;padding-bottom:8px;padding-right:10px;border-width:1px;border-style:solid;border-color:var(--ui-line);border-radius:6px;background-color:var(--ui-surface-2);font-size:14px;line-height:1.5}
#app:not(#_) :is(#q-contacts,#q,#f-q,.filter-select,#pipeline select,#f-status,#f-queue){padding-left:10px}
/* View switches: the work views are one control, a row of bordered buttons, the pressed one filled.
   They keep their own markup and keyboard behavior. */
#app:not(#_) :is(.tab-nav,nav.tabs,.segmented,#work-views){gap:4px;align-items:center}
#app:not(#_) :is(.tab-nav,nav.tabs){padding-block:8px}
#app:not(#_) .segmented{border:0;border-radius:0;overflow:visible;background:transparent}
#app:not(#_) :is(.tab-nav>.tab-btn,.tab-nav>.nav-group>summary,nav.tabs>button,.seg,#work-views>button){align-items:center;gap:6px;min-height:36px;margin:0;padding:6px 12px;border:1px solid var(--ui-line);border-radius:6px;background:var(--ui-surface);color:var(--ui-ink);box-shadow:none;font-size:14px;font-weight:400;line-height:1.5;white-space:nowrap}
#app:not(#_) :is(.tab-nav>.tab-btn.tab-active,.tab-nav>.nav-group:has(.tab-active)>summary,nav.tabs>button.active,.seg[aria-pressed="true"],#work-views>button[aria-current]){background:var(--ui-accent);border-color:var(--ui-accent);color:var(--ui-on-accent);font-weight:600}
#app:not(#_) :is(.tab-nav>.tab-btn,nav.tabs>button)::after{content:none}
/* Dialogs. */
dialog:not(#_){border-radius:10px;padding:0 24px 24px;line-height:1.5;color:var(--ui-ink);border-color:var(--ui-line);box-shadow:0 16px 50px rgba(19,21,51,.125)}
dialog:not(#_) .dialog-head button{border-radius:6px;padding:0 6px}
/* Toasts: one look, the light panel, with a colored left edge for a kind that has one: done, warning,
   error, whichever markup the page uses (a stack of .toast children, or #toast itself with a toast-<kind>
   class). One place too: bottom center, 18px up, no wider than 80vw, centered across the
   whole window (left and right 0, margin auto) rather than from left:50%, which wrapped a long toast at
   half the screen. A stack is a full-width column that lets clicks through around its toasts. A button
   in a toast (Undo, Reapply my changes, Open ... ->, Sign in again) is one action style: the surface,
   ink text and a line border, readable on the panel in both modes. */
:is(.toast-container,#toast:has(>.toast)):not(#_){position:fixed;inset:auto 0 18px 0;margin:0 auto;width:auto;height:auto;max-width:none;transform:none;display:flex;flex-direction:column;align-items:center;gap:8px;padding:0;border:0;background:transparent;box-shadow:none;overflow:visible;pointer-events:none}
#toast:not(:has(>.toast)):not(#_){position:fixed;inset:auto 0 18px 0;margin:0 auto;width:fit-content;height:auto;max-width:80vw;transform:none;box-sizing:border-box;overflow:visible}
:is(.toast-container>.toast,#toast>.toast):not(#_){max-width:80vw;box-sizing:border-box;pointer-events:auto}
:is(.toast-container>.toast,#toast:not(:has(>.toast)):not(:empty),#toast>.toast):not(#_){font-size:13px;font-weight:400;line-height:1.5;white-space:pre-line;padding:10px 14px;border:1px solid var(--ui-line);border-left:4px solid var(--ui-line);border-radius:8px;background:var(--ui-surface-2);color:var(--ui-ink);box-shadow:0 16px 50px rgba(19,21,51,.125);min-height:0}
:is(.toast-container>.toast-success,#toast>.toast.ok,#toast.toast-success):not(#_){border-left-color:var(--ui-accent)}
:is(.toast-container>.toast-warn,#toast>.toast.warn,#toast.toast-warn):not(#_){border-left-color:var(--ui-warn)}
:is(.toast-container>.toast-error,#toast>.toast.err,#toast.toast-error):not(#_){border-left-color:var(--ui-crit)}
:is(.toast-container,#toast) button:not(#_){display:inline-flex;align-items:center;vertical-align:baseline;min-height:28px;margin:0 0 0 6px;padding:2px 10px;border:1px solid var(--ui-line);border-radius:6px;background:var(--ui-surface);color:var(--ui-ink);box-shadow:none;font-family:var(--ui-font);font-size:13px;font-weight:600;line-height:1.5;letter-spacing:normal;text-decoration:none;white-space:nowrap;cursor:pointer}
:is(.toast-container,#toast) button:hover:not(#_){border-color:var(--ui-accent);background:var(--ui-surface)}
/* The site-access banner. */
#config-notice:not(#_){font-size:13px;line-height:1.5;text-align:left;border-radius:6px;margin-bottom:12px;min-height:0}
#config-notice-msg:not(#_){font-size:13px;line-height:1.5;text-align:left}
/* Empty states: one sentence, centered, muted, no box of its own. */
#app:not(#_) :is(.empty-state,td.empty){font-size:14px;line-height:1.5;padding:32px 24px;text-align:center;border-width:0;border-radius:0;box-shadow:none;background-color:transparent;color:var(--ui-muted)}
/* The import page: the way back, the column, the heading and its lead, the cards, their labels, buttons
   and fields. */
#app:not(#_)>.back-bar{display:flex;align-items:center;gap:10px;min-height:0;padding:5px 28px;margin-bottom:12px;font-size:14px;line-height:1.5;background:var(--ui-surface);border-bottom:1px solid var(--ui-line);box-shadow:0 4px 16px rgba(19,21,51,.04)}
#app:not(#_)>.back-bar a{display:inline-flex;align-items:center;min-height:28px;font-size:14px;font-weight:600;line-height:1.5;color:var(--ui-accent);text-decoration:none}
#app:not(.wrap):not(#_)>.back-bar~#main{box-sizing:border-box;max-width:1240px;margin-inline:auto;padding:22px 28px 80px}
#app.wrap:not(#_)>.back-bar~#main{box-sizing:border-box;max-width:1184px;margin-inline:auto;padding:22px 0 80px}
#app:has(>.back-bar):not(#_) #main>h1{font-size:22px;font-weight:700;line-height:1.25;letter-spacing:-.4px;margin:0 0 4px}
#app:has(>.back-bar):not(#_) #main>:is(.lead,.sub){font-size:14px;font-weight:400;line-height:1.45;margin:0 0 12px}
#app:has(>.back-bar):not(#_) #main .card{margin-top:18px;padding:18px 20px;border-radius:8px;box-shadow:none}
#app:has(>.back-bar):not(#_) #main .card>.fl{margin-bottom:8px;font-size:11px;font-weight:700;line-height:1.5;letter-spacing:.06em;text-transform:uppercase;color:var(--ui-muted)}
#app:has(>.back-bar):not(#_) #main :is(.btn,label.ghost,button.ghost,.filebtn,#xlsx-download,#validate,#import,#ai-generate){align-items:center;justify-content:center;gap:6px;min-height:40px;padding:8px 14px;border:1px solid var(--ui-line);border-radius:6px;background:var(--ui-surface);color:var(--ui-ink);font-size:14px;font-weight:400;line-height:1.5;letter-spacing:normal;white-space:nowrap;text-align:center}
#app:has(>.back-bar):not(#_) #main :is(.btn-primary,button.primary,#import,#ai-generate){background:var(--ui-accent);border-color:var(--ui-accent);color:var(--ui-on-accent);font-weight:600}
#app:has(>.back-bar):not(#_) #main :is(.btn,button):disabled{opacity:.45}
#app:has(>.back-bar):not(#_) #main :is(input:not([type=checkbox]):not([type=radio]):not([type=file]),select,textarea){font-size:14px}
#app:has(>.back-bar):not(#_) #main #ai-source{padding:10px 12px;border-radius:6px;line-height:1.5}
@media(max-width:850px){#app:not(#_)>.back-bar{padding-inline:16px}}
@media(max-width:640px){
#app:not(#_) :is(.circuit-intro,#main>header.top){padding:8px 16px;margin-bottom:10px}
#app:not(#_) :is(.circuit-intro h1,#main>header.top h1){font-size:18px;margin:0}
#app:not(#_) :is(.circuit-intro p,#main>header.top .sub){display:none}
#app:not(#_) :is(.stat,.report-tile,.tile,.rollup-card){padding:10px 12px}
#app:not(#_) :is(.stat .stat-val,.report-tile strong,.tile .v,.rollup-card .n){font-size:20px}
#app:not(#_) :is(.summary-strip,.stats,.rollup:has(>.rollup-card),.report-headline){grid-template-columns:repeat(2,minmax(0,1fr))}
#app:not(#_) :is(thead th,tbody td){padding:6px 8px}
#app:not(.wrap):not(#_)>.back-bar~#main{padding:16px 16px 64px}
#app.wrap:not(#_)>.back-bar~#main{padding:16px 0 64px}
}
/* end shared:ui-standard */
/* shared:signin-hint -- pinned by test/signin-hint.test.js. While the page
   starts on a tab that is already signed in, or on the way back from Microsoft, the board's sign-in
   card says "Signing in…" instead of offering the button (optimization review item 12, 2026-10-21).
   Only a card that carries the line changes. */
.auth-status{display:none;margin:0 0 .6rem;font-weight:600;color:inherit}
html[data-auth-state="restoring"] .auth-card:has(> .auth-status) .auth-btn,html[data-auth-state="restoring"] .auth-card:has(> .auth-status) .auth-note{display:none}
html[data-auth-state="restoring"] .auth-status{display:block}
/* end shared:signin-hint */
/* shared:environment-banner-and-badge -- pinned by test/design-md.test.js. The look of the environment
   banner, the DEV badge and the header title, on both pages. Each page keeps its own display rules (dev
   only) and layout margins. */
html body .env-banner,html body .environment-banner{background:#fff3dd;color:#81541a;border:0;border-bottom:1px solid #ef9f27;border-radius:0;padding:6px;font-size:14px;font-weight:600;line-height:21px;letter-spacing:normal;text-transform:none;text-align:center}
html[data-circuit-theme=dark] body .env-banner,html[data-circuit-theme=dark] body .environment-banner{background:#403326;color:#f0ca8a}
html body .env-badge{background:transparent;border:1px solid var(--purple);color:var(--purple);border-radius:4px;padding:1px 8px;font-size:10.5px;font-weight:700;line-height:16px;letter-spacing:.08em;text-transform:uppercase}
html body .header-title,html body .brand-title{font-size:.85rem;letter-spacing:.06em;font-weight:400;text-transform:uppercase}
/* end shared:environment-banner-and-badge */
