:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-muted: #f7f8fa;
  --ink: #171922;
  --muted: #686d7a;
  --faint: #969ba7;
  --line: #e2e4e9;
  --line-strong: #cfd2da;
  --accent: #5856d6;
  --accent-soft: #eeedff;
  --good: #0f7454;
  --good-soft: #e7f6f0;
  --warn: #915000;
  --warn-soft: #fff3da;
  --danger: #bb344b;
  --danger-soft: #ffedf0;
  --shadow: 0 12px 30px rgba(25, 28, 40, .08);
  --radius: 10px;
  --rail: 68px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Internal task intake */
.work-heading-actions { display: flex; align-items: flex-end; gap: 22px; }
.create-task-button { min-height: 40px; gap: 7px; padding-inline: 15px; }
.create-task-button > span { font-size: 17px; font-weight: 400; line-height: 1; }
.manual-task-overlay { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 22px; overflow-y: auto; background: rgba(12, 14, 21, .62); backdrop-filter: blur(6px); animation: overlay-in .14s ease-out; }
.manual-task-dialog { width: min(880px, 100%); max-height: calc(100svh - 44px); overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-raised); box-shadow: var(--shadow); animation: manual-task-in .2s cubic-bezier(.2,.75,.25,1); }
.manual-task-dialog.is-loading { min-height: 220px; display: grid; place-content: center; justify-items: center; gap: 13px; }
.manual-task-dialog > header { position: sticky; top: 0; z-index: 3; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 25px 30px 20px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface-raised) 94%, transparent); backdrop-filter: blur(12px); }
.manual-task-dialog > header h2 { margin: 3px 0 5px; font-size: 27px; letter-spacing: -.035em; }
.manual-task-dialog > header p { margin: 0; color: var(--muted); font-size: 12px; }
.manual-task-progress { display: flex; gap: 28px; padding: 15px 30px; border-bottom: 1px solid var(--line); color: var(--faint); font-size: 10px; font-weight: 720; letter-spacing: .06em; text-transform: uppercase; }
.manual-task-progress span { display: inline-flex; align-items: center; gap: 7px; }
.manual-task-progress b { color: inherit; font: inherit; }
.manual-task-progress .is-complete { color: var(--ink); }
.manual-task-progress .is-active { color: var(--accent); }
.manual-task-form { padding: 0 30px; }
.manual-task-section { padding: 26px 0 6px; border-bottom: 1px solid var(--line); }
.manual-task-section:last-of-type { border-bottom: 0; }
.manual-task-section-title { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; margin-bottom: 20px; }
.manual-task-section-title > span { color: var(--accent); font: 720 10px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.manual-task-section-title h3 { margin: 0 0 4px; font-size: 14px; }
.manual-task-section-title p { margin: 0; color: var(--muted); font-size: 11px; }
.manual-task-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.manual-task-grid .dialog-field { min-width: 0; }
.manual-template-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.manual-template { position: relative; min-height: 78px; cursor: pointer; }
.manual-template:not(:nth-child(3n)) { border-right: 1px solid var(--line); }
.manual-template:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
.manual-template input { position: absolute; opacity: 0; pointer-events: none; }
.manual-template > span { position: relative; height: 100%; display: grid; align-content: center; gap: 4px; padding: 14px 42px 14px 16px; background: var(--surface); transition: background .15s ease, color .15s ease; }
.manual-template strong, .manual-template small { display: block; }
.manual-template strong { font-size: 12px; }
.manual-template small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.manual-template i { position: absolute; top: 13px; right: 14px; display: grid; width: 18px; height: 18px; place-items: center; border: 1px solid var(--line-strong); border-radius: 5px; color: transparent; font-size: 11px; font-style: normal; transition: border-color .15s ease, background .15s ease, color .15s ease; }
.manual-template:hover > span { background: var(--surface-muted); }
.manual-template input:checked + span { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 36%, transparent); }
.manual-template input:checked + span i { border-color: var(--accent); background: var(--accent); color: white; }
.manual-template input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }
.manual-requirement-grid { align-items: stretch; margin-top: 18px; }
.manual-requirement-grid .dialog-field { grid-template-rows: auto minmax(132px, 1fr); margin-bottom: 0; }
.manual-requirement-grid .manual-context-field textarea { height: 100%; min-height: 132px; }
.manual-locale-control { display: grid; grid-template-rows: minmax(42px, auto) auto auto; gap: 9px; min-height: 132px; padding: 10px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); transition: border-color .15s ease, box-shadow .15s ease; }
.manual-locale-control:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.manual-locale-values { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; }
.manual-locale-token { display: inline-grid; grid-template-columns: auto auto auto; align-items: center; gap: 6px; min-height: 30px; padding: 4px 7px 4px 9px; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius: 6px; background: var(--accent-soft); color: var(--ink); cursor: pointer; }
.manual-locale-token strong { color: var(--accent); font-size: 10px; letter-spacing: .04em; }
.manual-locale-token span { color: var(--muted); font-size: 9px; }
.manual-locale-token i { color: var(--faint); font-size: 14px; font-style: normal; line-height: 1; }
.manual-locale-token:hover { border-color: var(--accent); }
.manual-locale-token:hover i { color: var(--accent); }
.manual-locale-entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.manual-requirement-grid .manual-locale-entry input { min-width: 0; padding: 7px 8px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
.manual-requirement-grid .manual-locale-entry input:focus { border-color: var(--accent); box-shadow: none; }
.manual-locale-entry .button { min-height: 34px; padding-inline: 12px; }
.manual-locale-help { color: var(--muted); font-size: 9px; line-height: 1.4; }
.intent-task-dialog { width: min(920px, 100%); }
.intent-task-form { padding: 0 30px; }
.intent-composer { padding: 28px 0 4px; }
.intent-composer-heading { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; margin-bottom: 20px; }
.intent-composer-heading > span { color: var(--accent); font: 720 10px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.intent-composer-heading h3 { margin: 0 0 5px; font-size: 16px; letter-spacing: -.01em; }
.intent-composer-heading p { max-width: 690px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.intent-request-field { display: block; }
.intent-request-field textarea { width: 100%; min-height: 270px; padding: 22px 22px 24px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink); font: 500 15px/1.7 Inter, ui-sans-serif, sans-serif; resize: vertical; transition: border-color .15s ease, box-shadow .15s ease; }
.intent-request-field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: 0; }
.intent-request-field textarea::placeholder { color: var(--faint); }
.intent-composer-guidance { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 14px; padding: 13px 2px 17px; border-bottom: 1px solid var(--line); }
.intent-composer-guidance span { color: var(--faint); font-size: 9px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.intent-composer-guidance p { margin: 0; color: var(--muted); font-size: 10px; }
.manual-attachments { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px 18px; padding: 16px 2px; border-bottom: 1px solid var(--line); }
.manual-attachments > div:first-child strong, .manual-attachments > div:first-child small { display: block; }
.manual-attachments > div:first-child strong { margin-bottom: 4px; font-size: 11px; }
.manual-attachments > div:first-child small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.manual-attachment-picker { position: relative; display: inline-flex; min-height: 36px; align-items: center; justify-content: center; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); color: var(--accent); cursor: pointer; font-size: 10px; font-weight: 700; transition: border-color .15s ease, background .15s ease; }
.manual-attachment-picker:hover { border-color: var(--accent); background: var(--accent-soft); }
.manual-attachment-picker.is-busy { color: var(--muted); cursor: wait; }
.manual-attachment-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.manual-attachment-picker span { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.manual-attachment-picker .spinner { width: 13px; height: 13px; border-width: 2px; }
.manual-attachment-list { grid-column: 1 / -1; border-top: 1px solid var(--line); }
.manual-attachment-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 52px; border-bottom: 1px solid var(--line); }
.manual-attachment-row:last-child { border-bottom: 0; }
.manual-attachment-kind { display: grid; width: 26px; height: 30px; place-items: center; border: 1px solid var(--line-strong); border-radius: 5px; color: var(--accent); background: var(--surface-muted); font-size: 13px; }
.manual-attachment-row div strong, .manual-attachment-row div small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.manual-attachment-row div strong { font-size: 10px; }
.manual-attachment-row div small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.manual-attachment-row > button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 9px; font-weight: 650; }
.manual-attachment-row > button:hover { color: var(--danger); }
.manual-review-section .manual-attachment-list { border-top: 0; }
.intent-sources { padding: 15px 2px 0; }
.intent-sources > summary { width: fit-content; color: var(--accent); cursor: pointer; font-size: 11px; font-weight: 680; list-style: none; }
.intent-sources > summary::-webkit-details-marker { display: none; }
.intent-sources > summary::before { content: "+"; display: inline-block; width: 18px; color: var(--faint); }
.intent-sources[open] > summary::before { content: "−"; }
.intent-sources > summary small { margin-left: 5px; color: var(--faint); font-weight: 500; }
.intent-sources .dialog-field { margin: 16px 0 4px; }
.intent-clarify-form { padding: 0 30px; }
.intent-understood { padding: 26px 0 21px; border-bottom: 1px solid var(--line); }
.intent-understood > span { display: block; margin-bottom: 7px; color: var(--faint); font-size: 9px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.intent-understood > strong { display: block; font-size: 16px; }
.intent-understood > p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.intent-question-list { display: grid; gap: 0; }
.intent-question { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 320px); align-items: center; gap: 28px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.intent-question > span strong, .intent-question > span small { display: block; }
.intent-question > span strong { font-size: 13px; }
.intent-question > span small { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.intent-question > input, .intent-question > select { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); color: var(--ink); }
.intent-question > input:focus, .intent-question > select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: 0; }
.intent-locale-question { align-items: start; }
.intent-locale-question > span { padding-top: 10px; }
.intent-locale-question .manual-locale-control { width: 100%; min-height: 122px; }
.intent-locale-question .manual-locale-entry input { min-width: 0; padding: 7px 8px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
.intent-locale-question .manual-locale-entry input:focus { border-color: var(--accent); outline: 0; }
.intent-source-plan { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 18px; margin: 22px 0 2px; padding: 14px 16px; border-left: 2px solid var(--good); background: var(--good-soft); }
.intent-source-plan.needs-research { border-left-color: var(--warn); background: var(--warn-soft); }
.intent-source-plan span { font-size: 11px; font-weight: 720; }
.intent-source-plan p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.review-source-plan { margin: 22px 0 0; }
.manual-task-footer { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 18px -30px 0; padding: 17px 30px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface-raised) 95%, transparent); backdrop-filter: blur(12px); }
.manual-task-footer > div { display: flex; align-items: center; gap: 14px; }
.manual-task-footer small { color: var(--muted); font-size: 10px; }
.manual-review { padding: 26px 30px 2px; }
.manual-review-lead { max-width: 680px; padding-bottom: 24px; }
.manual-review-lead h3 { margin: 5px 0 9px; font-size: 24px; letter-spacing: -.03em; }
.manual-review-lead p { margin: 0; color: var(--muted); line-height: 1.55; white-space: pre-wrap; }
.manual-review dl { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; border-block: 1px solid var(--line); }
.manual-review dl div { padding: 15px 0; }
.manual-review dl div + div { padding-left: 18px; border-left: 1px solid var(--line); }
.manual-review dt { margin-bottom: 5px; color: var(--faint); font-size: 9px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.manual-review dd { margin: 0; font-size: 12px; font-weight: 680; }
.manual-review-section { padding: 22px 0; border-bottom: 1px solid var(--line); }
.manual-review-section > span { display: block; margin-bottom: 12px; color: var(--faint); font-size: 9px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.manual-review-section > div:not(.manual-review-locales) { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; padding: 7px 0; }
.manual-review-section > div strong { color: var(--muted); font-size: 11px; font-weight: 580; }
.manual-review-locales { display: flex; flex-wrap: wrap; gap: 7px; }
.manual-review-ready, .manual-review-warning { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; margin-top: 22px; padding: 14px 16px; border-left: 2px solid var(--good); background: var(--good-soft); }
.manual-review-warning { border-left-color: var(--warn); background: var(--warn-soft); }
.manual-review-ready strong, .manual-review-warning strong { font-size: 12px; }
.manual-review-ready span, .manual-review-warning span { color: var(--muted); font-size: 11px; }
.manual-task-dialog > form[data-form="manual-task-create"] { padding: 0 30px; }
.internal-brief { border-color: color-mix(in srgb, var(--accent) 24%, var(--line)); }
@keyframes manual-task-in { from { opacity: 0; transform: translateY(12px) scale(.99); } }

@media (max-width: 760px) {
  .work-heading-actions { width: 100%; align-items: center; justify-content: space-between; }
  .manual-task-overlay { padding: 0; place-items: stretch; }
  .manual-task-dialog { width: 100%; max-height: 100svh; min-height: 100svh; border: 0; border-radius: 0; }
  .manual-task-dialog > header { padding: 20px 18px 17px; }
  .manual-task-progress { padding-inline: 18px; }
  .manual-task-form, .manual-review, .intent-task-form, .intent-clarify-form, .manual-task-dialog > form[data-form="manual-task-create"] { padding-inline: 18px; }
  .manual-task-grid, .manual-review dl { grid-template-columns: 1fr; }
  .manual-review dl div + div { padding-left: 0; border-top: 1px solid var(--line); border-left: 0; }
  .manual-template-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .manual-template:not(:nth-child(3n)) { border-right: 0; }
  .manual-template:nth-child(-n+3) { border-bottom: 0; }
  .manual-template:nth-child(odd) { border-right: 1px solid var(--line); }
  .manual-template:nth-child(-n+4) { border-bottom: 1px solid var(--line); }
  .manual-task-footer { margin-inline: -18px; padding-inline: 18px; }
  .manual-task-footer small { display: none; }
  .intent-question { grid-template-columns: 1fr; gap: 12px; }
  .intent-source-plan { grid-template-columns: 1fr; gap: 5px; }
  .manual-attachments { grid-template-columns: 1fr; }
  .manual-attachment-picker { width: fit-content; }
}

@media (max-width: 480px) {
  .work-heading-actions { align-items: stretch; flex-direction: column; }
  .create-task-button { width: 100%; justify-content: center; }
  .manual-task-section-title { grid-template-columns: 24px minmax(0, 1fr); }
  .intent-composer-heading { grid-template-columns: 24px minmax(0, 1fr); }
  .intent-request-field textarea { min-height: 230px; padding: 17px; font-size: 14px; }
  .intent-composer-guidance { grid-template-columns: 1fr; gap: 5px; }
  .manual-template-list { grid-template-columns: 1fr; }
  .manual-template:nth-child(n) { border-right: 0; border-bottom: 1px solid var(--line); }
  .manual-template:last-child { border-bottom: 0; }
  .manual-task-footer { align-items: stretch; }
  .manual-task-footer > div { justify-content: flex-end; }
}

html[data-theme="dark"] {
  --bg: #111218;
  --surface: #191b22;
  --surface-raised: #20222b;
  --surface-muted: #15171d;
  --ink: #f1f2f5;
  --muted: #a3a7b2;
  --faint: #777c88;
  --line: #2b2e38;
  --line-strong: #3a3e49;
  --accent: #9290ff;
  --accent-soft: #292747;
  --good: #58c9a1;
  --good-soft: #17352d;
  --warn: #efb252;
  --warn-soft: #3a2b17;
  --danger: #f08091;
  --danger-soft: #402029;
  --shadow: 0 14px 40px rgba(0, 0, 0, .28);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 14px; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { outline-color: var(--accent); outline-offset: 2px; }
button { color: inherit; }
a { color: inherit; }

.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; transform: translateY(-150%); padding: 8px 12px; background: var(--ink); color: var(--surface); border-radius: 6px; }
.skip-link:focus { transform: translateY(0); }
.boot-state { min-height: 100vh; display: grid; place-items: center; color: var(--muted); gap: 10px; }
.spinner { width: 22px; height: 22px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }

.app-shell { min-height: 100vh; padding-left: var(--rail); }
.rail { position: fixed; inset: 0 auto 0 0; z-index: 20; width: var(--rail); display: flex; flex-direction: column; align-items: center; padding: 12px 0; background: #171820; color: #d9dbe3; border-right: 1px solid #252731; }
.brand-mark { width: 38px; height: 38px; border: 0; border-radius: 11px; background: var(--accent); color: white; font-weight: 800; letter-spacing: -.03em; cursor: pointer; }
.rail-nav { display: grid; gap: 0; width: 100%; margin-top: 24px; }
.rail-button { display: grid; place-items: center; gap: 3px; min-height: 48px; padding: 5px 2px; border: 0; border-radius: 0; background: transparent; color: #9296a2; cursor: pointer; font-size: 10px; }
.rail-button .icon { font-size: 17px; line-height: 1; }
.rail-button span:last-child { position: relative; }
.rail-button small { position: absolute; top: -12px; right: -13px; min-width: 16px; height: 16px; display: grid; place-items: center; padding: 0 4px; border-radius: 8px; background: var(--accent); color: white; font-size: 8px; font-weight: 800; }
.rail-button:hover, .rail-button.is-active { color: #fff; background: #2a2c36; }
.rail-button.is-locked { position: relative; color: #676b76; cursor: not-allowed; }
.rail-button.is-locked:hover { color: #777b87; background: transparent; }
.rail-button.is-locked::after { content: attr(data-tooltip); position: absolute; left: calc(100% + 10px); top: 50%; width: max-content; max-width: 230px; padding: 8px 10px; border: 1px solid #363945; border-radius: 7px; background: #20222b; color: #d9dbe3; box-shadow: 0 8px 24px rgba(0, 0, 0, .28); font-size: 10px; font-weight: 600; line-height: 1.35; text-align: left; transform: translate(5px, -50%); opacity: 0; pointer-events: none; transition: opacity .14s ease, transform .14s ease; }
.rail-button.is-locked:hover::after { transform: translate(0, -50%); opacity: 1; }
.rail-knowledge-icon { position: relative; }
.rail-lock-icon { position: absolute; right: -8px; bottom: -5px; width: 9px; height: 7px; border: 1.5px solid currentColor; border-radius: 2px; background: #171820; }
.rail-lock-icon::before { content: ""; position: absolute; left: 1px; bottom: 5px; width: 4px; height: 4px; border: 1.5px solid currentColor; border-bottom: 0; border-radius: 4px 4px 0 0; }
.rail-footer { margin-top: auto; display: grid; gap: 8px; }
.rail-circle { width: 38px; height: 38px; border: 1px solid #363945; border-radius: 50%; background: transparent; color: #b9bdc7; cursor: pointer; }

.topbar { position: sticky; top: 0; z-index: 15; height: 58px; display: flex; align-items: center; gap: 14px; padding: 0 24px; background: color-mix(in srgb, var(--surface) 92%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.topbar-location { min-width: 0; }
.topbar-location strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-location small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.topbar-status { display: flex; align-items: center; gap: 7px; margin-left: auto; color: var(--muted); font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px var(--good-soft); }
.topbar-action { border: 1px solid var(--line); background: var(--surface); border-radius: 7px; padding: 7px 10px; cursor: pointer; }
.topbar-action:hover { border-color: var(--line-strong); background: var(--surface-muted); }

.page { padding: 28px; max-width: 1680px; margin: 0 auto; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.eyebrow { display: block; margin-bottom: 7px; color: var(--accent); font-size: 10px; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(26px, 3vw, 38px); letter-spacing: -.04em; line-height: 1.04; }
h2 { margin-bottom: 7px; font-size: 22px; letter-spacing: -.025em; }
h3 { margin-bottom: 6px; font-size: 16px; letter-spacing: -.015em; }
.page-heading p, .lead { max-width: 680px; margin-bottom: 0; color: var(--muted); line-height: 1.55; }

.summary-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; }
.metric { padding: 17px 18px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric strong { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.metric span { color: var(--muted); font-size: 11px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.queue-toolbar { display: flex; align-items: center; gap: 12px; padding: 14px; border-bottom: 1px solid var(--line); }
.segmented { display: inline-flex; gap: 3px; padding: 3px; background: var(--surface-muted); border: 1px solid var(--line); border-radius: 8px; }
.segment { border: 0; border-radius: 6px; padding: 7px 10px; background: transparent; color: var(--muted); cursor: pointer; white-space: nowrap; }
.segment.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(20, 22, 32, .08); }
.count { display: inline-grid; place-items: center; min-width: 19px; height: 19px; margin-left: 5px; padding: 0 5px; background: var(--surface-muted); border-radius: 9px; font-size: 10px; }
.segment.is-active .count { background: var(--accent-soft); color: var(--accent); }
.search { position: relative; min-width: 220px; margin-left: auto; }
.search input { width: 100%; height: 34px; padding: 0 12px 0 34px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--ink); }
.search span { position: absolute; left: 11px; top: 8px; color: var(--muted); }

.table-wrap { overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.data-table th { padding: 11px 14px; text-align: left; background: var(--surface-muted); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.data-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr[data-action] { cursor: pointer; }
.data-table tbody tr[data-action]:hover { background: var(--surface-muted); }
.task-key { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.task-title { display: block; max-width: 540px; font-weight: 650; }
.task-sub { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.pill { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 3px 8px; border-radius: 999px; background: var(--surface-muted); color: var(--muted); font-size: 11px; font-weight: 650; white-space: nowrap; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.accent { background: var(--accent-soft); color: var(--accent); }
.empty { min-height: 260px; display: grid; place-items: center; text-align: center; padding: 30px; color: var(--muted); }
.empty strong { display: block; color: var(--ink); margin-bottom: 6px; }

.line-page { padding-top: 34px; }
.line-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 30px; }
.line-heading h1 { margin-bottom: 9px; font-size: clamp(34px, 4.2vw, 52px); }
.line-heading p { max-width: 620px; margin: 0; color: var(--muted); line-height: 1.55; }
.sync-cluster { display: flex; align-items: center; gap: 14px; padding-bottom: 2px; }
.sync-state { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; white-space: nowrap; }

.line-board { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.line-tabs { display: flex; align-items: stretch; gap: 28px; min-height: 55px; padding: 0 18px; background: var(--surface); }
.line-tab { position: relative; display: grid; grid-template-columns: auto auto; grid-template-rows: 20px; align-content: center; align-items: center; gap: 8px; padding: 0 1px; border: 0; background: transparent; color: var(--muted); cursor: pointer; text-align: left; }
.line-tab::after { content: ""; position: absolute; inset: auto 0 -1px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .18s ease; }
.line-tab:hover { color: var(--ink); }
.line-tab.is-active { color: var(--ink); }
.line-tab.is-active::after { transform: scaleX(1); }
.line-tab > span:first-child { font-weight: 670; line-height: 20px; }
.line-tab .count { margin: 0; background: transparent; color: var(--faint); }
.line-tab.is-active .count { background: var(--accent-soft); color: var(--accent); }

.line-list { overflow: hidden; background: var(--surface); }
.line-filters { display: flex; align-items: center; gap: 9px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--bg); }
.line-filters .search { width: min(390px, 38vw); min-width: 260px; margin: 0 auto 0 0; }
.line-filters .search input { height: 38px; background: var(--surface); }
.filter-select select { height: 38px; min-width: 145px; padding: 0 30px 0 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--ink); cursor: pointer; }
.filter-select select:hover, .line-filters .search input:hover { border-color: var(--line-strong); }
.filter-result { min-width: 74px; color: var(--muted); font-size: 11px; text-align: right; }

.line-table { min-width: 1020px; }
.line-table th { height: 39px; padding: 0 14px; background: var(--surface); }
.line-table th:first-child, .line-table td:first-child { padding-left: 18px; }
.line-table th:last-child, .line-table td:last-child { padding-right: 18px; }
.line-table td { height: 68px; padding-top: 12px; padding-bottom: 12px; }
.line-table tbody tr { animation: line-row-in .28s both; }
.line-table tbody tr[data-action]:hover { background: color-mix(in srgb, var(--surface-muted) 74%, transparent); }
.line-table tbody tr:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.line-table time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.line-table .task-title { max-width: 480px; }
.line-table .task-sub:empty { display: none; }
.priority-label { display: block; margin-top: 4px; color: var(--faint); font-size: 10px; white-space: nowrap; }
.attention-note { color: var(--warn); }
.mobile-task-state { display: none; }
.workflow-stage { color: var(--faint); font-size: 12px; text-transform: capitalize; }
.workflow-stage.has-workflow { color: var(--ink); font-weight: 620; }
.assignee { display: flex; align-items: center; gap: 8px; min-width: 0; }
.assignee > span:last-child { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.avatar { flex: 0 0 auto; width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-muted); border: 1px solid var(--line); color: var(--muted); font-size: 9px; font-weight: 750; }
.line-action-cell { width: 108px; text-align: right; }
.row-action { padding: 7px 4px 7px 9px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 650; white-space: nowrap; }
.row-action span { display: inline-block; margin-left: 4px; transition: transform .16s ease; }
.row-action:hover { color: var(--accent); }
.row-action:hover span, .line-table tr:hover .row-action span { transform: translateX(3px); }
.row-action:disabled { color: var(--accent); cursor: progress; opacity: 1; }
.row-action:disabled span { transform: none; }
.task-row-spinner { display: inline-block; width: 12px; height: 12px; margin: 0 7px 0 0 !important; border: 2px solid color-mix(in srgb, var(--accent) 24%, transparent); border-top-color: var(--accent); border-radius: 50%; vertical-align: -2px; animation: generation-spin .72s linear infinite; }
.row-action-label { margin-left: 0 !important; }
.line-result-note { padding: 12px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.line-empty { min-height: 320px; border-top: 0; }
@keyframes line-row-in { from { opacity: 0; transform: translateY(5px); } }

.work-page { padding-top: 34px; }
.work-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 30px; }
.work-heading h1 { margin-bottom: 9px; font-size: clamp(34px, 4.2vw, 52px); }
.work-heading p { max-width: 620px; margin: 0; color: var(--muted); line-height: 1.55; }
.work-total { display: flex; align-items: baseline; gap: 8px; padding-bottom: 4px; }
.work-total strong { font-size: 30px; letter-spacing: -.04em; }
.work-total span { color: var(--muted); font-size: 12px; }
.work-board { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.recent-workflow { display: grid; grid-template-columns: 3px minmax(0, 1fr) 168px; gap: 16px; align-items: center; min-height: 82px; padding: 13px 18px; border-bottom: 1px solid var(--line); background: var(--bg); }
.recent-workflow-marker { width: 3px; height: 46px; background: var(--accent); }
.recent-workflow-copy { min-width: 0; }
.recent-workflow-copy .eyebrow { margin-bottom: 5px; font-size: 9px; }
.recent-workflow-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.recent-workflow-copy small { display: flex; align-items: center; gap: 7px; margin-top: 5px; overflow: hidden; color: var(--muted); font-size: 10px; white-space: nowrap; }
.recent-workflow-copy small b { color: var(--ink); font-weight: 680; }
.recent-workflow-copy small span { color: var(--faint); }
.recent-workflow-action { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 8px 0; border: 0; border-radius: 0; background: transparent; color: var(--accent); cursor: pointer; text-align: left; }
.recent-workflow-action span { color: var(--muted); font-size: 9px; }
.recent-workflow-action strong { font-size: 12px; font-weight: 680; }
.recent-workflow-action i { grid-column: 2; grid-row: 1 / 3; color: var(--accent); font-style: normal; transition: transform .16s ease; }
.recent-workflow-action:hover { color: var(--ink); }
.recent-workflow-action:hover i { transform: translateX(3px); }
.recent-workflow-action:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.recent-workflow.is-opening { background: color-mix(in srgb, var(--accent-soft) 24%, var(--bg)); }
.recent-workflow-action:disabled { cursor: progress; opacity: 1; }
.recent-workflow-action:disabled .task-row-spinner { grid-column: 1; grid-row: 1 / 3; justify-self: start; }
.recent-workflow-action:disabled strong { grid-column: 1; grid-row: 1 / 3; padding-left: 22px; }
.work-tabs { min-height: 55px; display: flex; align-items: stretch; gap: 28px; padding: 0 18px; background: var(--surface); }
.work-tab { position: relative; display: grid; grid-template-columns: auto auto; grid-template-rows: 20px; align-content: center; align-items: center; gap: 8px; padding: 0 1px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; text-align: left; }
.work-tab::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; transform: scaleX(0); background: var(--accent); transition: transform .18s ease; }
.work-tab:hover { color: var(--ink); }
.work-tab.is-active { color: var(--ink); font-weight: 720; }
.work-tab.is-active::after { transform: scaleX(1); }
.work-tab b { min-width: 21px; padding: 2px 6px; border-radius: 999px; background: var(--surface-muted); color: var(--muted); font-size: 9px; text-align: center; }
.work-tab.is-active b { background: var(--accent-soft); color: var(--accent); }
.work-list { overflow: hidden; background: var(--surface); }
.work-list-head, .work-row { display: grid; grid-template-columns: 54px minmax(320px, 1fr) minmax(150px, .42fr) 122px 168px; gap: 18px; align-items: center; padding-inline: 18px; }
.work-list-head { min-height: 39px; border-bottom: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.work-row { width: 100%; min-height: 76px; padding-block: 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; text-align: left; animation: line-row-in .28s both; transition: background .16s ease; }
.work-row:last-child { border-bottom: 0; }
.work-row:hover { background: color-mix(in srgb, var(--surface-muted) 74%, transparent); }
.work-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.work-row.is-opening { background: color-mix(in srgb, var(--accent-soft) 24%, transparent); cursor: progress; }
.work-row:disabled { color: var(--ink); opacity: 1; }
.work-index { color: var(--faint); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.work-task, .work-stage, .work-updated { min-width: 0; }
.work-task strong, .work-task small, .work-stage strong, .work-stage small, .work-updated strong, .work-updated small { display: block; }
.work-task strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.work-task small, .work-stage small, .work-updated small { margin-bottom: 4px; color: var(--faint); font-size: 10px; }
.work-task .work-task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 4px; }
.work-origin-badge { display: inline-flex; min-height: 18px; align-items: center; padding: 1px 6px; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius: 4px; background: var(--accent-soft); color: var(--accent); font-size: 8px; font-weight: 760; letter-spacing: .06em; line-height: 1; text-transform: uppercase; }
.work-task .work-mobile-stage { display: none; }
.work-stage strong, .work-updated strong { overflow: hidden; color: var(--muted); font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.work-next { display: grid; grid-template-columns: minmax(0, 1fr) 14px; align-items: center; gap: 10px; color: var(--accent); }
.work-next small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.work-next > span { justify-self: end; }
.work-next > span { transition: transform .16s ease; }
.work-row:hover .work-next > span { transform: translateX(4px); }
.work-empty { min-height: 360px; border-top: 1px solid var(--line); }
.work-empty .button { margin-top: 16px; }
.work-empty .button-row { justify-content: center; }
@media (prefers-reduced-motion: reduce) { .work-row { animation: none; } .work-tab::after, .work-next > span, .recent-workflow-action, .recent-workflow-action i { transition: none; } }

.workspace { display: grid; grid-template-columns: 206px minmax(0, 1fr) 310px; gap: 18px; align-items: start; }
.run-history-notice { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 18px; padding: 15px 18px; border-block: 1px solid color-mix(in srgb, var(--warn) 34%, var(--line)); background: color-mix(in srgb, var(--warn-soft) 54%, transparent); }
.run-history-notice .eyebrow { margin-bottom: 4px; color: var(--warn); }
.run-history-notice strong, .run-history-notice small { display: block; }
.run-history-notice small { margin-top: 4px; color: var(--muted); line-height: 1.45; }
.run-history-notice .button { flex: 0 0 auto; }
.workspace-nav, .inspector-stack { position: sticky; top: 78px; }
.workspace-nav { padding: 7px; }
.workspace-tab { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; text-align: left; }
.workspace-tab:hover { background: var(--surface-muted); color: var(--ink); }
.workspace-tab.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.workspace-tab:disabled { opacity: .42; cursor: not-allowed; }
.workspace-tab.is-active:disabled { opacity: 1; cursor: progress; }
.workspace-tab span:last-child { font-size: 10px; }
.content-column { min-width: 0; }
.content-header { padding: 20px 22px; border-bottom: 1px solid var(--line); }
.content-body { padding: 22px; }
.workflow-tab-loading { min-height: 280px; display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--muted); }
.workflow-tab-loading > div { display: grid; gap: 4px; }
.workflow-tab-loading strong { color: var(--ink); font-size: 14px; }
.workflow-tab-loading small { max-width: 420px; line-height: 1.45; }
.inspector-stack { display: grid; gap: 14px; min-width: 0; }
.runtime-inspector, .knowledge-inspector { padding: 18px; }
.runtime-inspector p, .knowledge-inspector p { color: var(--muted); font-size: 12px; line-height: 1.5; }
.knowledge-inspector > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.knowledge-inspector h3 { margin: 4px 0 0; }
.knowledge-route-count { flex: 0 0 auto; color: var(--good); font-size: 10px; font-weight: 750; }
.knowledge-authorization-note { display: grid; gap: 3px; margin-top: 12px; padding: 10px 11px; border: 1px solid color-mix(in srgb, var(--good) 38%, var(--line)); border-radius: 7px; background: var(--good-soft); }
.knowledge-authorization-note strong { color: var(--good); font-size: 11px; }
.knowledge-authorization-note small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.knowledge-route-section { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.knowledge-route-section > span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.knowledge-inspector ul { margin: 0; padding: 0; list-style: none; }
.knowledge-inspector li { display: grid; grid-template-columns: 8px minmax(0, 1fr); align-items: start; gap: 8px; padding: 7px 0; color: var(--ink); font-size: 11px; line-height: 1.35; }
.knowledge-route-dot { width: 6px; height: 6px; margin-top: 4px; border-radius: 50%; background: var(--faint); }
.knowledge-route-dot.is-used { background: var(--good); }
.knowledge-route-unused { margin-top: 10px; border-top: 1px solid var(--line); }
.knowledge-route-unused > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; color: var(--muted); cursor: pointer; list-style: none; font-size: 11px; font-weight: 650; }
.knowledge-route-unused > summary::-webkit-details-marker { display: none; }
.knowledge-route-unused[open] > summary .locale-profile-expand { transform: rotate(180deg); }
.knowledge-route-unused > div { padding-bottom: 11px; }
.knowledge-route-unused > div > small { display: block; margin-top: 6px; color: var(--faint); font-size: 9px; line-height: 1.45; }
.knowledge-route-technical { padding-top: 10px; border-top: 1px solid var(--line); }
.knowledge-route-technical > summary { color: var(--faint); cursor: pointer; font-size: 9px; list-style-position: inside; }
.knowledge-route-technical > div { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; color: var(--faint); font-size: 9px; }
.knowledge-route-technical code { color: var(--muted); }
.fact-list { margin: 16px 0 0; }
.fact-list div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.fact-list dt { color: var(--muted); font-size: 11px; }
.fact-list dd { margin: 0; font-size: 11px; font-weight: 650; text-align: right; word-break: break-all; }
.stack { display: grid; gap: 12px; }
.section { padding: 17px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.section.muted { background: var(--surface-muted); }
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.section-header h3 { margin: 0; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field-label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.field-value { min-height: 38px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-muted); line-height: 1.45; word-break: break-word; }
.source-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) minmax(0, max-content); gap: 12px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.source-row.has-selector { grid-template-columns: 22px 32px minmax(0, 1fr) minmax(0, max-content); }
.source-selector { display: grid; width: 22px; height: 32px; place-items: center; }
.source-selector input { width: 16px; height: 16px; accent-color: var(--accent); }
.source-row:last-child { border-bottom: 0; }
.source-icon { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-muted); color: var(--accent); font-weight: 800; }
.source-copy { min-width: 0; }
.source-title { display: block; min-width: 0; overflow-wrap: anywhere; color: var(--ink); font-weight: 750; line-height: 1.35; text-decoration: none; word-break: break-word; }
a.source-title:hover { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a.source-title:focus-visible { border-radius: 3px; color: var(--accent); }
.source-open-mark { display: inline-block; margin-left: 3px; color: var(--accent); font-size: .78em; text-decoration: none; transform: translateY(-1px); }
.source-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; max-width: min(360px, 34vw); }
.source-actions .button, .source-actions .pill { flex: 0 0 auto; white-space: nowrap; }
.source-row strong, .source-row small { display: block; }
.source-row small { margin-top: 3px; color: var(--muted); }
.source-row em { color: var(--muted); font-size: 10px; font-style: normal; }
.source-row p { max-width: 720px; margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; white-space: pre-wrap; }
.source-row.is-manual .source-icon { border-color: color-mix(in srgb, var(--accent) 42%, var(--line)); background: var(--accent-soft); }
.source-row.is-excluded { opacity: .68; }
.source-row.is-excluded .source-icon { color: var(--muted); }
.source-row-knowledge .source-icon { border-color: color-mix(in srgb, var(--accent) 38%, var(--line)); background: var(--accent-soft); }
.source-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.source-toolbar strong, .source-toolbar small { display: block; }
.source-toolbar small { margin-top: 4px; color: var(--muted); }
.source-batch-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 12px 0 14px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius: 12px; background: color-mix(in srgb, var(--accent-soft) 58%, var(--panel)); }
.source-batch-toolbar > label { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.source-batch-toolbar > label input { width: 16px; height: 16px; accent-color: var(--accent); }
.source-batch-toolbar > div { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.source-batch-toolbar small { color: var(--muted); }
.source-list { margin-top: 14px; container-type: inline-size; }
.source-group { border-bottom: 1px solid var(--line); }
.source-group > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 0; cursor: pointer; list-style: none; }
.source-group > summary::-webkit-details-marker { display: none; }
.source-group > summary span, .source-group > summary strong, .source-group > summary small { display: block; }
.source-group > summary small { margin-top: 3px; color: var(--muted); font-weight: 500; }
.source-group > summary b { min-width: 28px; color: var(--muted); font-size: 12px; text-align: right; }
.source-group > div { padding-left: 14px; border-left: 2px solid var(--line); }
.source-empty-note { padding: 14px 0; color: var(--muted); font-size: 12px; }
.source-add-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.source-add-layout .manual-source-composer { min-width: 0; }
.linked-source-composer input[type="url"] { width: 100%; }
.source-review-panel { margin: 0 0 14px 44px; padding: 18px 20px; border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line)); border-radius: 9px; background: color-mix(in srgb, var(--accent-soft) 28%, var(--surface)); }
.source-review-panel > header, .source-review-panel > footer { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.source-review-panel > header h3 { max-width: 760px; margin: 4px 0 5px; font-size: 15px; line-height: 1.4; }
.source-review-panel > header p, .source-review-panel > footer small { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.source-review-panel > footer { align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.source-review-panel .button-row { flex: 0 0 auto; margin: 0; }
.source-document-review, .source-advanced-review { margin-top: 14px; border-top: 1px solid var(--line); }
.source-document-review summary, .source-advanced-review summary { padding: 12px 0 0; cursor: pointer; color: var(--ink); font-size: 12px; font-weight: 700; }
.source-document-review summary span { margin-left: 6px; color: var(--muted); font-weight: 500; }
.source-document-review pre { max-height: 24rem; margin: 12px 0 0; padding: 14px; overflow: auto; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--ink); font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }
.source-advanced-review > .field-grid { margin-top: 14px; }
.source-authority-options { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 7px; }
.source-authority-options legend { padding: 0 5px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.source-authority-options label { display: inline-flex; align-items: center; gap: 4px; padding: 4px 7px; border-radius: 5px; background: var(--surface); color: var(--muted); font-size: 10px; }
.source-authority-options label:has(input:checked) { background: var(--accent-soft); color: var(--accent); }
.source-authority-options label:has(input:disabled) { display: none; }
.source-fragment-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px 16px; max-height: 16rem; margin-top: 14px; overflow: auto; border-block: 1px solid var(--line); }
.source-fragment-list label { display: flex; align-items: flex-start; gap: 8px; min-width: 0; padding: 9px 2px; color: var(--muted); font-size: 11px; }
.source-fragment-list span, .source-fragment-list strong, .source-fragment-list small { min-width: 0; }
.source-fragment-list small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@container (max-width: 760px) {
  .source-batch-toolbar, .source-batch-toolbar > div { align-items: stretch; flex-direction: column; }
  .source-batch-toolbar .button { width: 100%; }
  .source-row { grid-template-columns: 32px minmax(0, 1fr); align-items: start; }
  .source-row.has-selector { grid-template-columns: 22px 32px minmax(0, 1fr); }
  .source-row.has-selector .source-actions { grid-column: 3; }
  .source-actions { grid-column: 2; justify-content: flex-start; max-width: none; }
  .source-review-panel { margin-left: 0; }
  .source-review-panel > header, .source-review-panel > footer { align-items: stretch; flex-direction: column; }
  .source-fragment-list { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .source-add-layout { grid-template-columns: 1fr; }
}
.manual-source-composer { margin-bottom: 16px; padding: 20px; border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line)); border-radius: 10px; background: color-mix(in srgb, var(--accent-soft) 36%, var(--surface)); }
.manual-source-composer > header, .manual-source-composer > footer { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.manual-source-composer > header p { max-width: 640px; margin: 0; color: var(--muted); line-height: 1.5; }
.manual-context-help { margin-top: 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 72%, transparent); }
.manual-context-help > summary, .task-direction-help > summary { padding: 12px 0; color: var(--ink); font-size: 12px; font-weight: 750; cursor: pointer; }
.manual-context-help > div, .task-direction-help > div { padding: 0 0 14px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.manual-context-help p, .task-direction-help p { margin: 0 0 8px; }
.manual-context-help ul, .task-direction-help ul { margin: 8px 0 10px; padding-left: 18px; }
.manual-context-help li + li, .task-direction-help li + li { margin-top: 4px; }
.manual-source-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; margin-top: 20px; }
.manual-source-content { grid-column: 1 / -1; }
.manual-source-title { max-width: 620px; }
.manual-source-composer > footer { align-items: center; padding-top: 16px; border-top: 1px solid var(--line); }
.manual-source-composer > footer small { color: var(--muted); }
.rule-list { margin: 0; padding-left: 20px; }
.rule-list li { padding: 5px 0; line-height: 1.45; }
.decision { padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.decision-heading h3 { margin: 4px 0 6px; }
.decision-heading p { max-width: 760px; margin: 0 0 16px; color: var(--muted); line-height: 1.5; }
.decision fieldset { margin: 0; padding: 0; border: 0; }
.radio-option { display: flex; gap: 9px; align-items: flex-start; padding: 9px; margin-top: 6px; border: 1px solid var(--line); border-radius: 7px; cursor: pointer; }
.radio-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.radio-option small { display: block; margin-top: 2px; color: var(--muted); }
.decision-answer { display: grid; gap: 7px; margin-top: 16px; }
.decision-answer[hidden] { display: none; }
.decision-answer > span { color: var(--ink); font-size: 12px; font-weight: 750; }
.decision-answer textarea { min-height: 112px; resize: vertical; }
.decision-answer small { color: var(--muted); }
.decision-submit { margin-top: 16px; }
.source-capture-decision { padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.source-capture-decision > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.source-capture-decision h3 { margin: 4px 0 6px; }
.source-capture-decision header p { max-width: 720px; margin: 0; color: var(--muted); line-height: 1.5; }
.source-capture-decision ul { margin: 18px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.source-capture-decision li { display: flex; justify-content: space-between; gap: 20px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.source-capture-decision li span { min-width: 0; overflow-wrap: anywhere; }
.source-capture-decision .linked-document-url { min-width: 0; color: var(--ink); text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent); text-decoration-thickness: 1px; text-underline-offset: 4px; overflow-wrap: anywhere; }
.source-capture-decision .linked-document-url:hover { color: var(--accent); text-decoration-color: currentColor; }
.source-capture-decision .linked-document-url:focus-visible { border-radius: 3px; outline: 2px solid var(--accent); outline-offset: 3px; }
.source-capture-decision li small { flex: 0 0 auto; color: var(--muted); }
.source-capture-decision footer { display: flex; justify-content: flex-end; gap: 10px; padding-top: 18px; }
@media (max-width: 720px) {
  .source-capture-decision > header, .source-capture-decision li, .source-capture-decision footer { align-items: stretch; flex-direction: column; }
  .source-capture-decision footer .button { width: 100%; }
}
.locale-decision { padding: 20px; border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); border-radius: 10px; background: var(--surface); container-type: inline-size; }
.locale-decision > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.locale-decision > header > div { min-width: 0; }
.locale-decision h3 { margin: 3px 0 6px; }
.locale-decision header p { max-width: 720px; margin: 0; color: var(--muted); line-height: 1.5; }
.locale-decision header .button { flex: 0 0 auto; white-space: nowrap; }
.locale-mapping-head, .locale-mapping-row { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(260px, 1.3fr); gap: 18px; align-items: center; }
.locale-mapping-head { padding: 16px 0 7px; color: var(--faint); font-size: 10px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.locale-mapping-row { padding: 13px 0; border-bottom: 1px solid var(--line); }
.locale-market { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.locale-market strong { font-size: 14px; }
.locale-market > span { color: var(--accent); font-size: 12px; font-weight: 800; }
.locale-market small { margin-left: auto; color: var(--faint); font-size: 10px; }
.locale-mapping-row label > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.locale-exclusion label > span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 700; }
.locale-mapping-row select, .locale-exclusion textarea { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-muted); color: var(--ink); }
.locale-mapping-row select:focus, .locale-exclusion textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.locale-decision-action { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 16px; }
.locale-decision-action small { max-width: 560px; color: var(--muted); line-height: 1.45; }
.locale-stale-action { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 18px; }
.locale-stale-action p { margin: 0; color: var(--muted); line-height: 1.5; }
.locale-decision-stale > details { margin-top: 16px; color: var(--muted); font-size: 11px; }
.locale-decision-stale > details code { display: block; margin-top: 8px; color: var(--muted); }
.locale-exclusion { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.locale-exclusion summary { cursor: pointer; color: var(--muted); font-weight: 700; }
.locale-exclusion[open] summary { color: var(--danger); }
.locale-exclusion form { max-width: 720px; padding-top: 12px; }
.locale-exclusion form p { margin: 0 0 12px; color: var(--muted); line-height: 1.45; }
.locale-exclusion textarea { min-height: 76px; resize: vertical; }
.locale-exclusion .button { margin-top: 12px; }
@container (max-width: 660px) {
  .locale-decision > header, .locale-decision-action, .locale-stale-action { align-items: stretch; flex-direction: column; }
  .locale-decision header .button, .locale-decision-action .button, .locale-stale-action .button { width: 100%; }
  .locale-mapping-head { display: none; }
  .locale-mapping-row { grid-template-columns: 1fr; gap: 10px; align-items: start; }
  .locale-market small { margin-left: 0; }
  .locale-mapping-row label > span { position: static; width: auto; height: auto; margin-bottom: 5px; overflow: visible; clip-path: none; color: var(--muted); font-size: 10px; font-weight: 700; white-space: normal; }
}
.alert { display: flex; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-muted); }
.alert[hidden] { display: none; }
.alert.warn { border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); background: var(--warn-soft); color: var(--warn); }
.alert.good { border-color: color-mix(in srgb, var(--good) 35%, var(--line)); background: var(--good-soft); color: var(--good); }
.alert div { color: inherit; }
.alert small { display: block; margin-top: 3px; opacity: .85; }
.generation-status-stack { display: grid; gap: 12px; }
.task-analysis-notice { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 14px; margin: 0 0 18px; padding: 15px 18px; border-top: 1px solid color-mix(in srgb, var(--accent) 46%, var(--line)); border-bottom: 1px solid color-mix(in srgb, var(--accent) 46%, var(--line)); background: color-mix(in srgb, var(--accent-soft) 36%, transparent); }
.task-analysis-notice > div { display: grid; gap: 3px; min-width: 0; }
.task-analysis-notice strong { font-size: 14px; line-height: 1.35; }
.task-analysis-notice small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.task-analysis-spinner { width: 18px; height: 18px; border: 2px solid color-mix(in srgb, var(--accent) 24%, transparent); border-top-color: var(--accent); border-radius: 50%; animation: generation-spin .72s linear infinite; }
.task-analysis-track { display: block; height: 2px; margin-top: 7px; overflow: hidden; background: color-mix(in srgb, var(--accent) 14%, transparent); }
.task-analysis-track i { display: block; width: 32%; height: 100%; background: linear-gradient(90deg, transparent, var(--accent), transparent); animation: generation-sweep 1.15s cubic-bezier(.4, 0, .2, 1) infinite; }
.task-analysis-phase { align-self: start; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.task-analysis-notice.is-failed { border-color: color-mix(in srgb, var(--danger) 48%, var(--line)); background: color-mix(in srgb, var(--danger) 7%, transparent); }
.task-analysis-mark { display: grid; place-items: center; width: 18px; height: 18px; border: 1px solid var(--danger); border-radius: 50%; color: var(--danger); font-size: 11px; font-weight: 800; }
.line-table tr.is-starting { pointer-events: none; opacity: .7; }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 16px; }
.button { min-height: 36px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--ink); cursor: pointer; font-weight: 650; }
.button:hover { border-color: var(--line-strong); background: var(--surface-muted); }
.button.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.button.primary:hover { filter: brightness(1.06); }
.button.danger { color: var(--danger); }
.button.block { width: 100%; }
.button:disabled { opacity: .43; cursor: not-allowed; filter: none; }
.checkbox-line { display: flex; align-items: flex-start; gap: 9px; margin-top: 16px; color: var(--muted); line-height: 1.4; }
.source-preview { display: block; max-height: 8.4em; margin-top: 8px; padding: 9px 10px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); font-size: 12px; white-space: pre-wrap; }
.source-full-review { margin: 8px 0 0 30px; }
.source-full-review summary { cursor: pointer; color: var(--accent); font-size: 12px; font-weight: 700; }
.source-full-review pre { max-height: 26rem; margin: 8px 0 0; padding: 12px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }
.hash { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; overflow-wrap: anywhere; word-break: break-word; }

.flow-header { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 18px; }
.flow-header .button { flex: 0 0 auto; }
.flow-title { flex: 1; }
.flow-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; align-items: start; }
.asset-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 7px; border-bottom: 1px solid var(--line); }
.asset-tab { padding: 8px 12px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; white-space: nowrap; }
.asset-tab.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.editor { padding: 22px; }
.editor-field { margin-bottom: 17px; }
.editor-field label { display: flex; justify-content: space-between; margin-bottom: 6px; color: var(--muted); font-size: 11px; }
.editor-field input, .editor-field textarea { width: 100%; padding: 10px 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--ink); resize: vertical; line-height: 1.5; }
.editor-field textarea { min-height: 90px; }
.editor-field input:focus, .editor-field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.editor-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 8px; }
.editor-footer small { color: var(--muted); }
.constraint-row { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.constraint-row:last-child { border-bottom: 0; }

.review-document { padding: 26px; }
.review-asset { padding: 20px 0; border-bottom: 1px solid var(--line); }
.review-asset:last-child { border-bottom: 0; }
.review-asset h3 { color: var(--accent); }
.review-asset dl { display: grid; gap: 10px; }
.review-asset dl div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 15px; }
.review-asset dt { color: var(--muted); font-size: 11px; }
.review-asset dd { margin: 0; line-height: 1.5; }

.jira-brief { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.jira-brief > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 20px 22px; background: var(--surface-muted); border-bottom: 1px solid var(--line); }
.jira-brief > header h3 { margin: 0; font-size: 18px; }
.brief-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.brief-meta span { min-width: 0; padding: 12px 16px; border-right: 1px solid var(--line); }
.brief-meta span:last-child { border-right: 0; }
.brief-meta small, .brief-meta strong { display: block; }
.brief-meta small { margin-bottom: 4px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.brief-meta strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.jira-brief-copy { padding: 24px 22px 26px; font-size: 15px; line-height: 1.72; white-space: pre-wrap; }
.review-section { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.review-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.review-section-heading h3 { margin: 0; font-size: 18px; }
.review-section-heading small { color: var(--muted); }
.review-heading-actions { display: flex; align-items: center; gap: 12px; }
.section-toggle { width: 34px; height: 34px; display: grid; flex: 0 0 34px; place-items: center; padding: 0; border: 1px solid var(--line-strong); border-radius: 7px; background: transparent; color: var(--accent); cursor: pointer; transition: border-color .16s ease, background .16s ease, color .16s ease; }
.section-toggle:hover { border-color: var(--accent); background: var(--accent-soft); }
.section-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.section-toggle-mark { position: relative; width: 14px; height: 14px; display: block; }
.section-toggle-mark::before, .section-toggle-mark::after { position: absolute; top: 50%; left: 50%; width: 14px; height: 2px; border-radius: 2px; background: currentColor; content: ""; transform: translate(-50%, -50%); }
.section-toggle-mark::after { transform: translate(-50%, -50%) rotate(90deg); }
.section-toggle[aria-expanded="true"] .section-toggle-mark::after { opacity: 0; }
.source-usage-section { padding-top: 26px; }
.source-usage-section .review-section-heading { margin-bottom: 0; }
.source-usage-section .source-usage-list { margin-top: 18px; border-top: 0; }
.plan-section-copy { max-width: 680px; margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.evidence-list, .deliverable-list, .source-usage-list { border-top: 1px solid var(--line); }
.evidence-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) minmax(150px, .65fr); gap: 18px; align-items: baseline; padding: 13px 2px; border-bottom: 1px solid var(--line); }
.evidence-row > span { color: var(--muted); font-size: 11px; }
.evidence-row > strong { font-size: 13px; line-height: 1.45; }
.evidence-row > small { color: var(--faint); text-align: right; }
.jira-links { display: grid; border-top: 1px solid var(--line); }
.jira-links a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 13px 2px; border-bottom: 1px solid var(--line); text-decoration: none; }
.jira-links a:hover span { color: var(--accent); }
.jira-links small { color: var(--muted); }

.deliverable-line { display: grid; grid-template-columns: 120px 80px minmax(0, 1fr); gap: 16px; align-items: baseline; padding: 13px 2px; border-bottom: 1px solid var(--line); }
.deliverable-line > span { color: var(--muted); font-size: 11px; }
.deliverable-line > strong { text-transform: capitalize; }
.deliverable-line > small { color: var(--muted); line-height: 1.45; }
.clarification-round { border: 1px solid var(--warn-border); border-radius: 16px; padding: 22px; background: var(--warn-soft); }
.clarification-round .plan-decisions { margin-top: 18px; }
.task-understanding-summary { max-width: 920px; color: var(--text-soft); font-size: 15px; line-height: 1.6; }
.plan-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 20px 0 0; border-block: 1px solid var(--line); }
.plan-facts > div { display: grid; gap: 5px; min-width: 0; padding: 14px 18px 14px 0; }
.plan-facts > div + div { padding-left: 18px; border-left: 1px solid var(--line); }
.plan-facts span { color: var(--faint); font-size: 9px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.plan-facts strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.plan-coverage-status { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: center; margin-top: 17px; padding: 12px 14px; border-left: 2px solid var(--good); background: var(--good-soft); }
.plan-coverage-status.is-attention { border-left-color: var(--warn); background: var(--warn-soft); }
.plan-coverage-status > span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: var(--good); color: white; font-size: 12px; font-weight: 800; }
.plan-coverage-status.is-attention > span { background: var(--warn); }
.plan-coverage-status strong, .plan-coverage-status small { display: block; }
.plan-coverage-status strong { font-size: 12px; }
.plan-coverage-status small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.plan-output-list { display: grid; }
.plan-output-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) minmax(88px, auto); gap: 14px; align-items: center; min-height: 76px; padding: 13px 2px; }
.plan-output-row + .plan-output-row { border-top: 1px solid var(--line); }
.plan-output-number { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--accent); font-size: 9px; font-weight: 800; }
.plan-output-row strong, .plan-output-row p { display: block; }
.plan-output-row strong { font-size: 14px; }
.plan-output-row p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.plan-output-row > small { color: var(--accent); font-size: 10px; font-weight: 700; text-align: right; }
.plan-provenance-list { display: grid; border-top: 1px solid var(--line); }
.plan-provenance-row { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 14px; padding: 16px 2px; border-bottom: 1px solid var(--line); }
.plan-provenance-row > div { min-width: 0; }
.plan-provenance-mark { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--accent); font-size: 10px; font-weight: 800; }
.plan-provenance-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; }
.plan-provenance-title strong { font-size: 13px; }
.plan-provenance-title small { color: var(--faint); font-size: 10px; }
.plan-provenance-row p { max-width: 820px; margin: 6px 0 8px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.plan-provenance-sources { display: flex; flex-wrap: wrap; gap: 5px; }
.plan-provenance-sources span { max-width: 100%; padding: 3px 6px; overflow-wrap: anywhere; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-muted); color: var(--muted); font-size: 9px; line-height: 1.35; }
.plan-fallback-reason { margin-top: 12px; border-left: 2px solid var(--warn); padding: 9px 12px; background: var(--warn-soft); }
.plan-fallback-reason summary { color: var(--text); cursor: pointer; font-size: 11px; font-weight: 700; }
.plan-fallback-reason p { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.plan-requirement-list { display: grid; margin: 0; padding: 0; list-style: none; }
.plan-requirement-list li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; padding: 12px 2px; }
.plan-requirement-list li + li { border-top: 1px solid var(--line); }
.plan-requirement-list li > span { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--good-soft); color: var(--good); font-size: 10px; font-weight: 800; }
.plan-requirement-list strong { padding-top: 2px; font-size: 12px; font-weight: 600; line-height: 1.5; }
.plan-all-requirements { margin-top: 10px; }
.plan-simple-steps { display: grid; margin: 0; padding: 0; list-style: none; }
.plan-simple-steps li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 15px; padding: 16px 2px; }
.plan-simple-steps li + li { border-top: 1px solid var(--line); }
.plan-simple-steps li > span { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid var(--accent); border-radius: 50%; color: var(--accent); font-size: 10px; font-weight: 800; }
.plan-simple-steps strong { font-size: 13px; }
.plan-simple-steps p { max-width: 760px; margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.source-use { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; padding: 17px 2px; border-bottom: 1px solid var(--line); }
.source-usage-list .source-use:last-child { border-bottom: 0; }
.source-use-mark { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--accent); font-size: 11px; font-weight: 800; }
.source-use-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.source-use p { max-width: 760px; margin: 7px 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.source-use small { display: block; margin-top: 8px; overflow: hidden; color: var(--faint); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.provenance-detail { margin-top: 9px; }
.provenance-detail summary { cursor: pointer; color: var(--accent); font-size: 11px; font-weight: 700; }
.provenance-detail p { margin: 7px 0 0; padding-left: 10px; border-left: 2px solid var(--line); color: var(--faint); font-size: 10px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 5px; }
.tag-row span { padding: 3px 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-muted); color: var(--muted); font: 10px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; }
.rules-disclosure > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none; }
.rules-disclosure > summary::-webkit-details-marker { display: none; }
.rules-disclosure > summary strong, .rules-disclosure > summary small { display: block; }
.rules-disclosure > summary small { margin-top: 4px; color: var(--muted); }
.rules-disclosure > summary > span:last-child { color: var(--accent); font-size: 12px; font-weight: 700; }
.constraint-list { margin-top: 16px; border-top: 1px solid var(--line); }
.plan-decisions:not(:empty) { margin-top: 24px; }
.constraint-explained { display: grid; gap: 7px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.rules-disclosure .constraint-explained:last-child { border-bottom: 0; }
.constraint-explained > strong { line-height: 1.5; }
.constraint-explained > small { color: var(--muted); }
.context-boundary-heading { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 24px; }
.context-boundary-heading h3 { margin: 0; }
.context-boundary-heading p { max-width: 680px; margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.technical-boundaries { flex: 0 0 auto; }
.technical-boundaries > summary { display: flex; justify-content: flex-end; padding-top: 17px; color: var(--accent); cursor: pointer; font-size: 12px; font-weight: 700; list-style: none; outline: none; white-space: nowrap; }
.technical-boundaries > summary::-webkit-details-marker { display: none; }
.technical-boundaries-label { display: flex; align-items: center; gap: 7px; border-radius: 4px; }
.technical-boundaries > summary:focus-visible .technical-boundaries-label { outline: 2px solid var(--accent); outline-offset: 3px; }
.technical-boundaries-count { min-width: 19px; padding: 2px 5px; border-radius: 999px; background: var(--accent-soft); font-size: 10px; text-align: center; }
.technical-boundaries[open] { flex: 1 1 100%; width: 100%; }
.technical-boundaries[open] > summary { justify-content: flex-end; }
.technical-boundaries .constraint-list { margin-top: 14px; }
.technical-boundaries .constraint-explained:last-child { border-bottom: 0; }
.approval-composer, .approval-receipt { margin-top: 24px; padding: 22px; border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line)); border-radius: 10px; background: var(--accent-soft); }
.approval-composer > div > p { max-width: 700px; color: var(--muted); line-height: 1.55; }
.approval-composer > label:not(.checkbox-line), .review-note { display: grid; gap: 7px; margin-top: 18px; }
.approval-composer textarea, .review-note textarea { width: 100%; min-height: 96px; padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); color: var(--ink); resize: vertical; line-height: 1.5; }
.approval-composer label > span, .review-note > span { font-size: 11px; font-weight: 700; }
.approval-composer label > small { color: var(--muted); }
.plan-approval-simple > div > p { margin-bottom: 0; }
.plan-change-request { margin-top: 16px; border-block: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line)); }
.plan-change-request > summary { min-height: 44px; display: flex; align-items: center; justify-content: space-between; color: var(--accent); cursor: pointer; font-size: 11px; font-weight: 700; list-style: none; }
.plan-change-request > summary::-webkit-details-marker { display: none; }
.plan-change-request > summary::after { content: "+"; font-size: 17px; font-weight: 450; }
.plan-change-request[open] > summary::after { content: "−"; }
.plan-change-request .task-direction-field { display: grid; gap: 7px; padding-bottom: 16px; }
.plan-change-request textarea { margin-top: 0; }
.task-direction-field > span small { color: var(--faint); font-weight: 650; }
.task-direction-help { margin: 12px 0 0; border-top: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line)); border-bottom: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line)); }
.task-direction-boundary { display: block; margin-top: 12px; color: var(--muted); line-height: 1.5; }
.approval-receipt { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.approval-receipt h3 { margin-bottom: 8px; }
.approval-receipt p { margin-bottom: 8px; white-space: pre-wrap; }
.approval-receipt small { color: var(--muted); }
.approval-check { flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--good); color: white; font-size: 19px; }

.copy-review { display: grid; gap: 22px; }
.review-guidance { display: grid; grid-template-columns: 28px minmax(0, 1fr) 28px minmax(0, 1fr); gap: 10px 14px; align-items: center; margin: 12px 0 20px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-muted); }
.review-guidance > span { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid var(--accent); border-radius: 50%; color: var(--accent); font-size: 11px; font-weight: 800; }
.review-guidance strong, .review-guidance small { display: block; }
.review-guidance small { margin-top: 3px; color: var(--muted); line-height: 1.4; }
.warning-resolution { margin: 10px 0 20px; padding: 16px; border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--line)); border-radius: 9px; background: color-mix(in srgb, var(--warn-soft) 52%, var(--surface)); }
.warning-resolution > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.warning-resolution > header h3 { margin-bottom: 4px; }
.warning-resolution > header p { max-width: 720px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.warning-resolution > header .button { flex: 0 0 auto; }
.warning-resolution ol { display: grid; gap: 0; margin: 14px 0 11px; padding: 0; list-style: none; border-block: 1px solid var(--line); }
.warning-resolution li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.warning-resolution li:last-child { border-bottom: 0; }
.warning-resolution li > span { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.warning-resolution li.is-later > span { color: var(--good); }
.warning-resolution li strong, .warning-resolution li p { display: block; }
.warning-resolution li p { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.warning-resolution code { padding: 1px 4px; border-radius: 4px; background: var(--surface); color: var(--ink); font-size: 10px; }
.warning-resolution > small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.review-warning-list { overflow: hidden; margin: 10px 0; border: 1px solid color-mix(in srgb, var(--warn) 38%, var(--line)); border-radius: 9px; background: color-mix(in srgb, var(--warn-soft) 34%, var(--surface)); }
.review-warning-list > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.review-warning-list > header h3 { margin: 3px 0 0; font-size: 15px; }
.review-warning-group { background: color-mix(in srgb, var(--surface) 84%, transparent); }
.review-warning-group + .review-warning-group { border-top: 1px solid var(--line-strong); }
.review-warning-group > h4 { margin: 0; padding: 9px 16px 7px; color: var(--faint); font-size: 9px; letter-spacing: .07em; text-transform: uppercase; }
.review-warning-group.is-blocking > h4 { color: var(--danger); }
.review-warning-item { border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 88%, transparent); }
.review-warning-item.is-blocking { box-shadow: inset 3px 0 0 var(--danger); }
.review-warning-item > summary { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px 16px; cursor: pointer; list-style: none; }
.review-warning-item > summary::-webkit-details-marker { display: none; }
.review-warning-item > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.review-warning-item > summary > span:nth-child(2) { min-width: 0; }
.review-warning-item > summary strong, .review-warning-item > summary small { display: block; }
.review-warning-item > summary strong { font-size: 12px; }
.review-warning-item > summary small { overflow: hidden; margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.review-warning-state { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--warn-soft); color: var(--warn); font-size: 11px; font-weight: 850; }
.review-warning-item.is-blocking .review-warning-state { background: var(--danger-soft); color: var(--danger); }
.review-warning-expand { color: var(--accent); font-size: 10px; font-weight: 700; }
.review-warning-item[open] .review-warning-expand { font-size: 0; }
.review-warning-item[open] .review-warning-expand::after { content: "Hide"; font-size: 10px; }
.review-warning-details { padding: 0 16px 14px 50px; }
.review-warning-details > p { margin: 0; color: var(--ink); font-size: 12px; line-height: 1.55; }
.review-warning-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 11px; color: var(--muted); font-size: 11px; }
.review-warning-meta > span { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.review-warning-meta b, .review-warning-action b { color: var(--faint); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
.review-warning-meta code { padding: 2px 5px; border-radius: 4px; background: var(--surface-muted); color: var(--accent); font-size: 10px; }
.review-warning-action { display: block; margin-top: 10px; color: var(--muted); line-height: 1.45; }
.review-warning-cta { margin-top: 10px; padding-inline: 0; }
.review-warning-list > footer { padding: 10px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; line-height: 1.45; }
.copy-asset { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.copy-asset > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 17px 18px; background: var(--surface-muted); border-bottom: 1px solid var(--line); }
.copy-asset > header h3 { margin: 0; font-size: 17px; }
.copy-field { padding: 0 18px; border-bottom: 1px solid var(--line); }
.copy-field:last-child { border-bottom: 0; }
.copy-field.is-active { background: color-mix(in srgb, var(--accent-soft) 24%, var(--surface)); }
.copy-field.is-selected { background: color-mix(in srgb, var(--accent-soft) 48%, var(--surface)); }
.copy-field.is-editing { background: color-mix(in srgb, var(--accent-soft) 28%, var(--surface)); }
.copy-field-row { min-width: 0; }
.copy-field.is-selectable .copy-field-row { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 12px; }
.copy-field-content { min-width: 0; }
.copy-field-select { padding-top: 18px; }
.copy-field-select input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.copy-field-select input:disabled { cursor: default; }
.copy-field-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; }
.copy-field-head > div > span, .copy-field-head > div > small { display: block; }
.copy-field-head > div > span { font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.copy-field-head > div > small { margin-top: 3px; color: var(--faint); font-size: 10px; }
.edit-button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--accent); cursor: pointer; font-size: 11px; font-weight: 700; }
.edit-button:hover { background: var(--accent-soft); }
.edit-button.is-active { background: var(--accent-soft); color: var(--accent); }
.copy-value { padding: 13px 0 17px; font-size: 15px; line-height: 1.62; white-space: pre-wrap; }
.copy-value-part + .copy-value-part { margin-top: 15px; }
.copy-value-part.is-greeting { font-weight: 700; }
.placeholder-row { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding: 10px 0 14px; border-top: 1px dashed var(--line); }
.placeholder-row > span { margin-right: 3px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.placeholder-row code { padding: 3px 6px; border-radius: 5px; background: var(--surface-muted); color: var(--accent); font-size: 10px; }
.review-note { margin-top: 18px; }
.english-approval-gate { margin-top: 24px; border-color: color-mix(in srgb, var(--accent) 34%, var(--line)); background: color-mix(in srgb, var(--accent-soft) 44%, var(--surface)); }
.english-approval-gate > h3 { margin-top: 5px; }
.english-approval-confirm { padding: 13px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }
.english-approval-confirm > span { display: grid; gap: 4px; }
.english-approval-confirm strong { font-size: 12px; }
.english-approval-confirm small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.review-note > span small { color: var(--faint); font-weight: 600; }
.english-blocker-override { padding-left: 13px; border-left: 2px solid var(--danger); }
.english-blocker-override > span small { color: var(--danger); }
.unsaved-review-action { margin-top: 8px; }
.english-approval-gate.is-blocked, .locale-approval-gate.is-blocked { border-color: color-mix(in srgb, var(--danger) 42%, var(--line)); background: color-mix(in srgb, var(--danger-soft) 34%, var(--surface)); }
.english-review-phase { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line-strong); }
.english-review-phase > header { margin-bottom: 13px; }
.english-review-phase > header h2 { margin: 4px 0 5px; font-size: 18px; }
.english-review-phase > header p { max-width: 760px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.english-review-phase > .alert + .alert { margin-top: 12px; }
.english-review-phase.is-running { cursor: progress; }
.english-handoff { position: relative; margin: 28px 0 20px; padding: 22px 0; border-block: 1px solid var(--line-strong); }
.english-handoff > header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: start; margin-bottom: 16px; }
.english-handoff > header h3 { margin: 4px 0 6px; font-size: 18px; }
.english-handoff > header p { max-width: 760px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.english-handoff-step { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 1px solid color-mix(in srgb, var(--accent) 54%, var(--line)); border-radius: 50%; color: var(--accent); font-weight: 800; background: var(--accent-soft); }
.english-handoff-actions { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.english-handoff-action { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px 18px; padding: 15px 17px; border-bottom: 1px solid var(--line); }
.english-handoff-action > div:first-child { display: grid; gap: 4px; }
.english-handoff-action small, .english-handoff-lock { color: var(--muted); line-height: 1.45; }
.english-handoff-action.is-sent { background: color-mix(in srgb, var(--good-soft) 34%, var(--surface)); }
.english-handoff-more > summary { padding: 12px 17px; color: var(--muted); font-size: 12px; font-weight: 700; cursor: pointer; }
.english-handoff-more[open] > summary { border-bottom: 1px solid var(--line); }
.english-handoff-more .english-handoff-action { border-bottom: 0; }
.english-handoff-lock { display: block; margin-top: 10px; font-size: 12px; }
.english-handoff.is-locked .english-handoff-actions { opacity: .72; }
.english-approval-gate { position: relative; }
.english-approval-gate > .english-handoff-step { position: absolute; top: 16px; right: 16px; }
.english-review-running { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 15px; align-items: start; padding: 17px 18px; border: 1px solid color-mix(in srgb, var(--accent) 48%, var(--line)); border-radius: 9px; background: color-mix(in srgb, var(--accent-soft) 48%, var(--surface)); }
.english-review-running-indicator { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 24%, var(--line)); }
.english-review-running-indicator .generation-status-spinner { width: 20px; height: 20px; }
.english-review-running-copy h3 { margin: 4px 0 5px; font-size: 16px; }
.english-review-running-copy p { max-width: 760px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.english-review-running-copy > small { display: block; margin-top: 8px; color: var(--faint); font-size: 10px; }
.english-review-running-steps { display: flex; flex-wrap: wrap; gap: 7px; margin: 11px 0 9px; }
.english-review-running-steps span { padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 10px; font-weight: 720; }
.english-review-running-steps .is-active { border-color: color-mix(in srgb, var(--accent) 42%, var(--line)); color: var(--accent); animation: review-step-pulse 1.25s ease-in-out infinite alternate; }
.english-linguist-review { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-muted); }
.english-linguist-review + .english-linguist-review { margin-top: 12px; }
.english-linguist-review > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 16px 17px; cursor: pointer; list-style: none; }
.english-linguist-review > summary::-webkit-details-marker { display: none; }
.english-linguist-review > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.linguist-summary-copy { min-width: 0; }
.linguist-summary-copy > strong, .linguist-summary-copy > small { display: block; }
.linguist-summary-copy > strong { margin-top: 4px; font-size: 15px; }
.linguist-summary-copy > small { max-width: 720px; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.linguist-summary-state { display: grid; justify-items: end; gap: 5px; min-width: 170px; }
.linguist-summary-state > small { color: var(--muted); font-size: 10px; white-space: nowrap; }
.linguist-disclosure-label { color: var(--accent); font-size: 10px; font-weight: 750; }
.english-linguist-review[open] .linguist-disclosure-label { font-size: 0; }
.english-linguist-review[open] .linguist-disclosure-label::after { content: "Hide details"; font-size: 10px; }
.linguist-review-details { padding: 16px 17px 17px; border-top: 1px solid var(--line); background: var(--surface); }
.linguist-review-details > p { max-width: 920px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.quality-dimension-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 14px 0; }
.quality-dimension-grid > div { display: grid; gap: 7px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-muted); }
.quality-dimension-grid small { color: var(--muted); line-height: 1.45; }
.quality-dimension-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.quality-dimension-heading > span { color: var(--accent); font-size: 12px; font-weight: 800; white-space: nowrap; }
.quality-review-compact > p { max-width: 760px; }
.quality-readiness { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 15px 0; }
.quality-readiness > div { display: grid; gap: 4px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-muted); }
.quality-readiness > div.is-ready { border-color: color-mix(in srgb, var(--good) 34%, var(--line)); background: color-mix(in srgb, var(--good-soft) 55%, var(--surface)); }
.quality-readiness > div.is-blocked { border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); background: color-mix(in srgb, var(--danger-soft) 48%, var(--surface)); }
.quality-readiness > div.is-pending { border-color: color-mix(in srgb, var(--warn) 34%, var(--line)); background: color-mix(in srgb, var(--warn-soft) 40%, var(--surface)); }
.quality-readiness span, .quality-compact-metrics span { color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.quality-readiness strong { font-size: 14px; }
.quality-readiness small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.quality-compact-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 13px 0; }
.quality-compact-metrics > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.quality-compact-metrics strong { font-size: 16px; white-space: nowrap; }
.quality-version-history, .quality-score-breakdown { margin: 10px 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.quality-version-history > summary, .quality-score-breakdown > summary { padding: 11px 13px; cursor: pointer; color: var(--ink); font-size: 11px; font-weight: 760; list-style-position: inside; }
.quality-version-history > p { margin: 0; padding: 0 13px 11px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.quality-version-history > div { display: flex; gap: 16px; padding: 10px 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.quality-version-history > div strong { color: var(--ink); }
.quality-score-breakdown .quality-dimension-grid { margin: 0; padding: 0 12px 12px; }
.quality-issues { margin-top: 18px; }
.quality-issues > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 9px; }
.quality-issues > header h3 { margin: 4px 0 0; font-size: 15px; }
.quality-issue-group { overflow: hidden; margin-top: 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.quality-issue-group.is-blocking { border-color: color-mix(in srgb, var(--danger) 42%, var(--line)); }
.quality-issue-group > summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 14px; cursor: pointer; list-style: none; }
.quality-issue-group > summary::-webkit-details-marker { display: none; }
.quality-issue-group > summary > span:first-child { min-width: 0; }
.quality-issue-group > summary strong, .quality-issue-group > summary small { display: block; }
.quality-issue-group > summary strong { font-size: 13px; }
.quality-issue-group > summary small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.quality-group-count { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; background: var(--surface-muted); color: var(--muted); font-size: 10px; font-weight: 750; white-space: nowrap; }
.quality-group-body { padding: 0 14px 14px; border-top: 1px solid var(--line); }
.quality-group-scope { margin: 11px 0; color: var(--muted); font-size: 10px; }
.quality-issue-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.quality-issue-row > div > strong { font-size: 12px; }
.quality-issue-row p { margin: 4px 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.quality-issue-row > div > small { color: var(--faint); font-size: 10px; }
.quality-group-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.quality-acceptance { margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); }
.quality-acceptance > summary { width: fit-content; cursor: pointer; color: var(--muted); font-size: 10px; font-weight: 730; }
.quality-acceptance form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: end; margin-top: 10px; }
.quality-acceptance label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; }
.quality-acceptance textarea { min-height: 72px; }
.quality-acceptance form > small { grid-column: 1 / -1; color: var(--faint); font-size: 10px; }
.quality-accepted-note { display: grid; gap: 3px; margin-top: 12px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--good) 35%, var(--line)); border-radius: 8px; background: color-mix(in srgb, var(--good-soft) 50%, var(--surface)); }
.quality-accepted-note strong { font-size: 11px; }
.quality-accepted-note small, .quality-group-boundary { color: var(--muted); font-size: 10px; line-height: 1.45; }
.copy-field.is-selected { scroll-margin-block: 96px; }
.quality-overview-technical, .quality-dimension-technical, .review-finding-technical { color: var(--faint); font-size: 10px; }
.quality-overview-technical { margin-top: 8px; }
.quality-overview-technical summary, .quality-dimension-technical summary, .review-finding-technical summary { width: fit-content; cursor: pointer; font-weight: 720; }
.quality-overview-technical[open] summary, .quality-dimension-technical[open] summary, .review-finding-technical[open] summary { color: var(--accent); }
.quality-overview-technical p, .quality-dimension-technical p { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.quality-revision-action { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; padding: 14px 15px; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius: 9px; background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); }
.quality-revision-action > div { display: grid; gap: 4px; }
.quality-revision-action small { max-width: 720px; color: var(--muted); line-height: 1.45; }
.quality-revision-action .button { flex: 0 0 auto; }
.quality-revision-action.is-escalated { align-items: flex-start; border-color: color-mix(in srgb, var(--warn) 42%, var(--line)); background: color-mix(in srgb, var(--warn-soft) 42%, var(--surface)); }
.quality-remediation-progress { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.quality-remediation-progress > div { display: grid; gap: 3px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.quality-remediation-progress span { color: var(--muted); font-size: 12px; }
.quality-remediation-progress strong { font-size: 18px; }
.quality-remediation-progress strong.is-positive { color: var(--good); }
.quality-remediation-progress strong.is-negative { color: var(--danger); }
.trusted-eligibility { display: grid; gap: 4px; margin-bottom: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; }
.trusted-eligibility small { color: var(--muted); line-height: 1.45; }
.trusted-eligibility.is-ready { border-color: color-mix(in srgb, var(--good) 40%, var(--line)); background: color-mix(in srgb, var(--good) 8%, var(--surface)); }
.trusted-eligibility.is-blocked { border-color: color-mix(in srgb, var(--warn) 42%, var(--line)); background: color-mix(in srgb, var(--warn-soft) 35%, var(--surface)); }
.deliverable-history-choice.is-disabled { opacity: .55; cursor: not-allowed; }
@media (max-width: 760px) {
  .quality-readiness { grid-template-columns: 1fr; }
  .quality-compact-metrics { grid-template-columns: 1fr; }
  .quality-acceptance form { grid-template-columns: 1fr; }
  .quality-acceptance form > small { grid-column: auto; }
}
.instruction-count { display: block; margin-top: -4px; color: var(--faint); font-size: 10px; text-align: right; }
.linguist-finding-list { margin-top: 13px; border-top: 1px solid var(--line); }
.linguist-review-boundary { display: block; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--faint); font-size: 10px; line-height: 1.5; }
.review-finding > div > small { display: block; margin-top: 3px; color: var(--muted); line-height: 1.45; }
.review-finding-copy { min-width: 0; }
.review-finding-technical { margin-top: 8px; }
.review-finding-technical dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin: 9px 0 0; padding: 10px 12px; border-left: 2px solid var(--line); background: var(--surface-muted); }
.review-finding-technical dl > div { min-width: 0; }
.review-finding-technical dl > .is-wide { grid-column: 1 / -1; }
.review-finding-technical dt { color: var(--faint); font-size: 9px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.review-finding-technical dd { margin: 3px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.review-finding.is-blocking { border-bottom-color: color-mix(in srgb, var(--danger) 20%, var(--line)); }
.review-finding.is-blocking .check-icon { background: var(--danger-soft); color: var(--danger); }
.review-finding.is-warning .check-icon { background: var(--warn-soft); color: var(--warn); }
@media (max-width: 620px) {
  .review-finding-technical dl { grid-template-columns: 1fr; }
  .review-finding-technical dl > .is-wide { grid-column: auto; }
}
.locale-review-section { overflow: hidden; }
.locale-linguist-review { margin: 22px 0 0; padding: 17px 18px; border-block: 1px solid var(--line); background: var(--surface-muted); }
.locale-linguist-review .section-header { align-items: flex-start; }
.locale-linguist-review h4 { max-width: 720px; margin: 4px 0 0; font-size: 13px; line-height: 1.45; }
.locale-approval-gate { margin-top: 18px; padding: 17px 18px; border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line)); border-radius: 9px; background: color-mix(in srgb, var(--accent-soft) 34%, var(--surface)); }
.locale-approval-gate > h4 { margin: 4px 0 5px; font-size: 15px; }
.locale-approval-gate > p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.locale-approval-confirm { margin-top: 14px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }
.locale-approval-confirm > span { display: grid; gap: 4px; }
.locale-approval-confirm strong { font-size: 12px; }
.locale-approval-confirm small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.locale-approval-receipt { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-top: 18px; padding: 15px 17px; border: 1px solid color-mix(in srgb, var(--good) 34%, var(--line)); border-radius: 9px; background: var(--good-soft); }
.locale-approval-receipt > div { display: grid; gap: 4px; }
.locale-approval-receipt small { color: var(--muted); line-height: 1.45; }
.locale-blocker-resolution { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .8fr); gap: 24px; margin: 18px; padding: 18px; border: 1px solid color-mix(in srgb, var(--warn) 52%, var(--line)); border-radius: 9px; background: color-mix(in srgb, var(--warn-soft) 54%, var(--surface)); }
.locale-blocker-resolution h4 { margin: 5px 0 7px; }
.locale-blocker-resolution p, .locale-blocker-resolution small { color: var(--muted); line-height: 1.5; }
.locale-blocker-resolution form { display: grid; gap: 12px; }
.locale-blocker-resolution textarea { width: 100%; min-height: 82px; padding: 10px 11px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); color: var(--ink); resize: vertical; }
.locale-blocker-resolution .button-row { margin-top: 0; }
.locale-review-actions { padding-top: 2px; }
.locale-stage { overflow: hidden; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.locale-stage.is-active { border-color: color-mix(in srgb, var(--accent) 42%, var(--line)); }
.locale-stage.is-complete { border-color: color-mix(in srgb, var(--good) 36%, var(--line)); }
.locale-stage.is-attention { border-color: color-mix(in srgb, var(--warn) 46%, var(--line)); }
.locale-stage.is-locked { border-color: var(--line); }
.locale-source-binding { background: var(--surface); }
.locale-source-binding > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 17px 18px; }
.locale-source-binding > header .eyebrow { margin-bottom: 5px; }
.locale-source-binding > header h3 { margin: 0; font-size: 17px; }
.locale-source-binding > header p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.source-hash-lock { flex: 0 0 auto; display: grid; justify-items: end; gap: 5px; }
.source-hash-lock span { color: var(--good); font-size: 10px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.locale-source-binding.is-attention .source-hash-lock span { color: var(--warn); }
.source-hash-lock code { padding: 4px 7px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--accent); font-size: 10px; }
.locale-source-binding > details { border-top: 1px solid var(--line); background: var(--surface); }
.locale-source-binding > details > summary { padding: 12px 18px; color: var(--accent); cursor: pointer; font-size: 11px; font-weight: 700; }
.locale-source-binding > details > summary:hover { background: var(--surface-muted); }
.locale-source-preview { padding: 0 18px 18px; }
.locale-source-preview .editor { border: 1px solid var(--line); border-radius: 8px; }
.locale-source-confirm { margin: 0; padding: 14px 18px; border-top: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.locale-source-confirm > span { display: grid; gap: 4px; }
.locale-source-confirm strong { font-size: 12px; }
.locale-source-confirm small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.source-chain-blocker { display: grid; gap: 4px; padding: 14px 18px; border-top: 1px solid color-mix(in srgb, var(--warn) 38%, var(--line)); background: var(--warn-soft); color: var(--warn); }
.source-chain-blocker small { color: var(--muted); line-height: 1.45; }
.locale-generation-action { justify-content: flex-end; margin: -2px 0 18px; }
.locale-pipeline-overview { display: grid; grid-template-columns: 58px minmax(0, 1fr); align-items: center; gap: 14px 18px; padding: 17px 18px; }
.locale-progress-ring { position: relative; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--accent) var(--locale-progress), var(--surface-muted) 0); }
.locale-progress-ring::before { position: absolute; inset: 5px; border-radius: inherit; background: var(--surface); content: ""; }
.locale-progress-ring span { position: relative; font-size: 11px; font-weight: 800; }
.locale-progress-copy h3 { margin: 4px 0 3px; font-size: 17px; }
.locale-progress-copy p { margin: 0; color: var(--muted); font-size: 11px; }
.locale-progress-track { height: 3px; margin-top: 10px; overflow: hidden; border-radius: 99px; background: var(--surface-muted); }
.locale-progress-track i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .24s ease; }
.locale-pipeline-actions { grid-column: 1 / -1; justify-self: stretch; }
.locale-pipeline-actions .button { width: 100%; }
.locale-pipeline-actions small { display: block; max-width: none; margin-top: 6px; color: var(--muted); font-size: 9px; text-align: left; }
.locale-batch-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 14px 18px; padding: 17px 18px; }
.locale-batch-summary { min-width: 0; }
.locale-batch-bar h3, .locale-batch-bar small { display: block; }
.locale-batch-bar h3 { margin: 4px 0 0; font-size: 17px; }
.locale-batch-bar small { max-width: 720px; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.locale-stage-status { align-self: start; padding: 4px 7px; border: 1px solid var(--line); border-radius: 5px; color: var(--faint); font-size: 9px; font-weight: 760; letter-spacing: .05em; text-transform: uppercase; }
.locale-stage.is-active .locale-stage-status { border-color: color-mix(in srgb, var(--accent) 34%, var(--line)); color: var(--accent); }
.locale-stage.is-complete .locale-stage-status { border-color: color-mix(in srgb, var(--good) 32%, var(--line)); color: var(--good); }
.locale-stage.is-attention .locale-stage-status { border-color: color-mix(in srgb, var(--warn) 38%, var(--line)); color: var(--warn); }
.locale-batch-controls { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px 14px; min-width: 0; padding-top: 14px; border-top: 1px solid var(--line); }
.locale-batch-controls label { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; color: var(--muted); font-size: 10px; line-height: 1.35; }
.locale-batch-controls .button { white-space: nowrap; }
.locale-batch-controls .locale-select-all { border-color: color-mix(in srgb, var(--accent) 38%, var(--line)); background: var(--accent-soft); color: var(--accent); }
.locale-batch-controls .locale-select-all:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 78%, var(--surface)); }
.locale-batch-controls .button.primary { flex: 1 0 100%; width: 100%; }
.locale-pipeline-list { border-top: 1px solid var(--line); }
.locale-review-section { border-bottom: 1px solid var(--line); background: var(--surface); }
.locale-review-section > summary { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto auto 18px; align-items: center; gap: 13px; min-height: 76px; padding: 10px 16px; cursor: pointer; list-style: none; }
.locale-review-section > summary::-webkit-details-marker { display: none; }
.locale-review-section > summary:hover { background: var(--surface-muted); }
.locale-review-section > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.locale-summary-copy { min-width: 0; justify-self: start; text-align: left; }
.locale-summary-copy strong, .locale-summary-copy small { display: block; }
.locale-summary-copy strong { font-size: 14px; }
.locale-summary-copy small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.locale-status-label { color: var(--muted); font-size: 10px; font-weight: 760; letter-spacing: .035em; text-transform: uppercase; white-space: nowrap; }
.locale-review-section.is-active .locale-status-label { color: var(--accent); }
.locale-review-section.is-reviewed .locale-status-label, .locale-review-section.is-approved .locale-status-label { color: var(--good); }
.locale-review-section.is-failed .locale-status-label { color: var(--danger); }
.locale-state-icon { position: relative; width: 22px; height: 22px; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface); }
.locale-state-icon::after { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); content: "·"; font-weight: 900; }
.locale-review-section.is-active .locale-state-icon { border: 2px solid var(--accent-soft); border-top-color: var(--accent); animation: locale-spin .8s linear infinite; }
.locale-review-section.is-active .locale-state-icon::after { content: ""; }
.locale-review-section.is-reviewed .locale-state-icon, .locale-review-section.is-approved .locale-state-icon { border-color: transparent; background: var(--good-soft); }
.locale-review-section.is-reviewed .locale-state-icon::after, .locale-review-section.is-approved .locale-state-icon::after { color: var(--good); content: "✓"; }
.locale-review-section.is-failed .locale-state-icon { border-color: transparent; background: var(--danger-soft); }
.locale-review-section.is-failed .locale-state-icon::after { color: var(--danger); content: "!"; }
.locale-approval-select { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.locale-select-spacer { width: 18px; }
.locale-disclosure { color: var(--muted); transition: transform .16s ease; }
.locale-review-section[open] > summary .locale-disclosure { transform: rotate(180deg); }
.locale-review-body { padding: 0; border-top: 1px solid var(--line); background: var(--surface); }
.review-sample-materials { margin: 18px; padding: 18px; border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line)); border-radius: 14px; background: color-mix(in srgb, var(--accent) 7%, transparent); }
.review-sample-materials > .eyebrow { display: block; margin: 0 0 12px; }
.review-sample-materials .copy-selection-toolbar { display: none; }
.full-locale-result { margin: 12px 18px 20px; border-top: 1px solid var(--line); }
.full-locale-result > summary { cursor: pointer; padding: 16px 0; color: var(--accent); font-weight: 700; }
.locale-review-body > .copy-review { gap: 22px; padding: 18px; }
.locale-review-body .copy-asset { border: 1px solid var(--line); border-radius: 10px; }
.locale-review-body .copy-asset + .copy-asset { border-top: 1px solid var(--line); }
.locale-review-body .copy-asset:last-child { border-bottom: 1px solid var(--line); }
.locale-linguist-review { margin: 0; border-top: 10px solid var(--surface-muted); border-bottom: 1px solid var(--line); }
.locale-linguist-review .section-header small { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; }
.locale-linguist-review-compact { padding: 0; }
.locale-linguist-review-compact > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto 18px; align-items: center; gap: 12px; padding: 14px 18px; cursor: pointer; list-style: none; }
.locale-linguist-review-compact > summary::-webkit-details-marker { display: none; }
.locale-linguist-review-compact > summary:hover { background: color-mix(in srgb, var(--good-soft) 42%, var(--surface-muted)); }
.locale-linguist-review-compact > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.locale-linguist-review-compact > summary strong, .locale-linguist-review-compact > summary small { display: block; }
.locale-linguist-review-compact > summary strong { font-size: 12px; }
.locale-linguist-review-compact > summary small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.locale-linguist-review-compact[open] > summary .locale-disclosure { transform: rotate(180deg); }
.locale-linguist-review-compact > .locale-finding-list { margin: 0; padding: 13px 18px 16px; border-top: 1px solid var(--line); background: var(--surface); }
.locale-finding-list { margin-top: 13px; border-top: 1px solid var(--line); }
.locale-review-actions { margin: 0; padding: 16px 18px; }
.locale-review-body > .alert, .locale-review-body > .review-warning-list, .locale-review-body > .locale-failure, .locale-review-body > .locale-approval-receipt { margin-inline: 18px; }
.locale-failure { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 14px 0; padding: 13px 14px; border-left: 2px solid var(--danger); background: var(--danger-soft); }
.locale-failure strong, .locale-failure small { display: block; }
.locale-failure small { margin-top: 3px; color: var(--muted); }
@keyframes locale-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .locale-review-section.is-active .locale-state-icon { animation-duration: 1.8s; } .locale-progress-track i { transition: none; } }
.approval-receipt.is-preview { border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); background: var(--warn-soft); }
.approval-receipt.is-preview .approval-check { background: var(--warn); }

.inline-comment, .inline-rewrite { margin: 0 -18px; border-top: 1px solid color-mix(in srgb, var(--accent) 36%, var(--line)); background: color-mix(in srgb, var(--accent-soft) 38%, var(--surface)); animation: inline-editor-in .16s ease-out; }
.inline-comment { padding: 16px 18px 18px; }
.inline-comment-heading, .inline-comment-footer, .inline-rewrite > header, .inline-rewrite > footer { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.inline-comment-heading strong, .inline-comment-heading small { display: block; }
.inline-comment-heading small { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.inline-comment-heading .eyebrow { margin-bottom: 5px; }
.inline-comment-close { flex: 0 0 auto; width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; font-size: 19px; line-height: 1; }
.inline-comment-close:hover { background: var(--surface); color: var(--ink); }
.inline-comment textarea { width: 100%; min-height: 86px; margin-top: 13px; padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); color: var(--ink); resize: vertical; line-height: 1.5; }
.inline-comment textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.inline-comment.is-generating { border-color: color-mix(in srgb, var(--accent) 62%, var(--line)); }
.inline-selected-fields { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.inline-selected-fields span { padding: 4px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 10px; font-weight: 700; }
.generation-status { display: grid; gap: 9px; margin-top: 13px; padding: 11px 13px; border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line)); border-radius: 8px; background: color-mix(in srgb, var(--accent-soft) 58%, var(--surface)); }
.generation-status-copy { display: flex; align-items: center; gap: 10px; }
.generation-status-copy > span:last-child { display: grid; gap: 2px; }
.generation-status-copy strong { font-size: 11px; }
.generation-status-copy small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.generation-status-spinner, .generation-button-spinner { flex: 0 0 auto; border: 2px solid color-mix(in srgb, var(--accent) 24%, transparent); border-top-color: var(--accent); border-radius: 50%; animation: generation-spin .72s linear infinite; }
.generation-status-spinner { width: 17px; height: 17px; }
.generation-button-spinner { width: 14px; height: 14px; border-color: rgba(255, 255, 255, .28); border-top-color: #fff; }
.generation-progress-track { height: 3px; overflow: hidden; border-radius: 99px; background: color-mix(in srgb, var(--accent) 13%, var(--surface)); }
.generation-progress-track i { display: block; width: 34%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, transparent, var(--accent), transparent); animation: generation-sweep 1.15s cubic-bezier(.4, 0, .2, 1) infinite; }
.generation-button.is-generating { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.generation-button.is-generating:disabled { opacity: 1; cursor: progress; }
.inline-comment-footer { align-items: center; margin-top: 11px; }
.inline-comment-footer .button-row, .inline-rewrite > footer .button-row { margin-top: 0; }
.inline-comment-options { margin: 16px -18px -18px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 76%, var(--surface-muted)); animation: inline-editor-in .16s ease-out; }
.inline-comment-options > header { padding: 15px 18px 11px; }
.inline-comment-options > header .eyebrow { margin-bottom: 5px; }
.inline-comment-options > header strong { display: block; font-size: 13px; }
.inline-option { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--line); }
.inline-option strong, .inline-option small { display: block; }
.inline-option small { max-width: 660px; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.inline-manual-editor { padding: 17px 18px 18px; border-top: 1px solid var(--line); background: var(--surface); animation: inline-editor-in .16s ease-out; }
.inline-manual-fields { display: grid; gap: 15px; }
.inline-manual-fields .dialog-field { margin-bottom: 0; }
.inline-manual-editor textarea { min-height: 118px; margin-top: 0; }
.inline-manual-editor .button-row { justify-content: flex-end; }
.inline-field-editor { margin: 0 -18px; border-top: 1px solid color-mix(in srgb, var(--accent) 36%, var(--line)); background: color-mix(in srgb, var(--accent-soft) 38%, var(--surface)); animation: inline-editor-in .16s ease-out; }
.inline-field-editor form { padding: 16px 18px 18px; }
.inline-field-editor .inline-manual-fields { margin-top: 15px; }
.inline-field-editor .dialog-field { margin-bottom: 0; }
.inline-field-editor textarea { min-height: 118px; }
.inline-field-editor-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; }
.inline-field-editor-footer small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.inline-rewrite > header { padding: 15px 18px 13px; }
.inline-rewrite > header p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; white-space: pre-wrap; }
.inline-rewrite > header .eyebrow { margin-bottom: 0; }
.inline-rewrite-comparison { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.inline-rewrite-comparison > div { min-width: 0; padding: 15px 18px 17px; }
.inline-rewrite-comparison > div + div { border-left: 1px solid var(--line); }
.inline-rewrite-comparison span { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.inline-rewrite-comparison p { margin: 8px 0 0; font-size: 14px; line-height: 1.55; white-space: pre-wrap; }
.inline-rewrite-comparison .is-proposed { background: color-mix(in srgb, var(--accent-soft) 52%, var(--surface)); }
.inline-rewrite-comparison .is-proposed span { color: var(--accent); }
.inline-rewrite > footer { align-items: center; padding: 12px 18px 15px; border-top: 1px solid var(--line); }
.inline-rewrite > footer small { color: var(--muted); }
.copy-asset > .inline-comment, .copy-asset > .inline-rewrite { margin: 0; }
.copy-selection-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-muted); }
.copy-selection-toolbar > div:first-child { display: grid; gap: 3px; }
.copy-selection-toolbar strong { font-size: 12px; }
.copy-selection-toolbar small { color: var(--muted); font-size: 11px; }
.copy-selection-toolbar .button-row { margin: 0; }
.locale-review-body .locale-selection-composer { margin: 0; border-top: 10px solid var(--surface-muted); border-bottom: 1px solid var(--line); }
.locale-selection-composer .inline-selected-fields span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes inline-editor-in { from { opacity: 0; transform: translateY(-5px); } }
@keyframes generation-spin { to { transform: rotate(360deg); } }
@keyframes generation-sweep { from { transform: translateX(-120%); } to { transform: translateX(360%); } }
@keyframes review-step-pulse { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent); } to { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 10%, transparent); } }
@media (prefers-reduced-motion: reduce) {
  .generation-status-spinner, .generation-button-spinner, .task-analysis-spinner { animation-duration: 1.8s; }
  .generation-progress-track i, .task-analysis-track i { width: 100%; animation: none; opacity: .55; }
  .english-review-running-steps .is-active { animation: none; }
}

.dialog-overlay { position: fixed; inset: 0; z-index: 100; display: flex; justify-content: flex-end; padding: 14px; background: rgba(12, 14, 21, .58); backdrop-filter: blur(4px); animation: overlay-in .14s ease-out; }
.edit-dialog { width: min(620px, 100%); height: 100%; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-raised); box-shadow: var(--shadow); animation: dialog-in .18s ease-out; }
.edit-dialog > header { position: sticky; top: 0; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface-raised) 94%, transparent); backdrop-filter: blur(10px); }
.edit-dialog > header h2 { margin-bottom: 4px; }
.edit-dialog > header p { margin: 0; color: var(--muted); }
.dialog-close { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); cursor: pointer; font-size: 21px; line-height: 1; }
.edit-dialog form { padding: 24px; }
.annotation-current { display: grid; gap: 14px; margin-bottom: 22px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-muted); }
.annotation-current > div + div { padding-top: 13px; border-top: 1px solid var(--line); }
.annotation-current small { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.annotation-current p { margin: 5px 0 0; line-height: 1.55; white-space: pre-wrap; }
.annotation-input textarea { min-height: 142px; }
.dialog-field { display: grid; gap: 9px; margin-bottom: 22px; }
.dialog-field > span strong, .dialog-field > span small { display: block; }
.dialog-field > span small { margin-top: 4px; color: var(--muted); font-weight: 400; line-height: 1.45; }
.dialog-field input, .dialog-field textarea, .dialog-field select { width: 100%; padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); color: var(--ink); resize: vertical; line-height: 1.55; }
.dialog-field input:focus, .dialog-field textarea:focus, .dialog-field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dialog-note { display: grid; gap: 4px; padding: 13px 14px; border-left: 3px solid var(--accent); background: var(--surface-muted); }
.dialog-note span { color: var(--muted); font-size: 11px; line-height: 1.45; }
.context-option { display: flex; align-items: flex-start; gap: 10px; margin: -4px 0 20px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.context-option:has(input:checked) { border-color: color-mix(in srgb, var(--accent) 48%, var(--line)); background: var(--accent-soft); }
.context-option input { margin-top: 3px; }
.context-option strong, .context-option small { display: block; }
.context-option small { margin-top: 4px; color: var(--muted); line-height: 1.45; }
.button-row.split { justify-content: space-between; }
.button.quiet { border-color: transparent; color: var(--muted); }
.button.quiet:hover { color: var(--ink); }
@keyframes overlay-in { from { opacity: 0; } }
@keyframes dialog-in { from { opacity: 0; transform: translateX(14px); } }

.locale-grid { display: grid; gap: 10px; }
.locale-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) 100px auto; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 8px; }
.locale-row small { color: var(--muted); }
.progress-track { height: 6px; background: var(--surface-muted); border-radius: 3px; overflow: hidden; }
.progress-track span { display: block; height: 100%; background: var(--good); }
.qa-validation-stack { display: grid; gap: 18px; }
.qa-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.qa-card { padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.qa-card strong { display: block; font-size: 24px; }
.qa-card span { color: var(--muted); font-size: 11px; }
.qa-section { margin: 0; }
.qa-section > h3 { margin-top: 0; }
.qa-legacy-notice { display: grid; gap: 12px; }
.qa-legacy-notice > .button-row, .qa-actions { margin-top: 0; }
.qa-check { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.qa-check:last-child { border-bottom: 0; }
.qa-check-copy { min-width: 0; display: grid; gap: 4px; }
.qa-check-copy strong { display: block; line-height: 1.25; overflow-wrap: anywhere; }
.qa-check-copy code { width: fit-content; max-width: 100%; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.qa-check-copy small { display: block; color: var(--muted); line-height: 1.45; overflow-wrap: anywhere; }
.check-icon { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; background: var(--good-soft); color: var(--good); }

.deliverable-stack { display: grid; gap: 18px; }
.deliverable-legacy { display: grid; justify-items: start; gap: 12px; }
.deliverable-hero { padding: 27px; border: 1px solid var(--line); border-radius: 9px; background: linear-gradient(135deg, var(--surface) 50%, var(--accent-soft)); }
.deliverable-hero h2 { margin-bottom: 8px; }
.deliverable-control-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.deliverable-approval-state { display: flex; align-items: center; gap: 11px; }
.deliverable-approval-state > span:last-child { display: grid; gap: 3px; }
.deliverable-approval-state small { color: var(--muted); }
.deliverable-approval-form { display: grid; gap: 14px; max-width: 760px; }
.deliverable-approval-form fieldset { display: grid; gap: 9px; margin: 0; padding: 0; border: 0; }
.deliverable-approval-form legend { margin-bottom: 8px; font-weight: 800; }
.deliverable-history-choice { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-muted); cursor: pointer; }
.deliverable-history-choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.deliverable-history-choice input { margin-top: 3px; }
.deliverable-history-choice span { display: grid; gap: 3px; }
.deliverable-history-choice small { color: var(--muted); line-height: 1.45; }
.deliverable-approval-form > .button { justify-self: start; }
.deliverable-link { grid-column: 1 / -1; display: flex; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.deliverable-link input { flex: 1; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-muted); color: var(--muted); }
.deliverable-export-section { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.deliverable-export-section > header { padding: 18px; border-bottom: 1px solid var(--line); }
.deliverable-export-section > header h3 { margin: 5px 0 4px; }
.deliverable-export-section > header p { margin: 0; color: var(--muted); font-size: 11px; }
.export-format-list { display: grid; }
.export-format-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px 18px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.export-format-row > div:first-child { display: grid; gap: 4px; }
.export-format-row small { color: var(--muted); line-height: 1.45; }
.export-format-row.is-google { grid-template-columns: minmax(0, 1fr) auto auto; background: color-mix(in srgb, var(--accent-soft) 22%, var(--surface)); }
.export-format-row.is-google.is-published { background: color-mix(in srgb, var(--good-soft) 35%, var(--surface)); }
.google-publication-actions { display: flex; align-items: center; gap: 8px; }
.additional-formats > summary { padding: 13px 18px; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 700; list-style-position: inside; }
.additional-formats[open] > summary { border-bottom: 1px solid var(--line); }
.additional-formats .export-format-row { border-bottom: 0; }
.deliverable-note { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.format-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.format-option { display: block; padding: 14px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.format-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.format-option strong, .format-option small { display: block; }
.format-option small { margin-top: 4px; color: var(--muted); }

.toast-region { position: fixed; z-index: 80; right: 18px; bottom: 18px; display: grid; gap: 8px; }
.toast { max-width: 360px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-raised); box-shadow: var(--shadow); animation: toast-in .18s ease-out; }
.toast-problem { width: min(420px, calc(100vw - 36px)); max-width: 420px; padding: 15px 16px; border-color: color-mix(in srgb, var(--danger) 62%, var(--line)); }
.toast-problem-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.toast-problem-head strong { font-size: 13px; line-height: 1.35; }
.toast-problem-head button { width: 24px; height: 24px; padding: 0; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 18px; line-height: 1; cursor: pointer; }
.toast-problem > p { margin: 7px 0 10px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.toast-problem > small { display: block; font-size: 11px; line-height: 1.45; }
.toast-problem > small b { margin-right: 5px; color: var(--text); }
.toast-problem details { margin-top: 11px; padding-top: 9px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.toast-problem details summary { cursor: pointer; }
.toast-problem details code { display: inline-block; margin: 8px 8px 0 0; color: var(--muted); }
.toast-problem details span { color: var(--muted); }
.toast-problem details p { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.knowledge-layout { display: grid; grid-template-columns: 258px minmax(0, 1fr); min-height: calc(100vh - 58px); }
.knowledge-sidebar { min-width: 0; position: sticky; top: 58px; align-self: start; height: calc(100vh - 58px); display: flex; flex-direction: column; padding: 28px 18px 20px; border-right: 1px solid var(--line); background: var(--surface); overflow-y: auto; }
.knowledge-sidebar-head { padding: 0 8px 22px; }
.knowledge-sidebar-head h1 { margin: 6px 0 8px; font-size: 22px; letter-spacing: -.035em; }
.knowledge-sidebar-head p, .knowledge-boundary p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.knowledge-sidebar nav { display: grid; gap: 5px; }
.knowledge-mobile-picker { display: none; }
.knowledge-brand { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 10px; border: 1px solid transparent; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; }
.knowledge-brand:hover { background: var(--surface-muted); }
.knowledge-brand.is-active { border-color: var(--line); background: var(--accent-soft); }
.knowledge-brand span, .knowledge-brand strong, .knowledge-brand small { display: block; min-width: 0; }
.knowledge-brand small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.knowledge-brand > b { min-width: 21px; height: 21px; display: grid; place-items: center; border-radius: 50%; background: var(--warn-soft); color: var(--warn); font-size: 10px; }
.knowledge-boundary { margin-top: auto; padding: 15px 10px 2px; border-top: 1px solid var(--line); }
.knowledge-boundary strong { display: block; margin-bottom: 5px; font-size: 12px; }
.knowledge-workspace { min-width: 0; width: min(100%, 1020px); padding: 42px clamp(24px, 5vw, 70px) 90px; }
.knowledge-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; padding-bottom: 27px; border-bottom: 1px solid var(--line); }
.knowledge-hero h1 { margin: 8px 0 10px; font-size: clamp(38px, 5vw, 58px); line-height: .98; letter-spacing: -.055em; }
.knowledge-hero p { max-width: 680px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.knowledge-score { flex: 0 0 auto; display: grid; justify-items: end; padding-top: 4px; }
.knowledge-score strong { font-size: 28px; letter-spacing: -.04em; }
.knowledge-score span { color: var(--muted); font-size: 11px; }
.knowledge-metrics { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.knowledge-metrics > div { display: grid; gap: 3px; padding: 18px 16px; border-right: 1px solid var(--line); }
.knowledge-metrics > div:first-child { padding-left: 0; }
.knowledge-metrics > div:last-child { border-right: 0; }
.knowledge-metrics strong { font-size: 18px; letter-spacing: -.025em; }
.knowledge-metrics span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .055em; }
.knowledge-jumps { position: sticky; top: 70px; z-index: 8; display: flex; gap: 4px; width: 100%; max-width: 100%; margin: 16px 0 -10px; padding: 5px; border: 1px solid var(--line); border-radius: 9px; background: color-mix(in srgb, var(--surface) 94%, transparent); box-shadow: 0 5px 18px rgba(25, 28, 40, .05); backdrop-filter: blur(10px); overflow-x: auto; }
.knowledge-jumps button { padding: 7px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 11px; white-space: nowrap; cursor: pointer; }
.knowledge-jumps button:hover, .knowledge-jumps button:focus-visible { background: var(--surface-muted); color: var(--ink); }
.knowledge-section { padding: 40px 0; border-bottom: 1px solid var(--line); }
.knowledge-section { scroll-margin-top: 115px; }
.knowledge-section > header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 4px 16px; margin-bottom: 22px; }
.knowledge-section > header .eyebrow { grid-column: 1 / -1; }
.knowledge-section h2 { margin: 0; font-size: 25px; letter-spacing: -.035em; }
.knowledge-essence { max-width: 760px; margin: 0 0 25px; font-size: 17px; line-height: 1.6; }
.knowledge-tone-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 42px; }
.knowledge-tone-list h4 { margin: 0 0 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; }
.knowledge-tone-list ul { display: grid; gap: 10px; margin: 0; padding-left: 18px; color: var(--muted); line-height: 1.52; }
.knowledge-readonly { align-self: center; color: var(--muted); font-size: 11px; }
.knowledge-rows { border-top: 1px solid var(--line); }
.knowledge-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.knowledge-row strong, .knowledge-row small { display: block; }
.knowledge-row strong { font-size: 13px; }
.knowledge-row a { text-decoration: none; }
.knowledge-row a:hover { color: var(--accent); }
.knowledge-row small { margin-top: 4px; color: var(--muted); font-size: 10px; text-transform: capitalize; }
.knowledge-decisions { display: grid; gap: 10px; }
.knowledge-decision { padding: 19px 20px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.knowledge-decision.is-blocking { border-left: 3px solid var(--warn); }
.knowledge-decision > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto 18px; align-items: center; gap: 14px; cursor: pointer; list-style: none; }
.knowledge-decision > summary::-webkit-details-marker { display: none; }
.knowledge-decision > summary strong { display: block; margin-top: 4px; font-size: 15px; }
.knowledge-decision[open] > summary { padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.knowledge-decision[open] > summary .locale-profile-expand { transform: rotate(180deg); }
.knowledge-decision-body { padding-top: 8px; }
.knowledge-decision p { margin: 8px 0; color: var(--muted); line-height: 1.55; }
.knowledge-decision p b { color: var(--ink); }
.knowledge-decision .button-row { margin-top: 16px; }
.knowledge-record { display: grid; gap: 4px; margin-top: 14px; padding: 12px 13px; border-left: 2px solid var(--good); background: var(--good-soft); }
.knowledge-record span { line-height: 1.45; }
.knowledge-record small { color: var(--muted); }
.knowledge-approvals { border-top: 1px solid var(--line); }
.knowledge-approval { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 16px; min-height: 67px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.knowledge-approval strong, .knowledge-approval small { display: block; }
.knowledge-approval small { max-width: 560px; margin-top: 4px; color: var(--muted); font-size: 11px; }
.knowledge-approval-actions { display: flex; gap: 3px; }
.knowledge-pipeline-action { margin: 14px 0 6px; }
.knowledge-agent-findings { margin-top: 9px; color: var(--muted); }
.knowledge-agent-findings summary { cursor: pointer; font-size: 11px; font-weight: 700; }
.knowledge-agent-findings ul { margin: 8px 0; padding-left: 18px; }
.knowledge-agent-findings dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; margin: 9px 0 0; }
.knowledge-agent-findings dl div { min-width: 0; }
.knowledge-agent-findings dt { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.knowledge-agent-findings dd { margin: 2px 0 0; overflow-wrap: anywhere; color: var(--text); font-size: 11px; }
.knowledge-section-copy { margin: -10px 0 20px; color: var(--muted); }
.locale-profile-list { display: grid; gap: 7px; }
.locale-profile { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: clip; }
.locale-profile[open] { border-color: var(--line-strong); }
.locale-profile summary { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto 18px; align-items: center; gap: 14px; min-height: 65px; padding: 10px 15px; cursor: pointer; list-style: none; }
.locale-profile summary::-webkit-details-marker { display: none; }
.locale-profile summary:hover { background: var(--surface-muted); }
.locale-profile-code { width: 42px; height: 30px; display: grid; place-items: center; border-radius: 6px; background: var(--surface-muted); font: 700 11px/1 ui-monospace, monospace; }
.locale-profile summary strong, .locale-profile summary small { display: block; }
.locale-profile summary small { max-width: 660px; margin-top: 3px; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.locale-profile-expand { color: var(--muted); transition: transform .16s ease; }
.locale-profile[open] .locale-profile-expand { transform: rotate(180deg); }
.locale-profile-body { padding: 18px 22px 20px 81px; border-top: 1px solid var(--line); background: var(--surface-muted); }
.locale-profile-body dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 0; }
.locale-profile-body dt { margin-bottom: 5px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .055em; }
.locale-profile-body dd { margin: 0; line-height: 1.45; }
.locale-profile-body p { margin: 18px 0 0; color: var(--muted); font-size: 11px; }

.knowledge-nav-item { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font: inherit; text-align: left; cursor: pointer; }
.knowledge-nav-item:hover { background: var(--surface-muted); color: var(--ink); }
.knowledge-nav-item.is-active { background: var(--accent-soft); color: var(--ink); font-weight: 700; }
.knowledge-nav-item b { min-width: 22px; padding: 2px 6px; border-radius: 999px; background: var(--surface-muted); color: var(--muted); font-size: 10px; text-align: center; }
.knowledge-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 30px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.knowledge-page-head h1 { margin: 6px 0 7px; font-size: clamp(34px, 4vw, 48px); letter-spacing: -.05em; }
.knowledge-page-head p { max-width: 650px; margin: 0; color: var(--muted); line-height: 1.55; }
.knowledge-inbox-layout { display: grid; grid-template-columns: minmax(260px, .68fr) minmax(440px, 1.32fr); gap: 26px; align-items: start; }
.knowledge-inbox-list { position: sticky; top: 80px; max-height: calc(100vh - 150px); border-top: 1px solid var(--line); overflow-y: auto; overscroll-behavior: contain; }
.knowledge-inbox-row { width: 100%; display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 15px 10px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.knowledge-inbox-row:hover, .knowledge-inbox-row.is-active { background: var(--surface-muted); }
.knowledge-inbox-row strong, .knowledge-inbox-row small { display: block; }
.knowledge-inbox-row strong { font-size: 13px; line-height: 1.35; }
.knowledge-inbox-row small { margin-top: 4px; color: var(--muted); font-size: 10px; text-transform: capitalize; }
.knowledge-risk-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.knowledge-risk-dot.is-critical { background: var(--danger); }
.knowledge-risk-dot.is-high { background: var(--warn); }
.knowledge-request-detail { border-left: 1px solid var(--line); padding-left: 28px; }
.knowledge-request-detail > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.knowledge-request-detail h2 { max-width: 620px; margin: 7px 0 22px; font-size: 28px; letter-spacing: -.04em; }
.knowledge-diff { display: grid; grid-template-columns: 1fr 1fr; border-block: 1px solid var(--line); }
.knowledge-diff section { padding: 19px 20px 19px 0; }
.knowledge-diff section + section { padding-left: 20px; border-left: 1px solid var(--line); }
.knowledge-diff span { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.knowledge-diff p { margin: 9px 0 0; line-height: 1.55; }
.knowledge-request-block { padding: 25px 0; border-bottom: 1px solid var(--line); }
.knowledge-request-block h3 { margin: 0 0 10px; font-size: 14px; }
.knowledge-request-block > p { color: var(--muted); line-height: 1.55; }
.knowledge-request-block dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 20px 0 0; }
.knowledge-request-block dt { margin-bottom: 5px; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.knowledge-request-block dd { margin: 0; font-size: 12px; line-height: 1.45; }
.knowledge-evidence { padding: 13px 0; border-top: 1px solid var(--line); }
.knowledge-evidence strong, .knowledge-evidence small { display: block; }
.knowledge-evidence small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.knowledge-evidence p { margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.knowledge-section-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.knowledge-check-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.knowledge-check-line small { grid-column: 1 / -1; color: var(--muted); }
.knowledge-request-detail > footer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding-top: 22px; }
.knowledge-request-detail > footer > small { grid-column: 1 / -1; color: var(--muted); text-align: right; }
.knowledge-empty { padding: 34px; border: 1px dashed var(--line); color: var(--muted); text-align: center; }
.knowledge-empty p { margin-bottom: 0; }
.knowledge-brands-layout { display: grid; grid-template-columns: minmax(260px, .65fr) minmax(440px, 1.35fr); gap: 36px; }
.knowledge-brand-directory { border-top: 1px solid var(--line); }
.knowledge-brand-line { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 9px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.knowledge-brand-line:hover, .knowledge-brand-line.is-active { background: var(--surface-muted); }
.knowledge-brand-line strong, .knowledge-brand-line small { display: block; }
.knowledge-brand-line small { max-width: 420px; margin-top: 4px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-brand-line > span:last-child { color: var(--muted); font-size: 10px; white-space: nowrap; }
.knowledge-brand-profile h2 { margin: 7px 0 12px; font-size: 34px; letter-spacing: -.045em; }
.knowledge-brand-profile > p { color: var(--muted); font-size: 16px; line-height: 1.6; }
.knowledge-brand-profile .knowledge-tone-grid { margin: 28px 0; padding-block: 25px; border-block: 1px solid var(--line); }
.knowledge-rule-table { border-top: 1px solid var(--line); }
.knowledge-rule-table > div { display: grid; grid-template-columns: minmax(220px, 1.45fr) minmax(130px, .7fr) minmax(130px, .7fr) auto auto; align-items: center; gap: 18px; min-height: 58px; padding: 9px 5px; border-bottom: 1px solid var(--line); }
.knowledge-rule-head { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.knowledge-rule-table strong, .knowledge-rule-table small { display: block; }
.knowledge-rule-table small { margin-top: 3px; color: var(--muted); text-transform: capitalize; }
.knowledge-trigger-strip { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; }
.knowledge-trigger-strip span { padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 10px; text-transform: capitalize; }
.knowledge-agent-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 150px; align-items: center; gap: 20px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.knowledge-agent-row strong, .knowledge-agent-row small, .knowledge-agent-row code { display: block; }
.knowledge-agent-row small { max-width: 650px; margin: 5px 0; color: var(--muted); line-height: 1.45; }
.knowledge-agent-row code { color: var(--muted); font-size: 10px; }
.knowledge-agent-row > span:last-child { color: var(--muted); font-size: 10px; text-transform: capitalize; }
.knowledge-guardrails { margin-top: 28px; padding: 20px 0; border-block: 1px solid var(--line); }
.knowledge-guardrails p { max-width: 800px; margin-bottom: 0; color: var(--muted); line-height: 1.55; }
.knowledge-history { border-top: 1px solid var(--line); }
.knowledge-history > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 20px; padding: 14px 5px; border-bottom: 1px solid var(--line); }
.knowledge-history time, .knowledge-history small { color: var(--muted); font-size: 10px; }
.knowledge-history strong, .knowledge-history small { display: block; text-transform: capitalize; }
.knowledge-request-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.knowledge-section-title small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.knowledge-published-list { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.knowledge-published-record { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.knowledge-published-record strong { display: block; margin-top: 6px; font-size: 14px; }
.knowledge-published-record p { margin: 8px 0; color: var(--muted); line-height: 1.55; }
.knowledge-published-record small { color: var(--faint); font-size: 10px; text-transform: capitalize; }
.knowledge-record-actions, .knowledge-source-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.knowledge-version-strip { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 28px; border-block: 1px solid var(--line); }
.knowledge-version-strip > div { display: grid; gap: 4px; padding: 18px; border-right: 1px solid var(--line); }
.knowledge-version-strip > div:first-child { padding-left: 4px; }
.knowledge-version-strip > div:last-child { border-right: 0; }
.knowledge-version-strip strong { font-size: 22px; }
.knowledge-version-strip span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.historical-review-summary { display: grid; grid-template-columns: repeat(4, 1fr); margin: 24px 0; border-block: 1px solid var(--line); }
.historical-review-summary > div { display: grid; gap: 4px; padding: 17px 18px; border-right: 1px solid var(--line); }
.historical-review-summary > div:first-child { padding-left: 0; }
.historical-review-summary > div:last-child { border-right: 0; }
.historical-review-summary strong { font-size: 20px; }
.historical-review-summary span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.historical-review-policy { margin-bottom: 22px; padding: 14px 16px; border-left: 3px solid var(--accent); background: var(--accent-soft); }
.historical-review-policy strong { display: block; margin-bottom: 4px; font-size: 12px; }
.historical-review-policy p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.historical-review-list { display: grid; gap: 18px; }
.historical-review-card { padding: 22px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.historical-review-card > header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.historical-review-card h2 { margin: 5px 0 7px; font-size: 18px; line-height: 1.3; }
.historical-review-card h2 a { color: inherit; text-decoration: none; }
.historical-review-card h2 a:hover { color: var(--accent); }
.historical-review-card header p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.historical-review-card > section { padding: 17px 0 5px; }
.historical-review-card h3, .historical-review-card legend { margin: 0 0 10px; color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.historical-document { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 0; border-top: 1px solid var(--line); }
.historical-document a, .historical-document small { display: block; }
.historical-document a { color: var(--ink); font-size: 12px; font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.historical-document a:hover { color: var(--accent); }
.historical-document small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.historical-recommendation { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; margin: 13px 0 16px; padding: 15px 16px !important; border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line)); border-radius: 8px; background: var(--accent-soft); }
.historical-recommendation strong, .historical-recommendation small { display: block; }
.historical-recommendation strong { margin: 4px 0 5px; font-size: 13px; }
.historical-recommendation p { margin: 0 0 6px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.historical-recommendation small { color: var(--accent); font-size: 10px; font-weight: 700; }
.historical-recommendation-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.historical-saved-decision { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; margin: 13px 0 16px; padding: 15px 16px !important; border: 1px solid color-mix(in srgb, var(--good) 38%, var(--line)); border-radius: 8px; background: color-mix(in srgb, var(--good-soft) 72%, var(--surface)); }
.historical-saved-decision strong, .historical-saved-decision small { display: block; }
.historical-saved-decision strong { margin: 4px 0 5px; font-size: 13px; }
.historical-saved-decision p { margin: 0 0 6px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.historical-saved-decision small { color: var(--good); font-size: 10px; font-weight: 700; }
.historical-saved-decision.is-paused { border-color: color-mix(in srgb, var(--warn) 38%, var(--line)); background: var(--warn-soft); }
.historical-saved-decision.is-paused small { color: var(--warn); }
.historical-saved-decision.is-rejected { border-color: var(--line); background: var(--surface-muted); }
.historical-saved-decision.is-rejected small { color: var(--muted); }
.historical-risks { margin: 10px 0 16px; color: var(--muted); font-size: 11px; }
.historical-risks summary { cursor: pointer; font-weight: 700; }
.historical-risks ul { margin: 9px 0 0; padding-left: 18px; line-height: 1.55; }
.historical-review-card form { padding-top: 17px; border-top: 1px solid var(--line); }
.historical-review-card fieldset { margin: 0 0 16px; padding: 0; border: 0; }
.historical-scope-help { margin: -3px 0 11px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.historical-scope-options { display: flex; flex-wrap: wrap; gap: 8px; }
.historical-scope-options label { display: flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); font-size: 11px; cursor: pointer; }
.historical-decision-row { display: grid; grid-template-columns: 190px minmax(0, 1fr) auto; align-items: start; gap: 12px; }
.historical-decision-row label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.historical-decision-row label > small { color: var(--faint); font-size: 9px; font-weight: 500; line-height: 1.4; }
.historical-decision-row > .button { height: 44px; align-self: end; }
.historical-decision-row select, .historical-decision-row textarea { width: 100%; height: 44px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-muted); color: var(--ink); font: inherit; }
.historical-decision-row textarea { min-height: 44px; resize: vertical; }
.historical-policy-note { display: block; margin-top: 11px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.historical-source-empty { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; }
.historical-source-empty p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.button.compact { min-height: 29px; padding: 5px 8px; font-size: 10px; }
.danger-text { color: var(--danger) !important; }
.knowledge-editor { width: min(680px, 100%); }
.knowledge-editor-context { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 22px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.knowledge-editor-context small, .knowledge-editor-context strong { display: block; }
.knowledge-editor-context small { margin-bottom: 4px; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .055em; }
.knowledge-editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.knowledge-evidence-editor { margin: 2px 0 22px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-muted); }
.knowledge-evidence-editor h3 { margin: 0 0 4px; font-size: 14px; }
.knowledge-evidence-editor > p { margin: 0 0 18px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.knowledge-evidence-editor .dialog-field:last-child { margin-bottom: 0; }
.knowledge-editor-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.knowledge-editor-overlay { align-items: center; justify-content: center; }
.knowledge-editor-v2 { width: min(820px, 100%); height: min(920px, calc(100svh - 28px)); background: var(--surface-raised); }
.knowledge-editor-v2 > header { padding: 23px 30px 21px; }
.knowledge-editor-v2 > header h2 { margin: 5px 0 6px; font-size: 28px; letter-spacing: -.035em; }
.knowledge-editor-v2 > header p { max-width: 650px; font-size: 12px; line-height: 1.5; }
.knowledge-editor-v2 form { padding: 0; }
.knowledge-editor-map { display: grid; grid-template-columns: repeat(3, 1fr); padding: 0 30px; border-bottom: 1px solid var(--line); background: var(--surface); }
.knowledge-editor-map span { display: flex; align-items: center; gap: 8px; padding: 13px 0; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .045em; }
.knowledge-editor-map b { color: var(--accent); font-size: 9px; }
.knowledge-editor-section { display: grid; grid-template-columns: 176px minmax(0, 1fr); gap: 30px; padding: 30px; border-bottom: 1px solid var(--line); }
.knowledge-editor-step { display: flex; align-items: flex-start; gap: 11px; }
.knowledge-editor-step > span { width: 27px; height: 27px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--accent); font-size: 9px; font-weight: 800; }
.knowledge-editor-step h3 { margin: 2px 0 6px; font-size: 13px; line-height: 1.3; }
.knowledge-editor-step p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.knowledge-editor-fields { min-width: 0; }
.knowledge-editor-fields .dialog-field { margin-bottom: 20px; }
.knowledge-editor-fields .dialog-field:last-child { margin-bottom: 0; }
.knowledge-editor-fields .dialog-field > span strong { font-size: 12px; }
.knowledge-editor-fields .dialog-field > span strong em { margin-left: 6px; color: var(--faint); font-size: 8px; font-style: normal; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.knowledge-editor-fields .dialog-field input, .knowledge-editor-fields .dialog-field textarea, .knowledge-editor-fields .dialog-field select { border-color: var(--line); background: var(--surface); }
.knowledge-editor-fields .dialog-field textarea { min-height: 0; }
.knowledge-type-guide, .knowledge-advanced { margin: -7px 0 21px; border-bottom: 1px solid var(--line); }
.knowledge-type-guide > summary, .knowledge-advanced > summary { width: fit-content; padding: 0 0 12px; color: var(--accent); cursor: pointer; font-size: 10px; font-weight: 700; list-style: none; }
.knowledge-type-guide > summary::-webkit-details-marker, .knowledge-advanced > summary::-webkit-details-marker { display: none; }
.knowledge-type-guide > summary::after, .knowledge-advanced > summary::after { content: " +"; }
.knowledge-type-guide[open] > summary::after, .knowledge-advanced[open] > summary::after { content: " −"; }
.knowledge-type-guide > div { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; padding-bottom: 13px; }
.knowledge-type-guide p { margin: 0; padding: 9px 0; border-top: 1px solid var(--line); }
.knowledge-type-guide p strong, .knowledge-type-guide p span { display: block; }
.knowledge-type-guide p strong { font-size: 10px; }
.knowledge-type-guide p span { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.knowledge-channel-field { margin: 0 0 21px; padding: 0; border: 0; }
.knowledge-channel-field legend { padding: 0; font-size: 12px; font-weight: 700; }
.knowledge-channel-field legend span { margin-left: 5px; color: var(--faint); font-size: 8px; text-transform: uppercase; letter-spacing: .05em; }
.knowledge-channel-field > p { margin: 5px 0 10px; color: var(--muted); font-size: 10px; }
.knowledge-channel-field > div { display: flex; flex-wrap: wrap; gap: 7px; }
.knowledge-channel-field label { position: relative; cursor: pointer; }
.knowledge-channel-field input { position: absolute; opacity: 0; pointer-events: none; }
.knowledge-channel-field label span { min-width: 64px; display: block; padding: 8px 11px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--muted); font-size: 10px; font-weight: 650; text-align: center; transition: border-color .15s ease, background .15s ease, color .15s ease; }
.knowledge-channel-field input:checked + span { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: var(--accent-soft); color: var(--accent); }
.knowledge-channel-field input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.knowledge-advanced { margin-top: 1px; }
.knowledge-advanced .dialog-field { padding: 2px 0 18px; }
.knowledge-evidence-note { margin-bottom: 20px; padding: 1px 0 1px 13px; border-left: 2px solid var(--accent); }
.knowledge-evidence-note strong { font-size: 11px; }
.knowledge-evidence-note p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.knowledge-editor-v2 .knowledge-editor-footer { position: sticky; bottom: 0; z-index: 2; align-items: center; justify-content: space-between; margin: 0; padding: 16px 30px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface-raised) 96%, transparent); box-shadow: 0 -8px 24px rgba(0, 0, 0, .08); backdrop-filter: blur(12px); }
.knowledge-editor-v2 .knowledge-editor-footer > div:first-child { display: grid; gap: 3px; }
.knowledge-editor-v2 .knowledge-editor-footer > div:first-child strong { font-size: 11px; }
.knowledge-editor-v2 .knowledge-editor-footer > div:first-child span { max-width: 390px; color: var(--muted); font-size: 9px; line-height: 1.4; }

.history-shell { display: grid; gap: 0; }
.history-summary { display: grid; grid-template-columns: .8fr .8fr .8fr 1.4fr; border-block: 1px solid var(--line); }
.history-summary > div { min-width: 0; display: grid; gap: 7px; padding: 15px 18px; border-right: 1px solid var(--line); }
.history-summary > div:first-child { padding-left: 0; }
.history-summary > div:last-child { padding-right: 0; border-right: 0; }
.history-summary span { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.history-summary strong { overflow-wrap: anywhere; font-size: 17px; line-height: 1.25; }
.history-filters { display: flex; flex-wrap: wrap; gap: 7px; padding: 18px 0 24px; border-bottom: 1px solid var(--line); }
.history-filter { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; }
.history-filter:hover { border-color: var(--line-strong); color: var(--ink); }
.history-filter.is-active { border-color: color-mix(in srgb, var(--accent) 48%, var(--line)); background: var(--accent-soft); color: var(--accent); }
.history-filter b { min-width: 19px; padding: 2px 5px; border-radius: 999px; background: var(--surface-muted); color: inherit; font-size: 9px; text-align: center; }
.history-filter.is-active b { background: color-mix(in srgb, var(--accent) 13%, var(--surface)); }
.history-stage-list { display: grid; }
.history-stage { display: grid; grid-template-columns: 142px minmax(0, 1fr); gap: 20px; padding: 30px 0 4px; border-bottom: 1px solid var(--line); }
.history-stage:last-child { border-bottom: 0; }
.history-stage > header { display: flex; align-items: flex-start; gap: 10px; padding-top: 2px; }
.history-stage > header > span { width: 25px; height: 25px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--muted); font-size: 9px; font-weight: 800; }
.history-stage > header h2 { margin: 1px 0 3px; font-size: 13px; line-height: 1.3; }
.history-stage > header small { color: var(--muted); font-size: 10px; }
.history-timeline { position: relative; margin: 0; padding: 0 0 14px 22px; list-style: none; }
.history-timeline::before { content: ""; position: absolute; top: 7px; bottom: 0; left: 5px; width: 1px; background: var(--line); }
.history-event { position: relative; animation: history-enter .32s ease-out both; animation-delay: calc(var(--history-index) * 24ms); }
.history-marker { position: absolute; z-index: 1; top: 8px; left: -22px; width: 11px; height: 11px; display: grid; place-items: center; border: 2px solid var(--surface); border-radius: 50%; background: var(--line-strong); color: white; font-size: 7px; font-weight: 900; }
.history-event.is-human .history-marker { width: 17px; height: 17px; top: 5px; left: -25px; background: var(--accent); }
.history-event.is-attention .history-marker { width: 17px; height: 17px; top: 5px; left: -25px; background: var(--warn); }
.history-event > article { padding: 0 0 22px 10px; }
.history-event + .history-event > article { padding-top: 18px; border-top: 1px solid var(--line); }
.history-event + .history-event .history-marker { top: 26px; }
.history-event > article > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.history-event h3 { margin: 4px 0 0; font-size: 14px; line-height: 1.35; }
.history-event time { flex: 0 0 auto; padding-top: 3px; color: var(--muted); font-size: 10px; }
.history-kind { color: var(--muted); font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; }
.history-event.is-human .history-kind { color: var(--accent); }
.history-event.is-attention .history-kind { color: var(--warn); }
.history-event > article > p { max-width: 690px; margin: 8px 0 5px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.history-actor { color: var(--faint); font-size: 10px; }
.history-technical { margin-top: 9px; }
.history-technical > summary { width: fit-content; display: flex; align-items: center; gap: 6px; color: var(--muted); cursor: pointer; font-size: 10px; list-style: none; }
.history-technical > summary::-webkit-details-marker { display: none; }
.history-technical > summary span { display: inline-block; transition: transform .18s ease; }
.history-technical[open] > summary span { transform: rotate(180deg); }
.history-technical-body { margin-top: 10px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-muted); }
.history-technical-body dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 11px; }
.history-technical-body dl div { min-width: 0; }
.history-technical-body dt { margin-bottom: 3px; color: var(--faint); font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }
.history-technical-body dd { margin: 0; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.history-technical-body code { font-size: 9px; }
.history-technical-body pre { max-height: 260px; margin: 0; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); font-size: 9px; line-height: 1.45; }
.history-empty { padding: 46px 20px; text-align: center; }
.history-empty p { color: var(--muted); }
@keyframes history-enter { from { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .history-event { animation: none; } .history-technical > summary span { transition: none; } }

@media (max-width: 1100px) {
  .knowledge-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .knowledge-workspace { padding-inline: 34px; }
  .knowledge-inbox-layout, .knowledge-brands-layout { grid-template-columns: minmax(220px, .75fr) minmax(360px, 1.25fr); }
  .workspace { grid-template-columns: 180px minmax(0, 1fr); }
  .workspace .inspector-stack { position: static; grid-column: 2; }
  .flow-layout { grid-template-columns: 1fr; }
  .flow-layout .inspector { position: static; }
  .data-table .hide-tablet { display: none; }
  .history-stage { grid-template-columns: 120px minmax(0, 1fr); }
}

/* Keep the audit inspector below the main workspace until all three columns
   have enough room. This avoids making a 1180px viewport less usable than a
   narrower tablet layout. */
@media (min-width: 821px) and (max-width: 1320px) {
  .workspace { grid-template-columns: 180px minmax(0, 1fr); }
  .workspace .inspector-stack { position: static; grid-column: 2; }
}

@media (max-width: 820px) {
  :root { --rail: 0px; }
  .app-shell { padding-left: 0; padding-bottom: 64px; }
  .rail { inset: auto 0 0; width: 100%; height: 58px; flex-direction: row; justify-content: center; padding: 5px 10px; border-top: 1px solid #2a2c35; border-right: 0; }
  .brand-mark, .rail-footer { display: none; }
  .rail-nav { display: flex; justify-content: center; width: auto; margin: 0; }
  .rail-button { min-width: 76px; min-height: 46px; }
  .knowledge-layout { grid-template-columns: 1fr; }
  .knowledge-sidebar { position: static; height: auto; padding: 18px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .knowledge-sidebar-head { padding: 0 0 14px; }
  .knowledge-sidebar nav { display: flex; overflow-x: auto; }
  .knowledge-mobile-picker { display: grid; gap: 6px; margin-bottom: 12px; }
  .knowledge-mobile-picker > span { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
  .knowledge-mobile-picker select { width: 100%; padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }
  .knowledge-sidebar nav { display: flex; }
  .knowledge-nav-item { min-width: max-content; }
  .knowledge-brand { min-width: 190px; }
  .knowledge-boundary { margin-top: 14px; padding: 13px 0 0; }
  .knowledge-workspace { padding: 30px 22px 80px; }
  .knowledge-inbox-layout, .knowledge-brands-layout { grid-template-columns: 1fr; }
  .knowledge-inbox-list { position: static; max-height: 310px; overflow-y: auto; }
  .knowledge-request-detail { border-left: 0; padding-left: 0; }
  .knowledge-rule-table > div { grid-template-columns: minmax(190px, 1fr) auto auto; }
  .knowledge-rule-table > div > span:nth-child(2), .knowledge-rule-table > div > span:nth-child(3) { display: none; }
  .knowledge-agent-row { grid-template-columns: minmax(0, 1fr) auto; }
  .knowledge-agent-row > span:last-child { grid-column: 1 / -1; }
  .knowledge-approval { grid-template-columns: minmax(0, 1fr) auto; }
  .knowledge-approval-actions { grid-column: 1 / -1; }
  .knowledge-published-record { grid-template-columns: 1fr; }
  .knowledge-record-actions, .knowledge-source-actions { justify-content: flex-start; }
  .knowledge-row { align-items: start; grid-template-columns: 1fr; }
  .knowledge-editor-grid { grid-template-columns: 1fr; }
  .knowledge-editor-overlay { padding: 0; }
  .knowledge-editor-v2 { width: 100%; height: 100svh; border: 0; border-radius: 0; }
  .knowledge-editor-v2 > header { padding: 20px 20px 18px; }
  .knowledge-editor-v2 > header h2 { font-size: 24px; }
  .knowledge-editor-map { padding: 0 20px; overflow-x: auto; }
  .knowledge-editor-map span { min-width: 105px; }
  .knowledge-editor-section { grid-template-columns: 1fr; gap: 20px; padding: 25px 20px; }
  .knowledge-editor-step { max-width: 390px; }
  .knowledge-type-guide > div { grid-template-columns: 1fr; }
  .knowledge-editor-v2 .knowledge-editor-footer { align-items: stretch; flex-direction: column; padding: 14px 20px; }
  .knowledge-editor-v2 .knowledge-editor-footer .button-row { justify-content: flex-end; }
  .historical-review-summary { grid-template-columns: 1fr 1fr; }
  .historical-review-summary > div:nth-child(2) { border-right: 0; }
  .historical-review-summary > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .historical-review-summary > div:nth-child(3) { padding-left: 0; }
  .historical-decision-row { grid-template-columns: 1fr; align-items: stretch; }
  .historical-decision-row .button { width: 100%; }
  .historical-source-empty, .historical-document { align-items: stretch; flex-direction: column; }
  .historical-recommendation, .historical-saved-decision { grid-template-columns: 1fr; align-items: stretch; }
  .topbar { padding: 0 16px; }
  .topbar-status { display: none; }
  .review-guidance { grid-template-columns: 28px minmax(0, 1fr); }
  .warning-resolution > header { align-items: stretch; flex-direction: column; }
  .warning-resolution > header .button { width: 100%; }
  .warning-resolution li { grid-template-columns: 1fr; gap: 4px; }
  .inline-rewrite-comparison { grid-template-columns: 1fr; }
  .inline-rewrite-comparison > div + div { border-top: 1px solid var(--line); border-left: 0; }
  .inline-rewrite > header, .inline-rewrite > footer { align-items: stretch; flex-direction: column; }
  .inline-rewrite > footer .button-row { justify-content: flex-end; }
  .page { padding: 20px 16px; }
  .summary-strip { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .queue-toolbar { align-items: stretch; flex-direction: column; }
  .segmented { overflow-x: auto; }
  .search { width: 100%; margin: 0; }
  .line-page { padding-top: 24px; }
  .line-heading { align-items: flex-start; flex-direction: column; margin-bottom: 22px; }
  .sync-cluster { width: 100%; justify-content: space-between; }
  .line-tabs { gap: 22px; overflow-x: auto; }
  .line-tab { flex: 0 0 auto; }
  .line-filters { align-items: stretch; flex-wrap: wrap; }
  .line-filters .search { width: 100%; min-width: 100%; }
  .filter-select { flex: 1; }
  .filter-select select { width: 100%; }
  .filter-result { display: grid; align-items: center; }
  .work-page { padding-top: 24px; }
  .work-heading { align-items: flex-start; flex-direction: column; margin-bottom: 22px; }
  .recent-workflow { grid-template-columns: 3px minmax(0, 1fr); }
  .recent-workflow-action { grid-column: 2; width: min(190px, 100%); }
  .work-list { overflow-x: auto; }
  .work-list-head, .work-row { grid-template-columns: 42px minmax(240px, 1fr) minmax(140px, .5fr) 100px; min-width: 760px; }
  .work-list-head > span:nth-child(4), .work-row .work-updated { display: none; }
  .workspace { grid-template-columns: 1fr; }
  .run-history-notice { align-items: stretch; flex-direction: column; }
  .run-history-notice .button { width: 100%; }
  .workspace-nav { position: static; display: flex; overflow-x: auto; padding-bottom: 10px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
  .workspace-nav::-webkit-scrollbar, .work-tabs::-webkit-scrollbar { height: 5px; }
  .workspace-nav::-webkit-scrollbar-thumb, .work-tabs::-webkit-scrollbar-thumb { border-radius: 999px; background: var(--line-strong); }
  .workspace-tab { width: auto; flex: 0 0 auto; }
  .workspace .inspector-stack { grid-column: auto; }
  .field-grid { grid-template-columns: 1fr; }
  .manual-source-grid { grid-template-columns: 1fr; }
  .field.wide { grid-column: auto; }
  .brief-meta { grid-template-columns: repeat(2, 1fr); }
  .brief-meta span:nth-child(2) { border-right: 0; }
  .brief-meta span:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .evidence-row { grid-template-columns: 100px minmax(0, 1fr); gap: 10px 14px; }
  .evidence-row > small { grid-column: 2; text-align: left; }
  .locale-row { grid-template-columns: 90px minmax(160px, 1fr) 80px auto; min-width: 620px; }
  .locale-grid { overflow-x: auto; }
  .locale-source-binding > header { flex-direction: column; }
  .source-hash-lock { justify-items: start; }
  .locale-batch-controls { align-items: stretch; }
  .locale-blocker-resolution { grid-template-columns: 1fr; }
  .locale-review-section > summary { grid-template-columns: 24px minmax(0, 1fr) auto 20px 18px; }
  .history-summary { grid-template-columns: 1fr 1fr; }
  .history-summary > div:nth-child(2) { border-right: 0; }
  .history-summary > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .history-summary > div:nth-child(3) { padding-left: 0; }
  .history-stage { grid-template-columns: 1fr; gap: 16px; }
  .history-stage > header { padding-left: 1px; }
}

@media (max-width: 560px) {
  .task-analysis-notice { grid-template-columns: 20px minmax(0, 1fr); align-items: start; padding-inline: 14px; }
  .task-analysis-notice > .button, .task-analysis-phase { grid-column: 2; justify-self: start; }
  .task-analysis-notice > .button { width: 100%; margin-top: 6px; }
  .page-heading, .flow-header { flex-direction: column; }
  .plan-facts { grid-template-columns: 1fr; }
  .plan-facts > div { padding: 12px 0; }
  .plan-facts > div + div { padding-left: 0; border-top: 1px solid var(--line); border-left: 0; }
  .plan-facts strong { white-space: normal; }
  .plan-output-row { grid-template-columns: 28px minmax(0, 1fr); }
  .plan-output-row > small { grid-column: 2; }
  .plan-coverage-status { align-items: start; }
  .plan-approval-simple .button-row, .plan-approval-simple .button { width: 100%; }
  .page-heading .button, .flow-header .button { width: 100%; }
  .summary-strip { grid-template-columns: 1fr 1fr; }
  .metric { padding: 13px; }
  .metric strong { font-size: 18px; }
  .line-heading h1 { font-size: 38px; }
  .work-heading h1 { font-size: 38px; }
  .work-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
  .recent-workflow { gap: 12px; padding-block: 17px; }
  .recent-workflow-copy strong { white-space: normal; }
  .recent-workflow-copy small { flex-wrap: wrap; white-space: normal; }
  .recent-workflow-action { width: 100%; }
  .work-tabs { gap: 20px; overflow-x: auto; }
  .work-tabs { padding-bottom: 5px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
  .work-tab { flex: 0 0 auto; white-space: nowrap; }
  .knowledge-workspace { padding-inline: 16px; }
  .knowledge-page-head { align-items: flex-start; flex-direction: column; }
  .knowledge-diff { grid-template-columns: 1fr; }
  .knowledge-diff section + section { padding-left: 0; border-top: 1px solid var(--line); border-left: 0; }
  .knowledge-request-block dl { grid-template-columns: 1fr; }
  .knowledge-request-detail > footer { grid-template-columns: 1fr; }
  .knowledge-request-detail > footer > small { text-align: left; }
  .knowledge-rule-table > div { grid-template-columns: minmax(0, 1fr) auto; }
  .knowledge-rule-table > div > span:nth-child(2) { display: none; }
  .knowledge-history > div { grid-template-columns: 1fr; gap: 5px; }
  .knowledge-hero { flex-direction: column; }
  .knowledge-score { justify-items: start; }
  .knowledge-metrics { grid-template-columns: 1fr 1fr; }
  .knowledge-metrics > div:nth-child(2) { border-right: 0; }
  .knowledge-metrics > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .knowledge-metrics > div:nth-child(3) { padding-left: 0; }
  .knowledge-tone-grid { grid-template-columns: 1fr; gap: 25px; }
  .knowledge-section > header { grid-template-columns: 1fr; align-items: start; }
  .knowledge-section > header .eyebrow { grid-column: auto; }
  .knowledge-readonly { margin-top: 5px; }
  .knowledge-decision > summary { grid-template-columns: minmax(0, 1fr) auto 18px; }
  .knowledge-approval { grid-template-columns: 1fr; }
  .knowledge-approval-actions { grid-column: auto; flex-wrap: wrap; }
  .knowledge-agent-findings dl { grid-template-columns: 1fr; }
  .locale-profile summary { grid-template-columns: 48px minmax(0, 1fr) 18px; }
  .locale-profile summary .pill { grid-column: 2; justify-self: start; }
  .locale-profile-expand { grid-column: 3; grid-row: 1; }
  .locale-profile-body { padding: 17px; }
  .locale-profile-body dl { grid-template-columns: 1fr; gap: 14px; }
  .locale-pipeline-overview { margin-inline: -2px; padding-inline: 13px; }
  .locale-batch-controls { flex-direction: column; align-items: stretch; }
  .locale-batch-controls label { justify-content: flex-start; }
  .locale-batch-controls .button { width: 100%; }
  .locale-batch-controls .button.primary { flex-basis: auto; }
  .locale-review-section > summary { grid-template-columns: 24px minmax(0, 1fr) 20px 18px; grid-template-rows: auto auto; gap: 4px 10px; min-height: 76px; padding-inline: 12px; }
  .locale-review-section > summary .locale-state-icon { grid-column: 1; grid-row: 1 / 3; }
  .locale-review-section > summary .locale-summary-copy { grid-column: 2; grid-row: 1; width: 100%; }
  .locale-summary-copy small { width: 100%; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .locale-review-section > summary .locale-status-label { grid-column: 2; grid-row: 2; justify-self: start; }
  .locale-review-section > summary > :nth-child(4) { grid-column: 3; grid-row: 1 / 3; align-self: center; }
  .locale-review-section > summary .locale-disclosure { grid-column: 4; grid-row: 1 / 3; align-self: center; }
  .sync-cluster { align-items: stretch; flex-direction: column; }
  .sync-cluster .button { width: 100%; }
  .line-board { border-radius: 10px; }
  .line-tabs { margin-right: 0; padding: 0 16px; }
  .filter-select { min-width: calc(50% - 5px); }
  .filter-result { width: 100%; text-align: left; }
  .line-table { min-width: 100%; table-layout: fixed; }
  .line-table th:first-child, .line-table td:first-child { width: 122px; padding-left: 16px; }
  .line-table th:nth-child(3), .line-table td:nth-child(3), .line-table th:nth-child(4), .line-table td:nth-child(4) { display: none; }
  .line-table th:last-child, .line-table td:last-child { display: none; }
  .line-table .task-title { display: -webkit-box; max-width: none; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
  .line-table td { height: 78px; padding-right: 8px; }
  .mobile-task-state { display: block; color: var(--muted); }
  .task-sub > span:not(.mobile-task-state) { display: none; }
  .work-list { overflow: hidden; }
  .work-list-head { display: none; }
  .work-row { grid-template-columns: 28px minmax(0, 1fr) 28px; gap: 10px; min-width: 0; min-height: 88px; padding: 13px 0; }
  .work-stage, .work-updated { display: none; }
  .work-task strong { white-space: normal; }
  .work-task .work-mobile-stage { display: block; color: var(--accent); }
  .work-next small { display: none; }
  .content-header, .content-body, .editor, .review-document { padding: 17px; }
  .history-summary > div { padding: 13px 11px; }
  .history-summary > div:nth-child(odd) { padding-left: 0; }
  .history-summary > div:nth-child(even) { padding-right: 0; }
  .history-summary strong { font-size: 14px; }
  .history-event > article > header { display: grid; gap: 5px; }
  .history-event time { grid-row: 2; }
  .history-technical-body dl { grid-template-columns: 1fr; }
  .qa-summary, .format-grid { grid-template-columns: 1fr; }
  .deliverable-control-bar, .export-format-row, .export-format-row.is-google { grid-template-columns: 1fr; align-items: stretch; }
  .deliverable-control-bar > .button, .export-format-row > .button { width: 100%; }
  .export-format-row .pill { justify-self: start; }
  .deliverable-link { flex-direction: column; }
  .review-asset dl div { grid-template-columns: 1fr; gap: 3px; }
  .editor-footer { align-items: stretch; flex-direction: column; }
  .editor-footer .button { width: 100%; }
  .jira-brief > header, .review-section-heading, .source-use-title, .copy-asset > header, .copy-field-head { align-items: stretch; flex-direction: column; }
  .review-heading-actions { justify-content: space-between; width: 100%; }
  .source-toolbar, .source-batch-toolbar, .source-batch-toolbar > div, .manual-source-composer > header, .manual-source-composer > footer { align-items: stretch; flex-direction: column; }
  .source-batch-toolbar .button { width: 100%; }
  .source-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .source-actions .button { width: 100%; white-space: normal; }
  .jira-brief > header .button { width: 100%; }
  .brief-meta { grid-template-columns: 1fr; }
  .brief-meta span { border-right: 0; border-bottom: 1px solid var(--line); }
  .brief-meta span:last-child { border-bottom: 0; }
  .jira-brief-copy { padding: 19px 17px 21px; font-size: 14px; }
  .evidence-row, .deliverable-line { grid-template-columns: 1fr; gap: 4px; }
  .evidence-row > small { grid-column: auto; }
  .jira-links a { grid-template-columns: 1fr; gap: 4px; overflow-wrap: anywhere; }
  .approval-composer, .approval-receipt { padding: 17px; }
  .english-review-phase { margin-top: 28px; }
  .english-handoff-action { grid-template-columns: 1fr; align-items: stretch; }
  .english-handoff-action > .pill { justify-self: start; }
  .english-handoff-action > .button, .english-handoff-action .google-publication-actions { width: 100%; }
  .english-handoff-action .google-publication-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .english-linguist-review > summary { grid-template-columns: 1fr; gap: 12px; }
  .linguist-summary-state { justify-items: start; min-width: 0; }
  .inline-comment-heading, .inline-comment-footer { align-items: stretch; flex-direction: column; }
  .copy-selection-toolbar { align-items: stretch; flex-direction: column; }
  .copy-selection-toolbar .button-row { justify-content: flex-end; }
  .inline-comment-footer > .button, .inline-comment-footer > .button-row { width: 100%; }
  .inline-comment-footer .button-row { justify-content: flex-end; }
  .inline-field-editor-footer { align-items: stretch; flex-direction: column; }
  .inline-field-editor-footer .button { width: 100%; }
  .inline-option { grid-template-columns: 1fr; gap: 10px; }
  .inline-option .button { width: 100%; }
  .dialog-overlay { padding: 0; }
  .edit-dialog { border-width: 0; border-radius: 0; }
  .edit-dialog > header, .edit-dialog form { padding: 18px; }
}
.historical-brand-selector { display: grid; gap: .35rem; min-width: min(22rem, 100%); text-align: left; }
.historical-brand-selector > span { color: var(--muted); font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.historical-brand-selector select { min-height: 2.8rem; padding: .65rem .85rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--surface); color: var(--text); font: inherit; font-weight: 700; }
.historical-brand-selector small { color: var(--muted); font-size: .78rem; }
