:root { --brand:#3559cf; --ink:#17213b; --muted:#68748b; --line:#e5e9f0; --bg:#f6f8fc; --white:#fff; --sidebar:#132044; font-family:Inter,"Segoe UI",Arial,sans-serif; font-synthesis:none; }
* { box-sizing:border-box }
body { margin:0; color:var(--ink); background:var(--bg); font-size:15px }
button,input,select,textarea { font:inherit }
button { cursor:pointer } button:disabled { opacity:.55;cursor:not-allowed }
a { color:var(--brand);text-decoration:none } a:hover { text-decoration:underline }
input,select,textarea { width:100%;padding:12px 13px;border:1px solid #ccd5e3;border-radius:10px;background:#fff;color:var(--ink);outline:none }
input:focus,select:focus,textarea:focus { border-color:var(--brand);box-shadow:0 0 0 3px #3559cf18 }
input[type=color] { padding:3px;height:46px }
input[type=file] { padding:9px }
label { display:block;font-size:13px;color:#4e5b72;font-weight:650;margin-bottom:6px }
small,.muted { color:var(--muted) }
h1,h2,h3,p { margin:0 }
h1 { font-size:29px;line-height:1.2;letter-spacing:-.7px } h2 {font-size:21px;letter-spacing:-.5px} h3{font-size:16px}
p{line-height:1.6}
.loading-screen { padding:25vh 20px;text-align:center;color:var(--muted) }
.btn { display:inline-flex;align-items:center;justify-content:center;gap:8px;background:var(--brand);color:#fff;border:1px solid var(--brand);border-radius:11px;padding:11px 18px;font-weight:700;min-height:43px;text-decoration:none }
.btn:hover { filter:brightness(.94);text-decoration:none }
.btn.ghost { background:#fff;color:var(--ink);border-color:#dbe1ec }
.btn.soft { background:#eef2ff;color:#2849b5;border-color:#eef2ff }
.btn.danger { background:#fff2f2;color:#b52535;border-color:#f2d3d8 }
.btn.small { padding:8px 12px;min-height:34px;font-size:13px }
.btn.full {width:100%}
.stack { display:flex;flex-direction:column;gap:16px } .row {display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.between{justify-content:space-between}.grow{flex:1}.gap-sm{gap:8px}
.tag {display:inline-block;border-radius:40px;background:#edf2ff;color:#3357b7;padding:5px 10px;font-size:12px;font-weight:700}
.tag.ok {background:#e8f8f0;color:#18754f}.tag.bad{background:#fce9e9;color:#af303d}
.app-shell {min-height:100vh;display:flex}
.sidebar {width:250px;flex-shrink:0;background:var(--sidebar);color:#eaf0ff;padding:28px 15px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}
.brand {display:flex;align-items:center;gap:11px;padding:5px 13px 25px;border-bottom:1px solid #ffffff22;margin-bottom:28px}
.brand-mark {display:grid;place-items:center;width:43px;height:43px;border-radius:13px;background:#ffffff19;color:#fff;font-size:24px;font-weight:800}
.brand-name{font-weight:850;font-size:18px;line-height:1.1}.brand-name small{display:block;font-size:11px;color:#b6c3e2;font-weight:500;margin-top:4px}
.menu-title {text-transform:uppercase;font-size:10px;letter-spacing:1.3px;color:#9caed4;margin:0 13px 10px;font-weight:800}
.nav-item {width:100%;border:0;border-radius:11px;text-align:left;color:#c4d1ea;background:transparent;padding:13px 15px;margin:2px 0;display:flex;gap:12px;align-items:center;font-weight:680}
.nav-item:hover,.nav-item.active {background:#ffffff19;color:#fff}
.nav-item span:first-child {font-size:19px;width:24px}
.sidebar-bottom{margin-top:auto;padding:16px 10px 0;border-top:1px solid #ffffff22}
.sidebar-bottom .muted{color:#a9b8d5;font-size:12px;word-break:break-word}
.content {min-width:0;flex:1;padding:34px clamp(22px,4vw,64px) 60px;max-width:1550px;margin:auto}
.topline{display:flex;align-items:center;justify-content:space-between;margin-bottom:30px;gap:20px;flex-wrap:wrap}
.top-actions{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-left:auto}
.admin-competition-select{min-width:235px;max-width:350px}
.admin-competition-select label{font-size:12px;margin-bottom:5px;color:var(--muted)}
.admin-competition-select select{padding:9px 11px;font-size:13px;font-weight:700}
.topline .eyebrow{font-size:12px;letter-spacing:1.6px;text-transform:uppercase;font-weight:850;color:var(--brand);margin-bottom:8px}
.avatar {display:grid;place-items:center;border-radius:50%;width:40px;height:40px;background:#dfe7ff;color:#2e4ba6;font-size:19px;font-weight:800}
.page-intro {margin-bottom:25px}.page-intro p{color:var(--muted);margin-top:8px}
.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}
.card {border:1px solid var(--line);box-shadow:0 6px 26px #25365908;background:#fff;border-radius:18px;padding:23px;min-width:0}
.card.highlight {background:linear-gradient(130deg,#152b62 0%,#3559cf 100%);color:#fff;border:0}
.card.highlight p,.card.highlight small{color:#e0e8ff}
.kpi {font-size:35px;font-weight:850;letter-spacing:-1.2px;margin:10px 0 3px}
.kpi-label{font-size:13px;color:var(--muted);font-weight:700}
.card.highlight .kpi-label{color:#e0e8ff}
.section-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:28px 0 16px}
.bar{height:9px;background:#edf0f6;border-radius:9px;overflow:hidden;margin-top:10px}
.bar-fill{height:100%;background:var(--brand);border-radius:9px}
.category-card{display:flex;flex-direction:column;gap:9px;transition:transform .15s,border .15s;text-align:left;width:100%;cursor:pointer}
.category-card:hover{transform:translateY(-2px);border-color:#98a9d9}
.category-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:13px;background:#edf2ff;color:#3153bb;font-size:23px}
.study-option{border-left:4px solid var(--brand);cursor:pointer;text-align:left;width:100%}
.study-option:hover{border-color:#1d3180;box-shadow:0 8px 30px #243a601c}
.study-option .minutes{display:inline-block;margin-top:12px;font-size:13px;font-weight:800;color:var(--brand)}
.question-layout {max-width:850px;margin:auto}
.quiz-meta{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.question-prompt {font-size:23px;line-height:1.48;margin:25px 0 22px}
.choice{display:flex;align-items:center;gap:14px;cursor:pointer;padding:16px;border:1px solid #dfe5ef;border-radius:13px;margin-bottom:11px;font-weight:600}
.choice:hover{border-color:#90a4df}.choice.selected{border-color:var(--brand);background:#f1f4ff}
.choice.answer-correct{border-color:#28a06c;background:#eaf8f1}.choice.answer-wrong{border-color:#d0535c;background:#fff1f1}
.choice input{width:17px;height:17px;margin:0;accent-color:var(--brand)}
.answer-box{padding:20px;border-radius:14px;margin-top:18px;background:#f0f8f4;border:1px solid #caead7}
.answer-box.bad{background:#fff4f4;border-color:#f1d8da}.answer-box p{margin-top:8px}
.actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:24px}
.clock{font-variant-numeric:tabular-nums;background:#e9eef9;padding:8px 12px;border-radius:10px;font-weight:850}
.field{margin-bottom:14px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.table-wrap{overflow:auto;max-width:100%}
table{border-collapse:collapse;width:100%;min-width:550px}th,td{padding:12px 10px;text-align:left;border-bottom:1px solid #e7eaf0;font-size:13px}th{font-weight:800;color:#66748e}
.org-image {max-height:49px;max-width:130px;object-fit:contain}
.notice{background:#edf3ff;border:1px solid #d7e2fb;border-radius:13px;padding:14px;color:#274a91;font-size:13px;line-height:1.6}
.notice.warn{background:#fff7e7;border-color:#efdfc3;color:#76521a}
.status{padding:12px 15px;background:#eaf8f0;color:#136849;border-radius:11px;margin:15px 0}
.status.error{background:#fff0f1;color:#ac303e}
.tabs{display:flex;gap:7px;flex-wrap:wrap;margin:15px 0 20px}
.tab{border:1px solid var(--line);background:#fff;border-radius:10px;padding:9px 15px;color:#5e6981;font-weight:750}
.tab.active{background:#eaf0ff;color:var(--brand);border-color:#b9caf7}
.login-screen {min-height:100vh;display:grid;grid-template-columns:1fr 1fr;background:#fff}
.login-art {background:radial-gradient(circle at 10% 10%,#4f70cf 0%,transparent 38%),linear-gradient(145deg,#102456,#233a77);color:#fff;display:flex;justify-content:center;flex-direction:column;padding:8vw}
.login-art h1{font-size:clamp(34px,4.3vw,64px);line-height:1.13;max-width:600px;margin:22px 0}
.login-art p{color:#dbe5ff;max-width:510px;font-size:17px}
.login-pane {display:flex;align-items:center;justify-content:center;padding:36px}
.login-box {max-width:430px;width:100%}
.login-box h2{font-size:29px;margin-bottom:9px}
.login-box p{margin-bottom:30px;color:var(--muted)}
.login-box .btn{margin-top:5px}
.footer-note{color:#92a0b8;font-size:12px;margin-top:25px}
.empty{text-align:center;padding:40px;color:var(--muted)}
@media(max-width:1050px){.grid.four{grid-template-columns:repeat(2,minmax(0,1fr))}.grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sidebar{width:205px}.content{padding:28px}}
@media(max-width:720px){.app-shell{display:block}.sidebar{position:static;height:auto;width:100%;padding:14px}.brand{margin:0 0 10px;padding:5px 7px 10px}.sidebar nav{display:flex;overflow:auto;gap:4px}.menu-title,.sidebar-bottom{display:none}.nav-item{min-width:max-content;padding:9px 12px}.content{padding:22px 15px 45px}.topline{align-items:flex-start}.grid,.grid.two,.grid.four,.form-grid{grid-template-columns:1fr}.login-screen{grid-template-columns:1fr}.login-art{padding:32px 25px}.login-art h1{font-size:29px;margin:10px 0}.login-art p{font-size:14px}.login-pane{padding:35px 24px}.question-prompt{font-size:19px}.card{padding:18px}}

.question-image{display:block;max-width:100%;width:auto;max-height:520px;object-fit:contain;margin:6px 0 24px;border:1px solid var(--line);border-radius:12px;background:#fff}
.image-library{display:grid;grid-template-columns:repeat(auto-fill,minmax(125px,1fr));gap:12px;margin-top:18px}
.image-library-item{display:flex;flex-direction:column;gap:6px;min-width:0;font-size:12px;color:var(--muted)}
.image-library-item img{height:80px;width:100%;object-fit:contain;border:1px solid var(--line);border-radius:10px;background:#f7f9fd}
.image-library-item span{overflow-wrap:anywhere}

.source-note{margin-top:20px;padding:13px 15px;border-radius:10px;border:1px solid #d9e2f0;background:#f7f9fe;color:#43506b;font-size:12px;line-height:1.65}
.source-note small{display:block;margin-top:5px}
.terms-link{border:0;background:none;color:var(--brand);font-size:13px;font-weight:750;text-decoration:underline;padding:6px;cursor:pointer}
.terms-overlay{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;background:#101b34ab;padding:20px}
.terms-panel{width:min(760px,100%);max-height:88vh;overflow:auto;padding:27px;background:#fff;color:var(--ink);border-radius:18px;box-shadow:0 24px 80px #0003}
.terms-panel h3{margin:20px 0 7px}
.terms-panel p{margin:9px 0;color:#485772}

/* Original skills exercises and step-by-step learning support */
.steps-text{white-space:pre-line;overflow-wrap:anywhere;line-height:1.75}
.hint-panel{margin-top:16px;padding:16px;border-radius:12px;background:#f1f5ff;border:1px solid #cddafb;color:#35466b}
.hint-panel .btn{margin-bottom:0}

/* Compact icon-only sidebar */
.sidebar{transition:width .24s ease;overflow:hidden}
.collapse-button{margin:-15px 9px 22px;padding:8px;background:#ffffff13;color:#fff;border:1px solid #ffffff32;border-radius:10px;align-self:flex-end;font-weight:900;min-width:38px}
.sidebar-collapsed .sidebar{width:76px;padding:22px 8px}
.sidebar-collapsed .brand{justify-content:center;padding:0 0 17px;margin:0 0 16px}
.sidebar-collapsed .brand-name,.sidebar-collapsed .menu-title,.sidebar-collapsed .nav-label,.sidebar-collapsed .sidebar-user{display:none}
.sidebar-collapsed .brand-mark{flex-shrink:0}
.sidebar-collapsed .org-image{max-width:50px}
.sidebar-collapsed .nav-item{justify-content:center;padding:12px 8px}
.sidebar-collapsed .nav-item span:first-child{width:auto}
.sidebar-collapsed .sidebar-bottom{padding:11px 0 0;text-align:center}
.sidebar-collapsed .sidebar-bottom .btn{padding:8px}
.sidebar-collapsed .collapse-button{margin:0 auto 20px}
/* Daily goals */
.daily-goals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;margin-top:22px}
.goal-row{display:flex;align-items:center;gap:12px;border:1px solid var(--line);padding:14px;border-radius:13px;min-width:0}
.goal-row.completed{background:#eff9f4;border-color:#badbca}
.goal-check{font-size:23px;color:var(--brand)}
.goal-count{white-space:nowrap;font-size:12px;color:var(--muted)}
.goal-row .bar{margin-top:8px;height:6px}
/* Flipping study category cards */
.flip-card{min-height:238px;perspective:1000px}
.flip-inner{height:100%;min-height:238px;position:relative;transform-style:preserve-3d;transition:transform .5s}
.flip-card.flipped .flip-inner{transform:rotateY(180deg)}
.flip-face{position:absolute;inset:0;width:100%;height:100%;backface-visibility:hidden;display:flex;flex-direction:column;align-items:stretch;text-align:left;gap:8px}
.flip-front{cursor:pointer;border:1px solid var(--line)}
.flip-back{transform:rotateY(180deg);justify-content:center}
.flip-back .actions{margin-top:12px}
.flip-percent{font-size:38px;font-weight:900;color:var(--brand)}
.flip-front:hover{border-color:#98a9d9}
/* Custom quiz configuration */
.category-settings{margin:20px 0;padding:18px;border:1px solid var(--line);border-radius:14px;background:#fafbff}
.category-selector{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:17px}
.category-setting{display:flex;align-items:center;gap:10px;margin:0;padding:10px;border:1px solid #e2e7ef;border-radius:9px;background:#fff;cursor:pointer}
.category-setting input{width:17px;height:17px;accent-color:var(--brand);flex-shrink:0}
.mistake-list{display:flex;flex-direction:column;gap:12px}
.mistake-item{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:15px;border-bottom:1px solid var(--line);padding:15px 0}
.mistake-item:last-child{border:0}
.mistake-item .grow{display:flex;flex-direction:column;gap:8px;min-width:220px}
.mistake-item strong{font-size:14px;font-weight:650}
@media(max-width:720px){.sidebar-collapsed .sidebar{width:100%;padding:12px}.sidebar-collapsed .brand{display:none}.sidebar-collapsed .sidebar nav{justify-content:space-evenly}.collapse-button{margin:0}.daily-goals,.category-selector{grid-template-columns:1fr}.flip-card,.flip-inner{min-height:255px}}

.major-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:20px 0 28px}
.major-group{display:flex;flex-direction:column;align-items:flex-start;gap:13px;text-align:left;padding:27px;border:1px solid var(--line);border-radius:20px;background:#fff;color:var(--ink);min-height:235px;box-shadow:0 6px 18px #14213a08;transition:transform .2s,border-color .2s}
.major-group:hover,.major-group.active{border-color:var(--brand);transform:translateY(-2px)}
.major-group-symbol{display:grid;place-items:center;width:52px;height:52px;border-radius:14px;background:#e9efff;color:var(--brand);font-size:26px}
.major-group h2{font-size:24px}.major-group p{color:var(--muted)}.major-group small{margin-top:auto}.major-group strong{color:var(--brand)}
.study-group-heading{margin-bottom:20px}.study-group-heading .row{margin-top:16px}
.front-stats{display:flex;flex-wrap:wrap;gap:8px;margin-top:auto}
.front-stats span{font-size:12px;border-radius:8px;background:#eef3ff;padding:7px 10px;color:#314d8e}
.front-stats strong{font-weight:800}
.nav-sub{margin-left:13px;width:calc(100% - 13px);font-size:14px}
.sidebar-collapsed .nav-sub{margin-left:0;width:100%}
@media(max-width:780px){.major-groups{grid-template-columns:1fr}.major-group{min-height:190px}}

/* More room for lengthy legal category names and front-side performance stats. */
.flip-card,.flip-inner{min-height:302px}
.flip-face{overflow-wrap:anywhere;padding:20px}
.flip-front h3{line-height:1.4}
.flip-back{gap:12px}
@media(max-width:720px){.flip-card,.flip-inner{min-height:340px}}

/* Home dashboard: overall question coverage and changes since the last started test */
.dashboard-overview{margin-top:22px}
.dashboard-overview.grid.two{align-items:stretch}
.coverage-overview{min-width:0}
.coverage-percent{font-size:clamp(30px,5vw,45px);font-weight:850;letter-spacing:-1px;color:var(--brand);white-space:nowrap}
.coverage-bar{margin:18px 0 12px;height:10px}
.new-questions-panel{min-width:0}
.new-questions-panel h2{font-size:19px;line-height:1.4}
.new-questions-panel .tag{white-space:nowrap}
.new-category-list{display:flex;flex-direction:column;gap:0;margin-top:15px}
.new-category-item{padding:9px 0;border-bottom:1px solid var(--line);font-size:13px;gap:15px}
.new-category-item:last-child{border-bottom:0}
.new-category-item strong{color:var(--brand);white-space:nowrap}

/* Contest-level branding and learning scaffolding */
.org-category-selector{display:flex;flex-direction:column;gap:20px;margin-top:15px}
.org-category-selector .category-selector{margin-top:10px}
.org-list-item{display:flex;align-items:start;gap:10px;border-bottom:1px solid var(--line);padding:12px 0}
.org-list-item small{display:block;margin-top:4px}
.brand-name{overflow-wrap:anywhere;line-height:1.25}
.solution-actions{margin-top:15px}
.five-step-answer{white-space:pre-line;line-height:1.75;padding:16px;margin-top:12px;background:#f4f7ff;border-radius:11px;border:1px solid #ccd8fb}
@media(max-width:720px){.org-category-selector .category-selector{grid-template-columns:1fr}}

.major-groups.three-groups{grid-template-columns:repeat(3,minmax(0,1fr))}
.major-groups.three-groups .major-group{min-width:0;padding:22px}
.study-list-section{margin:30px 0;scroll-margin-top:24px}
.study-list-section .section-head{margin-bottom:17px}
.dash-path-control{display:inline-flex;align-items:center;gap:8px;font-size:13px;font-weight:600;flex-wrap:wrap}
.dash-path-control select{width:auto;max-width:185px;min-width:140px;padding:8px;border-radius:9px}
@media(max-width:1040px){.major-groups.three-groups{grid-template-columns:1fr}}
@media(max-width:720px){.dash-path-control select{max-width:100%;min-width:125px}}

@media(max-width:720px){
  .top-actions{width:100%;margin-left:0;justify-content:space-between}
  .admin-competition-select{max-width:calc(100% - 60px);flex:1;min-width:0}
}

/* Diagrammatic reasoning: scalable original vector tiles, readable on small screens. */
.pattern-board{display:grid;gap:8px;margin:20px auto 24px;max-width:660px}
.pattern-board.sequence{grid-template-columns:repeat(5,minmax(0,1fr))}
.pattern-board.matrix{grid-template-columns:repeat(3,minmax(0,1fr));max-width:370px}
.pattern-slot{min-width:0}
.pattern-tile{width:100%;height:auto;max-width:110px;display:block;margin:auto}
.missing-shape{aspect-ratio:1;display:grid;place-items:center;border:1px dashed #93a5c6;border-radius:8px;font-size:35px;color:#243f79;background:#f5f7fd}
.pattern-answer-choices{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.pattern-answer-choices .choice{display:flex;align-items:center;justify-content:center;min-width:0;gap:4px;padding:9px 6px;text-align:center}
.pattern-answer-choices .choice span{min-width:0}
.pattern-answer-choices .pattern-tile{width:100%;max-width:90px;margin:5px auto}
.behavior-choices{display:grid;grid-template-columns:1fr;gap:12px;margin-top:18px}
.behavior-choice{width:100%;text-align:left;display:flex;align-items:center;gap:10px;background:#fff}
.behavior-choice:hover{border-color:var(--brand);background:#f2f5ff}
@media(max-width:650px){
  .pattern-board{gap:3px}
  .pattern-answer-choices{gap:4px}
  .pattern-answer-choices .choice{padding:6px 3px;display:block;font-size:12px}
}

/* Admin category creation and per-category teaching controls. */
.category-editor{align-items:start}
.category-editor>.card{min-width:0}
.category-admin-list{display:grid;gap:14px;margin-top:18px;max-height:850px;overflow:auto;padding-right:4px}
.category-admin-row{display:grid;grid-template-columns:minmax(160px,1fr) 115px;gap:10px 16px;padding:14px;border:1px solid var(--line);border-radius:12px;background:#fafbff}
.category-admin-row>.row{grid-row:span 2;align-items:center;min-width:0}
.category-admin-row strong{overflow-wrap:anywhere}
.category-admin-row>.field{margin:0}
.category-admin-row>.field select{padding:8px}
.category-admin-row .btn{justify-self:end;align-self:end}
.category-toggle{display:flex;align-items:center;gap:9px;line-height:1.4;font-size:13px;cursor:pointer}
.category-toggle input{width:18px;height:18px;flex-shrink:0;accent-color:var(--brand)}
@media(max-width:920px){.category-editor{grid-template-columns:1fr}}
@media(max-width:480px){.category-admin-row{grid-template-columns:1fr}.category-admin-row>.row{grid-row:auto}.category-admin-row .btn{justify-self:start}}


/* Study materials and collection-based revision */
.material-items{display:grid;gap:14px;margin-top:17px}
.material-item{display:flex;flex-direction:column;align-items:flex-start;gap:10px;padding:14px;border:1px solid var(--line);border-radius:12px}
.material-text{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7;width:100%}
.material-admin-item{padding:12px 0;border-bottom:1px solid var(--line)}
.saved-groups{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:18px}
.saved-group{min-width:0;padding:14px;background:#fafbff;border:1px solid var(--line);border-radius:13px;max-height:390px;overflow-y:auto}
.saved-group h3{margin-bottom:14px}
.saved-question{width:100%;display:flex;flex-direction:column;gap:5px;text-align:left;border:1px solid var(--line);background:#fff;color:var(--ink);padding:10px;border-radius:10px;margin:8px 0}
.saved-question:hover{border-color:var(--brand)}
.saved-question strong{font-size:12px;color:var(--brand)}
.saved-question span{font-size:13px;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.saved-question small{font-size:11px}
.save-controls{padding:12px 15px;margin:15px 0;background:#f7f9fe;border:1px solid var(--line);border-radius:12px}
.save-controls strong{display:block;margin-bottom:9px}
.save-controls .category-toggle{font-size:12px;font-weight:600;margin:0 12px 0 0}
.question-navigation{padding:12px;margin:0 0 17px;border:1px solid var(--line);border-radius:13px;background:#fff}
.question-navigation .row{gap:10px}
.question-number-grid{display:flex;flex-wrap:wrap;gap:6px;margin-top:13px;max-height:145px;overflow:auto}
.question-number{border:1px solid #c8d1e2;background:#f2f4f8;color:#44506b;border-radius:8px;min-width:37px;height:35px;padding:3px 6px;font-weight:750}
.question-number.correct{background:#dcf7e5;border-color:#7ac99b;color:#145f3e}
.question-number.wrong{background:#ffebed;border-color:#e7a0aa;color:#922f3b}
.question-number.revealed{background:#fff1da;border-color:#dec38a;color:#795519}
.question-number.ranked{background:#e6f0ff;border-color:#a3bbf0;color:#22417b}
.question-number.active{outline:none;box-shadow:inset 0 0 0 2px var(--brand);border-color:var(--brand)}
@media(max-width:850px){.saved-groups{grid-template-columns:1fr}.saved-group{max-height:270px}}
@media(max-width:480px){.save-controls .row{display:grid;grid-template-columns:1fr 1fr}.question-number{min-width:34px;height:34px}}

/* Category card backs now carry two start modes plus Back. Allow the controls to fit. */
.flip-card,.flip-inner{min-height:305px}
.flip-back .actions{gap:7px;margin-top:10px}
.flip-back .actions .btn{white-space:normal}
@media(max-width:720px){.flip-card,.flip-inner{min-height:365px}}

/* Three-level in-app legal study library (categories > article groups > articles). */
.field[hidden]{display:none!important}
.library-category{padding:0!important;overflow:hidden;margin-bottom:15px}
.library-category>summary,.library-group>summary,.library-article>summary{cursor:pointer;list-style:none;display:flex;align-items:center;gap:14px}
.library-category>summary::-webkit-details-marker,.library-group>summary::-webkit-details-marker,.library-article>summary::-webkit-details-marker{display:none}
.library-category-head{font-size:19px;padding:20px 22px;border-radius:12px}
.library-category-head:before,.library-group>summary:before,.library-article>summary:before{content:'▸';font-size:16px;color:var(--brand);transition:transform .2s}
.library-category[open]>.library-category-head:before,.library-group[open]>summary:before,.library-article[open]>summary:before{transform:rotate(90deg)}
.library-groups{padding:2px 18px 18px;display:grid;gap:12px}
.library-group{border:1px solid var(--line);border-radius:12px;background:#f8faff;overflow:hidden}
.library-group>summary{padding:16px;min-height:66px}
.library-group summary small,.library-article summary small{display:block;color:var(--muted);font-size:12px;margin-top:4px;font-weight:500}
.library-group-description{padding:0 16px 8px}
.library-items{padding:4px 14px 14px;display:grid;gap:8px}
.library-article{border:1px solid var(--line);background:#fff;border-radius:11px;overflow:hidden}
.library-article>summary{padding:15px;gap:11px}
.library-article>summary:hover{background:#f5f8ff}
.library-document-icon{font-size:21px;color:var(--brand)}
.library-reading{border-top:1px solid var(--line);padding:18px 20px}
.library-reading-text{white-space:pre-wrap;overflow-wrap:anywhere;font-size:15px;line-height:1.85;max-width:84ch}
.library-reading iframe{width:100%;height:68vh;min-height:350px;border:1px solid var(--line);border-radius:8px;background:#fff}
.library-reading .notice{margin-bottom:16px}
.library-admin-group{border:1px solid var(--line);border-radius:12px;padding:15px;margin-top:12px}
.library-admin-group>.tag{margin-left:10px}
.material-admin-item small{display:block;margin-top:4px}
@media(max-width:600px){
  .library-category-head{font-size:16px;padding:15px}
  .library-groups{padding:0 10px 12px}
  .library-items{padding:3px 8px 10px}
  .library-reading{padding:12px}
  .library-article>summary{flex-wrap:wrap;gap:7px}
  .library-article>summary .tag{margin-left:auto}
  .library-reading iframe{height:62vh}
}

/* Fixed SVG logout icon and draggable mixed-test proportions. */
.sidebar-bottom [data-action="logout"]{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:36px}
.logout-icon{display:block;flex:none;width:19px;height:19px;stroke:currentColor}
.mixed-test-setting{margin:14px 0 20px;padding:18px;border:1px solid var(--line);border-radius:13px;background:#fff}
.mixed-test-setting input[type="range"]{width:100%;display:block;cursor:pointer;accent-color:var(--brand);margin:18px 0 12px;padding:0}
.mixed-test-setting output{font-weight:800;color:var(--brand);font-variant-numeric:tabular-nums}
.mixed-test-counts{display:flex;gap:12px;justify-content:space-between;flex-wrap:wrap;margin:16px 0}
.mixed-test-counts strong{background:#eef3ff;border:1px solid #dbe4fa;border-radius:9px;padding:9px 12px;font-size:13px}
.test-split-row{margin-top:14px;flex-wrap:wrap}
@media(max-width:720px){
  .sidebar-bottom{display:flex!important;justify-content:flex-end;align-items:center;margin:10px 0 0;padding:8px 0 0;border-top:1px solid #ffffff22}
  .sidebar-bottom .sidebar-user{display:none}
  .sidebar-bottom [data-action="logout"]{color:#fff!important}
  .mixed-test-counts{flex-direction:column}
}

/* Legal chapter toggles: editorial summaries and exact published statute texts */
.library-choice{display:flex;flex-wrap:wrap;gap:8px;padding:8px 15px 15px;border-top:1px solid var(--line)}
.library-tab{border:1px solid #cbd5e8;border-radius:10px;background:#fff;color:var(--ink);font-weight:750;padding:10px 15px;cursor:pointer}
.library-tab.selected{background:var(--brand);border-color:var(--brand);color:#fff}
.library-tab:focus-visible{outline:3px solid #8eaafc;outline-offset:2px}
.library-panel[hidden]{display:none!important}
.library-panel .library-reading{border-top:1px solid var(--line)}
.library-panel .library-items{padding:3px 14px 15px}
.library-panel .library-reading-text{margin-top:15px}
.library-source{padding:12px 15px;margin-bottom:14px;border:1px solid var(--line);background:#f7f9fd;border-radius:10px;font-size:13px}
.library-source small{display:block;margin-top:5px;color:var(--muted)}
.library-extra-notes{margin-top:22px;border-top:1px solid var(--line);padding-top:12px}
.library-extra-notes>summary{cursor:pointer;color:var(--brand);font-weight:650}
@media(max-width:600px){.library-tab{flex:1;padding:10px 8px;font-size:13px}.library-choice{padding:10px}}


/* Brand identity, permanent legal footer, responsive burger drawer */
.brand-name strong{display:block;font-size:17px;letter-spacing:-.2px}
.brand-name small{line-height:1.35}
.mobile-app-header,.mobile-menu-close,.mobile-menu-scrim{display:none}
.app-footer{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px 24px;border-top:1px solid var(--line);padding:19px 0 0;margin-top:45px;color:#65718b;font-size:12px;line-height:1.6}
.app-footer .terms-link{font-size:13px;font-weight:800;padding:8px 4px}
.terms-overlay{z-index:1500}
.terms-panel{position:relative;width:min(810px,100%);max-height:min(88dvh,900px);overscroll-behavior:contain}
.terms-heading{position:sticky;top:-27px;background:#fff;border-bottom:1px solid var(--line);padding:17px 0;margin:-14px 0 16px;z-index:1}
.terms-heading small{font-size:12px;color:var(--brand);font-weight:800}
.terms-panel h2{font-size:clamp(21px,3vw,27px);line-height:1.3;margin:5px 0 0}
.terms-section{padding:3px 0}
.terms-section h3{font-size:16px}
.terms-section p,.terms-panel p{font-size:14px;line-height:1.76}
.terms-panel a{overflow-wrap:anywhere}
.terms-warning{background:#fff6e5;border:1px solid #f0d69e;border-radius:10px;padding:14px;margin:21px 0;color:#6d481e!important}
.terms-end{border-top:1px solid var(--line);padding-top:18px;margin-top:15px}
@media(max-width:720px){
  .mobile-app-header{display:flex;position:sticky;top:0;z-index:1100;align-items:center;justify-content:space-between;gap:12px;min-height:66px;padding:10px 16px;background:var(--sidebar);color:#fff;box-shadow:0 2px 10px #0002}
  .mobile-app-title{display:flex;flex-direction:column;min-width:0}
  .mobile-app-title strong{font-size:19px;font-weight:850;letter-spacing:-.3px}
  .mobile-app-title small{font-size:11px;color:#c2cee7;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .mobile-menu-button,.mobile-menu-close{width:44px;height:44px;border:1px solid #ffffff4b;border-radius:11px;background:#ffffff16;color:#fff;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0}
  .mobile-menu-button{display:flex}
  .app-shell .sidebar,.sidebar-collapsed .sidebar{display:none!important}
  .app-shell.mobile-menu-open .sidebar,.app-shell.mobile-menu-open.sidebar-collapsed .sidebar{
    display:flex!important;position:fixed!important;inset:0 auto 0 0;top:0;bottom:0;height:100dvh;width:min(330px,85vw)!important;
    padding:22px 16px 24px!important;z-index:1202;box-shadow:10px 0 45px #0003;overflow-y:auto;overflow-x:hidden;align-items:stretch
  }
  .app-shell.mobile-menu-open .sidebar .brand,.app-shell.mobile-menu-open.sidebar-collapsed .brand{
    display:flex!important;justify-content:flex-start;margin:0 38px 16px 0;padding:0 0 17px;border-bottom:1px solid #ffffff36
  }
  .app-shell.mobile-menu-open .sidebar .brand-name,.app-shell.mobile-menu-open .sidebar .menu-title,.app-shell.mobile-menu-open .sidebar .nav-label{
    display:block!important
  }
  .app-shell.mobile-menu-open .sidebar .brand-name{flex:1}
  .app-shell.mobile-menu-open .sidebar nav{display:flex;flex-direction:column;overflow:visible;gap:3px;justify-content:flex-start}
  .app-shell.mobile-menu-open .sidebar .nav-item,.app-shell.mobile-menu-open.sidebar-collapsed .nav-item{
    justify-content:flex-start;width:100%;min-width:0;margin:1px 0;padding:13px 14px
  }
  .app-shell.mobile-menu-open .sidebar .nav-item span:first-child{width:24px}
  .app-shell.mobile-menu-open .sidebar .menu-title{margin:8px 12px}
  .app-shell.mobile-menu-open .sidebar .sidebar-bottom{
    display:flex!important;flex-direction:column;justify-content:flex-end;align-items:stretch;border-top:1px solid #ffffff36;
    padding:15px 5px 0!important;margin-top:auto;text-align:left
  }
  .app-shell.mobile-menu-open .sidebar .sidebar-user{display:block!important;margin:0 0 13px;overflow-wrap:anywhere}
  .app-shell.mobile-menu-open .sidebar [data-action="logout"]{justify-content:flex-start;width:100%;padding:10px 13px!important}
  .mobile-menu-close{display:flex;position:absolute;right:15px;top:20px}
  .app-shell.mobile-menu-open .sidebar .collapse-button{display:none}
  .app-shell .mobile-menu-scrim{display:block;position:fixed;inset:0;z-index:1201;border:0;background:#0b1536af;cursor:pointer}
  .app-footer{padding:17px 0 8px;margin-top:31px;align-items:flex-start;flex-direction:column}
  .app-footer .terms-link{padding:7px 0}
  .terms-overlay{padding:10px}
  .terms-panel{padding:19px;max-height:92dvh}
  .terms-heading{top:-19px;margin:-9px 0 12px;padding:12px 0;align-items:flex-start}
  .terms-heading .btn{padding:6px 9px;font-size:12px;min-height:35px}
  .topline .eyebrow{display:none}
  .content{padding-top:23px}
}
@media(prefers-reduced-motion:reduce){.sidebar{transition:none}}

/* The previous mobile logout style inherited a white ghost-button background AND
   white text. Give the drawer action a dark high-contrast surface everywhere. */
.app-shell .sidebar .sidebar-bottom [data-action="logout"].btn.ghost{
  background:#263b68;
  color:#fff!important;
  border:1px solid #879ac0;
  font-weight:750;
}
.app-shell .sidebar .sidebar-bottom [data-action="logout"].btn.ghost .nav-label,
.app-shell .sidebar .sidebar-bottom [data-action="logout"].btn.ghost .logout-icon{
  color:#fff!important;
  stroke:currentColor;
}
.app-shell .sidebar .sidebar-bottom [data-action="logout"].btn.ghost:hover{
  background:#344d80;
  border-color:#d0dcf4;
}
.app-shell .sidebar .sidebar-bottom [data-action="logout"].btn.ghost:focus-visible{
  outline:3px solid #b0ceff;
  outline-offset:2px;
}

.terms-contact{display:flex;flex-direction:column;gap:5px;margin:18px 0;padding:14px 16px;border:1px solid var(--line);background:#f7f9fc;border-radius:11px}
.terms-contact strong{color:var(--ink)}
.terms-contact span{display:block}

/* More breathing room between the user's identity/email and logout action. */
.app-shell .sidebar .sidebar-bottom{padding-top:19px}
.app-shell .sidebar .sidebar-bottom .sidebar-user{
  padding-bottom:5px;
  margin-bottom:22px;
  line-height:1.55;
}
.app-shell .sidebar .sidebar-bottom .sidebar-user strong{display:block;line-height:1.45}
.app-shell .sidebar .sidebar-bottom .sidebar-user .muted{margin-top:5px;line-height:1.5}
.app-shell.sidebar-collapsed .sidebar .sidebar-bottom .sidebar-user{display:none}
@media(max-width:720px){
  .app-shell.mobile-menu-open .sidebar .sidebar-bottom .sidebar-user{
    display:block!important;
    margin-bottom:24px;
    padding-bottom:9px;
  }
}

/* Open Study library: neutral backgrounds, clear hierarchy, original blue icon tiles. */
.study-list-section{margin:34px 0 42px;scroll-margin-top:18px}
.study-section-header{
  border-bottom:1px solid #dce3ee;
  border-left:3px solid var(--brand);
  padding:5px 0 17px 18px;
  margin-bottom:19px;
}
.study-section-label{font-size:11px;letter-spacing:1.5px;font-weight:800;color:#6d7b94;margin-bottom:7px}
.study-section-header .row{gap:12px 20px;align-items:center}
.study-section-header h2{font-size:clamp(23px,2.6vw,28px);margin-bottom:5px}
.study-section-header p{font-size:13px;color:var(--muted)}
.study-section-count{font-size:12px;font-weight:750;color:#53647f;background:#f0f3f8;border:1px solid #e0e6ef;border-radius:20px;padding:8px 12px;white-space:nowrap}
.study-category-grid{align-items:stretch}
.study-category{
  display:flex;flex-direction:column;gap:13px;min-height:250px;
  background:#fff;border:1px solid #dfe5ef;box-shadow:0 5px 20px #24385708;
  transition:border-color .15s,box-shadow .15s;
}
.study-category:hover{border-color:#acbada;box-shadow:0 8px 24px #273c6710}
.study-category-title{display:flex;align-items:flex-start;gap:12px}
.study-category-title .grow{min-width:0}
.study-category-title h3{font-size:16px;line-height:1.4;margin:2px 0 6px;overflow-wrap:anywhere}
.study-category-title small{font-size:12px;line-height:1.4}
.study-category .category-icon{
  flex:0 0 44px;width:44px;height:44px;border-radius:13px;
  background:#edf2ff;color:#3153bb;border:0;font-size:23px;
}
.study-category-description{font-size:13px;color:var(--muted);line-height:1.55}
.study-category-stats{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin-top:auto}
.study-category-stats span{font-size:12px;border:1px solid #e6eaf1;background:#f8faff;color:#57657b;padding:6px 9px;border-radius:8px}
.study-category-stats strong{color:#243a62}
.study-category .bar{height:7px;margin-top:0}
.study-category .bar-fill{background:var(--brand)}
.study-category-progress{font-size:12px;line-height:1.4}
.study-category-actions{margin-top:4px;gap:8px}
.study-category-actions .btn{min-height:36px;white-space:normal}
.study-coverage-note{margin:12px 0 25px;font-size:12px}
@media(max-width:720px){
  .study-list-section{margin:25px 0 34px}
  .study-section-header{padding-left:13px}
  .study-section-count{white-space:normal}
  .study-category{min-height:0;padding:19px}
}

/* Keep navigation focus markers and blue selection within their question container. */
.question-layout,.question-navigation,.question-number-grid{box-sizing:border-box;min-width:0;max-width:100%}
.question-navigation{width:100%;overflow:hidden}
.question-number-grid{width:100%;padding:3px 2px;overflow-x:hidden;overflow-y:auto}
.question-number{box-sizing:border-box;flex-shrink:0}
.question-number:focus-visible{outline:2px solid var(--brand);outline-offset:-3px}
.save-controls{padding:8px 11px;background:#fff}
.save-toggle{display:inline-flex;align-items:center;gap:9px;border:0;background:transparent;color:var(--ink);font:inherit;font-weight:750;text-align:left;cursor:pointer;padding:7px 4px}
.save-toggle span{font-size:24px;color:#c28b24;line-height:1}
.save-toggle:hover,.save-toggle:focus-visible{color:var(--brand)}
.save-options{margin:9px 0 3px;padding:12px;border-radius:9px;background:#f7f9fe;border:1px solid var(--line);display:flex;flex-wrap:wrap;gap:9px 15px}
.behavior-entry{margin-top:24px;max-width:900px;border-left:4px solid var(--brand)}
.behavior-entry p{margin:12px 0}
.behavior-test-settings{border:1px solid #e1e7f0;border-radius:13px;padding:15px 17px;margin:15px 0 20px;background:#fafbfe;max-width:490px}
.behavior-test-settings .field{margin:0 0 9px}
.behavior-test-settings p{font-size:12px;line-height:1.6;margin:9px 0 0}
.behavior-progress{padding:15px;border:1px solid var(--line);border-radius:13px;margin-bottom:16px;background:#fff}
.behavior-progress .bar{margin-top:12px}
.behavior-report{max-width:880px;margin:auto}
.behavior-report>p{margin:15px 0;line-height:1.65}
.behavior-results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:18px 0}
.behavior-result{border:1px solid var(--line);border-radius:11px;padding:15px;min-width:0}
.behavior-result strong{line-height:1.35;font-size:14px}
.behavior-result .bar{margin:13px 0 7px}
.behavior-result small{color:var(--muted)}
.instructions-list{gap:12px}
.instructions-list h2{font-size:18px}
.welcome-screen{min-height:100dvh;display:grid;place-items:center;padding:24px;background:#f4f7fc}
.welcome-card{width:min(100%,680px);padding:clamp(22px,4vw,45px)}
.welcome-card h1{font-size:clamp(25px,4vw,36px);margin:18px 0}
.welcome-card .field{margin:18px 0}
.welcome-message{font-size:18px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere;margin:22px 0 30px}
@media(max-width:700px){.behavior-results{grid-template-columns:1fr}.welcome-screen{padding:12px}.save-options{flex-direction:column}}

/* Word-authored study syllabus: neutral section/subsection reading, not law-only tabs. */
.library-chapter-content{padding:0 12px 14px}
.library-chapter-content>.library-reading{margin:0 3px 12px;background:#fff;border:1px solid var(--line);border-radius:10px}
.library-chapter-content>.library-items{padding:2px 2px 4px}
.library-group-description{line-height:1.65;padding:5px 8px 12px}
.library-text-heading{font-size:15px;font-weight:750;margin:0 0 12px}
.library-empty-group{padding:8px 15px 12px}
.instructions-list{gap:15px}
.instructions-list .card{padding:23px 25px}
.instructions-list h2{font-size:18px;line-height:1.4;margin:0 0 12px}
.instructions-steps{display:grid;gap:10px;margin:0;padding-left:26px}
.instructions-steps li{padding-left:5px;line-height:1.7}
.instructions-steps li::marker{color:var(--brand);font-weight:800}
.instructions-note{border-top:1px solid var(--line);padding-top:13px;margin-top:17px;color:var(--muted);font-size:14px;line-height:1.6}
@media(max-width:600px){
  .library-chapter-content{padding:0 6px 10px}
  .instructions-list .card{padding:17px 16px}
  .instructions-steps{padding-left:20px}
}


/* Per-competition editable instructions: same view for learner and admin preview. */
.instructions-body{white-space:pre-line;overflow-wrap:anywhere;line-height:1.77;margin:14px 0}
.instructions-subheading{font-size:16px;margin:21px 0 9px;line-height:1.45}
.instructions-callout{white-space:pre-line;overflow-wrap:anywhere;background:#f4f6fb;border:1px solid #dae1ee;border-left:4px solid var(--brand);border-radius:11px;padding:15px 17px;margin:17px 0;line-height:1.75}
.instructions-note{white-space:pre-line;overflow-wrap:anywhere}
.guide-editor-header{margin-bottom:18px}
.guide-editor-list{gap:17px;margin:15px 0 18px}
.guide-editor-section{border-left:4px solid var(--brand)}
.guide-editor-section h3{margin:0}
.guide-editor-block{border:1px solid var(--line);background:#fafbfe;border-radius:13px;padding:17px;margin:13px 0}
.guide-editor-block>.row{gap:12px;margin-bottom:14px}
.guide-editor-block textarea,.guide-editor-header textarea,.guide-editor-section input{width:100%}
.guide-editor-block .field{margin-bottom:0}
.guide-add-controls{align-items:end;margin-top:14px}
.guide-add-controls label{font-size:13px;color:var(--muted)}
.guide-add-controls select{display:block;min-width:200px;margin-top:6px}
.guide-step-line{display:flex;gap:12px;align-items:start;margin:9px 0}
.guide-step-line label{flex:1;min-width:0;font-size:13px;color:var(--muted)}
.guide-step-line textarea{display:block;margin-top:6px;width:100%}
.guide-step-actions{display:flex;flex-direction:column;gap:5px;margin-top:25px}
.guide-step-actions .btn{min-width:35px;padding:6px}
.guide-buttons{gap:5px;flex-wrap:wrap}
.guide-buttons .btn{font-size:12px}
.guide-preview{margin-top:27px;padding:20px;border:2px dashed #bac8e4;border-radius:15px}
.guide-preview>h2{font-size:18px;margin:0 0 15px}
@media(max-width:650px){
  .guide-editor-section{padding:16px 13px}
  .guide-editor-block{padding:12px}
  .guide-editor-block>.row{display:block}
  .guide-buttons{margin-top:8px}
  .guide-preview{padding:11px}
  .guide-add-controls{flex-wrap:wrap}
}

/* E-seminario brand and enrollment CTA. */
.brand-logo{width:43px;height:43px;display:block;object-fit:contain;flex-shrink:0}
.login-art .brand-logo{width:48px;height:48px}
.login-join{margin-top:24px}
.login-art .login-join p{margin:0 0 12px;color:#f1f7ff;font-size:16px}
.join-link{display:inline-block;border:1px solid #ffffffaa;background:#fff;color:#173a66;border-radius:12px;padding:12px 18px;text-decoration:none;font-weight:750;line-height:1.4}
.join-link:hover,.join-link:focus-visible{background:#e4f7ff;color:#103457;text-decoration:underline}
