/* Dark mode toggle button (light look first, then dark) */
.rlw-tt{display:inline-flex;align-items:center;justify-content:center;flex:none;width:38px;height:38px;padding:0;margin:0;border-radius:999px;border:1px solid #cfd5e6;background:#fff;color:#1B2A6B;cursor:pointer;line-height:0;-webkit-tap-highlight-color:transparent}
.rlw-tt:hover{background:#f5f7fc}
.rlw-tt:focus-visible{outline:3px solid #0A8F4A;outline-offset:2px}
.rlw-tt svg{display:block;width:20px;height:20px}
html.rlw-tanim,html.rlw-tanim *,html.rlw-tanim *::before,html.rlw-tanim *::after{transition:background-color .25s ease,color .25s ease,border-color .25s ease,fill .25s ease,box-shadow .25s ease!important}
@media (prefers-reduced-motion:reduce){html.rlw-tanim,html.rlw-tanim *,html.rlw-tanim *::before,html.rlw-tanim *::after{transition:none!important}}
[data-theme=dark] .rlw-tt{background:#161B22;border-color:#2A3140;color:#F0D78A}
[data-theme=dark] .rlw-tt:hover{background:#1c222c}

/* ---- Light mode (this tool is dark by default; light is opt-in via the toggle or the homepage) ---- */
html[data-theme=light]{--bg:#f5f7fc;--panel:#ffffff;--panel2:#f5f7fc;--line:#dfe3ee;--text:#141a33;--muted:#5d6580;--focus:#1B2A6B}
[data-theme=light] header.brand img,[data-theme=light] .topbar img{content:url(logo-d.png)}
main.wrap{position:relative}
.rlw-corner{position:absolute;top:12px;right:12px;z-index:5}
main.wrap:has(#appView:not(.hidden))>.rlw-corner{display:none}
[data-theme=light] body{background:var(--bg);color:var(--text)}
[data-theme=light] a{color:#1270a5}
[data-theme=light] .lead{color:var(--muted)}
[data-theme=light] .card{background:var(--panel);border:1px solid var(--line);border-radius:16px}
[data-theme=light] .accent{border-radius:4px;background:linear-gradient(90deg,var(--navy2) 0 50%,var(--green) 50% 100%)}
[data-theme=light] input[type=text],[data-theme=light] input[type=tel],[data-theme=light] input[type=password],[data-theme=light] input[type=search],[data-theme=light] input[type=date],[data-theme=light] input[type=month],[data-theme=light] input[type=time],[data-theme=light] input[type=number],[data-theme=light] textarea,[data-theme=light] select{color:var(--text);background:var(--panel2);border:1px solid var(--line);border-radius:12px}
[data-theme=light] input::placeholder,[data-theme=light] textarea::placeholder{color:#7d8394}
[data-theme=light] :focus-visible{outline:3px solid var(--focus);outline-offset:2px}
[data-theme=light] input:focus,[data-theme=light] textarea:focus,[data-theme=light] select:focus{border-color:var(--focus)}
[data-theme=light] .hint{color:var(--muted)}
[data-theme=light] .err{color:#a51212}
[data-theme=light] .ok{color:#289052}
[data-theme=light] .btn{border:0;border-radius:12px;text-decoration:none;color:#fff;background:var(--green)}
[data-theme=light] .btn:hover{background:var(--green2)}
[data-theme=light] .btn.big{border-radius:16px}
[data-theme=light] .btn.navy{background:var(--navy2)}
[data-theme=light] .btn.navy:hover{background:#3550b8}
[data-theme=light] .btn.ghost{background:transparent;border:1px solid var(--line);color:var(--text)}
[data-theme=light] .btn.ghost:hover{background:var(--panel2)}
[data-theme=light] .btn.danger{background:#8d2323}
[data-theme=light] .linkbtn{background:none;border:0;color:#1270a5;text-decoration:underline}
[data-theme=light] footer.foot{color:var(--muted);border-top:1px solid var(--line)}
[data-theme=light] .small{color:var(--muted)}
[data-theme=light] .clock{color:var(--muted)}
[data-theme=light] .pick{border:1px solid var(--line);border-radius:12px;background:var(--panel2)}
[data-theme=light] .pick button{color:var(--text);background:none;border:0;border-bottom:1px solid var(--line)}
[data-theme=light] .pick button:last-child{border-bottom:0}
[data-theme=light] .pick button:hover,[data-theme=light] .pick button[aria-pressed=true]{background:#20305f}
[data-theme=light] .pick .u{color:var(--muted)}
[data-theme=light] .done .tick{border-radius:50%;background:var(--green)}
[data-theme=light] .done .tick.late{background:var(--amber)}
[data-theme=light] .pill{border-radius:999px}
[data-theme=light] .pill.ontime{background:#e2f8ed;color:#1f9853;border:1px solid var(--green)}
[data-theme=light] .pill.late{background:#f8efe2;color:#a56e12;border:1px solid var(--amber)}
[data-theme=light] .pill.absent{background:#f6e5e5;color:#a51212;border:1px solid #a33}
[data-theme=light] .pill.excused{background:#e6e8f4;color:#1226a5;border:1px solid #5566c4}
[data-theme=light] .pill.notyet{background:var(--panel2);color:var(--muted);border:1px solid var(--line)}
[data-theme=light] .notice{background:var(--panel2);border:1px solid var(--line);border-left:4px solid var(--navy2);border-radius:12px}
[data-theme=light] .notice.warn{border-left-color:var(--amber)}
[data-theme=light] .tabs{border-bottom:1px solid var(--line)}
[data-theme=light] .tabs button{background:none;color:var(--muted);border:0;border-bottom:3px solid transparent}
[data-theme=light] .tabs button[aria-selected=true]{color:#141a33;border-bottom-color:var(--green)}
[data-theme=light] .stat{background:var(--panel);border:1px solid var(--line);border-radius:12px}
[data-theme=light] .stat span{color:var(--muted)}
[data-theme=light] .tablewrap{border:1px solid var(--line);border-radius:12px}
[data-theme=light] table{border-collapse:collapse}
[data-theme=light] th,[data-theme=light] td{border-bottom:1px solid var(--line)}
[data-theme=light] th{background:var(--panel2);color:var(--muted)}
[data-theme=light] tr:last-child td{border-bottom:0}
[data-theme=light] tr.top1 td{background:rgba(212,167,44,.14)}
[data-theme=light] tr.top2 td{background:rgba(184,190,201,.12)}
[data-theme=light] tr.top3 td{background:rgba(194,122,69,.14)}
[data-theme=light] tr.bot td{background:rgba(42,61,147,.18)}
[data-theme=light] .medal{border-radius:14px;border:2px solid;background:var(--panel)}
[data-theme=light] .medal .m{border-radius:50%;color:#1a1306}
[data-theme=light] .medal.g{border-color:var(--gold)}
[data-theme=light] .medal.g .m{background:var(--gold)}
[data-theme=light] .medal.s{border-color:var(--silver)}
[data-theme=light] .medal.s .m{background:var(--silver)}
[data-theme=light] .medal.b{border-color:var(--bronze)}
[data-theme=light] .medal.b .m{background:var(--bronze)}
[data-theme=light] .medal .d{color:var(--muted)}
[data-theme=light] .encourage{border:1px solid #3a4a99;background:#e4e8f7;border-radius:14px}
[data-theme=light] .cardprev{border-radius:12px;border:1px solid var(--line)}
[data-theme=light] .wlist .w{border-bottom:1px solid var(--line)}
/* ---- Light mode hand-tuned ---- */
