:root {
  --bg: #edf8fc;
  --surface: #ffffff;
  --surface-soft: #f2fbff;
  --surface-strong: #dff1f7;
  --ink: #0b2134;
  --muted: #4e6677;
  --subtle: #7390a1;
  --border: #c4deE8;
  --border-strong: #91bdce;
  --primary: #006cff;
  --primary-hover: #0052cc;
  --primary-soft: #dff0ff;
  --cyan: #009f91;
  --cyan-soft: #d9f8f2;
  --blue: #087ca8;
  --blue-soft: #ddf4fb;
  --amber: #b96700;
  --amber-soft: #fff0c9;
  --red: #c9384b;
  --red-soft: #ffe7eb;
  --sidebar: 248px;
  --radius: 6px;
  --shadow: 0 18px 45px rgba(0, 51, 82, .16);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; overflow-x: hidden; }
body { background: var(--bg); color: var(--ink); font-family: Inter, "Noto Sans SC", system-ui, sans-serif; font-size: 14px; letter-spacing: 0; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(36, 87, 214, .22); outline-offset: 2px; }
button:disabled, select:disabled { cursor: not-allowed; opacity: .48; }
h1, h2, h3, p { margin-top: 0; }
.sr-only { border: 0; clip: rect(0,0,0,0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; white-space: nowrap; width: 1px; }

.login-screen { background: #e8f7fb; display: grid; min-height: 100vh; padding: 24px; }
.login-brand { align-items: center; display: flex; gap: 11px; left: max(32px, calc((100vw - 1080px) / 2 + 58px)); position: absolute; top: max(34px, calc(50vh - 276px)); z-index: 2; }
.login-brand strong, .login-brand small { display: block; }
.login-brand strong { color: #f4f7f5; font-size: 17px; }
.login-brand small { color: #8d98a6; font-size: 8px; margin-top: 2px; text-transform: lowercase; }
.brand-symbol.login-brand-mark { height: 31px; width: 31px; }
.login-layout { background: var(--surface); border: 1px solid #cdd5d1; display: grid; grid-template-columns: minmax(360px, .9fr) minmax(440px, 1.1fr); margin: auto; min-height: 620px; overflow: hidden; width: min(1080px, 100%); }
.login-context { background: #081d2d; color: #f1fbff; display: flex; flex-direction: column; justify-content: flex-end; padding: 72px 58px 58px; }
.login-context .eyebrow { color: #5ed4cb; }
.login-context h1 { font-size: 34px; line-height: 1.22; margin-bottom: 14px; }
.login-context > p:last-of-type { color: #a8b2bf; font-size: 12px; line-height: 1.7; max-width: 350px; }
.login-facts { border-top: 1px solid #333b48; margin: 42px 0 0; }
.login-facts > div { align-items: center; border-bottom: 1px solid #333b48; display: grid; gap: 20px; grid-template-columns: 96px minmax(0, 1fr); padding: 15px 0; }
.login-facts dt { color: #7e8997; font-size: 9px; }
.login-facts dd { font-size: 10px; margin: 0; }
.login-panel { align-self: center; justify-self: center; max-width: 410px; padding: 52px 36px; width: 100%; }
.login-panel > header { align-items: center; display: flex; gap: 13px; margin-bottom: 32px; }
.login-lock { align-items: center; background: var(--primary-soft); color: var(--primary); display: flex; height: 42px; justify-content: center; width: 42px; }
.login-lock svg { height: 19px; width: 19px; }
.login-panel > header p { color: var(--subtle); font-size: 8px; font-weight: 700; margin: 0 0 4px; text-transform: uppercase; }
.login-panel > header h2 { font-size: 20px; margin: 0; }
.login-panel form { display: grid; gap: 18px; }
.login-panel form > label > span { color: var(--muted); display: block; font-size: 9px; font-weight: 600; margin-bottom: 7px; }
.login-panel form > label > input, .login-panel .secret-input { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 4px; width: 100%; }
.login-panel form > label > input { height: 42px; padding: 0 11px; }
.login-submit { height: 42px; margin-top: 4px; width: 100%; }
.login-error { align-items: flex-start; background: var(--red-soft); border-left: 3px solid var(--red); color: var(--red); display: grid; font-size: 9px; gap: 8px; grid-template-columns: 15px minmax(0, 1fr); line-height: 1.5; padding: 10px 11px; }
.login-error svg { height: 14px; margin-top: 1px; width: 14px; }
.login-panel > footer { align-items: center; border-top: 1px solid var(--border); color: var(--subtle); display: flex; font-size: 8px; gap: 7px; margin-top: 28px; padding-top: 16px; }
.login-panel > footer svg { height: 13px; width: 13px; }

.app-shell { min-height: 100vh; }
.sidebar { background: #081d2d; color: #d9f3fa; display: flex; flex-direction: column; height: 100vh; left: 0; padding: 20px 14px 16px; position: fixed; top: 0; width: var(--sidebar); z-index: 50; }
.brand { align-items: center; display: flex; gap: 11px; min-height: 46px; padding: 0 10px 21px; }
.brand-symbol { background: #ffffff; border-radius: 5px; height: 34px; object-fit: contain; padding: 2px; width: 34px; }
.brand strong { color: #fff; display: block; font-size: 18px; font-weight: 700; }
.brand small { color: #7f8b99; display: block; font-size: 9px; margin-top: 2px; text-transform: lowercase; }
.product-module-switch { background: #051521; border: 1px solid #17445c; display: grid; gap: 3px; grid-template-columns: 1fr 1fr; margin: 0 2px 13px; padding: 3px; }
.product-module-switch > [data-product-module] { align-items: center; background: transparent; border: 0; border-radius: 4px; color: #788494; cursor: pointer; display: flex; gap: 6px; min-height: 48px; min-width: 0; padding: 6px 7px; text-align: left; text-decoration: none; }
.product-module-switch > [data-product-module]:hover:not([aria-disabled="true"]) { background: #0d3650; color: #effcff; }
.product-module-switch > [data-product-module].is-active { background: var(--primary); color: #ffffff; }
.product-module-switch > [data-product-module="plm"] { grid-column: 1 / -1; min-height: 42px; }
.product-module-switch > [data-product-module]:disabled, .product-module-switch > [data-product-module][aria-disabled="true"] { cursor: not-allowed; opacity: .34; }
.product-module-switch svg { flex: 0 0 auto; height: 15px; width: 15px; }
.product-module-switch span, .product-module-switch strong, .product-module-switch small { display: block; min-width: 0; }
.product-module-switch strong { font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-module-switch small { color: currentColor; font-size: 6px; margin-top: 2px; opacity: .62; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.nav-section-label { color: #697586; font-size: 9px; font-weight: 700; padding: 8px 12px; text-transform: uppercase; }
.workspace-admin-label { border-top: 1px solid #2a313d; margin-top: 10px; padding-top: 14px; }
.main-nav { display: grid; gap: 3px; }
.nav-item { align-items: center; background: transparent; border: 0; border-radius: 5px; color: #86a9ba; cursor: pointer; display: flex; gap: 11px; height: 42px; padding: 0 12px; text-align: left; text-decoration: none; width: 100%; }
.nav-item:hover { background: rgba(36, 198, 225, .09); color: #f4fdff; }
.nav-item.is-active { background: #0c3f5d; box-shadow: inset 3px 0 0 #2de0cf; color: #fff; }
.nav-item svg { flex: 0 0 auto; height: 17px; width: 17px; }
.nav-item > span { flex: 1; min-width: 0; }
.nav-item em { background: #242d3a; border-radius: 3px; color: #98a3b1; font-size: 9px; font-style: normal; min-width: 22px; padding: 2px 5px; text-align: center; }
.nav-item.is-active em { background: #39485f; color: #e2e7ee; }
.sidebar-project { border-bottom: 1px solid #2a313d; border-top: 1px solid #2a313d; margin: 22px 9px 0; padding: 16px 2px; }
.sidebar-project > span { color: #728078; display: block; font-size: 9px; margin-bottom: 7px; text-transform: uppercase; }
.sidebar-project > strong { color: #eef3f0; display: block; font-size: 11px; line-height: 1.45; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-project > small { color: #7f8b99; display: block; font-size: 9px; margin-top: 4px; }
.sidebar-project > div { align-items: center; color: #9baba3; display: flex; font-size: 9px; gap: 6px; margin-top: 12px; min-width: 0; }
.sidebar-project > div svg { flex: 0 0 auto; height: 13px; width: 13px; }
.sidebar-project > div span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-foot { margin-top: auto; }
.sidebar-engine { border-bottom: 1px solid #2a313d; margin: 0 9px 8px; padding: 0 2px 14px; }
.engine-status { align-items: center; color: #839088; display: inline-flex; font-size: 9px; gap: 7px; }
.engine-status > span { background: #6e7973; border-radius: 50%; height: 6px; width: 6px; }
.engine-status.is-checking > span { background: var(--amber); }
.engine-status.is-connected { color: #a9cdbb; }
.engine-status.is-connected > span { background: #5fbd8a; box-shadow: 0 0 0 3px rgba(95,189,138,.12); }
.engine-status.is-disconnected { color: #e39a95; }
.engine-status.is-disconnected > span { background: #d96b63; }
.usage-block { margin: 12px 11px 0; }
.usage-owner { align-items: center; color: #778392; display: flex; font-size: 9px; justify-content: space-between; margin-bottom: 10px; }
.usage-owner strong { color: #eef3f0; font-size: 10px; }
.usage-line { color: #778392; display: flex; font-size: 9px; justify-content: space-between; }
.usage-line strong { color: #bac6c0; font-weight: 500; }
.usage-track, .progress-track { background: #dfe5e1; border-radius: 2px; height: 4px; overflow: hidden; }
.usage-track { background: #2a3443; margin-top: 8px; }
.usage-track span, .progress-track span { background: #72b493; display: block; height: 100%; transition: width .3s ease; }
.usage-track.is-full span { background: #dc746d; }
.usage-foot { align-items: center; color: #7f8b99; display: flex; font-size: 8px; justify-content: space-between; margin-top: 8px; }
.usage-foot button { background: transparent; border: 0; color: #a9cdbb; cursor: pointer; font-size: 8px; padding: 0; }

.main-area { margin-left: var(--sidebar); min-width: 0; }
.topbar { align-items: center; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--border); display: flex; height: 68px; justify-content: space-between; padding: 0 30px; position: sticky; top: 0; z-index: 40; }
.topbar-context, .topbar-actions { align-items: center; display: flex; }
.topbar-context { gap: 13px; min-width: 0; }
.topbar-actions { gap: 5px; }
.mobile-nav { display: none; }
.workspace-badge { background: var(--surface-strong); border-radius: 3px; color: var(--muted); font-size: 9px; font-weight: 600; padding: 4px 7px; white-space: nowrap; }
.project-switcher select { appearance: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2365716b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 2px center; border: 0; color: var(--ink); cursor: pointer; font-weight: 700; max-width: 300px; padding: 7px 22px 7px 0; }
.context-standard { border-left: 1px solid var(--border); color: var(--muted); font-size: 10px; max-width: 240px; overflow: hidden; padding-left: 13px; text-overflow: ellipsis; white-space: nowrap; }
.icon-button { align-items: center; background: transparent; border: 0; border-radius: 5px; cursor: pointer; display: inline-flex; flex: 0 0 auto; height: 36px; justify-content: center; padding: 0; position: relative; width: 36px; }
.icon-button:hover { background: var(--surface-strong); }
.icon-button.bordered { background: var(--surface); border: 1px solid var(--border); }
.icon-button svg { height: 17px; width: 17px; }
.notification-dot { background: var(--red); border: 2px solid #fff; border-radius: 50%; height: 8px; position: absolute; right: 7px; top: 6px; width: 8px; }
.user-button { align-items: center; background: transparent; border: 0; border-left: 1px solid var(--border); cursor: pointer; display: flex; gap: 9px; margin-left: 5px; padding: 0 0 0 16px; }
.avatar { align-items: center; background: #e2e8f7; border-radius: 50%; color: var(--primary); display: inline-flex; font-weight: 700; height: 34px; justify-content: center; width: 34px; }
.user-copy { min-width: 95px; text-align: left; }
.user-copy strong, .user-copy small { display: block; }
.user-copy strong { font-size: 11px; }
.user-copy small { color: var(--muted); font-size: 9px; margin-top: 2px; }
.user-button > svg { color: var(--muted); height: 14px; width: 14px; }
.account-control { position: relative; }
.user-switcher { align-items: center; background: transparent; border: 0; border-left: 1px solid var(--border); cursor: pointer; display: flex; gap: 9px; margin-left: 6px; min-height: 42px; padding: 0 3px 0 16px; position: relative; }
.user-switcher:hover { background: var(--surface-soft); }
.user-switcher > svg { color: var(--muted); height: 14px; pointer-events: none; width: 14px; }
.account-menu { background: var(--surface); border: 1px solid var(--border); box-shadow: 0 14px 32px rgba(24, 32, 29, .16); min-width: 270px; padding: 8px; position: absolute; right: 0; top: calc(100% + 8px); z-index: 90; }
.account-menu-head { border-bottom: 1px solid var(--border); padding: 9px 10px 11px; }
.account-menu-head strong, .account-menu-head span { display: block; }
.account-menu-head strong { font-size: 11px; }
.account-menu-head span { color: var(--muted); font-size: 9px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu-meta { display: grid; gap: 5px; padding: 10px; }
.account-menu-meta span { color: var(--muted); font-size: 9px; }
.account-preference { align-items: center; border-top: 1px solid var(--border); cursor: pointer; display: grid; gap: 9px; grid-template-columns: 16px minmax(0, 1fr) auto; min-height: 49px; padding: 5px 10px; }
.account-preference:hover { background: var(--surface-soft); }
.account-preference > svg { color: var(--muted); height: 15px; width: 15px; }
.account-preference > span strong, .account-preference > span small { display: block; }
.account-preference > span strong { color: var(--ink); font-size: 9px; }
.account-preference > span small { color: var(--muted); font-size: 8px; margin-top: 3px; }
.account-preference input { appearance: none; background: #cfd8d3; border: 0; border-radius: 10px; cursor: pointer; height: 18px; margin: 0; position: relative; transition: background .18s ease; width: 32px; }
.account-preference input::after { background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(24, 32, 29, .28); content: ""; height: 14px; left: 2px; position: absolute; top: 2px; transition: transform .18s ease; width: 14px; }
.account-preference input:checked { background: var(--primary); }
.account-preference input:checked::after { transform: translateX(14px); }
.account-preference input:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.account-menu > button { align-items: center; background: transparent; border: 0; border-top: 1px solid var(--border); color: var(--red); cursor: pointer; display: flex; font-size: 9px; gap: 8px; min-height: 38px; padding: 0 10px; width: 100%; }
.account-menu > button:hover { background: var(--red-soft); }
.account-menu > button svg { height: 14px; width: 14px; }

.logos-hidden .app-shell [data-brand-logo] { pointer-events: none; visibility: hidden; }

.view { display: none; min-height: calc(100vh - 68px); min-width: 0; padding: 38px 38px 54px; }
.view.is-visible { display: block; }
.page-heading { align-items: flex-end; display: flex; justify-content: space-between; margin: 0 auto 30px; max-width: 1320px; }
.page-heading > div { min-width: 0; }
.eyebrow { color: var(--primary); font-size: 9px; font-weight: 700; margin: 0 0 8px; text-transform: uppercase; }
.page-heading h1 { font-size: 27px; line-height: 1.25; margin-bottom: 7px; }
.page-heading p:last-child { color: var(--muted); font-size: 12px; margin: 0; }
.page-heading-actions { align-items: center; display: flex; gap: 10px; }
.primary-button, .secondary-button, .danger-button, .text-button { align-items: center; border-radius: 5px; cursor: pointer; display: inline-flex; font-weight: 600; gap: 7px; justify-content: center; min-height: 38px; padding: 0 15px; }
.primary-button { background: var(--primary); border: 1px solid var(--primary); color: #fff; }
.primary-button:hover:not(:disabled) { background: var(--primary-hover); }
.primary-button:disabled { background: #91bfd4; border-color: #91bfd4; color: #f5fcff; opacity: 1; }
.secondary-button:disabled { background: var(--surface-soft); color: var(--subtle); opacity: 1; }
.primary-button.is-unavailable { opacity: .64; }
.primary-button.is-unavailable:hover { background: var(--primary-hover); }
.secondary-button { background: var(--surface); border: 1px solid var(--border-strong); }
.secondary-button:hover:not(:disabled) { background: var(--surface-soft); }
.danger-button { background: var(--red); border: 1px solid var(--red); color: #fff; }
.danger-button:hover:not(:disabled) { background: #8d302c; }
.text-button { background: transparent; border: 0; color: var(--primary); min-height: auto; padding: 4px 0; }
.primary-button svg, .secondary-button svg, .danger-button svg { height: 15px; width: 15px; }

.command-center { align-items: center; border-bottom: 1px solid var(--border); border-top: 1px solid var(--border); display: grid; gap: 16px 24px; grid-template-columns: auto minmax(320px, 1fr); margin: 0 auto 28px; max-width: 1320px; padding: 17px 0; }
.command-title { align-items: center; display: flex; gap: 11px; min-width: 178px; }
.command-title > span { align-items: center; background: var(--primary-soft); border-radius: 4px; color: var(--primary); display: flex; height: 38px; justify-content: center; width: 38px; }
.command-title svg { height: 18px; width: 18px; }
.command-title p { color: var(--muted); font-size: 8px; margin: 0 0 3px; text-transform: uppercase; }
.command-title h2 { font-size: 15px; margin: 0; }
.command-input { align-items: stretch; display: grid; gap: 9px; grid-template-columns: minmax(0, 1fr) auto; }
.command-input textarea { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 5px; color: var(--ink); line-height: 1.5; min-height: 52px; padding: 9px 11px; resize: none; width: 100%; }
.command-template-bar { align-items: center; display: flex; gap: 8px; grid-column: 2; min-width: 0; }
.command-template-label { color: var(--muted); flex: 0 0 auto; font-size: 8px; font-weight: 700; text-transform: uppercase; }
.quick-template-list { display: flex; flex: 1; flex-wrap: wrap; gap: 6px; min-width: 0; }
.quick-template { align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; color: var(--muted); cursor: pointer; display: inline-flex; font-size: 8px; gap: 5px; min-height: 28px; padding: 0 8px; }
.quick-template:hover { background: var(--primary-soft); border-color: #a9c7b7; color: var(--primary); }
.quick-template svg { flex: 0 0 auto; height: 12px; width: 12px; }
.quick-template span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.template-library-link { flex: 0 0 auto; font-size: 9px; gap: 4px; white-space: nowrap; }
.template-library-link svg { height: 12px; width: 12px; }

.intake-launch { align-items: center; border-bottom: 1px solid var(--border); border-top: 1px solid var(--border); display: grid; gap: 18px; grid-template-columns: 46px minmax(230px, 1.1fr) minmax(300px, 1fr) auto; margin: 0 auto 28px; max-width: 1320px; padding: 20px 0; }
.intake-launch-icon { align-items: center; background: var(--primary-soft); border-radius: 5px; color: var(--primary); display: flex; height: 46px; justify-content: center; width: 46px; }
.intake-launch-icon svg { height: 21px; width: 21px; }
.intake-launch-copy { min-width: 0; }
.intake-launch-copy p { color: var(--primary); font-size: 8px; font-weight: 700; margin: 0 0 4px; text-transform: uppercase; }
.intake-launch-copy h2 { font-size: 16px; margin: 0 0 5px; }
.intake-launch-copy > span { color: var(--muted); display: block; font-size: 9px; line-height: 1.55; }
.intake-launch-context { display: grid; grid-template-columns: 1fr 1fr; min-width: 0; }
.intake-launch-context > div { border-left: 1px solid var(--border); min-width: 0; padding: 3px 16px; }
.intake-launch-context span, .intake-launch-context strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.intake-launch-context span { color: var(--subtle); font-size: 8px; margin-bottom: 5px; }
.intake-launch-context strong { font-size: 10px; }
.intake-launch-actions { align-items: center; display: flex; gap: 9px; justify-content: flex-end; }
.intake-launch-actions .text-button { font-size: 9px; white-space: nowrap; }

.metric-strip { border-bottom: 1px solid var(--border); border-top: 1px solid var(--border); display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 auto 32px; max-width: 1320px; }
.metric-strip > div { min-width: 0; padding: 20px 22px; }
.metric-strip > div + div { border-left: 1px solid var(--border); }
.metric-strip span, .metric-strip small { color: var(--muted); display: block; }
.metric-strip span { font-size: 10px; }
.metric-strip strong { display: block; font-size: 25px; margin: 5px 0 4px; }
.metric-strip small { font-size: 9px; }

.efficiency-panel { background: var(--surface); border: 1px solid var(--border); margin: 0 auto 28px; max-width: 1320px; }
.efficiency-head { align-items: center; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; min-height: 72px; padding: 14px 20px; }
.efficiency-title { align-items: center; display: flex; gap: 11px; min-width: 0; }
.efficiency-title-icon { align-items: center; background: var(--cyan-soft); border-radius: 4px; color: var(--cyan); display: flex; flex: 0 0 auto; height: 38px; justify-content: center; width: 38px; }
.efficiency-title-icon svg { height: 18px; width: 18px; }
.efficiency-title p { color: var(--subtle); font-size: 8px; font-weight: 700; margin: 0 0 4px; text-transform: uppercase; }
.efficiency-title h2 { font-size: 15px; margin: 0; }
.efficiency-scope { align-items: center; background: var(--surface-soft); border: 1px solid var(--border); border-radius: 4px; color: var(--muted); display: flex; font-size: 9px; gap: 6px; max-width: 42%; min-height: 30px; padding: 0 9px; }
.efficiency-scope svg { flex: 0 0 auto; height: 13px; width: 13px; }
.efficiency-scope span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.efficiency-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.efficiency-metrics > div { min-width: 0; padding: 19px 20px 17px; }
.efficiency-metrics > div + div { border-left: 1px solid var(--border); }
.efficiency-metrics span, .efficiency-metrics small { color: var(--muted); display: block; }
.efficiency-metrics span { font-size: 9px; }
.efficiency-metrics strong { display: block; font-size: 22px; margin: 7px 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.efficiency-metrics small { font-size: 8px; }
.efficiency-metrics .efficiency-primary { background: #16202a; }
.efficiency-metrics .efficiency-primary span, .efficiency-metrics .efficiency-primary small { color: #94a4b1; }
.efficiency-metrics .efficiency-primary strong { color: #74d0b1; }
.efficiency-foot { align-items: flex-start; border-top: 1px solid var(--border); display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) auto; min-height: 43px; padding: 11px 20px; }
.efficiency-foot > p { color: var(--muted); font-size: 9px; line-height: 1.55; margin: 2px 0 0; }
.efficiency-method { position: relative; }
.efficiency-method summary { align-items: center; color: var(--primary); cursor: pointer; display: flex; font-size: 9px; font-weight: 600; gap: 5px; list-style: none; min-height: 20px; white-space: nowrap; }
.efficiency-method summary::-webkit-details-marker { display: none; }
.efficiency-method summary svg { height: 13px; width: 13px; }
.efficiency-method summary svg:last-child { transition: transform .18s ease; }
.efficiency-method[open] summary svg:last-child { transform: rotate(180deg); }
.efficiency-method > div { border-left: 2px solid var(--cyan); color: var(--muted); font-size: 9px; line-height: 1.65; margin-top: 10px; max-width: 760px; padding: 2px 0 2px 12px; }
.efficiency-method p { margin: 0 0 6px; }
.efficiency-method p:last-of-type { margin-bottom: 8px; }
.efficiency-method a { align-items: center; color: var(--primary); display: inline-flex; gap: 5px; text-decoration: none; }
.efficiency-method a:hover { text-decoration: underline; }
.efficiency-method a svg { height: 12px; width: 12px; }
.efficiency-method[open] { grid-column: 1 / -1; width: 100%; }
.efficiency-method[open] > div { max-width: none; }
.active-run, .batch-run, .task-section, .management-overview, .management-section, .active-standard-band, .standard-library { margin-left: auto; margin-right: auto; max-width: 1320px; }
.active-run { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 30px; padding: 18px 21px 21px; }
.batch-run { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 30px; }
.batch-run-head { align-items: center; background: var(--surface-soft); border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; padding: 13px 16px; }
.batch-run-head p { color: var(--primary); font-size: 8px; font-weight: 700; margin: 0 0 3px; text-transform: uppercase; }
.batch-run-head h2 { font-size: 13px; margin: 0; }
.batch-run-body { align-items: center; display: grid; gap: 16px; grid-template-columns: minmax(190px, .7fr) minmax(220px, 1fr) 44px auto; padding: 15px 16px; }
.batch-run-summary strong, .batch-run-summary span { display: block; }
.batch-run-summary strong { font-size: 11px; }
.batch-run-summary span { color: var(--muted); font-size: 9px; margin-top: 4px; }
.batch-run-summary .batch-run-error { color: var(--red); line-height: 1.45; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.batch-progress { background: var(--border); height: 5px; overflow: hidden; }
.batch-progress > span { background: var(--primary); display: block; height: 100%; transition: width .25s ease; }
.batch-run.is-failed .batch-progress > span { background: var(--red); }
.batch-run-body > strong { font-size: 10px; text-align: right; }
.batch-run-actions { display: flex; gap: 8px; justify-content: flex-end; }
.section-title-row, .management-head { align-items: center; display: flex; justify-content: space-between; }
.section-title-row > div:first-child { align-items: baseline; display: flex; gap: 10px; }
.section-title-row h2, .management-head h2 { font-size: 15px; margin-bottom: 0; }
.section-meta { color: var(--muted); font-size: 10px; }
.run-row { align-items: center; display: flex; gap: 15px; margin-top: 16px; }
.file-icon { align-items: center; background: var(--cyan-soft); border-radius: 4px; color: var(--cyan); display: flex; height: 42px; justify-content: center; width: 42px; }
.file-icon svg { height: 19px; width: 19px; }
.run-main { flex: 1; min-width: 0; }
.run-copy { display: flex; justify-content: space-between; margin-bottom: 9px; }
.run-copy span, .eta { color: var(--muted); font-size: 10px; }
.stage-row { color: var(--subtle); display: grid; font-size: 9px; grid-template-columns: repeat(4, 1fr); margin-top: 7px; }
.stage-row .done { color: var(--primary); }
.stage-row .current { color: var(--cyan); font-weight: 700; }
.eta { min-width: 58px; text-align: right; }
.task-list-head { margin-bottom: 14px; }
.filter-actions { align-items: center; display: flex; gap: 8px; }
.segmented { align-items: center; background: var(--surface-strong); border-radius: 5px; display: inline-flex; padding: 3px; }
.segmented button { background: transparent; border: 0; border-radius: 4px; color: var(--muted); cursor: pointer; min-height: 30px; padding: 0 11px; }
.segmented button.is-selected { background: var(--surface); box-shadow: 0 1px 3px rgba(24,33,28,.08); color: var(--ink); font-weight: 600; }
.search-row { align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 5px; display: flex; gap: 8px; margin: 0 0 10px; max-width: 430px; padding: 0 11px; }
.search-row input { border: 0; height: 38px; min-width: 0; outline: 0; width: 100%; }
.search-row svg { color: var(--muted); height: 15px; width: 15px; }
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.task-table, .management-table { border-collapse: collapse; table-layout: fixed; width: 100%; }
.task-table th, .management-table th { background: var(--surface-soft); color: var(--muted); font-size: 9px; font-weight: 600; padding: 11px 16px; text-align: left; text-transform: uppercase; }
.task-table td, .management-table td { border-top: 1px solid var(--border); padding: 14px 16px; vertical-align: middle; }
.task-table th:first-child { width: 29%; }
.task-table th:nth-child(2) { width: 17%; }
.task-table th:nth-child(3) { width: 12%; }
.task-table th:nth-child(4) { width: 18%; }
.task-table th:nth-child(5) { width: 14%; }
.task-table th:last-child { width: 10%; }
.drawing-cell, .project-name-cell { align-items: center; display: flex; gap: 11px; min-width: 0; }
.drawing-thumb { align-items: center; background: #edf1ef; border: 1px solid var(--border); border-radius: 4px; display: flex; flex: 0 0 auto; height: 40px; justify-content: center; width: 48px; }
.drawing-thumb svg { color: #566271; height: 18px; width: 18px; }
.drawing-copy, .project-name-cell > span:last-child { min-width: 0; }
.drawing-copy strong, .drawing-copy span, .project-name-cell strong, .project-name-cell small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawing-copy strong, .project-name-cell strong { font-size: 11px; }
.drawing-copy span, .project-name-cell small { color: var(--muted); font-size: 9px; margin-top: 4px; }
.task-type, .time-cell { color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-chip { align-items: center; border-radius: 12px; display: inline-flex; font-size: 9px; font-style: normal; font-weight: 600; gap: 4px; padding: 4px 8px; white-space: nowrap; }
.status-chip svg { height: 11px; width: 11px; }
.status-chip.queued, .status-chip.processing { background: var(--cyan-soft); color: var(--cyan); }
.status-chip.pausing { background: var(--amber-soft); color: var(--amber); }
.status-chip.paused { background: var(--surface-strong); color: #50616c; }
.status-chip.cancelling { background: var(--amber-soft); color: #8b5a12; }
.status-chip.cancelled { background: #f1f3f5; color: #59636d; }
.status-chip.completed, .status-chip.success { background: var(--primary-soft); color: var(--primary); }
.status-chip.failed { background: var(--red-soft); color: var(--red); }
.status-chip.deleted { background: var(--amber-soft); color: var(--amber); }
.status-chip.neutral { background: var(--surface-strong); color: var(--muted); }
.quality-cell { color: var(--muted); font-size: 10px; }
.quality-cell strong { color: var(--ink); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quality-cell .risk { color: var(--red); }
.real-badge { background: var(--primary-soft); border-radius: 3px; color: var(--primary); font-size: 8px; font-style: normal; font-weight: 700; margin-left: 4px; padding: 1px 4px; }
.task-table tr.is-failed { background: #fffafa; }
.task-table tr.is-deleted { background: #faf9f6; color: var(--muted); }
.task-table tr.is-deleted .drawing-thumb { filter: grayscale(1); opacity: .7; }
.task-table tr.is-deleted .real-badge { background: var(--surface-strong); color: var(--muted); }
.row-action { background: transparent; border: 0; color: var(--primary); cursor: pointer; font-size: 10px; font-weight: 600; padding: 5px; }
.table-progress { background: var(--border); border-radius: 2px; height: 4px; margin-top: 5px; overflow: hidden; width: 90px; }
.table-progress span { background: var(--cyan); display: block; height: 100%; }
.empty-row { color: var(--muted); padding: 42px !important; text-align: center; }

.management-overview { border-bottom: 1px solid var(--border); border-top: 1px solid var(--border); display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 31px; }
.management-overview > div { align-items: center; display: grid; gap: 4px 12px; grid-template-columns: 36px 1fr auto; padding: 17px 20px; }
.management-overview > div + div { border-left: 1px solid var(--border); }
.overview-icon { align-items: center; background: var(--blue-soft); border-radius: 4px; color: var(--blue); display: flex; grid-row: 1 / 3; height: 36px; justify-content: center; width: 36px; }
.management-overview > div:nth-child(2) .overview-icon { background: var(--primary-soft); color: var(--primary); }
.management-overview > div:nth-child(3) .overview-icon { background: var(--amber-soft); color: var(--amber); }
.overview-icon svg { height: 17px; width: 17px; }
.management-overview span:not(.overview-icon) { color: var(--muted); font-size: 9px; }
.management-overview strong { font-size: 22px; grid-row: 1 / 3; }
.management-head { margin-bottom: 14px; }
.management-head h2 { margin-bottom: 5px; }
.management-head p { color: var(--muted); font-size: 10px; margin: 0; }
.management-head-actions { align-items: center; display: flex; gap: 14px; }
.project-table th:first-child { width: 30%; }
.project-table th:nth-child(2) { width: 12%; }
.project-table th:nth-child(3) { width: 25%; }
.project-table th:nth-child(4) { width: 11%; }
.project-table th:nth-child(5) { width: 12%; }
.project-table th:last-child { width: 10%; }
.management-table tr.is-current { background: #f7fbf9; }
.management-table tr.is-archived { background: #fafbfa; color: var(--muted); }
.management-table tr.is-archived .project-avatar { filter: grayscale(1); opacity: .72; }
.project-avatar { align-items: center; background: var(--blue-soft); border-radius: 4px; color: var(--blue); display: flex; flex: 0 0 auto; font-size: 12px; font-weight: 700; height: 38px; justify-content: center; width: 38px; }
.code-tag { background: var(--surface-strong); border-radius: 3px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; padding: 4px 6px; }
.inline-select { background: var(--surface); border: 1px solid var(--border); border-radius: 4px; color: var(--ink); height: 34px; max-width: 100%; padding: 0 8px; width: 100%; }
.cell-subcopy { color: var(--muted); font-size: 9px; }
.current-check { align-items: center; background: var(--primary-soft); border-radius: 50%; color: var(--primary); display: inline-flex; height: 24px; justify-content: center; width: 24px; }
.current-check svg { height: 13px; width: 13px; }
.row-action-group, .card-actions { align-items: center; display: flex; gap: 8px; justify-content: flex-end; }
.task-actions { gap: 5px; }
.icon-button.compact { height: 28px; width: 28px; }
.icon-button.compact svg { height: 14px; width: 14px; }
.danger-ghost { color: var(--subtle); }
.danger-ghost:hover:not(:disabled) { background: var(--red-soft); color: var(--red); }
.tooltip-anchor { display: inline-flex; position: relative; }
.tooltip-anchor > button:disabled { pointer-events: none; }

.month-badge, .permission-badge { align-items: center; background: var(--surface-strong); border-radius: 4px; color: var(--muted); display: inline-flex; font-size: 10px; font-weight: 600; gap: 6px; padding: 7px 10px; }
.permission-badge svg { height: 13px; width: 13px; }
.permission-badge.can-manage { background: var(--primary-soft); color: var(--primary); }
.member-overview { grid-template-columns: repeat(4, 1fr); }
.management-table-wrap { max-width: 100%; overflow-x: auto; }
.member-table th { white-space: nowrap; }
.member-table th:first-child { width: 22%; }
.member-table th:nth-child(2) { width: 13%; }
.member-table th:nth-child(3) { width: 22%; }
.member-table th:nth-child(4) { width: 14%; }
.member-table th:nth-child(5) { width: 9%; }
.member-table th:nth-child(6) { width: 15%; }
.member-table th:last-child { width: 5%; }
.member-table th:last-child, .member-table td:last-child { text-align: center; }
.member-table td:last-child [data-tooltip]::after { left: auto; right: 0; transform: none; }
.member-table tr.is-current-user { background: #f7fbf9; }
.member-cell { align-items: center; display: flex; gap: 11px; min-width: 0; }
.member-cell > span:last-child { min-width: 0; }
.platform-accounts-modal { display: flex; flex-direction: column; height: min(780px, calc(100vh - 48px)); overflow: hidden; width: min(1440px, calc(100vw - 48px)); }
.platform-accounts-modal > .modal-head { align-items: center; flex: 0 0 auto; }
.modal-head-actions { align-items: center; display: flex; gap: 9px; }
.platform-account-summary { background: var(--surface-soft); border-bottom: 1px solid var(--border); display: grid; flex: 0 0 auto; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.platform-account-summary > div { border-left: 1px solid var(--border); padding: 14px 18px; }
.platform-account-summary > div:first-child { border-left: 0; }
.platform-account-summary span, .platform-account-summary strong { display: block; }
.platform-account-summary span { color: var(--muted); font-size: 8px; margin-bottom: 5px; }
.platform-account-summary strong { font-size: 18px; }
.platform-account-body { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 22px 22px; }
.platform-account-table-wrap { overflow-x: auto; }
.platform-account-table { min-width: 1320px; table-layout: auto; }
.platform-account-table th:first-child { width: 13%; }
.platform-account-table th:nth-child(2) { width: 22%; }
.platform-account-table th:nth-child(3) { width: 17%; }
.platform-account-table th:nth-child(4) { width: 14%; }
.platform-account-table th:nth-child(5) { width: 11%; }
.platform-account-table th:nth-child(6) { width: 6%; }
.platform-account-table th:nth-child(7) { width: 12%; }
.platform-account-table th:last-child { width: 5%; }
.platform-account-table th:last-child, .platform-account-table td:last-child { text-align: center; }
.platform-tenant-cell > strong, .platform-tenant-cell > small { display: block; }
.platform-tenant-cell > strong { font-size: 10px; line-height: 1.45; }
.platform-tenant-cell > small { color: var(--muted); font-size: 8px; margin-top: 4px; overflow-wrap: anywhere; }
.current-tenant-label, .trial-tenant-label { border-radius: 3px; display: inline-flex; font-size: 8px; font-weight: 600; margin-top: 7px; padding: 3px 5px; }
.current-tenant-label { background: var(--primary-soft); color: var(--primary); }
.trial-tenant-label { background: var(--cyan-soft); color: var(--cyan); }
.platform-account-users { display: grid; gap: 8px; }
.platform-account-user { align-items: center; display: grid; gap: 8px; grid-template-columns: 30px minmax(0, 1fr) 30px; }
.platform-account-user .member-avatar { height: 30px; width: 30px; }
.platform-account-user > div { min-width: 0; }
.platform-account-user > div > strong, .platform-account-user > div > small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.platform-account-user strong { font-size: 9px; }
.platform-account-user small { color: var(--muted); font-size: 8px; margin-top: 3px; }
.platform-account-edit { align-self: start; }
.platform-account-actions { display: grid; gap: 6px; align-self: start; }
.platform-login-empty { color: var(--subtle); display: block; font-size: 7px; margin-top: 6px; }
.platform-login-history { margin-top: 6px; }
.platform-login-history summary { align-items: center; color: var(--primary); cursor: pointer; display: grid; font-size: 7px; gap: 4px; grid-template-columns: 11px minmax(0, 1fr) 10px; list-style: none; }
.platform-login-history summary::-webkit-details-marker { display: none; }
.platform-login-history summary span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.platform-login-history summary svg { height: 10px; width: 10px; }
.platform-login-history summary svg:last-child { transition: transform 160ms ease; }
.platform-login-history[open] summary svg:last-child { transform: rotate(180deg); }
.platform-login-events { border-left: 1px solid var(--border); display: grid; gap: 8px; margin: 7px 0 0 5px; padding-left: 10px; }
.platform-login-event strong, .platform-login-event span, .platform-login-event small { display: block; overflow-wrap: anywhere; white-space: normal; }
.platform-login-event strong { color: var(--ink); font-family: "SFMono-Regular", Consolas, monospace; font-size: 8px; }
.platform-login-event span { color: var(--muted); font-size: 7px; line-height: 1.45; margin-top: 2px; }
.platform-login-event small { color: var(--subtle); font-size: 7px; margin-top: 2px; }
.platform-module-account { display: grid; gap: 5px; min-width: 210px; }
.platform-module-account > small { color: var(--subtle); font-size: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.platform-module-access { flex-wrap: nowrap; }
.platform-module-access label span { min-width: 42px; }
.platform-expiry-editor { display: grid; gap: 7px; min-width: 168px; }
.platform-expiry-editor > div { align-items: center; display: grid; gap: 5px; grid-template-columns: minmax(126px, 1fr) 30px; }
.platform-expiry-editor input { min-width: 0; }
.platform-quota-editor { min-width: 126px; }
.platform-account-note { align-items: center; color: var(--muted); display: flex; font-size: 8px; gap: 7px; margin: 11px 0 0; }
.platform-account-note svg { color: var(--primary); flex: 0 0 auto; height: 13px; width: 13px; }
.nested-modal-backdrop { z-index: 130; }

.integration-status-band { align-items: center; border-bottom: 1px solid var(--border); border-top: 1px solid var(--border); display: grid; gap: 20px; grid-template-columns: 46px minmax(220px, 1.15fr) minmax(360px, 1.5fr) auto; margin: 0 auto 26px; max-width: 1320px; padding: 20px 22px; }
.integration-status-icon { align-items: center; background: var(--cyan-soft); border-radius: 5px; color: var(--cyan); display: flex; height: 46px; justify-content: center; width: 46px; }
.integration-status-icon svg { height: 21px; width: 21px; }
.integration-status-copy { min-width: 0; }
.integration-status-copy p { color: var(--cyan); font-size: 8px; font-weight: 700; margin: 0 0 4px; text-transform: uppercase; }
.integration-status-copy h2 { font-size: 15px; line-height: 1.3; margin: 0 0 4px; }
.integration-status-copy > span { color: var(--muted); display: block; font-size: 9px; line-height: 1.55; }
.integration-status-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); min-width: 0; }
.integration-status-facts > div { border-left: 1px solid var(--border); min-width: 0; padding: 3px 16px; }
.integration-status-facts span, .integration-status-facts strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.integration-status-facts span { color: var(--subtle); font-size: 8px; margin-bottom: 5px; }
.integration-status-facts strong { font-size: 10px; }

.integration-console { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin: 0 auto; max-width: 960px; overflow: hidden; }
.integration-console > header { align-items: flex-start; background: var(--surface-soft); border-bottom: 1px solid var(--border); display: flex; gap: 24px; justify-content: space-between; padding: 18px 22px; }
.integration-console > header h2 { font-size: 14px; margin: 0 0 5px; }
.integration-console > header p { color: var(--muted); font-size: 9px; margin: 0; }
.integration-console > header > span { color: var(--subtle); flex: 0 0 auto; font-size: 8px; padding-top: 3px; }
.integration-console form { padding: 22px; }
.integration-form-grid { display: grid; gap: 17px 14px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.integration-form-grid label { min-width: 0; }
.integration-form-grid .span-two { grid-column: 1 / -1; }
.integration-form-grid .field-label { color: var(--muted); display: block; font-size: 9px; font-weight: 600; margin-bottom: 6px; }
.integration-form-grid label > input, .secret-input { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 4px; width: 100%; }
.integration-form-grid label > input { height: 40px; padding: 0 11px; }
.integration-form-grid label > input::placeholder, .secret-input input::placeholder { color: var(--subtle); }
.integration-form-grid label > small { color: var(--subtle); display: block; font-size: 8px; line-height: 1.5; margin-top: 6px; }
.secret-input { align-items: center; display: grid; grid-template-columns: minmax(0, 1fr) 38px; }
.secret-input:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(47, 101, 112, .12); }
.secret-input input { background: transparent; border: 0; height: 38px; min-width: 0; outline: 0; padding: 0 11px; width: 100%; }
.secret-input .icon-button { color: var(--muted); height: 34px; width: 34px; }
.integration-enable { align-items: flex-start; background: var(--surface-soft); border-left: 3px solid var(--cyan); cursor: pointer; display: flex; gap: 11px; padding: 12px 14px; }
.integration-form-grid .integration-enable > input { accent-color: var(--primary); flex: 0 0 15px; height: 15px; margin: 2px 0 0; padding: 0; width: 15px; }
.integration-enable strong, .integration-enable small { display: block; }
.integration-enable strong { font-size: 10px; }
.integration-enable small { color: var(--muted); font-size: 8px; line-height: 1.5; margin-top: 4px; }
.integration-notice { align-items: flex-start; background: var(--red-soft); border-left: 3px solid var(--red); color: var(--red); display: grid; gap: 10px; grid-template-columns: 17px minmax(0, 1fr); margin-top: 17px; padding: 11px 13px; }
.integration-notice > svg { height: 16px; margin-top: 1px; width: 16px; }
.integration-notice strong, .integration-notice span { display: block; }
.integration-notice strong { font-size: 9px; }
.integration-notice span { font-size: 9px; line-height: 1.55; margin-top: 3px; }
.integration-notice.is-warning { background: var(--amber-soft); border-left-color: var(--amber); color: var(--amber); }
.semantic-api-error { margin-top: 10px; }
.integration-actions { align-items: center; border-top: 1px solid var(--border); display: grid; gap: 12px; grid-template-columns: auto minmax(0, 1fr) auto; margin-top: 22px; padding-top: 18px; }
.integration-actions > .danger-ghost { grid-column: 1; }
.integration-actions > span { color: var(--subtle); font-size: 8px; grid-column: 2; text-align: right; }
.integration-actions > .primary-button { grid-column: 3; }
.member-cell strong, .member-cell small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-cell strong { font-size: 11px; }
.member-cell small { color: var(--muted); font-size: 9px; margin-top: 4px; }
.member-avatar { align-items: center; background: var(--cyan-soft); border-radius: 4px; color: var(--cyan); display: flex; flex: 0 0 auto; font-size: 12px; font-weight: 700; height: 38px; justify-content: center; width: 38px; }
.role-chip { background: var(--surface-strong); border-radius: 3px; color: var(--muted); display: inline-flex; font-size: 9px; font-weight: 600; padding: 4px 7px; }
.role-chip.admin { background: var(--blue-soft); color: var(--blue); }
.member-role-stack { align-items: flex-start; display: flex; flex-direction: column; gap: 5px; }
.member-role-stack .status-chip { font-size: 8px; padding: 3px 6px; }
.current-account-label { align-items: center; color: var(--subtle); display: inline-flex; height: 28px; justify-content: center; position: relative; width: 28px; }
.current-account-label svg { height: 14px; width: 14px; }
.member-usage { max-width: 210px; }
.member-usage > span { color: var(--muted); display: block; font-size: 9px; margin-bottom: 7px; }
.member-usage > span strong { color: var(--ink); font-size: 11px; }
.member-usage-track { background: var(--surface-strong); border-radius: 2px; height: 5px; overflow: hidden; }
.member-usage-track > span { background: var(--cyan); display: block; height: 100%; }
.member-usage-track.is-full > span { background: var(--red); }
.quota-exhausted { color: var(--red); }
.quota-editor { align-items: center; display: grid; gap: 6px; grid-template-columns: minmax(70px, 1fr) auto; max-width: 140px; min-width: 0; }
.quota-editor input { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 4px; height: 34px; min-width: 0; padding: 0 8px; width: 100%; }
.quota-readonly { font-size: 11px; }
.form-note { align-items: flex-start; background: var(--surface-soft); color: var(--muted); display: flex; font-size: 9px; gap: 8px; line-height: 1.5; margin: 0; padding: 10px 11px; }
.form-note svg { flex: 0 0 auto; height: 14px; margin-top: 1px; width: 14px; }
.is-error { color: var(--red) !important; }

.active-standard-band { align-items: stretch; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); display: grid; grid-template-columns: minmax(260px, .9fr) minmax(410px, 1.35fr) auto; margin-bottom: 32px; min-width: 0; overflow: hidden; }
.active-standard-copy { border-right: 1px solid var(--border); padding: 23px 25px; }
.active-standard-copy > p { color: var(--muted); font-size: 9px; margin: 17px 0 5px; text-transform: uppercase; }
.active-standard-copy h2 { font-size: 18px; margin-bottom: 6px; overflow-wrap: anywhere; }
.active-standard-copy > span:last-child { color: var(--muted); font-size: 10px; line-height: 1.55; }
.active-standard-facts { align-items: center; display: grid; grid-template-columns: 1fr 1fr; padding: 16px 24px; }
.active-standard-facts > div { padding: 10px 14px; }
.active-standard-facts span, .active-standard-facts strong { display: block; }
.active-standard-facts span { color: var(--muted); font-size: 9px; margin-bottom: 5px; }
.active-standard-facts strong { font-size: 11px; }
.active-standard-band > button { align-self: center; margin-right: 24px; }
.standard-grid { display: grid; gap: 13px; grid-template-columns: repeat(3, minmax(0, 1fr)); min-width: 0; }
.standard-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; min-height: 320px; min-width: 0; padding: 19px; }
.standard-card.is-active { border-color: #91b4a2; box-shadow: inset 0 3px 0 var(--primary); }
.standard-card > header { align-items: center; display: flex; justify-content: space-between; }
.standard-symbol { align-items: center; background: var(--amber-soft); border-radius: 4px; color: var(--amber); display: flex; height: 34px; justify-content: center; width: 34px; }
.standard-symbol svg { height: 17px; width: 17px; }
.standard-card-copy { margin-top: 18px; }
.standard-card-copy > span { color: var(--primary); font-size: 9px; font-weight: 700; }
.standard-card-copy h3 { font-size: 15px; margin: 5px 0 7px; overflow-wrap: anywhere; }
.standard-card-copy p { color: var(--muted); font-size: 10px; line-height: 1.55; min-height: 31px; }
.standard-capability-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0 10px; }
.standard-capability-tags span { background: var(--surface-soft); border: 1px solid var(--border); color: var(--muted); font-size: 8px; padding: 3px 6px; }
.standard-card dl { border-top: 1px solid var(--border); margin: 5px 0 0; padding-top: 10px; }
.standard-card dl > div { align-items: center; display: flex; justify-content: space-between; padding: 4px 0; }
.standard-card dt { color: var(--muted); font-size: 9px; }
.standard-card dd { font-size: 9px; font-weight: 600; margin: 0; max-width: 72%; overflow: hidden; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.standard-card > footer { align-items: center; border-top: 1px solid var(--border); display: flex; justify-content: space-between; margin-top: auto; padding-top: 13px; }
.standard-card > footer > span { color: var(--muted); font-size: 9px; }
.standard-card > footer strong { color: var(--primary); font-size: 9px; white-space: nowrap; }
.standard-card-edit { gap: 4px; }
.standard-card-edit svg { height: 13px; width: 13px; }
.standard-edit-impact { margin: 0; }

.result-workspace { height: calc(100vh - 68px); min-height: 650px; padding: 0; }
.result-workspace.is-visible { display: flex; flex-direction: column; }
.workspace-head { align-items: center; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; min-height: 72px; padding: 10px 20px; }
.workspace-title-group { align-items: center; display: flex; gap: 12px; min-width: 0; }
.workspace-title-group h1 { font-size: 16px; margin: 3px 0 0; }
.breadcrumb { color: var(--muted); font-size: 9px; }
.workspace-status { align-items: center; color: var(--muted); display: flex; font-size: 9px; gap: 12px; }
.workspace-toolbar { align-items: center; background: var(--surface); border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 1fr auto 1fr; min-height: 49px; padding: 6px 16px; }
.toolbar-center, .toolbar-right { align-items: center; display: flex; }
.toolbar-center { gap: 2px; }
.toolbar-center span { color: var(--muted); font-size: 9px; text-align: center; width: 47px; }
.toolbar-right { justify-content: flex-end; }
.workspace-body { display: grid; flex: 1; grid-template-columns: minmax(0, 1fr) 390px; min-height: 0; }
.canvas-area { background-color: #d8ddda; background-image: linear-gradient(#cbd2ce 1px, transparent 1px), linear-gradient(90deg, #cbd2ce 1px, transparent 1px); background-size: 24px 24px; overflow: auto; position: relative; }
.canvas-stage { background: #fff; box-shadow: 0 5px 20px rgba(27,40,33,.15); left: 50%; margin: 42px 0; position: relative; transform: translateX(-50%) scale(1); transform-origin: top center; transition: transform .2s ease; width: min(94%, 1120px); }
.canvas-stage img { display: block; height: auto; width: 100%; }
.result-panel { background: var(--surface); border-left: 1px solid var(--border); min-height: 0; overflow-y: auto; }
.result-panel-head { align-items: center; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; padding: 20px; }
.result-panel-head h2 { font-size: 14px; margin-bottom: 5px; }
.result-panel-head p { color: var(--muted); font-size: 9px; margin: 0; max-width: 235px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.supplement-panel { border-bottom: 1px solid var(--border); padding: 16px 18px; }
.supplement-head { align-items: flex-start; display: flex; justify-content: space-between; }
.supplement-head span:first-child { color: var(--primary); display: block; font-size: 8px; font-weight: 700; text-transform: uppercase; }
.supplement-head h3 { font-size: 12px; margin: 4px 0 0; }
.memory-chip { background: var(--surface-soft); border: 1px solid var(--border); color: var(--muted); font-size: 8px; padding: 5px 7px; }
.conversation-list { display: grid; gap: 10px; margin: 14px 0; max-height: 245px; overflow-y: auto; }
.conversation-empty { align-items: center; color: var(--muted); display: flex; font-size: 9px; gap: 7px; min-height: 42px; }
.conversation-empty svg { height: 15px; width: 15px; }
.conversation-turn { display: grid; gap: 6px; }
.conversation-user { background: #eef4f1; border-left: 2px solid var(--primary); font-size: 9px; line-height: 1.55; margin-left: 26px; padding: 8px 9px; }
.conversation-agent { align-items: flex-start; display: grid; gap: 7px; grid-template-columns: 20px 1fr; }
.conversation-agent > span:first-child { align-items: center; background: var(--primary); color: #fff; display: flex; height: 20px; justify-content: center; width: 20px; }
.conversation-agent > span:first-child svg { height: 11px; width: 11px; }
.conversation-agent strong { display: block; font-size: 9px; }
.conversation-agent small { color: var(--muted); display: block; font-size: 8px; margin-top: 3px; }
.conversation-changes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.conversation-changes span { background: var(--surface-soft); border: 1px solid var(--border); color: var(--muted); font-size: 8px; padding: 3px 5px; }
.conversation-turn.is-failed .conversation-agent > span:first-child { background: var(--red); }
.conversation-warning { color: var(--red); display: block; font-size: 8px; line-height: 1.5; margin-top: 5px; }
.supplement-form textarea { background: var(--surface-soft); border: 1px solid var(--border-strong); border-radius: 4px; line-height: 1.5; min-height: 64px; padding: 8px 9px; resize: vertical; width: 100%; }
.supplement-form > div { align-items: center; display: flex; justify-content: space-between; margin-top: 8px; }
.supplement-form > div > span { color: var(--muted); font-size: 8px; }
.supplement-form .primary-button { min-height: 32px; padding: 0 10px; }
.supplement-notice { align-items: flex-start; background: var(--red-soft); border-left: 3px solid var(--red); color: var(--red); display: flex; font-size: 10px; gap: 8px; line-height: 1.55; margin: 10px 0; padding: 9px 10px; }
.supplement-notice svg { flex: 0 0 auto; height: 15px; margin-top: 1px; width: 15px; }
.validation-mark { align-items: center; background: var(--primary-soft); border-radius: 50%; color: var(--primary); display: flex; height: 34px; justify-content: center; width: 34px; }
.validation-mark svg { height: 17px; width: 17px; }
.result-key-metrics { border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 1fr 1fr; }
.result-key-metrics > div { padding: 17px 20px; }
.result-key-metrics > div + div { border-left: 1px solid var(--border); }
.result-key-metrics span, .result-key-metrics strong { display: block; }
.result-key-metrics span { color: var(--muted); font-size: 9px; }
.result-key-metrics strong { font-size: 22px; margin-top: 4px; }
.result-section { border-bottom: 1px solid var(--border); padding: 18px 20px; }
.result-section h3 { color: var(--muted); font-size: 9px; margin-bottom: 12px; text-transform: uppercase; }
.feature-result-list { display: grid; gap: 7px; }
.feature-result-item { align-items: center; display: grid; gap: 9px; grid-template-columns: 30px 1fr auto; min-height: 40px; }
.feature-result-icon { align-items: center; background: var(--primary-soft); border-radius: 4px; color: var(--primary); display: flex; height: 30px; justify-content: center; width: 30px; }
.feature-result-icon svg { height: 15px; width: 15px; }
.feature-result-item strong, .feature-result-item small { display: block; }
.feature-result-item strong { font-size: 10px; }
.feature-result-item small { color: var(--muted); font-size: 9px; margin-top: 3px; }
.feature-result-item em { font-size: 13px; font-style: normal; font-weight: 700; }
.feature-result-item.is-disabled { opacity: .45; }

.bubble-intake { background: #182127; color: #edf3f1; margin-bottom: 18px; padding: 22px 24px 0; }
.bubble-intake-copy { align-items: center; display: flex; gap: 13px; }
.bubble-intake-copy p { color: #70c7bd; font-size: 8px; font-weight: 700; margin: 0 0 4px; text-transform: uppercase; }
.bubble-intake-copy h2 { font-size: 16px; margin: 0 0 4px; }
.bubble-intake-copy > div > span { color: #9faca9; font-size: 9px; }
.bubble-intake-icon { align-items: center; background: #26383b; color: #73c8bd; display: flex; height: 42px; justify-content: center; width: 42px; }
.bubble-intake-icon svg { height: 19px; width: 19px; }
.bubble-upload-form { align-items: end; display: grid; gap: 12px; grid-template-columns: minmax(240px, 1.4fr) repeat(4, minmax(145px, .75fr)) minmax(150px, .75fr) auto; margin-top: 20px; }
.bubble-upload-form > label > span:not(.sr-only), .bubble-item-editor label > span { color: #9faca9; display: block; font-size: 8px; font-weight: 600; margin-bottom: 6px; }
.bubble-upload-form select { background: #222d33; border: 1px solid #39474c; border-radius: 4px; color: #e3eae8; height: 42px; padding: 0 10px; width: 100%; }
.bubble-file-picker { align-items: center; border: 1px dashed #52636a; cursor: pointer; display: flex; gap: 11px; height: 42px; min-width: 0; padding: 0 12px; }
.bubble-file-picker:hover, .bubble-file-picker.is-dragging { background: rgba(113,196,185,.08); border-color: #71c4b9; }
.bubble-file-picker input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.bubble-file-picker > svg { color: #72c8bd; flex: 0 0 auto; height: 17px; width: 17px; }
.bubble-file-picker > span { min-width: 0; }
.bubble-file-picker strong, .bubble-file-picker small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bubble-file-picker strong { color: #edf3f1; font-size: 10px; }
.bubble-file-picker small { color: #84928f; font-size: 8px; margin-top: 2px; }
.bubble-all-pages { align-items: center; display: flex; gap: 8px; height: 42px; }
.bubble-all-pages input, .bubble-selected-toggle input { accent-color: var(--cyan); height: 15px; width: 15px; }
.bubble-all-pages span strong, .bubble-all-pages span small { display: block; }
.bubble-all-pages span strong { font-size: 9px; }
.bubble-all-pages span small { color: #82908e; font-size: 8px; margin-top: 2px; }
.bubble-upload-form .primary-button { height: 42px; white-space: nowrap; }
.bubble-intake-foot { border-top: 1px solid #344046; color: #879592; display: flex; font-size: 8px; justify-content: space-between; margin-top: 18px; padding: 11px 0 12px; }
.bubble-intake-foot span:first-child { color: #a8d2c8; }
.bubble-metrics { margin-bottom: 18px; }
.bubble-thumb { background: #e2f0ed; color: #27695f; }
.bubble-task-table th:first-child { width: 28%; }
.bubble-task-table th:nth-child(2) { width: 15%; }
.bubble-task-table th:nth-child(3) { width: 12%; }
.bubble-task-table th:nth-child(4) { width: 20%; }
.bubble-task-table th:nth-child(5) { width: 15%; }
.bubble-task-table th:last-child { width: 10%; }

.bubble-workspace { height: auto; min-height: calc(100vh - 68px); overflow: visible; padding: 0; }
.bubble-workspace.is-visible { display: flex; flex-direction: column; }
.bubble-workspace:is(.is-processing, .is-reviewing, .is-confirmed) .bubble-workbench-command,
.bubble-workspace:is(.is-processing, .is-reviewing, .is-confirmed) .bubble-inspection-context { display: none; }
.bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-workspace-head { min-height: 62px; }
.bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-workflow-steps { min-height: 42px; padding-bottom: 7px; padding-top: 7px; }
.bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-recognition-plan { min-height: 42px; padding-bottom: 6px; padding-top: 6px; }
.bubble-workflow-steps { align-items: center; background: #f1faff; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; margin: 0; min-height: 50px; padding: 0 16px; }
.bubble-workflow-steps li { align-items: center; color: #7c8996; display: flex; font-size: 9px; gap: 8px; justify-content: center; position: relative; }
.bubble-workflow-steps li:not(:last-child)::after { background: #bddce8; content: ""; height: 1px; left: calc(50% + 56px); position: absolute; right: calc(-50% + 56px); top: 50%; }
.bubble-workflow-steps span { align-items: center; background: #fff; border: 1px solid #9fc8d9; border-radius: 50%; display: inline-flex; font-size: 9px; height: 24px; justify-content: center; width: 24px; }
.bubble-workflow-steps li.is-active { color: var(--primary); }
.bubble-workflow-steps li.is-complete { color: var(--cyan); }
.bubble-workflow-steps li.is-active span { background: var(--primary); border-color: var(--primary); color: #fff; }
.bubble-workflow-steps li.is-complete span { background: var(--cyan-soft); border-color: #7cb5ae; color: var(--cyan); }
.bubble-new-recognition { min-height: 34px; padding: 0 10px; white-space: nowrap; }
.bubble-workbench-command { align-items: end; background: #ffffff; border-bottom: 1px solid var(--border); display: grid; gap: 10px; grid-template-columns: minmax(170px, .8fr) minmax(340px, 1.6fr) auto auto minmax(126px, auto); padding: 10px 16px; }
.bubble-workbench-command label > span { color: var(--muted); display: block; font-size: 8px; font-weight: 600; margin-bottom: 5px; }
.bubble-workbench-command select { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 4px; height: 34px; min-width: 0; padding: 0 8px; width: 100%; }
.bubble-workbench-command select:disabled { background: var(--surface-soft); color: var(--muted); }
.bubble-workspace-pages { align-items: center; display: flex; gap: 7px; height: 46px; padding: 0 5px; white-space: nowrap; }
.bubble-workspace-pages > span { color: var(--ink) !important; margin: 0 !important; }
.bubble-workspace-pages input { height: 15px; margin: 0; width: 15px; }
.bubble-workspace-pages.is-disabled { opacity: .45; }
.bubble-scope-field > span { color: var(--muted); display: block; font-size: 8px; font-weight: 600; margin-bottom: 5px; }
.bubble-scope-control { display: grid; grid-template-columns: 1fr 1fr; height: 46px; }
.bubble-scope-control button { align-items: center; display: flex; gap: 7px; justify-content: flex-start; min-width: 0; padding: 0 10px; text-align: left; }
.bubble-scope-control button > span, .bubble-scope-control button strong, .bubble-scope-control button small { display: block; min-width: 0; }
.bubble-scope-control button strong { font-size: 9px; line-height: 1.15; }
.bubble-scope-control button small { font-size: 7px; font-weight: 500; line-height: 1.2; margin-top: 3px; opacity: .75; }
.bubble-scope-control button svg { flex: 0 0 auto; height: 14px; width: 14px; }
.bubble-workbench-command .primary-button { min-height: 46px; min-width: 126px; }
.bubble-recognition-settings { min-width: 142px; position: relative; }
.bubble-recognition-settings > summary { align-items: center; border: 1px solid var(--border-strong); border-radius: 4px; cursor: pointer; display: grid; gap: 7px; grid-template-columns: 16px minmax(0, 1fr) 14px; height: 46px; list-style: none; padding: 0 9px; }
.bubble-recognition-settings > summary::-webkit-details-marker, .bubble-inspection-context > summary::-webkit-details-marker { display: none; }
.bubble-recognition-settings > summary > svg { height: 14px; width: 14px; }
.bubble-recognition-settings > summary > svg:last-child, .bubble-inspection-context-title > svg:last-child { transition: transform .18s ease; }
.bubble-recognition-settings[open] > summary > svg:last-child, .bubble-inspection-context[open] > summary > svg:last-child { transform: rotate(180deg); }
.bubble-recognition-settings > summary span, .bubble-recognition-settings > summary strong, .bubble-recognition-settings > summary small { display: block; min-width: 0; }
.bubble-recognition-settings > summary strong { font-size: 9px; }
.bubble-recognition-settings > summary small { font-size: 7px; margin-top: 3px; opacity: .72; white-space: nowrap; }
.bubble-recognition-settings-grid { background: #123c55; border: 1px solid #53778a; box-shadow: 0 12px 30px rgba(7, 29, 42, .24); display: grid; gap: 12px; grid-template-columns: minmax(150px, .7fr) minmax(300px, 1.3fr); padding: 12px; position: absolute; right: 0; top: calc(100% + 7px); width: min(520px, calc(100vw - 32px)); z-index: 24; }
.bubble-recognition-settings.needs-attention > summary { border-color: #e3a248; box-shadow: 0 0 0 1px #e3a248; }
.bubble-inspection-context { align-items: end; background: #f4fcff; border-bottom: 1px solid var(--border); display: grid; gap: 10px; grid-template-columns: repeat(4, minmax(120px, 1fr)); padding: 8px 16px 10px; }
.bubble-inspection-context-title { align-items: center; cursor: pointer; display: grid; gap: 8px; grid-column: 1 / -1; grid-template-columns: 30px minmax(0, 1fr) 16px; list-style: none; min-width: 0; }
.bubble-inspection-context-title > svg { background: var(--primary-soft); color: var(--primary); height: 30px; padding: 7px; width: 30px; }
.bubble-inspection-context-title span, .bubble-inspection-context-title strong, .bubble-inspection-context-title small { display: block; min-width: 0; }
.bubble-inspection-context-title strong { font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bubble-inspection-context-title small { color: var(--muted); font-size: 7px; margin-top: 2px; }
.bubble-inspection-context:not([open]) { padding-bottom: 7px; padding-top: 7px; }
.bubble-inspection-context-title .text-button { font-size: 8px; min-height: 26px; padding: 0 7px; white-space: nowrap; }
.bubble-inspection-context label > span { color: var(--muted); display: block; font-size: 8px; font-weight: 600; margin-bottom: 5px; }
.bubble-inspection-context input { background: #fff; border: 1px solid var(--border-strong); border-radius: 4px; height: 32px; min-width: 0; padding: 0 8px; width: 100%; }
.bubble-inspection-context input:disabled { background: #eaf7fb; color: var(--muted); }
.bubble-recognition-plan { align-items: center; background: #eaf7fc; border-bottom: 1px solid var(--border); display: grid; gap: 13px; grid-template-columns: minmax(260px, 1fr) minmax(180px, .5fr) 38px; min-height: 48px; padding: 7px 16px; }
.bubble-recognition-plan > div:first-child { align-items: center; column-gap: 10px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; min-width: 0; row-gap: 2px; }
.bubble-recognition-plan span, .bubble-recognition-plan strong, .bubble-recognition-plan small { display: inline; }
.bubble-recognition-plan > div:first-child > span { grid-column: 1; grid-row: 1 / 3; }
.bubble-recognition-plan > div:first-child > strong { grid-column: 2; grid-row: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bubble-recognition-plan > div:first-child > small:first-of-type { grid-column: 2; grid-row: 2; margin-left: 0; }
.bubble-recognition-plan span { color: var(--muted); font-size: 8px; font-weight: 600; margin-right: 8px; }
.bubble-recognition-plan strong { font-size: 9px; }
.bubble-recognition-plan small { color: var(--muted); font-size: 8px; margin-left: 8px; }
.bubble-recognition-plan .bubble-time-estimate { border-left: 1px solid var(--border-strong); grid-column: 3; grid-row: 1 / 3; margin-left: 0; padding-left: 10px; white-space: nowrap; }
.bubble-recognition-plan .bubble-start-blocker { color: #a34716; font-weight: 650; }
.bubble-recognition-plan .bubble-quota-action { font-size: 8px; margin-left: 8px; min-height: 22px; padding: 0 7px; }
#bubble-start-blocker[hidden], #bubble-quota-action[hidden] { display: none; }
.bubble-recognition-plan em { color: var(--ink); font-size: 9px; font-style: normal; font-weight: 700; text-align: right; }
.bubble-progress-track { background: #c9e4ed; border-radius: 3px; height: 6px; overflow: hidden; }
.bubble-progress-track > span { background: var(--primary); border-radius: inherit; display: block; height: 100%; margin: 0; transition: width .35s ease; }
.bubble-review-layout { --bubble-review-width: clamp(360px, 32vw, 500px); display: grid; flex: 1; grid-template-columns: minmax(0, 1fr) 6px var(--bubble-review-width); min-height: 0; }
.bubble-review-layout.is-review-collapsed { grid-template-columns: minmax(0, 1fr); }
.bubble-review-layout.is-review-collapsed .bubble-workspace-splitter, .bubble-review-layout.is-review-collapsed .bubble-review-pane { display: none; }
.bubble-canvas-pane { container-type: inline-size; display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; }
.bubble-toolbar { gap: 6px; grid-template-columns: minmax(0, 1fr) auto auto; }
.bubble-toolbar-actions { align-items: center; display: flex; gap: 5px; justify-self: end; }
.bubble-toolbar .toolbar-center .bubble-toolbar-divider { background: var(--border); height: 20px; margin: 0 4px; width: 1px; }
.bubble-toolbar .toolbar-center #bubble-rotation-label { font-variant-numeric: tabular-nums; min-width: 28px; width: 28px; }
.bubble-toolbar .toolbar-center #bubble-rotate-left:disabled,
.bubble-toolbar .toolbar-center #bubble-rotate-right:disabled { cursor: not-allowed; opacity: .36; }
.bubble-product-mark, .bubble-thumb svg, .member-module-access label[title="气泡检验"] svg,
.module-access-field label:has(#new-user-bubble-access) svg,
.module-access-field label:has(#trial-bubble-access) svg { color: #cf2f35; }
.bubble-add-item-button { background: #fff1f1; border-color: #d54a4f; color: #a52228; font-weight: 750; min-width: 104px; }
.bubble-add-item-button:hover:not(:disabled), .bubble-add-item-button:focus-visible { background: #ffe3e4; border-color: #ba252c; color: #8c171d; }
.bubble-add-item-button svg { stroke-width: 2.2; }
.bubble-pause-button { border-color: #b8c2cc; min-width: 104px; }
.bubble-pause-button.is-resume { background: #edf8f3; border-color: #61a889; color: #176b50; }
.bubble-cancel-button { border-color: #d8a0a4; color: #9f2930; min-width: 104px; }
.bubble-cancel-button:hover:not(:disabled), .bubble-cancel-button:focus-visible { background: #fff1f1; border-color: #c85157; color: #861c22; }
.bubble-cancel-button:disabled { background: #f6f2f2; color: #8d7476; }
.bubble-workspace:is(.is-processing, .is-failed, .is-cancelled) .bubble-toolbar-actions #bubble-select-region,
.bubble-workspace:is(.is-processing, .is-failed, .is-cancelled) .bubble-toolbar-actions #bubble-clear-region { display: none; }
.bubble-workspace:is(.is-empty, .is-configuring) .bubble-toolbar-actions #bubble-add-item { display: none; }
.bubble-workspace.is-appending .bubble-review-pane { opacity: .62; pointer-events: none; }
.bubble-pages { justify-self: start; max-width: 100%; min-width: 60px; overflow-x: auto; }
.bubble-pages button { flex-shrink: 0; white-space: nowrap; }
@container (min-width: 521px) and (max-width: 850px) {
  .bubble-toolbar-actions :is(#bubble-select-region, #bubble-add-item) { height: 34px; min-width: 34px; padding: 0; width: 34px; }
  .bubble-toolbar-actions :is(#bubble-select-region, #bubble-add-item) span { display: none; }
}
@container (max-width: 520px) {
  .bubble-toolbar { gap: 6px; grid-template-columns: minmax(0, 1fr) auto; }
  .bubble-toolbar .toolbar-center { display: flex; grid-column: 1 / -1; grid-row: 2; justify-self: start; max-width: 100%; overflow-x: auto; width: 100%; }
  .bubble-toolbar-actions { grid-column: 2; grid-row: 1; }
}
.bubble-state-legend { align-items: center; background: #f2fbfe; border-bottom: 1px solid var(--border); color: var(--muted); display: flex; flex: 0 0 30px; font-size: 8px; gap: 14px; min-height: 30px; padding: 0 14px; }
.bubble-state-legend span { align-items: center; display: inline-flex; gap: 5px; }
.bubble-state-legend i { align-items: center; background: #fff; border: 1px solid #292d32; border-radius: 50%; box-sizing: border-box; color: #292d32; display: inline-flex; font-size: 8px; font-style: normal; font-weight: 650; height: 15px; justify-content: center; line-height: 1; position: relative; width: 15px; }
.bubble-state-legend .confirmed i::after { content: "1"; }
.bubble-state-legend .needs-review i { background: #fff; border-color: #292d32; color: #292d32; }
.bubble-state-legend .needs-review i::after { content: "?"; }
.bubble-state-legend .confirmed i { background: #292d32; border-color: #292d32; box-shadow: none; color: #fff; }
.bubble-state-legend .excluded i { background: transparent; border: 1.5px solid #ad4650; box-sizing: border-box; height: 9px; position: relative; width: 9px; }
.bubble-state-legend .excluded i::after { background: #ad4650; content: ""; height: 1.5px; left: 0; position: absolute; top: 3px; transform: rotate(-45deg); width: 7px; }
.bubble-state-legend .active i { background: #fff; border: 2px solid var(--primary); box-shadow: 0 0 0 2px rgba(36,105,204,.18); height: 10px; width: 10px; }
.bubble-state-legend em { font-style: normal; margin-left: auto; }
.bubble-canvas { background-color: #e2f2f6; background-image: linear-gradient(#c7e0e8 1px, transparent 1px), linear-gradient(90deg, #c7e0e8 1px, transparent 1px); background-size: 24px 24px; cursor: grab; flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; position: relative; touch-action: none; }
.bubble-canvas.is-panning { cursor: grabbing; user-select: none; }
.bubble-canvas.is-dragging { box-shadow: inset 0 0 0 3px var(--primary); }
.bubble-canvas-empty { align-items: center; color: #527486; display: flex; flex-direction: column; gap: 6px; inset: 0; justify-content: center; pointer-events: none; position: absolute; text-align: center; }
.bubble-canvas-empty svg { height: 28px; width: 28px; }
.bubble-canvas-empty strong { color: #183e52; font-size: 11px; }
.bubble-canvas-empty span { font-size: 9px; }
.bubble-page-stage { min-height: 100%; min-width: 100%; position: relative; }
.bubble-page-content { background: #fff; box-shadow: 0 5px 22px rgba(24,33,39,.18); overflow: visible; position: absolute; }
.bubble-page-content > img { border: 0; display: block; height: 100%; pointer-events: none; user-select: none; width: 100%; }
.bubble-overlay { inset: 0; position: absolute; touch-action: none; }
.bubble-overlay.is-drawing { cursor: crosshair; }
.bubble-overlay.is-drawing .bubble-marker, .bubble-overlay.is-drawing .bubble-callout { pointer-events: none; }
.bubble-selection-layer { inset: 0; pointer-events: none; position: absolute; touch-action: none; z-index: 7; }
.bubble-selection-layer.is-selecting { cursor: crosshair; pointer-events: auto; }
.bubble-recognition-region { background: rgba(28,117,222,.08); border: 2px solid #1c75de; box-shadow: 0 0 0 9999px rgba(13,38,58,.15); pointer-events: none; position: absolute; }
.bubble-recognition-region::before { background: #1c75de; color: #fff; content: "识别区域"; font-size: 8px; font-weight: 700; left: -2px; padding: 4px 7px; position: absolute; top: -22px; white-space: nowrap; }
.bubble-recognition-region.is-draft { background: rgba(20,168,154,.12); border-color: #149d91; box-shadow: none; }
.bubble-recognition-region.is-draft::before { content: ""; display: none; }
.bubble-recognition-region.is-editable { cursor: move; pointer-events: auto; }
.bubble-recognition-region.is-dragging { transition: none; }
.bubble-region-handle { background: #fff; border: 2px solid #1c75de; border-radius: 50%; height: 12px; pointer-events: auto; position: absolute; width: 12px; }
.bubble-region-handle.handle-nw { cursor: nwse-resize; left: 0; top: 0; transform: translate(-50%, -50%); }
.bubble-region-handle.handle-n { cursor: ns-resize; left: 50%; top: 0; transform: translate(-50%, -50%); }
.bubble-region-handle.handle-ne { cursor: nesw-resize; right: 0; top: 0; transform: translate(50%, -50%); }
.bubble-region-handle.handle-e { cursor: ew-resize; right: 0; top: 50%; transform: translate(50%, -50%); }
.bubble-region-handle.handle-se { bottom: 0; cursor: nwse-resize; right: 0; transform: translate(50%, 50%); }
.bubble-region-handle.handle-s { bottom: 0; cursor: ns-resize; left: 50%; transform: translate(-50%, 50%); }
.bubble-region-handle.handle-sw { bottom: 0; cursor: nesw-resize; left: 0; transform: translate(-50%, 50%); }
.bubble-region-handle.handle-w { cursor: ew-resize; left: 0; top: 50%; transform: translate(-50%, -50%); }
.bubble-leader-layer { height: 100%; inset: 0; overflow: visible; pointer-events: none; position: absolute; width: 100%; }
.bubble-leader { fill: none; opacity: 0; stroke: #687780; stroke-width: 1; vector-effect: non-scaling-stroke; }
.bubble-overlay .bubble-leader.is-required { opacity: .45; }
.bubble-overlay .bubble-leader:is(.is-hovered, .is-selected) { opacity: .9; stroke: #1671c5; stroke-width: 1.25; }
.bubble-marker { background: transparent; border: 0; border-radius: 0; cursor: pointer; overflow: visible; padding: 0; position: absolute; }
.bubble-highlight-layer { height: 100%; inset: 0; overflow: visible; pointer-events: none; position: absolute; width: 100%; }
.bubble-text-highlight, .bubble-highlight-focus { fill: #4caeec; pointer-events: none; stroke: none; }
.bubble-text-highlight[data-critical="true"], .bubble-highlight-focus[data-critical="true"] { fill: #cf3f3d; }
.bubble-highlight-focus { visibility: hidden; }
.bubble-highlight-focus:is(.is-hovered, .is-selected) { visibility: visible; }
.bubble-marker:is(:hover, .is-hovered, .is-selected) { outline: none; z-index: 3; }
.bubble-marker.is-editable { cursor: move; outline: 1px solid rgba(22,113,197,.75); outline-offset: 1px; }
.bubble-marker-handle { background: #fff; border: 1.5px solid #1671c5; border-radius: 2px; height: 8px; pointer-events: auto; position: absolute; width: 8px; z-index: 5; }
.bubble-marker-handle.handle-nw { cursor: nwse-resize; left: 0; top: 0; transform: translate(-50%, -50%); }
.bubble-marker-handle.handle-n { cursor: ns-resize; left: 50%; top: 0; transform: translate(-50%, -50%); }
.bubble-marker-handle.handle-ne { cursor: nesw-resize; right: 0; top: 0; transform: translate(50%, -50%); }
.bubble-marker-handle.handle-e { cursor: ew-resize; right: 0; top: 50%; transform: translate(50%, -50%); }
.bubble-marker-handle.handle-se { bottom: 0; cursor: nwse-resize; right: 0; transform: translate(50%, 50%); }
.bubble-marker-handle.handle-s { bottom: 0; cursor: ns-resize; left: 50%; transform: translate(-50%, 50%); }
.bubble-marker-handle.handle-sw { bottom: 0; cursor: nesw-resize; left: 0; transform: translate(-50%, 50%); }
.bubble-marker-handle.handle-w { cursor: ew-resize; left: 0; top: 50%; transform: translate(-50%, -50%); }
.bubble-marker.stream-recognizing { animation: bubble-stream-focus 1.1s ease-in-out infinite; outline: 1px solid #1671c5; }
.bubble-callout { --bubble-diameter: 18px; --bubble-hit-diameter: var(--bubble-diameter); background: transparent; border: 0; border-radius: 50%; color: #262b30; cursor: pointer; display: grid; font-family: Arial, sans-serif; font-size: 9px; font-variant-numeric: tabular-nums; font-weight: 600; height: var(--bubble-hit-diameter); letter-spacing: 0; line-height: 1; overflow: visible; padding: 0; place-items: center; position: absolute; transform: translate(-50%, -50%); width: var(--bubble-hit-diameter); z-index: 4; }
.bubble-callout-disc { align-items: center; background: #fff; border: 1px solid #343b42; border-radius: 50%; box-sizing: border-box; display: flex; height: var(--bubble-diameter); justify-content: center; pointer-events: none; width: var(--bubble-diameter); }
.bubble-callout-number { display: block; line-height: 1; white-space: nowrap; }
.bubble-callout:is(:hover, .is-hovered, .is-selected) { z-index: 6; }
.bubble-callout:is(:hover, .is-hovered, :focus-visible) .bubble-callout-disc { border-color: #1671c5; box-shadow: 0 0 0 2px rgba(22,113,197,.25); }
.bubble-callout:focus-visible { outline: none; }
.bubble-callout.is-review-candidate { color: #262b30; }
.bubble-callout.is-official .bubble-callout-disc { background: #262b30; border-color: #262b30; color: #fff; }
.bubble-callout.is-customer-label .bubble-callout-disc { background: #fff; color: #262b30; }
.bubble-callout.is-critical .bubble-callout-disc { background: #fff; border-color: #c13939; color: #b12d2d; }
.bubble-callout.is-selected .bubble-callout-disc { background: #1671c5; border-color: #1671c5; box-shadow: 0 0 0 2px rgba(22,113,197,.20); color: #fff; }
.bubble-overlay[data-detail="overview"] .bubble-marker:not(.is-selected):not(.is-hovered):not(:hover) { outline: none; }
.bubble-callout.stream-recognizing .bubble-callout-disc { animation: bubble-stream-focus 1.1s ease-in-out infinite; background: #2469cc; color: #fff; }
@media print {
  .bubble-callout-disc { box-shadow: none !important; }
}
.bubble-draft-box { background: rgba(200,42,42,.08); border: 2px solid #d12f2f; pointer-events: none; position: absolute; z-index: 6; }
.bubble-draft-box.is-recognizing { animation: bubble-manual-recognition 1s ease-in-out infinite; background: rgba(36,105,204,.1); border-color: #2469cc; }
@keyframes bubble-manual-recognition { 50% { box-shadow: 0 0 0 5px rgba(36,105,204,.18); } }
.bubble-processing-overlay { align-items: center; background: rgba(248,250,252,.94); border: 1px solid rgba(76,96,116,.18); bottom: 22px; box-shadow: 0 8px 28px rgba(23,33,43,.14); display: grid; gap: 2px 9px; grid-template-columns: 22px 1fr; left: 50%; min-width: 260px; padding: 10px 14px; position: sticky; transform: translateX(-50%); width: max-content; z-index: 8; }
.bubble-processing-overlay[hidden] { display: none; }
.bubble-processing-overlay .processing-spinner { grid-row: 1 / 3; }
.bubble-processing-overlay.is-paused .processing-spinner { animation: none; background: #fff; border-color: #c2ccd4; border-top-color: #556574; }
.bubble-processing-overlay.is-cancelling .processing-spinner { border-color: #e6c4c6; border-top-color: #a82e35; }
.bubble-processing-overlay strong { font-size: 9px; }
.bubble-processing-overlay small { color: var(--muted); font-size: 8px; }
.bubble-workspace-splitter { background: #e5f5f9; border-left: 1px solid var(--border); border-right: 1px solid var(--border); cursor: col-resize; position: relative; }
.bubble-workspace-splitter::after { background: #77afc0; content: ""; height: 34px; left: 50%; position: absolute; top: 50%; transform: translate(-50%,-50%); width: 2px; }
.bubble-workspace-splitter:hover, .bubble-workspace-splitter:focus-visible { background: var(--primary-soft); outline: none; }

.bubble-review-pane { background: var(--surface); container-type: inline-size; display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; }
.bubble-review-head { align-items: center; border-bottom: 1px solid var(--border); display: flex; gap: 12px; justify-content: space-between; min-height: 58px; padding: 9px 12px 9px 14px; }
.bubble-review-head p { color: var(--cyan); font-size: 8px; font-weight: 700; margin: 0 0 4px; text-transform: uppercase; }
.bubble-review-head h2 { font-size: 14px; margin: 0; }
.bubble-review-head-actions { align-items: center; display: flex; gap: 10px; margin-left: auto; }
.bubble-review-navigation { align-items: center; display: flex; gap: 5px; }
.bubble-review-navigation .secondary-button { gap: 5px; min-height: 30px; padding: 0 8px; white-space: nowrap; }
.bubble-review-navigation .secondary-button svg { height: 13px; width: 13px; }
.bubble-review-total { color: var(--muted); font-size: 8px; white-space: nowrap; }
.bubble-review-total strong { color: var(--ink); font-size: 11px; }
.bubble-review-head em { font-style: normal; }
.bubble-review-decision-bar { align-items: center; background: #edf7ff; border-bottom: 1px solid #c9ddeb; display: flex; gap: 10px; justify-content: space-between; min-height: 50px; padding: 7px 10px 7px 14px; }
.bubble-review-decision-bar > div { align-items: center; display: flex; gap: 7px; }
.bubble-review-decision-bar > div:first-child > svg { color: var(--primary); height: 17px; width: 17px; }
.bubble-review-decision-bar small, .bubble-review-decision-bar strong { display: block; }
.bubble-review-decision-bar small { color: var(--muted); font-size: 7px; }
.bubble-review-decision-bar strong { color: var(--ink); font-size: 10px; margin-top: 2px; }
.bubble-review-decision-bar .secondary-button, .bubble-review-decision-bar .primary-button { min-height: 32px; padding: 0 9px; }
.bubble-review-decision-bar .danger-ghost { background: #fff; border-color: #e3b7b7; color: #a62d2d; }
.bubble-review-decision-bar .danger-ghost:hover { background: #fff1f1; border-color: #c96c6c; }
.bubble-review-tools { align-items: center; background: var(--surface-soft); border-bottom: 1px solid var(--border); display: flex; gap: 10px; justify-content: space-between; min-height: 42px; padding: 6px 10px; }
.bubble-review-filter { flex: 0 0 auto; }
.bubble-review-filter button { min-width: 60px; }
.bubble-review-filter em { font-style: normal; margin-left: 2px; }
.bubble-review-tools > span { color: var(--muted); font-size: 8px; }
.bubble-review-grid { align-items: center; display: grid; gap: 7px; grid-template-columns: 26px minmax(0, 1fr) 64px 28px; }
.bubble-review-table-head { background: #f1faff; border-bottom: 1px solid var(--border); color: #527082; flex: 0 0 34px; font-size: 8px; font-weight: 650; padding: 0 10px; }
.bubble-item-list { border-bottom: 1px solid var(--border); flex: 1 1 auto; min-height: 140px; overflow: auto; overscroll-behavior: contain; }
.dxf-parse-warnings { background: #fff9ec; border-bottom: 1px solid #e5cf9f; color: #71450f; flex: 0 0 auto; max-height: 190px; overflow: auto; }
.dxf-parse-warnings > summary { align-items: center; cursor: pointer; display: grid; font-size: 9px; font-weight: 750; gap: 7px; grid-template-columns: 15px minmax(0, 1fr) auto 13px; min-height: 34px; padding: 7px 10px; }
.dxf-parse-warnings > summary::marker { display: none; }
.dxf-parse-warnings > summary > svg { height: 14px; width: 14px; }
.dxf-parse-warnings > summary > svg:first-child { color: #bb6b0c; }
.dxf-parse-warnings > summary > svg:last-child { transition: transform .16s ease; }
.dxf-parse-warnings[open] > summary > svg:last-child { transform: rotate(180deg); }
.dxf-parse-warnings > summary strong { align-items: center; background: #f3dfb3; border-radius: 3px; display: flex; font-size: 8px; height: 20px; justify-content: center; min-width: 22px; padding: 0 5px; }
.dxf-parse-warnings > div { border-top: 1px solid #ead9b5; }
.dxf-parse-warnings article { align-items: flex-start; border-left: 3px solid #d38a2d; border-top: 1px solid #f0e2c7; display: flex; gap: 8px; padding: 8px 10px; }
.dxf-parse-warnings article:first-child { border-top: 0; }
.dxf-parse-warnings article > svg { flex: 0 0 13px; height: 13px; margin-top: 1px; width: 13px; }
.dxf-parse-warnings article > span { display: grid; gap: 2px; min-width: 0; }
.dxf-parse-warnings article strong { color: #613b0d; font-size: 8px; line-height: 1.45; }
.dxf-parse-warnings article small { color: #8b672f; font-size: 7px; }
.dxf-parse-warnings article em { color: #47392a; font-size: 8px; font-style: normal; line-height: 1.4; overflow-wrap: anywhere; }
.bubble-item-group { align-items: center; background: #f4f7f8; border-bottom: 1px solid var(--border); color: #516b76; display: flex; font-size: 8px; font-weight: 750; min-height: 27px; padding: 0 10px; position: sticky; top: 0; z-index: 2; }
.bubble-item-group.is-candidate { background: #fff8e9; color: #7f4a09; }
.bubble-item-group.is-requirement { background: #eef7f2; color: #245b45; }
.bubble-item-group.is-excluded { background: #fff3f3; color: #8f3c43; }
.bubble-item-row { background: var(--surface); border-bottom: 1px solid var(--border); min-height: 54px; padding: 8px 10px; text-align: left; width: 100%; }
.bubble-item-row:hover { background: var(--surface-soft); }
.bubble-item-row.is-selected { background: #eaf2ff; box-shadow: inset 3px 0 0 var(--primary); }
.bubble-item-row.is-excluded { background: #fffafa; }
.bubble-item-row.is-excluded .bubble-item-focus { opacity: .72; }
.bubble-item-row.is-linked { animation: bubble-review-link 1.1s ease-out; }
@keyframes bubble-review-link { 0%, 42% { background: #d9e9ff; box-shadow: inset 4px 0 0 #2469cc, inset 0 0 0 2px rgba(36,105,204,.28); } 100% { background: #eaf2ff; box-shadow: inset 3px 0 0 var(--primary); } }
.bubble-item-row.is-saving { opacity: .72; pointer-events: none; }
.bubble-row-checkbox { align-items: center; cursor: pointer; display: flex; justify-content: center; }
.bubble-row-checkbox input { accent-color: var(--primary); height: 16px; margin: 0; width: 16px; }
.bubble-restore-excluded { color: #a92d36; height: 25px; justify-self: center; width: 25px; }
.bubble-restore-excluded:hover { background: #fff0f1; color: #821b23; }
.bubble-item-focus { align-items: center; background: transparent; border: 0; color: var(--ink); cursor: pointer; display: grid; gap: 8px; grid-template-columns: 27px minmax(0, 1fr); min-width: 0; padding: 0; text-align: left; }
.bubble-number { align-items: center; background: #262b30; border: 1px solid #343b42; border-radius: 50%; color: #fff; display: flex; flex-shrink: 0; font-family: Arial, sans-serif; font-size: 10px; font-weight: 600; height: 27px; justify-content: center; width: 27px; }
.bubble-number.is-review-candidate { align-self: center; background: #fff; border-color: #343b42; color: #262b30; font-variant-numeric: tabular-nums; justify-self: center; }
.bubble-number.is-review-candidate.is-three-digit { font-size: 9px; }
.bubble-number.is-preview { animation: bubble-preview-pulse 1.35s ease-in-out infinite; border-color: var(--primary); color: var(--primary); }
.bubble-number.is-preview.is-resolved { animation: none; border-color: #167367; color: #167367; }
.bubble-item-row.is-streaming { background: linear-gradient(90deg, rgba(0,108,255,.07), transparent 55%); }
.bubble-item-row.is-stream-state .bubble-item-focus { grid-template-columns: minmax(0, 1fr); }
.bubble-item-row.is-candidate, .bubble-item-row.is-requirement { background: #fff; }
.bubble-number.is-requirement { background: #fff; border-color: #343b42; color: #262b30; font-size: 10px; }
.bubble-row-evidence-lock.is-requirement { color: #397455; }
.bubble-requirement-summary { display: none; gap: 8px; grid-column: 2 / -1; grid-template-columns: auto auto minmax(0, 1fr); padding: 2px 0 5px; }
.bubble-item-row.is-requirement.is-selected .bubble-requirement-summary { display: grid; }
.bubble-requirement-summary span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.bubble-requirement-summary strong { color: var(--ink); font-size: 12px; font-weight: 600; line-height: 1.55; }
.bubble-requirement-summary > strong { overflow-wrap: anywhere; }
.bubble-requirement-alternative { align-items: center; background: #fff8e9; border-left: 2px solid #c48124; display: grid; gap: 8px; grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) auto; padding: 6px 7px; }
.bubble-requirement-alternative > span { display: grid; gap: 2px; min-width: 0; white-space: normal; }
.bubble-requirement-alternative small { color: #8a641f; font-size: 8px; }
.bubble-requirement-alternative strong { font-size: 10px; font-weight: 550; line-height: 1.45; overflow-wrap: anywhere; }
.bubble-requirement-alternative .secondary-button { min-height: 28px; padding: 0 9px; }
.bubble-requirement-alternatives { display: grid; gap: 6px; }
.bubble-item-editor.is-requirement { grid-template-columns: minmax(0, 1fr); }
.bubble-item-editor.is-requirement .span-two { grid-column: 1; }
.bubble-item-row.is-parsed, .bubble-item-row.is-final { box-shadow: inset 2px 0 0 rgba(22,115,103,.52); }
.bubble-item-row.is-streaming .bubble-row-status i { animation: bubble-preview-pulse 1.35s ease-in-out infinite; background: var(--primary); }
@keyframes bubble-preview-pulse { 50% { opacity: .42; transform: scale(.92); } }
@keyframes bubble-stream-focus { 50% { opacity: .58; } }
.bubble-item-focus strong, .bubble-item-focus small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bubble-item-focus strong { font-size: 10px; }
.bubble-item-focus small { color: var(--muted); font-size: 8px; margin-top: 3px; }
.bubble-inline-measurements { display: none; gap: 5px; grid-column: 2 / -1; grid-template-columns: repeat(3, minmax(48px, .7fr)) minmax(72px, 1fr); padding: 2px 0 3px; }
.bubble-item-row.is-selected .bubble-inline-measurements { display: grid; }
.bubble-inline-field > span { color: var(--muted); display: block; font-size: 7px; margin-bottom: 3px; }
.bubble-inline-field input { background: #fff; border: 1px solid #cbd5d1; border-radius: 4px; font-size: 9px; height: 30px; min-width: 0; padding: 0 6px; text-align: right; width: 100%; }
.bubble-inline-field input:focus { border-color: #2469cc; box-shadow: 0 0 0 2px rgba(36,105,204,.12); outline: none; }
.bubble-gauge-cell input { text-align: left; }
.bubble-inline-gauge-detail { align-items: center; background: #eef8fb; border-left: 2px solid #16819a; color: #355866; display: grid; font-size: 7px; gap: 4px 8px; grid-column: 1 / -1; grid-template-columns: auto auto minmax(0, 1fr); min-height: 28px; padding: 5px 7px; }
.bubble-inline-gauge-detail span { white-space: nowrap; }
.bubble-inline-gauge-detail strong { color: var(--ink); font-size: 7px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bubble-inline-gauge-detail.requires-review { background: #fff7e8; border-left-color: #c76712; }
.bubble-row-status { align-items: center; color: #6b7773; display: inline-flex; font-size: 8px; gap: 5px; justify-content: flex-start; line-height: 1.45; min-width: 0; overflow-wrap: anywhere; white-space: normal; }
.bubble-row-status i { background: #d52d35; border-radius: 50%; flex: 0 0 auto; height: 6px; width: 6px; }
.bubble-row-status.completed i { background: #c92830; }
.bubble-row-status.failed i { background: #b53939; }
.bubble-row-status.needs-review i { background: #d52d35; }
.bubble-row-status.excluded { color: #8f3c43; }
.bubble-row-status.excluded i { background: #ad4650; }
.bubble-row-actions { align-items: center; display: flex; justify-content: flex-end; position: relative; }
.bubble-inline-save { align-items: center; background: #fff; border-radius: 50%; display: flex; height: 18px; justify-content: center; position: absolute; right: 25px; width: 18px; }
.bubble-inline-save svg { height: 12px; width: 12px; }
.bubble-inline-save.is-saving { color: #2469cc; }
.bubble-inline-save.is-saving svg { animation: spin .8s linear infinite; }
.bubble-inline-save.is-saved { color: #167367; }
.bubble-inline-save.is-error { color: #b53939; }
@keyframes spin { to { transform: rotate(360deg); } }
.bubble-list-empty, .bubble-review-empty { align-items: center; color: var(--muted); display: flex; font-size: 9px; gap: 7px; justify-content: center; min-height: 72px; padding: 14px; }
.bubble-review-empty svg { height: 15px; width: 15px; }
.bubble-item-editor { background: #fbfcfc; border-bottom: 1px solid var(--border); border-top: 1px solid var(--border); display: grid; flex: 0 0 auto; gap: 9px 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); max-height: 43%; overflow-y: auto; padding: 13px 16px 16px; }
.bubble-current-preview { background: #fff; border-top: 1px solid #d5e0e5; flex: 0 0 auto; padding: 6px 12px 10px; }
.bubble-current-preview > header { align-items: center; display: flex; justify-content: space-between; min-height: 30px; }
.bubble-current-preview > header > span { align-items: center; display: flex; gap: 9px; min-width: 0; }
.bubble-current-preview strong { color: #262b30; font-size: 12px; }
.bubble-current-preview header span span { color: #65727b; font-size: 11px; }
.bubble-current-preview canvas { display: block; max-width: 100%; width: 100%; }
.bubble-review-pane:has(.bubble-item-editor:not([hidden])) .bubble-item-list { flex: 1 1 0; min-height: 64px; }
.bubble-review-pane:has(.bubble-item-editor:not([hidden])) .bubble-item-editor { flex: 0 0 auto; height: 240px; max-height: 32%; min-height: 170px; }
.bubble-review-pane:has(.bubble-item-editor:not([hidden])) .bubble-requirement-summary { display: none; }
.bubble-item-editor textarea { background: #fff; border: 1px solid var(--border-strong); border-radius: 4px; font-family: inherit; font-size: 13px; line-height: 1.65; min-height: 60px; padding: 7px 9px; resize: vertical; width: 100%; }
.bubble-item-editor.is-requirement textarea { min-height: 130px; }
.bubble-review-rationale { background: #fff8ed; border-bottom: 1px solid #ead3ad; display: grid; gap: 4px 8px; grid-template-columns: 74px minmax(0, 1fr); padding: 8px 12px; }
.bubble-review-rationale > span { align-self: center; color: #754511; font-size: 8px; font-weight: 700; }
.bubble-review-rationale input { background: #fff; border: 1px solid #d7b77f; border-radius: 4px; height: 32px; min-width: 0; padding: 0 8px; width: 100%; }
.bubble-review-rationale small { color: #8a6a3f; font-size: 7px; grid-column: 2; }
.bubble-row-evidence-lock { align-items: center; color: #6f7c79; display: flex; justify-content: center; }
.bubble-row-evidence-lock svg { height: 14px; width: 14px; }
.bubble-item-editor .span-two { grid-column: 1 / -1; }
.bubble-item-editor label > span { color: var(--muted); }
.bubble-item-editor input, .bubble-item-editor select { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 4px; height: 34px; min-width: 0; padding: 0 8px; width: 100%; }
.bubble-recognition-evidence { background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 10px; }
.bubble-evidence-heading { align-items: center; display: flex; justify-content: space-between; }
.bubble-evidence-heading > span { color: var(--muted); font-size: 8px; font-weight: 650; }
.bubble-evidence-heading > strong { background: #edf7f3; border: 1px solid #bddfd3; border-radius: 999px; color: #176c5f; font-size: 8px; padding: 3px 7px; }
.bubble-evidence-heading > strong.requires-review { background: #fff6e7; border-color: #ead1a2; color: #8a5811; }
.bubble-evidence-heading > strong.is-critical { background: #fff0ef; border-color: #efb8b4; color: #a32621; }
.bubble-evidence-metrics { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 9px; }
.bubble-evidence-metrics > span { background: var(--surface-soft); border-radius: 3px; min-width: 0; padding: 7px 8px; }
.bubble-evidence-metrics small, .bubble-evidence-metrics strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bubble-evidence-metrics small { color: var(--muted); font-size: 7px; }
.bubble-evidence-metrics strong { color: var(--ink); font-size: 9px; margin-top: 3px; }
.bubble-evidence-flags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.bubble-evidence-flags span { background: #fff6e7; border: 1px solid #ead1a2; border-radius: 3px; color: #80500f; font-size: 7px; padding: 3px 5px; }
.bubble-variant-evidence { border-top: 1px solid var(--border); margin-top: 9px; padding-top: 9px; }
.bubble-prediction-compare { align-items: center; display: grid; gap: 7px; grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1fr); margin-top: 8px; }
.bubble-prediction-compare > span { background: var(--surface-soft); border-radius: 3px; min-width: 0; padding: 7px 8px; }
.bubble-prediction-compare small, .bubble-prediction-compare strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bubble-prediction-compare small { color: var(--muted); font-size: 7px; }
.bubble-prediction-compare strong { font-size: 9px; margin-top: 3px; }
.bubble-prediction-compare svg { color: var(--muted); height: 13px; width: 13px; }
.bubble-variant-evidence p { color: var(--muted); font-size: 8px; line-height: 1.5; margin: 7px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bubble-dimension-integrity.is-critical { border-left: 3px solid #c43b34; padding-left: 8px; }
.bubble-dimension-integrity .bubble-evidence-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bubble-integrity-finding { align-items: center; background: #fff4e8; border: 1px solid #e8c58f; border-radius: 4px; color: #7a4310; display: flex; gap: 8px; min-height: 46px; padding: 8px; }
.bubble-integrity-finding svg { flex: 0 0 16px; height: 16px; width: 16px; }
.bubble-integrity-finding strong { font-size: 9px; line-height: 1.45; }
.bubble-integrity-audit { border-top: 1px solid var(--border); display: grid; gap: 7px; margin-top: 9px; padding-top: 9px; }
.bubble-integrity-audit-row { align-items: flex-start; background: #f6f8f7; border-left: 3px solid #a13a35; display: flex; gap: 8px; padding: 8px; }
.bubble-integrity-audit-row.is-approved { border-left-color: #23715d; }
.bubble-integrity-audit-row svg { color: #9a312c; flex: 0 0 15px; height: 15px; width: 15px; }
.bubble-integrity-audit-row.is-approved svg { color: #23715d; }
.bubble-integrity-audit-row span { display: grid; gap: 2px; min-width: 0; }
.bubble-integrity-audit-row strong { font-size: 8px; }
.bubble-integrity-audit-row small { color: var(--muted); font-size: 7px; }
.bubble-integrity-audit-row em { color: var(--ink); font-size: 8px; font-style: normal; line-height: 1.45; overflow-wrap: anywhere; }
.bubble-gauge-guidance { background: #eef8fb; border-left: 3px solid #16819a; display: grid; gap: 7px 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 9px 10px; }
.bubble-gauge-guidance.requires-review { background: #fff7e8; border-left-color: #c76712; }
.bubble-gauge-guidance span small, .bubble-gauge-guidance span strong { display: block; }
.bubble-gauge-guidance span small { color: var(--muted); font-size: 7px; }
.bubble-gauge-guidance span strong { font-size: 8px; margin-top: 3px; overflow-wrap: anywhere; }
.bubble-gauge-guidance p { color: var(--ink); font-size: 8px; grid-column: 1 / -1; line-height: 1.45; margin: 0; }
.bubble-gauge-guidance em { color: var(--muted); font-size: 7px; font-style: normal; grid-column: 1 / -1; }
.bubble-editor-heading { align-items: center; display: flex; grid-column: 1 / -1; justify-content: space-between; }
.bubble-editor-heading > div { align-items: center; display: flex; gap: 8px; }
.bubble-editor-heading > div:last-child { gap: 4px; }
.bubble-editor-heading small { color: var(--muted); display: block; font-size: 8px; margin-top: 2px; }
.bubble-editor-heading > div > span { align-items: center; border: 1px solid #343b42; border-radius: 50%; color: #262b30; display: flex; flex-shrink: 0; font-family: Arial, sans-serif; font-size: 10px; font-weight: 600; height: 28px; justify-content: center; white-space: nowrap; width: 28px; }
.bubble-editor-heading strong { font-size: 10px; }
.bubble-selected-toggle { align-items: center; background: var(--surface-soft); display: flex; gap: 8px; min-height: 34px; padding: 7px 9px; }
.bubble-selected-toggle input { flex: 0 0 auto; width: 15px; }
.bubble-selected-toggle span { color: var(--ink) !important; margin: 0 !important; }
.bubble-review-actions { background: var(--surface); border-top: 1px solid var(--border); margin-top: auto; padding: 12px 14px; }
.bubble-review-actions > .primary-button { width: 100%; }
.bubble-review-actions > div { display: grid; gap: 7px; grid-template-columns: 1fr 1fr 36px; margin-top: 8px; }
.bubble-review-actions a { text-decoration: none; }
.bubble-review-actions .secondary-button { min-width: 0; padding: 0 8px; }
.bubble-review-actions .is-disabled { opacity: .42; pointer-events: auto; }
.bubble-add-item.is-active, #bubble-add-item.is-active { background: var(--cyan-soft); border-color: #78bcb4; color: #155e57; }
.bubble-overlay.is-hidden:not(.is-drawing) { visibility: hidden; }
.bubble-overlay.is-hidden.is-drawing > :is(.bubble-leader-layer, .bubble-marker, .bubble-callout) { visibility: hidden; }
.bubble-canvas:fullscreen { background-color: #d8ddda; }

@container (max-width: 560px) {
  .bubble-review-grid { grid-template-columns: 26px minmax(0, 1fr) 60px 28px; }
  .bubble-inline-measurements { grid-template-columns: repeat(3, minmax(42px, 1fr)); }
  .bubble-inline-measurements .bubble-gauge-cell { grid-column: 1 / -1; }
  .bubble-inline-gauge-detail { grid-template-columns: 1fr; }
  .bubble-review-tools > span { display: none; }
}
.bubble-workspace-head-actions { align-items: center; display: flex; gap: 16px; }
.bubble-run-bar { background: #f7f9fb; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; }
.bubble-run-bar > div { border-left: 1px solid var(--border); padding: 10px 16px; }
.bubble-run-bar > div:first-child { border-left: 0; }
.bubble-run-bar span, .bubble-run-bar strong { display: block; }
.bubble-run-bar span { color: var(--muted); font-size: 8px; }
.bubble-run-bar strong { font-size: 10px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bubble-run-diagnostics { align-items: center; border-left: 1px solid var(--border); display: flex; min-width: 126px; padding: 8px 13px; position: relative; }
.bubble-run-diagnostics summary { align-items: center; color: var(--muted); cursor: pointer; display: flex; font-size: 8px; gap: 6px; list-style: none; white-space: nowrap; }
.bubble-run-diagnostics summary::-webkit-details-marker { display: none; }
.bubble-run-diagnostics summary svg { height: 13px; width: 13px; }
.bubble-run-diagnostics > strong { background: #fff; border: 1px solid var(--border); box-shadow: 0 8px 24px rgba(20,27,39,.1); max-width: 260px; padding: 8px 10px; position: absolute; right: 8px; top: calc(100% + 5px); z-index: 12; }

.bubble-template-layout { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr) 310px; margin: 0 auto; max-width: 1320px; }
.bubble-template-editor, .bubble-saved-templates, .bubble-rule-section { background: var(--surface); border: 1px solid var(--border); }
.bubble-template-editor > .management-head, .bubble-rule-section > .management-head { padding: 18px 20px; }
.bubble-template-controls { background: var(--surface-soft); border-bottom: 1px solid var(--border); border-top: 1px solid var(--border); display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 18px 20px; }
.bubble-template-controls .span-two { grid-column: span 2; }
.bubble-template-controls label > span { color: var(--muted); display: block; font-size: 8px; font-weight: 600; margin-bottom: 6px; }
.bubble-template-controls input, .bubble-template-controls select, .bubble-history-filter select { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 4px; height: 38px; min-width: 0; padding: 0 9px; width: 100%; }
.bubble-template-table-wrap { max-height: 460px; overflow: auto; }
.bubble-template-actions { align-items: center; border-top: 1px solid var(--border); display: flex; justify-content: space-between; padding: 14px 20px; }
.bubble-template-actions > span { color: var(--muted); font-size: 9px; }
.bubble-number.compact { height: 23px; width: 23px; }
.bubble-saved-templates { align-self: start; }
.bubble-saved-templates > header { align-items: center; background: #182127; color: #ffffff; display: flex; justify-content: space-between; padding: 18px; }
.bubble-saved-templates > header p { color: #72c8bd; font-size: 7px; font-weight: 700; margin: 0 0 4px; text-transform: uppercase; }
.bubble-saved-templates > header h2 { font-size: 14px; margin: 0; }
.bubble-saved-templates > header > strong { font-size: 23px; }
#bubble-template-list { display: grid; max-height: 680px; overflow-y: auto; }
.saved-template-card { border-bottom: 1px solid var(--border); padding: 15px 16px; }
.saved-template-card > header, .saved-template-card > footer { align-items: center; display: flex; justify-content: space-between; }
.saved-template-card > header > span { color: var(--primary); font-size: 8px; font-weight: 700; }
.saved-template-card h3 { font-size: 11px; margin: 11px 0 6px; }
.saved-template-card p { color: var(--muted); font-size: 8px; line-height: 1.55; margin: 0 0 11px; }
.saved-template-card footer { color: var(--muted); font-size: 8px; }
.saved-template-card footer .text-button { font-size: 8px; min-height: 27px; padding: 0 7px; }

.bubble-rule-layout { display: grid; gap: 18px; grid-template-columns: minmax(310px, .7fr) minmax(560px, 1.3fr); margin: 0 auto; max-width: 1320px; }
.bubble-tolerance-list { border-top: 1px solid var(--border); }
.bubble-tolerance-rule { align-items: center; border-bottom: 1px solid var(--border); display: grid; gap: 12px; grid-template-columns: 38px minmax(0, 1fr) auto; min-height: 78px; padding: 13px 16px; }
.bubble-tolerance-rule.is-disabled { opacity: .52; }
.bubble-rule-icon { align-items: center; background: var(--primary-soft); color: var(--primary); display: flex; height: 36px; justify-content: center; width: 36px; }
.bubble-rule-icon svg { height: 17px; width: 17px; }
.bubble-tolerance-rule h3 { font-size: 11px; margin: 0 0 5px; }
.bubble-tolerance-rule p { color: var(--muted); font-size: 8px; line-height: 1.5; margin: 0; }
.bubble-tolerance-rule > div:last-child { align-items: center; display: flex; gap: 4px; }
.system-rule-label { color: var(--subtle); font-size: 8px; }
.compact-row-button { min-height: 32px; padding: 0 11px; white-space: nowrap; }
.bubble-rule-gauge-fields > .form-grid { gap: 13px; }

.member-module-access { align-items: center; display: flex; gap: 5px; }
.member-module-access > label { cursor: pointer; }
.member-module-access input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.member-module-access label > span { align-items: center; background: var(--surface-soft); border: 1px solid var(--border); border-radius: 4px; color: var(--muted); display: inline-flex; font-size: 8px; gap: 4px; min-height: 28px; padding: 0 7px; }
.member-module-access input:checked + span { background: var(--primary-soft); border-color: #aebfea; color: var(--primary); }
.member-module-access input:disabled + span { opacity: .65; }
.member-module-access svg { height: 12px; width: 12px; }
.module-access-field { border: 0; margin: 0; padding: 0; }
.module-access-field > div { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.module-access-field > div > label { cursor: pointer; min-width: 0; position: relative; }
.form-grid .module-access-field input[type="checkbox"] { accent-color: var(--primary); height: 16px; left: 12px; margin: 0; padding: 0; position: absolute; top: 14px; width: 16px; z-index: 1; }
.module-access-field label > span { background: var(--surface-soft); border: 1px solid var(--border); display: grid; gap: 3px 7px; grid-template-columns: 18px minmax(0, 1fr); min-height: 76px; padding: 11px 10px 10px 38px; transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease; }
.module-access-field label:hover > span { border-color: var(--border-strong); }
.module-access-field input:checked + span { background: var(--primary-soft); border-color: #aebfea; }
.module-access-field input:focus-visible + span { box-shadow: 0 0 0 2px rgba(32, 98, 224, .2); }
.module-access-field svg { color: var(--primary); grid-row: 1 / 3; height: 16px; width: 16px; }
.module-access-field strong, .module-access-field small { display: block; }
.module-access-field strong { font-size: 10px; line-height: 1.35; }
.module-access-field small { color: var(--muted); font-size: 8px; line-height: 1.45; }
.result-config { margin: 0; }
.result-config > div { align-items: center; display: flex; justify-content: space-between; padding: 6px 0; }
.result-config dt { color: var(--muted); font-size: 9px; }
.result-config dd { font-size: 9px; font-weight: 600; margin: 0; max-width: 190px; overflow: hidden; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.result-validation { align-items: center; background: var(--primary-soft); display: flex; gap: 10px; margin: 18px 20px 0; padding: 12px; }
.result-validation > svg { color: var(--primary); flex: 0 0 auto; height: 18px; width: 18px; }
.result-validation strong, .result-validation span { display: block; }
.result-validation strong { font-size: 9px; }
.result-validation span { color: var(--muted); font-size: 8px; margin-top: 3px; }
.result-actions { display: grid; gap: 8px; padding: 18px 20px 24px; }
.result-actions .primary-button, .result-actions .secondary-button { width: 100%; }
.plm-result-action { position: relative; text-decoration: none; }
.plm-result-action .action-trailing-icon { height: 14px; margin-left: auto; width: 14px; }

.modal-backdrop { align-items: center; background: rgba(15, 25, 20, .52); display: flex; inset: 0; justify-content: center; padding: 24px; position: fixed; z-index: 100; }
.modal { background: var(--surface); border-radius: 7px; box-shadow: var(--shadow); max-height: calc(100vh - 48px); overflow-y: auto; width: min(620px, 100%); }
.task-modal { width: min(920px, 100%); }
.standard-modal { overflow-x: hidden; width: min(920px, 100%); }
.standard-modal > .modal-head { background: var(--surface); position: sticky; top: 0; z-index: 3; }
.standard-modal .modal-actions { background: var(--surface); border-top: 1px solid var(--border); bottom: 0; position: sticky; z-index: 3; }
.standard-path-switch { margin: 16px 22px 0; width: fit-content; }
.standard-path-switch button { align-items: center; display: inline-flex; gap: 6px; }
.standard-path-switch svg { height: 13px; width: 13px; }
.standard-template-path { background: #f3f7f4; border-bottom: 1px solid var(--border); border-top: 1px solid var(--border); margin-top: 14px; padding: 18px 22px; }
.standard-template-head { align-items: center; display: flex; gap: 16px; justify-content: space-between; margin-bottom: 10px; }
.standard-template-head strong, .standard-template-head small { display: block; }
.standard-template-head strong { font-size: 10px; }
.standard-template-head small { color: var(--muted); font-size: 8px; margin-top: 3px; }
.standard-template-path textarea { background: var(--surface); border: 1px solid var(--border-strong); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 9px; line-height: 1.75; min-height: 250px; resize: vertical; width: 100%; }
.standard-document-path { background: var(--surface-soft); border-bottom: 1px solid var(--border); border-top: 1px solid var(--border); margin-top: 14px; padding: 18px 22px; }
.standard-document-drop { align-items: center; border: 1px dashed var(--border-strong); cursor: pointer; display: grid; gap: 3px 11px; grid-template-columns: 36px 1fr; min-height: 70px; padding: 12px; }
.standard-document-drop input { display: none; }
.standard-document-drop > span { align-items: center; background: var(--primary-soft); color: var(--primary); display: flex; grid-row: 1 / 3; height: 36px; justify-content: center; width: 36px; }
.standard-document-drop svg { height: 17px; width: 17px; }
.standard-document-drop strong { font-size: 10px; }
.standard-document-drop small { color: var(--muted); font-size: 8px; }
.document-parse-status { align-items: flex-start; border: 1px solid var(--border); display: grid; gap: 10px; grid-template-columns: 34px 1fr; margin-top: 10px; padding: 11px; }
.document-status-icon { align-items: center; background: var(--primary-soft); color: var(--primary); display: flex; height: 34px; justify-content: center; width: 34px; }
.document-status-icon svg { height: 16px; width: 16px; }
.document-parse-status strong { font-size: 10px; }
.document-parse-status p { color: var(--muted); font-size: 8px; margin: 3px 0 0; }
#document-parse-warnings, #template-compile-warnings { color: #8a6425; display: grid; font-size: 8px; gap: 2px; margin-top: 5px; }
.standard-form-scroll { overflow: visible; }
.standard-config-section { border-bottom: 1px solid var(--border); display: grid; gap: 22px; grid-template-columns: 150px minmax(0, 1fr); padding: 20px 22px; }
.standard-config-section > header { align-items: flex-start; display: flex; gap: 9px; }
.standard-config-section > header > span { align-items: center; background: var(--surface-soft); color: var(--primary); display: flex; font-size: 8px; font-weight: 700; height: 25px; justify-content: center; width: 25px; }
.standard-config-section > header h3 { font-size: 11px; margin: 1px 0 3px; }
.standard-config-section > header p { color: var(--muted); font-size: 8px; margin: 0; }
.standard-content-grid { display: grid; gap: 7px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.standard-content-grid > label { cursor: pointer; min-width: 0; }
.standard-content-grid input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.standard-content-grid label > span { align-items: center; border: 1px solid var(--border); display: grid; gap: 2px 8px; grid-template-columns: 25px 1fr; min-height: 56px; padding: 7px; }
.standard-content-grid label > span > svg { color: var(--muted); grid-row: 1 / 3; height: 16px; width: 16px; }
.standard-content-grid strong { font-size: 9px; }
.standard-content-grid small { color: var(--muted); font-size: 7px; }
.standard-content-grid input:checked + span { background: var(--primary-soft); border-color: #94bdaa; }
.standard-content-grid input:checked + span > svg { color: var(--primary); }
.strategy-config-body { display: grid; gap: 14px; min-width: 0; }
.standard-strategy-features { border: 0; margin: 0; min-width: 0; padding: 0; }
.standard-strategy-features legend { margin-bottom: 7px; }
.strategy-feature-grid { display: grid; gap: 6px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.strategy-feature-grid label { cursor: pointer; min-width: 0; }
.strategy-feature-grid input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.strategy-feature-grid span { align-items: center; border: 1px solid var(--border); display: flex; font-size: 8px; min-height: 34px; padding: 7px 9px; }
.strategy-feature-grid input:checked + span { background: var(--primary-soft); border-color: #94bdaa; color: var(--primary); font-weight: 600; }
.strategy-settings { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.strategy-toggle { margin-top: -2px; }
.standard-strategy-preview { background: #17261f; color: #f5f8f6; padding: 20px 22px 22px; }
.standard-strategy-preview > header { align-items: flex-start; display: flex; justify-content: space-between; }
.standard-strategy-preview > header > div { align-items: flex-start; display: flex; gap: 9px; }
.standard-strategy-preview > header > div > span { align-items: center; background: rgba(255,255,255,.08); color: #8bd0ae; display: flex; font-size: 8px; font-weight: 700; height: 25px; justify-content: center; width: 25px; }
.standard-strategy-preview h3 { font-size: 11px; margin: 1px 0 3px; }
.standard-strategy-preview header p { color: #9db0a6; font-size: 8px; margin: 0; }
.strategy-preview-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.strategy-preview-tags span { background: rgba(139,208,174,.12); border: 1px solid rgba(139,208,174,.25); color: #b8e3cd; font-size: 8px; padding: 5px 7px; }
.strategy-preview-tags .is-warning { background: rgba(223,170,67,.1); border-color: rgba(223,170,67,.3); color: #edc678; }
.standard-strategy-preview dl { display: grid; gap: 0 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 12px 0 0; }
.standard-strategy-preview dl > div { align-items: center; border-top: 1px solid rgba(255,255,255,.09); display: flex; justify-content: space-between; min-width: 0; padding: 9px 0; }
.standard-strategy-preview dt { color: #9db0a6; font-size: 8px; }
.standard-strategy-preview dd { font-size: 8px; font-weight: 600; margin: 0; overflow: hidden; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.strategy-preview-warning { background: rgba(223,170,67,.1); border-left: 2px solid #dfaa43; color: #edc678; font-size: 8px; margin-top: 12px; padding: 8px 10px; }
.standard-color-field { border: 0; margin: 0; min-width: 0; padding: 0; }
.standard-color-field legend { margin-bottom: 7px; }
.color-swatches { align-items: center; display: flex; gap: 8px; min-height: 38px; }
.color-swatches input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.form-grid .color-swatches input { border: 0; height: 1px; padding: 0; width: 1px; }
.color-swatches span { border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border-strong); cursor: pointer; display: block; height: 20px; position: relative; width: 20px; }
.color-swatches input:checked + span { box-shadow: 0 0 0 2px var(--primary); }
.color-swatches .cyan { background: #00a6c8; }
.color-swatches .yellow { background: #e3b325; }
.color-swatches .green { background: #479c65; }
.color-swatches .red { background: #c94d48; }
.color-swatches .white { background: #fff; }
.compact-modal { width: min(610px, 100%); }
.template-modal-backdrop { z-index: 120; }
.template-modal { display: flex; flex-direction: column; height: min(820px, calc(100vh - 48px)); overflow: hidden; width: min(1120px, 100%); }
.template-modal-head { flex: 0 0 auto; }
.template-toolbar { align-items: center; background: var(--surface-soft); border-bottom: 1px solid var(--border); display: flex; flex: 0 0 auto; gap: 18px; justify-content: space-between; padding: 12px 22px; }
.template-filters { align-items: center; display: flex; gap: 3px; min-width: 0; }
.template-filters button { align-items: center; background: transparent; border: 0; border-radius: 4px; color: var(--muted); cursor: pointer; display: inline-flex; font-size: 9px; gap: 6px; min-height: 32px; padding: 0 10px; white-space: nowrap; }
.template-filters button:hover { background: var(--surface-strong); color: var(--ink); }
.template-filters button.is-selected { background: var(--surface); box-shadow: 0 1px 3px rgba(24,33,28,.09); color: var(--ink); font-weight: 600; }
.template-filters em { background: var(--surface-strong); border-radius: 3px; color: var(--muted); font-size: 8px; font-style: normal; min-width: 18px; padding: 2px 4px; text-align: center; }
.template-filters button.is-selected em { background: var(--primary-soft); color: var(--primary); }
.template-search { align-items: center; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 4px; display: flex; flex: 0 0 240px; gap: 7px; padding: 0 9px; }
.template-search svg { color: var(--muted); flex: 0 0 auto; height: 14px; width: 14px; }
.template-search input { background: transparent; border: 0; height: 34px; min-width: 0; outline: 0; width: 100%; }
.template-library-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 22px 22px; }
.template-library-summary { align-items: center; display: flex; justify-content: space-between; margin-bottom: 11px; }
.template-library-summary strong { font-size: 10px; }
.template-library-summary span { color: var(--muted); font-size: 9px; }
.template-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.template-card { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; display: flex; flex-direction: column; min-height: 314px; padding: 16px; }
.template-card:hover { border-color: var(--border-strong); box-shadow: 0 5px 16px rgba(24,32,29,.06); }
.template-card-head { align-items: center; display: flex; justify-content: space-between; }
.template-kind, .template-workflow { align-items: center; display: inline-flex; font-size: 8px; gap: 5px; }
.template-kind { color: var(--primary); font-weight: 700; }
.template-kind svg { height: 13px; width: 13px; }
.template-workflow { background: var(--surface-strong); border-radius: 3px; color: var(--muted); padding: 4px 6px; }
.template-card h3 { font-size: 14px; margin: 12px 0 10px; }
.template-command { align-items: start; background: #f0f3f1; border-left: 3px solid var(--primary); display: grid; gap: 5px 8px; grid-template-columns: minmax(0, 1fr) auto; min-height: 69px; padding: 9px 9px 9px 11px; }
.template-command > span { color: var(--muted); font-size: 8px; font-weight: 600; grid-column: 1; text-transform: uppercase; }
.template-command code { color: var(--ink); font-family: Inter, "Noto Sans SC", system-ui, sans-serif; font-size: 10px; grid-column: 1; line-height: 1.55; overflow-wrap: anywhere; }
.template-command .icon-button { grid-column: 2; grid-row: 1 / 3; }
.template-facts { display: grid; gap: 10px; margin: 13px 0 15px; }
.template-facts > div { display: grid; gap: 4px; grid-template-columns: 72px minmax(0, 1fr); }
.template-facts dt { align-items: center; color: var(--muted); display: flex; font-size: 8px; gap: 5px; }
.template-facts dt svg { flex: 0 0 auto; height: 12px; width: 12px; }
.template-facts dd { font-size: 9px; line-height: 1.55; margin: 0; overflow-wrap: anywhere; }
.template-card > footer { align-items: end; border-top: 1px solid var(--border); display: flex; gap: 12px; justify-content: space-between; margin-top: auto; padding-top: 12px; }
.template-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.template-tags span { background: var(--primary-soft); border-radius: 3px; color: var(--primary); font-size: 8px; padding: 3px 5px; }
.template-card > footer .primary-button { flex: 0 0 auto; font-size: 9px; min-height: 34px; padding: 0 11px; }
.template-empty { align-items: center; color: var(--muted); display: flex; flex-direction: column; grid-column: 1 / -1; justify-content: center; min-height: 360px; text-align: center; }
.template-empty svg { height: 24px; margin-bottom: 10px; width: 24px; }
.template-empty strong { color: var(--ink); font-size: 11px; }
.template-empty span { font-size: 9px; margin-top: 5px; }
.modal-head { align-items: flex-start; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; padding: 20px 22px 16px; }
.modal-head h2 { font-size: 19px; margin-bottom: 0; }
.task-wizard-head { border-bottom: 0; padding-bottom: 13px; }
.task-wizard-progress { border-bottom: 1px solid var(--border); display: grid; grid-template-columns: repeat(3, 1fr); list-style: none; margin: 0; padding: 0 22px 15px; }
.task-wizard-progress li { align-items: center; color: var(--subtle); display: flex; font-size: 9px; gap: 8px; min-width: 0; position: relative; }
.task-wizard-progress li::after { background: var(--border); content: ""; height: 1px; left: 31px; position: absolute; right: 10px; top: 12px; }
.task-wizard-progress li:last-child::after { display: none; }
.task-wizard-progress li span { align-items: center; background: var(--surface-strong); border-radius: 50%; display: flex; flex: 0 0 auto; font-size: 8px; height: 24px; justify-content: center; position: relative; width: 24px; z-index: 1; }
.task-wizard-progress li strong { background: var(--surface); font-weight: 600; padding-right: 10px; position: relative; white-space: nowrap; z-index: 1; }
.task-wizard-progress li.is-current, .task-wizard-progress li.is-complete { color: var(--primary); }
.task-wizard-progress li.is-current span { background: var(--primary); color: #fff; }
.task-wizard-progress li.is-complete span { background: var(--primary-soft); }
.task-wizard-progress li.is-complete::after { background: #8fa4df; }
#new-task-form.wizard-step-1 > :not(.wizard-step-one):not(.modal-actions) { display: none !important; }
#new-task-form.wizard-step-2 > .wizard-step-one, #new-task-form.wizard-step-2 > .wizard-step-three { display: none !important; }
#new-task-form.wizard-step-3 > :not(.wizard-step-three):not(.modal-actions) { display: none !important; }
.wizard-context-band { background: var(--surface-soft); border-bottom: 1px solid var(--border); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 12px 22px; }
.wizard-context-band > div { border-left: 1px solid var(--border); min-width: 0; padding: 1px 14px; }
.wizard-context-band > div:first-child { border-left: 0; padding-left: 0; }
.wizard-context-band span, .wizard-context-band strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wizard-context-band span { color: var(--subtle); font-size: 8px; margin-bottom: 4px; }
.wizard-context-band strong { font-size: 9px; }
.upload-step { padding-bottom: 24px; padding-top: 23px; }
.upload-step .drop-zone { min-height: 210px; }
.upload-step .upload-icon { height: 44px; width: 44px; }
.upload-step .upload-icon svg { height: 20px; width: 20px; }
.wizard-section-heading { align-items: end; display: flex; gap: 18px; justify-content: space-between; margin-bottom: 13px; }
.wizard-section-heading > div > span { color: var(--primary); display: block; font-size: 8px; font-weight: 700; margin-bottom: 4px; text-transform: uppercase; }
.wizard-section-heading h3 { font-size: 14px; margin: 0; }
.wizard-section-heading > small { color: var(--muted); font-size: 8px; }
.wizard-goal-grid { display: grid; gap: 9px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wizard-goal { align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 5px; cursor: pointer; display: grid; gap: 9px; grid-template-columns: 36px minmax(0, 1fr) 15px; min-height: 74px; padding: 10px; text-align: left; }
.wizard-goal:hover { border-color: var(--border-strong); }
.wizard-goal.is-selected { background: var(--primary-soft); border-color: #829be0; }
.wizard-goal-icon { align-items: center; background: var(--surface-strong); border-radius: 4px; color: var(--muted); display: flex; height: 36px; justify-content: center; width: 36px; }
.wizard-goal.is-selected .wizard-goal-icon { background: #dce5fa; color: var(--primary); }
.wizard-goal-icon svg { height: 17px; width: 17px; }
.wizard-goal strong, .wizard-goal small { display: block; }
.wizard-goal strong { font-size: 10px; margin-top: 4px; }
.wizard-goal small { color: var(--muted); font-size: 8px; line-height: 1.4; margin-top: 4px; }
.wizard-goal-check { color: var(--primary); height: 14px; opacity: 0; width: 14px; }
.wizard-goal.is-selected .wizard-goal-check { opacity: 1; }
.plan-chip { border-radius: 3px; display: inline-flex; font-size: 7px; font-style: normal; font-weight: 700; line-height: 1; padding: 4px 5px; width: fit-content; }
.plan-chip.trial { background: #e5f2e9; color: #276b48; }
.plan-chip.pro { background: var(--blue-soft); color: var(--blue); }
.plan-chip.enterprise { background: #ece8de; color: #64573d; }
.wizard-option-grid { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.wizard-option-grid > label { min-width: 0; }
.wizard-simple-options select { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 4px; color: var(--ink); height: 44px; padding: 0 10px; width: 100%; }
.inherited-standard-control { align-items: center; background: var(--surface-soft); border: 1px solid var(--border); border-radius: 4px; display: grid; gap: 2px 8px; grid-template-columns: 24px minmax(0, 1fr); min-height: 44px; padding: 7px 10px; }
.inherited-standard-control svg { color: var(--primary); grid-row: 1 / 3; height: 16px; width: 16px; }
.inherited-standard-control strong { font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inherited-standard-control small { color: var(--muted); font-size: 7px; }
.field-label em { color: var(--subtle); font-size: 8px; font-style: normal; font-weight: 500; margin-left: 4px; }
#new-task-form .task-context-grid { display: none; }
#new-task-form.is-engineering-mode .task-context-grid { display: grid; grid-template-columns: 1fr; }
#new-task-form .task-context-grid .task-project-field { display: none; }
#new-task-form .task-context-grid .field-label-row { margin-bottom: 7px; }
#new-task-form .task-context-grid .field-label-row .field-label { margin-bottom: 0; }
#new-task-form .annotation-config { display: none; }
#new-task-form.is-partial-mode .annotation-config:not([hidden]), #new-task-form.is-engineering-mode .annotation-config:not([hidden]) { display: block; }
#new-task-form .tolerance-config { display: none; }
#new-task-form.is-custom-tolerance .tolerance-config:not([hidden]) { display: block; }
#new-task-form:not(.is-engineering-mode) > .tool-config { display: none; }
#new-task-form:not(.is-expert-open) > .advanced-settings { display: none; }
#new-task-form:not(.is-partial-mode):not(.is-engineering-mode) > .wizard-expert-control { display: none; }
.wizard-expert-control { align-items: center; background: var(--surface-soft); display: flex; gap: 12px; justify-content: space-between; }
.wizard-expert-control .text-button { min-height: 30px; padding: 0; }
.wizard-expert-control small { color: var(--subtle); font-size: 8px; }
.wizard-expert-chevron { transition: transform .18s ease; }
#new-task-form.is-expert-open .wizard-expert-chevron { transform: rotate(180deg); }
.wizard-review { padding: 22px; }
.wizard-review-grid { border-bottom: 1px solid var(--border); border-top: 1px solid var(--border); }
.wizard-review-row { align-items: start; border-top: 1px solid var(--border); display: grid; gap: 18px; grid-template-columns: 130px minmax(0, 1fr); padding: 13px 2px; }
.wizard-review-row:first-child { border-top: 0; }
.wizard-review-row > span { color: var(--muted); font-size: 9px; }
.wizard-review-row strong { display: block; font-size: 10px; line-height: 1.55; }
.wizard-review-row small { color: var(--muted); display: block; font-size: 8px; line-height: 1.55; margin-top: 4px; }
.wizard-review-note { align-items: center; background: var(--primary-soft); color: var(--primary); display: flex; font-size: 8px; gap: 9px; margin-top: 16px; padding: 10px 12px; }
.wizard-review-note svg { flex: 0 0 auto; height: 15px; width: 15px; }
.wizard-actions { align-items: center; border-top: 1px solid var(--border); display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; position: sticky; bottom: 0; background: var(--surface); z-index: 3; }
.wizard-actions > span { min-width: 0; }
.form-section { border-bottom: 1px solid var(--border); padding: 17px 22px; }
.project-file-grid, .task-context-grid { align-items: end; display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.task-context-grid .span-two { grid-column: 1 / -1; }
.form-context-note { align-items: center; background: var(--surface-soft); display: flex; gap: 9px; min-height: 58px; padding: 10px 12px; }
.form-context-note > svg { color: var(--primary); height: 18px; width: 18px; }
.form-context-note small, .form-context-note strong { display: block; }
.form-context-note small { color: var(--muted); font-size: 8px; }
.form-context-note strong { font-size: 9px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field-label { display: block; font-size: 10px; font-weight: 600; margin-bottom: 7px; }
.field-label-row { align-items: center; display: flex; justify-content: space-between; }
.field-label-row > span { color: var(--muted); font-size: 9px; }
.semantic-label-actions { align-items: center; display: flex; gap: 13px; }
.semantic-label-actions > span { color: var(--muted); font-size: 9px; }
.semantic-label-actions .text-button { font-size: 9px; gap: 5px; }
.semantic-label-actions svg { height: 13px; width: 13px; }
.form-grid { display: grid; gap: 14px 12px; grid-template-columns: 1fr 1fr; }
.form-grid .span-two { grid-column: 1 / -1; }
.form-grid input, .form-grid select, .form-grid textarea, .project-file-grid select, .task-context-grid select, .settings-grid select, .settings-grid input, .settings-grid textarea { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 4px; color: var(--ink); padding: 0 10px; width: 100%; }
.form-grid input, .form-grid select, .project-file-grid select, .task-context-grid select, .settings-grid select, .settings-grid input { height: 38px; }
.form-grid textarea { line-height: 1.55; padding-bottom: 9px; padding-top: 9px; resize: vertical; }
.settings-grid textarea { line-height: 1.5; min-height: 82px; padding-bottom: 9px; padding-top: 9px; resize: vertical; }
.creation-setting { align-items: flex-start; background: var(--surface-soft); border: 1px solid var(--border); border-radius: 5px; cursor: pointer; display: flex; gap: 10px; padding: 11px 12px; }
.creation-setting input { accent-color: var(--primary); flex: 0 0 auto; height: 15px !important; margin: 2px 0 0; width: 15px !important; }
.creation-setting strong, .creation-setting small { display: block; }
.creation-setting strong { font-size: 10px; }
.creation-setting small { color: var(--muted); font-size: 9px; margin-top: 4px; }
.drop-zone { align-items: center; border: 1px dashed #aab7b0; border-radius: 6px; cursor: pointer; display: flex; flex-direction: column; justify-content: center; min-height: 118px; padding: 15px; text-align: center; }
.drop-zone:hover, .drop-zone.is-dragging { background: var(--primary-soft); border-color: var(--primary); }
.drop-zone input { display: none; }
.upload-icon { align-items: center; background: var(--primary-soft); border-radius: 50%; color: var(--primary); display: flex; height: 36px; justify-content: center; margin-bottom: 8px; width: 36px; }
.upload-icon svg { height: 17px; width: 17px; }
.drop-zone strong { font-size: 11px; }
.drop-zone small { color: var(--muted); font-size: 9px; margin-top: 5px; }
.selected-files { display: grid; gap: 6px; margin-top: 9px; }
.batch-rule-toolbar { align-items: end; background: var(--surface-soft); border: 1px solid var(--border); display: grid; gap: 8px; grid-template-columns: minmax(150px, 1fr) minmax(130px, .7fr) minmax(135px, .7fr) minmax(170px, 1fr) auto; margin-top: 10px; padding: 10px; }
.batch-rule-toolbar > div > span, .batch-rule-toolbar > div > small { display: block; }
.batch-rule-toolbar > div > small { color: var(--muted); font-size: 8px; margin-top: 3px; }
.selected-file.batch-file { align-items: center; display: grid; grid-template-columns: 18px minmax(110px, 1fr) auto minmax(110px, .7fr) minmax(150px, 1fr) 28px; }
.selected-file select { font-size: 8px; min-height: 30px; padding: 0 25px 0 7px; }
.selected-file { align-items: center; background: var(--surface-soft); display: flex; font-size: 9px; gap: 7px; min-height: 36px; padding: 6px 7px 6px 9px; }
.selected-file span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-file em { color: var(--muted); font-style: normal; }
.selected-file .icon-button { color: var(--muted); height: 25px; width: 25px; }
.selected-file .icon-button svg { height: 13px; width: 13px; }
.field-error { color: var(--red); font-size: 9px; margin: 8px 0 0; }
.semantic-builder { background: var(--surface-soft); }
.semantic-builder > summary { align-items: center; cursor: pointer; display: flex; justify-content: space-between; list-style: none; }
.semantic-builder > summary::-webkit-details-marker { display: none; }
.semantic-builder > summary > span { align-items: center; display: grid; gap: 2px 8px; grid-template-columns: 22px minmax(0, 1fr); }
.semantic-builder > summary > span > svg { color: var(--primary); grid-row: 1 / 3; height: 16px; width: 16px; }
.semantic-builder > summary strong { font-size: 10px; }
.semantic-builder > summary small { color: var(--muted); font-size: 8px; }
.semantic-builder > summary > svg { color: var(--muted); height: 15px; transition: transform .18s ease; width: 15px; }
.semantic-builder[open] > summary > svg { transform: rotate(180deg); }
.semantic-builder-body { border-top: 1px solid var(--border); margin-top: 13px; padding-top: 13px; }
.semantic-input-row { align-items: stretch; display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr) auto; }
.semantic-input-row textarea { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 4px; color: var(--ink); line-height: 1.5; min-height: 56px; padding: 9px 10px; resize: vertical; width: 100%; }
.semantic-result { align-items: flex-start; background: var(--surface); border-left: 3px solid var(--primary); display: grid; gap: 10px; grid-template-columns: 32px minmax(0, 1fr); margin-top: 10px; padding: 10px 12px; }
.semantic-result-icon { align-items: center; background: var(--primary-soft); border-radius: 4px; color: var(--primary); display: flex; height: 32px; justify-content: center; width: 32px; }
.semantic-result-icon svg { height: 16px; width: 16px; }
.semantic-result small, .semantic-result strong, .semantic-result p { display: block; }
.semantic-result small { color: var(--muted); font-size: 8px; }
.semantic-result strong { font-size: 10px; margin-top: 2px; }
.semantic-result p { color: var(--muted); font-size: 9px; margin: 4px 0 0; }
.semantic-result > div > div { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.semantic-result > div > div span { background: var(--surface-strong); border-radius: 3px; color: var(--muted); font-size: 8px; padding: 3px 6px; }
.intent-grid { display: grid; gap: 9px; grid-template-columns: 1fr 1fr; }
.intent-option { align-items: center; border: 1px solid var(--border); border-radius: 5px; cursor: pointer; display: grid; gap: 10px; grid-template-columns: 36px 1fr 18px; min-height: 66px; padding: 10px 12px; position: relative; }
.intent-option:hover { border-color: var(--border-strong); }
.intent-option.is-selected { background: var(--primary-soft); border-color: #829be0; }
.intent-option input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.intent-icon { align-items: center; background: var(--surface-strong); border-radius: 4px; color: var(--muted); display: flex; height: 36px; justify-content: center; width: 36px; }
.intent-option.is-selected .intent-icon { background: #dde6fa; color: var(--primary); }
.intent-icon svg { height: 18px; width: 18px; }
.intent-option strong, .intent-option small { display: block; }
.intent-option strong { font-size: 10px; }
.intent-option small { color: var(--muted); font-size: 8px; margin-top: 4px; }
.intent-check { color: var(--primary); height: 15px; opacity: 0; width: 15px; }
.intent-option.is-selected .intent-check { opacity: 1; }
.settings-section { border-bottom: 0; }
.settings-grid { display: grid; gap: 11px; grid-template-columns: 1fr 1fr; margin-top: 8px; }
.settings-grid label > span { color: var(--muted); display: block; font-size: 8px; margin-bottom: 5px; }
.settings-grid select:disabled { background: var(--surface-strong); }
.tolerance-grid { display: grid; gap: 6px; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); margin-top: 8px; }
.tolerance-grid label { align-items: center; background: var(--surface-soft); border: 1px solid var(--border); border-radius: 4px; cursor: pointer; display: flex; gap: 6px; min-height: 35px; padding: 7px 8px; }
.tolerance-grid input { accent-color: var(--primary); margin: 0; }
.tolerance-grid input:disabled + span { color: var(--subtle); }
.tolerance-grid span { font-size: 8px; }
.advanced-settings { border-bottom: 1px solid var(--border); }
.advanced-settings summary { align-items: center; cursor: pointer; display: flex; justify-content: space-between; list-style: none; }
.advanced-settings summary::-webkit-details-marker { display: none; }
.advanced-settings summary > span { align-items: center; display: flex; font-size: 10px; font-weight: 600; gap: 7px; }
.advanced-settings summary svg { height: 15px; width: 15px; }
.advanced-settings[open] summary > svg { transform: rotate(180deg); }
.advanced-settings-grid { grid-template-columns: repeat(3, 1fr); padding-top: 9px; }
.expert-subsection { border-top: 1px solid var(--border); margin-top: 16px; padding-top: 13px; }
.expert-subsection > summary { align-items: center; color: var(--muted); cursor: pointer; display: flex; font-size: 9px; font-weight: 600; justify-content: space-between; list-style: none; }
.expert-subsection > summary::-webkit-details-marker { display: none; }
.expert-subsection > summary::after { content: "+"; font-size: 14px; font-weight: 400; }
.expert-subsection[open] > summary::after { content: "-"; }
.dense-settings { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dense-settings .span-two { grid-column: span 2; }
.expert-groups { display: grid; gap: 14px; padding-top: 13px; }
.expert-group { background: var(--surface-soft); border-left: 2px solid var(--border-strong); padding: 11px 12px 13px; }
.expert-group h4 { font-size: 9px; margin: 0; }
.supplemental-expert { background: var(--surface-soft); }
.advanced-toggles { display: grid; gap: 0 18px; grid-template-columns: 1fr 1fr; }
.canvas-stage.is-empty img { opacity: .2; }
.toggle-setting { align-items: flex-start; border-top: 1px solid var(--border); cursor: pointer; display: flex; gap: 9px; margin-top: 16px; padding-top: 14px; }
.toggle-setting input { accent-color: var(--primary); margin: 2px 0 0; }
.toggle-setting strong, .toggle-setting small { display: block; }
.toggle-setting strong { font-size: 9px; }
.toggle-setting small { color: var(--muted); font-size: 8px; margin-top: 4px; }
.modal-actions { display: flex; gap: 9px; justify-content: flex-end; padding: 18px 22px; }
.modal-actions.wizard-actions { display: grid; }
.confirm-modal { width: min(520px, 100%); }
.confirm-head { align-items: center; gap: 13px; }
.confirm-head > div { flex: 1; }
.confirm-symbol { align-items: center; background: var(--cyan-soft); border-radius: 5px; color: var(--cyan); display: flex; flex: 0 0 auto; height: 38px; justify-content: center; width: 38px; }
.confirm-symbol.is-danger { background: var(--red-soft); color: var(--red); }
.confirm-symbol svg { height: 18px; width: 18px; }
.confirm-content { padding: 21px 22px 5px; }
.confirm-content > p { font-size: 13px; font-weight: 600; line-height: 1.55; margin-bottom: 12px; }
.confirm-impact { background: var(--surface-soft); border-left: 3px solid var(--border-strong); color: var(--muted); font-size: 10px; line-height: 1.65; padding: 11px 12px; }
.toast { align-items: center; background: #151a22; border-radius: 5px; bottom: 22px; color: #fff; display: flex; gap: 8px; left: 50%; opacity: 0; padding: 10px 14px; pointer-events: none; position: fixed; transform: translate(-50%, 12px); transition: .22s ease; z-index: 200; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast svg { color: #9bd5b8; height: 15px; width: 15px; }
.toast span { font-size: 10px; }
[data-tooltip]::after { background: #151a22; border-radius: 3px; color: #fff; content: attr(data-tooltip); font-size: 8px; left: 50%; opacity: 0; padding: 5px 7px; pointer-events: none; position: absolute; top: calc(100% + 6px); transform: translateX(-50%); transition: opacity .15s; white-space: nowrap; z-index: 80; }
[data-tooltip]:hover::after { opacity: 1; }

@media (max-width: 1120px) {
  :root { --sidebar: 82px; }
  .sidebar { padding-left: 10px; padding-right: 10px; }
  .brand { justify-content: center; padding-left: 0; padding-right: 0; }
  .brand > div, .nav-section-label, .nav-item > span, .nav-item em, .sidebar-project, .usage-block, .sidebar-engine { display: none; }
  .nav-item { justify-content: center; padding: 0; }
  .product-module-switch { grid-template-columns: 1fr; }
  .product-module-switch > [data-product-module] { justify-content: center; min-height: 38px; padding: 0; }
  .product-module-switch > [data-product-module] > span { display: none; }
  .member-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-overview > div:nth-child(3) { border-left: 0; }
  .member-overview > div:nth-child(3), .member-overview > div:nth-child(4) { border-top: 1px solid var(--border); }
  .member-table th:nth-child(2), .member-table td:nth-child(2), .member-table th:nth-child(4), .member-table td:nth-child(4) { display: none; }
  .member-table th, .member-table td { padding-left: 10px; padding-right: 10px; }
  .member-table th:first-child { width: 30%; }
  .member-table th:nth-child(3) { width: 31%; }
  .member-table th:nth-child(5) { width: 11%; }
  .member-table th:nth-child(6) { width: 21%; }
  .member-table th:last-child { width: 7%; }
  .workspace-body { grid-template-columns: minmax(0, 1fr) 330px; }
  .standard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .active-standard-band { grid-template-columns: 1fr 1.3fr; }
  .active-standard-band > button { grid-column: 1 / -1; justify-self: start; margin: 0 24px 20px; }
  .task-table th:nth-child(2), .task-table td:nth-child(2), .task-table th:nth-child(5), .task-table td:nth-child(5) { display: none; }
  .task-table th:first-child { width: 38%; }
  .task-table th:nth-child(3) { width: 18%; }
  .task-table th:nth-child(4) { width: 28%; }
  .task-table th:last-child { width: 16%; }
  .project-table th:nth-child(2), .project-table td:nth-child(2), .project-table th:nth-child(4), .project-table td:nth-child(4) { display: none; }
  .project-table th:first-child { width: 34%; }
  .project-table th:nth-child(3) { width: 38%; }
  .project-table th:nth-child(5) { width: 16%; }
  .project-table th:last-child { width: 12%; }
  .intake-launch { grid-template-columns: 46px minmax(220px, 1fr) auto; }
  .intake-launch-context { grid-column: 2 / -1; grid-row: 2; }
  .intake-launch-context > div:first-child { border-left: 0; padding-left: 0; }
  .integration-status-band { grid-template-columns: 46px minmax(220px, 1fr) auto; }
  .integration-status-facts { grid-column: 2 / -1; grid-row: 2; }
  .integration-status-facts > div:first-child { border-left: 0; padding-left: 0; }
}

@media (max-width: 760px) {
  .bubble-workflow-steps { overflow-x: auto; padding: 0 8px; }
  .bubble-workflow-steps li { font-size: 8px; min-width: 108px; }
  .bubble-workflow-steps li:not(:last-child)::after { left: calc(50% + 46px); right: calc(-50% + 46px); }
  .bubble-state-legend { gap: 10px; overflow-x: auto; white-space: nowrap; }
  .bubble-state-legend em { margin-left: 4px; }
  :root { --sidebar: 248px; }
  .sidebar { box-shadow: var(--shadow); padding-left: 14px; padding-right: 14px; transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.is-open { transform: translateX(0); }
  .brand { justify-content: flex-start; padding-left: 10px; }
  .brand > div, .nav-section-label, .nav-item > span, .nav-item em, .sidebar-project, .usage-block, .sidebar-engine { display: block; }
  .nav-item { justify-content: flex-start; padding: 0 12px; }
  .nav-item > span { flex: 1; }
  .product-module-switch > [data-product-module] { justify-content: flex-start; min-height: 48px; padding: 6px 7px; }
  .product-module-switch > [data-product-module] > span { display: block; }
  .sidebar-project > div { display: flex; }
  .main-area { margin-left: 0; }
  .topbar { height: 60px; padding: 0 13px; }
  .mobile-nav { align-items: center; background: transparent; border: 0; display: inline-flex; height: 36px; justify-content: center; width: 36px; }
  .workspace-badge, .context-standard, .user-copy, .user-button > svg, .user-switcher > svg, .topbar-actions > .icon-button:first-child { display: none; }
  .project-switcher select { max-width: 190px; }
  .view { min-height: calc(100vh - 60px); padding: 25px 16px 38px; }
  .page-heading { align-items: flex-start; gap: 18px; }
  .page-heading h1 { font-size: 22px; }
  .page-heading .primary-button { padding: 0 11px; }
  .command-center { grid-template-columns: 1fr; padding: 15px 0; }
  .intake-launch { align-items: start; grid-template-columns: 40px minmax(0, 1fr); padding: 16px 0; }
  .intake-launch-icon { height: 40px; width: 40px; }
  .intake-launch-context, .intake-launch-actions { grid-column: 1 / -1; }
  .intake-launch-context > div:first-child { border-left: 0; padding-left: 0; }
  .intake-launch-actions { justify-content: space-between; }
  .command-input { grid-template-columns: 1fr; }
  .command-input .primary-button { justify-self: start; }
  .command-template-bar { align-items: flex-start; flex-wrap: wrap; grid-column: auto; }
  .quick-template-list { flex-basis: calc(100% - 72px); }
  .template-library-link { margin-left: 66px; }
  .metric-strip { grid-template-columns: 1fr 1fr; }
  .metric-strip > div:nth-child(3) { border-left: 0; border-top: 1px solid var(--border); }
  .metric-strip > div:nth-child(4) { border-top: 1px solid var(--border); }
  .metric-strip > div { padding: 15px; }
  .efficiency-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .efficiency-metrics > div { border-bottom: 1px solid var(--border); }
  .efficiency-metrics > div:nth-child(odd) { border-left: 0; }
  .efficiency-metrics > div:last-child { border-bottom: 0; grid-column: 1 / -1; }
  .efficiency-foot { grid-template-columns: 1fr; }
  .efficiency-method { justify-self: start; }
  .run-row { align-items: flex-start; }
  .file-icon, .eta { display: none; }
  .run-copy { gap: 5px; }
  .run-copy span { text-align: right; }
  .stage-row { font-size: 8px; }
  .task-list-head { align-items: flex-start; gap: 12px; }
  .task-list-head > div:first-child { display: block; }
  .filter-actions { align-items: flex-end; flex-direction: column-reverse; }
  .segmented button { padding: 0 7px; }
  .task-table th:nth-child(4), .task-table td:nth-child(4) { display: none; }
  .task-table th:first-child { width: 52%; }
  .task-table th:nth-child(3) { width: 28%; }
  .task-table th:last-child { width: 20%; }
  .task-table th, .task-table td, .management-table th, .management-table td { padding: 11px 9px; }
  .drawing-thumb { height: 34px; width: 38px; }
  .management-overview { grid-template-columns: 1fr; }
  .management-overview > div + div { border-left: 0; border-top: 1px solid var(--border); }
  .management-head { align-items: flex-start; gap: 9px; }
  .project-table th:nth-child(3), .project-table td:nth-child(3), .project-table th:nth-child(5), .project-table td:nth-child(5) { display: none; }
  .project-table th:first-child { width: 65%; }
  .project-table th:last-child { width: 35%; }
  .management-head-actions { align-items: flex-end; flex-direction: column-reverse; }
  .member-table th:nth-child(2), .member-table td:nth-child(2), .member-table th:nth-child(4), .member-table td:nth-child(4) { display: none; }
  .member-table th:first-child { width: 30%; }
  .member-table th:nth-child(3) { width: 31%; }
  .member-table th:nth-child(5) { width: 11%; }
  .member-table th:nth-child(6) { width: 21%; }
  .member-table th:last-child { width: 7%; }
  .integration-status-band { align-items: start; gap: 13px; grid-template-columns: 40px minmax(0, 1fr) auto; padding: 16px 0; }
  .integration-status-icon { height: 40px; width: 40px; }
  .integration-status-facts { grid-column: 1 / -1; grid-row: auto; }
  .integration-status-facts > div { padding: 3px 10px; }
  .integration-status-facts > div:first-child { padding-left: 0; }
  .integration-console > header, .integration-console form { padding-left: 16px; padding-right: 16px; }
  .integration-form-grid { grid-template-columns: minmax(0, 1fr); }
  .integration-form-grid .span-two { grid-column: auto; }
  .integration-actions { grid-template-columns: 1fr auto; }
  .integration-actions > .danger-ghost { grid-column: 1; grid-row: 2; }
  .integration-actions > span { grid-column: 1 / -1; grid-row: 1; text-align: left; }
  .integration-actions > .primary-button { grid-column: 2; grid-row: 2; }
  .standard-library, .standard-grid, .standard-card, .active-standard-copy, .active-standard-facts { min-width: 0; width: 100%; }
  .standard-grid { grid-template-columns: minmax(0, 1fr); }
  .active-standard-band { grid-template-columns: minmax(0, 1fr); width: 100%; }
  .active-standard-copy { border-bottom: 1px solid var(--border); border-right: 0; }
  .active-standard-facts { grid-template-columns: 1fr 1fr; }
  .active-standard-band > button { grid-column: auto; }
  .workspace-head { align-items: flex-start; gap: 8px; min-height: auto; padding: 10px; }
  .workspace-status > span:not(.status-chip) { display: none; }
  .workspace-toolbar { grid-template-columns: 1fr auto; }
  .toolbar-center { display: none; }
  .workspace-body { display: flex; flex-direction: column; overflow: auto; }
  .canvas-area { flex: 0 0 340px; min-height: 340px; }
  .canvas-stage { margin: 26px 0; width: 96%; }
  .result-panel { border-left: 0; border-top: 1px solid var(--border); flex: 0 0 auto; overflow: visible; }
  .result-workspace { height: auto; min-height: calc(100vh - 60px); padding: 0; }
  .batch-run-body { grid-template-columns: 1fr auto; }
  .batch-progress { grid-column: 1 / -1; grid-row: 2; }
  .batch-rule-toolbar { align-items: stretch; grid-template-columns: 1fr; }
  .selected-file.batch-file { grid-template-columns: 18px minmax(0, 1fr) auto 28px; }
  .selected-file.batch-file select { grid-column: 2 / 4; }
  .standard-config-section { gap: 12px; grid-template-columns: 1fr; padding-left: 16px; padding-right: 16px; }
  .standard-content-grid { grid-template-columns: 1fr 1fr; }
  .standard-template-path, .standard-document-path, .standard-strategy-preview { padding-left: 16px; padding-right: 16px; }
  .strategy-feature-grid { grid-template-columns: 1fr 1fr; }
  .strategy-settings { grid-template-columns: 1fr 1fr; }
  .standard-strategy-preview dl { grid-template-columns: 1fr; }
  .project-file-grid, .task-context-grid, .intent-grid, .settings-grid, .form-grid, .advanced-settings-grid, .advanced-toggles, .dense-settings { grid-template-columns: 1fr; }
  .dense-settings .span-two { grid-column: auto; }
  .task-context-grid .span-two { grid-column: auto; }
  .semantic-input-row { grid-template-columns: 1fr; }
  .semantic-input-row .secondary-button { justify-self: start; }
  .semantic-label-actions > span { display: none; }
  .tolerance-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .span-two { grid-column: auto; }
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal { border-radius: 7px 7px 0 0; max-height: 93vh; width: 100%; }
  .platform-accounts-modal { height: 93vh; }
  .platform-account-summary { grid-template-columns: 1fr 1fr; }
  .platform-account-summary > div:nth-child(3) { border-left: 0; border-top: 1px solid var(--border); }
  .platform-account-summary > div:nth-child(4) { border-top: 1px solid var(--border); }
  .platform-account-body { padding: 14px 16px 18px; }
  .modal-head-actions .primary-button span { display: none; }
  .modal-head-actions .primary-button { padding: 0 10px; }
  .task-wizard-progress { padding-left: 16px; padding-right: 16px; }
  .task-wizard-progress li strong { font-size: 8px; }
  .wizard-context-band { padding-left: 16px; padding-right: 16px; }
  .upload-step .drop-zone { min-height: 170px; }
  .wizard-goal-grid { grid-template-columns: 1fr; }
  .wizard-goal { min-height: 66px; }
  .wizard-option-grid { grid-template-columns: 1fr; }
  .wizard-expert-control { align-items: flex-start; flex-direction: column; gap: 3px; }
  .wizard-review { padding-left: 16px; padding-right: 16px; }
  .wizard-actions { grid-template-columns: auto minmax(0, 1fr) auto; padding-left: 16px; padding-right: 16px; }
  .wizard-actions #cancel-new-task { display: none; }
  .template-modal { height: 93vh; }
  .template-toolbar { align-items: stretch; flex-direction: column; gap: 9px; padding: 10px 16px; }
  .template-filters { flex-wrap: wrap; }
  .template-filters button { flex: 1 1 calc(33.333% - 3px); justify-content: center; padding-left: 6px; padding-right: 6px; }
  .template-search { flex-basis: auto; width: 100%; }
  .template-library-body { padding: 13px 16px 20px; }
  .template-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
  .login-screen { background: #121720; padding: 0; }
  .login-brand { left: 24px; top: 25px; }
  .login-layout { border: 0; display: block; margin: 0; min-height: 100vh; width: 100%; }
  .login-context { min-height: 235px; padding: 92px 24px 26px; }
  .login-context h1 { font-size: 27px; }
  .login-context > p:last-of-type { margin-bottom: 0; }
  .login-facts { display: none; }
  .login-panel { min-height: calc(100vh - 235px); padding: 38px 24px; }
  .page-heading-actions { align-items: flex-start; flex-wrap: wrap; }
  .page-heading { align-items: stretch; flex-direction: column; }
  .page-heading .primary-button { align-self: flex-start; max-width: 100%; }
  .standard-card dl > div, .standard-card > footer { gap: 12px; }
  .standard-card > footer .text-button { flex: 0 1 auto; text-align: right; }
  .standard-card .card-actions { flex-wrap: wrap; }
  .standard-template-head { align-items: stretch; flex-direction: column; }
  .standard-template-head .secondary-button { align-self: flex-start; }
  .strategy-settings { grid-template-columns: 1fr; }
  .template-library-summary span { display: none; }
  .template-card { min-height: 0; }
}

@media (max-width: 430px) {
  .topbar-actions .icon-button { display: none; }
  .project-switcher select { max-width: 150px; }
  .metric-strip strong { font-size: 21px; }
  .efficiency-head { align-items: flex-start; gap: 12px; }
  .efficiency-scope { max-width: 46%; }
  .efficiency-metrics strong { font-size: 19px; }
  .efficiency-metrics > div { padding: 15px; }
  .efficiency-foot { padding: 11px 15px; }
  .task-list-head, .management-head { flex-direction: column; }
  .management-head-actions { align-items: stretch; flex-direction: column-reverse; width: 100%; }
  .filter-actions { align-items: stretch; width: 100%; }
  .segmented { justify-content: space-between; width: 100%; }
  .standard-path-switch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-left: 16px; margin-right: 16px; width: calc(100% - 32px); }
  .standard-path-switch button { gap: 4px; justify-content: center; min-width: 0; padding: 0 4px; }
  .workspace-title-group h1 { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .member-table th:nth-child(3), .member-table td:nth-child(3) { display: none; }
  .member-table th, .member-table td { padding-left: 6px; padding-right: 6px; }
  .member-table th:first-child { width: 38%; }
  .member-table th:nth-child(5) { width: 18%; }
  .member-table th:nth-child(6) { width: 34%; }
  .member-table th:last-child { width: 10%; }
  .member-table th:last-child, .member-table td:last-child { padding-left: 3px; padding-right: 3px; }
  .integration-status-band { grid-template-columns: 40px minmax(0, 1fr); }
  .integration-status-band > .status-chip { grid-column: 2; justify-self: start; }
  .integration-status-facts { grid-template-columns: 1fr; }
  .integration-status-facts > div, .integration-status-facts > div:first-child { border-left: 0; border-top: 1px solid var(--border); padding: 9px 0; }
  .integration-status-facts > div:first-child { border-top: 0; }
  .integration-console > header { flex-direction: column; gap: 7px; }
  .integration-actions { align-items: stretch; grid-template-columns: 1fr; }
  .integration-actions > .danger-ghost, .integration-actions > span, .integration-actions > .primary-button { grid-column: 1; grid-row: auto; }
  .integration-actions .primary-button, .integration-actions .secondary-button { width: 100%; }
  .quota-editor { grid-template-columns: minmax(58px, 1fr) auto; }
  .quick-template-list { flex-basis: 100%; }
  .intake-launch-context { grid-template-columns: 1fr; }
  .intake-launch-context > div, .intake-launch-context > div:first-child { border-left: 0; border-top: 1px solid var(--border); padding: 9px 0; }
  .intake-launch-context > div:first-child { border-top: 0; }
  .intake-launch-actions { align-items: stretch; flex-direction: column-reverse; }
  .intake-launch-actions .primary-button, .intake-launch-actions .text-button { width: 100%; }
  .wizard-context-band { grid-template-columns: 1fr; }
  .wizard-context-band > div, .wizard-context-band > div:first-child { border-left: 0; border-top: 1px solid var(--border); padding: 8px 0; }
  .wizard-context-band > div:first-child { border-top: 0; }
  .task-wizard-progress li strong { display: none; }
  .task-wizard-progress li::after { right: 6px; }
  .wizard-section-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .wizard-review-row { gap: 5px; grid-template-columns: 1fr; }
  .wizard-actions { grid-template-columns: 1fr 1fr; }
  .wizard-actions > span { display: none; }
  .wizard-actions #wizard-next, .wizard-actions #create-job-button { grid-column: 2; }
  .wizard-actions #wizard-back { grid-column: 1; grid-row: 1; }
  .wizard-actions.is-first-step #wizard-next { grid-column: 1 / -1; }
  .template-library-link { margin-left: 0; }
  .template-card > footer { align-items: stretch; flex-direction: column; }
  .template-card > footer .primary-button { width: 100%; }
}

.training-control-modal { display: flex; flex-direction: column; max-height: min(860px, calc(100vh - 32px)); max-width: 720px; width: min(720px, calc(100vw - 32px)); }
.training-control-body { display: block; overflow: auto; padding: 0 24px 22px; }
.training-control-body > section { min-width: 0; padding: 20px 0; }
.training-node-section { border-right: 0; padding-right: 0 !important; }
.training-job-section { border-top: 1px solid var(--border); grid-column: 1 / -1; }
.training-section-head { align-items: flex-start; display: flex; gap: 16px; justify-content: space-between; margin-bottom: 14px; }
.training-section-head h3 { font-size: 13px; margin: 0; }
.training-section-head p { color: var(--muted); font-size: 9px; line-height: 1.5; margin: 4px 0 0; }
.training-section-head > div:last-child { align-items: center; display: flex; flex: 0 0 auto; gap: 7px; }
.training-section-head .primary-button, .training-section-head .secondary-button { min-height: 34px; padding: 0 10px; text-decoration: none; }
.training-snapshot-note { align-items: flex-start; background: #f6f8fb; border-left: 3px solid #55749a; color: var(--muted); display: flex; font-size: 8px; gap: 7px; line-height: 1.55; margin: 12px 0; padding: 9px 10px; }
.training-snapshot-note svg { flex: 0 0 auto; height: 14px; width: 14px; }

@media (max-width: 1280px) {
  .bubble-upload-form { grid-template-columns: minmax(260px, 1.5fr) repeat(2, minmax(150px, 1fr)); }
  .bubble-file-picker { grid-column: span 2; }
  .bubble-workbench-command { grid-template-columns: minmax(160px, .8fr) minmax(320px, 1.4fr) auto auto; }
  .bubble-workbench-command .primary-button { grid-column: 4; grid-row: 2; }
  .bubble-recognition-settings { grid-column: 3; grid-row: 2; }
  .bubble-workspace-pages { grid-column: 1 / 3; grid-row: 2; }
  .bubble-inspection-context { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .bubble-inspection-context-title { grid-column: 1 / -1; }
  .bubble-review-layout { --bubble-review-width: clamp(340px, 31vw, 420px); grid-template-columns: minmax(0, 1fr) 6px var(--bubble-review-width); }
  .bubble-toolbar-actions .secondary-button { min-width: 36px; padding: 0; width: 36px; }
  .bubble-toolbar-actions .secondary-button span { display: none; }
  .bubble-toolbar-actions #bubble-add-item { min-width: 98px; padding: 0 12px; width: auto; }
  .bubble-toolbar-actions #bubble-add-item span { display: inline; }
  .bubble-template-layout { grid-template-columns: minmax(0, 1fr) 280px; }
  .bubble-template-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bubble-rule-layout { grid-template-columns: 1fr; }
}

@media (min-width: 761px) {
  .bubble-review-layout {
    flex: 0 0 auto;
    height: max(600px, calc(100vh - 214px));
    min-height: 600px;
  }
}

@media (max-width: 760px) {
  .training-control-modal { max-height: calc(100vh - 12px); width: calc(100vw - 12px); }
  .training-control-body { display: block; padding-left: 16px; padding-right: 16px; }
  .training-node-section { border-right: 0; padding-right: 0 !important; }
  .training-section-head { flex-direction: column; }
  .training-section-head > div:last-child { align-items: stretch; width: 100%; }
  .training-section-head .primary-button, .training-section-head .secondary-button { flex: 1; justify-content: center; }
  .bubble-intake { padding-left: 16px; padding-right: 16px; }
  .bubble-upload-form { align-items: stretch; grid-template-columns: 1fr; }
  .bubble-file-picker { grid-column: auto; }
  .bubble-upload-form .primary-button { width: 100%; }
  .bubble-workbench-command { grid-template-columns: 1fr 1fr; }
  .bubble-project-field, .bubble-scope-field { grid-column: 1 / -1; }
  .bubble-workspace-pages { grid-column: 1; grid-row: auto; }
  .bubble-recognition-settings { grid-column: 2; grid-row: auto; }
  .bubble-workbench-command .primary-button { grid-column: 1 / -1; grid-row: auto; }
  .bubble-recognition-settings-grid { margin-top: 7px; position: static; width: 100%; }
  .bubble-recognition-settings[open] { grid-column: 1 / -1; }
  .bubble-inspection-context { grid-template-columns: 1fr 1fr; }
  .bubble-inspection-context-title { grid-column: 1 / -1; }
  .bubble-workbench-command .primary-button { width: 100%; }
  .bubble-recognition-plan { grid-template-columns: minmax(0, 1fr) 34px; }
  .bubble-recognition-plan .bubble-progress-track { grid-column: 1 / -1; grid-row: 2; }
  .bubble-recognition-plan em { grid-column: 2; grid-row: 1; }
  .bubble-recognition-plan small { display: block; margin: 3px 0 0; }
  .bubble-intake-foot { gap: 12px; }
  .bubble-template-layout { grid-template-columns: 1fr; }
  .bubble-template-controls { grid-template-columns: 1fr; }
  .bubble-template-controls .span-two { grid-column: auto; }
  .bubble-saved-templates { width: 100%; }
  .bubble-run-bar { grid-template-columns: 1fr 1fr; }
  .bubble-run-bar > div:nth-child(3) { border-top: 1px solid var(--border); }
  .bubble-run-bar > div:nth-child(3) { border-left: 0; }
  .bubble-run-diagnostics { border-top: 1px solid var(--border); }
  .bubble-workspace-head-actions { align-items: flex-end; flex-direction: column-reverse; gap: 7px; }
  .bubble-workspace-head-actions .secondary-button { min-height: 32px; }
  .module-access-field > div { grid-template-columns: 1fr; }
  .bubble-task-table th:nth-child(2), .bubble-task-table td:nth-child(2), .bubble-task-table th:nth-child(5), .bubble-task-table td:nth-child(5) { display: none; }
  .bubble-workspace { height: auto; min-height: calc(100vh - 60px); }
  .bubble-review-layout { display: flex; flex-direction: column; height: auto; min-height: 0; overflow: visible; }
  .bubble-workspace-splitter { display: none; }
  .bubble-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
  .bubble-toolbar { gap: 6px; }
  .bubble-toolbar .toolbar-center { display: flex; grid-column: 1 / -1; grid-row: 2; justify-self: start; overflow-x: auto; width: 100%; }
  .bubble-canvas { flex: 0 0 420px; min-height: 420px; }
  .bubble-review-pane { border-left: 0; border-top: 1px solid var(--border); overflow: visible; }
  .bubble-item-list { max-height: 320px; }
  .bubble-item-editor { overflow: visible; }
}

@media (max-width: 520px) {
  .bubble-workbench-command { grid-template-columns: 1fr; }
  .bubble-inspection-context { grid-template-columns: 1fr; }
  .bubble-inspection-context-title { grid-column: auto; }
  .bubble-workspace-pages { justify-content: flex-start; }
  .bubble-workspace-pages, .bubble-recognition-settings, .bubble-workbench-command .primary-button { grid-column: auto; }
  .bubble-recognition-settings-grid { grid-template-columns: 1fr; }
  .bubble-scope-control button { padding-left: 8px; padding-right: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* PhysMeta unified operations theme
   Mirrors the project collaboration workspace without changing module behavior. */
:root {
  --bg: #edf5fb;
  --surface: #ffffff;
  --surface-soft: #f7fbfe;
  --surface-strong: #e7f1f7;
  --ink: #182633;
  --muted: #667687;
  --subtle: #8798a6;
  --border: #d7e4ed;
  --border-strong: #b9cedc;
  --primary: #163950;
  --primary-hover: #24516d;
  --primary-soft: #e7f1f7;
  --cyan: #2e795d;
  --cyan-soft: #eaf5ee;
  --blue: #3b75a3;
  --blue-soft: #eaf3f9;
  --amber: #a46216;
  --amber-soft: #fbf2e3;
  --red: #b63d3d;
  --red-soft: #fbeceb;
  --coral: #d56d55;
  --sidebar: 244px;
  --radius: 7px;
  --shadow: 0 16px 42px rgba(30, 61, 84, .13);
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline-color: rgba(39, 114, 79, .24);
}

.sidebar {
  background: #14271f;
  color: #edf5f0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 22px 14px 16px;
}

.brand { min-height: 44px; padding: 0 8px 20px; }
.brand-symbol { border: 1px solid #6e887c; border-radius: 7px; height: 34px; padding: 2px; width: 34px; }
.brand strong { font-size: 14px; font-weight: 650; }
.brand small { color: #89a398; font-size: 8px; letter-spacing: 1.6px; text-transform: uppercase; }

.product-module-switch {
  background: transparent;
  border: 0;
  gap: 5px;
  grid-template-columns: 1fr;
  margin: 7px 0 16px;
  padding: 0;
}

.product-module-switch > [data-product-module] {
  border-radius: 6px;
  color: #9fb2aa;
  gap: 11px;
  min-height: 43px;
  padding: 6px 12px;
}

.product-module-switch > [data-product-module]:hover:not([aria-disabled="true"]) {
  background: #203a30;
  color: #f5faf7;
}

.product-module-switch > [data-product-module].is-active {
  background: #244237;
  box-shadow: inset 3px 0 var(--coral);
  color: #ffffff;
}

.product-module-switch svg { height: 17px; width: 17px; }
.product-module-switch strong { font-size: 12px; font-weight: 600; }
.product-module-switch small { font-size: 7px; letter-spacing: .3px; opacity: .58; }
.nav-section-label { color: #6f887d; font-size: 10px; padding: 0 10px 8px; }
.main-nav { gap: 5px; }
.nav-item { border-radius: 6px; color: #9fb2aa; font-size: 12px; }
.nav-item:hover { background: #203a30; color: #f5faf7; }
.nav-item.is-active { background: #244237; box-shadow: inset 3px 0 var(--coral); }
.nav-item em { background: #315145; border-radius: 10px; color: #c6d6cf; }
.nav-item.is-active em { background: #3a5a4d; color: #ffffff; }

.sidebar-project { border-color: #2b4038; }
.sidebar-project > span { color: #6f887d; }
.sidebar-project > strong { color: #f5faf7; }
.sidebar-project > small,
.sidebar-project > div { color: #91a99f; }
.sidebar-engine { border-color: #2b4038; }
.engine-status { color: #9fb2aa; }
.usage-block { background: #203a30; border-color: #355246; }
.usage-owner span,
.usage-line span,
.usage-foot span { color: #91a99f; }
.usage-track { background: #315145; }
.usage-track span { background: var(--coral); }
.usage-foot button { color: #dce9e3; }

.topbar {
  background: rgba(255, 255, 255, .96);
  border-color: var(--border);
  height: 64px;
  padding: 0 28px;
}

.workspace-badge { background: #edf2ef; border-color: #dce4df; color: #5f6d66; }
.project-switcher select,
.context-standard { color: #43504a; }
.user-switcher:hover { background: #f0f3f0; }
.avatar { background: var(--primary); }
.account-menu { border-color: var(--border); box-shadow: 0 14px 36px rgba(22, 43, 33, .14); }

.view { min-height: calc(100vh - 64px); padding: 30px 32px 54px; }
.page-heading { margin-bottom: 24px; max-width: 1440px; padding: 4px 2px 1px; }
.page-heading .eyebrow { color: var(--coral); font-size: 10px; font-weight: 700; }
.page-heading h1 { color: var(--ink); font-size: 27px; }
.page-heading p:last-child { color: var(--muted); }

.primary-button,
.secondary-button,
.danger-button,
.text-button,
.icon-button,
.segmented,
.segmented button,
.modal,
.table-wrap,
.task-section,
.efficiency-panel,
.active-run,
.batch-run { border-radius: 6px; }

.primary-button { background: var(--primary); border-color: var(--primary); }
.primary-button:hover:not(:disabled) { background: var(--primary-hover); }
.primary-button:disabled { background: #8da198; border-color: #8da198; }
.secondary-button { border-color: #d8dfda; color: #34413b; }
.secondary-button:hover:not(:disabled) { border-color: #a8b5ae; background: #f8faf8; }
.text-button { color: #27724f; }
.icon-button:hover { background: #eef2ef; color: var(--primary); }

.intake-launch {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  max-width: 1440px;
  padding: 18px;
}
.intake-launch-icon { background: #e7f3eb; color: #26704d; }
.intake-launch-copy p { color: var(--coral); }
.intake-launch-context > div { border-color: #edf0ed; }

.metric-strip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  max-width: 1440px;
  overflow: hidden;
}
.metric-strip > div:first-child { background: var(--primary); }
.metric-strip > div:first-child :is(span, strong, small) { color: #ffffff; }
.metric-strip > div:first-child :is(span, small) { opacity: .72; }
.metric-strip > div + div { border-color: var(--border); }

.efficiency-panel,
.active-run,
.batch-run,
.task-section,
.table-wrap { border-color: var(--border); box-shadow: none; max-width: 1440px; }
.efficiency-head,
.section-title-row,
.task-list-head { background: #ffffff; border-color: var(--border); }
.efficiency-title-icon { background: #e7f3eb; color: #26704d; }
.efficiency-title p,
.batch-run-head p { color: var(--coral); }
.efficiency-primary { background: var(--primary); color: #fff; }
.efficiency-primary :is(span, strong, small) { color: #fff; }

.segmented { background: #edf2ef; }
.segmented button { color: #66736c; }
.segmented button.is-selected { background: #fff; color: var(--ink); }
.search-row,
.search-row input { background: #fbfcfb; }
.search-row { border-color: #dce2de; }

.task-table th,
.data-table th { background: #fafbfa; color: #87928c; }
.task-table td,
.data-table td { border-color: #edf0ed; }
.task-table tbody tr:hover,
.data-table tbody tr:hover { background: #f9fbf9; }
.status-chip { border-radius: 10px; }
.status-chip.completed,
.status-chip.approved,
.status-chip.trained { background: #eaf5ee; border-color: #c9e4d4; color: #246b49; }
.status-chip.processing,
.status-chip.in_progress { background: #fbf2e3; border-color: #ead7b7; color: #8f5c18; }
.status-chip.failed,
.status-chip.stale { background: #fbeceb; border-color: #efcbc6; color: #a63e3e; }

.modal-backdrop { background: rgba(20, 39, 31, .55); }
.modal { border: 1px solid var(--border); }
.modal-head,
.modal-actions { border-color: var(--border); }
.toast { background: #14271f; }
.toast svg { color: #9bd5b8; }

/* Bubble inspection keeps its red engineering markup while adopting the shell. */
.bubble-workspace { height: auto; min-height: calc(100vh - 64px); }
.bubble-workspace-head,
.bubble-toolbar,
.bubble-workflow-steps,
.bubble-recognition-plan,
.bubble-review-head,
.bubble-review-tools,
.bubble-review-table-head { border-color: var(--border); }
.bubble-workspace-head,
.bubble-toolbar,
.bubble-review-head { background: #ffffff; }
.bubble-workflow-steps,
.bubble-recognition-plan,
.bubble-review-tools,
.bubble-review-table-head { background: #f8faf8; }
.bubble-workbench-command,
.bubble-inspection-context { background: var(--primary); }
.bubble-upload-form select { background: #244237; border-color: #46675a; }
.bubble-canvas { background-color: #e9eeeb; background-image: linear-gradient(#d9e1dc 1px, transparent 1px), linear-gradient(90deg, #d9e1dc 1px, transparent 1px); }
.bubble-workspace-splitter { background: #edf2ef; border-color: var(--border); }
.bubble-workspace-splitter::after { background: #879b91; }
.bubble-review-decision-bar { background: #edf4f0; border-color: #d4e1da; }
.bubble-review-decision-bar > div:first-child > svg { color: var(--primary); }
.bubble-item-row.is-selected { background: #edf4f0; box-shadow: inset 3px 0 var(--coral); }
.bubble-item-row:hover { background: #f8faf8; }
.bubble-inline-field input:focus { border-color: #557d6a; box-shadow: 0 0 0 2px rgba(39, 114, 79, .12); }
.bubble-inline-gauge-detail { background: #edf4f8; border-left-color: var(--blue); }
.bubble-processing-overlay { background: rgba(255, 255, 255, .96); border-color: var(--border); }
.bubble-recognition-region { border-color: var(--primary); }
.bubble-recognition-region::before { background: var(--primary); }
.bubble-region-handle { border-color: var(--primary); }

/* Gold collaboration dashboard */
.gold-review-shell,
.gold-batch-summary,
.gold-page-filters,
.gold-page-card { border-color: var(--border); }
.gold-batch-panel,
.gold-page-panel { background: #ffffff; }
.gold-batch-panel > header,
.gold-batch-summary,
.gold-page-filters { background: #fafbfa; }
.gold-batch-row { border-color: #edf0ed; }
.gold-batch-row:hover { background: #f8faf8; }
.gold-batch-row.is-active { background: #edf4f0; box-shadow: inset 3px 0 var(--coral); }
.gold-page-filters button { border-color: #d8dfda; border-radius: 6px; }
.gold-page-filters button:hover { border-color: var(--primary); color: var(--primary); }
.gold-page-filters button.is-active { background: var(--primary); border-color: var(--primary); }
.gold-page-card { border-radius: 7px; }
.gold-page-card:hover { border-color: #a8b5ae; }
.gold-page-card header > span:first-child { color: var(--primary); }
.gold-lifecycle { border-radius: 10px; }
.gold-training-detail { border-left-color: #879b91; }
.gold-workbench-close { background: var(--primary); border-color: #46675a; border-radius: 6px; }

@media (max-width: 1180px) {
  .product-module-switch strong { font-size: 11px; }
  .intake-launch { grid-template-columns: 46px minmax(210px, 1fr) auto; }
  .intake-launch-context { display: none; }
}

@media (max-width: 900px) {
  .sidebar { overflow-y: auto; }
  .product-module-switch { grid-template-columns: 1fr; }
  .view { padding: 24px 22px 44px; }
}

@media (max-width: 560px) {
  .topbar { height: 58px; padding: 0 12px; }
  .view { min-height: calc(100vh - 58px); padding: 18px 12px 36px; }
  .page-heading { align-items: flex-start; gap: 14px; }
  .page-heading h1 { font-size: 23px; }
  .intake-launch { grid-template-columns: 40px minmax(0, 1fr); padding: 14px; }
  .intake-launch-actions { grid-column: 1 / -1; justify-content: stretch; }
  .intake-launch-actions .primary-button { flex: 1; }
  .metric-strip { grid-template-columns: 1fr 1fr; }
  .metric-strip > div:nth-child(3) { border-left: 0; border-top: 1px solid var(--border); }
  .metric-strip > div:nth-child(4) { border-top: 1px solid var(--border); }
}

/* Match the final project-collaboration blue glass theme across the SaaS shell. */
.login-screen { background: var(--bg); }
.login-layout { border-color: #cbdbe5; box-shadow: 0 24px 68px rgba(30, 61, 84, .09); }
.login-context { background: #0f2638; }
.login-context .eyebrow { color: #8dc9ee; }
.login-context > p:last-of-type { color: #a8bdcb; }
.login-facts,
.login-facts > div { border-color: #294a60; }
.login-facts dt { color: #7898ad; }
.login-brand small { color: #8eacbf; }
.login-lock { background: #e7f1f7; color: var(--primary); }
.login-panel form > label > input,
.login-panel .secret-input { border-color: #b9cedc; }
.login-panel form > label > input:focus,
.login-panel .secret-input:focus-within { border-color: #76a5c5; box-shadow: 0 0 0 3px rgba(112, 166, 202, .14); outline: 0; }

.sidebar {
  background: rgba(15, 38, 56, .98);
  border-right: 1px solid rgba(190, 220, 240, .12);
  box-shadow: 12px 0 34px rgba(30, 61, 84, .09);
}
.brand-symbol { border-color: #7896aa; background: #f4f9fc; }
.brand small { color: #8eacbf; }
.product-module-switch > [data-product-module],
.nav-item { color: #a8bdcb; }
.product-module-switch > [data-product-module]:hover:not([aria-disabled="true"]),
.nav-item:hover { background: #20465f; color: #f5faff; }
.product-module-switch > [data-product-module].is-active,
.nav-item.is-active { background: #254d67; box-shadow: inset 3px 0 var(--coral); }
.nav-section-label { color: #7898ad; }
.nav-item em,
.nav-item.is-active em { background: #315b75; color: #d5e5ef; }
.sidebar-project { border-color: #294a60; }
.sidebar-project > span { color: #7898ad; }
.sidebar-project > small,
.sidebar-project > div,
.engine-status { color: #9db5c4; }
.sidebar-engine { border-color: #294a60; }
.usage-block { background: rgba(74, 139, 183, .13); border-color: rgba(138, 194, 230, .23); }
.usage-owner span,
.usage-line span,
.usage-foot span { color: #9db5c4; }
.usage-track { background: #315b75; }

.topbar {
  background: rgba(249, 252, 255, .94);
  border-color: rgba(72, 105, 132, .16);
  box-shadow: 0 8px 26px rgba(35, 73, 101, .05);
}
.workspace-badge,
.segmented { background: #e7f1f7; border-color: #d7e4ed; }
.user-switcher:hover,
.icon-button:hover { background: #edf4f8; }
.account-menu { box-shadow: 0 14px 36px rgba(30, 61, 84, .15); }
.intake-launch,
.metric-strip,
.efficiency-panel,
.active-run,
.batch-run,
.task-section,
.table-wrap,
.modal { border-color: rgba(72, 105, 132, .16); box-shadow: 0 10px 28px rgba(35, 72, 99, .06); }
.task-table th,
.data-table th,
.efficiency-head,
.section-title-row,
.task-list-head { background: #f7fbfe; }
.task-table tbody tr:hover,
.data-table tbody tr:hover { background: #f2f8fc; }
.search-row,
.search-row input { background: rgba(255,255,255,.72); }
.modal-backdrop { background: rgba(17, 35, 49, .46); }
.toast { background: #0f2638; }

.bubble-canvas {
  background-color: #e8f0f5;
  background-image: linear-gradient(#d8e5ed 1px, transparent 1px), linear-gradient(90deg, #d8e5ed 1px, transparent 1px);
}
.bubble-workspace-splitter { background: #e7f1f7; }
.bubble-workspace-splitter::after { background: #7898ad; }
.bubble-review-decision-bar,
.bubble-item-row.is-selected { background: #eaf3f9; }
.bubble-review-decision-bar { border-color: #cfdeea; }
.bubble-item-row.is-selected { box-shadow: inset 3px 0 var(--coral); }
.bubble-item-row:hover { background: #f2f8fc; }
.bubble-inline-field input:focus { border-color: #76a5c5; box-shadow: 0 0 0 2px rgba(112, 166, 202, .14); }

.gold-batch-panel > header,
.gold-batch-summary,
.gold-page-filters { background: #f7fbfe; }
.gold-batch-row:hover { background: #f2f8fc; }
.gold-batch-row.is-active { background: #eaf3f9; box-shadow: inset 3px 0 var(--coral); }
.gold-training-detail { border-left-color: #7898ad; }
.gold-workbench-close { background: var(--primary); border-color: #54788f; }

/* Shared control geometry: keep command and form rows aligned between modules. */
:root {
  --control-height: 36px;
  --control-icon-size: 34px;
  --control-radius: 6px;
}
.primary-button,
.secondary-button,
.danger-button {
  border-radius: var(--control-radius);
  min-height: var(--control-height);
  padding: 0 14px;
}
.icon-button {
  flex-basis: var(--control-icon-size);
  height: var(--control-icon-size);
  width: var(--control-icon-size);
}
.icon-button.compact { flex-basis: 28px; height: 28px; width: 28px; }
.segmented { border-radius: var(--control-radius); min-height: var(--control-height); }
.segmented button { border-radius: 5px; min-height: 30px; }
.search-row { border-radius: var(--control-radius); min-height: var(--control-height); }
.search-row input { height: 34px; }
.form-grid input,
.form-grid select,
.project-file-grid select,
.task-context-grid select,
.settings-grid select,
.settings-grid input {
  border-radius: var(--control-radius);
  height: var(--control-height);
}
.form-grid textarea,
.settings-grid textarea { border-radius: 6px; }
.bubble-upload-form .primary-button { height: 42px; min-height: 42px; }
.bubble-workspace-head-actions .secondary-button,
.bubble-review-navigation .secondary-button,
.bubble-review-decision-bar :is(.secondary-button, .primary-button) { border-radius: 5px; }
.gold-page-filters button,
.gold-page-actions button { border-radius: 6px; min-height: 36px; }
.modal-head .icon-button { flex-basis: 34px; }

/* Sidebar hierarchy: separate product, work, context, and service zones. */
.sidebar {
  background: #10283a;
  border-right: 1px solid rgba(156, 203, 230, .2);
  scrollbar-color: #315b73 transparent;
  scrollbar-width: thin;
}
.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-thumb { background: #315b73; border-radius: 3px; }
.brand {
  border-bottom: 1px solid rgba(156, 203, 230, .16);
  margin-bottom: 13px;
  padding-bottom: 18px;
}
.sidebar-section-title,
.nav-section-label {
  align-items: center;
  color: #86abc1;
  display: flex;
  font-size: 9px;
  font-weight: 700;
  gap: 9px;
  letter-spacing: 0;
  padding: 0 4px 9px;
  text-transform: uppercase;
}
.sidebar-section-title::after,
.nav-section-label::after {
  background: rgba(150, 200, 228, .19);
  content: "";
  flex: 1;
  height: 1px;
}
.sidebar-product-area {
  border-bottom: 1px solid rgba(156, 203, 230, .15);
  margin-bottom: 12px;
  padding-bottom: 13px;
}
.product-module-switch {
  gap: 4px;
  margin: 0;
}
.product-module-switch > [data-product-module] {
  border: 1px solid transparent;
  color: #adc4d2;
  gap: 11px;
  min-height: 43px;
  padding: 6px 10px;
  position: relative;
}
.product-module-switch > [data-product-module]:hover:not([aria-disabled="true"]) {
  background: #193c53;
  border-color: rgba(137, 193, 225, .18);
}
.product-module-switch > [data-product-module].is-active {
  background: #2a5874;
  border-color: rgba(158, 211, 239, .23);
  box-shadow: inset 4px 0 var(--coral), 0 5px 14px rgba(3, 17, 27, .16);
}
.product-module-switch > [data-product-module="annotation"] > svg { color: #74c8f0; }
.product-module-switch > [data-product-module="bubble"] > svg { color: #ff6974; }
.product-module-switch > [data-product-module="gold_review"] > svg { color: #e9c261; }
.product-module-switch > [data-product-module="project_erp"] > svg { color: #72d5ba; }
.product-module-switch > [data-product-module].is-active > svg { color: #ffffff; }
.product-module-switch strong { color: currentColor; font-size: 12px; font-weight: 650; }
.product-module-switch small { color: #8eabbc; font-size: 7px; opacity: 1; }
.product-module-switch .is-active small { color: #c9dce7; }
.sidebar-nav-group {
  background: rgba(6, 25, 38, .32);
  border: 1px solid rgba(145, 193, 220, .14);
  border-radius: 6px;
  margin-bottom: 10px;
  padding: 10px 7px 7px;
}
.sidebar-workspace-nav {
  background: rgba(21, 55, 76, .52);
  border-color: rgba(145, 193, 220, .18);
}
.workspace-admin-label {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}
.main-nav { gap: 3px; }
.nav-item {
  border: 1px solid transparent;
  color: #aec2ce;
  font-size: 12px;
  height: 41px;
  padding: 0 10px;
}
.nav-item:hover {
  background: #1e455d;
  border-color: rgba(147, 197, 224, .16);
}
.nav-item.is-active {
  background: #2a5874;
  border-color: rgba(158, 211, 239, .2);
  box-shadow: inset 4px 0 var(--coral);
}
.nav-item svg { color: #8db5ca; }
.nav-item.is-active svg { color: #ffffff; }
.nav-item em,
.nav-item.is-active em {
  background: #356783;
  color: #e0edf4;
}
.sidebar-project {
  background: #0b2233;
  border: 1px solid #31566d;
  border-left: 3px solid #74bddf;
  border-radius: 6px;
  margin: 2px 0 12px;
  padding: 12px 12px 13px;
}
.sidebar-project > span.sidebar-context-label {
  align-items: center;
  color: #87bdd8;
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}
.sidebar-context-label svg { height: 13px; width: 13px; }
.sidebar-context-label b { font-size: 9px; font-weight: 700; }
.sidebar-project > strong {
  color: #ffffff;
  font-size: 12px;
  font-weight: 650;
}
.sidebar-project > small { color: #87a8ba; }
.sidebar-project > div {
  border-top: 1px solid rgba(140, 188, 215, .15);
  color: #a9c0cc;
  margin-top: 10px;
  padding-top: 10px;
}
.sidebar-foot { margin-top: auto; }
.sidebar-service-title { margin-top: 2px; }
.sidebar-engine {
  background: rgba(53, 135, 101, .12);
  border: 1px solid rgba(92, 183, 145, .22);
  border-left: 3px solid #5fbd8a;
  border-radius: 5px;
  margin: 0 0 7px;
  padding: 9px 10px;
}
.engine-status { color: #aed3c0; font-size: 9px; }
.sidebar-foot > .nav-item {
  background: rgba(10, 31, 45, .34);
  border-color: rgba(145, 193, 220, .13);
  margin-bottom: 8px;
}
.usage-block {
  background: #17384e;
  border: 1px solid rgba(135, 190, 220, .25);
  border-top: 3px solid var(--coral);
  border-radius: 5px;
  margin: 0;
  padding: 11px 11px 10px;
}
.usage-owner { color: #98b3c2; gap: 8px; margin-bottom: 9px; }
.usage-owner strong {
  color: #ffffff;
  font-size: 10px;
  max-width: 124px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.usage-line { color: #9eb8c7; gap: 8px; }
.usage-line strong { color: #e1edf3; }
.usage-track { background: #2e5a73; height: 6px; margin-top: 9px; }
.usage-track span { background: var(--coral); }
.usage-foot { color: #9eb8c7; font-size: 8px; }
.usage-foot button { color: #dcecf4; font-weight: 650; }

@media (max-width: 1120px) and (min-width: 761px) {
  :root { --sidebar: 82px; }
  .sidebar-section-title { display: none; }
  .sidebar-product-area { border-bottom: 0; margin-bottom: 8px; padding-bottom: 0; }
  .sidebar-nav-group {
    background: transparent;
    border: 0;
    border-radius: 0;
    margin-bottom: 6px;
    padding: 0;
  }
  .sidebar-workspace-nav { border-top: 1px solid rgba(156, 203, 230, .15); padding-top: 8px; }
  .sidebar-foot > .nav-item { background: transparent; border-color: transparent; }
}

@media (max-width: 760px) {
  :root { --sidebar: 248px; }
  .sidebar-section-title { display: flex; }
  .sidebar-product-area { border-bottom: 1px solid rgba(156, 203, 230, .15); margin-bottom: 12px; padding-bottom: 13px; }
  .sidebar-nav-group { background: rgba(6, 25, 38, .32); border: 1px solid rgba(145, 193, 220, .14); border-radius: 6px; margin-bottom: 10px; padding: 10px 7px 7px; }
  .sidebar-workspace-nav { background: rgba(21, 55, 76, .52); }
}

/* Bubble workbench readability: separate configuration, drawing, and review zones. */
.bubble-workspace {
  background: #e7edf1;
  color: #102a3a;
}
.bubble-workspace-head {
  background: #ffffff;
  border-bottom-color: #b8c9d3;
  box-shadow: inset 0 -2px #edf2f5;
}
.bubble-workspace-head .breadcrumb { color: #587181; }
.bubble-workspace-head h1 { color: #102a3a; font-weight: 750; }
.bubble-workspace-head .status-chip.neutral {
  background: #eef3f6;
  border: 1px solid #c5d2da;
  color: #405c6c;
}
.bubble-workflow-steps {
  background: #f5f8fa;
  border-bottom-color: #b8cbd6;
}
.bubble-workflow-steps li {
  color: #587080;
  font-size: 10px;
  font-weight: 650;
}
.bubble-workflow-steps li:not(:last-child)::after { background: #b5c9d5; }
.bubble-workflow-steps span {
  border-color: #8faaba;
  color: #486676;
  font-size: 10px;
}
.bubble-workflow-steps li.is-active { color: #135fa8; }
.bubble-workflow-steps li.is-active span { background: #176eb9; border-color: #176eb9; }
.bubble-workflow-steps li.is-complete { color: #20795d; }
.bubble-workflow-steps li.is-complete span { background: #e6f4ee; border-color: #5c9e83; color: #176c50; }

.bubble-workbench-command {
  background: #123c55;
  border-bottom-color: #315b72;
  box-shadow: inset 0 1px rgba(255,255,255,.08);
}
.bubble-workbench-command label > span,
.bubble-scope-field > span {
  color: #c5d6df;
  font-size: 9px;
  font-weight: 650;
}
.bubble-workbench-command select {
  background: #ffffff;
  border-color: #8faaba;
  color: #102a3a;
}
.bubble-workbench-command select:disabled { background: #e5ecef; color: #526a78; opacity: 1; }
.bubble-workspace-pages > span { color: #f2f7f9 !important; font-weight: 650; }
.bubble-workspace-pages input { accent-color: #4fa4e5; }
.bubble-workspace-pages.is-disabled { opacity: .72; }
.bubble-scope-control { background: #0c3046; border: 1px solid #4f7488; }
.bubble-scope-control button { color: #d2e0e7; font-size: 9px; }
.bubble-scope-control button.is-selected { background: #ffffff; color: #123c55; }
.bubble-scope-control button.is-selected small { color: #526d7b; opacity: 1; }
.bubble-recognition-settings > summary { background: #0c3046; border-color: #4f7488; color: #d2e0e7; }
.bubble-recognition-settings > summary small { color: #afc5d0; }
.bubble-workbench-command .primary-button { background: #2d83cc; border-color: #76b3e1; }
.bubble-workbench-command .primary-button:hover:not(:disabled) { background: #1f70b3; }

.bubble-inspection-context {
  background: #19455d;
  border-bottom-color: #315b72;
  box-shadow: inset 0 1px rgba(255,255,255,.07);
}
.bubble-inspection-context-title > svg { background: #edf4f7; color: #16445d; }
.bubble-inspection-context-title > svg:last-child { background: transparent; color: #b8ccd7; height: 16px; padding: 0; width: 16px; }
.bubble-inspection-context-title strong { color: #ffffff; font-size: 10px; }
.bubble-inspection-context-title small { color: #b8ccd7; font-size: 8px; }
.bubble-inspection-context label > span { color: #c8d8e0; font-size: 9px; }
.bubble-inspection-context input { border-color: #91aebb; color: #102a3a; }
.bubble-inspection-context input::placeholder { color: #708491; }
.bubble-inspection-context input:disabled { background: #dfe8ed; color: #536b79; opacity: 1; }

.bubble-recognition-plan {
  background: #f8fafb;
  border-bottom-color: #b8cbd6;
  box-shadow: inset 4px 0 #2d83cc;
}
.bubble-recognition-plan span { color: #536d7c; font-size: 9px; }
.bubble-recognition-plan strong { color: #16384b; font-size: 10px; }
.bubble-recognition-plan small { color: #627988; font-size: 9px; }
.bubble-recognition-plan .bubble-time-estimate { border-left-color: #aebfca; color: #315f78; }
.bubble-recognition-plan .bubble-start-blocker { color: #a54f0c; }
.bubble-recognition-plan em { color: #16384b; font-size: 10px; }
.bubble-progress-track { background: #d3dfe6; height: 8px; }
.bubble-progress-track > span { background: #2d83cc; }

.bubble-workspace:is(.is-processing, .is-appending) .bubble-recognition-plan {
  background: #eaf4fb;
  border-bottom-color: #8fb4cb;
  box-shadow: inset 6px 0 #176eb9, 0 4px 14px rgba(30, 80, 113, .12);
  grid-template-columns: minmax(300px, 1fr) minmax(260px, .65fr) 64px;
  min-height: 72px;
  padding-bottom: 11px;
  padding-top: 11px;
}
.bubble-workspace:is(.is-processing, .is-appending) .bubble-recognition-plan > div:first-child { grid-template-columns: auto minmax(0, 1fr); }
.bubble-workspace:is(.is-processing, .is-appending) .bubble-recognition-plan > div:first-child > strong { font-size: 12px; }
.bubble-workspace:is(.is-processing, .is-appending) .bubble-recognition-plan > div:first-child > small:first-of-type { color: #476679; font-size: 9px; }
.bubble-workspace:is(.is-processing, .is-appending) .bubble-recognition-plan .bubble-time-estimate { display: none; }
.bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-recognition-plan .bubble-time-estimate { display: none; }
.bubble-workspace:is(.is-processing, .is-appending) .bubble-progress-track {
  background: #c8dce9;
  border: 1px solid #8fb4cb;
  box-shadow: inset 0 1px 3px rgba(19, 61, 87, .16);
  height: 14px;
}
.bubble-workspace:is(.is-processing, .is-appending) .bubble-progress-track > span { background: #176eb9; }
.bubble-workspace:is(.is-processing, .is-appending) .bubble-recognition-plan em {
  background: #123c55;
  border-radius: 4px;
  color: #ffffff;
  font-size: 14px;
  min-width: 60px;
  padding: 8px 7px;
  text-align: center;
}

@media (max-width: 760px) {
  .bubble-recognition-plan > div:first-child { grid-template-columns: auto minmax(0, 1fr); }
  .bubble-recognition-plan .bubble-time-estimate { border-left: 0; grid-column: 2; grid-row: 3; padding-left: 0; }
  .bubble-workspace:is(.is-processing, .is-appending) .bubble-recognition-plan { grid-template-columns: minmax(0, 1fr) 58px; }
}

.bubble-review-layout { border-top: 1px solid #acbfca; }
.bubble-canvas-pane { background: #f7f9fa; }
.bubble-toolbar {
  background: #ffffff;
  border-bottom-color: #b8cbd6;
  min-height: 54px;
}
.bubble-toolbar .icon-button { color: #294858; }
.bubble-toolbar .icon-button:hover:not(:disabled) { background: #e8f0f4; color: #155f91; }
.bubble-toolbar .icon-button:disabled { color: #80919b; opacity: .65; }
.bubble-toolbar .toolbar-center span { color: #536b79; font-weight: 650; }
.bubble-toolbar .toolbar-center .bubble-toolbar-divider { background: #c7d4db; }
.bubble-state-legend {
  background: #f2f6f8;
  border-bottom-color: #b8cbd6;
  color: #405d6d;
  font-size: 9px;
  font-weight: 600;
  min-height: 34px;
}
.bubble-state-legend .needs-review i { background: #fff; border-color: #343b42; box-shadow: none; }
.bubble-state-legend .confirmed i { background: #262b30; border-color: #262b30; color: #fff; }
.bubble-state-legend .excluded { color: #8b4a4e; }
.bubble-state-legend .excluded i { border-color: #a8464c; }
.bubble-state-legend .excluded i::after { background: #a8464c; }
.bubble-state-legend .active { color: #155f91; }
.bubble-state-legend .active i { border-color: #176eb9; box-shadow: 0 0 0 2px rgba(23,110,185,.2); }
.bubble-state-legend em { color: #607785; }
.bubble-canvas {
  background-color: #edf2f4;
  background-image: linear-gradient(#d6e0e5 1px, transparent 1px), linear-gradient(90deg, #d6e0e5 1px, transparent 1px);
}
.bubble-canvas-empty { color: #506d7c; font-size: 10px; }
.bubble-canvas-empty svg { color: #356b87; }
.bubble-canvas-empty strong { color: #173b4f; font-size: 12px; }
.bubble-workspace-splitter { background: #dce5ea; border-color: #aebfc9; }
.bubble-workspace-splitter::after { background: #6e8795; }
.bubble-workspace-splitter:hover,
.bubble-workspace-splitter:focus-visible { background: #c9dbe4; }

.bubble-review-pane { background: #ffffff; }
.bubble-review-head {
  background: #ffffff;
  border-bottom-color: #b8cbd6;
}
.bubble-review-head p { color: #28795f; font-size: 9px; }
.bubble-review-head h2 { color: #102a3a; font-size: 15px; }
.bubble-review-total { color: #5d7482; font-size: 9px; }
.bubble-review-total strong { color: #102a3a; }
.bubble-review-decision-bar {
  background: #edf4f7;
  border-bottom-color: #b8cbd6;
  box-shadow: inset 4px 0 #2d83cc;
}
.bubble-review-decision-bar > div:first-child > svg { color: #176eb9; }
.bubble-review-decision-bar small { color: #58707f; font-size: 8px; }
.bubble-review-decision-bar strong { color: #102a3a; font-size: 11px; }
.bubble-review-decision-bar .danger-ghost:disabled {
  background: #f8f1f2;
  border-color: #d8bfc2;
  color: #8a555a;
  opacity: 1;
}
#bubble-accept-review:not(:disabled),
#bubble-confirm-items:not(:disabled) { background: #217a5a; border-color: #217a5a; }
.bubble-review-decision-bar .primary-button:disabled,
.bubble-review-actions > .primary-button:disabled {
  background: #879da9;
  border-color: #879da9;
  color: #ffffff;
  opacity: 1;
}
.bubble-review-tools {
  background: #f6f8f9;
  border-bottom-color: #c2d0d8;
}
.bubble-review-filter { background: #e4ecef; border-color: #c3d1d8; }
.bubble-review-filter button { color: #526b79; font-size: 9px; }
.bubble-review-filter button.is-selected { background: #ffffff; color: #134f78; box-shadow: inset 0 -2px #2d83cc; }
.bubble-review-tools > span { color: #5b7482; font-size: 9px; }
.bubble-review-table-head {
  background: #eaf0f3;
  border-bottom-color: #bccbd3;
  color: #3e5d6d;
  font-size: 9px;
}
.bubble-item-list { border-bottom-color: #bccbd3; }
.bubble-item-row { border-bottom-color: #d5e0e5; }
.bubble-item-row:hover { background: #f4f7f8; }
.bubble-item-row.is-selected { background: #e8f2f7; box-shadow: inset 3px 0 #176eb9; }
.bubble-item-focus strong { color: #173548; font-size: 10px; }
.bubble-item-focus small { color: #5b7381; font-size: 9px; }
.bubble-row-status { color: #536b79; font-size: 9px; }
.bubble-row-status.completed i { background: #28795f; }
.bubble-row-status.needs-review i { background: #c37a12; }
.bubble-list-empty,
.bubble-review-empty { color: #587180; font-size: 10px; }
.bubble-review-empty { background: #fbfcfc; }
.bubble-review-actions {
  background: #f4f7f8;
  border-top-color: #b8cbd6;
}
.bubble-review-actions .is-disabled,
.bubble-review-actions [aria-disabled="true"] {
  background: #e9eef1;
  border-color: #c3d0d7;
  color: #607783;
  opacity: 1;
}

@media (max-width: 760px) {
  .bubble-workbench-command,
  .bubble-inspection-context { box-shadow: none; }
  .bubble-review-pane { border-top-color: #aebfc9; }
}

.bubble-numbering-field { min-width: 0; }
.bubble-numbering-field > span {
  display: block;
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0;
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bubble-numbering-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  height: 42px;
  overflow: hidden;
  width: 100%;
}
.bubble-numbering-control button {
  align-items: center;
  border-radius: 0;
  display: flex;
  font-size: 9px;
  font-weight: 650;
  gap: 4px;
  justify-content: center;
  letter-spacing: 0;
  min-width: 0;
  padding: 0 6px;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
}
.bubble-numbering-control button + button { border-left: 1px solid currentColor; }
.bubble-numbering-control button svg { flex: 0 0 auto; height: 12px; width: 12px; }
.bubble-numbering-control button:disabled { cursor: default; opacity: .58; }
.bubble-upload-form .bubble-numbering-field > span { color: #aabbb5; }
.bubble-upload-form .bubble-numbering-control { background: #1b342b; border: 1px solid #557265; }
.bubble-upload-form .bubble-numbering-control button { color: #bcd0c7; }
.bubble-upload-form .bubble-numbering-control button.is-selected { background: #f5faf7; color: #1d6749; }
.bubble-workbench-command .bubble-numbering-field > span { color: #c5d6df; font-size: 9px; margin-bottom: 5px; }
.bubble-workbench-command .bubble-numbering-control { background: #0c3046; border: 1px solid #4f7488; height: 34px; }
.bubble-workbench-command .bubble-numbering-control button { color: #d2e0e7; }
.bubble-workbench-command .bubble-numbering-control button.is-selected { background: #ffffff; color: #123c55; }
.bubble-numbering-field.is-warning > span { color: #ffd08a; }
.bubble-numbering-field.is-warning .bubble-numbering-control { border-color: #d99232; box-shadow: 0 0 0 1px #d99232; }

@media (max-width: 760px) {
  .bubble-numbering-control button { font-size: 10px; }
  .bubble-numbering-field > span { font-size: 9px; }
}

/* Compact desktop review: keep the drawing primary on short laptop viewports. */
.bubble-compact-diagnostics { display: none; }
.bubble-workbench-command label > span,
.bubble-scope-field > span,
.bubble-workbench-command .bubble-numbering-field > span { font-size: 11px; }
.bubble-scope-control button,
.bubble-workbench-command .bubble-numbering-control button { font-size: 11px; }
.bubble-recognition-plan span,
.bubble-recognition-plan small { font-size: 11px; }
.bubble-recognition-plan strong { font-size: 12px; }
.bubble-review-head p,
.bubble-review-total,
.bubble-review-tools > span,
.bubble-review-table-head,
.bubble-row-status,
.bubble-item-focus small { font-size: 11px; }
.bubble-review-head h2 { font-size: 16px; }
.bubble-review-total strong { font-size: 13px; }
.bubble-review-decision-bar small { font-size: 10px; }
.bubble-review-decision-bar strong { font-size: 13px; }
.bubble-review-filter button { font-size: 11px; }
.bubble-item-focus strong { font-size: 12px; }
.bubble-state-legend { font-size: 11px; }
.bubble-toolbar-more { position: relative; }
.bubble-toolbar-more > summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  justify-content: center;
  list-style: none;
}
.bubble-toolbar-more > summary::-webkit-details-marker { display: none; }
.bubble-toolbar-more[open] > summary { background: #e8f0f4; color: #155f91; }
.bubble-toolbar-more-menu {
  background: #ffffff;
  border: 1px solid #b7c8d1;
  border-radius: 6px;
  box-shadow: 0 10px 28px rgba(23, 54, 73, .18);
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(3, 34px);
  left: 50%;
  padding: 6px;
  position: absolute;
  top: calc(100% + 6px);
  transform: translateX(-50%);
  width: max-content;
  z-index: 20;
}
.bubble-toolbar-more-menu .bubble-toolbar-divider {
  grid-column: 1 / -1;
  height: 1px !important;
  margin: 2px 0 !important;
  width: 100% !important;
}
.bubble-toolbar-more-menu #bubble-rotation-label {
  align-items: center;
  display: flex;
  justify-content: center;
}

@media (min-width: 761px) {
  .bubble-workspace:is(.is-reviewing, .is-confirmed) {
    height: calc(100dvh - 64px);
    min-height: 0;
    overflow: hidden;
  }
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-workspace-head {
    flex: 0 0 56px;
    min-height: 56px;
    padding: 7px 16px;
  }
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-workspace-head h1 { font-size: 18px; }
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-workspace-head-actions { gap: 9px; }
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-workspace-head-actions .secondary-button { min-height: 34px; }
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-workflow-steps { display: none; }
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-run-bar { display: none !important; }
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-recognition-plan {
    flex: 0 0 42px;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 42px;
    padding: 6px 12px 6px 16px;
  }
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-recognition-plan > div:first-child {
    align-items: center;
    display: flex;
    gap: 9px;
    min-width: 0;
  }
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-recognition-plan > div:first-child > span,
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-recognition-plan > div:first-child > strong,
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-recognition-plan > div:first-child > small:first-of-type {
    display: block;
    grid-column: auto;
    grid-row: auto;
    margin: 0;
  }
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-recognition-plan > div:first-child > strong,
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-recognition-plan > div:first-child > small:first-of-type {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-recognition-plan > div:first-child > strong { flex: 0 1 auto; }
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-recognition-plan > div:first-child > small:first-of-type { flex: 1 1 auto; }
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-recognition-plan .bubble-progress-track,
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-recognition-plan > em { display: none; }
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-compact-diagnostics {
    align-items: center;
    border: 0;
    display: flex;
    min-width: 0;
    padding: 0;
  }
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-compact-diagnostics summary {
    border: 1px solid #b7c8d1;
    border-radius: 5px;
    color: #405e6e;
    font-size: 11px;
    min-height: 30px;
    padding: 0 9px;
  }
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-compact-diagnostics > strong {
    font-size: 11px;
    max-width: min(420px, 50vw);
    right: 0;
  }
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-review-layout {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
  }
  .bubble-workspace.is-reviewing .bubble-review-actions { padding: 10px 12px; }
  .bubble-workspace.is-reviewing .bubble-review-actions > div { display: none; }
}

@media (min-width: 761px) and (max-height: 850px) {
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-workspace-head {
    flex-basis: 52px;
    min-height: 52px;
  }
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-recognition-plan {
    flex-basis: 40px;
    min-height: 40px;
  }
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-toolbar { min-height: 48px; }
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-state-legend { min-height: 30px; }
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-review-head { min-height: 52px; }
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-review-decision-bar { min-height: 46px; }
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-review-tools { min-height: 38px; }
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-review-table-head { flex-basis: 30px; }
}

/* Dense drawing review keeps the page and review actions reachable on small screens. */
@media (max-width: 760px) {
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-workflow-steps,
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-run-bar,
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-progress-track,
  .bubble-workspace:is(.is-reviewing, .is-confirmed) #bubble-workspace-progress-label { display: none !important; }
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-workspace-head { gap: 7px; min-height: 64px; padding: 9px 12px; }
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-recognition-plan { gap: 6px; grid-template-columns: minmax(0, 1fr) auto; min-height: 50px; padding: 8px 12px; }
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-recognition-plan > div:first-child { display: flex; flex-wrap: wrap; gap: 3px 6px; }
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-recognition-plan > div:first-child > span { display: none; }
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-recognition-plan > div:first-child > strong { font-size: 11px; overflow: visible; white-space: normal; }
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-recognition-plan > div:first-child > small { margin: 0; }
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-compact-diagnostics { border: 0; display: block; min-width: 0; padding: 0; }
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-compact-diagnostics summary { font-size: 10px; }
  .bubble-workspace:is(.is-reviewing, .is-confirmed) .bubble-canvas { min-height: 360px; }
  .bubble-review-decision-bar { align-items: flex-start; flex-wrap: wrap; }
  .bubble-review-decision-bar > div:last-child { flex: 1 1 auto; justify-content: flex-end; }
  .bubble-review-decision-bar button { white-space: nowrap; }
  .bubble-current-preview { min-width: 0; }
  .bubble-review-pane:has(.bubble-item-editor:not([hidden])) .bubble-item-editor { max-height: 400px; overflow-y: auto; }
}

/* Compact desktop intake: keep the drawing visible before recognition starts. */
@media (min-width: 761px) {
  .bubble-workspace:is(.is-empty, .is-configuring, .is-failed, .is-cancelled) .bubble-workspace-head {
    min-height: 56px;
    padding: 7px 16px;
  }
  .bubble-workspace:is(.is-empty, .is-configuring, .is-failed, .is-cancelled) .bubble-workspace-head h1 { font-size: 18px; }
  .bubble-workspace:is(.is-empty, .is-configuring, .is-failed, .is-cancelled) .bubble-workflow-steps { display: none; }
  .bubble-workspace:is(.is-empty, .is-configuring, .is-failed, .is-cancelled) .bubble-workbench-command {
    align-items: end;
    gap: 8px;
    grid-template-columns: minmax(240px, 1fr) auto minmax(116px, auto) minmax(126px, auto);
    min-height: 64px;
    padding: 8px 12px;
  }
  .bubble-workspace:is(.is-empty, .is-configuring, .is-failed, .is-cancelled) .bubble-scope-field {
    grid-column: 1;
    grid-row: 1;
  }
  .bubble-workspace:is(.is-empty, .is-configuring, .is-failed, .is-cancelled) .bubble-workspace-pages {
    grid-column: 2;
    grid-row: 1;
    height: 42px;
    padding: 0 2px;
  }
  .bubble-workspace:is(.is-empty, .is-configuring, .is-failed, .is-cancelled) .bubble-workbench-command .primary-button {
    grid-column: 3;
    grid-row: 1;
    min-height: 42px;
  }
  .bubble-workspace:is(.is-empty, .is-configuring, .is-failed, .is-cancelled) .bubble-recognition-settings {
    grid-column: 4;
    grid-row: 1;
  }
  .bubble-workspace:is(.is-empty, .is-configuring, .is-failed, .is-cancelled) .bubble-scope-control,
  .bubble-workspace:is(.is-empty, .is-configuring, .is-failed, .is-cancelled) .bubble-recognition-settings > summary { height: 42px; }
  .bubble-workspace:is(.is-empty, .is-configuring, .is-failed, .is-cancelled) .bubble-inspection-context:not([open]) {
    min-height: 34px;
    padding: 4px 12px;
  }
  .bubble-workspace:is(.is-empty, .is-configuring, .is-failed, .is-cancelled) .bubble-inspection-context:not([open]) .bubble-inspection-context-title {
    gap: 7px;
    grid-template-columns: 24px minmax(0, 1fr) 14px;
  }
  .bubble-workspace:is(.is-empty, .is-configuring, .is-failed, .is-cancelled) .bubble-inspection-context:not([open]) .bubble-inspection-context-title > svg:first-child {
    height: 24px;
    padding: 5px;
    width: 24px;
  }
  .bubble-workspace:is(.is-empty, .is-configuring, .is-failed, .is-cancelled) .bubble-inspection-context:not([open]) .bubble-inspection-context-title small { display: none; }
  .bubble-workspace:is(.is-empty, .is-configuring, .is-failed, .is-cancelled) .bubble-recognition-plan {
    min-height: 40px;
    padding: 5px 12px;
  }
}

/* Bubble workbench polish: quieter metadata, one upload action, clean viewport. */
.bubble-inspection-context {
  background: #f4f7f8;
  border-bottom-color: #c5d2d9;
  box-shadow: none;
}
.bubble-inspection-context-title > svg:first-child { background: transparent; color: #587180; }
.bubble-inspection-context-title > svg:last-child { color: #6c818d; }
.bubble-inspection-context-title strong { color: #3f5967; font-weight: 650; }
.bubble-inspection-context-title small { color: #718590; }
.bubble-inspection-context label > span { color: #536d7c; }
.bubble-canvas {
  scrollbar-width: none;
}
.bubble-canvas::-webkit-scrollbar,
.bubble-toolbar .toolbar-center::-webkit-scrollbar { display: none; height: 0; width: 0; }
.bubble-toolbar .toolbar-center { overflow-y: hidden; scrollbar-width: none; }

/* Drawing-first navigation: explicit pan mode plus compact, high-frequency controls. */
.bubble-canvas { cursor: default; }
.bubble-canvas.is-pan-tool { cursor: grab; }
.bubble-canvas.is-panning { cursor: grabbing; }
#bubble-pan-tool[aria-pressed="true"] {
  background: #dcebf3;
  box-shadow: inset 0 -2px #176eb9;
  color: #155f91;
}
.bubble-toolbar .toolbar-center #bubble-zoom-label { width: 44px; }
.bubble-toolbar .toolbar-center #bubble-rotation-label {
  align-items: center;
  display: flex;
  font-variant-numeric: tabular-nums;
  justify-content: center;
  width: 32px;
}

@media (min-width: 761px) {
  html:has(#bubble-workspace-view.is-visible),
  body:has(#bubble-workspace-view.is-visible) { overflow-y: hidden; }
  .bubble-workspace.is-visible {
    height: calc(100dvh - 64px);
    min-height: 0;
    overflow: hidden;
    padding: 0;
  }
  .bubble-workspace:is(.is-empty, .is-configuring, .is-processing, .is-failed, .is-cancelled, .is-reviewing, .is-confirmed) .bubble-workspace-head {
    flex: 0 0 48px;
    min-height: 48px;
    padding: 6px 14px;
  }
  .bubble-workspace:is(.is-empty, .is-configuring, .is-processing, .is-failed, .is-cancelled, .is-reviewing, .is-confirmed) .bubble-workspace-head h1 { font-size: 17px; }
  .bubble-workspace:is(.is-empty, .is-configuring, .is-processing, .is-failed, .is-cancelled, .is-reviewing, .is-confirmed) .bubble-workspace-head-actions .secondary-button { min-height: 32px; }
  .bubble-workspace:is(.is-empty, .is-configuring, .is-failed, .is-cancelled) {
    height: calc(100dvh - 64px);
    min-height: 0;
    overflow: hidden;
    padding-bottom: 0;
  }
  .bubble-workspace:is(.is-empty, .is-configuring, .is-failed, .is-cancelled) .bubble-review-layout {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
  }
  .bubble-workspace:is(.is-empty, .is-configuring, .is-failed, .is-cancelled) .bubble-workbench-command {
    min-height: 50px;
    padding: 6px 12px;
  }
  .bubble-workspace:is(.is-empty, .is-configuring, .is-failed, .is-cancelled) .bubble-scope-field > span { display: none; }
  .bubble-workspace:is(.is-empty, .is-configuring, .is-failed, .is-cancelled) .bubble-scope-control,
  .bubble-workspace:is(.is-empty, .is-configuring, .is-failed, .is-cancelled) .bubble-recognition-settings > summary,
  .bubble-workspace:is(.is-empty, .is-configuring, .is-failed, .is-cancelled) .bubble-workspace-pages { height: 38px; }
  .bubble-workspace:is(.is-empty, .is-configuring, .is-failed, .is-cancelled) .bubble-workbench-command .primary-button { min-height: 38px; }
  .bubble-workspace:is(.is-empty, .is-configuring, .is-failed, .is-cancelled) .bubble-inspection-context:not([open]) {
    gap: 0;
    min-height: 28px;
    padding: 2px 12px;
  }
  .bubble-workspace:is(.is-empty, .is-configuring, .is-failed, .is-cancelled) .bubble-inspection-context:not([open]) .bubble-inspection-context-title {
    grid-template-columns: 22px minmax(0, 1fr) 14px;
  }
  .bubble-workspace:is(.is-empty, .is-configuring, .is-failed, .is-cancelled) .bubble-inspection-context:not([open]) .bubble-inspection-context-title > svg:first-child {
    height: 22px;
    padding: 4px;
    width: 22px;
  }
  .bubble-workspace.is-empty .bubble-recognition-plan { display: none; }
  .bubble-workspace:is(.is-configuring, .is-failed, .is-cancelled, .is-reviewing, .is-confirmed) .bubble-recognition-plan {
    flex-basis: 36px;
    min-height: 36px;
    padding-bottom: 4px;
    padding-top: 4px;
  }
  .bubble-workspace .bubble-toolbar {
    min-height: 46px;
    padding: 5px 10px;
  }
  .bubble-workspace .bubble-state-legend {
    flex-basis: 28px;
    min-height: 28px;
  }
  .bubble-workspace.is-empty #bubble-workspace-start { display: none; }
  .bubble-workspace.is-empty .bubble-workbench-command {
    grid-template-columns: minmax(240px, 1fr) auto minmax(126px, auto);
  }
  .bubble-workspace.is-empty .bubble-recognition-settings { grid-column: 3; }
}

/* Dimension-integrity cases reuse the inspection engine with a distinct, read-only workflow. */
.integrity-intake {
  background: #18242b;
  border-left: 4px solid var(--coral);
  color: #f4f8f7;
  margin-bottom: 18px;
  padding: 20px 24px 0;
}
.integrity-intake-heading { align-items: center; display: flex; gap: 12px; }
.integrity-intake-heading > span {
  align-items: center;
  background: #2b3c45;
  color: #f08b72;
  display: flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}
.integrity-intake-heading svg { height: 19px; width: 19px; }
.integrity-intake-heading p { color: #ef9b86; font-size: 9px; font-weight: 700; margin: 0 0 4px; text-transform: uppercase; }
.integrity-intake-heading h2 { font-size: 17px; margin: 0; }
.integrity-intake-heading > em {
  align-items: center;
  border: 1px solid #4b626c;
  color: #b9c9ce;
  display: flex;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  gap: 6px;
  margin-left: auto;
  min-height: 28px;
  padding: 0 9px;
}
.integrity-intake-heading > em svg { color: #80d1c6; height: 13px; width: 13px; }
.integrity-mode-control {
  background: #101a20;
  border: 1px solid #34464f;
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
  padding: 3px;
}
.integrity-mode-control button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  color: #aebdc3;
  cursor: pointer;
  display: flex;
  gap: 10px;
  min-height: 54px;
  padding: 8px 12px;
  text-align: left;
}
.integrity-mode-control button:hover { background: #1c2b33; color: #f4f8f7; }
.integrity-mode-control button.is-selected {
  background: #f4f7f6;
  border-color: #f4f7f6;
  color: #20323b;
}
.integrity-mode-control button > svg { color: #ef8d75; flex: 0 0 18px; height: 18px; width: 18px; }
.integrity-mode-control button > span { display: grid; gap: 3px; min-width: 0; }
.integrity-mode-control strong { font-size: 11px; }
.integrity-mode-control small { color: #81939b; font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.integrity-mode-control button.is-selected small { color: #60727a; }
.integrity-flow {
  align-items: center;
  border-bottom: 1px solid #34464f;
  border-top: 1px solid #34464f;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr) 18px minmax(0, 1fr);
  list-style: none;
  margin: 18px 0 0;
  padding: 14px 0;
}
.integrity-flow li { align-items: center; display: flex; gap: 10px; min-width: 0; }
.integrity-flow li:nth-child(even) { color: #607781; justify-content: center; }
.integrity-flow li:nth-child(even) svg { height: 15px; width: 15px; }
.integrity-flow li > span {
  align-items: center;
  background: #2b3c45;
  border: 1px solid #4c626d;
  border-radius: 50%;
  color: #f08b72;
  display: flex;
  flex: 0 0 28px;
  font-size: 10px;
  font-weight: 800;
  height: 28px;
  justify-content: center;
}
.integrity-flow li > div { display: grid; gap: 2px; min-width: 0; }
.integrity-flow strong { color: #f4f8f7; font-size: 11px; }
.integrity-flow small { color: #9dafb7; font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.integrity-intake-controls {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(280px, 1.5fr) minmax(170px, .7fr) auto;
  margin-top: 18px;
}
.integrity-intake-controls label { display: grid; gap: 6px; }
.integrity-intake-controls label > span,
.integrity-project-context > span { color: #9dafb7; font-size: 10px; }
.integrity-self-scan-context {
  border-left: 2px solid #70c7b9;
  display: grid;
  gap: 4px;
  min-height: 40px;
  padding: 1px 0 1px 10px;
}
.integrity-self-scan-context > span { color: #9dafb7; font-size: 9px; }
.integrity-self-scan-context strong { color: #f4f8f7; font-size: 12px; }
.integrity-self-scan-context small { color: #9dafb7; font-size: 9px; line-height: 1.4; }
.integrity-baseline-field > span { align-items: center; display: flex; justify-content: space-between; }
.integrity-baseline-field > span b { font-weight: 600; }
.integrity-baseline-field > span em {
  color: #efb0a0;
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
}
.integrity-baseline-field > span em.is-ready { color: #80d1c6; }
.integrity-intake-controls select {
  background: #f8faf9;
  border: 1px solid #566872;
  color: #20323b;
  height: 40px;
  min-width: 0;
  padding: 0 10px;
}
.integrity-project-context {
  border-bottom: 1px solid #42545d;
  display: grid;
  gap: 5px;
  min-height: 40px;
  padding: 2px 0 7px;
}
.integrity-project-context strong { font-size: 13px; }
.integrity-upload-button { min-height: 40px; white-space: nowrap; }
.integrity-intake-foot {
  border-top: 1px solid #34464f;
  color: #9dafb7;
  display: flex;
  font-size: 9px;
  gap: 22px;
  margin-top: 18px;
  padding: 11px 0 12px;
}
.integrity-intake-foot span { align-items: center; display: inline-flex; gap: 5px; white-space: nowrap; }
.integrity-intake-foot span:first-child { color: #80d1c6; }
.integrity-intake-foot svg { height: 12px; width: 12px; }
.integrity-metrics { margin-bottom: 18px; }
.integrity-list-actions { align-items: center; display: flex; gap: 8px; }
.integrity-list-actions .text-button { min-height: 34px; }
.integrity-list-actions .text-button svg { height: 14px; width: 14px; }
.integrity-risk { color: #b74638; }
.integrity-normal { color: #27715b; }
.bubble-workspace[data-task-purpose="dimension_integrity"] [data-numbering-field="workbench"] { display: none; }
.bubble-workspace[data-task-purpose="dimension_integrity"] .bubble-state-legend { border-top-color: #e8b6aa; }
.bubble-version-diff {
  align-items: center;
  background: #f8faf9;
  border-bottom: 1px solid #b8cbd6;
  display: grid;
  flex: 0 0 auto;
  gap: 12px;
  grid-template-columns: minmax(170px, 1fr) auto auto auto auto;
  min-height: 54px;
  padding: 7px 12px;
}
.bubble-version-diff[hidden] { display: none; }
.bubble-version-diff-title { align-items: center; display: flex; gap: 8px; min-width: 0; }
.bubble-version-diff-title > svg { color: #b74638; flex: 0 0 auto; height: 18px; width: 18px; }
.bubble-version-diff-title > span { display: grid; gap: 2px; min-width: 0; }
.bubble-version-diff-title strong { color: #223945; font-size: 11px; }
.bubble-version-diff-title small { color: #607785; font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bubble-version-diff-counts { align-items: center; display: flex; gap: 5px; }
.bubble-version-diff-counts span {
  align-items: baseline;
  background: #ffffff;
  border: 1px solid #c6d3d9;
  color: #536b79;
  display: inline-flex;
  font-size: 8px;
  gap: 4px;
  min-height: 28px;
  padding: 4px 7px;
  white-space: nowrap;
}
.bubble-version-diff-counts strong { color: #203946; font-size: 12px; font-variant-numeric: tabular-nums; }
.bubble-version-diff-counts .is-risk strong { color: #b74638; }
.bubble-version-layout-control {
  align-items: center;
  background: #ffffff;
  border: 1px solid #c6d3d9;
  display: inline-flex;
  gap: 4px;
  min-height: 32px;
  padding: 0 6px;
}
.bubble-version-layout-control[hidden] { display: none; }
.bubble-version-layout-control svg { color: #607785; flex: 0 0 auto; height: 13px; width: 13px; }
.bubble-version-layout-control select {
  appearance: auto;
  background: transparent;
  border: 0;
  color: #263943;
  font: inherit;
  font-size: 9px;
  max-width: 128px;
  min-width: 82px;
  outline: 0;
}
.bubble-version-view-control { flex-wrap: nowrap; }
.bubble-version-view-control button { gap: 5px; min-height: 32px; padding: 0 9px; white-space: nowrap; }
.bubble-version-view-control button svg { height: 13px; width: 13px; }
.bubble-version-view-control button.is-selected { background: #263943; border-color: #263943; color: #ffffff; }
.bubble-version-diff-legend { align-items: center; color: #536b79; display: flex; font-size: 8px; gap: 8px; white-space: nowrap; }
.bubble-version-diff-legend span { align-items: center; display: inline-flex; gap: 4px; }
.bubble-version-diff-legend i { background: #36414e; display: inline-block; height: 3px; width: 12px; }
.bubble-version-diff-legend .is-added i { background: #0d8977; }
.bubble-version-diff-legend .is-removed i { background: #c94139; }
.bubble-version-diff[data-preview-mode="baseline"] .bubble-version-diff-legend,
.bubble-version-diff[data-preview-mode="returned"] .bubble-version-diff-legend { opacity: .45; }
.bubble-geometry-diff-marker {
  align-items: center;
  border: 1px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(32, 57, 70, .28), 0 2px 7px rgba(26, 42, 50, .28);
  display: flex;
  height: 12px;
  justify-content: center;
  pointer-events: auto;
  position: absolute;
  transform: translate(-50%, -50%);
  width: 12px;
  z-index: 8;
}
.bubble-geometry-diff-marker i { background: #ffffff; border-radius: 50%; height: 3px; width: 3px; }
.bubble-geometry-diff-marker.is-added { background: #0d8977; }
.bubble-geometry-diff-marker.is-removed { background: #c94139; }
.bubble-geometry-diff-marker.is-modified { background: #d58a18; }
.bubble-dimension-diff-marker {
  align-items: center;
  background: #d58a18;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 2px rgba(135, 78, 7, .58), 0 3px 9px rgba(44, 31, 15, .3);
  color: #ffffff;
  display: flex;
  height: 18px;
  justify-content: center;
  pointer-events: auto;
  position: absolute;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 18px;
  z-index: 9;
}
.bubble-dimension-diff-marker.is-critical { background: #c94139; box-shadow: 0 0 0 2px rgba(151, 41, 35, .5), 0 3px 9px rgba(44, 31, 15, .3); }
.bubble-dimension-diff-marker i { font-size: 8px; font-style: normal; font-weight: 800; transform: rotate(-45deg); }
.bubble-geometry-diff-list { border-top: 1px solid #d8e1e5; display: grid; gap: 0; margin-top: 10px; padding-top: 8px; }
.bubble-geometry-diff-row { align-items: start; border-top: 1px solid #e4eaed; display: grid; gap: 7px; grid-template-columns: 20px minmax(0, 1fr); padding: 7px 0; }
.bubble-geometry-diff-row:first-of-type { border-top: 0; }
.bubble-geometry-diff-row > span { align-items: center; background: #d58a18; border-radius: 50%; color: #ffffff; display: flex; font-size: 8px; font-weight: 750; height: 18px; justify-content: center; width: 18px; }
.bubble-geometry-diff-row.is-added > span { background: #0d8977; }
.bubble-geometry-diff-row.is-removed > span { background: #c94139; }
.bubble-geometry-diff-row > div { display: grid; gap: 2px; min-width: 0; }
.bubble-geometry-diff-row strong { color: #263943; font-size: 10px; }
.bubble-geometry-diff-row small { color: #687d88; font-size: 8px; }
.bubble-geometry-diff-row em { align-items: center; color: #415c69; display: flex; flex-wrap: wrap; font-size: 9px; font-style: normal; gap: 5px; line-height: 1.45; }
.bubble-geometry-diff-row em svg { color: #8b9ca5; flex: 0 0 auto; height: 11px; width: 11px; }

@media (max-width: 900px) {
  .integrity-intake-controls { grid-template-columns: 1fr; }
  .integrity-intake-controls .primary-button { justify-self: stretch; width: 100%; }
  .integrity-intake-foot { flex-wrap: wrap; row-gap: 8px; }
  .bubble-version-diff { grid-template-columns: minmax(160px, 1fr) auto; }
  .bubble-version-diff-counts { justify-content: flex-end; }
  .bubble-version-layout-control { justify-self: start; }
  .bubble-version-view-control { justify-self: start; }
  .bubble-version-diff-legend { justify-self: end; }
}

@media (max-width: 600px) {
  .integrity-intake { padding-left: 16px; padding-right: 16px; }
  .integrity-intake-heading > em { padding: 0 7px; }
  .integrity-mode-control { grid-template-columns: 1fr; }
  .integrity-mode-control button { min-height: 50px; }
  .integrity-flow { align-items: stretch; grid-template-columns: 1fr; }
  .integrity-flow li:nth-child(even) { display: none; }
  .integrity-intake-foot { align-items: flex-start; display: grid; gap: 7px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bubble-version-diff { gap: 7px; grid-template-columns: 1fr; padding: 8px 10px; }
  .bubble-version-diff-counts { justify-content: flex-start; overflow-x: auto; }
  .bubble-version-layout-control { justify-self: stretch; }
  .bubble-version-layout-control select { max-width: none; width: 100%; }
  .bubble-version-view-control { justify-self: stretch; }
  .bubble-version-view-control button { flex: 1 1 0; }
  .bubble-version-diff-legend { justify-self: start; }
}

/* The annotation workbench reserves desktop space for the drawing, not the app shell. */
@media (min-width: 761px) {
  body:has(#bubble-workspace-view.is-visible) .main-area { margin-left: 64px; }
  body:has(#bubble-workspace-view.is-visible) .sidebar { box-shadow: none; transform: none; width: 244px; }
  body:has(#bubble-workspace-view.is-visible) .sidebar:not(.is-open) { overflow-x: hidden; padding: 10px 7px; width: 64px; }
  body:has(#bubble-workspace-view.is-visible) .sidebar:not(.is-open) .brand { justify-content: center; margin-bottom: 9px; padding: 0 0 11px; }
  body:has(#bubble-workspace-view.is-visible) .sidebar:not(.is-open) :is(.brand > div, .brand > span, .sidebar-section-title, .nav-section-label, .usage-block, .sidebar-project, .sidebar-engine, .product-module-switch span, .nav-item > span, .nav-item > em) { display: none; }
  body:has(#bubble-workspace-view.is-visible) .sidebar:not(.is-open) .sidebar-product-area { margin-bottom: 8px; padding-bottom: 8px; }
  body:has(#bubble-workspace-view.is-visible) .sidebar:not(.is-open) .product-module-switch { grid-template-columns: 1fr; }
  body:has(#bubble-workspace-view.is-visible) .sidebar:not(.is-open) .product-module-switch > [data-product-module] { justify-content: center; min-height: 38px; padding: 0; }
  body:has(#bubble-workspace-view.is-visible) .sidebar:not(.is-open) .sidebar-nav-group { background: transparent; border: 0; border-bottom: 1px solid #315367; border-radius: 0; margin-bottom: 8px; padding: 0 0 8px; }
  body:has(#bubble-workspace-view.is-visible) .sidebar:not(.is-open) .nav-item { height: 38px; justify-content: center; padding: 0; }
  body:has(#bubble-workspace-view.is-visible) .topbar { height: 40px; padding: 0 12px; box-shadow: none; }
  body:has(#bubble-workspace-view.is-visible) .topbar :is(.workspace-badge, .context-standard, .user-copy small) { display: none; }
  body:has(#bubble-workspace-view.is-visible) .topbar-context { gap: 10px; }
  body:has(#bubble-workspace-view.is-visible) .mobile-nav { align-items: center; background: transparent; border: 0; cursor: pointer; display: inline-flex; flex: 0 0 32px; height: 32px; justify-content: center; padding: 0; width: 32px; }
  body:has(#bubble-workspace-view.is-visible) .mobile-nav svg { height: 18px; width: 18px; }
  body:has(#bubble-workspace-view.is-visible) .user-switcher { min-height: 32px; }
  body:has(#bubble-workspace-view.is-visible) .avatar { height: 28px; width: 28px; }
  body:has(#bubble-workspace-view.is-visible) .bubble-workspace.is-visible { height: calc(100dvh - 40px); min-height: 0; }
  .bubble-workspace.is-visible .bubble-review-layout { --bubble-review-width: 300px; }
  .bubble-workspace.is-visible .bubble-canvas { background: #e9edf0; }
  .bubble-workspace.is-visible:is(.is-reviewing, .is-confirmed) .bubble-workspace-head { flex-basis: 40px; min-height: 40px; padding: 3px 12px; }
  .bubble-workspace.is-visible:is(.is-reviewing, .is-confirmed) .bubble-workspace-head .breadcrumb { display: none; }
  .bubble-workspace.is-visible:is(.is-reviewing, .is-confirmed) .bubble-workspace-head h1 { font-size: 15px; line-height: 1.4; }
  .bubble-workspace.is-visible:is(.is-reviewing, .is-confirmed) .bubble-recognition-plan { flex-basis: 34px; min-height: 34px; padding: 2px 12px; }
  .bubble-workspace.is-visible:is(.is-reviewing, .is-confirmed) .bubble-recognition-plan > div:first-child > span { display: none; }
  .bubble-workspace.is-visible:is(.is-reviewing, .is-confirmed) .bubble-compact-diagnostics summary { min-height: 26px; }
  .bubble-workspace.is-visible:is(.is-reviewing, .is-confirmed) .bubble-toolbar { min-height: 44px; padding-bottom: 4px; padding-top: 4px; }
  .bubble-workspace.is-visible:is(.is-reviewing, .is-confirmed) .bubble-state-legend { flex-basis: 26px; line-height: 18px; min-height: 26px; padding-bottom: 3px; padding-top: 3px; }
  .bubble-workspace.is-visible:is(.is-reviewing, .is-confirmed) .bubble-review-head { min-height: 44px; padding-bottom: 5px; padding-top: 5px; }
  .bubble-workspace.is-visible:is(.is-reviewing, .is-confirmed) .bubble-review-head p { display: none; }
  .bubble-workspace.is-visible:is(.is-reviewing, .is-confirmed) .bubble-review-decision-bar { min-height: 44px; padding: 5px 10px; }
  .bubble-workspace.is-visible:is(.is-reviewing, .is-confirmed) .bubble-review-tools { min-height: 38px; padding: 3px 8px; }
  .bubble-workspace.is-visible:is(.is-reviewing, .is-confirmed) .bubble-review-table-head { flex-basis: 28px; }
}

@container (max-width: 380px) {
  .bubble-review-head { gap: 6px; padding-left: 10px; padding-right: 10px; }
  .bubble-review-head-actions { gap: 8px; }
  .bubble-review-navigation #bubble-next-review { height: 28px; min-height: 28px; padding: 0; width: 28px; }
  .bubble-review-navigation #bubble-next-review span { display: none; }
  .bubble-review-decision-bar > div:first-child { gap: 5px; min-width: 0; }
  .bubble-review-decision-bar strong { font-size: 11px; line-height: 1.45; }
  .bubble-review-decision-bar small { display: none; }
  .bubble-review-decision-bar button { flex: 0 0 32px; height: 32px; min-height: 32px; padding: 0; width: 32px; }
  .bubble-review-decision-bar button span { display: none; }
  .bubble-review-tools { flex-wrap: wrap; gap: 2px; }
  .bubble-review-filter { width: 100%; }
  .bubble-review-filter button { flex: 1; min-width: 0; padding: 0 6px; }
  .bubble-review-grid { gap: 5px; grid-template-columns: 20px minmax(0, 1fr) 66px 26px; }
  .bubble-item-row { padding-left: 8px; padding-right: 8px; }
}

@container (max-width: 520px) {
  .bubble-toolbar .toolbar-center :is(#bubble-rotate-left:disabled, #bubble-rotate-right:disabled),
  .bubble-toolbar .toolbar-center:has(#bubble-rotate-left:disabled):has(#bubble-rotate-right:disabled) #bubble-rotation-label { display: none; }
}

/* List and detail are separate work surfaces; drafts survive switching between them. */
.bubble-review-tabs { align-items: stretch; border-bottom: 1px solid #d4dce1; display: flex; flex: 0 0 36px; padding: 0 10px; }
.bubble-review-tabs button { align-items: center; background: transparent; border: 0; border-bottom: 2px solid transparent; color: #63717a; cursor: pointer; display: flex; font: inherit; font-size: 12px; gap: 7px; justify-content: center; min-width: 0; padding: 0 12px; }
.bubble-review-tabs button[aria-selected="true"] { border-bottom-color: #2479ad; color: #1d5e88; font-weight: 600; }
.bubble-review-tabs button:disabled { cursor: default; opacity: .45; }
.bubble-review-tabs svg { height: 14px; width: 14px; }
.bubble-review-tabs em { font-size: 11px; font-style: normal; font-variant-numeric: tabular-nums; }
.bubble-review-pane[data-pane-view="detail"] :is(.bubble-item-list, .bubble-review-tools, .bubble-review-table-head, .bubble-review-actions) { display: none; }
.bubble-review-pane[data-pane-view="list"] .bubble-current-preview { display: none; }
.bubble-review-pane[data-pane-view="detail"] .bubble-current-preview { border-top: 0; padding-bottom: 6px; }
.bubble-review-pane[data-pane-view="detail"] #bubble-current-detail { display: none; }
.bubble-crop-tools { align-items: center; display: flex; gap: 3px; }
.bubble-crop-tools .icon-button { height: 26px; width: 26px; }
.bubble-crop-navigation { align-items: center; display: flex; height: 34px; justify-content: space-between; margin-bottom: 4px; }
.bubble-crop-navigation .segmented { flex: 0 0 auto; min-height: 28px; padding: 2px; width: auto; }
.bubble-crop-navigation .segmented button { font-size: 11px; min-height: 26px; padding: 0 10px; }
.bubble-crop-line-navigation { align-items: center; display: flex; gap: 4px; }
.bubble-crop-line-navigation .icon-button { height: 28px; width: 28px; }
.bubble-crop-line-navigation span { color: #53616b; font-size: 11px; font-variant-numeric: tabular-nums; min-width: 50px; text-align: center; }
.bubble-crop-navigation[hidden], .bubble-crop-line-navigation[hidden] { display: none; }
.bubble-crop-viewport { background: #fff; height: 136px; overflow: auto; overscroll-behavior: contain; width: 100%; }
.bubble-current-preview .bubble-crop-viewport canvas { max-width: none; }
.bubble-review-pane[data-pane-view="detail"] .bubble-item-editor:not([hidden]) { align-content: start; background: #fff; flex: 1 1 auto; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); height: auto; max-height: none; min-height: 100px; overflow-y: auto; padding: 12px; }
.bubble-review-pane[data-pane-view="detail"] .bubble-item-editor.is-requirement { grid-template-columns: minmax(0, 1fr); }
.bubble-review-pane[data-pane-view="detail"] .bubble-item-editor.is-requirement textarea { font-size: 13px; line-height: 1.75; min-height: 196px; }
.bubble-review-pane .bubble-editor-heading strong { font-size: 12px; }
.bubble-review-pane .bubble-editor-heading small:empty { display: none; }
.bubble-editor-evidence { border-top: 1px solid #dce3e7; }
.bubble-editor-evidence > summary { align-items: center; color: #526572; cursor: pointer; display: flex; font-size: 12px; justify-content: space-between; list-style: none; min-height: 36px; }
.bubble-editor-evidence > summary::-webkit-details-marker { display: none; }
.bubble-editor-evidence > summary svg { height: 14px; width: 14px; }
.bubble-editor-evidence[open] > summary svg { transform: rotate(180deg); }
.bubble-editor-evidence .bubble-recognition-evidence { margin: 0; }
.bubble-editor-savebar { align-items: center; background: #fff; border-top: 1px solid #d4dce1; display: flex; flex: 0 0 auto; gap: 8px; min-height: 52px; padding: 8px 12px; }
.bubble-editor-savebar[hidden] { display: none; }
.bubble-editor-savebar > span { color: #65727b; flex: 1 1 auto; font-size: 11px; min-width: 0; overflow-wrap: anywhere; }
.bubble-editor-savebar > span.is-conflict { color: #a84920; }
.bubble-editor-savebar .primary-button { flex: 0 0 auto; min-height: 34px; padding: 0 10px; }
.bubble-editor-savebar .icon-button { flex: 0 0 32px; height: 32px; width: 32px; }

body:has(#bubble-workspace-view.is-visible) [data-tooltip]::after { display: none; }
body:has(#bubble-workspace-view.is-visible) [data-tooltip]:is(:hover, :focus-visible)::after { display: block; opacity: 1; }
body:has(#bubble-workspace-view.is-visible) :is(.sidebar [data-tooltip], .bubble-row-checkbox) { position: relative; }
body:has(#bubble-workspace-view.is-visible) :is(.sidebar [data-tooltip], .bubble-review-actions [data-tooltip], .bubble-editor-savebar [data-tooltip])::after { bottom: calc(100% + 6px); top: auto; }
body:has(#bubble-workspace-view.is-visible) :is(.sidebar [data-tooltip], .bubble-row-checkbox)::after { left: 0; transform: none; }

@media (min-width: 761px) and (max-width: 1100px) {
  .bubble-workspace.is-visible .bubble-review-layout { --bubble-review-width: 300px; }
}

@media (max-width: 760px) {
  body:has(#bubble-workspace-view.is-visible) .topbar { height: 40px; padding: 0 10px; }
  body:has(#bubble-workspace-view.is-visible) .topbar :is(.workspace-badge, .context-standard, .user-copy) { display: none; }
  body:has(#bubble-workspace-view.is-visible) .topbar-context { gap: 8px; min-width: 0; }
  body:has(#bubble-workspace-view.is-visible) .user-switcher { min-height: 30px; }
  body:has(#bubble-workspace-view.is-visible) .avatar { height: 26px; width: 26px; }
  body:has(#bubble-workspace-view.is-visible) .bubble-workspace { padding: 0; }
  .bubble-workspace.is-visible:is(.is-reviewing, .is-confirmed) .bubble-workspace-head { align-items: center; gap: 8px; min-height: 42px; padding: 4px 10px; }
  .bubble-workspace.is-visible:is(.is-reviewing, .is-confirmed) .bubble-workspace-head .breadcrumb { display: none; }
  .bubble-workspace.is-visible:is(.is-reviewing, .is-confirmed) .bubble-workspace-head h1 { font-size: 14px; line-height: 1.5; }
  .bubble-workspace.is-visible:is(.is-reviewing, .is-confirmed) .bubble-workspace-head-actions { align-items: center; flex-direction: row; gap: 6px; }
  .bubble-workspace.is-visible:is(.is-reviewing, .is-confirmed) #bubble-workspace-upload { height: 30px; min-height: 30px; padding: 0; width: 30px; }
  .bubble-workspace.is-visible:is(.is-reviewing, .is-confirmed) #bubble-workspace-upload span { display: none; }
  .bubble-workspace.is-visible:is(.is-reviewing, .is-confirmed) .bubble-recognition-plan { gap: 6px; min-height: 32px; padding: 3px 10px; }
  .bubble-workspace.is-visible:is(.is-reviewing, .is-confirmed) .bubble-recognition-plan > div:first-child { display: block; }
  .bubble-workspace.is-visible:is(.is-reviewing, .is-confirmed) .bubble-recognition-plan > div:first-child > strong { display: block; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bubble-workspace.is-visible:is(.is-reviewing, .is-confirmed) .bubble-recognition-plan > div:first-child > small { display: none; }
  .bubble-workspace.is-visible:is(.is-reviewing, .is-confirmed) .bubble-compact-diagnostics summary { min-height: 24px; padding: 0 6px; }
  .bubble-workspace.is-visible:is(.is-reviewing, .is-confirmed) .bubble-toolbar { gap: 3px; min-height: 76px; padding: 3px 8px; }
  .bubble-workspace.is-visible:is(.is-reviewing, .is-confirmed) .bubble-toolbar .toolbar-center { gap: 3px; padding: 0; }
  .bubble-workspace.is-visible:is(.is-reviewing, .is-confirmed) .bubble-state-legend { flex-basis: 24px; gap: 8px; min-height: 24px; padding: 2px 8px; }
  .bubble-workspace.is-visible:is(.is-reviewing, .is-confirmed) .bubble-state-legend span { font-size: 10px; }
  .bubble-workspace.is-visible:is(.is-reviewing, .is-confirmed) .bubble-canvas { background: #e9edf0; flex: 0 0 420px; min-height: 420px; }
  .bubble-workspace.is-visible:is(.is-reviewing, .is-confirmed) .bubble-review-pane { max-height: 760px; min-height: 480px; overflow: hidden; }
  .bubble-workspace.is-visible:is(.is-reviewing, .is-confirmed) .bubble-review-pane[data-pane-view="detail"] { height: 720px; }
  .bubble-review-pane[data-pane-view="detail"] .bubble-item-editor :is(input:not([type="checkbox"]), select, textarea),
  .bubble-review-pane[data-pane-view="detail"] .bubble-item-editor.is-requirement textarea { font-size: 16px; }
  .bubble-workspace.is-visible:is(.is-reviewing, .is-confirmed) .bubble-review-head { min-height: 44px; padding: 5px 10px; }
  .bubble-workspace.is-visible:is(.is-reviewing, .is-confirmed) .bubble-review-head p { display: none; }
  .bubble-workspace.is-visible:is(.is-reviewing, .is-confirmed) .bubble-review-decision-bar { align-items: center; min-height: 42px; padding: 5px 10px; }
  .bubble-workspace.is-visible:is(.is-reviewing, .is-confirmed) .bubble-item-list { flex: 1 1 auto; max-height: none; overflow-y: auto; }
  .bubble-workspace.is-visible.is-reviewing .bubble-review-actions > div { display: none; }
}

/* One document toolbar; completed diagnostics no longer consume a canvas row. */
#bubble-workspace-view { position: relative; }
#bubble-workspace-view .bubble-workspace-head { align-items: center; display: grid; flex: 0 0 auto; gap: 10px; grid-template-columns: minmax(120px, 1fr) auto auto; min-height: 48px; padding: 6px 12px; }
#bubble-workspace-view .workspace-title-group, #bubble-workspace-view .workspace-title-group > div { min-width: 0; }
#bubble-workspace-view .bubble-workspace-head .breadcrumb { display: none; }
#bubble-workspace-view .bubble-workspace-head h1 { font-size: 15px; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#bubble-workspace-view .bubble-workspace-head-actions { align-items: center; flex-direction: row; gap: 6px; }
#bubble-workspace-view .bubble-workspace-head-actions .workspace-status { gap: 4px; }
#bubble-workspace-view .bubble-workspace-head-actions .workspace-status > span:not(.status-chip) { display: none; }
#bubble-workspace-view:not(.is-empty) #bubble-workspace-upload { height: 32px; min-height: 32px; padding: 0; width: 32px; }
#bubble-workspace-view:not(.is-empty) #bubble-workspace-upload span { display: none; }
#bubble-workspace-view .bubble-workspace-head .bubble-toolbar { align-items: center; background: transparent; border: 0; display: flex; flex: none; flex-wrap: nowrap; gap: 8px; min-height: 34px; min-width: 0; overflow: visible; padding: 0; }
#bubble-workspace-view .bubble-toolbar .toolbar-center { align-items: center; border: 0; display: flex; flex: 0 0 auto; gap: 3px; margin: 0; overflow: visible; padding: 0; width: auto; }
#bubble-workspace-view .bubble-toolbar .bubble-pages { flex: 0 1 auto; max-width: 128px; min-width: 48px; overflow-x: auto; padding: 0; }
#bubble-workspace-view .bubble-toolbar .bubble-pages button { flex: 0 0 auto; min-height: 30px; padding: 0 8px; }
#bubble-workspace-view .bubble-toolbar .icon-button { flex: 0 0 30px; height: 30px; min-height: 30px; width: 30px; }
#bubble-workspace-view .bubble-toolbar .toolbar-center #bubble-zoom-label { font-size: 12px; min-width: 40px; width: 40px; }
#bubble-workspace-view .bubble-toolbar-actions { display: flex; flex: 0 0 auto; gap: 3px; }
#bubble-workspace-view .bubble-toolbar-actions button { flex: 0 0 30px; height: 30px; min-height: 30px; min-width: 30px; padding: 0; width: 30px; }
#bubble-workspace-view .bubble-toolbar-actions button span { display: none; }
#bubble-workspace-view .bubble-toolbar :is(#bubble-rotate-left:disabled, #bubble-rotate-right:disabled, #bubble-clear-region:disabled) { display: none; }
#bubble-workspace-view .bubble-toolbar:has(#bubble-rotate-left:disabled):has(#bubble-rotate-right:disabled) #bubble-rotation-label { display: none; }
#bubble-workspace-view .bubble-task-info { flex: 0 0 auto; }
#bubble-workspace-view .bubble-task-info > summary { display: none; list-style: none; }
#bubble-workspace-view .bubble-task-info > summary::-webkit-details-marker { display: none; }
#bubble-workspace-view:not(.is-reviewing):not(.is-confirmed) .bubble-task-info :is(.bubble-state-legend, #bubble-review-summary) { display: none; }
#bubble-workspace-view:is(.is-reviewing, .is-confirmed) .bubble-workspace-head { padding-right: 54px; }
#bubble-workspace-view:is(.is-reviewing, .is-confirmed) .bubble-task-info { position: absolute; right: 12px; top: 8px; z-index: 45; }
#bubble-workspace-view:is(.is-reviewing, .is-confirmed) .bubble-task-info > summary { display: flex; height: 30px; width: 30px; }
#bubble-workspace-view:is(.is-reviewing, .is-confirmed) .bubble-task-info[open] > summary { background: #e8f0f4; color: #155f91; }
#bubble-workspace-view:is(.is-reviewing, .is-confirmed) .bubble-task-info-content { background: #fff; border: 1px solid #cbd5dc; border-radius: 6px; box-shadow: 0 6px 20px #1f29371f; max-height: min(520px, 70dvh); overflow-y: auto; padding: 12px; position: absolute; right: 0; top: 38px; width: min(420px, calc(100vw - 24px)); }
#bubble-workspace-view:is(.is-reviewing, .is-confirmed) .bubble-task-info .bubble-recognition-plan { background: transparent; border: 0; box-shadow: none; display: block; min-height: 0; padding: 0; }
#bubble-workspace-view:is(.is-reviewing, .is-confirmed) .bubble-task-info .bubble-recognition-plan > div:first-child { display: grid; gap: 6px; grid-template-columns: minmax(0, 1fr); }
#bubble-workspace-view:is(.is-reviewing, .is-confirmed) .bubble-task-info .bubble-recognition-plan > div:first-child > :is(strong, small:first-of-type) { display: block; font-size: 12px; grid-column: auto; grid-row: auto; line-height: 1.6; margin: 0; overflow: visible; white-space: normal; }
#bubble-workspace-view:is(.is-reviewing, .is-confirmed) .bubble-task-info .bubble-compact-diagnostics { display: block; margin-top: 10px; }
#bubble-workspace-view:is(.is-reviewing, .is-confirmed) .bubble-task-info .bubble-compact-diagnostics > strong { background: #f4f6f8; border: 0; box-shadow: none; display: block; margin: 6px 0 0; max-width: none; padding: 8px; position: static; white-space: normal; }
#bubble-workspace-view:is(.is-reviewing, .is-confirmed) .bubble-task-info .bubble-compact-diagnostics:not([open]) > strong { display: none; }
#bubble-workspace-view .bubble-task-info .bubble-state-legend { background: transparent; border: 0; flex-wrap: wrap; gap: 8px 12px; min-height: 0; padding: 12px 0 8px; }
#bubble-workspace-view .bubble-task-info .bubble-state-legend em { flex: 1 0 100%; font-size: 11px; margin: 0; }
#bubble-workspace-view .bubble-task-info #bubble-review-summary { color: #5b6873; display: block; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.bubble-workspace-alert { background: #fff4e5; border-bottom: 1px solid #e6c39b; color: #854710; flex: 0 0 auto; font-size: 12px; line-height: 1.6; padding: 7px 12px; }
.bubble-workspace-alert[hidden] { display: none; }

/* Review tabs share a header. Item decisions stay beside the editing/save area. */
#bubble-workspace-view .bubble-review-head { display: flex; flex: 0 0 42px; gap: 8px; min-height: 42px; padding: 0 8px; }
#bubble-workspace-view .bubble-review-head h2 { font-size: 13px; white-space: nowrap; }
#bubble-workspace-view .bubble-review-head p { display: none; }
#bubble-workspace-view .bubble-review-head-actions { flex: 0 0 auto; gap: 0; margin-left: auto; order: 3; }
#bubble-workspace-view .bubble-review-total { clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }
#bubble-workspace-view .bubble-review-tabs { align-self: stretch; border: 0; flex: 0 1 auto; min-width: 0; padding: 0; }
#bubble-workspace-view .bubble-review-tabs button { font-size: 12px; gap: 4px; padding: 0 7px; }
#bubble-workspace-view .bubble-review-tabs svg { display: none; }
#bubble-workspace-view .bubble-review-navigation { gap: 3px; }
#bubble-workspace-view .bubble-review-navigation button { height: 28px; min-height: 28px; padding: 0; width: 28px; }
#bubble-workspace-view #bubble-next-review span { display: none; }
#bubble-workspace-view .bubble-review-tools { flex: 0 0 36px; min-height: 36px; padding: 3px 8px; }
#bubble-workspace-view .bubble-review-filter { width: 100%; }
#bubble-workspace-view .bubble-review-filter button { flex: 1; min-height: 28px; min-width: 0; padding: 0 4px; }
#bubble-workspace-view .bubble-review-table-head { flex: 0 0 24px; min-height: 24px; }
#bubble-workspace-view .bubble-item-row > .bubble-row-status { grid-column: 3; grid-row: 1; }
#bubble-workspace-view .bubble-item-row > .bubble-row-actions { grid-column: 4; grid-row: 1; }
#bubble-workspace-view .bubble-row-actions .bubble-inline-save { height: 14px; right: -2px; top: -5px; width: 14px; }
#bubble-workspace-view .bubble-review-decision-bar { align-items: stretch; background: #fff; border-bottom: 0; border-top: 1px solid #d4dce1; display: flex; flex: 0 0 auto; flex-direction: column; gap: 6px; min-height: 0; padding: 8px 10px; }
#bubble-workspace-view .bubble-review-decision-bar > div:first-child { gap: 5px; }
#bubble-workspace-view .bubble-review-decision-bar small { display: none; }
#bubble-workspace-view .bubble-review-decision-bar strong { color: #596873; font-size: 11px; font-weight: 500; line-height: 1.5; }
#bubble-workspace-view .bubble-review-decision-bar > div:last-child { display: flex; gap: 8px; }
#bubble-workspace-view .bubble-review-decision-bar button { flex: 1 1 0; height: 32px; min-height: 32px; padding: 0 8px; width: auto; }
#bubble-workspace-view .bubble-review-decision-bar button span { display: inline; font-size: 12px; }
#bubble-workspace-view .bubble-review-rationale { flex: 0 0 auto; }
#bubble-workspace-view .bubble-review-actions { margin: 0; padding: 8px 10px; }
#bubble-workspace-view .bubble-review-actions > .primary-button { min-height: 32px; }
#bubble-workspace-view .bubble-review-layout { grid-template-columns: minmax(0, 1fr) 6px minmax(280px, min(var(--bubble-review-width), 50%)); }
#bubble-workspace-view .bubble-review-layout.is-review-collapsed { grid-template-columns: minmax(0, 1fr); }

/* Until a result exists, the drawing owns the full workspace width. */
#bubble-workspace-view:not(.is-reviewing):not(.is-confirmed):not(.is-processing) .bubble-review-layout { grid-template-columns: minmax(0, 1fr); }
#bubble-workspace-view:not(.is-reviewing):not(.is-confirmed):not(.is-processing) :is(.bubble-review-pane, .bubble-workspace-splitter, #bubble-toggle-review-pane) { display: none; }
#bubble-workspace-view .bubble-workflow-steps { display: none; }
#bubble-workspace-view.is-empty :is(.bubble-workbench-command, .bubble-inspection-context, .bubble-task-info, .bubble-toolbar, .bubble-workspace-head-actions) { display: none; }
#bubble-workspace-view.is-empty .bubble-workspace-head { grid-template-columns: 1fr; }
#bubble-workspace-view.is-empty .bubble-canvas { background: #f0f3f5; }
#bubble-workspace-view .bubble-canvas-empty { gap: 12px; padding: 24px; }
#bubble-workspace-view .bubble-canvas-empty > strong { font-size: 18px; line-height: 1.5; }
#bubble-workspace-view .bubble-canvas-empty > span { font-size: 12px; line-height: 1.6; }
#bubble-workspace-view #bubble-empty-upload { margin-top: 8px; pointer-events: auto; }
#bubble-workspace-view #bubble-empty-upload svg { color: inherit; height: 16px; width: 16px; }
#bubble-workspace-view:not(.is-empty) #bubble-empty-upload { display: none; }
#bubble-workspace-view .bubble-task-info > summary[data-tooltip]::after { left: auto; right: 0; transform: none; }

/* Intake and execution share the document surface without covering the drawing. */
#bubble-workspace-view:not(.is-empty) .bubble-workbench-command {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #d5dde2;
  box-shadow: none;
  gap: 8px 12px;
  grid-template-columns: 208px auto minmax(260px, 1fr) 36px auto;
  min-height: 52px;
  padding: 8px 12px;
}
#bubble-workspace-view .bubble-scope-field { grid-column: 1; grid-row: 1; min-width: 0; }
#bubble-workspace-view .bubble-scope-field > span { display: none; }
#bubble-workspace-view .bubble-scope-control { background: #f1f4f6; border: 1px solid #d2dbe1; height: 34px; }
#bubble-workspace-view .bubble-scope-control button { color: #52616b; justify-content: center; padding: 0 9px; }
#bubble-workspace-view .bubble-scope-control button strong { font-size: 12px; font-weight: 600; line-height: 1.5; }
#bubble-workspace-view .bubble-scope-control button.is-selected { background: #e4f1fa; box-shadow: inset 0 -2px #287ba8; color: #165b85; }
#bubble-workspace-view .bubble-workspace-pages { grid-column: 2; grid-row: 1; height: 34px; margin: 0; padding: 0; }
#bubble-workspace-view .bubble-workspace-pages > span { color: #52616b !important; font-size: 12px; font-weight: 500; white-space: nowrap; }
#bubble-workspace-view .bubble-workspace-pages.is-disabled { display: none; }
#bubble-workspace-view .bubble-intake-numbering { align-items: center; display: flex; gap: 10px; grid-column: 3; grid-row: 1; justify-content: flex-end; min-width: 0; padding: 0; }
#bubble-workspace-view .bubble-intake-numbering[hidden] { display: none; }
#bubble-workspace-view .bubble-intake-numbering > span { color: #52616b; display: block; font-size: 12px; line-height: 1.5; margin: 0; white-space: nowrap; }
#bubble-workspace-view .bubble-intake-numbering.needs-attention > span,
#bubble-workspace-view .bubble-intake-numbering.is-warning > span { color: #966118; }
#bubble-workspace-view .bubble-numbering-control { background: #fff; border: 1px solid #cdd7dd; flex: 0 0 auto; height: 34px; width: auto; }
#bubble-workspace-view .bubble-numbering-control button { color: #566773; font-size: 12px; gap: 5px; padding: 0 9px; }
#bubble-workspace-view .bubble-numbering-control button.is-selected { background: #edf6f0; box-shadow: inset 0 -2px #378366; color: #25654c; }
#bubble-workspace-view .bubble-intake-numbering.needs-attention .bubble-numbering-control { border-color: #bd954c; }
#bubble-workspace-view .bubble-workbench-command .primary-button { background: #2279ae; border-color: #2279ae; grid-column: 5; grid-row: 1; min-height: 34px; min-width: 114px; padding: 0 12px; }
#bubble-workspace-view .bubble-workbench-command .primary-button:disabled { background: #e9edf0; border-color: #d5dde2; color: #71808a; opacity: 1; }
#bubble-workspace-view .bubble-recognition-settings { display: contents; }
#bubble-workspace-view .bubble-recognition-settings::details-content { display: contents; }
#bubble-workspace-view .bubble-recognition-settings > summary { background: #fff; border: 1px solid #cdd7dd; color: #52616b; display: flex; grid-column: 4; grid-row: 1; height: 34px; min-height: 34px; padding: 0; width: 34px; }
#bubble-workspace-view .bubble-recognition-settings[open] > summary { background: #eaf2f7; border-color: #91b5ca; color: #155f91; }
#bubble-workspace-view .bubble-recognition-settings > summary svg { height: 16px; width: 16px; }
#bubble-workspace-view .bubble-recognition-settings-grid {
  align-items: start;
  background: #f5f7f9;
  border: 0;
  border-top: 1px solid #d5dde2;
  box-shadow: none;
  gap: 12px 20px;
  grid-column: 1 / -1;
  grid-row: 2;
  grid-template-columns: 180px minmax(0, 1fr);
  margin: 0 -12px -8px;
  max-height: 180px;
  overflow-y: auto;
  padding: 12px;
  position: static;
  width: auto;
}
#bubble-workspace-view .bubble-recognition-settings:not([open]) .bubble-recognition-settings-grid { display: none; }
#bubble-workspace-view .bubble-recognition-settings-grid label > span { color: #55636f; font-size: 11px; line-height: 1.5; margin-bottom: 5px; }
#bubble-workspace-view .bubble-recognition-settings-grid select,
#bubble-workspace-view .bubble-recognition-settings-grid input { background: #fff; border: 1px solid #cbd5dd; border-radius: 4px; color: #273946; font-size: 12px; height: 32px; min-width: 0; padding: 0 8px; width: 100%; }
#bubble-workspace-view .bubble-inspection-context { background: transparent; border: 0; box-shadow: none; display: grid; gap: 8px 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; min-width: 0; padding: 0; }
#bubble-workspace-view .bubble-inspection-context legend { color: #687882; font-size: 11px; margin-bottom: 4px; padding: 0; }
#bubble-workspace-view .bubble-inspection-context label { min-width: 0; }
#bubble-workspace-view:is(.is-submitting, .is-processing) .bubble-workbench-command { display: none; }
#bubble-workspace-view:is(.is-submitting, .is-processing) .workspace-status { display: none; }
#bubble-workspace-view.is-submitting .bubble-review-layout,
#bubble-workspace-view.is-processing:not(.has-partial-results) .bubble-review-layout { grid-template-columns: minmax(0, 1fr); }
#bubble-workspace-view.is-processing:not(.has-partial-results) :is(.bubble-review-pane, .bubble-workspace-splitter, #bubble-toggle-review-pane) { display: none; }
#bubble-workspace-view.is-processing :is(.bubble-review-tools, .bubble-review-decision-bar, .bubble-review-actions, .bubble-review-tabs, .bubble-review-navigation) { display: none; }
#bubble-workspace-view.is-processing .bubble-review-total { clip-path: none; font-size: 11px; height: auto; position: static; width: auto; }
#bubble-workspace-view .bubble-number.is-preview { animation: none; background: #fff; border-color: #627885; color: #344e5d; }
#bubble-workspace-view .bubble-number.is-preview.is-resolved { background: #eff7f3; border-color: #599880; color: #285e48; }

#bubble-workspace-view:not(.is-reviewing):not(.is-confirmed) .bubble-recognition-plan,
#bubble-workspace-view.is-appending .bubble-recognition-plan {
  align-items: center;
  background: #fafcfd;
  border-bottom: 1px solid #d7e0e5;
  box-shadow: none;
  display: grid;
  gap: 5px 12px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  min-height: 56px;
  padding: 8px 12px 0;
}
#bubble-workspace-view:not(.is-reviewing):not(.is-confirmed) .bubble-progress-copy,
#bubble-workspace-view.is-appending .bubble-progress-copy { align-items: center; display: flex; flex-wrap: wrap; gap: 3px 12px; min-width: 0; }
#bubble-workspace-view:not(.is-reviewing):not(.is-confirmed) .bubble-progress-copy > span,
#bubble-workspace-view.is-appending .bubble-progress-copy > span { display: none; }
#bubble-workspace-view:not(.is-reviewing):not(.is-confirmed) .bubble-progress-copy > strong,
#bubble-workspace-view.is-appending .bubble-progress-copy > strong { color: #254456; font-size: 12px; line-height: 1.5; white-space: normal; }
#bubble-workspace-view:not(.is-reviewing):not(.is-confirmed) .bubble-progress-copy > small,
#bubble-workspace-view.is-appending .bubble-progress-copy > small { border: 0; color: #647481; font-size: 11px; line-height: 1.5; margin: 0; padding: 0; }
#bubble-workspace-view .bubble-progress-copy .bubble-start-blocker { color: #986219; }
#bubble-workspace-view .bubble-progress-meta { align-items: center; display: flex; font-size: 11px; font-variant-numeric: tabular-nums; gap: 12px; justify-content: flex-end; min-width: 0; }
#bubble-workspace-view #bubble-progress-counts { color: #286c58; }
#bubble-workspace-view #bubble-progress-elapsed { color: #63717b; min-width: 72px; text-align: right; }
#bubble-workspace-view #bubble-progress-elapsed:empty { display: none; }
#bubble-workspace-view :is(#bubble-progress-retry, #bubble-progress-stop-waiting) { height: 28px; min-height: 28px; width: 28px; }
#bubble-workspace-view:not(.is-reviewing):not(.is-confirmed) #bubble-workspace-progress-label,
#bubble-workspace-view.is-appending #bubble-workspace-progress-label { display: none; }
#bubble-workspace-view .bubble-recognition-plan .bubble-progress-track { background: #e1e8ed; border: 0; border-radius: 0; box-shadow: none; grid-column: 1 / -1; grid-row: 2; height: 4px; margin: 0 -12px; overflow: hidden; position: relative; }
#bubble-workspace-view .bubble-recognition-plan[data-activity="active"] .bubble-progress-track::after { animation: bubble-progress-travel 1.9s linear infinite; background: #318fa0; content: ""; height: 100%; left: 0; position: absolute; top: 0; transform: translateX(-100%); width: 30%; }
#bubble-workspace-view .bubble-recognition-plan[data-activity="paused"] .bubble-progress-track { background: #dccb9f; }
#bubble-workspace-view .bubble-recognition-plan[data-activity="offline"] .bubble-progress-track { background: #d6b46c; }
#bubble-workspace-view .bubble-recognition-plan[data-activity="error"] .bubble-progress-track { background: #cf9798; }
#bubble-workspace-view .bubble-recognition-plan:is([data-activity="offline"], [data-activity="error"]) .bubble-progress-copy > strong { color: #94512c; }
#bubble-workspace-view.is-configuring .bubble-recognition-plan[data-activity="idle"] { min-height: 34px; padding-bottom: 6px; }
#bubble-workspace-view.is-configuring .bubble-recognition-plan[data-activity="idle"] .bubble-progress-track,
#bubble-workspace-view.is-configuring .bubble-compact-diagnostics,
#bubble-workspace-view:is(.is-submitting, .is-processing) .bubble-time-estimate { display: none; }
#bubble-workspace-view.is-appending .bubble-task-info { flex: 0 0 auto; position: static; }
#bubble-workspace-view.is-appending .bubble-task-info > summary { display: none; }
#bubble-workspace-view.is-appending .bubble-task-info-content { background: transparent; border: 0; border-radius: 0; box-shadow: none; display: block; max-height: none; overflow: visible; padding: 0; position: static; width: auto; }
#bubble-workspace-view.is-appending .bubble-task-info :is(.bubble-state-legend, #bubble-review-summary, .bubble-compact-diagnostics) { display: none; }
#bubble-workspace-view.is-appending .bubble-task-info .bubble-recognition-plan { display: grid; }
#bubble-workspace-view.is-appending .bubble-task-info .bubble-progress-copy { display: flex; }
#bubble-workspace-view.is-appending .bubble-task-info .bubble-progress-track { display: block !important; }
#bubble-workspace-view.is-append-unconfirmed .bubble-review-pane { opacity: 1; pointer-events: auto; }
#bubble-workspace-view.is-connection-stale .processing-spinner,
#bubble-workspace-view.is-connection-stale .is-streaming .bubble-inline-save svg,
#bubble-workspace-view.is-connection-stale .is-streaming .bubble-row-status i { animation-play-state: paused; }
@keyframes bubble-progress-travel { to { transform: translateX(435%); } }
@media (prefers-reduced-motion: reduce) {
  #bubble-workspace-view .bubble-recognition-plan[data-activity="active"] .bubble-progress-track::after { animation: none; left: 35%; transform: none; }
  #bubble-workspace-view .processing-spinner,
  #bubble-workspace-view .is-streaming .bubble-inline-save svg,
  #bubble-workspace-view .is-streaming .bubble-row-status i { animation: none; }
}
@media (max-width: 1100px) {
  #bubble-workspace-view:not(.is-empty) .bubble-workbench-command { grid-template-columns: 208px minmax(0, 1fr) 36px auto; }
  #bubble-workspace-view .bubble-workspace-pages { grid-column: 2; justify-self: end; }
  #bubble-workspace-view .bubble-intake-numbering { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
  #bubble-workspace-view .bubble-recognition-settings > summary { grid-column: 3; }
  #bubble-workspace-view .bubble-workbench-command .primary-button { grid-column: 4; }
  #bubble-workspace-view .bubble-recognition-settings-grid { grid-row: 3; }
  #bubble-workspace-view .bubble-inspection-context { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #bubble-workspace-view .bubble-progress-meta { flex-wrap: wrap; gap: 4px 10px; max-width: 260px; }
}
@media (max-width: 600px) {
  #bubble-workspace-view:not(.is-empty) .bubble-workbench-command { gap: 8px; grid-template-columns: minmax(0, 1fr) 34px 112px; }
  #bubble-workspace-view .bubble-scope-control { width: 100%; }
  #bubble-workspace-view .bubble-scope-control button { gap: 4px; padding: 0 5px; }
  #bubble-workspace-view .bubble-scope-control button strong { font-size: 11px; }
  #bubble-workspace-view .bubble-scope-control button svg { display: none; }
  #bubble-workspace-view .bubble-recognition-settings > summary { grid-column: 2; }
  #bubble-workspace-view .bubble-workbench-command .primary-button { font-size: 12px; gap: 6px; grid-column: 3; min-width: 0; padding: 0 8px; white-space: nowrap; width: 100%; }
  #bubble-workspace-view .bubble-workbench-command .primary-button svg { flex: 0 0 14px; height: 14px; width: 14px; }
  #bubble-workspace-view .bubble-workspace-pages { grid-column: 1 / -1; grid-row: 3; justify-self: start; }
  #bubble-workspace-view .bubble-recognition-settings-grid { grid-row: 4; grid-template-columns: 1fr; max-height: 220px; }
  #bubble-workspace-view .bubble-intake-numbering { flex-wrap: wrap; gap: 6px; justify-content: space-between; }
  #bubble-workspace-view .bubble-intake-numbering > span { font-size: 11px; }
  #bubble-workspace-view .bubble-numbering-control button { font-size: 11px; padding: 0 8px; }
  #bubble-workspace-view:not(.is-reviewing):not(.is-confirmed) .bubble-recognition-plan,
  #bubble-workspace-view.is-appending .bubble-recognition-plan { gap: 4px 8px; grid-template-columns: minmax(0, 1fr); }
  #bubble-workspace-view .bubble-progress-meta { font-size: 10px; gap: 3px 6px; grid-column: 1; grid-row: 2; justify-content: space-between; max-width: none; }
  #bubble-workspace-view .bubble-recognition-plan .bubble-progress-track { grid-row: 3; }
  #bubble-workspace-view #bubble-progress-counts { white-space: nowrap; }
  #bubble-workspace-view .bubble-progress-copy > small:first-of-type { flex-basis: 100%; }
  #bubble-workspace-view.is-processing .bubble-compact-diagnostics { display: none; }
}
html.bubble-workspace-fullscreen:fullscreen :is(.topbar, .sidebar) { display: none; }
html.bubble-workspace-fullscreen:fullscreen body:has(#bubble-workspace-view.is-visible) .main-area { margin-left: 0; }
html.bubble-workspace-fullscreen:fullscreen body #bubble-workspace-view.bubble-workspace.is-visible { background: #fff; height: 100dvh; width: 100%; }

@media (max-width: 1100px) {
  #bubble-workspace-view .bubble-workspace-head { gap: 4px 8px; grid-template-columns: minmax(0, 1fr) auto; }
  #bubble-workspace-view .bubble-workspace-head .bubble-toolbar { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; }
  #bubble-workspace-view .bubble-workspace-head-actions { grid-column: 2; grid-row: 1; }
  #bubble-workspace-view:is(.is-reviewing, .is-confirmed) .bubble-workspace-head { padding-right: 12px; }
  #bubble-workspace-view:is(.is-reviewing, .is-confirmed) .bubble-workspace-head-actions { margin-right: 38px; }
}
@media (max-width: 760px) {
  #bubble-workspace-view .bubble-workspace-head { padding: 5px 10px; }
  #bubble-workspace-view .bubble-toolbar .bubble-pages { max-width: 68px; }
  #bubble-workspace-view .bubble-workspace-head .bubble-toolbar { flex-wrap: wrap; gap: 3px; min-height: 32px; }
  #bubble-workspace-view .bubble-toolbar .toolbar-center { gap: 1px; }
  #bubble-workspace-view .bubble-toolbar .icon-button { flex-basis: 28px; height: 30px; width: 28px; }
  #bubble-workspace-view .bubble-toolbar .toolbar-center #bubble-zoom-label { min-width: 36px; width: 36px; }
  #bubble-workspace-view .bubble-toolbar .bubble-toolbar-divider { display: none; }
  #bubble-workspace-view .bubble-review-layout { display: flex; }
  #bubble-workspace-view.is-empty .bubble-canvas { flex: 0 0 auto; height: calc(100dvh - 89px); min-height: 320px; }
  #bubble-workspace-view .bubble-review-head { flex-basis: 42px; }
  #bubble-workspace-view .bubble-review-tabs { flex: 1 1 auto; }
  #bubble-workspace-view .bubble-review-tabs button { flex: 1 1 auto; }
  html.bubble-workspace-fullscreen:fullscreen { overflow-y: auto; }
  html.bubble-workspace-fullscreen:fullscreen body #bubble-workspace-view.bubble-workspace.is-visible { height: auto; min-height: 100dvh; }
  html.bubble-workspace-fullscreen:fullscreen .bubble-canvas-pane { flex: 0 0 auto; }
}

/* Bubble node availability. */
#bubble-workspace-view .bubble-node-status { align-items: center; color: #67716b; display: inline-flex; font-size: 11px; gap: 5px; height: 18px; letter-spacing: 0; line-height: 18px; max-width: 100%; position: relative; vertical-align: top; white-space: nowrap; width: 104px; }
#bubble-workspace-view .bubble-node-status svg { flex: 0 0 13px; height: 13px; width: 13px; }
#bubble-workspace-view .bubble-node-status[data-state="ready"] { color: #24744e; }
#bubble-workspace-view .bubble-node-status[data-state="busy"] { color: #946413; }
#bubble-workspace-view .bubble-node-status[data-state="cloud"] { color: #286b91; }
#bubble-workspace-view .bubble-node-status[data-state="unavailable"] { color: #b13f3f; }
#bubble-workspace-view .bubble-node-status:focus-visible { border-radius: 3px; outline: 2px solid #6d9c82; outline-offset: 3px; }
#bubble-workspace-view .bubble-node-status[data-tooltip]:is(:hover, :focus)::after { display: block; opacity: 1; }
#bubble-workspace-view .bubble-node-status[data-tooltip]::after { font-size: 11px; left: 0; line-height: 1.5; max-width: min(240px, calc(100vw - 40px)); padding: 7px 9px; transform: none; white-space: normal; width: max-content; }

/* Upload feedback stays separate from model execution and document tools. */
#bubble-workspace-view .bubble-workspace-head { gap: 4px 12px; grid-template-columns: minmax(0, 1fr) auto; padding: 6px 12px; }
#bubble-workspace-view .bubble-workspace-head-actions { grid-column: 2; grid-row: 1; }
#bubble-workspace-view .bubble-workspace-head .bubble-toolbar { border-top: 1px solid #e4e8eb; flex-wrap: wrap; gap: 8px; grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; min-height: 40px; padding-top: 5px; }
#bubble-workspace-view .bubble-toolbar .toolbar-center { flex: 0 1 auto; flex-wrap: wrap; gap: 3px; justify-content: flex-start; }
#bubble-workspace-view .bubble-toolbar .bubble-pages { max-width: 180px; }
#bubble-workspace-view .bubble-toolbar .bubble-toolbar-actions { margin-left: auto; }
#bubble-workspace-view .bubble-toolbar #bubble-rotation-label { display: none; }
#bubble-workspace-view .bubble-toolbar #bubble-select-region.is-active { background: #e6f3ed; border-color: #6ba087; color: #246b4a; }
#bubble-workspace-view.is-configuring:not(.has-draft-preview) .bubble-toolbar,
#bubble-workspace-view.is-configuring:not(.is-multipage-preview) .bubble-pages,
#bubble-workspace-view.is-configuring:not(.is-multipage-preview) .bubble-workspace-pages,
#bubble-workspace-view.is-configuring #bubble-toggle-overlay,
#bubble-workspace-view.is-configuring .bubble-task-info,
#bubble-workspace-view:is([data-preview-state="uploading"], [data-preview-state="rendering"]) .bubble-workbench-command { display: none; }
#bubble-workspace-view .bubble-upload-status { align-items: center; background: #f3f8f5; border-bottom: 1px solid #d4e3da; color: #285d43; display: flex; flex: 0 0 auto; gap: 12px; min-height: 44px; padding: 7px 12px; }
#bubble-workspace-view .bubble-upload-status[hidden] { display: none; }
#bubble-workspace-view .bubble-upload-copy { align-items: baseline; display: flex; flex: 1 1 auto; flex-wrap: wrap; gap: 3px 12px; min-width: 0; }
#bubble-workspace-view .bubble-upload-copy strong { font-size: 13px; font-weight: 600; line-height: 1.5; }
#bubble-workspace-view .bubble-upload-copy span { color: #60716a; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
#bubble-workspace-view .bubble-upload-status:is([data-stage="uploading"], [data-stage="rendering"]) { background: #f3f6fa; border-color: #d8e2ed; color: #25577c; }
#bubble-workspace-view .bubble-upload-status[data-stage="error"] { background: #fff3f2; border-color: #efd1ce; color: #a83f35; }
#bubble-workspace-view .bubble-upload-status .icon-button { flex: 0 0 32px; height: 32px; width: 32px; }
#bubble-workspace-view #bubble-upload-progress { accent-color: #2a7cad; flex: 0 1 220px; height: 8px; max-width: 32%; min-width: 70px; }
#bubble-workspace-view .bubble-numbering-caption { display: flex; flex-direction: column; flex: 0 1 116px; gap: 1px; min-width: 0; }
#bubble-workspace-view .bubble-numbering-caption > span { color: #52616b; font-size: 12px; line-height: 1.5; }
#bubble-workspace-view .bubble-numbering-caption > small { color: #697b71; font-size: 11px; line-height: 1.4; min-height: 15px; overflow-wrap: anywhere; }
#bubble-workspace-view #bubble-numbering-status[data-state="checking"] { color: #64778b; }
#bubble-workspace-view #bubble-numbering-status:is([data-state="unavailable"], [data-state="uncertain"]) { color: #996713; }
#bubble-workspace-view .bubble-workbench-command { max-width: 100%; }
#bubble-workspace-view .bubble-intake-numbering { justify-content: flex-end; }
#bubble-workspace-view .bubble-toolbar-more-menu { z-index: 70; }
#bubble-workspace-view .bubble-start-feedback { align-items: center; background: #fff8ed; border-bottom: 1px solid #ead6b7; color: #986219; display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 8px; padding: 6px 12px; }
#bubble-workspace-view .bubble-start-feedback[hidden] { display: none; }
#bubble-workspace-view:not(.is-configuring) .bubble-start-feedback { display: none; }
#bubble-workspace-view .bubble-start-feedback small { font-size: 12px; line-height: 1.5; }
#bubble-workspace-view .bubble-start-feedback button { font-size: 12px; min-height: 28px; }
@media (max-width: 1100px) {
  #bubble-workspace-view .bubble-workspace-head-actions { grid-column: 2; grid-row: 1; }
  #bubble-workspace-view .bubble-workspace-head .bubble-toolbar { justify-content: flex-start; }
  #bubble-workspace-view .bubble-intake-numbering { justify-content: flex-start; }
}
@media (max-width: 760px) {
  #bubble-workspace-view .bubble-workspace-head { padding: 5px 10px; }
  #bubble-workspace-view .bubble-workspace-head h1 { font-size: 13px; }
  #bubble-workspace-view .bubble-workspace-head .bubble-toolbar { gap: 4px; min-height: 36px; }
  #bubble-workspace-view .bubble-toolbar .bubble-pages { max-width: 120px; }
  #bubble-workspace-view .bubble-toolbar .toolbar-center { flex: 1 1 auto; gap: 1px; grid-row: auto; width: auto; }
  #bubble-workspace-view .bubble-toolbar .icon-button { flex-basis: 30px; height: 32px; width: 30px; }
  #bubble-workspace-view .bubble-toolbar .bubble-toolbar-actions { margin-left: 0; }
  #bubble-workspace-view .bubble-toolbar .toolbar-center #bubble-zoom-label { font-size: 11px; min-width: 38px; width: 38px; }
  #bubble-workspace-view .bubble-upload-status { gap: 8px; padding: 7px 10px; }
  #bubble-workspace-view .bubble-upload-copy { flex-direction: column; }
  #bubble-workspace-view .bubble-numbering-caption { flex: 1 1 auto; }
  #bubble-workspace-view .bubble-intake-numbering { flex-wrap: nowrap; justify-content: space-between; }
  #bubble-workspace-view .bubble-numbering-control button { min-height: 32px; padding: 0 8px; }
}

.bubble-draft-pages { flex: 0 0 auto; min-width: 0; padding: 7px 12px; border-bottom: 1px solid #dce2e5; background: #fafbfc; }
.bubble-draft-pages[hidden], .bubble-numbering-evidence[hidden] { display: none; }
.bubble-page-plan-head { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 16px; font-size: 12px; line-height: 1.6; }
.bubble-page-plan-head strong { flex: 1 1 280px; font-weight: 600; overflow-wrap: anywhere; }
.bubble-page-plan-head > span { color: #527463; }
.bubble-page-plan-head label { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.bubble-draft-thumbnails { display: flex; gap: 8px; overflow-x: auto; padding: 6px 1px 2px; min-width: 0; }
.bubble-draft-page { flex: 0 0 100px; width: 100px; border: 1px solid #d6dee3; border-radius: 4px; background: #fff; overflow: hidden; }
.bubble-draft-page.is-current { border-color: #328263; box-shadow: 0 0 0 1px #328263; }
.bubble-draft-page > button { position: relative; display: flex; width: 100%; height: 61px; align-items: center; justify-content: center; padding: 3px; background: #fff; border: 0; color: #334a59; font-size: 11px; }
.bubble-draft-page img { width: 100%; height: 100%; object-fit: contain; }
.bubble-draft-page button > span { position: absolute; left: 3px; bottom: 2px; padding: 0 3px; background: #fffffff0; }
.bubble-draft-page label { display: flex; align-items: center; gap: 5px; padding: 3px 6px; height: 25px; background: #f0f4f6; color: #53636b; font-size: 11px; }
.bubble-draft-page input { width: 14px; height: 14px; accent-color: #287d5b; }
.bubble-numbering-evidence { flex: 0 0 auto; padding: 5px 12px; border-bottom: 1px solid #dce2e5; font-size: 12px; background: #fff; }
.bubble-numbering-evidence summary { cursor: pointer; line-height: 22px; }
.bubble-numbering-evidence summary svg { width: 14px; height: 14px; vertical-align: middle; margin-right: 6px; }
#bubble-numbering-evidence-list { display: flex; flex-wrap: wrap; gap: 6px; max-height: 100px; overflow-y: auto; padding: 5px 0; }
.bubble-evidence-button { display: inline-flex; align-items: center; gap: 4px; height: 28px; min-width: 36px; padding: 0 6px; border: 1px solid #c8dcd2; background: #f1f8f4; border-radius: 4px; color: #256649; }
.bubble-evidence-button svg { width: 13px; height: 13px; }
#bubble-evidence-highlight { position: absolute; z-index: 8; pointer-events: none; border: 2px solid #bd7011; background: #ffcc552b; box-shadow: 0 0 0 3px #ffcc5540; font-size: 12px; font-weight: 700; color: #814508; }
@media (max-width: 760px) {
  .bubble-draft-pages { padding: 5px 10px; }
  .bubble-page-plan-head strong { flex-basis: 100%; }
  .bubble-draft-page { flex-basis: 82px; width: 82px; }
  .bubble-draft-page > button { height: 48px; }
}

/* Intake controls use the right edge; the drawing keeps the viewport height. */
.bubble-drawing-workbench { display: contents; }
.bubble-page-label-compact { display: none; }
#bubble-workspace-view .bubble-intake-pane,
#bubble-workspace-view .bubble-intake-toggle { display: none; }
#bubble-workspace-view.is-configuring .bubble-drawing-workbench { display: grid; flex: 1 1 0; grid-template-columns: minmax(0, 1fr) 280px; min-height: 0; position: relative; overflow: hidden; }
#bubble-workspace-view.is-configuring .bubble-drawing-workbench > .bubble-review-layout { display: grid; grid-column: 1; grid-row: 1; height: 100%; min-height: 0; overflow: hidden; }
#bubble-workspace-view.is-configuring .bubble-canvas-pane { height: 100%; min-height: 0; }
#bubble-workspace-view.is-configuring .bubble-canvas { flex: 1 1 0; height: auto; min-height: 0; }
#bubble-workspace-view.is-configuring .bubble-intake-pane { background: #fff; border-left: 1px solid #d4dce1; display: flex; flex-direction: column; grid-column: 2; grid-row: 1; min-height: 0; min-width: 0; overflow: hidden; }
#bubble-workspace-view .bubble-intake-head { align-items: center; border-bottom: 1px solid #e1e6e9; display: flex; flex: 0 0 40px; justify-content: space-between; padding: 0 12px; }
#bubble-workspace-view .bubble-intake-head strong { color: #364b58; font-size: 13px; font-weight: 600; }
#bubble-workspace-view .bubble-intake-head .icon-button { height: 28px; width: 28px; }
#bubble-workspace-view .bubble-intake-scroll { display: flex; flex: 1 1 0; flex-direction: column; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
#bubble-workspace-view .bubble-intake-pane .bubble-workbench-command { display: flex; flex: 0 0 auto; flex-direction: column; align-items: stretch; gap: 14px; min-height: 0; order: 3; padding: 12px; }
#bubble-workspace-view .bubble-intake-pane .bubble-scope-field > span { color: #52616b; display: block; font-size: 12px; margin-bottom: 6px; }
#bubble-workspace-view .bubble-intake-pane .bubble-scope-control { width: 100%; }
#bubble-workspace-view .bubble-intake-pane .bubble-scope-control button { flex: 1 1 0; }
#bubble-workspace-view .bubble-intake-pane .bubble-intake-numbering { align-items: stretch; flex-direction: column; gap: 6px; }
#bubble-workspace-view .bubble-intake-pane .bubble-numbering-caption { align-items: baseline; flex: none; flex-direction: row; flex-wrap: wrap; gap: 4px 8px; justify-content: space-between; }
#bubble-workspace-view .bubble-intake-pane .bubble-numbering-control { display: flex; flex: none; width: 100%; }
#bubble-workspace-view .bubble-intake-pane .bubble-numbering-control button { flex: 1 1 0; justify-content: center; }
#bubble-workspace-view .bubble-intake-pane .bubble-workspace-pages { align-self: flex-start; }
#bubble-workspace-view .bubble-intake-pane .bubble-recognition-settings { display: block; min-width: 0; }
#bubble-workspace-view .bubble-intake-pane .bubble-recognition-settings > summary { border: 0; gap: 7px; height: 30px; justify-content: flex-start; min-height: 30px; width: 100%; font-size: 12px; }
#bubble-workspace-view .bubble-intake-pane .bubble-recognition-settings > summary > svg:last-child { margin-left: auto; }
#bubble-workspace-view .bubble-intake-pane .bubble-recognition-settings-grid { background: #fff; grid-template-columns: minmax(0, 1fr); margin: 6px 0 0; max-height: none; overflow: visible; padding: 10px 0 0; }
#bubble-workspace-view .bubble-intake-pane .bubble-inspection-context { grid-template-columns: minmax(0, 1fr); }
#bubble-workspace-view .bubble-intake-pane .bubble-upload-status { align-items: flex-start; flex-wrap: wrap; gap: 6px; min-height: 0; order: 1; padding: 10px 12px; }
#bubble-workspace-view .bubble-intake-pane .bubble-upload-copy { flex-direction: column; gap: 2px; }
#bubble-workspace-view .bubble-intake-pane .bubble-upload-copy strong { font-size: 12px; }
#bubble-workspace-view .bubble-intake-pane #bubble-upload-progress { flex: 1 1 100%; max-width: 100%; order: 2; }
#bubble-workspace-view .bubble-intake-pane .bubble-start-feedback { order: 5; }
#bubble-workspace-view .bubble-intake-pane .bubble-draft-pages { background: #fff; order: 2; padding: 12px; }
#bubble-workspace-view .bubble-intake-pane .bubble-page-plan-head { gap: 6px; font-size: 11px; }
#bubble-workspace-view .bubble-intake-pane .bubble-page-plan-head strong { flex: 1 1 100%; color: #3e535f; line-height: 1.7; }
#bubble-workspace-view .bubble-intake-pane .bubble-page-plan-head > span { flex: 1 1 auto; }
#bubble-workspace-view .bubble-intake-pane .bubble-draft-thumbnails { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 232px; overflow-y: auto; padding: 8px 1px 2px; }
#bubble-workspace-view .bubble-intake-pane .bubble-draft-page { width: auto; min-width: 0; }
#bubble-workspace-view .bubble-intake-pane .bubble-draft-page > button { height: 68px; }
#bubble-workspace-view .bubble-intake-pane .bubble-numbering-evidence { order: 4; padding: 8px 12px; }
#bubble-workspace-view .bubble-intake-footer { border-top: 1px solid #d4dce1; flex: 0 0 auto; padding: 12px; }
#bubble-workspace-view .bubble-intake-footer .primary-button { background: #2279ae; border-color: #2279ae; min-height: 38px; width: 100%; }
#bubble-workspace-view .bubble-intake-footer .primary-button:disabled { background: #e9edf0; border-color: #d5dde2; color: #71808a; opacity: 1; }
#bubble-workspace-view.is-configuring .bubble-intake-toggle { display: flex; height: 32px; position: absolute; right: 12px; top: 8px; width: 32px; z-index: 46; }
#bubble-workspace-view :is(#bubble-toggle-intake, #bubble-close-intake)[data-tooltip]::after { left: auto; right: 0; transform: none; }
#bubble-workspace-view.is-configuring .bubble-workspace-head-actions { margin-right: 40px; }
#bubble-workspace-view.is-configuring.is-intake-collapsed .bubble-drawing-workbench { grid-template-columns: minmax(0, 1fr); }
#bubble-workspace-view.is-configuring.is-intake-collapsed .bubble-intake-pane { display: none; }
#bubble-workspace-view.is-configuring .bubble-workspace-head .workspace-title-group > div { align-items: center; display: flex; gap: 10px; }
#bubble-workspace-view.is-configuring .bubble-workspace-head h1 { flex: 0 1 auto; margin: 0; }
#bubble-workspace-view.is-configuring .bubble-node-status { flex: 0 0 18px; width: 18px; }
#bubble-workspace-view.is-configuring .bubble-node-status > span { display: none; }
#bubble-workspace-view.is-configuring .bubble-workspace-head { min-height: 42px; }
@media (min-width: 1301px) {
  #bubble-workspace-view.is-configuring .bubble-workspace-head { gap: 12px; grid-template-columns: minmax(160px, 1fr) auto auto; padding: 5px 12px; }
  #bubble-workspace-view.is-configuring .bubble-workspace-head .bubble-toolbar { border: 0; flex-wrap: nowrap; grid-column: 2; grid-row: 1; min-height: 32px; padding: 0; }
  #bubble-workspace-view.is-configuring .bubble-workspace-head-actions { grid-column: 3; }
  #bubble-workspace-view.is-configuring .bubble-workspace-head .toolbar-center { flex-wrap: nowrap; }
}
@media (max-width: 1100px) {
  #bubble-workspace-view.is-configuring .bubble-drawing-workbench { grid-template-columns: minmax(0, 1fr); }
  #bubble-workspace-view.is-configuring .bubble-intake-pane { bottom: 0; box-shadow: -6px 0 20px #263b4b1a; grid-area: auto; max-width: calc(100% - 40px); position: absolute; right: 0; top: 0; width: 280px; z-index: 40; }
}
@media (max-width: 760px) {
  body:has(#bubble-workspace-view.is-visible.is-configuring) { overflow-y: hidden; }
  body #bubble-workspace-view.is-visible.is-configuring { height: calc(100dvh - 40px); min-height: 0; overflow: hidden; }
  #bubble-workspace-view.is-configuring .bubble-workspace-head { flex: 0 0 auto; gap: 3px 6px; padding: 4px 8px; }
  #bubble-workspace-view.is-configuring .bubble-workspace-head-actions { margin-right: 34px; }
  #bubble-workspace-view.is-configuring .workspace-status { display: none; }
  #bubble-workspace-view.is-configuring .bubble-intake-toggle { right: 8px; top: 4px; }
  #bubble-workspace-view.is-configuring .bubble-toolbar { flex-wrap: nowrap; }
  #bubble-workspace-view.is-configuring .bubble-toolbar .toolbar-center { flex-wrap: nowrap; gap: 0; }
  #bubble-workspace-view.is-configuring .bubble-toolbar .bubble-pages { max-width: 74px; min-width: 0; }
  #bubble-workspace-view.is-configuring .bubble-toolbar .bubble-pages button { font-size: 11px; padding: 0 4px; }
  #bubble-workspace-view.is-configuring .bubble-page-label-wide { display: none; }
  #bubble-workspace-view.is-configuring .bubble-page-label-compact { display: inline; }
  #bubble-workspace-view.is-configuring .bubble-toolbar :is(#bubble-pan-tool, #bubble-zoom-label, .bubble-toolbar-divider, #bubble-select-region) { display: none; }
  #bubble-workspace-view.is-configuring .bubble-toolbar .icon-button { flex-basis: 28px; width: 28px; }
  #bubble-workspace-view.is-configuring .bubble-canvas-pane { flex: 1 1 0; }
  html.bubble-workspace-fullscreen:fullscreen body #bubble-workspace-view.is-visible.is-configuring { height: 100dvh; }
}

.bubble-quick-edit input { font-variant-numeric: tabular-nums; }
.bubble-quick-edit small { line-height:1.6; overflow-wrap:anywhere; }
.bubble-quick-edit .is-invalid { color:var(--danger, #b42318); }
.bubble-quick-edit .is-changed { color:var(--primary, #2563eb); }
.bubble-quick-confirm-tools { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:8px 12px; }
.bubble-quick-confirm-tools small { color:var(--text-muted, #64748b); font-size:11px; }

/* Per-item instrument selection. The popover stays inside the scrollable editor. */
.bubble-gauge-field { min-width: 0; display: grid; gap: 7px; }
.bubble-gauge-field > label { font-size: 12px; font-weight: 600; }
.bubble-gauge-field > small { color: var(--text-muted, #64748b); font-size: 11px; line-height: 1.5; }
.gauge-picker { min-width: 0; }
.gauge-picker-input { display: flex; gap: 4px; }
.gauge-picker-input input { width: 100%; min-width: 0; flex: 1; }
.gauge-picker-input button { flex: 0 0 36px; border: 1px solid #d7dde5; border-radius: 6px; background: #f8fafc; color: #334155; cursor: pointer; }
.gauge-picker-input button:disabled { opacity: .45; cursor: default; }
.gauge-picker-options { max-height: 224px; overflow-y: auto; border: 1px solid #ccd5df; border-radius: 7px; margin-top: 5px; background: #fff; }
.gauge-picker-options[hidden] { display: none; }
.gauge-picker-options [role="option"] { display: grid; gap: 3px; padding: 10px 12px; cursor: pointer; }
.gauge-picker-options [role="option"]:hover,
.gauge-picker-options [aria-selected="true"] { background: #edf4ff; }
.gauge-picker-options strong { color: #1e293b; font-size: 12px; }
.gauge-picker-options small, .gauge-picker-options p { color: #64748b; font-size: 11px; }
.gauge-picker-options p { margin: 0; padding: 10px 12px; border-top: 1px solid #e8edf3; }
#bubble-item-gauge-recommendation { color: #64748b; }

.bubble-choose-gauge { grid-column: 1 / -1; justify-self: start; font-size: 11px; min-height: 28px; padding: 4px 10px; }

/* Complete-callout correction stays beside the source crop. */
.bubble-cad-symbols { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.bubble-cad-symbols button,.bubble-cad-symbols summary { border:1px solid #d5e1e8; border-radius:7px; background:#f5f9fc; color:#21445b; cursor:pointer; padding:7px 9px; font-size:15px; font-weight:650; min-height:34px; }
.bubble-cad-symbols button:hover { border-color:#3484aa; background:#e8f4fb; }
.bubble-cad-symbols small { font-size:11px; font-weight:400; }
.bubble-cad-symbols details > div { display:flex; flex-wrap:wrap; gap:6px; padding-top:8px; }
.bubble-cad-symbols details[open] { flex-basis:100%; }
.bubble-quick-edit input { height:46px; border-radius:8px; border-color:#729fb3; font-size:17px; font-weight:600; }
.bubble-correction-preview { border:1px solid #cbdfe7; background:#f5fbfe; padding:12px; border-radius:9px; }
.bubble-correction-caption { display:flex; justify-content:space-between; gap:8px; font-weight:650; color:#274b60; font-size:12px; margin-bottom:8px; }
.bubble-correction-caption span { font-weight:400; color:#637786; font-size:11px; }
.bubble-correction-row { display:grid; grid-template-columns:70px 1fr 1fr; align-items:baseline; gap:8px; padding:6px 0; border-top:1px solid #e2edf2; font-size:12px; }
.bubble-correction-row del { color:#75838d; overflow-wrap:anywhere; }
.bubble-correction-row strong { font-variant-numeric:tabular-nums; overflow-wrap:anywhere; color:#324854; }
.bubble-correction-row.is-changed strong { color:#087552; }
.bubble-correction-preview p { margin:8px 0 0; font-size:12px; line-height:1.6; }
.bubble-correction-warning { color:#93531a; background:#fff6e8; border-radius:6px; padding:9px; font-size:12px; line-height:1.6; margin:0; }
.bubble-correction-details { border-top:1px solid #dce5eb; }
.bubble-correction-details > summary { cursor:pointer; display:flex; justify-content:space-between; gap:8px; padding:12px 0; font-size:12px; font-weight:600; }
.bubble-correction-details > summary span { color:#71828d; font-weight:400; }
.bubble-correction-details > div { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.bubble-correction-tools { display:flex; gap:6px; flex-wrap:wrap; padding:8px 12px; }
.bubble-correction-tools:has(button:not([hidden])) { border-top:1px solid #e0e7eb; }
.bubble-correction-tools:not(:has(button:not([hidden]))) { display:none; }
.bubble-correction-tools button { font-size:11px; min-height:30px; padding:6px 8px; }
.bubble-review-pane[data-pane-view="detail"] .bubble-quick-confirm-tools { display:none; }
#bubble-workspace-view .bubble-review-pane[data-pane-view="detail"]:has(.bubble-item-editor:not(.is-requirement)) .bubble-review-decision-bar { display:none; }
#bubble-editor-savebar { flex-wrap:wrap; }
#bubble-editor-savebar > span { flex-basis:100%; }
#bubble-save-item { background:#fff; color:#375465; border:1px solid #cad8e0; }
#bubble-save-confirm-next { flex:1; justify-content:center; font-size:12px; }
.bubble-item-editor.is-requirement #bubble-correction-details { border:0; }
.bubble-item-editor.is-requirement #bubble-correction-details > summary { display:none; }
.bubble-correction-preview[hidden],.bubble-correction-warning[hidden],.bubble-cad-symbols[hidden] { display:none; }
@media(max-width:700px){.bubble-cad-symbols button{min-width:36px;min-height:40px}.bubble-quick-edit input{font-size:16px}#bubble-save-confirm-next{min-height:42px}}

@media(min-width:1000px){
 #bubble-workspace-view .bubble-review-layout:not(.is-review-collapsed):has(.bubble-review-pane[data-pane-view="detail"]) { grid-template-columns:minmax(0,1fr) 6px minmax(420px,min(var(--bubble-review-width),50%)); }
}
#bubble-workspace-view .bubble-review-pane[data-pane-view="detail"] .bubble-cad-symbols { gap:5px; }
#bubble-workspace-view .bubble-review-pane[data-pane-view="detail"] .bubble-correction-preview { padding:10px; }
#bubble-workspace-view .bubble-review-pane[data-pane-view="detail"] .bubble-correction-row { padding:4px 0; }

.bubble-text-highlight[data-location-status="unverified"], .bubble-highlight-focus[data-location-status="unverified"] { fill: #f59e0b; stroke: #f59e0b; stroke-width: 0.35; stroke-dasharray: 1.5 1; }

.bubble-location-outline { fill: none; stroke: #b96c08; stroke-width: 1; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; pointer-events: none; }
.bubble-location-outline.is-selected { stroke-width: 2; }
.bubble-location-outline[data-location-status="verified"] { stroke: #1677d2; stroke-dasharray: none; }
.bubble-location-outline[data-critical="true"] { stroke: #cf3f3d; }
