:root{--background:#f5f7f7;--foreground:#183142;--card:#fff;--card-foreground:#183142;--primary:#16354a;--primary-foreground:#fff;--secondary:#e9efef;--secondary-foreground:#183142;--muted:#edf1f1;--muted-foreground:#586d76;--accent:#e6f1f1;--accent-foreground:#183142;--destructive:#a43737;--border:#dce5e5;--input:#d2dddd;--ring:#2c6973;--radius:.65rem}
*{box-sizing:border-box}html{font-size:16px}body{margin:0;background:#f5f7f7;color:#183142;font-family:Arial,Helvetica,sans-serif;font-size:1rem;line-height:1.55}button,input,textarea,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.55;cursor:not-allowed}a{color:inherit;text-decoration:none}h1,h2,h3,p{margin-top:0}h1{font-family:Georgia,serif;font-size:clamp(2rem,3vw,2.8rem);line-height:1.12;letter-spacing:-.025em;margin-bottom:.6rem}h2{font-size:1.2rem;line-height:1.25}small{font-size:.875rem}.eyebrow{font-size:.78rem;font-weight:700;letter-spacing:.14em;color:#8d6642}.shell{display:flex;min-height:100vh}.side{width:270px;flex:none;background:#142f41;color:#e9f0ed;display:flex;flex-direction:column;padding:32px 16px;min-height:100vh}.brand{font-family:Georgia,serif;font-size:2rem;letter-spacing:-.05em;color:#e6c98e;font-weight:700;padding:0 13px}.brand span{font-family:Arial,sans-serif;letter-spacing:.13em;font-size:.72rem;color:#e5e9e7;vertical-align:middle}.side-label{font-size:.72rem;letter-spacing:.15em;color:#a7b9ba;padding:0 13px;margin:14px 0 43px}.side nav{display:grid;gap:7px}.nav{width:100%;border:0;background:transparent;color:#c6d4d4;padding:13px 14px;display:flex;align-items:center;text-align:left;gap:13px;border-radius:10px;font-size:.96rem}.nav:hover,.nav.active{background:#294b5c;color:white}.nav b{margin-left:auto;border-radius:50%;background:#d6af70;color:#183142;font-size:.75rem;min-width:21px;text-align:center}.side-foot{margin-top:auto;border-top:1px solid #385565;padding:25px 8px 0;display:flex;gap:10px;align-items:center}.avatar{display:grid;place-items:center;background:#d7bb87;color:#19384b;border-radius:50%;width:35px;height:35px;font-weight:700}.side-foot strong,.side-foot small{display:block}.side-foot small{color:#b7c8c8;font-size:.78rem}.main{flex:1;min-width:0;display:flex;flex-direction:column}.top{height:68px;background:#fff;border-bottom:1px solid #e3e9e9;display:flex;align-items:center;justify-content:flex-end;gap:22px;padding:0 4vw;color:#58717a;font-size:.85rem}.top a{display:grid;place-items:center}.mobile-brand{display:none}.content{width:min(1100px,100%);padding:48px clamp(22px,4vw,62px) 90px;margin:0 auto;flex:1}.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:32px}.page-head p{color:#5f737b;max-width:620px;margin-bottom:0}.count{background:#eaf2f1;padding:13px 20px;border-radius:12px;display:flex;align-items:center;gap:10px;white-space:nowrap}.count strong{font-family:Georgia,serif;font-size:2rem;color:#22616a;line-height:1}.count span{font-size:.85rem}.cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.notice-card,.row-card,.panel,.reading,.quiz,.empty{background:white;border:1px solid #e0e7e6;border-radius:14px;box-shadow:0 4px 18px #152d3910}.notice-card{text-align:left;padding:26px;min-height:260px;display:flex;flex-direction:column;align-items:flex-start;transition:transform .15s,box-shadow .15s;width:100%;color:inherit}.notice-card:hover{transform:translateY(-2px);box-shadow:0 10px 26px #152d3918}.notice-card h2{font-family:Georgia,serif;font-size:1.45rem;margin:22px 0 8px}.notice-card p{color:#61757d;line-height:1.6;white-space:pre-line}.card-meta{width:100%;display:flex;justify-content:space-between;gap:12px;color:#768a8c;text-transform:uppercase;letter-spacing:.08em;font-size:.72rem;font-weight:700}.pill{display:inline-block;border-radius:100px;padding:6px 11px;font-size:.77rem;font-weight:700;margin-top:auto}.pill.new{background:#f8efe0;color:#845b2c}.pill.done{background:#e5f3ef;color:#27685c}.pill.wait{background:#e8eef7;color:#3a5a83}.empty{text-align:center;padding:70px 20px;color:#637981}.empty svg{color:#a0774b}.empty h2{color:#19384b;margin:16px 0 7px}.stack,.admin-stack{display:grid;gap:18px}.row-card{padding:24px;display:flex;align-items:center;justify-content:space-between;gap:24px}.row-card h2{margin:8px 0 4px}.row-card p{margin:0;color:#687d83}.row-card .pill{margin:0;flex:none}.material{display:block}.material summary{display:flex;justify-content:space-between;cursor:pointer;font-size:1.1rem;gap:16px}.material summary span{font-size:.85rem;color:#2a6b72}.material .article-body{border-top:1px solid #e2e8e8;margin-top:18px}.back{border:0;background:none;padding:0;color:#32727a;display:flex;align-items:center;gap:7px;margin-bottom:20px;font-weight:700}.reading,.quiz{padding:clamp(24px,4vw,45px);margin-bottom:20px}.reading h1{margin:25px 0}.article-body{line-height:1.8;white-space:pre-wrap;color:#314b56;max-width:760px}.article-body p{margin:0 0 1rem}.quiz h2{font-family:Georgia,serif;font-size:1.6rem;margin:8px 0}.quiz>p{color:#607780}.quiz fieldset{border:0;border-top:1px solid #e3e9e9;padding:22px 0 12px;margin:0}.quiz legend{font-weight:700;padding-top:20px}.choice{display:flex;align-items:flex-start;gap:11px;margin:10px 0;padding:12px;border:1px solid #dfe7e7;border-radius:9px;cursor:pointer}.choice:has(input:checked){border-color:#36777a;background:#eff7f5}.choice input{margin-top:5px;accent-color:#245e68}.button{background:#183b4d;color:white;padding:12px 20px;border:0;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;font-weight:700;min-height:46px}.button:hover{background:#27566a}.success,.retry{border-radius:9px;padding:16px;background:#e8f4ef;color:#28634f;display:flex;align-items:flex-start;gap:10px}.retry{background:#fff5e9;color:#75542c;display:block}.retry svg{vertical-align:middle}.retry .button{display:block;margin-top:15px}.panel{padding:28px;margin-bottom:18px}.panel>p{color:#63777d}.action-row{border-top:1px solid #e3e9e9;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:17px 0}.action-row small{display:block;color:#657981}.action-row button,.attendees button,.secondary{border:1px solid #bdd0d0;color:#275b64;border-radius:8px;background:#f5faf8;padding:9px 12px;font-weight:700;font-size:.87rem}.session-admin{border-top:1px solid #e3e9e9;padding:18px 0}.attendees{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.matrix{overflow-x:auto}table{border-collapse:collapse;width:100%;min-width:460px}th,td{text-align:left;border-bottom:1px solid #e3e9e9;padding:12px;font-size:.85rem}td{white-space:nowrap}th{font-weight:700}.message{border-top:1px solid #e3e9e9;padding:18px 0}.message small{margin-left:10px;color:#71838a}.message p{margin:8px 0;white-space:pre-wrap}.form{display:grid;gap:18px}.form h2,.form h3{margin:0}.form label{display:grid;gap:7px;font-weight:700;color:#314d58;font-size:.9rem}.form input:not([type=checkbox]),.form textarea,.form select{background:#fff;border:1px solid #bfced0;border-radius:8px;padding:11px 12px;min-width:0;width:100%;color:#183142;font-weight:400;font-size:1rem}.form textarea{resize:vertical}.form .inline{display:flex;align-items:center;gap:9px}.inline input{accent-color:#1e5a66;width:18px;height:18px}.form .hint{font-size:.86rem;margin:-8px 0;color:#687d83}.form .button{justify-self:start}.two{display:grid;grid-template-columns:1fr 1fr;gap:16px}.question-edit{background:#f4f8f7;border-radius:10px;padding:19px;display:grid;gap:13px}.form-actions{display:flex;gap:8px}.secondary{display:inline-flex;align-items:center;gap:6px}.people>div{border-top:1px solid #e3e9e9;padding:10px 0;display:flex;justify-content:space-between;gap:14px}.people span{color:#687e84;font-size:.85rem}.alert{padding:13px 18px;background:#fff0ec;color:#a2392f;border-radius:9px;margin-bottom:20px}footer{padding:25px;text-align:center;color:#93a3a6;letter-spacing:.13em;font-size:.7rem}.signin{min-height:100vh;background:#153448;padding:35px;display:flex;flex-direction:column}.signin-card{background:white;margin:auto;width:min(500px,100%);border-radius:17px;padding:45px;box-shadow:0 20px 60px #06172333}.signin-card p{color:#607780;margin:15px 0 26px}.loading{padding:50px}.mobile-nav{display:none}
@media(max-width:850px){.side{width:215px}.content{padding:32px 25px 70px}.cards{grid-template-columns:1fr}.page-head{align-items:flex-start}.count{padding:10px}.notice-card{min-height:220px}}
@media(max-width:650px){.side{display:none}.mobile-brand{display:block;margin-right:auto;color:#163b4d;font-family:Georgia,serif;font-weight:700;font-size:1.25rem}.mobile-brand span{font-family:Arial,sans-serif;letter-spacing:.12em;font-size:.6rem}.top{height:56px;padding:0 18px}.content{padding:30px 17px 115px}.page-head{display:block}.count{display:inline-flex;margin-top:22px}.mobile-nav{display:flex;position:fixed;bottom:0;left:0;right:0;background:white;border-top:1px solid #d9e4e5;overflow-x:auto;z-index:10;padding:6px 4px env(safe-area-inset-bottom)}.mobile-nav button{min-width:72px;flex:1;border:0;background:none;display:grid;justify-items:center;gap:2px;color:#647b81;font-size:.65rem;padding:7px 2px}.mobile-nav button.active{color:#205a66;font-weight:700}.mobile-nav span{white-space:nowrap}.row-card,.action-row{align-items:flex-start;flex-direction:column}.two{grid-template-columns:1fr}.reading,.quiz,.panel{padding:22px}.people>div{display:block}.people span{display:block}}
.login-form{display:grid;gap:16px}.login-form label{display:grid;gap:6px;font-weight:700}.login-form input{width:100%;padding:13px;border:1px solid #bbcbce;border-radius:8px}.signin-card .alert{margin-bottom:0}.code-box{background:#f7f3e8;border:1px solid #ddc79e;padding:18px;border-radius:10px;margin:15px 0}.code-number{display:block;font-size:2rem;font-weight:800;letter-spacing:.15em;color:#183b4d}.code-entry{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin:18px 0}.code-entry input{width:135px;border:1px solid #bfcdd0;border-radius:8px;padding:12px;font-size:1.25rem;letter-spacing:.12em}.hint{color:#60767c;font-size:.9rem}.mobile-nav button{min-width:74px}.reading .article-body{white-space:normal}.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
@media(max-width:650px){.mobile-nav button{font-size:.75rem;min-height:54px}.notice-card{min-height:190px}.button,.secondary,.action-row button,.attendees button{min-height:44px}.page-head p{font-size:1rem}}

/* Protocolos y revisión */
.kb-search{width:100%;padding:13px 15px;border:1px solid #d2dddd;border-radius:12px;background:#fff;font-size:16px;margin:4px 0 12px}
.chips{display:flex;gap:7px;flex-wrap:wrap;margin:0 0 12px}.chip{border:1px solid #d2dddd;background:#fff;color:#183142;border-radius:999px;padding:6px 12px;font-size:.85rem}.chip b{font-weight:400;opacity:.6;margin-left:3px}.chip.on{background:#16354a;border-color:#16354a;color:#fff}
.kb-row{display:grid;gap:5px;width:100%;text-align:left;background:#fff;border:1px solid #dce5e5;border-radius:12px;padding:14px 16px;color:#183142}.kb-row:hover{border-color:#2c6973}.kb-title{font-weight:700;font-size:1.02rem}.kb-meta{display:flex;gap:6px;flex-wrap:wrap}.kb-sum{color:#586d76;font-size:.88rem}
.kb-article .article-body h3,.kb-article .article-body h4{margin:1.3rem 0 .4rem;font-size:1.05rem}.kb-article .article-body ul,.kb-article .article-body ol{padding-left:1.3rem;margin:.3rem 0 .8rem}.kb-article .article-body li{margin:.2rem 0}
.kb-images{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:8px;margin-top:18px}.kb-images img{width:100%;border-radius:10px;border:1px solid #dce5e5;display:block}
.kb-box{background:#f5f7f7;border-radius:10px;padding:12px 14px;margin-top:14px;font-size:.92rem}.kb-box h4{margin:0 0 6px;font-size:.75rem;letter-spacing:.1em;text-transform:uppercase;color:#586d76}.kb-box summary{cursor:pointer;font-weight:700}.kb-box ul{margin:.5rem 0 0;padding-left:1.2rem}
.linkish{display:block;border:0;background:none;color:#205a66;text-decoration:underline;padding:4px 0;text-align:left}
.row-between{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}.btns{display:flex;gap:8px;flex-wrap:wrap}
.doubt{background:#fff;border:1px solid #dce5e5;border-left:4px solid #9fb3b8;border-radius:12px;padding:14px 16px;margin:10px 0}.doubt.p-alta{border-left-color:#a43737}.doubt.p-media{border-left-color:#c79a3e}.doubt.resuelta{opacity:.75}
.doubt-q{font-weight:700;margin:8px 0 4px}.doubt .hint{margin-bottom:6px}
.answer{background:#e6f1f1;border-radius:10px;padding:8px 12px;margin:8px 0}.answer p{margin:4px 0 0}.answer small{color:#586d76}
.answer-form{margin-top:8px}.answer-form textarea{width:100%}
code{background:#edf1f1;padding:1px 5px;border-radius:5px;font-size:.85em}
.kb-meta .pill:not(.new):not(.done):not(.wait),.card-meta .pill:not(.new):not(.done):not(.wait){background:#edf1f1;color:#35505a}
/* Botón de tema (sol en modo oscuro, luna en modo claro) */
.theme-toggle{display:inline-grid;place-items:center;flex:none;width:40px;height:40px;padding:0;border:1px solid #bdd0d0;border-radius:8px;background:#f5faf8;color:#275b64}
.theme-toggle:hover{border-color:#2c6973}
.theme-toggle:focus-visible,.secondary:focus-visible,.button:focus-visible,.chip:focus-visible,.kb-row:focus-visible{outline:3px solid #d6af70;outline-offset:2px}
.theme-toggle svg{display:block}
.theme-toggle .icon-sun,html[data-theme=dark] .theme-toggle .icon-moon{display:none}
html[data-theme=dark] .theme-toggle .icon-sun{display:block}
.theme-fixed{position:fixed;top:max(16px,env(safe-area-inset-top));right:16px;z-index:20;background:#ffffff14;border-color:#ffffff45;color:#e6c98e}
.theme-fixed:hover{background:#ffffff24;border-color:#e6c98e}
@media(max-width:650px){.top{gap:8px;padding:0 12px}
.top>span{font-size:.72rem;line-height:1.15;text-align:right;max-width:64px}
.top .secondary{padding:9px 10px}
.theme-toggle{width:44px;height:44px}
.theme-fixed{width:44px;height:44px}
}
/* Modo oscuro. La barra lateral (.side) ya es oscura y no cambia. */
html[data-theme=dark]{color-scheme:dark;
 --bg:#0d1a22;--surface:#152530;--surface-2:#1b2e3a;--surface-3:#223847;--line:#2a4252;--line-strong:#3a5566;
 --text:#e6edef;--text-soft:#c9d6da;--muted:#9fb2b9;--link:#86cdd2;--gold:#d6af70;--gold-hover:#e3c48e;--on-gold:#15222b}
html[data-theme=dark] body{background:var(--bg);color:var(--text)}
html[data-theme=dark] .eyebrow{color:var(--gold)}
html[data-theme=dark] .top{background:var(--surface);border-bottom-color:var(--line);color:var(--muted)}
html[data-theme=dark] .mobile-brand{color:#e6c98e}
html[data-theme=dark] .mobile-brand span{color:var(--text-soft)}
html[data-theme=dark] .page-head p{color:var(--muted)}
html[data-theme=dark] .count{background:var(--surface-2)}
html[data-theme=dark] .count strong{color:var(--link)}
html[data-theme=dark] .notice-card,html[data-theme=dark] .row-card,html[data-theme=dark] .panel,html[data-theme=dark] .reading,html[data-theme=dark] .quiz,html[data-theme=dark] .empty{background:var(--surface);border-color:var(--line);box-shadow:0 4px 18px #00000033}
html[data-theme=dark] .notice-card:hover{box-shadow:0 10px 26px #00000055}
html[data-theme=dark] .notice-card p,html[data-theme=dark] .row-card p,html[data-theme=dark] .panel>p,html[data-theme=dark] .quiz>p,html[data-theme=dark] .empty{color:var(--muted)}
html[data-theme=dark] .card-meta{color:#8fa4ab}
html[data-theme=dark] .pill.new{background:#3a2c17;color:#f0cf9a}
html[data-theme=dark] .pill.done{background:#173a33;color:#8fd9c4}
html[data-theme=dark] .pill.wait{background:#1d2e47;color:#a9c4ec}
html[data-theme=dark] .kb-meta .pill:not(.new):not(.done):not(.wait),html[data-theme=dark] .card-meta .pill:not(.new):not(.done):not(.wait){background:var(--surface-3);color:var(--text-soft)}
html[data-theme=dark] .empty svg{color:var(--gold)}
html[data-theme=dark] .empty h2{color:var(--text)}
html[data-theme=dark] .material summary span,html[data-theme=dark] .back{color:var(--link)}
html[data-theme=dark] .material .article-body{border-top-color:var(--line)}
html[data-theme=dark] .article-body{color:#dde6e9}
html[data-theme=dark] .quiz fieldset,html[data-theme=dark] .action-row,html[data-theme=dark] .session-admin,html[data-theme=dark] .message,html[data-theme=dark] .people>div{border-top-color:var(--line)}
html[data-theme=dark] .choice{border-color:var(--line-strong)}
html[data-theme=dark] .choice:has(input:checked){border-color:var(--link);background:#18343a}
html[data-theme=dark] .choice input,html[data-theme=dark] .inline input{accent-color:var(--gold)}
html[data-theme=dark] .button,html[data-theme=dark] .chip.on{background:var(--gold);border-color:var(--gold);color:var(--on-gold)}
html[data-theme=dark] .button:hover{background:var(--gold-hover)}
html[data-theme=dark] .success{background:#123429;color:#9fe0c4}
html[data-theme=dark] .retry{background:#3a2c17;color:#f0d3a4}
html[data-theme=dark] .alert{background:#3d1b19;color:#ffb4a8}
html[data-theme=dark] .action-row small,html[data-theme=dark] .message small,html[data-theme=dark] .people span,html[data-theme=dark] .hint,html[data-theme=dark] .form .hint{color:var(--muted)}
html[data-theme=dark] .action-row button,html[data-theme=dark] .attendees button,html[data-theme=dark] .secondary,html[data-theme=dark] .theme-toggle:not(.theme-fixed){background:var(--surface-2);border-color:var(--line-strong);color:var(--link)}
html[data-theme=dark] .secondary:hover,html[data-theme=dark] .action-row button:hover,html[data-theme=dark] .attendees button:hover,html[data-theme=dark] .theme-toggle:not(.theme-fixed):hover{border-color:var(--link)}
html[data-theme=dark] th,html[data-theme=dark] td{border-bottom-color:var(--line)}
html[data-theme=dark] .form label,html[data-theme=dark] .login-form label{color:var(--text-soft)}
html[data-theme=dark] .form input:not([type=checkbox]),html[data-theme=dark] .form textarea,html[data-theme=dark] .form select,html[data-theme=dark] .login-form input,html[data-theme=dark] .code-entry input,html[data-theme=dark] .kb-search,html[data-theme=dark] .answer-form textarea{background:#0f1f29;border-color:var(--line-strong);color:var(--text)}
html[data-theme=dark] input::placeholder,html[data-theme=dark] textarea::placeholder{color:#7f959d}
html[data-theme=dark] .question-edit{background:var(--surface-2)}
html[data-theme=dark] footer{color:#71878e}
html[data-theme=dark] .signin{background:#0b161d}
html[data-theme=dark] .signin-card{background:var(--surface);box-shadow:0 20px 60px #00000080}
html[data-theme=dark] .signin-card p{color:var(--muted)}
html[data-theme=dark] .code-box{background:#2b2416;border-color:#6b5733}
html[data-theme=dark] .code-number{color:#f0cf9a}
html[data-theme=dark] .mobile-nav{background:var(--surface);border-top-color:var(--line)}
html[data-theme=dark] .mobile-nav button{color:var(--muted)}
html[data-theme=dark] .mobile-nav button.active{color:var(--gold)}
html[data-theme=dark] .chip{background:var(--surface);border-color:var(--line-strong);color:var(--text-soft)}
html[data-theme=dark] .kb-row{background:var(--surface);border-color:var(--line);color:var(--text)}
html[data-theme=dark] .kb-row:hover{border-color:var(--link)}
html[data-theme=dark] .kb-sum{color:var(--muted)}
html[data-theme=dark] .kb-images img{border-color:var(--line)}
html[data-theme=dark] .kb-box{background:var(--surface-2)}
html[data-theme=dark] .kb-box h4,html[data-theme=dark] .answer small{color:var(--muted)}
html[data-theme=dark] .linkish{color:var(--link)}
html[data-theme=dark] .doubt{background:var(--surface);border-color:var(--line);border-left-color:#5d7680}
html[data-theme=dark] .doubt.p-alta{border-left-color:#e07a72}
html[data-theme=dark] .doubt.p-media{border-left-color:var(--gold)}
html[data-theme=dark] .answer{background:#183139}
html[data-theme=dark] code{background:var(--surface-3);color:#f0dcb6}
