:root {
  --bg: #f4f4f4;
  --surface: #ffffff;
  --surface-soft: #f8f8f8;
  --ink: #171717;
  --muted: #666666;
  --line: #dddddd;
  --primary: #e60000;
  --primary-dark: #b40000;
  --primary-soft: #fdeaea;
  --brand-blue: #009bd6;
  --brand-blue-dark: #006b96;
  --brand-blue-soft: #e5f6fc;
  --accent: #f5b400;
  --danger: #a90000;
  --danger-soft: #fce7e7;
  --warning-soft: #fff3d9;
  --info-soft: #e5f6fc;
  --shadow: 0 20px 48px rgba(0, 0, 0, .14);
  --radius: 16px;
  --radius-sm: 9px;
  --sidebar-width: 255px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--bg); font-family: "Segoe UI", Arial, Helvetica, sans-serif; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(0, 155, 214, .35); outline-offset: 2px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(1.9rem, 3vw, 2.75rem); font-weight: 850; line-height: 1.05; letter-spacing: -.045em; }
h2 { margin-bottom: 10px; font-size: 1.25rem; letter-spacing: -.02em; }
p { line-height: 1.58; }
hr { width: 100%; border: 0; border-top: 1px solid var(--line); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.tiny { font-size: .77rem; }
.eyebrow { margin-bottom: 7px; color: var(--primary); font-weight: 800; font-size: .73rem; letter-spacing: .12em; text-transform: uppercase; }
.prototype-ribbon { position: fixed; inset: 0 0 auto 0; z-index: 1000; min-height: 29px; border-bottom: 3px solid var(--primary); padding: 6px 14px; background: #090909; color: #fff; text-align: center; font-size: .72rem; font-weight: 800; letter-spacing: .08em; }

.auth-layout { display: grid; grid-template-columns: minmax(380px, 500px) minmax(480px, 1fr); min-height: 100vh; padding-top: 29px; }
.auth-card { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; padding: clamp(42px, 6vw, 82px); background: var(--surface); box-shadow: 20px 0 55px rgba(0,0,0,.14); }
.auth-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 8px; background: linear-gradient(var(--primary) 0 72%, var(--brand-blue) 72% 100%); }
.auth-aside { position: relative; display: flex; flex-direction: column; justify-content: center; padding: clamp(52px, 8vw, 128px); background: radial-gradient(circle at 86% 22%, rgba(255,255,255,.16), transparent 24%), linear-gradient(135deg, #ba0000 0%, var(--primary) 55%, #f02323 100%); color: #fff; overflow: hidden; }
.auth-aside::before { content: ""; position: absolute; top: -190px; right: -160px; width: 510px; height: 510px; border: 78px solid rgba(255,255,255,.13); border-radius: 50%; }
.auth-aside::after { content: ""; position: absolute; right: -70px; bottom: -130px; width: 330px; height: 330px; border: 64px solid var(--brand-blue); border-radius: 50%; opacity: .94; }
.auth-aside > * { position: relative; z-index: 1; }
.auth-aside .eyebrow { align-self: flex-start; border-radius: 999px; padding: 8px 14px; background: var(--brand-blue-dark); color: #fff; letter-spacing: .08em; }
.auth-aside h2 { max-width: 850px; margin: 18px 0 22px; font-size: clamp(2.4rem, 4.7vw, 5.3rem); font-weight: 900; line-height: .96; letter-spacing: -.06em; text-transform: uppercase; }
.auth-aside-kicker { align-self: flex-start; border-left: 6px solid #fff; padding: 6px 0 6px 14px; font-size: .92rem; font-weight: 850; letter-spacing: .025em; }
.brand-mark { position: relative; display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 28px; border: 7px solid var(--primary); border-radius: 50%; background: #fff; color: var(--primary); font-weight: 950; font-size: 1.25rem; box-shadow: 0 12px 25px rgba(230,0,0,.2); }
.brand-mark::after { content: ""; position: absolute; right: -7px; bottom: -5px; width: 15px; height: 15px; border: 3px solid #fff; border-radius: 50%; background: var(--brand-blue); }
.brand-mark.small { width: 42px; height: 42px; margin: 0; border-width: 5px; font-size: .95rem; box-shadow: none; }
.brand-mark.small::after { right: -6px; bottom: -4px; width: 12px; height: 12px; }
.stack-md { display: flex; flex-direction: column; gap: 10px; }
label { color: #303030; font-size: .86rem; font-weight: 780; }
input, textarea, select { width: 100%; border: 1px solid #c9c9c9; border-radius: 8px; padding: 12px 13px; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--brand-blue); box-shadow: 0 0 0 3px rgba(0,155,214,.13); outline: none; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 43px; border: 1px solid transparent; border-radius: 999px; padding: 10px 18px; font-weight: 820; font-size: .88rem; transition: transform .12s, background .12s, border-color .12s, box-shadow .12s; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--primary); color: #fff; box-shadow: 0 7px 16px rgba(230,0,0,.18); }
.button.primary:hover { background: var(--primary-dark); box-shadow: 0 9px 20px rgba(180,0,0,.24); }
.button.primary:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.button.secondary { border-color: #a9dced; background: var(--brand-blue-soft); color: var(--brand-blue-dark); }
.button.ghost { border-color: #cfcfcf; background: transparent; color: #292929; }
.button.danger-outline { border-color: #e0aaaa; background: var(--danger-soft); color: #8d2929; }
.button.wide { width: 100%; }
.button.compact { min-height: 36px; padding: 7px 11px; font-size: .78rem; }
.form-error { border-radius: 9px; padding: 10px 12px; background: var(--danger-soft); color: #8d2929; font-size: .82rem; font-weight: 700; }
.demo-code { display: flex; align-items: center; justify-content: space-between; border: 1px dashed #8ecfe7; border-radius: 10px; padding: 11px 13px; background: var(--brand-blue-soft); color: var(--brand-blue-dark); }
.demo-code span { font-size: .78rem; font-weight: 700; }
.demo-code strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .16em; }
.demo-accounts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 35px; padding-top: 25px; border-top: 1px solid var(--line); }
.demo-accounts p { flex-basis: 100%; margin: 0 0 2px; color: var(--muted); font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.demo-accounts button { border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; background: var(--surface-soft); color: #303030; font-size: .76rem; font-weight: 760; }
.demo-accounts button:hover { border-color: var(--brand-blue); background: var(--brand-blue-soft); color: var(--brand-blue-dark); }
.feature-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 850px; margin: 30px 0; padding: 0; list-style: none; }
.feature-list li { display: flex; align-items: center; gap: 11px; min-height: 58px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: 10px 16px 10px 10px; background: rgba(15,15,15,.18); font-weight: 780; }
.feature-list li::before { content: "✓"; display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; background: var(--brand-blue); color: #fff; }
.privacy-note { display: flex; flex-direction: column; gap: 3px; max-width: 700px; border: 1px solid rgba(255,255,255,.25); border-radius: 14px; padding: 15px 18px; background: rgba(5,5,5,.48); font-size: .82rem; }
.privacy-note.compact-note { border-color: #f0d08e; background: var(--warning-soft); color: #654a14; }

.app-shell { display: grid; grid-template-columns: var(--sidebar-width) 1fr; grid-template-rows: 76px 1fr; min-height: 100vh; padding-top: 29px; }
.topbar { position: sticky; top: 29px; z-index: 30; grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; min-width: 0; border-bottom: 4px solid var(--primary); padding: 0 25px; background: rgba(255,255,255,.97); backdrop-filter: blur(12px); box-shadow: 0 5px 16px rgba(0,0,0,.06); }
.topbar-brand, .topbar-actions, .user-chip { display: flex; align-items: center; }
.topbar-brand { gap: 11px; }
.topbar-brand > div:last-child { display: flex; flex-direction: column; gap: 2px; }
.topbar-brand span { color: var(--muted); font-size: .73rem; }
.topbar-actions { gap: 12px; }
.user-chip { gap: 9px; border-left: 1px solid var(--line); padding-left: 14px; }
.user-chip > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand-blue); color: #fff; font-size: .72rem; font-weight: 900; }
.user-chip > div { display: flex; flex-direction: column; line-height: 1.18; }
.user-chip strong { font-size: .82rem; }
.user-chip small { color: var(--muted); font-size: .69rem; }
.icon-button { position: relative; display: inline-grid; place-items: center; min-width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: #52605a; }
.icon-button > span:first-child { color: var(--brand-blue); font-size: .75rem; }
.notification-count { position: absolute; top: -5px; right: -5px; display: grid; place-items: center; min-width: 18px; height: 18px; border-radius: 999px; padding: 0 4px; background: var(--danger); color: #fff; font-size: .62rem; font-weight: 900; }
.sidebar { position: sticky; top: 105px; align-self: start; height: calc(100vh - 105px); border-right: 0; padding: 22px 14px; background: #121212; color: #fff; overflow-y: auto; }
.nav-section { margin-bottom: 23px; }
.nav-section-label { display: block; margin: 0 11px 8px; color: #8b8b8b; font-size: .65rem; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.nav-button { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 43px; border: 0; border-radius: 10px; padding: 9px 11px; background: transparent; color: #dddddd; text-align: left; font-size: .81rem; font-weight: 760; }
.nav-button:hover { background: #292929; color: #fff; }
.nav-button.active { background: var(--primary); color: #fff; box-shadow: 0 8px 18px rgba(230,0,0,.23); }
.nav-icon { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 8px; background: #303030; color: var(--brand-blue); font-size: .75rem; font-weight: 900; }
.nav-button.active .nav-icon { background: #fff; color: var(--primary); }
.nav-badge { margin-left: auto; min-width: 22px; border-radius: 999px; padding: 2px 6px; background: var(--brand-blue-dark); color: #fff; text-align: center; font-size: .65rem; }
.sidebar-footer { border-radius: 12px; padding: 13px; background: var(--brand-blue-dark); color: #fff; font-size: .72rem; line-height: 1.5; }
.main-panel { min-width: 0; padding: clamp(24px, 4vw, 50px); background: radial-gradient(circle at 100% 0, rgba(0,155,214,.08), transparent 26%), var(--bg); overflow: hidden; }
.page-view { max-width: 1450px; margin: 0 auto; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 25px; margin-bottom: 28px; }
.page-heading p:last-child { max-width: 760px; margin-bottom: 0; color: var(--muted); }
.chat-heading-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; }
.system-pill { flex: 0 0 auto; border: 1px solid #8bd0e9; border-radius: 999px; padding: 9px 14px; background: var(--brand-blue-dark); color: #fff; font-size: .8rem; }
.chat-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 22px; }
.chat-card, .panel-card, .canvas-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 10px 32px rgba(0,0,0,.06); }
.chat-card { display: flex; flex-direction: column; min-height: 620px; overflow: hidden; }
.chat-messages { flex: 1; display: flex; flex-direction: column; gap: 17px; padding: 25px; overflow-y: auto; }
.chat-empty { display: grid; place-items: center; min-height: 360px; padding: 30px; text-align: center; color: var(--muted); }
.chat-empty-icon { display: grid; place-items: center; width: 62px; height: 62px; margin-bottom: 18px; border-radius: 50%; background: var(--brand-blue-soft); color: var(--brand-blue); font-size: 1.5rem; font-weight: 900; }
.chat-reset-notice { max-width: 560px; margin: 0 auto 18px; border: 1px solid #9bd3aa; border-radius: 10px; padding: 10px 13px; background: #eef9f1; color: #17652c; font-size: .8rem; font-weight: 800; }
.message { display: flex; gap: 10px; max-width: min(86%, 760px); }
.message.user { align-self: flex-end; flex-direction: row-reverse; }
.message-avatar { flex: 0 0 auto; display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; background: var(--primary); color: #fff; font-size: .68rem; font-weight: 900; }
.message.user .message-avatar { background: var(--brand-blue); color: #fff; }
.message-bubble { border-radius: 5px 15px 15px 15px; padding: 13px 15px; background: #f0f0f0; font-size: .9rem; line-height: 1.55; }
.message.user .message-bubble { border-radius: 15px 5px 15px 15px; background: var(--brand-blue); color: #fff; }
.message-bubble p:last-child { margin-bottom: 0; }
.message-meta { display: flex; gap: 8px; margin-bottom: 7px; color: var(--muted); font-size: .7rem; font-weight: 700; }
.confidence { border-radius: 999px; padding: 2px 7px; background: var(--brand-blue-soft); color: var(--brand-blue-dark); }
.chat-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.choice-button { border: 1px solid #ee9b9b; border-radius: 999px; padding: 9px 14px; background: #fff; color: var(--primary-dark); font-weight: 800; font-size: .8rem; }
.choice-button:hover { background: var(--primary-soft); }
.result-card { margin-top: 11px; border-left: 5px solid var(--brand-blue); border-radius: 12px; padding: 15px 17px; background: var(--brand-blue-soft); }
.result-card.danger { border-left-color: var(--danger); background: var(--danger-soft); }
.result-card.warning { border-left-color: var(--accent); background: var(--warning-soft); }
.result-card strong { display: block; margin-bottom: 5px; font-size: 1rem; }
.result-card small { display: block; margin-top: 8px; color: var(--muted); }
.chat-media-hint { display: flex; flex-direction: column; gap: 3px; margin-top: 10px; border: 1px solid #a9dced; border-radius: 10px; padding: 10px 12px; background: #fff; }
.chat-media-hint strong { color: var(--brand-blue-dark); font-size: .75rem; }
.chat-media-hint span { color: var(--muted); font-size: .68rem; line-height: 1.4; }
.chat-media-actions { display: grid; gap: 7px; margin-top: 7px; }
.chat-media-button { display: flex; align-items: center; gap: 9px; width: 100%; border: 1px solid #b7dce8; border-radius: 9px; padding: 9px 11px; background: #f7fcfe; color: var(--text); text-align: left; cursor: pointer; }
.chat-media-button:hover { border-color: var(--brand-blue); background: #eef9fc; }
.chat-media-button span { display: grid; place-items: center; width: 27px; height: 27px; flex: 0 0 27px; border-radius: 7px; background: var(--brand-blue-dark); color: #fff; font-size: .7rem; }
.chat-media-button strong { color: var(--text); font-size: .72rem; }
.media-viewer-modal { width: min(920px, calc(100vw - 28px)); }
.media-viewer-stage { display: grid; place-items: center; min-height: 260px; margin: 18px 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #101820; }
.media-viewer-stage img, .media-viewer-stage video { display: block; width: 100%; max-height: 68vh; object-fit: contain; background: #101820; }
.media-viewer-stage .media-load-error { max-width: 520px; padding: 30px; color: #fff; text-align: center; }
.chat-composer { border-top: 1px solid var(--line); padding: 15px; background: var(--surface-soft); }
.chat-composer textarea { min-height: 66px; border: 0; box-shadow: none; background: transparent; resize: none; }
.composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.composer-footer span { color: #8a6c2f; font-size: .7rem; font-weight: 750; }
.quick-panel { display: flex; flex-direction: column; gap: 10px; }
.quick-panel h2 { margin: 3px 0 8px; }
.quick-action { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 13px; padding: 13px; background: var(--surface); color: var(--ink); text-align: left; }
.quick-action:hover { border-color: #ef9d9d; box-shadow: 0 7px 18px rgba(0,0,0,.08); }
.quick-icon { display: grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; background: var(--brand-blue); color: #fff; font-weight: 900; }
.quick-action > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.quick-action strong { font-size: .82rem; }
.quick-action small { color: var(--muted); font-size: .69rem; }
.quick-note { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; border-radius: 12px; padding: 13px; background: #171717; color: #fff; font-size: .73rem; line-height: 1.45; }
.quick-note.privacy { margin-top: 0; background: var(--brand-blue-dark); }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 21px; }
.metric-card { display: flex; flex-direction: column; min-height: 140px; border: 1px solid var(--line); border-radius: 16px; padding: 18px; background: var(--surface); }
.metric-card.accent { border-color: #c80000; background: linear-gradient(145deg, var(--primary), #9e0000); color: #fff; }
.metric-card span { color: var(--muted); font-size: .76rem; font-weight: 750; }
.metric-card.accent span, .metric-card.accent small { color: rgba(255,255,255,.72); }
.metric-card strong { margin: auto 0 2px; font-size: 2.25rem; letter-spacing: -.06em; }
.metric-card small { color: var(--muted); font-size: .69rem; }
.dashboard-grid { display: grid; grid-template-columns: 1.35fr .85fr; gap: 20px; }
.panel-card { padding: 20px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.panel-heading h2, .panel-heading p { margin-bottom: 0; }
.text-button { border: 0; background: transparent; color: var(--primary); font-size: .76rem; font-weight: 820; }
.task-list { display: flex; flex-direction: column; }
.task-row { display: flex; align-items: center; gap: 11px; min-height: 65px; border-top: 1px solid #edf0ee; padding: 10px 2px; }
.task-row:first-child { border-top: 0; }
.task-row > div { display: flex; flex: 1; flex-direction: column; gap: 3px; }
.task-row strong { font-size: .81rem; }
.task-row small { color: var(--muted); font-size: .69rem; }
.dashboard-task-row { width: 100%; border-right: 0; border-bottom: 0; border-left: 0; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.dashboard-task-row:hover { background: var(--surface-soft); }
.dashboard-empty { display: flex; min-height: 170px; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 25px; color: var(--muted); text-align: center; }
.dashboard-empty strong { color: var(--ink); font-size: .9rem; }
.dashboard-empty span { max-width: 440px; font-size: .74rem; line-height: 1.5; }
.dashboard-empty.compact { min-height: 150px; grid-column: 1 / -1; }
.status-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: #8d9a95; }
.status-dot.danger { background: var(--danger); }
.status-dot.warning { background: var(--accent); }
.status-dot.info { background: var(--brand-blue); }
.status-badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; font-size: .65rem; font-weight: 850; }
.status-badge.review { background: #f8e5e4; color: #8b2f2f; }
.status-badge.draft { background: var(--warning-soft); color: #765618; }
.status-badge.due { background: var(--info-soft); color: #315d8d; }
.status-badge.published { background: var(--brand-blue-soft); color: var(--brand-blue-dark); }
.status-badge.rejected, .status-badge.discarded { background: var(--danger-soft); color: #8d2929; }
.status-badge.retired, .status-badge.archived { background: #e8ebea; color: #505957; }
.topic-bars { display: flex; flex-direction: column; gap: 18px; padding-top: 7px; }
.topic-bars > div { display: grid; grid-template-columns: 1fr 36px; gap: 7px 12px; align-items: center; }
.topic-bars span { font-size: .76rem; font-weight: 750; }
.topic-bars strong { grid-column: 2; grid-row: 1 / span 2; color: var(--primary); text-align: right; font-size: 1rem; }
.topic-bars i { display: block; width: var(--bar); height: 7px; border-radius: 999px; background: linear-gradient(90deg, var(--primary), var(--brand-blue)); }
.topic-bars > .dashboard-empty { display: flex; grid-template-columns: none; gap: 6px; }
.toolbar { display: grid; grid-template-columns: minmax(260px, 1fr) 180px 180px; gap: 10px; margin-bottom: 14px; }
.content-table { border: 1px solid var(--line); border-radius: 15px; background: var(--surface); overflow: hidden; }
.table-empty-state { display: flex; min-height: 180px; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 30px; color: var(--muted); text-align: center; }
.table-empty-state strong { color: var(--ink); font-size: .95rem; }
.table-empty-state span { max-width: 620px; font-size: .78rem; line-height: 1.5; }
.table-header, .table-row { display: grid; grid-template-columns: minmax(240px, 1.6fr) .75fr .65fr .7fr minmax(155px, auto); align-items: center; gap: 12px; padding: 12px 16px; }
.table-header { background: #171717; color: #fff; font-size: .66rem; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.table-row { min-height: 66px; border-top: 1px solid #edf0ee; }
.table-row:first-child { border-top: 0; }
.table-row > div:first-child { display: flex; flex-direction: column; gap: 3px; }
.table-row strong { font-size: .81rem; }
.table-row small, .table-row span { color: var(--muted); font-size: .7rem; }
.row-action { border: 0; background: transparent; color: #6e7a75; font-weight: 900; }
.user-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.user-status { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.workflow-preview { margin-top: 21px; overflow: hidden; }
.workflow-canvas { position: relative; display: flex; align-items: center; gap: 15px; min-height: 300px; border: 1px dashed #c8d3cf; border-radius: 13px; padding: 30px; background-image: radial-gradient(#d7dfdc 1px, transparent 1px); background-size: 20px 20px; overflow-x: auto; }
.workflow-node { display: flex; flex: 0 0 185px; flex-direction: column; gap: 5px; border: 2px solid #a8c7bf; border-radius: 12px; padding: 13px; background: #fff; box-shadow: 0 8px 18px rgba(33,57,49,.08); }
.workflow-node small { color: var(--muted); font-size: .63rem; font-weight: 850; text-transform: uppercase; }
.workflow-node strong { font-size: .78rem; }
.workflow-node span { color: var(--muted); font-size: .66rem; }
.workflow-node.start { border-color: var(--primary); background: var(--primary-soft); }
.workflow-node.instruction { border-color: var(--brand-blue); }
.workflow-node.decision { border-color: var(--accent); background: #fffaf0; }
.workflow-node.result-danger { border-color: var(--danger); background: var(--danger-soft); }
.workflow-node.escalation { border-color: #b88b32; background: var(--warning-soft); }
.workflow-arrow { flex: 0 0 auto; color: #7c8a85; font-size: 1.4rem; font-weight: 900; }
.workflow-branches { display: flex; flex-direction: column; gap: 15px; }
.workflow-branches > div { display: flex; align-items: center; gap: 8px; }
.workflow-branches > div > span { width: 30px; border-radius: 999px; padding: 3px; background: #fff; text-align: center; font-size: .66rem; font-weight: 900; }
.card-list { display: flex; flex-direction: column; gap: 12px; }
.list-card { display: grid; grid-template-columns: 1fr auto; gap: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 17px; background: var(--surface); }
.list-card h3 { margin-bottom: 5px; font-size: .93rem; }
.list-card p { margin-bottom: 8px; color: var(--muted); font-size: .79rem; }
.list-card-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: .68rem; }
.empty-card { border: 1px dashed #bccac5; border-radius: 14px; padding: 35px; text-align: center; color: var(--muted); }
.two-column { display: grid; grid-template-columns: minmax(340px, .8fr) minmax(400px, 1.2fr); gap: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.inline-info { border-radius: 10px; padding: 11px; background: var(--info-soft); color: #345c87; font-size: .76rem; line-height: 1.45; }
.media-guidance-card { display: flex; align-items: center; gap: 14px; margin: -7px 0 18px; border: 1px solid #8fd3ea; border-radius: 14px; padding: 14px 17px; background: linear-gradient(100deg, var(--brand-blue-soft), #fff); }
.media-guidance-card > div { display: flex; flex-direction: column; gap: 3px; }
.media-guidance-card strong { font-size: .86rem; }
.media-guidance-card span:last-child { color: var(--muted); font-size: .75rem; }
.media-guidance-icon { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; background: var(--brand-blue); color: #fff; font-size: .78rem; }
#content-table .table-header, #content-table .table-row { grid-template-columns: minmax(220px, 1.45fr) .65fr .65fr .72fr .65fr 96px; }
.media-count { display: inline-flex; align-items: center; width: fit-content; border-radius: 999px; padding: 5px 8px; background: var(--brand-blue-soft); color: var(--brand-blue-dark) !important; font-weight: 800; }

.screenshot-layout { display: grid; grid-template-columns: 255px minmax(0, 1fr); gap: 18px; }
.media-return-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: -7px 0 18px; border-left: 6px solid var(--brand-blue); border-radius: 13px; padding: 14px 16px; background: #fff; box-shadow: 0 8px 22px rgba(0,0,0,.07); }
.media-return-banner > div:first-child { display: flex; flex-direction: column; gap: 4px; }
.media-return-banner span { color: var(--muted); font-size: .75rem; }
.media-return-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.screenshot-tools { align-self: start; display: flex; flex-direction: column; gap: 10px; }
.file-button { position: relative; overflow: hidden; }
.file-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.tool-button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 72px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); color: #4c5a54; font-size: .68rem; font-weight: 800; }
.tool-button.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); }
.tool-swatch { display: block; width: 27px; height: 14px; }
.tool-swatch.black { background: #111; }
.tool-swatch.outline { border: 3px solid var(--accent); }
.tool-glyph { color: var(--accent); font-size: 1.4rem; font-weight: 900; }
.tool-number { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; }
.confirmation { display: flex; align-items: flex-start; gap: 9px; font-size: .75rem; line-height: 1.45; }
.confirmation input { width: 16px; margin-top: 2px; }
.canvas-card { position: relative; padding: 16px; overflow: auto; }
.canvas-hint { margin-bottom: 10px; color: var(--muted); font-size: .72rem; }
#screenshot-canvas { display: block; max-width: 100%; height: auto; border: 1px solid #bfc9c5; border-radius: 9px; background: #fff; cursor: crosshair; touch-action: none; }

.toast { position: fixed; inset: auto 26px 26px auto; z-index: 2000; max-width: 380px; margin: 0; border: 0; border-top: 4px solid var(--brand-blue); border-radius: 12px; padding: 13px 16px; background: #111; color: #fff; box-shadow: var(--shadow); font-size: .78rem; font-weight: 750; }
dialog { border: 0; }
dialog::backdrop { background: rgba(15,28,24,.55); backdrop-filter: blur(4px); }
.modal { width: min(620px, calc(100vw - 30px)); max-height: calc(100vh - 50px); border-top: 7px solid var(--primary); border-radius: 18px; padding: 25px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); overflow-y: auto; }
.modal form { display: flex; flex-direction: column; gap: 11px; }
.modal h2 { font-size: 1.55rem; }
.modal-icon { display: grid; place-items: center; width: 45px; height: 45px; border-radius: 14px; font-size: 1.3rem; font-weight: 900; }
.warning-icon { background: var(--warning-soft); color: #876321; }
.instruction-box { border-left: 4px solid var(--primary); border-radius: 10px; padding: 13px 15px; background: var(--primary-soft); }
.instruction-box p { margin: 5px 0 0; font-size: .83rem; }
.learning-notice-image { margin: 14px 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #101820; }
.learning-notice-image img { display: block; width: 100%; max-height: 48vh; object-fit: contain; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 8px; }
.release-actions { flex-wrap: wrap; }
.release-management-action { margin-right: auto; }
.guide-modal { width: min(780px, calc(100vw - 30px)); }
.guide-media-tabs { display: inline-flex; align-self: flex-start; gap: 5px; border-radius: 999px; padding: 4px; background: #eeeeee; }
.guide-media-tabs button { border: 0; border-radius: 999px; padding: 8px 13px; background: transparent; color: #555; font-size: .75rem; font-weight: 800; }
.guide-media-tabs button.active { background: var(--brand-blue-dark); color: #fff; }
.guide-media-panel { display: flex; flex-direction: column; gap: 11px; }
.training-video-demo { display: grid; place-items: center; min-height: 310px; border-radius: 14px; padding: 30px; background: radial-gradient(circle at 50% 35%, #353535, #0b0b0b 72%); color: #fff; text-align: center; }
.training-video-demo button { display: grid; place-items: center; width: 68px; height: 68px; margin-bottom: 18px; border: 4px solid rgba(255,255,255,.75); border-radius: 50%; background: var(--primary); color: #fff; font-size: 1.35rem; }
.training-video-demo strong { margin-bottom: 5px; font-size: 1.05rem; }
.training-video-demo span { color: #c7c7c7; font-size: .72rem; }
.guide-steps { margin: 0; padding-left: 23px; color: #495650; font-size: .82rem; line-height: 1.8; }
.fake-system-screen { border: 1px solid #aebbb6; border-radius: 12px; background: #f2f4f3; overflow: hidden; }
.fake-system-top { display: flex; justify-content: space-between; padding: 10px 13px; background: #2a3c44; color: #fff; font-size: .72rem; }
.fake-system-body { display: grid; grid-template-columns: 90px 1fr; min-height: 250px; }
.fake-nav { display: flex; flex-direction: column; gap: 10px; padding: 18px 12px; background: #dfe4e2; }
.fake-nav i { height: 10px; border-radius: 999px; background: #bbc6c2; }
.fake-content { display: flex; flex-direction: column; gap: 13px; padding: 25px; }
.fake-row { position: relative; display: grid; grid-template-columns: 160px 1fr; align-items: center; min-height: 46px; border: 1px solid #d9dfdc; border-radius: 8px; padding: 9px 12px; background: #fff; font-size: .75rem; }
.redacted-line { display: block; width: 180px; height: 14px; background: #111; }
.redacted-line.short { width: 120px; }
.fake-row.highlighted { border: 3px solid var(--accent); background: #fffaf0; }
.fake-row.highlighted em { position: absolute; top: -15px; right: -13px; display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: var(--accent); color: #fff; font-style: normal; font-weight: 900; }
.wizard-modal { width: min(860px, calc(100vw - 30px)); }
.stepper { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 5px 0 15px; }
.stepper span { border-radius: 8px; padding: 8px; background: #edf1ef; color: #7a8681; text-align: center; font-size: .66rem; font-weight: 850; }
.stepper span.active { background: var(--primary); color: #fff; }
.wizard-step { display: flex; flex-direction: column; gap: 11px; }
.wizard-actions { display: flex; justify-content: space-between; gap: 9px; margin-top: 10px; }
.wizard-actions #wizard-next, .wizard-actions #wizard-save { margin-left: auto; }
.case-preview { border: 1px solid var(--line); border-radius: 13px; padding: 16px; background: var(--surface-soft); }
.case-preview dl { display: grid; grid-template-columns: 140px 1fr; gap: 9px; margin: 0; font-size: .77rem; }
.case-preview dt { color: var(--muted); font-weight: 800; }
.case-preview dd { margin: 0; }
.media-step-heading, .content-editor-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.media-step-heading h3, .content-editor-section-heading h3 { margin: 0; font-size: 1rem; }
.content-editor-section-heading p { margin: 4px 0 0; color: var(--muted); font-size: .75rem; }
.media-action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.media-action-card { position: relative; display: grid; grid-template-columns: 42px 1fr; grid-template-rows: auto auto; gap: 3px 11px; min-height: 88px; border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: #fff; color: var(--ink); text-align: left; }
button.media-action-card { cursor: pointer; }
.media-action-card:hover { border-color: var(--brand-blue); background: var(--brand-blue-soft); }
.media-action-card strong { align-self: end; font-size: .84rem; }
.media-action-card small { color: var(--muted); font-size: .7rem; line-height: 1.35; }
.media-action-icon { display: grid; place-items: center; grid-row: 1 / span 2; width: 42px; height: 42px; border-radius: 12px; background: var(--brand-blue-soft); color: var(--brand-blue-dark); font-size: 1.1rem; font-weight: 900; }
.media-action-icon.video { border-radius: 50%; background: var(--primary); color: #fff; font-size: .75rem; }
.media-video-confirm { border-radius: 10px; padding: 10px 11px; background: var(--warning-soft); color: #654a14; }
.media-library { display: flex; flex-direction: column; gap: 10px; min-height: 86px; border: 1px dashed #b9c8ce; border-radius: 13px; padding: 11px; background: #fafcfd; }
.media-library.compact { min-height: 76px; }
.media-empty { display: grid; place-items: center; min-height: 62px; color: var(--muted); text-align: center; font-size: .75rem; }
.media-item { display: grid; grid-template-columns: 96px 1fr auto; align-items: center; gap: 13px; border: 1px solid var(--line); border-radius: 12px; padding: 9px; background: #fff; }
.media-thumb { position: relative; display: grid; place-items: center; width: 96px; height: 62px; border-radius: 9px; background: linear-gradient(145deg, #eef3f5, #d9e5e9); color: var(--brand-blue-dark); overflow: hidden; }
.media-thumb.image::before { content: ""; position: absolute; inset: 12px; border: 4px solid var(--accent); border-radius: 4px; }
.media-thumb.image::after { content: "1"; position: absolute; top: 5px; right: 7px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff; font-size: .65rem; font-weight: 900; }
.media-thumb.video { background: linear-gradient(145deg, #272727, #090909); color: #fff; }
.media-thumb.video span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--primary); font-size: .72rem; }
.media-item-copy { min-width: 0; }
.media-item-copy strong, .media-item-copy small { display: block; }
.media-item-copy strong { margin-bottom: 4px; font-size: .82rem; }
.media-item-copy small { color: var(--muted); font-size: .69rem; }
.media-item-actions { display: flex; gap: 5px; }
.media-item-actions button { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: #333; font-weight: 900; }
.media-total { border-radius: 999px; padding: 6px 10px; background: var(--brand-blue-soft); color: var(--brand-blue-dark); font-size: .7rem; font-weight: 850; }
.content-editor-modal { width: min(1180px, calc(100vw - 30px)); }
.content-editor-modal .privacy-note { max-width: none; }
.editor-heading-actions { display: flex; align-items: center; gap: 9px; }
.version-history-modal { width: min(760px, calc(100vw - 30px)); }
.version-history-list { display: flex; flex-direction: column; gap: 10px; max-height: min(64vh, 660px); overflow-y: auto; padding-right: 3px; }
.version-history-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; border: 1px solid var(--line); border-radius: 14px; padding: 15px; background: #fbfcfc; }
.version-history-item.current { border-color: #adcbea; background: var(--brand-blue-soft); }
.version-history-item-copy { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.version-history-item-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.version-history-item-heading strong { font-size: .9rem; }
.version-history-details { display: flex; flex-wrap: wrap; gap: 5px 14px; color: var(--muted); font-size: .72rem; }
.version-history-note { margin: 0; color: #414745; font-size: .75rem; }
.version-history-action { align-self: center; }
.history-icon { color: var(--brand-blue-dark); background: var(--brand-blue-soft); }
.version-history-empty { border: 1px dashed var(--line); border-radius: 14px; padding: 24px; color: var(--muted); text-align: center; }
.editor-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; border-radius: 13px; padding: 5px; background: #ecefef; }
.editor-tabs button { min-height: 40px; border: 0; border-radius: 9px; padding: 8px 10px; background: transparent; color: #5b6260; font-size: .75rem; font-weight: 850; }
.editor-tabs button.active { background: #fff; color: var(--primary-dark); box-shadow: 0 3px 10px rgba(0,0,0,.08); }
.editor-panel { display: flex; flex-direction: column; gap: 12px; min-height: 390px; border: 1px solid var(--line); border-radius: 15px; padding: 18px; background: #fbfcfc; }
.editor-panel label { display: flex; flex-direction: column; gap: 6px; }
.editor-three-columns { grid-template-columns: 1fr 1fr 1fr; }
.tree-editor-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.tree-editor-heading h3 { margin: 0 0 4px; font-size: 1.05rem; }
.tree-editor-heading p { margin: 0; color: var(--muted); font-size: .76rem; }
.tree-add-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.tree-editor-status { border-radius: 11px; padding: 11px 13px; font-size: .75rem; }
.tree-editor-status strong, .tree-editor-status span { display: block; }
.tree-editor-status span { margin-top: 3px; }
.tree-editor-status.complete { border: 1px solid #9bd9e9; background: var(--brand-blue-soft); color: var(--brand-blue-dark); }
.tree-editor-status.incomplete { border: 1px solid #f0cfcf; background: var(--primary-soft); color: #8b2f2f; }
.tree-editor-status ul { margin: 7px 0 0; padding-left: 19px; line-height: 1.5; }
.tree-editor-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr); align-items: start; gap: 14px; }
.tree-node-list { display: flex; flex-direction: column; gap: 12px; }
.tree-node-card { display: flex; flex-direction: column; gap: 11px; border: 1px solid var(--line); border-left: 6px solid var(--brand-blue); border-radius: 13px; padding: 14px; background: #fff; }
.tree-node-card.result { border-left-color: #36a8c9; }
.tree-node-card.escalation { border-left-color: var(--accent); }
.tree-node-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tree-node-toolbar > div { display: flex; align-items: center; gap: 7px; }
.tree-node-index { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: #171717; color: #fff; font-size: .7rem; font-weight: 900; }
.tree-node-type { color: var(--muted); font-size: .69rem; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.tree-delete-button, .tree-answer-row > button { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--primary-dark); font-weight: 900; }
.tree-delete-button:disabled { opacity: .3; cursor: not-allowed; }
.tree-answer-list { display: flex; flex-direction: column; gap: 7px; border-radius: 10px; padding: 10px; background: #f1f4f5; }
.tree-answer-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tree-answer-heading strong { font-size: .74rem; }
.tree-answer-row { display: grid; grid-template-columns: minmax(130px, .8fr) minmax(210px, 1.2fr) 32px; align-items: center; gap: 7px; }
.tree-answer-row input, .tree-answer-row select { padding: 9px 10px; font-size: .73rem; }
.tree-map-panel { position: sticky; top: 0; border: 1px solid #cbd7da; border-radius: 13px; padding: 13px; background: #f4f8f9; }
.tree-visual-preview { max-height: 650px; padding-right: 4px; overflow: auto; }
.tree-map-group { display: flex; flex-direction: column; gap: 7px; }
.tree-map-node { display: flex; flex-direction: column; gap: 3px; border: 1px solid #9bcfe0; border-left: 5px solid var(--brand-blue); border-radius: 9px; padding: 9px 11px; background: #fff; }
.tree-map-node.result { border-color: #9bd2df; border-left-color: #36a8c9; }
.tree-map-node.result.blocked { border-color: #ecbcbc; border-left-color: var(--primary); background: var(--primary-soft); }
.tree-map-node.escalation { border-color: #efd69d; border-left-color: var(--accent); background: #fffaf0; }
.tree-map-node small { color: var(--muted); font-size: .6rem; font-weight: 850; text-transform: uppercase; }
.tree-map-node strong { font-size: .73rem; line-height: 1.35; }
.tree-map-branches { display: flex; flex-direction: column; gap: 7px; margin-left: 15px; border-left: 2px solid #c8d5d9; padding-left: 10px; }
.tree-map-branch { display: flex; flex-direction: column; gap: 5px; }
.tree-map-branch > span { align-self: flex-start; border-radius: 999px; padding: 3px 7px; background: #171717; color: #fff; font-size: .61rem; font-weight: 800; }
.tree-map-missing { border: 1px dashed #d59999; border-radius: 8px; padding: 8px; color: #8b2f2f; font-size: .69rem; }
.media-node-assignment { margin-top: 9px; color: var(--muted); font-size: .67rem; }
.media-node-assignment select { margin-top: 4px; padding: 7px 9px; font-size: .7rem; }
.release-check-card { display: flex; flex-direction: column; gap: 12px; border: 1px solid #c9dce3; border-radius: 15px; padding: 16px; background: linear-gradient(135deg, #f8fcfd, #fff); }
.release-next-step { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-radius: 12px; padding: 14px 15px; }
.release-next-step > div { display: flex; flex-direction: column; gap: 4px; }
.release-next-step strong { font-size: .85rem; }
.release-next-step span { font-size: .72rem; line-height: 1.4; }
.release-next-step.pending { border: 1px solid #efc9c9; background: var(--primary-soft); color: #842b2b; }
.release-next-step.complete { border: 1px solid #9bd9e9; background: var(--brand-blue-soft); color: var(--brand-blue-dark); }
.release-ready-arrow { font-size: 1.25rem !important; font-weight: 950; }
.release-check-list { display: flex; flex-direction: column; gap: 8px; }
.release-check-row { display: grid; grid-template-columns: 34px 1fr auto minmax(130px, auto); align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; background: #fff; }
.release-check-row > div { display: flex; flex-direction: column; gap: 3px; }
.release-check-row strong { font-size: .79rem; }
.release-check-row small { color: var(--muted); font-size: .69rem; line-height: 1.35; }
.release-check-row > span:nth-last-child(2) { font-size: .67rem; font-weight: 850; }
.release-check-row.passed > span:nth-last-child(2) { color: var(--brand-blue-dark); }
.release-check-row.pending > span:nth-last-child(2) { color: #8b2f2f; }
.release-check-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: .8rem; font-weight: 950; }
.release-check-row.passed .release-check-icon { background: var(--brand-blue-soft); color: var(--brand-blue-dark); }
.release-check-row.pending .release-check-icon { background: var(--primary-soft); color: var(--primary-dark); }
.release-actions { flex-wrap: wrap; }
.release-preview-modal { width: min(780px, calc(100vw - 30px)); }
.employee-release-preview { display: flex; flex-direction: column; gap: 15px; border: 1px solid var(--line); border-radius: 15px; padding: 18px; background: #f7f8f8; }
.release-preview-progress { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-radius: 10px; padding: 10px 12px; background: var(--brand-blue-soft); color: var(--brand-blue-dark); }
.release-preview-progress > div { display: flex; flex-direction: column; gap: 3px; }
.release-preview-progress span { font-size: .75rem; font-weight: 900; }
.release-preview-progress small { font-size: .66rem; }
.release-preview-open-nodes { max-width: 50%; border-left: 1px solid #9bd9e9; padding-left: 12px; }
.release-preview-open-nodes strong { font-size: .66rem; text-transform: uppercase; }
.release-preview-open-nodes span { font-size: .65rem; font-weight: 650; line-height: 1.35; }
.release-preview-question { border-left: 5px solid var(--primary); border-radius: 10px; padding: 14px 16px; background: #fff; }
.release-preview-question span, .release-preview-results span, .publish-summary span { display: block; margin-bottom: 4px; color: var(--muted); font-size: .66rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.release-preview-question strong { font-size: 1rem; }
.release-preview-question p { margin: 7px 0 0; color: var(--muted); font-size: .78rem; }
.release-preview-media { display: flex; flex-direction: column; gap: 8px; }
.release-preview-media-item { display: grid; grid-template-columns: 46px 1fr; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 11px; padding: 10px; background: #fff; }
.release-preview-media-item > span { display: grid; place-items: center; width: 44px; height: 36px; border-radius: 8px; background: var(--brand-blue-soft); color: var(--brand-blue-dark); font-weight: 900; }
.release-preview-media-item.video > span { border-radius: 50%; background: #171717; color: #fff; }
.release-preview-media-item strong, .release-preview-media-item small { display: block; }
.release-preview-media-item strong { margin-bottom: 3px; font-size: .79rem; }
.release-preview-media-item small { color: var(--muted); font-size: .68rem; }
.release-preview-results { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.release-preview-results > div { border-left: 4px solid var(--brand-blue); border-radius: 10px; padding: 12px 14px; background: #fff; }
.release-preview-results > div.danger { border-left-color: var(--primary); background: var(--primary-soft); }
.release-preview-results strong { font-size: .8rem; }
.release-preview-answer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.release-answer-button { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; min-height: 74px; border: 1px solid #a9dced; border-radius: 12px; padding: 12px 13px; background: #fff; color: var(--ink); text-align: left; }
.release-answer-button:hover { border-color: var(--brand-blue); background: var(--brand-blue-soft); }
.release-answer-button span { grid-column: 1; color: var(--muted); font-size: .62rem; font-weight: 800; text-transform: uppercase; }
.release-answer-button strong { grid-column: 1; font-size: .8rem; }
.release-answer-button b { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--brand-blue-dark); font-size: 1rem; }
.release-terminal { border-left: 6px solid var(--brand-blue); border-radius: 12px; padding: 18px; background: #fff; }
.release-terminal.blocked { border-left-color: var(--primary); background: var(--primary-soft); }
.release-terminal.allowed { border-left-color: var(--brand-blue); background: var(--brand-blue-soft); }
.release-terminal.escalation { border-left-color: var(--accent); background: #fff8e8; }
.release-terminal > span { display: block; margin-bottom: 5px; color: var(--muted); font-size: .65rem; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.release-terminal > strong { display: block; font-size: 1.05rem; }
.release-terminal p { margin: 8px 0 0; font-size: .79rem; }
.release-terminal small { display: block; margin-top: 10px; color: #7b5a18; }
.publish-confirm-modal { width: min(650px, calc(100vw - 30px)); }
.publish-icon { background: var(--brand-blue-soft); color: var(--brand-blue-dark); }
.publish-summary { display: grid; grid-template-columns: 1.45fr 1fr .65fr; gap: 8px; border-radius: 12px; padding: 12px; background: #f1f4f5; }
.publish-summary > div { min-width: 0; border-right: 1px solid var(--line); padding-right: 8px; }
.publish-summary > div:last-child { border-right: 0; }
.publish-summary strong { font-size: .75rem; }
.publish-confirmation { border: 1px solid #f0d08e; border-radius: 10px; padding: 11px; background: var(--warning-soft); color: #654a14; }

@media (max-width: 1100px) {
  :root { --sidebar-width: 210px; }
  .chat-layout, .dashboard-grid { grid-template-columns: 1fr; }
  .quick-panel { display: grid; grid-template-columns: repeat(3, 1fr); }
  .quick-panel h2, .quick-note { grid-column: 1 / -1; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .screenshot-layout { grid-template-columns: 1fr; }
  .screenshot-tools { display: grid; grid-template-columns: 1fr 1fr; }
  .screenshot-tools .tool-grid, .screenshot-tools hr, .screenshot-tools .confirmation, .screenshot-tools .tiny { grid-column: 1 / -1; }
  #content-table .table-header, #content-table .table-row { grid-template-columns: minmax(190px, 1.35fr) .6fr .6fr .65fr .65fr 92px; }
  .tree-editor-layout { grid-template-columns: 1fr; }
  .tree-map-panel { position: static; }
}

@media (max-width: 760px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .app-shell { display: block; padding-top: 29px; }
  .topbar { top: 29px; padding: 0 12px; }
  .topbar-brand span, .user-chip > div, .topbar-actions .button { display: none; }
  .sidebar { position: fixed; inset: auto 0 0 0; z-index: 50; display: flex; height: 66px; border: 1px solid var(--line); padding: 7px; overflow-x: auto; background: rgba(255,255,255,.97); }
  .nav-section { display: contents; }
  .nav-section-label, .sidebar-footer { display: none; }
  .nav-button { flex: 0 0 70px; flex-direction: column; justify-content: center; gap: 2px; min-height: 50px; padding: 4px; font-size: .61rem; text-align: center; }
  .nav-icon { width: 25px; height: 22px; }
  .nav-badge { display: none; }
  .main-panel { padding: 22px 14px 90px; }
  .page-heading { flex-direction: column; }
  .chat-card { min-height: 560px; }
  .quick-panel { grid-template-columns: 1fr; }
  .quick-panel h2, .quick-note { grid-column: 1; }
  .metric-grid, .two-column, .form-grid { grid-template-columns: 1fr; }
  .toolbar { grid-template-columns: 1fr; }
  .table-header { display: none; }
  .table-row { grid-template-columns: 1fr auto; }
  .table-row > *:not(:first-child):not(:last-child) { display: none; }
  .screenshot-tools { display: flex; }
  .workflow-canvas { align-items: stretch; flex-direction: column; }
  .workflow-arrow { transform: rotate(90deg); text-align: center; }
  .workflow-node { flex-basis: auto; width: 100%; }
  .composer-footer { align-items: stretch; flex-direction: column; }
  .message { max-width: 96%; }
  .modal-actions { flex-direction: column-reverse; }
  .stepper { grid-template-columns: 1fr 1fr; }
  .media-action-grid { grid-template-columns: 1fr; }
  .media-return-banner { align-items: stretch; flex-direction: column; }
  .media-return-actions { flex-direction: column-reverse; }
  .media-item { grid-template-columns: 74px 1fr; }
  .media-thumb { width: 74px; height: 54px; }
  .media-item-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .editor-tabs { grid-template-columns: 1fr 1fr; }
  .editor-three-columns { grid-template-columns: 1fr; }
  .tree-editor-heading, .release-preview-progress { align-items: stretch; flex-direction: column; }
  .tree-add-actions { justify-content: flex-start; }
  .tree-answer-row { grid-template-columns: 1fr 32px; }
  .tree-answer-row select { grid-column: 1; }
  .tree-answer-row > button { grid-column: 2; grid-row: 1 / span 2; }
  .release-preview-answer-grid { grid-template-columns: 1fr; }
  .release-next-step { align-items: stretch; flex-direction: column; }
  .release-check-row { grid-template-columns: 30px 1fr; }
  .release-check-row > span:nth-last-child(2), .release-check-row > button { grid-column: 2; }
  .release-preview-open-nodes { max-width: none; border-left: 0; border-top: 1px solid #9bd9e9; padding: 7px 0 0; }
  .release-preview-results, .publish-summary { grid-template-columns: 1fr; }
  .publish-summary > div { border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 8px; }
  .publish-summary > div:last-child { border-bottom: 0; padding-bottom: 0; }
}
.permission-summary {
  display: inline-block;
  max-width: 15rem;
  line-height: 1.35;
}

.permission-fieldset {
  display: grid;
  gap: .65rem;
  margin: 1.25rem 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.permission-fieldset legend {
  padding: 0 .35rem;
  font-weight: 750;
}
