/* Sanad: Nile teal theme (light + dark), Alexandria type, B + C layout pieces */
:root{
  --ground:#EDF3F1; --sheet:#FFFFFF; --sheet2:#F5F9F8; --ground-a:rgba(237,243,241,.92); --sheet-a:rgba(255,255,255,.96);
  --ink:#10292A; --ink2:#3E5455; --ink3:#5F7373; --line:#D5E2DF; --line2:#E4EDEA; --hover-line:#A9C4BF;
  --pen:#0E6B66; --pen-d:#0A5551; --pen-bg:#D7EBE7; --on-pen:#FFFFFF;
  --btn:#10292A; --btn-h:#1D3B3C; --on-btn:#FFFFFF;
  --hl:#F4A979; --hl-bg:#FCE9D9;
  --red:#B8402B; --red-bg:#FAE7E2; --green:#1E7A4C; --green-bg:#DFF1E7; --amber:#94560F; --amber-bg:#FBEEDC;
  --c1:#0E6B66; --c2:#A9501A; --c3:#34508F; --c4:#7A3E6E; --c5:#2F6E3A; --c6:#8A5A0F; --c7:#5B4BB7; --c8:#A33A48;
  --r-sheet:22px; --r-ctl:14px;
  font-family:'Alexandria',system-ui,-apple-system,'Segoe UI',sans-serif;
  color-scheme:light;
}
:root[data-theme=dark]{
  --ground:#0E1A1B; --sheet:#172627; --sheet2:#1C2D2E; --ground-a:rgba(14,26,27,.92); --sheet-a:rgba(23,38,39,.96);
  --ink:#E8F1EF; --ink2:#B4C6C3; --ink3:#93A9A6; --line:#2A3D3E; --line2:#223435; --hover-line:#3E5859;
  --pen:#45B8AE; --pen-d:#6CCBC2; --pen-bg:#1E3B3A; --on-pen:#0E1A1B;
  --btn:#E8F1EF; --btn-h:#FFFFFF; --on-btn:#0E1A1B;
  --hl:#F4A979; --hl-bg:#3A2C17;
  --red:#F2917C; --red-bg:#3A221D; --green:#77D19E; --green-bg:#17342A; --amber:#E9B460; --amber-bg:#3A2C17;
  color-scheme:dark;
}
body{font-size:15px;letter-spacing:-.003em}
h1{font-weight:800;letter-spacing:-.025em}
h2,h3{font-weight:700}
::selection{background:var(--pen-bg)}

/* controls */
.btn{border-radius:999px;font-weight:600;padding:10px 18px}
.btn.sm{border-radius:999px}
.btn.quiet{background:var(--sheet);color:var(--ink);border-color:var(--line)}
.btn.big{min-height:54px;border-radius:999px}
.input{background:var(--sheet);border-radius:var(--r-ctl)}
.input:focus{border-color:var(--pen);box-shadow:0 0 0 3px var(--pen-bg)}
select.input{background-color:var(--sheet)}
.seg{border-radius:999px;padding:4px}
.seg button{border-radius:999px}
.iconbtn{border-radius:999px}
.sheet{border-radius:var(--r-sheet);border-color:transparent}
.sheet.tight{border-color:transparent}
.modal{border-radius:26px;background:var(--sheet);color:var(--ink)}
.tag{font-weight:600}
.cband{color:#FFFFFF!important}
.nav .cnt{color:#FFFFFF}
.sendbtn{border-radius:999px;background:var(--btn);color:var(--on-btn)}
.composer{border-radius:28px;border:2px solid var(--ink)}
.composer:focus-within{border-color:var(--pen)}
.umsg div{background:var(--btn);color:var(--on-btn);border-radius:20px}
.amsg .body{background:var(--sheet);border-radius:20px;padding:14px 16px}
.amsg>img{display:none}
.stat{background:var(--sheet)}
.duebar{background:var(--red-bg);border-color:transparent}
#toast{border-radius:999px}
.src{border-radius:12px}

/* theme toggle */
.modebtn{width:44px;height:44px;border-radius:999px;border:0;background:var(--sheet);color:var(--ink);display:inline-grid;place-items:center;cursor:pointer;flex:none}
.modebtn:hover{background:var(--line2)}

/* =============== welcome =============== */
.wl{min-height:100dvh;background:var(--ground);color:var(--ink)}
.wl-in{max-width:1180px;margin:0 auto;padding:0 20px;box-sizing:border-box}
.wl-nav{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:22px 0}
.wl-logo{white-space:nowrap;font-size:22px;font-weight:800;letter-spacing:-.02em;display:flex;align-items:center;gap:10px;color:var(--ink);text-decoration:none}
.wl-logo img{width:32px;height:32px;border-radius:9px}
.wl-logo span{font-weight:500;color:var(--ink3)}
.wl-nav .acts{display:flex;gap:8px;align-items:center}
.wl-pill{white-space:nowrap;height:44px;padding:0 16px;border-radius:999px;background:var(--sheet);border:0;color:var(--ink);font-weight:600;display:inline-flex;align-items:center;cursor:pointer;font-size:14.5px}
.wl-pill.ghost{background:transparent;font-weight:500}
.wl-hero{display:flex;flex-wrap:wrap;gap:40px;align-items:center;padding:24px 0 48px}
.wl-copy{flex:1 1 420px;min-width:0}
.wl-copy h1{font-size:clamp(2.4rem,6vw,4.5rem);line-height:1.02;margin:0}
[dir=rtl] .wl-copy h1{line-height:1.2}
.wl-copy p{margin-top:18px;max-width:32rem;font-size:1.13rem;line-height:1.65;color:var(--ink2)}
.wl-ctas{margin-top:30px;display:flex;gap:10px;flex-wrap:wrap}
.wl-cta{height:56px;padding:0 26px;border-radius:999px;border:0;display:inline-flex;flex-direction:row;align-items:center;justify-content:center;white-space:nowrap;min-height:0;gap:10px;font-weight:700;font-size:16px;cursor:pointer}
.wl-cta.main{background:var(--btn);color:var(--on-btn)}
.wl-cta.alt{background:var(--sheet);color:var(--ink)}
.wl-demo{flex:1 1 420px;min-width:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.wl-big{grid-column:span 2;border-radius:30px;background:var(--c1);color:#fff;padding:22px}
.wl-big .t{font-size:28px;font-weight:800;line-height:1}
.wl-q{margin:16px 0 0 auto;width:fit-content;max-width:78%;background:#0B1F1F;color:#fff;padding:11px 15px;border-radius:20px;font-size:14.5px;line-height:1.55}
[dir=rtl] .wl-q{margin:16px auto 0 0}
.wl-a{margin-top:10px;max-width:88%;background:var(--sheet);color:var(--ink);padding:13px 15px;border-radius:20px;font-size:14.5px;line-height:1.65}
.wl-ref{margin-top:10px;display:inline-flex;align-items:center;gap:8px;background:var(--pen-bg);color:var(--pen-d);border-radius:12px;padding:7px 11px;font-size:13px;font-weight:700}
.wl-small{border-radius:26px;color:#fff;padding:18px;min-height:118px;display:flex;flex-direction:column;justify-content:space-between}
.wl-small b{font-size:21px;font-weight:800;line-height:1.08}
.wl-small span{font-size:13.5px;opacity:.9}
.wl-how h2{font-size:1.5rem;font-weight:800;margin:0 0 16px}
.wl-steps{display:flex;flex-wrap:wrap;gap:12px}
.wl-step{flex:1 1 240px;background:var(--sheet);border-radius:24px;padding:22px}
.wl-step .n{width:38px;height:38px;border-radius:999px;background:var(--btn);color:var(--on-btn);display:grid;place-items:center;font-weight:800}
.wl-step h3{margin:14px 0 6px;font-size:17px}
.wl-step p{color:var(--ink2);font-size:14.5px;line-height:1.6}
.wl-foot{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:22px 0 32px;margin-top:40px;border-top:1px solid var(--line);font-size:14px;color:var(--ink3)}
.wl-foot button{background:none;border:0;padding:0;color:var(--ink);font-weight:700;cursor:pointer;font-size:14px;text-decoration:underline;text-underline-offset:3px}
@media (max-width:640px){
  .wl-hero{gap:22px;padding-top:4px}
  .wl-logo span{display:none}
  .wl-nav .acts{gap:4px}
  .wl-pill.ghost{padding:0 10px}
  .wl-copy h1{font-size:2.6rem}
  .wl-ctas{flex-direction:column}
  .wl-cta{width:100%;justify-content:center}
  .wl-big{padding:18px}
  .wl-big .t{font-size:24px}
  .wl-small{min-height:92px;padding:14px}
  .wl-small b{font-size:17px}
}

/* =============== student week home =============== */
.wk{max-width:760px;margin:0 auto;padding:22px 16px 40px}
.wk-date{font-size:14px;color:var(--ink3)}
.wk h1{font-size:40px;line-height:1.05;margin:2px 0 0}
.wk-strip{margin-top:16px;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}
.wk-day{border:0;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:4px;padding:9px 0 8px;border-radius:16px;background:var(--sheet);color:var(--ink)}
.wk-day small{font-size:11px;color:var(--ink3)}
.wk-day b{font-size:17px;font-weight:700}
.wk-day .dots{display:flex;gap:3px;height:6px}
.wk-day .dots i{width:6px;height:6px;border-radius:3px}
.wk-day.on{background:var(--btn);color:var(--on-btn)}
.wk-day.on small{color:inherit;opacity:.8}
.wk-sec{display:flex;justify-content:space-between;align-items:baseline;margin:24px 4px 10px;font-size:16px;font-weight:700}
.wk-sec button{background:none;border:0;color:var(--ink3);font-size:13px;cursor:pointer}
.wk-list{display:flex;flex-direction:column;gap:8px}
.wk-item{display:flex;gap:12px;align-items:center;padding:12px 14px;background:var(--sheet);border-radius:20px;border:0;width:100%;text-align:start;cursor:pointer;color:var(--ink)}
.wk-item:hover{box-shadow:0 0 0 1.5px var(--hover-line)}
.wk-tile{width:44px;height:44px;border-radius:14px;color:#fff;display:grid;place-items:center;font-size:14px;font-weight:800;flex:none}
.wk-item .tx{flex:1;min-width:0}
.wk-item .tx b{display:block;font-size:15px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wk-item .tx span{display:block;font-size:13px;color:var(--ink3);margin-top:2px}
.wk-badge{background:var(--btn);color:var(--on-btn);border-radius:12px;padding:5px 10px;font-size:12px;font-weight:700;flex:none;white-space:nowrap}
.wk-badge.done{background:var(--green-bg);color:var(--green)}
.wk-badge.late{background:var(--red-bg);color:var(--red)}
.wk-none{padding:16px;background:var(--sheet);border-radius:20px;color:var(--ink3);font-size:14px}
.shelf{display:flex;gap:8px;overflow-x:auto;padding-bottom:6px;scrollbar-width:none}
.shelf::-webkit-scrollbar{display:none}
.shelf-c{flex:none;width:152px;height:110px;border-radius:22px;border:0;color:#fff;padding:14px;display:flex;flex-direction:column;justify-content:space-between;text-align:start;cursor:pointer}
.shelf-c b{font-size:19px;font-weight:800;line-height:1.08;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.shelf-c span{font-size:12px;opacity:.88;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.shelf-c.add{background:var(--sheet);color:var(--ink);border:1.5px dashed var(--hover-line);align-items:center;justify-content:center;gap:6px;font-weight:600}

/* =============== course page =============== */
.chd{color:#fff;padding:18px 18px 18px;border-radius:0 0 30px 30px;margin:0 0 6px}
.chd-in{max-width:760px;margin:0 auto}
.chd .back{width:44px;height:44px;border-radius:999px;border:0;background:rgba(255,255,255,.18);color:#fff;display:grid;place-items:center;cursor:pointer}
.chd h1{font-size:36px;line-height:1.05;margin:14px 0 0;color:#fff}
.chd .sub{font-size:14px;opacity:.9;margin-top:4px}
.chd-doors{margin-top:18px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.chd-door{height:66px;border-radius:18px;border:0;background:rgba(255,255,255,.18);color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-weight:600;font-size:13px;cursor:pointer}
.chd-door.main{background:#fff;color:var(--cc,#0E6B66)}
.cpg{max-width:760px;margin:0 auto;padding:4px 16px 40px}
.cpg .wk-list{background:var(--sheet);border-radius:22px;gap:0;padding:4px 0}
.cpg .wk-list .wk-item{border-radius:0;background:transparent}
.cpg .wk-list .wk-item+.wk-item{border-top:1px solid var(--line2)}
.cmore{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.cmore button{display:flex;align-items:center;gap:10px;padding:14px;border-radius:18px;border:0;background:var(--sheet);color:var(--ink);font-weight:600;cursor:pointer;text-align:start}
.cmore button .i{color:var(--pen)}
.cico{width:44px;height:44px;border-radius:14px;background:var(--pen-bg);color:var(--pen);display:grid;place-items:center;flex:none}

/* chat course strip (students) */
.cstrip{display:flex;align-items:center;gap:10px;color:#fff;padding:12px 14px;border-radius:0 0 22px 22px}
.cstrip b{font-size:18px;font-weight:800}
.cstrip span{font-size:12.5px;opacity:.9}
.cstrip .back{width:40px;height:40px;border-radius:999px;border:0;background:rgba(255,255,255,.18);color:#fff;display:grid;place-items:center;cursor:pointer;flex:none}

/* deadlines + check my work */
.cmw{margin-top:12px;padding:12px 14px;border-radius:16px;background:var(--pen-bg);font-size:14px;line-height:1.6}
.cmw b{color:var(--pen-d)}
.cmw ul{margin:6px 0 0;padding-inline-start:20px}
.cmw li+li{margin-top:4px}
.fillbox{border:1.5px dashed var(--hover-line);border-radius:18px;padding:14px;margin-top:6px;background:var(--sheet2)}

/* =============== mobile bottom bar: dark pill =============== */
@media (max-width:900px){
  .tabs{left:12px;right:12px;bottom:calc(12px + var(--safe-b));height:60px;padding:6px;border-radius:999px;background:var(--btn);border:0;gap:4px;box-shadow:0 10px 30px -12px rgba(0,0,0,.45);inset-inline:12px}
  .tabs button{flex-direction:row;gap:7px;border-radius:999px;color:var(--on-btn);opacity:.78;font-size:13px;font-weight:600}
  .tabs button.on{background:var(--sheet);color:var(--ink);opacity:1}
  .tabs button.on::after{display:none}
  .tabs .i{width:19px;height:19px}
  .tabs button>span:last-child{white-space:nowrap}
  .tabs .dot{top:10px}
  .has-tabs .page{padding-bottom:calc(84px + var(--safe-b))}
  .mtop{background:var(--ground-a);border-bottom:0}
  .chd{border-radius:0 0 28px 28px}
}
@media (max-width:900px){.tabs:has(button:nth-child(5)) button:not(.on)>span:last-child{display:none}}
@media (max-width:380px){.tabs button:not(.on)>span:last-child{display:none}}
.sb .me .iconbtn,.sb .me .modebtn{width:34px;height:34px}
.sb .me .modebtn{background:transparent;color:var(--ink2)}
.aifilled{box-shadow:0 0 0 3px var(--pen-bg)!important;border-color:var(--pen)!important}
.fillbox b{display:flex;align-items:center;gap:6px}
.cmore #cCheck{gap:12px}
