:root {
  --bg: #f1f3f2;
  --surface: #ffffff;
  --surface-soft: #f6f8f7;
  --surface-strong: #e7ebe9;
  --ink: #18201d;
  --muted: #626e68;
  --subtle: #87918c;
  --border: #d7deda;
  --border-strong: #bdc8c2;
  --primary: #1d6048;
  --primary-hover: #174b39;
  --primary-soft: #e1eee7;
  --cyan: #2f6570;
  --cyan-soft: #e2ecee;
  --blue: #3e5e80;
  --blue-soft: #e5ebf1;
  --amber: #886117;
  --amber-soft: #f6edd9;
  --red: #a3403b;
  --red-soft: #f7e8e6;
  --sidebar: 248px;
  --radius: 6px;
  --shadow: 0 18px 45px rgba(24, 32, 29, .14);
}

* { 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(32, 103, 115, .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: #e9edeb; 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: #87978f; font-size: 8px; margin-top: 2px; text-transform: uppercase; }
.login-brand-mark { height: 27px; width: 27px; }
.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: #1a211f; color: #f1f5f3; display: flex; flex-direction: column; justify-content: flex-end; padding: 72px 58px 58px; }
.login-context .eyebrow { color: #82b99e; }
.login-context h1 { font-size: 34px; line-height: 1.22; margin-bottom: 14px; }
.login-context > p:last-of-type { color: #a5b1ab; font-size: 12px; line-height: 1.7; max-width: 350px; }
.login-facts { border-top: 1px solid #34413b; margin: 42px 0 0; }
.login-facts > div { align-items: center; border-bottom: 1px solid #34413b; display: grid; gap: 20px; grid-template-columns: 96px minmax(0, 1fr); padding: 15px 0; }
.login-facts dt { color: #77877f; 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: #1a211f; color: #d9e0dd; 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-mark { border: 1.5px solid #82b99e; display: block; height: 29px; position: relative; width: 29px; }
.brand-mark::after { border-left: 1.5px solid #82b99e; border-top: 1.5px solid #82b99e; content: ""; height: 8px; left: 5px; position: absolute; top: 5px; width: 8px; }
.brand-mark span { background: #82b99e; display: block; position: absolute; }
.brand-mark span:first-child { height: 1.5px; left: 6px; top: 17px; width: 16px; }
.brand-mark span:last-child { bottom: 5px; height: 15px; right: 7px; width: 1.5px; }
.brand strong { color: #fff; display: block; font-size: 18px; font-weight: 700; }
.brand small { color: #7f8f87; display: block; font-size: 9px; margin-top: 2px; text-transform: uppercase; }
.nav-section-label { color: #66766e; font-size: 9px; font-weight: 700; padding: 8px 12px; text-transform: uppercase; }
.main-nav { display: grid; gap: 3px; }
.nav-item { align-items: center; background: transparent; border: 0; border-radius: 5px; color: #94a29b; cursor: pointer; display: flex; gap: 11px; height: 42px; padding: 0 12px; text-align: left; width: 100%; }
.nav-item:hover { background: rgba(255,255,255,.055); color: #fff; }
.nav-item.is-active { background: #293832; 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: #27312d; border-radius: 3px; color: #91a199; font-size: 9px; font-style: normal; min-width: 22px; padding: 2px 5px; text-align: center; }
.nav-item.is-active em { background: #3d5048; color: #dbe5e0; }
.sidebar-project { border-bottom: 1px solid #2d3833; border-top: 1px solid #2d3833; 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: #7f8d86; 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 #2d3833; 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: #75827b; display: flex; font-size: 9px; justify-content: space-between; margin-bottom: 10px; }
.usage-owner strong { color: #eef3f0; font-size: 10px; }
.usage-line { color: #75827b; 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: #303b36; 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: #7f8d86; 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: #dce9e3; 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-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; }

.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); }
.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; }
.active-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; }
.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: #536159; 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.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); }
.member-table th:first-child { width: 24%; }
.member-table th:nth-child(2) { width: 16%; }
.member-table th:nth-child(3) { width: 21%; }
.member-table th:nth-child(4) { width: 10%; }
.member-table th:nth-child(5) { width: 22%; }
.member-table th:last-child { width: 7%; }
.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; }

.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 { color: var(--subtle); font-size: 8px; white-space: nowrap; }
.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: auto minmax(70px, 100px) auto; }
.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-editor .quota-add { font-size: 9px; min-height: 34px; padding: 0 9px; }
.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: 270px; 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-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; }

.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) 350px; 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; }
.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; }
.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%; }

.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 { width: min(700px, 100%); }
.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: #91b9a5; }
#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: #83aa97; }
.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: #d3e6dc; 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; }
.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; }
.wizard-simple-options select { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 4px; height: 40px; padding: 0 10px; width: 100%; }
.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, #new-task-form .task-context-grid .form-context-note { display: none; }
#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; }
.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; }
.selected-file { align-items: center; background: var(--surface-soft); display: flex; font-size: 9px; gap: 7px; padding: 7px 9px; }
.selected-file span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-file em { color: var(--muted); font-style: normal; }
.field-error { color: var(--red); font-size: 9px; margin: 8px 0 0; }
.semantic-builder { background: var(--surface-soft); }
.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: #83aa97; }
.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: #d6e9df; 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: #17201c; 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: #17201c; 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; }
  .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) {
  :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; }
  .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; }
  .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: 28%; }
  .member-table th:nth-child(5) { width: 34%; }
  .member-table th:last-child { width: 8%; }
  .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; }
  .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%; }
  .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-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: #1a211f; 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; }
  .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; }
  .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%; }
  .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:first-child { width: 42%; }
  .member-table th:nth-child(5) { width: 48%; }
  .member-table th:last-child { width: 10%; }
  .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: auto 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%; }
}

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