:root {
  --bg: #f3f5f7;
  --panel: #ffffff;
  --ink: #18212b;
  --muted: #66717d;
  --line: #dce1e5;
  --accent: #315a69;
  --accent-strong: #274957;
  --accent-soft: #e9f0f2;
  --good: #287a57;
  --warn: #9a6720;
  --error: #a33d3d;
  --radius: 10px;
  --scrollbar-thumb: #aebbc0;
  --scrollbar-thumb-hover: #82959d;
}
* { box-sizing: border-box; scrollbar-color: var(--scrollbar-thumb) transparent; scrollbar-width: thin; }
*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { border: 1px solid transparent; border-radius: 999px; background: var(--scrollbar-thumb); background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); background-clip: padding-box; }
*::-webkit-scrollbar-corner { background: transparent; }
body { margin: 0; color: var(--ink); background: var(--bg); font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
button, input, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }
.topbar { height: 58px; display: flex; align-items: center; gap: 14px; padding: 0 28px; background: var(--project-topbar, #15252c); color: white; }
.brand { font-size: 20px; font-weight: 750; letter-spacing: .04em; }
.brand-note { color: #b9c7cc; font-size: 13px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.topbar-actions form { margin: 0; }
.topbar-link { display: inline-flex; align-items: center; min-height: 32px; border: 1px solid rgba(255,255,255,.24); border-radius: 6px; background: transparent; padding: 5px 10px; color: #fff; cursor: pointer; font-size: 12px; }
.topbar-link.subdued { border-color: transparent; color: #b9c7cc; }
.account-summary { color: #d7e0e3; font-size: 12px; }
.global-generation-status:empty { display: none; }
.global-generation-status { position: relative; z-index: 58; border-bottom: 1px solid color-mix(in srgb,var(--accent) 16%,var(--line)); background: color-mix(in srgb,var(--accent-soft) 58%,#fff); }
.global-generation-banner { position: relative; display: grid; max-width: 1180px; margin: 0 auto; padding: 8px 62px 8px 28px; gap: 6px; }
.global-generation-banner[hidden] { display: none; }
.global-generation-dismiss { position: absolute; top: 50%; right: 24px; display: inline-grid; width: 28px; height: 28px; place-items: center; transform: translateY(-50%); border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); font-size: 19px; line-height: 1; cursor: pointer; }
.global-generation-dismiss:hover { border-color: color-mix(in srgb,var(--accent) 18%,var(--line)); background: rgba(255,255,255,.72); color: var(--ink); }
.global-generation-dismiss:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.global-generation-group { display: grid; min-width: 0; gap: 0; }
.global-generation-summary { display: grid; grid-template-columns: 28px minmax(0,1fr) auto; align-items: center; gap: 10px; width: 100%; min-width: 0; border: 1px solid color-mix(in srgb,var(--accent) 20%,var(--line)); border-radius: 9px; background: rgba(255,255,255,.82); padding: 8px 10px; color: var(--ink); text-align: left; box-shadow: 0 5px 14px rgba(24,33,43,.04); cursor: pointer; }
.global-generation-summary:hover { border-color: color-mix(in srgb,var(--accent) 42%,var(--line)); }
.global-generation-summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.global-generation-stack-icon { position: relative; display: inline-grid; width: 26px; height: 26px; place-items: center; }
.global-generation-stack-icon > i { position: absolute; width: 18px; height: 12px; border: 1px solid color-mix(in srgb,var(--accent) 54%,var(--line)); border-radius: 4px; background: var(--accent-soft); transition: transform .2s ease; }
.global-generation-stack-icon > i:nth-child(1) { transform: translateY(-4px) scale(.84); opacity: .52; }
.global-generation-stack-icon > i:nth-child(2) { transform: translateY(0) scale(.92); opacity: .72; }
.global-generation-stack-icon > i:nth-child(3) { transform: translateY(4px); }
.global-generation-group.is-expanded .global-generation-stack-icon > i:nth-child(1) { transform: translate(-4px,-3px) scale(.84); }
.global-generation-group.is-expanded .global-generation-stack-icon > i:nth-child(2) { transform: translate(0,0) scale(.92); }
.global-generation-group.is-expanded .global-generation-stack-icon > i:nth-child(3) { transform: translate(4px,3px); }
.global-generation-summary-copy { display: grid; min-width: 0; gap: 2px; }
.global-generation-summary-copy strong { font-size: 12px; }
.global-generation-summary-copy small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.global-generation-summary-action { color: var(--accent); font-size: 11px; font-weight: 720; }
.global-generation-items-shell { display: grid; grid-template-rows: 0fr; opacity: 0; transform: translateY(-3px); transition: grid-template-rows .22s ease, opacity .18s ease, transform .22s ease; }
.global-generation-items { display: grid; min-height: 0; overflow: hidden; gap: 6px; }
.global-generation-group.is-expanded .global-generation-items-shell { grid-template-rows: 1fr; opacity: 1; transform: translateY(0); }
.global-generation-group.is-expanded:not(.is-single) .global-generation-items { padding-top: 6px; }
.global-generation-group.is-single .global-generation-summary { display: none; }
.global-generation-item { display: grid; grid-template-columns: 28px minmax(0,1fr) auto; align-items: center; gap: 10px; min-width: 0; border: 1px solid color-mix(in srgb,var(--accent) 20%,var(--line)); border-radius: 9px; background: rgba(255,255,255,.82); padding: 8px 10px; box-shadow: 0 5px 14px rgba(24,33,43,.04); }
.global-generation-item:hover { border-color: color-mix(in srgb,var(--accent) 42%,var(--line)); }
.global-generation-icon { display: inline-grid; width: 26px; height: 26px; place-items: center; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 800; }
.global-generation-icon > i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb,var(--accent) 14%,transparent); animation: generation-status-pulse 1.4s ease-in-out infinite; }
.global-generation-copy { display: grid; min-width: 0; gap: 2px; }
.global-generation-copy strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.global-generation-copy small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.global-generation-progress { display: block; width: min(360px,100%); height: 3px; overflow: hidden; border-radius: 999px; background: color-mix(in srgb,var(--accent) 12%,#fff); }
.global-generation-progress > i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .25s ease; }
.global-generation-action { color: var(--accent); font-size: 11px; font-weight: 720; white-space: nowrap; }
.global-generation-item.completed .global-generation-icon { background: #e7f3ec; color: var(--good); }
.global-generation-item.failed .global-generation-icon, .global-generation-item.interrupted .global-generation-icon { background: #f8eaea; color: var(--error); }
@keyframes generation-status-pulse { 0%,100% { opacity: .48; transform: scale(.82); } 50% { opacity: 1; transform: scale(1); } }
.inline-link { color: var(--accent); font-weight: 680; text-decoration: underline; text-underline-offset: 2px; }
.page-shell { max-width: 1180px; margin: 0 auto; padding: 46px 28px 80px; }
.page-heading { display: flex; justify-content: space-between; margin-bottom: 28px; }
.page-heading h1 { max-width: 720px; margin: 4px 0 10px; font-size: clamp(30px, 4vw, 48px); line-height: 1.16; }
.page-heading p { color: var(--muted); }
.eyebrow { margin: 0 0 6px; color: var(--accent); font-size: 12px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.create-project { margin-bottom: 28px; }
.create-project h2 { margin-top: 0; }
.inline-form, .upload-strip, .artifact-address { display: flex; align-items: end; gap: 14px; }
.grow { flex: 1; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.provider-model-catalog { display: grid; gap: 7px; min-width: 0; }
.field > span, fieldset legend { color: #44515c; font-size: 13px; font-weight: 680; }
input, textarea, select { width: 100%; border: 1px solid #cbd2d7; border-radius: 7px; background: #fff; color: var(--ink); padding: 10px 12px; outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb,var(--accent) 11%,transparent); }
textarea { resize: vertical; line-height: 1.55; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; border: 1px solid #bcc6cb; border-radius: 7px; background: #fff; padding: 8px 14px; cursor: pointer; white-space: nowrap; }
.button:hover { border-color: #7f929b; }
.button:disabled { cursor: not-allowed; opacity: .55; }
.button.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.button.secondary { border-color: var(--accent); color: var(--accent); }
.button.compact { min-height: 32px; padding: 5px 10px; font-size: 12px; }
.button.danger { border-color: #d2aaaa; color: var(--error); }
.project-list { display: grid; gap: 10px; max-height: min(68vh, 760px); overflow-y: auto; padding-right: 4px; scrollbar-gutter: stable; }
.project-row { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: white; overflow: hidden; }
.project-row:hover { border-color: #9aabb2; }
.project-row strong, .project-row span { display: block; }
.project-row-content { min-width: 0; flex: 1 1 auto; }
.project-row-link { display: flex; flex: 1; justify-content: space-between; align-items: center; gap: 18px; min-width: 0; padding: 18px 20px; }
.project-identity { min-width: 0; }
.project-identity > span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.project-delete-form { flex: 0 0 auto; border-left: 1px solid var(--line); padding: 16px; }
.project-resume { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 3px 9px; margin-top: 13px; }
.project-resume > span { width: fit-content; margin: 0; border-radius: 999px; background: var(--accent-soft); padding: 3px 7px; color: var(--accent); font-size: 11px; }
.project-resume > strong { align-self: center; font-size: 13px; overflow-wrap: anywhere; }
.project-resume > small { grid-column: 2; color: var(--muted); font-size: 11px; line-height: 1.45; }
.project-meta { display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 12px; }
.project-generation-inline { display: grid; grid-template-columns: 28px minmax(0,1fr) auto; align-items: center; gap: 10px; border-top: 1px solid color-mix(in srgb,var(--accent) 14%,var(--line)); background: color-mix(in srgb,var(--accent-soft) 40%,#fff); padding: 11px 20px 13px; color: var(--ink); }
.project-generation-inline:hover { background: color-mix(in srgb,var(--accent-soft) 62%,#fff); }
.project-generation-icon { display: inline-grid; width: 28px; height: 28px; place-items: center; border: 1px solid transparent; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 800; line-height: 1; }
.project-generation-icon.is-active::before { display: block; width: 15px; height: 15px; border: 2px solid color-mix(in srgb,var(--accent) 22%,transparent); border-top-color: var(--accent); border-right-color: color-mix(in srgb,var(--accent) 72%,transparent); border-radius: 50%; content: ""; animation: project-generation-spin .82s linear infinite; }
.project-generation-icon.is-complete { border-color: color-mix(in srgb,var(--good) 16%,transparent); background: #e7f3ec; color: var(--good); }
.project-generation-icon.is-complete::before { display: block; width: 7px; height: 12px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; content: ""; transform: translateY(-1px) rotate(45deg); }
.project-generation-icon.is-alert { background: #f8eaea; color: var(--error); }
.project-generation-copy { display: grid; min-width: 0; gap: 2px; }
.project-generation-copy strong { font-size: 12px; }
.project-generation-copy small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.project-generation-progress { display: block; width: min(420px,100%); height: 4px; overflow: hidden; margin-top: 3px; border-radius: 999px; background: color-mix(in srgb,var(--accent) 12%,#e9eeee); }
.project-generation-progress > i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .25s ease; }
.project-generation-action { color: var(--accent); font-size: 11px; font-weight: 720; white-space: nowrap; }
.project-generation-inline.is-completed .project-generation-icon { background: #e7f3ec; color: var(--good); }
.project-generation-inline.is-failed, .project-generation-inline.is-interrupted { border-top-color: #ead1cd; background: #fff8f6; }
.project-generation-inline.is-failed .project-generation-icon, .project-generation-inline.is-interrupted .project-generation-icon { background: #f8eaea; color: var(--error); }
@keyframes project-generation-spin { to { transform: rotate(360deg); } }
.status-pill, .mode-badge { display: inline-flex; width: fit-content; border-radius: 999px; background: #edf0f2; padding: 4px 9px; color: #4e5e67; font-size: 12px; }
.status-pill.good { background: #e7f3ec; color: var(--good); }
.status-pill.warn { background: #f6efe3; color: var(--warn); }
.workspace-shell { --project-sidebar-top: 154px; position: relative; display: block; min-height: calc(100vh - 58px); }
.project-sidebar { position: fixed; z-index: 60; top: var(--project-sidebar-collapsed-top, var(--project-sidebar-top)); left: var(--project-sidebar-collapsed-left, 18px); width: 250px; max-width: calc(100vw - 36px); max-height: calc(100vh - var(--project-sidebar-collapsed-top, var(--project-sidebar-top)) - 18px); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 22px 18px 18px; border: 1px solid rgba(211,219,217,.92); border-radius: 18px; background: rgba(255,255,255,.96); box-shadow: 0 18px 46px rgba(24,33,38,.11); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: width .2s cubic-bezier(.2,.8,.2,1),height .2s cubic-bezier(.2,.8,.2,1),padding .2s cubic-bezier(.2,.8,.2,1),box-shadow .16s ease; }
.project-sidebar-content { min-width: 0; max-width: 100%; cursor: grab; }
.project-sidebar-content a,
.project-sidebar-content button,
.project-sidebar-content label,
.project-sidebar-content summary { cursor: pointer; }
.project-sidebar-content input,
.project-sidebar-content textarea { cursor: text; }
.project-sidebar-content select { cursor: pointer; }
.project-sidebar.is-dragging { cursor: grabbing; user-select: none; transition: none; }
.workspace-shell:not(.is-sidebar-collapsed) .project-sidebar.is-dragging { box-shadow: 0 26px 68px rgba(24,33,38,.18); }
.project-sidebar.is-dragging .project-sidebar-content { cursor: grabbing; }
.project-sidebar-toggle { position: absolute; top: 8px; left: 12px; z-index: 2; display: inline-grid; width: 34px; height: 34px; place-items: center; border: 0; border-radius: 11px; background: transparent; padding: 0; color: #49606a; cursor: pointer; line-height: 1; transition: filter .16s ease,transform .16s ease; }
.workspace-shell:not(.is-sidebar-collapsed) .project-sidebar-toggle { border: 1px solid rgba(174,188,190,.58); background: rgba(249,251,250,.92); box-shadow: 0 4px 12px rgba(31,45,50,.06); }
.project-sidebar-toggle:hover { filter: brightness(.97); transform: translateX(-1px); }
.project-sidebar-toggle:focus-visible { outline: 2px solid color-mix(in srgb,var(--accent) 34%,transparent); outline-offset: 3px; }
.project-sidebar-toggle-art { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; user-select: none; }
.project-sidebar-toggle-art-expanded { width: 18px; height: 18px; transform: none; }
.project-sidebar-toggle-art-collapsed { display: none; }
.workspace-shell.is-sidebar-collapsed .project-sidebar { top: var(--project-sidebar-collapsed-top, var(--project-sidebar-top)); left: var(--project-sidebar-collapsed-left, 18px); width: 58px; height: 50px; max-height: 50px; overflow: hidden; scrollbar-gutter: auto; padding: 0; border: 0; border-radius: 18px; background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.workspace-shell.is-sidebar-collapsed .project-sidebar-content { display: none; }
.workspace-shell.is-sidebar-collapsed .project-sidebar-toggle { top: 0; right: auto; left: 0; width: 100%; height: 100%; border-radius: 18px; cursor: grab; touch-action: none; transform: none; }
.workspace-shell.is-sidebar-collapsed .project-sidebar-toggle::before { position: absolute; width: 34px; height: 34px; border: 1px solid rgba(174,188,190,.58); border-radius: 11px; background: rgba(255,255,255,.94); box-shadow: 0 7px 18px rgba(31,45,50,.08); content: ""; }
.workspace-shell.is-sidebar-collapsed .project-sidebar-toggle:hover { filter: brightness(.985); transform: none; }
.workspace-shell.is-sidebar-collapsed .project-sidebar-toggle:active,
.workspace-shell.is-sidebar-collapsed .project-sidebar.is-dragging .project-sidebar-toggle { cursor: grabbing; }
.workspace-shell.is-sidebar-collapsed .project-sidebar-toggle-art-expanded { display: none; }
.workspace-shell.is-sidebar-collapsed .project-sidebar-toggle-art-collapsed { position: relative; z-index: 1; display: block; width: 18px; height: 18px; transform: rotate(180deg); filter: none; }
.back-link { display: block; width: fit-content; margin-bottom: 26px; color: var(--muted); font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
.project-sidebar .back-link { display: flex; min-height: 26px; align-items: center; margin: -2px 0 20px; padding-left: 42px; }
.back-link:hover { color: var(--accent); }
.project-sidebar h1 { margin: 5px 38px 9px 0; font-size: 18px; line-height: 1.4; letter-spacing: -.015em; overflow-wrap: anywhere; }
.project-summary { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.project-summary span { border: 1px solid #d9e0de; border-radius: 999px; background: #f8faf9; padding: 3px 7px; color: var(--muted); font-size: 10px; }
.workspace-resume { display: grid; gap: 4px; margin: 0 0 18px; border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; background: #f5f8f8; padding: 10px 11px; }
.workspace-resume > span { color: var(--accent); font-size: 10px; font-weight: 750; letter-spacing: .04em; }
.workspace-resume > strong { font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.workspace-resume.is-ready { border-left-color: var(--good); }
.tabs { display: grid; gap: 4px; border-top: 1px solid #e5e9e8; padding-top: 14px; }
.tab-link { display: flex; min-width: 0; align-items: center; gap: 10px; border: 1px solid transparent; border-radius: 9px; padding: 9px 10px; color: #556268; font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; transition: border-color .16s ease,background .16s ease,color .16s ease; }
.tab-link:hover { background: #f6f8f8; color: var(--ink); }
.tab-link > span { display: grid; flex: 0 0 auto; width: 22px; height: 22px; place-items: center; border: 1px solid #cbd5d3; border-radius: 50%; color: #6d797d; font-size: 10px; }
.tab-link.active { border-color: var(--line); background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; }
.tab-link.active > span { border-color: var(--accent); background: var(--accent); color: #fff; }
.tab-link.htmx-request { cursor: progress; }
.tab-link.htmx-request > span { animation: generation-status-pulse .72s ease-in-out infinite; }
.tab-link.is-optional small { margin-left: auto; color: #879195; font-size: 10px; font-weight: 500; white-space: nowrap; }
.workspace-panel { min-width: 0; padding: 30px 36px 70px; background: var(--panel); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.panel-heading > div { min-width: 0; }
.panel-heading h2 { margin: 3px 0 0; font-size: 25px; overflow-wrap: anywhere; }
.panel-heading > span { color: var(--muted); font-size: 13px; }
.panel-heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex: 0 0 auto; }
.workflow-guide { display: grid; gap: 8px; margin: -8px 0 24px; border: 1px solid var(--line); border-radius: 9px; background: #f8fafb; padding: 12px 14px; }
.workflow-guide-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.workflow-guide-copy { display: grid; min-width: 0; gap: 3px; }
.workflow-guide-copy > span { color: var(--accent); font-size: 11px; font-weight: 750; letter-spacing: .04em; }
.workflow-guide-copy > strong { font-size: 14px; line-height: 1.4; }
.workflow-guide-copy > small { color: var(--muted); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.workflow-guide-copy > small b { color: #44515c; }
.workflow-guide-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 7px; }
.workflow-guide-current, .workflow-guide-complete { display: inline-flex; align-items: center; min-height: 32px; border-radius: 999px; padding: 5px 10px; font-size: 11px; font-weight: 700; }
.workflow-guide-current { background: var(--accent-soft); color: var(--accent); }
.workflow-guide-complete { background: #e7f3ec; color: var(--good); }
.form-stack { display: grid; gap: 20px; max-width: 1080px; }
.form-grid { display: grid; gap: 16px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.form-grid.four { grid-template-columns: repeat(4, minmax(0,1fr)); }
.mode-selector { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; border: 0; padding: 0; margin: 0; }
.mode-selector[hidden] { display: none !important; }
.mode-selector legend { margin-bottom: 8px; }
.mode-selector label { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; border: 1px solid var(--line); border-radius: 8px; padding: 12px; cursor: pointer; }
.mode-selector input { grid-row: 1 / span 2; width: auto; }
.mode-selector small { color: var(--muted); }
.artifact-quality-selector > .helper { grid-column: 1 / -1; margin-top: 2px; }
.artifact-media-selector [data-media-strategy-option][hidden] { display: none !important; }
.intake-form { container-name: intake; container-type: inline-size; gap: 22px; }
.intake-project-meta { grid-template-columns: repeat(2,minmax(0,1fr)); }
.intake-project-meta > :first-child { grid-column: 1 / -1; }
.intake-quick-start { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-left: 3px solid var(--accent); border-radius: 7px; background: var(--accent-soft); padding: 12px 14px; }
.intake-quick-start p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.intake-scope > span { display: flex; align-items: center; gap: 8px; }
.intake-scope em { border-radius: 999px; background: #f2eee5; padding: 2px 7px; color: var(--warn); font-size: 10px; font-style: normal; font-weight: 650; }
.intake-choice-section { display: grid; gap: 12px; border-top: 1px solid var(--line); padding-top: 18px; }
.intake-primary-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; }
.intake-choice-section .section-heading h3 { margin: 0; font-size: 17px; }
.intake-choice-section .section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.choice-chip-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.choice-chip-grid label { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 8px; min-height: 44px; border: 1px solid var(--line); border-radius: 7px; background: #fff; padding: 9px 10px; cursor: pointer; font-size: 12px; line-height: 1.4; }
.choice-chip-grid label:has(input:checked) { border-color: #8ca5af; background: #eef4f5; color: #284e5b; }
.choice-chip-grid input { width: auto; margin: 2px 0 0; accent-color: var(--accent); }
.priority-chip-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.intake-details { padding: 16px; }
.intake-details > summary { font-size: 15px; }
.intake-details > .helper { margin: 8px 0 16px; }
.intake-detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.compact-choice-section { align-content: start; border: 0; border-radius: 7px; background: #f7f8f7; padding: 13px; }
.compact-choice-section textarea { background: #fff; }
.compact-chips { grid-template-columns: 1fr; gap: 6px; }
.compact-chips label { min-height: 0; padding: 7px 8px; }
.permission-row.intake-permissions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.intake-permissions label { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 9px; border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; cursor: pointer; }
.intake-permissions label:has(input:checked) { border-color: #8ca5af; background: #f2f6f7; }
.intake-permissions input { margin-top: 3px; }
.intake-permissions strong, .intake-permissions small { display: block; }
.intake-permissions small { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.45; }
@container intake (max-width: 760px) {
  .intake-project-meta, .intake-primary-grid, .intake-detail-grid, .permission-row.intake-permissions { grid-template-columns: 1fr; }
  .intake-project-meta > :first-child { grid-column: auto; }
}
.intake-page-heading { margin-bottom: 16px; padding-bottom: 14px; }
.intake-page-heading h2 { font-size: 28px; }
.intake-guide-shell { display: none; }
.intake-guide-shell .workflow-guide { margin: 0 0 16px; padding: 10px 12px; }
.intake-guide-shell .workflow-guide-copy > small { display: none; }
.intake-guide-shell .workflow-guide-summary { gap: 12px; }
.intake-step-form { max-width: 1030px; gap: 0; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: #fff; box-shadow: 0 18px 50px rgba(28,44,50,.09); }
.intake-project-strip { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); background: #fbfcfc; padding: 17px 22px; }
.intake-project-identity { display: flex; min-width: 0; align-items: baseline; gap: 12px; }
.intake-project-identity strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.intake-project-identity span { flex: 0 0 auto; color: var(--muted); font-size: 12px; }
.intake-text-button { border: 0; background: transparent; padding: 5px 0; color: var(--muted); cursor: pointer; font-size: 12px; }
.intake-text-button:hover { color: var(--ink); }
.intake-stage { padding: 30px 40px 32px; }
.intake-intro { max-width: 680px; margin: 0 auto 22px; text-align: center; }
.intake-intro h3 { margin: 0 0 7px; font-size: 21px; letter-spacing: -.02em; }
.intake-intro p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.intake-launcher { display: grid; justify-items: center; gap: 12px; margin: 0 auto; }
.intake-launcher-row { display: flex; align-items: center; justify-content: center; gap: 22px; }
.intake-plus-control { display: grid; flex: 0 0 auto; justify-items: center; gap: 6px; }
.intake-plus-caption { color: var(--muted); font-size: 11px; font-weight: 680; transition: color 180ms ease; }
.intake-plus-control:hover .intake-plus-caption { color: var(--ink); }
.intake-plus-button { display: grid; width: 52px; height: 52px; place-items: center; border: 1px solid #b9c8c8; border-radius: 50%; background: var(--accent); color: #fff; box-shadow: 0 10px 26px rgba(49,85,99,.22); cursor: pointer; transition: transform 220ms ease, background-color 180ms ease, box-shadow 220ms ease; }
.intake-plus-button:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(49,85,99,.27); }
.intake-plus-button span { font-size: 29px; font-weight: 280; line-height: 1; transition: transform 250ms ease; }
.intake-plus-button[aria-expanded="true"] { background: #425158; }
.intake-plus-button[aria-expanded="true"] span { transform: rotate(45deg); }
.intake-step-cluster { display: grid; gap: 8px; }
.intake-step-nav { position: relative; display: flex; width: 250px; align-items: center; justify-content: space-between; padding: 0 12px; }
.intake-step-nav::before { position: absolute; top: 50%; right: 24px; left: 24px; height: 1px; transform: translateY(-50%); background: #d5dcdf; content: ""; }
.intake-step-dot { position: relative; z-index: 1; width: 14px; height: 14px; border: 3px solid #fff; border-radius: 50%; background: #cbd3d6; box-shadow: 0 0 0 1px #bdc8cc; cursor: pointer; transition: width 200ms cubic-bezier(.2,.8,.2,1), background-color 160ms ease, box-shadow 160ms ease; }
.intake-step-dot::before { position: absolute; bottom: calc(100% + 9px); left: 50%; width: max-content; max-width: 190px; transform: translate(-50%, 4px); border-radius: 6px; background: #253238; padding: 6px 8px; color: #fff; content: attr(aria-label); opacity: 0; pointer-events: none; font-size: 11px; transition: opacity 160ms ease, transform 160ms ease; }
.intake-step-dot:hover::before, .intake-step-dot:focus-visible::before { transform: translate(-50%, 0); opacity: 1; }
.intake-step-dot.is-active { width: 34px; border-radius: 999px; background: var(--accent); box-shadow: none; }
.intake-step-dot.is-complete:not(.is-active) { display: grid; width: 16px; height: 16px; place-items: center; border-width: 2px; background: var(--good); box-shadow: none; }
.intake-step-dot.is-complete:not(.is-active)::after { content: "✓"; color: #fff; font-size: 9px; font-weight: 800; line-height: 1; }
.intake-step-labels { display: flex; width: 250px; justify-content: space-between; color: #78858b; font-size: 11px; }
.intake-step-labels span { transition: color 160ms ease; }
.intake-step-labels span.is-active { color: var(--ink); font-weight: 720; }
.intake-step-summary { min-height: 23px; margin: 0; color: var(--muted); text-align: center; font-size: 12px; line-height: 1.6; }
.intake-step-summary strong { color: var(--good); }
.intake-saved-summary { display: grid; width: min(820px, 100%); grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin-top: 4px; }
.intake-saved-summary[hidden] { display: none; }
.intake-saved-summary button { display: grid; min-width: 0; grid-template-columns: auto minmax(0,1fr); align-items: start; gap: 9px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfc; padding: 11px 12px; text-align: left; cursor: pointer; transition: border-color 150ms ease, background-color 150ms ease; }
.intake-saved-summary button:hover { border-color: #aebdbd; background: #f7f9f9; }
.intake-saved-summary b { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: var(--good); color: #fff; font-size: 10px; }
.intake-saved-summary button > span, .intake-saved-summary strong, .intake-saved-summary button > span > span { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.intake-saved-summary strong { font-size: 12px; }
.intake-saved-summary button > span > span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.intake-panel-region { max-width: 820px; margin: 0 auto; overflow: hidden; }
.intake-step-panel { margin-top: 26px; border-top: 1px solid var(--line); padding-top: 26px; }
.intake-step-panel[hidden] { display: none; }
.intake-step-panel.is-entering-forward { animation: intake-panel-forward 220ms cubic-bezier(.2,.8,.2,1); }
.intake-step-panel.is-entering-back { animation: intake-panel-back 220ms cubic-bezier(.2,.8,.2,1); }
.intake-step-panel.is-leaving-forward { animation: intake-panel-leave-forward 120ms ease-in both; }
.intake-step-panel.is-leaving-back { animation: intake-panel-leave-back 120ms ease-in both; }
.intake-step-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.intake-step-heading > div { min-width: 0; }
.intake-step-heading span { display: inline-flex; align-items: center; gap: 9px; color: var(--accent); font-size: 12px; font-weight: 760; }
.intake-step-heading span::after { width: 24px; height: 1px; background: currentColor; content: ""; }
.intake-step-heading h3 { margin: 6px 0 5px; font-size: 21px; }
.intake-step-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.intake-step-panel textarea { resize: vertical; }
.intake-step-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; }
.intake-step-actions > .button:only-child { margin-left: auto; }
.intake-final-actions > div { display: flex; align-items: center; gap: 12px; }
.intake-defaults-note { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 16px; border: 1px solid #d7dfdd; border-radius: 10px; background: #f7f9f8; padding: 12px 14px; }
.intake-defaults-note p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.intake-step-panel > .intake-choice-section, .priority-choice-section { gap: 10px; border-top: 0; padding-top: 16px; }
.intake-step-panel > .intake-choice-section + .intake-choice-section { border-top: 1px solid var(--line); }
.intake-step-panel > .intake-choice-section .section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.intake-step-panel > .intake-choice-section .section-heading h3 { font-size: 14px; }
.choice-chip-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-chip-grid label { position: relative; display: inline-flex; min-height: 0; align-items: center; border: 0; border-radius: 999px; background: #eef1f1; padding: 0; color: #536167; cursor: pointer; font-size: 12px; line-height: 1.35; }
.choice-chip-grid label:hover { background: #e5ebeb; color: var(--ink); }
.choice-chip-grid label:has(input:checked) { border: 0; background: var(--accent); color: #fff; }
.choice-chip-grid input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.choice-chip-grid label span { display: block; padding: 8px 12px; }
.choice-chip-grid label:focus-within { box-shadow: 0 0 0 3px rgba(49,85,99,.14); }
.compact-chips { display: grid; grid-template-columns: 1fr; }
.compact-chips label { border-radius: 7px; background: #fff; }
.compact-chips label span { padding: 7px 9px; }
.intake-support-details { margin-top: 2px; }
.intake-support-details > .intake-permissions { margin-top: 14px; }
.intake-confirm-bar { margin-top: 16px; }
.intake-settings-dialog { width: min(620px, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: 12px; padding: 0; color: var(--ink); background: #fff; box-shadow: 0 26px 72px rgba(24,33,43,.24); }
body.intake-settings-open { overflow: hidden; }
.intake-settings-dialog::backdrop { background: rgba(19,29,34,.42); backdrop-filter: blur(2px); }
.intake-settings-dialog[open] { animation: intake-dialog-in 200ms cubic-bezier(.2,.8,.2,1); }
.intake-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding: 16px 18px; }
.intake-dialog-heading span { color: var(--accent); font-size: 11px; font-weight: 740; }
.intake-dialog-heading h3 { margin: 3px 0 0; font-size: 18px; }
.intake-dialog-heading button { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--muted); cursor: pointer; font-size: 21px; line-height: 1; }
.intake-dialog-body { display: grid; gap: 15px; padding: 18px; }
.intake-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); background: #fafbfb; padding: 13px 18px; }
@keyframes intake-panel-forward { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: translateX(0); } }
@keyframes intake-panel-back { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }
@keyframes intake-panel-leave-forward { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(-7px); } }
@keyframes intake-panel-leave-back { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(7px); } }
@keyframes intake-dialog-in { from { opacity: 0; transform: translateY(7px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@container intake (max-width: 760px) {
  .intake-project-identity { align-items: flex-start; flex-direction: column; gap: 4px; }
  .intake-project-identity strong { width: 100%; white-space: normal; }
  .intake-project-strip { align-items: flex-start; flex-direction: column; }
  .intake-stage { padding: 30px 18px 25px; }
  .intake-launcher-row { gap: 13px; }
  .intake-step-nav, .intake-step-labels { width: 215px; }
  .intake-saved-summary { grid-template-columns: 1fr; }
  .intake-step-actions, .intake-final-actions, .intake-final-actions > div, .intake-defaults-note { align-items: stretch; flex-direction: column; }
  .intake-step-actions .button, .intake-final-actions > div .button { width: 100%; }
}
@container intake (max-width: 430px) {
  .intake-launcher-row { width: 100%; flex-direction: column; }
  .intake-plus-control { grid-template-columns: auto auto; align-items: center; }
  .intake-step-nav, .intake-step-labels { width: min(250px, calc(100cqw - 36px)); }
  .intake-step-heading { flex-direction: column; gap: 8px; }
  .intake-step-panel > .intake-choice-section .section-heading { align-items: flex-start; flex-direction: column; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .intake-step-panel, .intake-settings-dialog[open] { animation: none !important; }
  .intake-plus-button span, .intake-step-dot, .intake-saved-summary button { transition-duration: .01ms !important; }
}
/* Project intake: directly ported from prototype-v2.html. */
body:has(.intake-v2-workspace) { --ink: #182126; --muted: #68747a; --line: #dbe1df; --accent: #315563; --good: #2f7458; background: var(--bg, #f3f5f4); }
body:has(.intake-v2-workspace) .topbar { background: var(--project-topbar, #151d21); }
body:has(.intake-v2-workspace) .brand { font-size: 22px; }
body:has(.intake-v2-workspace) .brand-note { color: #9eaaad; }
body:has(.intake-v2-workspace) .workspace-panel { background: #f3f5f4; padding: 30px 46px 80px 72px; }
body:has(.intake-v2-workspace) .workspace-shell.is-sidebar-collapsed .project-sidebar { left: var(--project-sidebar-collapsed-left, 18px); width: 58px; height: 50px; max-height: 50px; border-radius: 18px; background: transparent; box-shadow: none; }
body:has(.intake-v2-workspace) .workspace-shell.is-sidebar-collapsed .project-sidebar-toggle { width: 100%; height: 100%; border: 0; background: transparent; }
.intake-page-heading, .intake-page-notice, .intake-v2-workspace { width: min(1030px, 100%); margin-right: auto; margin-left: auto; }
.intake-page-heading { position: relative; z-index: 2; align-items: flex-end; margin-bottom: 24px; border: 0; padding: 0; }
.intake-page-heading h2 { margin: 0; font-size: clamp(27px, 3vw, 40px); line-height: 1.14; letter-spacing: -.035em; }
.intake-page-heading .eyebrow { margin-bottom: 8px; font-size: 14px; letter-spacing: .04em; }
.intake-page-heading .status-pill { flex: 0 0 auto; padding: 7px 11px; font-weight: 720; }
.intake-city-header-slot:empty { display: none; }
.intake-city-header-slot { position: absolute; top: -118px; right: -64px; left: -64px; z-index: 0; height: 390px; overflow: hidden; opacity: 1; pointer-events: none; transition: opacity .18s ease,visibility .18s ease; }
.intake-city-header-slot:not(.is-ready) { display: none; }
.intake-city-header-slot.is-ready {
  -webkit-mask-image:
    linear-gradient(90deg,transparent 0 10%,rgba(0,0,0,.12) 14%,rgba(0,0,0,.58) 20%,#000 28% 72%,rgba(0,0,0,.58) 80%,rgba(0,0,0,.12) 86%,transparent 90% 100%),
    linear-gradient(180deg,transparent 0 4%,rgba(0,0,0,.18) 10%,rgba(0,0,0,.72) 18%,#000 27% 76%,rgba(0,0,0,.65) 84%,rgba(0,0,0,.12) 92%,transparent 98% 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg,transparent 0 10%,rgba(0,0,0,.12) 14%,rgba(0,0,0,.58) 20%,#000 28% 72%,rgba(0,0,0,.58) 80%,rgba(0,0,0,.12) 86%,transparent 90% 100%),
    linear-gradient(180deg,transparent 0 4%,rgba(0,0,0,.18) 10%,rgba(0,0,0,.72) 18%,#000 27% 76%,rgba(0,0,0,.65) 84%,rgba(0,0,0,.12) 92%,transparent 98% 100%);
  mask-composite: intersect;
}
.intake-city-hero { position: absolute; inset: 0; min-height: 0; overflow: hidden; border: 0; background: transparent var(--intake-city-image) center 68%/80% auto no-repeat; filter: saturate(.92) contrast(.97) blur(.35px); }
.intake-city-hero::before { position: absolute; inset: -14px; background: rgba(243,245,244,.03); -webkit-backdrop-filter: blur(11px); backdrop-filter: blur(11px); -webkit-mask-image: radial-gradient(ellipse 72% 48% at 50% 52%,transparent 0 56%,rgba(0,0,0,.16) 66%,rgba(0,0,0,.72) 82%,#000 100%); mask-image: radial-gradient(ellipse 72% 48% at 50% 52%,transparent 0 56%,rgba(0,0,0,.16) 66%,rgba(0,0,0,.72) 82%,#000 100%); content: ""; pointer-events: none; }
.intake-city-hero::after { position: absolute; inset: 0; background: linear-gradient(180deg,rgba(243,245,244,.08),transparent 42%,rgba(243,245,244,.20) 70%,#f3f5f4 100%); content: ""; pointer-events: none; }
.intake-background-toggle { position: absolute; top: -102px; right: 4px; z-index: 4; display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid rgba(117,132,136,.24); border-radius: 50%; background: rgba(255,255,255,.72); color: #647277; box-shadow: 0 7px 20px rgba(31,45,50,.08); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); cursor: pointer; transition: top .22s cubic-bezier(.2,.8,.2,1),background .18s ease,color .18s ease,transform .18s ease; }
.intake-background-toggle:hover { background: rgba(255,255,255,.94); color: var(--ink); transform: translateY(-1px); }
.intake-background-toggle span { display: block; font-size: 19px; font-weight: 350; line-height: 1; transition: transform .22s cubic-bezier(.2,.8,.2,1); }
.intake-city-footer-slot { position: absolute; right: 15%; bottom: -82px; left: 15%; z-index: 0; height: 166px; overflow: hidden; opacity: 1; pointer-events: none; transition: opacity .18s ease,visibility .18s ease; -webkit-mask-image: linear-gradient(90deg,transparent 0 10%,rgba(0,0,0,.12) 16%,rgba(0,0,0,.62) 23%,#000 32% 68%,rgba(0,0,0,.62) 77%,rgba(0,0,0,.12) 84%,transparent 90% 100%),linear-gradient(180deg,transparent 0 6%,rgba(0,0,0,.18) 14%,rgba(0,0,0,.68) 26%,#000 38% 74%,rgba(0,0,0,.56) 84%,rgba(0,0,0,.10) 94%,transparent 100%); -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg,transparent 0 10%,rgba(0,0,0,.12) 16%,rgba(0,0,0,.62) 23%,#000 32% 68%,rgba(0,0,0,.62) 77%,rgba(0,0,0,.12) 84%,transparent 90% 100%),linear-gradient(180deg,transparent 0 6%,rgba(0,0,0,.18) 14%,rgba(0,0,0,.68) 26%,#000 38% 74%,rgba(0,0,0,.56) 84%,rgba(0,0,0,.10) 94%,transparent 100%); mask-composite: intersect; }
.intake-city-footer-visual { position: absolute; inset: 0; background: transparent var(--intake-city-image) center bottom/80% auto no-repeat; filter: saturate(.88) contrast(.96) blur(.25px); }
.intake-city-footer-visual::before { position: absolute; inset: -12px; background: rgba(243,245,244,.04); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); -webkit-mask-image: radial-gradient(ellipse 72% 46% at 50% 42%,transparent 0 54%,rgba(0,0,0,.18) 66%,#000 100%); mask-image: radial-gradient(ellipse 72% 46% at 50% 42%,transparent 0 54%,rgba(0,0,0,.18) 66%,#000 100%); content: ""; }
.intake-city-footer-visual::after { position: absolute; inset: 0; background: linear-gradient(180deg,#f3f5f4 0,rgba(243,245,244,.22) 30%,transparent 62%,rgba(243,245,244,.72) 100%); content: ""; }
.intake-page-notice { margin-bottom: 14px; }
.intake-v2-workspace { font-size: 14px; }
.intake-v2-workspace,
.project-background-workspace { position: relative; transition: padding-top .22s cubic-bezier(.2,.8,.2,1); }
.intake-v2-workspace:has(.intake-city-header-slot.is-ready),
.project-background-workspace:has(.intake-city-header-slot.is-ready) { padding-top: clamp(132px,16vw,166px); }
.intake-v2-workspace.is-intake-background-hidden,
.intake-v2-workspace.is-intake-background-hidden:has(.intake-city-header-slot.is-ready),
.project-background-workspace.is-intake-background-hidden,
.project-background-workspace.is-intake-background-hidden:has(.intake-city-header-slot.is-ready),
.workspace-panel.has-hidden-project-background .intake-v2-workspace,
.workspace-panel.has-hidden-project-background .project-background-workspace { padding-top: 0; }
.intake-v2-workspace.is-intake-background-hidden .intake-city-header-slot,
.intake-v2-workspace.is-intake-background-hidden .intake-city-footer-slot,
.project-background-workspace.is-intake-background-hidden .intake-city-header-slot,
.project-background-workspace.is-intake-background-hidden .intake-city-footer-slot,
.workspace-panel.has-hidden-project-background .intake-city-header-slot,
.workspace-panel.has-hidden-project-background .intake-city-footer-slot { visibility: hidden; opacity: 0; }
.intake-v2-workspace.is-intake-background-hidden .intake-background-toggle,
.project-background-workspace.is-intake-background-hidden .intake-background-toggle,
.workspace-panel.has-hidden-project-background .intake-background-toggle { top: -18px; }
.intake-v2-workspace.is-intake-background-hidden .intake-background-toggle span,
.project-background-workspace.is-intake-background-hidden .intake-background-toggle span,
.workspace-panel.has-hidden-project-background .intake-background-toggle span { transform: rotate(45deg); }
@media (prefers-reduced-motion: reduce) {
  .intake-v2-workspace,
  .project-background-workspace,
  .intake-city-header-slot,
  .intake-city-footer-slot,
  .intake-background-toggle,
  .intake-background-toggle span { transition: none !important; }
}
.intake-v2-card { position: relative; z-index: 1; overflow: hidden; border: 1px solid rgba(211,219,217,.92); border-radius: 18px; background: rgba(255,255,255,.965); box-shadow: 0 22px 60px rgba(24,33,38,.12); backdrop-filter: blur(12px); }
.intake-v2-form { display: block; container-name: intake-v2; container-type: inline-size; }
.intake-v2-workspace .project-strip { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); background: #fbfcfc; padding: 17px 22px; }
.intake-v2-workspace .project-title { display: flex; min-width: 0; align-items: center; gap: 12px; }
.intake-v2-workspace .project-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.intake-v2-workspace .meta { color: var(--muted); font-size: 12px; }
.intake-v2-workspace .basic-settings { border: 0; background: transparent; padding: 5px 0; color: var(--muted); cursor: pointer; }
.intake-v2-workspace .basic-settings:hover { color: var(--ink); }
.intake-v2-workspace .intake-stage { padding: 30px 40px 32px; }
.intake-v2-workspace .intake-intro { max-width: 680px; margin: 0 auto 22px; text-align: center; }
.intake-v2-workspace .intake-intro h2 { margin: 0 0 7px; font-size: 21px; letter-spacing: -.02em; }
.intake-v2-workspace .intake-intro p { margin: 0; color: var(--muted); line-height: 1.65; }
.intake-v2-workspace .input-launcher { display: grid; justify-items: center; gap: 12px; }
.intake-v2-workspace .launcher-line { display: flex; align-items: center; justify-content: center; gap: 22px; }
.intake-v2-workspace .plus-control { display: grid; justify-items: center; gap: 6px; }
.intake-v2-workspace .plus-caption { color: var(--muted); font-size: 11px; font-weight: 680; transition: color .18s ease; }
.intake-v2-workspace .plus-control:hover .plus-caption { color: var(--ink); }
.intake-v2-workspace .plus-button { position: relative; display: grid; width: 52px; height: 52px; place-items: center; border: 1px solid #b9c8c8; border-radius: 50%; background: var(--accent); color: #fff; box-shadow: 0 10px 26px rgba(49,85,99,.22); cursor: pointer; transition: transform .22s ease, box-shadow .22s ease, background .22s ease; }
.intake-v2-workspace .plus-button:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(49,85,99,.27); }
.intake-v2-workspace .plus-button span { font-size: 29px; font-weight: 280; line-height: 1; transition: transform .25s ease; }
.intake-v2-workspace .plus-button[aria-expanded="true"] { background: #425158; }
.intake-v2-workspace .plus-button[aria-expanded="true"] span { transform: rotate(45deg); }
.intake-v2-workspace .step-cluster { display: grid; gap: 8px; }
.intake-v2-workspace .step-nav { position: relative; display: flex; width: 250px; align-items: center; justify-content: space-between; padding: 0 12px; }
.intake-v2-workspace .step-nav::before { position: absolute; top: 50%; right: 24px; left: 24px; height: 1px; transform: translateY(-50%); background: #d7dddc; content: ""; }
.intake-v2-workspace .step-dot { position: relative; z-index: 1; width: 14px; height: 14px; border: 3px solid #fff; border-radius: 50%; background: #ccd4d3; box-shadow: 0 0 0 1px #cbd4d2; cursor: pointer; transition: width .2s ease, background .2s ease; }
.intake-v2-workspace .step-dot::after { position: absolute; bottom: calc(100% + 9px); left: 50%; z-index: 5; width: max-content; max-width: 190px; transform: translate(-50%,4px); border-radius: 6px; background: #253238; padding: 6px 8px; color: #fff; content: attr(aria-label); opacity: 0; pointer-events: none; font-size: 11px; transition: .16s ease; }
.intake-v2-workspace .step-dot:hover::after, .intake-v2-workspace .step-dot:focus-visible::after { transform: translate(-50%,0); opacity: 1; }
.intake-v2-workspace .step-dot.active { width: 34px; border-radius: 999px; background: var(--accent); box-shadow: none; }
.intake-v2-workspace .step-dot.complete:not(.active) { display: grid; place-items: center; background: var(--good); box-shadow: none; }
.intake-v2-workspace .step-dot.complete:not(.active)::before { color: #fff; content: "✓"; font-size: 8px; font-weight: 800; }
.intake-v2-workspace .step-labels { display: flex; width: 250px; justify-content: space-between; color: #7b878b; font-size: 11px; }
.intake-v2-workspace .step-labels span.active { color: var(--ink); font-weight: 720; }
.intake-v2-workspace .summary-line { min-height: 23px; color: var(--muted); text-align: center; font-size: 12px; }
.intake-v2-workspace .summary-line strong { color: var(--good); }
.intake-v2-workspace .collapsed-summary { display: grid; width: min(820px,100%); grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-top: 4px; }
.intake-v2-workspace .collapsed-summary[hidden] { display: none; }
.intake-v2-workspace .summary-card { display: grid; min-width: 0; grid-template-columns: auto 1fr; gap: 9px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfc; padding: 11px 12px; text-align: left; cursor: pointer; }
.intake-v2-workspace .summary-card:hover { border-color: #aebdbd; background: #f7f9f9; }
.intake-v2-workspace .summary-card b { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: var(--good); color: #fff; font-size: 10px; }
.intake-v2-workspace .summary-card strong, .intake-v2-workspace .summary-card span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.intake-v2-workspace .summary-card strong { font-size: 12px; }
.intake-v2-workspace .summary-card span span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.intake-v2-workspace [data-intake-panel-region] { overflow: hidden; }
.intake-v2-workspace .step-panel { max-width: 820px; margin: 26px auto 0; border-top: 1px solid var(--line); padding-top: 26px; opacity: 1; transform: translateY(0); }
.intake-v2-workspace .step-panel[hidden] { display: none; }
.intake-v2-workspace .step-panel.is-entering-forward { animation: intake-panel-forward 220ms cubic-bezier(.2,.8,.2,1); }
.intake-v2-workspace .step-panel.is-entering-back { animation: intake-panel-back 220ms cubic-bezier(.2,.8,.2,1); }
.intake-v2-workspace .step-panel.is-leaving-forward { animation: intake-panel-leave-forward 120ms ease-in both; }
.intake-v2-workspace .step-panel.is-leaving-back { animation: intake-panel-leave-back 120ms ease-in both; }
.intake-v2-workspace .step-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.intake-v2-workspace .panel-index { display: inline-flex; align-items: center; gap: 9px; color: var(--accent); font-weight: 760; }
.intake-v2-workspace .panel-index i { width: 24px; height: 1px; background: currentColor; }
.intake-v2-workspace .step-panel-heading h3 { margin: 7px 0 5px; font-size: 21px; }
.intake-v2-workspace .step-panel-heading p { margin: 0; color: var(--muted); line-height: 1.55; }
.intake-v2-workspace .quiet-action { border: 0; background: transparent; padding: 6px; color: var(--muted); cursor: pointer; }
.intake-v2-workspace .fields { display: grid; gap: 15px; }
.intake-v2-workspace .field { display: grid; gap: 7px; }
.intake-v2-workspace .field > span { font-weight: 690; }
.intake-v2-workspace .field small { color: var(--muted); line-height: 1.5; }
.intake-v2-workspace input, .intake-v2-workspace textarea, .intake-v2-workspace select { border-color: #cbd4d2; border-radius: 10px; padding: 12px 13px; }
.intake-v2-workspace textarea { min-height: 112px; line-height: 1.65; }
.intake-v2-workspace input:focus, .intake-v2-workspace textarea:focus, .intake-v2-workspace select:focus { border-color: #78939a; box-shadow: 0 0 0 3px rgba(49,85,99,.10); }
.intake-v2-workspace .split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.intake-v2-workspace .intake-location-entry { display: grid; grid-template-columns: minmax(0,1fr) auto; }
.intake-v2-workspace .intake-location-entry input { min-width: 0; border-radius: 10px 0 0 10px; }
.intake-v2-workspace .intake-map-toggle { border: 1px solid #aebdbd; border-left: 0; border-radius: 0 10px 10px 0; background: #f4f7f6; padding: 0 13px; color: var(--accent-strong); cursor: pointer; font-size: 12px; font-weight: 720; white-space: nowrap; }
.intake-v2-workspace .intake-map-toggle:hover, .intake-v2-workspace .intake-map-toggle[aria-expanded="true"] { background: var(--accent-soft); color: var(--accent-strong); }
.intake-v2-workspace .intake-map-toggle:focus-visible { position: relative; z-index: 1; outline: 0; box-shadow: 0 0 0 3px rgba(49,85,99,.12); }
.intake-v2-workspace .intake-map-picker { display: grid; gap: 10px; border: 1px solid #d3dcda; border-radius: 12px; background: #f8faf9; padding: 12px; animation: intake-map-reveal 180ms cubic-bezier(.2,.8,.2,1); }
.intake-v2-workspace .intake-map-picker[hidden] { display: none; }
.intake-v2-workspace .intake-map-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.intake-v2-workspace .intake-map-toolbar-groups { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; }
.intake-v2-workspace .intake-map-segmented { display: inline-flex; border: 1px solid #cbd6d3; border-radius: 999px; background: #fff; padding: 2px; }
.intake-v2-workspace .intake-map-segmented button { border: 0; border-radius: 999px; background: transparent; padding: 7px 12px; color: var(--muted); cursor: pointer; font-size: 12px; }
.intake-v2-workspace .intake-map-segmented button[aria-pressed="true"] { background: var(--accent); color: #fff; box-shadow: 0 2px 7px rgba(49,85,99,.18); }
.intake-v2-workspace .intake-map-layers button { display: inline-grid; width: 34px; height: 30px; place-items: center; padding: 0; font-size: 15px; line-height: 1; }
.intake-v2-workspace .intake-map-layers button > span { display: block; filter: grayscale(1); }
.intake-v2-workspace .intake-map-layers button[aria-pressed="true"] > span { filter: grayscale(1) brightness(0) invert(1); }
.intake-v2-workspace .intake-map-clear { font-size: 12px; }
.intake-v2-workspace .intake-location-map { width: 100%; height: 360px; overflow: hidden; border: 1px solid #cbd6d3; border-radius: 10px; background-color: #edf1ef; background-image: linear-gradient(rgba(49,85,99,.06) 1px,transparent 1px),linear-gradient(90deg,rgba(49,85,99,.06) 1px,transparent 1px); background-size: 24px 24px; cursor: crosshair; }
.intake-v2-workspace .intake-location-map.leaflet-container { font-family: inherit; }
.intake-v2-workspace .intake-location-map .leaflet-control-attribution { color: #68747a; font-size: 10px; }
.intake-v2-workspace .intake-map-status { min-height: 18px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.intake-v2-workspace .intake-map-picker.is-tile-unavailable .intake-location-map { background-color: #eef2f0; }
.intake-v2-workspace .prompt-box { display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid #d7dfdd; border-radius: 10px; background: #f8faf9; padding: 11px 13px; color: var(--muted); font-size: 12px; }
.intake-v2-workspace .prompt-box a { color: var(--accent); font-weight: 700; }
.intake-v2-workspace .choice-group { display: grid; gap: 10px; }
.intake-v2-workspace .choice-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.intake-v2-workspace .choice-head strong { font-size: 14px; }
.intake-v2-workspace .choice-head span { color: var(--muted); font-size: 11px; }
.intake-v2-workspace .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.intake-v2-workspace .chip { position: relative; display: inline-flex; align-items: center; border: 1px solid #d3dbd9; border-radius: 999px; background: #fff; padding: 0; color: #536066; cursor: pointer; transition: .15s ease; }
.intake-v2-workspace .chip:hover { border-color: #9aadae; }
.intake-v2-workspace .chip input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.intake-v2-workspace .chip span { padding: 8px 11px; }
.intake-v2-workspace .chip:has(input:checked) { border-color: #8da5ab; background: #edf3f4; color: #274957; box-shadow: inset 0 0 0 1px rgba(49,85,99,.05); }
.intake-v2-workspace .chip:has(input:checked) span::before { margin-right: 5px; content: "✓"; font-size: 11px; }
.intake-v2-workspace .compact-chips { gap: 6px; }
.intake-v2-workspace .compact-chips .chip span { padding: 6px 9px; font-size: 11px; }
.intake-v2-workspace .choice-custom { grid-template-columns: 110px minmax(0,1fr); align-items: center; }
.intake-v2-workspace .choice-custom input, .intake-v2-workspace .choice-custom textarea { min-height: 40px; padding: 8px 11px; }
.intake-v2-workspace .intake-optional-field { display: grid; width: 100%; grid-template-columns: 32px minmax(0,1fr); align-items: start; gap: 9px; }
.intake-v2-workspace .intake-optional-field:not(.is-expanded) { width: 32px; grid-template-columns: 32px; }
.intake-v2-workspace .intake-optional-toggle { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid #c7d1cf; border-radius: 50%; background: #fff; padding: 0; color: var(--accent); cursor: pointer; box-shadow: 0 2px 7px rgba(31,50,56,.07); transition: border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease; }
.intake-v2-workspace .intake-optional-toggle:hover { border-color: #91a5a6; background: var(--accent-soft); box-shadow: 0 4px 10px rgba(31,50,56,.10); }
.intake-v2-workspace .intake-optional-toggle:focus-visible { outline: 0; box-shadow: 0 0 0 3px rgba(49,85,99,.13); }
.intake-v2-workspace .intake-optional-toggle span { font-size: 22px; font-weight: 300; line-height: 1; transition: transform .18s ease; }
.intake-v2-workspace .intake-optional-toggle[aria-expanded="true"] { border-color: #aebdbd; background: #f2f6f5; color: var(--muted); }
.intake-v2-workspace .intake-optional-toggle[aria-expanded="true"] span { transform: rotate(45deg); }
.intake-v2-workspace .intake-optional-content { min-width: 0; animation: intake-optional-reveal 170ms cubic-bezier(.2,.8,.2,1); }
.intake-v2-workspace .intake-optional-content[hidden] { display: none; }
.intake-v2-workspace .intake-optional-content input, .intake-v2-workspace .intake-optional-content textarea { width: 100%; min-height: 40px; padding: 8px 11px; }
.intake-v2-workspace .intake-optional-content textarea { min-height: 74px; resize: vertical; }
.intake-v2-workspace .selection-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-left: 3px solid #b68a2e; border-radius: 8px; background: #fbf7ec; padding: 11px 13px; }
.intake-v2-workspace .selection-summary strong { display: block; margin-bottom: 3px; }
.intake-v2-workspace .selection-summary span { color: #76664a; font-size: 12px; }
.intake-v2-workspace .selection-summary select { display: inline-block; width: auto; min-width: 220px; border: 0; background: transparent; padding: 2px 20px 2px 3px; color: #76664a; box-shadow: none; font-size: 12px; }
.intake-v2-workspace details { border: 1px solid var(--line); border-radius: 10px; background: #fbfcfc; padding: 12px 13px; }
.intake-v2-workspace summary { cursor: pointer; font-weight: 700; }
.intake-v2-workspace .details-content { display: grid; gap: 12px; padding-top: 14px; }
.intake-v2-workspace .intake-detail-grid { grid-template-columns: 1fr; }
.intake-v2-workspace .detail-field-group { display: grid; gap: 8px; }
.intake-v2-workspace .detail-field-group > strong { font-size: 13px; }
.intake-v2-workspace .detail-field-group textarea { min-height: 74px; }
.intake-v2-workspace .switch-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; cursor: pointer; }
.intake-v2-workspace .switch-copy strong, .intake-v2-workspace .switch-copy span { display: block; }
.intake-v2-workspace .switch-copy span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.intake-v2-workspace .switch-input { width: 40px; height: 23px; flex: 0 0 auto; appearance: none; border: 0; border-radius: 999px; background: #cbd2d1; padding: 3px; cursor: pointer; }
.intake-v2-workspace .switch-input::before { display: block; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.15); content: ""; transition: transform .18s ease; }
.intake-v2-workspace .switch-input:checked { background: var(--accent); }
.intake-v2-workspace .switch-input:checked::before { transform: translateX(17px); }
.intake-v2-workspace .knowledge-scope-inline { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.intake-v2-workspace .knowledge-scope-inline label { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 8px; cursor: pointer; }
.intake-v2-workspace .knowledge-scope-inline input { width: auto; margin-top: 3px; }
.intake-v2-workspace .knowledge-scope-inline strong, .intake-v2-workspace .knowledge-scope-inline small { display: block; }
.intake-v2-workspace .knowledge-scope-inline small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.intake-v2-workspace .panel-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; }
.intake-v2-workspace .panel-actions small { color: var(--muted); }
.intake-v2-workspace .button-row { display: flex; gap: 9px; }
.intake-v2-workspace .btn { border: 1px solid #c6d0cf; border-radius: 9px; background: #fff; padding: 10px 15px; cursor: pointer; font-weight: 700; }
.intake-v2-workspace .btn.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.intake-v2-workspace .confirm-bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); background: #fafbfb; padding: 18px 22px; }
.intake-v2-workspace .confirm-copy strong, .intake-v2-workspace .confirm-copy span { display: block; }
.intake-v2-workspace .confirm-copy span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.intake-v2-workspace .confirm-button { border: 0; border-radius: 9px; background: var(--good); padding: 11px 17px; color: #fff; cursor: pointer; font-weight: 740; }
.intake-v2-workspace .confirm-button:disabled { background: #e1e5e4; color: #8b9799; cursor: not-allowed; }
.intake-v2-workspace .intake-settings-dialog { width: min(560px,calc(100vw - 32px)); border: 1px solid var(--line); border-radius: 15px; background: #fff; padding: 0; box-shadow: 0 28px 80px rgba(18,28,32,.22); }
.intake-v2-workspace .intake-settings-dialog::backdrop { background: rgba(22,31,35,.34); backdrop-filter: blur(2px); }
.intake-v2-workspace .dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); padding: 18px 20px; }
.intake-v2-workspace .dialog-head h3 { margin: 0; font-size: 17px; }
.intake-v2-workspace .dialog-close { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; background: #fff; cursor: pointer; }
.intake-v2-workspace .dialog-body { display: grid; gap: 14px; padding: 20px; }
.intake-v2-workspace .dialog-actions { display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); background: #fafbfb; padding: 15px 20px; }
@container intake-v2 (max-width: 760px) {
  .intake-v2-workspace .intake-stage { padding: 30px 18px 25px; }
  .intake-v2-workspace .split { grid-template-columns: 1fr; }
  .intake-v2-workspace .project-strip, .intake-v2-workspace .panel-actions { align-items: flex-start; flex-direction: column; }
  .intake-v2-workspace .button-row { width: 100%; }
  .intake-v2-workspace .button-row .btn { flex: 1; }
  .intake-v2-workspace .launcher-line { gap: 12px; }
  .intake-v2-workspace .step-nav, .intake-v2-workspace .step-labels { width: 215px; }
  .intake-v2-workspace .collapsed-summary { grid-template-columns: 1fr; }
  .intake-v2-workspace .choice-custom { grid-template-columns: 1fr; }
  .intake-v2-workspace .knowledge-scope-inline { grid-template-columns: 1fr; }
  .intake-v2-workspace .intake-map-toolbar { align-items: flex-start; flex-direction: column; }
  .intake-v2-workspace .intake-location-map { height: 280px; }
}
@media (max-width: 760px) {
  body:has(.intake-v2-workspace) .workspace-panel { padding: 24px 14px 46px; }
  .intake-page-heading { align-items: flex-start; }
  .intake-v2-workspace .confirm-bar { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .intake-v2-workspace .step-panel, .intake-v2-workspace .intake-settings-dialog[open], .intake-v2-workspace .intake-optional-content { animation: none !important; }
  .intake-v2-workspace .plus-button span, .intake-v2-workspace .step-dot, .intake-v2-workspace .summary-card, .intake-v2-workspace .intake-optional-toggle span { transition-duration: .01ms !important; }
}
@keyframes intake-map-reveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes intake-optional-reveal { from { opacity: 0; transform: translateX(-4px); } to { opacity: 1; transform: translateX(0); } }
.permission-row { display: flex; gap: 22px; }
.permission-row label { display: flex; align-items: center; gap: 8px; }
.permission-row input { width: auto; }
.advanced-block { border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.advanced-block summary { cursor: pointer; font-weight: 680; }
.helper { color: var(--muted); font-size: 12px; line-height: 1.55; }
.research-config { display: grid; gap: 16px; border-top: 1px solid var(--line); padding-top: 20px; }
.research-config .section-heading h3, .research-run-panel h3 { margin: 0; }
.research-config .section-heading p, .research-run-panel p { margin: 5px 0 0; }
.context-preview { border-left: 3px solid #aebbc1; background: #f6f8f9; padding: 12px 14px; }
.context-preview p { margin: 7px 0 10px; }
.context-preview summary, .prompt-editor summary { cursor: pointer; color: var(--accent); font-size: 13px; }
.context-preview pre { margin: 10px 0 0; white-space: pre-wrap; color: var(--muted); font-family: inherit; font-size: 12px; line-height: 1.6; }
.provider-block { border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.provider-block > summary { display: flex; align-items: baseline; gap: 10px; cursor: pointer; }
.provider-block > summary small { color: var(--muted); font-weight: 400; }
.provider-block[open] > summary { margin-bottom: 16px; }
.capability-selector { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 14px 0; }
.capability-selector label { display: grid; grid-template-columns: auto 1fr; gap: 9px; border: 1px solid var(--line); border-radius: 8px; padding: 11px; cursor: pointer; }
.capability-selector input { width: auto; margin-top: 3px; }
.capability-selector strong, .capability-selector small { display: block; }
.capability-selector small { margin-top: 3px; color: var(--muted); line-height: 1.45; }
.compact-grid { align-items: end; }
.prompt-editor { margin-top: 14px; }
.prompt-editor textarea { margin-top: 10px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.prompt-matrix { display: grid; gap: 12px; border-top: 1px solid var(--line); padding-top: 16px; }
.prompt-matrix h4 { margin: 0; font-size: 16px; }
.prompt-matrix-row { display: grid; gap: 11px; border: 1px solid var(--line); border-radius: 8px; padding: 13px; }
.prompt-editor-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.prompt-editor-actions small { color: var(--muted); }
.workflow-prompt-map { scroll-margin-top: 76px; }
.workflow-prompt-flow { display: flex; align-items: stretch; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-gutter: stable; }
.workflow-prompt-node { flex: 1 1 0; min-width: 145px; min-height: 142px; display: grid; grid-template-rows: auto auto 1fr auto; gap: 7px; text-align: left; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); padding: 13px; font: inherit; cursor: pointer; }
.workflow-prompt-node:hover { border-color: #8b9892; background: #f8faf9; }
.workflow-prompt-node.configurable { border-top: 3px solid var(--ink); padding-top: 11px; }
.workflow-node-index { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.workflow-prompt-node strong { font-size: 14px; line-height: 1.35; }
.workflow-prompt-node small { color: var(--muted); line-height: 1.45; }
.workflow-prompt-node em { justify-self: start; border-radius: 999px; background: #eef2f0; color: #4e5c56; padding: 3px 8px; font-size: 11px; font-style: normal; }
.workflow-prompt-node.configurable em { background: var(--ink); color: #fff; }
.workflow-flow-arrow { flex: 0 0 auto; align-self: center; color: var(--muted); font-size: 18px; }
.workflow-optional-rail { display: flex; gap: 12px; margin: 8px 0 0; border-top: 1px dashed var(--line); padding-top: 12px; color: var(--muted); font-size: 13px; }
.workflow-optional-rail strong { flex: 0 0 auto; color: var(--text); }
.workflow-config-card, .workflow-contract-card { scroll-margin-top: 74px; transition: border-color .18s ease, box-shadow .18s ease; }
.workflow-modal-close { display: none; }
.workflow-modal-backdrop[hidden] { display: none; }
.workflow-modal-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(16, 24, 21, .46); }
.workflow-dialogs-ready [data-workflow-modal-target],
.workflow-dialogs-ready .workflow-config-meta { display: none; }
.workflow-dialogs-ready [data-workflow-modal-target].workflow-modal-active { position: fixed; top: 6vh; left: 50%; z-index: 41; display: block; width: min(1120px, calc(100vw - 48px)); max-height: 88vh; margin: 0; overflow: auto; transform: translateX(-50%); border-color: #96a29d; box-shadow: 0 22px 64px rgba(15, 23, 20, .24); }
.workflow-modal-active .workflow-modal-close { position: sticky; top: 0; z-index: 3; float: right; display: grid; width: 34px; height: 34px; place-items: center; margin: -6px -4px 4px 14px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--text); font: inherit; font-size: 22px; line-height: 1; cursor: pointer; box-shadow: 0 3px 10px rgba(18, 28, 24, .08); }
.workflow-modal-active .workflow-modal-close:hover { background: #f1f4f2; }
.workflow-modal-active > .workflow-route-settings > .button { margin-right: 42px; }
body.workflow-modal-open { overflow: hidden; }
.workflow-system-prompt { margin: 12px 0; }
.workflow-system-prompt textarea { min-height: 320px; }
.workflow-route-settings { display: grid; gap: 10px; margin: 16px 0; border: 1px solid var(--line); border-radius: 8px; background: #f8faf9; padding: 14px; }
.workflow-route-settings > .section-heading { margin-bottom: 0; }
.workflow-route-settings > .button { justify-self: end; }
.workflow-route-row { display: grid; grid-template-columns: minmax(160px, .8fr) minmax(180px, .8fr) minmax(240px, 1.25fr) auto; align-items: end; gap: 10px; min-width: 0; border-top: 1px solid var(--line); padding-top: 10px; }
.workflow-route-pricing-source { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: -1px 0 4px; border-bottom: 1px solid var(--line); padding: 0 0 10px; }
.workflow-route-pricing-values { color: var(--ink); font-size: 12px; font-weight: 650; }
.workflow-route-pricing-warning { flex-basis: 100%; color: var(--warning-text, #8a5a00); }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; clip-path: inset(50%) !important; }
.model-pricing-catalog { overflow: hidden; padding: 0; }
.model-pricing-summary { display: flex; align-items: center; justify-content: space-between; gap: 22px; min-height: 112px; padding: 20px; cursor: pointer; list-style: none; }
.model-pricing-summary::-webkit-details-marker { display: none; }
.model-pricing-summary:focus { outline: 0; }
.model-pricing-summary:focus-visible { box-shadow: inset 0 0 0 2px rgba(42, 91, 76, .22); }
.model-pricing-summary:hover { background: #fafcfb; }
.model-pricing-summary-copy { display: grid; min-width: 0; gap: 4px; }
.model-pricing-summary-copy h2, .model-pricing-summary-copy p { margin: 0; }
.model-pricing-summary-copy h2 { font-size: 20px; }
.model-pricing-summary-copy p { color: var(--muted); font-size: 12px; line-height: 1.55; }
.model-pricing-kicker { color: var(--accent-strong); font-size: 10px; font-weight: 760; letter-spacing: .12em; }
.model-pricing-summary-meta { display: flex; flex: 0 0 auto; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.model-pricing-summary-meta span { border: 1px solid var(--line); border-radius: 999px; background: #fff; padding: 5px 9px; }
.model-pricing-multiplier { display: flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 999px; background: #fff; padding: 3px 4px 3px 9px; cursor: default; }
.model-pricing-multiplier > span { border: 0; padding: 0; background: transparent; white-space: nowrap; }
.model-pricing-multiplier select { min-height: 26px; border: 0; border-radius: 999px; background: #f2f5f3; padding: 3px 24px 3px 8px; color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.model-pricing-multiplier select:focus-visible { outline: 2px solid rgba(42, 91, 76, .22); outline-offset: 1px; }
.model-pricing-summary-meta i { display: block; width: 8px; height: 8px; margin-left: 4px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .18s ease; }
.model-pricing-catalog[open] .model-pricing-summary-meta i { transform: rotate(225deg) translate(-1px,-1px); }
.model-pricing-body { display: grid; gap: 12px; border-top: 1px solid var(--line); padding: 16px 20px 20px; }
.model-pricing-toolbar { display: grid; grid-template-columns: minmax(240px, 1fr) auto minmax(280px, 1.2fr); align-items: center; gap: 10px 14px; }
.model-pricing-toolbar p { margin: 0; text-align: right; }
.model-pricing-search input { min-height: 38px; border-radius: 7px; background: #fbfcfb; }
.model-pricing-columns, .model-pricing-main { display: grid; grid-template-columns: minmax(118px,.72fr) minmax(210px,1.45fr) minmax(112px,.66fr) minmax(112px,.66fr) 74px 58px; align-items: center; gap: 8px; }
.model-pricing-columns { padding: 0 10px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.model-pricing-list { display: grid; gap: 7px; }
.model-pricing-item { min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 9px 10px; transition: border-color .15s ease, background .15s ease; }
.model-pricing-item:hover { border-color: #b7c1bc; background: #fdfefd; }
.model-pricing-main .field { min-width: 0; gap: 0; }
.model-pricing-main input, .model-pricing-main select { min-height: 36px; padding: 7px 9px; font-size: 12px; }
.model-pricing-enabled { justify-self: start; margin: 0; white-space: nowrap; font-size: 12px; }
.model-pricing-remove { justify-self: end; }
.model-pricing-source { margin-top: 5px; }
.model-pricing-source summary { display: flex; align-items: center; gap: 8px; width: max-content; color: var(--muted); cursor: pointer; font-size: 11px; }
.model-pricing-source summary span { color: #8a9690; }
.model-pricing-source .form-grid { margin-top: 9px; border-top: 1px dashed var(--line); padding-top: 10px; }
.model-pricing-empty { border: 1px dashed var(--line); border-radius: 8px; padding: 28px 16px; color: var(--muted); text-align: center; font-size: 12px; }
.model-pricing-actions { margin-top: 2px; }
@media (min-width: 901px) {
  .model-pricing-main .field > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); }
}
.workflow-route-name { align-self: center; min-width: 0; }
.workflow-route-name strong, .workflow-route-name small { display: block; overflow-wrap: anywhere; }
.workflow-route-name small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.workflow-route-fetch { align-self: end; }
.workflow-route-prompt { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.workflow-route-prompt textarea { min-height: 280px; line-height: 1.65; resize: vertical; }
.workflow-route-prompt-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px 18px; flex-wrap: wrap; }
.workflow-route-prompt-meta > :last-child { white-space: nowrap; }
.header-prompt-manager { gap: 16px; }
.header-prompt-selection { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; border: 1px solid var(--line); border-radius: 9px; background: #f7f9f8; padding: 13px; }
.header-prompt-selection [hidden] { display: none; }
.header-prompt-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.header-prompt-heading > div { display: grid; gap: 3px; min-width: 0; }
.header-prompt-heading small { color: var(--muted); font-size: 11px; }
.header-prompt-list { display: grid; gap: 12px; }
.header-prompt-item { display: grid; gap: 11px; min-width: 0; border: 1px solid var(--line); border-radius: 9px; background: #fff; padding: 14px; }
.header-prompt-item-heading { display: grid; grid-template-columns: minmax(170px,.75fr) minmax(220px,1fr) auto auto; align-items: end; gap: 10px; }
.selection-prompt-manager .header-prompt-item-heading { grid-template-columns: minmax(170px,.8fr) minmax(130px,.55fr) 86px auto auto; }
.header-prompt-enabled { align-self: center; margin-bottom: 8px; }
.header-prompt-tag-preview { display: flex; min-height: 22px; flex-wrap: wrap; gap: 5px; }
.header-prompt-tag-preview:empty::before { color: var(--muted); content: "暂无标签"; font-size: 11px; }
.header-prompt-tag-preview span { display: inline-flex; align-items: center; min-height: 21px; border: 1px solid #c8d7d3; border-radius: 999px; background: #eef5f3; padding: 1px 7px; color: var(--accent-strong); font-size: 10px; font-weight: 680; }
.header-prompt-item textarea { min-height: 220px; }
.workflow-contract-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.workflow-contract-grid span { display: grid; gap: 4px; border: 1px solid var(--line); border-radius: 7px; padding: 12px; color: var(--muted); font-size: 13px; }
.workflow-contract-grid strong { color: var(--text); }
.workflow-contract-grid + .notice { margin-top: 12px; }
.prompt-name strong, .prompt-name small { display: block; }
.prompt-name small { margin-top: 3px; color: var(--muted); }
.prompt-combinations { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; }
.prompt-combinations label { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 7px; padding: 8px 9px; font-size: 12px; }
.prompt-combinations input { width: auto; }
.lead-job-select { max-width: 620px; }
.provider-actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.provider-actions .notice { margin: 0; }
.auth-shell { min-height: calc(100vh - 58px); display: grid; place-items: start center; padding: 72px 20px; }
.auth-panel { width: min(100%, 430px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 28px; }
.auth-panel h1 { margin: 4px 0 8px; font-size: 27px; }
.auth-panel > .helper { margin: 0 0 24px; }
.auth-panel .button { width: 100%; }
.auth-back { margin: 20px 0 0; text-align: center; }
.settings-shell { max-width: 1120px; margin: 0 auto; padding: 38px 28px 80px; }
.settings-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.settings-heading h1 { margin: 4px 0 8px; font-size: 32px; }
.settings-heading p { margin: 0; color: var(--muted); }
.settings-tabs { position: sticky; top: 10px; z-index: 12; display: flex; gap: 6px; margin: 20px 0 14px; overflow-x: auto; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.96); padding: 6px; box-shadow: 0 5px 16px rgba(26,35,32,.06); }
.settings-tabs button { flex: 0 0 auto; border: 0; border-radius: 6px; background: transparent; color: var(--muted); padding: 9px 13px; font: inherit; font-size: 13px; cursor: pointer; }
.settings-tabs button:hover { background: #f1f4f2; color: var(--text); }
.settings-tabs button.is-active { background: var(--ink); color: #fff; }
.settings-tabs-ready [data-settings-panel][hidden] { display: none !important; }
.settings-panel-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin: 22px 0 14px; border-bottom: 1px solid var(--line); padding: 8px 2px 18px; scroll-margin-top: 82px; }
.settings-panel-intro > div:first-child { min-width: 0; }
.settings-panel-intro .eyebrow { margin: 0 0 7px; }
.settings-panel-intro h2 { margin: 0; font-size: clamp(22px,2.4vw,29px); letter-spacing: -.025em; }
.settings-panel-intro p:not(.eyebrow) { max-width: 700px; margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.settings-panel-intro-meta { display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.settings-panel-intro-meta span { display: inline-flex; align-items: baseline; gap: 4px; border: 1px solid var(--line); border-radius: 999px; background: #fff; padding: 6px 10px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.settings-panel-intro-meta strong { color: var(--text); font-size: 13px; }
.settings-panel-intro-meta .has-error, .settings-panel-intro-meta .has-error strong { color: var(--warn); }
@media (max-width: 900px) {
  .workflow-route-row { grid-template-columns: 1fr 1fr; }
  .model-pricing-columns { display: none; }
  .model-pricing-main { grid-template-columns: 1fr 1.35fr 1fr 1fr; align-items: end; }
  .model-pricing-enabled, .model-pricing-remove { justify-self: start; }
  .model-pricing-toolbar { grid-template-columns: 1fr auto; }
  .model-pricing-toolbar p { grid-column: 1 / -1; text-align: left; }
  .header-prompt-selection { grid-template-columns: 1fr 1fr; }
  .header-prompt-item-heading { grid-template-columns: 1fr 1fr; }
  .selection-prompt-manager .header-prompt-item-heading { grid-template-columns: 1fr 1fr; }
  .workflow-route-name { grid-column: 1 / -1; }
  .workflow-route-fetch { justify-self: start; }
  .workflow-contract-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workflow-optional-rail { display: grid; }
}

@media (max-width: 600px) {
  .workflow-route-row { grid-template-columns: 1fr; }
  .model-pricing-summary { align-items: flex-start; flex-direction: column; min-height: 0; }
  .model-pricing-summary-meta { flex-wrap: wrap; }
  .model-pricing-body { padding: 14px; }
  .model-pricing-toolbar, .model-pricing-main { grid-template-columns: 1fr; }
  .model-pricing-toolbar [data-model-pricing-filter-status], .model-pricing-toolbar p { grid-column: auto; }
  .model-pricing-toolbar p { text-align: left; }
  .model-pricing-main .field { gap: 6px; }
  .model-pricing-remove { justify-self: stretch; }
  .header-prompt-selection, .header-prompt-item-heading { grid-template-columns: 1fr; }
  .selection-prompt-manager .header-prompt-item-heading { grid-template-columns: 1fr; }
  .header-prompt-heading { align-items: stretch; flex-direction: column; }
  .header-prompt-heading .button { align-self: flex-start; }
  .header-prompt-enabled { margin-bottom: 0; }
  .workflow-route-name { grid-column: auto; }
  .workflow-route-settings > .button { justify-self: stretch; }
  .workflow-prompt-flow { display: grid; overflow: visible; }
  .workflow-prompt-node { min-width: 0; min-height: 0; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; align-items: center; }
  .workflow-node-index { grid-row: 1 / 3; }
  .workflow-prompt-node small { grid-column: 2 / 4; }
  .workflow-prompt-node em { grid-column: 3; grid-row: 1; }
  .workflow-flow-arrow { transform: rotate(90deg); justify-self: center; }
  .workflow-contract-grid { grid-template-columns: 1fr; }
  .prompt-editor-actions { align-items: stretch; flex-direction: column; }
  .workflow-dialogs-ready [data-workflow-modal-target].workflow-modal-active { top: 10px; width: calc(100vw - 20px); max-height: calc(100vh - 20px); padding: 16px; }
  .image-provider-heading, .image-provider-item .provider-actions { align-items: stretch; flex-direction: column; }
  .image-provider-badges { justify-content: flex-start; }
}
.settings-form { max-width: none; }
.settings-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: 12px; }
.settings-provider { background: var(--panel); padding: 20px; }
.settings-section { margin: 22px 0; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 20px; }
.settings-panel-intro + .settings-section { margin-top: 14px; }
.settings-section-compact { padding: 16px 18px; }
.settings-section-compact > .section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
.settings-section-compact > .section-heading h2 { flex: 0 0 auto; font-size: 17px; }
.settings-section-compact > .section-heading p { margin: 0; text-align: right; }
.settings-section > .section-heading { margin-bottom: 16px; }
.proxy-security-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.proxy-security-grid > div { min-width: 0; border: 1px solid var(--line); border-radius: 7px; background: #f7f8f7; padding: 12px; }
.proxy-security-grid span, .proxy-security-grid strong { display: block; overflow-wrap: anywhere; }
.proxy-security-grid span { color: var(--muted); font-size: 11px; }
.proxy-security-grid strong { margin-top: 5px; font-size: 13px; line-height: 1.45; }
.request-busy { display: none; }
.htmx-request .request-idle { display: none; }
.htmx-request .request-busy { display: inline; }
.proxy-security-note { margin: 12px 0 0; }
.access-policy-form { display: grid; grid-template-columns: repeat(12,minmax(0,1fr)); gap: 12px; align-items: end; }
.access-policy-form > .access-toggle { grid-column: span 5; }
.quota-default-guidance { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 8px 12px; align-items: baseline; }
.quota-default-guidance strong { white-space: nowrap; }
.account-quota-fields, .user-create-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; min-width: 0; }
.access-policy-form > .account-quota-fields { grid-column: 1 / -1; }
.access-policy-form > .anonymous-usage-summary { grid-column: 1 / -1; }
.access-policy-form > .button { grid-column: 10 / -1; justify-self: end; }
.access-toggle { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; cursor: pointer; }
.access-toggle input { width: auto; margin-top: 3px; }
.access-toggle strong, .access-toggle small, .anonymous-usage-summary strong, .anonymous-usage-summary small { display: block; }
.access-toggle small, .anonymous-usage-summary small { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.anonymous-usage-summary { align-self: stretch; display: flex; flex-direction: column; justify-content: center; min-width: 0; border-left: 2px solid var(--line); padding-left: 12px; }
.anonymous-usage-summary small + small { margin-top: 2px; }
.quota-exhausted { color: var(--warn) !important; font-weight: 680; }
.access-policy-form > .usage-reset-options { grid-column: 1 / 10; min-height: 34px; }
.runtime-overview-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.runtime-overview-heading > div { min-width: 0; }
.runtime-summary-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.runtime-summary-grid > div { display: grid; gap: 3px; min-width: 0; border: 1px solid var(--line); border-radius: 7px; background: #f7f8f7; padding: 12px; }
.runtime-summary-grid span, .runtime-account-metrics span, .runtime-project-links > span { color: var(--muted); font-size: 12px; }
.runtime-summary-grid strong { font-size: 23px; line-height: 1.2; }
.runtime-summary-grid small, .runtime-account-metrics small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.runtime-summary-grid .has-error strong, .runtime-account-metrics em { color: var(--warn); font-style: normal; }
.runtime-scope-note { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.settings-disclosure { margin-top: 14px; border-top: 1px solid var(--line); }
.settings-disclosure > summary, .provider-advanced-settings > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 50px; padding: 12px 2px 0; cursor: pointer; list-style: none; }
.settings-disclosure > summary::-webkit-details-marker, .provider-advanced-settings > summary::-webkit-details-marker, .image-provider-item > summary::-webkit-details-marker { display: none; }
.settings-disclosure > summary > span, .provider-advanced-settings > summary > span { display: grid; gap: 3px; }
.settings-disclosure > summary small, .provider-advanced-settings > summary small { color: var(--muted); font-size: 11px; font-weight: 400; }
.settings-disclosure > summary em { color: var(--muted); font-size: 11px; font-style: normal; }
.runtime-account-list { display: grid; max-height: min(560px,60vh); gap: 10px; margin-top: 12px; overflow-y: auto; padding-right: 5px; }
.runtime-account-row { display: grid; gap: 12px; border-top: 1px solid var(--line); padding-top: 14px; }
.runtime-account-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.runtime-account-name { display: flex; align-items: center; gap: 9px; min-width: 0; }
.runtime-account-name > div { display: grid; gap: 2px; min-width: 0; }
.runtime-account-name small, .runtime-last-activity { color: var(--muted); font-size: 11px; }
.runtime-status-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #aeb8b3; }
.runtime-status-dot.is-active { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.runtime-status-dot.has-error { background: var(--warn); }
.runtime-account-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.runtime-account-metrics > div { display: grid; gap: 2px; min-width: 0; border-left: 2px solid var(--line); padding-left: 9px; }
.runtime-account-metrics strong { font-size: 14px; }
.runtime-project-links { display: grid; grid-template-columns: 74px minmax(0,1fr); gap: 10px; align-items: start; }
.runtime-project-links > div { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.runtime-project-links a { display: grid; gap: 3px; min-width: 0; border: 1px solid var(--line); border-radius: 6px; padding: 8px 9px; color: inherit; text-decoration: none; }
.runtime-project-links a:hover { border-color: #aebbb5; background: #f7f9f8; }
.runtime-project-links a strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.runtime-project-links a small, .runtime-empty { color: var(--muted); font-size: 11px; line-height: 1.4; }
.runtime-project-status.active { color: var(--accent); font-weight: 680; }
.runtime-project-status.failed { color: var(--warn); font-weight: 680; }
.user-create-form { display: grid; gap: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfa; padding: 14px; }
.user-create-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 11px; }
.user-create-actions small { color: var(--muted); font-size: 11px; }
.user-admin-list { display: grid; gap: 10px; margin-top: 18px; }
.user-admin-row { display: grid; grid-template-columns: minmax(280px,1.35fr) repeat(2,minmax(180px,1fr)); gap: 12px; align-items: end; padding: 14px; background: #fbfcfb; border: 1px solid var(--line); border-radius: 8px; }
.user-admin-row > .account-quota-fields { grid-column: 1 / -1; }
.user-identity { align-self: center; display: grid; gap: 4px; }
.user-identity small { color: var(--muted); line-height: 1.45; }
.compact-check { align-self: center; white-space: nowrap; font-size: 12px; }
.compact-check input { width: auto; margin: 0; }
.user-admin-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px 16px; padding-top: 11px; border-top: 1px solid var(--line); }
.deleted-user-panel { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.deleted-user-panel > summary { cursor: pointer; color: var(--accent); font-size: 13px; font-weight: 680; }
.deleted-user-panel > .helper { margin: 9px 0 12px; }
.deleted-user-list { display: grid; gap: 8px; }
.deleted-user-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid #e3d4d4; border-radius: 7px; background: #fffafa; padding: 11px 12px; }
.deleted-user-row form { flex: 0 0 auto; margin: 0; }
.usage-reset-options { align-self: center; display: flex; flex-wrap: wrap; gap: 8px 14px; }
.quota-note { width: fit-content; padding: 7px 10px; border-radius: 5px; background: #eef3f1; color: #40564e; font-size: 12px; }
.settings-provider .section-heading { margin-bottom: 18px; }
.settings-provider .section-heading h2 { margin: 0; font-size: 20px; }
.provider-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.provider-card-heading > div { min-width: 0; }
.provider-card-heading .eyebrow { margin: 0 0 6px; font-size: 10px; }
.provider-card-heading .helper { margin-top: 6px; }
.provider-card-heading > .status-pill { flex: 0 0 auto; margin-top: 2px; }
.image-provider-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.image-provider-heading > div:first-child { min-width: 0; }
.image-provider-badges { display: flex; flex: 0 1 auto; flex-wrap: wrap; justify-content: flex-end; gap: 6px; min-height: 24px; }
.image-provider-badges .status-pill { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: help; }
.image-provider-list { display: grid; gap: 12px; margin-top: 14px; }
.image-provider-item { border: 1px solid var(--line); border-radius: 9px; background: #fafbfa; overflow: hidden; }
.image-provider-item-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 58px; padding: 12px 14px; cursor: pointer; list-style: none; }
.image-provider-item-heading > div { display: grid; gap: 3px; min-width: 0; }
.image-provider-item-heading strong { overflow-wrap: anywhere; }
.image-provider-item-heading small { color: var(--muted); font-size: 11px; }
.image-provider-item-body { display: grid; gap: 14px; border-top: 1px solid var(--line); background: #fff; padding: 15px; }
.provider-summary-state { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 10px; font-size: 11px; }
.provider-summary-state i, .provider-advanced-settings > summary i { display: block; width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .18s ease; }
.image-provider-item[open] .provider-summary-state i, .provider-advanced-settings[open] > summary i { transform: rotate(225deg) translate(-1px,-1px); }
.image-provider-item .provider-actions { justify-content: space-between; border-top: 1px solid var(--line); padding-top: 12px; }
.image-provider-item .provider-actions > div { min-width: 0; }
.image-provider-settings .provider-save-bar { flex-wrap: wrap; }
.key-state { font-style: normal; font-weight: 680; }
.key-state.available { color: var(--good); }
.key-state.missing { color: var(--warn); }
.provider-advanced-settings { margin-top: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfa; overflow: hidden; }
.provider-advanced-settings > summary { min-height: 54px; padding: 11px 14px; }
.provider-advanced-body { display: grid; gap: 14px; border-top: 1px solid var(--line); background: #fff; padding: 15px; }
.provider-advanced-body > .capability-selector, .provider-advanced-body > .compact-grid { margin: 0; }
.reviewer-provider-settings > .pdf-preserve-toggle { margin-bottom: 16px; background: #f8faf9; }
.reviewer-provider-settings > .provider-actions { min-height: 38px; border-top: 1px solid var(--line); padding-top: 14px; }
.pdf-settings-form { gap: 16px; }
.pdf-parser-selector { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.pdf-parser-selector label, .pdf-preserve-toggle { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 9px; border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; cursor: pointer; }
.pdf-parser-selector input, .pdf-preserve-toggle input { width: auto; margin-top: 3px; }
.pdf-parser-selector strong, .pdf-parser-selector small, .pdf-preserve-toggle strong, .pdf-preserve-toggle small { display: block; }
.pdf-parser-selector small, .pdf-preserve-toggle small { margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.pdf-runtime-summary { display: grid; grid-template-columns: 150px minmax(240px,1fr) minmax(260px,1fr); gap: 10px; border: 1px solid var(--line); border-radius: 8px; background: #f7f8f7; padding: 12px; }
.pdf-runtime-summary > div { display: grid; align-content: start; gap: 4px; min-width: 0; }
.pdf-runtime-summary small { color: var(--muted); line-height: 1.45; overflow-wrap: anywhere; }
.pdf-runtime-summary .runtime-ok { color: var(--good); font-weight: 680; }
.pdf-runtime-summary .runtime-error { color: var(--warn); font-weight: 680; }
.pdf-remote-settings > .helper { margin: 12px 0; }
.research-run-panel { display: grid; gap: 14px; max-width: 1080px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; padding: 16px; margin-top: 22px; }
.research-run-panel > .button { justify-self: start; }
.research-progress { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.research-progress li { display: grid; grid-template-columns: 25px minmax(0,1fr); align-items: start; gap: 8px; min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: #f8fafb; padding: 10px; }
.research-progress li > span { display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid #c5cdd1; border-radius: 50%; background: #fff; color: var(--muted); font-size: 11px; font-weight: 750; }
.research-progress li > div { display: grid; min-width: 0; gap: 3px; }
.research-progress strong { font-size: 12px; }
.research-progress small { color: var(--muted); font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }
.research-progress .is-complete { border-color: #b7d8c7; background: #f1f8f4; }
.research-progress .is-complete > span { border-color: #8fc1a7; background: #e2f2e9; color: var(--good); }
.research-progress .is-current { border-color: #9eb3bc; background: #f0f5f6; }
.research-progress .is-current > span { border-color: var(--accent); background: var(--accent); color: #fff; }
.research-progress .is-active > span { animation: research-stage-pulse 1.5s ease-in-out infinite; }
@keyframes research-stage-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(49,90,105,.22); } 50% { box-shadow: 0 0 0 7px rgba(49,90,105,0); } }
.research-output-list { display: grid; gap: 7px; }
.research-output-list article { display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 10px 12px; }
.research-output-list article > div { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 3px 8px; min-width: 0; }
.research-output-list article strong { min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.research-output-list article small { grid-column: 2; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.stage-confirm-bar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 18px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; background: #f7f9f8; padding: 14px 16px; }
.stage-confirm-bar p { margin: 5px 0 0; }
.source-confirm-panel { margin: 20px 0; border: 1px solid var(--line); border-radius: 8px; padding: 16px; background: var(--panel); }
.source-confirm-summary { display: flex; align-items: center; gap: 10px; margin: 10px 0 14px; color: var(--muted); font-size: 13px; }
.source-confirm-list { display: grid; gap: 8px; }
.source-confirm-row { display: grid; grid-template-columns: minmax(220px,1.5fr) 160px auto auto; align-items: end; gap: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.source-confirm-row > div { align-self: center; display: grid; gap: 3px; }
.source-confirm-identity { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px !important; }
.source-confirm-identity > div { min-width: 0; display: grid; gap: 3px; }
.source-confirm-identity strong, .source-confirm-identity small { overflow-wrap: anywhere; }
.source-confirm-row small { color: var(--muted); }
.content-generate-panel { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 8px; background: #f7f9f8; padding: 16px; }
.content-generate-panel p { max-width: 780px; margin: 6px 0 0; }
.content-outline-panel { display: grid; gap: 16px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 9px; background: #fff; padding: 16px; }
.content-outline-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.content-outline-heading h3 { margin: 2px 0 0; font-size: 18px; }
.content-outline-heading .helper { max-width: 820px; margin: 7px 0 0; }
.content-outline-index { color: var(--muted); font-size: 11px; }
.content-outline-summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid var(--line); border-radius: 8px; background: #f8faf9; padding: 12px 14px; }
.content-outline-summary > div { display: grid; min-width: 0; gap: 4px; }
.content-outline-summary strong, .content-outline-summary small { overflow-wrap: anywhere; }
.content-outline-summary small { color: var(--muted); font-size: 11px; }
.ai-floating-dialog.content-outline-dialog { width: min(980px, calc(100vw - 32px)); max-height: calc(100vh - 92px); }
.content-outline-dialog-body { display: grid; max-height: calc(100vh - 148px); overflow: auto; gap: 14px; padding: 15px; }
.content-outline-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.content-outline-tabs button { display: grid; min-width: 0; gap: 3px; border: 1px solid var(--line); border-radius: 7px; background: #f7f9f9; padding: 9px 10px; color: var(--muted); cursor: pointer; text-align: left; }
.content-outline-tabs button:hover { border-color: #aebcc1; background: #fff; }
.content-outline-tabs button.is-active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, #fff); color: var(--accent-strong); }
.content-outline-tabs span { font-size: 10px; }
.content-outline-tabs strong { min-width: 0; overflow: hidden; color: inherit; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.content-outline-dialog-pane { display: grid; min-width: 0; gap: 12px; }
.content-outline-dialog-pane[hidden] { display: none; }
.content-outline-pane-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.content-outline-pane-heading > div { display: grid; min-width: 0; gap: 4px; }
.content-outline-pane-heading h4 { margin: 0; overflow-wrap: anywhere; font-size: 16px; }
.content-outline-pane-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.content-outline-map { position: relative; height: clamp(360px, 54vh, 620px); min-height: 300px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfc; contain: layout paint; }
.content-outline-map svg { display: block; width: 100%; height: 100%; }
.content-outline-map.is-direct-editing { border-color: color-mix(in srgb,var(--accent) 58%,var(--line)); box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--accent) 12%,transparent); }
.content-outline-map.is-direct-editing g.markmap-node.is-outline-editable { cursor: text; }
.content-outline-map.is-direct-editing g.markmap-node.is-outline-editable:hover .markmap-foreign > div > div { border-radius: 4px; background: color-mix(in srgb,var(--accent) 10%,#fff); }
.content-outline-map.is-direct-editing g.markmap-node.is-outline-editable:focus { outline: none; }
.content-outline-map.is-direct-editing g.markmap-node.is-outline-editable:focus .markmap-foreign > div > div { border-radius: 4px; background: color-mix(in srgb,var(--accent) 14%,#fff); box-shadow: 0 0 0 2px color-mix(in srgb,var(--accent) 32%,transparent); }
.content-outline-node-editor { position: absolute; z-index: 8; display: grid; gap: 10px; border: 1px solid color-mix(in srgb,var(--accent) 38%,var(--line)); border-radius: 8px; background: rgba(255,255,255,.98); padding: 11px; box-shadow: 0 14px 34px rgba(29,43,46,.18); }
.content-outline-node-editor label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; }
.content-outline-node-editor input { height: 38px; }
.content-outline-node-editor .inline-actions { justify-content: flex-end; }
.content-outline-map-placeholder { display: grid; height: 100%; place-items: center; color: var(--muted); font-size: 12px; }
.content-outline-map-error { margin: 0; border-bottom: 1px solid var(--line); background: #fff8ed; padding: 9px 11px; color: var(--warn); font-size: 12px; }
.content-outline-map pre { height: calc(100% - 38px); margin: 0; overflow: auto; padding: 14px; white-space: pre-wrap; }
.content-outline-pane-actions { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.content-outline-pane-actions > .inline-actions { flex-wrap: wrap; }
.content-outline-edit-status { flex: 1 1 100%; color: var(--muted); font-size: 10px; line-height: 1.5; }
.content-outline-edit-status.is-warning { color: #95611c; }
.content-outline-edit-status.is-good { color: var(--accent-strong); }
.content-outline-tabs button.has-unsaved::after { content: "未保存"; justify-self: start; border-radius: 999px; background: #fff0d9; padding: 1px 5px; color: #95611c; font-size: 9px; font-weight: 700; }
.content-outline-editor { min-width: 0; }
.content-outline-editor > summary { list-style: none; cursor: pointer; }
.content-outline-editor > summary::-webkit-details-marker { display: none; }
.content-outline-editor[open] { width: min(720px, calc(100vw - 80px)); max-width: 100%; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 12px; }
.content-outline-editor[open] > summary { margin-bottom: 9px; }
.content-outline-edit-form { display: grid; clear: both; gap: 13px; padding-top: 8px; }
.content-outline-edit-form label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.content-outline-edit-form textarea { resize: vertical; }
.content-outline-edit-form textarea[name="outline_markdown"] { min-height: 300px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; line-height: 1.55; }
.content-outline-dialog-note { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.content-outline-empty { border: 1px dashed var(--line); border-radius: 8px; padding: 18px; text-align: center; }
.content-outline-empty p { margin: 6px 0 0; }
.workflow-gate { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 0 0 18px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; background: #f7f9f8; padding: 14px 16px; }
.workflow-gate p { margin: 5px 0 3px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.workflow-gate small { color: var(--muted); }
.workflow-gate-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.workflow-gate-actions form { margin: 0; }
.preservation-gate-shell { margin: 0 0 18px; }
.preservation-gate.workflow-gate { display: block; margin: 0; padding: 0; }
.preservation-gate > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; padding: 12px 14px; list-style: none; }
.preservation-gate > summary::-webkit-details-marker { display: none; }
.preservation-gate > summary::before { content: "▾"; color: var(--muted); font-size: 11px; }
.preservation-gate:not([open]) > summary::before { content: "▸"; }
.preservation-gate > summary strong { flex: 1 1 auto; }
.preservation-gate-statuses { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.preservation-gate-body { border-top: 1px solid var(--line); padding: 0 14px 12px 30px; }
.preservation-gate-context { display: grid; grid-template-columns: minmax(0,.78fr) minmax(0,1.22fr); gap: 18px; padding: 14px 0; }
.preservation-gate-context > div > strong, .preservation-gate-rule > strong { display: block; margin-bottom: 4px; color: var(--ink); font-size: 12px; }
.preservation-gate-context p { margin: 0; font-size: 12px; line-height: 1.6; }
.preservation-gate-rule { border-left: 1px solid var(--line); padding-left: 18px; }
.preservation-generation-state { margin: 0 0 12px; border-left: 3px solid var(--accent); border-radius: 0 7px 7px 0; background: color-mix(in srgb,var(--accent) 6%,#fff); padding: 10px 12px; }
.preservation-generation-state.is-failed { border-left-color: var(--warn); background: #fff9ef; }
.preservation-generation-state > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.preservation-generation-state p { margin: 4px 0 0; font-size: 12px; }
.preservation-gate-checks { border-top: 1px solid var(--line); padding: 9px 0 2px; }
.preservation-gate-generation { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 10px; border-top: 1px solid var(--line); padding: 12px 0 2px; }
.preservation-gate-generation > div { display: grid; min-width: 0; gap: 3px; }
.preservation-gate-generation > div > strong { font-size: 12px; }
.preservation-gate-generation .helper { font-size: 11px; line-height: 1.5; }
.preservation-gate-generation .button { flex: 0 0 auto; }
.preservation-gate-hide { display: block; margin: 7px 0 0 auto; border: 0; background: transparent; padding: 3px 0; color: var(--muted); cursor: pointer; font: inherit; font-size: 11px; }
.preservation-gate-hide:hover { color: var(--ink); }
.preservation-gate-restore { margin-bottom: 0; }
.preservation-gate-restore[hidden] { display: none !important; }
.coverage-panel { margin-top: 26px; border-top: 1px solid var(--line); padding-top: 22px; }
.coverage-floating-dialog { width: min(1080px, calc(100vw - 32px)); height: min(720px, calc(100vh - 112px)); max-height: calc(100vh - 74px); display: flex; flex-direction: column; container-type: inline-size; }
.coverage-floating-dialog[hidden] { display: none; }
.coverage-floating-body { min-height: 0; flex: 1 1 auto; overflow: auto; padding: 18px; }
.coverage-floating-body .coverage-heading { margin-bottom: 0; }
.coverage-dialog-button { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-strong); white-space: nowrap; }
.coverage-dialog-button small { padding-left: 6px; border-left: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 500; }
.coverage-heading { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.coverage-heading h3 { margin: 0; }
.coverage-heading-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.coverage-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin: 16px 0; }
.coverage-summary > div { border: 1px solid var(--line); border-radius: 7px; padding: 12px; background: #f8f9f8; }
.coverage-summary span, .coverage-summary strong { display: block; }
.coverage-summary span { color: var(--muted); font-size: 12px; }
.coverage-summary strong { margin-top: 5px; font-size: 22px; }
.coverage-toolbar { position: sticky; top: -18px; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 8px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); padding: 10px 0; backdrop-filter: blur(7px); }
.coverage-toolbar label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.coverage-toolbar select { min-width: 145px; }
.coverage-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.coverage-table { width: 100%; min-width: 900px; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
.coverage-table th:nth-child(1) { width: 31%; }
.coverage-table th:nth-child(2) { width: 13%; }
.coverage-table th:nth-child(3) { width: 29%; }
.coverage-table th:nth-child(4) { width: 27%; }
.coverage-table th, .coverage-table td { border-bottom: 1px solid var(--line); padding: 12px; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.coverage-table th { position: sticky; top: 43px; z-index: 2; background: #f1f4f2; color: var(--muted); }
.coverage-table td strong, .coverage-table td small { display: block; }
.coverage-table td small { margin-top: 4px; color: var(--muted); line-height: 1.55; }
.coverage-table tr.is-pending { background: #fff9ef; }
.coverage-table tr[hidden] { display: none; }
.coverage-topic { display: flex; align-items: baseline; gap: 7px; }
.coverage-topic strong { min-width: 0; }
.coverage-impact { display: inline-flex; margin: 0 5px 5px 0; border-radius: 999px; padding: 3px 7px; background: #edf1ef; color: var(--muted); font-size: 10px; font-weight: 700; }
.coverage-impact.is-high { background: #fbe8df; color: #994526; }
.coverage-destination { color: var(--ink); font-size: 12px; }
.coverage-disposition { min-width: 0; }
.coverage-disposition > summary { cursor: pointer; color: var(--accent-strong); font-weight: 700; list-style-position: outside; }
.coverage-disposition-form { display: grid; gap: 9px; margin-top: 9px; border-top: 1px solid var(--line); padding-top: 9px; }
.coverage-disposition-form label { display: grid; gap: 4px; color: var(--muted); font-size: 11px; }
.coverage-disposition-form input, .coverage-disposition-form select, .coverage-disposition-form textarea { width: 100%; min-width: 0; }
.coverage-disposition-form textarea { min-height: 58px; resize: vertical; }
.coverage-disposition-form [hidden] { display: none !important; }
.coverage-disposition-confirm { grid-template-columns: auto minmax(0,1fr) !important; align-items: start; }
.coverage-disposition-confirm input { width: auto; margin-top: 2px; }
.coverage-editor { margin-top: 14px; }
.coverage-editor > summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.coverage-ai-candidate { margin-top: 14px; border: 1px solid #bfd5ca; border-radius: 9px; background: #f7fbf8; padding: 13px; }
.coverage-ai-candidate-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.coverage-ai-candidate-heading > div { display: grid; gap: 3px; }
.coverage-ai-candidate-heading small { color: var(--muted); }
.coverage-ai-form { margin-top: 10px; }
.coverage-ai-list { display: grid; gap: 7px; max-height: 330px; overflow: auto; padding-right: 3px; }
.coverage-ai-item { display: grid; grid-template-columns: 24px minmax(0,1fr); gap: 9px; border: 1px solid var(--line); border-radius: 7px; background: #fff; padding: 10px; }
.coverage-ai-item.is-safe { border-color: #b9d7c7; }
.coverage-ai-item.is-reviewable { border-color: #e3d3b9; }
.coverage-ai-choice { padding-top: 2px; }
.coverage-ai-choice input { width: auto; }
.coverage-ai-needs-action { display: inline-grid; width: 18px; height: 18px; place-items: center; border-radius: 50%; background: #f4e8d8; color: #8b5b24; font-size: 11px; font-weight: 800; }
.coverage-ai-main { min-width: 0; }
.coverage-ai-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.coverage-ai-title strong { min-width: 0; }
.coverage-ai-title small { margin-left: auto; color: var(--muted); }
.coverage-ai-main p { margin: 6px 0; color: #425158; font-size: 12px; line-height: 1.55; }
.coverage-ai-main > small { display: block; color: var(--muted); line-height: 1.5; }
.coverage-ai-main details { margin-top: 6px; color: var(--muted); font-size: 11px; }
.coverage-ai-main details > summary { cursor: pointer; }
.coverage-ai-warning { color: #8b5b24 !important; }
.coverage-ai-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; border-top: 1px solid #d9e7df; padding-top: 10px; }
@container (max-width: 720px) {
  .coverage-heading, .coverage-heading-actions, .coverage-ai-actions, .coverage-toolbar { align-items: stretch; flex-direction: column; }
  .coverage-heading-actions, .coverage-heading-actions form, .coverage-heading-actions .button { width: 100%; }
  .coverage-toolbar { position: static; }
  .coverage-toolbar label, .coverage-toolbar select { width: 100%; }
  .coverage-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .coverage-table-wrap { overflow: visible; border: 0; background: transparent; }
  .coverage-table, .coverage-table tbody { display: block; min-width: 0; }
  .coverage-table thead { display: none; }
  .coverage-table tr { display: grid; gap: 0; margin-bottom: 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
  .coverage-table tr.is-pending { background: #fffaf2; }
  .coverage-table td { display: block; border-bottom: 1px solid var(--line); padding: 10px 11px; }
  .coverage-table td:last-child { border-bottom: 0; }
  .coverage-table td::before { display: block; margin-bottom: 5px; color: var(--muted); content: attr(data-label); font-size: 10px; font-weight: 700; letter-spacing: .02em; }
  .coverage-ai-title small { width: 100%; margin-left: 0; }
}
.deck-overview { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.deck-step-guide { display: grid; gap: 12px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfc; padding: 15px 16px; }
.deck-step-guide ol { position: relative; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.deck-step-guide ol::before { position: absolute; top: 14px; right: 12%; left: 12%; height: 1px; background: var(--line); content: ""; }
.deck-step-guide li { position: relative; z-index: 1; display: grid; grid-template-columns: 28px minmax(0,1fr); align-items: start; gap: 9px; min-width: 0; }
.deck-step-guide li > span { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid #c8d1d4; border-radius: 50%; background: #fff; color: var(--muted); font-size: 11px; font-weight: 760; }
.deck-step-guide li > div { display: grid; gap: 3px; min-width: 0; }
.deck-step-guide li strong { font-size: 13px; line-height: 1.4; }
.deck-step-guide li small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.deck-step-guide li.is-current > span { border-color: var(--accent); background: var(--accent); color: #fff; box-shadow: 0 0 0 4px var(--accent-soft); }
.deck-step-guide li.is-current strong { color: var(--accent-strong); }
.deck-step-guide li.is-complete > span { border-color: var(--good); background: #e7f3ec; color: var(--good); font-size: 0; }
.deck-step-guide li.is-complete > span::before { content: "✓"; font-size: 11px; }
.deck-next-action { display: flex; align-items: center; gap: 9px; border-top: 1px solid var(--line); padding-top: 11px; }
.deck-next-action span { flex: 0 0 auto; border-radius: 999px; background: var(--accent); padding: 4px 8px; color: #fff; font-size: 10px; font-weight: 740; }
.deck-next-action strong { font-size: 12px; line-height: 1.5; }
.deck-next-action.is-complete span { background: var(--good); }
.deck-summary { flex: 1; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.deck-summary > div, .deck-summary > a { position: relative; border: 1px solid var(--line); border-radius: 7px; background: #f8f9f8; padding: 10px 12px; }
.deck-summary > a:hover { border-color: color-mix(in srgb,var(--accent) 45%,var(--line)); background: #fff; }
.deck-summary span, .deck-summary strong { display: block; }
.deck-summary span { color: var(--muted); font-size: 11px; }
.deck-summary strong { margin-top: 4px; font-size: 18px; }
.deck-summary-action small { position: absolute; top: 10px; right: 10px; color: var(--accent); font-size: 9px; }
.deck-diagnostics { margin: 0 0 16px; border: 1px solid var(--line); border-radius: 7px; padding: 11px 13px; }
.deck-diagnostics > summary, .deck-raw-editor > summary, .deck-meta-block > summary { cursor: pointer; color: var(--accent); font-size: 13px; font-weight: 680; }
.review-takeover { margin-top: 18px; }
.review-takeover-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid var(--line); border-radius: 9px; background: #f7f9f8; padding: 14px 16px; }
.review-takeover-heading strong, .review-takeover-heading p { margin: 0; }
.review-takeover-heading .helper { margin-top: 4px; }
.review-takeover > .reviewer-panel { margin-top: 12px; }
.deck-diagnostic-list { display: grid; max-height: 260px; overflow: auto; gap: 6px; margin-top: 10px; padding-right: 3px; }
.deck-diagnostic-list a { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 8px; border-radius: 6px; padding: 5px; color: var(--muted); font-size: 12px; }
.deck-diagnostic-list a:hover { background: var(--accent-soft); color: var(--ink); }
.deck-workbench { display: grid; grid-template-columns: 250px minmax(0,1fr); gap: 18px; align-items: start; }
.deck-confirmation-summary { margin: 22px 0 0; border: 1px solid var(--line); border-radius: 8px; background: #fafbfb; padding: 12px 14px; scroll-margin-top: 90px; }
.deck-confirmation-summary .eyebrow { margin: 0 0 4px; font-size: 9px; }
.deck-confirmation-summary strong { font-size: 12px; }
.deck-confirmation-summary p { margin: 5px 0 4px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.deck-confirmation-summary small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.deck-stage-confirm-bar { scroll-margin-top: 90px; }
.deck-stage-confirm-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.deck-page-list { max-height: calc(100vh - 210px); overflow: auto; display: grid; gap: 5px; border: 1px solid var(--line); border-radius: 8px; background: #f7f8f8; padding: 7px; }
.deck-page-link { display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 8px; align-items: start; border: 1px solid transparent; border-radius: 6px; padding: 9px; color: #4d5b64; }
.deck-page-link:hover { border-color: #cbd3d7; background: #fff; }
.deck-page-link.active { border-color: #aebdc3; background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(19,36,43,.06); }
.deck-page-link.has-blocking { border-left-color: var(--error); }
.deck-page-link.has-attention { border-left-color: var(--warn); }
.deck-page-link.deferred { opacity: .62; }
.deck-page-link > span:first-child { color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.deck-page-link strong, .deck-page-link small { display: block; overflow-wrap: anywhere; }
.deck-page-link strong { font-size: 13px; line-height: 1.4; }
.deck-page-link small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.deck-page-status { display: inline-flex; margin-top: 6px; border-radius: 999px; padding: 2px 6px; font-size: 9px; font-style: normal; font-weight: 700; }
.deck-page-status.is-blocking { background: #f8eaea; color: var(--error); }
.deck-page-status.is-attention { background: #f6efe3; color: var(--warn); }
.deck-page-status.is-auto { background: #f6efe3; color: var(--warn); }
.deck-page-status.is-visual { background: #e8f0f4; color: #356275; }
.deck-page-status.is-advisory { background: #edf0ed; color: var(--muted); }
.deck-slide-editor { min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 18px; }
.deck-overflow-action { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.deck-overflow-action p { margin: 4px 0 0; font-size: 11px; line-height: 1.55; }
.deck-overflow-action form { flex: 0 0 auto; }
.deck-current-issues { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.deck-current-issues p { margin: 4px 0 0; font-size: 11px; line-height: 1.55; }
.deck-current-issue-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.deck-current-issue-actions form { margin: 0; }
.deck-confirm-blocker { color: var(--error); }
.deck-slide-heading { margin-bottom: 18px; padding-bottom: 14px; }
.deck-slide-heading h3 { margin: 2px 0 0; font-size: 20px; }
.deck-slide-form { gap: 16px; }
.deck-production-contract { display: grid; gap: 12px; border-block: 1px solid var(--line); padding: 14px 0; }
.deck-production-contract-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.deck-production-contract-heading strong, .deck-production-contract-heading small { display: block; }
.deck-production-contract-heading strong { font-size: 13px; }
.deck-production-contract-heading small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.deck-production-blocks { display: flex; min-height: 38px; flex-wrap: wrap; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 6px; background: #fafbfa; padding: 7px; }
.deck-production-blocks span { border-radius: 999px; background: color-mix(in srgb, var(--accent) 8%, #fff); padding: 3px 7px; color: var(--accent-strong); font-size: 10px; }
.deck-slide-fieldset { display: grid; gap: 16px; min-width: 0; margin: 0; border: 0; padding: 0; }
.deck-slide-fieldset:disabled { opacity: .72; }
.deck-slide-fieldset > .field,
.deck-slide-fieldset > .form-grid,
.deck-slide-fieldset > .deck-meta-block,
.deck-slide-fieldset > .deck-slide-actions {
  content-visibility: auto;
  contain-intrinsic-block-size: auto 120px;
}
.deck-meta-block { border: 1px solid var(--line); border-radius: 7px; padding: 11px 13px; background: #fafbfa; }
.deck-meta-block > [data-deck-lazy-target] > .helper,
.deck-raw-editor > [data-deck-lazy-target] > .helper { margin: 10px 0 0; }
.deck-content-block { display: grid; gap: 7px; margin-top: 11px; border-top: 1px solid var(--line); padding-top: 11px; }
.deck-content-block:first-of-type { border-top: 0; }
.deck-content-block-markdown { max-height: 260px; overflow: auto; margin: 0; border-radius: 6px; background: #f2f5f4; padding: 10px 12px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); font: 12px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; }
.deck-meta-grid { margin-top: 12px; }
.deck-slide-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-top: 15px; }
.deck-order-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.deck-raw-editor { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 16px; }
.deck-advanced-body > form { margin-top: 12px; }
.deck-advanced-body { margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfa; padding: 14px; }
.deck-advanced-body .section-heading { margin-bottom: 10px; }
.deck-advanced-body h4 { margin: 0; }
.target-feedback-panel { margin: 0 0 18px; border: 1px solid #e2d1b8; border-radius: 8px; background: #fffdf8; padding: 14px; }
.target-feedback-panel .section-heading { align-items: center; margin: 0 0 10px; padding: 0; border: 0; }
.target-feedback-list { display: grid; gap: 8px; }
.target-feedback-item { border-top: 1px solid #eadfce; padding-top: 10px; }
.target-feedback-item:first-child { border-top: 0; padding-top: 0; }
.target-feedback-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; }
.target-feedback-item blockquote { margin: 9px 0; border-left: 3px solid #d4c4ad; padding-left: 9px; color: var(--muted); }
.target-feedback-item > p { margin: 8px 0; line-height: 1.55; }
.feedback-inbox-actions { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.feedback-resolution-form { display: flex; align-items: end; gap: 8px; }
.feedback-status-field { width: 150px; flex: 0 0 auto; }
.research-task-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; }
.research-task-row small { color: var(--muted); }
.research-review-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.research-review-row strong, .research-review-row small { display: block; }
.research-review-row small { margin-top: 3px; color: var(--muted); }
.research-source-editor { margin-top: 18px; border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.research-source-editor h3 { margin: 0; overflow-wrap: anywhere; }
.research-document-editor { min-height: 520px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; line-height: 1.65; }
.action-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-top: 1px solid var(--line); padding-top: 16px; }
.synthesis-confirm-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; padding: 14px 16px; margin-top: 18px; }
.synthesis-confirm-bar p { margin: 4px 0 0; }
.synthesis-compare-panel { margin: 0 0 18px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafb; }
.synthesis-compare-panel > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; padding: 13px 15px; list-style: none; }
.synthesis-compare-panel > summary::-webkit-details-marker { display: none; }
.synthesis-compare-panel > summary span:first-child { min-width: 0; }
.synthesis-compare-panel > summary strong, .synthesis-compare-panel > summary small { display: block; }
.synthesis-compare-panel > summary small { margin-top: 3px; color: var(--muted); font-weight: 400; }
.synthesis-compare-panel[open] > summary { border-bottom: 1px solid var(--line); }
.synthesis-compare-controls { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 15px; }
.synthesis-compare-hint { flex: 1 1 auto; min-width: 0; margin: 0; }
.synthesis-compare-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.synthesis-compare-actions [data-compare-sync].active { border-color: var(--accent); background: #eef5f4; color: var(--accent-strong); }
.synthesis-compare-panes { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding: 0 15px 15px; }
.synthesis-compare-panes[data-layout="side"] { align-items: start; }
.synthesis-compare-panes[data-layout="stack"] { grid-template-columns: 1fr; }
.synthesis-compare-panes[data-layout="closed"] { grid-template-columns: 1fr; }
.synthesis-reference-stack { display: grid; min-width: 0; gap: 12px; }
.synthesis-compare-panes[data-layout="side"] .synthesis-core-pane { order: 1; align-self: start; }
.synthesis-compare-panes[data-layout="side"] .synthesis-reference-stack { order: 2; }
.synthesis-compare-panes[data-layout="stack"] .synthesis-reference-stack { order: 1; }
.synthesis-compare-panes[data-layout="stack"] .synthesis-core-pane { order: 2; }
.synthesis-compare-panes[data-layout="stack"] .synthesis-reference-stack { grid-template-columns: repeat(auto-fit,minmax(300px,1fr)); }
.synthesis-compare-panes[data-layout="closed"] .synthesis-core-pane { order: 1; width: 100%; }
.synthesis-compare-panes[data-layout="closed"] .synthesis-reference-stack { display: none; }
.synthesis-compare-panel.is-focus-view > summary, .synthesis-compare-panel.is-focus-view .synthesis-compare-controls, .synthesis-compare-panel.is-focus-view .synthesis-reference-stack { display: none; }
.synthesis-compare-panel.is-focus-view .synthesis-compare-panes { grid-template-columns: 1fr; padding-top: 15px; }
.synthesis-compare-panel.is-focus-view .synthesis-core-pane { order: 1; width: 100%; }
.synthesis-compare-panel.is-focus-view .synthesis-core-form .action-bar { display: none; }
.synthesis-compare-pane { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.synthesis-compare-pane > header { min-height: 42px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); background: #f5f7f8; padding: 7px 9px 7px 12px; color: var(--ink); font-size: 12px; font-weight: 680; overflow-wrap: anywhere; }
.synthesis-compare-pane > header [data-compare-reference-title] { flex: 1 1 auto; min-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.window-character-count { display: inline-flex; align-items: center; flex: 0 0 auto; color: var(--muted); font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1; white-space: nowrap; }
.content-master-title-line { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.content-master-retention-summary { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.content-master-retention-summary.has-pending { color: #95611c; }
.content-generation-status { min-height: 44px; }
.workspace-task-notifications { position: fixed; z-index: 560; top: 76px; right: 18px; display: grid; width: min(380px, calc(100vw - 32px)); gap: 8px; pointer-events: none; }
.page-scroll-jump { position: fixed; z-index: 170; right: 22px; bottom: 22px; display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(126,145,151,.72); border-radius: 50%; background: rgba(255,255,255,.94); padding: 0; color: var(--accent-strong); box-shadow: 0 10px 28px rgba(31,45,50,.16); opacity: 0; visibility: hidden; transform: translateY(12px) scale(.96); pointer-events: none; cursor: pointer; transition: opacity .22s ease,transform .22s cubic-bezier(.2,.8,.2,1),visibility 0s linear .22s,border-color .16s ease,background-color .16s ease; }
.page-scroll-jump.is-visible { opacity: 1; visibility: visible; transform: translateY(0) scale(1); pointer-events: auto; transition-delay: 0s; }
.page-scroll-jump:hover { border-color: var(--accent); background: #fff; }
.page-scroll-jump:focus-visible { outline: 2px solid color-mix(in srgb,var(--accent) 36%,transparent); outline-offset: 3px; }
.page-scroll-jump > span { font-size: 21px; font-weight: 500; line-height: 1; transform: translateY(-1px); }
.workspace-task-notification { display: flex; align-items: start; justify-content: space-between; gap: 14px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 9px; background: rgba(255,255,255,.98); padding: 12px 13px; box-shadow: 0 12px 34px rgba(34,42,40,.16); pointer-events: auto; }
.workspace-task-notification.is-warning { border-left-color: var(--warn); }
.workspace-task-notification > div:first-child { display: grid; min-width: 0; gap: 4px; }
.workspace-task-notification strong { font-size: 13px; }
.workspace-task-notification span { color: var(--muted); font-size: 11px; line-height: 1.5; }
.workspace-task-notification > div:last-child { display: flex; align-items: center; gap: 6px; }
.workspace-task-notification a, .workspace-task-notification button { border: 0; background: transparent; color: var(--accent-strong); padding: 3px; font: inherit; font-size: 12px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.synthesis-ai-inline-editor { counter-reset: ai-opinion-block; }
.synthesis-ai-opinion-block { counter-increment: ai-opinion-block; display: block; position: relative; margin: 8px 0; border: 1px solid color-mix(in srgb,var(--accent) 28%,var(--line)); border-left: 3px solid var(--accent); border-radius: 7px; background: color-mix(in srgb,var(--accent) 4%,#fff); padding: 24px 9px 9px; white-space: pre-wrap; }
.synthesis-ai-opinion-block::before { content: "意见块 " counter(ai-opinion-block); position: absolute; top: 6px; left: 9px; color: var(--accent-strong); font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.synthesis-ai-opinion-block:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb,var(--accent) 12%,transparent); }
@media (max-width: 680px) {
  .workspace-task-notifications { top: 66px; right: 10px; width: calc(100vw - 20px); }
  .page-scroll-jump { right: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .page-scroll-jump { transition: opacity .01ms,visibility .01ms; }
}
.synthesis-pane-order-actions, .synthesis-pane-window-actions, .synthesis-pane-count-actions { display: inline-flex; align-items: center; gap: 3px; flex: 0 0 auto; }
.synthesis-pane-header-button { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: 1px solid #cbd4d9; border-radius: 5px; background: #fff; padding: 0; color: #53646c; cursor: pointer; font: inherit; font-size: 14px; line-height: 1; }
.synthesis-pane-header-button:hover:not(:disabled) { border-color: #9eafb7; background: #f7f9fa; }
.synthesis-pane-header-button:disabled { cursor: default; opacity: .38; }
.synthesis-pane-source-switcher { display: inline-flex; max-width: min(42%, 360px); align-items: center; gap: 4px; flex: 0 1 auto; margin-left: auto; overflow-x: auto; overscroll-behavior-inline: contain; padding: 2px 1px 4px; scrollbar-color: #b9c5ca transparent; scrollbar-width: thin; }
.synthesis-pane-source-switcher::-webkit-scrollbar { height: 4px; }
.synthesis-pane-source-switcher::-webkit-scrollbar-thumb { border-radius: 999px; background: #b9c5ca; }
.synthesis-pane-source-button { display: inline-flex; align-items: center; gap: 2px; height: 27px; border: 1px solid #cbd4d9; border-radius: 6px; background: #fff; padding: 2px 4px; color: #4c5b63; cursor: pointer; font: inherit; }
.synthesis-pane-source-button:hover { border-color: #9eafb7; background: #f7f9fa; }
.synthesis-pane-source-button.active { border-color: var(--accent); background: #eef5f4; color: var(--accent-strong); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 16%, transparent); }
.synthesis-provider-logo { display: inline-flex; align-items: center; justify-content: center; min-width: 21px; height: 19px; border-radius: 4px; padding: 0 3px; background: #e8edf0; color: #52636b; font-size: 8px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.synthesis-provider-logo.provider-deepseek { background: #e8efff; color: #2458c6; }
.synthesis-provider-logo.provider-doubao { background: #fff0ee; color: #d64c3f; font-size: 10px; }
.synthesis-provider-logo.provider-glm { background: #eeeaff; color: #6045bf; font-size: 8px; }
.synthesis-source-role { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 19px; border-radius: 4px; background: #edf1f2; color: #52636b; font-size: 9px; font-weight: 800; line-height: 1; }
.synthesis-pane-source-button.active .synthesis-source-role { background: var(--accent); color: #fff; }
.synthesis-generation-source-count { display: inline-flex; margin-left: 8px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 10%, #fff); padding: 2px 7px; font-size: 11px; font-weight: 700; }
.synthesis-compare-pane > div { height: 560px; overflow: auto; padding: 18px 22px; }
.synthesis-core-workspace { height: auto !important; overflow: visible !important; padding: 0 !important; }
.synthesis-core-form { gap: 0; }
.synthesis-core-form .markdown-modebar { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.synthesis-core-form .markdown-workbench .toastui-editor-defaultUI { border: 0; border-radius: 0; }
.synthesis-core-form .action-bar { border-top: 1px solid var(--line); padding: 10px 12px; }
.synthesis-compare-pane .toastui-editor-contents { font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; font-size: 14px; line-height: 1.7; }
.synthesis-core-pane { border-color: #b9c9cd; }
.synthesis-core-badge { margin-left: auto; border-radius: 999px; background: #e7f0ef; padding: 2px 7px; color: var(--accent-strong); font-size: 10px; font-weight: 760; }
.synthesis-candidate-titlebar { justify-content: space-between; }
.synthesis-candidate-titlebar > div { display: flex; min-width: 0; align-items: center; gap: 7px; }
.synthesis-candidate-titlebar .synthesis-core-badge { margin-left: 0; }
.synthesis-candidate-tools { flex: 0 0 auto; margin-left: auto; }
.synthesis-version-select { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 600; }
.synthesis-version-select select { width: auto; min-width: 94px; height: 30px; border: 1px solid #c7d0d5; border-radius: 6px; background: #fff; padding: 3px 24px 3px 8px; color: var(--ink); font-size: 11px; }
.icon-button { display: inline-grid; width: 31px; height: 31px; flex: 0 0 auto; place-items: center; border: 1px solid #c7d0d5; border-radius: 6px; background: #fff; padding: 0; color: var(--accent-strong); cursor: pointer; font-size: 15px; line-height: 1; }
.icon-button:hover { border-color: var(--accent); background: #eef5f4; }
.icon-button[hidden] { display: none; }
.icon-button.has-tooltip { position: relative; }
.icon-button.has-tooltip::after { position: absolute; z-index: 30; top: calc(100% + 8px); right: 0; width: max-content; max-width: min(280px,70vw); border: 1px solid rgba(32,45,48,.13); border-radius: 7px; background: #243034; box-shadow: 0 8px 24px rgba(24,33,38,.15); padding: 7px 9px; color: #fff; content: attr(data-tooltip); font-size: 11px; font-weight: 500; line-height: 1.45; opacity: 0; pointer-events: none; text-align: left; transform: translateY(-3px); transition: opacity .14s ease,transform .14s ease; white-space: normal; }
.icon-button.has-tooltip:hover::after, .icon-button.has-tooltip:focus-visible::after { opacity: 1; transform: translateY(0); }
.synthesis-formal-version-note { border-bottom: 1px solid var(--line); background: #f8fafb; padding: 9px 12px; color: var(--muted); font-size: 11px; }
.reviewer-panel-embedded { margin: 0; border: 0; border-radius: 0; background: #fff; padding: 0; }
.reviewer-panel-embedded .reviewer-meta, .reviewer-panel-embedded .reviewer-quality-bar { margin-right: 12px; margin-left: 12px; }
.reviewer-panel-embedded .reviewer-candidate { margin-top: 0; }
.reviewer-panel-embedded .reviewer-candidate .markdown-modebar { border-right: 0; border-left: 0; border-radius: 0; }
.reviewer-panel-embedded .reviewer-candidate .markdown-workbench .toastui-editor-defaultUI,
.reviewer-panel-embedded .reviewer-candidate .markdown-viewer-host,
.reviewer-panel-embedded .reviewer-candidate .markdown-revision-host { border-right: 0; border-left: 0; border-radius: 0; }
.reviewer-panel-embedded .reviewer-candidate .action-bar, .reviewer-panel-embedded .reviewer-actions { margin: 0; padding: 10px 12px; }
.reviewer-panel-embedded .feedback-change-diff { margin: 10px 12px 0; }
.reviewer-floating-dialog { width: min(620px, calc(100vw - 32px)); }
.reviewer-floating-content { max-height: min(70vh, 720px); overflow: auto; padding: 16px; }
.reviewer-floating-content > pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; font-size: 13px; line-height: 1.7; }
.reviewer-floating-content.review-change-list { display: grid; margin: 0; }
.opinion-block-review { margin: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfc; padding: 12px; }
.opinion-block-review-heading { margin-bottom: 10px; }
.opinion-block-list { display: grid; gap: 7px; }
.opinion-block-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #d9e0e2; border-radius: 7px; background: #fff; padding: 9px 10px; }
.opinion-block-item > div { display: flex; min-width: 0; align-items: center; gap: 7px; }
.opinion-block-item small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.opinion-block-dialog { width: min(940px, calc(100vw - 32px)); }
.opinion-block-dialog-content { display: grid; gap: 12px; }
.opinion-block-instruction { border-left: 3px solid var(--accent); background: #f2f7f6; padding: 9px 11px; }
.opinion-block-instruction small { color: var(--muted); }
.opinion-block-instruction p { margin: 4px 0 0; white-space: pre-wrap; }
.opinion-block-targets { display: flex; flex-wrap: wrap; gap: 5px; }
.source-id-badge { display: inline-flex; max-width: 100%; align-items: center; border: 1px solid #c7d7d6; border-radius: 999px; background: #edf5f4; padding: 2px 7px; color: var(--accent-strong); font-size: 11px; line-height: 1.45; }
.opinion-block-compare { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; }
.opinion-block-compare > section { min-width: 0; border: 1px solid var(--line); border-radius: 7px; background: #fff; padding: 10px; }
.opinion-block-compare h5 { margin: 0 0 8px; color: var(--muted); font-size: 11px; }
.opinion-block-actions { justify-content: flex-end; }
.account-summary-button { border: 0; background: transparent; padding: 5px 7px; font-family: inherit; font-size: 12px; font-weight: 400; line-height: 1.2; cursor: pointer; }
.account-summary-button:hover { background: rgba(255,255,255,.1); color: #fff; }
.account-summary-button:focus-visible { outline: 2px solid rgba(255,255,255,.72); outline-offset: 2px; }
.project-overview-trigger { flex: 0 1 auto; min-width: 0; border-radius: 6px; color: #d7e0e3; }
.ai-floating-dialog.project-runtime-overview-dialog { width: min(1040px, calc(100vw - 32px)); }
.project-runtime-overview-content { max-height: calc(100vh - 180px); padding: 0; overscroll-behavior: contain; }
.project-runtime-overview { display: grid; gap: 16px; padding: 20px; color: var(--text); }
.project-runtime-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.project-runtime-heading > div { min-width: 0; }
.project-runtime-heading h3 { margin: 2px 0 5px; font-size: 22px; line-height: 1.25; }
.project-runtime-heading p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.project-runtime-summary { display: grid; grid-template-columns: repeat(auto-fit,minmax(145px,1fr)); gap: 9px; }
.project-runtime-summary > div { display: grid; gap: 4px; min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: #f7f9f8; padding: 12px; }
.project-runtime-summary span, .project-runtime-summary small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.project-runtime-summary strong { font-size: 22px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.project-runtime-section { min-width: 0; border: 1px solid var(--line); border-radius: 9px; background: #fff; padding: 15px; }
.project-runtime-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 13px; }
.project-runtime-section-heading > div { display: grid; gap: 3px; min-width: 0; }
.project-runtime-section-heading strong { font-size: 14px; }
.project-runtime-section-heading small, .project-runtime-section-heading > span { color: var(--muted); font-size: 11px; line-height: 1.45; }
.project-runtime-live { display: grid; gap: 10px; border-color: color-mix(in srgb,var(--accent) 28%,var(--line)); background: color-mix(in srgb,var(--accent-soft) 42%,#fff); }
.project-runtime-live .project-runtime-section-heading { margin-bottom: 0; }
.project-runtime-live-progress { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; }
.project-runtime-live-progress > span { display: block; height: 7px; overflow: hidden; border-radius: 999px; background: color-mix(in srgb,var(--accent) 12%,#e9eeee); }
.project-runtime-live-progress i { display: block; min-width: 3px; height: 100%; border-radius: inherit; background: var(--accent); transition: width .24s ease; }
.project-runtime-live-progress strong { display: inline-flex; align-items: baseline; gap: 4px; font-size: 13px; font-variant-numeric: tabular-nums; }
.project-runtime-live-progress small, .project-runtime-live > p { margin: 0; color: var(--muted); font-size: 10px; }
.project-runtime-live.is-failed { border-color: #e3c8c8; background: #fff8f8; }
.project-runtime-live.is-failed .project-runtime-live-progress i { background: var(--danger); }
.project-runtime-live.is-completed .project-runtime-live-progress i { background: var(--good); }
.project-runtime-flow { display: flex; gap: 7px; overflow-x: auto; padding: 2px 1px 7px; scrollbar-width: thin; }
.project-runtime-flow-step { position: relative; display: grid; min-width: 112px; flex: 1 0 112px; gap: 3px; border-top: 3px solid #c9d1ce; border-radius: 5px; background: #f6f8f7; padding: 9px 10px; }
.project-runtime-flow-step > span { color: var(--muted); font-size: 10px; font-weight: 750; }
.project-runtime-flow-step strong { font-size: 12px; line-height: 1.35; }
.project-runtime-flow-step small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.project-runtime-flow-step.is-complete, .project-runtime-flow-step.is-done, .project-runtime-flow-step.is-ready { border-top-color: var(--good); background: #f2f8f5; }
.project-runtime-flow-step.is-current, .project-runtime-flow-step.is-active { border-top-color: var(--accent); background: var(--accent-soft); }
.project-runtime-flow-step.is-blocked { border-top-color: #d5a7a7; background: #fff7f7; }
.project-runtime-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.project-runtime-grid.lower { align-items: start; }
.project-runtime-collapsible { overflow: hidden; padding: 0; }
.project-runtime-collapsible > summary { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 12px; margin: 0; padding: 15px; cursor: pointer; list-style: none; }
.project-runtime-collapsible > summary::-webkit-details-marker { display: none; }
.project-runtime-collapsible > summary::after { color: var(--muted); content: "›"; font-size: 20px; font-weight: 400; line-height: 1; transition: transform .16s ease,color .16s ease; }
.project-runtime-collapsible > summary:hover::after { color: var(--accent); }
.project-runtime-collapsible[open] > summary { border-bottom: 1px solid var(--line); }
.project-runtime-collapsible[open] > summary::after { transform: rotate(90deg); }
.project-runtime-collapsible > .project-runtime-list,
.project-runtime-collapsible > .project-runtime-timeline { max-height: min(278px,34vh); padding: 12px 15px 15px; scrollbar-gutter: stable; }
.project-runtime-stage-usage { display: grid; border-top: 1px solid #edf0ef; }
.project-runtime-stage-item { min-width: 0; border-bottom: 1px solid #edf0ef; }
.project-runtime-stage-item > summary { display: grid; grid-template-columns: 28px minmax(0,1fr) auto auto; align-items: center; gap: 9px; min-width: 0; padding: 10px 1px; cursor: pointer; list-style: none; }
.project-runtime-stage-item > summary::-webkit-details-marker { display: none; }
.project-runtime-stage-item > summary::after { color: var(--muted); content: "›"; font-size: 18px; line-height: 1; transition: transform .16s ease,color .16s ease; }
.project-runtime-stage-item > summary:hover::after { color: var(--accent); }
.project-runtime-stage-item[open] > summary::after { transform: rotate(90deg); }
.project-runtime-stage-number { display: inline-grid; width: 25px; height: 25px; place-items: center; border: 1px solid color-mix(in srgb,var(--accent) 18%,var(--line)); border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-size: 9px; font-weight: 760; font-variant-numeric: tabular-nums; }
.project-runtime-stage-item.is-empty .project-runtime-stage-number { border-color: var(--line); background: #f5f7f6; color: var(--muted); }
.project-runtime-stage-main { display: grid; min-width: 0; gap: 6px; }
.project-runtime-stage-main > span:first-child { display: flex; min-width: 0; align-items: baseline; justify-content: space-between; gap: 10px; }
.project-runtime-stage-main strong { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.project-runtime-stage-main small, .project-runtime-stage-route-count { color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; }
.project-runtime-stage-main small { flex: 0 0 auto; }
.project-runtime-stage-route-count { white-space: nowrap; }
.project-runtime-route-list { display: grid; gap: 8px; margin: 0 0 10px 37px; border-left: 2px solid color-mix(in srgb,var(--accent) 16%,var(--line)); padding: 9px 0 2px 11px; }
.project-runtime-route-list > .helper { margin: 0; font-size: 10px; }
.project-runtime-route-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 4px 10px; min-width: 0; }
.project-runtime-route-row > div { display: flex; min-width: 0; align-items: baseline; gap: 6px; }
.project-runtime-route-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.project-runtime-route-row code { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.project-runtime-route-row > span:not(.project-runtime-bar) { color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.project-runtime-route-row > .project-runtime-bar { grid-column: 1 / -1; height: 4px; }
.project-runtime-bars { display: grid; gap: 13px; }
.project-runtime-bar-row { display: grid; gap: 6px; }
.project-runtime-bar-row > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.project-runtime-bar-row strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.project-runtime-bar-row span { flex: 0 0 auto; color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.project-runtime-bar { display: block; width: 100%; height: 6px; overflow: hidden; border-radius: 999px; background: #edf0ef; }
.project-runtime-bar i { display: block; min-width: 3px; height: 100%; border-radius: inherit; background: var(--accent); }
.project-runtime-bar.is-empty i { min-width: 0; }
.project-runtime-bar.model i { background: #657b74; }
.project-runtime-list, .project-runtime-timeline { display: grid; gap: 0; max-height: 278px; margin: 0; padding: 0; overflow: auto; list-style: none; scrollbar-width: thin; }
.project-runtime-list li, .project-runtime-timeline li { display: grid; grid-template-columns: 78px minmax(0,1fr); gap: 10px; border-top: 1px solid #edf0ef; padding: 9px 2px; }
.project-runtime-list li:first-child, .project-runtime-timeline li:first-child { border-top: 0; padding-top: 1px; }
.project-runtime-list li > span, .project-runtime-timeline time { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.project-runtime-list li > div, .project-runtime-timeline li > div { display: grid; gap: 3px; min-width: 0; }
.project-runtime-list strong, .project-runtime-timeline strong { font-size: 12px; line-height: 1.4; }
.project-runtime-list small, .project-runtime-timeline small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.project-runtime-list .empty { display: block; color: var(--muted); font-size: 12px; }
.project-runtime-calls { border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.project-runtime-calls > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 15px; cursor: pointer; list-style: none; }
.project-runtime-calls > summary::-webkit-details-marker { display: none; }
.project-runtime-calls > summary span:first-child { display: grid; gap: 2px; }
.project-runtime-calls > summary strong { font-size: 13px; }
.project-runtime-calls > summary small, .project-runtime-calls > summary span:last-child { color: var(--muted); font-size: 11px; }
.project-runtime-table-wrap { overflow-x: auto; border-top: 1px solid var(--line); }
.project-runtime-calls[open] .project-runtime-table-wrap { max-height: min(320px,40vh); overflow: auto; scrollbar-gutter: stable; overscroll-behavior: contain; }
.project-runtime-table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 11px; }
.project-runtime-table th, .project-runtime-table td { border-bottom: 1px solid #edf0ef; padding: 9px 12px; text-align: left; vertical-align: top; }
.project-runtime-table th { background: #f7f9f8; color: var(--muted); font-weight: 650; }
.project-runtime-calls[open] .project-runtime-table th { position: sticky; z-index: 1; top: 0; }
.project-runtime-table td strong, .project-runtime-table td small { display: block; }
.project-runtime-table td small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.project-runtime-usage { display: inline-flex; align-items: center; min-height: 20px; border-radius: 999px; padding: 2px 7px; font-size: 10px; font-weight: 680; white-space: nowrap; }
.project-runtime-usage.is-unknown { background: #f6efe3; color: var(--warn); cursor: help; }
.project-runtime-usage.is-pending { background: #edf0f2; color: var(--muted); }
.project-runtime-usage.is-none { border: 1px solid #e1e6e7; background: transparent; color: var(--muted); }
.project-runtime-footnote { margin: -3px 1px 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.synthesis-conflict-dialog { width: min(720px, calc(100vw - 32px)); min-width: min(420px, calc(100vw - 16px)); }
.ai-dialog-width-resize-handle { position: absolute; z-index: 3; top: 46px; right: -5px; bottom: 10px; width: 10px; cursor: ew-resize; touch-action: none; }
.ai-dialog-width-resize-handle::after { position: absolute; top: 50%; left: 3px; width: 3px; height: 46px; transform: translateY(-50%); border-radius: 999px; background: #aebcc0; content: ""; opacity: .46; transition: background-color .16s ease,opacity .16s ease; }
.ai-dialog-width-resize-handle:hover::after, .ai-dialog-width-resize-handle:focus-visible::after, .is-resizing-width .ai-dialog-width-resize-handle::after { background: var(--accent); opacity: .9; }
.ai-dialog-width-resize-handle:focus-visible { outline: none; }
.ai-dialog-height-resize-handle { position: absolute; z-index: 3; right: 10px; bottom: -5px; left: 10px; height: 10px; cursor: ns-resize; touch-action: none; }
.ai-dialog-height-resize-handle::after { position: absolute; top: 3px; left: 50%; width: 46px; height: 3px; transform: translateX(-50%); border-radius: 999px; background: #aebcc0; content: ""; opacity: .46; transition: background-color .16s ease,opacity .16s ease; }
.ai-dialog-height-resize-handle:hover::after, .ai-dialog-height-resize-handle:focus-visible::after, .is-resizing-height .ai-dialog-height-resize-handle::after { background: var(--accent); opacity: .9; }
.ai-dialog-height-resize-handle:focus-visible { outline: none; }
.synthesis-conflict-content { min-height: 180px; max-height: min(72vh, 760px); }
.synthesis-conflict-content .toastui-editor-contents { font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; font-size: 14px; line-height: 1.7; }
.synthesis-conflict-content .toastui-editor-contents > :first-child { margin-top: 0; }
.synthesis-reference-pane { transition: border-color .18s ease, box-shadow .18s ease; cursor: pointer; }
.synthesis-reference-pane.is-active { border-color: #8da5ab; box-shadow: inset 3px 0 0 var(--accent); }
.synthesis-reference-pane.just-opened { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.synthesis-reference-pane.is-pending-render > div { display: grid; place-items: center; }
body > .synthesis-reference-pane.is-floating { position: fixed; display: flex; min-width: 0; max-width: calc(100vw - 16px); max-height: calc(100vh - 72px); flex-direction: column; border-color: #91a6ac; background: #fff; box-shadow: 0 22px 64px rgba(24,39,46,.28); cursor: default; }
body > .synthesis-reference-pane.is-floating > header { flex: 0 0 auto; cursor: move; touch-action: none; user-select: none; }
body > .synthesis-reference-pane.is-floating > div { min-height: 0; height: auto; flex: 1 1 auto; }
body > .synthesis-reference-pane.is-floating.is-minimized { height: auto !important; }
body > .synthesis-reference-pane.is-floating.is-minimized > :not(header) { display: none !important; }
body > .synthesis-reference-pane.is-floating.is-minimized { top: var(--floating-minimized-top, 116px) !important; right: auto !important; left: var(--floating-minimized-left, 24px) !important; width: var(--floating-minimized-width, min(232px, calc(100vw - 48px))) !important; min-width: 0; border-color: color-mix(in srgb,var(--accent) 32%,var(--line)); border-radius: 999px; box-shadow: 0 8px 24px rgba(27,45,53,.16); transition: top .2s cubic-bezier(.2,.8,.2,1), left .2s cubic-bezier(.2,.8,.2,1), border-color .18s ease, box-shadow .18s ease; }
body > .synthesis-reference-pane.is-floating.is-minimized > header { min-height: 40px; gap: 7px; overflow: hidden; border-radius: inherit; background: color-mix(in srgb,var(--accent-soft) 72%,#fff); padding: 6px 7px 6px 13px; cursor: default; }
body > .synthesis-reference-pane.is-floating.is-minimized > header > :is([data-compare-pane-order-actions],[data-compare-character-count],[data-compare-pane-source-switcher],[data-compare-pane-count-actions]) { display: none; }
body > .synthesis-reference-pane.is-floating.is-minimized [data-compare-reference-title] { min-width: 0; flex: 1 1 auto; overflow: hidden; color: var(--accent-strong); font-size: 12px; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
body > .synthesis-reference-pane.is-floating.is-minimized [data-compare-pane-window-actions] { display: inline-flex; flex: 0 0 auto; gap: 1px; }
.synthesis-reference-width-resize-handle { display: none; }
.synthesis-reference-height-resize-handle { display: none; }
body > .synthesis-reference-pane.is-floating > .synthesis-reference-width-resize-handle { position: absolute; z-index: 3; top: 48px; right: -5px; bottom: 10px; display: block; width: 10px; cursor: ew-resize; touch-action: none; }
body > .synthesis-reference-pane.is-floating > .synthesis-reference-width-resize-handle::after { position: absolute; top: 50%; left: 3px; width: 3px; height: 46px; transform: translateY(-50%); border-radius: 999px; background: #aebcc0; content: ""; opacity: .5; transition: background-color .16s ease,opacity .16s ease; }
body > .synthesis-reference-pane.is-floating > .synthesis-reference-width-resize-handle:hover::after, body > .synthesis-reference-pane.is-floating > .synthesis-reference-width-resize-handle:focus-visible::after, body > .synthesis-reference-pane.is-floating.is-resizing-width > .synthesis-reference-width-resize-handle::after { background: var(--accent); opacity: .95; }
body > .synthesis-reference-pane.is-floating > .synthesis-reference-width-resize-handle:focus-visible { outline: none; }
body > .synthesis-reference-pane.is-floating > .synthesis-reference-height-resize-handle { position: absolute; z-index: 3; right: 10px; bottom: -5px; left: 10px; display: block; height: 10px; cursor: ns-resize; touch-action: none; }
body > .synthesis-reference-pane.is-floating > .synthesis-reference-height-resize-handle::after { position: absolute; top: 3px; left: 50%; width: 46px; height: 3px; transform: translateX(-50%); border-radius: 999px; background: #aebcc0; content: ""; opacity: .5; transition: background-color .16s ease,opacity .16s ease; }
body > .synthesis-reference-pane.is-floating > .synthesis-reference-height-resize-handle:hover::after, body > .synthesis-reference-pane.is-floating > .synthesis-reference-height-resize-handle:focus-visible::after, body > .synthesis-reference-pane.is-floating.is-resizing-height > .synthesis-reference-height-resize-handle::after { background: var(--accent); opacity: .95; }
body > .synthesis-reference-pane.is-floating > .synthesis-reference-height-resize-handle:focus-visible { outline: none; }
body > .synthesis-reference-pane.is-floating.is-active { box-shadow: 0 24px 68px rgba(24,39,46,.32), inset 3px 0 0 var(--accent); }
body > .synthesis-reference-pane.is-floating.is-dragging { box-shadow: 0 28px 76px rgba(24,39,46,.36), inset 3px 0 0 var(--accent); }
body > .synthesis-reference-pane.is-floating:is(.is-resizing-width,.is-resizing-height) { box-shadow: 0 28px 76px rgba(24,39,46,.36), inset 3px 0 0 var(--accent); }
body > .synthesis-reference-pane.is-floating.is-minimized:is(.is-active,.is-dragging) { box-shadow: 0 8px 24px rgba(27,45,53,.16); }
.synthesis-reference-loading { margin: 0; color: var(--muted); font-size: 12px; }
.synthesis-source-reference { display: inline-flex; align-items: center; min-height: 20px; border: 1px solid #b8cbc8; border-radius: 999px; background: #edf5f3; padding: 1px 7px; color: var(--accent-strong); cursor: pointer; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82em; font-weight: 700; line-height: 1.35; vertical-align: baseline; }
.synthesis-source-reference:hover { border-color: var(--accent); background: #e3efed; color: var(--accent); }
.synthesis-supporting-unit-reference { border-color: #c9b884; background: #faf6e8; color: #70591c; }
.synthesis-supporting-unit-reference:hover { border-color: #a98a32; background: #f5edcf; color: #5e4810; }
.synthesis-source-reference:focus-visible, .synthesis-source-reference-code:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 42%, transparent); outline-offset: 2px; }
.synthesis-source-reference-code { display: inline-block; border: 1px solid #b8cbc8; border-radius: 999px; background: #edf5f3; padding: 1px 7px; color: var(--accent-strong); cursor: pointer; font-size: .82em; font-weight: 700; line-height: 1.35; }
.synthesis-source-reference-code:hover { border-color: var(--accent); background: #e3efed; color: var(--accent); }
.synthesis-provenance-reference { border-radius: 5px; cursor: pointer; transition: background-color .16s ease,color .16s ease; }
.synthesis-provenance-reference:hover { background: #edf4f3; color: var(--accent-strong); }
.synthesis-reference-pane .supporting-unit-target { border-radius: 5px; background: #fff2b8; box-shadow: 0 0 0 3px rgba(202,158,41,.2); transition: background-color .2s ease,box-shadow .2s ease; }
.notice { margin: -8px 0 18px; border-radius: 7px; padding: 10px 12px; font-size: 13px; }
.notice.success { background: #e8f4ed; color: var(--good); }
.notice.error { background: #f7e9e9; color: var(--error); }
.notice.info { background: var(--accent-soft); color: var(--accent); }
.upload-strip { border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin-bottom: 18px; }
.file-picker { flex: 1; min-height: 66px; display: flex; flex-direction: column; justify-content: center; border: 1px dashed #aeb9be; border-radius: 7px; padding: 9px 13px; cursor: pointer; }
.file-picker input { display: none; }
.file-picker span { font-weight: 680; }
.file-picker small { color: var(--muted); }
.source-table { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.source-row { display: grid; grid-template-columns: minmax(220px,2fr) 120px minmax(210px,1fr) minmax(190px,auto); align-items: center; gap: 14px; padding: 13px 15px; border-top: 1px solid var(--line); }
.source-row:first-child { border-top: 0; }
.source-row.header { background: #f5f7f8; color: var(--muted); font-size: 12px; font-weight: 680; }
.source-row strong, .source-row small { display: block; overflow-wrap: anywhere; }
.source-row small { margin-top: 3px; color: var(--muted); }
.source-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.empty-state { border: 1px dashed #c9d0d4; border-radius: 8px; padding: 38px 22px; color: var(--muted); text-align: center; }
.editor-form { display: grid; gap: 14px; }
.document-editor { min-height: calc(100vh - 235px); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.markdown-workbench { min-width: 0; }
.markdown-modebar { display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; background: #f6f8f9; padding: 8px 10px; }
.markdown-mode-actions { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.segmented-control { display: inline-flex; flex: 0 0 auto; border: 1px solid #c7d0d5; border-radius: 6px; overflow: hidden; background: #fff; }
.segmented-control button { min-height: 31px; border: 0; border-left: 1px solid #d6dde0; background: transparent; padding: 5px 13px; color: #52616a; cursor: pointer; font-size: 12px; }
.segmented-control button:first-child { border-left: 0; }
.segmented-control button.active { background: var(--accent); color: #fff; }
.segmented-control button:disabled { cursor: not-allowed; opacity: .45; }
.markdown-ai-button { display: inline-grid; min-width: 34px; height: 33px; place-items: center; border: 1px solid #9eb5b8; border-radius: 6px; background: #eef5f4; padding: 0 8px; color: var(--accent-strong); cursor: pointer; font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.markdown-ai-button:hover:not(:disabled) { border-color: var(--accent); background: #e5f0ee; }
.markdown-ai-button:disabled { cursor: not-allowed; opacity: .42; }
.markdown-selection-ai-toolbar { position: fixed; z-index: 95; display: flex; gap: 3px; border: 1px solid #8fa4a9; border-radius: 7px; background: #fff; padding: 4px; box-shadow: 0 8px 24px rgba(27,45,53,.2); }
.markdown-selection-ai-toolbar[hidden] { display: none; }
.markdown-selection-ai-toolbar button { border: 0; border-radius: 5px; background: transparent; padding: 6px 9px; color: var(--ink); cursor: pointer; font-size: 12px; font-weight: 700; white-space: nowrap; }
.markdown-selection-ai-toolbar button:hover { background: var(--accent-soft); color: var(--accent-strong); }
.markdown-selection-ai-toolbar button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.markdown-selection-ai-dialog { display: flex; width: min(920px, calc(100vw - 32px)); max-height: calc(100vh - 100px); flex-direction: column; }
.markdown-selection-ai-content { display: grid; min-height: 0; max-height: none; flex: 1 1 auto; gap: 12px; overflow: auto; overscroll-behavior: contain; }
.markdown-selection-ai-content [data-selection-custom-form] { display: grid; gap: 10px; }
.markdown-selection-ai-content [data-selection-custom-form][hidden], .markdown-selection-ai-content [data-selection-loading][hidden], .markdown-selection-ai-content [data-selection-result][hidden] { display: none; }
.markdown-selection-ai-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.markdown-selection-ai-meta small { color: var(--muted); }
.markdown-selection-ai-content [data-selection-result] { min-height: 0; }
.markdown-selection-ai-compare > section { display: flex; min-height: 180px; flex-direction: column; }
.markdown-selection-ai-rendered { min-height: 0; max-height: min(48vh, 560px); flex: 1 1 auto; overflow: auto; overscroll-behavior: contain; padding-right: 4px; }
.markdown-selection-ai-rendered .toastui-editor-contents { font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; font-size: 13px; line-height: 1.72; }
.markdown-selection-ai-rendered .toastui-editor-contents > :first-child { margin-top: 0; }
.markdown-selection-ai-rendered .toastui-editor-contents > :last-child { margin-bottom: 0; }
.markdown-selection-ai-content [data-selection-evidence] { margin: 0; }
.floating-minimized-dock { position: fixed; z-index: 79; overflow: hidden; border: 1px solid color-mix(in srgb,var(--accent) 22%,var(--line)); border-radius: 18px; background: color-mix(in srgb,#fff 90%,var(--accent-soft)); box-shadow: 0 12px 34px rgba(27,45,53,.13); transition: border-color .18s ease, box-shadow .18s ease, opacity .18s ease, transform .18s cubic-bezier(.2,.8,.2,1); }
.floating-minimized-dock[hidden] { display: none; }
.floating-minimized-dock > header { display: flex; height: 34px; align-items: center; gap: 7px; border-bottom: 1px solid color-mix(in srgb,var(--accent) 14%,var(--line)); padding: 0 10px; color: var(--muted); cursor: grab; touch-action: none; user-select: none; }
.floating-minimized-dock > header:active, .floating-minimized-dock.is-dragging > header { cursor: grabbing; }
.floating-minimized-dock > header:focus-visible { outline: 2px solid color-mix(in srgb,var(--accent) 52%,transparent); outline-offset: -3px; }
.floating-minimized-dock > header strong { color: var(--accent-strong); font-size: 11px; font-weight: 720; letter-spacing: .03em; }
.floating-minimized-dock > header [data-floating-minimized-count] { display: inline-grid; min-width: 19px; height: 19px; margin-left: auto; place-items: center; border-radius: 999px; background: color-mix(in srgb,var(--accent) 11%,#fff); color: var(--accent-strong); font-size: 10px; font-weight: 750; }
.floating-minimized-dock-grip { color: color-mix(in srgb,var(--accent) 55%,var(--muted)); font-size: 14px; letter-spacing: -4px; line-height: 1; }
.floating-minimized-dock.is-entering { animation: floating-dock-enter .2s cubic-bezier(.2,.8,.2,1); }
.floating-minimized-dock.is-dragging { border-color: color-mix(in srgb,var(--accent) 44%,var(--line)); box-shadow: 0 18px 42px rgba(27,45,53,.2); }
.ai-floating-dialog { position: fixed; z-index: 80; top: 92px; right: 24px; width: min(430px, calc(100vw - 32px)); border: 1px solid #9aadb2; border-radius: 10px; background: #fff; box-shadow: 0 16px 42px rgba(27,45,53,.22); transition: border-color .18s ease, box-shadow .18s ease; }
.ai-floating-dialog[hidden] { display: none; }
.ai-floating-dialog > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); border-radius: 10px 10px 0 0; background: #eef2f3; padding: 10px 11px 10px 14px; cursor: move; touch-action: none; user-select: none; }
.ai-floating-dialog > header div { min-width: 0; }
.ai-floating-dialog > header strong, .ai-floating-dialog > header small { display: block; }
.ai-floating-dialog > header small { margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 400; }
.ai-floating-dialog > header button { display: inline-grid; width: 27px; height: 27px; flex: 0 0 auto; place-items: center; border: 0; border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; font-size: 20px; }
.ai-floating-dialog > header button:hover { background: rgba(255,255,255,.8); color: var(--ink); }
.ai-dialog-header-actions { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 2px; }
.ai-floating-dialog.is-minimized { top: var(--floating-minimized-top, 116px) !important; right: auto !important; left: var(--floating-minimized-left, 24px) !important; width: var(--floating-minimized-width, min(232px, calc(100vw - 48px))) !important; min-width: 0 !important; height: auto !important; max-height: none; overflow: visible; border-color: color-mix(in srgb,var(--accent) 32%,var(--line)); border-radius: 999px; background: color-mix(in srgb,var(--accent-soft) 72%,#fff); box-shadow: 0 8px 24px rgba(27,45,53,.16); transition: top .2s cubic-bezier(.2,.8,.2,1), left .2s cubic-bezier(.2,.8,.2,1), border-color .18s ease, box-shadow .18s ease; }
.ai-floating-dialog.is-minimized > :not(header) { display: none !important; }
.ai-floating-dialog.is-minimized > header { min-height: 40px; gap: 7px; overflow: hidden; border-bottom-color: transparent; border-radius: inherit; background: transparent; padding: 6px 7px 6px 13px; cursor: default; }
.ai-floating-dialog.is-minimized > header > div { flex: 1 1 auto; overflow: hidden; }
.ai-floating-dialog.is-minimized > header strong { overflow: hidden; color: var(--accent-strong); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.ai-floating-dialog.is-minimized > header small { display: none; }
.ai-floating-dialog.is-minimized > header button { width: 28px; height: 28px; border-radius: 50%; font-size: 16px; }
.ai-floating-dialog.is-minimized > header [data-ai-dialog-close] { color: #738087; font-size: 18px; }
.ai-floating-dialog [data-ai-dialog-minimize] { transition: transform .18s ease, background-color .18s ease, color .18s ease; }
.ai-floating-dialog.is-minimized [data-ai-dialog-minimize] { background: #fff; color: var(--accent-strong); box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--accent) 18%,transparent); }
.ai-floating-dialog.is-ai-processing.is-minimized > header strong::before { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 999px; background: var(--accent); content: ""; vertical-align: 1px; animation: ai-processing-pulse 1.35s ease-in-out infinite; }
.ai-floating-dialog.is-ai-processing > header small::before { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 999px; background: var(--accent); content: ""; vertical-align: 1px; animation: ai-processing-pulse 1.35s ease-in-out infinite; }
.ai-floating-dialog.is-window-transitioning { animation: floating-window-settle .2s cubic-bezier(.2,.8,.2,1); }
.ai-floating-dialog.is-dragging { box-shadow: 0 20px 48px rgba(27,45,53,.28); }
@keyframes floating-window-settle { from { transform: translateY(-3px) scale(.992); opacity: .88; } to { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes floating-dock-enter { from { transform: translateY(-4px) scale(.985); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes ai-processing-pulse { 0%, 100% { opacity: .38; transform: scale(.82); } 50% { opacity: 1; transform: scale(1); } }
.is-dragging-minimized-dock .ai-floating-dialog.is-minimized, .is-dragging-minimized-dock body > .synthesis-reference-pane.is-floating.is-minimized { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .floating-minimized-dock, .ai-floating-dialog, .ai-floating-dialog [data-ai-dialog-minimize], body > .synthesis-reference-pane.is-floating.is-minimized { transition: none; }
  .floating-minimized-dock.is-entering, .ai-floating-dialog.is-window-transitioning, .ai-floating-dialog.is-ai-processing > header small::before { animation: none; }
}
.source-preview-dialog { width: min(760px, calc(100vw - 32px)); }
.source-markdown-preview-body { max-height: calc(100vh - 180px); overflow: auto; padding: 16px; }
.source-markdown-preview-heading { display: grid; gap: 3px; margin-bottom: 12px; }
.source-markdown-preview-heading small { color: var(--muted); }
.source-media-candidates-dialog { width: min(1040px, calc(100vw - 32px)); }
.source-media-candidates-body { max-height: calc(100vh - 150px); overflow: auto; padding: 16px; }
.source-media-candidate-panel { display: grid; gap: 14px; }
.source-media-candidate-heading,
.source-media-candidate-footer,
.source-media-pagination { display: flex; align-items: center; gap: 12px; }
.source-media-candidate-heading { justify-content: space-between; }
.source-media-candidate-heading > div { display: grid; gap: 3px; }
.source-media-candidate-heading small { color: var(--muted); }
.source-media-candidate-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.source-media-candidate { min-width: 0; display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--surface) 94%, transparent); }
.source-media-candidate.is-confirmed { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.source-media-candidate-preview { position: relative; display: grid; place-items: center; min-height: 150px; overflow: hidden; border-radius: 10px; background: var(--bg); }
.source-media-candidate-preview img { width: 100%; height: 168px; object-fit: contain; }
.source-media-candidate-preview > span { position: absolute; right: 7px; bottom: 7px; padding: 3px 7px; border-radius: 999px; color: #fff; background: rgb(20 31 36 / 72%); font-size: 11px; }
.source-media-candidate-select { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 650; }
.source-media-candidate > input[type="text"] { width: 100%; min-width: 0; }
.source-media-candidate-footer { justify-content: space-between; flex-wrap: wrap; position: sticky; bottom: -16px; padding: 12px 0 4px; background: var(--surface); }
.source-media-rights { margin-left: auto; }
@media (max-width: 820px) {
  .source-media-candidate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .source-media-rights { margin-left: 0; width: 100%; }
}
@media (max-width: 560px) {
  .source-media-candidate-grid { grid-template-columns: minmax(0, 1fr); }
}
.markdown-preview-host { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 20px 24px; }
.markdown-preview-host .toastui-editor-contents { font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; font-size: 14px; line-height: 1.7; }
.markdown-preview-plain .markdown-preview-host { border: 0; border-radius: 0; padding: 0; }
.reviewer-report-markdown .toastui-editor-contents > :first-child { margin-top: 0; }
.reviewer-report-markdown .toastui-editor-contents > :last-child { margin-bottom: 0; }
.mermaid-diagram { display: grid; width: 100%; min-width: 0; min-height: 150px; margin: 18px 0; place-items: center; overflow: auto hidden; overscroll-behavior-inline: contain; border: 1px solid #d9e1e4; border-radius: 8px; background: #fbfcfc; padding: 14px; content-visibility: auto; contain-intrinsic-size: 320px 220px; }
.mermaid-diagram svg { display: block; width: min(100%, var(--mermaid-layout-width, var(--mermaid-natural-width, 100%))) !important; max-width: 100% !important; height: auto !important; margin: auto; }
.mermaid-diagram.is-wide { place-items: start; }
.mermaid-diagram.is-wide svg { width: var(--mermaid-layout-width, clamp(820px, var(--mermaid-natural-width, 1200px), 1800px)) !important; max-width: none !important; margin: 0; }
.mermaid-diagram.is-loading::after { content: "正在按需渲染…"; color: var(--muted); font-size: 11px; }
.mermaid-diagram.is-loading .mermaid-diagram-placeholder { display: none; }
.mermaid-diagram-placeholder { color: var(--muted); font-size: 12px; }
.mermaid-diagram.has-error { display: block; min-height: 0; overflow: auto; }
.mermaid-diagram-error { margin: 0 0 10px; color: var(--error); font-size: 12px; }
.mermaid-diagram.has-error pre { margin: 0; }
@media (max-width: 720px) {
  .mermaid-diagram.is-wide svg { width: var(--mermaid-layout-width, clamp(640px, 220%, 1100px)) !important; }
}
.ai-floating-form { display: grid; gap: 12px; padding: 15px; }
.ai-floating-form textarea { min-height: 145px; resize: vertical; }
.ai-floating-form .action-bar { padding-top: 11px; }
.synthesis-ai-target-version { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; white-space: nowrap; }
.synthesis-ai-target-version > span { flex: 0 0 auto; }
.synthesis-ai-target-version select { width: auto; min-width: 0; flex: 1 1 auto; color: var(--accent-strong); font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.synthesis-ai-target-version select:disabled { cursor: not-allowed; opacity: .72; }
.synthesis-ai-instruction-field { position: relative; }
.field-label-with-count { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.field > .field-label-with-count > span { color: inherit; font: inherit; }
.synthesis-ai-instruction-composer { position: relative; overflow: visible; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.synthesis-ai-instruction-composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(49,90,105,.1); }
.synthesis-ai-inline-editor { min-height: 150px; max-height: 310px; overflow: auto; padding: 11px 12px; color: var(--ink); font-size: 13px; line-height: 1.65; outline: none; overflow-wrap: anywhere; white-space: pre-wrap; }
.synthesis-ai-inline-editor:empty::before { color: #819096; content: attr(data-placeholder); pointer-events: none; }
.synthesis-ai-section-badge { display: inline-flex; max-width: min(100%, 360px); align-items: center; gap: 6px; margin: 2px 3px; border: 1px solid #9db8b3; border-radius: 999px; background: #eaf3f1; padding: 3px 5px 3px 9px; color: var(--accent-strong); font-size: 11px; font-weight: 720; line-height: 1.35; vertical-align: middle; user-select: none; }
.synthesis-ai-section-badge > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.synthesis-ai-section-badge button { display: inline-grid; width: 19px; height: 19px; flex: 0 0 auto; place-items: center; border: 0; border-radius: 50%; background: rgba(49,90,105,.1); color: inherit; cursor: pointer; line-height: 1; }
.synthesis-ai-section-menu { position: absolute; z-index: 6; width: min(380px, calc(100% - 16px)); max-height: 260px; overflow: auto; overscroll-behavior: contain; border: 1px solid #afbdc1; border-radius: 8px; background: #fff; box-shadow: 0 12px 28px rgba(27,45,53,.18); }
.synthesis-ai-section-menu-heading { position: sticky; z-index: 1; top: 0; display: grid; grid-template-columns: auto minmax(0,1fr); align-items: start; gap: 10px; border-bottom: 1px solid var(--line); background: #f6f8f8; padding: 9px 11px; }
.synthesis-ai-section-menu-heading strong { white-space: nowrap; }
.synthesis-ai-section-menu-heading small { color: var(--muted); line-height: 1.4; text-align: right; }
.synthesis-ai-section-option { display: grid; width: 100%; grid-template-columns: 29px minmax(0, 1fr); align-items: start; gap: 8px; border: 0; border-bottom: 1px solid #edf0f1; background: #fff; padding: 9px 11px; color: var(--ink); cursor: pointer; text-align: left; }
.synthesis-ai-section-option:hover, .synthesis-ai-section-option:focus-visible, .synthesis-ai-section-option.is-active { background: #edf4f3; outline: none; }
.synthesis-ai-section-option:disabled { cursor: not-allowed; opacity: .46; }
.synthesis-ai-section-option[data-selected="true"] { background: #edf4f3; opacity: .72; }
.synthesis-ai-section-option > span:first-child { color: var(--muted); font-size: 10px; font-weight: 700; }
.synthesis-ai-section-option-copy { display: grid; min-width: 0; gap: 2px; }
.synthesis-ai-section-option-copy strong { min-width: 0; overflow-wrap: anywhere; font-size: 12px; line-height: 1.45; }
.synthesis-ai-section-option-copy small { overflow: hidden; color: var(--muted); font-size: 10px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.synthesis-ai-section-tip { position: fixed; z-index: 90; max-height: min(62vh, 560px); overflow: auto; overscroll-behavior: contain; border: 1px solid #becac8; border-radius: 10px; background: #fff; box-shadow: 0 18px 48px rgba(25,42,49,.22); }
.synthesis-ai-section-tip > header { position: sticky; z-index: 2; top: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); background: rgba(248,250,249,.97); padding: 11px 13px; }
.synthesis-ai-section-tip > header div { display: grid; min-width: 0; gap: 2px; }
.synthesis-ai-section-tip > header small { color: var(--accent); font-size: 9px; font-weight: 760; }
.synthesis-ai-section-tip > header strong { overflow-wrap: anywhere; font-size: 12px; line-height: 1.4; }
.synthesis-ai-section-tip > header > span { flex: 0 0 auto; color: var(--muted); font-size: 9px; }
.synthesis-ai-section-tip-body { padding: 12px 14px 14px; }
.synthesis-ai-section-tip-body pre { margin: 0; color: var(--ink); font-family: inherit; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; white-space: pre-wrap; }
.synthesis-ai-section-tip-body .toastui-editor-contents { font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; font-size: 12px; line-height: 1.65; }
.synthesis-ai-section-tip-body .toastui-editor-contents > :first-child { margin-top: 0; }
.synthesis-ai-section-tip-body .toastui-editor-contents > :last-child { margin-bottom: 0; }
@media (max-width: 760px) { .synthesis-ai-section-tip { display: none; } }
.markdown-source { min-height: 520px; border-radius: 0 0 8px 8px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.markdown-workbench.is-enhanced > .markdown-source { display: none; }
.markdown-editor-host[hidden], .markdown-viewer-host[hidden], .markdown-revision-host[hidden], .markdown-revision-line[hidden] { display: none; }
.markdown-workbench .toastui-editor-defaultUI { border-color: var(--line); border-radius: 0 0 8px 8px; }
.markdown-workbench .toastui-editor-toolbar { border-radius: 0; }
.markdown-workbench .toastui-editor-md-tab-container { display: none; }
.markdown-workbench .toastui-editor-contents { font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; font-size: 15px; line-height: 1.75; }
/* Keep the editable synthesis and read-only references on one typography scale. */
.synthesis-compare-panel .synthesis-compare-pane .toastui-editor-contents,
.synthesis-compare-panel .synthesis-compare-pane .toastui-editor-md-container .ProseMirror { font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; font-size: 14px; line-height: 1.7; }
/* Toast UI defaults H3 to a line-height smaller than its font, which overlaps adjacent editable blocks. */
.synthesis-core-pane .toastui-editor-ww-container .toastui-editor-contents h3 { margin: 1.35em 0 .6em; line-height: 1.4; }
.markdown-viewer-host { min-height: 520px; overflow: auto; border: 1px solid var(--line); border-radius: 0 0 8px 8px; background: #fff; padding: 26px 32px; }
.markdown-revision-host { height: 520px; overflow: auto; border: 1px solid var(--line); border-radius: 0 0 8px 8px; background: #fff; }
.markdown-revision-summary { position: sticky; z-index: 2; top: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 7px 16px; border-bottom: 1px solid var(--line); background: rgba(248,250,251,.96); padding: 10px 14px; color: var(--muted); font-size: 12px; backdrop-filter: blur(6px); }
.markdown-revision-summary strong { color: var(--ink); }
.markdown-revision-legend { margin-left: auto; }
.markdown-revision-context-toggle, .review-target-link { border: 0; background: transparent; padding: 2px 4px; color: var(--accent); cursor: pointer; font-size: 11px; }
.markdown-revision-context-toggle:hover, .review-target-link:hover { text-decoration: underline; }
.markdown-revision-body { display: grid; gap: 8px; padding: 12px 14px 18px; }
.markdown-revision-block { position: relative; min-width: 0; border-left: 3px solid transparent; border-radius: 4px; padding: 10px 14px 8px 58px; }
.markdown-revision-block[hidden] { display: none; }
.markdown-revision-block-marker { position: absolute; top: 12px; left: 10px; color: #87949b; font-size: 10px; font-weight: 760; }
.markdown-revision-rendered .toastui-editor-contents { font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; font-size: 14px; line-height: 1.7; }
.markdown-revision-rendered .toastui-editor-contents > :first-child { margin-top: 0; }
.markdown-revision-rendered .toastui-editor-contents > :last-child { margin-bottom: 0; }
.markdown-revision-block.is-insert { border-left-color: #5b9b78; background: #eaf5ee; }
.markdown-revision-block.is-insert .markdown-revision-block-marker { color: #267248; }
.markdown-revision-block.is-delete { border-left-color: #c67373; background: #faeded; }
.markdown-revision-block.is-delete .markdown-revision-block-marker { color: #9e3f3f; }
.markdown-revision-block.is-delete .markdown-revision-rendered { color: #8d4a4a; text-decoration: line-through; text-decoration-thickness: 1px; }
.markdown-revision-block.is-targeted { outline: 2px solid #d7a84d; outline-offset: -2px; }
.markdown-revision-collapsed { border-top: 1px dashed #d9dfe2; border-bottom: 1px dashed #d9dfe2; background: #f8fafb; padding: 4px 44px; }
.markdown-revision-collapsed button { border: 0; background: transparent; padding: 3px 0; color: var(--accent); cursor: pointer; font-size: 11px; }
.markdown-revision-empty { margin: 40px 24px; border: 1px dashed var(--line); border-radius: 7px; padding: 24px; color: var(--muted); text-align: center; }
.artifact-layout { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 18px; margin-top: 18px; }
.artifact-layout:has(.feedback-panel-details:not([open])) { grid-template-columns: minmax(0,1fr) 44px; gap: 10px; }
.artifact-layout.is-review-workspace { grid-template-columns: minmax(0,1fr); }
.artifact-layout.is-review-workspace .preview-frame { min-height: 0; background: #fff; }
.artifact-binding-form { max-width: none; margin-bottom: 18px; }
.artifact-generation-command-panel { margin: 0 0 18px; border: 1px solid color-mix(in srgb,var(--accent) 24%,var(--line)); border-radius: 10px; background: #fff; padding: 16px; box-shadow: 0 8px 24px rgba(24,33,38,.05); }
.artifact-generation-command-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.artifact-generation-command-heading h3 { margin: 2px 0 0; font-size: 17px; }
.artifact-generation-command-heading p { margin: 0; }
.artifact-generation-panel { margin: 0 0 18px; border: 1px solid var(--line); border-radius: 10px; background: #fff; scroll-margin-top: 76px; }
.artifact-generation-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 18px; cursor: pointer; list-style: none; }
.artifact-generation-heading::-webkit-details-marker { display: none; }
.artifact-generation-heading::before { content: "▸"; flex: 0 0 auto; margin-top: 22px; color: var(--muted); font-size: 12px; }
.artifact-generation-panel[open] > .artifact-generation-heading::before { content: "▾"; }
.artifact-generation-panel[open] > .artifact-generation-heading { border-bottom: 1px solid var(--line); }
.artifact-generation-heading:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; border-radius: 9px; }
.artifact-generation-heading h3 { margin: 2px 0 5px; font-size: 18px; }
.artifact-generation-heading p { margin: 0; }
.artifact-generation-heading > div { flex: 1 1 auto; min-width: 0; }
.artifact-generation-heading-meta { display: flex; flex: 0 1 auto !important; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.artifact-theme-badge { border-color: color-mix(in srgb,var(--accent) 30%,var(--line)); background: var(--accent-soft); color: var(--accent-strong); }
.artifact-theme-badge.is-draft { border-style: dashed; background: #fff8e8; color: #85631d; }
.artifact-generation-body { padding: 0 18px 18px; }
.artifact-generation-steps { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 0; margin: 18px 0; border-block: 1px solid var(--line); padding: 0; list-style: none; }
.artifact-generation-steps button { position: relative; display: grid; grid-template-columns: 26px minmax(0,1fr); gap: 9px; min-width: 0; border: 0; border-right: 1px solid var(--line); background: transparent; padding: 12px; color: inherit; text-align: left; cursor: pointer; }
.artifact-generation-steps button:last-child { border-right: 0; }
.artifact-generation-steps button > span { display: grid; width: 26px; height: 26px; place-items: center; border: 1px solid #bec9ce; border-radius: 50%; color: var(--muted); font-size: 12px; font-weight: 750; }
.artifact-generation-steps button strong, .artifact-generation-steps button small { display: block; overflow-wrap: anywhere; }
.artifact-generation-steps button strong { font-size: 13px; }
.artifact-generation-steps button small { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.artifact-generation-steps button:hover { background: color-mix(in srgb,var(--accent) 3%,#fff); }
.artifact-generation-steps button:focus-visible { z-index: 1; outline: 2px solid var(--accent); outline-offset: -2px; }
.artifact-generation-steps button[aria-selected="true"] { box-shadow: inset 0 -3px var(--accent); }
.artifact-generation-steps button.complete > span { border-color: var(--good); background: var(--good); color: #fff; }
.artifact-generation-steps button.current { background: color-mix(in srgb, var(--accent) 5%, #fff); }
.artifact-generation-steps button.current > span { border-color: var(--accent); color: var(--accent); }
.artifact-generation-steps button.running { background: color-mix(in srgb, var(--accent) 7%, #fff); }
.artifact-generation-steps button.running > span { border-color: var(--accent); color: var(--accent); animation: artifact-generation-pulse 1.4s ease-in-out infinite; }
.artifact-generation-steps button.failed { background: #fff6f4; }
.artifact-generation-steps button.failed > span { border-color: #b75548; color: #b75548; }
.artifact-generation-tabpanel { display: none; min-width: 0; }
.artifact-generation-tabpanel.is-active { display: block; }
.artifact-generation-tabpanel[hidden] { display: none; }
.workspace-panel[data-artifact-generation-active-tab="generation"] .artifact-generation-tabpanel[data-artifact-generation-tabpanel="generation"].is-active:not([hidden]) { display: block; }
.artifact-tabpanel-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 0 14px; }
.artifact-tabpanel-heading strong { font-size: 14px; }
.artifact-tabpanel-heading small { color: var(--muted); text-align: right; }
.artifact-generation-settings { display: grid; gap: 0; border-top: 1px solid var(--line); }
.artifact-generation-settings > fieldset { min-width: 0; border-bottom: 1px solid var(--line); padding: 16px 0; }
.artifact-generation-settings .action-bar { padding-top: 16px; }
.artifact-engine-selector { grid-template-columns: repeat(3,minmax(0,1fr)); }
.artifact-engine-selector label { position: relative; grid-template-columns: auto minmax(0,1fr); min-height: 88px; align-content: start; padding: 14px 16px; transition: border-color .16s ease,background .16s ease,box-shadow .16s ease; }
.artifact-engine-selector label:has(input:checked) { border-color: color-mix(in srgb,var(--accent) 55%,var(--line)); background: color-mix(in srgb,var(--accent) 5%,#fff); box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--accent) 18%,transparent); }
.artifact-engine-selector label > span { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 10px; }
.artifact-engine-selector label > span strong { font-size: 14px; }
.artifact-engine-selector label > span em { flex: 0 0 auto; border-radius: 999px; background: #eef2f3; padding: 2px 7px; color: var(--muted); font-size: 10px; font-style: normal; font-weight: 680; }
.artifact-engine-selector label:has(input:checked) > span em { background: var(--accent-soft); color: var(--accent-strong); }
.artifact-engine-selector label small { line-height: 1.55; }
.artifact-engine-selector label.is-unavailable { border-style: dashed; background: #f7f8f8; cursor: default; opacity: .72; }
.artifact-engine-selector label.is-unavailable input { cursor: not-allowed; }
.artifact-pipeline-contracts { border-bottom: 1px solid var(--line); padding: 14px 0; }
.artifact-pipeline-contracts article { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(280px,1fr); align-items: center; gap: 18px; border-left: 3px solid var(--accent); border-radius: 7px; background: color-mix(in srgb,var(--accent) 4%,#fff); padding: 12px 14px; }
.artifact-pipeline-contracts article[hidden] { display: none !important; }
.artifact-pipeline-contracts article > div { display: grid; min-width: 0; gap: 3px; }
.artifact-pipeline-contracts article > div > span { color: var(--accent); font-size: 10px; font-weight: 750; letter-spacing: .05em; }
.artifact-pipeline-contracts article > div > strong { font-size: 13px; }
.artifact-pipeline-contracts article small { color: var(--muted); line-height: 1.5; }
.artifact-pipeline-contracts dl { display: grid; min-width: 0; gap: 5px; margin: 0; }
.artifact-pipeline-contracts dl > div { display: grid; grid-template-columns: 64px minmax(0,1fr); gap: 8px; font-size: 11px; line-height: 1.45; }
.artifact-pipeline-contracts dt { color: var(--muted); }
.artifact-pipeline-contracts dd { min-width: 0; margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.artifact-media-selector { grid-template-columns: repeat(3,minmax(0,1fr)); }
.artifact-font-selector { display: grid; grid-template-columns: minmax(220px,.8fr) minmax(300px,1.2fr); align-items: end; gap: 10px 18px; margin: 0; border: 0; }
.artifact-font-selector[hidden] { display: none !important; }
.artifact-font-selector > legend { grid-column: 1 / -1; margin-bottom: 2px; padding: 0; font-size: 13px; font-weight: 680; }
.artifact-font-selector .field { margin: 0; }
.artifact-font-contract { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 3px 10px; border-left: 3px solid color-mix(in srgb,var(--accent) 42%,var(--line)); border-radius: 6px; background: color-mix(in srgb,var(--accent) 3%,#fff); padding: 9px 11px; }
.artifact-font-contract span { grid-row: 1 / 3; align-self: center; color: var(--muted); font-size: 10px; }
.artifact-font-contract strong { min-width: 0; font-size: 11px; overflow-wrap: anywhere; }
.artifact-font-selector > .helper { grid-column: 1 / -1; }
.artifact-engine-provenance { display: grid; gap: 3px; margin-bottom: 0; }
.artifact-generation-failure { display: grid; gap: 3px; margin: 0 0 16px; }
.artifact-generation-failure span, .artifact-generation-failure small { display: block; }
.artifact-visual-review { display: grid; gap: 14px; margin: 0 0 18px; border-block: 1px solid var(--line); padding: 16px 0; }
.artifact-visual-review.is-console-workspace { margin: 0; border-bottom: 0; padding: 16px; }
.artifact-visual-review-console-notice { align-items: center; justify-content: space-between; }
.artifact-visual-review-heading, .artifact-visual-review-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.artifact-visual-review-heading > div:first-child, .artifact-visual-review-footer > div:first-child { min-width: 0; }
.artifact-visual-review-heading strong, .artifact-visual-review-heading small, .artifact-visual-review-footer strong, .artifact-visual-review-footer small { display: block; }
.artifact-visual-review-heading small, .artifact-visual-review-footer small { margin-top: 3px; color: var(--muted); line-height: 1.5; }
.artifact-visual-review-counts { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.artifact-visual-review-toolbar { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 12px; }
.artifact-visual-review-filter { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: 5px; border: 0; padding: 0; }
.artifact-visual-review-filter legend { float: left; margin-right: 4px; color: var(--muted); font-size: 10px; }
.artifact-visual-review-filter label { cursor: pointer; }
.artifact-visual-review-filter input { position: absolute; width: auto; opacity: 0; pointer-events: none; }
.artifact-visual-review-filter span { display: block; border: 1px solid var(--line); border-radius: 999px; padding: 4px 9px; background: #fff; color: var(--muted); font-size: 10px; }
.artifact-visual-review-filter input:checked + span { border-color: color-mix(in srgb,var(--accent) 38%,var(--line)); background: color-mix(in srgb,var(--accent) 7%,#fff); color: var(--accent-strong); font-weight: 700; }
.artifact-visual-review:has(.artifact-visual-review-filter input[value="pending"]:checked) .artifact-visual-review-card:not(.is-pending),
.artifact-visual-review:has(.artifact-visual-review-filter input[value="rejected"]:checked) .artifact-visual-review-card:not(.is-rejected),
.artifact-visual-review:has(.artifact-visual-review-filter input[value="approved"]:checked) .artifact-visual-review-card:not(.is-approved) { display: none; }
.artifact-visual-review-pager { display: flex; min-width: 0; align-items: center; gap: 6px; }
.artifact-visual-review-pager label { display: grid; min-width: 0; grid-template-columns: auto minmax(150px,260px); align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.artifact-visual-review-pager select { min-width: 0; height: 30px; padding-block: 3px; font-size: 11px; }
.artifact-visual-review-pager > button { width: 30px; height: 30px; padding: 0; }
.artifact-visual-review-position { min-width: 92px; color: var(--muted); font-size: 10px; text-align: center; }
.artifact-visual-review-grid { display: block; width: min(100%,1120px); margin-inline: auto; }
.artifact-visual-review-card { overflow: hidden; min-width: 0; scroll-margin-top: 8px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.artifact-visual-review-card[hidden] { display: none !important; }
.artifact-visual-review-empty { border: 1px dashed var(--line); border-radius: 9px; padding: 32px 18px; color: var(--muted); text-align: center; }
.artifact-visual-review-empty[hidden] { display: none; }
.artifact-visual-review-card.is-approved { border-color: color-mix(in srgb,var(--good) 42%,var(--line)); }
.artifact-visual-review-card.is-rejected { border-color: #dfb4ad; background: #fffaf8; }
.artifact-visual-review-preview { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 9; border-bottom: 1px solid var(--line); background: #eef1f2; cursor: default; }
.artifact-visual-review-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }
.artifact-visual-review-card:has(.artifact-visual-review-reject[open]) .artifact-visual-review-preview { cursor: crosshair; }
.artifact-visual-review-annotation-layer { position: absolute; inset: 0; pointer-events: none; }
.artifact-visual-review-marker { position: absolute; left: calc(var(--marker-x) * 1%); top: calc(var(--marker-y) * 1%); display: block; width: 44px; height: 44px; border: 0; background: transparent; padding: 0; transform: translate(-40px,-40px); color: #b43f32; filter: drop-shadow(0 1px 1px rgb(255 255 255 / .9)); cursor: pointer; pointer-events: auto; }
.artifact-visual-review-marker:is(:hover,:focus-visible,.is-selected) { color: #8f241b; filter: drop-shadow(0 0 3px rgb(255 255 255 / 1)); outline: none; }
.artifact-visual-review-marker::before { position: absolute; left: 9px; top: 20px; width: 38px; height: 3px; border-radius: 999px; background: currentColor; content: ""; transform: rotate(45deg); transform-origin: left center; }
.artifact-visual-review-marker::after { position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-right: 3px solid currentColor; border-bottom: 3px solid currentColor; content: ""; }
.artifact-visual-review-marker b { position: absolute; left: 0; top: 9px; display: grid; width: 20px; height: 20px; place-items: center; border: 2px solid #fff; border-radius: 50%; background: #b43f32; color: #fff; font-size: 10px; line-height: 1; }
.artifact-visual-review-annotation-hint { position: absolute; right: 7px; bottom: 7px; display: none; border-radius: 999px; background: rgb(30 36 39 / .78); padding: 4px 8px; color: #fff; font-size: 9px; pointer-events: none; }
.artifact-visual-review-card:has(.artifact-visual-review-reject[open]) .artifact-visual-review-annotation-hint { display: block; }
.artifact-visual-review-annotation-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.artifact-visual-review-annotation-tools small { color: var(--muted); font-size: 10px; }
.artifact-visual-review-annotation-list { display: grid; gap: 6px; }
.artifact-visual-review-annotation-list[hidden] { display: none; }
.artifact-visual-review-annotation-row { display: grid; grid-template-columns: 24px minmax(0,1fr) auto; align-items: end; gap: 7px; border: 1px solid var(--line); border-radius: 7px; background: #fbfcfc; padding: 7px; }
.artifact-visual-review-annotation-row.is-selected { border-color: color-mix(in srgb,#b43f32 45%,var(--line)); background: #fff8f6; }
.artifact-visual-review-annotation-badge { display: grid; width: 24px; height: 24px; place-items: center; align-self: center; border-radius: 50%; background: #b43f32; color: #fff; font-size: 10px; font-weight: 760; }
.artifact-visual-review-annotation-row .field { gap: 3px; }
.artifact-visual-review-annotation-row .field > span { font-size: 9px; }
.artifact-visual-review-annotation-row input { min-width: 0; height: 32px; font-size: 10px; }
.artifact-visual-review-annotation-row > .button { align-self: end; }
.artifact-visual-review-card-body { display: grid; gap: 9px; padding: 10px; }
.artifact-visual-review-card-title { display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 8px; align-items: center; }
.artifact-visual-review-card-title > span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 6px; background: #f0f3f4; color: var(--muted); font-size: 10px; font-weight: 760; }
.artifact-visual-review-card-title strong, .artifact-visual-review-card-title small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.artifact-visual-review-card-title strong { font-size: 14px; }
.artifact-visual-review-card-title small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.artifact-visual-review-feedback { display: grid; gap: 2px; margin: 0; border-left: 2px solid #c96f62; padding-left: 8px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.artifact-visual-review-feedback b { color: var(--ink); }
.artifact-visual-review-actions { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.artifact-visual-review-reject { min-width: 0; flex: 1 1 auto; }
.artifact-visual-review-reject > summary { color: var(--accent); font-size: 10px; text-align: right; cursor: pointer; }
.artifact-visual-review-reject form { display: grid; gap: 7px; margin-top: 8px; border-top: 1px solid var(--line); padding-top: 8px; }
.artifact-visual-review-reject textarea { min-height: 68px; font-size: 11px; }
.artifact-visual-review-footer { position: sticky; bottom: 0; border: 1px solid var(--line); border-radius: 9px; background: color-mix(in srgb,#fff 94%,var(--accent-soft)); padding: 12px 14px; }
.artifact-reconstruction-console-controls { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); background: color-mix(in srgb,var(--accent) 4%,#fff); padding: 12px 16px; }
.artifact-reconstruction-console-controls > div:first-child { display: grid; min-width: 0; gap: 3px; }
.artifact-reconstruction-console-controls strong, .artifact-reconstruction-console-controls small, .artifact-reconstruction-console-controls span { display: block; }
.artifact-reconstruction-console-controls small, .artifact-reconstruction-console-controls > div:first-child > span { color: var(--muted); font-size: 11px; line-height: 1.5; }
.artifact-reconstruction-console-controls form { margin: 0; }
.artifact-contract-feedback { display: grid; gap: 8px; margin: 0 0 16px; }
.artifact-contract-feedback .notice { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.artifact-contract-feedback .notice strong, .artifact-contract-feedback .notice span { display: block; }
.artifact-contract-feedback .notice span { margin-top: 2px; }
@media (max-width: 720px) {
  .artifact-font-selector { grid-template-columns: 1fr; }
  .artifact-font-contract, .artifact-font-selector > .helper { grid-column: 1; }
  .artifact-contract-feedback .notice { align-items: stretch; flex-direction: column; }
  .artifact-visual-review-heading, .artifact-visual-review-footer { align-items: stretch; flex-direction: column; }
  .artifact-visual-review-counts { justify-content: flex-start; }
  .artifact-visual-review-toolbar { align-items: stretch; flex-direction: column; }
  .artifact-visual-review-pager { width: 100%; }
  .artifact-visual-review-pager label { flex: 1 1 auto; grid-template-columns: auto minmax(0,1fr); }
  .artifact-visual-review-position { min-width: 78px; }
  .artifact-visual-review-console-notice, .artifact-reconstruction-console-controls { align-items: stretch; flex-direction: column; }
}
.artifact-generation-live { display: grid; grid-template-columns: minmax(120px,1fr) auto; gap: 6px 12px; align-items: center; margin: 0 0 16px; }
.artifact-generation-live > span { overflow: hidden; height: 6px; border-radius: 99px; background: #e8edef; }
.artifact-generation-live > span i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .35s ease; }
.artifact-generation-live strong { color: var(--accent); font-size: 12px; }
.artifact-generation-live small { grid-column: 1 / -1; color: var(--muted); }
.artifact-page-progress { display: grid; gap: 10px; margin: 16px 0 0; border-top: 1px solid var(--line); padding: 14px 0 0; }
.artifact-page-progress-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.artifact-page-progress-heading strong, .artifact-page-progress-heading small { display: block; }
.artifact-page-progress-heading strong { font-size: 13px; }
.artifact-page-progress-heading small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.artifact-media-summary { display: flex; min-width: 0; flex-wrap: wrap; gap: 5px; align-items: center; }
.artifact-media-summary strong { margin-right: 3px; font-size: 10px; color: var(--muted); }
.artifact-media-summary span { border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line)); border-radius: 999px; padding: 3px 7px; background: color-mix(in srgb, var(--accent) 5%, #fff); color: var(--accent-strong); font-size: 9px; }
.artifact-page-progress-list { display: grid; max-height: 310px; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; overflow: auto; padding-right: 4px; scrollbar-gutter: stable; }
.artifact-page-progress-item { min-width: 0; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.artifact-page-progress-item summary { display: grid; min-height: 48px; grid-template-columns: 30px minmax(0,1fr) 7px; gap: 8px; align-items: center; padding: 7px 9px; cursor: pointer; list-style: none; }
.artifact-page-progress-item summary::-webkit-details-marker { display: none; }
.artifact-page-number { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 6px; background: #f1f4f4; color: var(--muted); font-size: 10px; font-weight: 760; }
.artifact-page-progress-item summary strong, .artifact-page-progress-item summary small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.artifact-page-progress-item summary strong { font-size: 11px; }
.artifact-page-progress-item summary small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.artifact-page-progress-item summary i { width: 6px; height: 6px; border-radius: 50%; background: #c7ced1; }
.artifact-page-progress-item.is-completed summary i { background: var(--good); }
.artifact-page-progress-item.is-reused summary i { background: var(--accent); }
.artifact-page-progress-item.is-running { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 4%, #fff); }
.artifact-page-progress-item.is-running summary i { background: var(--accent); animation: artifact-generation-pulse 1.4s ease-in-out infinite; }
.artifact-page-progress-item.is-failed { border-color: #e3b9b3; background: #fff8f6; }
.artifact-page-progress-item.is-failed summary i { background: #b75548; }
.artifact-page-progress-meta { display: flex; min-width: 0; flex-wrap: wrap; gap: 4px; border-top: 1px solid var(--line); padding: 7px 9px; }
.artifact-page-progress-meta code, .artifact-page-progress-meta span, .artifact-page-progress-meta a { max-width: 100%; overflow: hidden; border-radius: 999px; padding: 2px 6px; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.artifact-page-progress-meta code { background: #f0f2f3; color: var(--muted); }
.artifact-page-progress-meta span { background: color-mix(in srgb, var(--accent) 9%, #fff); color: var(--accent-strong); }
.artifact-page-progress-meta span.is-contract { border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line)); background: color-mix(in srgb, var(--accent) 4%, #fff); font-weight: 700; }
.artifact-page-progress-meta span.is-block { background: #f3f4f4; color: var(--muted); }
.artifact-page-progress-meta span.is-composition { background: color-mix(in srgb, var(--good) 8%, #fff); color: color-mix(in srgb, var(--good) 74%, var(--ink)); }
.artifact-page-progress-meta > small { flex: 1 0 100%; color: var(--muted); font-size: 9px; line-height: 1.4; }
.artifact-page-progress-meta > small b { color: var(--ink); font-weight: 650; }
.artifact-page-progress-meta a { margin-left: auto; border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line)); color: var(--accent); text-decoration: none; }
.artifact-page-progress-meta a:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, #fff); }
.artifact-handoff-inline { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 16px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 9px; background: #f7f8f8; }
.artifact-binding-tab-summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid var(--line); border-radius: 9px; background: #f7f8f8; padding: 14px; }
.artifact-binding-tab-summary strong, .artifact-binding-tab-summary p, .artifact-binding-tab-summary small { display: block; }
.artifact-binding-tab-summary p { margin: 4px 0; color: var(--muted); }
.artifact-handoff-inline > div { min-width: 0; }
.artifact-handoff-inline p { margin: 3px 0; color: var(--muted); font-size: 12px; }
.artifact-handoff-inline small { overflow-wrap: anywhere; color: var(--muted); }
.artifact-generation-primary-actions { display: grid; gap: 14px; margin: 0; border: 1px solid var(--line); border-radius: 9px; background: #f7f8f8; padding: 14px; }
.artifact-generation-primary-actions > div { min-width: 0; }
.artifact-generation-primary-actions strong, .artifact-generation-primary-actions small { display: block; }
.artifact-generation-primary-actions small { margin-top: 4px; color: var(--muted); }
.artifact-generation-action-stack { display: grid; width: 100%; min-width: 0; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.artifact-generation-launch-form { display: grid; grid-template-columns: auto minmax(180px,1fr) minmax(190px,auto); align-items: end; gap: 10px; }
.artifact-generation-scope-switch { display: inline-flex; align-self: flex-end; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.artifact-generation-scope-switch label { cursor: pointer; }
.artifact-generation-scope-switch input { position: absolute; width: auto; opacity: 0; pointer-events: none; }
.artifact-generation-scope-switch span { display: block; padding: 8px 10px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.artifact-generation-scope-switch label + label span { border-left: 1px solid var(--line); }
.artifact-generation-scope-switch input:checked + span { background: color-mix(in srgb, var(--accent) 9%, #fff); color: var(--accent-strong); font-weight: 700; }
.artifact-generation-page-limit { min-width: 176px; margin: 0; }
.artifact-generation-page-limit small { max-width: 260px; }
.artifact-generation-page-range { display: none; align-items: flex-end; gap: 7px; }
.artifact-generation-launch-form:has(input[name="generation_scope"][value="range"]:checked) [data-artifact-preset-scope] { display: none; }
.artifact-generation-launch-form:has(input[name="generation_scope"][value="range"]:checked) [data-artifact-range-scope] { display: flex; }
.artifact-generation-page-range[hidden], .artifact-generation-page-limit[hidden] { display: none; }
.artifact-generation-page-range .field { width: 84px; margin: 0; }
.artifact-generation-page-range > span { padding-bottom: 9px; color: var(--muted); }
.artifact-generation-launch-form > .button.primary { min-width: 190px; min-height: 40px; justify-content: center; white-space: nowrap; }
.artifact-generation-launch-form > .button.primary:disabled { opacity: .62; border-color: #aab4b8; background: #6f7f86; color: #fff; }
.artifact-generation-action-notes { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.artifact-generation-action-notes > small { max-width: 500px; color: var(--muted); line-height: 1.5; }
.artifact-generation-action-notes form { flex: 0 0 auto; }
.artifact-generation-reset:not(:disabled) { color: #8d433b; }
@keyframes artifact-generation-pulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 12%, transparent); } }
.artifact-readiness { margin-top: -6px; }
.artifact-binding-panel { margin: 0 0 18px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.artifact-binding-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; cursor: pointer; list-style: none; padding: 15px 18px; }
.artifact-binding-heading::-webkit-details-marker { display: none; }
.artifact-binding-heading::before { content: "▸"; flex: 0 0 auto; margin-top: 17px; color: var(--muted); font-size: 12px; }
.artifact-binding-panel[open] > .artifact-binding-heading::before { content: "▾"; }
.artifact-binding-panel[open] > .artifact-binding-heading { border-bottom: 1px solid var(--line); }
.artifact-binding-heading:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; border-radius: 9px; }
.artifact-binding-heading > div { flex: 1 1 auto; min-width: 0; }
.artifact-binding-heading h3 { margin: 2px 0 5px; font-size: 17px; }
.artifact-binding-heading p { margin: 0; }
.artifact-binding-body { padding: 18px; }
.source-editor-dialog { width: min(980px, calc(100vw - 32px)); }
.source-editor-body { max-height: calc(100vh - 180px); overflow: auto; padding: 16px; }
.source-editor-workbench { margin: 0; border: 0; border-radius: 0; padding: 0; }
.source-editor-workbench .markdown-editor-shell { min-height: 0; }
.theme-visual-selector { grid-column: 1 / -1; min-width: 0; margin: 0; border: 0; padding: 0; }
.theme-visual-selector > legend { margin-bottom: 8px; padding: 0; font-size: 13px; font-weight: 680; }
.theme-visual-selector > .helper { display: block; margin-top: 8px; }
.theme-visual-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.theme-visual-option { position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.theme-visual-option:hover { border-color: #9eb8c4; transform: translateY(-1px); }
.theme-visual-option:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(49,104,128,.14); }
.theme-visual-option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-visual-option input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.theme-preview { display: block; width: 100%; aspect-ratio: 2 / 1; border-bottom: 1px solid var(--line); background-repeat: no-repeat; background-size: 300% 400%; }
.theme-preview-1 { background-position: 0 0; }
.theme-preview-2 { background-position: 50% 0; }
.theme-preview-3 { background-position: 100% 0; }
.theme-preview-4 { background-position: 0 33.333%; }
.theme-preview-5 { background-position: 50% 33.333%; }
.theme-preview-6 { background-position: 100% 33.333%; }
.theme-preview-7 { background-position: 0 66.667%; }
.theme-preview-8 { background-position: 50% 66.667%; }
.theme-preview-9 { background-position: 100% 66.667%; }
.theme-preview-10 { background-position: 0 100%; }
.theme-preview-11 { background-position: 50% 100%; }
.theme-preview-12 { background-position: 100% 100%; }
.theme-preview-ppt-master {
  background-color: #f5f5f2;
  background-position: center;
  background-size: cover;
}
.theme-preview-composer-editorial {
  background:
    linear-gradient(90deg, transparent 0 7%, #aa7a37 7% 8%, transparent 8% 100%),
    linear-gradient(0deg, #1d1b17 0 16%, transparent 16% 100%),
    linear-gradient(90deg, #d8c3a2 0 54%, #f5f0e7 54% 100%);
  background-size: cover;
}
.theme-preview-composer-swiss {
  background:
    radial-gradient(circle at 78% 28%, #df3028 0 9%, transparent 9.5%),
    repeating-linear-gradient(0deg, transparent 0 19px, rgba(17,17,17,.13) 19px 20px),
    repeating-linear-gradient(90deg, transparent 0 31px, rgba(17,17,17,.13) 31px 32px),
    #f8f8f6;
  background-size: cover;
}
.theme-preview-composer-consulting {
  background:
    linear-gradient(90deg, #8b1e1e 0 7px, transparent 7px),
    linear-gradient(0deg, transparent 0 67%, rgba(17,17,17,.14) 67% 68%, transparent 68%),
    linear-gradient(90deg, transparent 0 57%, rgba(17,17,17,.12) 57% 57.5%, transparent 57.5%),
    linear-gradient(135deg, #fbfbf8 0 58%, #eee1dc 58% 100%);
  background-size: cover;
}
.theme-visual-caption { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; padding: 9px 10px 10px; }
.theme-visual-caption strong { min-width: 0; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.theme-visual-caption small { display: flex; flex: 0 0 auto; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; }
.theme-visual-caption em { border-radius: 999px; background: var(--accent-soft); padding: 2px 5px; color: var(--accent); font-style: normal; font-weight: 700; }
.artifact-media-selector { grid-column: 1 / -1; align-self: start; }
.inline-actions, .feedback-task-actions { display: flex; align-items: center; gap: 8px; }
.inline-actions form { margin: 0; }
.feedback-task-actions { align-items: stretch; flex-direction: column; margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.feedback-task-actions form { margin: 0; }
.preview-frame { min-height: 610px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #eef1f3; }
.preview-frame iframe { width: 100%; height: 610px; border: 0; background: white; }
.preview-frame[data-artifact-engine="composer"][data-artifact-preview-kind="player"] {
  --composer-player-bar-height: 52px;
  min-height: 0;
  container: composer-preview / inline-size;
}
.preview-frame[data-artifact-engine="composer"][data-artifact-preview-kind="player"] > iframe[data-artifact-preview] {
  display: block;
  width: 100%;
  height: calc(56.25cqw + var(--composer-player-bar-height));
  min-height: 0;
  background: #dfe6e8;
}
.preview-frame[data-artifact-preview-kind="editor"] > iframe[data-artifact-preview] {
  display: block;
  width: 100%;
  height: clamp(680px, 76vh, 900px);
  min-height: 680px;
  background: #d7d7d4;
}
.preview-frame.is-stale iframe { height: 548px; }
.preview-frame.is-stale[data-artifact-engine="composer"][data-artifact-preview-kind="player"] > iframe[data-artifact-preview] { height: calc(56.25cqw + var(--composer-player-bar-height)); }
@container composer-preview (max-width: 640px) {
  .preview-frame[data-artifact-engine="composer"][data-artifact-preview-kind="player"] { --composer-player-bar-height: 46px; }
}
.preview-frame.is-contract-stale { align-self: start; min-height: 0; background: #f7f8f8; }
.artifact-console-heading { display: grid; min-height: 78px; box-sizing: border-box; gap: 8px; border-bottom: 1px solid var(--line); background: #fff; padding: 13px 16px; }
.artifact-console-toolbar { display: flex; min-width: 0; align-items: end; justify-content: space-between; gap: 12px; }
.artifact-console-summary { min-width: 0; }
.artifact-console-heading p { margin: 0 0 2px; }
.artifact-console-heading h3 { margin: 0; font-size: 16px; }
.artifact-console-heading small { display: block; margin-top: 3px; color: var(--muted); line-height: 1.4; }
.artifact-console-heading-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.artifact-console-heading-actions .status-pill { padding-inline: 9px; white-space: nowrap; font-size: 10px; }
.artifact-console-selector { display: flex; flex: 1 1 auto; min-width: 0; align-items: end; gap: 8px; margin: 0; }
.artifact-console-selector label { display: grid; min-width: 0; gap: 3px; }
.artifact-console-selector label:first-of-type { flex: 0 0 150px; }
.artifact-console-selector label:last-of-type { flex: 1 1 190px; }
.artifact-console-selector span { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.artifact-console-selector select { width: 100%; min-width: 0; height: 32px; border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 0 30px 0 9px; color: var(--text); font-size: 12px; }
.artifact-console-selector select:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 38%, transparent); outline-offset: 1px; border-color: var(--accent); }
.preview-state-banner.is-history { border-color: color-mix(in srgb, var(--accent) 20%, var(--line)); background: color-mix(in srgb, var(--accent) 4%, #fff); }
.preview-state-banner { display: flex; min-height: 62px; box-sizing: border-box; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #dfc58e; background: #fff8e8; padding: 10px 12px; }
.preview-state-banner > div { min-width: 0; }
.preview-state-banner strong, .preview-state-banner span { display: block; }
.preview-state-banner strong { color: #725514; font-size: 12px; }
.preview-state-banner span { margin-top: 3px; color: #7d6b45; font-size: 11px; line-height: 1.4; }
.preview-state-banner.is-candidate { border-bottom-color: color-mix(in srgb,var(--accent) 28%,var(--line)); background: color-mix(in srgb,var(--accent) 5%,#fff); }
.preview-state-banner.is-candidate strong { color: var(--accent-strong); }
.preview-state-banner.is-candidate span { color: var(--muted); }
.preview-state-banner .button { flex: 0 0 auto; }
.preview-frame .empty-state { margin: 120px 28px; }
.preview-frame.is-contract-stale .empty-state { margin: 34px 28px 38px; }
.feedback-panel { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.feedback-panel-details { height: 100%; }
.feedback-panel-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 20px; padding: 14px 16px; cursor: pointer; list-style: none; color: var(--ink); font-size: 17px; font-weight: 700; }
.feedback-panel-details > summary::-webkit-details-marker { display: none; }
.feedback-panel-details > summary::after { content: "›"; color: var(--muted); font-size: 22px; font-weight: 400; line-height: 1; }
.feedback-panel-details > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; border-radius: 7px; }
.feedback-panel-details[open] > summary { border-bottom: 1px solid var(--line); }
.feedback-panel-details:not([open]) > summary { height: 100%; box-sizing: border-box; align-items: flex-start; padding: 14px 10px; writing-mode: vertical-rl; }
.feedback-panel-details:not([open]) > summary::after { content: "‹"; }
.feedback-panel-body { padding: 16px; }
.feedback-panel-body > .helper:first-child { margin-top: 0; }
.compact-form { gap: 12px; }
.feedback-page-binding { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 10px 12px; }
.feedback-page-binding span, .feedback-page-binding strong, .feedback-page-binding small { display: block; }
.feedback-page-binding span { color: var(--muted); font-size: 11px; }
.feedback-page-binding strong { margin-top: 4px; overflow-wrap: anywhere; font-size: 14px; }
.feedback-page-binding small { margin-top: 5px; color: var(--muted); line-height: 1.45; }
.feedback-page-binding.is-mismatch { border-left-color: var(--error); background: #f7e9e9; }
.version-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-bottom: 20px; }
.version-summary > div { border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.version-summary span, .version-summary strong { display: block; }
.version-summary span { color: var(--muted); font-size: 12px; }
.version-summary strong { margin-top: 8px; font-size: 20px; overflow-wrap: anywhere; }
.skill-update-panel { margin-bottom: 24px; border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.skill-update-panel .section-heading { display: flex; justify-content: space-between; gap: 18px; }
.skill-version-row { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)) auto; gap: 12px; align-items: center; }
.skill-version-row > div:not(.skill-update-actions) { min-width: 0; border-left: 2px solid var(--line); padding-left: 10px; }
.skill-version-row span, .skill-version-row strong { display: block; overflow-wrap: anywhere; }
.skill-version-row span { color: var(--muted); font-size: 12px; }
.skill-version-row strong { margin-top: 5px; font-size: 14px; }
.skill-update-actions { display: flex; justify-content: flex-end; gap: 8px; }
.skill-update-actions form { margin: 0; }
.action-callout { display: flex; justify-content: space-between; align-items: center; gap: 20px; border-left: 4px solid var(--accent); background: var(--accent-soft); padding: 14px 16px; margin-bottom: 24px; }
.action-callout p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.diagnostic-section { margin-bottom: 26px; }
.section-heading h3 { margin: 0; }
.section-heading p { margin: 5px 0 12px; }
.diagnostic-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.diagnostic-item { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 5px 9px; border: 1px solid var(--line); border-radius: 8px; padding: 12px; color: inherit; text-decoration: none; transition: border-color .15s ease,background .15s ease,transform .15s ease; }
.diagnostic-item:hover { border-color: color-mix(in srgb,var(--accent) 42%,var(--line)); background: color-mix(in srgb,var(--accent-soft) 36%,#fff); transform: translateY(-1px); }
.diagnostic-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.diagnostic-item-arrow { color: var(--accent-strong); font-size: 18px; line-height: 1; }
.diagnostic-item p { grid-column: 2; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.feedback-list { display: grid; gap: 10px; }
.feedback-item { border: 1px solid var(--line); border-radius: 8px; padding: 15px; }
.feedback-item > div:first-child { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.feedback-item strong { color: var(--ink); font-size: 14px; }
.feedback-item blockquote { margin: 12px 0; border-left: 3px solid #ccd4d8; padding-left: 10px; color: var(--muted); }
.feedback-item p { line-height: 1.6; }
.status-actions { display: flex; justify-content: flex-end; gap: 8px; }
.status-actions select { width: auto; }
.feedback-change-workspace { margin-top: 26px; border-top: 1px solid var(--line); padding-top: 22px; }
.feedback-change-list { display: grid; gap: 12px; }
.feedback-change { min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfb; padding: 14px; }
.feedback-item > .feedback-change { margin: 14px 0; background: #fff; }
.feedback-change-heading, .feedback-change-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.feedback-change-heading > div { min-width: 0; }
.feedback-change-heading strong, .feedback-change-heading span { display: block; overflow-wrap: anywhere; }
.feedback-change-heading span:not(.status-pill) { margin-top: 3px; color: var(--muted); font-size: 11px; }
.feedback-change > p { margin: 10px 0; line-height: 1.55; }
.feedback-change blockquote { margin: 10px 0; border-left: 3px solid #ccd4d8; padding-left: 10px; color: var(--muted); }
.feedback-change-meta { display: flex; flex-wrap: wrap; gap: 7px 14px; margin: 10px 0; color: var(--muted); font-size: 11px; }
.feedback-change-meta code { overflow-wrap: anywhere; }
.feedback-change-editor { margin-top: 12px; }
.feedback-change-editor textarea { min-height: 180px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; line-height: 1.55; }
.feedback-change-diff { margin-top: 12px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.feedback-change-diff summary { cursor: pointer; padding: 10px 12px; color: var(--accent); font-size: 12px; font-weight: 680; }
.feedback-change-snapshot-note { margin: 12px 0 8px; }
.feedback-change-full-editor { margin-top: 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.feedback-change-full-editor > summary { cursor: pointer; padding: 10px 12px; color: var(--accent); font-size: 12px; font-weight: 680; }
.feedback-change-full-editor[open] > summary { border-bottom: 1px solid var(--line); }
.feedback-change-full-editor .feedback-change-editor { margin: 0; padding: 12px; }
.feedback-change-section-editor { margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.feedback-change-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.feedback-change-section-heading > div { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.feedback-change-section-heading span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feedback-change-section-heading code { flex: 0 1 auto; max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feedback-change-section-editor .feedback-change-editor { margin: 0; padding: 12px; }
.feedback-change-diff pre { max-height: 360px; overflow: auto; margin: 0; border-top: 1px solid var(--line); padding: 12px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 11px; line-height: 1.55; }
.feedback-change-actions { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.feedback-change-actions.compact { justify-content: flex-start; border-top: 0; padding-top: 0; }
.feedback-change-actions form { margin: 0; }
.feedback-change-preview { display: grid; gap: 7px; margin-top: 12px; }
.feedback-change-preview iframe { width: 100%; height: 320px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.feedback-change-preview a { justify-self: end; color: var(--accent); font-size: 12px; }
.feedback-change-execution-summary { margin-top: 12px; border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 12px 14px; }
.feedback-change-execution-summary p, .feedback-change-execution-summary ul { margin: 6px 0 0; }
.feedback-change-execution-summary small { display: block; color: var(--muted); line-height: 1.55; }
.reviewer-panel { margin: 20px 0; border: 1px solid var(--line); border-radius: 9px; background: #f8fafb; padding: 16px; }
.reviewer-heading { align-items: flex-start; }
.reviewer-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 9px 14px; margin: 12px 0; color: var(--muted); }
.reviewer-scope { margin: -4px 0 0; color: var(--muted); font-size: 12px; }
.reviewer-quality-bar { display: grid; grid-template-columns: repeat(auto-fit,minmax(145px,1fr)); gap: 1px; overflow: hidden; margin: 12px 0 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--line); }
.reviewer-quality-bar > div { min-width: 0; background: #fff; padding: 10px 12px; }
.reviewer-quality-bar span, .reviewer-quality-bar strong { display: block; overflow-wrap: anywhere; }
.reviewer-quality-bar span { color: var(--muted); font-size: 11px; }
.reviewer-quality-bar strong { margin-top: 4px; font-size: 12px; }
.good-text { color: var(--good); }
.warn-text { color: var(--error); }
.reviewer-report { margin-top: 12px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.reviewer-report summary { cursor: pointer; padding: 11px 13px; color: var(--accent); font-weight: 680; }
.reviewer-report pre { max-height: 420px; overflow: auto; margin: 0; border-top: 1px solid var(--line); padding: 16px; white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; font-size: 13px; line-height: 1.7; }
.review-change-list { display: grid; gap: 8px; margin-top: 16px; }
.review-change-list article { border: 1px solid var(--line); border-radius: 7px; background: #fff; padding: 11px 13px; }
.review-change-list article > div { display: flex; align-items: center; gap: 9px; }
.review-change-list article p { margin: 7px 0; }
.review-change-list article small { color: var(--muted); }
.review-target-link { display: block; margin-top: 6px; padding: 0; }
.reviewer-candidate { margin-top: 16px; }
.reviewer-candidate-heading { align-items: center; }
.review-diff-view { margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.review-diff-view > summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; padding: 11px 13px; color: var(--accent); font-size: 12px; font-weight: 680; }
.review-diff-view > summary small { color: var(--muted); font-weight: 500; text-align: right; }
.review-diff-lines { overflow: auto; max-height: 520px; border-top: 1px solid var(--line); background: #fbfcfc; font: 11px/1.55 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; }
.review-diff-line { display: grid; grid-template-columns: 26px minmax(0,1fr); min-width: 0; border-bottom: 1px solid rgba(216,222,225,.55); }
.review-diff-line > span { padding: 3px 5px; color: var(--muted); text-align: center; user-select: none; }
.review-diff-line > code { min-width: 0; padding: 3px 8px; color: #4d5960; white-space: pre-wrap; overflow-wrap: anywhere; }
.review-diff-line.added { background: #edf8f0; }
.review-diff-line.added > span, .review-diff-line.added > code { color: #176438; }
.review-diff-line.removed { background: #fff0f0; }
.review-diff-line.removed > span, .review-diff-line.removed > code { color: #9c3030; }
.review-diff-line.hunk { background: #edf4fa; }
.review-diff-line.hunk > code { color: #315e7c; font-weight: 680; }
.review-diff-line.meta { background: #f0f2f3; }
.reviewer-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 14px; }

/* Quiet Workbench stage framework: project flow pages 02-07 share the V2 shell. */
body:has(.flow-stage-page) .workspace-panel { background: #f3f5f4; padding: 30px 46px 80px 72px; }
.flow-stage-page { width: 100%; max-width: 1030px; margin-right: auto; margin-left: auto; transition: max-width .24s cubic-bezier(.2,.8,.2,1); }
.workspace-panel.has-wide-stage .flow-stage-page,
.flow-stage-page.is-wide-layout { max-width: 1480px; }
.flow-stage-heading { position: relative; z-index: 2; align-items: flex-end; margin-bottom: 24px; border: 0; padding: 0; }
.flow-stage-heading .eyebrow { margin-bottom: 8px; font-size: 14px; letter-spacing: .04em; }
.flow-stage-heading h2 { margin: 0; font-size: clamp(27px,3vw,40px); line-height: 1.14; letter-spacing: -.035em; }
.flow-stage-heading > span { flex: 0 0 auto; max-width: 320px; text-align: right; line-height: 1.5; }
.flow-stage-heading-actions { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 9px; color: var(--muted); }
.flow-stage-heading-actions .icon-button { text-decoration: none; }
.flow-stage-card { position: relative; z-index: 1; border: 1px solid rgba(211,219,217,.92); border-radius: 18px; background: rgba(255,255,255,.98); box-shadow: 0 22px 60px rgba(24,33,38,.10); }
.flow-project-strip { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); border-radius: 18px 18px 0 0; background: #fbfcfc; padding: 17px 22px; }
.flow-project-strip .project-title { display: flex; min-width: 0; align-items: center; gap: 12px; }
.flow-project-strip .project-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.flow-project-strip .meta { color: var(--muted); font-size: 12px; }
.flow-project-strip-actions { display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; gap: 9px; }
.flow-project-strip-actions > .meta { text-align: right; }
.stage-width-toggle { display: inline-grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border: 1px solid #cbd4d2; border-radius: 8px; background: #fff; padding: 0; color: var(--muted); cursor: pointer; transition: border-color .16s ease,background .16s ease,color .16s ease,transform .16s ease; }
.stage-width-toggle:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.stage-width-toggle[aria-pressed="true"] { border-color: color-mix(in srgb,var(--accent) 42%,var(--line)); background: var(--accent-soft); color: var(--accent-strong); }
.stage-width-toggle span { display: block; font-size: 17px; line-height: 1; transform: translateY(-1px); }
.flow-stage-body { min-width: 0; padding: 24px 28px 32px; }
.flow-stage-body > .workflow-guide { margin: 0 0 22px; border: 0; border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; background: #f5f8f8; padding: 12px 14px; }
.flow-stage-body .workflow-guide-copy > span { font-size: 10px; }
.flow-stage-body .workflow-guide-copy > strong { font-size: 13px; }
.flow-stage-body .workflow-guide-copy > small { font-size: 11px; }
.source-analysis-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 18px; border: 1px solid #dfe5e3; border-radius: 10px; background: #fbfcfc; padding: 0; list-style: none; }
.source-analysis-flow li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; min-height: 92px; align-items: start; padding: 15px 16px; }
.source-analysis-flow li + li { border-left: 1px solid #dfe5e3; }
.source-analysis-flow li > div { display: grid; gap: 5px; min-width: 0; }
.source-analysis-flow strong { color: var(--text); font-size: 13px; }
.source-analysis-flow small { color: var(--muted); font-size: 12px; line-height: 1.55; }
.source-analysis-flow-index { display: inline-grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); font-size: 10px; font-weight: 800; line-height: 1; }
.flow-stage-body > .notice { margin: 0 0 14px; }
.flow-stage-body > .notice + .notice { margin-top: -6px; }
.flow-stage-body > .upload-strip,
.flow-stage-body > .source-confirm-panel,
.flow-stage-body > .source-table,
.flow-stage-body > .content-generate-panel,
.flow-stage-body > .deck-overview,
.flow-stage-body > .workflow-gate,
.flow-stage-body > .artifact-generation-panel,
.flow-stage-body > .artifact-layout,
.flow-stage-body > .action-callout,
.flow-stage-body > .skill-update-panel,
.flow-stage-body > .diagnostic-section,
.flow-stage-body > .feedback-list { margin-top: 0; margin-bottom: 18px; }
.flow-stage-body > .source-confirm-panel,
.flow-stage-body > .content-generate-panel,
.flow-stage-body > .workflow-gate,
.flow-stage-body > .skill-update-panel { border-color: #dfe4e3; background: #fafcfc; }
.flow-stage-body > .stage-confirm-bar,
.flow-stage-body > .synthesis-confirm-bar { margin: 28px -28px -32px; border-width: 1px 0 0; border-left: 0; border-radius: 0 0 18px 18px; background: #fafbfb; padding: 18px 22px; }
.flow-stage-body > .feedback-change-workspace { margin-top: 28px; }
.flow-stage-body .section-heading h3,
.flow-stage-body .section-heading h4 { letter-spacing: -.015em; }
.flow-stage-body details > summary { scroll-margin-top: 82px; }
.flow-stage-card .button,
.flow-stage-card input,
.flow-stage-card textarea,
.flow-stage-card select { transition: border-color .16s ease,box-shadow .16s ease,background .16s ease,color .16s ease,transform .16s ease; }
.flow-stage-card .button:not(:disabled):active { transform: translateY(1px); }

@media (max-width: 980px) {
  .artifact-page-progress-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .access-policy-form, .user-admin-row { grid-template-columns: 1fr 1fr; }
  .account-quota-fields, .user-create-fields { grid-template-columns: 1fr 1fr; }
  .access-policy-form > .access-toggle, .access-policy-form > .anonymous-usage-summary { grid-column: 1 / -1; }
  .access-policy-form > .usage-reset-options { grid-column: 1; }
  .access-policy-form > .button { grid-column: 2; justify-self: end; }
  .user-admin-row > .user-identity, .user-admin-row > .account-quota-fields, .user-admin-actions { grid-column: 1 / -1; }
  .runtime-summary-grid, .runtime-account-metrics, .proxy-security-grid { grid-template-columns: 1fr 1fr; }
  .project-runtime-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .runtime-project-links > div { grid-template-columns: 1fr; }
  .project-sidebar { width: min(260px, calc(100vw - 24px)); }
  .tabs { grid-template-columns: 1fr; }
  .artifact-layout { grid-template-columns: 1fr; }
  .artifact-layout:has(.feedback-panel-details:not([open])) { grid-template-columns: 1fr; gap: 18px; }
  .artifact-console-toolbar { align-items: stretch; flex-direction: column; }
  .artifact-console-heading-actions { flex-wrap: wrap; }
  .artifact-console-selector { align-items: stretch; flex-direction: column; }
  .artifact-console-selector label:first-of-type,
  .artifact-console-selector label:last-of-type { flex-basis: auto; }
  .preview-state-banner { align-items: stretch; flex-direction: column; }
  .preview-state-banner .button { align-self: flex-start; }
  .feedback-panel-details:not([open]) > summary { height: auto; align-items: center; padding: 14px 16px; writing-mode: horizontal-tb; }
  .artifact-generation-heading, .artifact-binding-heading { align-items: stretch; flex-direction: column; }
  .artifact-generation-steps button:nth-child(2n) { border-right: 0; }
  .artifact-generation-steps { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .artifact-media-selector { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .artifact-engine-selector { grid-template-columns: 1fr; }
  .artifact-pipeline-contracts article { grid-template-columns: 1fr; gap: 10px; }
  .artifact-handoff-inline, .artifact-binding-tab-summary, .artifact-generation-primary-actions { align-items: stretch; flex-direction: column; }
  .artifact-generation-primary-actions form, .artifact-generation-primary-actions .button { width: 100%; }
  .artifact-generation-launch-form { grid-template-columns: minmax(0,1fr); align-items: stretch; }
  .artifact-generation-page-limit { min-width: 0; }
  .artifact-generation-action-stack { min-width: 0; }
  .artifact-generation-scope-switch { align-self: stretch; }
  .artifact-generation-scope-switch label { flex: 1; text-align: center; }
  .artifact-generation-page-range { align-items: flex-end; }
  .artifact-generation-page-range .field { flex: 1; width: auto; }
  .artifact-generation-action-notes { align-items: flex-start; flex-direction: column; }
  .theme-visual-selector { grid-column: auto; }
  .artifact-media-selector { grid-column: auto; }
  .theme-visual-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .version-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .skill-version-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .skill-update-actions { justify-content: flex-start; }
  .source-confirm-row { grid-template-columns: 1fr 1fr; }
  .source-analysis-flow { grid-template-columns: 1fr; }
  .source-analysis-flow li + li { border-top: 1px solid #dfe5e3; border-left: 0; }
  .synthesis-compare-controls { align-items: stretch; flex-direction: column; }
  .synthesis-source-switcher { width: 100%; }
  .synthesis-compare-actions { justify-content: flex-end; }
  .synthesis-compare-panes { grid-template-columns: 1fr; }
  .coverage-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .deck-workbench { grid-template-columns: 210px minmax(0,1fr); }
  .deck-attribute-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .deck-media-expression-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .choice-chip-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 680px) {
  .deck-production-contract-heading { align-items: flex-start; flex-direction: column; }
  .deck-media-expression-grid { grid-template-columns: 1fr; }
  .artifact-page-progress-list { grid-template-columns: 1fr; }
  .artifact-page-progress-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
  .global-generation-banner { padding: 7px 48px 7px 12px; }
  .global-generation-dismiss { right: 10px; }
  .global-generation-summary { grid-template-columns: 26px minmax(0,1fr) auto; gap: 8px; }
  .global-generation-summary-copy small { white-space: normal; }
  .global-generation-item { grid-template-columns: 26px minmax(0,1fr); gap: 8px; }
  .global-generation-action { grid-column: 2; white-space: normal; }
  .global-generation-copy small { white-space: normal; }
  .preservation-gate-body { padding-right: 12px; padding-left: 20px; }
  .preservation-gate-context { grid-template-columns: 1fr; gap: 10px; }
  .preservation-gate-rule { border-top: 1px solid var(--line); border-left: 0; padding-top: 10px; padding-left: 0; }
  .preservation-gate-generation { align-items: stretch; flex-direction: column; gap: 10px; }
  .preservation-gate-generation .button { align-self: flex-start; }
  .access-policy-form, .user-admin-row, .account-quota-fields, .user-create-fields { grid-template-columns: 1fr; }
  .quota-default-guidance { grid-template-columns: 1fr; }
  .user-create-actions { align-items: stretch; flex-direction: column; }
  .user-create-actions .button { width: 100%; }
  .settings-panel-intro, .settings-section-compact > .section-heading, .provider-card-heading { align-items: stretch; flex-direction: column; }
  .settings-panel-intro-meta { justify-content: flex-start; }
  .settings-section-compact > .section-heading p { text-align: left; }
  .provider-card-heading > .status-pill { align-self: flex-start; }
  .runtime-overview-heading, .runtime-account-heading { align-items: stretch; flex-direction: column; }
  .runtime-summary-grid, .runtime-account-metrics, .proxy-security-grid { grid-template-columns: 1fr; }
  .project-runtime-overview { gap: 12px; padding: 14px; }
  .project-runtime-heading { align-items: stretch; flex-direction: column; }
  .project-runtime-heading .status-pill { align-self: flex-start; }
  .project-runtime-summary, .project-runtime-grid { grid-template-columns: 1fr; }
  .project-runtime-summary > div { grid-template-columns: minmax(0,1fr) auto; align-items: baseline; }
  .project-runtime-summary > div strong { grid-column: 2; grid-row: 1 / 3; }
  .project-runtime-summary > div small { grid-column: 1; }
  .project-runtime-section { padding: 13px; }
  .project-runtime-section-heading { align-items: stretch; flex-direction: column; gap: 7px; }
  .project-runtime-stage-item > summary { grid-template-columns: 28px minmax(0,1fr) auto; }
  .project-runtime-stage-route-count { display: none; }
  .project-runtime-stage-main > span:first-child { align-items: flex-start; flex-direction: column; gap: 2px; }
  .project-runtime-stage-main small { flex: 1 1 auto; }
  .project-runtime-route-list { margin-left: 0; }
  .project-runtime-route-row { grid-template-columns: 1fr; }
  .project-runtime-route-row > span:not(.project-runtime-bar) { white-space: normal; }
  .project-runtime-flow-step { min-width: 128px; flex-basis: 128px; }
  .project-runtime-list, .project-runtime-timeline { max-height: min(250px,34vh); }
  .runtime-project-links { grid-template-columns: 1fr; }
  .access-policy-form > .usage-reset-options { grid-column: 1; }
  .access-policy-form > .access-toggle, .access-policy-form > .field, .access-policy-form > .anonymous-usage-summary, .access-policy-form > .button { grid-column: 1; }
  .access-policy-form > .button { justify-self: stretch; }
  .runtime-account-list { max-height: none; overflow: visible; padding-right: 0; }
  .theme-visual-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .user-admin-actions { justify-content: flex-start; }
  .topbar { height: 58px; min-height: 58px; flex-wrap: nowrap; padding: 0 16px; }
  .topbar-actions { width: auto; min-width: 0; margin-left: auto; justify-content: flex-end; }
  .account-summary { min-width: 0; max-width: min(48vw,220px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .brand-note { display: none; }
  .topbar-link { padding: 5px 8px; }
  .page-shell, .workspace-panel { padding: 24px 16px 60px; }
  .workflow-guide-summary { align-items: stretch; flex-direction: column; gap: 12px; }
  .workflow-guide-actions { flex-wrap: wrap; }
  .settings-shell { padding: 24px 16px 60px; }
  .settings-heading { align-items: stretch; flex-direction: column; }
  .inline-form, .upload-strip, .artifact-address, .action-bar { align-items: stretch; flex-direction: column; }
  .inline-actions { align-items: stretch; flex-direction: column; }
  .content-outline-heading { align-items: stretch; flex-direction: column; }
  .content-outline-summary, .content-outline-pane-actions { align-items: stretch; flex-direction: column; }
  .content-outline-tabs { grid-auto-columns: minmax(190px, 72vw); grid-auto-flow: column; grid-template-columns: none; overflow-x: auto; padding-bottom: 3px; }
  .content-outline-map { height: 48vh; min-height: 260px; }
  .content-outline-editor[open] { width: auto; }
  .form-grid.two, .form-grid.three, .form-grid.four, .mode-selector, .version-summary, .diagnostic-list, .capability-selector, .prompt-combinations, .pdf-parser-selector, .pdf-runtime-summary, .choice-chip-grid, .intake-detail-grid, .intake-permissions { grid-template-columns: 1fr; }
  .intake-quick-start { align-items: stretch; flex-direction: column; }
  .skill-version-row { grid-template-columns: 1fr; }
  .tabs { grid-template-columns: 1fr 1fr; }
  .source-row { grid-template-columns: 1fr; }
  .source-row.header { display: none; }
  .project-list { max-height: none; overflow: visible; padding-right: 0; }
  .project-row { align-items: stretch; flex-direction: column; }
  .project-row-content { width: 100%; }
  .project-row-link { align-items: flex-start; flex-direction: column; gap: 12px; }
  .project-generation-inline { grid-template-columns: 26px minmax(0,1fr); gap: 8px; padding: 11px 14px 13px; }
  .project-generation-copy small { white-space: normal; }
  .project-generation-action { grid-column: 2; white-space: normal; }
  .project-delete-form { border-top: 1px solid var(--line); border-left: 0; padding: 10px 14px; }
  .project-delete-form .button { width: 100%; }
  .project-resume { grid-template-columns: 1fr; }
  .project-resume > small { grid-column: 1; }
  .research-task-row { grid-template-columns: 1fr; }
  .research-progress { grid-template-columns: 1fr 1fr; }
  .research-review-row { align-items: flex-start; flex-direction: column; }
  .synthesis-confirm-bar { align-items: stretch; flex-direction: column; }
  .opinion-block-item, .opinion-block-item > div { align-items: stretch; flex-direction: column; }
  .opinion-block-item small { white-space: normal; }
  .opinion-block-compare { grid-template-columns: 1fr; }
  .synthesis-compare-panel > summary, .synthesis-compare-actions { align-items: stretch; flex-direction: column; }
  .synthesis-source-button { max-width: 180px; }
  .synthesis-compare-pane > div { height: 380px; padding: 16px; }
  .synthesis-pane-source-switcher { max-width: min(48vw, 240px); }
  .markdown-modebar { align-items: flex-start; flex-direction: column; }
  .markdown-mode-actions { width: 100%; }
  .ai-floating-dialog { top: 70px; right: 8px; left: 8px !important; width: auto; max-height: calc(100vh - 82px); overflow: auto; }
  .ai-floating-dialog.is-minimized, body > .synthesis-reference-pane.is-floating.is-minimized { top: var(--floating-minimized-top, 112px) !important; right: auto !important; left: var(--floating-minimized-left, 16px) !important; width: var(--floating-minimized-width, min(232px, calc(100vw - 32px))) !important; max-height: none; overflow: visible; }
  .ai-floating-dialog > header { cursor: default; }
  .ai-dialog-width-resize-handle, .ai-dialog-height-resize-handle, body > .synthesis-reference-pane.is-floating > .synthesis-reference-width-resize-handle, body > .synthesis-reference-pane.is-floating > .synthesis-reference-height-resize-handle { display: none; }
  .project-runtime-overview-dialog { width: auto !important; }
  .project-runtime-overview-content { max-height: none; overflow: visible; }
  .synthesis-conflict-dialog { min-width: 0; }
  .ai-dialog-width-resize-handle { display: none; }
  .coverage-floating-body { max-height: none; overflow: visible; padding: 14px; }
  .coverage-heading-actions, .coverage-heading-actions form, .coverage-heading-actions .button { width: 100%; }
  .coverage-toolbar, .coverage-ai-actions { align-items: stretch; flex-direction: column; }
  .coverage-toolbar { position: static; }
  .coverage-toolbar label, .coverage-toolbar select { width: 100%; }
  .coverage-table th { position: static; }
  .coverage-ai-title small { width: 100%; margin-left: 0; }
  .markdown-viewer-host { padding: 20px 16px; }
  .stage-confirm-bar, .content-generate-panel, .coverage-heading, .workflow-gate, .review-takeover-heading { align-items: stretch; flex-direction: column; }
  .deck-stage-confirm-actions { align-items: stretch; flex-direction: column; }
  .deck-stage-confirm-actions .button { width: 100%; }
  .deck-overflow-action, .deck-current-issues { align-items: stretch; flex-direction: column; }
  .deck-current-issue-actions { align-items: stretch; flex-direction: column; }
  .deck-overflow-action .button, .deck-current-issue-actions .button { width: 100%; }
  .workflow-gate-actions { align-items: stretch; flex-direction: column; }
  .source-confirm-row, .coverage-summary { grid-template-columns: 1fr; }
  .research-progress { grid-template-columns: 1fr; }
  .research-output-list article { align-items: stretch; flex-direction: column; }
  .deck-overview, .deck-slide-actions, .feedback-inbox-actions, .feedback-resolution-form { align-items: stretch; flex-direction: column; }
  .deck-step-guide ol { grid-template-columns: 1fr; gap: 12px; }
  .deck-step-guide ol::before { top: 14px; right: auto; bottom: 14px; left: 14px; width: 1px; height: auto; }
  .deck-next-action { align-items: flex-start; flex-direction: column; }
  .feedback-change-heading, .feedback-change-actions { align-items: stretch; flex-direction: column; }
  .feedback-change-preview iframe { height: 240px; }
  .deck-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .deck-workbench { grid-template-columns: 1fr; }
  .deck-page-list { max-height: 280px; }
  .feedback-status-field { width: auto; }
  body:has(.intake-v2-workspace) .workspace-panel { padding-right: 16px; padding-left: 16px; }
  body:has(.flow-stage-page) .workspace-panel { padding-right: 16px; padding-left: 16px; }
  .flow-stage-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .flow-stage-heading > span { max-width: none; text-align: left; }
  .flow-stage-heading-actions { width: 100%; justify-content: space-between; }
  .flow-project-strip { align-items: flex-start; flex-direction: column; gap: 7px; }
  .flow-project-strip .project-title { width: 100%; align-items: flex-start; flex-direction: column; gap: 4px; }
  .flow-project-strip .project-title strong { width: 100%; white-space: normal; overflow-wrap: anywhere; }
  .flow-project-strip-actions { width: 100%; justify-content: space-between; }
  .flow-project-strip-actions > .meta { text-align: left; }
  .flow-stage-body { padding: 20px 18px 26px; }
  .flow-stage-body > .stage-confirm-bar,
  .flow-stage-body > .synthesis-confirm-bar { margin: 24px -18px -26px; border-radius: 0 0 18px 18px; padding: 16px 18px; }
  .intake-v2-workspace:has(.intake-city-header-slot.is-ready),
  .project-background-workspace:has(.intake-city-header-slot.is-ready) { padding-top: 92px; }
  .intake-city-header-slot { top: -90px; right: 0; left: 0; height: 287px; }
  .intake-city-hero { min-height: 0; }
  .intake-background-toggle { top: -76px; right: 0; }
  .intake-city-footer-slot { right: 8%; bottom: -62px; left: 8%; height: 126px; }
}

@media (max-width: 520px) {
  .artifact-generation-steps { grid-template-columns: 1fr; }
  .artifact-generation-steps button { border-right: 0; border-bottom: 1px solid var(--line); }
  .artifact-generation-steps button:last-child { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .global-generation-icon > i, .project-generation-pill > i, .project-generation-icon.is-active::before { animation: none; }
}
