:root {
  --ground:#f5f6f8; --surface:#fff; --raised:#f8f9fb; --active:#e9ecf1;
  --border:#e9ecf1; --rule:#edf0f4; --control:#c5cbd5;
  --text:#191c22; --muted:#626a77; --accent:#2865ed; --accent-ink:#1d54cd; --soft:#edf3ff;
  --primary:#191c22; --white:#fff; --positive:#1c704d; --positive-bg:#edf7f1;
  --negative:#b53335; --negative-bg:#fff0f0; --warning:#825b18; --warning-bg:#fff3dc;
  --font:"Segoe UI Variable Text","Segoe UI","Microsoft YaHei",sans-serif;
  --radius:16px; --radius-control:8px; --gap:16px; --sidebar-width:224px;
  --scroll-thumb:#d2d7df; --scroll-thumb-hover:#aeb7c4;
}
* { box-sizing:border-box; }
html { color-scheme:light; -webkit-text-size-adjust:100%; }
html,.sidebar,.dialog-body,.permission-matrix,textarea,select[multiple] { scrollbar-color:var(--scroll-thumb) transparent; scrollbar-width:thin; }
@supports selector(::-webkit-scrollbar) {
  html,.sidebar,.dialog-body,.permission-matrix,textarea,select[multiple] { scrollbar-width:auto; }
  ::-webkit-scrollbar { width:6px; height:6px; }
  ::-webkit-scrollbar-track { background:transparent; margin-block:8px; }
  ::-webkit-scrollbar-thumb { border-radius:6px; background:var(--scroll-thumb); }
  ::-webkit-scrollbar-thumb:hover { background:var(--scroll-thumb-hover); }
  ::-webkit-scrollbar-button { display:none; width:0; height:0; }
  ::-webkit-scrollbar-corner { background:transparent; }
}
body { margin:0; background:var(--ground); color:var(--text); font:14px/1.6 var(--font); -webkit-font-smoothing:antialiased; }
button,input,select,textarea { font:inherit; color:inherit; }
button,a,summary { -webkit-tap-highlight-color:transparent; }
button { cursor:pointer; }
button:disabled { cursor:default; color:var(--muted); background:var(--raised); }
a { color:inherit; text-decoration:none; text-underline-offset:3px; }
h1,h2,h3,h4,p,ul,ol,dl,dd,figure { margin:0; }
ul,ol { padding:0; list-style:none; }
img,svg,video { display:block; max-width:100%; }
svg { fill:none; stroke:currentColor; stroke-width:1.65; stroke-linecap:round; stroke-linejoin:round; }
[hidden] { display:none!important; }
::selection { background:var(--active); color:var(--text); }
:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
input,textarea { caret-color:var(--accent); }
.num,table,time,progress { font-variant-numeric:tabular-nums; }
.muted,.meta { color:var(--muted); }
.meta,small { font-size:12px; }
.skip-link { position:fixed; z-index:30; left:16px; top:8px; padding:8px 16px; background:var(--text); color:var(--white); transform:translateY(-150%); }
.skip-link:focus { transform:none; }
.admin-shell { display:grid; grid-template-columns:var(--sidebar-width) minmax(0,1fr); grid-template-rows:56px 1fr; min-height:100dvh; }
.sidebar { position:fixed; z-index:8; inset:0 auto 0 0; display:flex; flex-direction:column; width:var(--sidebar-width); padding:27px 16px 12px; background:var(--ground); overflow-y:auto; }
.brand { display:flex; align-items:center; gap:11px; padding:0 12px; }
.brand>svg { width:31px; height:31px; color:var(--accent); stroke-width:1.8; }
.brand>span { font-size:19px; line-height:1.25; font-weight:600; letter-spacing:.01em; }
.brand small { display:block; margin-top:6px; color:var(--muted); font-size:12px; font-weight:400; letter-spacing:0; }
.workspace-label { margin:35px 12px 13px; color:var(--muted); font-size:12px; }
.nav-item { display:flex; align-items:center; gap:11px; min-height:44px; padding:9px 12px; border-radius:var(--radius-control); color:var(--muted); margin-bottom:4px; }
.nav-item>svg { width:18px; height:18px; flex-shrink:0; }
.nav-item:hover { color:var(--text); background:var(--rule); }
.nav-item[aria-current="page"] { background:var(--active); color:var(--text); font-weight:600; }
.nav-item.settings-nav { margin-top:24px; }
.sidebar-bottom { margin-top:auto; padding:32px 6px 0; }
.app-link { display:flex; justify-content:space-between; min-height:40px; padding:8px 6px; color:var(--muted); font-size:12px; }
.app-link:hover { color:var(--text); }
.prototype-note { padding:5px 6px 17px; font-size:11px; color:var(--muted); }
.operator { display:flex; align-items:center; gap:10px; width:100%; padding:14px 6px 5px; border:0; border-top:1px solid var(--border); background:transparent; text-align:left; }
.operator>span:nth-child(2) { flex:1; font-size:13px; }
.operator small { display:block; margin-top:2px; color:var(--muted); font-size:11px; }
.operator>svg { width:14px; height:14px; color:var(--muted); }
.avatar { display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; flex-shrink:0; border-radius:50%; background:var(--active); color:var(--text); font-size:12px; font-weight:500; }
.topbar { grid-column:2; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:0 32px 0 30px; font-size:12px; }
.topbar-start,.topbar-end { display:flex; align-items:center; gap:14px; }
.topbar-start>span:first-of-type,.topbar-divider,.snapshot { color:var(--muted); }
.topbar-start strong { font-weight:500; }
.service-link { display:flex; align-items:center; gap:6px; }
.status-dot { display:inline-block; width:6px; height:6px; flex-shrink:0; border-radius:50%; background:var(--muted); }
.sheet { grid-column:2; min-width:0; margin:0 8px 8px 0; padding:30px 32px 40px; border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); }
.sheet:focus { outline:none; }
.page-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:24px; }
h1 { font-size:24px; line-height:1.4; font-weight:600; letter-spacing:-.02em; }
.page-heading p { margin-top:6px; color:var(--muted); }
.heading-actions,.button-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.button,.icon-button { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:36px; padding:7px 13px; border:1px solid var(--control); border-radius:var(--radius-control); background:var(--surface); font-size:13px; font-weight:500; line-height:20px; white-space:nowrap; transition:background-color 140ms ease,border-color 140ms ease; }
.button svg,.icon-button svg { width:16px; height:16px; flex-shrink:0; }
.button:hover { background:var(--raised); border-color:var(--muted); }
.button-primary { background:var(--primary); color:var(--white); border-color:var(--primary); }
.button-primary:hover { background:var(--text); border-color:var(--text); }
.button:active,.icon-button:active { transform:translateY(1px); }
.button-danger { color:var(--negative); }
.icon-button { width:36px; padding:7px; }
.text-button { display:inline-flex; align-items:center; justify-content:center; gap:5px; min-height:36px; padding:5px 0; border:0; background:transparent; font-size:13px; font-weight:500; cursor:pointer; }
.text-button:hover { text-decoration:underline; }
.text-button svg { width:14px; height:14px; }
.mobile-menu { display:none; }
.empty { padding:36px 20px; background:var(--raised); border-radius:var(--radius-control); text-align:center; }
.empty h2 { font-size:16px; font-weight:500; }
.empty p { margin-top:8px; color:var(--muted); }
.noscript { padding:24px; }
.sr-only { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.section-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; }
.section-heading h2 { font-size:16px; font-weight:600; line-height:1.5; }
.section-heading p { margin-top:4px; font-size:13px; color:var(--muted); }
.section-heading .button { min-height:30px; border:0; padding:3px 0 3px 8px; background:transparent; font-size:12px; }
.scope-row { display:flex; justify-content:space-between; gap:12px; margin-bottom:14px; font-size:13px; }
.pipeline { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); border:1px solid var(--border); border-radius:10px; overflow:hidden; margin-bottom:30px; }
.pipeline-stage { position:relative; padding:17px 20px; border-right:1px solid var(--border); }
.pipeline-stage:last-child { border:0; }
.pipeline-stage:hover { background:var(--raised); }
.pipeline-stage>span { font-size:13px; color:var(--muted); }
.pipeline-stage strong { display:flex; align-items:baseline; gap:8px; margin-top:5px; font-size:30px; font-weight:500; line-height:1.35; }
.pipeline-stage strong small { color:var(--muted); font-size:12px; font-weight:400; }
.pipeline-stage.is-current strong { color:var(--accent); }
.pipeline-stage>svg { position:absolute; top:21px; right:16px; width:12px; height:12px; color:var(--muted); }
.overview-grid { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(320px,1fr); gap:32px; }
.service-overview { margin:24px 0 30px; padding:18px 0 0; border-top:1px solid var(--border); border-bottom:1px solid var(--border); }
.service-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); border-top:1px solid var(--rule); }
.service-cell { min-height:150px; padding:17px 18px 17px 0; border-right:1px solid var(--rule); }
.service-cell:not(:first-child) { padding-left:18px; }
.service-cell:last-child { border-right:0; }
.service-label { display:block; margin-bottom:10px; color:var(--muted); font-size:12px; }
.service-cell strong { display:block; font-size:17px; font-weight:500; }
.service-cell p { min-height:38px; margin-top:8px; color:var(--muted); font-size:12px; line-height:1.65; }
.service-cell a { display:inline-flex; align-items:center; gap:4px; margin-top:8px; color:var(--text); font-size:12px; }
.service-cell a:hover { text-decoration:underline; }
.service-cell a svg { width:13px; height:13px; }
.service-boundary { display:flex; align-items:flex-start; gap:8px; padding:14px 0 17px; color:var(--muted); font-size:12px; line-height:1.7; }
.service-boundary svg { flex-shrink:0; width:15px; height:15px; color:var(--warning); margin-top:2px; }
.overview-days,.overview-attention { min-width:0; }
.identity { display:flex; align-items:center; gap:11px; min-width:0; }
.identity strong { display:block; font-size:14px; font-weight:500; }
.identity small { display:block; color:var(--muted); font-size:12px; margin-top:2px; }
.person-day-row { display:flex; align-items:center; gap:14px; min-height:60px; border-bottom:1px solid var(--rule); padding:8px 0; }
.person-day-row:hover { background:var(--raised); }
.person-day-row .identity { flex:1; }
.person-day-row>svg { flex-shrink:0; width:13px; height:13px; color:var(--muted); }
.day-row-state { text-align:right; }
.day-row-state>span:last-child:not(.badge) { display:block; color:var(--muted); font-size:12px; margin-top:2px; }
.badge { display:inline-flex; align-items:center; gap:5px; vertical-align:middle; padding:2px 7px; border-radius:4px; background:var(--ground); font-size:11px; color:var(--muted); line-height:18px; white-space:nowrap; }
.is-warning { background:var(--warning-bg); color:var(--warning); }
.is-negative { background:var(--negative-bg); color:var(--negative); }
.is-blue { background:var(--soft); color:var(--accent-ink); }
.attention-list { border-top:1px solid var(--rule); }
.attention-item { padding:16px 0 12px; border-bottom:1px solid var(--rule); }
.attention-title { display:flex; align-items:center; gap:7px; margin-bottom:8px; }
.attention-title>svg { width:15px; height:15px; color:var(--warning); }
.attention-title h3 { font-size:14px; font-weight:600; }
.attention-title>time,.attention-title>span { margin-left:auto; font-size:11px; color:var(--muted); }
.attention-item p { font-size:13px; }
.attention-item p+p { margin-top:4px; }
.attention-item .text-button { font-size:13px; margin-top:7px; }
.runtime-note { display:flex; align-items:center; gap:10px; margin-top:17px; padding:12px; border-radius:var(--radius-control); background:var(--raised); font-size:12px; }
.runtime-note>svg { width:17px; height:17px; color:var(--muted); }
.runtime-note span { flex:1; }
.runtime-note small { display:block; margin-top:2px; font-size:11px; color:var(--muted); }
.runtime-note a { display:flex; align-items:center; justify-content:center; width:30px; height:30px; }
.runtime-note a svg { width:13px; height:13px; }
.overview-recent { margin-top:24px; }
.recent-records { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.recent-record { display:flex; align-items:center; gap:12px; min-width:0; padding:12px; border:1px solid var(--border); border-radius:var(--radius-control); background:var(--surface); text-align:left; }
.recent-record:hover { background:var(--raised); }
.recent-record>img,.media-placeholder { flex-shrink:0; width:76px; height:55px; border-radius:4px; object-fit:cover; background:var(--ground); }
.media-placeholder { display:flex; align-items:center; justify-content:center; color:var(--muted); }
.media-placeholder>svg { width:18px; height:18px; }
.recent-record>span:not(.media-placeholder) { min-width:0; flex:1; }
.recent-record strong { display:block; font-size:14px; font-weight:500; }
.recent-record small { display:block; margin-top:5px; color:var(--muted); font-size:12px; }
.recent-record>svg { width:12px; height:12px; flex-shrink:0; color:var(--muted); }
.tabs { display:flex; gap:26px; width:100%; border-bottom:1px solid var(--border); overflow-x:auto; scrollbar-width:none; }
.tabs::-webkit-scrollbar { display:none; }
.tabs>button,.tabs>a { position:relative; display:inline-flex; justify-content:center; align-items:center; flex-shrink:0; gap:7px; min-height:44px; padding:9px 0 13px; border:0; background:transparent; color:var(--muted); font-size:13px; white-space:nowrap; }
.tabs>button:hover,.tabs>a:hover { color:var(--text); }
.tabs>button[aria-pressed="true"],.tabs>a[aria-current="page"] { color:var(--text); font-weight:600; }
.tabs>button[aria-pressed="true"]::after,.tabs>a[aria-current="page"]::after { content:""; position:absolute; bottom:0; left:0; right:0; height:2px; background:var(--text); }
.tabs>button span { font-size:11px; font-weight:400; color:var(--muted); }
.toolbar { display:flex; align-items:center; gap:12px; flex-wrap:wrap; min-height:36px; margin:24px 0 14px; }
.toolbar-count { margin-left:auto; }
.search-form { flex:1; max-width:310px; min-width:190px; }
.search-field { display:flex; align-items:center; gap:8px; padding:0 10px; border:1px solid var(--control); border-radius:var(--radius-control); }
.search-field>svg { width:15px; height:15px; flex-shrink:0; color:var(--muted); }
.search-field input { width:100%; min-width:0; min-height:34px; border:0; background:transparent; outline:none; font-size:12px; }
.search-field:focus-within { outline:2px solid var(--accent); outline-offset:2px; }
input::placeholder,textarea::placeholder { color:var(--muted); opacity:1; }
.filter-select select,.filter-select input { min-height:36px; max-width:100%; padding:5px 10px; border:1px solid var(--control); border-radius:var(--radius-control); background:var(--surface); font-size:12px; }
.state-filters { display:flex; gap:6px; overflow-x:auto; margin:0 0 13px; }
.state-filters button { display:flex; align-items:center; gap:7px; min-height:30px; padding:4px 10px; border:0; border-radius:6px; background:transparent; color:var(--muted); font-size:12px; white-space:nowrap; }
.state-filters button[aria-pressed="true"] { background:var(--active); color:var(--text); }
.state-filters button span { font-size:11px; color:var(--muted); }
.table-frame { width:100%; min-width:0; }
table { width:100%; border-collapse:collapse; table-layout:auto; }
th { padding:12px 12px; color:var(--muted); font-size:12px; font-weight:400; text-align:center; white-space:nowrap; }
td { padding:14px 12px; border-bottom:1px solid var(--rule); font-size:13px; vertical-align:middle; text-align:center; }
td:first-child,th:first-child { padding-left:0; }
td:last-child,th:last-child { padding-right:0; }
td.num,th.num { text-align:center; white-space:nowrap; }
td small { display:block; margin-top:3px; font-size:11px; color:var(--muted); }
tbody tr:hover { background:var(--raised); }
.table-link { padding:0; border:0; background:transparent; text-align:left; font-size:13px; font-weight:500; }
.table-link:hover { text-decoration:underline; }
.row-action { width:80px; text-align:center; white-space:nowrap; }
.table-frame th.column-action { width:80px; }
.table-frame td .identity { width:max-content; max-width:100%; margin-inline:auto; text-align:left; }
.table-frame .table-link { text-align:center; }
.table-frame .device-stack { justify-items:center; }
.table-frame .device-stack .table-link { text-align:center; }
.table-frame .day-group-link { margin-inline:auto; text-align:center; }
.table-frame .day-thumbnails { justify-content:center; }
.table-frame .row-action .text-button { min-width:52px; }
.table-footer { display:flex; justify-content:space-between; gap:16px; padding:18px 0; color:var(--muted); font-size:12px; }
.table-empty { padding:44px 16px; text-align:center; }
.table-empty h3 { font-size:15px; font-weight:500; }
.table-empty p { margin:7px 0 18px; color:var(--muted); font-size:13px; }
.table-empty .button { margin:auto; }
.upload-ratio { margin-left:8px; color:var(--muted); font-size:11px; }
.media-identity { display:flex; align-items:center; gap:12px; padding:0; border:0; background:transparent; text-align:left; }
.media-identity img,.record-placeholder { width:72px; height:48px; flex-shrink:0; border-radius:4px; object-fit:cover; }
.record-placeholder { display:flex; align-items:center; justify-content:center; background:var(--ground); color:var(--muted); }
.record-placeholder svg { width:18px; height:18px; }
.media-identity strong { font-size:13px; font-weight:500; }
.media-identity:hover strong { text-decoration:underline; }
.media-identity span { min-width:0; }
.summary-toolbar { margin-bottom:22px; }
.summary-rollup { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px; margin:25px 0 5px; padding:0 0 20px; border-bottom:1px solid var(--border); }
.summary-rollup>div { display:flex; align-items:baseline; gap:10px; }
.summary-rollup strong { font-size:26px; font-weight:500; font-variant-numeric:tabular-nums; }
.summary-rollup span { color:var(--muted); font-size:13px; }
.summary-workspace { display:grid; grid-template-columns:222px minmax(0,1fr); gap:30px; align-items:start; }
.summary-roster { position:sticky; top:24px; border-right:1px solid var(--border); padding-right:15px; }
.roster-person { display:flex; align-items:center; gap:8px; min-height:70px; padding:12px 10px; border-radius:8px; margin-bottom:3px; }
.roster-person:hover,.roster-person.selected { background:var(--raised); }
.roster-person.selected { outline:1px solid var(--border); }
.roster-person .identity { flex:1; gap:8px; }
.roster-person .identity small { font-size:11px; }
.roster-person .badge { font-size:11px; padding:1px 5px; }
.summary-content { min-width:0; }
.summary-empty { display:flex; flex-direction:column; align-items:center; padding:48px 24px; border:1px solid var(--border); border-radius:10px; text-align:center; }
.empty-symbol { margin-bottom:20px; color:var(--muted); }
.empty-symbol svg { width:28px; height:28px; stroke-width:1.2; }
.summary-empty h2 { font-size:18px; font-weight:600; }
.summary-empty>p { max-width:420px; margin:10px auto 22px; color:var(--muted); font-size:13px; }
.coverage-facts { width:100%; max-width:440px; text-align:left; margin-top:35px; padding-top:18px; border-top:1px solid var(--border); }
.coverage-facts>div { display:flex; gap:18px; padding:8px 0; }
.coverage-facts dt { width:72px; flex-shrink:0; color:var(--muted); font-size:12px; }
.coverage-facts dd { font-size:12px; }
.report-top { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; }
.report-top h2 { margin-top:8px; font-size:22px; font-weight:600; letter-spacing:-.02em; }
.report-top p { display:flex; flex-wrap:wrap; gap:8px 18px; margin-top:7px; font-size:12px; color:var(--muted); }
.report-top p span { font-size:11px; }
.report-counts { display:grid; grid-template-columns:repeat(3,1fr); margin:25px 0 0; padding:20px 0; border-top:1px solid var(--border); border-bottom:1px solid var(--border); }
.report-counts>div { display:flex; align-items:baseline; gap:10px; }
.report-counts strong { font-size:26px; font-weight:400; line-height:1.2; font-variant-numeric:tabular-nums; }
.report-counts span { font-size:12px; color:var(--muted); }
.coverage-line { display:flex; align-items:center; gap:7px; padding:10px 0; font-size:11px; color:var(--muted); }
.coverage-line>svg { width:14px; height:14px; }
.coverage-line .button { margin-left:auto; border:0; padding-right:0; font-size:11px; }
.report-section { margin-top:26px; }
.report-section>h3 { display:flex; align-items:center; gap:12px; margin-bottom:14px; color:var(--muted); font-size:12px; font-weight:400; }
.report-section>h3 span { color:var(--text); font-size:15px; font-weight:600; }
.report-section>p { line-height:1.9; font-size:13px; }
.report-task-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 22px; }
.report-task { padding:17px 0; border-bottom:1px solid var(--rule); }
.task-title { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.task-title h4 { font-size:14px; font-weight:600; }
.task-title time { font-size:12px; color:var(--muted); }
.report-task>p,.report-event>p { margin-top:9px; font-size:13px; line-height:1.85; color:var(--muted); }
.task-time { display:flex; gap:14px; margin-top:10px; font-size:12px; color:var(--muted); }
.report-task .text-button { font-size:12px; color:var(--muted); }
.reference-links { margin-top:10px; }
.reference-button { display:flex; align-items:center; gap:8px; width:100%; min-height:36px; padding:7px 0; border:0; border-top:1px solid var(--rule); background:transparent; text-align:left; font-size:12px; color:var(--muted); }
.reference-button img { flex-shrink:0; width:42px; height:30px; object-fit:cover; border-radius:3px; }
.reference-button:hover { color:var(--text); }
.reference-button svg { width:13px; height:13px; flex-shrink:0; }
.reference-button>svg:last-child { margin-left:auto; width:11px; height:11px; }
.event-list { display:grid; gap:14px; }
.report-event { padding:16px; background:var(--raised); border-radius:var(--radius-control); }
.report-event>.meta { display:block; margin-top:5px; font-size:11px; }
.report-disclaimer { margin-top:35px; padding-top:14px; border-top:1px solid var(--rule); color:var(--muted); font-size:11px; }
.draft-version { font-size:12px; color:var(--muted); }
.config-workspace { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(260px,1fr); gap:60px; align-items:start; margin-top:30px; }
.config-form { min-width:0; max-width:680px; }
.form-intro { margin-bottom:25px; }
.form-intro h2 { font-size:17px; font-weight:600; }
.form-intro p { color:var(--muted); margin-top:6px; font-size:13px; }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 18px; }
.field { display:flex; flex-direction:column; min-width:0; margin-bottom:21px; }
.field>span { margin-bottom:8px; font-size:13px; font-weight:500; }
.field input,.field select,.field textarea { width:100%; min-height:38px; padding:8px 11px; border:1px solid var(--control); border-radius:var(--radius-control); background:var(--surface); font-size:13px; line-height:1.6; }
.field textarea { resize:vertical; min-height:105px; }
.field input:disabled,.field input[readonly] { color:var(--muted); background:var(--raised); }
.field small { margin-top:6px; font-size:11px; color:var(--muted); line-height:1.6; }
.check-field { display:flex; align-items:flex-start; gap:11px; margin-bottom:22px; cursor:pointer; }
.check-field input { width:16px; height:16px; margin:4px 0 0; flex-shrink:0; accent-color:var(--primary); }
.check-field strong { font-size:13px; font-weight:500; }
.check-field small { display:block; font-size:11px; color:var(--muted); margin-top:4px; }
.form-subtitle { font-size:12px; font-weight:500; color:var(--muted); margin-bottom:16px; }
.form-rule,.dialog-divider { height:1px; background:var(--border); margin:24px 0; }
.form-footer { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-top:28px; padding-top:20px; border-top:1px solid var(--border); }
.form-status { font-size:12px; color:var(--muted); }
.connection-row { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin-bottom:24px; }
.connection-row .meta { font-size:11px; }
.form-error { margin:14px 0; padding:10px 12px; background:var(--negative-bg); color:var(--negative); border-radius:6px; font-size:12px; }
.form-error.is-neutral { background:var(--raised); color:var(--text); }
.policy-preview { min-width:0; padding:20px 0 0 24px; border-left:1px solid var(--border); }
.policy-preview h2 { font-size:16px; font-weight:500; margin-top:7px; }
.policy-preview>p { font-size:12px; color:var(--muted); margin-top:10px; line-height:1.85; }
.policy-flow { margin-top:24px; }
.policy-flow li { display:flex; gap:14px; padding-bottom:23px; }
.policy-flow li>span { position:relative; width:18px; flex-shrink:0; color:var(--muted); font-size:11px; padding-top:2px; }
.policy-flow li strong { display:block; font-weight:500; font-size:13px; }
.policy-flow li small { display:block; margin-top:3px; color:var(--muted); font-size:11px; }
.draft-note { margin-top:24px; padding-top:17px; border-top:1px solid var(--border); color:var(--muted); font-size:11px; }
.example-question,.inline-notice { padding:13px 15px; border-radius:var(--radius-control); background:var(--raised); font-size:12px; color:var(--muted); line-height:1.8; }
.example-question p { margin-top:5px; font-size:13px; color:var(--text); }
.permission-summary { margin-bottom:24px; }
.permission-summary h3 { font-size:14px; font-weight:500; margin-top:18px; }
.permission-summary p { color:var(--muted); font-size:12px; margin-top:5px; }
.permission-matrix { width:100%; overflow:auto; margin:20px 0 28px; }
.permission-matrix table { min-width:680px; }
.permission-matrix th,.permission-matrix td { padding:10px 8px; }
.permission-matrix th:first-child,.permission-matrix td:first-child { padding-left:0; text-align:left; }
.permission-matrix td { font-size:12px; }
.permission-cell { display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; border:1px solid var(--border); border-radius:5px; background:var(--raised); color:var(--muted); font-size:11px; }
.permission-cell.is-on { border-color:#c9d7fb; background:var(--soft); color:var(--accent-ink); }
.account-list { margin-top:28px; border-top:1px solid var(--border); }
.account-row { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) 130px 90px auto; align-items:center; gap:12px; padding:12px 0; border-bottom:1px solid var(--rule); font-size:13px; }
.account-row small { display:block; margin-top:3px; color:var(--muted); font-size:11px; }
.record-scope-note { margin:-4px 0 14px; padding:10px 12px; border:1px solid var(--border);border-radius:6px; background:var(--warning-bg); color:var(--text); font-size:12px; line-height:1.6; }
.access-workspace { display:grid; grid-template-columns:minmax(0,1fr); gap:26px; margin-top:24px; }
.access-panel,.access-accounts { min-width:0; padding:20px 0; border-top:1px solid var(--border); }
.access-role-head { display:flex; justify-content:space-between; align-items:flex-start; gap:18px; margin-bottom:18px; }
.access-role-head h3 { font-size:17px; font-weight:550; }
.access-role-head p { margin-top:5px; color:var(--muted); font-size:12px; }
.access-role-actions { display:flex; flex-wrap:wrap; gap:8px; }
.role-picker { max-width:360px; }
.scope-users-field[hidden] { display:none; }
.role-editor { max-width:900px; }
.role-editor .permission-matrix { margin-top:12px; }
.permission-matrix table { min-width:720px; }
.permission-toggle { display:flex; justify-content:center; align-items:center; min-height:34px; cursor:pointer; }
.permission-toggle input { width:16px; height:16px; accent-color:var(--accent); }
.access-accounts { padding-top:24px; }
.account-row { grid-template-columns:minmax(140px,1fr) minmax(180px,1.4fr) minmax(140px,.8fr) minmax(110px,.7fr) minmax(120px,auto); gap:12px; }
.account-row>* { min-width:0; }
.account-row .field { margin:0; }
.account-row .field>span { font-size:11px; }
.account-row .field input,.account-row .field select { min-height:38px; padding:7px 9px; font-size:12px; }
.account-save { display:flex; flex-direction:column; align-items:flex-end; justify-content:center; gap:5px; }
.account-save small { margin:0; }
.access-boundary { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:14px 0; border-top:1px solid var(--border); color:var(--muted); font-size:12px; }
.access-boundary strong { flex-shrink:0; color:var(--text); font-weight:500; }
.access-boundary p { flex:1; max-width:720px; line-height:1.65; }
.access-boundary a { flex-shrink:0; color:var(--text); }
.access-boundary a:hover { text-decoration:underline; }
.prototype-tools { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top:30px; padding-top:20px; border-top:1px solid var(--border); }
.attempt-history { margin:18px 0; padding:12px; border:1px solid var(--border); border-radius:8px; font-size:12px; }
.attempt-history summary { cursor:pointer; font-weight:500; }
.attempt-history p { margin-top:12px; }
.attempt-history small { display:block; color:var(--muted); margin-top:5px; }
.simple-facts { margin:20px 0; }
.simple-facts>div { display:grid; grid-template-columns:120px minmax(0,1fr); gap:12px; padding:11px 0; border-bottom:1px solid var(--rule); font-size:13px; }
.simple-facts dt { color:var(--muted); font-size:12px; }
.simple-facts dd { overflow-wrap:anywhere; }
dialog { width:min(560px,calc(100vw - 40px)); max-height:calc(100dvh - 60px); padding:0; border:0; border-radius:14px; background:var(--surface); color:var(--text); box-shadow:0 20px 80px rgb(25 28 34 / .16); overflow:hidden; }
dialog[open] { display:flex; flex-direction:column; }
dialog.wide { width:min(1020px,calc(100vw - 48px)); }
dialog::backdrop { background:rgb(25 28 34 / .35); }
.dialog-open { overflow:hidden; }
.menu-open { overflow:hidden; }
.dialog-heading { position:relative; z-index:1; flex-shrink:0; padding:24px 64px 20px 24px; border-bottom:1px solid var(--border); background:var(--surface); }
.dialog-heading>div { min-width:0; overflow-wrap:anywhere; }
.dialog-heading h2 { font-size:18px; font-weight:600; }
.dialog-heading p { margin-top:5px; color:var(--muted); font-size:12px; }
.dialog-heading .icon-button { position:absolute; top:12px; right:12px; width:36px; min-height:36px; margin:0; border:0; color:var(--muted); background:transparent; }
.dialog-heading .icon-button:hover { color:var(--text); background:var(--active); }
.dialog-heading .icon-button svg { width:20px; height:20px; }
.dialog-body { min-height:0; padding:22px 24px 24px; overflow-y:auto; overscroll-behavior:contain; scrollbar-gutter:stable; }
.dialog-body:focus { outline:none; }
.dialog-body:focus-visible { outline:2px solid var(--accent); outline-offset:-3px; }
.dialog-body>.simple-facts:first-child { margin-top:0; }
.dialog-body>.simple-facts:last-child { margin-bottom:0; }
.dialog-body form>.inline-notice { margin-bottom:20px; }
.dialog-actions { display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end; margin-top:24px; }
.detail-state { display:flex; gap:10px; align-items:center; margin-bottom:20px; }
.storage-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:12px 0; font-size:13px; }
.storage-heading strong { font-weight:500; font-variant-numeric:tabular-nums; }
.storage-heading strong span { font-weight:400; color:var(--muted); }
.storage-progress { display:block; appearance:none; width:100%; height:6px; border:0; background:var(--active); border-radius:3px; }
.storage-progress::-webkit-progress-bar { background:var(--active); border-radius:3px; }
.storage-progress::-webkit-progress-value { background:var(--accent); border-radius:3px; }
.storage-progress::-moz-progress-bar { background:var(--accent); border-radius:3px; }
.inline-error { margin:18px 0; padding:12px; color:var(--negative); background:var(--negative-bg); border-radius:6px; font-size:12px; }
.record-detail-grid { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); gap:28px; }
.record-media { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.record-media>video,.record-media>img { width:100%; border-radius:6px; object-fit:contain; background:var(--raised); }
.record-media>video,.record-media>img:first-child { grid-column:1/-1; }
.record-media figcaption { grid-column:1/-1; font-size:11px; color:var(--muted); }
.media-downloads { display:flex; gap:14px; flex-wrap:wrap; margin:10px 0; }
.media-downloads .text-button { font-size:11px; }
.device-stack { display:grid; gap:9px; }
.device-stack .table-link { display:block; text-align:left; }
.device-stack .table-link small { display:block; margin-top:0; }
.day-group-link { display:grid; gap:1px; width:max-content; max-width:100%; }
.day-group-date { margin-bottom:4px; font-size:12px; color:var(--muted); }
.day-group-link strong { font-size:14px; font-weight:550; }
.day-group-link:hover strong { text-decoration:underline; }
.day-group-link small { margin:0; }
.day-thumbnails { display:flex; align-items:center; gap:4px; }
.day-thumbnails img,.day-thumbnails .record-placeholder { width:48px; height:36px; border-radius:4px; object-fit:cover; }
.day-thumbnails .record-placeholder svg { width:16px; height:16px; }
.day-more { padding:0 5px; color:var(--muted); font-size:12px; font-variant-numeric:tabular-nums; }
.record-day-list { margin-top:24px; border-top:1px solid var(--border); }
.record-day-item { display:grid; grid-template-columns:88px minmax(0,1fr); gap:10px 22px; padding:22px 0; border-bottom:1px solid var(--border); }
.record-day-time { grid-row:span 2; position:relative; padding-left:16px; color:var(--text); font-size:15px; }
.record-day-time::before { position:absolute; content:""; top:7px; left:0; width:6px; height:6px; border-radius:50%; background:var(--accent); }
.record-day-time span { display:block; margin-top:4px; font-size:12px; color:var(--muted); }
.record-day-item>.media-identity { width:100%; }
.record-day-item .media-identity>svg { margin-left:auto; width:16px; height:16px; flex-shrink:0; color:var(--muted); }
.record-day-item .media-identity>span:not(.record-placeholder) { flex:1; }
.record-day-item>.media-identity strong { font-size:15px; }
.record-day-item .media-identity strong { display:block; }
.record-day-item .media-identity small { display:block; margin-top:4px; color:var(--muted); font-size:12px; line-height:1.6; }
.record-day-item>p { grid-column:2; max-width:72ch; color:var(--muted); font-size:13px; line-height:1.85; }
.record-day-empty { margin:20px 0; }
.timestamp { display:inline-block; white-space:nowrap; font-size:12px; }
.timestamp small { display:block; margin-top:1px; color:var(--text); font-size:13px; }
.runtime-status { margin-top:26px; max-width:100%; }
.runtime-connection { display:flex; align-items:flex-start; gap:14px; padding:18px 0; border-top:1px solid var(--border); }
.runtime-connection strong { font-size:14px; font-weight:500; }
.runtime-connection p { color:var(--muted); margin-top:3px; font-size:13px; }
.runtime-queue { margin-top:30px; }
.runtime-average { margin-top:14px; font-size:13px; color:var(--muted); }
.conversation-meta { display:flex; flex-wrap:wrap; align-items:center; gap:14px; color:var(--muted); font-size:12px; padding-bottom:16px; border-bottom:1px solid var(--border); }
.conversation-turn { padding:24px 0; border-bottom:1px solid var(--border); }
.conversation-role { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:6px 14px; margin-bottom:8px; font-size:12px; color:var(--muted); }
.conversation-role strong { font-size:13px; font-weight:550; color:var(--text); }
.conversation-question { margin-left:48px; padding:16px 20px; border-radius:10px; background:var(--raised); }
.conversation-answer { max-width:75ch; margin-top:22px; padding-right:20px; }
.conversation-question p,.conversation-answer p { font-size:14px; line-height:1.85; white-space:pre-line; overflow-wrap:anywhere; }
.conversation-references { margin-top:16px; }
.conversation-references>span { display:block; margin-bottom:5px; font-size:12px; color:var(--muted); }
.conversation-references .reference-button { display:flex; width:100%; }
.conversation-references .reference-button>svg { width:15px; height:15px; flex-shrink:0; }
@media(max-width:640px) {
  .day-group-link { gap:2px; }
  .day-thumbnails img,.day-thumbnails .record-placeholder { width:44px; height:34px; }
  .day-more { padding:0 2px; }
  .record-day-item { grid-template-columns:64px minmax(0,1fr); gap:10px 12px; padding:18px 0; }
  .record-day-time { padding-left:12px; font-size:13px; }
  .record-day-item .media-identity { gap:10px; }
  .record-day-item .media-identity img,.record-day-item .record-placeholder { width:60px; height:44px; }
  .record-day-item .media-identity>svg { display:none; }
  .record-day-item>.media-identity strong { font-size:14px; }
  .record-day-item>p { font-size:13px; }
  .conversation-question { margin-left:20px; padding:14px 16px; }
  .conversation-answer { padding:0; }
}
.pending-media { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; min-height:240px; border-radius:8px; background:var(--raised); text-align:center; }
.pending-media svg { width:24px; height:24px; color:var(--muted); }
.pending-media strong { font-size:14px; font-weight:500; }
.pending-media span { font-size:12px; color:var(--muted); }
#toast { position:fixed; z-index:40; right:28px; bottom:25px; max-width:min(440px,calc(100vw - 36px)); padding:12px 18px; border:1px solid var(--control); border-radius:9px; background:var(--surface); box-shadow:0 4px 20px rgb(25 28 34 / .12); font-size:13px; opacity:0; pointer-events:none; transform:translateY(10px); transition:opacity 150ms ease,transform 150ms ease; }
#toast.visible { opacity:1; transform:none; }
@media(min-width:1101px) and (max-width:1300px) { .sheet { padding-right:24px; padding-left:24px; } .overview-grid { gap:24px; grid-template-columns:minmax(0,1.4fr) minmax(290px,1fr); } .config-workspace { gap:32px; } .recent-record { gap:8px; padding:10px; } .recent-record>img,.media-placeholder { width:55px; height:48px; } }
@media(max-width:1100px) {
  .admin-shell { grid-template-columns:minmax(0,1fr); }
  .topbar,.sheet { grid-column:1; }
  .topbar { padding:0 20px; }
  .mobile-menu { display:inline-flex; }
  .sidebar { width:260px; transform:translateX(-100%); visibility:hidden; transition:transform 180ms ease; }
  body.menu-open .sidebar { transform:none; visibility:visible; box-shadow:16px 0 40px rgb(25 28 34 / .12); }
  body.menu-open::after { content:""; position:fixed; inset:0; z-index:7; background:rgb(25 28 34 / .24); }
  .sheet { margin-left:8px; padding:26px 24px 36px; }
  .overview-grid { gap:24px; grid-template-columns:minmax(0,1.4fr) minmax(290px,1fr); }
  .service-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .service-cell:nth-child(2) { border-right:0; }
  .service-cell:nth-child(n+3) { border-top:1px solid var(--rule); }
  .account-row { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .summary-workspace { grid-template-columns:190px minmax(0,1fr); gap:24px; }
  .roster-person { flex-wrap:wrap; }
  .summary-roster { padding-right:12px; }
  .config-workspace { gap:30px; grid-template-columns:minmax(0,1.6fr) minmax(230px,1fr); }
  .policy-preview { padding-left:18px; }
  .recent-record { padding:10px; gap:8px; }
  .recent-record>img,.media-placeholder { width:56px; height:45px; }
  td,th { padding-right:8px; padding-left:8px; }
  .report-top { flex-wrap:wrap; }
  .report-task-list { grid-template-columns:1fr; }
}
@media(min-width:641px) and (max-width:850px) {
  .overview-grid { grid-template-columns:1fr; }
  .overview-attention { grid-row:1; }
  .attention-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
  .runtime-note { margin-bottom:6px; }
  .recent-records { grid-template-columns:1fr; }
  .recent-record>img,.media-placeholder { width:76px; height:50px; }
  .config-workspace { grid-template-columns:minmax(0,1fr); }
  .policy-preview { padding:24px 0 0; border-left:0; border-top:1px solid var(--border); }
  .policy-flow { display:grid; grid-template-columns:repeat(2,1fr); gap:0 20px; }
  .record-detail-grid { gap:22px; grid-template-columns:1fr; }
}
@media(max-width:640px) {
  .topbar { padding:0 16px; }
  .topbar-start { gap:8px; }
  .topbar-start>span:not(.topbar-divider),.topbar-divider,.snapshot { display:none; }
  .sheet { margin:0; padding:22px 18px 32px; border:0; border-radius:0; }
  .page-heading { align-items:flex-start; margin-bottom:20px; }
  h1 { font-size:22px; }
  .page-heading p { font-size:13px; }
  .button,.icon-button,.text-button { min-height:44px; }
  .icon-button { width:44px; }
  .page-heading { flex-wrap:wrap; gap:12px; }
  .page-heading .heading-actions { margin-left:auto; }
  .page-heading:has(.heading-actions) { justify-content:space-between; }
  .page-heading:has(.heading-actions) { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; }
  .page-heading:has(.heading-actions)>div:first-child { display:contents; }
  .page-heading:has(.heading-actions) h1 { grid-column:1; grid-row:1; align-self:center; }
  .page-heading:has(.heading-actions) p { grid-column:1/-1; grid-row:2; margin-top:0; }
  .page-heading:has(.heading-actions) .heading-actions { grid-column:2; grid-row:1; margin:0; }
  .section-heading { margin-bottom:12px; }
  .section-heading .button { min-height:44px; }
  .scope-row { font-size:12px; flex-wrap:wrap; gap:3px; }
  .pipeline { grid-template-columns:repeat(2,minmax(0,1fr)); margin-bottom:26px; }
  .pipeline-stage { padding:13px 16px; border-bottom:1px solid var(--border); }
  .pipeline-stage:nth-child(even) { border-right:0; }
  .pipeline-stage:last-child { grid-column:1/-1; display:flex; align-items:center; justify-content:space-between; }
  .pipeline-stage:last-child strong { margin:0; }
  .pipeline-stage strong { font-size:26px; }
  .overview-grid { grid-template-columns:1fr; gap:26px; }
  .overview-attention { grid-row:1; }
  .overview-attention .section-heading p { display:none; }
  .attention-item { padding:12px 0; }
  .attention-item .meta { display:none; }
  .attention-item .text-button { margin-top:0; }
  .runtime-note { display:none; }
  .person-day-row { min-height:74px; }
  .day-row-state { max-width:160px; }
  .day-row-state>span:last-child:not(.badge) { font-size:12px; }
  .recent-records { grid-template-columns:1fr; gap:10px; }
  .recent-record { padding:12px; }
  .recent-record>img,.media-placeholder { width:76px; height:53px; }
  .recent-record small { font-size:12px; }
  .tabs { gap:24px; }
  .tabs>button,.tabs>a { min-height:48px; font-size:14px; }
  .tabs>button span { font-size:12px; }
  .toolbar { margin-top:18px; gap:10px; }
  .toolbar .search-form { min-width:100%; max-width:none; }
  .toolbar .filter-select { flex:1 1 120px; }
  .search-field input { min-height:42px; font-size:14px; }
  .filter-select { flex:1; min-width:0; }
  .filter-select input,.filter-select select { min-height:44px; width:100%; font-size:13px; }
  .toolbar-count { flex:0 0 100%; margin-left:0; font-size:12px; }
  .service-grid { grid-template-columns:1fr; }
  .service-cell,.service-cell:not(:first-child) { min-height:0; padding:14px 0; border-right:0; border-top:1px solid var(--rule); }
  .service-cell:first-child { border-top:0; }
  .service-cell p { min-height:0; }
  .access-role-head { flex-direction:column; }
  .access-role-actions { width:100%; }
  .access-role-actions .button { flex:1; }
  .account-row { grid-template-columns:1fr 1fr; padding:16px 0; }
  .account-row .field:nth-child(1),.account-row .field:nth-child(2) { grid-column:1/-1; }
  .account-save { align-items:flex-start; }
  .access-boundary { align-items:flex-start; flex-direction:column; gap:8px; }
  .state-filters button { min-height:44px; font-size:13px; }
  .state-filters button span { font-size:12px; }
  table,tbody { display:block; }
  thead { display:none; }
  tbody tr { display:grid; position:relative; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 16px; padding:17px 0; border-bottom:1px solid var(--border); }
  td,td:first-child,td:last-child { display:block; min-width:0; padding:0; border:0; font-size:13px; text-align:left; }
  .table-frame td .identity { width:auto; margin-inline:0; }
  .table-frame .table-link { text-align:left; }
  .table-frame .device-stack { justify-items:start; }
  .table-frame .device-stack .table-link { text-align:left; }
  .table-frame .day-group-link { margin-inline:0; text-align:left; }
  .table-frame .day-thumbnails { justify-content:flex-start; }
  td:first-child { grid-column:1/-1; margin-bottom:3px; padding-right:40px; }
  td:not(:first-child):not(.row-action)::before { display:block; content:attr(data-label); margin-bottom:3px; color:var(--muted); font-size:12px; }
  td.num { text-align:left; }
  td small { font-size:12px; }
  td.row-action { position:absolute; top:14px; right:0; width:auto; }
  td.row-action .text-button { font-size:12px; }
  td:has(.table-empty) { grid-column:1/-1; padding-right:0; }
  .media-identity strong,.table-link,.identity strong { font-size:14px; }
  .identity small { font-size:12px; }
  .badge { font-size:12px; }
  .table-footer { flex-wrap:wrap; gap:5px; }
  .table-footer>span:last-child { font-size:11px; }
  .summary-toolbar { margin-bottom:18px; }
  .summary-rollup { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 18px; }
  .summary-rollup strong { font-size:22px; }
  .summary-toolbar>.meta { display:none; }
  .summary-workspace { grid-template-columns:1fr; gap:24px; }
  .summary-roster { position:static; display:flex; gap:8px; width:100%; overflow-x:auto; border:0; border-bottom:1px solid var(--border); padding:0 0 14px; }
  .roster-person { flex-direction:column; flex-shrink:0; align-items:flex-start; width:132px; min-height:98px; padding:12px; margin:0; gap:8px; }
  .roster-person.selected { outline:0; background:var(--active); }
  .roster-person .avatar { display:none; }
  .roster-person .identity small,.roster-person .badge { font-size:12px; }
  .report-top h2 { font-size:20px; }
  .report-top p span { font-size:12px; }
  .report-counts>div { align-items:flex-start; flex-direction:column; gap:6px; }
  .report-counts { padding:18px 0; }
  .coverage-line { flex-wrap:wrap; font-size:12px; }
  .coverage-line .button { font-size:12px; }
  .report-task-list { grid-template-columns:1fr; }
  .report-task>p,.report-event>p { font-size:13px; }
  .task-time,.report-task .text-button,.reference-button { font-size:12px; }
  .reference-button { min-height:44px; }
  .report-section>p { font-size:14px; }
  .report-event>.meta { font-size:12px; }
  .summary-empty { padding:35px 16px; }
  .summary-empty>p { font-size:14px; }
  .coverage-facts dt,.coverage-facts dd { font-size:13px; }
  .config-workspace { grid-template-columns:1fr; gap:32px; margin-top:25px; }
  .form-grid { gap:0 14px; }
  .field>span { font-size:14px; }
  .field input,.field select,.field textarea { min-height:44px; font-size:14px; }
  .field small,.check-field small { font-size:12px; }
  .check-field { min-height:44px; }
  .check-field strong { font-size:14px; }
  .policy-preview { padding:24px 0 0; border:0; border-top:1px solid var(--border); }
  .policy-preview>p,.policy-flow li small,.draft-note { font-size:12px; }
  .simple-facts>div { grid-template-columns:96px minmax(0,1fr); }
  .simple-facts dt { font-size:13px; }
  dialog,dialog.wide { width:calc(100vw - 20px); max-height:calc(100dvh - 32px); border-radius:12px; }
  .dialog-heading { padding:20px 66px 18px 20px; }
  .dialog-heading .icon-button { top:8px; right:8px; width:44px; min-height:44px; }
  .dialog-body { padding:18px; }
  .record-detail-grid { grid-template-columns:1fr; gap:24px; }
  .record-detail-grid .form-grid { grid-template-columns:1fr; }
  .dialog-actions .button { flex:1; }
  .permission-matrix table { display:table; table-layout:fixed; }
  .permission-matrix thead { display:table-header-group; }
  .permission-matrix tbody { display:table-row-group; }
  .permission-matrix tbody tr { display:table-row; padding:0; }
  .permission-matrix th,.permission-matrix td,.permission-matrix td:first-child,.permission-matrix td:last-child { display:table-cell; padding:10px 8px; font-size:12px; text-align:center; }
  .permission-matrix th:first-child,.permission-matrix td:first-child { padding-left:0; text-align:left; }
  .permission-matrix td::before { display:none!important; }
  .media-downloads { gap:12px; }
  .media-downloads .text-button { font-size:12px; }
  #toast { right:18px; bottom:18px; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important; transition:none!important; } }
.auth-screen { min-height:100dvh; display:grid; place-items:center; padding:24px; }
.auth-entry { width:min(100%,420px); padding:36px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); }
.auth-brand { display:flex; align-items:baseline; gap:10px; margin-bottom:36px; color:var(--accent-ink); font-size:19px; font-weight:600; }
.auth-brand span { color:var(--muted); font-size:13px; font-weight:400; }
.auth-entry h1 { font-size:24px; }
.auth-entry>p { margin:8px 0 28px; color:var(--muted); }
.auth-entry .button { width:100%; min-height:44px; margin-top:12px; }
.auth-entry .form-error { margin:12px 0; }
.auth-entry { width:min(100%,460px); padding:38px; }
.auth-brand img { flex:none; }
.auth-tabs { display:flex; gap:22px; border-bottom:1px solid var(--border); margin-bottom:26px; }
.auth-tabs button { min-height:44px; padding:8px 0 12px; border:0; border-bottom:2px solid transparent; background:none; color:var(--muted); font-size:13px; }
.auth-tabs button[aria-pressed="true"] { border-color:var(--text); color:var(--text); font-weight:600; }
.auth-tabs button:hover { color:var(--text); }
.auth-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:14px; }
.auth-footer span,.auth-recovery { color:var(--muted); font-size:12px; }
.auth-entry .auth-recovery { margin:24px 0 0; padding-top:20px; border-top:1px solid var(--border); line-height:1.8; }
.otp-field { position:relative; }
.otp-field .field input { padding-right:138px; }
.otp-field>.text-button { position:absolute; right:12px; bottom:3px; min-height:38px; color:var(--accent-ink); font-size:12px; }
.otp-field>.text-button:disabled { color:var(--muted); background:transparent; }
.field-help { color:var(--muted); font-size:12px; line-height:1.8; margin:8px 0 18px; }
.accounts-toolbar { justify-content:flex-start; flex-wrap:wrap; gap:10px; }
.accounts-toolbar .search-form { margin-right:auto; }
.login-access { display:flex; justify-content:center; gap:6px; }
.account-warning { color:var(--warning); }
.account-fieldset { min-width:0; border:0; padding:0; margin:0; }
.account-fieldset:disabled { opacity:1; }
.account-section { padding-top:24px; margin-top:24px; border-top:1px solid var(--border); }
.account-section>h3 { font-size:14px; font-weight:600; margin-bottom:12px; }
.login-switches { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin:8px 0 0; }
.login-switches .check-field { align-items:flex-start; margin:0; padding:12px 0; }
.login-switches .check-field input { margin-top:4px; }
.account-fieldset input[type="checkbox"],.permission-tree input { width:16px; height:16px; flex:none; accent-color:var(--accent); }
.scope-people { min-width:0; border:1px solid var(--border); border-radius:8px; padding:12px; margin:8px 0 18px; display:grid; grid-template-columns:1fr 1fr; gap:4px 12px; max-height:240px; overflow-y:auto; }
.scope-people legend { padding:0 6px; color:var(--muted); font-size:12px; }
.scope-people label { display:flex; align-items:center; gap:10px; min-height:44px; cursor:pointer; }
.scope-people small { display:block; color:var(--muted); }
.role-workspace { display:grid; grid-template-columns:240px minmax(0,1fr); gap:30px; border-top:1px solid var(--border); padding-top:24px; }
.role-ledger { min-width:0; align-self:start; padding:0 20px 24px 0; border-right:1px solid var(--border); }
.role-ledger-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:0 10px 18px; font-size:13px; font-weight:600; }
.role-ledger-heading span { font-size:12px; color:var(--muted); font-weight:400; }
.role-branch { margin-top:8px; }
.role-branch>summary { display:list-item; min-height:40px; padding:7px 0 7px 12px; color:var(--muted); cursor:pointer; font-size:13px; }
.role-branch>summary a { display:inline-block; padding:2px 6px; border-radius:4px; }
.role-branch>div { padding-left:14px; }
.role-leaf { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:44px; padding:8px 10px; margin:3px 0; border-radius:8px; font-size:13px; }
.role-leaf small { color:var(--muted); flex:none; }
.role-leaf:hover,.role-branch>summary a:hover { background:var(--raised); }
.role-leaf[aria-current="true"],.role-branch>summary a[aria-current="true"] { background:var(--soft); color:var(--accent-ink); font-weight:600; }
.role-detail { min-width:0; max-width:1000px; }
.role-detail .section-heading h2 { font-size:18px; }
.role-detail .section-heading p { margin-top:5px; font-size:12px; color:var(--muted); }
.permission-tree { display:grid; grid-template-columns:1fr 1fr; gap:24px; margin-top:18px; }
.permission-client { min-width:0; border:1px solid var(--border); border-radius:8px; padding:8px 16px 12px; }
.permission-client legend { padding:0 6px; font-size:14px; }
.permission-client legend label { display:flex; align-items:center; gap:10px; min-height:32px; cursor:pointer; }
.permission-module { border-bottom:1px solid var(--border); }
.permission-module:last-child { border-bottom:0; }
.permission-module summary { display:list-item; padding:10px 0; cursor:pointer; font-size:13px; }
.permission-module summary label { display:inline-flex; align-items:center; gap:9px; min-height:28px; cursor:pointer; }
.permission-actions { display:flex; flex-wrap:wrap; gap:2px 14px; padding:0 0 12px 22px; }
.permission-actions label { display:flex; align-items:center; gap:7px; min-height:34px; font-size:12px; cursor:pointer; }
.role-detail .dialog-actions { justify-content:flex-start; margin-bottom:12px; }
.import-intro { display:flex; align-items:center; gap:18px; flex-wrap:wrap; margin-bottom:22px; }
.import-intro p { color:var(--muted); font-size:12px; }
#import-result .table-frame { max-height:360px; overflow:auto; margin-top:16px; }
#import-result th { position:sticky; top:0; background:var(--surface); }
#import-result .account-section>h3 { font-size:16px; }
.security-workspace { max-width:800px; }
.security-workspace h2 { font-size:16px; font-weight:600; }
.security-workspace .simple-facts { margin:20px 0; }
.security-workspace>.field-help { margin-top:28px; }
.session-row { display:flex; justify-content:space-between; gap:16px; padding:14px 0; border-bottom:1px solid var(--rule); }
.session-row time { font-size:12px; color:var(--muted); }
.security-notice { font-size:13px; padding:14px 0; border-bottom:1px solid var(--rule); }
.security-notice small { display:block; margin-top:4px; color:var(--muted); }
.security-loading { color:var(--muted); padding:24px 0; }
@media (max-width:1250px) {
  .role-workspace { grid-template-columns:200px minmax(0,1fr); gap:22px; }
  .permission-tree { grid-template-columns:1fr; gap:20px; }
}
@media (max-width:700px) {
  .auth-screen { padding:16px; background:var(--surface); }
  .auth-entry { padding:28px 12px; border:0; }
  .auth-brand { margin-bottom:32px; }
  .auth-tabs { gap:20px; }
  .auth-tabs button { font-size:13px; }
  .auth-footer { align-items:flex-start; }
  .accounts-toolbar .search-form { flex-basis:100%; }
  .accounts-toolbar .filter-select { flex:1; min-width:120px; }
  .role-workspace { grid-template-columns:minmax(0,1fr); gap:24px; }
  .role-ledger { border-right:0; border-bottom:1px solid var(--border); padding:0 0 18px; max-height:300px; overflow:auto; }
  .role-ledger-heading { padding-left:0; }
  .role-workspace .permission-tree { grid-template-columns:1fr; }
  .role-detail .section-heading { align-items:flex-start; }
  .login-switches,.scope-people { grid-template-columns:1fr; }
  .login-switches { gap:0; }
  .session-row { flex-direction:column; gap:4px; }
}
