:root {
  color-scheme: light;
  --navy: #050a1a;
  --brand: #075fd9;
  --brand-strong: #0452c0;
  --teal: #13bbb8;
  --ai: #8738ff;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafd;
  --surface-3: #edf2f8;
  --text: #0d1830;
  --muted: #61708b;
  --line: #dbe3ef;
  --line-strong: #cbd6e6;
  --danger: #e33b48;
  --danger-soft: #fff0f1;
  --warning: #e9821b;
  --warning-soft: #fff5e8;
  --success: #079d84;
  --success-soft: #e9fbf6;
  --brand-soft: #edf5ff;
  --ai-soft: #f4edff;
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='m3.5 5.25 3.5 3.5 3.5-3.5' stroke='%2361708b' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --select-arrow-active: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='m3.5 5.25 3.5 3.5 3.5-3.5' stroke='%23075fd9' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --select-arrow-open: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='m3.5 8.75 3.5-3.5 3.5 3.5' stroke='%23075fd9' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --shadow: 0 12px 30px rgba(14, 34, 72, .08);
  --radius: 12px;
  --sidebar: 184px;
  --font: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #071023;
  --surface: #0b1730;
  --surface-2: #0f1c38;
  --surface-3: #142443;
  --text: #f4f7ff;
  --muted: #9aaccc;
  --line: #26395c;
  --line-strong: #365077;
  --danger: #ff6875;
  --danger-soft: #301925;
  --warning: #ffb55d;
  --warning-soft: #332617;
  --success: #41d4b9;
  --success-soft: #102c2c;
  --brand: #4a91ff;
  --brand-strong: #6da8ff;
  --brand-soft: #102649;
  --ai: #aa77ff;
  --ai-soft: #251b42;
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='m3.5 5.25 3.5 3.5 3.5-3.5' stroke='%239aaccc' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --select-arrow-active: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='m3.5 5.25 3.5 3.5 3.5-3.5' stroke='%236da8ff' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --select-arrow-open: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='m3.5 8.75 3.5-3.5 3.5 3.5' stroke='%236da8ff' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --shadow: 0 14px 36px rgba(0, 0, 0, .25);
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-width: 320px; overflow-x: hidden; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
.boot-loading, .page-loading { min-height: 100vh; display: grid; place-items: center; }
.page-loading-logo { width: clamp(132px, 18vw, 184px); height: auto; overflow: visible; }
.page-loading-arrow {
  transform-box: fill-box;
  transform-origin: center;
  opacity: .36;
  animation: page-loading-arrow-flow 2s cubic-bezier(.16, 1, .3, 1) infinite;
  will-change: transform, opacity, filter;
}
.page-loading-arrow.purple { --flow-x: 5px; --flow-y: 5px; color: var(--ai); }
.page-loading-arrow.teal { --flow-x: -7px; --flow-y: 1px; color: var(--teal); animation-delay: -1.333s; }
.page-loading-arrow.blue { --flow-x: 2px; --flow-y: -6px; color: var(--brand); animation-delay: -.666s; }
@keyframes page-loading-arrow-flow {
  0%, 27%, 100% { opacity: .36; transform: translate(0, 0) scale(.985); filter: saturate(.82); }
  6%, 17% { opacity: 1; transform: translate(var(--flow-x), var(--flow-y)) scale(1.025); filter: saturate(1.12) brightness(1.06) drop-shadow(0 9px 13px color-mix(in srgb, currentColor 28%, transparent)); }
}
@media (prefers-reduced-motion: reduce) {
  .page-loading-arrow { opacity: 1; animation: none; transform: none; filter: none; will-change: auto; }
}
.project-ai-processing-backdrop { position: fixed; z-index: 110; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(5, 12, 28, .58); backdrop-filter: blur(5px); animation: project-ai-backdrop-in .28s ease-out both; }
body:has(.project-ai-processing-backdrop) { overflow: hidden; }
.project-ai-processing-card { width: min(520px, 100%); padding: 30px; border-radius: 16px; background: var(--surface); box-shadow: 0 24px 72px rgba(2, 8, 22, .32); outline: none; text-align: center; animation: project-ai-card-in .36s cubic-bezier(.16, 1, .3, 1) both; }
.project-ai-processing-visual { width: 82px; height: 82px; display: grid; place-items: center; margin: 0 auto 16px; border-radius: 22px; background: var(--surface-2); }
.project-ai-processing-logo { width: 58px; height: auto; overflow: visible; }
.project-ai-processing-kicker { display: inline-flex; align-items: center; gap: 7px; color: var(--brand); font-size: 12px; font-weight: 800; letter-spacing: .04em; }
.project-ai-processing-kicker i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 5px color-mix(in srgb, var(--success) 13%, transparent); animation: project-ai-status-pulse 1.8s ease-in-out infinite; }
.project-ai-processing-card h2 { margin: 8px 0 7px; font-size: 24px; }
.project-ai-processing-card > p { max-width: 390px; margin: 0 auto; color: var(--muted); line-height: 1.65; }
.project-ai-processing-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 24px 0 17px; padding: 0; list-style: none; }
.project-ai-processing-steps li { min-width: 0; display: grid; gap: 6px; justify-items: center; padding: 12px 8px; border-radius: 10px; color: var(--muted); background: var(--surface-2); animation: project-ai-step-flow 2.4s ease-in-out infinite; }
.project-ai-processing-steps li:nth-child(2) { animation-delay: .8s; }
.project-ai-processing-steps li:nth-child(3) { animation-delay: 1.6s; }
.project-ai-processing-steps span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: var(--brand); background: var(--brand-soft); font-size: 11px; font-weight: 800; }
.project-ai-processing-steps strong { font-size: 13px; }
.project-ai-processing-card > small { color: var(--muted); }
@keyframes project-ai-backdrop-in { from { opacity: 0; } }
@keyframes project-ai-card-in { from { opacity: 0; transform: translateY(10px) scale(.985); } }
@keyframes project-ai-status-pulse { 50% { opacity: .55; transform: scale(.82); } }
@keyframes project-ai-step-flow {
  0%, 24%, 100% { color: var(--muted); background: var(--surface-2); transform: translateY(0); }
  8%, 17% { color: var(--text); background: var(--brand-soft); transform: translateY(-2px); }
}
@media (prefers-reduced-motion: reduce) {
  .project-ai-processing-backdrop, .project-ai-processing-card, .project-ai-processing-kicker i, .project-ai-processing-steps li { animation: none; }
}

/* Adaptive knowledge discovery */
.discovery-kicker { color: var(--ai); font-size: 12px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.discovery-entry { min-height: min(690px, calc(100vh - 180px)); display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .75fr); gap: clamp(36px, 7vw, 96px); align-items: center; max-width: 1080px; margin: 0 auto; padding: 42px 16px 70px; }
.discovery-intro h2 { max-width: 720px; margin: 12px 0 18px; font-size: clamp(36px, 5vw, 64px); line-height: 1.08; letter-spacing: -.045em; }
.discovery-intro > p { max-width: 650px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.85; }
.discovery-promises { display: grid; gap: 12px; margin-top: 34px; }
.discovery-promises span { display: flex; align-items: center; gap: 10px; font-weight: 650; }
.discovery-promises svg { color: var(--success); }
.discovery-start-card { display: grid; gap: 22px; padding: 30px; border: 1px solid var(--line); border-top: 3px solid var(--ai); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.discovery-step-label { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .06em; }
.discovery-start-card label, .discovery-draft-card > label, .discovery-draft-meta label { display: grid; gap: 8px; }
.discovery-start-card label > span, .discovery-draft-card label > span { font-weight: 750; }
.discovery-start-card input { min-height: 54px; font-size: 17px; }
.discovery-legacy-note { display: flex; gap: 10px; padding: 13px; border-left: 3px solid var(--brand); background: var(--brand-soft); }
.discovery-legacy-note > span { display: grid; }
.discovery-legacy-note small { color: var(--muted); }
.discovery-primary { min-height: 48px; justify-content: center; }
.discovery-start-card > small { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); }

.discovery-interview { --discovery-map-width: 292px; --discovery-column-gap: 28px; max-width: 1120px; margin: 0 auto; }
.discovery-interview-heading { width: calc(100% - var(--discovery-map-width) - var(--discovery-column-gap)); }
.discovery-workspace { display: grid; grid-template-columns: minmax(0, 1fr) var(--discovery-map-width); gap: var(--discovery-column-gap); align-items: start; }
.discovery-main { min-width: 0; }
.discovery-session-meta { display: flex; justify-content: space-between; gap: 16px; margin: 22px 0 12px; color: var(--muted); }
.discovery-session-meta span { color: var(--text); font-weight: 800; }
.discovery-question-card, .discovery-ready-card { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.discovery-question-card > header { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 15px 24px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.discovery-question-card > header > span { color: var(--brand); font-size: 12px; font-weight: 800; letter-spacing: .06em; }
.discovery-question-card > header small { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.discovery-question-card form { padding: clamp(24px, 4vw, 42px); }
.discovery-question-card h2 { max-width: 780px; margin: 0 0 28px; font-size: clamp(25px, 3vw, 36px); line-height: 1.3; letter-spacing: -.025em; }
.discovery-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.discovery-option { position: relative; cursor: pointer; }
.discovery-option input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; pointer-events: none; }
.discovery-option span { min-height: 54px; display: flex; align-items: center; gap: 11px; padding: 13px 15px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); font-weight: 650; transition: border-color .16s ease, background-color .16s ease, transform .16s ease; }
.discovery-option span i { width: 18px; height: 18px; flex: 0 0 auto; border: 2px solid var(--line-strong); border-radius: 5px; background: var(--surface); }
.discovery-option input[type="radio"] + span i { border-radius: 50%; }
.discovery-option:hover span { border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); transform: translateY(-1px); }
.discovery-option input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 24%, transparent); outline-offset: 2px; }
.discovery-option input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-strong); }
.discovery-option input:checked + span i { border: 5px solid var(--brand); }
.discovery-custom { display: grid; gap: 8px; margin-top: 20px; color: var(--muted); font-size: 13px; font-weight: 700; }
.discovery-question-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 26px; }
.discovery-soft-actions { display: flex; flex-wrap: wrap; gap: 3px; }
.discovery-soft-actions button, .discovery-finish-link { border: 0; background: transparent; color: var(--muted); cursor: pointer; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; }
.discovery-soft-actions button, .discovery-history li button { min-height: 44px; }
.discovery-soft-actions button:hover, .discovery-finish-link:hover { color: var(--text); text-decoration-color: currentColor; }
.discovery-finish-link { display: block; margin: 18px auto; }
.discovery-ready-card { display: grid; justify-items: start; gap: 10px; padding: clamp(30px, 5vw, 54px); }
.discovery-ready-card > span { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 6px; border-radius: 15px; color: var(--success); background: var(--success-soft); }
.discovery-ready-card > small { color: var(--success); font-weight: 800; }
.discovery-ready-card h2 { margin: 0; font-size: clamp(28px, 4vw, 42px); letter-spacing: -.03em; }
.discovery-ready-card p { max-width: 660px; margin: 2px 0 16px; color: var(--muted); }

.discovery-map { position: sticky; top: 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.discovery-map > header { display: flex; align-items: baseline; justify-content: space-between; padding: 20px 20px 4px; }
.discovery-map > header span { font-weight: 800; }
.discovery-map > header strong { color: var(--brand); font-size: 24px; }
.discovery-map > p { margin: 0; padding: 0 20px 17px; color: var(--muted); font-size: 13px; }
.discovery-map-grid { display: grid; border-top: 1px solid var(--line); }
.discovery-map-node { position: relative; display: flex; justify-content: space-between; gap: 10px; padding: 10px 20px; overflow: hidden; }
.discovery-map-node::after { content: ""; position: absolute; z-index: 0; inset: auto 0 0; width: var(--coverage); height: 2px; background: var(--teal); animation: discovery-coverage-in .4s cubic-bezier(.16, 1, .3, 1) both; }
.discovery-map-node > * { position: relative; z-index: 1; }
.discovery-map-node span { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; }
.discovery-map-node span i { width: 7px; height: 7px; border-radius: 50%; background: color-mix(in srgb, var(--teal) var(--coverage), var(--line-strong)); }
.discovery-map-node small { color: var(--muted); font-size: 11px; }
.discovery-map-conflicts { display: flex; align-items: center; gap: 7px; padding: 11px 20px; border-top: 1px solid var(--line); color: var(--warning); background: var(--warning-soft); font-size: 12px; font-weight: 700; }
.discovery-map-note { display: block; padding: 15px 20px; border-top: 1px solid var(--line); color: var(--muted); background: var(--surface-2); }
@keyframes discovery-coverage-in { from { transform: scaleX(.6); transform-origin: left; opacity: .3; } }

.discovery-history { margin-top: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.discovery-history summary { display: flex; justify-content: space-between; padding: 14px 17px; cursor: pointer; font-weight: 700; }
.discovery-history summary span { color: var(--muted); font-weight: 500; }
.discovery-history ol { display: grid; gap: 0; margin: 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.discovery-history li { display: flex; align-items: center; gap: 14px; padding: 13px 17px; border-bottom: 1px solid var(--line); }
.discovery-history li:last-child { border-bottom: 0; }
.discovery-history li > span { min-width: 0; display: grid; flex: 1; }
.discovery-history li small { color: var(--brand); }
.discovery-history li strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.discovery-history li em { overflow: hidden; color: var(--muted); font-size: 12px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.discovery-history li button { border: 0; background: transparent; color: var(--brand); cursor: pointer; font-weight: 700; }

.discovery-review { max-width: 980px; margin: 0 auto; padding-bottom: 100px; }
.discovery-review-heading { max-width: 740px; margin: 28px 0 30px; }
.discovery-review-heading h2 { margin: 10px 0 12px; font-size: clamp(30px, 4vw, 48px); line-height: 1.15; letter-spacing: -.035em; }
.discovery-review-heading > p { color: var(--muted); font-size: 16px; }
.discovery-review-heading > div { display: flex; gap: 18px; color: var(--muted); font-size: 13px; font-weight: 700; }
.discovery-fallback { display: flex; gap: 9px; margin-bottom: 18px; padding: 13px 16px; border-left: 3px solid var(--warning); background: var(--warning-soft); color: var(--muted); }
.discovery-ai-consent { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.discovery-ai-consent > div, .discovery-ai-restored > div { display: grid; gap: 3px; }
.discovery-ai-consent strong, .discovery-ai-restored strong { color: var(--text); }
.discovery-ai-consent span, .discovery-ai-restored span { line-height: 1.55; }
.discovery-ai-consent .button { flex: 0 0 auto; min-height: 38px; white-space: nowrap; }
.discovery-ai-restored { align-items: flex-start; border-left-color: var(--success); background: color-mix(in srgb, var(--success) 9%, var(--surface)); }
.discovery-draft-list { display: grid; gap: 18px; }
.discovery-draft-card { display: grid; gap: 17px; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 8px 24px color-mix(in srgb, var(--text) 5%, transparent); }
.discovery-draft-card > header, .discovery-draft-card > footer { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.discovery-draft-card > header > label { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.discovery-draft-card > header input { width: 18px; min-height: 18px; }
.discovery-draft-card > header > div { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.discovery-draft-warning { display: inline-flex; align-items: center; gap: 4px; color: var(--warning); }
.discovery-draft-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.discovery-draft-meta label > span { color: var(--muted); font-size: 12px; font-weight: 700; }
.discovery-draft-sources { border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.discovery-draft-sources summary { display: flex; justify-content: space-between; padding: 11px 13px; cursor: pointer; font-size: 13px; font-weight: 700; }
.discovery-draft-sources summary span { color: var(--muted); font-weight: 500; }
.discovery-draft-sources ul { display: grid; gap: 0; margin: 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.discovery-draft-sources li { display: flex; justify-content: space-between; gap: 14px; padding: 9px 13px; border-bottom: 1px solid var(--line); font-size: 12px; }
.discovery-draft-sources li:last-child { border-bottom: 0; }
.discovery-draft-sources li span { color: var(--muted); }
.discovery-draft-sources li strong { flex: 0 0 auto; color: var(--success); }
.discovery-draft-card > footer { padding-top: 4px; }
.discovery-draft-card > footer small { display: flex; align-items: center; gap: 5px; color: var(--muted); }
.discovery-draft-actions, .discovery-publish-bar > div { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.discovery-draft-actions > button:not(.button) { min-height: 38px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.discovery-draft-actions > button:not(.button):hover { color: var(--text); }
.discovery-handled-drafts { margin-top: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.discovery-handled-drafts summary { padding: 13px 16px; cursor: pointer; font-weight: 750; }
.discovery-handled-drafts > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 16px; border-top: 1px solid var(--line); }
.discovery-handled-drafts > div > span { display: grid; gap: 2px; }
.discovery-handled-drafts small { color: var(--muted); }
.discovery-handled-drafts button { min-height: 38px; border: 0; background: transparent; color: var(--brand); cursor: pointer; font-weight: 700; }
.discovery-publish-bar { position: sticky; z-index: 8; bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 24px; padding: 17px 20px; border: 1px solid var(--line-strong); border-radius: 14px; background: color-mix(in srgb, var(--surface) 94%, transparent); box-shadow: 0 18px 50px rgba(5, 15, 35, .17); backdrop-filter: blur(14px); }
.discovery-publish-bar > span { display: grid; }
.discovery-publish-bar small { color: var(--muted); }
.discovery-publish-status { min-width: min(360px, 100%); gap: 5px; }
.discovery-publish-track { width: 100%; height: 5px; overflow: hidden; border-radius: 999px; background: color-mix(in srgb, var(--brand) 12%, var(--surface-3)); }
.discovery-publish-track i { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--brand); transform: scaleX(var(--discovery-publish-scale)); transform-origin: left; transition: transform .28s cubic-bezier(.16, 1, .3, 1); }
.discovery-publish-bar button:disabled { cursor: wait; }
.discovery-publish-bar button[data-busy="true"] { opacity: .82; }
.discovery-publish-bar button[data-busy="true"] svg { animation: workspace-command-spin .9s linear infinite; }

.discovery-complete { max-width: 760px; margin: clamp(20px, 7vh, 80px) auto; text-align: center; }
.discovery-complete-mark { width: 74px; height: 74px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 22px; color: var(--surface); background: var(--success); }
.discovery-complete > small { color: var(--success); font-weight: 800; letter-spacing: .04em; }
.discovery-complete h2 { margin: 12px auto 16px; font-size: clamp(32px, 5vw, 52px); line-height: 1.14; letter-spacing: -.04em; }
.discovery-complete > p { max-width: 650px; margin: 0 auto; color: var(--muted); font-size: 16px; }
.discovery-complete-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 11px; margin: 28px 0; }
.discovery-complete-summary { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 560px; margin: 24px auto 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.discovery-complete-summary > span { display: grid; gap: 3px; padding: 16px; border-right: 1px solid var(--line); }
.discovery-complete-summary > span:last-child { border-right: 0; }
.discovery-complete-summary strong { font-size: 24px; }
.discovery-complete-summary small, .discovery-complete-gaps { color: var(--muted); }
.discovery-complete-gaps { margin-top: 14px; font-size: 13px; }
.discovery-complete > section { display: flex; gap: 13px; align-items: flex-start; max-width: 600px; margin: 38px auto 0; padding: 18px; border-top: 1px solid var(--line); text-align: left; }
.discovery-complete > section svg { color: var(--brand); }
.discovery-complete > section p { margin: 3px 0 0; color: var(--muted); }

@media (max-width: 900px) {
  .discovery-entry { grid-template-columns: 1fr; align-items: start; gap: 32px; padding-top: 18px; }
  .discovery-intro h2 { font-size: clamp(34px, 10vw, 50px); }
  .discovery-workspace { grid-template-columns: 1fr; }
  .discovery-interview-heading { width: 100%; }
  .discovery-map { position: static; order: -1; }
  .discovery-map-grid { grid-template-columns: repeat(3, 1fr); }
  .discovery-map-node { display: grid; padding: 10px 12px; }
}

@media (max-width: 600px) {
  .discovery-entry { padding-inline: 0; }
  .discovery-start-card, .discovery-question-card form, .discovery-ready-card, .discovery-draft-card { padding: 20px; }
  .discovery-options, .discovery-draft-meta { grid-template-columns: 1fr; }
  .discovery-question-card > header { align-items: flex-start; padding-inline: 20px; }
  .discovery-question-card h2 { font-size: 25px; }
  .discovery-question-actions, .discovery-question-actions > .button { width: 100%; }
  .discovery-soft-actions { width: 100%; justify-content: space-between; }
  .discovery-map-grid { grid-template-columns: repeat(2, 1fr); }
  .discovery-ai-consent { grid-template-columns: auto minmax(0, 1fr); }
  .discovery-ai-consent .button { grid-column: 1 / -1; width: 100%; }
  .discovery-draft-card > header, .discovery-draft-card > footer, .discovery-publish-bar { align-items: stretch; flex-direction: column; }
  .discovery-publish-bar > div, .discovery-publish-bar > div .button { width: 100%; }
  .discovery-complete-summary { grid-template-columns: 1fr; }
  .discovery-complete-summary > span { border-right: 0; border-bottom: 1px solid var(--line); }
  .discovery-complete-summary > span:last-child { border-bottom: 0; }
  .discovery-draft-card > header > div { flex-wrap: wrap; }
  .discovery-publish-bar { bottom: 76px; }
  .discovery-publish-bar .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .discovery-map-node::after { animation: none; }
  .discovery-option span { transition: none; }
  .discovery-option:hover span { transform: none; }
  .discovery-publish-track i { transition: none; }
  .discovery-publish-bar button[data-busy="true"] svg { animation: none; }
  [data-global-busy="true"] svg, .global-operation-progress > span { animation: none; }
  .global-operation-progress > span { transform: none; }
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg { flex: 0 0 auto; }
input, select, textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 9px; background-color: var(--surface); color: var(--text); min-height: 46px; padding: 10px 13px; outline: none; transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease; }
select:not([multiple]) {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: var(--select-arrow), linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface-3) 64%, transparent));
  background-repeat: no-repeat;
  background-position: right 10px center, right center;
  background-size: 14px 14px, 40px 100%;
  box-shadow: 0 1px 2px color-mix(in srgb, var(--text) 4%, transparent), inset 0 1px 0 color-mix(in srgb, #fff 62%, transparent);
  cursor: pointer;
  font-weight: 500;
}
select:not([multiple]):hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--brand) 42%, var(--line-strong));
  background-color: color-mix(in srgb, var(--surface) 96%, var(--brand-soft));
  background-image: var(--select-arrow-active), linear-gradient(90deg, transparent, color-mix(in srgb, var(--brand-soft) 74%, transparent));
}
select:not([multiple]):focus {
  background-color: var(--surface);
  background-image: var(--select-arrow-active), linear-gradient(90deg, transparent, color-mix(in srgb, var(--brand-soft) 82%, transparent));
}
select:not([multiple]):disabled {
  border-color: var(--line);
  background-color: var(--surface-3);
  background-image: var(--select-arrow), linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface-3) 88%, transparent));
  box-shadow: none;
  color: var(--muted);
  cursor: not-allowed;
  opacity: .72;
}
select[aria-invalid="true"]:not([multiple]) { border-color: var(--danger); }
select option, select optgroup { background: var(--surface); color: var(--text); }
@supports selector(select:open) {
  select:not([multiple]):open {
    border-color: var(--brand);
    background-image: var(--select-arrow-open), linear-gradient(90deg, transparent, color-mix(in srgb, var(--brand-soft) 82%, transparent));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent);
  }
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
button { border: 0; background: none; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .56; }
[data-global-busy="true"] { cursor: wait !important; }
[data-global-busy="true"] svg { animation: workspace-command-spin .9s linear infinite; }
.global-operation-progress { position: fixed; z-index: 1000; inset: 0 0 auto; height: 3px; overflow: hidden; pointer-events: none; background: color-mix(in srgb, var(--brand) 12%, transparent); }
.global-operation-progress > span { display: block; width: 36%; height: 100%; background: var(--brand); transform: translateX(-110%); animation: global-operation-progress 1.05s ease-in-out infinite; }
@keyframes global-operation-progress { to { transform: translateX(390%); } }
h1, h2, h3, p { margin-top: 0; }

.app-shell { min-height: 100vh; padding-left: var(--sidebar); }
.sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; width: var(--sidebar); display: flex; flex-direction: column; background: var(--navy); color: #f6f9ff; padding: 22px 11px 14px; }
.brand { display: flex; flex-direction: column; align-items: center; gap: 9px; margin: 0 0 28px; font-size: 19px; letter-spacing: .02em; }
.brand img { width: 66px; height: 66px; object-fit: contain; }
.global-search { width: 100%; min-height: 42px; display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 8px; padding: 0 10px; color: #dbe6fb; border: 1px solid #284062; border-radius: 8px; background: #0b1830; text-align: left; }
.global-search span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.global-search kbd { border: 1px solid #365077; border-radius: 5px; padding: 1px 5px; font-size: 11px; background: #13223e; }
.main-nav { display: grid; gap: 7px; margin-top: 18px; }
.main-nav a { min-height: 50px; display: flex; align-items: center; gap: 14px; padding: 0 14px; border-radius: 8px; color: #dce6f8; font-weight: 650; }
.main-nav a:hover { background: #0e1d38; }
.main-nav a.active { color: #fff; background: #0964dd; }
.sidebar-tools { margin-top: 14px; border-top: 1px solid #273956; padding-top: 12px; }
.sidebar-tools summary { min-height: 42px; display: grid; grid-template-columns: 18px 1fr 16px; align-items: center; gap: 11px; padding: 0 14px; border-radius: 8px; color: #9fb0ce; cursor: pointer; font-size: 13px; font-weight: 650; list-style: none; }
.sidebar-tools summary::-webkit-details-marker { display: none; }
.sidebar-tools summary:hover { color: #f6f9ff; background: #0e1d38; }
.sidebar-tools summary svg:last-child { transition: transform .18s ease-out; }
.sidebar-tools[open] summary svg:last-child { transform: rotate(180deg); }
.sidebar-tools > div { display: grid; gap: 4px; padding-top: 5px; }
.sidebar-tools a { min-height: 40px; display: flex; align-items: center; gap: 12px; padding: 0 14px 0 43px; border-radius: 7px; color: #b9c8e1; font-size: 13px; font-weight: 650; }
.sidebar-tools a svg { margin-left: -29px; }
.sidebar-tools a:hover { color: #fff; background: #0e1d38; }
.sidebar-tools a.active { color: #fff; background: #132848; }
.sidebar-user { margin-top: auto; border-top: 1px solid #273956; padding-top: 14px; }
.user-menu { width: 100%; min-height: 56px; display: grid; grid-template-columns: 38px 1fr 17px; gap: 9px; align-items: center; color: #fff; text-align: left; }
.user-menu span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.user-menu strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-menu small { color: #9fb0ce; }
.avatar { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--brand-soft); color: var(--brand); border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line)); font-size: 12px; font-weight: 800; }
.avatar img { width: 100%; height: 100%; display: block; border-radius: inherit; object-fit: cover; }
.sidebar .avatar { background: #f2f6ff; color: #1a2c4e; }
.avatar.small { width: 28px; height: 28px; font-size: 10px; }
.avatar.large { width: 66px; height: 66px; font-size: 18px; }

.main-area { min-height: 100vh; }
.topbar { width: calc(100% - 48px); min-height: 104px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 28px; border-bottom: 1px solid var(--line); }
.title-block { min-width: 0; }
.title-block h1 { margin: 0; font-size: 30px; line-height: 1.2; letter-spacing: -.03em; }
.title-block p { margin: 6px 0 0; color: var(--muted); }
.topbar-back-button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; border: 1px solid var(--brand); border-radius: 8px; color: var(--brand); background: var(--surface); font-weight: 750; }
.topbar-back-button:hover { background: var(--brand-soft); }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.local-time { white-space: nowrap; color: var(--muted); padding-right: 16px; border-right: 1px solid var(--line-strong); }
.local-time time { color: var(--text); }
.icon-text, .icon-button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 8px; }
.icon-text { padding: 0 8px; }
.icon-text:hover, .icon-button:hover { background: var(--surface-3); }
.icon-button { width: 44px; }
.notification-button { position: relative; display: inline-flex; }
.notification-count { position: absolute; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--surface); border-radius: 9px; color: #fff; background: var(--danger); right: 1px; top: 1px; font-size: 10px; font-weight: 800; line-height: 1; }
.theme-toggle { min-height: 46px; display: inline-flex; padding: 2px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.theme-toggle button { min-width: 82px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 7px; color: var(--muted); }
.theme-toggle button.active { color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 40%, transparent); }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; border-radius: 8px; font-weight: 700; white-space: nowrap; }
.button.primary { color: #fff; background: #0964dd; }
.button.primary:hover { background: var(--brand-strong); }
.button.secondary { color: var(--brand); background: var(--surface); box-shadow: inset 0 0 0 1px var(--brand); }
.button.ghost { color: var(--text); background: transparent; }
.button.ghost:hover { background: var(--surface-3); }
.button.danger { color: #fff; background: var(--danger); }
.button.danger-outline { color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
.button.full { width: 100%; }
.button-row { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.page-action-bar { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.list-view-toolbar { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 16px; }
.list-view-toolbar > .page-action-bar { margin-bottom: 0; }
.page-content { width: calc(100% - 48px); margin: 28px auto 64px; }
.bottom-nav { display: none; }
.mobile-create { display: none; }

.panel, .list-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.panel { padding: 20px; }
.panel-heading { min-height: 42px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.panel-heading > div { display: flex; align-items: center; gap: 11px; }
.panel-heading svg { color: var(--brand); }
.panel-heading h2 { margin: 0; font-size: 19px; }
.section-label { margin: 20px 4px 10px; font-size: 18px; }
.workspace-guide { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: -4px 0 18px; padding: 0 4px; color: var(--muted); }
.workspace-guide strong { color: var(--text); font-size: 14px; }
.workspace-guide p { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 13px; }
.workspace-guide p span { white-space: nowrap; }
.workspace-guide p svg { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 344px; gap: 16px; }
.dashboard-main, .dashboard-support { min-width: 0; }
.dashboard-support { display: grid; gap: 16px; align-content: start; }
.hero-task { padding: 0 4px 4px; }
.hero-badges { display: flex; gap: 8px; margin-bottom: 14px; }
.hero-task > h2 { margin: 0 0 17px; font-size: 28px; line-height: 1.25; letter-spacing: -.02em; }
.hero-description { margin: 0; padding-block: 16px; color: var(--text); font-size: 16px; }
.task-facts { display: flex; flex-wrap: wrap; gap: 0; padding: 4px 0 18px; border-bottom: 1px solid var(--line); }
.task-facts > span { min-width: 150px; display: grid; grid-template-columns: 20px 1fr; grid-template-rows: auto auto; column-gap: 9px; padding: 0 20px; border-right: 1px solid var(--line); }
.task-facts > span:first-child { padding-left: 0; }
.task-facts > span:last-child { border: 0; }
.task-facts svg { grid-row: 1 / 3; margin-top: 5px; color: var(--muted); }
.task-facts small { color: var(--muted); }
.criteria-list { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.criteria-list > div { min-height: 42px; display: flex; align-items: center; gap: 12px; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.criteria-list > div:last-child { border: 0; }
.criteria-list svg { color: var(--teal); }
.hero-actions { display: flex; align-items: center; gap: 10px; margin-top: 22px; }
.hero-actions .primary { min-width: 245px; }
.badge { display: inline-flex; align-items: center; min-height: 26px; padding: 2px 9px; border-radius: 5px; font-size: 13px; font-weight: 750; white-space: nowrap; }
.badge-brand { color: var(--brand); background: var(--brand-soft); }
.badge-success { color: var(--success); background: var(--success-soft); }
.badge-warning { color: var(--warning); background: var(--warning-soft); }
.badge-danger { color: var(--danger); background: var(--danger-soft); }
.badge-muted { color: var(--muted); background: var(--surface-3); }
.risk { font-weight: 700; }
.risk-danger, .risk-danger strong { color: var(--danger); }
.risk-warning, .risk-warning strong { color: var(--warning); }
.risk-success, .risk-success strong { color: var(--success); }
.risk-muted { color: var(--muted); }
.draft-line, .draft-card { min-height: 64px; display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 9px; border-bottom: 1px solid var(--line); }
.draft-line:last-child, .draft-card:last-child { border-bottom: 0; }
.draft-line span:nth-child(2), .draft-card span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.draft-line strong, .draft-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.draft-line small, .draft-card small { color: var(--danger); }
.draft-line b { color: var(--brand); }
.ai-mark { width: 31px; height: 27px; display: inline-grid; place-items: center; border-radius: 5px; color: var(--ai); background: var(--ai-soft); border: 1px solid color-mix(in srgb, var(--ai) 42%, transparent); font-weight: 800; font-size: 13px; }
.ai-mark.large { width: 46px; height: 42px; font-size: 16px; }
.activity-list > div { position: relative; padding: 0 0 20px 28px; border-left: 1px solid var(--line); margin-left: 7px; }
.activity-list > div:last-child { padding-bottom: 4px; }
.timeline-dot { position: absolute; left: -5px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }
.activity-list time { color: var(--muted); font-size: 13px; }
.activity-list p { margin: 2px 0; }
.activity-list small, .support-empty { color: var(--muted); }
.workspace-support-list { display: grid; }
.workspace-support-list > a { min-height: 64px; display: grid; grid-template-columns: minmax(0, 1fr) auto 18px; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.workspace-support-list > a:last-child { border-bottom: 0; }
.workspace-support-list > a:hover strong { color: var(--brand); }
.workspace-support-list > a > span { min-width: 0; display: grid; gap: 3px; }
.workspace-support-list strong, .workspace-support-list small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-support-list small { color: var(--muted); }
.workspace-support-list em { font-size: 13px; font-style: normal; font-weight: 700; white-space: nowrap; }
.workspace-support-list svg { color: var(--muted); }
.panel-link { min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 4px; color: var(--brand); font-weight: 700; border-top: 1px solid var(--line); margin: 14px -4px -6px; }

/* Workbench priority hierarchy */
.workspace-priority-layout { display: grid; gap: 22px; }
.workspace-priority-card { position: relative; overflow: hidden; padding: 22px 26px 0; border: 1px solid var(--line); border-top: 3px solid var(--brand); border-radius: 10px; background: var(--surface); }
.workspace-priority-heading { display: flex; align-items: center; gap: 10px; min-height: 34px; }
.workspace-priority-rank { color: var(--brand); font-size: 32px; font-weight: 850; line-height: 1; letter-spacing: -.04em; }
.workspace-priority-heading > strong { margin-right: 2px; color: var(--text); font-size: 16px; }
.workspace-priority-heading > strong i { padding: 0 3px; color: var(--muted); font-style: normal; font-weight: 500; }
.workspace-priority-card > h2 { max-width: 880px; margin: 15px 0 5px; color: var(--text); font-size: clamp(30px, 3vw, 39px); line-height: 1.2; letter-spacing: -.035em; }
.workspace-priority-description { max-width: 820px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.workspace-criteria { display: grid; gap: 8px; margin: 17px 0 19px; padding-left: 13px; border-left: 3px solid var(--brand); }
.workspace-criteria > strong { color: var(--text); font-size: 13px; }
.workspace-criteria-items { display: grid; gap: 7px 22px; }
.workspace-criteria.is-multiple .workspace-criteria-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.workspace-criteria-items > span { min-width: 0; display: flex; align-items: center; gap: 10px; color: var(--text); }
.workspace-criteria-items svg { flex: 0 0 auto; color: var(--brand); }
.workspace-criteria-items b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 600; }
.workspace-criteria-empty { display: flex; align-items: center; gap: 9px; margin: 17px 0 19px; color: var(--warning); }
.workspace-priority-footer { min-height: 102px; display: grid; grid-template-columns: minmax(320px, 1.5fr) minmax(120px, .55fr) minmax(180px, .72fr) auto; align-items: center; gap: 0; border-top: 1px solid var(--line); }
.workspace-priority-fact { min-width: 0; display: grid; grid-template-columns: 21px minmax(0, 1fr); align-items: start; gap: 9px; padding: 0 22px; border-right: 1px solid var(--line); }
.workspace-priority-fact:first-child { padding-left: 0; }
.workspace-priority-fact > svg { margin-top: 4px; color: var(--brand); }
.workspace-priority-fact > span { min-width: 0; display: grid; grid-template-rows: 18px 28px; align-items: center; gap: 0; }
.workspace-priority-fact > span > small { align-self: start; color: var(--muted); font-size: 12px; line-height: 18px; }
.workspace-priority-fact b { color: var(--text); font-size: 14px; line-height: 28px; }
.workspace-owner-roster { min-width: 0; min-height: 28px; display: flex; align-items: center; gap: 12px; }
.workspace-avatar-stack { display: flex; flex: 0 0 auto; padding-left: 7px; }
.workspace-avatar-stack .avatar { position: relative; margin-left: -7px; border: 2px solid var(--surface); background: var(--brand-soft); }
.workspace-avatar-stack .avatar:nth-child(2) { background: var(--success-soft); color: var(--success); }
.workspace-avatar-stack .avatar:nth-child(3) { background: var(--ai-soft); color: var(--ai); }
.workspace-avatar-stack .workspace-avatar-overflow { background: var(--surface-3); color: var(--muted); }
.workspace-owner-names { min-width: 0; display: flex; align-items: baseline; gap: 5px; overflow: hidden; color: var(--text); font-size: 13px; font-weight: 650; white-space: nowrap; text-overflow: ellipsis; }
.workspace-owner-names small { flex: 0 0 auto; color: var(--muted); }
.workspace-priority-action { min-width: 214px; min-height: 54px; justify-self: end; margin-left: 22px; font-size: 16px; }

.workspace-secondary-grid { display: grid; grid-template-columns: minmax(0, 1.34fr) minmax(360px, .96fr); gap: 20px; }
.workspace-tier-section, .workspace-team-section { min-width: 0; }
.workspace-tier-section { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.workspace-tier-heading { min-height: 48px; display: flex; align-items: center; gap: 10px; }
.workspace-tier-section > .workspace-tier-heading { padding: 0 16px; border-bottom: 1px solid var(--line); }
.workspace-tier-number { width: 28px; height: 28px; display: inline-grid; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--brand); color: #fff; font-size: 13px; font-weight: 800; }
.workspace-tier-number.is-warning { background: var(--warning); }
.workspace-tier-heading > strong { color: var(--text); }
.workspace-tier-heading h2 { margin: 0; color: var(--text); font-size: 18px; }
.workspace-tier-heading > a { display: inline-flex; align-items: center; gap: 2px; margin-left: auto; color: var(--brand); font-size: 13px; font-weight: 700; }
.workspace-tier-heading > small { min-width: 22px; height: 22px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--surface-3); color: var(--muted); font-size: 11px; }
.workspace-tier-list, .workspace-risk-list { display: grid; }
.workspace-tier-row { min-height: 88px; display: grid; grid-template-columns: 38px minmax(0, 1fr) 150px 132px 48px; align-items: center; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.workspace-tier-row:last-child, .workspace-risk-row:last-child { border-bottom: 0; }
.workspace-row-icon, .workspace-risk-icon { display: grid; place-items: center; border-radius: 9px; }
.workspace-row-icon { width: 34px; height: 34px; color: var(--brand); background: var(--brand-soft); }
.workspace-row-icon.is-review { color: var(--ai); background: var(--ai-soft); }
.workspace-row-main { min-width: 0; display: grid; gap: 1px; }
.workspace-row-main > small { color: var(--brand); font-size: 11px; font-weight: 750; }
.workspace-row-main > strong { overflow: hidden; color: var(--text); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.workspace-row-main > p { margin: 0; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.workspace-row-person { min-width: 0; display: flex; align-items: center; gap: 7px; }
.workspace-row-person b { overflow: hidden; color: var(--text); font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.workspace-tier-row time { min-width: 0; display: grid; gap: 2px; }
.workspace-tier-row time b { color: var(--text); font-size: 12px; font-weight: 600; }
.workspace-tier-row time small { font-size: 11px; font-weight: 700; }
.workspace-row-action { justify-self: end; color: var(--brand); font-size: 13px; font-weight: 750; }
.workspace-tier-empty { min-height: 150px; display: grid; place-items: center; padding: 24px; color: var(--muted); text-align: center; }

.workspace-risk-row { min-height: 132px; display: grid; grid-template-columns: 48px minmax(0, 1fr) 108px 18px; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.workspace-risk-icon { width: 44px; height: 44px; color: var(--warning); background: var(--warning-soft); }
.workspace-risk-icon.is-danger { color: var(--danger); background: var(--danger-soft); }
.workspace-risk-row > a { min-width: 0; display: grid; gap: 3px; }
.workspace-risk-row > a small { color: var(--warning); font-size: 11px; font-weight: 800; }
.workspace-risk-row:has(.is-danger) > a small { color: var(--danger); }
.workspace-risk-row > a strong { overflow: hidden; color: var(--text); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.workspace-risk-row > a p { margin: 0; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.workspace-risk-row > span:not(.workspace-risk-icon) { display: grid; gap: 2px; }
.workspace-risk-row > span small, .workspace-risk-row > span em { color: var(--muted); font-size: 11px; font-style: normal; }
.workspace-risk-row > span b { color: var(--warning); font-size: 12px; }
.workspace-risk-row:has(.is-danger) > span b { color: var(--danger); }
.workspace-risk-row > svg { color: var(--muted); }

.workspace-team-section > .workspace-tier-heading { padding: 0 2px; }
.workspace-member-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.workspace-member-card { min-width: 0; display: grid; grid-template-columns: 54px minmax(80px, .7fr) minmax(0, 1.3fr); align-items: center; gap: 12px; min-height: 126px; padding: 18px; border-right: 1px solid var(--line); }
.workspace-member-card:last-child { border-right: 0; }
.workspace-member-card .avatar.large { width: 54px; height: 54px; }
.workspace-member-card > div { min-width: 0; display: grid; gap: 2px; }
.workspace-member-card > div > strong { color: var(--text); }
.workspace-member-card > div > small { color: var(--muted); font-size: 11px; }
.workspace-member-card > div:last-child > a, .workspace-member-card > div:last-child > span { overflow: hidden; color: var(--brand); font-size: 13px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.workspace-member-card em { display: inline-flex; width: fit-content; align-items: center; gap: 6px; margin-top: 3px; padding: 0 !important; background: transparent !important; font-size: 11px; font-style: normal; font-weight: 650; }
.workspace-member-card em i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.workspace-member-card em.status-doing { color: var(--brand); }
.workspace-member-card em.status-review { color: var(--ai); }
.workspace-member-card em.status-todo { color: var(--warning); }
.workspace-member-card em.status-done, .workspace-member-card em.status-closed, .workspace-member-card em.status-archived { color: var(--success); }

@media (max-width: 1120px) {
  .workspace-priority-footer { grid-template-columns: minmax(280px, 1.4fr) minmax(110px, .55fr) minmax(160px, .72fr); padding: 14px 0; row-gap: 16px; }
  .workspace-priority-action { grid-column: 1 / -1; width: 100%; margin-left: 0; }
  .workspace-secondary-grid { grid-template-columns: 1fr; }
  .workspace-member-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-member-card:nth-child(2) { border-right: 0; }
  .workspace-member-card:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 820px) {
  .workspace-priority-layout { gap: 14px; }
  .workspace-priority-card { padding: 16px 14px 0; }
  .workspace-priority-heading { flex-wrap: wrap; }
  .workspace-priority-rank { font-size: 26px; }
  .workspace-priority-card > h2 { margin-top: 12px; font-size: 26px; }
  .workspace-priority-description { font-size: 13px; }
  .workspace-criteria.is-multiple .workspace-criteria-items { grid-template-columns: 1fr; }
  .workspace-priority-footer { grid-template-columns: 1fr 1fr; }
  .workspace-priority-fact { min-height: 54px; padding: 0 10px; border: 0; }
  .workspace-priority-owners { grid-column: 1 / -1; padding: 0; }
  .workspace-owner-names { white-space: normal; }
  .workspace-tier-heading { flex-wrap: wrap; padding-block: 9px !important; }
  .workspace-tier-heading > a { margin-left: 0; }
  .workspace-tier-row { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .workspace-tier-row .workspace-row-person, .workspace-tier-row time { display: none; }
  .workspace-risk-row { grid-template-columns: 44px minmax(0, 1fr) 16px; min-height: 104px; padding: 12px; }
  .workspace-risk-row > span:not(.workspace-risk-icon) { display: none; }
  .workspace-member-grid { grid-template-columns: 1fr; }
  .workspace-member-card { grid-template-columns: 48px minmax(72px, .65fr) minmax(0, 1.35fr); min-height: 98px; border-right: 0; border-bottom: 1px solid var(--line); }
  .workspace-member-card:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .workspace-member-card:last-child { border-bottom: 0; }
}

.segmented-tabs { display: inline-flex; border: 1px solid var(--line); border-radius: 9px 9px 0 0; background: var(--surface); overflow: hidden; }
.segmented-tabs button { position: relative; min-height: 58px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-width: 160px; padding: 0 20px; border-right: 1px solid var(--line); color: var(--muted); font-weight: 700; }
.segmented-tabs button:last-child { border-right: 0; }
.segmented-tabs button.active { color: var(--brand); }
.segmented-tabs button.active::after { content: ""; position: absolute; height: 3px; background: var(--brand); inset: auto 0 0; }
.list-panel { padding: 28px; border-radius: 0 var(--radius) var(--radius) var(--radius); }
.filterbar { display: grid; grid-template-columns: minmax(240px, 1.3fr) repeat(3, minmax(140px, .65fr)) auto; gap: 12px; margin-bottom: 28px; }
.task-list-controls { display: grid; grid-template-columns: minmax(260px, 1fr) auto; align-items: start; gap: 12px; margin-bottom: 24px; }
.task-more-filters { position: relative; }
.task-more-filters > summary { min-width: 112px; list-style: none; cursor: pointer; }
.task-more-filters > summary::-webkit-details-marker { display: none; }
.task-more-filters > summary svg:last-child { margin-left: 2px; transition: transform .18s ease-out; }
.task-more-filters[open] > summary svg:last-child { transform: rotate(180deg); }
.task-more-filters > div { width: 360px; position: absolute; z-index: 6; top: 52px; right: 0; display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.search-field { position: relative; display: block; }
.search-field svg { position: absolute; left: 14px; top: 14px; color: var(--muted); }
.search-field input { padding-left: 43px; }
.priority-strip { min-height: 62px; display: flex; align-items: center; gap: 12px; padding: 8px 14px; margin-bottom: 24px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; }
.priority-strip > span:first-of-type { flex: 1; }
.task-table, .knowledge-table { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.task-table-head, .task-row { display: grid; grid-template-columns: minmax(260px, 1.8fr) 126px 126px 118px 108px 112px 90px 34px; align-items: center; column-gap: 10px; padding: 0 14px; }
.task-table.simple .task-table-head, .task-table.simple .task-row { grid-template-columns: minmax(280px, 1.8fr) 150px 130px 112px 100px 84px; }
.task-table-head { min-height: 50px; color: var(--muted); background: var(--surface-2); font-weight: 700; }
.task-row { min-height: 80px; border-top: 1px solid var(--line); }
.task-time-range { display: flex; flex-direction: column; gap: 3px; line-height: 1.25; }
.task-time-range small { color: var(--muted); font-size: 11px; }
.task-row:hover, .project-row:hover, .knowledge-row:hover, .member-row:hover, .tenant-row:hover { background: var(--surface-2); }
.task-main { min-width: 0; display: flex; flex-direction: column; }
.task-main strong, .task-main small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-main small { color: var(--muted); }
.person { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.row-action { color: var(--brand); font-weight: 700; }
.more-button { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 6px; }
.more-button:hover { background: var(--surface-3); }
.list-footer { padding: 18px 2px 0; color: var(--muted); }
.task-table.compact .task-row { min-height: 55px; }
.task-table.compact .reviewer,
.task-table.compact .row-action,
.task-table.compact .more-button,
.task-table.compact .task-table-head > span:nth-child(3),
.task-table.compact .task-table-head > span:nth-child(7),
.task-table.compact .task-table-head > span:last-child { display: none; }
.task-table.compact .task-table-head,
.task-table.compact .task-row { grid-template-columns: minmax(190px, 1fr) minmax(80px, 92px) 102px 84px 76px; }
.task-table.compact .task-table-head > span { white-space: nowrap; }

.project-table { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.project-table-head, .project-row { display: grid; grid-template-columns: minmax(240px, 1.5fr) 130px minmax(170px, .8fr) 110px 92px 92px 58px; align-items: center; gap: 12px; padding: 0 16px; }
.project-table-head { min-height: 50px; color: var(--muted); background: var(--surface-2); font-weight: 700; }
.project-row { min-height: 84px; border-top: 1px solid var(--line); }
.project-main, .project-row > span:nth-child(4) { min-width: 0; display: flex; flex-direction: column; }
.project-main strong, .project-main small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-main small, .project-row small, .project-period { color: var(--muted); }
.project-member-list { display: grid; gap: 10px; }
.project-member-list > span { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 9px; min-height: 38px; }
.project-member-list small { color: var(--muted); }
.project-mobile-actions { display: none; }
.milestone-status-control { width: 118px; }
.milestone-status-control select { min-height: 36px; padding: 6px 34px 6px 10px; font-size: 13px; font-weight: 700; }

.back-link { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; color: var(--brand); font-weight: 700; margin-bottom: 12px; }
.detail-layout, .knowledge-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; }
.detail-main, .knowledge-document { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.detail-title { padding: 28px 30px; border-bottom: 1px solid var(--line); }
.detail-title > div, .document-heading > div { display: flex; gap: 8px; }
.detail-title h1, .detail-title h2 { font-size: 28px; margin: 14px 0 8px; }
.detail-title p { margin: 0; color: var(--muted); }
.detail-title .task-purpose-label { margin: 14px 0 3px; color: var(--text); font-weight: 750; }
.detail-title .task-description { margin-top: 5px; }
.detail-facts { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.detail-facts > div { min-height: 92px; display: flex; flex-direction: column; justify-content: center; gap: 7px; padding: 14px 20px; border-right: 1px solid var(--line); }
.detail-facts > div:last-child { border-right: 0; }
.detail-facts small { color: var(--muted); }
.detail-facts strong { display: flex; align-items: center; gap: 8px; }
.linked-project { min-height: 66px; display: grid; grid-template-columns: 24px 1fr 18px; align-items: center; gap: 10px; padding: 10px 30px; color: var(--brand); border-bottom: 1px solid var(--line); }
.linked-project span { display: flex; flex-direction: column; color: var(--text); }
.linked-project small { color: var(--muted); }
.detail-section { padding: 24px 30px; border-bottom: 1px solid var(--line); }
.detail-section:last-child { border-bottom: 0; }
.detail-section h3 { margin-bottom: 14px; }
.criteria-list.numbered { border: 0; }
.criteria-list.numbered > div { padding-left: 0; }
.criteria-list.numbered span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 800; }
.criteria-list.numbered p { margin: 0; }
.alert { display: flex; align-items: flex-start; gap: 12px; margin: 20px 30px 0; padding: 14px 16px; border-radius: 8px; }
.alert p { margin: 3px 0 0; }
.alert.danger { color: var(--danger); background: var(--danger-soft); }
.alert.warning { color: var(--warning); background: var(--warning-soft); }
.alert.success { color: var(--success); background: var(--success-soft); }
.draft-editor > .alert { margin: 0 0 18px; }
.attachment-list { display: grid; gap: 8px; }
.attachment-list a { min-height: 46px; display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--surface-2); border-radius: 7px; }
.attachment-list a span { flex: 1; }
.attachment-list small, .muted-copy { color: var(--muted); }
.comment-list { display: grid; gap: 16px; margin-bottom: 14px; }
.comment { display: flex; gap: 10px; }
.comment p { margin: 0; }
.comment time { color: var(--muted); font-size: 13px; }
.detail-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.detail-section-heading h3 { margin: 0; }
.detail-section-heading > span, .detail-section-heading > small { color: var(--muted); font-size: 12px; }
.task-timeline { gap: 8px; }
.task-timeline-toolbar { display: flex; align-items: center; gap: 6px; margin: -2px 0 12px; }
.task-timeline-toolbar button { min-height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: var(--surface); font-size: 12px; font-weight: 750; }
.task-timeline-toolbar button:hover { border-color: color-mix(in srgb, var(--brand) 42%, var(--line)); color: var(--brand); }
.task-timeline-toolbar button.active { border-color: var(--brand); color: #fff; background: var(--brand); }
.timeline-entry { min-width: 0; align-items: flex-start; gap: 12px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 9px; }
.timeline-entry.is-comment { background: color-mix(in srgb, var(--brand-soft) 45%, var(--surface)); border-color: color-mix(in srgb, var(--brand) 18%, var(--line)); }
.timeline-entry.is-comment.is-selected { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 10%, transparent); }
.timeline-entry.is-activity { background: var(--surface-2); }
.timeline-entry-icon { width: 32px; height: 32px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 8px; color: var(--muted); background: var(--surface); }
.timeline-entry.is-comment .timeline-entry-icon { color: var(--brand); }
.timeline-entry-body { min-width: 0; flex: 1; }
.timeline-entry-body header { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 9px; margin-bottom: 5px; }
.timeline-entry-body header time { margin-inline-start: auto; }
.timeline-entry-body p { overflow-wrap: anywhere; color: var(--text); line-height: 1.65; }
.timeline-entry-body .deleted-comment-copy { color: var(--muted); font-style: italic; }
.timeline-comment-actions { min-height: 28px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 5px; color: var(--muted); font-size: 12px; }
.timeline-comment-actions button { min-height: 28px; display: inline-flex; align-items: center; gap: 4px; color: var(--brand); font-weight: 750; }
.timeline-comment-actions .timeline-reply-count { min-height: 34px; margin-inline-end: auto; padding: 0 3px; color: var(--muted); font-weight: 650; }
.timeline-comment-actions .timeline-reply-count:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.timeline-comment-actions .timeline-reply-count:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 3px; color: var(--brand); }
.timeline-comment-actions button.danger-text { color: var(--danger); }
.timeline-kind { padding: 2px 7px; border-radius: 999px; color: var(--muted); background: var(--surface); font-size: 11px; font-weight: 800; }
.timeline-entry.is-comment .timeline-kind { color: var(--brand); }
.timeline-empty { min-height: 104px; display: grid; place-items: center; align-content: center; gap: 7px; color: var(--muted); text-align: center; }
.timeline-empty p { margin: 0; }
.task-timeline-pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 4px 0 14px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.task-timeline-pagination .pagination-controls button { min-width: 36px; min-height: 36px; }
.detail-aside, .knowledge-aside { display: grid; gap: 16px; align-content: start; }
.task-detail-layout .detail-main { overflow: hidden; }
.task-detail-layout .detail-aside { position: sticky; top: 18px; align-self: start; }
.detail-next-actions .button { width: 100%; }
.task-risk-state { display: grid; gap: 14px; }
.task-risk-state > span { display: inline-flex; align-items: center; gap: 7px; font-weight: 750; }
.task-evidence-empty { min-height: 74px; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 12px; padding: 12px 14px; border: 1px dashed var(--line-strong); border-radius: 8px; color: var(--muted); background: var(--surface-2); }
.task-evidence-empty > span { min-width: 0; display: grid; gap: 2px; }
.task-evidence-empty strong { color: var(--text); }
.task-evidence-empty small { line-height: 1.5; }
.detail-aside .panel p, .knowledge-aside .panel p { color: var(--muted); }
.aside-actions { display: grid; gap: 6px; }

/* Project overview */
.topbar-breadcrumbs { min-height: 46px; display: flex; align-items: center; gap: 11px; color: var(--muted); font-weight: 650; }
.topbar-breadcrumbs a:hover { color: var(--brand); }
.topbar-breadcrumbs span[aria-current="page"] { color: var(--text); font-weight: 800; }
.project-action-menu { position: relative; z-index: 25; }
.project-action-menu > summary { min-width: 92px; cursor: pointer; list-style: none; }
.project-action-menu > summary::-webkit-details-marker { display: none; }
.project-action-menu[open] > summary { color: var(--brand); background: var(--brand-soft); }
.project-action-popover { position: absolute; z-index: 45; top: calc(100% + 10px); right: 0; width: 180px; overflow: hidden; padding: 7px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.project-action-popover button { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 11px; border-radius: 7px; text-align: left; }
.project-action-popover button:hover { background: var(--surface-2); }
.project-action-popover .danger-text { border-top: 1px solid var(--line); border-radius: 0 0 7px 7px; color: var(--danger); }
.project-overview-page { min-width: 0; display: grid; gap: 16px; }
.project-overview-hero { min-height: 126px; display: grid; grid-template-columns: minmax(340px, 1.05fr) minmax(620px, 1.55fr); align-items: center; gap: 28px; padding: 23px 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.project-overview-title { min-width: 0; }
.project-overview-title h1 { overflow: hidden; margin: 0 0 12px; font-size: clamp(24px, 2.1vw, 31px); line-height: 1.2; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.project-overview-title > div { display: flex; flex-wrap: wrap; gap: 7px; }
.project-overview-title > p { overflow: hidden; margin: 10px 0 0; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.project-overview-facts { min-width: 0; display: grid; grid-template-columns: 1fr 1.45fr 1fr .9fr; margin: 0; }
.project-overview-facts > div { min-width: 0; display: grid; align-content: center; gap: 7px; min-height: 68px; padding: 0 18px; border-left: 1px solid var(--line); }
.project-overview-facts dt { color: var(--muted); font-size: 12px; }
.project-overview-facts dd { min-width: 0; display: flex; align-items: center; gap: 8px; margin: 0; overflow: hidden; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.project-overview-grid { min-width: 0; display: grid; grid-template-columns: minmax(0, 2.12fr) minmax(310px, .9fr); gap: 16px; align-items: start; }
.project-overview-main, .project-overview-aside { min-width: 0; display: grid; gap: 14px; align-content: start; }
.project-overview-card, .project-context-card, .project-execution-overview, .project-ai-executive-card { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.project-overview-card { padding: 19px 22px; }
.project-overview-card > h2, .project-context-card > h2, .project-overview-card > header h2 { margin: 0 0 16px; font-size: 18px; }
.project-overview-card-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.project-overview-card-heading h2 { margin: 0 0 16px; font-size: 18px; }
.project-overview-card-heading small { color: var(--muted); font-size: 11px; }
.project-execution-overview { display: grid; grid-template-columns: 1.08fr repeat(3, .92fr) 1.2fr; overflow: hidden; }
.project-execution-overview > div { min-width: 0; min-height: 116px; display: grid; align-content: center; gap: 7px; padding: 18px 20px; border-right: 1px solid var(--line); }
.project-execution-overview > div:last-child { border-right: 0; }
.project-execution-overview span, .project-execution-overview small { color: var(--muted); font-size: 12px; }
.project-execution-overview strong { min-width: 0; display: flex; align-items: center; gap: 8px; overflow: hidden; font-size: 19px; text-overflow: ellipsis; white-space: nowrap; }
.project-progress-summary progress { width: 100%; height: 6px; overflow: hidden; border: 0; border-radius: 999px; background: var(--surface-3); }
.project-progress-summary progress::-webkit-progress-bar { border-radius: inherit; background: var(--surface-3); }
.project-progress-summary progress::-webkit-progress-value { border-radius: inherit; background: var(--brand); }
.project-progress-summary progress::-moz-progress-bar { border-radius: inherit; background: var(--brand); }
.project-next-step strong { color: var(--text); font-size: 15px; line-height: 1.45; white-space: normal; }
.project-next-step strong svg { width: 31px !important; height: 31px !important; padding: 8px; border-radius: 50%; color: #fff; background: var(--brand); }
.project-milestone-track { min-width: 720px; display: grid; grid-template-columns: repeat(var(--milestone-count, 4), minmax(150px, 1fr)); overflow-x: auto; padding: 12px 4px 2px; }
.project-milestone-step { position: relative; min-width: 0; display: grid; justify-items: center; gap: 8px; padding: 0 10px; text-align: center; }
.project-milestone-step::before { position: absolute; z-index: 0; top: 16px; left: 0; width: 100%; height: 2px; content: ""; background: var(--line-strong); }
.project-milestone-step:first-child::before { left: 50%; width: 50%; }
.project-milestone-step:last-child::before { width: 50%; }
.project-milestone-step.is-completed::before { background: var(--brand); }
.project-milestone-index { position: relative; z-index: 1; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); background: var(--surface-3); font-weight: 800; }
.project-milestone-step.is-active .project-milestone-index, .project-milestone-step.is-delayed .project-milestone-index, .project-milestone-step.is-completed .project-milestone-index { color: #fff; background: var(--brand); }
.project-milestone-step > strong { min-width: 0; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.project-milestone-step > small { color: var(--muted); font-size: 11px; }
.project-milestone-step .milestone-status-control { width: 104px; }
.project-milestone-step .milestone-status-control select { min-height: 31px; padding-block: 4px; font-size: 11px; }
.project-key-files { overflow-x: auto; border: 1px solid var(--line); border-radius: 9px; }
.project-key-files-head, .project-key-file-row { min-width: 760px; display: grid; grid-template-columns: minmax(260px, 1.8fr) 100px 80px 120px 118px 38px; align-items: center; gap: 12px; padding: 0 13px; }
.project-key-files-head { min-height: 38px; color: var(--muted); background: var(--surface-2); font-size: 11px; font-weight: 750; }
.project-key-file-row { min-height: 46px; border-top: 1px solid var(--line); font-size: 12px; }
.project-key-file-row > span:first-child { min-width: 0; display: flex; align-items: center; gap: 9px; }
.project-key-file-row > span:first-child svg { color: var(--brand); }
.project-key-file-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-key-file-row > span:not(:first-child) { color: var(--muted); }
.project-ai-executive-card { overflow: hidden; }
.project-ai-executive-card > summary { min-height: 86px; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 15px 20px; cursor: pointer; list-style: none; }
.project-ai-executive-card > summary::-webkit-details-marker { display: none; }
.project-ai-executive-card > summary > span { min-width: 0; display: grid; gap: 4px; }
.project-ai-executive-card > summary > span:nth-child(2) small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.project-ai-executive-card > summary > span:last-child { justify-items: end; }
.project-ai-executive-card > summary em { display: flex; align-items: center; gap: 5px; color: var(--brand); font-size: 12px; font-style: normal; font-weight: 750; }
.project-ai-executive-card[open] > summary em svg { transform: rotate(180deg); }
.project-ai-executive-detail { padding: 0 20px 20px; border-top: 1px solid var(--line); }
.project-ai-executive-detail .project-ai-brief { margin-top: 20px; }
.project-context-card { padding: 18px 20px; }
.project-customer-context { padding: 15px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.project-customer-context header, .project-team-context header { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.project-customer-context header svg, .project-team-context header svg { color: var(--brand); }
.project-customer-context dl { display: grid; gap: 0; margin: 0; }
.project-customer-context dl > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.project-customer-context dl > div:last-child { border-bottom: 0; }
.project-customer-context dt { color: var(--muted); }
.project-customer-context dd { margin: 0; overflow-wrap: anywhere; font-weight: 650; }
.project-team-context { margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--line); }
.project-team-context > span { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 9px; min-height: 42px; }
.project-team-context > span small { color: var(--muted); }
.project-overview-card > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.project-overview-card > header span { color: var(--muted); font-size: 12px; }
.project-material-list { display: grid; }
.project-material-list > a { min-height: 57px; display: grid; grid-template-columns: 22px minmax(0, 1fr) 18px; align-items: center; gap: 9px; border-top: 1px solid var(--line); }
.project-material-list > a:first-child { border-top: 0; }
.project-material-list > a > svg { color: var(--brand); }
.project-material-list > a > span { min-width: 0; display: grid; gap: 3px; }
.project-material-list strong, .project-material-list small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-material-list strong { font-size: 12px; }
.project-material-list small { color: var(--muted); font-size: 10px; }
.project-risk-card > h2 { display: flex; align-items: center; gap: 8px; }
.project-risk-card > h2 svg { color: var(--danger); }
.project-risk-note { display: grid; gap: 10px; padding: 13px; border: 1px solid color-mix(in srgb, var(--danger) 30%, var(--line)); border-radius: 9px; background: var(--danger-soft); }
.project-risk-note .badge { justify-self: start; }
.project-risk-note small { color: var(--muted); }
.project-related-tasks { overflow: hidden; }

@media (max-width: 1320px) {
  .project-overview-hero { grid-template-columns: 1fr; gap: 18px; }
  .project-overview-facts > div:first-child { border-left: 0; padding-left: 0; }
  .project-execution-overview { grid-template-columns: repeat(3, 1fr); }
  .project-execution-overview > div:nth-child(3) { border-right: 0; }
  .project-execution-overview > div:nth-child(n+4) { border-top: 1px solid var(--line); }
  .project-execution-overview > div:last-child { grid-column: span 2; }
}

@media (max-width: 1040px) {
  .project-overview-grid { grid-template-columns: 1fr; }
  .project-overview-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-risk-card { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .topbar-breadcrumbs { min-height: 40px; font-size: 13px; }
  .top-actions .project-header-edit, .top-actions .project-action-menu { display: none; }
  .project-overview-page { gap: 12px; }
  .project-overview-hero { min-height: 0; padding: 18px 16px; }
  .project-overview-title h1 { font-size: 24px; white-space: normal; }
  .project-overview-facts { grid-template-columns: 1fr 1fr; }
  .project-overview-facts > div { min-height: 64px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
  .project-overview-facts > div:nth-child(odd) { border-left: 0; padding-left: 0; }
  .project-mobile-actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .project-mobile-actions .project-header-edit, .project-mobile-actions .project-action-menu, .project-mobile-actions .project-action-menu > summary { width: 100%; }
  .project-action-popover { right: 0; width: min(240px, calc(100vw - 28px)); }
  .project-execution-overview { grid-template-columns: 1fr 1fr; }
  .project-execution-overview > div, .project-execution-overview > div:nth-child(3) { min-height: 92px; border-right: 1px solid var(--line); border-top: 1px solid var(--line); }
  .project-execution-overview > div:nth-child(odd) { border-right: 0; }
  .project-execution-overview > div:first-child, .project-execution-overview > div:nth-child(2) { border-top: 0; }
  .project-execution-overview > div:last-child { grid-column: 1 / -1; border-right: 0; }
  .project-overview-card { padding: 17px 15px; }
  .project-milestone-track { min-width: 620px; }
  .project-ai-executive-card > summary { grid-template-columns: 38px minmax(0, 1fr); }
  .project-ai-executive-card > summary > span:last-child { grid-column: 2; justify-items: start; }
  .project-ai-executive-card > summary > span:nth-child(2) small { white-space: normal; }
  .project-overview-aside { grid-template-columns: 1fr; }
  .project-risk-card { grid-column: auto; }
}

.eyebrow { display: block; margin-bottom: 7px; color: var(--brand); font-weight: 800; letter-spacing: .06em; }
.onboarding-hero h2 { margin-bottom: 9px; font-size: 30px; }
.onboarding-hero p { color: var(--muted); }
.ask-box { display: flex; gap: 9px; padding: 8px; margin-top: 22px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); }
.ask-box input, .ask-box textarea { border: 0; box-shadow: none; }
.ask-box.large { align-items: flex-end; }
.ask-box.large textarea { min-height: 90px; }
.knowledge-home-search { min-height: 126px; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 26px 28px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); box-shadow: 0 6px 18px rgba(35, 71, 126, .035); }
.knowledge-home-search > span { color: var(--ai); }
.knowledge-home-search input { min-height: 52px; padding: 0; border: 0; border-radius: 0; box-shadow: none; font-size: 17px; }
.knowledge-home-search input::placeholder { color: color-mix(in srgb, var(--muted) 84%, transparent); }
.knowledge-home-search .button { min-width: 126px; min-height: 48px; }
.knowledge-home-layout { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(300px, .72fr); gap: 16px; margin-top: 16px; }
.knowledge-home-panel { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.knowledge-home-panel > header { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 22px; border-bottom: 1px solid var(--line); }
.knowledge-home-panel > header > div { display: flex; align-items: center; gap: 10px; }
.knowledge-home-panel h3 { margin: 0; font-size: 17px; }
.knowledge-home-panel > header > a { display: inline-flex; align-items: center; gap: 5px; color: var(--brand); font-weight: 700; }
.knowledge-home-title-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: var(--brand); background: var(--brand-soft); }
.knowledge-home-table { min-width: 0; }
.knowledge-home-head, .knowledge-home-row { display: grid; grid-template-columns: minmax(260px, 1fr) 72px 90px 118px 18px; align-items: center; gap: 12px; padding: 0 20px; }
.knowledge-home-head { min-height: 43px; color: var(--muted); background: var(--surface-2); font-size: 13px; font-weight: 700; }
.knowledge-home-row { min-height: 82px; border-top: 1px solid var(--line); }
.knowledge-home-row:first-of-type { border-top: 0; }
.knowledge-home-row:hover { background: var(--surface-2); }
.knowledge-home-document { min-width: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 10px; }
.knowledge-home-document > svg { color: var(--brand); }
.knowledge-home-document > span { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.knowledge-home-document strong, .knowledge-home-document small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-home-document small, .knowledge-home-owner, .knowledge-home-row time { color: var(--muted); }
.knowledge-home-row > svg:last-child { color: var(--muted); }
.knowledge-review-panel { align-self: start; }
.knowledge-review-section { padding: 16px 20px 10px; }
.knowledge-review-section + .knowledge-review-section { border-top: 1px solid var(--line); }
.knowledge-review-label { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; color: var(--muted); }
.knowledge-review-label strong { color: var(--text); font-size: 14px; }
.knowledge-review-label span { min-width: 22px; height: 22px; display: grid; place-items: center; border-radius: 11px; color: var(--brand); background: var(--brand-soft); font-size: 12px; font-weight: 800; }
.knowledge-review-item { min-height: 70px; display: grid; grid-template-columns: 34px minmax(0, 1fr) 18px; align-items: center; gap: 10px; border-top: 1px solid var(--line); }
.knowledge-review-item > span:first-child { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: var(--brand); background: var(--brand-soft); }
.knowledge-review-item > span.ai-mark { color: #fff; background: linear-gradient(145deg, #8b5cf6, #6d28d9); }
.knowledge-review-item p { min-width: 0; display: flex; flex-direction: column; gap: 3px; margin: 0; }
.knowledge-review-item strong, .knowledge-review-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-review-item small { color: var(--muted); }
.knowledge-review-item > svg { color: var(--muted); }
.knowledge-review-panel .support-empty { margin: 0; padding: 15px 2px 18px; }
.knowledge-home-trust { padding: 22px; }
.knowledge-toolbar { display: flex; align-items: flex-end; justify-content: space-between; }
.knowledge-table { border-radius: 8px; }
.knowledge-head, .knowledge-row { display: grid; grid-template-columns: minmax(280px, 1.8fr) 100px 70px 110px 130px; gap: 12px; align-items: center; padding: 0 16px; }
.knowledge-head { min-height: 48px; color: var(--muted); background: var(--surface-2); font-weight: 700; }
.knowledge-row { min-height: 74px; border-top: 1px solid var(--line); }
.knowledge-row a { min-width: 0; display: flex; flex-direction: column; }
.knowledge-row a strong, .knowledge-row a small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.knowledge-row a small { color: var(--muted); }
.knowledge-table.compact .knowledge-head { display: none; }
.knowledge-table.compact .knowledge-row { grid-template-columns: minmax(260px, 1.8fr) 80px 55px 80px 110px; }
.knowledge-library-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.knowledge-library-actions { display: flex; gap: 10px; }
.knowledge-library-panel { border-radius: var(--radius); }
.knowledge-filterbar { grid-template-columns: minmax(280px, 1fr) 220px auto; align-items: center; margin-bottom: 18px; }
.knowledge-selection-bar { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 7px 12px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.knowledge-selection-bar > span:first-child { white-space: nowrap; }
.knowledge-selection-bar > span:first-child strong { color: var(--brand); }
.knowledge-selection-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.knowledge-selection-hint { color: var(--muted); }
.knowledge-table.selectable .knowledge-head,
.knowledge-table.selectable .knowledge-row { grid-template-columns: 36px minmax(280px, 1.8fr) 100px 70px 110px 130px; }
.knowledge-selector { min-width: 36px; min-height: 44px; display: grid; place-items: center; cursor: pointer; }
.knowledge-selector input { width: 18px; min-height: 18px; margin: 0; accent-color: var(--brand); }
.knowledge-table.selectable .knowledge-row:has(.knowledge-select:checked) { background: var(--brand-soft); }
.knowledge-pagination { min-height: 64px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding-top: 14px; color: var(--muted); }
.knowledge-pagination > label { display: flex; align-items: center; justify-content: flex-end; gap: 8px; white-space: nowrap; }
.knowledge-pagination select { width: auto; min-height: 40px; padding: 7px 36px 7px 10px; }
.pagination-controls { display: flex; align-items: center; justify-content: center; gap: 4px; }
.pagination-controls button { min-width: 40px; min-height: 40px; display: grid; place-items: center; padding: 0 10px; border: 1px solid transparent; border-radius: 7px; color: var(--muted); }
.pagination-controls button:hover:not(:disabled) { color: var(--brand); background: var(--brand-soft); }
.pagination-controls button.active { color: var(--brand); background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); font-weight: 800; }
.pagination-gap { min-width: 28px; text-align: center; }
.batch-selection-preview { max-height: 190px; display: grid; gap: 1px; margin-top: 14px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--line); }
.batch-selection-preview span, .batch-selection-preview small { padding: 10px 12px; background: var(--surface); }
.batch-selection-preview small { color: var(--muted); }
.document-heading { padding: 34px 38px 22px; border-bottom: 1px solid var(--line); }
.document-heading h2 { margin: 18px 0 8px; font-size: 31px; }
.document-heading p { color: var(--muted); }
.document-body { padding: 32px 38px; font-size: 16px; line-height: 1.8; white-space: pre-line; }
.document-footer { display: flex; gap: 24px; padding: 18px 38px; border-top: 1px solid var(--line); color: var(--muted); }
.document-footer span { display: flex; align-items: center; gap: 7px; }

.app-shell:has(.knowledge-detail-workspace) .back-link { min-height: 32px; margin-bottom: 8px; }
.knowledge-detail-workspace { display: grid; grid-template-columns: minmax(0, 1.36fr) minmax(390px, 1fr); grid-template-areas: "document context" "metadata impact"; gap: 16px; align-items: start; }
.knowledge-document-v2 { grid-area: document; min-width: 0; min-height: 540px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.knowledge-document-header { min-height: 180px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 30px 32px 26px; border-bottom: 1px solid var(--line); }
.knowledge-document-identity { min-width: 0; }
.knowledge-document-badges { display: flex; flex-wrap: wrap; gap: 7px; }
.knowledge-document-header h1 { max-width: 720px; margin: 18px 0 9px; font-size: 28px; line-height: 1.3; letter-spacing: -.025em; }
.knowledge-document-header p { margin: 0; color: var(--muted); font-size: 13px; }
.knowledge-document-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.knowledge-document-actions .button { min-height: 40px; padding-inline: 13px; white-space: nowrap; }
.knowledge-document-content { max-width: 780px; padding: 30px 32px 38px; font-size: 16px; line-height: 1.85; }
.knowledge-document-content > :first-child { margin-top: 0; }
.knowledge-document-content > :last-child { margin-bottom: 0; }
.knowledge-document-content p { margin: 0 0 22px; }
.knowledge-document-content ul, .knowledge-document-content ol { display: grid; gap: 9px; margin: 0 0 24px; padding-left: 22px; }
.knowledge-document-section { margin: 0 0 28px; }
.knowledge-document-section h3 { width: fit-content; margin: 0 0 14px; padding-bottom: 7px; border-bottom: 1px solid var(--line-strong); font-size: 18px; }
.knowledge-document-section p { margin: 0; }
.knowledge-document-meta-strip { grid-area: metadata; min-height: 64px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.knowledge-document-meta-strip > span { min-width: 0; display: grid; grid-template-columns: 22px minmax(0, 1fr); grid-template-rows: auto auto; align-content: center; gap: 2px 8px; padding: 10px 18px; border-right: 1px solid var(--line); }
.knowledge-document-meta-strip > span:last-child { border-right: 0; }
.knowledge-document-meta-strip svg { grid-row: 1 / 3; align-self: center; color: var(--muted); }
.knowledge-document-meta-strip small { color: var(--muted); font-size: 11px; }
.knowledge-document-meta-strip strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }

.knowledge-context-workspace { grid-area: context; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.knowledge-context-workspace > header { min-height: 78px; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.knowledge-context-workspace > header > span:first-child { color: var(--brand); }
.knowledge-context-workspace > header h2 { margin: 0 0 3px; font-size: 18px; }
.knowledge-context-version { color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; }
.knowledge-lineage-track { position: relative; display: grid; padding: 15px 20px 5px; }
.knowledge-lineage-track::before { content: ""; position: absolute; top: 35px; bottom: 30px; left: 35px; width: 1px; background: var(--line-strong); }
.knowledge-lineage-step { position: relative; z-index: 1; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 8px 0 12px; }
.knowledge-lineage-marker { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: var(--surface); }
.knowledge-lineage-step.is-current .knowledge-lineage-marker { border-color: var(--brand); color: #fff; background: var(--brand); }
.knowledge-lineage-step.is-relation .knowledge-lineage-marker { color: var(--brand); background: var(--brand-soft); }
.knowledge-lineage-step.is-brand .knowledge-lineage-marker { border-color: var(--brand); color: var(--brand); }
.knowledge-lineage-step.is-success .knowledge-lineage-marker { border-color: var(--success); color: var(--success); }
.knowledge-lineage-step.is-warning .knowledge-lineage-marker { border-color: var(--warning); color: var(--warning); }
.knowledge-lineage-step.is-danger .knowledge-lineage-marker { border-color: var(--danger); color: var(--danger); }
.knowledge-lineage-step-body { min-width: 0; }
.knowledge-lineage-step-body > h3 { margin: 6px 0 8px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.knowledge-lineage-resource-list { display: grid; gap: 6px; }
.knowledge-lineage-resource { min-height: 48px; display: grid; grid-template-columns: 30px minmax(0, 1fr) 16px; align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
a.knowledge-lineage-resource:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); background: color-mix(in srgb, var(--brand-soft) 42%, var(--surface)); }
.knowledge-lineage-resource > span:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.knowledge-lineage-resource strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.knowledge-lineage-resource small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-lineage-resource > svg { color: var(--muted); }
.knowledge-lineage-resource-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; color: var(--brand); background: var(--surface); }
.knowledge-current-node { display: grid; gap: 3px; padding: 12px 13px; border: 1px solid color-mix(in srgb, var(--brand) 34%, var(--line)); border-radius: 9px; background: color-mix(in srgb, var(--brand-soft) 68%, var(--surface)); }
.knowledge-current-node strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.knowledge-current-node small { color: var(--brand); font-size: 11px; }
.knowledge-lineage-empty { min-height: 42px; display: flex; align-items: center; margin: 0; padding: 8px 10px; border: 1px dashed var(--line-strong); border-radius: 8px; color: var(--muted); background: var(--surface-2); font-size: 11px; }
.knowledge-relation-row { position: relative; display: grid; gap: 4px; padding: 9px 9px 8px; border: 1px solid var(--line); border-radius: 8px; }
.knowledge-relation-row .knowledge-lineage-resource { min-height: 40px; padding: 0; border: 0; background: transparent; }
.knowledge-relation-row > small { padding-left: 38px; color: var(--muted); font-size: 10px; }
.knowledge-governance-link { min-height: 44px; display: flex; align-items: center; justify-content: flex-end; gap: 5px; padding: 0 20px; border-top: 1px solid var(--line); color: var(--brand); font-size: 12px; font-weight: 750; }
.knowledge-governance-link:hover { background: var(--surface-2); }
.knowledge-impact-strip { grid-area: impact; min-height: 64px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 9px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.knowledge-impact-strip-title { min-width: 0; display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; gap: 8px; }
.knowledge-impact-strip-title > svg { color: var(--brand); }
.knowledge-impact-strip-title > span, .knowledge-impact-strip.is-error > div, .knowledge-impact-strip.is-loading > div { min-width: 0; display: grid; gap: 2px; }
.knowledge-impact-strip-title small, .knowledge-impact-strip.is-error small, .knowledge-impact-strip.is-loading small { color: var(--muted); font-size: 10px; }
.knowledge-impact-strip-counts { display: flex; gap: 10px; }
.knowledge-impact-strip-counts > span { display: grid; justify-items: center; }
.knowledge-impact-strip-counts strong { font-size: 15px; }
.knowledge-impact-strip-counts small { color: var(--muted); font-size: 9px; white-space: nowrap; }
.knowledge-impact-strip .button { min-height: 34px; padding-inline: 8px; font-size: 11px; }
.knowledge-impact-clear-label { display: inline-flex; align-items: center; gap: 5px; color: var(--success); font-size: 11px; font-weight: 750; white-space: nowrap; }
.knowledge-impact-strip.is-error, .knowledge-impact-strip.is-loading { grid-template-columns: 22px 1fr; }
.knowledge-impact-strip.is-error > svg { color: var(--danger); }
.knowledge-impact-strip.is-loading > svg { color: var(--brand); }
@media (max-width: 980px) {
  .knowledge-detail-workspace { grid-template-columns: 1fr; grid-template-areas: "document" "metadata" "context" "impact"; }
  .knowledge-document-v2 { min-height: 0; }
  .knowledge-context-workspace { position: static; }
}
@media (max-width: 760px) {
  .knowledge-document-header { min-height: 0; flex-direction: column; padding: 22px 18px 18px; }
  .knowledge-document-header h1 { margin-top: 14px; font-size: 25px; }
  .knowledge-document-actions { width: 100%; display: grid; grid-template-columns: 1fr auto; }
  .knowledge-document-actions .button:first-child { min-width: 0; }
  .knowledge-document-content { padding: 22px 18px 30px; font-size: 15px; }
  .knowledge-document-meta-strip { grid-template-columns: 1fr; }
  .knowledge-document-meta-strip > span { min-height: 62px; border-right: 0; border-bottom: 1px solid var(--line); }
  .knowledge-document-meta-strip > span:last-child { border-bottom: 0; }
  .knowledge-context-workspace > header { padding-inline: 16px; }
  .knowledge-lineage-track { padding-inline: 16px; }
  .knowledge-lineage-track::before { left: 31px; }
  .knowledge-impact-strip { grid-template-columns: 1fr; }
  .knowledge-impact-strip-counts { justify-content: space-between; padding: 9px 0; border-block: 1px solid var(--line); }
  .knowledge-impact-strip .button { width: 100%; }
}
.reference-list { display: grid; gap: 4px; }
.reference-list > div, .reference-list > a { min-height: 58px; display: grid; grid-template-columns: 28px 1fr 18px; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.reference-list > :last-child { border-bottom: 0; }
.reference-list > div > span, .reference-list > a > span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 4px; background: var(--brand-soft); color: var(--brand); font-weight: 800; }
.reference-list p { display: flex; flex-direction: column; margin: 0; }
.meta-list { margin: 0 0 18px; }
.meta-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.meta-list dt { color: var(--muted); }
.meta-list dd { margin: 0; text-align: right; }
.ask-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; }
.ask-main, .draft-editor, .draft-queue { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 32px; }
.ask-intro { display: flex; gap: 14px; align-items: center; }
.ask-intro h2 { margin: 0; }
.ask-intro p { margin: 3px 0 0; color: var(--muted); }
.answer-card { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 24px; }
.answer-heading { display: flex; align-items: center; gap: 12px; }
.answer-heading > div { display: flex; flex-direction: column; }
.answer-heading small { color: var(--muted); }
.answer-body { margin: 20px 0; line-height: 1.8; white-space: pre-line; }
.citation-list { border-top: 1px solid var(--line); padding-top: 18px; }
.citation-list a { min-height: 64px; display: grid; grid-template-columns: 28px 1fr 18px; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.citation-list a > span { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 5px; background: var(--brand-soft); color: var(--brand); }
.citation-list p { display: flex; flex-direction: column; margin: 0; }
.citation-list small { color: var(--muted); }
.trust-list { display: grid; gap: 12px; }
.trust-list p { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--text) !important; }
.trust-list svg { color: var(--brand); }

.onboarding-hero { max-width: 830px; padding: 20px 4px 24px; }
.onboarding-hero-primary { max-width: 820px; margin: 42px auto 0; padding: 0; text-align: center; }
.onboarding-hero-primary .eyebrow { display: inline-flex; margin-bottom: 16px; }
.onboarding-hero-primary h2 { margin: 0; font-size: clamp(38px, 4vw, 54px); line-height: 1.12; letter-spacing: -.045em; }
.onboarding-hero-primary p { max-width: 700px; margin: 18px auto 0; color: var(--muted); font-size: 16px; line-height: 1.8; }
.onboarding-steps { max-width: 990px; display: grid; grid-template-columns: repeat(3, 1fr); margin: 48px auto 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); list-style: none; }
.onboarding-steps li { min-width: 0; display: grid; grid-template-columns: 28px 42px minmax(0, 1fr) 18px; gap: 11px; align-items: center; padding: 20px 18px; position: relative; }
.onboarding-steps li + li { border-left: 1px solid var(--line); }
.onboarding-steps li > span { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: var(--brand); background: var(--brand-soft); font-size: 12px; font-weight: 800; }
.onboarding-steps li > svg { color: var(--brand); }
.onboarding-steps li > svg:last-child { color: var(--brand); }
.onboarding-steps li:last-child > svg { color: var(--ai); }
.onboarding-steps p { min-width: 0; display: grid; gap: 3px; margin: 0; }
.onboarding-steps strong { font-size: 15px; }
.onboarding-steps small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.onboarding-primary-action { display: grid; justify-items: center; gap: 13px; margin: 32px auto 0; }
.onboarding-primary-action .button { min-width: 330px; min-height: 56px; justify-content: center; border-radius: 10px; font-size: 17px; box-shadow: 0 12px 26px color-mix(in srgb, var(--brand) 22%, transparent); }
.onboarding-primary-action > small { display: flex; align-items: center; gap: 7px; color: var(--muted); }
.onboarding-primary-action > small svg { color: var(--brand); }
.onboarding-alternatives { max-width: 1080px; margin: 48px auto 0; }
.onboarding-alternatives > header { display: flex; align-items: center; gap: 22px; color: var(--muted); font-size: 14px; }
.onboarding-alternatives > header::before, .onboarding-alternatives > header::after { height: 1px; flex: 1; background: var(--line); content: ""; }
.onboarding-options { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 24px; }
.onboarding-options > a, .onboarding-options > button { min-width: 0; display: grid; grid-template-columns: 42px minmax(0, 1fr) 18px; gap: 12px; align-items: center; padding: 16px 24px; border: 0; border-radius: 0; color: var(--text); background: transparent; text-align: left; text-decoration: none; cursor: pointer; }
.onboarding-options > * + * { border-left: 1px solid var(--line); }
.onboarding-options > a:hover, .onboarding-options > button:hover { background: var(--surface-2); }
.onboarding-options > * > svg:first-child { color: var(--brand); }
.onboarding-options > *:first-child > svg:first-child { color: var(--ai); }
.onboarding-options > * > svg:last-child { color: var(--muted); }
.onboarding-options span { min-width: 0; display: grid; gap: 4px; }
.onboarding-options strong { font-size: 15px; }
.onboarding-options small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.onboarding-note { max-width: 930px; display: flex; align-items: center; gap: 12px; margin: 48px auto 0; padding: 15px 18px; border: 0; border-radius: 10px; color: var(--muted); background: var(--brand-soft); }
.onboarding-note > svg { flex: 0 0 auto; color: var(--brand); }
.onboarding-note p { margin: 0; }
.draft-queue-layout, .draft-review-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; }
.queue-summary { display: flex; align-items: center; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.queue-summary > div { display: flex; flex-direction: column; }
.queue-summary strong { font-size: 32px; color: var(--ai); }
.queue-summary p { margin: 0; color: var(--muted); }
.queue-row { min-height: 76px; display: grid; grid-template-columns: 36px 1fr auto 18px; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.queue-row > span:nth-child(2) { display: flex; flex-direction: column; }
.queue-row small { color: var(--muted); }
.draft-heading { display: flex; gap: 15px; margin-bottom: 22px; }
.draft-heading h2 { margin: 2px 0; }
.draft-heading p { color: var(--muted); }
.draft-editor .field { margin-top: 16px; }
.review-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.candidate-task-list { display: grid; }
.candidate-task-list .queue-row { grid-template-columns: 24px minmax(0, 1fr) auto; cursor: pointer; }
.candidate-task-list input { width: 18px; min-height: 18px; }
.queue-actions { display: flex; justify-content: flex-end; margin-top: 18px; }
.source-preview { display: grid; gap: 8px; margin-bottom: 16px; }
.source-preview article { display: flex; flex-direction: column; padding: 12px 14px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); }
.source-preview small { color: var(--muted); }
.diff-box { display: grid; gap: 8px; }
.diff-box del, .diff-box ins { display: block; padding: 10px; border-radius: 6px; text-decoration: none; }
.diff-box del { color: var(--danger); background: var(--danger-soft); }
.diff-box ins { color: var(--success); background: var(--success-soft); }

.memo-layout, .member-detail-layout, .settings-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; }
.memo-list-panel, .member-profile, .member-work, .settings-main, .tenant-profile, .tenant-operations { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.memo-toolbar, .member-toolbar, .knowledge-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.memo-toolbar > div { display: flex; flex-direction: column; }
.memo-toolbar span { color: var(--muted); }
.memo-row { width: 100%; min-height: 72px; display: grid; grid-template-columns: 32px 1fr 110px; gap: 10px; align-items: center; text-align: left; border-bottom: 1px solid var(--line); }
.memo-row p { min-width: 0; display: flex; flex-direction: column; margin: 0; }
.memo-row small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.memo-row time { color: var(--muted); }
.done-memos { margin-top: 18px; color: var(--muted); }
.done-memos .memo-row { color: var(--text); }
.member-summary, .platform-metrics { min-height: 120px; display: grid; grid-template-columns: repeat(3, 140px) 1fr; gap: 18px; align-items: center; padding: 20px 28px; margin-bottom: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.member-summary > div, .platform-metrics > div { display: flex; flex-direction: column; }
.member-summary strong, .platform-metrics strong { font-size: 27px; }
.member-summary span, .platform-metrics span, .member-summary p, .platform-metrics p { color: var(--muted); }
.member-summary p, .platform-metrics p { margin: 0; }
.member-table, .tenant-table { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.member-head, .member-row { display: grid; grid-template-columns: minmax(190px, 1.4fr) 96px 140px 108px 90px 112px 72px; gap: 12px; align-items: center; padding: 0 16px; }
.member-head, .tenant-head { min-height: 48px; color: var(--muted); background: var(--surface-2); font-weight: 700; }
.member-row { min-height: 72px; border-top: 1px solid var(--line); }
.member-row .person > span:nth-child(2) { display: flex; flex-direction: column; }
.member-row small { color: var(--muted); }
.member-person-link { min-width: 0; }
.member-edit-link { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 1px solid var(--line); border-radius: 7px; color: var(--brand); font-weight: 700; }
.member-edit-link:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); background: var(--brand-soft); }
.member-detail-layout { grid-template-columns: 300px minmax(0, 1fr) 280px; }
.profile-heading { display: flex; align-items: center; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.profile-heading h2 { margin: 0 0 6px; }
.profile-meta { margin: 18px 0; }
.profile-meta > div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.profile-meta dt { color: var(--muted); }
.profile-meta dd { margin: 3px 0 0; }
.simple-task { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); }
.simple-task > span:first-child { display: flex; flex-direction: column; }
.simple-task small { color: var(--muted); }
.danger-zone { padding: 20px; border: 1px solid color-mix(in srgb, var(--danger) 45%, var(--line)); border-radius: var(--radius); background: var(--danger-soft); }
.danger-zone p { color: var(--danger); }
.member-edit-panel { max-width: 900px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.member-avatar-editor { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 20px; align-items: start; padding: 18px; margin-bottom: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.member-avatar-editor > div:last-child { display: grid; justify-items: start; gap: 7px; }
.member-avatar-editor p, .member-avatar-editor small { margin: 0; color: var(--muted); }
.member-avatar-upload { cursor: pointer; }
.member-fixed-role { min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); }
.member-fixed-role > span { display: flex; flex-direction: column; }
.member-fixed-role small { color: var(--muted); }
.member-edit-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 8px; }

.settings-suite { margin-top: -28px; }
.settings-tabs { min-height: 56px; display: flex; align-items: stretch; gap: 24px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.settings-tabs::-webkit-scrollbar { display: none; }
.settings-tabs a { min-width: 118px; min-height: 56px; position: relative; display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; padding: 0 10px; color: var(--muted); font-size: 16px; font-weight: 650; }
.settings-tabs a::after { height: 3px; position: absolute; right: 0; bottom: -1px; left: 0; border-radius: 3px 3px 0 0; background: transparent; content: ""; }
.settings-tabs a:hover, .settings-tabs a.active { color: var(--brand); }
.settings-tabs a.active::after { background: var(--brand); }
.settings-frame { width: 100%; min-width: 0; min-height: 782px; display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 16px; align-items: stretch; padding-top: 20px; }
.settings-rail { min-width: 0; min-height: 100%; display: flex; flex-direction: column; padding: 18px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.settings-rail > h2 { margin: 0 8px 15px; color: var(--muted); font-size: 15px; }
.settings-rail > nav { display: grid; gap: 5px; }
.settings-rail > nav button { width: 100%; min-height: 58px; display: grid; grid-template-columns: 27px minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px 11px; border-radius: 8px; color: var(--muted); text-align: left; }
.settings-rail > nav button:hover { color: var(--text); background: var(--surface-2); }
.settings-rail > nav button.active { color: var(--brand); background: var(--brand-soft); }
.settings-rail > nav button > svg { justify-self: center; }
.settings-rail > nav button span { min-width: 0; display: grid; gap: 1px; }
.settings-rail > nav button strong { font-size: 14px; }
.settings-rail > nav button small { color: var(--muted); font-size: 12px; font-weight: 500; }
.settings-rail > nav button small.warning { color: var(--warning); }
.settings-rail > nav button small.success { color: var(--success); }
.settings-rail-footer { display: grid; gap: 18px; margin-top: 20px; padding: 20px 4px 0; border-top: 1px solid var(--line); }
.settings-content { min-width: 0; display: grid; gap: 16px; align-content: start; }
.settings-card { scroll-margin-top: 18px; min-width: 0; padding: 20px 22px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.settings-card > header { min-height: 34px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.settings-card > header > div { display: flex; align-items: center; gap: 12px; }
.settings-card > header svg { color: var(--brand); }
.settings-card > header h2 { margin: 0; font-size: 20px; letter-spacing: -.015em; }
.settings-card-description { margin: 10px 0 18px; color: var(--muted); }
.settings-card-body > p:first-child { margin: 4px 0 18px; color: var(--muted); }
.settings-profile { min-height: 142px; display: flex; align-items: center; gap: 34px; padding: 12px 24px; }
.settings-profile .avatar.large { width: 98px; height: 98px; font-size: 26px; }
.settings-profile > div { display: grid; gap: 4px; }
.settings-profile strong { font-size: 22px; }
.settings-profile small, .settings-profile span { color: var(--muted); }
.settings-theme-control .theme-toggle { width: 100%; min-height: 96px; display: grid; grid-template-columns: repeat(3, 1fr); padding: 0; overflow: hidden; border-radius: 9px; }
.settings-theme-control .theme-toggle button { min-width: 0; min-height: 96px; border-radius: 0; font-size: 15px; }
.settings-theme-control .theme-toggle button + button { border-left: 1px solid var(--line); }
.settings-theme-control .theme-toggle button.active { border: 1px solid var(--brand); color: var(--brand); background: var(--brand-soft); box-shadow: none; }
.settings-theme-control .theme-toggle svg { width: 25px !important; height: 25px !important; }
.settings-meta-list { margin: 13px 0 0; }
.settings-meta-list > div { min-height: 51px; display: grid; grid-template-columns: 125px minmax(0, 1fr); align-items: center; border-bottom: 1px solid var(--line); }
.settings-meta-list > div:last-child { border-bottom: 0; }
.settings-meta-list dt { color: var(--text); font-weight: 650; }
.settings-meta-list dd { margin: 0; color: var(--muted); }
.settings-version-value { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 750; }
.settings-version-value svg { flex: 0 0 auto; }

.storage-overview { display: grid; gap: 14px; }
.storage-overview-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.storage-overview-head > div { min-width: 0; display: flex; align-items: center; gap: 14px; }
.storage-overview-head strong { font-size: 19px; letter-spacing: -.02em; }
.storage-meter { height: 10px; overflow: hidden; border-radius: 5px; background: var(--surface-3); }
.storage-meter > span { display: block; height: 100%; max-width: 100%; border-radius: inherit; background: var(--brand); }
.storage-breakdown { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.storage-breakdown > div { min-width: 0; display: grid; grid-template-columns: 25px minmax(0, 1fr); gap: 1px 9px; padding: 18px 14px 2px; border-inline-end: 1px solid var(--line); }
.storage-breakdown > div:last-child { border-inline-end: 0; }
.storage-breakdown svg { grid-row: 1 / 3; align-self: center; color: var(--muted); }
.storage-breakdown span { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.storage-breakdown strong { font-size: 14px; }
.settings-team-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.settings-team-form { margin-top: 12px; }
.settings-form-actions { display: flex; justify-content: flex-end; }
.settings-form-actions .button { min-width: 130px; }
.settings-split { display: grid; grid-template-columns: 1fr 1.14fr; gap: 16px; }
.settings-half-card { min-height: 232px; }
.settings-split .publisher-grant-card { min-width: 0; grid-template-columns: 1fr; align-items: start; }
.settings-split .publisher-grant-card .button { justify-self: start; }
.settings-compact-empty { min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 11px; color: var(--muted); text-align: center; }
.settings-compact-empty > svg { color: var(--muted); }
.settings-boundary-list { display: grid; gap: 14px; padding: 10px 0; }
.settings-boundary-list p { display: flex; align-items: center; gap: 11px; margin: 0; color: var(--muted); }
.settings-boundary-list p svg { color: var(--muted); }
.publisher-grant-list { margin-top: 14px; }

.settings-ai-form { margin-top: 8px; }
.settings-consent { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; margin-bottom: 15px; cursor: pointer; }
.settings-consent input { grid-column: 2; grid-row: 1; width: 44px; height: 24px; min-height: 24px; padding: 0; appearance: none; position: relative; border: 0; border-radius: 999px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-strong); cursor: pointer; }
.settings-consent input::after { width: 20px; height: 20px; position: absolute; top: 2px; left: 2px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 4px rgba(13, 24, 48, .22); content: ""; transition: transform .18s cubic-bezier(.2, .8, .2, 1); }
.settings-consent input:checked { background: var(--brand); box-shadow: none; }
.settings-consent input:checked::after { transform: translateX(20px); }
.settings-consent input:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 24%, transparent); outline-offset: 3px; }
.settings-consent > span { display: grid; gap: 5px; }
.settings-consent small { max-width: 780px; color: var(--muted); line-height: 1.7; }
.settings-rule-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 8px; }
.settings-rule-grid p { min-height: 62px; display: flex; align-items: center; gap: 16px; margin: 0; padding: 5px 20px; border-right: 1px solid var(--line); color: var(--muted); }
.settings-rule-grid p:first-child { padding-left: 0; }
.settings-rule-grid p:last-child { border-right: 0; }
.settings-rule-grid svg { flex: 0 0 auto; color: var(--brand); }
.settings-rule-grid span { line-height: 1.85; }
.settings-ai-state { display: grid; gap: 8px; }
.settings-ai-state p { display: flex; align-items: center; gap: 9px; margin: 0; font-weight: 750; }
.settings-ai-state p i { width: 12px; height: 12px; border-radius: 50%; background: currentColor; }
.settings-ai-state p.warning { color: var(--warning); }
.settings-ai-state p.success { color: var(--success); }
.settings-ai-state small { color: var(--muted); }
.settings-rail-tip { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 9px; padding: 12px 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--brand); background: var(--surface-2); }
.settings-rail-tip span { display: grid; gap: 5px; }
.settings-rail-tip small { color: var(--muted); font-weight: 500; line-height: 1.65; }
.settings-recovery-steps { display: flex; gap: 22px; }
.settings-recovery-steps p { display: flex; align-items: center; gap: 8px; }

.settings-fill-card { min-height: 782px; display: flex; flex-direction: column; }
.settings-fill-card .settings-card-body { min-height: 0; flex: 1; display: flex; flex-direction: column; }
.settings-audit-note { display: grid; gap: 17px; }
.settings-audit-note p { display: flex; align-items: flex-start; gap: 9px; margin: 0; color: var(--muted); font-size: 13px; }
.settings-audit-note p:last-child svg { fill: var(--success); color: var(--success); }
.settings-audit-table { margin-top: 5px; }
.settings-audit-head, .settings-audit-row { display: grid; grid-template-columns: 1fr 1.15fr 250px; align-items: center; gap: 18px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.settings-audit-head { min-height: 48px; color: var(--muted); font-weight: 650; }
.settings-audit-row { min-height: 67px; }
.settings-audit-row > span:first-child { display: flex; align-items: center; gap: 12px; }
.settings-audit-row > span:first-child svg { color: var(--brand); }
.settings-audit-row > span:nth-child(2), .settings-audit-row time { color: var(--muted); }
.settings-audit-empty { min-height: 520px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; color: var(--muted); }
.settings-audit-empty svg { color: var(--line-strong); }
.settings-audit-empty strong { color: var(--text); font-size: 20px; }

.settings-recycle-summary { display: grid; gap: 23px; }
.settings-recycle-summary p { display: flex; align-items: flex-start; gap: 9px; margin: 0; color: var(--muted); font-size: 13px; }
.settings-recycle-summary strong { padding-top: 20px; border-top: 1px solid var(--line); }
.settings-recycle-summary strong span { color: var(--brand); }
.settings-recycle-card .settings-card-body { justify-content: space-between; }
.settings-recycle-list { display: grid; }
.settings-recycle-list > div { min-height: 70px; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.settings-recycle-list > div > svg { color: var(--brand); }
.settings-recycle-list p { display: grid; gap: 3px; margin: 0; }
.settings-recycle-list small { color: var(--muted); }
.settings-recycle-empty { flex: 1; min-height: 490px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; color: var(--muted); }
.settings-recycle-empty svg { color: #8792a6; }
.settings-recycle-empty strong { color: var(--text); font-size: 22px; }
.settings-recycle-footer { min-height: 67px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 16px; border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--line)); border-radius: 8px; background: color-mix(in srgb, var(--brand-soft) 48%, var(--surface)); }
.settings-recycle-footer p { display: flex; align-items: center; gap: 9px; margin: 0; color: var(--muted); }
.settings-recycle-footer p svg { color: var(--brand); }
.settings-recycle-footer .button:disabled { color: var(--muted); background: var(--surface-3); box-shadow: none; }
.app-shell:has(.settings-suite) .topbar { min-height: 104px; border-bottom: 0; }
.app-shell:has(.settings-suite) .topbar .top-actions { display: none; }
.app-shell:has(.settings-suite) .page-content { margin-top: 0; }

@media (max-width: 1120px) {
  .settings-frame { grid-template-columns: 210px minmax(0, 1fr); }
  .settings-tabs { gap: 10px; }
  .settings-tabs a { min-width: 106px; }
  .settings-audit-head, .settings-audit-row { grid-template-columns: .9fr 1.2fr 170px; }
}

@media (max-width: 860px) {
  .settings-frame { grid-template-columns: 190px minmax(0, 1fr); }
  .settings-split, .settings-team-fields { grid-template-columns: 1fr; }
  .storage-breakdown { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .storage-breakdown > div { border-bottom: 1px solid var(--line); }
  .storage-breakdown > div:nth-child(2n) { border-inline-end: 0; }
  .storage-breakdown > div:last-child { grid-column: 1 / -1; border-bottom: 0; }
  .settings-rule-grid { grid-template-columns: 1fr 1fr; }
  .settings-rule-grid p:nth-child(2) { border-right: 0; }
  .settings-rule-grid p:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .settings-audit-head, .settings-audit-row { grid-template-columns: 1fr 1fr; }
  .settings-audit-head span:last-child, .settings-audit-row time { display: none; }
}

@media (max-width: 760px) {
  .app-shell:has(.settings-suite) .topbar { min-height: 78px; }
  .settings-suite { margin-top: -14px; }
  .settings-tabs { width: calc(100% + 28px); min-height: 50px; margin-inline: -14px; padding-inline: 10px; }
  .settings-tabs a { min-width: 104px; min-height: 50px; font-size: 14px; }
  .settings-frame { min-height: 0; grid-template-columns: 1fr; padding-top: 14px; }
  .settings-rail { min-height: 0; overflow: hidden; padding: 10px; }
  .settings-rail > h2, .settings-rail-footer { display: none; }
  .settings-rail > nav { display: flex; overflow-x: auto; }
  .settings-rail > nav button { min-width: 154px; min-height: 48px; }
  .settings-card { padding: 16px; }
  .settings-card > header { align-items: stretch; flex-direction: column; }
  .settings-card > header > .button { width: 100%; }
  .settings-profile { min-height: 120px; gap: 18px; padding: 8px; }
  .settings-profile .avatar.large { width: 76px; height: 76px; }
  .settings-theme-control .theme-toggle, .settings-theme-control .theme-toggle button { min-height: 76px; }
  .settings-theme-control .theme-toggle button { min-width: 0; flex-direction: column; }
  .settings-meta-list > div { grid-template-columns: 104px minmax(0, 1fr); }
  .storage-overview-head { align-items: stretch; flex-direction: column; }
  .storage-overview-head > div { justify-content: space-between; }
  .storage-overview-head .button { width: 100%; }
  .settings-rule-grid { grid-template-columns: 1fr; }
  .settings-rule-grid p { border-right: 0; border-bottom: 1px solid var(--line); }
  .settings-rule-grid p:last-child { border-bottom: 0; }
  .settings-consent { grid-template-columns: minmax(0, 1fr) auto; }
  .settings-fill-card { min-height: 600px; }
  .settings-recycle-empty { min-height: 320px; }
  .settings-recycle-footer { align-items: stretch; flex-direction: column; }
  .settings-recycle-footer .button { width: 100%; }
}
.storage-overview.compact { gap: 14px; }
.storage-admin-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.storage-admin-form .field { margin: 0; }
.storage-plan-list { display: grid; border-block: 1px solid var(--line); }
.storage-plan-list > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.storage-plan-list > div:last-child { border-bottom: 0; }
.storage-plan-list span { color: var(--muted); text-align: right; }
/* T5 扫码支付二维码 */
.qr-pay { display: grid; justify-items: center; gap: 14px; padding: 8px 0 4px; }
.qr-box { width: 220px; height: 220px; display: grid; place-items: center; padding: 10px; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.qr-box svg { width: 100%; height: 100%; display: block; }
.qr-pay .setting-copy { text-align: center; margin: 0; }
.ai-config-status { min-height: 70px; display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; align-items: center; padding: 14px; margin-bottom: 18px; border-radius: 8px; background: var(--surface-2); }
.ai-config-status > div { display: flex; flex-direction: column; }
.ai-config-status small { color: var(--muted); }
.consent-check { display: flex; align-items: flex-start; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.consent-check input { flex: 0 0 auto; width: 19px; min-height: 19px; margin-top: 2px; }
.audit-list > div, .recycle-list > div { min-height: 68px; display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; border-bottom: 1px solid var(--line); }
.audit-list p, .recycle-list p { display: flex; flex-direction: column; margin: 0; }
.audit-list small, .recycle-list small, .audit-list time { color: var(--muted); }
.version-list article { min-height: 70px; display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); }
.version-list article > span:first-child { width: 42px; height: 30px; display: grid; place-items: center; border-radius: 5px; color: var(--brand); background: var(--brand-soft); font-weight: 800; }
.version-list article p { display: flex; flex-direction: column; margin: 0; }
.version-list article small { color: var(--muted); }

.platform-login, .setup-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.platform-login > section, .setup-card { width: min(480px, 100%); padding: 38px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.platform-login img, .setup-card img { width: 58px; margin-bottom: 20px; }
.platform-login > section > small, .setup-card > small { color: var(--brand); font-weight: 800; }
.platform-login h1, .setup-card h1 { font-size: 30px; margin: 5px 0; }
.platform-login p, .setup-card p { color: var(--muted); }
.tenant-head, .tenant-row { display: grid; grid-template-columns: minmax(220px, 1.5fr) 110px 140px 90px 90px 120px; gap: 12px; align-items: center; padding: 0 16px; }
.tenant-row { min-height: 72px; border-top: 1px solid var(--line); }
.tenant-row > span:first-child { display: flex; flex-direction: column; }
.tenant-row small { color: var(--muted); }
.tenant-detail-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 18px; }
.tenant-profile > div:first-child { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.tenant-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tenant-stats > div { display: flex; flex-direction: column; padding: 16px; border-radius: 8px; background: var(--surface-2); }
.tenant-stats strong { font-size: 26px; }
.tenant-stats span { color: var(--muted); }

/* Platform administration has its own operational shell and never inherits tenant navigation. */
.platform-admin-shell { min-height: 100vh; padding-left: 248px; background: var(--bg); }
.platform-admin-sidebar { width: 248px; position: fixed; z-index: 40; inset: 0 auto 0 0; display: flex; flex-direction: column; padding: 26px 18px 18px; color: #e6eefc; background: #061126; border-right: 1px solid #1b3154; }
.platform-admin-sidebar .brand { align-items: flex-start; flex-direction: row; gap: 12px; margin: 0 6px 30px; }
.platform-admin-sidebar .brand img { width: 46px; height: 46px; }
.platform-admin-sidebar .brand > span { display: flex; flex-direction: column; gap: 2px; }
.platform-admin-sidebar .brand strong { font-size: 17px; letter-spacing: .04em; }
.platform-admin-sidebar .brand small { color: #8ea5c9; font-size: 11px; font-weight: 650; letter-spacing: .06em; }
.platform-admin-scope { display: flex; align-items: center; gap: 10px; padding: 12px; margin-bottom: 18px; border: 1px solid #294467; border-radius: 9px; background: #0b1a33; }
.platform-admin-scope > svg { color: #4dd4bb; }
.platform-admin-scope > span { display: flex; flex-direction: column; }
.platform-admin-scope strong { font-size: 13px; }
.platform-admin-scope small { margin-top: 2px; color: #8ea5c9; font-size: 10px; }
.platform-admin-sidebar nav { display: grid; gap: 6px; }
.platform-admin-sidebar nav a { min-height: 46px; display: flex; align-items: center; gap: 12px; padding: 0 13px; color: #adbed9; border-radius: 8px; font-weight: 680; }
.platform-admin-sidebar nav a:hover { color: #fff; background: #102242; }
.platform-admin-sidebar nav a.active { color: #fff; background: #1266dd; box-shadow: 0 8px 20px rgba(7, 95, 217, .22); }
.platform-admin-user { min-height: 62px; display: grid; grid-template-columns: 38px minmax(0, 1fr) 38px; align-items: center; gap: 9px; padding: 12px 4px 0; margin-top: auto; border-top: 1px solid #243a5c; }
.platform-admin-user > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.platform-admin-user strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.platform-admin-user small { color: #8ea5c9; }
.platform-admin-user .icon-button { color: #9eb1ce; }
.platform-admin-main { min-height: 100vh; }
.platform-admin-header { width: calc(100% - 56px); min-height: 112px; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 0 auto; border-bottom: 1px solid var(--line); }
.platform-admin-header .title-block > small { display: block; margin-bottom: 5px; color: var(--brand); font-size: 10px; font-weight: 850; letter-spacing: .18em; }
.platform-admin-header .title-block h1 { margin: 0; font-size: 30px; letter-spacing: -.035em; }
.platform-admin-header .title-block p { margin: 5px 0 0; color: var(--muted); }
.platform-admin-content { width: calc(100% - 56px); margin: 28px auto 64px; }
.platform-admin-bottom-nav { display: none; }
.platform-priority { overflow: hidden; border: 1px solid color-mix(in srgb, var(--warning) 48%, var(--line)); border-top: 3px solid var(--warning); border-radius: 12px; background: var(--surface); }
.platform-priority-heading { min-height: 126px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 28px; }
.platform-priority-heading > div { display: flex; align-items: center; gap: 20px; }
.platform-priority-heading > a { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 750; }
.platform-priority-index { min-width: 74px; color: var(--warning); font-size: 50px; font-weight: 850; line-height: 1; letter-spacing: -.07em; font-variant-numeric: tabular-nums; }
.platform-priority h2 { margin: 2px 0 5px; font-size: 25px; letter-spacing: -.025em; }
.platform-priority small { color: var(--warning); font-weight: 800; }
.platform-priority p { margin: 0; color: var(--muted); }
.platform-risk-queue { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); background: var(--surface-2); }
.platform-risk-item { min-width: 0; min-height: 86px; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto 18px; align-items: center; gap: 11px; padding: 14px 18px; border-right: 1px solid var(--line); }
.platform-risk-item:last-child { border-right: 0; }
.platform-risk-item:hover { background: var(--surface-3); }
.platform-risk-rank { width: 27px; height: 27px; display: grid; place-items: center; color: var(--warning); border: 1px solid color-mix(in srgb, var(--warning) 45%, var(--line)); border-radius: 50%; font-size: 11px; font-weight: 850; }
.platform-risk-item > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.platform-risk-item strong, .platform-risk-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.platform-risk-item small { margin-top: 4px; color: var(--muted); }
.platform-priority-clear { min-height: 142px; display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 26px 28px; border-color: color-mix(in srgb, var(--success) 42%, var(--line)); border-top-color: var(--success); }
.platform-priority-clear .platform-priority-mark { width: 54px; height: 54px; display: grid; place-items: center; color: var(--success); border-radius: 50%; background: var(--success-soft); }
.platform-priority-clear small { color: var(--success); }
.platform-kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px; }
.platform-kpi { min-height: 156px; display: grid; grid-template-columns: 42px 1fr; grid-template-rows: 24px auto 1fr; column-gap: 12px; padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.platform-kpi-icon { grid-row: 1 / 4; width: 42px; height: 42px; display: grid; place-items: center; color: var(--brand); border-radius: 9px; background: var(--brand-soft); }
.platform-kpi-icon.warning { color: var(--warning); background: var(--warning-soft); }
.platform-kpi-icon.danger { color: var(--danger); background: var(--danger-soft); }
.platform-kpi-icon.success { color: var(--success); background: var(--success-soft); }
.platform-kpi-icon.teal { color: var(--teal); background: color-mix(in srgb, var(--teal) 12%, var(--surface)); }
.platform-kpi small, .platform-kpi p { color: var(--muted); }
.platform-kpi strong { align-self: center; font-size: 28px; letter-spacing: -.035em; }
.platform-kpi p { align-self: end; margin: 6px 0 0; font-size: 12px; }
.platform-overview-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 16px; margin-top: 18px; }
.platform-data-panel { min-height: 330px; padding: 0 22px 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.platform-data-panel > header { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.platform-data-panel > header > div { display: flex; align-items: center; gap: 9px; }
.platform-data-panel h2 { margin: 0; font-size: 17px; }
.platform-data-panel > header > a { color: var(--brand); font-weight: 700; }
.platform-data-panel > header > span { color: var(--muted); font-size: 12px; }
.platform-plan-list { display: grid; gap: 18px; padding-top: 22px; }
.platform-plan-list > div > span { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.platform-plan-list small { color: var(--muted); }
.platform-plan-meter { height: 6px; overflow: hidden; border-radius: 999px; background: var(--surface-3); }
.platform-plan-meter i { height: 100%; display: block; min-width: 2px; border-radius: inherit; background: var(--brand); }
.platform-operation-list > div:not(.empty-state) { min-height: 54px; display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.platform-operation-list > div:last-child { border-bottom: 0; }
.platform-operation-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.platform-operation-list > div > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.platform-operation-list strong, .platform-operation-list small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.platform-operation-list small, .platform-operation-list time { color: var(--muted); font-size: 11px; }
.platform-data-footnote { display: flex; align-items: center; gap: 8px; margin-top: 16px; color: var(--muted); font-size: 11px; }
.platform-data-footnote time { margin-left: auto; white-space: nowrap; }
.platform-tenant-workbench { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.platform-tenant-toolbar { display: grid; grid-template-columns: minmax(280px, 1fr) 170px 170px auto; gap: 10px; padding: 20px; border-bottom: 1px solid var(--line); }
.platform-tenant-toolbar .button.quiet { color: var(--brand); border: 1px solid var(--line-strong); background: var(--surface); }
.platform-tenant-result { min-height: 45px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 20px; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.platform-tenant-result strong { color: var(--text); }
.platform-tenant-table { min-height: 220px; }
.platform-tenant-head, .platform-tenant-row { display: grid; grid-template-columns: minmax(220px, 1.4fr) 100px 142px 86px 150px 120px 120px; align-items: center; gap: 12px; padding: 0 18px; }
.platform-tenant-head { min-height: 48px; color: var(--muted); background: var(--surface-2); font-size: 12px; font-weight: 750; }
.platform-tenant-row { min-height: 78px; border-top: 1px solid var(--line); }
.platform-tenant-row:hover { background: var(--surface-2); }
.platform-tenant-row > span:not(.platform-tenant-name), .platform-tenant-row time { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.platform-tenant-name { min-width: 0; display: flex; align-items: center; gap: 10px; }
.platform-tenant-name > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.platform-tenant-row strong, .platform-tenant-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.platform-tenant-row small { color: var(--muted); font-size: 11px; }
.platform-tenant-row > span:not(.platform-tenant-name).platform-tenant-risk { align-items: center; flex-direction: row; justify-content: space-between; }

.overlay-backdrop { position: fixed; z-index: 100; inset: 0; display: flex; justify-content: flex-end; background: rgba(3, 8, 20, .5); backdrop-filter: blur(2px); }
body:has(.overlay-backdrop) { overflow: hidden; }
.overlay { width: min(580px, calc(100vw - 24px)); height: 100%; display: flex; flex-direction: column; background: var(--surface); box-shadow: -14px 0 36px rgba(0, 0, 0, .18); }
.overlay.modal { width: min(540px, calc(100vw - 32px)); height: auto; max-height: calc(100vh - 48px); align-self: center; margin: auto; border-radius: 14px; }
.overlay.modal-wide { width: min(760px, calc(100vw - 32px)); height: auto; max-height: calc(100vh - 48px); align-self: center; margin: auto; border-radius: 14px; }
.overlay.menu-overlay { width: 320px; height: auto; align-self: flex-end; margin: 0 14px 82px 0; border-radius: 12px; }
.overlay-heading { min-height: 92px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.overlay-heading-main, .overlay-heading-actions { display: flex; align-items: center; gap: 14px; min-width: 0; }
.overlay-heading-main > div { min-width: 0; }
.overlay-heading-actions { flex: 0 0 auto; }
.overlay-title-icon { width: 40px; height: 40px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 10px; color: #fff; background: var(--brand); }
.overlay-heading-status { display: inline-flex; align-items: center; gap: 6px; color: #15956f; font-size: 12px; font-weight: 650; white-space: nowrap; }
.overlay-heading h2 { margin: 0; font-size: 23px; }
.overlay-heading p, .overlay-heading small { margin: 4px 0 0; color: var(--muted); }
.overlay-body { flex: 1; min-height: 0; overflow-y: auto; padding: 24px; }
.overlay-footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--line); }
.overlay-footer.memo-footer { display: grid; gap: 10px; }
.workspace-command-backdrop { position: fixed; z-index: 130; inset: 0; display: grid; place-items: start center; padding: clamp(48px, 10vh, 110px) 18px 18px; background: rgba(3, 8, 20, .58); backdrop-filter: blur(7px); }
body:has(.workspace-command-backdrop) { overflow: hidden; }
.workspace-command-dialog { width: min(720px, 100%); max-height: min(680px, 80vh); display: flex; flex-direction: column; overflow: hidden; border-radius: 16px; background: var(--surface); box-shadow: 0 28px 90px rgba(3, 8, 20, .3); }
.workspace-command-searchbar { display: grid; grid-template-columns: auto minmax(0, 1fr) 142px auto; align-items: center; gap: 11px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.workspace-command-searchbar > svg { color: var(--brand); }
.workspace-command-searchbar input, .workspace-command-searchbar select { min-height: 42px; border: 0; border-radius: 0; background-color: transparent; box-shadow: none; }
.workspace-command-searchbar input { min-width: 0; padding-inline: 0; font-size: 16px; }
.workspace-command-searchbar select { padding: 0 36px 0 8px; border-left: 1px solid var(--line); font-size: 12px; font-weight: 700; }
.workspace-command-dialog kbd { display: inline-grid; place-items: center; min-width: 24px; min-height: 22px; padding: 1px 5px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; color: var(--muted); background: var(--surface-2); font: 600 10px/1 system-ui, sans-serif; white-space: nowrap; }
.workspace-command-error { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; color: var(--danger); background: var(--danger-soft); font-size: 13px; }
.workspace-command-error button, .workspace-command-section header button { color: inherit; font-weight: 800; }
.workspace-command-loading { display: flex; align-items: center; gap: 8px; padding: 9px 16px; color: var(--muted); font-size: 12px; }
.workspace-command-loading svg { animation: workspace-command-spin .9s linear infinite; }
.workspace-command-results { min-height: 180px; flex: 1 1 auto; overflow: auto; padding: 8px; }
.workspace-command-section + .workspace-command-section { margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--line); }
.workspace-command-section header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 9px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.workspace-command-section header small { font-size: 10px; font-weight: 700; letter-spacing: 0; }
.workspace-command-result { width: 100%; min-height: 56px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 9px 10px; border: 1px solid transparent; border-radius: 10px; text-align: left; }
.workspace-command-result:hover, .workspace-command-result.is-active { border-color: color-mix(in srgb, var(--brand) 26%, var(--line)); background: var(--brand-soft); }
.workspace-command-result-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; color: var(--brand); background: var(--surface-2); }
.workspace-command-result-copy { min-width: 0; }
.workspace-command-result-copy strong, .workspace-command-result-copy small, .workspace-command-result-copy em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-command-result-copy strong { font-size: 14px; }
.workspace-command-result-copy small { margin-top: 3px; color: var(--muted); font-size: 12px; font-style: normal; }
.workspace-command-result-copy em { margin-top: 2px; color: var(--muted); font-size: 10px; font-style: normal; }
.workspace-command-type { padding: 4px 7px; border-radius: 6px; color: var(--muted); background: var(--surface-2); font-size: 10px; font-weight: 800; white-space: nowrap; }
.workspace-command-empty { min-height: 180px; display: grid; place-items: center; align-content: center; gap: 7px; padding: 28px; color: var(--muted); text-align: center; }
.workspace-command-empty strong { color: var(--text); }
.workspace-command-dialog > footer { display: flex; align-items: center; gap: 18px; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.workspace-command-dialog > footer span { display: flex; align-items: center; gap: 5px; }
.workspace-command-dialog > footer span:last-child { margin-left: auto; }
@keyframes workspace-command-spin { to { transform: rotate(360deg); } }
.memo-footer-tools { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; min-width: 0; }
.memo-footer-commit { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-width: 0; }
.memo-footer-commit-actions { display: flex; align-items: center; gap: 10px; }
.memo-footer-management { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.overlay.memo-editor-drawer { width: min(932px, calc(100vw - 180px)); }
.memo-editor-drawer .overlay-heading { min-height: 82px; padding: 18px 24px; }
.memo-editor-drawer .overlay-heading h2 { font-size: 21px; }
.memo-editor-drawer .overlay-heading p { font-size: 12px; }
.memo-editor-drawer .overlay-body { overflow: hidden; padding: 0; }
.memo-editor-drawer .overlay-footer.memo-footer { display: flex; padding: 22px 24px; }
.memo-editor-form { height: 100%; display: grid; grid-template-columns: minmax(0, 482px) minmax(0, 450px); }
.memo-editor-main { min-width: 0; display: flex; flex-direction: column; gap: 14px; padding: 10px 20px 14px; border-right: 1px solid var(--line); }
.memo-title-field { display: block; margin-bottom: -12px; }
.memo-title-field input { min-height: 86px; padding: 0 20px; border-radius: 10px; color: var(--text); background: var(--surface); font-size: 28px; font-weight: 750; }
.memo-title-field input::placeholder { color: color-mix(in srgb, var(--muted) 68%, transparent); }
.memo-content-field { min-height: 0; flex: 1; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.memo-editor-toolbar { min-height: 54px; display: flex; align-items: center; gap: 0; overflow-x: auto; padding: 0 10px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.memo-editor-toolbar::-webkit-scrollbar { display: none; }
.memo-format-label { display: inline-flex; align-items: center; gap: 4px; margin-right: 4px; padding-right: 8px; border-right: 1px solid var(--line); color: var(--text); font-size: 13px; white-space: nowrap; }
.memo-tool { width: 30px; height: 34px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 7px; color: var(--text); }
.memo-tool:hover { color: var(--brand); background: var(--brand-soft); }
.memo-tool:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.memo-tool-separator { width: 1px; height: 20px; flex: 0 0 auto; margin: 0 5px; background: var(--line); }
.memo-content-field textarea { min-height: 360px; flex: 1; resize: none; padding: 18px 20px; border: 0; border-radius: 0; background: transparent; box-shadow: none; line-height: 1.75; }
.memo-content-field textarea:focus { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--brand) 48%, transparent); }
.memo-converted-note { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 8px; color: var(--brand); background: var(--brand-soft); font-size: 12px; }
.memo-settings-panel { min-width: 0; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; padding: 15px 22px 20px; background: var(--surface-2); }
.memo-settings-panel h3, .memo-settings-panel h4 { margin: 0; color: var(--text); }
.memo-settings-panel h3 { font-size: 16px; }
.memo-settings-panel h4 { font-size: 14px; }
.memo-settings-panel .field { gap: 8px; font-size: 13px; }
.memo-settings-panel input, .memo-settings-panel select { min-height: 38px; background-color: var(--surface); }
.memo-setting-group { display: grid; gap: 8px; }
.memo-project-control { min-height: 40px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.memo-project-control select { min-width: 0; min-height: 38px; padding-inline: 12px 34px; border: 0; border-radius: 0; box-shadow: none; }
.memo-project-control button { min-height: 38px; display: inline-flex; align-items: center; gap: 5px; padding: 0 12px; color: var(--brand); font-size: 12px; font-weight: 760; white-space: nowrap; }
.memo-project-control button:hover { background: var(--brand-soft); }
.memo-project-readonly { min-height: 48px; display: flex; align-items: center; gap: 9px; padding: 0 13px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: var(--surface); font-size: 13px; font-weight: 650; }
.memo-project-readonly svg { color: var(--brand); }
.memo-project-status { min-height: 0; display: flex; align-items: center; gap: 5px; margin: -5px 0 0; color: #148166; font-size: 10px; line-height: 1.4; }
.memo-inline-project { display: grid; gap: 12px; padding: 14px; border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--line)); border-radius: 10px; background: var(--surface); box-shadow: 0 10px 28px rgba(17, 45, 88, .08); }
.memo-inline-project[hidden] { display: none; }
.memo-inline-project-heading, .memo-inline-project-heading > span, .memo-inline-project-owner, .memo-inline-project-owner > span:last-child, .memo-inline-project-actions { display: flex; align-items: center; }
.memo-inline-project-heading { justify-content: space-between; }
.memo-inline-project-heading > span { gap: 7px; color: var(--brand); }
.memo-inline-project-heading button { color: var(--muted); }
.memo-inline-project > label, .memo-inline-project-dates label { display: grid; gap: 6px; color: var(--text); font-size: 11px; font-weight: 700; }
.memo-inline-project textarea { min-height: 66px; resize: vertical; background: var(--surface); }
.memo-inline-project-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.memo-inline-project-owner { justify-content: space-between; color: var(--muted); font-size: 11px; }
.memo-inline-project-owner > span:last-child { gap: 7px; color: var(--text); }
.memo-inline-project-owner .avatar { width: 25px; height: 25px; font-size: 10px; }
.memo-inline-project-actions { justify-content: flex-end; gap: 8px; }
.memo-inline-project-actions .button { min-height: 36px; padding-inline: 12px; font-size: 12px; }
.memo-access-card { padding: 0 10px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.memo-owner-row { min-height: 44px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.memo-owner-row > svg { color: var(--muted); }
.memo-owner-row > span:nth-child(2) { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.memo-owner-row strong { font-size: 13px; }
.memo-owner-row small { color: var(--muted); font-size: 10px; }
.memo-viewer-chip .avatar, .memo-viewer-row .avatar { width: 23px; height: 23px; font-size: 9px; }
.memo-viewer-access { display: grid; gap: 6px; padding-top: 8px; }
.memo-viewer-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.memo-viewer-heading strong { font-size: 12px; }
.memo-viewer-heading button { display: inline-flex; align-items: center; gap: 4px; color: var(--brand); font-size: 11px; font-weight: 760; }
.memo-viewer-chips { min-height: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.memo-viewer-chip { min-height: 26px; display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px 2px 3px; border-radius: 999px; color: var(--text); background: var(--surface-3, #eef3fa); font-size: 11px; font-weight: 650; }
.memo-viewer-chip button { display: grid; place-items: center; color: var(--muted); }
.memo-viewer-chip button:hover { color: var(--danger); }
.memo-viewer-avatar { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: var(--brand); background: var(--brand-soft); font-size: 9px; font-weight: 800; }
.memo-viewer-empty { color: var(--muted); font-size: 11px; }
.memo-viewer-picker { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); box-shadow: 0 12px 28px rgba(13, 32, 66, .12); }
.memo-viewer-picker[hidden] { display: none; }
.memo-viewer-search { min-height: 38px; display: flex; align-items: center; gap: 7px; margin: 8px 8px 0; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); }
.memo-viewer-search:focus-within { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 12%, transparent); }
.memo-viewer-search input { min-width: 0; min-height: 34px; padding: 0; border: 0; box-shadow: none; font-size: 12px; }
.memo-viewer-group { padding-top: 7px; }
.memo-viewer-group-title { display: flex; align-items: center; justify-content: space-between; padding: 0 10px 4px; font-size: 11px; }
.memo-viewer-group-title span { color: var(--muted); }
.memo-viewer-list { max-height: 132px; overflow-y: auto; }
.memo-viewer-row { min-height: 38px; display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 7px; padding: 3px 10px; cursor: pointer; }
.memo-viewer-row:hover { background: var(--surface-2); }
.memo-viewer-row input { width: 16px; min-height: 16px; accent-color: var(--brand); }
.memo-viewer-row > span:last-child { min-width: 0; display: grid; gap: 2px; }
.memo-viewer-row strong, .memo-viewer-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.memo-viewer-row strong { font-size: 12px; }
.memo-viewer-row small { color: var(--muted); font-size: 10px; font-weight: 500; }
.memo-viewer-no-result { margin: 0; padding: 14px; color: var(--muted); font-size: 11px; text-align: center; }
.memo-viewer-picker footer { min-height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.memo-viewer-picker footer button { color: var(--brand); font-weight: 800; }
.memo-access-help { display: flex; align-items: flex-start; gap: 6px; margin: 7px 0 0; padding-top: 7px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; line-height: 1.4; }
.memo-access-help svg { flex: 0 0 auto; color: var(--brand); }
.memo-readonly-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 999px; color: var(--brand); background: var(--brand-soft); font-size: 11px; font-weight: 750; }
.memo-quick-section { display: grid; gap: 10px; }
.memo-action-list { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr); justify-content: stretch; gap: 9px; }
.memo-quick-action { min-height: 66px; display: grid; grid-template-columns: 38px minmax(0, 1fr) 18px; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: var(--surface); text-align: left; }
.memo-quick-action > span:first-child { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; color: var(--brand); background: var(--brand-soft); }
.memo-quick-action > span:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.memo-quick-action strong, .memo-quick-action small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.memo-quick-action strong { font-size: 13px; }
.memo-quick-action small { color: var(--muted); font-size: 11px; }
.memo-quick-action:not(:disabled):hover { border-color: color-mix(in srgb, var(--brand) 42%, var(--line)); box-shadow: 0 6px 18px rgba(11, 42, 88, .06); transform: translateY(-1px); }
.memo-quick-action:disabled { cursor: not-allowed; opacity: 1; }
.memo-archive-action { display: inline-flex; align-items: center; align-self: flex-start; gap: 7px; margin-top: auto; color: var(--muted); font-size: 12px; font-weight: 650; }
.memo-archive-action:hover { color: var(--brand); }
.memo-footer-commit > .danger-outline { min-width: 140px; }
.memo-footer-commit-actions .secondary { min-width: 124px; }
.memo-footer-commit-actions .primary { min-width: 148px; }
.memo-footer-commit button { min-height: 58px; }
.stack-form { display: grid; gap: 17px; }
.task-core-note { margin: -2px 0 1px; color: var(--muted); font-size: 13px; }
.form-advanced { margin-top: 3px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.form-advanced > summary { min-height: 64px; display: grid; grid-template-columns: minmax(0, 1fr) 18px; align-items: center; gap: 12px; padding: 8px 2px; list-style: none; cursor: pointer; }
.form-advanced > summary::-webkit-details-marker { display: none; }
.form-advanced > summary > span { min-width: 0; display: grid; gap: 3px; }
.form-advanced > summary strong { font-size: 15px; }
.form-advanced > summary small { color: var(--muted); font-size: 12px; }
.form-advanced > summary > svg { color: var(--muted); transition: transform .18s ease-out; }
.form-advanced[open] > summary > svg { transform: rotate(180deg); }
.form-advanced:not([open]) > .form-advanced-body { display: none; }
.form-advanced-body { display: grid; gap: 17px; padding: 6px 0 18px; }
.field { display: flex; flex-direction: column; gap: 7px; font-weight: 650; }
.field > span { display: inline-flex; align-items: center; gap: 7px; }
.field-requirement { color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1; }
.field-requirement.required { color: var(--brand); }
.field > small { color: var(--muted); font-weight: 400; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.task-project-field { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.task-project-field .field { margin: 0; }
.compact-button { min-height: 38px; justify-self: start; padding: 0 10px; color: var(--brand); }
.compact-button.active { color: var(--muted); }
.quick-project { display: grid; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.quick-project[hidden] { display: none; }
.quick-project > strong { font-size: 16px; }
.quick-project > p { margin: -8px 0 0; color: var(--muted); }
.overlay.project-editor-drawer { width: min(640px, calc(100vw - 24px)); }
.project-editor-drawer .overlay-heading { min-height: 92px; padding: 20px 24px; }
.project-editor-drawer .overlay-body { padding: 20px 24px; }
.project-editor-drawer .overlay-footer.project-create-footer { display: grid; grid-template-columns: auto minmax(120px, .72fr) minmax(220px, 1.25fr); align-items: center; }
.project-editor-drawer .overlay-footer.project-create-footer .button { min-width: 0; white-space: nowrap; }
.project-editor-drawer .overlay-footer.project-create-footer .button:first-child { justify-self: start; }
.project-form-light { gap: 13px; }
.project-form-light .field { gap: 6px; }
.project-form-light .form-grid { gap: 12px 14px; }
.project-form-light textarea { resize: vertical; }
.project-priority-field { grid-column: 1 / -1; }
.project-progressive-section { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.project-progressive-section > summary { min-height: 64px; display: grid; grid-template-columns: minmax(0,1fr) auto 18px; align-items: center; gap: 12px; padding: 9px 13px; list-style: none; cursor: pointer; }
.project-progressive-section > summary::-webkit-details-marker { display: none; }
.project-progressive-section > summary > span:first-child { min-width: 0; display: flex; align-items: center; gap: 10px; }
.project-progressive-section > summary > span:first-child > iconify-icon { flex: 0 0 auto; color: var(--brand); }
.project-progressive-section > summary > span:first-child > span { min-width: 0; display: grid; gap: 3px; }
.project-progressive-section > summary strong { display: flex; align-items: center; gap: 6px; }
.project-progressive-section > summary strong small { padding: 2px 6px; border-radius: 999px; color: var(--muted); background: var(--surface-2); font-size: 10px; font-weight: 600; }
.project-progressive-section > summary small { color: var(--muted); font-size: 12px; font-weight: 400; }
.project-progressive-section > summary > iconify-icon { color: var(--muted); transition: transform .2s cubic-bezier(.16,1,.3,1); }
.project-progressive-section[open] > summary > iconify-icon { transform: rotate(180deg); }
.project-progressive-content { display: grid; gap: 12px; padding: 14px; border-top: 1px solid var(--line); background: var(--surface-2); }
.project-member-summary { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.project-member-summary > small { flex: 0 0 auto; }
.project-member-chip { max-width: 118px; display: inline-flex; align-items: center; gap: 6px; padding: 3px 7px 3px 4px; border-radius: 999px; color: var(--text); background: var(--surface-2); font-size: 12px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.project-member-chip .avatar { width: 24px; height: 24px; flex: 0 0 auto; font-size: 10px; }
.project-progressive-placeholder, .project-attachment-summary { color: var(--brand); font-size: 12px; font-weight: 650; white-space: nowrap; }
.project-more-settings { overflow: visible; border: 0; border-radius: 0; background: transparent; }
.project-more-settings > summary { min-height: 32px; display: flex; justify-content: flex-start; gap: 5px; padding: 0 2px; color: var(--brand); }
.project-more-settings > summary > iconify-icon { order: -1; color: var(--brand); }
.project-more-settings > summary > strong { font-size: 13px; }
.project-more-settings > summary > small { margin-left: 3px; }
.project-more-settings > .project-progressive-content { border: 1px solid var(--line); border-radius: 9px; }
.project-member-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.project-member-picker label { min-height: 52px; display: grid; grid-template-columns: 20px 28px 1fr; align-items: center; gap: 9px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-weight: 400; cursor: pointer; }
.project-member-picker label:has(input:checked) { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); background: var(--brand-soft); }
.project-member-picker input { width: 18px; min-height: 18px; }
.project-member-picker label > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.project-member-picker small { color: var(--muted); }
.project-upload-zone { min-height: 88px; background: var(--surface); transition: border-color .2s cubic-bezier(.16,1,.3,1), transform .2s cubic-bezier(.16,1,.3,1); }
.project-upload-zone:hover { border-color: var(--brand); }
.project-upload-zone:active { transform: translateY(1px); }
.project-upload-zone iconify-icon { color: var(--brand); }
.project-file-selection { display: grid; gap: 8px; color: var(--muted); font-size: 12px; }
.project-file-selection-empty { padding: 2px 0; }
.project-attachment-row.project-selected-file { background: var(--surface); }
.project-ai-authorization { min-height: 48px; display: grid; grid-template-columns: 20px minmax(0,1fr); align-items: flex-start; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); cursor: pointer; }
.project-ai-authorization input { width: 18px; min-height: 18px; margin-top: 2px; }
.project-ai-authorization span { display: grid; gap: 3px; }
.project-ai-authorization small { color: var(--muted); font-weight: 400; line-height: 1.5; }
.project-ai-room { height: calc(100dvh - 148px); min-height: 0; display: grid; grid-template-columns: 220px minmax(480px,1fr) 286px; grid-template-rows: minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.project-ai-history, .project-ai-outcomes { min-width: 0; display: flex; flex-direction: column; background: var(--surface-2); }
.project-ai-history { border-right: 1px solid var(--line); }
.project-ai-outcomes { border-left: 1px solid var(--line); }
.project-ai-history > header, .project-ai-outcomes > header, .project-ai-thread > header { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.project-ai-history > header strong, .project-ai-outcomes > header strong { font-size: 14px; }
.project-ai-history > header .icon-button { width: 32px; height: 32px; }
.project-ai-new-session { margin: 14px 14px 8px; }
.project-ai-history nav { min-height: 0; display: grid; align-content: start; gap: 6px; padding: 6px 10px; overflow-y: auto; }
.project-ai-history nav a { min-width: 0; display: grid; gap: 5px; padding: 11px 10px; border: 1px solid transparent; border-radius: 8px; color: var(--text); }
.project-ai-history nav a:hover { background: var(--surface); }
.project-ai-history nav a.active { border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); background: var(--brand-soft); }
.project-ai-history nav a > span { min-width: 0; display: flex; align-items: center; gap: 7px; }
.project-ai-history nav a strong { overflow: hidden; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.project-ai-history nav a small { padding-left: 23px; color: var(--muted); font-size: 10px; }
.project-ai-back { display: inline-flex; align-items: center; gap: 6px; margin: auto 14px 14px; color: var(--brand); font-size: 12px; font-weight: 700; }
.project-ai-thread { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto auto minmax(0,1fr) auto; grid-template-areas: "header" "error" "messages" "composer"; background: var(--surface); }
.project-ai-thread > header { grid-area: header; }
.project-ai-thread > header > div { min-width: 0; display: flex; align-items: center; gap: 9px; }
.project-ai-thread > header > div > span:last-child { min-width: 0; display: grid; gap: 2px; }
.project-ai-thread > header strong { overflow: hidden; font-size: 14px; white-space: nowrap; text-overflow: ellipsis; }
.project-ai-thread > header small { overflow: hidden; color: var(--muted); font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }
.project-ai-avatar { width: 36px; height: 36px; display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 9px; color: #fff; background: var(--brand); }
.project-ai-thread-scroll { grid-area: messages; min-height: 0; display: flex; flex-direction: column; gap: 22px; padding: 22px 24px 30px; overflow-y: auto; scroll-behavior: smooth; }
.project-ai-start { margin: auto; max-width: 430px; display: grid; justify-items: center; gap: 10px; padding: 28px; text-align: center; }
.project-ai-start > span { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 14px; color: var(--brand); background: var(--brand-soft); }
.project-ai-start h2 { margin: 0; font-size: 22px; }
.project-ai-start p { margin: 0 0 8px; color: var(--muted); line-height: 1.65; }
.project-ai-message { max-width: 860px; display: grid; gap: 8px; }
.project-ai-message.user { width: min(78%, 720px); align-self: flex-end; justify-items: end; }
.project-ai-message.assistant { width: 100%; align-self: flex-start; }
.project-ai-message-label { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.project-ai-message-label .project-ai-avatar { width: 30px; height: 30px; border-radius: 8px; }
.project-ai-message-label small, .project-ai-message > small { color: var(--muted); font-size: 10px; }
.project-ai-message-bubble { padding: 12px 15px; border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--line)); border-radius: 12px 3px 12px 12px; background: var(--brand-soft); line-height: 1.7; white-space: pre-wrap; }
.project-ai-answer { display: grid; gap: 13px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 3px 12px 12px 12px; background: var(--surface-2); }
.project-ai-answer > p { margin: 0; line-height: 1.75; white-space: pre-wrap; }
.project-ai-answer section { display: grid; gap: 6px; }
.project-ai-answer h4 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12px; }
.project-ai-answer h4 svg { color: var(--brand); }
.project-ai-answer ul { display: grid; gap: 5px; margin: 0; padding-left: 20px; color: var(--muted); line-height: 1.6; }
.project-ai-citations { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding-top: 11px; border-top: 1px solid var(--line); }
.project-ai-citations strong { margin-right: 3px; font-size: 11px; }
.project-ai-citations span, .project-ai-citations a { display: inline-flex; align-items: center; gap: 4px; padding: 4px 7px; border-radius: 999px; color: var(--brand); background: var(--brand-soft); font-size: 10px; }
.project-ai-citations a:hover { text-decoration: underline; }
.project-ai-change-card { display: grid; gap: 11px; padding: 14px; border: 1px solid color-mix(in srgb, var(--success) 30%, var(--line)); border-radius: 10px; background: color-mix(in srgb, var(--success) 5%, var(--surface)); }
.project-ai-change-card.is-conflict { border-color: color-mix(in srgb, var(--warning) 44%, var(--line)); background: color-mix(in srgb, var(--warning) 7%, var(--surface)); }
.project-ai-change-card > header, .project-ai-change-card > footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.project-ai-change-card > header > span { display: flex; align-items: center; gap: 7px; }
.project-ai-change-card > header svg { color: var(--success); }
.project-ai-change-card.is-conflict > header svg { color: var(--warning); }
.project-ai-change-fields { display: grid; gap: 8px; }
.project-ai-change-fields > div { display: grid; grid-template-columns: 96px minmax(0,1fr); gap: 5px 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.project-ai-change-fields > div > span { grid-row: 1 / 3; font-size: 11px; font-weight: 750; }
.project-ai-change-fields small { color: var(--muted); }
.project-ai-change-fields strong { font-size: 12px; }
.project-ai-change-card > footer small { color: var(--muted); }
.project-ai-change-card > footer > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.project-ai-composer { grid-area: composer; display: grid; gap: 8px; margin: 0 20px 18px; padding: 11px; border: 1px solid color-mix(in srgb, var(--brand) 38%, var(--line)); border-radius: 11px; background: var(--surface); box-shadow: 0 10px 24px rgba(7,26,61,.06); }
.project-ai-composer textarea { min-height: 62px; padding: 4px; border: 0; background: transparent; resize: none; }
.project-ai-composer textarea:focus { outline: 0; box-shadow: none; }
.project-ai-composer > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.project-ai-composer small { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.project-ai-service-error { grid-area: error; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px; margin: 14px 20px 0; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--warning) 45%, var(--line)); border-radius: 9px; background: color-mix(in srgb, var(--warning) 8%, var(--surface)); }
.project-ai-service-error > svg { color: var(--warning); }
.project-ai-service-error p { margin: 3px 0; color: var(--muted); }
.project-ai-authorization-callout { border-color: color-mix(in srgb, var(--brand) 38%, var(--line)); background: color-mix(in srgb, var(--brand) 7%, var(--surface)); }
.project-ai-authorization-callout > svg { color: var(--brand); }
.overlay-backdrop:has(.project-ai-authorization-modal) { justify-content: center; background: rgba(5, 12, 28, .36); backdrop-filter: blur(2px); }
.overlay.project-ai-authorization-modal { width: min(522px, calc(100vw - 32px)); overflow: hidden; border: 1px solid color-mix(in srgb, var(--brand) 12%, var(--line)); border-radius: 14px; box-shadow: 0 22px 64px rgba(4, 14, 35, .24); }
.project-ai-authorization-modal .overlay-heading { position: relative; min-height: 0; padding: 30px 60px 18px 32px; border-bottom: 0; }
.project-ai-authorization-modal .overlay-heading-main { align-items: flex-start; gap: 14px; text-align: left; }
.project-ai-authorization-modal .overlay-title-icon { width: 46px; height: 46px; color: var(--brand); background: transparent; box-shadow: none; }
.project-ai-authorization-modal .overlay-title-icon svg { width: 44px !important; height: 44px !important; stroke-width: 1.8; }
.project-ai-authorization-modal .overlay-heading h2 { font-size: 25px; line-height: 1.2; letter-spacing: -.02em; }
.project-ai-authorization-modal .overlay-heading p { margin-top: 7px; font-size: 13px; }
.project-ai-authorization-modal .overlay-heading-actions { position: absolute; top: 18px; right: 18px; }
.project-ai-authorization-modal .overlay-body { padding: 0 32px 22px; overflow-y: auto; }
.project-ai-authorization-content { display: grid; gap: 18px; }
.project-ai-authorization-project { width: fit-content; max-width: 100%; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--muted); font-size: 13px; }
.project-ai-authorization-project svg { color: var(--brand); }
.project-ai-authorization-project strong { max-width: 280px; overflow: hidden; color: var(--text); text-overflow: ellipsis; white-space: nowrap; }
.project-ai-authorization-scopes { display: grid; grid-template-columns: 1fr; }
.project-ai-authorization-scopes section { min-width: 0; padding-bottom: 17px; }
.project-ai-authorization-scopes section + section { padding-top: 17px; padding-bottom: 0; border-top: 1px solid var(--line); }
.project-ai-authorization-scopes header { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; color: var(--text); font-size: 14px; }
.project-ai-authorization-scopes header svg { color: var(--brand); }
.project-ai-authorization-scopes .excluded header { color: var(--muted); }
.project-ai-authorization-scopes ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.project-ai-authorization-scopes li { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: start; gap: 8px; color: var(--text); font-size: 13px; line-height: 1.45; }
.project-ai-authorization-scopes li svg { margin-top: 1px; color: var(--brand); }
.project-ai-authorization-scopes section:not(.excluded) li svg { fill: var(--brand); color: #fff; }
.project-ai-authorization-scopes .excluded li { color: var(--muted); }
.project-ai-authorization-scopes .excluded li svg { color: color-mix(in srgb, var(--muted) 72%, transparent); }
.project-ai-authorization-trust, .project-ai-authorization-waiting { display: flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid color-mix(in srgb, var(--brand) 20%, var(--line)); border-radius: 9px; background: color-mix(in srgb, var(--brand) 5%, var(--surface)); }
.project-ai-authorization-trust > svg, .project-ai-authorization-waiting > svg { flex: 0 0 auto; margin-top: 1px; color: var(--brand); }
.project-ai-authorization-trust p { display: grid; gap: 3px; margin: 0; }
.project-ai-authorization-trust strong { font-size: 13px; }
.project-ai-authorization-trust span, .project-ai-authorization-waiting { color: var(--muted); font-size: 12px; line-height: 1.5; }
.project-ai-authorization-trust span { font-size: 11px; white-space: nowrap; }
.project-ai-authorization-modal .overlay-footer { justify-content: flex-end; gap: 12px; padding: 18px 32px 24px; border-top: 1px solid var(--line); background: var(--surface); }
.project-ai-authorization-modal .overlay-footer .button { min-width: 128px; }
.project-ai-authorization-reopen { display: inline-flex; align-items: center; gap: 6px; padding: 0; color: var(--brand); }
.project-ai-outcomes > header { align-items: flex-start; flex-direction: column; gap: 3px; }
.project-ai-outcomes > header small { color: var(--muted); font-size: 10px; }
.project-ai-outcome-stats { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.project-ai-outcome-stats span { min-height: 64px; display: grid; place-items: center; align-content: center; gap: 2px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.project-ai-outcome-stats span:nth-child(even) { border-right: 0; }
.project-ai-outcome-stats span:nth-child(n+3) { border-bottom: 0; }
.project-ai-outcome-stats strong { color: var(--text); font-size: 18px; }
.project-ai-outcome-card, .project-ai-outcome-empty { display: grid; justify-items: start; gap: 9px; margin: 14px; padding: 14px; border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--line)); border-radius: 10px; background: var(--surface); }
.project-ai-outcome-card > span, .project-ai-outcome-empty > svg { color: var(--brand); }
.project-ai-outcome-card h3 { margin: 0; font-size: 14px; }
.project-ai-outcome-card p, .project-ai-outcome-empty p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.project-ai-outcome-card > div { width: 100%; display: grid; gap: 7px; }
.project-ai-outcome-card .button { width: 100%; min-height: 38px; }
.project-ai-outcome-card .text-button { justify-self: center; }
.project-ai-insights, .project-ai-summary-actions { display: grid; gap: 9px; margin: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.project-ai-insights header { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; }
.project-ai-insights header span { color: var(--brand); font-weight: 800; }
.project-ai-insights > div { height: 6px; overflow: hidden; border-radius: 999px; background: var(--surface-3); }
.project-ai-insights > div i { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.project-ai-insights p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.project-ai-insights ul { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; color: var(--warning); font-size: 10px; }
.project-ai-insights li { display: flex; align-items: flex-start; gap: 5px; }
.project-ai-summary-actions > strong { font-size: 12px; }
.project-ai-summary-actions > div { display: flex; flex-wrap: wrap; gap: 5px 10px; }
.project-ai-summary-actions .text-button { font-size: 10px; }
.project-ai-change-history { margin: 0 14px 14px; border-top: 1px solid var(--line); }
.project-ai-change-history > summary { display: flex; align-items: center; gap: 6px; padding: 14px 0; cursor: pointer; font-weight: 750; list-style: none; }
.project-ai-change-history > summary small { color: var(--muted); }
.project-ai-change-history > summary svg { margin-left: auto; }
.project-ai-change-history > div { display: grid; gap: 10px; max-height: 320px; overflow-y: auto; }
.project-ai-change-history .project-ai-change-card { padding: 11px; }
.project-ai-change-history .project-ai-change-fields > div { grid-template-columns: 1fr; }
.project-ai-change-history .project-ai-change-fields > div > span { grid-row: auto; }
.project-ai-change-history .project-ai-change-card > footer { align-items: flex-start; flex-direction: column; }
.overlay.project-ai-task-review-drawer { width: min(780px, calc(100vw - 24px)); }
.overlay.project-ai-knowledge-review-drawer { width: min(720px, calc(100vw - 24px)); }
.project-ai-task-draft-list { display: grid; gap: 14px; }
.project-ai-task-draft { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.project-ai-task-draft > header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.project-ai-task-draft > header label { display: flex; align-items: center; gap: 8px; }
.project-ai-task-draft > header input { width: 18px; min-height: 18px; }
.project-ai-task-people { grid-template-columns: 1fr 1fr 120px; }
.project-ai-knowledge-sources { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.project-ai-knowledge-sources span { display: flex; align-items: center; gap: 7px; color: var(--muted); }
@media (max-width: 1180px) {
  .project-ai-room { grid-template-columns: 200px minmax(0, 1fr); }
  .project-ai-outcomes { display: none; }
}
@media (max-width: 760px) {
  .overlay.project-editor-drawer,
  .overlay.project-ai-task-review-drawer,
  .overlay.project-ai-knowledge-review-drawer { width: 100%; max-width: none; }
  .project-editor-drawer .overlay-heading { min-height: 78px; padding: 16px; }
  .project-editor-drawer .overlay-body { padding: 16px; }
  .project-editor-drawer .overlay-footer.project-create-footer { grid-template-columns: 1fr 1fr; padding: 12px 16px 82px; }
  .project-editor-drawer .overlay-footer.project-create-footer .button:first-child { grid-column: 1 / -1; width: 100%; justify-self: stretch; }
  .project-editor-drawer .overlay-footer.project-create-footer .button { width: 100%; padding-inline: 10px; }
  .project-member-picker,
  .project-ai-task-people { grid-template-columns: 1fr; }
  .project-progressive-section > summary { grid-template-columns: minmax(0, 1fr) 18px; }
  .project-member-summary { display: none; }
  .project-ai-room { height: calc(100dvh - 128px); min-height: 0; grid-template-columns: minmax(0, 1fr); border-radius: 9px; }
  .project-ai-history,
  .project-ai-outcomes { display: none; }
  .project-ai-thread > header { min-height: 58px; padding: 10px 12px; }
  .project-ai-thread-scroll { gap: 18px; padding: 16px 12px 24px; }
  .project-ai-message.user { width: 88%; }
  .project-ai-answer { padding: 14px; }
  .project-ai-change-fields > div { grid-template-columns: 1fr; }
  .project-ai-change-fields > div > span { grid-row: auto; }
  .project-ai-change-card > footer { align-items: flex-start; flex-direction: column; }
  .project-ai-composer { margin: 0 10px 10px; }
  .project-ai-composer > div { align-items: flex-end; }
  .project-ai-composer small { max-width: 190px; }
  .project-ai-service-error { grid-template-columns: auto minmax(0, 1fr); margin: 10px 10px 0; }
  .project-ai-service-error .button { grid-column: 1 / -1; width: 100%; }
  .overlay.project-ai-authorization-modal { width: calc(100% - 24px); max-height: calc(100dvh - 24px); border-radius: 15px; }
  .project-ai-authorization-modal .overlay-heading { padding: 24px 48px 14px; }
  .project-ai-authorization-modal .overlay-heading-actions { top: 12px; right: 12px; }
  .project-ai-authorization-modal .overlay-body { padding: 0 16px 18px; }
  .project-ai-authorization-scopes { grid-template-columns: 1fr; }
  .project-ai-authorization-scopes section { padding: 15px 16px; }
  .project-ai-authorization-scopes section + section { border-top: 1px solid var(--line); border-left: 0; }
  .project-ai-authorization-modal .overlay-footer { display: grid; grid-template-columns: 1fr; padding: 14px 16px max(16px, env(safe-area-inset-bottom)); }
  .project-ai-authorization-modal .overlay-footer .button { width: 100%; min-width: 0; }
  .project-ai-authorization-trust span { white-space: normal; }
}
.project-ai-empty { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 14px; padding: 18px; border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--surface-2); }
.project-ai-empty p { margin: 5px 0 0; color: var(--muted); line-height: 1.55; }
.project-ai-mark { width: 38px; height: 38px; display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 10px; color: var(--brand); background: var(--brand-soft); }
.project-ai-brief { display: grid; gap: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.project-ai-brief > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.project-ai-brief > header > div { display: flex; align-items: center; gap: 10px; }
.project-ai-brief > header > div > span:last-child { display: flex; align-items: flex-start; flex-direction: column; gap: 2px; }
.project-ai-brief > header small { color: var(--muted); font-weight: 400; }
.project-ai-brief h4 { margin: 0 0 10px; font-size: 14px; }
.project-ai-brief h4 small { margin-left: 5px; color: var(--muted); font-weight: 500; }
.project-ai-overview { padding: 14px 16px; border-left: 3px solid var(--brand); background: var(--brand-soft); border-radius: 0 10px 10px 0; }
.project-ai-overview p { margin: 0; line-height: 1.75; }
.project-ai-columns, .project-ai-suggestion-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.project-ai-columns > section, .project-ai-suggestion-grid > section, .project-ai-questions { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 11px; }
.project-ai-section-heading { min-height: 25px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.project-ai-section-heading h4 { margin-bottom: 0; }
.project-ai-section-heading button { min-height: 25px; display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; color: var(--brand); font-size: 12px; font-weight: 750; }
.project-ai-section-heading button:hover { text-decoration: underline; text-underline-offset: 3px; }
.project-ai-suggestion-grid a { display: inline-flex; align-items: center; gap: 4px; margin: 3px 8px 0 0; color: var(--brand); font-size: 12px; }
.project-ai-evidence-preview, .project-ai-evidence-drawer-list { display: grid; }
.project-ai-brief-evidence-item { min-width: 0; border-top: 1px solid var(--line); }
.project-ai-brief-evidence-item:first-child { border-top: 0; }
.project-ai-brief-evidence-item[hidden] { display: none; }
.project-ai-brief-evidence-item summary { min-height: 58px; display: grid; grid-template-columns: minmax(0,1fr) 20px; align-items: center; gap: 10px; padding: 9px 0; cursor: pointer; list-style: none; }
.project-ai-brief-evidence-item summary::-webkit-details-marker { display: none; }
.project-ai-brief-evidence-item summary > span { min-width: 0; display: grid; gap: 5px; }
.project-ai-brief-evidence-item summary strong { overflow: hidden; display: -webkit-box; font-size: 13px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.project-ai-brief-evidence-item summary small { min-width: 0; display: flex; align-items: center; gap: 5px; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.project-ai-brief-evidence-item summary > svg { color: var(--muted); transition: transform .18s ease, color .18s ease; }
.project-ai-brief-evidence-item[open] summary > svg { color: var(--brand); transform: rotate(180deg); }
.project-ai-brief-evidence-detail { display: grid; justify-items: start; gap: 8px; padding: 0 30px 14px 0; }
.project-ai-brief-evidence-detail blockquote { width: 100%; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--muted); font-size: 12px; line-height: 1.65; }
.project-ai-brief-evidence-detail a { display: inline-flex; align-items: center; gap: 4px; color: var(--brand); font-size: 12px; font-weight: 700; }
.overlay.project-ai-evidence-drawer { width: min(560px, calc(100vw - 24px)); }
.project-ai-evidence-drawer .overlay-body { padding: 18px 24px 24px; }
.project-ai-evidence-tools { display: grid; grid-template-columns: minmax(0,1fr) minmax(160px, .58fr); gap: 10px; }
.project-ai-evidence-tools label { min-width: 0; display: grid; gap: 6px; }
.project-ai-evidence-tools label > span:first-child { color: var(--muted); font-size: 11px; font-weight: 700; }
.project-ai-evidence-search { min-height: 42px; display: grid; grid-template-columns: 18px minmax(0,1fr); align-items: center; gap: 7px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); transition: border-color .18s ease, box-shadow .18s ease; }
.project-ai-evidence-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent); }
.project-ai-evidence-search > svg { color: var(--muted); }
.project-ai-evidence-search input { width: 100%; min-height: 40px; padding: 0; border: 0; background: transparent; box-shadow: none; }
.project-ai-evidence-search input:focus { box-shadow: none; }
.project-ai-evidence-tools select { min-height: 42px; }
.project-ai-evidence-result { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 13px; padding-bottom: 8px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.project-ai-evidence-result span { color: var(--text); font-weight: 750; }
.project-ai-evidence-drawer-list .project-ai-brief-evidence-item summary { min-height: 68px; padding: 11px 0; }
.project-ai-evidence-empty { min-height: 220px; display: grid; place-items: center; align-content: center; gap: 6px; color: var(--muted); text-align: center; }
.project-ai-evidence-empty[hidden] { display: none; }
.project-ai-evidence-empty strong { color: var(--text); }
.project-ai-evidence-empty small { max-width: 30ch; }
.project-ai-questions ul, .project-ai-suggestion-grid ol { display: grid; gap: 9px; margin: 0; padding-left: 20px; }
.project-ai-questions li, .project-ai-suggestion-grid li { line-height: 1.55; }
.project-ai-suggestion-grid li p { margin: 3px 0; color: var(--muted); }
.project-ai-suggestion-grid li > small { display: block; line-height: 1.5; }
.project-ai-suggestion-item { display: grid; grid-template-columns: 20px minmax(0,1fr); align-items: start; gap: 8px; }
.project-ai-suggestion-item > input { width: 17px; min-height: 17px; margin: 3px 0 0; accent-color: var(--brand); }
.project-ai-suggestion-item > span:last-child { min-width: 0; }
.project-ai-milestone-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.project-ai-milestone-actions .button { min-height: 34px; }
.project-ai-milestone-actions .button small { min-width: 18px; padding: 1px 5px; border-radius: 999px; background: var(--surface-2); color: inherit; text-align: center; }
.project-ai-plan-complete { display: inline-flex; align-items: center; gap: 5px; color: var(--success); font-size: 12px; font-weight: 700; }
.overlay.project-ai-suggestion-drawer { width: min(640px, calc(100vw - 24px)); }
.project-ai-suggestion-drawer .overlay-body { padding: 8px 24px 24px; }
.project-ai-suggestion-drawer-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.project-ai-suggestion-drawer-list .project-ai-suggestion-item { min-height: 88px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.project-ai-suggestion-drawer-list .project-ai-suggestion-item:last-child { border-bottom: 0; }
.project-ai-suggestion-drawer-list .project-ai-suggestion-item > span:last-child { display: block; }
.project-ai-suggestion-drawer-list .project-ai-suggestion-item p { margin: 4px 0; color: var(--muted); line-height: 1.6; }
.project-ai-suggestion-drawer-list .project-ai-suggestion-item small { line-height: 1.5; }
.project-ai-suggestion-drawer .overlay-footer .button.primary small { min-width: 18px; padding: 1px 5px; border-radius: 999px; background: rgba(255,255,255,.2); color: inherit; text-align: center; }
.overlay.milestone-task-plan-drawer { width: min(760px, 100vw); }
.milestone-task-plan-drawer .overlay-body { background: var(--surface-2); }
.milestone-task-shared-fields { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.milestone-task-collaborator-field { grid-column: 1 / -1; }
.milestone-task-collaborator-field .task-collaborator-section { margin-top: 0; }
.milestone-task-draft-list { display: grid; gap: 12px; }
.milestone-task-draft { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); transition: opacity .16s ease, border-color .16s ease; }
.milestone-task-draft > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.milestone-task-draft > header label { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; }
.milestone-task-draft > header input { width: 17px; min-height: 17px; accent-color: var(--brand); }
.milestone-task-draft > header small { color: var(--muted); }
.milestone-task-draft.is-unselected { opacity: .52; border-style: dashed; }
.milestone-task-time-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.milestone-task-plan-error:not(:empty) { padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--danger) 32%, var(--line)); border-radius: 9px; background: var(--danger-soft); }
.suggestion-spacer { width: 17px; }
.suggestion-created { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; color: var(--success); font-size: 12px; font-weight: 600; }
.project-ai-execute { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--brand-soft); }
.project-ai-execute > span { display: grid; gap: 3px; }
.project-ai-execute small { color: var(--muted); font-weight: 400; }
.project-ai-execute .button small { min-width: 18px; padding: 1px 5px; border-radius: 999px; color: inherit; background: rgba(255,255,255,.2); text-align: center; }
.project-ai-execute.complete { justify-content: flex-start; color: var(--success); font-weight: 600; border-color: var(--line-strong); background: var(--success-soft); }
.project-ai-decisions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.project-ai-decisions p { display: flex; align-items: center; gap: 7px; margin: 0; color: var(--muted); }
.project-ai-decisions > div { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 900px) {
  .project-ai-empty { grid-template-columns: auto minmax(0,1fr); }
  .project-ai-empty .button { grid-column: 1 / -1; }
  .project-ai-columns, .project-ai-suggestion-grid { grid-template-columns: 1fr; }
  .project-ai-execute { align-items: stretch; flex-direction: column; }
  .project-ai-decisions { align-items: stretch; flex-direction: column; }
  .overlay.milestone-task-plan-drawer { width: 100%; }
  .overlay.project-ai-evidence-drawer { width: 100%; }
  .overlay.project-ai-suggestion-drawer { width: 100%; }
  .project-ai-evidence-tools { grid-template-columns: 1fr; }
  .project-ai-evidence-result small { display: none; }
  .milestone-task-shared-fields, .milestone-task-time-grid { grid-template-columns: 1fr; }
}
.project-upload-status { min-height: 18px; margin: 0; color: var(--brand); font-size: 12px; }
.material-attachments { display: grid; gap: 12px; min-width: 0; }
.material-existing-files { display: grid; gap: 8px; min-width: 0; }
.material-existing-files:empty { display: none; }
.material-file-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); min-width: 0; }
.material-file-choice { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; min-height: 44px; cursor: pointer; }
.material-file-choice input[type="checkbox"] { width: 18px; height: 18px; min-height: 18px; flex: 0 0 18px; margin: 0; padding: 0; accent-color: var(--brand); }
.material-file-choice > span { display: grid; gap: 4px; min-width: 0; }
.material-file-choice strong { font-size: 13px; overflow-wrap: anywhere; }
.material-file-choice small { font-size: 12px; color: var(--muted); }
.material-file-choice > svg { flex: 0 0 auto; color: var(--brand); }
.material-file-row > .icon-button { flex: 0 0 44px; width: 44px; height: 44px; }
.material-upload-zone { position: relative; padding: 16px; text-align: center; }
.material-upload-zone:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.material-upload-zone input[type="file"] { width: 1px; height: 1px; min-height: 1px; padding: 0; }
.project-material-entry { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 0; text-align: left; }
.project-material-entry > span { display: grid; gap: 4px; flex: 1; min-width: 0; }
.project-material-entry strong { overflow-wrap: anywhere; }
.project-material-entry small { color: var(--muted); font-size: 12px; }
.project-attachment-list { display: grid; gap: 8px; }
.project-attachment-row { min-height: 52px; display: grid; grid-template-columns: 22px minmax(0,1fr) 34px; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.project-attachment-editor .project-attachment-row { grid-template-columns: 22px minmax(0,1fr) 34px 34px; background: var(--surface); }
.project-attachment-row > iconify-icon { color: var(--brand); }
.project-attachment-row > span { min-width: 0; display: grid; gap: 3px; }
.project-attachment-row strong, .project-attachment-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-attachment-row small { color: var(--muted); font-size: 12px; }
.task-assignee-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.task-assignee-field { grid-column: 1 / -1; }
.task-assignee-picker label { min-height: 58px; display: grid; grid-template-columns: 20px 28px 1fr; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); font-weight: 400; cursor: pointer; }
.task-assignee-picker label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.task-assignee-picker label:has(input:disabled) { opacity: .48; cursor: not-allowed; }
.task-assignee-picker input { width: 18px; min-height: 18px; }
.task-assignee-picker label > span:last-child, .task-assignees > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.task-assignee-picker small, .task-assignees small { color: var(--muted); font-size: 12px; }
.task-collaborator-section { margin-top: 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-1); }
.task-collaborator-section summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; cursor: pointer; list-style: none; }
.task-collaborator-section summary::-webkit-details-marker { display: none; }
.task-collaborator-section summary > span { display: flex; flex-direction: column; gap: 2px; }
.task-collaborator-section summary small { color: var(--muted); font-weight: 400; }
.task-collaborator-section[open] summary > svg { transform: rotate(180deg); }
.task-collaborator-picker { padding: 0 10px 10px; }
.info-box { display: flex; align-items: flex-start; gap: 10px; padding: 13px; border-radius: 8px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); }
.upload-zone { min-height: 180px; display: grid; place-items: center; align-content: center; gap: 8px; border: 1px dashed var(--line-strong); border-radius: 10px; background: var(--surface-2); cursor: pointer; }
.upload-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-zone svg { color: var(--brand); }
.upload-zone small { color: var(--muted); }
.upload-zone.compact { min-height: 112px; }
.overlay.import-drawer { width: min(620px, calc(100vw - 24px)); }
.import-stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; padding: 0 4px 18px; margin: 0 0 24px; list-style: none; border-bottom: 1px solid var(--line); }
.import-stepper li { position: relative; display: grid; justify-items: center; gap: 6px; color: var(--muted); }
.import-stepper li:not(:last-child)::after { content: ""; position: absolute; top: 14px; left: calc(50% + 18px); width: calc(100% - 36px); height: 1px; background: var(--line-strong); }
.import-stepper li.complete:not(:last-child)::after { background: var(--brand); }
.import-stepper li > span { position: relative; z-index: 1; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface); font-size: 12px; font-weight: 800; }
.import-stepper li.active { color: var(--brand); }
.import-stepper li.active > span { color: #fff; border-color: var(--brand); background: var(--brand); }
.import-stepper li.complete > span { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
.import-stepper small { font-size: 12px; font-weight: 700; }
.import-flow-body { min-height: 480px; }
.import-flow-copy { margin-bottom: 20px; }
.import-flow-copy h3, .import-progress-heading h3, .import-review-heading h3, .import-complete h3 { margin: 0 0 5px; font-size: 19px; }
.import-flow-copy p, .import-progress-heading p, .import-review-heading p, .import-complete p { margin: 0; color: var(--muted); }
.import-upload-zone { min-height: 164px; margin-bottom: 18px; }
.import-list-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 2px 10px; }
.import-list-heading span { color: var(--muted); font-size: 13px; }
.import-file-list { display: grid; gap: 8px; }
.import-file-row { min-height: 62px; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.import-file-row > svg { color: var(--brand); }
.import-file-row > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.import-file-row strong, .import-file-row small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.import-file-row small { color: var(--muted); }
.import-file-row.invalid { border-color: color-mix(in srgb, var(--danger) 42%, var(--line)); background: var(--danger-soft); }
.import-file-row.invalid > svg, .import-file-row.invalid small { color: var(--danger); }
.import-empty-hint { min-height: 58px; display: flex; align-items: center; justify-content: center; gap: 9px; color: var(--muted); border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.import-alert { margin: 14px 0 0; }
.import-scope-summary { display: grid; gap: 1px; overflow: hidden; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--line); }
.import-scope-summary > div { min-height: 54px; display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 14px; padding: 9px 13px; background: var(--surface); }
.import-scope-summary span { display: flex; align-items: center; gap: 9px; color: var(--muted); }
.import-scope-summary strong { text-align: right; }
.import-file-summary { max-height: 150px; display: grid; gap: 8px; padding: 12px; margin-bottom: 16px; overflow-y: auto; border-radius: 8px; background: var(--surface-2); }
.import-file-summary span { min-width: 0; display: flex; align-items: center; gap: 8px; }
.import-file-summary svg { color: var(--success); }
.import-consent { margin: 18px 0 12px; }
.import-consent > span { display: flex; flex-direction: column; }
.import-consent small { margin-top: 3px; color: var(--muted); font-weight: 400; }
.import-progress-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.import-progress-card { display: grid; gap: 9px; padding: 14px 15px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.import-progress-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.import-progress-label strong, .import-progress-label b { font-size: 13px; }
.import-progress-label b { color: var(--brand); }
.import-progress-track { height: 8px; overflow: hidden; border-radius: 999px; background: color-mix(in srgb, var(--brand) 10%, var(--surface-3)); }
.import-progress-track > span { display: block; height: 100%; border-radius: inherit; background: var(--brand); transition: width .32s ease; }
.import-progress-card > small { color: var(--muted); font-size: 12px; }
.import-stage-list { display: grid; gap: 1px; margin-bottom: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--line); }
.import-stage-list > div { min-height: 64px; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 10px 13px; background: var(--surface); }
.import-stage-list > div > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); background: var(--surface-3); font-size: 12px; font-weight: 800; }
.import-stage-list p { display: flex; flex-direction: column; margin: 0; }
.import-stage-list small { color: var(--muted); }
.import-stage-list b { color: var(--muted); font-size: 12px; }
.import-stage-list .complete > span { color: var(--success); background: var(--success-soft); }
.import-stage-list .complete b { color: var(--success); }
.import-stage-list .active { background: var(--brand-soft); }
.import-stage-list .active > span { color: #fff; background: var(--brand); animation: import-pulse 1.2s ease-in-out infinite; }
.import-stage-list .active b { color: var(--brand); }
.import-processing-label { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.import-processing-dots { display: inline-flex; align-items: center; gap: 2px; }
.import-processing-dots i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .3; animation: import-processing-dot 1.2s ease-in-out infinite; }
.import-processing-dots i:nth-child(2) { animation-delay: .14s; }
.import-processing-dots i:nth-child(3) { animation-delay: .28s; }
.import-stage-list .failed { background: var(--danger-soft); }
.import-stage-list .failed > span { color: var(--danger); background: var(--surface); }
.import-progress-note { margin: 12px 0 0; color: var(--muted); text-align: center; }
@keyframes import-pulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand) 12%, transparent); } }
@keyframes import-processing-dot { 30% { opacity: 1; transform: translateY(-2px); } 60%, 100% { opacity: .3; transform: translateY(0); } }
.import-review-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.import-review-heading > label { min-height: 42px; display: flex; align-items: center; gap: 8px; color: var(--brand); white-space: nowrap; font-weight: 700; cursor: pointer; }
.import-review-heading input, .import-candidate-heading input { width: 18px; min-height: 18px; margin: 0; accent-color: var(--brand); }
.import-candidate-list { display: grid; gap: 12px; }
.import-candidate-card { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.import-candidate-card.selected { border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); }
.import-candidate-card.has-error { border-color: color-mix(in srgb, var(--danger) 55%, var(--line)); }
.import-candidate-heading { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.import-candidate-heading > label { min-width: 0; display: grid; grid-template-columns: 18px 31px minmax(0, 1fr); align-items: center; gap: 9px; cursor: pointer; }
.import-candidate-heading > label > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.import-candidate-heading strong, .import-candidate-heading small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.import-candidate-heading small { color: var(--muted); }
.import-candidate-editor { display: grid; gap: 12px; padding: 14px; }
.import-candidate-editor > label, .import-candidate-editor .form-grid > label { display: flex; flex-direction: column; gap: 6px; font-weight: 650; }
.candidate-error { color: var(--danger); }
.import-publish-meter { position: relative; min-width: 150px; min-height: 42px; overflow: hidden; display: grid; place-items: center; border-radius: 8px; color: #fff; background: color-mix(in srgb, var(--brand) 76%, var(--surface-3)); }
.import-publish-meter-fill { position: absolute; inset: 0; background: var(--brand); transform: scaleX(var(--publish-progress)); transform-origin: left center; transition: transform .3s cubic-bezier(.16, 1, .3, 1); }
.import-publish-meter-copy { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; white-space: nowrap; }
.import-publish-meter-copy svg { animation: import-publish-spin .8s linear infinite; }
.import-publish-meter-copy b { min-width: 34px; font-variant-numeric: tabular-nums; }
.import-complete { max-width: 520px; margin: 20px auto 0; text-align: center; }
.import-complete-mark { width: 68px; height: 68px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 50%; color: var(--success); background: var(--success-soft); }
.import-result-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin: 26px 0 10px; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; }
.import-result-grid > div { min-height: 88px; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--line); }
.import-result-grid > div:last-child { border-right: 0; }
.import-result-grid strong { font-size: 25px; }
.import-result-grid span { color: var(--muted); font-size: 12px; }
.import-result-grid .failed strong { color: var(--danger); }
.import-candidates { display: grid; gap: 14px; }
.import-candidates article { padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.import-candidates article > div { display: flex; align-items: center; gap: 10px; }
.import-candidates article > div > span:last-child { display: flex; flex-direction: column; }
.import-candidates article small { color: var(--muted); }
.import-candidates article p { margin: 13px 0; }
.import-candidates article footer { display: flex; justify-content: flex-end; gap: 8px; }
.onboarding-draft { display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.onboarding-draft > input { width: 19px; min-height: 19px; }
.onboarding-draft > span { display: flex; flex-direction: column; }
.onboarding-draft small { color: var(--muted); }
.onboarding-draft p { margin: 10px 0 0; font-weight: 400; }
.criteria-checks { display: grid; gap: 9px; }
.criteria-checks label { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.criteria-checks input { width: 19px; min-height: 19px; flex: 0 0 auto; }
.checkbox-line { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.checkbox-line input { width: 19px; min-height: 19px; flex: 0 0 auto; margin-top: 2px; }
.overlay.review-drawer { width: min(580px, calc(100vw - 24px)); }
.overlay.comment-reply-drawer { width: min(580px, calc(100vw - 24px)); }
.review-drawer .overlay-heading { min-height: 92px; padding: 20px 24px; }
.review-drawer .overlay-body { padding: 12px 24px 22px; }
.review-drawer .overlay-footer { padding: 16px 24px; background: var(--surface); }
.review-form { display: grid; gap: 18px; }
.review-task-context { display: grid; gap: 8px; padding: 13px 14px; border-radius: 8px; background: var(--brand-soft); }
.review-task-context > span { min-width: 0; display: grid; grid-template-columns: 18px 68px minmax(0, 1fr) auto; align-items: center; gap: 7px; }
.review-task-context svg { color: var(--brand); }
.review-task-context small { color: var(--muted); font-size: 12px; }
.review-task-context strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.review-task-context em { color: var(--brand); font-size: 11px; font-style: normal; font-weight: 700; white-space: nowrap; }
.review-field { min-width: 0; display: grid; gap: 8px; }
.review-field > span:first-child, .review-evidence-section > header { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 750; }
.review-textarea-shell { display: grid; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); transition: border-color .18s ease, box-shadow .18s ease; }
.review-textarea-shell:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent); }
.review-textarea-shell textarea { min-height: 176px; padding: 13px 14px 4px; border: 0; border-radius: 0; resize: vertical; box-shadow: none; }
.review-textarea-shell textarea:focus { box-shadow: none; }
.review-result-toolbar { min-height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 10px 8px; }
.review-result-toolbar > small { color: var(--muted); font-size: 11px; }
.review-ai-button { min-height: 31px; display: inline-flex; align-items: center; gap: 6px; padding: 0 4px; color: var(--brand); font-size: 12px; font-weight: 750; }
.review-ai-button:disabled { color: var(--muted); cursor: not-allowed; opacity: .55; }
.review-ai-button[data-busy="true"] svg { animation: workspace-command-spin .9s linear infinite; }
.review-ai-confirm { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line)); background: var(--brand-soft); color: var(--muted); font-size: 11px; line-height: 1.5; }
.review-ai-confirm > span:first-child { min-width: 0; display: flex; align-items: flex-start; gap: 7px; }
.review-ai-confirm > span:first-child svg { flex: 0 0 auto; margin-top: 1px; color: var(--brand); }
.review-ai-confirm > span:last-child { display: flex; align-items: center; gap: 6px; }
.review-ai-confirm button { min-height: 29px; padding: 0 8px; border-radius: 6px; color: var(--muted); font-weight: 750; }
.review-ai-confirm button.is-primary { color: #fff; background: var(--brand); }
.review-evidence-section { display: grid; gap: 9px; }
.review-upload-zone { min-height: 52px; display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; gap: 2px 9px; padding: 9px 13px; border: 1px dashed var(--line-strong); border-radius: 8px; background: var(--surface-2); cursor: pointer; transition: border-color .18s ease, background-color .18s ease; }
.review-upload-zone:hover { border-color: var(--brand); background: var(--brand-soft); }
.review-upload-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.review-upload-zone svg { grid-row: 1 / 3; color: var(--brand); }
.review-upload-zone > span { font-size: 13px; font-weight: 750; }
.review-upload-zone small { color: var(--muted); font-size: 11px; }
.review-file-selection { display: grid; gap: 7px; }
.review-file-empty { margin: 0; color: var(--muted); font-size: 12px; }
.review-selected-file { min-height: 44px; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 7px 9px 7px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.review-selected-file > svg { color: var(--brand); }
.review-selected-file > span { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.review-selected-file strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.review-selected-file small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.review-selected-file .icon-button { width: 30px; height: 30px; color: var(--muted); }
.review-selected-file .icon-button:hover { color: var(--danger); background: var(--danger-soft); }
.review-evidence-note input { width: 100%; }
.review-evidence-note > small { color: var(--muted); font-size: 11px; font-weight: 400; }
.review-ai-consent { display: flex; align-items: flex-start; gap: 10px; padding-top: 2px; cursor: pointer; }
.review-ai-consent input { width: 18px; min-height: 18px; flex: 0 0 auto; margin-top: 2px; }
.review-ai-consent > span { display: grid; gap: 3px; }
.review-ai-consent strong { font-size: 12px; }
.review-ai-consent small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.comment-reply-drawer .overlay-body { padding: 16px 24px 22px; }
.comment-reply-layout { min-height: 100%; display: flex; flex-direction: column; gap: 20px; }
.comment-reply-source { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 11px; padding: 14px; border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line)); border-radius: 9px; background: color-mix(in srgb, var(--brand-soft) 42%, var(--surface)); }
.comment-reply-source > div, .comment-reply-row > div { min-width: 0; }
.comment-reply-source header, .comment-reply-row header { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.comment-reply-source time, .comment-reply-row time { margin-left: auto; color: var(--muted); font-size: 12px; }
.comment-reply-source p, .comment-reply-row p { margin: 4px 0 0; overflow-wrap: anywhere; }
.comment-mention { padding: 1px 4px; border-radius: 5px; color: var(--brand); background: var(--brand-soft); font-weight: 750; }
.comment-reply-thread { display: grid; gap: 8px; }
.comment-reply-thread > h3 { margin: 0; color: var(--muted); font-size: 13px; font-weight: 750; }
.comment-reply-thread > div { display: grid; gap: 8px; }
.comment-reply-row { min-height: 76px; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; margin-left: calc(var(--comment-depth, 0) * 14px); padding: 12px; border: 1px solid var(--line); border-radius: 9px; }
.comment-reply-row.is-nested { border-left: 2px solid color-mix(in srgb, var(--brand) 42%, var(--line)); }
.reply-context { color: var(--muted); font-size: 11px; }
.comment-reply-row .deleted-comment-copy { color: var(--muted); font-style: italic; }
.comment-reply-row .timeline-comment-actions { min-height: 26px; margin-top: 4px; font-size: 11px; }
#comment-reply-form { display: grid; gap: 8px; margin-top: auto; }
#comment-reply-form .field { margin: 0; }
#comment-reply-form textarea { min-height: 142px; resize: vertical; }
#comment-reply-form > small { color: var(--muted); font-size: 11px; }
.comment-reply-target { color: var(--muted); font-size: 12px; }
.comment-reply-target strong { color: var(--brand); }
.comment-mention-picker { width: fit-content; position: relative; }
.comment-mention-picker summary { min-height: 32px; display: inline-flex; align-items: center; gap: 5px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--brand); font-size: 12px; font-weight: 750; cursor: pointer; list-style: none; }
.comment-mention-picker summary::-webkit-details-marker { display: none; }
.comment-mention-picker > div { width: 220px; max-height: 190px; position: absolute; z-index: 2; bottom: 38px; left: 0; display: grid; gap: 2px; overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); box-shadow: var(--shadow); }
.comment-mention-picker button { min-height: 38px; display: flex; align-items: center; gap: 8px; padding: 5px 7px; border-radius: 6px; text-align: left; }
.comment-mention-picker button:hover { color: var(--brand); background: var(--brand-soft); }
.template-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.template-picker > span:first-child { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-weight: 700; }
.template-picker > small { color: var(--muted); }
.template-choice { display: inline-flex; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); }
.template-choice button { min-height: 36px; padding: 0 10px; }
.template-choice button + button { padding: 0 8px; color: var(--muted); border-left: 1px solid var(--line); }
.text-button { min-height: 36px; color: var(--brand); font-weight: 700; }
.comment-editor-actions,
.comment-editor-confirm {
  min-height: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.comment-editor-tool {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
}
.comment-editor-tool:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.comment-editor-tool.is-primary { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.comment-editor-tool:disabled { cursor: not-allowed; opacity: .42; }
.comment-ai-button[data-busy="true"] svg { animation: workspace-command-spin .9s linear infinite; }
.comment-editor-scope { color: var(--muted); font-size: 11px; }
.comment-editor-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--success);
  background: var(--success-soft);
  font-size: 11px;
  font-weight: 750;
}
.comment-editor-confirm {
  padding: 0 10px;
  border-radius: 7px;
  color: var(--text);
  background: var(--danger-soft);
  font-size: 12px;
  font-weight: 700;
}
.comment-editor-confirm .text-button { min-height: 32px; }
.execution-knowledge-list { display: grid; gap: 1px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--line); }
.execution-knowledge-item { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; background: var(--surface); }
.execution-knowledge-item > a { min-width: 0; min-height: 60px; display: grid; grid-template-columns: 24px minmax(0, 1fr) 18px; align-items: center; gap: 10px; padding: 10px 14px; }
.execution-knowledge-item > a:hover { background: var(--surface-2); }
.execution-knowledge-item > a span { min-width: 0; display: flex; flex-direction: column; }
.execution-knowledge-item > a strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.execution-knowledge-item small { color: var(--muted); }
.knowledge-link-action, .knowledge-link-state { min-height: 32px; display: inline-flex; align-items: center; gap: 5px; margin-right: 10px; padding: 0 9px; border-radius: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.knowledge-link-action { border: 1px solid var(--line); background: var(--surface); }
.knowledge-link-action:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.knowledge-link-state { color: var(--success); }
.execution-knowledge-feedback { min-height: 34px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; color: var(--muted); font-size: 12px; }
.execution-knowledge-feedback button { color: var(--brand); font-weight: 700; }
.knowledge-feedback-done { display: inline-flex; align-items: center; gap: 5px; color: var(--success); }
.lineage-empty { margin: 0; color: var(--muted); font-size: 12px; }
.menu-list { display: grid; }
.menu-list-heading { margin: 12px 12px 4px; color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .05em; }
.menu-list a, .menu-list button { min-height: 48px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border-radius: 7px; text-align: left; }
.menu-list a:hover, .menu-list button:hover { background: var(--surface-2); }
.danger-text { color: var(--danger); }
.toast { position: fixed; z-index: 120; top: max(18px, calc(env(safe-area-inset-top) + 8px)); bottom: auto; left: 50%; transform: translateX(-50%); display: flex; align-items: flex-start; gap: 9px; max-width: min(520px, calc(100vw - 32px)); padding: 12px 17px; border-radius: 9px; color: #fff; background: #0d7b69; box-shadow: 0 12px 30px rgba(14, 34, 72, .18); }
.toast svg { flex: 0 0 auto; margin-top: 2px; }
.toast span { min-width: 0; overflow-wrap: anywhere; }
.toast-info { background: #245eaa; }
.toast-warning { background: #945400; }
.toast-error { background: #b72c39; }
.empty-state { min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 28px; color: var(--muted); }
.empty-state svg { color: var(--line-strong); }
.empty-state h3 { margin: 12px 0 4px; color: var(--text); }
.empty-state p { max-width: 480px; }
.error-state svg { color: var(--danger); }

.auth-page { min-height: 100vh; display: grid; grid-template-columns: 42% 58%; }
.auth-brand { min-height: 100vh; display: flex; flex-direction: column; padding: 64px 68px; color: #f7f9ff; background: var(--navy); }
.auth-logo { display: flex; align-items: center; gap: 18px; font-size: 28px; }
.auth-logo img { width: 56px; }
.auth-promise { margin: auto 0; }
.auth-promise h1 { margin: 0; font-size: clamp(40px, 4vw, 60px); line-height: 1.45; letter-spacing: -.04em; }
.auth-promise h1 span { color: #13bbb8; background: linear-gradient(90deg, #1684ff, #13bbb8); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.auth-promise-copy { display: flex; flex-direction: column; gap: 8px; margin: 42px 0 0; color: #f7f9ff; font-size: clamp(14px, 1.25vw, 18px); line-height: 1.65; letter-spacing: -.015em; }
.auth-promise-copy span { white-space: nowrap; }
.auth-promise-copy em { color: #13bbb8; font-style: normal; }
.auth-brand > small { color: #9eb0cf; }
.auth-main { min-height: 100vh; display: grid; place-items: center; position: relative; padding: 40px; }
.auth-theme { position: absolute; top: 28px; right: 32px; }
.auth-card-wrap { width: min(510px, 100%); }
.auth-title { margin: 0 0 28px 52px; }
.auth-title h2 { margin: 0; font-size: 35px; }
.auth-title p { color: var(--muted); }
.auth-card { padding: 30px 34px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.auth-card .field { margin-bottom: 18px; }
.auth-method-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 22px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.auth-method-tabs button { min-height: 40px; border-radius: 7px; color: var(--muted); font-weight: 750; }
.auth-method-tabs button:hover { color: var(--text); }
.auth-method-tabs button.active { color: var(--brand); background: var(--surface); box-shadow: 0 1px 4px rgba(14, 34, 72, .1); }
.auth-password-grid { gap: 12px; }
.auth-password-grid .field { min-width: 0; }
.auth-credential-ready { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 9px; margin-bottom: 18px; padding: 11px 12px; border: 1px solid color-mix(in srgb, var(--success) 28%, var(--line)); border-radius: 8px; color: var(--success); background: var(--success-soft); }
.auth-credential-ready span { display: grid; gap: 2px; }
.auth-credential-ready small { color: var(--muted); }
.phone-input, .code-input { display: flex; }
.phone-input > span { min-width: 84px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-right: 0; border-radius: 9px 0 0 9px; font-weight: 750; }
.phone-input input { border-radius: 0 9px 9px 0; }
.code-input input { border-radius: 9px 0 0 9px; }
.code-input button { min-width: 132px; border: 1px solid var(--brand); border-radius: 0 9px 9px 0; color: var(--brand); font-weight: 700; }
.auth-switch { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 18px 0; color: var(--muted); }
.auth-switch button, .platform-link { color: var(--brand); font-weight: 750; }
.auth-separator { height: 1px; margin: 16px 0; background: var(--line); }
.platform-link { min-height: 38px; display: flex; align-items: center; justify-content: center; }
.auth-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.form-message { padding: 9px 12px; border-radius: 7px; }
.form-message.success { color: var(--success); background: var(--success-soft); }
.form-message.error { color: var(--danger); background: var(--danger-soft); }
.task-form-error:empty { display: none; }
.member-profile-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }

.notifications-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; }
.notification-page-toolbar { margin-bottom: 12px; }
.notification-filters { border-radius: 9px; }
.notification-filters button { min-width: 92px; min-height: 46px; }
.notification-feed { display: grid; align-content: start; gap: 16px; min-width: 0; }
.notification-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.notification-section-head { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.notification-section-head > div { display: flex; align-items: center; gap: 9px; }
.notification-section-head > div > span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 8px; color: var(--brand); background: var(--brand-soft); }
.notification-section-head h2 { margin: 0; font-size: 16px; }
.notification-section-head small { color: var(--muted); }
.notification-toolbar { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 20px; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.notification-row { min-height: 78px; display: grid; grid-template-columns: 42px 1fr 130px; align-items: center; gap: 12px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.notification-row.read { opacity: .68; }
.notification-row.unread { box-shadow: inset 3px 0 var(--brand); }
.notification-row:last-child { border-bottom: 0; }
.notification-row:hover { background: var(--surface-2); }
.notification-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; color: var(--brand); background: var(--brand-soft); }
.notification-row > span:nth-child(2) { display: flex; flex-direction: column; }
.notification-row small, .notification-row time { color: var(--muted); }
.execution-activity-row { box-shadow: none; }
.notification-section-empty { min-height: 96px; display: flex; align-items: center; gap: 12px; padding: 18px 20px; color: var(--muted); }
.notification-section-empty > svg { flex: 0 0 auto; color: var(--brand); }
.notification-section-empty strong { color: var(--text); }
.notification-section-empty p { margin: 3px 0 0; font-size: 12px; }
.notification-pagination { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 20px; color: var(--muted); background: var(--surface-2); }
.meeting-distribution-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.meeting-distribution-summary span { display: grid; gap: 2px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: var(--surface-2); }
.meeting-distribution-summary strong { color: var(--text); font-size: 18px; }
.meeting-match-reason { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 500; }
.meeting-role-match { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 10px; border: 1px dashed var(--line); border-radius: 10px; }
.meeting-role-match small { grid-column: 1 / -1; color: var(--muted); }
.member-position-fields { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.member-secondary-positions { border-top: 1px solid var(--line); padding-top: 10px; }
.member-secondary-positions > summary { cursor: pointer; color: var(--text); font-weight: 650; }
.member-secondary-positions .meeting-collaborator-grid { margin-top: 10px; max-height: 220px; overflow: auto; }
.settings-position-create { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.settings-position-groups { display: grid; gap: 8px; margin-top: 14px; }
.settings-position-groups > details { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.settings-position-groups > details > summary { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; cursor: pointer; background: var(--surface-2); font-weight: 650; }
.settings-position-groups > details > summary small { color: var(--muted); font-weight: 500; }
.settings-position-groups > details > div { display: grid; }
.settings-position-groups form { display: grid; grid-template-columns: minmax(120px, .7fr) minmax(180px, 1.3fr) auto auto; gap: 8px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--line); }
.notification-activity-section > summary { cursor: pointer; list-style: none; }
.notification-activity-section > summary::-webkit-details-marker { display: none; }
.notification-drawer-list { margin: -4px 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.notification-drawer-list .notification-row { grid-template-columns: 38px minmax(0, 1fr); min-height: 72px; padding: 10px 12px; }
.notification-drawer-list .notification-row time { grid-column: 2; font-size: 11px; }

@media (max-width: 1120px) {
  :root { --sidebar: 82px; }
  .brand strong, .global-search span, .global-search kbd, .main-nav span, .sidebar-user .user-menu > span:nth-child(2), .sidebar-user .user-menu svg { display: none; }
  .brand img { width: 52px; height: 52px; }
  .global-search { display: flex; justify-content: center; padding: 0; }
  .main-nav a { justify-content: center; padding: 0; }
  .user-menu { display: flex; justify-content: center; }
  .dashboard-grid, .knowledge-home-layout { grid-template-columns: 1fr; }
  .dashboard-support { grid-template-columns: 1fr 1fr; }
  .task-table { overflow-x: auto; }
  .task-table-head, .task-row { min-width: 1040px; }
  .project-table { overflow-x: auto; }
  .project-table-head, .project-row { min-width: 1000px; }
  .local-time, .theme-toggle button span { display: none; }
  .theme-toggle button { min-width: 44px; }
}

@media (max-width: 900px) and (min-width: 761px) {
  .filterbar { grid-template-columns: 1fr 1fr; }
  .filterbar .search-field { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  :root { --sidebar: 0px; }
  .meeting-distribution-summary, .settings-position-create, .settings-position-groups form { grid-template-columns: 1fr; }
  .meeting-role-match { grid-template-columns: 1fr; }
  .meeting-role-match small { grid-column: 1; }
  body { font-size: 14px; }
  .project-ai-processing-backdrop { padding: 16px; }
  .project-ai-processing-card { padding: 24px 18px; border-radius: 14px; }
  .project-ai-processing-card h2 { font-size: 21px; }
  .project-ai-processing-steps li { padding: 10px 4px; }
  .app-shell { padding-left: 0; padding-bottom: 68px; }
  .sidebar { display: none; }
  .workspace-command-backdrop { padding: 0; }
  .workspace-command-dialog { width: 100%; height: 100%; max-height: none; border: 0; border-radius: 0; }
  .workspace-command-searchbar { grid-template-columns: auto minmax(0, 1fr) 112px; padding: 11px 12px; }
  .workspace-command-searchbar > kbd { display: none; }
  .workspace-command-dialog > footer { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .workspace-command-dialog > footer span:last-child { display: none; }
  .topbar { width: 100%; min-height: 78px; padding: 12px 16px; position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(12px); }
  .title-block h1 { font-size: 22px; }
  .title-block p { font-size: 12px; margin-top: 2px; }
  .top-actions { gap: 2px; }
  .top-actions .icon-text, .top-actions .theme-toggle, .top-actions > .button { display: none; }
  .notification-button { display: inline-flex; }
  .page-content { width: 100%; margin: 14px 0 32px; padding: 0 14px; }
  .page-action-bar .button { width: 100%; }
  .list-view-toolbar { align-items: stretch; flex-direction: column; gap: 10px; }
  .bottom-nav { position: fixed; z-index: 50; inset: auto 0 0; min-height: 66px; display: grid; grid-template-columns: repeat(var(--bottom-items, 5), 1fr); padding: 5px 5px calc(5px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
  .mobile-create { position: fixed; z-index: 55; right: 16px; bottom: 78px; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #0964dd; box-shadow: var(--shadow); }
  .bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: 11px; }
  .bottom-nav .active { color: var(--brand); }
  .dashboard-grid, .dashboard-support, .knowledge-home-layout, .detail-layout, .knowledge-detail-layout, .ask-layout, .draft-queue-layout, .draft-review-layout, .memo-layout, .settings-layout, .member-detail-layout, .tenant-detail-layout, .notifications-layout { grid-template-columns: 1fr; }
  .storage-overview-head, .storage-actions { align-items: stretch; flex-direction: column; }
  .storage-breakdown { grid-template-columns: 1fr 1fr; }
  .storage-breakdown > div:nth-child(2n) { border-inline-end: 0; }
  .storage-breakdown > div:nth-child(-n+4) { border-bottom: 1px solid var(--line); }
  .storage-breakdown > div:last-child { grid-column: 1 / -1; border-inline-end: 0; }
  .storage-actions .button, .storage-admin-form .button { width: 100%; }
  .storage-admin-form { grid-template-columns: 1fr; }
  .storage-plan-list > div { align-items: flex-start; flex-direction: column; }
  .storage-plan-list span { text-align: left; }
  .dashboard-support { display: none; }
  .workspace-guide { align-items: flex-start; flex-direction: column; gap: 7px; margin: 0 2px 14px; }
  .workspace-guide p { width: 100%; justify-content: space-between; gap: 5px; font-size: 12px; }
  .panel { padding: 16px; }
  .panel-heading { margin-bottom: 10px; padding-bottom: 10px; }
  .hero-task > h2 { font-size: 24px; }
  .hero-badges { margin-bottom: 10px; }
  .task-facts { display: grid; grid-template-columns: 1fr 1fr; }
  .task-facts > span { min-width: 0; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .hero-actions .primary { grid-column: 1 / -1; min-width: 0; }
  .hero-actions .ghost:last-child { display: none; }
  .section-label { margin-top: 16px; }
  .task-table.compact, .task-table { border: 0; overflow: visible; }
  .project-table { border: 0; overflow: visible; }
  .task-table-head { display: none !important; }
  .task-table .task-row, .task-table.compact .task-row, .task-table.simple .task-row { min-width: 0; min-height: 126px; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main status" "person time" "risk action"; gap: 8px 12px; padding: 14px 0; border-top: 1px solid var(--line); }
  .task-row .task-main { grid-area: main; }
  .task-row .person { grid-area: person; }
  .task-row .reviewer, .task-row .more-button { display: none; }
  .task-row time { grid-area: time; text-align: right; color: var(--muted); }
  .task-row .task-status { grid-area: status; text-align: right; }
  .task-row .risk { grid-area: risk; }
  .task-row .row-action { grid-area: action; text-align: right; }
  .task-table.compact .row-action { display: inline-flex; justify-self: end; }
  .project-table-head { display: none; }
  .project-row { min-width: 0; min-height: 156px; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "main status" "owner priority" "period progress" ". action"; gap: 9px 12px; padding: 14px 0; border-top: 1px solid var(--line); }
  .project-row .project-main { grid-area: main; }
  .project-row .person { grid-area: owner; }
  .project-row .project-period { grid-area: period; }
  .project-row > span:nth-child(4) { grid-area: progress; text-align: right; }
  .project-row > span:nth-child(5) { grid-area: priority; text-align: right; }
  .project-row > span:nth-child(6) { grid-area: status; text-align: right; }
  .project-row .row-action { grid-area: action; text-align: right; }
  .segmented-tabs { width: 100%; border-radius: 9px; }
  .segmented-tabs button { min-width: 0; flex: 1; padding: 0 6px; min-height: 48px; }
  .list-panel { margin-top: 10px; padding: 16px; border-radius: var(--radius); }
  .task-list-controls { grid-template-columns: 1fr; margin-bottom: 16px; }
  .task-more-filters > summary { width: 100%; }
  .task-more-filters > div { width: 100%; position: static; margin-top: 10px; box-shadow: none; }
  .filterbar { grid-template-columns: 1fr; margin-bottom: 14px; }
  .filterbar select { display: block; }
  .filterbar .button { display: inline-flex; }
  .priority-strip { align-items: center; flex-wrap: wrap; }
  .priority-strip > span:first-of-type { flex: 1 1 calc(100% - 34px); min-width: 0; }
  .priority-strip .button { margin-left: auto; }
  .detail-title { padding: 20px; }
  .detail-title h1, .detail-title h2 { font-size: 24px; }
  .topbar-back-button { min-height: 44px; padding: 0 13px; }
  .detail-facts { grid-template-columns: 1fr 1fr; }
  .detail-facts > div { min-height: 78px; border-bottom: 1px solid var(--line); }
  .detail-section { padding: 20px; }
  .detail-section-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .project-milestone-row { grid-template-columns: 28px minmax(0, 1fr) 108px; padding-inline: 10px; }
  .milestone-status-control { width: 108px; }
  .timeline-entry-body header time { width: 100%; margin-inline-start: 0; }
  .linked-project { padding: 10px 20px; }
  .detail-aside { display: none; }
  .project-mobile-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
  .project-member-picker, .task-assignee-picker, .form-grid { grid-template-columns: 1fr; }
  .project-priority-field { grid-column: auto; }
  .project-member-summary .project-member-chip:nth-child(n+2) { display: none; }
  .knowledge-home-search { min-height: 0; grid-template-columns: 24px minmax(0, 1fr); gap: 8px 10px; padding: 18px; }
  .knowledge-home-search input { min-height: 44px; font-size: 15px; }
  .knowledge-home-search .button { width: 100%; grid-column: 1 / -1; }
  .knowledge-home-layout { margin-top: 12px; }
  .knowledge-home-panel > header { min-height: 58px; padding: 0 16px; }
  .knowledge-home-head { display: none; }
  .knowledge-home-row { min-height: 82px; grid-template-columns: minmax(0, 1fr) auto 18px; gap: 8px; padding: 12px 16px; }
  .knowledge-home-row .knowledge-home-owner, .knowledge-home-row time { display: none; }
  .knowledge-home-document { grid-template-columns: 28px minmax(0, 1fr); gap: 8px; }
  .knowledge-review-section { padding: 14px 16px 8px; }
  .ask-box { flex-direction: column; }
  .ask-box .button { width: 100%; }
  .knowledge-toolbar { align-items: stretch; flex-direction: column; }
  .knowledge-toolbar > .button { margin-top: 10px; }
  .knowledge-library-toolbar { align-items: stretch; flex-direction: column; }
  .knowledge-library-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .knowledge-library-actions .button { width: 100%; }
  .knowledge-filterbar { grid-template-columns: 1fr; }
  .knowledge-selection-bar { align-items: stretch; flex-direction: column; }
  .knowledge-selection-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .knowledge-selection-actions .button { width: 100%; }
  .knowledge-selection-actions .danger-outline:last-child:nth-child(3) { grid-column: 1 / -1; }
  .knowledge-table { border: 0; }
  .knowledge-head { display: none; }
  .knowledge-row, .knowledge-table.compact .knowledge-row { min-height: 88px; display: grid; grid-template-columns: 1fr auto auto; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
  .knowledge-table.selectable .knowledge-row { min-height: 96px; grid-template-columns: 32px minmax(0, 1fr) auto; padding: 12px 0; }
  .knowledge-table.selectable .knowledge-selector { grid-row: 1 / 3; }
  .knowledge-row > span:nth-of-type(2), .knowledge-row > span:nth-of-type(3), .knowledge-row time { display: none; }
  .knowledge-pagination { grid-template-columns: 1fr; justify-items: center; padding-top: 18px; }
  .knowledge-pagination > label { justify-content: center; }
  .document-heading { padding: 24px 20px 18px; }
  .document-heading h2 { font-size: 25px; }
  .document-body { padding: 22px 20px; }
  .document-footer { padding: 16px 20px; flex-direction: column; gap: 7px; }
  .knowledge-aside, .ask-aside, .draft-queue-layout aside, .draft-review-layout aside, .memo-layout aside { display: none; }
  .knowledge-detail-layout .knowledge-aside { display: grid; }
  .knowledge-detail-layout .knowledge-info-panel { display: none; }
  .ask-main, .draft-editor, .draft-queue { padding: 20px 16px; }
  .onboarding-hero-primary { margin-top: 24px; text-align: left; }
  .onboarding-hero-primary h2 { font-size: clamp(32px, 9vw, 44px); }
  .onboarding-hero-primary p { font-size: 15px; }
  .onboarding-steps { grid-template-columns: 1fr; margin-top: 30px; }
  .onboarding-steps li + li { border-top: 1px solid var(--line); border-left: 0; }
  .onboarding-steps li > svg:last-child { transform: rotate(90deg); }
  .onboarding-steps li:last-child > svg:last-child { transform: none; }
  .onboarding-primary-action .button { width: 100%; min-width: 0; }
  .onboarding-primary-action > small { align-items: flex-start; }
  .onboarding-alternatives { margin-top: 38px; }
  .onboarding-options { grid-template-columns: 1fr; }
  .onboarding-options > a, .onboarding-options > button { padding: 18px 8px; }
  .onboarding-options > * + * { border-top: 1px solid var(--line); border-left: 0; }
  .onboarding-note { margin-top: 28px; }
  .review-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .review-actions .primary { grid-column: 1 / -1; grid-row: 1; }
  .member-summary, .platform-metrics { grid-template-columns: repeat(3, 1fr); padding: 16px; }
  .member-summary p, .platform-metrics p { grid-column: 1 / -1; }
  .member-table, .tenant-table { border: 0; }
  .member-head, .tenant-head { display: none; }
  .member-row, .tenant-row { min-height: 90px; display: grid; grid-template-columns: 1fr auto; padding: 12px; border-top: 1px solid var(--line); }
  .member-row > span, .member-row > strong, .member-row time, .tenant-row > span:nth-child(n+3), .tenant-row > strong, .tenant-row time { display: none; }
  .member-edit-link { min-width: 64px; }
  .settings-nav { display: flex; overflow-x: auto; }
  .settings-nav a { white-space: nowrap; }
  .form-grid { grid-template-columns: 1fr; }
  .template-picker { align-items: stretch; }
  .template-choice { width: 100%; }
  .template-choice button:first-child { flex: 1; text-align: left; }
  .notification-row { grid-template-columns: 38px minmax(0, 1fr); padding: 10px 14px; }
  .notification-row time { grid-column: 2; }
  .overlay { width: 100%; max-width: none; }
  .overlay.import-drawer { width: 100%; }
  .overlay.modal { width: calc(100% - 24px); }
  .overlay.menu-overlay { width: calc(100% - 28px); }
  .overlay-footer { padding: 12px 16px max(12px, env(safe-area-inset-bottom)); }
  .import-stepper { margin-bottom: 18px; }
  .import-stepper small { font-size: 10px; }
  .import-flow-body { min-height: 0; }
  .import-list-heading, .import-review-heading { align-items: stretch; flex-direction: column; }
  .import-scope-summary > div { grid-template-columns: 1fr; gap: 3px; }
  .import-scope-summary strong { padding-left: 28px; text-align: left; }
  .import-candidate-heading { align-items: flex-start; }
  .import-candidate-heading > label { flex: 1; }
  .import-result-grid { grid-template-columns: 1fr 1fr; }
  .import-result-grid > div:nth-child(2) { border-right: 0; }
  .import-result-grid > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .memo-footer-tools { display: grid; grid-template-columns: 1fr 1fr; }
  .memo-footer-tools .button { width: 100%; }
  .memo-footer-tools .button:nth-child(3):last-child { grid-column: 1 / -1; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-brand { min-height: auto; padding: 24px 22px; }
  .auth-logo { font-size: 22px; }
  .auth-logo img { width: 44px; }
  .auth-promise, .auth-brand > small { display: none; }
  .auth-main { min-height: calc(100vh - 92px); padding: 82px 16px 24px; place-items: start center; }
  .auth-theme { top: 18px; right: 16px; }
  .auth-title { margin: 0 0 18px; }
  .auth-title h2 { font-size: 28px; }
  .auth-card { padding: 22px 18px; box-shadow: none; }
  .auth-password-grid { grid-template-columns: 1fr; gap: 0; }
  .member-profile-actions { display: grid; }
  .member-profile-actions .button { width: 100%; }
  .toast { top: max(12px, calc(env(safe-area-inset-top) + 8px)); }
}

/* Knowledge AI conversation and source-grounded import review */
.main-area:has(.knowledge-home-hero) .topbar,
.main-area:has(.knowledge-home-hero) .page-content { width: calc(100% - 48px); }
.main-area:has(.knowledge-home-hero) .topbar { min-height: 94px; }
.main-area:has(.knowledge-home-hero) .page-content { margin-top: 14px; }
.knowledge-home-hero {
  min-height: 99px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 8px 4px 12px;
}
.knowledge-home-hero-copy h2 { margin: 0 0 11px; font-size: 34px; line-height: 1.12; letter-spacing: -.04em; }
.knowledge-home-hero-copy p { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; color: var(--muted); font-size: 13px; }
.knowledge-home-hero-copy p > svg { color: var(--brand); }
.knowledge-home-hero-copy p i { width: 3px; height: 3px; border-radius: 50%; background: color-mix(in srgb, var(--muted) 68%, transparent); }
.knowledge-home-primary-actions { display: flex; align-items: center; gap: 15px; flex: 0 0 auto; }
.knowledge-home-primary-actions .button { min-height: 50px; padding-inline: 15px; border-radius: 8px; }
.knowledge-home-menu { position: relative; }
.knowledge-home-menu > summary { gap: 7px; min-width: 136px; cursor: pointer; list-style: none; }
.knowledge-home-menu > summary::-webkit-details-marker { display: none; }
.knowledge-home-menu[open] > summary { border-color: color-mix(in srgb, var(--brand) 52%, var(--line)); color: var(--brand); }
.knowledge-home-menu[open] > summary svg:last-child { transform: rotate(180deg); }
.knowledge-home-menu-popover {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  width: 250px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 18px 48px color-mix(in srgb, var(--text) 14%, transparent);
}
.knowledge-home-menu-popover a,
.knowledge-home-menu-popover button,
.knowledge-home-menu-note {
  display: grid;
  min-height: 56px;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  text-align: left;
  text-decoration: none;
}
.knowledge-home-menu-popover a:hover,
.knowledge-home-menu-popover button:hover { background: var(--surface-2); }
.knowledge-home-menu-popover > * > svg { color: var(--brand); }
.knowledge-home-menu-popover span { display: grid; gap: 3px; }
.knowledge-home-menu-popover strong { font-size: 12px; }
.knowledge-home-menu-popover small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.knowledge-home-menu-note { margin-top: 3px; border-top: 1px solid var(--line); border-radius: 0; color: var(--muted); }
.knowledge-ai-conversation {
  --knowledge-user-message-width: 20%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  height: clamp(500px, calc(100dvh - 212px), 730px);
  min-height: 0;
  margin-bottom: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.knowledge-ai-conversation .team-ai-thread { display: flex; min-width: 0; flex-direction: column; }
.knowledge-ai-conversation .team-ai-thread {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 12px 32px color-mix(in srgb, var(--text) 4%, transparent);
}
.knowledge-ai-conversation .team-ai-thread-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 50px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.knowledge-ai-conversation .team-ai-thread-head > div:first-child {
  display: grid;
  grid-template-columns: 8px auto;
  align-items: center;
  gap: 2px 8px;
}
.knowledge-ai-conversation .team-ai-thread-head strong { font-size: 13px; }
.knowledge-ai-conversation .team-ai-thread-head small { grid-column: 2; color: var(--muted); font-size: 11px; }
.team-ai-online-dot { width: 8px; height: 8px; border-radius: 50%; background: #19c894; box-shadow: 0 0 0 4px rgba(25, 200, 148, .1); }
.knowledge-conversation-tools {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.knowledge-conversation-tools select {
  width: 872px;
  min-width: 0;
  max-width: 872px;
  flex: 1 1 872px;
  min-height: 36px;
  padding: 0 36px 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-color: var(--surface);
  color: var(--text);
  font-size: 12px;
}
.team-ai-quiet-button {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 36px;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.knowledge-ai-conversation .team-ai-thread-scroll {
  display: flex;
  flex: 1;
  flex-direction: column;
  overflow: auto;
  min-height: 0;
  max-height: none;
  padding: 20px 18px 16px;
}
.knowledge-ai-conversation .team-ai-message-list { display: grid; gap: 0; }
.knowledge-ai-conversation .team-ai-message {
  display: grid;
  width: 100%;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 13px;
  max-width: none;
}
.knowledge-ai-conversation .team-ai-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 900;
}
.knowledge-ai-conversation .team-ai-avatar.user-avatar {
  border: 1px solid color-mix(in srgb, var(--brand) 34%, var(--line));
  background: color-mix(in srgb, var(--brand) 10%, var(--surface));
  color: var(--brand);
}
.knowledge-ai-conversation .team-ai-avatar.assistant-avatar {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--brand) 24%, transparent);
}
.knowledge-ai-conversation .team-ai-message-body { min-width: 0; }
.knowledge-ai-conversation .team-ai-message-body > header {
  display: flex;
  min-height: 28px;
  align-items: center;
  gap: 10px;
}
.knowledge-ai-conversation .team-ai-message-body > header strong { font-size: 13px; }
.knowledge-dialogue-turn {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.knowledge-dialogue-turn + .knowledge-dialogue-turn { padding-top: 24px; }
.knowledge-dialogue-turn:last-child { padding-bottom: 0; border-bottom: 0; }
.knowledge-ai-conversation .team-ai-message.is-user {
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: start;
}
.knowledge-ai-conversation .team-ai-message.is-user .team-ai-message-body > header { justify-content: flex-end; }
.knowledge-ai-conversation .team-ai-message.is-user .team-ai-avatar { grid-column: 2; }
.knowledge-user-bubble {
  width: var(--knowledge-user-message-width);
  margin-left: auto;
  padding: 13px 15px;
  border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--line));
  border-radius: 9px 3px 9px 9px;
  background: color-mix(in srgb, var(--brand) 7%, var(--surface));
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.knowledge-user-meta {
  display: flex;
  width: var(--knowledge-user-message-width);
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-left: auto;
  min-height: 32px;
  padding-top: 5px;
}
.knowledge-user-meta button,
.knowledge-answer-actions button,
.knowledge-answer-state button {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.knowledge-user-meta button:hover,
.knowledge-answer-actions button:hover,
.knowledge-answer-state button:hover,
.knowledge-answer-actions button.is-active,
.knowledge-answer-state button.is-active {
  background: var(--brand-soft);
  color: var(--brand);
}
.knowledge-user-meta time { color: var(--muted); font-size: 11px; }
.knowledge-ai-conversation .team-ai-message.is-assistant { margin-top: 22px; }
.knowledge-ai-conversation .team-ai-message.is-assistant .team-ai-message-body > header { margin-bottom: 8px; }
.knowledge-ai-conversation .team-ai-avatar.assistant-avatar > svg { color: #fff; }
.knowledge-ai-conversation .team-ai-answer-copy { display: grid; gap: 14px; }
.knowledge-answer-source-link {
  color: var(--brand);
  font-weight: 700;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--brand) 48%, transparent);
  text-underline-offset: 3px;
}
.knowledge-answer-source-link:hover { color: var(--brand-strong); text-decoration-color: currentColor; }
.knowledge-answer-source-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 3px; }
.knowledge-ai-response-state {
  display: grid;
  min-height: 76px;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}
.knowledge-ai-response-state strong { display: block; font-size: 13px; }
.knowledge-ai-response-state p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.knowledge-ai-response-state.is-error > svg { color: var(--danger); }
.knowledge-ai-thinking-dots { display: inline-flex; width: 34px; align-items: center; justify-content: center; gap: 4px; }
.knowledge-ai-thinking-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  animation: knowledge-thinking-dot 1.1s ease-in-out infinite;
}
.knowledge-ai-thinking-dots i:nth-child(2) { animation-delay: 140ms; }
.knowledge-ai-thinking-dots i:nth-child(3) { animation-delay: 280ms; }
.knowledge-ai-response-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.knowledge-ai-response-actions button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
}
.knowledge-ai-response-actions button:first-child { border-color: var(--brand); background: var(--brand); color: #fff; }
.team-ai-online-dot.is-busy { animation: knowledge-online-pulse 1.4s ease-out infinite; }
.knowledge-ai-streaming-answer {
  min-height: 76px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.75;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.knowledge-ai-streaming-answer > i {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  margin-inline-start: 3px;
  translate: 0 2px;
  background: var(--brand);
  animation: knowledge-stream-caret .8s steps(1, end) infinite;
}
.knowledge-ai-status-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.knowledge-answer-section {
  padding-left: 0;
  border-left: 0;
}
.knowledge-answer-section h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 5px; color: var(--text); font-size: 13px; }
.knowledge-answer-section h4 > svg { flex: 0 0 auto; color: var(--brand); }
.knowledge-answer-section.is-action h4 > svg { color: #19b979; }
.knowledge-answer-section.is-uncertain h4 > svg { color: #f59e0b; }
.knowledge-answer-section p { margin: 0; color: var(--text); font-size: 13px; line-height: 1.75; }
.knowledge-answer-sources {
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-2) 58%, var(--surface));
}
.knowledge-answer-sources > header {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}
.knowledge-answer-sources > header > div { display: inline-flex; align-items: center; gap: 7px; }
.knowledge-answer-sources > header svg { color: var(--brand); }
.knowledge-answer-sources > header strong { font-size: 12px; }
.knowledge-answer-sources > header > span { color: var(--muted); font-size: 10px; }
.knowledge-answer-source-list { display: grid; }
.knowledge-answer-source { min-width: 0; padding: 13px 14px; background: var(--surface); }
.knowledge-answer-source + .knowledge-answer-source { border-top: 1px solid var(--line); }
.knowledge-answer-source-heading { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: start; gap: 9px; }
.knowledge-answer-source-heading > span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 7px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 10px;
  font-weight: 900;
}
.knowledge-answer-source-heading > div { display: grid; min-width: 0; gap: 2px; }
.knowledge-answer-source-heading strong { overflow-wrap: anywhere; font-size: 12px; }
.knowledge-answer-source-heading small { color: var(--muted); font-size: 10px; }
.knowledge-answer-source blockquote {
  margin: 9px 0 0 37px;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}
.knowledge-answer-source-files { display: grid; gap: 7px; margin: 10px 0 0 37px; }
.knowledge-source-file {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}
.knowledge-source-file > span:first-child { display: grid; min-width: 0; grid-template-columns: 20px minmax(0, 1fr); align-items: center; gap: 7px; }
.knowledge-source-file > span:first-child > svg { color: var(--brand); }
.knowledge-source-file > span:first-child > span { display: grid; min-width: 0; gap: 2px; }
.knowledge-source-file strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.knowledge-source-file small { color: var(--muted); font-size: 9px; }
.knowledge-source-file > span:last-child { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 4px; color: var(--brand); font-size: 10px; font-weight: 800; }
button.knowledge-source-file:hover { border-color: color-mix(in srgb, var(--brand) 38%, var(--line)); background: var(--brand-soft); }
.knowledge-source-file.is-unavailable { justify-content: flex-start; color: var(--muted); }
.knowledge-source-entry-link { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-size: 11px; font-weight: 800; text-decoration: none; }
.knowledge-answer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.knowledge-answer-actions,
.knowledge-answer-state { display: flex; align-items: center; gap: 2px; }
.knowledge-answer-state { justify-content: flex-end; }
.knowledge-answer-state .team-ai-answer-status { margin-right: 4px; white-space: nowrap; }
.team-ai-answer-status {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}
.team-ai-answer-status.is-success { border-color: rgba(25, 200, 148, .24); background: rgba(25, 200, 148, .1); color: #0d8b69; }
.team-ai-answer-status.is-warning { border-color: rgba(247, 166, 57, .26); background: rgba(247, 166, 57, .11); color: #bd6b00; }
.team-ai-answer-status:disabled { cursor: default; opacity: 1; }
.knowledge-ai-conversation .qa-composer.team-ai-composer {
  position: sticky;
  z-index: 4;
  bottom: 0;
  display: block;
  margin: 0 18px 18px;
  padding: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--line));
  border-radius: 9px;
  background: var(--surface);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--text) 5%, transparent);
}
.knowledge-ai-conversation .qa-composer.team-ai-composer textarea {
  width: 100%;
  min-height: 40px;
  max-height: 116px;
  padding: 10px 8px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  resize: vertical;
}
.team-ai-composer-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 116px;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 6px;
}
.knowledge-ai-conversation .qa-composer.team-ai-composer select,
.knowledge-scope-static {
  min-width: 108px;
  min-height: 38px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background-color: transparent;
  color: var(--text);
  font-size: 12px;
}
.knowledge-scope-static { display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; }
.knowledge-ai-conversation .team-ai-send-button {
  display: inline-flex;
  width: 116px;
  height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  transition: background-color .16s ease, color .16s ease;
}
.team-ai-send-shortcut { white-space: nowrap; font-size: 11px; font-weight: 800; }
.knowledge-ai-conversation .team-ai-send-button:disabled { cursor: not-allowed; background: var(--surface-3); color: var(--muted); opacity: 1; }
.knowledge-ai-conversation .team-ai-send-button:disabled[data-busy="true"] { cursor: wait; background: var(--brand); color: #fff; opacity: .72; }
.knowledge-ai-conversation .team-ai-send-button:disabled[data-busy="true"] svg { animation: knowledge-send-spin .9s linear infinite; }
.knowledge-ai-conversation .qa-composer.team-ai-composer textarea:disabled { cursor: wait; color: var(--muted); }
.knowledge-ai-conversation .knowledge-conversation-tools :disabled { cursor: wait; opacity: .56; }
.team-ai-source-index { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 7px; background: var(--brand-soft); color: var(--brand); font-size: 10px; font-weight: 900; }
.team-ai-source-content { display: grid; gap: 2px; min-width: 0; }
.team-ai-source-content small { color: var(--muted); font-size: 10px; }
.team-ai-source-content strong { font-size: 11px; }
.team-ai-source-content > span { overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.4; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }
.knowledge-ai-conversation .team-ai-message-body > header span { color: var(--muted); }
.knowledge-ai-conversation .team-ai-capabilities svg,
.knowledge-ai-conversation .team-ai-suggestions svg { flex: 0 0 auto; }
.team-ai-welcome { display: grid; max-width: 620px; margin: auto; justify-items: center; padding: 30px 18px; text-align: center; }
.team-ai-welcome-icon { display: grid; width: 54px; height: 54px; place-items: center; margin-bottom: 12px; border-radius: 15px; background: var(--brand); color: #fff; }
.team-ai-welcome h2 { margin: 0; font-size: 23px; }
.team-ai-welcome > p:not(.knowledge-kicker) { max-width: 56ch; margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
.team-ai-capabilities { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.team-ai-capabilities span { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 10px; }
.team-ai-suggestions { display: grid; gap: 8px; margin-top: auto; padding-top: 18px; }
.team-ai-suggestions > span { color: var(--muted); font-size: 10px; font-weight: 800; }
.team-ai-suggestions > div { display: flex; flex-wrap: wrap; gap: 8px; }
.team-ai-suggestions button { display: inline-flex; min-height: 34px; align-items: center; gap: 5px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 11px; }
.knowledge-ai-conversation .knowledge-web-disclosure {
  margin-top: 0;
  border-color: color-mix(in srgb, var(--brand) 22%, var(--line));
  background: color-mix(in srgb, var(--brand) 6%, var(--surface));
}
.overlay.source-preview-drawer { width: min(760px, calc(100vw - 24px)); }
.overlay.knowledge-sources-drawer { width: min(430px, calc(100vw - 24px)); }
.overlay-backdrop:has(.knowledge-sources-drawer) { background: color-mix(in srgb, #071023 12%, transparent); backdrop-filter: none; }
.knowledge-drawer-source-list { display: grid; }
.knowledge-drawer-source {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}
.knowledge-drawer-source:hover { color: var(--brand); }
.knowledge-drawer-source .team-ai-source-content { gap: 4px; }
.knowledge-drawer-source .team-ai-source-content strong { font-size: 12px; }
.knowledge-drawer-source .team-ai-source-content > span { line-height: 1.6; -webkit-line-clamp: 4; }
.knowledge-drawer-note { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 9px; margin-top: 16px; padding: 12px; border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line)); border-radius: 8px; background: var(--brand-soft); }
.knowledge-drawer-note > svg { color: var(--brand); }
.knowledge-drawer-note strong { display: block; font-size: 12px; }
.knowledge-drawer-note p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.knowledge-source-preview { min-height: 100%; }
.knowledge-source-pdf { display: block; width: 100%; min-height: calc(100vh - 220px); border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.knowledge-source-text { display: grid; gap: 10px; }
.knowledge-source-text pre {
  min-height: calc(100vh - 270px);
  margin: 0;
  padding: 18px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font: 13px/1.8 var(--font-sans);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.knowledge-source-text > p { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--muted); font-size: 11px; }
body[data-theme="dark"] .knowledge-ai-conversation,
body[data-theme="dark"] .knowledge-ai-conversation .team-ai-thread,
body[data-theme="dark"] .knowledge-ai-conversation .team-ai-thread-head { background: transparent; }
body[data-theme="dark"] .knowledge-ai-conversation .team-ai-thread,
body[data-theme="dark"] .knowledge-ai-conversation .team-ai-thread-head,
body[data-theme="dark"] .knowledge-ai-conversation .qa-composer.team-ai-composer { background: #09142c; }
body[data-theme="dark"] .knowledge-user-bubble { background: #0b1936; }

@media (max-width: 1180px) {
  .platform-admin-shell { padding-left: 210px; }
  .platform-admin-sidebar { width: 210px; padding-inline: 14px; }
  .platform-admin-header, .platform-admin-content { width: min(100% - 36px, 1240px); }
  .platform-admin-header .local-time { display: none; }
  .platform-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .platform-risk-queue { grid-template-columns: 1fr; }
  .platform-risk-item { border-right: 0; border-bottom: 1px solid var(--line); }
  .platform-risk-item:last-child { border-bottom: 0; }
  .platform-tenant-table { overflow-x: auto; }
  .platform-tenant-head, .platform-tenant-row { min-width: 1020px; }
}

@media (max-width: 760px) {
  .platform-admin-shell { padding: 0 0 68px; }
  .platform-admin-sidebar { display: none; }
  .platform-admin-header { width: 100%; min-height: 82px; position: sticky; z-index: 20; top: 0; padding: 12px 16px; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(12px); }
  .platform-admin-header .title-block > small, .platform-admin-header .title-block p { display: none; }
  .platform-admin-header .title-block h1 { font-size: 22px; }
  .platform-admin-header .top-actions { gap: 2px; }
  .platform-admin-header .icon-text { display: none; }
  .platform-admin-header .theme-toggle button { min-width: 38px; }
  .platform-admin-header .theme-toggle button span { display: none; }
  .platform-admin-content { width: 100%; margin: 14px 0 26px; padding: 0 14px; }
  .platform-admin-bottom-nav { position: fixed; z-index: 50; inset: auto 0 0; min-height: 66px; display: grid; grid-template-columns: repeat(3, 1fr); padding: 5px 5px calc(5px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
  .platform-admin-bottom-nav a, .platform-admin-bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: 11px; }
  .platform-admin-bottom-nav a.active { color: var(--brand); }
  .platform-priority-heading { min-height: 0; align-items: flex-start; padding: 20px; }
  .platform-priority-heading > div { align-items: flex-start; gap: 12px; }
  .platform-priority-heading > a { display: none; }
  .platform-priority-index { min-width: 48px; font-size: 35px; }
  .platform-priority h2 { font-size: 20px; }
  .platform-priority p { font-size: 12px; }
  .platform-risk-item { grid-template-columns: 28px minmax(0, 1fr) auto; padding-inline: 14px; }
  .platform-risk-item > svg { display: none; }
  .platform-priority-clear { grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 20px; }
  .platform-priority-clear .platform-priority-mark { width: 46px; height: 46px; }
  .platform-priority-clear .button { grid-column: 1 / -1; }
  .platform-kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
  .platform-kpi { min-height: 140px; grid-template-columns: 34px 1fr; padding: 15px 12px; }
  .platform-kpi-icon { width: 34px; height: 34px; }
  .platform-kpi strong { font-size: 20px; }
  .platform-kpi p { font-size: 10px; }
  .platform-overview-grid { grid-template-columns: 1fr; margin-top: 12px; }
  .platform-data-panel { min-height: 0; padding-inline: 16px; }
  .platform-data-footnote { align-items: flex-start; flex-wrap: wrap; }
  .platform-data-footnote time { width: 100%; margin-left: 23px; }
  .platform-tenant-toolbar { grid-template-columns: 1fr; padding: 14px; }
  .platform-tenant-result { align-items: flex-start; flex-direction: column; gap: 2px; padding: 10px 14px; }
  .platform-tenant-head { display: none; }
  .platform-tenant-table { overflow: visible; padding: 0 12px; }
  .platform-tenant-row { min-width: 0; min-height: 148px; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto auto; gap: 10px; padding: 14px 2px; }
  .platform-tenant-row > span:nth-child(2) { align-items: flex-end; }
  .platform-tenant-row > span:nth-child(3), .platform-tenant-row > span:nth-child(4) { display: none; }
  .platform-tenant-row > span:nth-child(5), .platform-tenant-row > time { border-top: 1px solid var(--line); padding-top: 9px; }
  .platform-tenant-risk { grid-column: 1 / -1; justify-content: flex-start; }
  .tenant-detail-layout { grid-template-columns: 1fr; }
}

.knowledge-relation-path { display: block; margin-top: 5px; color: var(--brand); font-size: 10px; font-style: normal; line-height: 1.5; }
.governance-shell { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.governance-toolbar { display: flex; min-height: 92px; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.governance-toolbar > div:first-child { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 9px; }
.governance-toolbar > div:first-child strong { color: var(--brand); font-size: 28px; line-height: 1; }
.governance-toolbar > div:first-child span { font-weight: 750; }
.governance-toolbar > div:first-child small { grid-column: 1 / -1; margin-top: 6px; color: var(--muted); }
.governance-toolbar > div:last-child { display: flex; gap: 8px; }
.governance-filters { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.governance-filters select { width: 190px; min-height: 38px; padding-block: 6px; }
.governance-list { min-height: 260px; }
.governance-row { width: 100%; min-height: 82px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto 18px; align-items: center; gap: 14px; padding: 14px 24px; border-bottom: 1px solid var(--line); text-align: left; transition: background-color .16s ease; }
.governance-row:last-child { border-bottom: 0; }
.governance-row:hover { background: var(--surface-2); }
.governance-row:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.governance-pair { min-width: 0; display: grid; grid-template-columns: minmax(0, auto) 16px minmax(0, auto); align-items: center; justify-content: start; gap: 7px; }
.governance-pair strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.governance-pair > svg { color: var(--muted); }
.governance-pair small { grid-column: 1 / -1; color: var(--muted); }
.overlay.governance-drawer { width: min(620px, calc(100vw - 24px)); }
.governance-drawer-body { display: grid; gap: 24px; }
.governance-drawer-body h3, .knowledge-impact-detail h3 { margin: 0 0 10px; font-size: 14px; }
.governance-explanation p { max-width: 70ch; margin: 0; color: var(--muted); line-height: 1.75; }
.governance-compare { display: grid; grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr); align-items: center; gap: 10px; }
.governance-compare > svg { color: var(--brand); }
.governance-compare article { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.governance-compare small { display: block; margin-bottom: 5px; color: var(--muted); }
.governance-compare strong { display: block; overflow-wrap: anywhere; }
.governance-evidence { display: grid; gap: 8px; }
.governance-evidence h3 { margin-bottom: 2px; }
.governance-evidence article { padding: 12px 0; border-bottom: 1px solid var(--line); }
.governance-evidence article:last-child { border-bottom: 0; }
.governance-evidence article small { margin-left: 7px; color: var(--muted); }
.governance-evidence article p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.knowledge-impact-summary { display: flex; align-items: baseline; gap: 7px; }
.knowledge-impact-summary strong { color: var(--warning); font-size: 26px; }
.knowledge-impact-summary span { font-weight: 750; }
.knowledge-impact-counts { display: grid; gap: 6px; margin: 10px 0 14px; color: var(--muted); font-size: 12px; }
.knowledge-impact-clear { display: grid; grid-template-columns: 20px 1fr; gap: 9px; color: var(--success); }
.knowledge-impact-clear span { display: grid; gap: 3px; }
.knowledge-impact-clear small { color: var(--muted); }
.knowledge-impact-detail { display: grid; gap: 22px; }
.knowledge-impact-detail section > p { margin: 0; color: var(--muted); }
.knowledge-impact-detail h3 span { margin-left: 4px; color: var(--muted); font-size: 12px; font-weight: 650; }
.knowledge-impact-detail section > div { display: grid; border-top: 1px solid var(--line); }
.knowledge-impact-detail section a, .knowledge-impact-detail section > div > span { min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); }
.knowledge-impact-detail section a:hover { color: var(--brand); }

.evaluation-hero { min-height: 148px; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 16px; padding: 28px 32px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.evaluation-hero > div { max-width: 680px; }
.evaluation-hero small { color: var(--brand); font-weight: 800; letter-spacing: .08em; }
.evaluation-hero h2 { margin: 7px 0 8px; font-size: clamp(25px, 3vw, 36px); line-height: 1.16; }
.evaluation-hero p { margin: 0; color: var(--muted); line-height: 1.7; }
.evaluation-metric-section, .evaluation-set-panel { margin-bottom: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.evaluation-metric-section > header, .evaluation-set-panel > header { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 22px; border-bottom: 1px solid var(--line); }
.evaluation-metric-section h2, .evaluation-set-panel h2 { margin: 0 0 3px; font-size: 16px; }
.evaluation-metric-section header p, .evaluation-set-panel header p { margin: 0; color: var(--muted); font-size: 12px; }
.evaluation-set-panel > header > span { color: var(--muted); font-size: 12px; }
.evaluation-advanced { margin-bottom: 16px; }
.evaluation-advanced > summary { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 18px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); background: var(--surface); cursor: pointer; list-style: none; }
.evaluation-advanced > summary::-webkit-details-marker { display: none; }
.evaluation-advanced > summary > span { display: grid; gap: 3px; }
.evaluation-advanced > summary strong { color: var(--text); font-size: 14px; }
.evaluation-advanced > summary small { font-size: 12px; }
.evaluation-advanced > summary svg { transition: transform .18s ease; }
.evaluation-advanced[open] > summary svg { transform: rotate(180deg); }
.evaluation-advanced > div { display: grid; gap: 16px; padding-top: 16px; }
.evaluation-advanced .evaluation-metric-section { margin-bottom: 0; }
.evaluation-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.evaluation-metrics article { min-height: 126px; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 20px 22px; border-right: 1px solid var(--line); }
.evaluation-metrics article:last-child { border-right: 0; }
.evaluation-metrics small { color: var(--muted); font-weight: 700; }
.evaluation-metrics strong { color: var(--brand); font-size: 30px; letter-spacing: -.03em; }
.evaluation-metrics.is-value strong { color: var(--success); }
.evaluation-metrics span { color: var(--muted); font-size: 11px; line-height: 1.45; }
.evaluation-set-list { min-height: 160px; }
.evaluation-set-row { width: 100%; min-height: 92px; display: grid; grid-template-columns: minmax(0, 1.6fr) auto minmax(120px, .5fr) minmax(190px, .75fr) 18px; align-items: center; gap: 16px; padding: 16px 22px; border-bottom: 1px solid var(--line); text-align: left; transition: background-color .16s ease; }
.evaluation-set-row:last-child { border-bottom: 0; }
.evaluation-set-row:hover { background: var(--surface-2); }
.evaluation-set-row > span { min-width: 0; display: grid; gap: 4px; }
.evaluation-set-row > span:first-child strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evaluation-set-row small { color: var(--muted); font-size: 11px; }
.overlay.evaluation-drawer { width: min(720px, calc(100vw - 24px)); }
.evaluation-set-detail { display: grid; gap: 24px; }
.evaluation-set-detail > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.evaluation-set-detail > header > div { display: grid; gap: 9px; }
.evaluation-set-detail > header p { margin: 0; color: var(--muted); line-height: 1.65; }
.evaluation-detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.evaluation-detail-heading h3, .evaluation-run-detail h3 { margin: 0 0 3px; font-size: 15px; }
.evaluation-detail-heading small { color: var(--muted); }
.evaluation-case-list { border-top: 1px solid var(--line); }
.evaluation-case-row { width: 100%; min-height: 78px; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto 16px; align-items: center; gap: 10px; padding: 12px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.evaluation-case-row:hover { color: var(--brand); }
.evaluation-case-row > span:first-child { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.evaluation-case-row > span:nth-child(2) { min-width: 0; display: grid; gap: 5px; }
.evaluation-case-row > span:nth-child(2) strong { color: var(--text); line-height: 1.5; }
.evaluation-case-row small { color: var(--muted); font-size: 11px; }
.evaluation-latest-run { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.evaluation-latest-run > div { display: grid; gap: 3px; }
.evaluation-latest-run small, .evaluation-latest-run span { color: var(--muted); font-size: 11px; }
.evaluation-knowledge-picker { max-height: 230px; overflow-y: auto; display: grid; border: 1px solid var(--line); border-radius: 10px; }
.evaluation-knowledge-picker label { min-height: 56px; display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.evaluation-knowledge-picker label:last-child { border-bottom: 0; }
.evaluation-knowledge-picker label:hover { background: var(--surface-2); }
.evaluation-knowledge-picker span { display: grid; gap: 3px; }
.evaluation-knowledge-picker small { color: var(--muted); font-size: 11px; }
.evaluation-refusal { border: 1px solid var(--line); border-radius: 10px; }
.evaluation-case-extra { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.evaluation-case-extra > summary { min-height: 48px; display: flex; align-items: center; gap: 6px; color: var(--text); font-weight: 700; cursor: pointer; list-style: none; }
.evaluation-case-extra > summary::-webkit-details-marker { display: none; }
.evaluation-case-extra > summary small { color: var(--muted); font-weight: 500; }
.evaluation-case-extra > summary svg { margin-left: auto; color: var(--muted); transition: transform .18s ease; }
.evaluation-case-extra[open] > summary svg { transform: rotate(180deg); }
.evaluation-case-extra > div { display: grid; gap: 14px; padding-bottom: 16px; }
.evaluation-question-preview { display: grid; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.evaluation-question-preview small, .evaluation-question-preview span { color: var(--muted); font-size: 11px; }
.evaluation-run-detail { display: grid; gap: 22px; }
.evaluation-run-metrics { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 11px; }
.evaluation-run-metrics article { min-height: 88px; display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 13px; border-right: 1px solid var(--line); }
.evaluation-run-metrics article:last-child { border-right: 0; }
.evaluation-run-metrics small { color: var(--muted); }
.evaluation-run-metrics strong { color: var(--brand); font-size: 23px; }
.evaluation-run-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.evaluation-run-meta span { padding: 6px 9px; border-radius: 8px; color: var(--muted); background: var(--surface-2); font-size: 11px; }
.evaluation-result-list { margin-top: 10px; border-top: 1px solid var(--line); }
.evaluation-result-row { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.evaluation-result-state { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; }
.evaluation-result-state.is-passed { color: var(--success); background: color-mix(in srgb, var(--success) 12%, transparent); }
.evaluation-result-state.is-failed { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.evaluation-result-row > div { display: grid; gap: 4px; }
.evaluation-result-row small, .evaluation-result-row p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }

@keyframes knowledge-thinking-dot {
  0%, 60%, 100% { transform: translateY(0); opacity: .34; }
  30% { transform: translateY(-4px); opacity: 1; }
}
@keyframes knowledge-online-pulse {
  50% { box-shadow: 0 0 0 7px color-mix(in srgb, #19c894 12%, transparent); }
}
@keyframes knowledge-send-spin { to { transform: rotate(360deg); } }
@keyframes knowledge-stream-caret { 50% { opacity: 0; } }

@media (max-width: 720px) {
  .evaluation-hero { min-height: 0; align-items: stretch; flex-direction: column; padding: 22px 18px; }
  .evaluation-hero .button { width: 100%; }
  .evaluation-advanced > summary { padding: 12px 14px; }
  .evaluation-metrics { grid-template-columns: 1fr 1fr; }
  .evaluation-metrics article { min-height: 108px; border-bottom: 1px solid var(--line); }
  .evaluation-metrics article:nth-child(2n) { border-right: 0; }
  .evaluation-metrics article:nth-last-child(-n+2) { border-bottom: 0; }
  .evaluation-set-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 14px 16px; }
  .evaluation-set-row > span:nth-child(n+3), .evaluation-set-row > svg { display: none; }
  .overlay.evaluation-drawer { width: 100%; }
  .evaluation-run-metrics { grid-template-columns: 1fr 1fr; }
  .evaluation-run-metrics article:nth-child(2) { border-right: 0; }
  .evaluation-run-metrics article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .evaluation-case-row { grid-template-columns: 24px minmax(0, 1fr) auto; }
  .evaluation-case-row > svg { display: none; }
  .governance-toolbar { align-items: stretch; flex-direction: column; padding: 16px; }
  .governance-toolbar > div:last-child { display: grid; grid-template-columns: 1fr 1fr; }
  .governance-filters { align-items: stretch; flex-direction: column; padding: 10px 16px; }
  .governance-filters select { width: 100%; }
  .governance-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 14px 16px; }
  .governance-row > span:nth-child(3), .governance-row > svg { display: none; }
  .governance-pair { grid-column: 1 / -1; }
  .overlay.governance-drawer { width: 100%; }
  .governance-compare { grid-template-columns: 1fr; }
  .governance-compare > svg { transform: rotate(90deg); justify-self: center; }
}
@keyframes import-publish-spin { to { transform: rotate(360deg); } }

.knowledge-structured-form { display: grid; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--surface-2) 72%, var(--surface)); }
.knowledge-semantics { display: grid; gap: 16px; margin: 0 28px 26px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.knowledge-semantics > header { display: flex; align-items: center; gap: 10px; }
.knowledge-semantics > header > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; background: var(--brand-soft); color: var(--brand); }
.knowledge-semantics > header strong, .knowledge-semantics > header small { display: block; }
.knowledge-semantics > header small, .knowledge-semantics-grid small { color: var(--muted); }
.knowledge-semantics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.knowledge-semantics-grid > span { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.knowledge-condition-list { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.knowledge-condition-list > strong { margin-right: 4px; }
.knowledge-condition-list > span { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--text); font-size: 12px; }
.knowledge-condition-list.is-exception > span { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); }

.scenario-hero { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 28px; border-radius: 16px; background: var(--text); color: var(--surface); }
.scenario-hero small { color: color-mix(in srgb, var(--surface) 68%, transparent); font-weight: 800; letter-spacing: .08em; }
.scenario-hero h2 { margin: 8px 0; font-size: clamp(26px, 3vw, 40px); }
.scenario-hero p { max-width: 720px; margin: 0; color: color-mix(in srgb, var(--surface) 72%, transparent); line-height: 1.7; }
.scenario-flow { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 16px 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted); }
.scenario-flow span { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 12px; font-weight: 700; }
.scenario-flow b { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: var(--brand-soft); color: var(--brand); }
.scenario-list-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.scenario-list-panel > header { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.scenario-list-panel h2, .scenario-list-panel p { margin: 0; }
.scenario-list-panel p { margin-top: 4px; color: var(--muted); }
.scenario-row { display: grid; grid-template-columns: 38px minmax(260px, 1fr) 120px 92px 110px 18px; gap: 14px; width: 100%; align-items: center; padding: 16px 20px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: inherit; text-align: left; cursor: pointer; }
.scenario-row:hover { background: var(--surface-2); }
.scenario-row > span { display: grid; gap: 4px; }
.scenario-row small { color: var(--muted); }
.scenario-row-index { display: grid !important; width: 34px; height: 34px; place-items: center; border-radius: 9px; background: var(--brand-soft); color: var(--brand); }
.scenario-source-picker { display: grid; max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.scenario-source-picker label { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.scenario-source-picker label[hidden] { display: none; }
.scenario-source-picker label:last-child { border-bottom: 0; }
.scenario-source-picker span, .scenario-source-picker strong, .scenario-source-picker small { display: block; }
.scenario-source-picker span { min-width: 0; }
.scenario-source-picker small { margin-top: 3px; color: var(--muted); }
.scenario-source-picker input[type="checkbox"] { width: 18px; min-width: 18px; height: 18px; min-height: 18px; flex: 0 0 18px; margin: 0; padding: 0; accent-color: var(--brand); }
.scenario-detail { display: grid; gap: 24px; }
.scenario-question-card { padding: 20px; border-radius: 12px; background: var(--text); color: var(--surface); }
.scenario-question-card > small { color: color-mix(in srgb, var(--surface) 65%, transparent); }
.scenario-question-card h3 { margin: 8px 0 18px; font-size: 22px; line-height: 1.45; }
.scenario-question-card > div { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.scenario-question-card span { display: grid; gap: 5px; padding-top: 12px; border-top: 1px solid color-mix(in srgb, var(--surface) 18%, transparent); }
.scenario-question-card span small { color: color-mix(in srgb, var(--surface) 60%, transparent); }
.scenario-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.scenario-section-heading h3, .scenario-section-heading small { display: block; margin: 0; }
.scenario-section-heading small, .scenario-empty-copy { color: var(--muted); }
.scenario-draft-list, .scenario-knowledge-links { display: grid; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.scenario-draft-row, .scenario-knowledge-links a, .scenario-evaluation-link { display: flex; align-items: center; gap: 11px; padding: 12px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); color: inherit; text-decoration: none; text-align: left; }
.scenario-draft-row:last-child, .scenario-knowledge-links a:last-child { border-bottom: 0; }
.scenario-draft-row > span:nth-child(2), .scenario-evaluation-link > span { flex: 1; }
.scenario-draft-row strong, .scenario-draft-row small, .scenario-evaluation-link strong, .scenario-evaluation-link small { display: block; }
.scenario-draft-row small, .scenario-evaluation-link small { margin-top: 3px; color: var(--muted); }
.scenario-evaluation-link { width: 100%; margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }

.proposal-hero { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 16px; padding: 26px 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.proposal-hero h2, .proposal-hero p { margin: 0; }
.proposal-hero h2 { margin-block: 7px; font-size: clamp(26px, 3vw, 38px); }
.proposal-hero p, .proposal-hero small { color: var(--muted); }
.proposal-hero > div:last-child { display: grid; min-width: 112px; padding: 16px; border-radius: 12px; background: var(--brand-soft); text-align: center; }
.proposal-hero > div:last-child strong { color: var(--brand); font-size: 30px; }
.knowledge-proposal-row { display: grid; grid-template-columns: 34px minmax(260px, 1fr) 150px 130px 18px; gap: 14px; width: 100%; align-items: center; padding: 16px 20px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: inherit; text-align: left; cursor: pointer; }
.knowledge-proposal-row:hover { background: var(--surface-2); }
.knowledge-proposal-row > span { display: grid; gap: 4px; }
.knowledge-proposal-row > span:first-child { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; background: var(--brand-soft); color: var(--brand); }
.knowledge-proposal-row small { color: var(--muted); }
.proposal-patch-fields { display: grid; gap: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.proposal-patch-fields h3 { margin: 0; }
.proposal-patch-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.proposal-patch-heading > div { min-width: 0; }
.proposal-patch-heading small { display: block; margin-top: 5px; color: var(--muted); line-height: 1.55; }
.proposal-type-fields { display: grid; gap: 14px; }
.proposal-type-fields[hidden] { display: none; }
.proposal-source-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.proposal-source-tools > small { flex: 0 0 auto; color: var(--muted); }
.proposal-source-search { min-width: 0; flex: 1; display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--muted); }
.proposal-source-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 13%, transparent); }
.proposal-source-search input { min-width: 0; min-height: 40px; padding: 0; border: 0; background: transparent; box-shadow: none; }
.proposal-source-empty { min-height: 116px; display: grid; place-items: center; align-content: center; gap: 5px; padding: 18px; color: var(--muted); text-align: center; }
.proposal-source-empty[hidden] { display: none; }
.proposal-source-empty strong { color: var(--text); }
.proposal-source-empty small { margin: 0; }
.proposal-source-empty.is-static { border: 1px dashed var(--line); border-radius: 10px; background: var(--surface); }
.proposal-detail { display: grid; gap: 18px; }
.proposal-detail > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); }
.proposal-detail > section h3 { margin: 6px 0 0; line-height: 1.55; }
.proposal-patch-preview { display: grid; gap: 10px; padding: 16px; border-left: 3px solid var(--brand); border-radius: 0 10px 10px 0; background: var(--brand-soft); }
.proposal-patch-preview span { display: grid; gap: 5px; }
.proposal-patch-preview p { margin: 0; line-height: 1.7; }
.proposal-patch-preview small, .proposal-resolution small { color: var(--muted); }
.proposal-resolution { padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.proposal-resolution p { margin: 6px 0 0; }

.knowledge-action-section { display: grid; gap: 14px; margin: 0 28px 26px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.knowledge-action-section > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.knowledge-action-section h2, .knowledge-action-section p { margin: 0; }
.knowledge-action-section p { margin-top: 4px; color: var(--muted); }
.knowledge-action-template-list { display: grid; gap: 8px; }
.knowledge-action-template-row { display: grid; grid-template-columns: 28px minmax(200px, 1fr) auto auto; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.knowledge-action-template-row > div strong, .knowledge-action-template-row > div small { display: block; }
.knowledge-action-template-row > div small { margin-top: 4px; color: var(--muted); }
.knowledge-action-row-actions { display: flex; gap: 6px; }
.task-knowledge-checklists { display: grid; gap: 12px; }
.task-knowledge-checklists > article { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.task-knowledge-checklists article header { display: flex; justify-content: space-between; gap: 12px; }
.task-knowledge-checklists article header small { color: var(--muted); }
.task-knowledge-checklists article > div { display: grid; gap: 7px; }
.task-knowledge-checklists article > div span { display: flex; align-items: center; gap: 8px; }
.task-knowledge-checklists article > a { justify-self: start; color: var(--brand); font-size: 12px; font-weight: 700; text-decoration: none; }

@media (max-width: 760px) {
  .scenario-hero { align-items: stretch; flex-direction: column; }
  .scenario-flow { align-items: stretch; flex-direction: column; }
  .scenario-flow > svg { transform: rotate(90deg); align-self: center; }
  .scenario-row { grid-template-columns: 34px minmax(0, 1fr) 18px; }
  .scenario-row > span:nth-child(n+3):not(:last-child) { display: none; }
  .scenario-question-card > div, .knowledge-semantics-grid { grid-template-columns: 1fr; }
  .knowledge-semantics { margin-inline: 16px; }
  .proposal-hero { align-items: stretch; flex-direction: column; }
  .knowledge-proposal-row { grid-template-columns: 34px minmax(0, 1fr) 18px; }
  .knowledge-proposal-row > span:nth-child(3), .knowledge-proposal-row > span:nth-child(4) { display: none; }
  .knowledge-action-section { margin-inline: 16px; }
  .knowledge-action-section > header { align-items: stretch; flex-direction: column; }
  .knowledge-action-template-row { grid-template-columns: 28px minmax(0, 1fr); }
  .knowledge-action-template-row > .badge, .knowledge-action-template-row > .button, .knowledge-action-row-actions { grid-column: 2; justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  .import-stage-list .active > span,
  .import-processing-dots i,
  .import-publish-meter-copy svg,
  .knowledge-ai-thinking-dots i,
  .team-ai-online-dot.is-busy,
  .knowledge-ai-conversation .team-ai-send-button:disabled svg,
  .knowledge-ai-streaming-answer > i { animation: none; }
  .import-processing-dots i { opacity: .7; }
  .knowledge-ai-thinking-dots i { opacity: .7; }
}

.import-candidate-card { display: grid; grid-template-columns: minmax(240px, .72fr) minmax(0, 1.5fr); }
.import-candidate-heading { grid-column: 1 / -1; }
.import-candidate-evidence { min-width: 0; padding: 14px; border-right: 1px solid var(--line); background: color-mix(in srgb, var(--surface-2) 76%, var(--surface)); }
.import-candidate-evidence > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.import-candidate-evidence > header > span { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; }
.import-candidate-evidence > header small { color: var(--muted); }
.import-candidate-evidence blockquote { margin: 0; padding: 11px 12px; border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: 0 8px 8px 0; background: var(--surface); }
.import-candidate-evidence blockquote + blockquote { margin-top: 9px; }
.import-candidate-evidence blockquote strong { display: block; margin-bottom: 5px; color: var(--brand); font-size: 11px; }
.import-candidate-evidence blockquote p,
.import-candidate-evidence > p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.import-transform-note { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px; padding: 10px 12px; border-radius: 8px; background: var(--brand-soft); color: var(--muted); font-size: 12px; line-height: 1.6; }
.import-transform-note > svg { color: var(--brand); }
.import-transform-note strong { display: block; color: var(--text); }
.import-candidate-editor textarea { min-height: 240px; line-height: 1.7; }

@media (max-width: 900px) {
  .main-area:has(.knowledge-home-hero) .topbar,
  .main-area:has(.knowledge-home-hero) .page-content { width: 100%; }
  .main-area:has(.knowledge-home-hero) .topbar { min-height: 78px; }
  .main-area:has(.knowledge-home-hero) .page-content { margin-top: 14px; }
  .knowledge-home-hero { min-height: 0; align-items: stretch; flex-direction: column; gap: 18px; padding-bottom: 16px; }
  .knowledge-home-primary-actions { flex-wrap: wrap; }
  .knowledge-conversation-tools select { display: none; }
  .knowledge-ai-conversation { grid-template-columns: 1fr; }
  .knowledge-ai-conversation { height: auto; }
  .knowledge-ai-conversation .team-ai-thread { min-height: 620px; }
  .import-candidate-card { grid-template-columns: 1fr; }
  .import-candidate-evidence { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 560px) {
  .overlay.modal-wide { width: 100%; max-height: 100dvh; border-radius: 0; }
  .modal-wide .overlay-heading { min-height: 82px; padding: 16px; }
  .modal-wide .overlay-body { padding: 16px; }
  .modal-wide .overlay-footer { padding-inline: 16px; }
  .proposal-patch-fields { padding: 14px; }
  .proposal-source-tools { align-items: stretch; flex-direction: column; }
  .proposal-source-tools > small { align-self: flex-start; }
  .overlay.review-drawer, .overlay.comment-reply-drawer { width: 100%; }
  .review-drawer .overlay-heading { min-height: 82px; padding: 16px; }
  .review-drawer .overlay-body { padding: 10px 16px 18px; }
  .review-drawer .overlay-footer { padding-inline: 16px; }
  .review-task-context > span { grid-template-columns: 18px 60px minmax(0, 1fr); }
  .review-task-context em { display: none; }
  .review-textarea-shell textarea { min-height: 150px; }
  .review-ai-confirm { grid-template-columns: 1fr; }
  .review-ai-confirm > span:last-child { justify-content: flex-end; }
  .review-selected-file > span { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .knowledge-home-hero-copy h2 { font-size: 29px; }
  .knowledge-home-primary-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .knowledge-home-primary-actions .button { width: 100%; }
  .knowledge-home-primary-actions .knowledge-home-menu > summary { min-width: 0; width: 100%; }
  .knowledge-home-menu-popover { right: auto; left: 0; width: min(250px, calc(100vw - 32px)); }
  .knowledge-home-menu:last-child .knowledge-home-menu-popover { right: 0; left: auto; }
  .knowledge-ai-conversation { --knowledge-user-message-width: min(72%, 320px); min-height: 0; }
  .knowledge-ai-conversation .team-ai-thread-scroll { min-height: 320px; padding: 16px 12px 12px; }
  .knowledge-ai-conversation .team-ai-message.is-user { grid-template-columns: minmax(0, 1fr) 30px; }
  .knowledge-answer-footer { align-items: flex-start; flex-direction: column; }
  .knowledge-answer-actions { width: 100%; flex-wrap: wrap; }
  .knowledge-answer-state { width: 100%; justify-content: flex-start; }
  .knowledge-answer-sources > header { align-items: flex-start; }
  .knowledge-answer-source { padding-inline: 11px; }
  .knowledge-answer-source blockquote,
  .knowledge-answer-source-files { margin-left: 0; }
  .knowledge-source-file { align-items: flex-start; flex-direction: column; }
  .knowledge-source-file > span:last-child { padding-left: 27px; }
  .overlay.source-preview-drawer { width: 100%; }
  .overlay.knowledge-sources-drawer { width: 100%; }
  .knowledge-source-pdf { min-height: 62vh; }
  .knowledge-source-text pre { min-height: 58vh; padding: 13px; font-size: 12px; }
  .knowledge-ai-conversation .qa-composer.team-ai-composer { margin: 0 10px 10px; }
  .team-ai-composer-row { grid-template-columns: minmax(0, 1fr) 108px; padding-right: 6px; }
  .knowledge-ai-conversation .team-ai-send-button { width: 108px; }
  .team-ai-composer-row > select,
  .team-ai-composer-row > .knowledge-scope-static { grid-column: 1 / -1; width: 100%; min-height: 34px; border-right: 0; border-bottom: 1px solid var(--line); }
  .knowledge-conversation-tools .team-ai-quiet-button { min-width: 42px; padding: 0 9px; font-size: 0; }
  .knowledge-conversation-tools .team-ai-quiet-button svg { width: 18px; height: 18px; }
}
.publisher-grant-list { display: grid; gap: 14px; }
.publisher-grant-card { display: grid; grid-template-columns: minmax(150px, .7fr) minmax(280px, 1.6fr) auto; gap: 18px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); }
.publisher-grant-card > div:first-child { display: grid; gap: 4px; }
.publisher-grant-card small { color: var(--muted); line-height: 1.5; }
.publisher-grant-types { display: flex; flex-wrap: wrap; gap: 8px; }
.publisher-grant-types label { cursor: pointer; }
.publisher-grant-types input { position: absolute; opacity: 0; pointer-events: none; }
.publisher-grant-types span { display: inline-flex; padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 13px; }
.publisher-grant-types input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-strong); }
.publisher-grant-types input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 24%, transparent); outline-offset: 2px; }
@media (max-width: 820px) { .publisher-grant-card { grid-template-columns: 1fr; align-items: start; } .publisher-grant-card .button { justify-self: start; } }
.retrieval-profile-panel { display: grid; gap: 18px; padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.retrieval-profile-panel > header { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.retrieval-profile-panel h2 { margin: 4px 0 6px; }
.retrieval-profile-panel p, .retrieval-profile-panel small { color: var(--muted); }
.retrieval-profile-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.retrieval-profile-facts span { display: grid; gap: 5px; padding: 14px; border-radius: 14px; background: var(--surface-2); }
.retrieval-profile-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.retrieval-profile-actions small { margin-left: auto; }
.knowledge-pilot-panel { display: grid; gap: 18px; padding: 24px; border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--line)); border-radius: 22px; background: color-mix(in srgb, var(--brand) 4%, var(--surface)); }
.knowledge-pilot-panel > header, .knowledge-pilot-panel > footer { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.knowledge-pilot-panel h2 { margin: 4px 0 6px; }
.knowledge-pilot-panel p, .knowledge-pilot-panel small { color: var(--muted); }
.knowledge-pilot-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.knowledge-pilot-summary span { display: grid; gap: 5px; padding: 14px; border-radius: 14px; background: var(--surface); }
.knowledge-pilot-summary strong { font-size: 20px; }
.knowledge-pilot-checks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.knowledge-pilot-checks span { display: flex; gap: 7px; align-items: center; min-height: 38px; padding: 8px 10px; border-radius: 10px; font-size: 12px; background: var(--surface); }
.knowledge-pilot-checks .is-passed { color: var(--success); }
.knowledge-pilot-checks .is-pending { color: var(--muted); }
.retrieval-comparison { display: grid; gap: 0; }
.retrieval-comparison > div { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.retrieval-comparison-head { color: var(--muted); font-size: 13px; }
.retrieval-comparison section { padding-top: 20px; }
.retrieval-gate-list { display: grid; gap: 9px; }
.retrieval-gate-list span { display: flex; align-items: center; gap: 8px; color: var(--danger); }
.retrieval-gate-list .is-passed { color: var(--success); }
@media (max-width: 720px) { .retrieval-profile-facts, .knowledge-pilot-summary { grid-template-columns: 1fr 1fr; } .retrieval-profile-panel > header, .knowledge-pilot-panel > header, .knowledge-pilot-panel > footer { flex-direction: column; } .retrieval-profile-actions small { width: 100%; margin-left: 0; } .knowledge-pilot-checks { grid-template-columns: 1fr; } }
/* Phase B: lightweight meeting-to-task review */
.task-create-mode-tabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;margin:-4px 0 18px;border:1px solid var(--line);border-radius:12px;background:var(--surface-soft,#f6f8f7)}
.task-create-mode-tabs button{min-height:38px;border:0;border-radius:9px;background:transparent;color:var(--text-muted);font-weight:650;cursor:pointer}
.task-create-mode-tabs button.active{background:var(--surface,#fff);color:var(--text);box-shadow:0 1px 4px rgba(15,35,30,.08)}
.meeting-import-form{gap:18px}.meeting-source-choice{display:grid;gap:14px}.meeting-file-drop{display:block;cursor:pointer}.meeting-file-drop input{position:absolute;inline-size:1px;block-size:1px;opacity:0}.meeting-file-drop>span{display:flex;min-height:116px;align-items:center;justify-content:center;flex-direction:column;gap:6px;padding:20px;border:1px dashed color-mix(in srgb,var(--brand) 46%,var(--line));border-radius:14px;background:color-mix(in srgb,var(--brand) 4%,var(--surface));text-align:center}.meeting-file-drop strong{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px}.meeting-file-drop small,.meeting-ai-confirm small{display:block;color:var(--text-muted);font-weight:400}.meeting-file-drop:focus-within>span{outline:3px solid color-mix(in srgb,var(--brand) 20%,transparent);border-color:var(--brand)}.meeting-file-drop.has-file>span{border-style:solid;border-color:color-mix(in srgb,var(--brand) 56%,var(--line));background:color-mix(in srgb,var(--brand) 8%,var(--surface))}.meeting-file-drop.has-file strong{color:var(--brand)}.meeting-file-drop.is-invalid>span{border-color:color-mix(in srgb,var(--danger) 58%,var(--line));background:color-mix(in srgb,var(--danger) 5%,var(--surface))}.meeting-file-drop.is-invalid strong,.meeting-file-drop.is-invalid small{color:var(--danger)}
.meeting-source-divider{display:flex;align-items:center;gap:10px;color:var(--text-muted);font-size:12px}.meeting-source-divider:before,.meeting-source-divider:after{content:"";height:1px;flex:1;background:var(--line)}
.meeting-ai-confirm{align-items:flex-start;padding:13px;border-radius:12px;background:var(--surface-soft,#f7f9f8)}
.meeting-recent-strip{display:flex;align-items:center;gap:12px;margin-bottom:18px;padding:14px 16px;border:1px solid var(--line);border-radius:14px;background:var(--surface)}.meeting-recent-strip>span{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;background:color-mix(in srgb,var(--brand) 9%,var(--surface));color:var(--brand)}.meeting-recent-strip>div{display:grid;gap:2px;min-width:0;flex:1}.meeting-recent-strip small{color:var(--text-muted)}.meeting-recent-strip strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.meeting-process-state{max-width:640px;margin:64px auto;padding:48px 28px;text-align:center;border:1px solid var(--line);border-radius:18px;background:var(--surface)}.meeting-process-state>svg,.meeting-process-state>i{color:var(--brand);animation:meeting-spin 1.2s linear infinite}.meeting-process-state.is-failed>svg,.meeting-process-state.is-failed>i{color:var(--danger);animation:none}.meeting-process-state h2{margin:16px 0 8px;font-size:22px}.meeting-process-state p{margin:0 auto 22px;max-width:480px;color:var(--text-muted);line-height:1.7}.meeting-progress{height:7px;overflow:hidden;margin:20px auto 8px;max-width:420px;border-radius:999px;background:var(--line)}.meeting-progress span{display:block;height:100%;border-radius:inherit;background:var(--brand);transition:width .25s ease}@keyframes meeting-spin{to{transform:rotate(360deg)}}
.meeting-review-summary{display:grid;grid-template-columns:repeat(3,minmax(130px,180px)) 1fr;gap:10px;margin-bottom:18px}.meeting-review-summary>div,.meeting-review-summary>p{min-height:74px;margin:0;padding:13px 15px;border:1px solid var(--line);border-radius:13px;background:var(--surface)}.meeting-review-summary>div{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;column-gap:10px;align-items:center}.meeting-review-summary>div>span{grid-row:1/3;display:grid;place-items:center;color:var(--brand)}.meeting-review-summary strong{font-size:20px}.meeting-review-summary small{color:var(--text-muted)}.meeting-review-summary>p{display:flex;align-items:center;gap:8px;color:var(--text-muted);line-height:1.5}
.meeting-type-tabs{overflow-x:auto;margin-bottom:18px}.meeting-type-tabs button{white-space:nowrap}.meeting-review-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:20px;align-items:start}.meeting-outcome-list{display:grid;gap:12px}.meeting-outcome-card{padding:18px;border:1px solid var(--line);border-radius:15px;background:var(--surface)}.meeting-outcome-card.needs-confirmation{border-color:color-mix(in srgb,var(--warning,#d69528) 45%,var(--line))}.meeting-outcome-card>header{display:flex;align-items:center;gap:8px}.meeting-outcome-type{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:700;color:var(--text-muted)}.meeting-select{margin-left:auto;display:flex;align-items:center;gap:5px;font-size:13px;cursor:pointer}.meeting-outcome-content h3{margin:14px 0 7px;font-size:18px}.meeting-outcome-content p{margin:0;color:var(--text-muted);line-height:1.65;white-space:pre-wrap}.meeting-task-facts{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:14px 0 0}.meeting-task-facts div{padding:10px;border-radius:10px;background:var(--surface-soft,#f7f9f8)}.meeting-task-facts dt{font-size:12px;color:var(--text-muted)}.meeting-task-facts dd{margin:4px 0 0;font-weight:650}.meeting-criteria{margin-top:12px}.meeting-criteria strong{display:block;font-size:13px}.meeting-criteria ul{margin:7px 0 0;padding-left:20px;color:var(--text-muted)}.meeting-criteria li+li{margin-top:5px}.meeting-issues{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}.meeting-issues span{display:inline-flex;align-items:center;gap:4px;padding:5px 8px;border-radius:999px;background:color-mix(in srgb,var(--warning,#d69528) 11%,var(--surface));color:var(--warning-text,#95600b);font-size:12px}.meeting-source-ref{margin-top:12px}.meeting-source-ref summary{display:inline-flex;align-items:center;gap:5px;color:var(--text-muted);font-size:13px;cursor:pointer}.meeting-source-ref blockquote,.task-meeting-source blockquote{margin:9px 0 0;padding:9px 12px;border-left:3px solid color-mix(in srgb,var(--brand) 50%,var(--line));background:var(--surface-soft,#f7f9f8);color:var(--text-muted);font-size:13px;line-height:1.55}.meeting-source-missing{display:flex;align-items:center;gap:5px;color:var(--warning-text,#95600b);font-size:13px}.meeting-outcome-card>footer{display:flex;gap:10px;align-items:center;margin-top:15px;padding-top:13px;border-top:1px solid var(--line)}
.meeting-selection-bar{position:sticky;z-index:5;bottom:14px;display:flex;align-items:center;justify-content:space-between;gap:14px;max-width:720px;margin:18px auto 0;padding:12px 14px;border:1px solid color-mix(in srgb,var(--brand) 30%,var(--line));border-radius:14px;background:color-mix(in srgb,var(--surface) 94%,transparent);box-shadow:0 10px 30px rgba(13,36,30,.14);backdrop-filter:blur(12px)}
.meeting-selection-bar>div,.meeting-process-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.meeting-folded-notice{display:flex;align-items:center;gap:8px;margin:-8px 0 14px;padding:10px 12px;border:1px dashed var(--line);border-radius:12px;color:var(--text-muted)}.meeting-folded-notice .text-button{margin-left:auto}.meeting-deleted-list{margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}.meeting-deleted-list>div{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-top:9px}.meeting-deleted-list>div span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.meeting-task-facts dd small{display:block;margin-top:4px;color:var(--text-muted);font-size:11px;font-weight:500}.danger-text{color:var(--danger,#b42318)}
.meeting-collaborator-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.meeting-collaborator-grid label{display:flex;align-items:center;gap:7px;padding:9px;border:1px solid var(--line);border-radius:9px}.meeting-distribution-list{display:grid;gap:9px}.meeting-distribution-list article{display:flex;align-items:flex-start;gap:10px;padding:13px;border:1px solid var(--line);border-radius:11px}.meeting-distribution-list article>span{color:var(--brand)}.meeting-distribution-list div{display:grid;gap:5px}.meeting-distribution-list small{color:var(--text-muted)}
.meeting-split-form fieldset,#meeting-split-form fieldset{margin:0;padding:14px;border:1px solid var(--line);border-radius:12px}.meeting-split-form legend,#meeting-split-form legend{padding:0 6px;font-weight:700}.task-meeting-links{display:flex;flex-wrap:wrap;gap:12px;margin-top:12px}.task-meeting-links>a{display:inline-flex;align-items:center;gap:5px;color:var(--brand);font-weight:650}.meeting-workflow-progress{margin-bottom:18px;padding:16px;border:1px solid var(--line);border-radius:15px;background:var(--surface)}.meeting-workflow-progress>header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.meeting-workflow-progress>header>div{display:flex;align-items:center;gap:7px}.meeting-workflow-progress>header>div>svg{color:var(--brand)}.meeting-workflow-progress>header small{color:var(--text-muted)}.meeting-workflow-progress ol{display:grid;grid-template-columns:repeat(7,minmax(90px,1fr));gap:8px;margin:0;padding:0;list-style:none}.meeting-workflow-progress li{display:grid;grid-template-columns:26px minmax(0,1fr);grid-template-rows:auto auto;column-gap:7px;align-items:center;padding:9px;border-radius:10px;background:var(--surface-soft,#f7f9f8);color:var(--text-muted)}.meeting-workflow-progress li>span{grid-row:1/3;display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:var(--line);font-size:12px;font-weight:750}.meeting-workflow-progress li>strong{font-size:12px;color:inherit}.meeting-workflow-progress li>small{font-size:11px;color:inherit}.meeting-workflow-progress li.complete{color:var(--brand)}.meeting-workflow-progress li.complete>span{background:color-mix(in srgb,var(--brand) 12%,var(--surface))}.meeting-workflow-progress li.active{color:var(--text);outline:1px solid color-mix(in srgb,var(--brand) 35%,var(--line))}.meeting-workflow-state{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:13px;padding:9px 11px;border-radius:10px;background:color-mix(in srgb,var(--brand) 6%,var(--surface));font-size:13px}.meeting-workflow-state>span,.meeting-workflow-state>a{display:inline-flex;align-items:center;gap:5px}.meeting-workflow-state>span{font-weight:700}.meeting-workflow-state>a{color:var(--brand);font-weight:650}
.meeting-landing-note{color:var(--text-muted);font-size:13px}
@media(max-width:900px){.meeting-review-summary{grid-template-columns:repeat(3,1fr)}.meeting-review-summary>p{grid-column:1/-1}.meeting-review-layout{grid-template-columns:1fr}.meeting-review-layout>aside{display:none}.meeting-workflow-progress ol{display:flex;overflow-x:auto}.meeting-workflow-progress li{min-width:118px}}
@media(max-width:600px){.meeting-review-summary{grid-template-columns:1fr 1fr}.meeting-review-summary>div:nth-child(3){grid-column:1/-1}.meeting-review-summary>p{min-height:auto}.meeting-task-facts{grid-template-columns:1fr}.meeting-outcome-card{padding:15px}.meeting-recent-strip{flex-wrap:wrap}.meeting-recent-strip .button{width:100%}.meeting-collaborator-grid{grid-template-columns:1fr}.meeting-selection-bar{bottom:72px}.task-create-mode-tabs{margin-top:0}.meeting-workflow-progress>header{align-items:flex-start;flex-direction:column}.meeting-workflow-state{align-items:flex-start;flex-direction:column}}

/* Phase D: quiet, explainable AI work copilot */
.copilot-workspace-section{margin-top:20px}.copilot-recommendation-list{display:grid;gap:10px}.copilot-recommendation{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:start;padding:15px;border:1px solid var(--line);border-radius:13px;background:var(--surface)}.copilot-recommendation-icon{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;background:color-mix(in srgb,var(--brand) 9%,var(--surface));color:var(--brand)}.copilot-recommendation strong{display:block}.copilot-recommendation p{margin:5px 0;color:var(--text-muted);line-height:1.55}.copilot-recommendation small{color:var(--text-muted)}.copilot-recommendation-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}.copilot-inline-suggestion{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;align-items:start;padding:12px 14px;border:1px solid color-mix(in srgb,var(--brand) 22%,var(--line));border-radius:12px;background:color-mix(in srgb,var(--brand) 4%,var(--surface))}.copilot-inline-suggestion>span{color:var(--brand)}.copilot-inline-suggestion p{margin:4px 0;color:var(--text-muted);font-size:13px;line-height:1.55}.copilot-inline-suggestion small{color:var(--text-muted)}
.copilot-settings-card>header>.badge{margin-left:auto}.copilot-settings-groups{display:grid;gap:10px}.copilot-settings-group{border:1px solid var(--line);border-radius:13px;background:var(--surface)}.copilot-settings-group>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;cursor:pointer;list-style:none}.copilot-settings-group>summary::-webkit-details-marker{display:none}.copilot-settings-group>summary>span{display:grid;gap:3px}.copilot-settings-group>summary small{color:var(--text-muted);font-weight:400}.copilot-settings-group[open]>summary{border-bottom:1px solid var(--line)}.copilot-settings-group>form,.copilot-settings-group>.copilot-grant-list,.copilot-settings-group>.copilot-learning-list,.copilot-settings-group>.copilot-retention-list,.copilot-settings-group>article,.copilot-settings-group>p,.copilot-settings-group>.copilot-footnote{margin:14px 16px}.copilot-check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.copilot-check-grid label{display:flex;align-items:center;gap:8px;padding:9px 10px;border:1px solid var(--line);border-radius:9px;background:var(--surface)}.copilot-check-grid input[type="checkbox"]{width:18px;height:18px;min-height:18px;flex:0 0 18px;margin:0;padding:0;accent-color:var(--brand);cursor:pointer}.copilot-settings-form{padding-top:8px;border-top:1px dashed var(--line)}.copilot-approval-row,.copilot-grant-row,.copilot-learning-row,.copilot-focus-row,.copilot-retention-list article{display:flex;gap:10px;align-items:center;padding:12px 0;border-bottom:1px solid var(--line)}.copilot-approval-row>div:first-child,.copilot-grant-row>div,.copilot-learning-row>div:first-child,.copilot-focus-row>div,.copilot-retention-list article>div{display:grid;gap:3px;min-width:0;flex:1}.copilot-approval-row small,.copilot-grant-row small,.copilot-learning-row small,.copilot-focus-row small,.copilot-retention-list small{color:var(--text-muted);line-height:1.5}.copilot-approval-row>div:last-child{display:flex;gap:8px;align-items:center}.copilot-learning-row p{margin:0;color:var(--text-muted)}.copilot-footnote{display:block;color:var(--text-muted);line-height:1.6}.copilot-inline-form{display:grid;grid-template-columns:minmax(0,1fr) 150px auto;gap:8px;margin:14px 16px}.copilot-calendar-list{display:grid;gap:8px}.copilot-calendar-list>label{display:grid;grid-template-columns:auto minmax(0,1fr) 68px;gap:10px;align-items:center;padding:10px;border:1px solid var(--line);border-radius:10px}.copilot-calendar-list span{display:grid;gap:3px}.copilot-calendar-list small{color:var(--text-muted)}.copilot-quiet-hours{display:flex;gap:8px;align-items:center}.copilot-quiet-hours input{width:74px}.copilot-retention-policy{display:flex;gap:12px;align-items:end;flex-wrap:wrap}.copilot-retention-counts{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:16px 0}.copilot-retention-counts span{display:grid;gap:3px;padding:12px;border-radius:10px;background:var(--surface-soft,#f7f9f8);color:var(--text-muted)}.copilot-retention-counts strong{font-size:20px;color:var(--text)}
.settings-frame:has(.ai-governance-dashboard){grid-template-columns:minmax(0,1fr)}
.settings-frame:has(.ai-governance-dashboard)>.settings-rail{display:none}
.app-shell:has(.ai-governance-dashboard) .settings-tabs{display:none}
.app-shell:has(.ai-governance-dashboard) .topbar .top-actions{display:flex}
.ai-governance-dashboard{min-width:0;display:grid;gap:14px}
.ai-governance-status{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));overflow:hidden;border:1px solid var(--line);border-radius:9px;background:var(--surface)}
.ai-governance-status>div{min-width:0;display:grid;grid-template-columns:46px minmax(0,1fr);align-items:center;gap:12px;padding:17px 20px;position:relative}
.ai-governance-status>div+div::before{width:1px;position:absolute;top:22px;bottom:22px;left:0;background:var(--line);content:""}
.ai-governance-status>div>span{width:42px;height:42px;display:grid;place-items:center;border-radius:50%;color:var(--brand);background:var(--brand-soft)}
.ai-governance-status p{min-width:0;display:grid;gap:3px;margin:0}
.ai-governance-status strong{overflow:hidden;font-size:15px;text-overflow:ellipsis;white-space:nowrap}
.ai-governance-status small{overflow:hidden;color:var(--muted);font-size:12px;text-overflow:ellipsis;white-space:nowrap}
.ai-governance-status em{color:var(--brand);font-size:12px;font-style:normal;font-weight:700}
.ai-governance-status em.success{color:var(--success)}
.ai-governance-status em.warning{color:var(--warning)}
.ai-governance-workspace{min-width:0;display:grid;grid-template-columns:minmax(0,1.62fr) minmax(330px,.78fr);gap:14px;align-items:stretch}
.ai-grant-coverage,.ai-pending-panel{min-width:0;min-height:420px;overflow:hidden;border:1px solid var(--line);border-radius:9px;background:var(--surface)}
.ai-grant-coverage>header,.ai-pending-panel>header{min-height:62px;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 16px;border-bottom:1px solid var(--line)}
.ai-grant-coverage>header>div:first-child,.ai-pending-panel>header{display:flex;align-items:center;gap:7px}
.ai-grant-coverage h3,.ai-pending-panel h3{margin:0;font-size:17px}
.ai-grant-coverage>header>div:first-child svg{color:var(--muted)}
.ai-grant-tools{min-width:0;display:flex;align-items:center;gap:8px}
.ai-grant-tools label{width:min(230px,28vw);min-height:38px;display:flex;align-items:center;gap:7px;padding:0 10px;border:1px solid var(--line);border-radius:7px;color:var(--muted);background:var(--surface)}
.ai-grant-tools input{min-width:0;min-height:34px;padding:0;border:0;background:transparent;box-shadow:none}
.ai-grant-tools select{width:126px;min-height:38px}
.ai-grant-tools .button{min-height:38px;white-space:nowrap}
.ai-grant-table{min-width:760px}
.ai-grant-table-head,.ai-grant-table-row{display:grid;grid-template-columns:minmax(150px,1.35fr) minmax(110px,1fr) minmax(150px,1.35fr) 98px 76px 68px;align-items:center;gap:12px;padding:0 16px;border-bottom:1px solid var(--line)}
.ai-grant-table-head{min-height:42px;color:var(--muted);background:var(--surface-2);font-size:12px;font-weight:700}
.ai-grant-table-row{min-height:66px;font-size:13px}
.ai-grant-table-row>span{min-width:0;overflow:hidden;text-overflow:ellipsis}
.ai-grant-table-row>span:nth-child(2),.ai-grant-table-row>span:nth-child(3),.ai-grant-table-row time{color:var(--muted);line-height:1.45}
.ai-grant-person{display:flex;align-items:center;gap:9px}
.ai-grant-person>.avatar{flex:0 0 auto}
.ai-grant-person>span{min-width:0;display:grid;gap:2px}
.ai-grant-person small{color:var(--muted);font-size:11px}
.ai-grant-status{display:inline-flex;padding:4px 7px;border-radius:5px;color:var(--muted);background:var(--surface-2);font-size:11px;font-style:normal;font-weight:750;white-space:nowrap}
.ai-grant-status.success{color:var(--success);background:var(--success-soft)}
.ai-grant-status.warning{color:var(--warning);background:var(--warning-soft)}
.ai-grant-empty{min-height:210px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:var(--muted)}
.ai-grant-coverage>footer{min-height:48px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 16px;color:var(--muted);font-size:12px}
.ai-grant-coverage>footer small{text-align:right}
.ai-pending-panel>header>span{min-width:20px;height:20px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;color:var(--danger);background:var(--danger-soft);font-size:11px;font-weight:800}
.ai-pending-panel>div{display:grid;padding:0 14px}
.ai-pending-request{display:grid;grid-template-columns:38px minmax(0,1fr);gap:10px;padding:15px 0;border-bottom:1px solid var(--line)}
.ai-pending-request:last-child{border-bottom:0}
.ai-pending-request>div{min-width:0}
.ai-pending-request strong{display:block}
.ai-pending-request small{display:block;margin:2px 0 10px;color:var(--muted)}
.ai-pending-request p{margin:4px 0;color:var(--muted);font-size:12px;line-height:1.45}
.ai-pending-request p b{color:var(--text);font-weight:700}
.ai-pending-request>div>div{display:flex;align-items:center;gap:8px;margin-top:11px}
.ai-pending-request .button{min-height:34px;padding:0 11px;font-size:12px}
.ai-pending-empty{min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;color:var(--muted);text-align:center}
.ai-pending-empty svg{color:var(--success)}
.ai-pending-empty strong{color:var(--text)}
.ai-pending-more{display:block;padding:0 14px 14px;color:var(--muted);text-align:center}
.ai-governance-sections{gap:0;overflow:hidden;border:1px solid var(--line);border-radius:9px;background:var(--surface)}
.ai-governance-sections>.copilot-settings-group{border:0;border-bottom:1px solid var(--line);border-radius:0}
.ai-governance-sections>.copilot-settings-group:last-child{border-bottom:0}
.ai-governance-sections>.copilot-settings-group>summary{min-height:48px;padding:10px 16px}
.ai-governance-sections>.copilot-settings-group>summary>span{display:flex;align-items:center;gap:12px}
.ai-governance-sections>.copilot-settings-group>summary>span>strong{min-width:150px;display:flex;align-items:center;gap:9px}
.ai-governance-sections>.copilot-settings-group>summary>span>strong svg{color:var(--brand)}
.ai-governance-sections>.copilot-settings-group>summary>span>small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ai-governance-sections>.copilot-settings-group[open]>summary{background:var(--surface-2)}
.ai-governance-detail-body{padding:2px 16px 16px}
.ai-governance-consent{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:20px;margin:0 16px;padding:18px 0;border-bottom:1px solid var(--line)}
.ai-governance-consent .settings-consent{margin:0}
.ai-governance-consent>.button{min-width:124px}
.copilot-settings-group>form.ai-participation-settings{display:grid;gap:0;margin:0;padding:0 16px 18px}
.ai-participation-settings>.settings-consent{align-items:center;margin:0;padding:16px 0;border-bottom:1px solid var(--line)}
.ai-participation-settings>.settings-consent>input{align-self:center}
.ai-participation-settings>.settings-consent strong{font-size:14px}
.ai-participation-settings>.settings-consent small{line-height:1.55}
.ai-participation-paused{gap:10px;margin:18px 0 0}
.ai-participation-paused>span{display:flex;align-items:baseline;gap:8px;font-weight:750}
.ai-participation-paused>span>small{color:var(--muted);font-size:12px;font-weight:400}
.ai-participation-paused .copilot-check-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.ai-participation-paused .copilot-check-grid label{min-height:44px;justify-content:flex-start;padding:10px 12px;cursor:pointer;transition:border-color .16s ease,background-color .16s ease,color .16s ease}
.ai-participation-paused .copilot-check-grid label:hover{border-color:var(--line-strong);background:var(--surface-2)}
.ai-participation-paused .copilot-check-grid label:has(input:checked){border-color:color-mix(in srgb,var(--brand) 58%,var(--line));color:var(--brand);background:var(--brand-soft)}
.ai-participation-footer{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-top:16px;padding-top:16px;border-top:1px solid var(--line)}
.ai-participation-footer .copilot-footnote{margin:0;max-width:720px}
.ai-participation-footer .button{min-width:132px;flex:0 0 auto}
@media(max-width:1260px){.ai-governance-status{grid-template-columns:1fr 1fr}.ai-governance-status>div:nth-child(3)::before{display:none}.ai-governance-status>div:nth-child(n+3){border-top:1px solid var(--line)}.ai-governance-workspace{grid-template-columns:1fr}.ai-pending-panel>div{grid-template-columns:repeat(2,minmax(0,1fr));gap:0 18px}.ai-pending-request:nth-child(odd){border-right:1px solid var(--line);padding-right:18px}}
@media(max-width:760px){.ai-governance-status{grid-template-columns:1fr}.ai-governance-status>div+div::before{display:none}.ai-governance-status>div+div{border-top:1px solid var(--line)}.ai-grant-coverage>header{align-items:stretch;flex-direction:column}.ai-grant-tools{align-items:stretch;flex-wrap:wrap}.ai-grant-tools label{width:100%}.ai-grant-tools select{flex:1}.ai-grant-coverage{overflow-x:auto}.ai-grant-coverage>footer{align-items:flex-start;flex-direction:column;padding-block:12px}.ai-grant-coverage>footer small{text-align:left}.ai-pending-panel>div{grid-template-columns:1fr}.ai-pending-request:nth-child(odd){border-right:0;padding-right:0}.ai-governance-sections>.copilot-settings-group>summary>span{align-items:flex-start;flex-direction:column;gap:3px}.ai-governance-sections>.copilot-settings-group>summary>span>strong{min-width:0}.ai-governance-sections>.copilot-settings-group>summary>span>small{white-space:normal}.ai-governance-consent{grid-template-columns:1fr;gap:12px}.ai-governance-consent>.button{width:100%}.ai-participation-paused>span{align-items:flex-start;flex-direction:column;gap:2px}.ai-participation-paused .copilot-check-grid{grid-template-columns:1fr}.ai-participation-footer{align-items:stretch;flex-direction:column;gap:12px}.ai-participation-footer .button{width:100%}}
@media(max-width:760px){.copilot-recommendation{grid-template-columns:auto minmax(0,1fr)}.copilot-recommendation-actions{grid-column:2;justify-content:flex-start}.copilot-check-grid{grid-template-columns:1fr}.copilot-inline-form{grid-template-columns:1fr}.copilot-calendar-list>label{grid-template-columns:auto minmax(0,1fr)}.copilot-calendar-list>label>input[type=number]{grid-column:2}.copilot-retention-counts{grid-template-columns:1fr 1fr}.copilot-approval-row,.copilot-learning-row{align-items:flex-start;flex-direction:column}.copilot-inline-suggestion{grid-template-columns:auto minmax(0,1fr)}.copilot-inline-suggestion>button{grid-column:2;justify-self:start}}

@media (max-width: 1000px) {
  .overlay.memo-editor-drawer { width: min(760px, calc(100vw - 72px)); }
  .memo-editor-form { grid-template-columns: minmax(0, 1.42fr) minmax(270px, 1fr); }
  .memo-title-field input { min-height: 66px; font-size: 22px; }
  .memo-editor-toolbar { padding-inline: 6px; }
  .memo-editor-toolbar .memo-tool { width: 26px; }
  .memo-editor-toolbar .memo-tool-separator { margin-inline: 2px; }
}

@media (max-width: 760px) {
  .overlay.memo-editor-drawer { width: 100%; max-width: none; }
  .memo-editor-drawer .overlay-heading { min-height: 76px; padding: 14px 16px; }
  .memo-editor-drawer .overlay-heading-status { display: none; }
  .memo-editor-drawer .overlay-body { overflow-y: auto; }
  .memo-editor-form { height: auto; min-height: 100%; grid-template-columns: 1fr; }
  .memo-editor-main { min-height: 560px; padding: 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .memo-content-field textarea { min-height: 320px; }
  .memo-settings-panel { overflow: visible; padding: 20px 16px; }
  .memo-editor-drawer .overlay-footer.memo-footer { padding: 12px 16px 82px; }
  .memo-footer-commit { align-items: stretch; flex-direction: column-reverse; }
  .memo-footer-commit > .button, .memo-footer-commit-actions, .memo-footer-commit-actions .button { width: 100%; }
  .memo-footer-commit-actions { display: grid; grid-template-columns: 1fr 1fr; }
}
.member-focus-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.member-focus-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 999px; }
.member-focus-tag button { border: 0; background: transparent; color: var(--brand); cursor: pointer; font-weight: 700; padding: 0; }
.notification-preference-form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 7px; }
.notification-preference-form legend { margin-bottom: 7px; font-weight: 700; }
.copilot-retention-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.copilot-reference-list { display: grid; gap: 10px; }
.copilot-reference-list article { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.copilot-reference-list p { white-space: pre-wrap; color: var(--text-muted); }
