:root, [data-theme="default"] {
  --theme-primary: #36c7bd;
  --theme-primary-soft: #ecfdf3;
  --theme-accent: #07145f;
  --theme-surface: #f8fafc;
  --theme-border: #d8dee8;
  --theme-heading: #07145f;
  --theme-muted: #667085;
}

[data-theme="enterprise"] { --theme-primary: #475467; --theme-primary-soft: #f2f4f7; --theme-accent: #1d2939; --theme-surface: #f8fafc; --theme-border: #d0d5dd; --theme-heading: #101828; --theme-muted: #667085; }
[data-theme="finance"] { --theme-primary: #08756f; --theme-primary-soft: #e6f7f4; --theme-accent: #0b4a6f; --theme-surface: #f3f8f8; --theme-border: #badbd7; --theme-heading: #083344; --theme-muted: #496b6b; }
[data-theme="public"] { --theme-primary: #2e6f9e; --theme-primary-soft: #edf6fb; --theme-accent: #184e77; --theme-surface: #f6fafc; --theme-border: #c6dce8; --theme-heading: #183b56; --theme-muted: #5f7183; }
[data-theme="consulting"] { --theme-primary: #6658d3; --theme-primary-soft: #f0edff; --theme-accent: #4a1fb8; --theme-surface: #faf8ff; --theme-border: #d7d0fb; --theme-heading: #2f195f; --theme-muted: #655f7a; }
[data-theme="warm"] { --theme-primary: #b85c38; --theme-primary-soft: #fff4ed; --theme-accent: #8a3d12; --theme-surface: #fffaf5; --theme-border: #f2d2bd; --theme-heading: #5f2a0c; --theme-muted: #7a6254; }
[data-theme="focus"] { --theme-primary: #52616b; --theme-primary-soft: #f4f6f7; --theme-accent: #27343b; --theme-surface: #f7f8f8; --theme-border: #d7dddf; --theme-heading: #1f2933; --theme-muted: #66737a; }


:root {
  color: #182033;
  background: #f5f7fa;
  font-family: var(--oiq-font-sans);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; background: #f5f7fa; }
button, input, select { font: inherit; }


.app-shell { height: 100vh; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.app-header { background: rgba(255,255,255,.98); border-bottom: 1px solid #dfe5ec; box-shadow: 0 1px 0 rgba(16,24,40,.03); }
.header-row { min-height: 54px; display: grid; grid-template-columns: 174px 268px minmax(320px, 1fr) auto; align-items: center; gap: 12px; padding: 0 18px 0 0; }
.brand { height: 54px; padding: 15px 18px; border-right: 1px solid #eef2f6; font-size: 24px; font-weight: 800; letter-spacing: -.045em; color: #667085; line-height: 1; }
.brand strong { color: var(--theme-primary); font-weight: 800; }
.workspace-switcher { border: 1px solid color-mix(in srgb, var(--theme-border) 78%, white); border-radius: 10px; padding: 4px 11px 5px; background: color-mix(in srgb, var(--theme-surface) 70%, white); display: grid; gap: 1px; position: relative; min-height: 38px; box-shadow: inset 0 1px 0 rgba(255,255,255,.65); }
.label, .meta-cell span, .search-box label, dt, .eyebrow, .breadcrumb { color: var(--theme-muted); font-size: 10px; text-transform: uppercase; letter-spacing: .09em; font-weight: 750; }
.workspace-switcher select { appearance: auto; border: 0; background: transparent; color: #182033; font-size: 13px; font-weight: 760; line-height: 1.15; padding: 0; outline-color: var(--theme-primary); min-width: 0; }
.workspace-index-label { color: #7a8597; font-size: 10px; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-copy { margin: 0; color: var(--theme-muted); line-height: 1.35; font-size: 13px; max-width: 760px; }
.top-header-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; justify-self: end; border: 1px solid #e4e9f1; border-radius: 13px; background: #f8fafc; padding: 3px; box-shadow: inset 0 1px 0 rgba(255,255,255,.78); }
.header-control-group { display: inline-flex; align-items: center; gap: 2px; border: 0; border-radius: 10px; background: transparent; padding: 0; }
.header-control-group + .header-control-group { border-left: 1px solid #e4e9f1; border-radius: 0 10px 10px 0; padding-left: 5px; margin-left: 1px; }
.header-control-group button { min-height: 30px; border: 0; border-radius: 8px; background: transparent; color: #475467; padding: 6px 10px; font-size: 12px; font-weight: 760; cursor: pointer; line-height: 1; }
.header-control-group button:hover { background: #ffffff; color: var(--theme-heading); }
.header-control-group button[aria-pressed="true"], .header-control-group button.active { background: color-mix(in srgb, var(--theme-primary-soft) 72%, white); color: var(--theme-accent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--theme-primary) 22%, transparent), 0 1px 2px rgba(16,24,40,.05); }
.review-mode-toggle button.active { background: color-mix(in srgb, var(--theme-primary-soft) 58%, white); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--theme-primary) 32%, transparent), 0 1px 2px rgba(16,24,40,.06); }
.user-chip { justify-self: end; border: 1px solid #b7ead8; border-radius: 999px; background: var(--theme-primary-soft); color: #067647; padding: 6px 11px; font-weight: 750; font-size: 12px; white-space: nowrap; }
.session-actions { justify-self: end; display: flex; align-items: center; gap: 8px; }
.user-menu { position: relative; }
.user-menu-trigger { list-style: none; border: 1px solid #d9e0ea; border-radius: 999px; background: #ffffff; color: #475467; padding: 7px 10px; font-weight: 720; font-size: 12px; white-space: nowrap; cursor: pointer; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.user-menu-trigger::-webkit-details-marker { display: none; }
.user-menu-trigger::after { content: " ▾"; color: var(--theme-muted); }
.user-menu[open] .user-menu-trigger { color: var(--theme-heading); box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-primary) 13%, transparent); }
.user-menu-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; min-width: 180px; border: 1px solid var(--theme-border); border-radius: 12px; background: #fff; box-shadow: 0 18px 40px rgba(16,24,40,.16); padding: 6px; display: grid; gap: 4px; }
.user-menu-label { padding: 7px 9px; color: var(--theme-muted); font-size: 11px; font-weight: 800; border-bottom: 1px solid var(--theme-border); }
.user-menu-panel .admin-link, .user-menu-panel .logout-button { width: 100%; text-align: left; border: 0; border-radius: 8px; background: transparent; color: #344054; padding: 8px 9px; font-size: 13px; font-weight: 800; text-decoration: none; cursor: pointer; }
.user-menu-panel .admin-link:hover, .user-menu-panel .logout-button:hover { background: var(--theme-surface); color: var(--theme-heading); }
.metadata-bar { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; background: #e8edf3; border-top: 1px solid #edf1f6; }
.meta-cell { background: #f8fafc; padding: 6px 16px 7px; display: grid; gap: 1px; min-height: 38px; }
.meta-cell strong { color: #111a3f; font-size: 13px; line-height: 1.25; overflow-wrap: anywhere; }

.viewer-grid { display: grid; grid-template-columns: 272px minmax(0, 1fr); flex: 1; min-height: 0; overflow: hidden; }
.navigation-panel { min-height: 0; height: 100%; background: #f0f3f6; border-right: 1px solid var(--theme-border); padding: 14px 12px; display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.preview-panel { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: #ffffff; overflow: hidden; position: relative; }
.search-box { display: grid; gap: 7px; }
.search-input-row { display: flex; align-items: center; gap: 6px; }
.search-field { position: relative; flex: 1 1 auto; min-width: 0; }
.search-box input { box-sizing: border-box; min-width: 0; font-size: 14px; min-height: 44px; width: 100%; border: 1px solid #cfd8e6; border-radius: 7px; padding: 9px 10px; background: #ffffff; outline-color: var(--theme-primary); color: #182033; }
.search-field:has(button) input { padding-right: 64px; }
.search-field button { position: absolute; right: 4px; top: 4px; min-height: 36px; border: 1px solid #cfd8e6; border-radius: 7px; background: #ffffff; color: #344054; padding: 7px 9px; font-size: 12px; font-weight: 750; cursor: pointer; }

.search-box p { margin: 0; color: #526b73; font-size: 13px; line-height: 1.35; }
.navigation-tree { flex: 1; min-height: 0; overflow: auto; padding-right: 2px; }
.nav-tree-list { list-style: none; margin: 0; padding: 0; }
.nav-tree-list.root { display: grid; gap: 2px; }
.nav-tree-node { margin: 0; padding: 0; }
.nav-folder, .nav-item { width: 100%; text-align: left; border: 1px solid transparent; background: transparent; border-radius: 7px; padding: 8px; display: grid; gap: 8px; align-items: center; color: #344054; cursor: pointer; font-size: 14px; line-height: 1.4; }
.nav-folder { grid-template-columns: 14px minmax(0, 1fr); font-weight: 700; color: #182033; }
.nav-item { grid-template-columns: minmax(0, 1fr) auto; }
.nav-label { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.nav-metadata { display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; white-space: nowrap; }
.nav-tree-node.folder > .nav-tree-list { margin-left: 12px; padding-left: 5px; border-left: 1px solid #c8dcde; }
.nav-chevron { color: var(--theme-muted); font-size: 11px; line-height: 1; }
.nav-folder:hover, .nav-item:hover { background: var(--theme-surface); }
.nav-folder[aria-expanded="true"] { color: var(--theme-heading); }
.nav-item.active { background: #eaf3ff; border-color: #8bbce8; color: var(--theme-heading); font-weight: 700; }
.nav-item small, .artifact-type, .tag { background: #eef4ff; border: 1px solid #c7d7fe; border-radius: 999px; padding: 2px 7px; color: #344054; font-size: 11px; font-weight: 750; line-height: 1.4; }
.nav-empty { margin: 6px; color: var(--theme-muted); font-size: 12px; line-height: 1.45; }

.artifact-context { position: sticky; top: 0; z-index: 5; border-bottom: 1px solid #e4e9f1; background: rgba(255,255,255,.98); backdrop-filter: blur(8px); padding: 8px 24px 7px; display: grid; gap: 4px; box-shadow: 0 1px 0 rgba(16,24,40,.02); }
.artifact-context h1 { margin: 0; color: var(--theme-heading); font-size: 19px; line-height: 1.18; letter-spacing: -.02em; }
.artifact-title-row { min-height: 28px; display: flex; gap: 9px; align-items: center; }
.artifact-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; }
.artifact-meta div { display: flex; gap: 6px; min-width: 0; align-items: baseline; }
.artifact-meta .artifact-path { max-width: min(680px, 100%); }
.artifact-meta .artifact-path dd { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
dd { margin: 0; color: #344054; font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
.tag-list { display: flex; gap: 4px; flex-wrap: wrap; }
.muted { color: #7a8597; }

.preview-card { flex: 1; min-height: 0; background: #ffffff; padding: 42px 56px; overflow: auto; scroll-behavior: smooth; }
.document-preview { max-width: 820px; margin: 0 auto; }
.markdown-preview-card { padding-right: 32px; }
.reader-shell { width: min(100%, 820px); min-height: 100%; margin: 0 auto; }
.reader-shell.no-reader-rail { display: block; max-width: 820px; }
.reader-shell .markdown-document { min-width: 0; width: 100%; }
.preview-card h2 { margin: 8px 0 12px; color: var(--theme-heading); font-size: 30px; line-height: 1.16; letter-spacing: -.03em; }
.document-lede { margin: 0 0 28px; color: #344054; font-size: 15px; line-height: 1.65; }
.placeholder-box { margin-top: 30px; border: 1px dashed #aab7cf; border-radius: 10px; background: var(--theme-surface); padding: 24px 26px; display: grid; gap: 9px; color: #475467; line-height: 1.5; }
.placeholder-box strong { color: #182033; }
.state-card { margin: 40px auto; max-width: 760px; background: #ffffff; border: 1px solid #dce3ee; border-radius: 14px; padding: 24px 28px; }
.state-action { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--theme-primary); border-radius: 8px; background: var(--theme-primary); color: var(--theme-accent); padding: 8px 12px; font-weight: 800; text-decoration: none; }
.empty { color: var(--theme-muted); }
.error { border-color: #fda29b; background: #fff6f5; color: #b42318; }

@media (max-width: 900px) {
  .header-row, .viewer-grid { grid-template-columns: 1fr; }
  .header-row { padding: 0 16px 14px; gap: 12px; }
  .brand { border-right: 0; padding-left: 0; }
  .metadata-bar { grid-template-columns: 1fr 1fr; }
  .viewer-grid { overflow: auto; }
  .navigation-panel { height: auto; max-height: 34vh; border-right: 0; border-bottom: 1px solid var(--theme-border); }
  .preview-card { padding: 28px 22px; }
}
.markdown-document { color: #344b55; font-size: 16px; line-height: 1.6; }
.markdown-document h1, .markdown-document h2, .markdown-document h3 { color: var(--theme-heading); letter-spacing: -.025em; line-height: 1.2; }
.markdown-document h1 { margin: 0 0 18px; font-size: 34px; }
.markdown-document h2 { margin: 36px 0 14px; font-size: 27px; }
.markdown-document h3 { margin: 26px 0 10px; font-size: 20px; }
.markdown-document p { margin: 0 0 16px; }
.markdown-document ul { margin: 0 0 20px 22px; padding: 0; }
.markdown-document li { margin: 5px 0; }
.markdown-document code { border: 1px solid var(--theme-border); border-radius: 5px; background: #f6f8fb; padding: 1px 5px; color: #182033; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .92em; }
.markdown-document pre { overflow: auto; border: 1px solid var(--theme-border); border-radius: 10px; background: #f6f8fb; padding: 16px 18px; }
.markdown-document pre code { border: 0; border-radius: 0; background: transparent; padding: 0; white-space: pre; }
.error-detail { overflow-wrap: anywhere; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 13px; }
.svg-document { max-width: 980px; }
.svg-preview-frame { margin: 30px 0 0; display: grid; gap: 12px; }
.svg-preview-frame img { display: block; width: 100%; height: auto; object-fit: contain; border: 1px solid var(--theme-border); border-radius: 12px; background: #ffffff; box-shadow: 0 18px 45px rgba(16, 24, 40, .08); }
.svg-preview-frame figcaption { color: #536c74; font-size: 13px; line-height: 1.5; }
.svg-preview-frame code { border: 1px solid var(--theme-border); border-radius: 5px; background: #f6f8fb; padding: 1px 5px; color: #182033; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .92em; }
.markdown-embedded-svg { margin: 24px 0; display: grid; gap: 10px; }
.markdown-embedded-svg img { display: block; width: 100%; height: auto; object-fit: contain; border: 1px solid var(--theme-border); border-radius: 12px; background: #ffffff; box-shadow: 0 16px 38px rgba(16, 24, 40, .08); }
.markdown-embedded-svg figcaption { color: #536c74; font-size: 13px; line-height: 1.5; }
.embedded-asset-placeholder { display: inline-block; border: 1px dashed #d0d5dd; border-radius: 8px; background: var(--theme-surface); padding: 8px 10px; color: var(--theme-muted); font-size: 13px; }
.html-document { max-width: 1040px; }
.html-preview-frame { display: block; width: 100%; min-height: 58vh; border: 1px solid var(--theme-border); border-radius: 12px; background: #ffffff; box-shadow: 0 18px 45px rgba(16, 24, 40, .08); }
.session-actions { justify-self: end; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.logout-button, .login-form button, .secondary-action, .admin-link { border: 1px solid var(--theme-primary); border-radius: 8px; background: var(--theme-primary); color: var(--theme-accent); padding: 7px 12px; font-weight: 800; cursor: pointer; }
.logout-button, .admin-link { background: #ffffff; color: var(--theme-accent); padding: 6px 10px; font-size: 12px; }
.admin-link { text-decoration: none; }
.fallback-banner { border-top: 1px solid #fedf89; background: #fffaeb; color: #93370d; padding: 8px 18px; font-size: 12px; font-weight: 700; }
.login-view { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(460px, 100%); background: #ffffff; border: 1px solid var(--theme-border); border-radius: 18px; box-shadow: 0 20px 60px rgba(16, 24, 40, .08); padding: 28px; display: grid; gap: 14px; }
.login-brand { border-right: 0; padding: 0; height: auto; }
.login-card h1 { margin: 0; color: var(--theme-heading); font-size: 30px; letter-spacing: -.03em; }
.login-copy { margin: 0; color: var(--theme-muted); line-height: 1.5; }
.login-form { display: grid; gap: 12px; }
.login-form label { display: grid; gap: 6px; color: #344054; font-size: 13px; font-weight: 750; }
.login-form input { border: 1px solid #cfd8e6; border-radius: 8px; padding: 10px 11px; outline-color: var(--theme-primary); }
.login-error { border: 1px solid #fda29b; border-radius: 10px; background: #fff6f5; color: #b42318; padding: 10px 12px; font-size: 13px; }
.login-view, .login-card, .login-form, [data-passwordless-login] { box-sizing: border-box; min-width: 0; }
.login-form input { box-sizing: border-box; width: 100%; min-width: 0; min-height: 44px; font-size: 16px; }
.login-form button { min-height: 44px; }
.login-form button:disabled { opacity: .6; cursor: wait; }
.login-form button:focus-visible { outline: 3px solid #d8a93c; outline-offset: 3px; }
.login-form input[name="code"] { font-variant-numeric: tabular-nums; letter-spacing: .2em; font-size: 22px; }
.login-email { overflow-wrap: anywhere; font-weight: 700; }
.login-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.login-actions button.secondary-action { flex: 1 1 150px; background: #fff; color: var(--theme-heading); border-color: var(--theme-border); }
.login-form [data-auth-expiry]:empty { display: none; }
.work-app .work-login .login-form button { min-height: 44px; }
.work-app .work-login .login-form button[type="submit"] { background: #127f73; color: #fff; border-color: #127f73; font-weight: 650; }
@media (max-width: 480px) { .login-view { padding: 16px; } .login-card { padding: 20px; } .login-card h1 { font-size: 26px; } }
.secondary-action { background: #ffffff; color: var(--theme-accent); }

.admin-shell { min-height: 100vh; background: #f5f7fa; color: #182033; }
.admin-header { min-height: 58px; display: flex; gap: 16px; align-items: center; padding: 0 20px; background: #fff; border-bottom: 1px solid var(--theme-border); }
.admin-header .brand { border-right: 0; padding: 0; height: auto; }
.admin-header span { margin-left: auto; color: var(--theme-muted); font-weight: 700; }
.admin-header .admin-mode-badge { margin-left: 0; border: 1px solid #c7d7fe; border-radius: 999px; background: #eef4ff; color: #344054; padding: 3px 9px; font-size: 11px; font-weight: 800; }
.admin-fixture-note { margin: 0; border: 1px solid #c7d7fe; border-radius: 10px; background: #f5f8ff; color: #344054; padding: 10px 12px; font-size: 13px; line-height: 1.45; }
.admin-nav { display: flex; gap: 8px; padding: 12px 20px; background: #f0f3f6; border-bottom: 1px solid var(--theme-border); overflow-x: auto; }
.admin-nav button, .admin-card button { border: 1px solid #cfd8e6; border-radius: 8px; background: #fff; padding: 7px 11px; color: #344054; font-weight: 750; cursor: pointer; }
.admin-card button:first-of-type, .admin-form button, #save-sources, #start-job { border-color: var(--theme-primary); background: var(--theme-primary); color: var(--theme-accent); }
.admin-main { padding: 20px; }
.admin-card { background: #fff; border: 1px solid var(--theme-border); border-radius: 14px; padding: 18px; display: grid; gap: 14px; overflow: auto; }
.admin-card h1 { margin: 0; color: var(--theme-heading); font-size: 26px; }
.admin-card h2 { margin: 12px 0 0; color: var(--theme-heading); font-size: 18px; }
.admin-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.admin-card input, .admin-card select { border: 1px solid #cfd8e6; border-radius: 7px; padding: 7px 9px; max-width: 100%; }
.admin-card table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-card th, .admin-card td { border-bottom: 1px solid #e4e9f1; padding: 9px; text-align: left; vertical-align: top; }
.admin-card th { color: var(--theme-muted); text-transform: uppercase; font-size: 11px; letter-spacing: .08em; }
.inline { display: inline-flex; gap: 6px; margin-left: 6px; }
.checks { display: grid; gap: 7px; max-width: 760px; }
.source-block { border: 1px solid var(--theme-border); border-radius: 12px; padding: 12px; margin: 10px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.source-block legend { color: var(--theme-heading); font-weight: 800; }
.rules { flex-basis: 100%; display: grid; gap: 8px; }
.rules div { display: flex; flex-wrap: wrap; gap: 7px; padding: 8px; background: var(--theme-surface); border-radius: 8px; }
.admin-badge { display: inline-block; border-radius: 999px; padding: 2px 8px; border: 1px solid #c7d7fe; background: #eef4ff; font-weight: 800; }
.admin-badge.succeeded, .admin-badge.active { background: var(--theme-primary-soft); border-color: #b7ead8; color: #067647; }
.admin-badge.failed, .admin-badge.disabled { background: #fff6f5; border-color: #fda29b; color: #b42318; }
.admin-inline-error { margin: 6px 0 0; color: #b42318; font-size: 12px; line-height: 1.35; }
.admin-ok { margin: 12px 20px 0; border: 1px solid #b7ead8; background: var(--theme-primary-soft); color: #067647; padding: 10px 12px; border-radius: 10px; }
.admin-detail { max-height: 340px; overflow: auto; background: #101828; color: #f2f4f7; border-radius: 10px; padding: 12px; white-space: pre-wrap; }

@media (max-width: 720px) {
  .metadata-bar { grid-template-columns: 1fr; }
  .session-actions { justify-self: stretch; }
  .search-input-row { grid-template-columns: 1fr; }
  .admin-header { flex-wrap: wrap; align-items: flex-start; padding: 12px 16px; gap: 10px; }
  .admin-header span { margin-left: 0; flex-basis: 100%; }
  .admin-nav { padding: 10px 16px; }
  .admin-main { padding: 14px; }
  .admin-card { padding: 14px; }
  .admin-card table { display: block; overflow-x: auto; white-space: nowrap; }
  .admin-form, .source-block, .rules div, .inline { display: grid; grid-template-columns: 1fr; align-items: stretch; margin-left: 0; }
  .admin-card input, .admin-card select, .admin-card button { width: 100%; }
}
.markdown-toc { margin: 0 0 28px; border: 1px solid var(--theme-border); border-radius: 12px; background: var(--theme-surface); padding: 14px 16px; }
.markdown-toc strong { display: block; margin-bottom: 8px; color: var(--theme-heading); }
.markdown-toc ol { margin: 0; padding-left: 20px; display: grid; gap: 5px; }
.markdown-toc .toc-level-3 { margin-left: 16px; font-size: 13px; }
.markdown-toc a, .markdown-document a { color: #075eaa; text-decoration: none; font-weight: 700; }
.markdown-toc a:hover, .markdown-document a:hover { text-decoration: underline; }
.markdown-document h2[id], .markdown-document h3[id] { scroll-margin-top: 18px; }
.markdown-table-wrap { overflow-x: auto; margin: 18px 0 24px; border: 1px solid var(--theme-border); border-radius: 10px; }
.markdown-document table { width: 100%; border-collapse: collapse; font-size: 14px; }
.markdown-document th, .markdown-document td { border-bottom: 1px solid #e4e9f1; padding: 9px 11px; text-align: left; vertical-align: top; }
.markdown-document th { background: var(--theme-surface); color: var(--theme-heading); font-weight: 800; }
.markdown-document tr:last-child td { border-bottom: 0; }
.unresolved-markdown-link { color: var(--theme-muted); text-decoration: underline dotted; }
.admin-field { display: grid; gap: 4px; color: #344054; font-size: 12px; font-weight: 750; min-width: 160px; }
.admin-field span { color: var(--theme-muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.admin-field small { color: var(--theme-muted); font-weight: 500; line-height: 1.35; max-width: 260px; }
.admin-card textarea { border: 1px solid #cfd8e6; border-radius: 7px; padding: 7px 9px; max-width: 100%; font: inherit; }
.checkbox-field { min-width: auto; align-content: start; }
.nav-folder-row { display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: center; }
.nav-folder-toggle { width: 100%; border: 1px solid transparent; background: transparent; color: var(--theme-muted); cursor: pointer; padding: 8px 0; border-radius: 7px; }
.nav-folder { padding-left: 4px; grid-template-columns: minmax(0, 1fr) auto; }
.nav-tree-list.root > .folder > .nav-folder-row .nav-folder { font-weight: 800; }
.nav-folder.active { background: #eaf3ff; border-color: #8bbce8; color: var(--theme-heading); }
.nav-folder-overview { background: var(--theme-primary-soft); border: 1px solid #b7ead8; border-radius: 999px; padding: 1px 6px; color: #067647; font-size: 9px; font-weight: 800; }

.workspace-gallery-view { min-height: 100vh; background: linear-gradient(135deg, var(--theme-surface) 0%, #eef4ff 100%); color: #182033; }
.gallery-hero { display: grid; grid-template-columns: 204px minmax(0, 1fr) auto; gap: 22px; align-items: center; padding: 0 24px 18px 0; background: rgba(255,255,255,.86); border-bottom: 1px solid var(--theme-border); }
.gallery-hero h1 { margin: 0; color: var(--theme-heading); font-size: 36px; letter-spacing: -.04em; }
.gallery-hero p { margin: 4px 0 0; color: var(--theme-muted); }
.gallery-filters { margin: 24px auto 18px; width: min(1120px, calc(100% - 32px)); display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr) auto; gap: 12px; align-items: end; }
.gallery-search, .gallery-labels { display: grid; gap: 7px; color: var(--theme-muted); font-size: 10px; text-transform: uppercase; letter-spacing: .09em; font-weight: 800; }
.gallery-search input { border: 1px solid #cfd8e6; border-radius: 10px; padding: 11px 12px; outline-color: var(--theme-primary); background: #fff; color: #182033; text-transform: none; letter-spacing: 0; font-weight: 500; }
.gallery-labels { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gallery-labels > span { flex-basis: 100%; }
.label-chip, #clear-gallery-filters { border: 1px solid #cfd8e6; border-radius: 999px; background: #fff; color: #344054; padding: 7px 10px; font-size: 12px; font-weight: 800; cursor: pointer; }
.label-chip.active { border-color: var(--theme-primary); background: var(--theme-primary-soft); color: #067647; }
#clear-gallery-filters { border-radius: 9px; }
.workspace-card-grid { width: min(1120px, calc(100% - 32px)); margin: 0 auto 36px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.workspace-card { background: #fff; border: 1px solid var(--theme-border); border-radius: 18px; padding: 16px; box-shadow: 0 18px 45px rgba(16,24,40,.08); display: grid; gap: 13px; align-content: start; }
.workspace-visual { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; color: #fff; font-size: 25px; font-weight: 900; background: linear-gradient(135deg, var(--theme-heading), var(--theme-primary)); }
.visual-knowledge { background: linear-gradient(135deg, #175cd3, var(--theme-primary)); }
.visual-practice { background: linear-gradient(135deg, #7a2e0e, #fdb022); }
.visual-customer { background: linear-gradient(135deg, #067647, #12b76a); }
.visual-project { background: linear-gradient(135deg, #5925dc, #9e77ed); }
.visual-proposal { background: linear-gradient(135deg, #c11574, #f670c7); }
.visual-demo { background: linear-gradient(135deg, #344054, #98a2b3); }
.workspace-card-body h2 { margin: 0; color: var(--theme-heading); font-size: 22px; letter-spacing: -.025em; }
.workspace-card-body p { margin: 8px 0 0; color: #475467; line-height: 1.5; }
.workspace-card-labels { display: flex; flex-wrap: wrap; gap: 6px; }
.workspace-card-labels span { border: 1px solid #c7d7fe; border-radius: 999px; background: #eef4ff; color: #344054; padding: 3px 8px; font-size: 11px; font-weight: 800; }
.workspace-card-meta { margin: 0; display: flex; flex-wrap: wrap; gap: 10px 16px; }
.open-workspace-button { border: 1px solid var(--theme-primary); border-radius: 10px; background: var(--theme-primary); color: var(--theme-accent); padding: 10px 12px; font-weight: 900; cursor: pointer; }
.gallery-empty { grid-column: 1 / -1; border: 1px dashed #aab7cf; border-radius: 16px; background: #fff; padding: 28px; display: grid; gap: 6px; color: var(--theme-muted); }
.gallery-empty strong { color: var(--theme-heading); }
@media (max-width: 900px) { .gallery-hero, .gallery-filters { grid-template-columns: 1fr; padding-left: 16px; } .gallery-hero .brand { border-right: 0; } }
.admin-busy { margin: 12px 20px 0; border: 1px solid #8bbce8; background: #eaf3ff; color: var(--theme-heading); padding: 10px 12px; border-radius: 10px; font-size: 13px; font-weight: 800; }
.admin-card button:disabled, .admin-nav button:disabled, .logout-button:disabled { opacity: .56; cursor: wait; }
.source-block { align-items: start; }
.source-block .admin-field { min-width: min(220px, 100%); }
.rules div { border: 1px solid #e4e9f1; }

.mobile-viewer-actions, .mobile-chapter-nav { display: none; }
.mobile-drawer-backdrop { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(16, 24, 40, .44); }
.mobile-drawer-backdrop[hidden] { display: none; }
.mobile-drawer { display: flex; flex-direction: column; position: fixed; right: 18px; top: 72px; z-index: 41; width: min(380px, calc(100vw - 36px)); max-height: calc(100vh - 90px); background: #fff; border: 1px solid var(--theme-border); border-radius: 16px; box-shadow: 0 20px 60px rgba(16,24,40,.24); padding: 12px; gap: 12px; transform: translateX(calc(100% + 40px)); transition: transform .18s ease; overflow: hidden; }
.mobile-drawer.open { transform: translateX(0); }
.mobile-drawer-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 2px 8px; border-bottom: 1px solid #e4e9f1; }
.mobile-drawer-header button { border: 1px solid #cfd8e6; border-radius: 999px; background: var(--theme-surface); width: 34px; height: 34px; font-size: 22px; cursor: pointer; }
.mobile-chapter-drawer-content { min-height: 0; overflow: auto; }
.mobile-chapter-drawer-content .mobile-chapter-nav { display: block; }

@media (max-width: 900px) {
  body.mobile-drawer-open { overflow: hidden; }
  .app-shell { height: 100dvh; }
  .header-row { grid-template-columns: minmax(0, 1fr) auto; padding: 0 14px; gap: 10px; min-height: 48px; }
  .brand { height: 48px; padding: 10px 0; font-size: 24px; }
  .workspace-switcher, .workspace-copy, .metadata-bar { display: none; }
  .session-actions { justify-self: end; gap: 6px; }
  .session-actions .user-chip { display: none; }
  .session-actions .admin-link, .session-actions .logout-button { padding: 6px 8px; font-size: 11px; }

  .mobile-viewer-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--theme-border); background: #ffffff; position: sticky; top: 0; z-index: 8; }
  .mobile-viewer-actions button { min-width: 0; border: 1px solid #cfd8e6; border-radius: 10px; background: var(--theme-surface); color: #182033; padding: 8px 7px; display: grid; gap: 2px; text-align: left; cursor: pointer; }
  .mobile-viewer-actions button:disabled { opacity: .52; cursor: not-allowed; }
  .mobile-viewer-actions span { font-size: 12px; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-viewer-actions small { color: var(--theme-muted); font-size: 10px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .viewer-grid { display: block; flex: 1; min-height: 0; overflow: hidden; }
  .navigation-panel { display: none; }
  .preview-panel { height: 100%; min-height: 0; }
  .artifact-context { padding: 8px 14px; gap: 4px; }
  .artifact-context .breadcrumb, .artifact-meta { display: none; }
  .artifact-context h1 { font-size: 17px; }
  .artifact-title-row { justify-content: space-between; }
  .preview-card { padding: 22px 16px 32px; }
  .markdown-preview-card { padding-right: 16px; }

  .mobile-drawer-backdrop { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(16, 24, 40, .44); }
  .mobile-drawer-backdrop[hidden] { display: none; }
  .mobile-drawer { display: flex; flex-direction: column; position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 82dvh; min-height: min(560px, 72dvh); background: #ffffff; border-radius: 18px 18px 0 0; box-shadow: 0 -18px 60px rgba(16,24,40,.24); padding: 12px; gap: 12px; transform: translateY(105%); transition: transform .18s ease; overflow: hidden; }
  .mobile-drawer.open { transform: translateY(0); }
  .mobile-drawer-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 2px 8px; border-bottom: 1px solid #e4e9f1; }
  .mobile-drawer-header strong { color: var(--theme-heading); font-size: 16px; }
  .mobile-drawer-header button { border: 1px solid #cfd8e6; border-radius: 999px; background: var(--theme-surface); color: #344054; width: 34px; height: 34px; font-size: 22px; line-height: 1; cursor: pointer; }
  .mobile-drawer .search-box { flex: 0 0 auto; }
  .mobile-drawer .navigation-tree, .mobile-workspace-list, .mobile-chapter-drawer-content { min-height: 0; overflow: auto; }
  .mobile-overview-action { border: 1px solid var(--theme-primary); border-radius: 10px; background: var(--theme-primary); color: var(--theme-accent); padding: 10px 12px; font-weight: 900; cursor: pointer; }
  .mobile-workspace-list { display: grid; gap: 8px; }
  .mobile-workspace-entry { border: 1px solid var(--theme-border); border-radius: 12px; background: #ffffff; padding: 12px; display: grid; gap: 4px; text-align: left; color: #344054; cursor: pointer; }
  .mobile-workspace-entry.active { border-color: var(--theme-primary); background: var(--theme-primary-soft); }
  .mobile-workspace-entry strong { color: var(--theme-heading); }
  .mobile-workspace-entry span { color: var(--theme-muted); font-size: 12px; line-height: 1.35; }

  .mobile-chapter-nav.empty { display: block; color: var(--theme-muted); font-size: 13px; line-height: 1.45; }
}
.review-setup table { min-width: 980px; }
.review-setup textarea { width: 100%; min-width: 180px; }
.review-setup td input, .review-setup td select, .review-setup td textarea { margin: 2px 0; }
.review-item-form small { color: var(--theme-muted); align-self: center; }
.archived-row { background: #f8fafc; color: #667085; opacity: .82; }
.archived-row .admin-badge, .admin-badge.archived { background: #f2f4f7; border-color: #d0d5dd; color: #475467; }
.viewer-grid.has-review-panel { grid-template-columns: 272px minmax(0, 1fr) minmax(280px, 340px); }
.review-panel { min-height: 0; overflow: auto; border-left: 1px solid var(--theme-border); background: #f8fafc; padding: 16px; display: grid; align-content: start; gap: 12px; }
.feedback-sheet-layer { position: fixed; inset: 0; z-index: 60; display: grid; justify-items: end; }
.feedback-sheet-backdrop { position: absolute; inset: 0; border: 0; background: rgba(16,24,40,.44); width: 100%; }
.feedback-sheet { position: relative; width: min(480px, 100vw); height: 100%; border-left: 1px solid var(--theme-border); box-shadow: -20px 0 60px rgba(16,24,40,.22); }
.feedback-sheet .review-panel-header { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
.feedback-sheet-close { border: 1px solid var(--theme-border); border-radius: 999px; background: #fff; width: 36px; height: 36px; font-size: 22px; cursor: pointer; }
.review-panel-header { display: grid; gap: 4px; }
.review-panel-header h2 { margin: 0; color: var(--theme-heading); font-size: 20px; letter-spacing: -.02em; }
.review-panel-header p { margin: 0; color: var(--theme-muted); font-size: 13px; line-height: 1.4; }
.review-item-card { border: 1px solid var(--theme-border); border-radius: 12px; background: #fff; padding: 14px; display: grid; gap: 10px; box-shadow: 0 12px 28px rgba(16,24,40,.06); }
.review-item-group { display: grid; gap: 10px; }
.review-item-group h3 { margin: 4px 0 0; color: var(--theme-heading); font-size: 14px; text-transform: uppercase; letter-spacing: .06em; }
.review-item-card h4 { margin: 0; color: var(--theme-heading); font-size: 16px; }
.review-item-card p { margin: 0; color: #344054; font-size: 13px; line-height: 1.45; }
.review-item-card form { display: grid; gap: 9px; }
.review-item-card textarea, .review-item-card select { width: 100%; border: 1px solid #cfd8e6; border-radius: 8px; padding: 9px 10px; font: inherit; outline-color: var(--theme-primary); }
.review-item-card button { border: 1px solid var(--theme-primary); border-radius: 8px; background: var(--theme-primary); color: var(--theme-accent); padding: 8px 11px; font-weight: 800; cursor: pointer; }
.review-item-card button:disabled { opacity: .6; cursor: wait; }
.review-item-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.review-item-meta span { border: 1px solid #c7d7fe; border-radius: 999px; background: #eef4ff; color: #344054; padding: 2px 7px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.review-options { display: grid; gap: 7px; }
.review-options label { display: flex; gap: 7px; align-items: flex-start; color: #344054; font-size: 13px; }
.review-latest { border-left: 3px solid var(--theme-primary); padding-left: 9px; }
.review-message { margin: 0; border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.4; }
.review-message.success { border: 1px solid #b7ead8; background: var(--theme-primary-soft); color: #067647; }
.review-message.warning { border: 1px solid #fedf89; background: #fffaeb; color: #93370d; }
@media (max-width: 1100px) { .viewer-grid.has-review-panel { grid-template-columns: 1fr; overflow: auto; } .review-panel { border-left: 0; border-top: 1px solid var(--theme-border); } }
.review-scope-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.review-scope-tabs button { border: 1px solid var(--theme-border); border-radius: 999px; background: #fff; color: #344054; padding: 7px 10px; font-weight: 800; cursor: pointer; }
.review-scope-tabs button.active { border-color: var(--theme-primary); background: var(--theme-primary); color: var(--theme-accent); }
.review-mode-note { margin: 0; color: var(--theme-muted); font-size: 13px; line-height: 1.4; }
.review-add-note-button { border: 1px solid var(--theme-primary); border-radius: 10px; background: var(--theme-primary); color: var(--theme-accent); padding: 10px 12px; font-weight: 800; cursor: pointer; }
.review-current-page, .review-note-form, .review-existing-notes { border: 1px solid var(--theme-border); border-radius: 12px; background: #fff; padding: 14px; display: grid; gap: 10px; box-shadow: 0 12px 28px rgba(16,24,40,.06); }
.review-current-page h3, .review-note-form h3, .review-existing-notes h3, .review-response-group h4 { margin: 0; color: var(--theme-heading); font-size: 14px; letter-spacing: -.01em; }
.review-current-page p, .review-note-form p, .review-existing-notes p { margin: 0; color: #344054; font-size: 13px; line-height: 1.45; }
.review-note-form label { display: grid; gap: 5px; color: #344054; font-size: 13px; font-weight: 700; }
.review-note-form textarea, .review-note-form select { width: 100%; border: 1px solid #cfd8e6; border-radius: 8px; padding: 9px 10px; font: inherit; outline-color: var(--theme-primary); }
.review-note-form button { border: 1px solid var(--theme-primary); border-radius: 8px; background: var(--theme-primary); color: var(--theme-accent); padding: 8px 11px; font-weight: 800; cursor: pointer; }
.review-note-form button:disabled { opacity: .6; cursor: wait; }
.review-form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.review-form-actions button[data-review-cancel-composer] { border-color: var(--theme-border); background: #fff; color: #344054; }
.review-general-toggle { grid-template-columns: auto 1fr; align-items: center; font-weight: 700; }
.review-context-warning { border: 1px solid #fedf89; border-radius: 10px; background: #fffaeb; padding: 8px 10px; color: #93370d !important; }
.review-existing-notes { gap: 12px; }
.review-response-group { display: grid; gap: 8px; }
.review-response-card { border: 1px solid #e4e7ec; border-radius: 10px; background: #fcfcfd; padding: 10px; display: grid; gap: 7px; }
.review-response-card blockquote { margin: 0; border-left: 3px solid #c7d7fe; padding-left: 8px; color: #475467; font-size: 12px; line-height: 1.4; }
.review-context-meta { color: var(--theme-muted) !important; font-size: 12px !important; }
.review-general-notes { border-top: 1px solid var(--theme-border); padding-top: 10px; }
.review-general-notes summary { cursor: pointer; color: var(--theme-heading); font-weight: 800; font-size: 13px; }

.heading-review-marker {
  margin-left: 0.65rem;
  border: 1px solid color-mix(in srgb, var(--theme-primary, #2463eb) 28%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--theme-primary, #2463eb) 8%, white);
  color: var(--theme-primary, #2463eb);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.28rem 0.48rem;
  vertical-align: middle;
  cursor: pointer;
}

.heading-review-marker:hover,
.toc-review-cue:hover,
.heading-review-marker:focus-visible,
.toc-review-cue:focus-visible {
  background: color-mix(in srgb, var(--theme-primary, #2463eb) 14%, white);
  outline: 2px solid color-mix(in srgb, var(--theme-primary, #2463eb) 35%, transparent);
  outline-offset: 2px;
}

.reader-chapter-rail a,
.mobile-chapter-nav a {
  gap: 0.35rem;
}

.toc-review-cue {
  margin-left: auto;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--theme-primary, #2463eb) 10%, white);
  color: var(--theme-primary, #2463eb);
  font-size: 0.66rem;
  font-weight: 700;
  padding: 0.16rem 0.36rem;
  cursor: pointer;
}

.review-context-summary {
  border: 1px solid var(--theme-border, #d8dee9);
  border-radius: 0.85rem;
  background: color-mix(in srgb, var(--theme-primary, #2463eb) 5%, white);
  padding: 0.8rem;
}

.review-context-summary p {
  display: grid;
  grid-template-columns: minmax(6rem, auto) 1fr;
  gap: 0.5rem;
  margin: 0.25rem 0;
}

.review-context-summary span,
.review-context-meta {
  color: var(--theme-muted, #667085);
  font-size: 0.82rem;
}

.review-context-summary button {
  margin-top: 0.55rem;
}

.review-response-card {
  border: 1px solid var(--theme-border, #d8dee9);
  border-radius: 0.9rem;
  background: var(--theme-surface, #fff);
  padding: 0.85rem;
  margin: 0.65rem 0;
}

.review-response-title {
  margin: 0 0 0.35rem;
  font-weight: 800;
  color: var(--theme-heading, #111827);
}

.review-context-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
  align-items: center;
  border-top: 1px solid var(--theme-border, #d8dee9);
  padding-top: 0.5rem;
}

.review-context-meta span,
.review-context-meta time {
  background: color-mix(in srgb, var(--theme-border, #d8dee9) 45%, transparent);
  border-radius: 999px;
  padding: 0.12rem 0.4rem;
}

@media (max-width: 760px) {
  .heading-review-marker { display: inline-flex; margin-top: 0.25rem; }
  .review-context-summary p { grid-template-columns: 1fr; }
}

.review-document-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--theme-border, #d8dee9);
  border-radius: 1rem;
  background: color-mix(in srgb, var(--theme-primary, #2463eb) 4%, white);
  padding: 0.7rem 0.85rem;
  margin-bottom: 1rem;
}

.review-document-tools .review-mode-toggle { min-width: 13rem; }
.review-summary-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.review-summary-chip,
.review-popover-action {
  border: 1px solid color-mix(in srgb, var(--theme-primary, #2463eb) 26%, var(--theme-border, #d8dee9));
  border-radius: 999px;
  background: #fff;
  color: var(--theme-primary, #2463eb);
  cursor: pointer;
  font-weight: 800;
  padding: 0.42rem 0.65rem;
}
.heading-review-marker.read-marker,
.toc-review-cue[data-review-popover] { background: #fff; }
.review-popover-layer {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
}
.review-popover-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(16, 24, 40, .08);
  cursor: default;
  pointer-events: auto;
}
.review-popover {
  position: absolute;
  top: clamp(5rem, 12vh, 8rem);
  right: clamp(1rem, 3vw, 2.5rem);
  z-index: 8;
  width: min(28.75rem, calc(100vw - 2rem));
  max-height: min(75vh, 42rem);
  overflow: auto;
  border: 1px solid var(--theme-border, #d8dee9);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 22px 55px rgba(16, 24, 40, .18);
  padding: 1rem;
  pointer-events: auto;
}
.review-popover-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.review-popover-header h3 { margin: 0; }
.review-popover-header button[data-review-popover-close] { border: 0; background: transparent; cursor: pointer; font-size: 1.35rem; line-height: 1; }
.review-popover-list { max-height: calc(75vh - 9rem); overflow: auto; }
.review-popover .review-note-form,
.review-popover [data-review-response-form] { display: none; }
@media (max-width: 760px) {
  .review-popover-backdrop { background: rgba(16, 24, 40, .18); }
  .review-popover {
    top: auto;
    right: 0.75rem;
    bottom: 0.75rem;
    left: 0.75rem;
    width: auto;
    max-height: 72dvh;
    border-radius: 1rem;
  }
  .review-popover-list { max-height: calc(72dvh - 9rem); }
}

.reader-controls { flex: 0 0 auto; }
.app-shell.focus-mode .header-row { min-height: 46px; grid-template-columns: 150px 236px minmax(260px, 1fr) auto; gap: 9px; padding-right: 16px; }
.app-shell.focus-mode .brand { height: 46px; padding: 12px 14px; font-size: 21px; }
.app-shell.focus-mode .workspace-switcher { min-height: 32px; padding: 3px 10px; }
.app-shell.focus-mode .workspace-index-label { display: none; }
.app-shell.focus-mode .workspace-copy { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.app-shell.details-collapsed .metadata-bar { display: none; }
.app-shell.navigation-collapsed .viewer-grid { grid-template-columns: minmax(0, 1fr); }
.app-shell.navigation-collapsed .navigation-panel { display: none; }
.app-shell.details-collapsed .artifact-context { padding: 6px 18px; gap: 3px; }
.app-shell.details-collapsed .artifact-context .breadcrumb,
.app-shell.details-collapsed .artifact-meta,
.app-shell.details-collapsed .document-lede { display: none; }
.app-shell.details-collapsed .artifact-context h1 { font-size: 17px; }
.app-shell.details-collapsed .preview-card { padding: 24px 34px; }
.app-shell.focus-mode .preview-card { padding: 18px 28px; }
.app-shell.focus-mode .html-document,
.app-shell.focus-mode .svg-document { max-width: min(1500px, 100%); }
.app-shell.focus-mode .html-document > .eyebrow,
.app-shell.focus-mode .html-document > h2,
.app-shell.focus-mode .svg-document > .eyebrow,
.app-shell.focus-mode .svg-document > h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.app-shell.focus-mode .html-preview-frame { min-height: calc(100vh - 152px); }
.app-shell.focus-mode .svg-preview-frame { margin-top: 6px; }
.app-shell.focus-mode .svg-preview-frame img { max-height: calc(100vh - 150px); }
@media (max-width: 900px) {
  .top-header-controls { justify-content: stretch; overflow-x: auto; }
  .header-control-group button { flex: 1; min-width: max-content; }
  .app-shell.focus-mode .header-row { grid-template-columns: 1fr; padding: 0 16px 10px; }
  .app-shell.navigation-collapsed .navigation-panel { display: none; }
  .app-shell.focus-mode .preview-card, .app-shell.details-collapsed .preview-card { padding: 20px 16px; }
  .app-shell.focus-mode .html-preview-frame { min-height: 70vh; }
}
/* Reader variant controls and source-qualified evidence. */
.artifact-localization { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; flex-wrap: wrap; }
/* Document variant: a compact contextual pill, not a dominant form field. */
.variant-switcher { position: relative; display: inline-flex; gap: 8px; align-items: center; max-width: 100%; color: #385d65; font-size: 13px; }
.variant-switcher > span { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.variant-switcher select { min-width: 0; max-width: 230px; min-height: 38px; padding: 4px 12px; border: 1px solid #c5d9dc; border-radius: 999px; background: #f6fafa; color: #173d47; font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.single-variant { font-size: 13px; color: #385d65; }
.rendition-evidence { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.rendition-status, .source-details { position: relative; font-size: 13px; }
.rendition-status summary { padding: 5px 7px; border: 1px solid #bfd7d9; border-radius: 7px; background: #f3f8f8; color: #345d65; font-size: 11px; line-height: 1.4; cursor: pointer; }
.rendition-status.attention summary { color: #79450a; border-color: #d6b176; background: #fff7e8; }
.source-details > summary { color: #38636a; padding: 9px 5px; cursor: pointer; }
.reader-details-content { position: absolute; z-index: 45; top: calc(100% + 6px); right: 0; width: min(330px, 80vw); padding: 16px; border: 1px solid #bed6d9; border-radius: 9px; background: #fff; color: #344b55; box-shadow: 0 8px 28px #17323b26; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.rendition-status .reader-details-content { right: auto; left: 0; }
.reader-details-content p { margin: 0 0 10px; }
.reader-details-content dl { margin: 0; display: grid; gap: 5px; }
.reader-details-content dt { font-weight: 700; }
.reader-details-content dd { margin: 0 0 8px; font-size: 13px; font-weight: 400; }
.nav-locale-fallback { max-width: 82px; white-space: normal; font-size: 11px; color: #526b73; }
/* Scoped above the legacy uppercase `.search-box label` caption style so the compact filter keeps readable control text. */
.search-box .search-language-filter { flex: 0 0 auto; display: block; margin: 0; color: #385d65; font-size: 13px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.search-language-filter select { width: auto; max-width: 8.5rem; min-height: 44px; padding: 6px 8px; font: inherit; background: #fff; border: 1px solid #c5d9dc; border-radius: 7px; color: #385d65; }
.review-variant-badge, .admin-inline-note { margin: .35rem 0 0; color: var(--text-muted, #64748b); font-size: .9rem; }
.search-results { margin: .75rem 0 1rem; display: grid; gap: .65rem; }
.search-results h2 { font-size: .95rem; margin: 0; color: var(--text-muted, #475569); }
.search-result-card { border: 1px solid var(--border-muted, #d8dee8); border-radius: .75rem; background: var(--surface, #fff); padding: .75rem; display: grid; gap: .55rem; }
.search-result-main { display: flex; justify-content: space-between; gap: .75rem; align-items: start; }
.search-result-main h3 { margin: 0 0 .2rem; font-size: .98rem; }
.search-result-main p, .search-result-note { margin: 0; color: var(--text-muted, #64748b); font-size: .82rem; }
.search-result-variants { display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; font-size: .78rem; color: var(--text-muted, #64748b); }
.search-variant-chip { border: 1px solid var(--border-muted, #cbd5e1); background: #f8fafc; border-radius: 999px; padding: .16rem .45rem; cursor: pointer; }
.search-variant-chip.secondary { opacity: .85; }
@media (max-width: 720px) { .search-result-main { flex-direction: column; } .search-result-main button { width: 100%; } }

.artifact-html-policy { position: relative; font-size: 13px; }
.html-execution-status { margin: 8px 0 12px; color: var(--theme-text-muted); font-size: 13px; font-weight: 600; }
.html-policy-control { display: grid; gap: 10px; max-width: 760px; }
.html-policy-option { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: start; border: 1px solid var(--theme-border); border-radius: 12px; padding: 10px; background: var(--theme-surface); }
.html-policy-option span { grid-column: 2; color: var(--theme-text-muted); line-height: 1.45; }
.html-policy-option.is-unavailable { border-style: dashed; }
.html-policy-interactive { background: var(--theme-surface-muted); }
.admin-dialog-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; background: rgba(16,24,40,.42); }
.admin-dialog { max-width: min(620px, 100%); max-height: calc(100vh - 32px); overflow: auto; border: 1px solid var(--theme-border); border-radius: 18px; background: var(--theme-surface); padding: 20px; box-shadow: 0 24px 60px rgba(16,24,40,.24); }
.admin-dialog ul { padding-left: 22px; }
.admin-dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.admin-dialog-actions button { min-width: 120px; }
@media (max-width: 680px) {
  .html-policy-option { grid-template-columns: 1fr; }
  .html-policy-option span { grid-column: 1; }
  .admin-dialog-actions { justify-content: stretch; }
  .admin-dialog-actions button { width: 100%; }
}
.governance-section{margin:1rem 0;padding:1rem;border:1px solid var(--border-color,#d8dee6);border-radius:.75rem;background:var(--surface-subtle,#f7f9fb)}
.governance-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:.75rem}.governance-heading h5,.governance-heading h6{margin:0}.governance-heading h5 span{font-size:.8rem;font-weight:500}
.execution-card{margin-left:.5rem}.governance-section dl{display:grid;grid-template-columns:minmax(7rem,max-content) minmax(0,1fr);gap:.25rem .75rem}.governance-section dt{font-weight:600}.governance-section dd{margin:0;overflow-wrap:anywhere;word-break:break-word}
.governance-actions{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.75rem}.governance-editor label{display:grid;gap:.3rem;margin:.75rem 0}.governance-editor input,.governance-editor textarea{box-sizing:border-box;width:100%}.proposed-content-editor{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;white-space:pre;overflow:auto}
.governance-warning{padding:.65rem;border-left:4px solid #b56b00;background:#fff5df}.governance-success{padding:.65rem;border-left:4px solid #26834a;background:#eaf8ef}.governance-confirmation{margin-top:.75rem;padding:.75rem;border:2px solid #8a5b00;border-radius:.5rem}.governance-confirmation button{margin-right:.5rem}.governance-status{font-weight:700;overflow-wrap:anywhere}
@media(max-width:640px){.governance-section{padding:.7rem}.governance-heading{flex-direction:column}.governance-section dl{grid-template-columns:1fr}.governance-section dd{margin-bottom:.4rem}.governance-actions{flex-direction:column}.governance-actions button{width:100%}.execution-card{margin-left:0}.proposed-content-editor{max-width:100%}}
.package-lifecycle{border:1px solid var(--theme-border);border-radius:10px;padding:16px;background:#f8fafc}.package-lifecycle label{display:grid;gap:6px;margin:.6rem 0}.package-lifecycle textarea{min-height:72px}.completion-readiness{padding:.6rem;background:#fff;border-radius:8px}.mandatory-open-item{background:#fff7e8}.completion-metadata{border-top:1px solid var(--theme-border);margin-top:1rem}.open-review-items{margin:.75rem 0}
/* OIQ-006: Knowledge Current keeps technical index statistics out of the reading frame. */
.app-shell .metadata-bar { display: none; }
@media (max-width: 900px) {
  .feedback-sheet-layer { align-items: end; }
  .feedback-sheet { width: 100%; height: min(88dvh, 760px); border-left: 0; border-top: 1px solid var(--theme-border); border-radius: 18px 18px 0 0; }
}

/* Knowledge Reader — OIQ-014 shell consolidated for accepted OIQ-024 v0.2. */
:root{--knowledge-outer-shell-height:56px;--knowledge-topbar-height:var(--knowledge-outer-shell-height);--knowledge-in-scroll-overlay-height:68px;--knowledge-subheader-height:var(--knowledge-in-scroll-overlay-height);--knowledge-deep-link-breathing:16px;--knowledge-deep-link-offset:calc(var(--knowledge-in-scroll-overlay-height) + var(--knowledge-deep-link-breathing))}

.app-shell{background:#f4f8f8;color:#17323b;font-family:var(--oiq-font-sans)}
.app-header{flex:0 0 var(--knowledge-topbar-height);min-height:var(--knowledge-topbar-height);z-index:50;border:0;background:#092f3b;color:#fff;box-shadow:0 1px #ffffff14}
.header-row{min-height:var(--knowledge-topbar-height);grid-template-columns:auto auto auto minmax(0,1fr) auto auto;gap:12px;padding:0 16px}
.app-header .brand{display:flex;align-items:center;gap:0;height:auto;padding:0;border:0;color:#fff;font-size:19px}
.app-header .brand-mark{width:27px;height:27px;margin-right:9px;display:grid;place-items:center;border:1px solid #5ce4e5;border-radius:9px;color:#20c6cc;font-size:13px;letter-spacing:0}
.app-header .brand-wordmark{display:inline-flex;align-items:baseline}
.app-header .brand strong{color:#68e1e2}
.knowledge-context{padding-left:18px;border-left:1px solid #ffffff28;color:#b9d4d8;font-size:13px}
.header-spacer{min-width:0}
.top-header-controls{justify-self:end;border:0;background:transparent;padding:0;box-shadow:none}
.knowledge-shell-actions{display:flex;align-items:center;gap:4px}
.knowledge-shell-actions button{width:36px;height:36px;display:grid;place-items:center;border:0;border-radius:9px;background:transparent;color:#d9f4f4;cursor:pointer;font-size:18px}
.knowledge-shell-actions button:hover{background:#ffffff12}
.knowledge-shell-actions .browse-trigger{display:none}
.session-actions{flex-wrap:nowrap}
.user-menu-trigger{width:32px;height:32px;display:grid;place-items:center;padding:0;border-color:#69d8da;background:#164f5b;color:#fff;border-radius:50%;line-height:1;overflow:hidden}
.user-menu-trigger::after{content:none}
.user-menu-panel{z-index:80}
.viewer-grid{grid-template-columns:clamp(320px,24vw,380px) minmax(0,1fr);background:#fff}
.navigation-panel{padding:18px 14px;gap:13px;background:var(--oiq-surface-sunken);border-color:var(--oiq-border)}
.browse-panel-header{display:flex;align-items:center;gap:var(--oiq-space-1)}
.browse-workspace-row{display:flex;flex:1 1 auto;align-items:center;gap:var(--oiq-space-1);min-width:0}
.browse-workspace{display:block;flex:1 1 auto;min-width:0}
.browse-workspace select{box-sizing:border-box;width:100%;min-width:0;min-height:var(--oiq-target);padding:var(--oiq-space-2) 10px;border:1px solid var(--oiq-border-strong);border-radius:9px;background:var(--oiq-surface);color:var(--oiq-ink);font:inherit;font-size:var(--oiq-text-base);font-weight:700}
.browse-panel-header button,.browse-workspace-row button{flex:0 0 auto;display:inline-grid;place-items:center;width:var(--oiq-target);height:var(--oiq-target);border:0;border-radius:var(--oiq-radius-md);background:transparent;color:var(--oiq-ink-muted);cursor:pointer;font-size:18px}
.browse-panel-header button:hover,.browse-workspace-row button:hover{background:var(--oiq-surface-hover)}
.browse-panel-header button:focus-visible,.browse-workspace-row button:focus-visible{outline:var(--oiq-focus-ring);outline-offset:var(--oiq-focus-offset)}
.nav-folder,.nav-item{color:var(--oiq-ink-secondary)}
.nav-item.active{border-color:transparent;background:var(--oiq-accent-soft);color:var(--oiq-accent-strong);box-shadow:inset 3px 0 var(--oiq-accent);font-weight:650}
.nav-item .nav-locale-tag,.nav-item .nav-locale-fallback{padding:0;border:0;border-radius:0;background:transparent;color:#526c73;font-size:10px;font-weight:400;line-height:1.4}
.navigation-tree .nav-type-tag{height:auto;padding:1px 3px;border:1px solid #d5e2e4;border-radius:3px;background:transparent;color:#526c73;font:400 9px/1.3 var(--oiq-font-mono);letter-spacing:.02em}
.nav-metadata{gap:5px;flex-wrap:wrap;max-width:72px}
.preview-panel{overflow:auto;display:block;scroll-behavior:auto;scroll-padding-top:0}
.artifact-context{position:relative;top:auto;z-index:1;padding:30px clamp(28px,5vw,76px) 20px;gap:8px;border-color:#e6eeee;background:linear-gradient(180deg,#f8fbfb 0,#fff 100%);box-shadow:none}
.artifact-context .breadcrumb{color:#71858a;font-family:inherit;font-size:13px;line-height:1.5;text-transform:none;letter-spacing:0}
.artifact-current-label{margin:8px 0 0;color:#087f83;font-size:11px;font-weight:850;letter-spacing:.15em;text-transform:uppercase}
.artifact-context h1{color:#12343e;font-size:clamp(30px,4vw,45px);line-height:1.08;letter-spacing:-.045em}
.artifact-title-row{min-height:46px}
.artifact-type{border-color:#bdd7da;background:#f5fbfb;color:#17636b;border-radius:5px}
.artifact-context-actions{min-height:34px;display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.artifact-action-bar > button:not([hidden]),.artifact-feedback-actions > button:not([hidden]),.artifact-action-bar > details > summary,.artifact-action-bar .context-navigation-action{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;gap:4px;min-height:38px;margin:0;padding:7px 8px;border:0;border-radius:4px;background:transparent;color:#17666a;box-shadow:none;font-family:inherit;font-size:13px;font-weight:550;line-height:1.3;text-decoration:none;opacity:1;cursor:pointer;white-space:nowrap}
.artifact-action-bar{gap:0 8px}
.artifact-action-bar > :not(:first-child){position:relative}
.artifact-action-bar > :not(:first-child)::before{content:"";position:absolute;left:-5px;top:calc(50% - 7px);height:14px;border-left:1px solid #c9d9dc;pointer-events:none}
.artifact-action-bar > details > summary{list-style:none}
.artifact-action-bar > details > summary::-webkit-details-marker{display:none}
.artifact-action-bar > details > summary::after{content:"⌄";font-size:12px}
.artifact-action-bar > button:hover,.artifact-feedback-actions > button:hover,.artifact-action-bar > details > summary:hover,.artifact-action-bar > details[open] > summary{background:#edf5f5}
.artifact-feedback-actions{display:inline-flex;align-items:center;gap:2px;max-width:100%}
.artifact-action-bar .context-feedback-existing:not([hidden]){min-width:44px;padding:5px 8px;background:#eaf3f3;color:#24565f;font-size:13px;white-space:normal}
.browse-drawer-content{flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;gap:12px;overscroll-behavior:contain}
.browse-drawer-content > *{flex:0 0 auto}
.mobile-drawer .browse-drawer-content .navigation-tree{flex:none;min-height:auto;overflow:visible}
.markdown-document :not(pre) > code{overflow-wrap:anywhere}
.current-status{display:inline-flex;align-items:center;gap:7px;color:#17666a;font-size:13px;font-weight:760}
.current-status i{width:7px;height:7px;border-radius:50%;background:#25b8bd;box-shadow:0 0 0 3px #dff5f5}
.context-feedback-action,.orientation-outline-action{border:0;background:transparent;color:#08767a;font-size:13px;font-weight:750;cursor:pointer}
.orientation-outline-action{margin-left:auto;padding:8px 11px;border:1px solid #c9dcde;border-radius:9px;background:#fff}
.artifact-orientation-sentinel{height:1px;pointer-events:none}
.collapsed-artifact-header{box-sizing:border-box;position:sticky;top:0;z-index:35;height:var(--knowledge-subheader-height);margin-top:calc(-1 * var(--knowledge-subheader-height));padding:8px clamp(28px,5vw,76px);display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid #dce8e9;background:#f8fbfbf5;opacity:0;transform:translateY(-100%);pointer-events:none;transition:transform .18s ease,opacity .18s ease}
.preview-panel.reading-state .collapsed-artifact-header{opacity:1;transform:none;pointer-events:auto}
.compact-title-group{min-width:0;display:grid;gap:4px}
.collapsed-artifact-header strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#244a54;font-size:14px}
.collapsed-artifact-header [data-reader-current-chapter]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#536d74;font-size:13px}
.collapsed-artifact-header .orientation-outline-action{flex:0 0 auto;margin:0}
.contents-count{font-weight:400}
.preview-card{min-height:calc(100% - 1px);overflow:visible;padding:36px clamp(28px,5vw,76px) 100px}
.document-preview{max-width:780px}
.markdown-document{position:relative;border-left:1px solid #c9dfe1;padding-left:32px}
.markdown-document h2{position:relative;color:#153c47}
.markdown-document h2[data-reader-heading]::before{content:"";position:absolute;left:-36px;top:.55em;width:7px;height:7px;border:1.5px solid #2c9da1;border-radius:50%;background:#fff}
.markdown-document h2.reader-active-chapter::before{background:#087f83;border-color:#087f83}
.markdown-document h1[id],.markdown-document h2[id],.markdown-document h3[id]{scroll-margin-top:var(--knowledge-deep-link-offset)}
.markdown-document table{display:block;max-width:100%;overflow-x:auto}
.mobile-chapter-nav{display:none}
.mobile-drawer-backdrop{z-index:60;background:#062d3980}
.mobile-drawer{z-index:70}
.outline-drawer{right:0;left:auto;top:var(--knowledge-topbar-height);bottom:0;max-height:none;border-radius:0}
.app-shell.navigation-collapsed .viewer-grid{grid-template-columns:minmax(0,1fr)}
.app-shell.navigation-collapsed .navigation-panel{display:none}

@media(max-width:1080px){.viewer-grid{grid-template-columns:minmax(0,1fr)}
.navigation-panel{display:none}
.knowledge-shell-actions .browse-trigger{display:grid}
.knowledge-shell-actions .browse-reopen{display:none}
.collapsed-artifact-header{padding-left:38px;padding-right:38px}
.browse-drawer{left:0;right:auto;top:var(--knowledge-topbar-height);bottom:0;width:min(390px,94vw);max-height:none;border-radius:0;transform:translateX(-105%)}
.browse-drawer.open{transform:none}
}

@media(max-width:760px){:root{--knowledge-outer-shell-height:58px;--knowledge-topbar-height:var(--knowledge-outer-shell-height);--knowledge-in-scroll-overlay-height:72px;--knowledge-subheader-height:var(--knowledge-in-scroll-overlay-height);--knowledge-deep-link-breathing:12px;--knowledge-deep-link-offset:calc(var(--knowledge-in-scroll-overlay-height) + var(--knowledge-deep-link-breathing))}
.header-row{grid-template-columns:auto auto auto minmax(0,1fr) auto auto;gap:6px;padding:0 8px}
.knowledge-context{display:none}
.app-header .brand{font-size:16px}
.app-header .brand-mark{width:25px;height:25px;margin-right:6px}
.collapsed-artifact-header{padding:8px 18px}
.artifact-context{padding:16px 18px 10px;gap:6px}
.artifact-title-row{min-height:0}
.artifact-context h1{font-size:29px}
.preview-card{padding:20px 18px 70px}
.markdown-document{padding-left:22px}
.markdown-document h2[data-reader-heading]::before{left:-26px}
.outline-drawer,.mobile-drawer{top:var(--knowledge-topbar-height);max-height:calc(100dvh - var(--knowledge-topbar-height));min-height:0;border-radius:0}
}

@media(prefers-reduced-motion:reduce){.collapsed-artifact-header,.mobile-drawer{transition:none}
.preview-panel{scroll-behavior:auto}
}

@media(max-width:1080px){.header-row{display:grid;grid-template-columns:auto auto auto minmax(0,1fr) auto auto;min-height:var(--knowledge-topbar-height);padding:0 14px;gap:8px}
.artifact-context .breadcrumb{display:block}
.viewer-grid{display:block}
}


/* OIQ-015 — ready HTML owns the residual renderer-native Canvas Surface. */
.app-shell.html-canvas-active .viewer-grid{min-height:0;overflow:hidden}
.html-canvas-preview-panel{min-height:0;display:flex;flex-direction:column;overflow:hidden;scroll-behavior:auto;scroll-padding-top:0}
.html-canvas-active .artifact-context{flex:0 0 auto;min-height:0;padding:4px 18px;gap:0;border-bottom:1px solid #dce8e9;background:#f8fbfb}
.html-canvas-active .artifact-context .breadcrumb{display:none}
.html-canvas-active .artifact-title-row{min-width:0;min-height:0}
.html-canvas-active .artifact-context h1{font-size:20px;line-height:1.25;letter-spacing:-.01em;overflow-wrap:anywhere}
.html-header-summary{display:flex;align-items:center;gap:12px;min-height:44px;cursor:pointer;list-style:none}
.html-header-summary::-webkit-details-marker{display:none}
.html-header-summary .artifact-title-row{flex:1;min-width:0}
.html-header-toggle{flex:none;display:inline-flex;align-items:center;gap:6px;color:#38616a;font-size:13px;font-weight:650}
.html-header-disclosure .when-open,.html-header-disclosure[open] .when-closed{display:none}
.html-header-disclosure[open] .when-open{display:inline}
.html-header-disclosure[open] .html-header-toggle > [aria-hidden]{transform:rotate(180deg)}
.html-header-disclosure:not([open]) .artifact-title-row h1{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
.html-header-disclosure:not([open]) .artifact-type{display:none}
.html-header-disclosure:not([open]) > .html-header-content{display:none}
.html-header-content{display:grid;gap:6px;padding:4px 0 6px}
.html-header-disclosure[open] .html-header-summary{padding-top:4px;padding-bottom:4px}
.html-canvas-active .artifact-orientation-sentinel,.html-canvas-active .collapsed-artifact-header{display:none}
.html-canvas-card{min-height:0;flex:1;display:flex;padding:0;overflow:hidden;background:#fff}
.html-canvas-surface{min-width:0;min-height:0;flex:1;display:flex;width:100%;margin:0;overflow:hidden}
.html-canvas-frame{min-width:0;min-height:0;width:100%;height:100%;flex:1;border:0;border-radius:0;box-shadow:none;background:#fff}
@media(max-width:1024px){.app-shell.html-canvas-active .viewer-grid{display:flex;flex-direction:column}.html-canvas-active .preview-panel{flex:1}.html-canvas-active .artifact-context .breadcrumb{display:none}}
.app-shell.focus-mode .html-canvas-frame{min-height:0}
@media(max-width:900px){.app-shell.focus-mode .html-canvas-frame{min-height:0}}

/* OIQ-016 — retained Focus must not break the UX-v2 responsive topbar. */
@media(max-width:1024px){.app-shell.focus-mode .header-row{display:grid;grid-template-columns:auto auto auto minmax(0,1fr) auto auto;min-height:var(--knowledge-topbar-height);padding:0 14px;gap:8px}}
@media(max-width:760px){.app-shell.focus-mode .header-row{grid-template-columns:auto auto minmax(0,1fr) auto auto;height:var(--knowledge-topbar-height);min-height:var(--knowledge-topbar-height);padding:0 8px;gap:6px}}

/* OIQ-021 — Workspace-first Admin Experience v2. */
.admin-v2-shell,.account-shell{min-height:100dvh;background:#f3f7f7;color:#17323b;font-family:var(--oiq-font-sans)}.admin-v2-shell .admin-header,.account-shell .admin-header{min-height:58px;display:flex;align-items:center;gap:16px;padding:0 clamp(14px,3vw,36px);background:#092f3b;color:#fff}.admin-v2-shell .admin-header>span,.account-shell .admin-header>span{margin-left:auto;color:#c5dcdf}.admin-v2-shell .brand,.account-shell .brand{display:flex;color:#fff;font-size:19px}.admin-v2-shell .brand strong,.account-shell .brand strong{color:#68e1e2}.admin-v2-shell .admin-link,.account-shell .admin-link{color:#d8f5f5}.admin-global-nav{display:flex;gap:4px;padding:12px clamp(14px,3vw,36px);border-bottom:1px solid #d8e5e6;background:#fff}.admin-global-nav button{min-height:42px;padding:7px 14px;border:0;border-radius:9px;background:transparent;color:#46636b;text-align:left}.admin-global-nav button[aria-current="page"]{background:#dff1f1;color:#066d72}.admin-global-nav small{display:block;font-size:9px;color:#667d83}.admin-v2-main,.account-main{width:min(1180px,calc(100% - 28px));margin:24px auto 70px}.admin-v2-shell .admin-card,.account-shell .admin-card{padding:clamp(16px,3vw,28px);border:1px solid #d8e5e6;border-radius:16px;background:#fff;box-shadow:0 8px 24px #17323b0a}.admin-page-heading,.workspace-admin-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:20px}.admin-page-heading h1,.admin-page-heading h2,.workspace-admin-heading h1{margin:2px 0 5px;color:#143b45}.admin-page-heading p,.workspace-admin-heading p{margin:0;color:#60777e}.eyebrow{color:#087f83!important;font-size:11px;font-weight:850;letter-spacing:.13em;text-transform:uppercase}.admin-heading-actions,.row-actions{display:flex;gap:8px;flex-wrap:wrap}.admin-v2-shell button,.account-shell button{min-height:38px;border:1px solid #bdd4d6;border-radius:9px;background:#fff;color:#126d73;cursor:pointer;font-weight:700}.admin-v2-shell button:hover,.account-shell button:hover{background:#e9f5f5}.admin-v2-shell button:focus-visible,.admin-v2-shell input:focus-visible,.admin-v2-shell select:focus-visible,.admin-v2-shell textarea:focus-visible,.account-shell button:focus-visible,.account-shell a:focus-visible{outline:3px solid #f0b646;outline-offset:2px}.admin-v2-shell button[type="submit"],.admin-v2-shell #reindex-workspace,.admin-v2-shell #apply-content-order{border-color:#087f83;background:#087f83;color:#fff}.admin-v2-shell .danger-button{border-color:#d49595;background:#fff;color:#9c2f2f}.admin-v2-shell button:disabled{cursor:not-allowed;opacity:.55}.admin-global-nav button:disabled{opacity:1}.workspace-admin-heading{align-items:center}.workspace-admin-heading>div{flex:1}.workspace-admin-heading label{display:grid;gap:4px;min-width:210px}.workspace-area-tabs{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px;padding:5px;border:1px solid #d6e4e5;border-radius:12px;background:#eaf2f2;margin-bottom:18px}.workspace-area-tabs button{border:0;background:transparent}.workspace-area-tabs button[aria-current="page"]{background:#fff;color:#087f83;box-shadow:0 2px 8px #17323b12}.workspace-area-select{display:none}.admin-summary-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:18px 0}.admin-summary-grid>div,.admin-summary-card{min-width:0;display:grid;gap:7px;padding:14px;border:1px solid #d8e5e6;border-radius:12px;background:#f8fbfb;text-align:left}.admin-summary-grid span,.admin-summary-card span{color:#61777e;font-size:12px}.admin-summary-grid strong,.admin-summary-card strong{overflow-wrap:anywhere;color:#173f49}.admin-entity-list{display:grid;gap:8px}.admin-entity-row{min-width:0;display:grid;grid-template-columns:minmax(0,1fr) auto auto auto;align-items:center;gap:12px;padding:12px;border:1px solid #dce7e8;border-radius:11px;background:#fbfdfd;text-align:left}.admin-entity-row>div,.admin-entity-row>span:first-child{min-width:0;display:grid;gap:3px}.admin-entity-row small,.admin-compact-row small,.content-order-list small{display:block;overflow-wrap:anywhere;color:#637a80}.admin-badge,.admin-attention{display:inline-flex;width:max-content;align-items:center;border-radius:999px;padding:3px 8px;background:#edf3f3;color:#496269;font-size:11px;font-weight:800;text-transform:capitalize}.admin-badge.active,.admin-badge.valid,.admin-badge.succeeded,.admin-badge.operational{background:#dff4e7;color:#14623a}.admin-badge.disabled,.admin-badge.failed,.admin-badge.error,.admin-attention{background:#fff0e0;color:#894600}.admin-compact-table{display:grid;gap:4px}.admin-compact-header,.admin-compact-row{min-width:0;display:grid;grid-template-columns:minmax(220px,1fr) minmax(85px,.35fr) minmax(85px,.35fr) minmax(100px,.4fr);align-items:center;gap:12px;padding:10px 12px}.admin-compact-header{color:#687d83;font-size:11px;font-weight:800;text-transform:uppercase}.admin-compact-row{border:1px solid #dce7e8;border-radius:10px}.access-table .admin-compact-header,.access-table .admin-compact-row{grid-template-columns:minmax(220px,1fr) minmax(100px,.35fr) minmax(80px,.2fr)}.admin-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:end;gap:14px}.admin-form-grid label,.source-detail-form label,.workspace-admin-heading label{min-width:0;display:grid;gap:6px;color:#38565f;font-size:13px;font-weight:700}.admin-form-grid input,.admin-form-grid select,.admin-form-grid textarea,.source-detail-form input,.source-detail-form select,.source-detail-form textarea,.workspace-admin-heading select{box-sizing:border-box;width:100%;min-height:40px;padding:8px 10px;border:1px solid #c8d9db;border-radius:8px;background:#fff;color:#17323b}.switch-field{grid-template-columns:minmax(0,1fr) auto!important;align-items:center}.switch-field input{width:22px!important;min-height:22px!important}.admin-progressive{margin-top:20px;padding-top:14px;border-top:1px solid #dce7e8}.admin-progressive>summary{cursor:pointer;color:#08767a;font-weight:800}.admin-busy,.admin-ok,.admin-v2-shell>.login-error{width:min(1124px,calc(100% - 56px));margin:14px auto;padding:10px 14px;border-radius:8px}.admin-busy{background:#e8f5f5}.admin-ok{background:#e3f5e9;color:#145b37}.admin-v2-shell>.login-error{background:#fff0ed;color:#8b3025}.admin-detail{max-width:100%;overflow:auto;padding:12px;border-radius:9px;background:#102f38;color:#dff4f4}.admin-drawer-backdrop{place-items:stretch end;padding:0}.admin-drawer{box-sizing:border-box;width:min(760px,96vw);height:100dvh;max-height:none;border-radius:16px 0 0 16px}.source-detail-form,.translation-source-fields,.html-policy-field,.simple-rule-fields,.advanced-rules{display:grid;gap:16px}.translation-source-fields,.html-policy-field,.simple-rule-fields,.advanced-rules{margin:18px 0;padding:16px;border:1px solid #d9e6e7;border-radius:12px}.html-policy-field>label{grid-template-columns:auto 1fr;align-items:start}.html-policy-field small{grid-column:2}.source-mode-tabs{display:flex;gap:6px}.source-mode-tabs button[aria-selected="true"]{background:#087f83;color:#fff}.artifact-type-options{display:flex;align-items:center;gap:16px;flex-wrap:wrap}.artifact-type-options label{display:flex}.advanced-rule{margin:0;padding:14px;border:1px solid #cfdfe1;border-radius:10px}.link-button{min-height:28px!important;padding:2px 6px}.content-order-dialog{width:min(820px,calc(100vw - 32px))}.content-order-list{display:grid;gap:7px;padding:0;list-style:none}.content-order-list li{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:10px;padding:10px;border:1px solid #d7e4e5;border-radius:9px;background:#fbfdfd}.drag-handle{cursor:grab;color:#789096}.index-summary{grid-template-columns:repeat(4,minmax(0,1fr))}.feedback-context{margin-top:18px;padding:14px;border:1px solid #d9e6e7;border-radius:12px}.feedback-contribution{margin-top:10px;padding:14px;border-left:4px solid #2b9296;background:#f6fafa}.feedback-contribution header,.external-response header{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.feedback-contribution time,.external-response time{margin-left:auto;color:#6a7f84;font-size:11px}.external-response-list{display:grid;gap:8px;margin:12px 0 0 18px}.external-response{padding:11px;border:1px solid #d7e4e5;border-radius:9px;background:#fff}.unanswered-state{margin:0;padding:9px;border-radius:8px;background:#fff7e9;color:#805300}.exchange-recovery{display:grid;gap:14px;margin-top:16px}.credential-detail{padding:4px 14px 18px}.credential-detail[hidden]{display:none}.review-package-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:12px;padding:12px;border:1px solid #dbe7e8;border-radius:10px}.review-package-row.selected{border-color:#68b9bc;background:#f3fafa}.review-package-row input,.review-package-row textarea{box-sizing:border-box;width:100%;margin-bottom:5px}.account-main{max-width:900px}.account-connections{display:grid;gap:8px;margin:20px 0}.account-connection-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:12px;padding:13px;border:1px solid #d9e6e7;border-radius:11px}.account-connection-row div{min-width:0}.account-connection-row small{display:block;color:#657a80}.account-connect-instructions{margin-top:26px;padding:18px;border-radius:12px;background:#f0f7f7}.account-endpoint{display:flex;gap:10px;align-items:center}.account-endpoint code{min-width:0;overflow-wrap:anywhere}.technical-id{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#60777e;font:11px/1.2 ui-monospace,monospace}.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}
@media(max-width:840px){.admin-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.workspace-area-tabs{display:none}.workspace-area-select{display:grid;gap:5px;margin-bottom:15px}.workspace-area-select select{min-height:42px}.admin-compact-header{display:none}.admin-compact-row,.access-table .admin-compact-row{grid-template-columns:minmax(0,1fr) auto;gap:8px}.admin-compact-row>*:nth-child(3),.access-table .admin-compact-row>*:nth-child(2){grid-column:1}.admin-compact-row>*:last-child,.access-table .admin-compact-row>*:last-child{grid-column:2;grid-row:1/3}.exchange-config-row,.job-row{grid-template-columns:minmax(0,1fr) auto}.exchange-config-row>*:nth-child(n+3),.job-row>*:nth-child(n+3){grid-column:auto}.admin-entity-row{grid-template-columns:minmax(0,1fr) auto}.admin-entity-row>button{grid-column:2}.article-row{grid-template-columns:minmax(0,1fr) auto}.review-package-row{grid-template-columns:minmax(0,1fr) auto}.review-package-row .row-actions{grid-column:1/-1}}
@media(max-width:620px){.admin-v2-shell .admin-header,.account-shell .admin-header{flex-wrap:wrap;padding:8px 12px}.admin-v2-shell .admin-header>span,.account-shell .admin-header>span{display:none}.admin-global-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding:8px 12px}.admin-global-nav button{width:100%}.admin-v2-main,.account-main{width:calc(100% - 20px);margin-top:12px}.workspace-admin-heading,.admin-page-heading{display:grid}.workspace-admin-heading label{min-width:0}.admin-summary-grid,.index-summary,.admin-form-grid{grid-template-columns:minmax(0,1fr)}.admin-drawer{width:100vw;border-radius:0}.admin-dialog-backdrop{padding:0}.admin-dialog:not(.admin-drawer){width:100%;max-height:100dvh;border-radius:0}.admin-dialog-actions{display:grid}.admin-dialog-actions button{width:100%}.content-order-list li{grid-template-columns:auto minmax(0,1fr) auto auto}.account-connection-row{grid-template-columns:minmax(0,1fr) auto}.account-connection-row button,.account-connection-row a{grid-column:1/-1}.account-endpoint{align-items:stretch;flex-direction:column}.technical-id{display:none}}
@media(prefers-reduced-motion:reduce){.admin-v2-shell *,.account-shell *{scroll-behavior:auto!important;transition:none!important}}

/* OIQ-021 correction order 3 — calm hierarchy, compact groups and responsive source controls. */
.admin-v2-shell .admin-header{padding-inline:clamp(16px,2.5vw,32px);gap:12px}
.admin-v2-shell .admin-header>strong,.account-shell .admin-header>strong{font-size:15px;font-weight:650}
.admin-account-menu{position:relative;margin-left:auto}
.admin-account-menu>summary{display:grid;width:32px;height:32px;place-items:center;border:1px solid #69c7ca;border-radius:50%;color:#ecffff;cursor:pointer;font-size:12px;font-weight:750;list-style:none}
.admin-account-menu>summary::-webkit-details-marker{display:none}
.admin-account-menu>summary:focus-visible{outline:3px solid #f0b646;outline-offset:2px}
.admin-account-popover{position:absolute;z-index:20;top:calc(100% + 9px);right:0;display:grid;min-width:220px;gap:3px;padding:12px;border:1px solid #c9dcde;border-radius:11px;background:#fff;color:#17323b;box-shadow:0 12px 30px #092f3b29}
.admin-account-popover strong{font-size:14px;font-weight:700}
.admin-account-popover small{margin-bottom:7px;color:#637a80;font-size:11px}
.admin-account-popover a,.admin-account-popover button{box-sizing:border-box;width:100%;min-height:34px;padding:7px 9px;border-radius:7px;color:#126d73;text-align:left;text-decoration:none;font-size:13px;font-weight:650}
.admin-account-popover a:hover{background:#e9f5f5}
.admin-account-popover .logout-button{margin-top:4px}
.admin-v2-main{font-size:14px;line-height:1.45}
.admin-v2-main h1,.admin-v2-main h2,.admin-v2-main h3,.admin-v2-main h4{line-height:1.18;letter-spacing:-.012em}
.admin-v2-main h1{font-size:clamp(26px,3vw,30px);font-weight:690}
.admin-v2-main h2{font-size:20px;font-weight:680}
.admin-v2-main h3{font-size:17px;font-weight:670}
.admin-v2-main h4{font-size:15px;font-weight:670}
.admin-v2-main p{line-height:1.48}
.admin-v2-main strong{font-weight:680}
.admin-v2-shell .admin-card{padding:clamp(18px,2.5vw,24px)}
.admin-v2-shell .admin-page-heading,.admin-v2-shell .workspace-admin-heading{margin-bottom:16px}
.admin-v2-shell .admin-page-heading p,.admin-v2-shell .workspace-admin-heading p{font-size:14px}
.admin-v2-shell .eyebrow{font-size:10px;font-weight:750;letter-spacing:.12em}
.admin-v2-shell button{font-size:13px;font-weight:650}
.admin-v2-shell .admin-form-grid{gap:12px 14px}
.admin-v2-shell .admin-form-grid label,.admin-v2-shell .source-detail-form label,.admin-v2-shell .workspace-admin-heading label{gap:4px;font-size:12.5px;font-weight:650}
.admin-v2-shell .admin-summary-grid{margin:16px 0 24px}
.admin-v2-shell .admin-summary-grid>div,.admin-v2-shell .admin-summary-card{gap:5px;padding:12px}
.admin-v2-shell .admin-summary-grid strong,.admin-v2-shell .admin-summary-card strong{font-size:15px;font-weight:680}
.admin-v2-shell .admin-entity-row{padding:10px 12px}
.admin-v2-shell .admin-entity-row>div,.admin-v2-shell .admin-entity-row>span:first-child{gap:1px}
.admin-v2-shell .admin-workspace-row{grid-template-columns:minmax(0,1fr) auto}
.admin-v2-shell .admin-workspace-statuses,.admin-v2-shell .admin-workspace-row>.row-actions{display:flex;flex-wrap:wrap;gap:6px}
.admin-workspace-statuses{margin-top:5px}.admin-workspace-statuses>.admin-attention{max-width:100%;box-sizing:border-box;overflow-wrap:anywhere}
.admin-projection-notice{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;padding:14px;border:1px solid #ead0ad;border-radius:10px;background:#fff7ec;color:#704c1e}.admin-projection-notice>div{flex:1 1 240px;min-width:0}.admin-projection-notice p{margin:5px 0 0}.admin-projection-notice>button{flex-shrink:0}
@media(max-width:600px){.admin-v2-shell .admin-workspace-row{grid-template-columns:minmax(0,1fr)}.admin-v2-shell .admin-workspace-row>.row-actions{grid-column:1;gap:8px}}
.admin-v2-shell .source-detail-form{gap:0}
.admin-v2-shell .translation-source-fields,.admin-v2-shell .html-policy-field,.admin-v2-shell .simple-rule-fields,.admin-v2-shell .advanced-rules{gap:12px;margin:24px 0 0;padding:14px}
.admin-v2-shell .translation-source-fields .admin-form-grid,.admin-v2-shell .simple-rule-fields .admin-form-grid,.admin-v2-shell .advanced-rule .admin-form-grid{gap:11px 14px}
.admin-v2-shell .source-mode-tabs{margin-top:24px}
.admin-v2-shell .source-mode-tabs+.admin-inline-note{margin:9px 0 0}
.artifact-type-options,.rule-artifact-types{min-width:0;margin:0;padding:0;border:0}
.artifact-type-options>legend,.rule-artifact-types>legend{margin-bottom:7px;color:#38565f;font-size:12.5px;font-weight:650}
.artifact-type-options>div,.rule-artifact-types>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.artifact-type-options label,.rule-artifact-types label{display:flex!important;align-items:center;gap:8px!important;min-height:38px;padding:7px 9px;border:1px solid #d2e1e2;border-radius:8px;background:#fbfdfd;font-weight:600!important}
.artifact-type-options input,.rule-artifact-types input{width:18px!important;min-height:18px!important;margin:0}
.rule-artifact-types small,.navigation-suggestion-help{color:#637a80;font-size:11.5px}
.admin-v2-shell .advanced-rules>.admin-page-heading{margin-bottom:4px}
.admin-v2-shell .advanced-rule{display:grid;gap:13px;margin-top:14px;padding:14px}
.rule-destructive-action{margin-top:4px;padding-top:13px;border-top:1px solid #e2ebec}
.source-check-result{display:grid;gap:8px;margin-top:24px;padding:12px;border:1px solid #b9d5d7;border-radius:10px;background:#f4fafa}
.source-check-result>div{display:flex;align-items:center;justify-content:space-between;gap:10px}
.source-check-result p,.source-check-result pre{margin:0}
.source-check-result pre{max-height:240px;overflow:auto;padding:10px;border-radius:7px;background:#102f38;color:#dff4f4;font:12px/1.45 ui-monospace,monospace;white-space:pre-wrap;overflow-wrap:anywhere}
.source-check-result.error{border-color:#e3b9b2;background:#fff7f4}
.admin-v2-shell .source-dialog-actions{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:14px;padding-top:16px;border-top:1px solid #dce7e8}
.source-dialog-primary-actions{display:flex;gap:8px;margin-left:auto}
.index-heading-actions{display:flex;align-items:end;gap:12px}
.index-latest-status{display:grid;justify-items:end;gap:4px}
.index-latest-status>small{color:#637a80;font-size:11px}
.admin-badge.queued,.admin-badge.running{background:#e2f2fb;color:#185f7b}
.admin-badge.not_indexed{background:#edf1f2;color:#52676d}
.feedback-article-heading,.feedback-context-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}
.feedback-article-heading{margin:18px 0 8px}
.feedback-article-heading h3,.feedback-article-heading p,.feedback-context-heading h4{margin:0}
.feedback-article-heading p{margin-top:5px;color:#60777e}
.admin-v2-shell .feedback-context{margin-top:24px;padding:14px}
.admin-v2-shell .feedback-contribution{margin-top:10px;padding:12px;font-weight:400}
.feedback-contribution>p,.external-response>p{font-size:14px;font-weight:400;line-height:1.5}
.admin-v2-shell .external-response-list{margin:12px 0 0 14px}
.feedback-content-preview{margin:16px 0 24px;padding:12px 14px;border:1px solid #d9e6e7;border-radius:11px;background:#fbfdfd}
.feedback-content-preview>summary{cursor:pointer;color:#08767a;font-weight:680}
.feedback-content-preview[open]>summary{margin-bottom:12px}
.feedback-preview-state{max-height:58vh;overflow:auto;padding:4px}
.feedback-preview-caption{margin:0 0 12px;padding-bottom:8px;border-bottom:1px solid #dce7e8;color:#637a80;font-size:12px}
.feedback-content-preview .markdown-document{max-width:800px;margin:0 auto;color:#17323b;font-size:14px;font-weight:400;line-height:1.58}
.feedback-content-preview .markdown-document h1{font-size:23px}.feedback-content-preview .markdown-document h2{margin-top:25px;font-size:19px}.feedback-content-preview .markdown-document h3{margin-top:20px;font-size:16px}
.feedback-preview-focus{scroll-margin:24px;outline:3px solid #f0b646;outline-offset:3px}

/* OIQ-021 correction order 4 — v0.4-calibrated Source density and shared account header. */
.account-shell .admin-header{padding-inline:clamp(16px,2.5vw,32px);gap:12px}
.admin-v2-shell .admin-drawer{width:min(560px,100vw);padding:20px;border-radius:0;color:#1b2d40;font-size:13px;line-height:1.45}
.admin-v2-shell .admin-drawer .admin-page-heading{gap:12px;margin-bottom:18px}
.admin-v2-shell .admin-drawer .admin-page-heading h2{margin:0 0 3px;font-size:21px;font-weight:650;letter-spacing:-.018em}
.admin-v2-shell .admin-drawer .admin-page-heading h3{font-size:15px;font-weight:650}
.admin-v2-shell .admin-drawer .eyebrow{margin-bottom:4px;font-size:9px;font-weight:700;letter-spacing:.1em}
.admin-v2-shell .admin-drawer p{font-size:12.5px;line-height:1.45}
.admin-v2-shell .admin-drawer strong{font-weight:650}
.admin-v2-shell .admin-drawer legend{padding:0 3px;color:#38565f;font-size:12.5px;font-weight:600}
.admin-v2-shell .admin-drawer .admin-form-grid{gap:10px 12px}
.admin-v2-shell .admin-drawer .admin-form-grid label,.admin-v2-shell .admin-drawer .source-detail-form label{gap:4px;font-size:11px;font-weight:700}
.admin-v2-shell .admin-drawer .admin-form-grid input,.admin-v2-shell .admin-drawer .admin-form-grid select,.admin-v2-shell .admin-drawer .admin-form-grid textarea,.admin-v2-shell .admin-drawer .source-detail-form input,.admin-v2-shell .admin-drawer .source-detail-form select,.admin-v2-shell .admin-drawer .source-detail-form textarea{min-height:36px;padding:8px 9px;font-size:13px;font-weight:400;line-height:1.35}
.admin-v2-shell .admin-drawer input[type="checkbox"],.admin-v2-shell .admin-drawer input[type="radio"]{width:18px!important;min-height:18px!important;padding:0}
.admin-v2-shell .admin-drawer button{min-height:34px;padding:6px 9px;font-size:12px;font-weight:650}
.admin-v2-shell .admin-drawer .translation-source-fields,.admin-v2-shell .admin-drawer .html-policy-field,.admin-v2-shell .admin-drawer .simple-rule-fields,.admin-v2-shell .admin-drawer .advanced-rules{gap:10px;margin:18px 0 0;padding:13px}
.admin-v2-shell .admin-drawer .source-mode-tabs{margin-top:18px}
.admin-v2-shell .admin-drawer .source-mode-tabs+.admin-inline-note{margin-top:7px;font-size:11.5px}
.admin-v2-shell .admin-drawer .html-policy-field>label{gap:7px;padding:1px 0;font-size:12px;font-weight:600}
.admin-v2-shell .admin-drawer .html-policy-field small{font-size:10.5px;font-weight:400}
.admin-v2-shell .admin-drawer .artifact-type-options>legend,.admin-v2-shell .admin-drawer .rule-artifact-types>legend{margin-bottom:5px;font-size:11px}
.admin-v2-shell .admin-drawer .artifact-type-options>div,.admin-v2-shell .admin-drawer .rule-artifact-types>div{gap:7px}
.admin-v2-shell .admin-drawer .artifact-type-options label,.admin-v2-shell .admin-drawer .rule-artifact-types label{min-height:36px;padding:7px 8px;font-size:12px;font-weight:600!important}
.admin-v2-shell .admin-drawer .rule-artifact-types small,.admin-v2-shell .admin-drawer .navigation-suggestion-help{font-size:10.5px;font-weight:400}
.admin-v2-shell .admin-drawer .advanced-rules>.admin-page-heading{margin-bottom:3px}
.admin-v2-shell .admin-drawer .advanced-rule{gap:10px;margin-top:10px;padding:12px}
.admin-v2-shell .admin-drawer .rule-destructive-action{margin-top:2px;padding-top:10px}
.admin-v2-shell .admin-drawer .source-check-result{gap:7px;margin-top:18px;padding:10px}
.admin-v2-shell .admin-drawer .source-dialog-actions{gap:12px;margin-top:12px;padding-top:14px}

@media(max-width:620px){
  .admin-v2-shell .admin-header{flex-wrap:nowrap;min-height:54px;padding:6px 12px}
  .admin-v2-shell .admin-header>.admin-mode-badge{display:none}
  .admin-account-menu{margin-left:auto}
  .admin-account-popover{position:fixed;top:58px;right:10px;left:10px;min-width:0}
  .admin-v2-main h1{font-size:25px}.admin-v2-main h2{font-size:19px}.admin-v2-main h3{font-size:16px}
  .artifact-type-options>div,.rule-artifact-types>div{grid-template-columns:minmax(0,1fr)}
  .admin-v2-shell .source-dialog-actions{display:grid;gap:10px}
  .source-dialog-primary-actions{display:grid;width:100%;margin:0;grid-template-columns:repeat(2,minmax(0,1fr))}
  .source-dialog-primary-actions #save-source-detail{grid-column:1/-1}
  .index-heading-actions{align-items:stretch;flex-direction:column}
  .index-latest-status{justify-items:start}
  .feedback-article-heading,.feedback-context-heading{align-items:stretch;flex-direction:column}
  .feedback-article-heading button,.feedback-context-heading button{align-self:flex-start}
  .admin-v2-shell .external-response-list{margin-left:0}
  .feedback-preview-state{max-height:68vh}
  .account-shell .admin-header{flex-wrap:nowrap;min-height:54px;padding:6px 12px}
  .admin-v2-shell .admin-drawer{width:100vw;padding:16px}
  .admin-v2-shell .admin-drawer .admin-form-grid{grid-template-columns:minmax(0,1fr)}
}

/* OIQ-022 C3: Outline and Grounding share one transient navigation presentation. */
.current-grounding { display: inline-flex; align-items: center; }
.context-navigation-action { min-height: 38px; padding: 6px 8px; border: 0; border-radius: 6px; background: transparent; color: #38616a; font-size: 13px; font-weight: 700; cursor: pointer; }
.artifact-action-bar .context-navigation-action { border: 0; background: transparent; box-shadow: none; color: #17666a; font-weight: 550; }
.context-navigation-action:hover, .grounding-trigger[aria-expanded="true"], .work-context-trigger[aria-expanded="true"] { background: #edf3f3; color: #244a54; }
.current-navigation-drawer { box-sizing: border-box; position: fixed; inset: var(--knowledge-topbar-height) 0 0 auto; width: min(380px, calc(100vw - 36px)); max-width: none; height: auto; max-height: calc(100dvh - var(--knowledge-topbar-height)); min-height: 0; margin: 0; padding: 12px; padding-bottom: max(12px, env(safe-area-inset-bottom)); border: 0; border-left: 1px solid var(--theme-border); border-radius: 0; background: #fff; color: var(--theme-heading); box-shadow: -12px 0 40px #062d3926; overflow: hidden; }
dialog.current-navigation-drawer:not([open]) { display: none; }
.current-navigation-drawer[open] { display: flex; flex-direction: column; gap: 12px; }
.current-navigation-drawer::backdrop { background: #062d3980; }
.navigation-drawer-header { flex: 0 0 auto; min-width: 0; margin: 0; padding: 2px 2px 8px; }
.navigation-drawer-header h2 { flex: 1 1 auto; min-width: 0; margin: 0; color: var(--theme-heading); font-size: 16px; font-weight: 550; line-height: 1.4; }
.navigation-drawer-header button { box-sizing: border-box; display: inline-grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; padding: 0; overflow: hidden; border: 0; border-radius: 6px; background: transparent; color: #49666d; font-size: 24px; font-weight: 400; line-height: 1; }
.navigation-drawer-header button:hover { background: #edf3f3; }
.navigation-drawer-content { flex: 1 1 auto; min-height: 0; min-width: 0; overflow: auto; overscroll-behavior: contain; }
.current-navigation-drawer .navigation-drawer-list { list-style: none; display: grid; gap: 2px; margin: 0; padding: 0; }
.current-navigation-drawer .navigation-drawer-row { box-sizing: border-box; min-width: 0; margin: 0; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 10px 8px; border: 0; border-radius: 6px; background: transparent; color: #385760; font-family: inherit; font-size: 13px; font-weight: 500; line-height: 1.4; text-align: left; text-decoration: none; overflow-wrap: anywhere; cursor: pointer; }
.related-work-context { display: inline-flex; align-items: center; gap: 4px; }
.work-context-loading, .work-context-attention { padding: 2px 7px; border-radius: 999px; color: #50666c; background: #edf3f3; font-size: 11px; font-weight: 700; }
.work-context-attention { color: #7a4300; background: #fff0d6; }
.work-context-section { margin: 14px 0 24px; padding: 0 2px; border-top: 1px solid #dce8e9; }
.work-context-section > summary,.work-context-item > summary { position: relative; padding: 12px 22px 12px 0; list-style: none; cursor: pointer; overflow-wrap: anywhere; }
.work-context-section > summary::-webkit-details-marker,.work-context-item > summary::-webkit-details-marker { display: none; }
.work-context-section > summary::after,.work-context-item > summary::after { content: "+"; position: absolute; top: 14px; right: 4px; color: #52727a; }
.work-context-section[open] > summary::after,.work-context-item[open] > summary::after { content: "−"; }
.work-context-class { display: block; margin-bottom: 4px; color: #647b81; font-size: 11px; font-weight: 400; }
.work-context-section h3 { margin: 4px 0; color: #244a54; font-size: 16px; font-weight: 550; line-height: 1.4; }
.work-context-summary { display: block; margin-top: 5px; color: #526c73; font-size: 12px; font-weight: 400; line-height: 1.5; }
.work-context-help { margin: 2px 0 14px; color: #5b7279; font-size: 12px; line-height: 1.5; }
.work-context-topic { margin: 14px 0; }
.work-context-topic h4 { margin: 0 0 3px; font-size: 13px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.work-context-origin-label { display: block; margin-bottom: 2px; color: #6b8086; font-size: 10px; font-weight: 400; }
.work-context-item { margin-left: 6px; padding-left: 12px; border-left: 1px solid #d9e5e7; }
.work-context-item-title { display: block; color: #31545d; font-size: 13px; font-weight: 500; line-height: 1.4; }
.work-context-list { display: grid; gap: 8px; padding-bottom: 8px; }
.work-context-card { --work-entry-color:#586d76; display: grid; gap: 8px; padding: 12px 10px; border: 0; border-left: 2px solid var(--work-entry-color); border-radius: 0 5px 5px 0; background: #f7f9fa; }
.work-context-card[data-entry-type="CLARIFICATION_POINT"] { --work-entry-color:#99661f; background:#fcf8f0; }
.work-context-card[data-entry-type="CLARIFICATION_POINT"][data-entry-state="closed"] { --work-entry-color:#69787c; background:#f5f7f7; }
.work-context-card[data-entry-type="DECISION"] { --work-entry-color:#67528d; background:#f7f4fb; }
.work-context-card[data-entry-type="RESULT"] { --work-entry-color:#267b68; background:#f0f8f5; }
.work-context-type-marker { flex:0 0 9px; width:9px; height:9px; border:1.5px solid var(--work-entry-color); border-radius:50%; }
.work-context-card[data-entry-type="INSIGHT"] .work-context-type-marker { transform:scale(.55); background:var(--work-entry-color); }
.work-context-card[data-entry-type="DECISION"] .work-context-type-marker { background:var(--work-entry-color); }
.work-context-card[data-entry-type="RESULT"] .work-context-type-marker { border-radius:1px; background:var(--work-entry-color); }
.work-context-card[data-entry-state="closed"] .work-context-type-marker::after { content:"✓"; display:block; font-size:9px; line-height:8px; color:var(--work-entry-color); }
.work-context-card p { margin: 0; color: #385760; font-size: 13px; line-height: 1.55; }
.work-context-card .navigation-drawer-row { justify-content: space-between; min-height: 38px; margin-top: 0; padding: 6px 0; border: 0; color: #087f83; font-weight: 500; }
.work-context-card-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 6px; color: #657b80; font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.work-context-entry-type, .work-context-entry-state, .work-context-drift, .work-context-drift-unknown { display: inline-flex; align-items: center; min-height: 20px; padding: 0 4px; border-radius: 3px; color: #405961; font-weight: 500; letter-spacing: .01em; }
.work-context-entry-type { padding-left: 0; color: var(--work-entry-color); }
.work-context-entry-state { background: #f0f2f5; color: #56666b; }
.work-context-card-meta .work-context-drift { background: #fff0df; color: #93470e; }
.work-context-drift-unknown { background: #f2f4f5; color: #657b80; }
.work-context-card .work-context-entry-text { color: #294b54; font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.work-context-card .work-context-fanout { color: #657b80; font-size: 11px; }
.work-context-snapshot { margin-bottom: 18px; padding: 11px 12px; border-left: 3px solid #89a2a6; background: #f2f6f6; color: #385760; }
.work-context-snapshot.work_moved_on { border-left-color: #c86b2a; background: #fff6ed; }
.work-context-snapshot p, .work-context-empty, .work-context-error { margin: 5px 0 0; font-size: 13px; line-height: 1.5; }
.navigation-drawer-row > span:first-child { flex: 1; min-width: 0; }
.navigation-drawer-count { margin-left: auto; color: #71858a; font-size: 12px; font-weight: 500; }
.navigation-drawer-row:hover { background: #edf3f3; }
.grounding-section + .grounding-section { margin-top: 18px; }
.grounding-section h3 { display: flex; align-items: center; gap: 10px; margin: 0 8px 6px; color: #38616a; font-size: 13px; font-weight: 700; line-height: 1.5; }
.grounding-help { margin: 0 8px 12px; color: #71858a; font-size: 12px; line-height: 1.5; }
.context-navigation-action:focus-visible, .current-navigation-drawer button:focus-visible, .current-navigation-drawer a:focus-visible { outline: 2px solid #55747b; outline-offset: 2px; }
@media (max-width: 760px) {
  .context-navigation-action { min-height: 44px; }
  .current-navigation-drawer { width: min(390px, 100vw); }
  .current-navigation-drawer .navigation-drawer-row { min-height: 44px; }
  .navigation-drawer-header button { flex-basis: 44px; width: 44px; height: 44px; }
}

/* Contents: accepted Reader v0.2 grouping, with one source of layout rules. */
.outline-drawer.current-navigation-drawer { width: min(480px, 42vw); padding: 0; gap: 0; }
.outline-drawer .navigation-drawer-header { padding: 12px 16px; }
.outline-drawer .navigation-drawer-content { padding: 12px 18px max(18px, env(safe-area-inset-bottom)); }
.contents-document-title { margin: 0 4px 16px; color: #58757e; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.outline-drawer .navigation-drawer-list { gap: 0; }
.contents-chapter { border-bottom: 1px solid #dce7e9; padding: 5px 0; }
.contents-chapter-row { display: flex; align-items: flex-start; gap: 3px; min-width: 0; }
.contents-chapter-row > .navigation-drawer-row { flex: 1; padding: 8px 7px; font-size: 13px; line-height: 1.45; font-weight: 450; }
.contents-chapter-row > button[data-reader-group-toggle], .contents-toggle-spacer { flex: 0 0 32px; width: 32px; }
.contents-chapter-row > button[data-reader-group-toggle] { min-height: 40px; padding: 4px; border: 0; background: transparent; color: #60818a; cursor: pointer; }
.contents-chapter-row > button[data-reader-group-toggle][aria-expanded="true"] { color: #166f79; }
.mobile-chapter-nav [data-reader-children] { list-style: none; margin: 0 0 3px 33px; padding: 0 0 4px 12px; border-left: 1px solid #c9dee1; }
.mobile-chapter-nav [data-reader-children][hidden] { display: none; }
.current-navigation-drawer .navigation-drawer-row[aria-current="location"] { background: #e9f3f3; box-shadow: inset 2px 0 #087f83; color: #075e69; font-weight: 550; }
.contents-chapter.active-chapter > .contents-chapter-row { background: #edf5f5; border-radius: 7px; }
.contents-chapter.active-chapter > .contents-chapter-row > .navigation-drawer-row { color: #0b6671; }
.current-navigation-drawer .mobile-chapter-level-3 > .navigation-drawer-row { padding: 8px 10px; font-size: 13px; font-weight: 400; line-height: 1.45; }
@media (max-width: 1080px) {
  .outline-drawer.current-navigation-drawer { width: min(470px, 70vw); }
}
@media (max-width: 760px) {
  .outline-drawer.current-navigation-drawer { width: 100vw; }
  .contents-chapter-row > button[data-reader-group-toggle], .contents-toggle-spacer { flex-basis: 40px; width: 40px; min-height: 44px; }
}
.svg-image-scroll { max-width: 100%; overflow: auto; overscroll-behavior-inline: contain; }
.svg-enlarged .svg-image-scroll { max-height: 70dvh; }
.svg-enlarged .svg-image-scroll img { width: max(100%, 1200px); max-width: none; max-height: none; }
.svg-image-actions { display: flex; align-items: baseline; gap: 18px; color: #38636a; font-size: 13px; }
.svg-image-actions button { min-height: 38px; padding: 6px 10px; border: 1px solid #bdd4d6; border-radius: 7px; background: #fff; color: #126d73; font: inherit; cursor: pointer; }
.asset-details summary { cursor: pointer; }
.asset-details code { display: block; overflow-wrap: anywhere; }
.app-shell button:focus-visible, .app-shell a:focus-visible, .app-shell summary:focus-visible, .app-shell select:focus-visible { outline: 2px solid #087f83; outline-offset: 3px; }
.markdown-document [data-reader-heading]:focus { outline: 2px solid #087f83; outline-offset: 6px; }
@media (max-width: 760px) {
  .artifact-localization { gap: 6px; }
  .variant-switcher { flex-wrap: wrap; gap: 4px; }
  .variant-switcher > span { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .variant-switcher select { max-width: 210px; }
  .rendition-evidence { flex-wrap: wrap; }
  .artifact-context .breadcrumb-current, .artifact-context .breadcrumb-intermediate { display: none; }
  .artifact-action-bar { gap: 0 8px; }
  .artifact-action-bar > button:not([hidden]), .artifact-feedback-actions > button:not([hidden]), .artifact-action-bar > details > summary, .artifact-action-bar .grounding-trigger { min-height: 44px; padding: 7px 6px; }
  .artifact-action-bar .contents-count { display: none; }
  .svg-image-actions button { min-height: 44px; }
  .contents-chapter-row > button[data-reader-group-toggle] { flex-basis: 40px; min-height: 44px; }
}

/* One viewport-aware owner for source, rendition and HTML policy disclosures. */
.reader-details-content.reader-disclosure-positioned { box-sizing: border-box; position: fixed; inset: auto; margin: 0; width: min(360px, calc(100vw - 24px)); max-height: calc(100dvh - 100px); overflow: auto; overscroll-behavior: contain; padding: 12px 16px 16px; }
.reader-disclosure-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; color: #557078; font-size: 12px; }
.reader-disclosure-close { flex: 0 0 38px; width: 38px; height: 38px; border: 0; border-radius: 5px; background: transparent; color: #49666d; font-size: 24px; font-weight: 400; cursor: pointer; }
.reader-disclosure-close:hover { background: #edf3f3; }
@media(max-width:760px) { .reader-disclosure-close { flex-basis: 44px; width: 44px; height: 44px; } }

/* OIQ-023: compact workspace read choice; operations are progressively disclosed. */
.app-shell .header-row, .app-shell.focus-mode .header-row { grid-template-columns: auto auto auto auto minmax(0, 1fr) auto auto; }
.app-shell .header-row:not(:has(.projection-wrap)), .app-shell.focus-mode .header-row:not(:has(.projection-wrap)) { grid-template-columns: auto auto auto minmax(0, 1fr) auto auto; }
.projection-wrap { position: relative; min-width: 0; }
.projection-trigger { display: inline-flex; align-items: center; gap: 7px; max-width: 220px; min-height: 34px; padding: 5px 10px; border: 1px solid #ffffff38; border-radius: 999px; background: #ffffff0b; color: #d9ecee; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.projection-trigger:hover, .projection-trigger[aria-expanded="true"] { background: #ffffff19; border-color: #ffffff60; }
.projection-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.projection-dot { flex: 0 0 7px; height: 7px; border-radius: 50%; background: #7ed7d8; }
.projection-trigger.stable .projection-dot { background: #c8d8dc; }
.projection-popover { position: absolute; top: calc(100% + 10px); left: 0; z-index: 80; width: 370px; max-width: calc(100vw - 24px); max-height: calc(100dvh - 90px); overflow-y: auto; padding: 12px; border: 1px solid #d7e5e7; border-radius: 13px; background: #fff; color: #234850; box-shadow: 0 14px 50px #062d3930; font-size: 13px; }
.projection-popover-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 4px 8px; }
.projection-popover-heading button { border: 0; border-radius: 8px; background: transparent; color: #385860; width: 32px; height: 32px; font-size: 22px; cursor: pointer; }
.projection-options { display: grid; gap: 5px; }
.projection-option { width: 100%; display: grid; grid-template-columns: 27px 1fr 16px; gap: 10px; align-items: center; text-align: left; border: 1px solid transparent; border-radius: 10px; background: #fff; padding: 11px; color: #1b4650; cursor: pointer; }
.projection-option:hover { background: #f5fafa; }
.projection-option.selected { border-color: #b8d9dc; background: #f0f9f9; }
.projection-option strong, .projection-option small { display: block; overflow-wrap: anywhere; }
.projection-option strong { font-size: 13px; }
.projection-option small { margin-top: 3px; color: #60777d; font-size: 11px; line-height: 1.4; }
.projection-option-icon { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 8px; background: #e7f2f2; color: #17666a; font-size: 17px; }
.projection-management { border-top: 1px solid #e1ebed; margin-top: 10px; padding-top: 8px; }
.projection-actions { display: flex; gap: 7px; flex-wrap: wrap; margin: 6px 0 10px; }
.projection-actions button, .projection-unavailable-actions button { border: 1px solid #c9dcde; border-radius: 8px; padding: 8px 10px; background: #fff; color: #24565c; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.projection-actions button[type="submit"] { background: #087f83; color: #fff; border-color: #087f83; }
.projection-actions button:disabled, .projection-option:disabled, .projection-unavailable-actions button:disabled { opacity: .5; cursor: wait; }
.projection-details { padding: 8px 4px; font-size: 11px; color: #5e747b; }
.projection-details summary { cursor: pointer; color: #315a63; padding: 4px 0; }
.projection-provenance { display: grid; grid-template-columns: 65px minmax(0, 1fr); gap: 6px; }
.projection-provenance dt { font-weight: 600; }
.projection-provenance dd { margin: 0; overflow-wrap: anywhere; font-family: monospace; }
.projection-date { font-size: 11px; }
.projection-source { display: grid; gap: 3px; padding: 8px; border: 1px solid #e2eced; border-radius: 7px; margin-top: 5px; overflow-wrap: anywhere; }
.projection-source code { font-size: 10px; white-space: normal; }
.projection-form { display: grid; gap: 11px; padding: 4px; }
.projection-form h3 { margin: 0; font-size: 16px; }
.projection-form p { margin: 0; line-height: 1.5; color: #60777d; font-size: 12px; }
.projection-form label { display: grid; gap: 5px; font-size: 12px; font-weight: 700; }
.projection-form input { box-sizing: border-box; width: 100%; min-width: 0; border: 1px solid #bdd3d6; border-radius: 8px; padding: 10px; color: #234850; font: inherit; }
.projection-error { margin: 8px 0; padding: 10px; border-radius: 8px; background: #fff2e7; color: #794016; line-height: 1.5; }
.projection-message { color: #32606a; font-size: 12px; }
[data-reader-projection-update] { position: fixed; z-index: 55; bottom: 18px; right: 24px; width: min(420px, calc(100vw - 32px)); }
[data-reader-projection-update][hidden] { display: none; }
.reader-projection-update { padding: var(--oiq-space-4); border: 1px solid var(--oiq-border); border-radius: var(--oiq-radius-lg); background: var(--oiq-surface); color: var(--oiq-ink); box-shadow: var(--oiq-shadow-popover); }
.reader-projection-update p { margin: 0 0 10px; font-size: var(--oiq-text-md); line-height: 1.5; }
.reader-projection-update button { min-height: var(--oiq-target); padding: var(--oiq-space-2) var(--oiq-space-3); border: 1px solid var(--oiq-accent); border-radius: var(--oiq-radius-md); background: var(--oiq-accent); color: var(--oiq-header-ink); font: inherit; font-size: var(--oiq-text-md); cursor: pointer; }
.reader-projection-update button:disabled { opacity: .6; cursor: default; }
.reader-projection-update button:focus-visible { outline: var(--oiq-focus-ring); outline-offset: var(--oiq-focus-offset); }
.reader-projection-update small { display: block; margin-top: var(--oiq-space-2); font-size: var(--oiq-text-sm); line-height: 1.5; }
.reader-projection-update small[hidden] { display: none; }
@media (max-width: 760px) { [data-reader-projection-update] { bottom: 12px; right: 16px; left: 16px; width: auto; } }
.projection-unavailable { max-width: 640px; margin: 12vh auto; padding: 0 20px; }
.projection-unavailable .state-card { margin: 0 0 18px; max-width: none; box-shadow: none; }
.projection-unavailable-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.projection-popover :focus-visible, .projection-trigger:focus-visible { outline: 3px solid #28aeb5; outline-offset: 2px; }
@media (max-width: 760px) {
  .app-shell .header-row, .app-shell.focus-mode .header-row { grid-template-columns: auto auto auto minmax(0, 1fr) auto auto; gap: 5px; padding: 0 8px; }
  .app-shell .header-row:not(:has(.projection-wrap)), .app-shell.focus-mode .header-row:not(:has(.projection-wrap)) { grid-template-columns: auto auto minmax(0, 1fr) auto auto; }
  .app-header:has(.projection-wrap) .brand-wordmark { display: none; }
  .projection-trigger { max-width: 132px; min-height: 36px; padding: 5px 8px; font-size: 11px; }
  .projection-popover { position: fixed; top: calc(var(--knowledge-topbar-height) + 8px); left: 10px; right: 10px; width: auto; max-width: none; max-height: calc(100dvh - var(--knowledge-topbar-height) - 22px); border-radius: 12px; padding: 12px; }
  .projection-option { min-height: 60px; }
  .projection-actions button { min-height: 40px; }
  .projection-form input { font-size: 16px; }
}

/* Personal GitHub owner lifecycle shares the existing responsive admin forms. */
.account-github-connection{margin:14px 0;border-bottom:1px solid #d9e6e7;padding-bottom:14px}.account-github-connection details,.account-card>details{margin-top:12px}.account-card summary{cursor:pointer;color:#08767a;font-weight:700;overflow-wrap:anywhere}.account-card .admin-form-grid{margin-top:14px}.account-main>.account-card{margin-bottom:20px}.account-github-connection small{overflow-wrap:anywhere}.account-card .admin-form-grid button{min-height:40px}
/* OIQ-044 F5: common Human utility navigation; availability is not operation authority.
   The shared-header Management entry itself is owned by product-header.css. */
.management-navigation a:focus-visible{outline:3px solid #f0b646;outline-offset:2px}
.management-navigation{display:flex;flex-wrap:wrap;gap:8px;padding:12px clamp(14px,3vw,36px);background:#fff;border-bottom:1px solid #d8e5e6}
.management-navigation a{padding:9px 12px;border-radius:9px;color:#46636b;text-decoration:none;font-weight:700}
.management-navigation a[aria-current="page"]{background:#dff1f1;color:#066d72}
.management-heading{margin-bottom:20px}.management-heading h1{margin:4px 0}.platform-administration-group{background:#fff;border-bottom:1px solid #d8e5e6}.platform-administration-group>h2{margin:0;padding:14px clamp(14px,3vw,36px) 0;font-size:15px;color:#46636b}
@media(max-width:600px){.management-navigation{gap:3px}.management-navigation a{font-size:12px;padding:8px}.platform-administration-group .admin-global-nav{flex-wrap:wrap}}
.managed-git-operation{margin:18px 0}.managed-git-operation .row-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px}.managed-git-operation dl{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px 16px}.managed-git-operation dd{margin:0;overflow-wrap:anywhere}.managed-git-operation dt{font-weight:700}.managed-git-operation p{overflow-wrap:anywhere}.managed-git-main>.admin-card{margin-bottom:18px}
@media(max-width:600px){.managed-git-operation dl{grid-template-columns:minmax(0,1fr)}.managed-git-operation .row-actions>*{max-width:100%;white-space:normal}}
@media(max-width:420px){.account-shell .product-header .product-header-row,.admin-v2-shell .product-header .product-header-row{flex-wrap:wrap;gap:4px;height:auto;padding-block:6px}.account-shell .product-header .session-actions,.admin-v2-shell .product-header .session-actions{margin-left:auto}}
.admin-v2-shell .admin-dialog-backdrop{z-index:100}.managed-git-main a{color:#076b73;text-underline-offset:3px}.managed-git-operation .row-actions a{display:inline-flex;align-items:center;min-height:44px}
.managed-git-operation{min-width:0;grid-template-columns:minmax(0,1fr)}.managed-git-operation .admin-attention{box-sizing:border-box;max-width:100%;white-space:normal}
.home-participants { margin-top: var(--oiq-space-4); min-width: 0; }
.home-participants section { margin-top: var(--oiq-space-4); padding-top: var(--oiq-space-4); border-top: 1px solid var(--oiq-border); }
.home-participants form { display: grid; gap: .65rem; max-width: 34rem; }
.home-participants label { display: grid; gap: .4rem; }
.home-participants input { width: 100%; min-width: 0; box-sizing: border-box; }
.home-participant-list { padding: 0; list-style: none; }
.home-participant-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .8rem; padding: .85rem 0; border-bottom: 1px solid var(--oiq-border); }
.home-participant-list li div { display: grid; min-width: 0; gap: .2rem; }
.home-participants p, .home-participants span, .home-participants strong { overflow-wrap: anywhere; }
.home-participants button { margin: .25rem .5rem .25rem 0; min-height: var(--oiq-target); }
.home-participant-confirm { padding: var(--oiq-space-4); margin: var(--oiq-space-4) 0; background: var(--oiq-surface-sunken); border-radius: var(--oiq-radius-md); }
@media (max-width:620px) {
  .managed-git-main [data-home-list] .admin-entity-row { grid-template-columns: minmax(0, 1fr); }
  .managed-git-main [data-home-list] .admin-entity-row > * { min-width: 0; overflow-wrap: anywhere; }
  .home-participants button { margin-right: 0; box-sizing: border-box; }
  .home-participants section, .home-participants form, .home-participant-confirm { min-width: 0; }
}
