:root{--navy:#101d35;--navy2:#172743;--ink:#17243a;--muted:#738096;--line:#e6ebf2;--canvas:#f5f7fb;--white:#fff;--blue:#2868e8;--blue2:#e9f0ff;--green:#17845b;--green-bg:#e6f6ee;--amber:#a76509;--amber-bg:#fff4df;--red:#b93543;--red-bg:#fff0f1;--shadow:0 18px 50px rgba(18,38,73,.08)}*{box-sizing:border-box}body{margin:0;background:var(--canvas);color:var(--ink);font-family:'DM Sans',sans-serif;font-size:14px}button,input,select,textarea{font:inherit}button{cursor:pointer}h1,h2,h3,p{margin-top:0}h1,h2,h3,.brand-name{font-family:Manrope,'DM Sans',sans-serif;letter-spacing:-.025em}h1{font-size:29px;line-height:1.2;margin-bottom:10px}h2{font-size:21px;line-height:1.2;margin:0}h3{font-size:15px;margin-bottom:7px}.muted{color:var(--muted);line-height:1.55}.tiny{font-size:11px}.eyebrow{font-size:10px;font-weight:800;letter-spacing:.16em;color:#6480a9;margin-bottom:8px}.brand-mark{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:linear-gradient(135deg,#ff6b54,#ef3e4e);color:white;font-family:Manrope,sans-serif;font-weight:800;font-size:16px;box-shadow:0 7px 18px rgba(235,76,82,.25)}.brand-name{font-weight:800;font-size:18px;color:white}.brand-sub{font-weight:700;font-size:9px;letter-spacing:.18em;color:#8d9db8;margin-top:3px}.auth-shell{min-height:100vh;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:32px 18px;background:radial-gradient(ellipse at 20% 10%,#e5edff 0,transparent 40%),radial-gradient(ellipse at 90% 80%,#ffebe8 0,transparent 32%),#f6f8fc}.auth-brand{display:flex;align-items:center;gap:12px;margin-bottom:26px}.auth-brand .brand-name{color:var(--navy)}.auth-brand .brand-sub{color:#6d7d95}.auth-card{width:min(100%,470px);padding:34px;border:1px solid rgba(213,222,237,.9);border-radius:22px;background:rgba(255,255,255,.92);box-shadow:var(--shadow)}.auth-card h1{font-size:27px}.form-stack{display:grid;gap:17px;margin-top:26px}.form-stack label,.form-grid label{display:flex;flex-direction:column;gap:8px;font-size:12px;font-weight:700;color:#47566d}.form-stack input,.form-grid input,.form-grid select,.form-grid textarea,.option-edit input{width:100%;min-width:0;border:1px solid #dbe2ed;background:#fff;border-radius:9px;padding:11px 12px;color:var(--ink);outline:none;transition:border .15s,box-shadow .15s}.form-stack input:focus,.form-grid input:focus,.form-grid select:focus,.form-grid textarea:focus,.option-edit input:focus{border-color:#7198ef;box-shadow:0 0 0 3px rgba(40,104,232,.1)}input::placeholder,textarea::placeholder{color:#a6b0c0;font-weight:400}.form-grid small{font-size:10px;font-weight:400;color:var(--muted);line-height:1.4}.btn{border:0;border-radius:9px;padding:11px 15px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:10px;transition:transform .12s,filter .12s;white-space:nowrap}.btn:hover{filter:brightness(.98);transform:translateY(-1px)}.btn.primary{background:var(--blue);color:white;box-shadow:0 6px 14px rgba(40,104,232,.15)}.btn.secondary{background:#eff2f7;color:#33435a}.btn.subtle{background:transparent;border:1px solid var(--line);color:#455570}.btn.small{padding:8px 11px;font-size:12px}.btn.full{width:100%}.inline-message{margin-top:16px;border-radius:9px;padding:12px;background:var(--red-bg);color:var(--red);font-size:12px;line-height:1.5}.inline-message.success{background:var(--green-bg);color:var(--green)}.auth-foot{display:flex;align-items:center;gap:9px;color:#7d899b;font-size:10px;margin-top:25px;padding-top:18px;border-top:1px solid var(--line)}.auth-note{color:#8995a8;font-size:11px;margin-top:20px;text-align:center}.secure-dot{width:7px;height:7px;display:inline-block;flex:0 0 auto;border-radius:100%;background:#27b17a;box-shadow:0 0 0 3px rgba(39,177,122,.12)}.denied-icon{width:43px;height:43px;display:grid;place-items:center;border-radius:14px;background:var(--amber-bg);color:var(--amber);font-size:22px;font-weight:800;margin-bottom:19px}.info-panel{font-size:12px;line-height:1.6;padding:14px 15px;border-radius:10px;border:1px solid #f3dfb8;background:#fff9eb;margin:21px 0}.app-shell{min-height:100vh;display:flex}.sidebar{width:248px;flex:0 0 248px;min-height:100vh;background:var(--navy);color:white;display:flex;flex-direction:column;padding:24px 14px 14px;position:fixed;inset:0 auto 0 0;z-index:30}.sidebar-brand{display:flex;align-items:center;gap:10px;padding:0 10px 36px}.workspace-label{padding:0 12px 10px;color:#6d809f;font-size:9px;font-weight:800;letter-spacing:.16em}.nav-list{display:grid;gap:5px}.nav-item{width:100%;display:flex;align-items:center;gap:12px;padding:12px 13px;border:0;border-radius:9px;background:transparent;color:#9cabc2;font-size:12px;font-weight:600;text-align:left}.nav-item:hover{background:#1a2a48;color:white}.nav-item.active{background:#243b62;color:white;box-shadow:inset 3px 0 #5a8eff}.nav-icon{font-size:17px;width:20px;text-align:center;color:#aab9d1}.nav-item.active .nav-icon{color:#8fb2ff}.nav-count{margin-left:auto;min-width:22px;padding:3px 6px;border-radius:6px;background:#2a3b58;text-align:center;font-size:10px;color:#c6d5ee}.nav-count.warn{color:#ffc978;background:#4b3b29}.sidebar-bottom{margin-top:auto}.sidebar-status{display:flex;align-items:center;gap:10px;border:1px solid #293956;background:#152440;border-radius:10px;padding:12px;margin:0 2px 14px}.sidebar-status strong,.sidebar-status small{display:block}.sidebar-status strong{font-size:11px}.sidebar-status small{font-size:9px;color:#8292ac;margin-top:3px}.sidebar-user{display:flex;align-items:center;gap:9px;border-top:1px solid #2a3953;padding:16px 5px 5px}.avatar{display:grid;place-items:center;width:34px;height:34px;flex:0 0 auto;border-radius:10px;background:#e3ebff;color:#3159a1;font-weight:800;font-family:Manrope,sans-serif}.avatar.small-avatar{width:31px;height:31px;border-radius:50%}.user-copy{min-width:0;flex:1}.user-copy strong,.user-copy small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:140px}.user-copy strong{font-size:11px}.user-copy small{color:#8292ac;font-size:9px;margin-top:4px}.icon-btn{display:grid;place-items:center;width:32px;height:32px;border:0;border-radius:8px;background:transparent;color:inherit;font-size:18px}.icon-btn:hover{background:rgba(140,160,190,.13)}.main-area{min-width:0;flex:1;margin-left:248px}.topbar{height:69px;background:rgba(255,255,255,.9);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 34px;position:sticky;top:0;z-index:20;backdrop-filter:blur(12px)}.breadcrumb{display:flex;gap:11px;align-items:center;color:#8793a5;font-size:12px}.breadcrumb strong{color:#243651;font-weight:700}.crumb-slash{color:#c3cbd7}.topbar-right{display:flex;align-items:center;gap:17px}.live-indicator{display:flex;align-items:center;gap:8px;font-size:11px;color:#6d7b90}.page-wrap{max-width:1500px;margin:0 auto;padding:30px 34px 18px}.page-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:25px}.page-heading h1{font-size:25px;margin-bottom:7px}.page-heading p{margin:0;color:var(--muted);font-size:12px}.heading-actions{display:flex;gap:9px;align-items:center}.section-label{color:#7a879b;font-weight:800;letter-spacing:.1em;font-size:10px;text-transform:uppercase}.metrics-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin-bottom:24px}.metric-card{background:white;border:1px solid var(--line);border-radius:13px;padding:18px 19px;min-height:124px;box-shadow:0 2px 8px rgba(26,47,81,.02)}.metric-top{display:flex;align-items:center;justify-content:space-between;color:#7e899a;font-size:11px;font-weight:600}.metric-icon{width:32px;height:32px;display:grid;place-items:center;border-radius:9px;background:#eef3ff;color:#376ce0;font-size:16px}.metric-value{font-family:Manrope,sans-serif;font-size:29px;font-weight:800;letter-spacing:-.04em;margin:13px 0 3px;color:#192943}.metric-foot{font-size:10px;color:#8b96a8}.content-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(280px,1fr);gap:17px}.panel{background:white;border:1px solid var(--line);border-radius:13px;overflow:hidden;min-width:0}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 20px;border-bottom:1px solid #edf0f5}.panel-head h2{font-size:14px}.panel-head p{margin:5px 0 0;font-size:10px;color:var(--muted)}.panel-body{padding:18px 20px}.activity-list{display:grid}.activity-row{display:flex;align-items:center;gap:12px;padding:13px 0;border-bottom:1px solid #f0f3f7}.activity-row:last-child{border-bottom:0}.activity-dot{width:9px;height:9px;border-radius:3px;background:#5181ed}.activity-copy{min-width:0;flex:1}.activity-copy strong{font-size:11px;display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.activity-copy span{display:block;font-size:10px;color:var(--muted);margin-top:4px}.activity-value{font-weight:800;font-size:12px}.quick-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.quick-action{display:flex;flex-direction:column;align-items:flex-start;gap:11px;padding:15px;border:1px solid var(--line);background:white;border-radius:10px;color:var(--ink);text-align:left}.quick-action:hover{border-color:#a8c0f4;background:#f9fbff}.quick-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:var(--blue2);color:#2c63d3;font-size:18px}.quick-action strong{font-size:11px}.quick-action small{font-size:10px;color:var(--muted);line-height:1.4}.table-panel{margin-bottom:18px}.table-tools{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:14px 18px;border-bottom:1px solid var(--line)}.search-input,.filter-select{border:1px solid #dce3ed;background:white;border-radius:8px;padding:9px 11px;font-size:11px;color:#33445d;outline:none}.search-input{min-width:210px;flex:1}.filter-select{min-width:145px}.table-scroller{width:100%;overflow:auto}table{border-collapse:collapse;width:100%;min-width:700px;text-align:left}th{background:#fafbfe;color:#8490a2;font-size:9px;text-transform:uppercase;letter-spacing:.1em;padding:12px 16px;font-weight:800;white-space:nowrap}td{border-top:1px solid #eff2f7;padding:13px 16px;font-size:11px;color:#46556d;vertical-align:middle}td strong{color:#1f2e47;font-size:11px;display:block;font-weight:700}td small{display:block;color:#8b97a8;font-size:10px;margin-top:4px;line-height:1.4}.status-pill{display:inline-flex;align-items:center;gap:5px;padding:5px 8px;border-radius:6px;font-size:9px;font-weight:800;text-transform:capitalize}.status-pill:before{content:'';width:5px;height:5px;border-radius:50%;background:currentColor}.status-published,.status-scored,.status-resolved{background:var(--green-bg);color:var(--green)}.status-draft,.status-in_progress,.status-open{background:var(--amber-bg);color:var(--amber)}.status-archived,.status-expired,.status-rejected{background:#eef1f6;color:#68778e}.status-triaged,.status-submitted{background:var(--blue2);color:#3e69bc}.row-actions{display:flex;gap:6px;align-items:center}.link-button{border:0;background:none;color:var(--blue);font-weight:700;font-size:10px;padding:5px 6px}.link-button.danger{color:var(--red)}.empty-state{padding:35px 18px;text-align:center;color:var(--muted);font-size:12px}.table-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid var(--line);padding:12px 17px;font-size:10px;color:var(--muted)}.pagination{display:flex;gap:7px}.pagination button{border:1px solid var(--line);background:#fff;border-radius:7px;padding:6px 10px;color:#475770}.pagination button:disabled{opacity:.4;cursor:not-allowed}.page-footer{display:flex;justify-content:space-between;gap:12px;padding:23px 0 0;color:#97a1b0;font-size:10px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px;padding:22px 24px}.span-2{grid-column:span 2}.modal{border:0;padding:0;width:min(720px,calc(100% - 28px));max-height:90vh;border-radius:16px;box-shadow:0 25px 90px rgba(13,28,52,.28);overflow:auto}.modal::backdrop{background:rgba(12,26,49,.5);backdrop-filter:blur(4px)}.wide-modal{width:min(870px,calc(100% - 28px))}.modal form{margin:0}.modal-head{padding:21px 24px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:15px}.modal-head h2{font-size:20px}.modal-head .icon-btn{color:#66758c;font-size:24px}.modal-actions{display:flex;align-items:center;justify-content:flex-end;gap:9px;padding:16px 24px;border-top:1px solid var(--line);background:#fbfcfe;position:sticky;bottom:0}.form-error{flex:1;color:var(--red);font-size:11px}.options-editor{border:1px solid var(--line);border-radius:11px;padding:14px}.options-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.options-head strong{font-size:12px}.option-edit{display:grid;grid-template-columns:27px 1fr;gap:9px;align-items:start;margin-top:9px}.option-edit>span{display:grid;place-items:center;background:#edf2ff;color:#3b67c4;border-radius:7px;width:27px;height:31px;font-size:11px;font-weight:800}.option-edit>div{display:grid;grid-template-columns:1fr 1fr;gap:8px}.option-edit input{padding:9px;font-size:11px}.toast{max-width:440px;margin:10px 16px 0 auto;padding:12px 15px;border-radius:10px;background:#182840;color:white;box-shadow:var(--shadow);font-size:12px;line-height:1.5;animation:fadein .18s}.toast.error{background:#8e2736}.toast.success{background:#136c4a}@keyframes fadein{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}.loading{display:flex;align-items:center;gap:10px;padding:40px 18px;color:var(--muted);font-size:12px}.spinner{width:17px;height:17px;border:2px solid #dce5f7;border-top-color:#316de6;border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.mobile-menu{display:none;color:#52617a}.pill-tabs{display:flex;gap:5px;padding:4px;background:#eef2f8;border-radius:9px}.pill-tabs button{border:0;border-radius:7px;background:transparent;padding:7px 10px;font-size:10px;color:#66758b}.pill-tabs button.active{background:white;color:#1e2f4b;box-shadow:0 1px 4px rgba(28,44,73,.09)}.empty-chart{display:grid;place-items:center;height:190px;border-radius:10px;background:linear-gradient(135deg,#f7f9fd,#fff);border:1px dashed #dce4f0;color:#8b97a8;font-size:11px;text-align:center;padding:20px}.kbd{padding:2px 6px;border:1px solid #e0e5ed;border-radius:5px;font-size:10px;color:#8994a6}.badge-blue{background:var(--blue2);color:#3a66bd;border-radius:6px;padding:5px 8px;font-size:9px;font-weight:800}.alert-strip{display:flex;align-items:flex-start;gap:10px;padding:13px 15px;border:1px solid #f4dfb8;background:#fff9ed;color:#835514;border-radius:10px;font-size:11px;line-height:1.5;margin-bottom:18px}.alert-strip strong{display:block;margin-bottom:2px}.two-column{display:grid;grid-template-columns:1fr 1fr;gap:14px}.detail-block{padding:14px;border:1px solid var(--line);border-radius:10px}.detail-block label{font-size:10px;color:var(--muted)}.detail-block strong{display:block;font-size:17px;margin-top:6px}
@media(max-width:1120px){.metrics-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.content-grid{grid-template-columns:1fr}.sidebar{width:220px;flex-basis:220px}.main-area{margin-left:220px}.page-wrap{padding:26px 23px}.topbar{padding:0 23px}}
@media(max-width:760px){.sidebar{transform:translateX(-100%);transition:transform .2s;width:250px;box-shadow:var(--shadow)}.sidebar.open{transform:translateX(0)}.main-area{margin-left:0}.mobile-menu{display:grid}.topbar{height:60px;padding:0 14px}.topbar-right{gap:9px}.live-indicator{display:none}.page-wrap{padding:22px 14px}.page-heading{flex-direction:column;align-items:stretch}.heading-actions{justify-content:flex-start}.metrics-grid{gap:9px}.metric-card{padding:14px;min-height:110px}.metric-value{font-size:25px}.metric-top{font-size:10px}.metric-foot{font-size:9px}.page-heading h1{font-size:23px}.page-footer{flex-direction:column;gap:6px}.form-grid{grid-template-columns:1fr;padding:16px}.span-2{grid-column:span 1}.modal-head{padding:17px 16px}.modal-actions{padding:13px 16px}.form-error{font-size:10px}.option-edit>div{grid-template-columns:1fr}.auth-card{padding:25px 20px}.breadcrumb{gap:6px}.breadcrumb span:first-child{display:none}.crumb-slash{display:none}.topbar-right .btn{padding:7px 8px}.user-copy strong{max-width:105px}}
@media(max-width:430px){.metrics-grid{grid-template-columns:1fr 1fr}.metric-icon{width:28px;height:28px}.quick-grid{grid-template-columns:1fr 1fr}.table-tools{padding:12px}.search-input{min-width:100%}.filter-select{flex:1}.heading-actions>.btn{flex:1}.auth-card h1{font-size:23px}.topbar-right .small-avatar{display:none}}


/* OpenRail brand pass — official wordmarks, restrained railway-red accent */
[hidden]{display:none!important}
.brand-wordmark{display:block;object-fit:contain;height:auto;max-width:100%}
.brand-wordmark-light{width:min(260px,76vw)}
.brand-wordmark-dark{width:188px;max-height:48px}
.auth-brand{display:flex;flex-direction:column;align-items:center;gap:9px;margin-bottom:27px}
.auth-brand .brand-context{display:block;color:#6d7d95;font-size:9px;font-weight:800;letter-spacing:.22em;text-transform:uppercase}
.sidebar-brand{display:flex;align-items:center;min-height:58px;padding:0 8px 30px}
.sidebar-brand .brand-wordmark-dark{width:190px}
@media(max-width:760px){.brand-wordmark-light{width:min(240px,76vw)}.sidebar-brand .brand-wordmark-dark{width:190px}}

/* OpenRail Admin Console — improved content management workspace */
:root{--rail-red:#ed4f52;--rail-red-dark:#c93d43;--rail-red-soft:#fff0f0;--qa-blue:#edf3ff}
.nav-group-label{padding-top:22px;border-top:1px solid #2a3953;margin:10px 6px 2px}
.nav-item[data-admin-only][hidden]{display:none!important}
.nav-item{transition:background .16s,color .16s,transform .16s}
.nav-item:hover{transform:translateX(2px)}
.btn.primary{background:linear-gradient(135deg,#f35c5e,#d93e49);box-shadow:0 6px 15px rgba(217,62,73,.16)}
.btn.primary:hover{filter:brightness(.98);box-shadow:0 8px 18px rgba(217,62,73,.21)}
.question-summary-strip{display:grid;grid-template-columns:minmax(220px,2fr) repeat(2,minmax(150px,1fr));gap:12px;margin:-4px 0 18px}
.question-summary-strip>div{min-width:0;padding:15px 17px;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 2px 8px rgba(26,47,81,.025)}
.question-summary-strip strong,.question-summary-strip small{display:block;overflow-wrap:anywhere}
.question-summary-strip strong{font-size:12px;color:#20314c;margin:5px 0}
.question-summary-strip small{font-size:10px;color:var(--muted)}
.metric-mini-label{font-size:9px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:#8291a7}
.question-filter-tools{background:#fbfcff}
.section-search{min-width:140px;max-width:180px}
.heading-actions{flex-wrap:wrap;justify-content:flex-end}
.heading-actions .btn{font-size:11px;padding:10px 12px}
.q-content-cell{max-width:400px;min-width:280px}
.question-preview{display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;white-space:normal;line-height:1.45}
.row-flags{display:flex;gap:5px;flex-wrap:wrap;margin-top:7px}
.quality-flag{display:inline-flex;align-items:center;padding:4px 7px;border-radius:6px;font-size:9px;font-weight:800;line-height:1.3}
.quality-flag.bad{color:#a73037;background:#ffebed}
.quality-flag.warn{color:#8a5b13;background:#fff2d9}
.quality-flag.ok{color:#13784f;background:#e7f7ee}
.explanation-editor{border:1px solid var(--line);border-radius:11px;padding:13px 14px;background:#fbfcff}
.explanation-editor .inner-grid{padding:8px 0 0;gap:12px}
.question-live-preview{padding:15px;border:1px solid #e1e8f6;border-radius:12px;background:linear-gradient(130deg,#f8faff,#fff)}
.preview-question{font-size:14px;font-weight:700;line-height:1.6;color:#20314c;white-space:pre-wrap}
.preview-hindi{font-size:13px;line-height:1.6;color:#64748b;margin:7px 0 14px;white-space:pre-wrap}
.preview-options{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.preview-option{display:grid;grid-template-columns:27px 1fr;gap:2px 8px;align-items:start;padding:10px;border:1px solid #e4eaf3;border-radius:9px;background:white}
.preview-option>strong{grid-row:span 2;display:grid;place-items:center;width:25px;height:25px;border-radius:7px;background:#edf2fb;color:#3d5f99;font-size:10px}
.preview-option span{font-size:11px;line-height:1.45;color:#30435f}
.preview-option small{font-size:10px;color:#8693a7;line-height:1.45}
.preview-option em{grid-column:2;color:#168154;font-size:9px;font-style:normal;font-weight:800}
.preview-option.correct{border-color:#91d2b0;background:#f4fcf7}
.preview-option.correct>strong{background:#168154;color:#fff}
.import-modal{width:min(940px,calc(100% - 28px))}
.import-body{padding:20px 24px;display:grid;gap:15px}
.import-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px}
.file-picker{display:inline-flex;align-items:center;justify-content:center;padding:10px 14px;border:1px solid #dfe5ee;border-radius:9px;background:#fff;font-size:11px;font-weight:800;color:#33445a;cursor:pointer}
.file-picker:hover{border-color:#e45b5f;background:#fffafa}
.file-picker input{display:none}
.import-preview-table{min-height:80px;padding:12px;border:1px dashed #dbe3ef;border-radius:11px;color:var(--muted);font-size:11px}
.import-preview-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px;color:var(--ink)}
.import-preview-table table{min-width:600px}
.import-preview-table td,.import-preview-table th{padding:8px 10px}
.import-errors{margin-top:13px;padding:12px;border-radius:9px;background:#fff6f5;border:1px solid #f6d8d7;color:#933a3d;font-size:10px;line-height:1.55}
.import-errors ul{margin:7px 0 0;padding-left:18px}
.import-progress{padding:10px 12px;border-radius:9px;background:#f0f5ff;color:#3d5f99;font-size:11px;font-weight:700}
.role-chip{display:inline-flex;padding:4px 6px;margin:2px 2px 2px 0;border-radius:5px;background:#eef2f8;color:#596b86;font-size:9px;font-weight:800;text-transform:capitalize}
.role-chip.admin-role{background:#ffe9e9;color:#b93440}
.qa-metrics .metric-card:nth-child(2) .metric-icon{background:#fff3dc;color:#a56a0b}
.qa-metrics .metric-card:nth-child(3) .metric-icon{background:#ffebed;color:#b53a42}
.qa-issues{display:flex;flex-direction:column;align-items:flex-start;gap:5px;min-width:160px}
.audit-meta{display:block;max-width:420px;white-space:normal;overflow-wrap:anywhere;color:#536680;font-size:10px;line-height:1.45}
.nav-count{font-variant-numeric:tabular-nums}
@media(max-width:1280px){.heading-actions{justify-content:flex-start}.page-heading{flex-direction:column}.question-summary-strip{grid-template-columns:1fr 1fr}.question-summary-strip>div:first-child{grid-column:span 2}}
@media(max-width:760px){.question-summary-strip{grid-template-columns:1fr}.question-summary-strip>div:first-child{grid-column:auto}.preview-options{grid-template-columns:1fr}.import-body{padding:14px}.import-actions .muted{width:100%}.heading-actions .btn{flex:1}.q-content-cell{min-width:240px}}
.build-version{display:inline-block;margin-left:8px;padding:3px 6px;border:1px solid #f3d4d6;border-radius:5px;background:#fff2f2;color:#b83c44;font-size:8px;font-weight:800;letter-spacing:.08em;vertical-align:middle}


/* Official OpenRail train crest brand alignment (logo supplied by the owner) */
:root{
  --navy:#17191e;
  --navy2:#262930;
  --ink:#23262d;
  --muted:#777d87;
  --line:#e3e4e8;
  --canvas:#f5f5f6;
  --blue:#d93a43;
  --blue2:#fff0f1;
  --red:#bd2630;
  --red-bg:#fff0f1;
  --shadow:0 18px 48px rgba(27,29,35,.09);
}
body{background:var(--canvas)}
.auth-shell{
  background:
    radial-gradient(ellipse at 16% 10%,rgba(217,58,67,.10) 0,transparent 38%),
    radial-gradient(ellipse at 90% 82%,rgba(110,116,126,.10) 0,transparent 34%),
    #f7f7f8;
}
.auth-brand{gap:4px;margin-bottom:17px}
.brand-wordmark-light{width:min(188px,62vw);max-height:none;height:auto}
.auth-brand .brand-context{display:inline-flex;align-items:center;gap:7px;color:#8a3038;font-size:9px;font-weight:900;letter-spacing:.24em;text-transform:uppercase}
.auth-brand .brand-context:before,.auth-brand .brand-context:after{content:"";display:inline-block;width:18px;height:1px;background:#cbd0d5}
.sidebar-brand{display:flex;align-items:center;gap:8px;min-height:90px;padding:0 3px 25px}
.sidebar-brand .brand-wordmark-dark{display:block;flex:0 0 82px;width:82px;height:82px;max-width:82px;max-height:none;object-fit:contain}
.sidebar-brand-copy{min-width:0;display:flex;flex-direction:column;gap:5px;align-self:center}
.sidebar-brand-copy strong{font-size:10px;letter-spacing:.09em;line-height:1.25;color:#f6f6f7;font-weight:900}
.sidebar-brand-copy small{font-size:8px;letter-spacing:.17em;color:#df6a70;font-weight:800}
.workspace-label{color:#999eaa}
.nav-item.active{background:#33242a;color:#fff;box-shadow:inset 3px 0 #ec535b}
.nav-item.active .nav-icon{color:#ff777d}
.nav-item:hover{background:#292d35}
.metric-icon,.quick-icon{background:#fff0f1;color:#c52e38}
.link-button{color:#c32d37}
.btn.primary{background:linear-gradient(135deg,#ec555b,#c92d38);box-shadow:0 6px 14px rgba(201,45,56,.18)}
.btn.primary:hover{box-shadow:0 8px 18px rgba(201,45,56,.24)}
.search-input:focus,.filter-select:focus{border-color:#e16a71;box-shadow:0 0 0 3px rgba(217,58,67,.09)}
.build-version{border-color:#f0c9cc;background:#fff0f1;color:#b72b35}
.sidebar-status{border-color:#383b42;background:#20232a}
@media(max-width:760px){
  .sidebar-brand{min-height:78px;padding-bottom:22px}
  .sidebar-brand .brand-wordmark-dark{width:74px;height:74px;flex-basis:74px;max-width:74px}
  .sidebar-brand-copy strong{font-size:9px}
}


/* OpenRail official logo system — Red / Graphite / Steel / White */
:root{
  --navy:#202126;
  --navy2:#2c2f36;
  --ink:#26272d;
  --muted:#777b84;
  --line:#e2e3e7;
  --canvas:#f6f6f7;
  --white:#ffffff;
  --blue:#d43340;
  --blue2:#fff0f1;
  --green:#19784f;
  --green-bg:#e7f5ed;
  --amber:#98600f;
  --amber-bg:#fff4df;
  --red:#b92232;
  --red-bg:#fff0f1;
  --shadow:0 18px 48px rgba(32,33,38,.09);
}
html{color-scheme:light}
body{background:var(--canvas);color:var(--ink);font-family:'DM Sans',sans-serif;font-size:14px}
h1,h2,h3,.brand-name,.metric-value{font-family:'Manrope','DM Sans',sans-serif}
.eyebrow{color:#9a3039}
.auth-shell{
 background:
  radial-gradient(ellipse at 18% 8%,rgba(212,51,64,.11) 0,transparent 38%),
  radial-gradient(ellipse at 90% 82%,rgba(125,130,139,.13) 0,transparent 35%),
  #f7f7f8;
}
.auth-brand{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;margin-bottom:18px}
.brand-wordmark-light{display:block;width:min(184px,62vw);height:auto;max-height:none;object-fit:contain}
.auth-brand .brand-context{display:flex;align-items:center;gap:9px;margin-top:-7px;color:#8f2933;font-size:9px;letter-spacing:.22em;font-weight:900;text-transform:uppercase}
.auth-brand .brand-context:before,.auth-brand .brand-context:after{content:'';height:1px;width:18px;background:#c6c8cd}
.auth-card{border:1px solid #e0e1e5;border-top:3px solid #d43340;background:rgba(255,255,255,.96);box-shadow:0 20px 60px rgba(38,39,45,.10)}
.auth-card h1{color:#202126}
.auth-foot{color:#7c8088}
.form-stack label,.form-grid label{color:#4d5058}
.form-stack input:focus,.form-grid input:focus,.form-grid select:focus,.form-grid textarea:focus,.option-edit input:focus,.search-input:focus,.filter-select:focus{
 border-color:#d95b63;box-shadow:0 0 0 3px rgba(212,51,64,.10)
}
.btn.primary{background:linear-gradient(135deg,#e74e57 0%,#bd2634 100%);color:#fff;box-shadow:0 6px 15px rgba(189,38,52,.19)}
.btn.primary:hover{box-shadow:0 8px 18px rgba(189,38,52,.25)}
.btn.secondary{background:#ececef;color:#34363c;border:1px solid #e1e2e6}
.btn.subtle{background:#fff;border:1px solid #dfe0e5;color:#555962}
.btn.subtle:hover,.btn.secondary:hover{background:#f7f7f8;border-color:#c9cbd1}
.sidebar{background:linear-gradient(180deg,#1e2025 0%,#25272d 100%);border-right:1px solid #36383e}
.sidebar-brand{gap:8px;padding-left:3px;padding-right:3px}
.sidebar-brand .brand-wordmark-dark{display:block;flex:0 0 82px;width:82px;height:82px;max-width:82px;max-height:none;object-fit:contain}
.sidebar-brand-copy strong{color:#fafafa;letter-spacing:.1em}
.sidebar-brand-copy small{color:#e56a70;letter-spacing:.17em}
.workspace-label{color:#969aa3}
.nav-item{color:#c0c2c9}
.nav-item:hover{background:#343239;color:#fff}
.nav-item.active{background:linear-gradient(90deg,#45252b 0%,#35262b 100%);color:#fff;box-shadow:inset 3px 0 #eb4d57}
.nav-item.active .nav-icon{color:#ff858a}
.nav-count{background:#383a41;color:#e0e1e5}
.nav-count.warn{background:#4c3427;color:#ffd08a}
.sidebar-status{border-color:#3b3d43;background:#26282e}
.sidebar-status small,.user-copy small{color:#a2a5ad}
.sidebar-user{border-top-color:#3a3c43}
.avatar{background:#fce5e6;color:#a92835}
.topbar{background:rgba(255,255,255,.94);border-bottom-color:var(--line)}
.breadcrumb strong{color:#25262b}
.live-indicator{color:#747780}
.page-heading h1{color:#24252a}
.metric-card{border-color:#e1e2e6;box-shadow:0 3px 10px rgba(35,36,42,.025)}
.metric-icon,.quick-icon{background:#fff0f1;color:#bd2634}
.activity-dot{background:#d73a46}
.quick-action:hover{border-color:#e4a1a5;background:#fffafa}
.table-panel,.panel{border-color:#e1e2e6}
.panel-head{border-bottom-color:#ececef}
th{background:#f7f7f8;color:#777b84}
td{border-top-color:#ededef;color:#555962}
td strong{color:#2a2b31}
td small{color:#83868e}
.table-scroller tbody tr:hover{background:#fffafa}
.link-button{color:#bd2634}
.link-button:hover{text-decoration:underline}
.status-triaged,.status-submitted{background:#f0f0f2;color:#555962}
.status-archived,.status-expired,.status-rejected{background:#ededf0;color:#666a73}
.badge-blue{background:#fff0f1;color:#b52a36}
.pill-tabs{background:#ededf0}
.pill-tabs button{color:#696d76}
.pill-tabs button.active{background:#fff;color:#a72834;box-shadow:0 1px 4px rgba(40,24,26,.11)}
.modal{box-shadow:0 25px 90px rgba(25,26,30,.30)}
.modal::backdrop{background:rgba(25,26,30,.55)}
.modal-head .icon-btn{color:#666a72}
.modal-actions{background:#f8f8f9}
.option-edit>span,.preview-option>strong{background:#f4e7e8;color:#a72d39}
.question-filter-tools{background:#fbfbfc}
.question-summary-strip>div{box-shadow:0 2px 8px rgba(35,36,42,.025)}
.question-live-preview{border-color:#e4d6d8;background:linear-gradient(130deg,#fbf6f6,#fff)}
.preview-question{color:#292a30}
.preview-hindi{color:#747780}
.preview-option{border-color:#e5e5e8}
.preview-option span{color:#41434a}
.preview-option small{color:#81848c}
.file-picker{border-color:#dfe0e5;color:#42444b}
.file-picker:hover{border-color:#d95b63;background:#fff7f7}
.import-preview-table{border-color:#d9dade}
.import-progress{background:#fff0f1;color:#9c2834}
.spinner{border-color:#e3e3e7;border-top-color:#d43340}
.empty-chart{background:linear-gradient(135deg,#f7f7f8,#fff);border-color:#dedfe3}
.build-version{border-color:#f0c7ca;background:#fff0f1;color:#b32734}
.toast{background:#25272d}
.toast.error{background:#a82232}
.toast.success{background:#176d49}
.secure-dot{background:#29a875}
.role-chip{background:#ededf0;color:#555962}
.role-chip.admin-role{background:#ffe8ea;color:#b32634}
.preview-option.correct{border-color:#91d2b0;background:#f4fcf7}
.preview-option.correct>strong{background:#168154;color:#fff}
@media(max-width:760px){
 .auth-brand{margin-bottom:14px}
 .brand-wordmark-light{width:min(166px,58vw)}
 .sidebar-brand .brand-wordmark-dark{width:72px;height:72px;flex-basis:72px;max-width:72px}
}


/* Phase 1 — command center panels */
.overview-metrics{grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:18px}
.command-banner{display:flex;align-items:center;gap:20px;padding:18px 22px;margin-bottom:18px;border:1px solid #e6d6d8;border-radius:15px;background:linear-gradient(108deg,#fff 0%,#fff8f8 68%,#f0f0f2 100%);box-shadow:0 4px 18px rgba(32,33,38,.035)}
.command-banner-mark{display:grid;place-items:center;flex:0 0 96px;width:96px;height:88px;padding:6px;background:#fff;border:1px solid #ece0e1;border-radius:12px}
.command-banner-mark img{width:100%;height:100%;object-fit:contain}
.command-banner-copy{flex:1;min-width:0}
.command-banner-copy .eyebrow{margin-bottom:5px}
.command-banner-copy h2{margin:0 0 5px;font-size:20px;letter-spacing:-.025em;color:#25262b}
.command-banner-copy p{margin:0;color:#727680;font-size:11px;line-height:1.55;max-width:640px}
.command-banner-status{display:flex;align-items:center;gap:8px;padding:10px 12px;background:#fff;border:1px solid #e1e2e6;border-radius:10px;white-space:nowrap}
.command-banner-status strong,.command-banner-status small{display:block}
.command-banner-status strong{font-size:10px;color:#34363c}
.command-banner-status small{margin-top:3px;font-size:9px;color:#858991}
.command-grid{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);gap:16px;margin-bottom:16px;align-items:stretch}
.command-grid .panel{min-width:0}
.attention-list{display:flex;flex-direction:column;padding:5px 14px 12px}
.attention-item{display:grid;grid-template-columns:32px minmax(0,1fr) 18px;gap:10px;align-items:center;text-align:left;padding:12px 3px;border:0;border-bottom:1px solid #eeeef0;background:transparent;cursor:pointer;color:inherit;width:100%}
.attention-item:last-child{border-bottom:0}
.attention-item:hover{background:#fff8f8}
.attention-symbol{display:grid;place-items:center;width:29px;height:29px;border-radius:8px;background:#fff0f1;color:#b82d38;font-weight:900;font-size:13px}
.attention-item strong,.attention-item small{display:block}
.attention-item strong{font-size:11px;color:#33353c;line-height:1.4}
.attention-item small{margin-top:4px;color:#7c8088;font-size:10px;line-height:1.5}
.attention-arrow{color:#c33d46;font-size:17px}
.attention-clear{display:flex;align-items:center;gap:10px;padding:19px 4px;color:#3a6a50}
.attention-clear strong,.attention-clear small{display:block}
.attention-clear strong{font-size:11px}
.attention-clear small{font-size:10px;color:#82868d;margin-top:4px;line-height:1.5}
.lower-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.readiness-list{display:flex;flex-direction:column;gap:12px}
.readiness-row{display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:4px 12px;align-items:center}
.readiness-copy strong,.readiness-copy small{display:block;overflow-wrap:anywhere}
.readiness-copy strong{font-size:11px;color:#35363d;line-height:1.45}
.readiness-copy small{font-size:9px;color:#858991;margin-top:3px}
.readiness-percent{text-align:right;color:#ae2d37;font-size:11px;font-weight:900;font-variant-numeric:tabular-nums}
.readiness-track{height:6px;border-radius:99px;background:#efeff1;overflow:hidden}
.readiness-track span{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,#ec545b,#bb2633)}
.readiness-row .link-button{grid-column:1 / -1;justify-self:start;font-size:10px;padding:2px 0}
.audit-preview-list{display:flex;flex-direction:column;gap:0}
.audit-preview-row{display:grid;grid-template-columns:10px minmax(0,1fr) max-content;gap:9px;align-items:start;padding:11px 0;border-bottom:1px solid #ededef}
.audit-preview-row:last-child{border-bottom:0}
.audit-preview-dot{width:7px;height:7px;margin-top:5px;border-radius:50%;background:#d93a43;box-shadow:0 0 0 3px #fff0f1}
.audit-preview-row strong,.audit-preview-row small{display:block}
.audit-preview-row strong{font-size:10px;color:#3b3c42;text-transform:capitalize;line-height:1.45}
.audit-preview-row small{font-size:9px;color:#858991;margin-top:3px;line-height:1.5}
.audit-preview-target{font-size:9px;color:#7f838b;background:#f2f2f4;padding:4px 6px;border-radius:5px;max-width:90px;overflow-wrap:anywhere}
@media(max-width:1180px){.overview-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.command-banner{align-items:flex-start}.command-banner-status{white-space:normal}}
@media(max-width:900px){.command-grid,.lower-grid{grid-template-columns:1fr}.command-banner-mark{flex-basis:76px;width:76px;height:76px}.command-banner-copy h2{font-size:17px}}
@media(max-width:600px){.overview-metrics{grid-template-columns:1fr 1fr}.command-banner{gap:12px;padding:14px;flex-wrap:wrap}.command-banner-mark{flex-basis:64px;width:64px;height:64px}.command-banner-copy{flex-basis:calc(100% - 80px)}.command-banner-status{margin-left:76px}.attention-item{grid-template-columns:30px minmax(0,1fr) 14px}.audit-preview-target{display:none}}


/* Phase 2 — exam operations, analytics and health */
.schedule-block{border:1px solid #e6dfe0;border-radius:12px;padding:14px;background:#fffafa;margin:2px 0}
.schedule-block>.eyebrow{color:#b72e39;font-weight:800;letter-spacing:.12em}
.schedule-fields{margin-top:10px}
.checkbox-label{display:flex;align-items:center;gap:9px;border:1px solid #e1e2e6;border-radius:9px;padding:12px;color:#3b3d44;font-size:12px}
.checkbox-label input{width:16px;height:16px;accent-color:#be2d38}
.featured-tag{display:inline-flex!important;width:max-content;margin-top:5px;padding:3px 6px;border-radius:5px;background:#fff0d9;color:#915919!important;font-weight:800!important}
.phase2-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr);gap:16px;margin-bottom:16px;align-items:start}
.compact-metrics{margin-bottom:14px}
.attempt-filter-tools{display:grid;grid-template-columns:repeat(3,minmax(130px,1fr));gap:10px;align-items:end}
.date-filter{display:flex;flex-direction:column;gap:5px;font-size:10px;color:#747780}
.date-filter input{min-width:0;border:1px solid #dcdee4;border-radius:8px;padding:9px 10px;font:inherit;color:#30323a;background:#fff}
.chart-legend{display:flex;gap:16px;margin-bottom:12px;font-size:10px;color:#777b83}
.chart-legend span{display:flex;align-items:center;gap:6px}
.chart-legend i{width:8px;height:8px;display:inline-block;border-radius:2px}
.legend-attempts{background:#c4313c}.legend-results{background:#6c737f}
.trend-chart{display:flex;flex-direction:column;gap:8px}
.trend-row{display:grid;grid-template-columns:42px minmax(80px,1fr) 45px 68px;gap:8px;align-items:center;font-size:10px}
.trend-date{color:#777b83;font-variant-numeric:tabular-nums}
.trend-bars{display:flex;flex-direction:column;gap:3px}
.trend-bar{display:block;height:6px;border-radius:4px;min-width:2px}
.trend-bar.attempts{background:linear-gradient(90deg,#e95a61,#b92734)}
.trend-bar.results{background:#737984}
.trend-row>strong,.trend-row>small{font-variant-numeric:tabular-nums;text-align:right}
.trend-row>strong{color:#30323a}.trend-row>small{color:#848891}
.distribution-row{margin:15px 0}
.distribution-row>div:first-child{display:flex;justify-content:space-between;gap:12px;font-size:11px;color:#555962;margin-bottom:7px}
.distribution-row strong{color:#30323a}.distribution-track{height:8px;background:#f0f0f2;border-radius:99px;overflow:hidden}
.distribution-track span{display:block;height:100%;background:linear-gradient(90deg,#e6545c,#b52b36);border-radius:99px}
.ops-status-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.ops-status-card{padding:18px;display:flex;align-items:center;gap:12px;min-width:0}
.ops-status-card>div{flex:1;min-width:0}.ops-status-card strong,.ops-status-card small{display:block}
.ops-status-card strong{font-size:12px;color:#33353b}.ops-status-card small{font-size:10px;color:#838790;margin-top:5px;line-height:1.45}
.ops-status-dot{width:10px;height:10px;border-radius:50%;flex:0 0 auto}.ops-status-dot.ok{background:#24956a;box-shadow:0 0 0 4px #e6f5ed}
.ops-state-row{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid #eeeef0;font-size:11px;color:#6d7179}.ops-state-row:last-child{border-bottom:0}.ops-state-row strong{color:#292b31;font-variant-numeric:tabular-nums}
.ops-latest strong,.ops-latest small,.ops-latest span{display:block}.ops-latest strong{font-size:12px;color:#30323a}.ops-latest small,.ops-latest span{font-size:10px;color:#7d8189;margin-top:5px}
.warn-strip{border-color:#efd9b1;background:#fffaf0;color:#845b1b}
@media(max-width:900px){.phase2-grid{grid-template-columns:1fr}.attempt-filter-tools{grid-template-columns:repeat(2,minmax(0,1fr))}.ops-status-grid{grid-template-columns:1fr}}
@media(max-width:600px){.attempt-filter-tools{grid-template-columns:1fr}.trend-row{grid-template-columns:36px minmax(55px,1fr) 35px 55px;gap:5px}.ops-status-card{flex-wrap:wrap}.ops-status-card .quality-flag{margin-left:22px}}


/* Phase 3 — content, pricing and commerce readiness */
.commerce-connection-card{display:flex;gap:20px;align-items:flex-start;padding:24px;margin-bottom:16px;border:1px solid #ead0d1;background:linear-gradient(110deg,#fff9f9 0%,#fff 75%)}
.commerce-status-icon{flex:0 0 auto;width:58px;height:58px;display:grid;place-items:center;border-radius:15px;background:linear-gradient(145deg,#ef555a,#b82430);color:#fff;font-size:27px;font-weight:900;box-shadow:0 7px 20px rgba(189,38,48,.20)}
.commerce-card-content{flex:1;min-width:0}.commerce-card-content h2{margin:7px 0 8px;color:#25272d;font-size:20px}.commerce-card-content p{max-width:850px;margin:0;color:#6f737c;font-size:12px;line-height:1.65}.commerce-status-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:14px}
.commerce-checklist{display:grid;gap:0}.commerce-check-item{display:grid;grid-template-columns:32px minmax(0,1fr) auto;gap:12px;align-items:start;padding:15px 0;border-bottom:1px solid #ececef}.commerce-check-item:last-child{border-bottom:0}.commerce-check-item strong{display:block;color:#2c2e34;font-size:12px}.commerce-check-item p{margin:5px 0 0;color:#757982;font-size:11px;line-height:1.55}.commerce-check{display:grid;place-items:center;width:29px;height:29px;border-radius:9px;font-size:11px;font-weight:900}.commerce-check.pending{background:#fff0e2;color:#a75a17;border:1px solid #f4d7b8}.promotion-label{display:inline-flex;padding:5px 8px;background:#fff0f0;color:#b52d37;border:1px solid #f1d1d3;border-radius:6px;font-size:10px;font-weight:900;white-space:nowrap}.local-path{color:#ad2933;text-decoration:none;font-size:11px}.local-path:hover{text-decoration:underline}
#content-dialog,#offer-dialog,#promotion-dialog{width:min(850px,calc(100% - 24px));max-height:90vh;overflow-y:auto}#offer-dialog,#promotion-dialog{width:min(760px,calc(100% - 24px))}
#content-dialog .form-grid,#offer-dialog .form-grid,#promotion-dialog .form-grid{padding:18px 22px}#content-dialog .modal-actions,#offer-dialog .modal-actions,#promotion-dialog .modal-actions{position:sticky;bottom:0;background:#fff;z-index:2}
@media(max-width:760px){.commerce-connection-card{flex-direction:column;padding:18px}.commerce-check-item{grid-template-columns:32px minmax(0,1fr)}.commerce-check-item .quality-flag{grid-column:2;justify-self:start}}

.metric-unavailable{border-color:#ead4d5;background:linear-gradient(135deg,#fff8f8,#fff)}.metric-unavailable-value{font-size:19px!important;color:#ad2933!important;letter-spacing:-.02em}

/* V8: question-report quick edit and resilient sidebar scrolling */
.sidebar{
  height:100vh;
  height:100dvh;
  min-height:0;
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:#5a5d65 #22242a;
}
.nav-list{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  align-content:start;
  padding-bottom:12px;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:#5a5d65 #22242a;
}
.sidebar-bottom{flex:0 0 auto}
.sidebar::-webkit-scrollbar,.nav-list::-webkit-scrollbar{width:7px}
.sidebar::-webkit-scrollbar-track,.nav-list::-webkit-scrollbar-track{background:#22242a}
.sidebar::-webkit-scrollbar-thumb,.nav-list::-webkit-scrollbar-thumb{background:#555860;border-radius:8px;border:1px solid #22242a}
.report-actions{align-items:flex-start;flex-wrap:wrap;min-width:148px;max-width:230px;gap:4px}
.report-actions .btn{white-space:nowrap}
.report-question-id{font-size:9px;color:var(--muted);margin-top:5px;font-family:ui-monospace,monospace}
.report-edit-context{margin:14px 22px 0;padding:14px 16px;border:1px solid #efc5c7;border-left:4px solid var(--rail-red);border-radius:10px;background:#fff7f7;color:#4a3033}
.report-edit-context[hidden]{display:none!important}
.report-edit-context strong,.report-edit-context span,.report-edit-context small{display:block}
.report-edit-context strong{font-size:12px;color:#9d2832}
.report-edit-context span{font-size:10px;color:#8a5b60;margin-top:4px;text-transform:capitalize}
.report-edit-context p{font-size:12px;line-height:1.55;margin:9px 0;white-space:pre-wrap;overflow-wrap:anywhere}
.report-edit-context small{font-size:10px;color:#7e6264}
@media(max-width:760px){
 .sidebar{height:100vh;height:100dvh;overflow-y:auto}
 .nav-list{flex:1 1 auto;min-height:0;overflow-y:auto;padding-bottom:18px}
 .report-actions{max-width:none;min-width:0}
 .report-edit-context{margin:12px 14px 0}
}


/* OpenRail Admin V9 — account settings, workflow center, graphs and appearance switch */
.session-idle-label{font-size:9px;font-weight:800;letter-spacing:.015em;color:#687181;white-space:nowrap;font-variant-numeric:tabular-nums}
.session-idle-label.urgent{color:#c43f48}
.theme-toggle{display:inline-flex;align-items:center;gap:5px;min-width:76px;justify-content:center}
.avatar-button{border:0;cursor:pointer;font-family:inherit}
.top-signout{display:inline-flex;align-items:center;gap:5px}
.form-stack{display:grid;gap:13px}
.form-stack label,.account-form label{display:grid;gap:6px;font-size:11px;font-weight:700;color:var(--ink)}
.form-stack input,.account-form input,.account-form select{width:100%;min-width:0}
.account-settings-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(290px,.85fr);gap:16px;align-items:start}
.account-side-stack{display:grid;gap:16px;min-width:0}
.account-form{padding:20px;align-items:start}
.account-form small{font-size:9px;color:var(--muted);font-weight:500;line-height:1.5}
.form-message-row{display:flex;justify-content:flex-end;align-items:center;gap:14px;flex-wrap:wrap}
.form-message-row .inline-message{margin-right:auto}
.profile-identity{display:flex;align-items:center;gap:12px;margin-bottom:16px}
.profile-avatar{width:48px;height:48px;border-radius:14px;background:linear-gradient(135deg,#f15a5d,#c9323d);display:grid;place-items:center;color:white;font-weight:900;font-size:19px;box-shadow:0 6px 18px rgba(210,50,61,.18)}
.profile-identity strong,.profile-identity small{display:block;overflow-wrap:anywhere}.profile-identity strong{font-size:13px}.profile-identity small{font-size:10px;color:var(--muted);margin-top:4px}
.role-chip-list{display:flex;flex-wrap:wrap;gap:5px;margin:0 0 16px}
.role-descriptions{display:grid;gap:9px}
.role-description{padding:10px 11px;border:1px solid var(--line);border-radius:9px;background:var(--canvas)}
.role-description strong{text-transform:capitalize;font-size:10px;display:block;margin-bottom:3px}
.role-description p{font-size:10px;color:var(--muted);line-height:1.5;margin:0}
.account-meta{display:grid;grid-template-columns:1fr auto;gap:9px;margin-top:15px;padding-top:14px;border-top:1px solid var(--line);font-size:10px;align-items:center}
.account-meta span{color:var(--muted)}.account-meta strong{font-weight:700;text-align:right}
.security-settings{display:grid;gap:14px}
.security-settings>div{display:flex;align-items:flex-start;gap:10px}
.security-settings strong,.security-settings small{display:block}.security-settings strong{font-size:11px}.security-settings small{font-size:10px;color:var(--muted);margin-top:3px;line-height:1.45}
.theme-preview-dot{width:10px;height:10px;border-radius:50%;background:#f6f6f7;border:1px solid #b7bec9;box-shadow:inset 0 0 0 2px white;flex:0 0 auto;margin-top:2px}.theme-preview-dot.dark{background:#20232a;box-shadow:inset 0 0 0 2px #20232a;border-color:#ebeff6}
.role-manager{position:relative;display:inline-block}
.role-manager summary{font-size:10px;font-weight:800;color:var(--rail-red-dark);cursor:pointer;list-style:none;white-space:nowrap;padding:7px 9px;border:1px solid var(--line);border-radius:7px;background:var(--white)}
.role-manager summary::-webkit-details-marker{display:none}.role-manager summary:after{content:'⌄';margin-left:6px}
.role-manager-list{position:absolute;z-index:30;right:0;top:calc(100% + 4px);min-width:180px;max-height:280px;overflow:auto;background:var(--white);border:1px solid var(--line);border-radius:9px;box-shadow:0 12px 30px rgba(0,0,0,.14);padding:7px;display:grid;gap:3px}
.role-manager-list .link-button{text-align:left;padding:8px 9px;border-radius:6px}.role-manager-list .link-button:hover{background:var(--rail-red-soft)}
.overview-chart-grid{margin-top:16px;margin-bottom:16px}
.insight-bars{display:grid;gap:15px}
.insight-bar-row{display:grid;gap:6px;min-width:0}
.insight-bar-row>div:first-child{display:flex;justify-content:space-between;gap:12px;align-items:center;font-size:11px}
.insight-bar-row>div:first-child span{text-transform:capitalize;color:var(--muted)}
.insight-bar-row>div:first-child strong{font-size:11px;font-variant-numeric:tabular-nums}
.insight-bar-track{height:8px;overflow:hidden;border-radius:99px;background:#eceef2}
.insight-bar-track>span{display:block;height:100%;min-width:0;border-radius:99px;background:linear-gradient(90deg,#ed4f52,#bf2d38);transition:width .2s}
.insight-bar-track>span.insight-published,.insight-bar-track>span.insight-scored{background:linear-gradient(90deg,#2ca779,#1c8a62)}
.insight-bar-track>span.insight-draft,.insight-bar-track>span.insight-submitted{background:linear-gradient(90deg,#e7ab45,#c78220)}
.insight-bar-track>span.insight-archived,.insight-bar-track>span.insight-expired{background:linear-gradient(90deg,#8c96a5,#606a79)}
.insight-bar-row>small{font-size:9px;color:var(--muted)}
.analytics-secondary-grid{margin-top:16px;margin-bottom:18px}
.exam-accuracy-row{display:grid;gap:6px;margin-bottom:13px}
.exam-accuracy-row>div:first-child{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;font-size:10px}
.exam-accuracy-row strong{font-size:10px;line-height:1.45;max-width:85%;font-weight:700}.exam-accuracy-row span{font-weight:900;color:var(--rail-red-dark);font-variant-numeric:tabular-nums}
.workflow-summary{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 23px;border:1px solid #e9c9cb;border-radius:14px;background:linear-gradient(120deg,#fff4f4,#fff 65%);margin-bottom:16px}
.workflow-summary>div:first-child{min-width:0}.workflow-summary strong{display:block;font-size:21px;margin:5px 0 4px;letter-spacing:-.03em}.workflow-summary p{margin:0;font-size:11px;color:var(--muted);line-height:1.6}
.workflow-summary-number{width:74px;height:74px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-direction:column;font-size:23px;font-weight:900;color:#b52f3a;background:white;border:6px solid #f3d4d6;flex:0 0 auto}.workflow-summary-number small{font-size:9px;color:var(--muted);font-weight:700}
.workflow-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:16px}
.workflow-task{padding:17px;border:1px solid var(--line);background:var(--white);border-radius:13px;min-width:0;box-shadow:0 3px 12px rgba(20,31,47,.025)}
.workflow-task.high{border-top:3px solid #d8444c}.workflow-task.medium{border-top:3px solid #dda33d}.workflow-task.clear{border-top:3px solid #25946b}
.workflow-task-top{display:flex;justify-content:space-between;align-items:center;gap:12px}.workflow-task-top>strong{font-size:20px;font-variant-numeric:tabular-nums}
.workflow-priority{display:inline-flex;align-items:center;padding:4px 7px;border-radius:6px;font-size:9px;font-weight:900;text-transform:uppercase;letter-spacing:.07em}
.workflow-priority.high{background:#ffebed;color:#a92d37}.workflow-priority.medium{background:#fff3da;color:#8d6011}.workflow-priority.clear{background:#e6f6ee;color:#116a48}
.workflow-task h3{font-size:13px;margin:15px 0 7px}.workflow-task p{font-size:10px;line-height:1.6;color:var(--muted);min-height:48px;margin:0 0 14px}.workflow-principles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.workflow-principles strong{font-size:12px}.workflow-principles p{font-size:10px;color:var(--muted);line-height:1.6;margin:6px 0 0}
/* Dark mode preserves OpenRail red accents and uses high-contrast graphite panels. */
html[data-theme="dark"]{color-scheme:dark;--ink:#eef0f3;--muted:#a6adb8;--line:#3b3e46;--canvas:#191b20;--white:#23262d;--navy:#15171b;--navy2:#262930;--blue:#ed4f52;--blue2:#3a2529;--red-bg:#3a2025;--green-bg:#19382d;--amber-bg:#3a3020;--shadow:0 12px 30px rgba(0,0,0,.32)}
html[data-theme="dark"] body{background:#17191e;color:#eef0f3}
html[data-theme="dark"] .main-area,html[data-theme="dark"] .page-wrap{background:#191b20;color:#eef0f3}
html[data-theme="dark"] .topbar{background:#202228;border-color:#393c44;color:#eef0f3}
html[data-theme="dark"] .breadcrumb strong,html[data-theme="dark"] .page-heading h1,html[data-theme="dark"] .panel h2,html[data-theme="dark"] .panel h3,html[data-theme="dark"] .metric-value,html[data-theme="dark"] .quick-action strong,html[data-theme="dark"] .command-banner-copy h2{color:#f0f2f5}
html[data-theme="dark"] .panel,html[data-theme="dark"] .metric-card,html[data-theme="dark"] .quick-action,html[data-theme="dark"] .question-summary-strip>div,html[data-theme="dark"] .workflow-task{background:#24272e;border-color:#3a3e46;color:#e7eaf0;box-shadow:none}
html[data-theme="dark"] .panel-head,html[data-theme="dark"] .panel-body,html[data-theme="dark"] .table-tools,html[data-theme="dark"] .modal-actions{background:#24272e;border-color:#3a3e46}
html[data-theme="dark"] table th{background:#2a2d34;color:#b7bec9;border-color:#3a3e46}
html[data-theme="dark"] table td{background:#24272e;color:#e4e7ec;border-color:#393c44}
html[data-theme="dark"] .table-scroller{border-color:#393c44}
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{background:#1c1f25!important;border-color:#444852!important;color:#f1f3f6!important}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#858d9b}
html[data-theme="dark"] .command-banner{background:linear-gradient(115deg,#28252b,#25272e 55%,#282126);border-color:#494047}
html[data-theme="dark"] .readiness-track,html[data-theme="dark"] .insight-bar-track{background:#3a3e46}
html[data-theme="dark"] .readiness-copy strong,html[data-theme="dark"] .readiness-percent,html[data-theme="dark"] .preview-question,html[data-theme="dark"] .detail-block strong{color:#edf0f4}
html[data-theme="dark"] .question-live-preview,html[data-theme="dark"] .explanation-editor,html[data-theme="dark"] .detail-block,html[data-theme="dark"] .role-description{background:#20232a;border-color:#3b3e46}
html[data-theme="dark"] .preview-option{background:#262930;border-color:#424650}html[data-theme="dark"] .preview-option span{color:#e6e9ee}html[data-theme="dark"] .preview-option small{color:#adb4c0}
html[data-theme="dark"] .preview-option>strong{background:#3b3e46;color:#eee}
html[data-theme="dark"] .workflow-summary{background:linear-gradient(120deg,#302125,#25262d 70%);border-color:#56353a}
html[data-theme="dark"] .workflow-summary-number{background:#25272e;border-color:#6e3b41;color:#ff8588}
html[data-theme="dark"] .status-pill{border-color:#454953}
html[data-theme="dark"] .empty-chart{background:#20232a;border-color:#454953;color:#a6adb8}
html[data-theme="dark"] .auth-shell{background:radial-gradient(ellipse at 12% 12%,#38252a 0,transparent 40%),linear-gradient(145deg,#17191e,#21232a)}
html[data-theme="dark"] .auth-card{background:#24272e;border-color:#40444e;color:#eef0f3;box-shadow:0 18px 60px rgba(0,0,0,.28)}
html[data-theme="dark"] .auth-card h1{color:#f3f5f8}html[data-theme="dark"] .auth-card .muted{color:#a8aeb8}
html[data-theme="dark"] .role-manager-list{background:#25282f;border-color:#454953;box-shadow:0 12px 30px rgba(0,0,0,.35)}
html[data-theme="dark"] .role-manager-list .link-button:hover{background:#40272b}
html[data-theme="dark"] .pill-tabs{background:#2a2d34}html[data-theme="dark"] .pill-tabs button.active{background:#3b3e46;color:#f0f2f5}
html[data-theme="dark"] .badge-blue{background:#39292d;color:#ff9b9e}
html[data-theme="dark"] .session-idle-label{color:#c0c5ce}html[data-theme="dark"] .session-idle-label.urgent{color:#ff9094}
@media(max-width:960px){.account-settings-grid{grid-template-columns:1fr}.workflow-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.session-idle-label{display:none}.theme-toggle{min-width:38px;padding:7px}.theme-toggle span{display:none}.top-signout{padding:7px 9px}.top-signout span{display:none}.overview-chart-grid,.analytics-secondary-grid{grid-template-columns:1fr}.workflow-grid{grid-template-columns:1fr}.workflow-principles{grid-template-columns:1fr}.workflow-summary{padding:15px}.workflow-summary-number{width:60px;height:60px;flex-basis:60px}.role-manager-list{right:auto;left:0}}


/* V10 — coherent Light / Dark / Auto theme tokens and contrast repair */
:root{
  --ink:#292b31;
  --muted:#666b74;
  --line:#dedfe4;
  --canvas:#f5f5f7;
  --white:#ffffff;
  --navy:#f0f1f3;
  --navy2:#e6e7eb;
  --blue:#d63e49;
  --blue2:#fbe8ea;
  --green-bg:#e7f5ed;
  --amber-bg:#fff2d9;
  --red-bg:#ffebed;
  --surface-2:#f0f1f4;
  --surface-3:#e8e9ed;
  --text-soft:#555b64;
  --sidebar-line:#dcdee3;
  --shadow:0 12px 35px rgba(32,33,38,.08);
}
html{color-scheme:light}
html[data-theme="light"] body,
html[data-theme="light"] .main-area,
html[data-theme="light"] .page-wrap{background:var(--canvas);color:var(--ink)}
html[data-theme="light"] .sidebar{background:linear-gradient(180deg,#f7f7f8 0%,#eeeeF1 100%);border-right:1px solid #dfe0e5;color:#292b31}
html[data-theme="light"] .sidebar-brand-copy strong{color:#2b2c31}
html[data-theme="light"] .sidebar-brand-copy small{color:#bd303b}
html[data-theme="light"] .workspace-label{color:#6d7179}
html[data-theme="light"] .nav-group-label{border-top-color:#d9dbe0}
html[data-theme="light"] .nav-item{color:#555963}
html[data-theme="light"] .nav-item .nav-icon{color:#777c85}
html[data-theme="light"] .nav-item:hover{background:#e6e7eb;color:#22242a}
html[data-theme="light"] .nav-item.active{background:linear-gradient(90deg,#fbe5e7,#f4e9ea);color:#871e2a;box-shadow:inset 3px 0 #d43b46}
html[data-theme="light"] .nav-item.active .nav-icon{color:#c42f3b}
html[data-theme="light"] .nav-count{background:#e0e2e7;color:#444a53}
html[data-theme="light"] .nav-count.warn{background:#fff0d5;color:#845312}
html[data-theme="light"] .sidebar-status{border-color:#dedfe4;background:#ffffff}
html[data-theme="light"] .sidebar-status strong{color:#30323a}
html[data-theme="light"] .sidebar-status small,html[data-theme="light"] .user-copy small{color:#777c85}
html[data-theme="light"] .sidebar-user{border-top-color:#d9dbe0}
html[data-theme="light"] .sidebar-user .user-copy strong{color:#292b31}
html[data-theme="light"] .sidebar-user .icon-btn{color:#555963}
html[data-theme="light"] .topbar{background:rgba(255,255,255,.94);border-color:var(--line);color:var(--ink)}
html[data-theme="light"] .breadcrumb strong,html[data-theme="light"] .page-heading h1,html[data-theme="light"] .panel h2,html[data-theme="light"] .panel h3,html[data-theme="light"] .metric-value,html[data-theme="light"] .quick-action strong{color:var(--ink)}
html[data-theme="light"] .panel,html[data-theme="light"] .table-panel,html[data-theme="light"] .metric-card,html[data-theme="light"] .quick-action,html[data-theme="light"] .question-summary-strip>div,html[data-theme="light"] .workflow-task,html[data-theme="light"] .detail-block{background:#fff;border-color:var(--line);color:var(--ink)}
html[data-theme="light"] table th{background:#f0f1f4;color:#575c65;border-color:#dfe0e4}
html[data-theme="light"] table td{background:#fff;color:#40444c;border-color:#e5e6ea}
html[data-theme="light"] table td strong,html[data-theme="light"] .question-summary-strip strong,html[data-theme="light"] .preview-question,html[data-theme="light"] .detail-block strong{color:#292b31}
html[data-theme="light"] .question-live-preview{background:linear-gradient(130deg,#f8f8f9,#fff);border-color:#dedfe4}
html[data-theme="light"] .preview-hindi{color:#555c66}
html[data-theme="light"] .preview-option{background:#fff;border-color:#dedfe4}
html[data-theme="light"] .preview-option span{color:#343840}
html[data-theme="light"] .form-stack label,html[data-theme="light"] .form-grid label{color:#414650}
html[data-theme="light"] .btn.subtle{background:#fff;color:#3e424a;border-color:#d7d9df}
html[data-theme="light"] .btn.secondary{background:#eceef1;color:#333740;border-color:#e0e2e6}
html[data-theme="light"] .modal{background:#fff;color:#292b31}
html[data-theme="light"] .modal-head,html[data-theme="light"] .modal-actions{background:#f8f8fa;border-color:#e0e1e5}
html[data-theme="light"] .auth-shell{background:radial-gradient(ellipse at 18% 8%,rgba(212,51,64,.11) 0,transparent 38%),radial-gradient(ellipse at 90% 82%,rgba(125,130,139,.13) 0,transparent 35%),#f7f7f8;color:#292b31}
html[data-theme="light"] .auth-card{background:rgba(255,255,255,.96);border-color:#e0e1e5;color:#292b31}
html[data-theme="light"] .auth-card h1{color:#202126}

/* Every logo surface changes with the resolved theme, using the supplied logo-pack files. */
.theme-logo{display:none!important}
html[data-theme="light"] .theme-logo--light{display:block!important}
html[data-theme="dark"] .theme-logo--dark{display:block!important}
.auth-logo-pair{display:grid;place-items:center;min-width:0}
.auth-logo-pair .brand-wordmark{grid-area:1/1;width:min(210px,64vw);max-height:none;height:auto;object-fit:contain}
.sidebar-logo-pair{display:grid;place-items:center;flex:0 0 82px;width:82px;height:82px;min-width:82px}
.sidebar-logo-pair .brand-wordmark{grid-area:1/1;width:82px;height:82px;object-fit:contain;max-height:none}
.sidebar-brand{gap:8px;min-height:90px;padding:0 3px 25px}
.auth-brand{gap:8px}

/* Theme mode picker in the header */
.theme-mode-control{display:inline-flex;align-items:center;gap:2px;padding:3px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2,#f0f1f4);flex:0 0 auto}
.theme-mode-control button{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:30px;border:1px solid transparent;border-radius:7px;padding:5px 8px;background:transparent;color:var(--muted);font-size:11px;font-weight:800;white-space:nowrap}
.theme-mode-control button:hover{color:var(--ink);background:var(--surface-3,#e8e9ed)}
.theme-mode-control button.active{background:var(--white);border-color:var(--line);color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.08)}
.theme-mode-control button:focus-visible{outline:2px solid var(--rail-red);outline-offset:2px}

/* Dark-theme high contrast: normalize elements previously using light-theme hard-coded colors. */
html[data-theme="dark"]{
  color-scheme:dark;
  --ink:#eef0f4;--muted:#b0b6c0;--line:#3f434c;--canvas:#191b20;--white:#24272e;
  --navy:#202126;--navy2:#2c2f36;--blue:#ed535a;--blue2:#3c282d;
  --green-bg:#203a30;--amber-bg:#3c3020;--red-bg:#3d2429;
  --surface-2:#2a2d34;--surface-3:#343840;--text-soft:#d2d6dd;
  --sidebar-line:#3b3d43;--shadow:0 12px 36px rgba(0,0,0,.32);
}
html[data-theme="dark"] body,
html[data-theme="dark"] .main-area,
html[data-theme="dark"] .page-wrap{background:var(--canvas)!important;color:var(--ink)!important}
html[data-theme="dark"] .sidebar{background:linear-gradient(180deg,#202126 0%,#27292f 100%)!important;border-right:1px solid #3a3c43!important;color:#f0f1f3!important}
html[data-theme="dark"] .sidebar-brand-copy strong{color:#fafafa!important}
html[data-theme="dark"] .sidebar-brand-copy small{color:#ef797f!important}
html[data-theme="dark"] .workspace-label{color:#a7abb4!important}
html[data-theme="dark"] .nav-group-label{border-top-color:#3a3c43!important}
html[data-theme="dark"] .nav-item{color:#c6c9d0!important}
html[data-theme="dark"] .nav-item:hover{background:#35373e!important;color:#fff!important}
html[data-theme="dark"] .nav-item.active{background:linear-gradient(90deg,#45252b 0%,#35262b 100%)!important;color:#fff!important;box-shadow:inset 3px 0 #ef535a!important}
html[data-theme="dark"] .nav-item.active .nav-icon{color:#ff9397!important}
html[data-theme="dark"] .nav-count{background:#3b3d45!important;color:#e9ebef!important}
html[data-theme="dark"] .sidebar-status{background:#292b31!important;border-color:#41444c!important}
html[data-theme="dark"] .sidebar-status strong,html[data-theme="dark"] .sidebar-user .user-copy strong{color:#f0f1f4!important}
html[data-theme="dark"] .sidebar-status small,html[data-theme="dark"] .user-copy small{color:#adb3bd!important}
html[data-theme="dark"] .sidebar-user{border-top-color:#3e4047!important}
html[data-theme="dark"] .sidebar-user .icon-btn{color:#e6e8ed!important}
html[data-theme="dark"] .topbar{background:rgba(32,33,38,.96)!important;border-color:#3b3d44!important;color:#eef0f4!important}
html[data-theme="dark"] .breadcrumb,html[data-theme="dark"] .live-indicator{color:#b2b7c0!important}
html[data-theme="dark"] .breadcrumb strong,html[data-theme="dark"] .page-heading h1,html[data-theme="dark"] .panel h2,html[data-theme="dark"] .panel h3,html[data-theme="dark"] .metric-value,html[data-theme="dark"] .quick-action strong,html[data-theme="dark"] .command-banner-copy h2{color:#f1f2f5!important}
html[data-theme="dark"] .page-heading p,html[data-theme="dark"] .muted,html[data-theme="dark"] .page-footer,html[data-theme="dark"] .metric-top,html[data-theme="dark"] .metric-foot,html[data-theme="dark"] .metric-mini-label,html[data-theme="dark"] .section-label,html[data-theme="dark"] .eyebrow{color:#b3b9c3!important}
html[data-theme="dark"] .panel,html[data-theme="dark"] .table-panel,html[data-theme="dark"] .metric-card,html[data-theme="dark"] .quick-action,html[data-theme="dark"] .question-summary-strip>div,html[data-theme="dark"] .workflow-task,html[data-theme="dark"] .detail-block{background:#25282f!important;border-color:#41454e!important;color:#e9ebf0!important;box-shadow:none}
html[data-theme="dark"] .panel-head,html[data-theme="dark"] .panel-body,html[data-theme="dark"] .table-tools,html[data-theme="dark"] .question-filter-tools{background:#25282f!important;border-color:#41454e!important;color:#e9ebf0!important}
html[data-theme="dark"] .panel-head p,html[data-theme="dark"] .activity-copy span,html[data-theme="dark"] .quick-action small,html[data-theme="dark"] .question-summary-strip small,html[data-theme="dark"] .attention-item small,html[data-theme="dark"] .attention-clear small,html[data-theme="dark"] .readiness-copy small,html[data-theme="dark"] .audit-preview-row small,html[data-theme="dark"] .trend-row>small,html[data-theme="dark"] .ops-status-card small,html[data-theme="dark"] .profile-identity small,html[data-theme="dark"] .report-edit-context small{color:#b4bac4!important}
html[data-theme="dark"] table th{background:#30333b!important;color:#c9ced7!important;border-color:#424650!important}
html[data-theme="dark"] table td{background:#25282f!important;color:#e3e6ec!important;border-color:#41454e!important}
html[data-theme="dark"] table td strong,html[data-theme="dark"] .question-summary-strip strong,html[data-theme="dark"] .preview-question,html[data-theme="dark"] .detail-block strong,html[data-theme="dark"] .readiness-copy strong,html[data-theme="dark"] .readiness-percent,html[data-theme="dark"] .command-banner-status strong,html[data-theme="dark"] .ops-status-card strong,html[data-theme="dark"] .trend-row>strong{color:#f0f2f5!important}
html[data-theme="dark"] .question-preview,html[data-theme="dark"] .q-content-cell,html[data-theme="dark"] .report-question-text,html[data-theme="dark"] .report-edit-context,html[data-theme="dark"] .report-edit-context strong{color:#e7eaf0!important}
html[data-theme="dark"] .question-live-preview,html[data-theme="dark"] .explanation-editor,html[data-theme="dark"] .detail-block,html[data-theme="dark"] .role-description{background:#202329!important;border-color:#41454e!important;color:#e8ebf0!important}
html[data-theme="dark"] .preview-hindi{color:#c0c6d0!important}
html[data-theme="dark"] .preview-option{background:#2a2d34!important;border-color:#464a54!important}
html[data-theme="dark"] .preview-option>strong{background:#3a3e47!important;color:#f2f3f6!important}
html[data-theme="dark"] .preview-option span{color:#e4e7ed!important}
html[data-theme="dark"] .preview-option small{color:#b8bfca!important}
html[data-theme="dark"] .preview-option em{color:#71d6a6!important}
html[data-theme="dark"] .form-stack label,html[data-theme="dark"] .form-grid label,html[data-theme="dark"] .detail-block label{color:#d7dbe2!important}
html[data-theme="dark"] .form-stack input,html[data-theme="dark"] .form-grid input,html[data-theme="dark"] .form-grid select,html[data-theme="dark"] .form-grid textarea,html[data-theme="dark"] .option-edit input,html[data-theme="dark"] .search-input,html[data-theme="dark"] .filter-select{background:#1b1d22!important;border-color:#4a4e58!important;color:#f2f3f6!important}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#a0a7b2!important}
html[data-theme="dark"] .btn.subtle{background:#292c33!important;color:#e7eaf0!important;border-color:#484c56!important}
html[data-theme="dark"] .btn.secondary{background:#373a42!important;color:#f0f2f5!important;border-color:#484c56!important}
html[data-theme="dark"] .btn.subtle:hover,html[data-theme="dark"] .btn.secondary:hover{background:#42454e!important}
html[data-theme="dark"] .modal{background:#24272e!important;color:#eef0f4!important;border:1px solid #444852!important}
html[data-theme="dark"] .modal-head,html[data-theme="dark"] .modal-actions{background:#292c33!important;border-color:#434751!important}
html[data-theme="dark"] .modal-head .icon-btn{color:#e2e5eb!important}
html[data-theme="dark"] .options-editor,html[data-theme="dark"] .import-preview-table,html[data-theme="dark"] .file-picker{background:#22252b!important;border-color:#464a53!important;color:#e6e8ed!important}
html[data-theme="dark"] .pill-tabs{background:#2a2d34!important}
html[data-theme="dark"] .pill-tabs button{color:#c2c8d1!important}
html[data-theme="dark"] .pill-tabs button.active{background:#41454e!important;color:#fff!important}
html[data-theme="dark"] .badge-blue{background:#432a30!important;color:#ffb5b8!important}
html[data-theme="dark"] .empty-chart,html[data-theme="dark"] .empty-state{background:#202329!important;border-color:#444852!important;color:#b9c0ca!important}
html[data-theme="dark"] .alert-strip{background:#382f20!important;border-color:#57482c!important;color:#f1d69b!important}
html[data-theme="dark"] .info-panel{background:#382f20!important;border-color:#57482c!important;color:#f1d69b!important}
html[data-theme="dark"] .quality-flag.bad{background:#45262b!important;color:#ffb0b4!important}
html[data-theme="dark"] .quality-flag.warn{background:#463821!important;color:#f4d08b!important}
html[data-theme="dark"] .quality-flag.ok{background:#203d31!important;color:#8fe0b7!important}
html[data-theme="dark"] .workflow-summary{background:linear-gradient(120deg,#352328,#27292f 72%)!important;border-color:#67434a!important}
html[data-theme="dark"] .workflow-summary p,html[data-theme="dark"] .workflow-principles p{color:#bbc1ca!important}
html[data-theme="dark"] .workflow-summary-number{background:#292b32!important;border-color:#70454b!important;color:#ff9a9e!important}
html[data-theme="dark"] .workflow-summary-number small{color:#c1c5cd!important}
html[data-theme="dark"] .insight-bar-track,html[data-theme="dark"] .readiness-track{background:#444852!important}
html[data-theme="dark"] .role-manager summary{background:#2a2d34!important;border-color:#484c56!important;color:#ff989c!important}
html[data-theme="dark"] .role-manager-list{background:#26292f!important;border-color:#484c56!important}
html[data-theme="dark"] .role-manager-list .link-button{color:#ff9da1!important}
html[data-theme="dark"] .role-manager-list .link-button:hover{background:#42282d!important}
html[data-theme="dark"] .status-pill{border-color:#50545e!important}
html[data-theme="dark"] .status-pill.status-published,html[data-theme="dark"] .status-pill.status-scored,html[data-theme="dark"] .status-pill.status-active,html[data-theme="dark"] .status-pill.status-resolved{background:#203d31!important;color:#92e0b8!important}
html[data-theme="dark"] .status-pill.status-draft,html[data-theme="dark"] .status-pill.status-submitted,html[data-theme="dark"] .status-pill.status-pending,html[data-theme="dark"] .status-pill.status-in_progress{background:#49381f!important;color:#f4d08c!important}
html[data-theme="dark"] .status-pill.status-archived,html[data-theme="dark"] .status-pill.status-expired,html[data-theme="dark"] .status-pill.status-rejected{background:#353941!important;color:#d4d8df!important}
html[data-theme="dark"] .theme-mode-control{background:#292c33!important;border-color:#444852!important}
html[data-theme="dark"] .theme-mode-control button{color:#c1c7d0!important}
html[data-theme="dark"] .theme-mode-control button:hover{background:#383b43!important;color:#fff!important}
html[data-theme="dark"] .theme-mode-control button.active{background:#454851!important;border-color:#5b606b!important;color:#fff!important}
html[data-theme="dark"] .toast{background:#30333b!important;color:#f1f3f6!important;border:1px solid #4a4e58}
html[data-theme="dark"] .toast.error{background:#612d36!important}
html[data-theme="dark"] .toast.success{background:#1e4a38!important}
html[data-theme="dark"] .spinner{border-color:#414650;border-top-color:#ef535a}
html[data-theme="dark"] .page-footer .build-version{background:#3a272c!important;color:#ffacb0!important}

@media(max-width:960px){
  .sidebar-logo-pair{flex-basis:74px;width:74px;height:74px;min-width:74px}
  .sidebar-logo-pair .brand-wordmark{width:74px;height:74px}
}
@media(max-width:760px){
  .theme-mode-control{gap:1px;padding:2px}
  .theme-mode-control button{min-width:30px;min-height:29px;padding:5px 6px;font-size:11px}
  .theme-mode-control button span{display:none}
  .auth-logo-pair .brand-wordmark{width:min(184px,60vw)}
  html[data-theme="light"] .sidebar{box-shadow:var(--shadow)}
}

/* V10 contrast details discovered in question, account and report tables */
html[data-theme="dark"] td small,html[data-theme="dark"] td .muted,html[data-theme="dark"] .q-content-cell small,html[data-theme="dark"] .question-summary-strip small{color:#bac0ca!important}
html[data-theme="dark"] .eyebrow,html[data-theme="dark"] .section-label{color:#ff858a!important}
html[data-theme="dark"] .command-banner-status small,html[data-theme="dark"] .attention-item small,html[data-theme="dark"] .attention-clear small,html[data-theme="dark"] .readiness-copy small,html[data-theme="dark"] .audit-preview-row small,html[data-theme="dark"] .report-edit-context small{color:#bec4cd!important}
html[data-theme="dark"] .account-meta,html[data-theme="dark"] .account-meta span,html[data-theme="dark"] .account-form small,html[data-theme="dark"] .security-settings small,html[data-theme="dark"] .profile-identity small{color:#b8bec8!important}
html[data-theme="dark"] .user-account-email,html[data-theme="dark"] .profile-identity strong,html[data-theme="dark"] .activity-copy strong,html[data-theme="dark"] .exam-title strong{color:#f0f2f5!important}
html[data-theme="dark"] .question-summary-strip .muted,html[data-theme="dark"] .question-summary-strip div,html[data-theme="dark"] .metric-mini-label{color:#b8bec8!important}
html[data-theme="dark"] .pagination button{background:#292c33!important;border-color:#4a4e58!important;color:#e6e9ee!important}
html[data-theme="dark"] .pagination button:disabled{color:#8d949f!important}
html[data-theme="dark"] .option-edit>span{background:#3b3e47!important;color:#f1f3f6!important}
html[data-theme="dark"] .file-picker:hover{background:#3a2a2e!important;border-color:#e05a63!important}
html[data-theme="dark"] .form-error{color:#ff9da2!important}


/* V11 — stronger dark-mode contrast for dynamic data, report context and all form surfaces */
html[data-theme="dark"] .q-content-cell,
html[data-theme="dark"] .q-content-cell strong,
html[data-theme="dark"] .q-content-cell .question-preview,
html[data-theme="dark"] .q-content-cell small,
html[data-theme="dark"] .report-question-text,
html[data-theme="dark"] .report-message,
html[data-theme="dark"] .question-summary-strip,
html[data-theme="dark"] .question-summary-strip strong,
html[data-theme="dark"] .question-summary-strip small,
html[data-theme="dark"] .metric-mini-label,
html[data-theme="dark"] .table-panel td,
html[data-theme="dark"] .table-panel td strong,
html[data-theme="dark"] .table-panel td .muted,
html[data-theme="dark"] .table-panel td small {
  color:#e8ebf0!important;
}
html[data-theme="dark"] .q-content-cell small,
html[data-theme="dark"] .table-panel td small,
html[data-theme="dark"] .question-summary-strip small { color:#c0c6d0!important; }
html[data-theme="dark"] .report-edit-context {
  background:#302529!important;
  border-color:#664047!important;
  border-left-color:#f05b61!important;
  color:#f2e9ea!important;
}
html[data-theme="dark"] .report-edit-context strong { color:#ffadb1!important; }
html[data-theme="dark"] .report-edit-context span,
html[data-theme="dark"] .report-edit-context p,
html[data-theme="dark"] .report-edit-context small { color:#e0cbd0!important; }
html[data-theme="dark"] .question-live-preview,
html[data-theme="dark"] .math-editor-panel,
html[data-theme="dark"] .math-preview-card,
html[data-theme="dark"] .explanation-editor,
html[data-theme="dark"] .options-editor,
html[data-theme="dark"] .import-preview-table,
html[data-theme="dark"] .import-preview-head {
  background:#202329!important;
  border-color:#454a54!important;
  color:#e9edf2!important;
}
html[data-theme="dark"] .math-editor-heading strong,
html[data-theme="dark"] .math-preview-label,
html[data-theme="dark"] .math-preview-render,
html[data-theme="dark"] .preview-math-output { color:#f0f2f6!important; }
html[data-theme="dark"] .math-editor-heading small,
html[data-theme="dark"] .math-preview-status { color:#bac2cd!important; }
html[data-theme="dark"] .math-type-badge { background:#45272d!important;color:#ffadb1!important;border-color:#674047!important; }
html[data-theme="dark"] .math-template-tools .btn { background:#333741!important;color:#f0f2f5!important;border-color:#4d525e!important; }
html[data-theme="dark"] .math-template-tools .btn:hover { background:#424650!important;border-color:#ed747a!important; }
html[data-theme="dark"] .math-preview-render mjx-container,
html[data-theme="dark"] .preview-math-output mjx-container { color:#f5f6f8!important; }
html[data-theme="dark"] .question-form-hint,
html[data-theme="dark"] .math-editor-panel .muted { color:#c0c6d0!important; }
html[data-theme="dark"] .alert-strip strong,
html[data-theme="dark"] .alert-strip div,
html[data-theme="dark"] .alert-strip p { color:inherit; }
html[data-theme="dark"] .form-grid input:focus,
html[data-theme="dark"] .form-grid textarea:focus,
html[data-theme="dark"] .form-grid select:focus { border-color:#ed7278!important;box-shadow:0 0 0 3px rgba(237,79,82,.16)!important; }
html[data-theme="light"] .math-editor-panel,
html[data-theme="light"] .math-preview-card { background:#f9f9fa;border-color:#e0e1e5;color:#292b31; }
html[data-theme="light"] .math-editor-heading strong,
html[data-theme="light"] .math-preview-label { color:#292b31; }
html[data-theme="light"] .math-editor-heading small,
html[data-theme="light"] .math-preview-status { color:#646b75; }
.math-editor-panel{grid-column:span 2;padding:14px;border:1px solid var(--line);border-radius:11px;background:#fafbfc;display:grid;gap:10px;min-width:0}
.math-editor-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.math-editor-heading strong,.math-editor-heading small{display:block}
.math-editor-heading strong{font-size:12px;margin-bottom:4px}
.math-editor-heading small{font-size:10px;font-weight:400;line-height:1.5;color:var(--muted)}
.math-type-badge{border:1px solid #e7c5c8;border-radius:6px;background:#fff0f1;color:#a82b36;padding:4px 7px;font-size:9px;font-weight:900;letter-spacing:.08em;flex:0 0 auto}
#question-math-latex{font-family:Consolas,'Courier New',monospace;line-height:1.65;min-height:68px;white-space:pre-wrap}
.math-template-tools{display:flex;gap:6px;flex-wrap:wrap}
.math-preview-card{display:grid;gap:6px;border:1px solid #e0e4ea;border-radius:9px;padding:11px 13px;background:#fff;overflow-x:auto;min-height:54px}
.math-preview-label{font-size:9px;font-weight:900;letter-spacing:.14em;color:#757b85}
.math-preview-render{min-height:25px;display:flex;align-items:center;justify-content:flex-start;overflow-x:auto;color:#252830;line-height:1.6}
.math-preview-render mjx-container[display="true"]{margin:0!important}
.math-preview-status{font-size:9px;line-height:1.45;color:#767c86}
.preview-math-output{padding:10px 12px;margin:8px 0;border:1px solid #dedfe4;border-radius:8px;background:rgba(128,132,140,.06);overflow-x:auto;color:#252830}
.preview-math-output mjx-container[display="true"]{margin:0!important}
@media(max-width:760px){.math-editor-panel{grid-column:span 1}.math-template-tools .btn{flex:1 0 auto}.math-editor-heading{align-items:flex-start}}

/* V11 specificity safety net for dark content text that was inheriting legacy inline styles. */
html[data-theme="dark"] .question-preview,
html[data-theme="dark"] .q-content-cell .question-preview,
html[data-theme="dark"] .report-question-text,
html[data-theme="dark"] .report-message,
html[data-theme="dark"] .report-edit-context *,
html[data-theme="dark"] .question-live-preview * { opacity:1!important; text-shadow:none!important; }
html[data-theme="dark"] .question-preview,
html[data-theme="dark"] .q-content-cell .question-preview { color:#f0f2f6!important; }
html[data-theme="dark"] .report-edit-context p { color:#f0e6e8!important; }
html[data-theme="dark"] .report-message { color:#e2e6ec!important; background:#202329!important; border-color:#454a54!important; }

/* V11 final contrast pass: legacy fixed-color labels on dynamic cards */
html[data-theme="dark"] .panel p,
html[data-theme="dark"] .panel .muted,
html[data-theme="dark"] .panel small,
html[data-theme="dark"] .detail-block p,
html[data-theme="dark"] .detail-block small,
html[data-theme="dark"] .question-filter-tools label,
html[data-theme="dark"] .question-filter-tools input,
html[data-theme="dark"] .question-filter-tools select,
html[data-theme="dark"] .table-footer,
html[data-theme="dark"] .activity-copy span,
html[data-theme="dark"] .readiness-copy small,
html[data-theme="dark"] .attention-item p,
html[data-theme="dark"] .attention-item span,
html[data-theme="dark"] .ops-latest span {
  color:#c8ced7!important;
}
html[data-theme="dark"] .panel h1,
html[data-theme="dark"] .panel h2,
html[data-theme="dark"] .panel h3,
html[data-theme="dark"] .panel strong,
html[data-theme="dark"] .table-panel td,
html[data-theme="dark"] .table-panel td strong {
  color:#f0f2f6;
}
html[data-theme="dark"] .report-edit-context { box-shadow: inset 0 0 0 1px rgba(255,255,255,.015); }


/* V12 final contrast pass: theme-safe logo, status card and report context. */
html[data-theme="dark"] .command-banner-mark {
  background:#24272e!important;
  border-color:#4b4f59!important;
  box-shadow:0 8px 22px rgba(0,0,0,.22)!important;
}
html[data-theme="light"] .command-banner-mark {
  background:#fff!important;
  border-color:#e3d8da!important;
}
.command-banner-mark {overflow:hidden;}
.command-banner-mark img.theme-logo {grid-area:1/1;width:100%;height:100%;object-fit:contain;}
.command-banner-mark {display:grid;grid-template:1fr/1fr;}
html[data-theme="dark"] .command-banner-status {
  background:#202329!important;
  border-color:#454a54!important;
  color:#e8edf3!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .command-banner-status strong {color:#f4f6f8!important;}
html[data-theme="dark"] .command-banner-status small {color:#c3cad4!important;}
html[data-theme="dark"] .command-banner-status .secure-dot {box-shadow:0 0 0 3px rgba(39,177,122,.18)!important;}
html[data-theme="light"] .command-banner-status {
  background:#fff!important;
  border-color:#dedfe4!important;
  color:#333740!important;
}
html[data-theme="light"] .command-banner-status strong {color:#30323a!important;}
html[data-theme="light"] .command-banner-status small {color:#6e7480!important;}

/* A report-context banner must be readable in either theme; this selector intentionally wins over older styles. */
html[data-theme="dark"] dialog#question-dialog #question-report-context:not([hidden]) {
  background:#302529!important;
  color:#f4e9eb!important;
  border:1px solid #684149!important;
  border-left:4px solid #f05b61!important;
  box-shadow:0 0 0 1px rgba(255,255,255,.025) inset!important;
  opacity:1!important;
}
html[data-theme="dark"] dialog#question-dialog #question-report-context strong {color:#ffb7bc!important;}
html[data-theme="dark"] dialog#question-dialog #question-report-context span,
html[data-theme="dark"] dialog#question-dialog #question-report-context p,
html[data-theme="dark"] dialog#question-dialog #question-report-context small {color:#e8d8db!important;opacity:1!important;}
html[data-theme="dark"] dialog#question-dialog #question-report-context p {font-size:12px!important;line-height:1.6!important;}
html[data-theme="dark"] dialog#question-dialog .form-grid label,
html[data-theme="dark"] dialog#question-dialog .form-grid label small {color:#d3d8e0!important;opacity:1!important;}
html[data-theme="dark"] dialog#question-dialog .math-repair-assistant,
html[data-theme="dark"] dialog#question-dialog .math-repair-assistant * {opacity:1!important;text-shadow:none!important;}
html[data-theme="dark"] dialog#question-dialog .math-repair-assistant {background:#282b32!important;border-color:#4c505a!important;color:#e9edf2!important;}
html[data-theme="dark"] dialog#question-dialog .math-repair-top strong {color:#f5f6f8!important;}
html[data-theme="dark"] dialog#question-dialog .math-repair-top p,
html[data-theme="dark"] dialog#question-dialog .math-repair-note {color:#c5cbd5!important;}
html[data-theme="dark"] dialog#question-dialog .math-repair-tag {background:#40272d!important;border-color:#674047!important;color:#ffb0b5!important;}
html[data-theme="dark"] dialog#question-dialog #question-math-ocr-source {background:#1a1d23!important;border-color:#505560!important;color:#f0f2f5!important;}
html[data-theme="dark"] dialog#question-dialog #question-math-ocr-source::placeholder {color:#9da6b3!important;}
html[data-theme="dark"] dialog#question-dialog .math-repair-actions .btn.subtle {background:#343740!important;border-color:#505560!important;color:#f0f2f5!important;}
html[data-theme="dark"] dialog#question-dialog .math-repair-actions .btn.subtle:hover {background:#444852!important;border-color:#ed747a!important;}
html[data-theme="dark"] dialog#question-dialog .math-preview-card,
html[data-theme="dark"] dialog#question-dialog .math-preview-render,
html[data-theme="dark"] dialog#question-dialog .preview-math-output {background:#202329!important;color:#f1f3f6!important;border-color:#454a54!important;}
html[data-theme="dark"] dialog#question-dialog .math-preview-status {color:#c3cad4!important;}
html[data-theme="dark"] .table-panel td .question-preview,
html[data-theme="dark"] .table-panel td .report-question-text,
html[data-theme="dark"] .table-panel td .report-message,
html[data-theme="dark"] .table-panel td .q-content-cell,
html[data-theme="dark"] .table-panel td .q-content-cell * {color:#e9edf2!important;opacity:1!important;text-shadow:none!important;}
html[data-theme="dark"] .report-edit-context[hidden] {display:none!important;}

.math-repair-assistant{border:1px solid #e4c5c8;border-radius:10px;background:#fff8f8;padding:12px;display:grid;gap:10px;min-width:0;}
.math-repair-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;}
.math-repair-top strong{display:block;font-size:12px;color:#333740;margin-bottom:4px;}
.math-repair-top p{font-size:10px;line-height:1.5;color:#6b6570;margin:0;max-width:700px;}
.math-repair-tag{display:inline-flex;align-items:center;border:1px solid #e8c4c8;border-radius:20px;padding:4px 8px;background:#fff;color:#a32e38;font-size:9px;font-weight:800;white-space:nowrap;}
.math-ocr-label{display:grid;gap:6px;font-size:10px;font-weight:800;color:var(--ink);}
#question-math-ocr-source{width:100%;min-width:0;resize:vertical;border:1px solid #d8dbe2;border-radius:8px;padding:10px 11px;background:#fff;color:#202126;font-family:Consolas,'Courier New',monospace;font-size:11px;line-height:1.5;}
#question-math-ocr-source:focus{outline:0;border-color:#d9434e;box-shadow:0 0 0 3px rgba(217,67,78,.12);}
.math-repair-actions{display:flex;gap:7px;flex-wrap:wrap;}
.math-repair-note{font-size:10px;line-height:1.5;color:#6d717a;background:rgba(130,135,145,.08);border-radius:7px;padding:8px 9px;}
html[data-theme="light"] .math-repair-assistant{background:#fff8f8;border-color:#ead0d2;}
html[data-theme="light"] .math-repair-top strong{color:#282b31;}
html[data-theme="light"] .math-ocr-label{color:#343840;}
html[data-theme="light"] .math-repair-note{color:#666d77;}
@media(max-width:700px){.math-repair-top{flex-direction:column;}.math-repair-actions .btn{flex:1 1 auto;}}


/* V13 interaction contrast pass: accessible pointer hover + keyboard focus for dark mode. */
html[data-theme="dark"] .btn.subtle:hover,html[data-theme="dark"] .btn.subtle:focus-visible,
html[data-theme="dark"] .btn.secondary:hover,html[data-theme="dark"] .btn.secondary:focus-visible{background:#474b55!important;border-color:#ef6a70!important;color:#fff!important;box-shadow:0 0 0 2px rgba(239,83,90,.18)!important;}
html[data-theme="dark"] .btn.primary:hover,html[data-theme="dark"] .btn.primary:focus-visible{background:#ff6169!important;border-color:#ff9aa0!important;color:#fff!important;filter:none!important;box-shadow:0 0 0 3px rgba(239,83,90,.24)!important;}
html[data-theme="dark"] .link-button:hover,html[data-theme="dark"] .link-button:focus-visible{color:#fff!important;background:#493037!important;border-radius:6px!important;text-decoration:none!important;outline:1px solid #89515a!important;}
html[data-theme="dark"] .link-button.danger:hover,html[data-theme="dark"] .link-button.danger:focus-visible{color:#fff!important;background:#663039!important;outline-color:#ff8e94!important;}
html[data-theme="dark"] .icon-btn:hover,html[data-theme="dark"] .icon-btn:focus-visible{background:#424650!important;color:#fff!important;outline:1px solid #707784!important;}
html[data-theme="dark"] .pill-tabs button:hover,html[data-theme="dark"] .pill-tabs button:focus-visible,html[data-theme="dark"] .pagination button:not(:disabled):hover,html[data-theme="dark"] .pagination button:not(:disabled):focus-visible{background:#434751!important;color:#fff!important;border-color:#737985!important;}
html[data-theme="dark"] .table-panel tbody tr:hover td,html[data-theme="dark"] .table-scroller tbody tr:hover td{background:#30343c!important;color:#f8f9fb!important;}
html[data-theme="dark"] .table-panel tbody tr:hover td strong,html[data-theme="dark"] .table-scroller tbody tr:hover td strong,html[data-theme="dark"] .table-panel tbody tr:hover td small,html[data-theme="dark"] .table-scroller tbody tr:hover td small{color:#f8f9fb!important;}
html[data-theme="dark"] .math-template-tools .btn:hover,html[data-theme="dark"] .math-template-tools .btn:focus-visible,html[data-theme="dark"] .math-repair-actions .btn:hover,html[data-theme="dark"] .math-repair-actions .btn:focus-visible{background:#4b353a!important;color:#fff!important;border-color:#ff777e!important;box-shadow:0 0 0 2px rgba(255,103,111,.2)!important;transform:translateY(-1px);}
html[data-theme="dark"] input:hover,html[data-theme="dark"] select:hover,html[data-theme="dark"] textarea:hover,html[data-theme="dark"] .search-input:hover,html[data-theme="dark"] .filter-select:hover{border-color:#777e8b!important;}
html[data-theme="dark"] input:focus-visible,html[data-theme="dark"] select:focus-visible,html[data-theme="dark"] textarea:focus-visible,html[data-theme="dark"] .search-input:focus-visible,html[data-theme="dark"] .filter-select:focus-visible{border-color:#ff777e!important;box-shadow:0 0 0 3px rgba(255,103,111,.22)!important;}
html[data-theme="dark"] [data-action]:disabled,html[data-theme="dark"] button:disabled{opacity:.55;cursor:not-allowed;filter:none;}
html[data-theme="light"] .btn.subtle:hover,html[data-theme="light"] .btn.secondary:hover,html[data-theme="light"] .link-button:hover,html[data-theme="light"] .icon-btn:hover{border-color:#d94a53;}
html[data-theme="dark"] .report-context-note-label,html[data-theme="dark"] .math-tool-group>span,html[data-theme="dark"] .math-toolbar-help{color:#c7ced8!important;}
html[data-theme="dark"] #question-report-admin-note{background:#1c1f25!important;color:#f5f6f8!important;border-color:#555b66!important;}
html[data-theme="dark"] #question-report-admin-note:hover{border-color:#888f9b!important;}
html[data-theme="dark"] #question-report-admin-note:focus{border-color:#f16b72!important;}

/* Inline report controls and grouped LaTeX shortcut palette. */
.report-context-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;}
.report-context-top>div{min-width:0;}
.report-context-status{flex:0 0 auto;}
.report-context-existing-note{margin:8px 0;padding:8px 10px;border-radius:7px;background:rgba(120,125,135,.08);}
.report-context-existing-note p{margin:4px 0 0;white-space:pre-wrap;}
.report-context-note-label{display:grid;gap:5px;margin-top:10px;font-size:11px;font-weight:800;}
#question-report-admin-note{width:100%;resize:vertical;min-width:0;padding:9px 10px;border-radius:8px;border:1px solid #d8c4c6;background:#fff;color:#27303e;font:inherit;font-size:11px;line-height:1.5;}
.report-editor-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px;}
.report-editor-actions .btn{padding:7px 10px;font-size:11px;}
.report-editor-actions .btn.danger{background:#fff0f1;border:1px solid #f0c8cb;color:#a9232d;}
.report-context-help{display:block;margin-top:8px;line-height:1.5;}
.math-template-tools{display:grid;gap:8px;margin:8px 0;}
.math-tool-group{display:flex;align-items:center;flex-wrap:wrap;gap:6px;padding:7px 8px;border:1px solid var(--line);border-radius:8px;background:var(--surface-1,var(--white));}
.math-tool-group>span{font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);min-width:112px;}
.math-tool-group .btn{min-height:31px;padding:6px 9px;font-size:11px;}
.math-toolbar-help{margin:0;font-size:10px;line-height:1.5;color:var(--muted);}
html[data-theme="dark"] #question-report-context .report-context-existing-note{background:#26292f!important;border:1px solid #464a53!important;}
html[data-theme="dark"] #question-report-context .report-context-existing-note p{color:#e8edf3!important;}
html[data-theme="light"] #question-report-context:not([hidden]){background:#fff7f7;border-color:#efc5c7;color:#493238;}
html[data-theme="light"] #question-report-context strong{color:#9d2832;}
html[data-theme="light"] #question-report-context span,html[data-theme="light"] #question-report-context p,html[data-theme="light"] #question-report-context small{color:#725a60;}
html[data-theme="light"] .math-tool-group{background:#fff;border-color:#e3e6ec;}
html[data-theme="light"] .math-tool-group>span{color:#606b7c;}
html[data-theme="dark"] .math-tool-group{background:#22252b!important;border-color:#494e58!important;}
html[data-theme="dark"] .math-tool-group>span{color:#d3d8e0!important;}
html[data-theme="dark"] .math-toolbar-help{color:#c7ced8!important;}
html[data-theme="dark"] .report-editor-actions .btn.danger{background:#4c292f!important;border-color:#7c444b!important;color:#ffbdc1!important;}
@media(max-width:760px){.math-tool-group>span{width:100%;min-width:0}.report-context-top{flex-direction:column}.report-context-status{align-self:flex-start}}


/* OpenRail Admin V15 — theme-aware scrollbars and dark hover contrast repair */
html[data-theme="light"] {
  color-scheme: light;
}
html[data-theme="light"] .sidebar,
html[data-theme="light"] .nav-list,
html[data-theme="light"] .table-scroller,
html[data-theme="light"] dialog,
html[data-theme="light"] .modal {
  scrollbar-color: #c8cbd1 #f7f7f8 !important;
  scrollbar-width: thin;
}
html[data-theme="light"] .sidebar::-webkit-scrollbar,
html[data-theme="light"] .nav-list::-webkit-scrollbar,
html[data-theme="light"] .table-scroller::-webkit-scrollbar,
html[data-theme="light"] dialog::-webkit-scrollbar,
html[data-theme="light"] .modal::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
html[data-theme="light"] .sidebar::-webkit-scrollbar-track,
html[data-theme="light"] .nav-list::-webkit-scrollbar-track,
html[data-theme="light"] .table-scroller::-webkit-scrollbar-track,
html[data-theme="light"] dialog::-webkit-scrollbar-track,
html[data-theme="light"] .modal::-webkit-scrollbar-track {
  background: #f7f7f8 !important;
  border-radius: 8px;
}
html[data-theme="light"] .sidebar::-webkit-scrollbar-thumb,
html[data-theme="light"] .nav-list::-webkit-scrollbar-thumb,
html[data-theme="light"] .table-scroller::-webkit-scrollbar-thumb,
html[data-theme="light"] dialog::-webkit-scrollbar-thumb,
html[data-theme="light"] .modal::-webkit-scrollbar-thumb {
  background: #c8cbd1 !important;
  border: 2px solid #f7f7f8 !important;
  border-radius: 8px;
}
html[data-theme="light"] .sidebar::-webkit-scrollbar-thumb:hover,
html[data-theme="light"] .nav-list::-webkit-scrollbar-thumb:hover,
html[data-theme="light"] .table-scroller::-webkit-scrollbar-thumb:hover,
html[data-theme="light"] dialog::-webkit-scrollbar-thumb:hover,
html[data-theme="light"] .modal::-webkit-scrollbar-thumb:hover {
  background: #aeb3bb !important;
}
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .nav-list,
html[data-theme="dark"] .table-scroller,
html[data-theme="dark"] dialog,
html[data-theme="dark"] .modal {
  scrollbar-color: #666b75 #202228 !important;
  scrollbar-width: thin;
}
html[data-theme="dark"] .sidebar::-webkit-scrollbar,
html[data-theme="dark"] .nav-list::-webkit-scrollbar,
html[data-theme="dark"] .table-scroller::-webkit-scrollbar,
html[data-theme="dark"] dialog::-webkit-scrollbar,
html[data-theme="dark"] .modal::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
html[data-theme="dark"] .sidebar::-webkit-scrollbar-track,
html[data-theme="dark"] .nav-list::-webkit-scrollbar-track,
html[data-theme="dark"] .table-scroller::-webkit-scrollbar-track,
html[data-theme="dark"] dialog::-webkit-scrollbar-track,
html[data-theme="dark"] .modal::-webkit-scrollbar-track {
  background: #202228 !important;
  border-radius: 8px;
}
html[data-theme="dark"] .sidebar::-webkit-scrollbar-thumb,
html[data-theme="dark"] .nav-list::-webkit-scrollbar-thumb,
html[data-theme="dark"] .table-scroller::-webkit-scrollbar-thumb,
html[data-theme="dark"] dialog::-webkit-scrollbar-thumb,
html[data-theme="dark"] .modal::-webkit-scrollbar-thumb {
  background: #666b75 !important;
  border: 2px solid #202228 !important;
  border-radius: 8px;
}
html[data-theme="dark"] .sidebar::-webkit-scrollbar-thumb:hover,
html[data-theme="dark"] .nav-list::-webkit-scrollbar-thumb:hover,
html[data-theme="dark"] .table-scroller::-webkit-scrollbar-thumb:hover,
html[data-theme="dark"] dialog::-webkit-scrollbar-thumb:hover,
html[data-theme="dark"] .modal::-webkit-scrollbar-thumb:hover {
  background: #858c98 !important;
}

/* The attention-item base hover was pale pink, causing a bright white flash in dark mode. */
html[data-theme="dark"] .attention-item:hover,
html[data-theme="dark"] .attention-item:focus-visible {
  background: #343740 !important;
  color: #f5f6f8 !important;
  border-radius: 8px;
  outline: none;
  box-shadow: inset 3px 0 #ed535a;
}
html[data-theme="dark"] .attention-item:hover strong,
html[data-theme="dark"] .attention-item:focus-visible strong {
  color: #ffffff !important;
}
html[data-theme="dark"] .attention-item:hover small,
html[data-theme="dark"] .attention-item:focus-visible small {
  color: #d7dbe2 !important;
}
html[data-theme="dark"] .attention-item:hover .attention-symbol,
html[data-theme="dark"] .attention-item:focus-visible .attention-symbol {
  background: #4b2c32 !important;
  color: #ffb6bb !important;
  border: 1px solid #704149;
}
html[data-theme="dark"] .attention-item:hover .attention-arrow,
html[data-theme="dark"] .attention-item:focus-visible .attention-arrow {
  color: #ff8c93 !important;
}
html[data-theme="dark"] .attention-item:focus-visible {
  outline: 2px solid #ed777d;
  outline-offset: -2px;
}
html[data-theme="dark"] .quick-action:hover,
html[data-theme="dark"] .quick-action:focus-visible,
html[data-theme="dark"] .workflow-task:hover,
html[data-theme="dark"] .workflow-task:focus-within {
  background: #2c3038 !important;
  border-color: #666c77 !important;
  color: #f4f6f8 !important;
}
html[data-theme="dark"] .nav-item:hover,
html[data-theme="dark"] .nav-item:focus-visible {
  background: #343840 !important;
  color: #ffffff !important;
  outline: 1px solid #555b65;
  outline-offset: -1px;
}
html[data-theme="dark"] .nav-item.active:hover,
html[data-theme="dark"] .nav-item.active:focus-visible {
  background: #48282e !important;
  color: #ffffff !important;
  box-shadow: inset 3px 0 #ff7178 !important;
}
html[data-theme="dark"] .link-button:hover,
html[data-theme="dark"] .link-button:focus-visible {
  color: #ffffff !important;
  background: #3b3036 !important;
}
html[data-theme="dark"] .link-button.danger:hover,
html[data-theme="dark"] .link-button.danger:focus-visible {
  color: #ffffff !important;
  background: #63343b !important;
}

/* V16 Question Revision History */
.revision-reason-label input{margin-bottom:2px}
.revision-history-panel{margin:0 0 14px;padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2,var(--canvas));color:var(--ink)}
.revision-history-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:12px}
.revision-history-heading h3{margin:2px 0 5px;font-size:17px;color:var(--ink)}
.revision-history-heading p{margin:0;max-width:720px;color:var(--muted);font-size:12px;line-height:1.55}
.revision-history-list{display:grid;gap:10px;max-height:370px;overflow:auto;padding:2px 4px 2px 0;overscroll-behavior:contain}
.revision-history-loading,.revision-history-error,.revision-history-empty{display:flex;align-items:center;gap:12px;padding:14px;border:1px dashed var(--line);border-radius:10px;background:var(--white);color:var(--muted);font-size:13px}
.revision-history-empty strong,.revision-history-error strong{display:block;color:var(--ink);margin-bottom:3px}
.revision-history-empty p,.revision-history-error p{margin:2px 0 0;color:var(--muted);font-size:12px;line-height:1.5}
.revision-empty-icon{display:grid;place-items:center;flex:0 0 36px;height:36px;border-radius:10px;background:var(--blue2);color:var(--blue);font-size:22px;font-weight:800}
.revision-card{border:1px solid var(--line);border-radius:12px;background:var(--white);overflow:hidden;min-width:0}
.revision-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:12px 14px 10px;border-bottom:1px solid var(--line);background:var(--surface-2,var(--canvas))}
.revision-card-head h4{margin:7px 0 3px;font-size:13px;color:var(--ink);font-weight:800;overflow-wrap:anywhere}
.revision-card-head p{margin:0;color:var(--muted);font-size:11px}
.revision-number,.revision-change-type{display:inline-flex;align-items:center;margin-right:6px;border-radius:999px;padding:4px 8px;background:var(--blue2);color:var(--blue);font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.revision-change-type{background:var(--green-bg);color:var(--green)}
.revision-change-type.is-restore{background:var(--amber-bg);color:var(--amber)}
.revision-card-state{display:grid;justify-items:end;gap:6px;min-width:110px;color:var(--muted);font-size:11px}
.revision-card-state>span:not(.status-pill){display:flex;gap:4px;align-items:center}
.revision-card-state b{color:var(--ink)}
.revision-snapshot-preview{padding:12px 14px 8px;color:var(--ink);overflow-wrap:anywhere}
.revision-snapshot-preview>strong{display:block;font-size:13px;line-height:1.55}
.revision-snapshot-preview>p{margin:8px 0 0;color:var(--muted);font-size:12px;line-height:1.5}
.revision-formula{display:block;margin-top:8px;padding:8px 10px;border:1px solid var(--line);border-radius:8px;background:var(--canvas);color:var(--ink);white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px}
.revision-full-details{margin:0 14px 10px;border-top:1px solid var(--line);padding-top:8px}
.revision-full-details summary{cursor:pointer;color:var(--blue);font-size:12px;font-weight:800;padding:5px 0}
.revision-detail-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:8px 0}
.revision-detail-grid>div{display:grid;gap:3px;padding:8px;border-radius:8px;background:var(--canvas);min-width:0}
.revision-detail-grid span{font-size:10px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.revision-detail-grid b{font-size:12px;color:var(--ink);overflow-wrap:anywhere}
.revision-options-list{margin:8px 0;padding:0;list-style:none;display:grid;gap:6px}
.revision-options-list li{display:grid;grid-template-columns:22px minmax(0,1fr) minmax(0,1fr);align-items:start;gap:8px;padding:8px;border:1px solid var(--line);border-radius:8px;font-size:12px;color:var(--ink)}
.revision-options-list li>small{color:var(--muted);font-size:11px;overflow-wrap:anywhere}
.revision-explanation{padding:10px;border-radius:8px;background:var(--canvas);font-size:12px;color:var(--ink)}
.revision-explanation b{display:block;margin:2px 0 4px;font-size:11px}
.revision-explanation p{margin:0 0 10px;color:var(--muted);white-space:pre-wrap;overflow-wrap:anywhere}
.revision-card-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px;padding:0 14px 12px}
.revision-history-footnote{margin-top:10px;color:var(--muted);font-size:11px;line-height:1.5}
html[data-theme="dark"] .revision-history-panel{background:#202329!important;border-color:#41454e!important;color:#e8ebf0!important}
html[data-theme="dark"] .revision-history-heading h3,html[data-theme="dark"] .revision-card-head h4,html[data-theme="dark"] .revision-snapshot-preview,html[data-theme="dark"] .revision-detail-grid b,html[data-theme="dark"] .revision-card-state b,html[data-theme="dark"] .revision-history-empty strong,html[data-theme="dark"] .revision-history-error strong{color:#f1f3f6!important}
html[data-theme="dark"] .revision-history-heading p,html[data-theme="dark"] .revision-card-head p,html[data-theme="dark"] .revision-snapshot-preview>p,html[data-theme="dark"] .revision-detail-grid span,html[data-theme="dark"] .revision-options-list li>small,html[data-theme="dark"] .revision-explanation p,html[data-theme="dark"] .revision-history-footnote,html[data-theme="dark"] .revision-history-empty p,html[data-theme="dark"] .revision-history-error p{color:#b8bfca!important}
html[data-theme="dark"] .revision-card,html[data-theme="dark"] .revision-history-loading,html[data-theme="dark"] .revision-history-error,html[data-theme="dark"] .revision-history-empty{background:#25282f!important;border-color:#41454e!important;color:#e8ebf0!important}
html[data-theme="dark"] .revision-card-head{background:#2b2e36!important;border-color:#41454e!important}
html[data-theme="dark"] .revision-snapshot-preview{background:#25282f!important}
html[data-theme="dark"] .revision-formula,html[data-theme="dark"] .revision-detail-grid>div,html[data-theme="dark"] .revision-explanation{background:#1b1d22!important;border-color:#444852!important;color:#eceff4!important}
html[data-theme="dark"] .revision-full-details{border-top-color:#41454e!important}
html[data-theme="dark"] .revision-options-list li{background:#202329!important;border-color:#41454e!important;color:#e7eaf0!important}
html[data-theme="dark"] .revision-number{background:#38272c!important;color:#ffb5b8!important}
html[data-theme="dark"] .revision-change-type{background:#203a30!important;color:#98e4bd!important}
html[data-theme="dark"] .revision-change-type.is-restore{background:#3c3020!important;color:#f4d08b!important}
@media(max-width:720px){.revision-history-heading,.revision-card-head{flex-direction:column;align-items:stretch}.revision-card-state{justify-items:start}.revision-detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.revision-card-actions{justify-content:stretch}.revision-card-actions .btn{width:100%}}


/* V17 OCR Repair Workbench — comparison-first, with local-only source preview. */
.ocr-workbench-grid{display:grid;grid-template-columns:minmax(0,.88fr) minmax(0,1.12fr);gap:12px;align-items:start;min-width:0}
.ocr-source-pane,.ocr-text-pane{min-width:0;border:1px solid var(--line);border-radius:10px;background:var(--surface-1,#fff);padding:11px;display:grid;gap:9px;align-content:start}
.ocr-pane-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;padding-bottom:8px;border-bottom:1px solid var(--line)}
.ocr-pane-heading strong{font-size:11px;color:var(--ink)}
.ocr-pane-heading>span{font-size:9px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;border:1px solid var(--line);border-radius:999px;padding:4px 7px;color:var(--muted)}
.ocr-file-picker{display:flex!important;align-items:center;justify-content:center;min-height:36px;padding:8px 10px;border:1px dashed var(--line);border-radius:8px;background:var(--canvas);color:var(--ink)!important;font-size:11px;font-weight:800;cursor:pointer}
.ocr-file-picker:hover{border-color:var(--red);background:var(--surface-2,var(--canvas))}
.ocr-file-picker input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.ocr-source-actions{display:flex;gap:6px;flex-wrap:wrap}
.ocr-source-preview{display:grid;gap:6px;border:1px solid var(--line);border-radius:8px;padding:7px;background:var(--canvas);min-width:0}
.ocr-source-preview img{display:block;max-width:100%;width:100%;max-height:330px;object-fit:contain;background:#fff;border-radius:5px}
.ocr-source-preview iframe{width:100%;height:340px;border:0;border-radius:5px;background:#fff}
.ocr-source-name{font-size:10px;line-height:1.5;color:var(--muted);overflow-wrap:anywhere}
.ocr-source-empty{min-height:180px;display:grid;align-content:center;justify-items:center;gap:7px;padding:18px;border:1px dashed var(--line);border-radius:8px;background:var(--canvas);text-align:center;color:var(--muted)}
.ocr-source-empty strong{font-size:12px;color:var(--ink)}
.ocr-source-empty small{font-size:10px;line-height:1.5;max-width:220px}
.ocr-source-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:11px;background:var(--surface-2,var(--canvas));color:var(--red);font-size:24px}
.ocr-source-note{margin:0;color:var(--muted);font-size:9px;line-height:1.5}
.ocr-workbench-actions{display:flex;gap:6px;flex-wrap:wrap}
.ocr-workbench-actions .btn{margin:0}
.ocr-review-checklist{display:grid;gap:6px;padding:8px;border:1px solid var(--line);border-radius:8px;background:var(--canvas)}
.ocr-review-checklist label{display:flex!important;grid-template-columns:none!important;align-items:flex-start;gap:8px;color:var(--ink)!important;font-size:10px;font-weight:600!important;line-height:1.45}
.ocr-review-checklist input{flex:0 0 auto;margin:2px 0 0;accent-color:var(--red)}
.ocr-workbench-results{display:grid;gap:8px;min-width:0}
.ocr-workbench-empty{padding:11px;border:1px dashed var(--line);border-radius:8px;color:var(--muted);font-size:10px;line-height:1.6}
.ocr-candidate-head{display:flex;justify-content:space-between;align-items:center;gap:8px}
.ocr-candidate-head>strong{font-size:11px;color:var(--ink)}
.ocr-candidate-badge{border-radius:999px;padding:4px 7px;background:var(--surface-2,var(--canvas));color:var(--muted);font-size:9px;font-weight:800}
.ocr-candidate-field{display:grid;gap:5px;min-width:0;padding:8px;border:1px solid var(--line);border-radius:8px;background:var(--canvas)}
.ocr-candidate-field>small,.ocr-candidate-answer>small{font-size:9px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);font-weight:800}
.ocr-candidate-field p{margin:0;color:var(--ink);font-size:11px;line-height:1.5;overflow-wrap:anywhere;white-space:pre-wrap}
.ocr-candidate-field code{font-size:10px;color:var(--ink);white-space:pre-wrap;overflow-wrap:anywhere}
.ocr-candidate-formula{padding:8px;border:1px solid var(--line);border-radius:6px;background:var(--surface-1,#fff);color:var(--ink);overflow-x:auto;min-height:32px}
.ocr-candidate-options{display:grid;gap:5px}
.ocr-candidate-option{display:grid;grid-template-columns:22px minmax(0,1fr);gap:6px;align-items:start;padding:7px;border:1px solid var(--line);border-radius:7px;background:var(--surface-1,#fff);font-size:10px;min-width:0}
.ocr-candidate-option>b{display:grid;place-items:center;width:20px;height:20px;border-radius:5px;background:var(--surface-2,var(--canvas));color:var(--red);font-size:10px}
.ocr-candidate-option span{color:var(--ink);overflow-wrap:anywhere;line-height:1.45}
.ocr-candidate-answer{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px;border:1px solid var(--line);border-radius:8px;background:var(--surface-1,#fff)}
.ocr-candidate-answer>strong{font-size:12px;color:var(--ink)}
.ocr-candidate-warnings{padding:9px;border:1px solid #e7c98d;border-radius:8px;background:#fff9ed;color:#765017;font-size:10px;line-height:1.5}
.ocr-candidate-warnings>strong{display:block;margin-bottom:4px}
.ocr-warning-list{margin:0;padding-left:17px;display:grid;gap:4px}
.ocr-warning-list li{overflow-wrap:anywhere}
.ocr-no-warnings{margin:0}
.ocr-workbench-apply-note{margin:0;color:var(--muted);font-size:9px;line-height:1.5}
html[data-theme="dark"] .ocr-source-pane,html[data-theme="dark"] .ocr-text-pane{background:#23262d!important;border-color:#454a54!important}
html[data-theme="dark"] .ocr-pane-heading{border-color:#454a54!important}
html[data-theme="dark"] .ocr-pane-heading strong,html[data-theme="dark"] .ocr-source-empty strong,html[data-theme="dark"] .ocr-candidate-head>strong,html[data-theme="dark"] .ocr-candidate-field p,html[data-theme="dark"] .ocr-candidate-field code,html[data-theme="dark"] .ocr-candidate-option span,html[data-theme="dark"] .ocr-candidate-answer>strong{color:#f0f2f6!important}
html[data-theme="dark"] .ocr-pane-heading>span,html[data-theme="dark"] .ocr-source-name,html[data-theme="dark"] .ocr-source-note,html[data-theme="dark"] .ocr-source-empty,html[data-theme="dark"] .ocr-candidate-field>small,html[data-theme="dark"] .ocr-candidate-answer>small,html[data-theme="dark"] .ocr-workbench-empty,html[data-theme="dark"] .ocr-workbench-apply-note{color:#b9c1cd!important}
html[data-theme="dark"] .ocr-file-picker,html[data-theme="dark"] .ocr-source-empty,html[data-theme="dark"] .ocr-source-preview,html[data-theme="dark"] .ocr-candidate-field,html[data-theme="dark"] .ocr-candidate-option,html[data-theme="dark"] .ocr-candidate-answer,html[data-theme="dark"] .ocr-workbench-empty,html[data-theme="dark"] .ocr-review-checklist{background:#1b1e24!important;border-color:#454a54!important}
html[data-theme="dark"] .ocr-candidate-formula{background:#17191e!important;border-color:#4a505b!important;color:#f0f2f6!important}
html[data-theme="dark"] .ocr-candidate-warnings{background:#342b1b!important;border-color:#6d5526!important;color:#f2d598!important}
html[data-theme="light"] .ocr-source-pane,html[data-theme="light"] .ocr-text-pane{background:#fff!important}
@media(max-width:800px){.ocr-workbench-grid{grid-template-columns:minmax(0,1fr)}.ocr-source-empty{min-height:125px}.ocr-source-preview iframe{height:280px}}
@media(max-width:520px){.ocr-workbench-actions .btn{flex:1 1 42%}.ocr-pane-heading{align-items:flex-start}}


/* V18 Publishing Approval Queue */
.publication-metrics{margin-bottom:16px}
.publication-guidance{margin-top:2px}
.publication-tabs{flex-wrap:wrap;justify-content:flex-end}
.publication-table{min-width:1040px}
.publication-exam-cell{min-width:205px}
.publication-exam-cell strong{display:block;line-height:1.4}
.publication-table td small{display:block;margin-top:4px;color:var(--muted);font-size:9px;line-height:1.4;max-width:280px;white-space:normal}
.publication-note{max-width:240px;overflow-wrap:anywhere}
.publication-blockers{display:flex;flex-direction:column;align-items:flex-start;gap:5px;max-width:300px}
.publication-actions{display:flex;flex-wrap:wrap;gap:6px;align-items:center;min-width:150px;max-width:270px}
.publication-actions .btn{white-space:nowrap}
.status-pill.status-in_review{background:#fff4d9;color:#8b6011;border-color:#f4e1ac}
.status-pill.status-changes_requested{background:#fff0f1;color:#a22b34;border-color:#f0c8cc}
.status-pill.status-approved{background:#e7f7ee;color:#13784f;border-color:#c8ebd7}
html[data-theme="dark"] .status-pill.status-in_review{background:#49381e!important;color:#f4d08b!important}
html[data-theme="dark"] .status-pill.status-changes_requested{background:#45262b!important;color:#ffb0b4!important}
html[data-theme="dark"] .status-pill.status-approved{background:#203d31!important;color:#92e0b8!important}
@media(max-width:760px){.publication-tabs{justify-content:flex-start}.publication-actions{min-width:120px}}


/* V19 dark-mode interaction repair: prevent legacy white/pink focus and hover surfaces. */
html[data-theme="dark"] .attention-item,
html[data-theme="dark"] .attention-item:hover,
html[data-theme="dark"] .attention-item:focus,
html[data-theme="dark"] .attention-item:focus-visible,
html[data-theme="dark"] .attention-item:active {
  -webkit-appearance: none !important;
  appearance: none !important;
  background: #25282f !important;
  background-color: #25282f !important;
  color: #eef0f4 !important;
  border-color: #41454e !important;
  text-decoration: none !important;
  opacity: 1 !important;
}
html[data-theme="dark"] .attention-item:hover,
html[data-theme="dark"] .attention-item:focus,
html[data-theme="dark"] .attention-item:focus-visible {
  background: #343840 !important;
  background-color: #343840 !important;
  box-shadow: inset 3px 0 #ed535a !important;
}
html[data-theme="dark"] .attention-item strong,
html[data-theme="dark"] .attention-item:hover strong,
html[data-theme="dark"] .attention-item:focus strong,
html[data-theme="dark"] .attention-item:focus-visible strong,
html[data-theme="dark"] .attention-item:active strong {
  color: #f7f8fa !important;
}
html[data-theme="dark"] .attention-item small,
html[data-theme="dark"] .attention-item:hover small,
html[data-theme="dark"] .attention-item:focus small,
html[data-theme="dark"] .attention-item:focus-visible small,
html[data-theme="dark"] .attention-item:active small {
  color: #c3c9d3 !important;
}
html[data-theme="dark"] .attention-item .attention-symbol {
  background: #3a2a30 !important;
  color: #ffb6bb !important;
  border: 1px solid #704149 !important;
}
html[data-theme="dark"] .attention-item .attention-arrow { color: #ff8c93 !important; }
html[data-theme="dark"] .attention-item:focus-visible { outline: 2px solid #ed777d !important; outline-offset: -2px !important; }
html[data-theme="light"] .attention-item:hover,
html[data-theme="light"] .attention-item:focus-visible {
  background: #fff4f4 !important;
  color: #33353c !important;
  box-shadow: inset 3px 0 #e84b55 !important;
  border-radius: 7px;
}

/* V19 Blueprint & shift comparison — all surfaces follow the selected theme. */
.blueprint-cohort-panel{margin-bottom:14px}
.blueprint-cohort-control{display:grid;grid-template-columns:minmax(125px,180px) minmax(260px,1fr);gap:7px 12px;align-items:center;max-width:900px}
.blueprint-cohort-label{font-size:11px;font-weight:800;color:var(--ink)}
.blueprint-cohort-control select{min-width:0;width:100%;padding:10px 11px;border:1px solid var(--line);border-radius:8px;background:var(--white);color:var(--ink);font:inherit;font-size:11px}
.blueprint-data-note{grid-column:2;color:var(--muted);font-size:9px;line-height:1.5}
.blueprint-metrics{margin-bottom:14px}
.blueprint-shift-table{min-width:920px}
.blueprint-shift-table td small,.blueprint-topic-table td small{display:block;margin-top:4px;color:var(--muted);font-size:9px;line-height:1.4}
.blueprint-coverage{display:inline-flex;min-width:47px;justify-content:center;padding:4px 6px;border-radius:999px;background:var(--surface-2);color:var(--ink);font-size:10px;font-weight:800}
.blueprint-coverage.complete{background:#e1f6e9;color:#13784d}
.blueprint-coverage.partial{background:#fff2d9;color:#8b6011}
.blueprint-coverage.empty{background:#fae7e9;color:#a22b34}
.blueprint-progress{height:4px;max-width:100px;border-radius:999px;background:var(--surface-2);overflow:hidden;margin-top:6px}
.blueprint-progress span{display:block;height:100%;border-radius:inherit;background:var(--rail-red,#e84b55)}
.blueprint-matrix-scroll{max-height:470px}
.blueprint-matrix{min-width:max-content;border-collapse:separate;border-spacing:0}
.blueprint-matrix th,.blueprint-matrix td{min-width:56px;text-align:center;white-space:nowrap;padding:9px 7px}
.blueprint-matrix thead th{position:sticky;top:0;z-index:3;background:var(--surface-2,var(--canvas))}
.blueprint-matrix thead th:first-child,.blueprint-matrix tbody th:first-child{position:sticky;left:0;z-index:4;min-width:210px;max-width:250px;text-align:left;white-space:normal;background:var(--white);box-shadow:1px 0 0 var(--line)}
.blueprint-matrix tbody th{font-size:10px;color:var(--ink);font-weight:700}
.blueprint-matrix tbody th strong,.blueprint-matrix tbody th small{display:block}
.blueprint-matrix tbody th small{margin-top:4px;color:var(--muted);font-size:9px;font-weight:500}
.blueprint-matrix td{font-size:11px;font-weight:800;color:var(--ink);background:var(--white)}
.blueprint-matrix td small{display:block;margin-top:2px;color:var(--muted);font-size:8px;font-weight:600}
.blueprint-matrix td.has-count{background:rgba(26,146,94,.09);color:var(--ink)}
.blueprint-matrix td.zero-count{background:var(--canvas);color:var(--muted);font-weight:500}
.blueprint-topic-table{min-width:680px}
.blueprint-topic-table td:first-child{min-width:210px;white-space:normal;overflow-wrap:anywhere}
.blueprint-note{margin-top:14px}
html[data-theme="dark"] .blueprint-cohort-control select{background:#1b1d22!important;border-color:#4a4e58!important;color:#f2f3f6!important;color-scheme:dark}
html[data-theme="dark"] .blueprint-coverage.complete{background:#203d31!important;color:#92e0b8!important}
html[data-theme="dark"] .blueprint-coverage.partial{background:#49381e!important;color:#f4d08b!important}
html[data-theme="dark"] .blueprint-coverage.empty{background:#45262b!important;color:#ffb0b4!important}
html[data-theme="dark"] .blueprint-matrix thead th,
html[data-theme="dark"] .blueprint-matrix thead th:first-child,
html[data-theme="dark"] .blueprint-matrix tbody th:first-child{background:#30333b!important;color:#f1f2f5!important;box-shadow:1px 0 0 #424650}
html[data-theme="dark"] .blueprint-matrix td{background:#25282f!important;color:#e3e6ec!important}
html[data-theme="dark"] .blueprint-matrix td.has-count{background:#24372f!important;color:#bfe8d0!important}
html[data-theme="dark"] .blueprint-matrix td.zero-count{background:#1e2026!important;color:#7f8793!important}
html[data-theme="dark"] .blueprint-matrix td small,html[data-theme="dark"] .blueprint-matrix tbody th small{color:#aeb6c2!important}
html[data-theme="dark"] .blueprint-progress{background:#3d414b!important}
@media(max-width:780px){.blueprint-cohort-control{grid-template-columns:minmax(0,1fr)}.blueprint-data-note{grid-column:1}.blueprint-matrix thead th:first-child,.blueprint-matrix tbody th:first-child{min-width:165px;max-width:190px}.blueprint-matrix th,.blueprint-matrix td{min-width:50px;padding:8px 6px}}


/* V21 — Topic tagging / bulk classification workbench */
.topic-workbench-note{margin-bottom:16px}
.topic-metrics{margin-bottom:16px}
.topic-filter-panel{margin-bottom:16px}
.topic-filter-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) auto;gap:12px;padding:18px 20px;align-items:end}
.topic-filter-grid label{display:flex;flex-direction:column;gap:7px;font-size:11px;font-weight:800;color:var(--muted);min-width:0}
.topic-filter-grid input,.topic-filter-grid select,.topic-bulk-actions input,.topic-label-input,.topic-review-select{width:100%;min-width:0;border:1px solid var(--line);border-radius:8px;background:var(--white);color:var(--ink);padding:10px 11px;font-size:11px;outline:none}
.topic-filter-grid input:focus,.topic-filter-grid select:focus,.topic-bulk-actions input:focus,.topic-label-input:focus,.topic-review-select:focus{border-color:var(--rail-red);box-shadow:0 0 0 3px rgba(237,79,82,.12)}
.topic-filter-actions{display:flex;gap:7px;align-items:center}
.topic-table-head{align-items:center;gap:15px;flex-wrap:wrap}
.topic-page-controls{display:flex;gap:7px;flex-wrap:wrap}
.topic-bulk-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:13px 17px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:var(--white)}
.topic-select-all{display:flex;align-items:center;gap:7px;white-space:nowrap;font-size:11px;font-weight:800}
.topic-select-all input,.topic-row-select{width:15px;height:15px;accent-color:var(--rail-red)}
.topic-bulk-actions{display:flex;align-items:center;gap:7px;flex:1;flex-wrap:wrap}
.topic-bulk-actions input{max-width:240px;flex:1 1 180px}
.topic-table-scroller{max-height:calc(100vh - 360px);min-height:260px;overflow:auto}
.topic-label-table{min-width:1080px}
.topic-label-table th:first-child,.topic-label-table td:first-child{width:42px;text-align:center}
.topic-label-table td{vertical-align:top}
.topic-label-table td:nth-child(2){min-width:145px}
.topic-label-table td:nth-child(3){min-width:320px;max-width:430px}
.topic-label-table td:nth-child(4){min-width:180px;width:210px}
.topic-label-table td:nth-child(5){min-width:120px;width:140px}
.topic-label-table small{display:block;margin-top:4px;line-height:1.4;overflow-wrap:anywhere}
.topic-exam-label{font-size:10px;color:var(--muted);display:block;margin-bottom:6px}
.topic-question-copy{font-size:12px;font-weight:650;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}
.topic-hindi-copy{color:var(--muted);white-space:pre-wrap}
.topic-math-copy{color:#b84c55;white-space:pre-wrap}
.topic-current-label{color:var(--green);font-size:9px!important;font-weight:800;letter-spacing:.02em}
.topic-current-label.is-missing{color:var(--amber)}
.topic-label-input{min-width:155px}
.topic-review-select{padding:9px 7px}
.topic-footer{border-top:1px solid var(--line);gap:10px;flex-wrap:wrap}
html[data-theme="dark"] .topic-filter-panel,html[data-theme="dark"] .topic-bulk-toolbar{background:#24272e;border-color:#3a3e46}
html[data-theme="dark"] .topic-filter-grid label,html[data-theme="dark"] .topic-select-all{color:#c2c8d2}
html[data-theme="dark"] .topic-filter-grid input,html[data-theme="dark"] .topic-filter-grid select,html[data-theme="dark"] .topic-bulk-actions input,html[data-theme="dark"] .topic-label-input,html[data-theme="dark"] .topic-review-select{background:#1c1f25!important;border-color:#444852!important;color:#f1f3f6!important;color-scheme:dark}
html[data-theme="dark"] .topic-question-copy{color:#e3e7ed}
html[data-theme="dark"] .topic-exam-label,html[data-theme="dark"] .topic-hindi-copy,html[data-theme="dark"] .topic-footer{color:#aeb6c2}
html[data-theme="dark"] .topic-math-copy{color:#ff979d}
html[data-theme="dark"] .topic-current-label{color:#91ddb4}
html[data-theme="dark"] .topic-current-label.is-missing{color:#f3cf89}
html[data-theme="dark"] .topic-label-table td,html[data-theme="dark"] .topic-label-table th{border-color:#3a3e46}
@media(max-width:1120px){.topic-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.topic-filter-actions{grid-column:1/-1}}
@media(max-width:760px){.topic-filter-grid{grid-template-columns:1fr;padding:14px}.topic-filter-actions{grid-column:auto}.topic-table-scroller{max-height:none}.topic-bulk-actions{width:100%}.topic-bulk-actions input{max-width:none}.topic-table-head{align-items:flex-start}.topic-page-controls{width:100%}}


/* V22 — safe duplicate question review workspace */
.duplicate-guidance,.duplicate-cap-note,.duplicate-safe-note{margin-bottom:14px}
.duplicate-filter-panel{margin-bottom:16px}
.duplicate-review-controls{display:grid;gap:7px;margin-top:9px;min-width:230px;max-width:500px}
.duplicate-review-status{font-size:10px;line-height:1.45;color:var(--muted);overflow-wrap:anywhere}
.duplicate-review-status.is-reviewed{color:var(--ink)}
.duplicate-review-status strong{font-weight:850}
.duplicate-review-note{font-size:10px;line-height:1.45;color:var(--muted);overflow-wrap:anywhere;white-space:pre-wrap;padding:7px 9px;border-radius:7px;background:var(--surface-2)}
.duplicate-review-buttons{display:flex;flex-wrap:wrap;gap:6px}
.duplicate-review-buttons .btn{white-space:normal;line-height:1.3;padding:6px 8px;font-size:10px}
.duplicate-review-summary{margin-top:-4px;margin-bottom:16px}
html[data-theme="dark"] .duplicate-review-status.is-reviewed{color:#e4e9f1!important}
html[data-theme="dark"] .duplicate-review-note{background:#30343c!important;color:#c6ceda!important;border:1px solid #444a55}
html[data-theme="dark"] .duplicate-review-buttons .btn.secondary{background:#30343c!important;color:#edf0f5!important;border-color:#4a505c!important}
html[data-theme="dark"] .duplicate-review-buttons .btn.secondary:hover,html[data-theme="dark"] .duplicate-review-buttons .btn.secondary:focus-visible{background:#3b404a!important;color:#fff!important;border-color:#626a78!important}

.duplicate-filter-grid{display:grid;grid-template-columns:minmax(230px,2fr) minmax(170px,1fr) minmax(170px,1fr) auto;gap:12px;padding:18px 20px;align-items:end}
.duplicate-filter-grid label{display:flex;flex-direction:column;gap:7px;min-width:0;font-size:11px;font-weight:800;color:var(--muted)}
.duplicate-filter-grid select{width:100%;min-width:0;padding:10px 11px;border:1px solid var(--line);border-radius:8px;background:var(--white);color:var(--ink);font:inherit;font-size:11px}
.duplicate-metrics{margin-bottom:16px}
.duplicate-table-scroll{max-height:calc(100vh - 350px);min-height:190px;overflow:auto}
.duplicate-exact-table{min-width:1050px}
.duplicate-exact-table td{vertical-align:top}
.duplicate-exact-table td:first-child{min-width:160px}
.duplicate-group-prompt{max-width:340px;min-width:240px;white-space:pre-wrap;overflow-wrap:anywhere;font-size:11px;line-height:1.5}
.duplicate-members-details{min-width:300px}
.duplicate-members-details summary{cursor:pointer;display:inline-flex;padding:6px 9px;border:1px solid var(--line);border-radius:7px;font-size:10px;font-weight:800;color:var(--ink);background:var(--surface-2)}
.duplicate-members-list{min-width:320px;max-width:680px;margin-top:10px;display:grid;gap:8px}
.duplicate-member{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:10px;border:1px solid var(--line);border-radius:9px;background:var(--canvas)}
.duplicate-member>div{min-width:0;flex:1}
.duplicate-member strong,.duplicate-member small{display:block;overflow-wrap:anywhere}
.duplicate-member strong{font-size:10px;line-height:1.45}
.duplicate-member small{font-size:9px;color:var(--muted);margin-top:3px}
.duplicate-snippet{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.48;font-size:10px;color:var(--ink);margin-top:6px;max-width:650px}
.duplicate-near-table{min-width:1160px}
.duplicate-near-table td{vertical-align:top}
.duplicate-near-table td:first-child{min-width:105px}
.duplicate-score{display:inline-flex;padding:5px 8px;border-radius:999px;background:var(--surface-2);color:var(--ink);font-weight:850;font-size:11px}
.duplicate-pair-side{min-width:390px;max-width:620px;padding:9px 10px;border:1px solid var(--line);border-radius:9px;background:var(--canvas)}
.duplicate-pair-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.duplicate-pair-head>div{min-width:0;flex:1}
.duplicate-pair-head strong,.duplicate-pair-head small{display:block;overflow-wrap:anywhere}
.duplicate-pair-head strong{font-size:10px;line-height:1.45}
.duplicate-pair-head small{font-size:9px;color:var(--muted);margin-top:3px}
html[data-theme="dark"] .duplicate-filter-panel{background:#24272e;border-color:#3a3e46}
html[data-theme="dark"] .duplicate-filter-grid label{color:#c2c8d2}
html[data-theme="dark"] .duplicate-filter-grid select{background:#1c1f25!important;border-color:#444852!important;color:#f1f3f6!important;color-scheme:dark}
html[data-theme="dark"] .duplicate-members-details summary,html[data-theme="dark"] .duplicate-score{background:#30333b!important;border-color:#484d57!important;color:#f1f3f6!important}
html[data-theme="dark"] .duplicate-member,html[data-theme="dark"] .duplicate-pair-side{background:#1f2228!important;border-color:#3b4049!important}
html[data-theme="dark"] .duplicate-member strong,html[data-theme="dark"] .duplicate-pair-head strong{color:#e8ebf1!important}
html[data-theme="dark"] .duplicate-member small,html[data-theme="dark"] .duplicate-pair-head small{color:#aeb6c2!important}
html[data-theme="dark"] .duplicate-snippet,html[data-theme="dark"] .duplicate-group-prompt{color:#dce1e9!important}
html[data-theme="dark"] .duplicate-exact-table td,html[data-theme="dark"] .duplicate-exact-table th,html[data-theme="dark"] .duplicate-near-table td,html[data-theme="dark"] .duplicate-near-table th{border-color:#3a3e46!important}
@media(max-width:1120px){.duplicate-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.duplicate-filter-grid{grid-template-columns:1fr;padding:14px}.duplicate-table-scroll{max-height:none}.duplicate-pair-side{min-width:310px}}


/* V25 — prevent login/app flashes while Supabase restores and verifies a session */
.boot-screen{min-height:100vh;min-height:100dvh;display:grid;place-items:center;padding:24px;background:var(--canvas);color:var(--ink)}
.boot-card{width:min(100%,380px);display:flex;flex-direction:column;align-items:center;gap:13px;padding:34px 26px;border:1px solid var(--line);border-radius:18px;background:var(--white);box-shadow:var(--shadow);text-align:center}
.boot-logo-pair{width:210px;max-width:70vw;margin-bottom:5px}
.boot-card .spinner{width:22px;height:22px;border:2px solid var(--line);border-top-color:var(--red);border-radius:50%;animation:spin .8s linear infinite}
.boot-card strong{font-family:Manrope,'DM Sans',sans-serif;font-size:14px;font-weight:800;letter-spacing:-.01em}
.boot-card small{font-size:11px;line-height:1.5;color:var(--muted)}
html[data-theme="dark"] .boot-card{background:#24272e;border-color:#3a3e46;color:#f1f3f6;box-shadow:0 18px 55px rgba(0,0,0,.22)}
html[data-theme="dark"] .boot-card small{color:#aeb6c2}
html[data-theme="dark"] .boot-card .spinner{border-color:#444852;border-top-color:#ff777d}


/* V26 Security & Audit Center: responsive filters and explicit theme-safe controls. */
.audit-security-metrics .metric-card { min-width: 0; }
.audit-filter-grid { display: grid; grid-template-columns: repeat(3, minmax(150px, 1fr)); align-items: end; gap: 12px; }
.audit-filter-grid label { display: flex; flex-direction: column; gap: 6px; min-width: 0; color: var(--muted); font-size: 10px; font-weight: 700; }
.audit-filter-grid .search-input, .audit-filter-grid .filter-select { width: 100%; min-width: 0; min-height: 36px; }
.audit-filter-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.audit-text-search { align-items: center; }
.audit-filter-note { font-size: 10px; line-height: 1.45; }
.audit-security-metrics .metric-value { font-size: clamp(18px, 2vw, 28px); overflow-wrap: anywhere; }
@media (max-width: 900px) { .audit-filter-grid { grid-template-columns: repeat(2, minmax(140px, 1fr)); } }
@media (max-width: 560px) { .audit-filter-grid { grid-template-columns: 1fr; } .audit-filter-actions { width: 100%; } .audit-filter-actions .btn { flex: 1; } .audit-text-search { align-items: stretch; } }
html[data-theme="dark"] .audit-filter-grid label { color: #c8ced7; }
html[data-theme="dark"] .audit-filter-grid .search-input,
html[data-theme="dark"] .audit-filter-grid .filter-select,
html[data-theme="dark"] .audit-text-search .search-input { background: #1e2026 !important; color: #edf0f5 !important; border-color: #474b55 !important; }
html[data-theme="dark"] .audit-filter-grid .search-input::placeholder,
html[data-theme="dark"] .audit-text-search .search-input::placeholder { color: #9aa3b3 !important; }


/* V27 content backup and recovery center */
.backup-metrics .metric-value{font-size:clamp(18px,2vw,28px);overflow-wrap:anywhere}
.backup-panel{margin-top:16px}
.backup-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.backup-step{display:flex;align-items:flex-start;gap:12px;border:1px solid var(--line);border-radius:12px;background:var(--canvas);padding:16px;min-width:0}
.backup-step-icon{flex:0 0 30px;width:30px;height:30px;display:grid;place-items:center;border-radius:9px;background:var(--surface-2);color:var(--ink);font-weight:850}
.backup-step strong,.backup-limit-grid strong{display:block;color:var(--ink);font-size:13px}
.backup-step p{margin:5px 0 0;color:var(--muted);font-size:11px;line-height:1.55}
.backup-last-export{display:flex;gap:9px;align-items:center;color:var(--muted);font-size:11px;border-top:1px solid var(--line)}
.backup-file-drop{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;text-align:center;padding:28px 18px;border:1px dashed var(--line-strong,var(--line));border-radius:13px;background:var(--canvas);color:var(--ink);cursor:pointer}
.backup-file-drop:hover,.backup-file-drop:focus-within{border-color:var(--accent);background:var(--surface-2)}
.backup-file-drop strong{font-size:13px}
.backup-file-drop small{color:var(--muted);font-size:11px}
.backup-file-drop input{max-width:100%;font-size:11px}
.backup-file-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:var(--surface-2);font-size:24px}
.backup-validation-result{margin-top:16px;padding:16px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.backup-validation-top{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding-bottom:12px;border-bottom:1px solid var(--line)}
.backup-validation-top strong{font-size:14px}
.backup-validation-top.ok strong{color:var(--success,var(--ink))}
.backup-validation-top.warn strong{color:var(--warning,#ad6e00)}
.backup-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;padding:14px 0}
.backup-summary-grid>div{min-width:0;padding:10px;border:1px solid var(--line);border-radius:9px;background:var(--canvas)}
.backup-summary-grid small,.backup-summary-grid strong{display:block;overflow-wrap:anywhere}
.backup-summary-grid small{font-size:10px;color:var(--muted)}
.backup-summary-grid strong{font-size:12px;margin-top:5px;color:var(--ink)}
.backup-problem-list{padding:12px 14px;border-radius:10px;background:var(--surface-2);color:var(--ink);margin-bottom:12px}
.backup-problem-list ul,.backup-limit-grid ul{margin:8px 0 0;padding-left:20px;color:var(--muted);font-size:11px;line-height:1.7}
.backup-success-note{padding:12px 14px;border-radius:10px;background:var(--surface-2);font-size:12px;line-height:1.6;color:var(--ink)}
.backup-limit-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-bottom:16px}
.backup-limit-grid>div{min-width:0;padding:14px;border:1px solid var(--line);border-radius:10px;background:var(--canvas)}
html[data-theme="dark"] .backup-step,html[data-theme="dark"] .backup-file-drop,html[data-theme="dark"] .backup-summary-grid>div,html[data-theme="dark"] .backup-limit-grid>div{background:#1f2228;border-color:#3b4049}
html[data-theme="dark"] .backup-step strong,html[data-theme="dark"] .backup-limit-grid strong,html[data-theme="dark"] .backup-summary-grid strong,html[data-theme="dark"] .backup-file-drop strong{color:#e8ebf1}
html[data-theme="dark"] .backup-step p,html[data-theme="dark"] .backup-limit-grid ul,html[data-theme="dark"] .backup-summary-grid small,html[data-theme="dark"] .backup-file-drop small{color:#aeb6c2}
html[data-theme="dark"] .backup-validation-result{background:#24272e;border-color:#3a3e46}
html[data-theme="dark"] .backup-problem-list,html[data-theme="dark"] .backup-success-note{background:#30333b;color:#dce1e9}
html[data-theme="dark"] .backup-validation-top{border-color:#3a3e46}
@media(max-width:1000px){.backup-grid{grid-template-columns:1fr}.backup-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.backup-limit-grid{grid-template-columns:1fr}.backup-summary-grid{grid-template-columns:1fr 1fr}.backup-validation-top{align-items:flex-start;flex-direction:column}}


/* V28 Recovery Readiness & Restore Preview */
.recovery-plan-action{margin:14px 0;padding:14px 16px;border:1px solid var(--line);border-radius:10px;background:var(--canvas)}
.recovery-plan-action strong{display:block;color:var(--ink);font-size:13px}
.recovery-plan-action p{margin:6px 0 12px;color:var(--muted);font-size:12px;line-height:1.6}
html[data-theme="dark"] .recovery-plan-action{background:#1f2228;border-color:#3b4049}
html[data-theme="dark"] .recovery-plan-action strong{color:#e8ebf1}

/* V36 student support and attempt investigation */
.investigation-body{padding:20px 24px;max-height:62vh;overflow:auto}.investigation-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.investigation-fact{border:1px solid var(--line);border-radius:9px;padding:11px;min-width:0}.investigation-fact span{display:block;color:var(--muted);font-size:10px;margin-bottom:6px}.investigation-fact strong{display:block;font-size:11px;overflow-wrap:anywhere;color:var(--ink)}.investigation-flags,.investigation-next{margin-top:16px;border:1px solid var(--line);border-radius:10px;padding:14px}.investigation-flags h3,.investigation-next h3{margin-bottom:9px}.investigation-flags ul,.investigation-next ol{margin:0;padding-left:20px;color:var(--ink);font-size:11px;line-height:1.8}.investigation-flags li{color:var(--red)}.investigation-next li{padding:2px 0}.investigation-body .alert-strip{margin-bottom:14px}
@media(max-width:760px){.investigation-facts{grid-template-columns:repeat(2,minmax(0,1fr))}.investigation-body{padding:15px}}

/* V38 content workflow and assignment planner */
.workflow-assignment-meta{display:grid;gap:4px;margin:10px 0 12px;font-size:10px;color:var(--muted);line-height:1.45;min-height:34px}
.workflow-card-actions{display:flex;flex-wrap:wrap;gap:7px;align-items:center}
.workflow-card-actions .btn{margin:0}
@media(max-width:900px){.workflow-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.workflow-grid{grid-template-columns:1fr}.workflow-card-actions .btn{flex:1}}
