/* Clerk2Officer: aligns CAIIB companion pages and chapter labs with the website design (v2).
   Loaded after each page's own <style>, so element-level rules here win; content and scripts are untouched. */
@font-face{font-family:Lexend;src:url(../assets/v2/fonts/lexend-latin-400-normal.woff2) format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:Lexend;src:url(../assets/v2/fonts/lexend-latin-600-normal.woff2) format("woff2");font-weight:500 700;font-display:swap}
@font-face{font-family:Lexend;src:url(../assets/v2/fonts/lexend-latin-800-normal.woff2) format("woff2");font-weight:800 900;font-display:swap}
*,*::before,*::after{box-sizing:border-box}
:root{--bg:#F2F6FC;--card:#fff;--ink:#0E2442;--soft:#516382;--line:#D6E0EE;--bb:#0B4F9C;--bb2:#083E7C;--sun:#FFD23F;--ok:#17805A;--bad:#C8372D;--f:Lexend,system-ui,sans-serif}
html body{background:var(--bg)!important;color:var(--ink)!important;font-family:var(--f)!important;font-size:17px;line-height:1.7}
html body :is(h1,h2,h3,h4,legend,summary,button,input,select,textarea,label,th,td,p,li,a,small,output){font-family:var(--f)!important}
html body :is(h1,h2,h3){color:inherit;letter-spacing:-.015em;font-weight:700}
html body a{color:var(--bb)}
:focus-visible{outline:3px solid var(--sun)!important;outline-offset:3px}
/* top bar added by c2o-labs.js */
.c2o-labbar{position:sticky;top:0;z-index:50;display:flex;align-items:center;gap:1rem;justify-content:space-between;background:#fff;border-bottom:1px solid var(--line);padding:.6rem max(1rem,calc((100vw - 1180px)/2))}
.c2o-labbar a{text-decoration:none;font:600 .92rem var(--f)!important}
.c2o-brand{display:flex;align-items:center;gap:.45rem;color:var(--ink)!important;font-weight:800!important;font-size:1.05rem!important}
.c2o-brand i{width:1.6rem;height:1.6rem;border-radius:7px;background:var(--bb);display:grid;place-items:center}
.c2o-back{background:color-mix(in srgb,var(--bb) 12%,#fff);color:var(--ink)!important;padding:.4rem .9rem;border-radius:10px;box-shadow:inset 0 -3px 0 var(--bb)}
/* page header band */
html body>header{background:var(--bb)!important;color:#fff!important;border-radius:0 0 22px 22px}
html body>header a{color:#fff!important}
html body>header h1{color:#fff;font-weight:800}
/* content surfaces */
html body section:not(.c2o-tool){border-color:var(--line)!important}
html body :is(.notice,.lab){background:#fff!important;border-left:5px solid var(--sun)!important;border-radius:14px;box-shadow:0 0 0 1px var(--line)}
html body fieldset{background:#fff!important;border:0!important;border-radius:14px;box-shadow:0 0 0 1px var(--line)}
html body :is(input:not([type=radio]):not([type=checkbox]),select,textarea){background:#F7FAFE!important;border:2px solid var(--line)!important;border-radius:12px!important;color:var(--ink)!important}
html body :is(input,select,textarea):focus{border-color:var(--bb)!important;outline:0;box-shadow:0 0 0 4px color-mix(in srgb,var(--bb) 18%,transparent)}
html body button{background:var(--bb)!important;color:#fff!important;border-radius:12px!important;font-weight:600!important;border:0}
html body button:hover{background:var(--bb2)!important}
html body input[type=radio],html body input[type=checkbox]{accent-color:var(--bb)}
html body output{border-radius:12px;background:#fff}
html body table{border-collapse:collapse}html body th{background:color-mix(in srgb,var(--bb) 8%,#fff)}
html body svg{max-width:100%;height:auto}
html body footer{background:var(--ink)!important;color:#fff!important}
/* chapter tools card (companion chapter pages) */
.c2o-toolcard{margin:1rem 0 1.4rem;padding:1rem 1.1rem;background:#fff;border-radius:14px;box-shadow:0 0 0 1px var(--line);border-left:5px solid var(--bb);display:flex;flex-wrap:wrap;gap:.5rem .9rem;align-items:center}
.c2o-toolcard b{width:100%;font-size:.95rem}
.c2o-toolcard a{font:600 .92rem var(--f);text-decoration:none;background:color-mix(in srgb,var(--bb) 9%,#fff);padding:.35rem .8rem;border-radius:9px}
/* new chapter labs */
.c2o-labpage>header{padding:2rem max(1rem,calc((100vw - 1100px)/2)) 1.6rem}
.c2o-kicker{font:700 .75rem var(--f);letter-spacing:.08em;text-transform:uppercase;color:var(--sun)!important;margin:0}
.c2o-labpage>header h1{font-size:clamp(1.8rem,4vw,2.6rem);margin:.3rem 0 .4rem}
.c2o-labpage>header>p{max-width:62ch;opacity:.92;margin:.2rem 0 1rem}
.c2o-toc{display:flex;flex-wrap:wrap;gap:.4rem}
.c2o-toc a{background:rgba(255,255,255,.15);padding:.35rem .75rem;border-radius:9px;font:600 .85rem var(--f);text-decoration:none}
.c2o-labpage main{max-width:1100px;margin:0 auto;padding:1.4rem 1rem 3rem}
.c2o-tool{background:#fff;border-radius:18px;box-shadow:0 1px 3px rgba(11,40,90,.08),0 0 0 1px var(--line);padding:1.3rem 1.4rem;margin:0 0 1.3rem;border-top:6px solid var(--bb)}
.c2o-tool:nth-of-type(4n+2){border-top-color:#17B38A}.c2o-tool:nth-of-type(4n+3){border-top-color:#F5A524}.c2o-tool:nth-of-type(4n+4){border-top-color:#EF5B7B}
.c2o-tool h2{margin:.1rem 0 .3rem;font-size:1.35rem}
.c2o-tag{display:inline-block;margin:0;font:700 .72rem var(--f);background:color-mix(in srgb,var(--bb) 12%,#fff);color:var(--bb);padding:.2rem .6rem;border-radius:999px}
.c2o-note{color:var(--soft);margin:.2rem 0 1rem;font-size:.95rem}
.c2o-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:.8rem 1rem}
.c2o-fields label{display:flex;flex-direction:column;gap:.3rem;font:600 .88rem var(--f)}
.c2o-fields input{padding:.6rem .75rem!important;font-size:1rem!important;width:100%}
.c2o-fields small{font-weight:400;color:var(--soft)}
.c2o-actions{display:flex;gap:.6rem;margin:.9rem 0}
.c2o-actions button{padding:.6rem 1.2rem;min-height:44px;cursor:pointer}
html body .c2o-ghost{background:#fff!important;color:var(--ink)!important;box-shadow:inset 0 0 0 2px var(--line)}
.c2o-out{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:1rem;align-items:start}
.c2o-res{width:100%;font-size:.94rem}.c2o-res th{text-align:left;font-weight:500;color:var(--soft);background:none!important;padding:.45rem .4rem;border-bottom:1px solid var(--line)}.c2o-res td{text-align:right;font-weight:700;white-space:nowrap;padding:.45rem .4rem;border-bottom:1px solid var(--line)}
.c2o-verdict{grid-column:1;margin:.2rem 0 0;padding:.6rem .8rem;background:color-mix(in srgb,var(--sun) 28%,#fff);border-radius:10px;font-weight:600;font-size:.93rem}
.c2o-chart{grid-column:2;grid-row:1/span 2;width:100%;background:#F7FAFE;border-radius:12px}
.c2o-err{color:var(--bad);font-weight:600;grid-column:1/-1}
.c2o-disclaimer{color:var(--soft);font-size:.85rem}
@media (max-width:760px){.c2o-res td{white-space:normal}.c2o-out{grid-template-columns:1fr}.c2o-chart{grid-column:1;grid-row:auto}.c2o-labbar .c2o-brand{font-size:.95rem!important}}
@media print{.c2o-labbar,.c2o-toolcard{display:none}}
footer a,header a{color:#fff!important}
