@charset "UTF-8";

:root {
  color-scheme: light;
  --ink: #1f2938;
  --muted: #718096;
  --line: #e6eaf0;
  --canvas: #f6f8fb;
  --primary: #4659d9;
  --primary-dark: #3445b4;
  --primary-soft: #eef0ff;
  --success: #14765b;
  --danger: #b74444;
  --radius: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
button, input, textarea, select, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid #a4b0ff; outline-offset: 3px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 28px; line-height: 1.35; letter-spacing: -.7px; margin-bottom: 10px; font-weight: 650; }
h2 { font-size: 17px; line-height: 1.5; font-weight: 650; margin-bottom: 0; }
h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
p { margin-bottom: 0; }
strong { font-weight: 600; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -60px; left: 16px; background: white; padding: 10px 16px; z-index: 30; color: var(--primary); border-radius: 8px; }
.skip-link:focus { top: 8px; }
.environment-strip { min-height: 36px; padding: 7px 20px; display: flex; gap: 10px; align-items: center; justify-content: center; background: #eff1f9; color: #59637f; font-size: 11px; letter-spacing: .25px; border-bottom: 1px solid #e4e7f2; }
.environment-strip strong { color: #485576; }
.environment-mark { height: 6px; width: 6px; border-radius: 50%; background: #7483c3; }
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand-symbol { width: 35px; height: 35px; border-radius: 10px; display: inline-grid; place-items: center; background: var(--primary); color: #fff; font-size: 23px; font-weight: 700; line-height: 1; box-shadow: 0 4px 10px #3445b415; }
.brand-name { display: block; font-size: 17px; line-height: 1.3; font-weight: 650; letter-spacing: -.35px; }
.brand-caption { display: block; color: #8a94a7; font-size: 10px; letter-spacing: .4px; margin-top: 3px; }
.button { display: inline-flex; gap: 7px; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 8px; min-height: 40px; padding: 8px 15px; font-size: 13px; font-weight: 550; transition: background .14s ease, border-color .14s ease; white-space: nowrap; }
.button-primary { color: #fff; background: var(--primary); border-color: var(--primary); box-shadow: 0 2px 3px #4659d915; }
.button-primary:hover:not(:disabled) { background: var(--primary-dark); border-color: var(--primary-dark); }
.button-secondary { color: #49556d; background: #fff; border-color: #dce2ec; }
.button-secondary:hover:not(:disabled) { color: var(--primary); background: #f8f9ff; border-color: #bbc4ed; }
.button-danger { color: #ad4f4f; background: #fff8f8; border-color: #edd4d4; }
.button-danger:hover:not(:disabled) { background: #ffeded; border-color: #dda7a7; }
.button-link { color: var(--primary); border: 0; background: transparent; box-shadow: none; padding: 5px 0; min-height: 32px; }
.button-link:hover:not(:disabled) { color: var(--primary-dark); text-decoration: underline; text-underline-offset: 4px; }
.button-small { min-height: 32px; padding: 5px 11px; font-size: 12px; }
.button-full { width: 100%; }
.badge { display: inline-flex; align-items: center; padding: 3px 8px; font-size: 10px; line-height: 1.6; font-weight: 550; border-radius: 5px; white-space: nowrap; }
.badge-neutral { background: #f0f3f7; color: #6c788c; }
.badge-accent { background: var(--primary-soft); color: #5666cb; }
.badge-success { background: #eaf6f0; color: #277f63; }
.badge-warning { background: #fff4df; color: #96702b; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field label { color: #3f4b61; font-size: 12px; font-weight: 550; }
.input { appearance: none; display: block; width: 100%; border: 1px solid #dce2ec; border-radius: 8px; padding: 10px 12px; line-height: 1.6; background: #fff; color: var(--ink); min-width: 0; }
.input::placeholder { color: #a0a9b8; }
.input:hover:not(:read-only) { border-color: #bbc4d4; }
.input:focus { border-color: #7d8ce5; }
.input:read-only { background: #fafbfe; }
textarea.input { resize: vertical; min-height: 80px; }
.field-hint { font-size: 11px; color: #8892a2; line-height: 1.7; }
.stacked-form { display: flex; flex-direction: column; gap: 18px; }
.form-notices:empty { display: none; }
.notice { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding: 14px 16px; border-radius: 9px; font-size: 12px; border: 1px solid transparent; overflow-wrap: anywhere; }
.notice .button { margin-top: 5px; }
.notice-success { color: #27785c; border-color: #d8eede; background: #f2faf5; }
.notice-info { color: #4d62a5; border-color: #dfe6fb; background: #f4f7ff; }
.notice-error { color: #a44343; border-color: #f0d6d6; background: #fff6f6; }
.error-code { font-size: 10px; opacity: .8; }
.eyebrow { display: block; font-size: 10px; font-weight: 600; color: #8b96aa; letter-spacing: 1.5px; margin-bottom: 11px; }
.boot-state { min-height: calc(100vh - 36px); display: grid; justify-items: center; align-content: center; gap: 20px; }
.boot-state h1 { font-size: 24px; margin-bottom: 0; }
.boot-state p { color: var(--muted); }
.noscript-notice { margin: 24px; padding: 20px; background: #fff1dd; }

/* Sign-in */
.auth-layout { min-height: calc(100vh - 36px); display: grid; grid-template-columns: minmax(380px, 1.06fr) minmax(420px, 1fr); background: white; }
.auth-intro { min-height: 690px; padding: 42px 64px 28px; background-color: #f2f4fb; background-image: radial-gradient(ellipse at 0 0, #e8edff 0, transparent 55%), radial-gradient(ellipse at 100% 80%, #eceafb 0, transparent 55%); display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-intro::after { content: ''; position: absolute; height: 400px; width: 400px; right: -240px; bottom: 55px; border: 1px solid #dbe0f1; border-radius: 70px; transform: rotate(30deg); pointer-events: none; }
.auth-intro-content { max-width: 440px; padding: 55px 0; position: relative; z-index: 1; }
.auth-intro h1 { font-size: clamp(35px, 3.2vw, 49px); font-weight: 600; letter-spacing: -1.5px; line-height: 1.43; color: #253254; margin-bottom: 21px; }
.auth-intro .eyebrow { color: #7e8aad; margin-bottom: 22px; }
.auth-lead { max-width: 345px; font-size: 14px; color: #7a849d; line-height: 1.9; }
.auth-features { display: flex; flex-direction: column; gap: 20px; margin-top: 38px; }
.auth-feature { display: flex; gap: 15px; }
.feature-number { color: #8c97c5; font-size: 11px; padding-top: 2px; font-weight: 550; }
.auth-feature strong { color: #4b5878; font-size: 12px; }
.auth-feature p { color: #8b94a8; font-size: 11px; margin-top: 4px; }
.auth-intro-footer { font-size: 9px; color: #9ba5bc; letter-spacing: 1.7px; }
.auth-panel { display: grid; place-items: center; padding: 50px 44px; }
.auth-card { width: 100%; max-width: 350px; }
.auth-card h2 { font-size: 29px; font-weight: 600; margin-top: 18px; margin-bottom: 11px; letter-spacing: -.7px; }
.auth-description { font-size: 12px; line-height: 1.9; margin-bottom: 32px; }
.auth-form { display: flex; flex-direction: column; gap: 21px; }
.auth-form .button-primary { margin-top: 3px; }
.auth-card > .button-link { display: flex; margin: 19px auto 0; font-size: 12px; }
.auth-footnote { border-top: 1px solid var(--line); margin-top: 35px; padding-top: 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 10px; color: #9aa3b3; }
.service-status { display: flex; align-items: center; gap: 7px; font-size: 10px; color: #8b95a7; }
.status-dot { width: 5px; height: 5px; background: #a5aebe; border-radius: 50%; flex-shrink: 0; }
.status-dot-online { background: #6eaa8d; }

/* Workspace */
.workspace { display: grid; grid-template-columns: 223px minmax(0, 1fr); min-height: calc(100vh - 36px); }
.sidebar { display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--line); padding: 27px 18px 21px; }
.sidebar > .brand { padding: 0 6px; }
.sidebar .brand-symbol { width: 31px; height: 31px; font-size: 20px; border-radius: 9px; }
.sidebar .brand-name { font-size: 15px; }
.sidebar .brand-caption { font-size: 9px; }
.side-navigation { margin-top: 37px; }
.nav-caption { display: block; color: #99a2b2; font-size: 10px; font-weight: 500; letter-spacing: .7px; padding: 0 12px; margin-bottom: 10px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 11px; padding: 11px 12px; border: 0; border-radius: 8px; text-align: left; font-size: 12px; background: transparent; }
.nav-item + .nav-item { margin-top: 5px; }
.nav-item-active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav-item:hover { background: #e7ebff; }
.nav-icon { font-size: 17px; line-height: 1; }
.sidebar-note { margin-top: auto; padding: 16px 13px; border-radius: 10px; background: #f8f9fc; }
.sidebar-note .badge { font-size: 9px; padding: 2px 6px; }
.sidebar-note strong { display: block; font-size: 11px; margin-top: 10px; margin-bottom: 6px; color: #67748d; }
.sidebar-note p { font-size: 10px; color: #929cad; line-height: 1.9; }
.sidebar-footer { padding: 19px 9px 0; display: flex; flex-direction: column; gap: 5px; }
.sidebar-footer small { font-size: 9px; color: #abb3c0; }
.workspace-main { min-width: 0; }
.topbar { min-height: 77px; border-bottom: 1px solid var(--line); background: #ffffffc9; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 17px 34px; }
.topbar-title { display: flex; align-items: center; gap: 11px; font-size: 12px; font-weight: 500; color: #6b778d; }
.topbar-title .badge { font-size: 9px; }
.user-menu { display: flex; align-items: center; gap: 11px; min-width: 0; }
.avatar { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid #e0e5f2; background: #f2f4fb; border-radius: 50%; font-size: 12px; color: #7380a8; flex-shrink: 0; }
.user-identity { display: flex; flex-direction: column; min-width: 0; }
.user-identity strong { font-size: 11px; color: #5c6980; overflow: hidden; text-overflow: ellipsis; max-width: 230px; white-space: nowrap; }
.user-identity span { font-size: 9px; color: #9ca5b5; }
.user-menu .button { margin-left: 10px; font-size: 10px; }
.main-content { padding: 34px; max-width: 1560px; margin: 0 auto; }
#page-notices:not(:empty) { margin-bottom: 20px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 27px; }
.page-heading .eyebrow { margin-bottom: 8px; font-size: 9px; }
.page-heading h1 { font-size: 26px; margin-bottom: 8px; }
.page-heading p { font-size: 12px; max-width: 680px; line-height: 1.8; }
.heading-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.heading-actions > .button { font-size: 11px; min-height: 35px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(290px, 1fr); align-items: start; gap: 22px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; box-shadow: 0 2px 5px #20305d02; overflow: hidden; }
.panel-heading { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 21px 23px; border-bottom: 1px solid #edf0f5; }
.panel-heading h2 { font-size: 14px; }
.panel-description { color: #8b95a7; font-size: 11px; line-height: 1.9; padding: 19px 23px 0; }
.create-panel .stacked-form { padding: 23px; }
.side-stack { display: flex; flex-direction: column; gap: 20px; }
.table-scroll { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 11px 23px; font-size: 10px; color: #929caf; background: #fafbfd; font-weight: 500; white-space: nowrap; }
td { padding: 20px 23px; border-top: 1px solid #eff2f6; font-size: 12px; color: #66738a; vertical-align: middle; }
td strong { color: #44516b; overflow-wrap: anywhere; }
.table-subtext { display: block; margin-top: 5px; font-size: 9px; color: #a4aebf; max-width: 210px; overflow-wrap: anywhere; }
.table-date { font-size: 10px; white-space: nowrap; }
.empty-state { text-align: center; padding: 54px 24px; max-width: 440px; margin: 0 auto; }
.empty-icon { display: grid; place-items: center; margin: 0 auto 17px; width: 44px; height: 44px; border: 1px solid #e8edf6; border-radius: 14px; color: #a5b0cc; background: #f8faff; font-size: 25px; }
.empty-state h3 { font-size: 13px; color: #69768f; }
.empty-state p { color: #9aa4b5; font-size: 11px; line-height: 1.9; max-width: 300px; margin: 0 auto; }
.invitation-panel { border-color: #d9e1f5; background: #fbfcff; }
.invitation-panel > p, .invitation-panel > .field { margin: 16px 23px; }
.invitation-panel > .button { width: calc(100% - 46px); margin: 0 23px 20px; }
.invitation-panel .muted { font-size: 11px; line-height: 1.9; }
.invitation-recipient { font-size: 12px; color: #5a6c9b; overflow-wrap: anywhere; }
.token-field { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; overflow-wrap: anywhere; }
.organization-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.organization-card { padding: 23px; }
.card-topline { display: flex; align-items: center; justify-content: space-between; margin-bottom: 23px; }
.organization-avatar { display: grid; place-items: center; height: 42px; width: 42px; border-radius: 12px; color: #6e7cc2; background: #f0f2ff; font-size: 19px; }
.organization-card h2 { font-size: 17px; margin-bottom: 8px; overflow-wrap: anywhere; }
.resource-id { font-size: 9px; overflow-wrap: anywhere; margin-bottom: 25px; color: #a2acbd; }
.breadcrumb-back { font-size: 11px; margin: -9px 0 20px; }
.site-row { display: flex; align-items: center; gap: 14px; padding: 22px 23px; border-bottom: 1px solid #edf0f5; }
.site-row:last-child { border-bottom: 0; }
.site-symbol { width: 35px; height: 35px; display: grid; place-items: center; border: 1px solid #e4e9f4; border-radius: 9px; background: #f8faff; color: #8a98be; font-size: 20px; flex-shrink: 0; }
.site-details { flex: 1; min-width: 0; }
.site-details h3 { font-size: 13px; overflow-wrap: anywhere; margin-bottom: 4px; }
.site-details p { font-size: 10px; }
.site-row .button { font-size: 10px; }
.context-bar { display: flex; flex-wrap: wrap; gap: 8px 25px; border: 1px solid #e3e8f2; border-radius: 9px; padding: 11px 16px; background: #f0f3f9; color: #8792a8; font-size: 10px; margin-top: -6px; margin-bottom: 23px; }
.context-bar strong { color: #73829c; font-weight: 500; margin-right: 5px; }
.knowledge-grid { display: grid; grid-template-columns: minmax(270px, .86fr) minmax(360px, 1.5fr); align-items: start; gap: 22px; }
.knowledge-list-panel .panel-heading { padding-right: 16px; }
.knowledge-search { padding: 17px 20px 12px; display: grid; gap: 10px; }
.knowledge-search .field { margin: 0; }
.knowledge-search-actions, .knowledge-page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.knowledge-statuses { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 20px 17px; border-bottom: 1px solid var(--line); }
.knowledge-pagination { padding: 16px 20px; border-top: 1px solid var(--line); display: grid; gap: 11px; }
.knowledge-list-panel > .notice { margin: 16px 20px; }
.knowledge-list-panel > .button { margin: 0 20px 17px; }
.knowledge-entries { padding: 7px; max-height: 720px; overflow-y: auto; }
.knowledge-item { display: block; width: 100%; padding: 17px 15px; border: 1px solid transparent; border-radius: 9px; text-align: left; background: #fff; margin: 3px 0; }
.knowledge-item:hover { background: #f8f9fd; }
.knowledge-item.is-selected { border-color: #e1e5fc; background: #f5f6ff; }
.knowledge-item-top { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.knowledge-item-top strong { color: #5b6881; font-size: 12px; overflow-wrap: anywhere; }
.knowledge-item .badge { font-size: 9px; flex-shrink: 0; }
.knowledge-preview { margin-top: 8px; margin-bottom: 10px; color: #9ba5b6; font-size: 10px; line-height: 1.8; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.knowledge-meta { font-size: 9px; color: #adb5c4; }
.knowledge-editor .editor-form { padding: 24px; }
.knowledge-editor textarea { min-height: 300px; line-height: 1.9; font-size: 12px; }
.editor-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-top: 5px; }
.editor-actions .button { font-size: 11px; }
.save-state { margin-left: auto; font-size: 10px; color: #9ca5b6; }
.save-state.is-dirty { color: #b28635; }
.loading-state { padding: 90px 20px; text-align: center; color: #8a96ac; font-size: 12px; }

/* Site rules, simulation, and controlled history */
.site-tabs { display: flex; align-items: center; gap: 7px; border-bottom: 1px solid var(--line); margin: -4px 0 24px; overflow-x: auto; }
.site-tab { flex-shrink: 0; border: 0; border-bottom: 2px solid transparent; padding: 12px 17px; margin-bottom: -1px; color: #8691a6; background: transparent; font-size: 12px; }
.site-tab:hover { color: var(--primary); background: #eff2ff70; }
.site-tab.is-active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.section-notice { margin-bottom: 22px; }
.settings-form, .rule-form, .preview-form { padding: 24px; }
.settings-form { max-width: 850px; }
.service-panel + .service-panel { margin-top: 22px; }
.service-status-body { padding: 20px 24px 0; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
select.input { appearance: auto; padding-right: 8px; }
select.input:disabled { color: #788397; background: #fafbfe; opacity: 1; }
.checkbox-field { display: flex; align-items: flex-start; gap: 11px; padding: 14px; border: 1px solid #e5eaf3; border-radius: 9px; background: #fafbfe; }
.checkbox-field input { margin: 3px 0 0; width: 15px; height: 15px; accent-color: var(--primary); flex-shrink: 0; }
.checkbox-field span { display: flex; flex-direction: column; gap: 5px; }
.checkbox-field strong { font-size: 12px; color: #586781; }
.checkbox-field small { font-size: 10px; color: #94a0b3; }
.preview-grid { display: grid; grid-template-columns: minmax(290px, 1fr) minmax(340px, 1.2fr); gap: 22px; align-items: start; }
.preview-results { min-height: 300px; }
.preview-result-body { padding: 23px; }
.preview-result-body > h3 { margin-top: 24px; font-size: 12px; color: #60718d; }
.preview-result-body > .field-hint { margin-top: 20px; }
.preview-reason { font-size: 12px; line-height: 1.9; color: #79869d; }
.result-metrics { margin-top: 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; padding: 18px; background: #f6f8fc; border-radius: 10px; }
.result-metric { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.result-metric span { font-size: 10px; color: #96a1b4; }
.result-metric strong { font-size: 13px; color: #546683; overflow-wrap: anywhere; }
.matched-rule { display: flex; flex-direction: column; gap: 4px; padding: 14px; margin-top: 18px; border: 1px solid #e1e6f9; border-radius: 9px; background: #f6f7ff; }
.matched-rule strong { font-size: 12px; color: #6575b3; }
.matched-rule > .muted { font-size: 10px; }
.matched-rule .resource-id { margin-bottom: 0; }
.plain-content { font-family: inherit; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.9; color: #687790; background: #f7f9fc; padding: 16px; border: 1px solid #e7ecf4; border-radius: 9px; max-height: 350px; overflow-y: auto; }
.simulated-reply { background: #f4f8fe; }
.knowledge-history { border-top: 1px solid var(--line); padding: 22px 24px; }
.history-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.history-heading h3 { font-size: 13px; color: #61718a; margin-bottom: 5px; }
.history-heading .button { flex-shrink: 0; }
.history-content:not(:empty) { margin-top: 18px; }
.history-version { border: 1px solid #e6ebf3; border-radius: 8px; margin-top: 10px; overflow: hidden; }
.history-version summary { cursor: pointer; padding: 12px 15px; color: #7d8ba2; font-size: 10px; background: #fafbfe; }
.history-version summary strong { color: #63738d; font-size: 11px; margin: 0 10px 0 3px; }
.history-version summary > span:last-child { display: inline-block; margin-left: 10px; }
.history-version-body { padding: 16px; }
.history-version-body h3 { font-size: 12px; color: #60708b; }
.history-version-body .plain-content { margin-top: 12px; }
.history-version-body .form-notices { margin-top: 12px; }
.audit-actor { font-size: 10px; overflow-wrap: anywhere; max-width: 180px; color: #91a0b5; }
.audit-table td { vertical-align: top; }

/* Explicit team authorization and personal session management */
.compact-panel { max-width: 760px; }
.access-form { padding: 23px; }
.access-list { display: flex; flex-direction: column; }
.access-row { display: flex; justify-content: space-between; gap: 20px; padding: 20px 23px; border-bottom: 1px solid #edf0f5; }
.access-row:last-child { border-bottom: 0; }
.access-row-main { min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.access-row-main > strong { font-size: 12px; color: #5a6984; overflow-wrap: anywhere; }
.access-row-main .field-hint { overflow-wrap: anywhere; }
.access-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.access-row-actions { flex-shrink: 0; align-self: center; max-width: 150px; }
.access-row-actions .field-hint { display: block; text-align: right; }
.access-editor .editor-actions { align-items: flex-start; }
.access-editor .save-state { width: 100%; margin-left: 0; }
.member-edit-email { overflow-wrap: anywhere; font-size: 12px; color: #596c92; background: #f5f7fd; border-radius: 8px; padding: 10px 12px; }
.site-permissions { border: 1px solid #e2e8f1; border-radius: 9px; min-width: 0; padding: 12px 14px; margin: 0; max-height: 270px; overflow-y: auto; }
.site-permissions legend { padding: 0 6px; color: #70819d; font-size: 11px; }
.site-permissions:disabled { background: #f8f9fc; }
.site-permission-option { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 11px; color: #6e7c94; cursor: pointer; }
.site-permission-option input { margin: 0; width: 14px; height: 14px; accent-color: var(--primary); flex-shrink: 0; }
.site-permission-option span { overflow-wrap: anywhere; }
.scope-notice { color: #7e8ba3; font-size: 11px; line-height: 1.9; padding: 12px; background: #f6f8fc; border-radius: 8px; }
.danger-zone { border-top: 1px solid #eef0f5; padding-top: 18px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.invitations-list-panel { margin-top: 24px; }
.session-reference { font-size: 10px !important; font-weight: 500; color: #8a96ad !important; }

@media (min-width: 1600px) {
  .auth-intro { padding-left: max(64px, calc((100vw - 1250px) / 2)); }
  .auth-intro h1 { font-size: 51px; }
}
@media (max-width: 1200px) {
  .main-content { padding: 27px; }
  .topbar { padding-right: 27px; padding-left: 27px; }
  .workspace { grid-template-columns: 200px minmax(0, 1fr); }
  .sidebar { padding-left: 13px; padding-right: 13px; }
  .content-grid { grid-template-columns: minmax(0, 1.25fr) minmax(280px, 1fr); gap: 18px; }
  .organization-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .knowledge-grid { grid-template-columns: minmax(230px, .8fr) minmax(330px, 1.2fr); gap: 18px; }
  td, th { padding-left: 18px; padding-right: 18px; }
  .table-date { white-space: normal; }
}
@media (max-width: 1000px) {
  .preview-grid { grid-template-columns: 1fr; }
  .content-grid { grid-template-columns: 1fr; }
  .side-stack { display: grid; grid-template-columns: 1fr; }
  .create-panel .stacked-form { display: grid; grid-template-columns: 1fr 1fr; }
  .create-panel .stacked-form > .button, .create-panel .stacked-form > .form-notices { grid-column: 1 / -1; }
  .knowledge-grid { grid-template-columns: 1fr; }
  .knowledge-entries { max-height: 290px; }
  .knowledge-list-panel .empty-state { padding: 28px; }
  .auth-intro { padding-left: 35px; padding-right: 35px; }
  .auth-panel { padding-left: 35px; padding-right: 35px; }
  .auth-layout { grid-template-columns: minmax(320px, 1fr) minmax(350px, 1fr); }
}
@media (max-width: 760px) {
  .environment-strip { padding: 7px 12px; font-size: 9px; gap: 7px; }
  .auth-layout { display: block; }
  .auth-intro { display: none; }
  .auth-panel { min-height: calc(100vh - 36px); padding: 48px 25px; }
  .auth-card { max-width: 390px; }
  .auth-card h2 { font-size: 29px; }
  .workspace { display: block; }
  .sidebar { flex-direction: row; flex-wrap: wrap; padding: 15px 20px; align-items: center; justify-content: space-between; border-right: 0; border-bottom: 1px solid var(--line); gap: 10px; }
  .sidebar-note, .sidebar-footer, .nav-caption { display: none; }
  .side-navigation { margin-top: 0; display: flex; flex-wrap: wrap; gap: 4px; }
  .side-navigation .nav-item { width: auto; margin: 0; }
  .sidebar > .brand { padding: 0; }
  .nav-item { padding: 8px 11px; font-size: 11px; }
  .topbar { padding: 14px 20px; min-height: 68px; }
  .topbar-title { font-size: 10px; gap: 8px; }
  .topbar-title .badge { display: none; }
  .user-identity strong { max-width: 150px; font-size: 10px; }
  .user-menu { gap: 8px; }
  .user-menu .button { margin-left: 3px; }
  .avatar { display: none; }
  .main-content { padding: 25px 20px; }
  .page-heading { align-items: flex-start; gap: 15px; margin-bottom: 22px; }
  .page-heading h1 { font-size: 24px; }
  .page-heading p { font-size: 11px; }
  .page-heading .eyebrow { font-size: 8px; letter-spacing: 1px; }
  .heading-actions { padding-top: 22px; }
  .heading-actions .button { font-size: 10px; padding: 7px 10px; }
  .organization-grid { gap: 15px; }
  .organization-card { padding: 20px; }
  .panel-heading { padding: 18px 20px; }
  .site-row { padding: 19px; gap: 10px; }
  .knowledge-editor .editor-form { padding: 20px; }
  .context-bar { gap: 5px 15px; }
}
@media (max-width: 480px) {
  .heading-actions { flex-wrap: wrap; justify-content: flex-end; max-width: 155px; }
  .access-row { padding: 18px; gap: 12px; }
  .access-row-actions { max-width: 100px; }
  .access-row-actions .button { white-space: normal; }
  .access-form { padding: 20px; }
  .site-tab { padding: 11px 13px; font-size: 11px; }
  .field-grid { grid-template-columns: 1fr; gap: 18px; }
  .settings-form, .rule-form, .preview-form, .preview-result-body { padding: 20px; }
  .result-metrics { grid-template-columns: 1fr 1fr; }
  .history-heading { flex-direction: column; gap: 12px; }
  .knowledge-history { padding: 20px; }
  .audit-table td:last-child, .audit-table th:last-child { display: table-cell; }
  .audit-table { min-width: 670px; }
  .main-content { padding: 23px 14px; }
  .sidebar { padding: 14px; }
  .sidebar .brand-caption { font-size: 8px; }
  .sidebar .brand-name { font-size: 14px; }
  .topbar { padding: 12px 15px; }
  .topbar-title { max-width: 70px; line-height: 1.5; }
  .user-identity strong { max-width: 145px; }
  .user-menu .button { font-size: 9px; }
  .organization-grid { grid-template-columns: 1fr; }
  .create-panel .stacked-form { display: flex; }
  .site-symbol { display: none; }
  .site-row > .badge { display: none; }
  td, th { padding: 15px; }
  td:last-child, th:last-child { display: none; }
  .save-state { margin-left: 0; width: 100%; }
}
.channel-form { padding: 26px; }
.channel-grid { align-items: start; grid-template-columns: minmax(210px, .65fr) minmax(0, 1.35fr); }
@media (max-width: 1000px) { .channel-grid { grid-template-columns: 1fr; } }
.overview-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 18px; }
.overview-heading h2 { font-size: 17px; margin-bottom: 8px; }
.overview-heading p { font-size: 12px; line-height: 1.8; }
.overview-heading > .button { flex-shrink: 0; }
.overview-boundary { margin-bottom: 22px; }
.overview-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.overview-metric { padding: 20px; }
.overview-metric h3 { font-size: 12px; color: var(--muted); line-height: 1.6; }
.overview-metric-value { display: block; font-size: 27px; color: var(--ink); margin: 14px 0 10px; overflow-wrap: anywhere; }
.overview-metric p, .overview-checklist-content p, .overview-note { color: var(--muted); font-size: 12px; line-height: 1.9; }
.overview-checklist-row { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 20px 23px; border-top: 1px solid var(--line); }
.overview-checklist-content { min-width: 0; }
.overview-checklist-title { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.overview-checklist-title h3 { font-size: 14px; }
.overview-checklist-row > .button { flex-shrink: 0; }
.overview-note { padding: 16px 23px; }
@media (max-width: 1200px) { .overview-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .overview-heading, .overview-checklist-row { flex-direction: column; align-items: stretch; }
  .overview-checklist-row { gap: 14px; padding: 18px 20px; }
  .overview-checklist-row > .button, .overview-heading > .button { align-self: flex-start; }
  .overview-metric { padding: 17px; }
}
@media (max-width: 380px) { .overview-metrics { grid-template-columns: 1fr; } }
.channel-unavailable-providers { padding: 22px; border-top: 1px solid var(--line); }
.provider-placeholder { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 13px; opacity: .7; }
.channel-mode-actions { display: flex; flex-wrap: wrap; gap: 10px; border-top: 1px solid var(--line); padding-top: 20px; }
.channel-installation { border-top: 1px solid var(--line); padding: 24px; display: grid; gap: 14px; }
.channel-installation .panel-heading { padding: 0; margin: 0; border: 0; flex-wrap: wrap; gap: 12px; }
.channel-installation h3 { margin: 0; font-size: 16px; }
.channel-installation p { margin: 0; line-height: 1.7; overflow-wrap: anywhere; }
.channel-installation .stacked-form { gap: 14px; }
.channel-installation .button { justify-self: start; }
.activity-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.activity-panel { margin-bottom: 24px; }
.activity-table { min-width: 1000px; }
.activity-table td:last-child, .activity-table th:last-child { display: table-cell; }
.activity-references { display: grid; gap: 3px; max-width: 250px; overflow-wrap: anywhere; font-size: 12px; }
.activity-references small { color: var(--muted); }
@media (max-width: 480px) { .channel-form { padding: 20px; } }
.security-auth-layout { min-height: calc(100vh - 36px); display: grid; place-items: center; padding: 36px 22px; background: var(--canvas); }
.security-auth-card { width: min(100%, 460px); padding: 30px; border: 1px solid var(--line); border-radius: 20px; background: white; }
.security-auth-card > .brand { margin-bottom: 28px; }
.security-auth-card > .badge { margin: 0 0 16px; }
.security-auth-card h2 { margin: 0 0 14px; }
.security-auth-card > .muted { margin-bottom: 24px; line-height: 1.8; }
.security-summary { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 22px; }
.security-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.security-form { padding: 26px; }
.security-form > p { line-height: 1.8; }
.security-form .button { align-self: start; }
.security-unavailable { padding: 26px; }
.security-unavailable h2 { font-size: 16px; margin-top: 0; }
.security-unavailable p { line-height: 1.8; color: var(--muted); }
.security-secret-panel { margin-bottom: 24px; border-color: #d9b974; }
.security-secret-panel .security-form { max-width: 740px; }
.security-secret-actions { padding-top: 0; }
@media (max-width: 1000px) { .security-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .security-form, .security-unavailable { padding: 20px; } .security-auth-card { padding: 23px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
.knowledge-tools .knowledge-source { margin-top: 1rem; }
.knowledge-tools .button { margin: .4rem .4rem .4rem 0; }
.knowledge-plain-text { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 22rem; overflow: auto; font: inherit; padding: 1rem; background: var(--surface-soft, #f6f8fa); }
