/* IAS Valley courses. The same visual language as the rest of IAS Valley: olive for anything that acts,
   gold for a highlight, Roboto Condensed for headings, Mukta for reading. The catalogue is a shopfront and
   reads like one; the watch page gets out of the way, because somebody is there to study, not to admire it. */
:root{
  --olive:#5c5608; --olive-dark:#454005; --olive-deep:#2b2805; --olive-soft:#edefdc; --olive-line:#d6dab4;
  --gold:#fec600; --gold-soft:#fff6d9;
  --ink:#151a30; --ink-2:#3d4152; --mute:#5f6368; --hair:#e2e4e8; --line:#c9ccd2;
  --paper:#f7f6f2; --card:#fff; --bad:#a32d1c; --good:#2f6b3a;
  --display:"Roboto Condensed","Arial Narrow",Arial,sans-serif;
  --body:"Mukta",-apple-system,system-ui,"Segoe UI",Roboto,Arial,sans-serif;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0; background:var(--paper); color:var(--ink); font-family:var(--body); font-size:17px; line-height:1.55;
  -webkit-font-smoothing:antialiased}
h1,h2,h3{margin:0; font-family:var(--display); font-weight:700; line-height:1.12; text-wrap:balance}
p{margin:0}
a{color:var(--olive)}
img{max-width:100%; display:block}
[hidden]{display:none!important}
:focus-visible{outline:3px solid var(--gold); outline-offset:2px; border-radius:8px}
.sr{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap}
.wrap{width:100%; max-width:900px; margin:0 auto; padding:0 20px}
.wide{max-width:1180px}

/* ---------- the bar across the top ---------- */
.top{background:#fff; border-bottom:1px solid var(--hair); position:sticky; top:0; z-index:30}
.top-in{display:flex; align-items:center; gap:16px; height:68px}
.brand{display:inline-flex; align-items:center; gap:12px; text-decoration:none; flex:none}
.brand img{width:44px; height:44px; padding:6px; border-radius:50%; background:#fff; border:1px solid var(--olive-line);
  object-fit:contain}
.brand b{font-family:var(--display); font-size:23px; letter-spacing:.02em; text-transform:uppercase; color:var(--olive)}
.brand span{display:block; font-size:12.5px; color:var(--mute); letter-spacing:.02em; text-transform:none;
  font-family:var(--body); font-weight:500}
.top-nav{display:flex; align-items:center; gap:18px; margin-left:22px}
.top-nav a{font-size:15.5px; font-weight:600; color:var(--ink-2); text-decoration:none}
.top-nav a:hover,.top-nav a[aria-current=page]{color:var(--olive)}
.top-right{margin-left:auto; display:flex; align-items:center; gap:12px}
.who{font-size:15px; color:var(--mute); max-width:220px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}

/* ---------- buttons ---------- */
.btn{display:inline-flex; align-items:center; justify-content:center; gap:8px; height:44px; padding:0 20px;
  border-radius:999px; border:1.5px solid transparent; background:var(--olive); color:#fff; font:inherit;
  font-size:16px; font-weight:700; line-height:1; text-decoration:none; cursor:pointer; white-space:nowrap;
  padding-top:2px}
.btn:hover{background:var(--olive-dark)}
.btn[disabled]{opacity:.55; cursor:default}
.btn-ghost{background:#fff; color:var(--ink); border-color:var(--line)}
.btn-ghost:hover{background:var(--paper); border-color:var(--olive)}
.btn-gold{background:var(--gold); color:var(--olive-deep)}
.btn-gold:hover{background:#e8b600}
.btn-sm{height:36px; padding:0 14px; font-size:14.5px}
.btn-wide{width:100%}

/* ---------- cards, notes, states ---------- */
.card{background:var(--card); border:1px solid var(--hair); border-radius:16px; padding:22px}
.note{padding:12px 16px; border-radius:12px; font-size:15.5px}
.note-good{background:var(--olive-soft); color:var(--olive-dark)}
.note-bad{background:#fdf3f1; color:var(--bad)}
.empty{text-align:center; padding:56px 20px; color:var(--mute)}
.empty h2{font-size:24px; color:var(--ink); margin-bottom:8px}
.empty .btn{margin-top:18px}
.pill{display:inline-flex; align-items:center; height:24px; padding:1px 10px 0; border-radius:999px;
  font-family:var(--display); font-size:12.5px; font-weight:700; letter-spacing:.06em; text-transform:uppercase}
.pill-open{background:var(--olive-soft); color:var(--olive-dark)}
.pill-closed{background:var(--hair); color:var(--mute)}
.pill-live{background:#fdecea; color:var(--bad)}
.pill-free{background:var(--gold-soft); color:#7a5c00}
.pill-on{background:var(--olive); color:#fff}

/* ---------- the catalogue ---------- */
.page-head{padding:34px 0 20px}
.page-head h1{font-size:clamp(28px,3.4vw,40px)}
.page-head p{margin-top:8px; color:var(--ink-2); max-width:62ch}
.filters{display:flex; flex-wrap:wrap; gap:8px; padding-bottom:24px}
.chip{display:inline-flex; align-items:center; height:36px; padding:1px 16px 0; border-radius:999px;
  border:1px solid var(--line); background:#fff; color:var(--ink-2); font:inherit; font-size:15px; font-weight:600;
  cursor:pointer}
.chip:hover{border-color:var(--olive); color:var(--olive-dark)}
.chip[aria-pressed=true]{background:var(--olive); border-color:var(--olive); color:#fff}
.grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(290px,1fr)); gap:20px; margin:0 0 56px;
  padding:0; list-style:none}
.course{display:flex; flex-direction:column; background:#fff; border:1px solid var(--hair); border-radius:16px;
  overflow:hidden}
.course-cover{aspect-ratio:16/9; background:var(--olive-soft) center/cover no-repeat; border-bottom:1px solid var(--hair);
  display:grid; place-items:center}
.course-cover span{font-family:var(--display); font-size:34px; font-weight:700; color:var(--olive);
  letter-spacing:.04em; opacity:.55}
.course-body{padding:18px 20px 20px; display:flex; flex-direction:column; gap:8px; flex:1 1 auto}
.course-tags{display:flex; flex-wrap:wrap; gap:6px}
.course h2{font-size:20px}
.course h2 a{color:inherit; text-decoration:none}
.course h2 a:hover{color:var(--olive)}
.course p{font-size:15.5px; color:var(--ink-2)}
.course-foot{margin-top:auto; padding-top:14px; display:flex; align-items:center; gap:12px}
.price{font-family:var(--display); font-size:24px; font-weight:700; color:var(--olive-deep); line-height:1}
.price s{font-size:16px; color:var(--mute); font-weight:400; margin-left:8px}
.course-foot .btn{margin-left:auto}

/* ---------- one course ---------- */
.course-top{display:grid; grid-template-columns:minmax(0,1fr) 340px; gap:32px; align-items:start; padding:30px 0 34px}
.course-top h1{font-size:clamp(26px,3.2vw,38px)}
.course-lede{margin-top:10px; font-size:18px; color:var(--ink-2)}
.meta{display:flex; flex-wrap:wrap; gap:6px 20px; margin-top:16px; font-size:15px; color:var(--mute)}
.about{margin-top:26px; max-width:65ch}
.about h2{font-size:22px; margin-bottom:10px}
.about p{margin-bottom:12px; color:var(--ink-2)}
.buy{position:sticky; top:88px}
.buy .price{font-size:32px; display:block; margin-bottom:4px}
.buy .btn{margin-top:16px}
.buy ul{margin:16px 0 0; padding:0; list-style:none; display:grid; gap:8px; font-size:15.5px; color:var(--ink-2)}
.buy li{display:flex; gap:10px; align-items:flex-start}
.buy li::before{content:""; flex:none; width:8px; height:8px; margin-top:8px; border-radius:50%; background:var(--gold)}

/* ---------- the lecture list ---------- */
.lectures{margin:0 0 60px; padding:0; list-style:none; border:1px solid var(--hair); border-radius:16px;
  background:#fff; overflow:hidden}
.lecture{display:flex; align-items:center; gap:16px; padding:15px 20px; border-top:1px solid var(--hair)}
.lecture:first-child{border-top:0}
.lecture-no{flex:none; width:30px; font-family:var(--display); font-size:17px; font-weight:700; color:var(--mute);
  font-variant-numeric:tabular-nums}
.lecture-main{min-width:0; flex:1 1 auto}
.lecture h3{font-size:17px; font-weight:600; font-family:var(--body)}
.lecture h3 a{color:inherit; text-decoration:none}
.lecture h3 a:hover{color:var(--olive)}
.lecture-meta{margin-top:2px; font-size:14px; color:var(--mute); display:flex; flex-wrap:wrap; gap:3px 14px}
.lecture-acts{flex:none; display:flex; align-items:center; gap:8px}
.lecture-locked{color:var(--mute); font-size:14.5px}

/* ---------- notes to download ---------- */
.notes{margin:0 0 60px; padding:0; list-style:none; display:grid; gap:10px}
.note-row{display:flex; align-items:center; gap:14px; padding:14px 18px; background:#fff; border:1px solid var(--hair);
  border-radius:14px}
.note-row b{font-weight:600; font-size:16px}
.note-row em{font-style:normal; font-size:14px; color:var(--mute); display:block; margin-top:1px}
.note-row .btn{margin-left:auto}
.stamped{margin:-46px 0 60px; font-size:14.5px; color:var(--mute)}

/* ---------- the watch page ---------- */
.watch{display:grid; grid-template-columns:minmax(0,1fr) 340px; gap:26px; align-items:start; padding:24px 0 60px}
.stage{background:#0d0f18; border-radius:16px; overflow:hidden; aspect-ratio:16/9; display:grid; place-items:center}
.stage iframe,.stage video{width:100%; height:100%; border:0; display:block}
.stage-word{color:#cfd2dc; text-align:center; padding:28px; max-width:44ch}
.stage-word b{display:block; font-family:var(--display); font-size:24px; margin-bottom:8px; color:#fff}
.watch-head{padding:20px 2px 0}
.watch-head h1{font-size:25px}
.watch-head .meta{margin-top:8px}
.watch-body{margin-top:18px; max-width:65ch; color:var(--ink-2)}
.panel{background:#fff; border:1px solid var(--hair); border-radius:16px; overflow:hidden; position:sticky; top:88px;
  max-height:calc(100vh - 110px); display:flex; flex-direction:column}
.panel-head{padding:15px 18px; border-bottom:1px solid var(--hair)}
.panel-head h2{font-size:18px}
.panel-head p{font-size:14px; color:var(--mute); margin-top:2px}
.panel-list{margin:0; padding:0; list-style:none; overflow-y:auto; flex:1 1 auto}
.panel-list li{border-top:1px solid var(--hair)}
.panel-list li:first-child{border-top:0}
.panel-list a{display:flex; gap:12px; padding:12px 18px; text-decoration:none; color:var(--ink)}
.panel-list a:hover{background:var(--paper)}
.panel-list a[aria-current=true]{background:var(--olive-soft)}
.panel-no{flex:none; width:24px; font-family:var(--display); font-weight:700; font-size:15px; color:var(--mute);
  font-variant-numeric:tabular-nums}
.panel-t{min-width:0; font-size:15.5px; line-height:1.35}
.panel-t em{display:block; font-style:normal; font-size:13.5px; color:var(--mute); margin-top:2px}
.done{flex:none; color:var(--good); font-weight:700}

/* ---------- my courses ---------- */
.mine{display:grid; gap:14px; margin:0 0 56px; padding:0; list-style:none}
.mine-row{display:flex; align-items:center; gap:18px; padding:18px 20px; background:#fff; border:1px solid var(--hair);
  border-radius:16px}
.mine-main{min-width:0; flex:1 1 auto}
.mine-row h2{font-size:20px}
.mine-row h2 a{color:inherit; text-decoration:none}
.mine-row h2 a:hover{color:var(--olive)}
.bar{margin-top:10px; height:7px; border-radius:999px; background:var(--hair); overflow:hidden; max-width:320px}
.bar i{display:block; height:100%; background:var(--olive); border-radius:999px}
.mine-meta{margin-top:6px; font-size:14.5px; color:var(--mute)}

/* ---------- the live class strip ---------- */
.live{display:flex; align-items:center; gap:16px; padding:16px 20px; border-radius:16px; background:var(--olive-deep);
  color:#fff; margin-bottom:22px}
.live b{font-family:var(--display); font-size:19px; display:block}
.live span{font-size:15px; color:#d9dcc4}
.live .btn{margin-left:auto; background:var(--gold); color:var(--olive-deep)}
.live .btn:hover{background:#e8b600}

/* ---------- foot ---------- */
.foot{border-top:1px solid var(--hair); background:#fff; padding:26px 0; font-size:15px; color:var(--mute)}
.foot-in{display:flex; flex-wrap:wrap; gap:8px 22px; align-items:center}
.foot a{color:var(--ink-2); text-decoration:none}
.foot a:hover{color:var(--olive)}
.foot .said{margin-left:auto}

@media (max-width:920px){
  .course-top,.watch{grid-template-columns:minmax(0,1fr)}
  .buy,.panel{position:static; max-height:none}
  /* The bar wraps onto two rows rather than dropping its links. Hiding the navigation left a phone with no
     way to reach My courses at all, which is the page a student needs most. */
  .top-in{height:auto; min-height:60px; flex-wrap:wrap; padding:9px 0; gap:8px 14px}
  .top-nav{order:3; width:100%; margin-left:0; gap:18px}
  .who{display:none}
}
@media (max-width:560px){
  .course-foot{flex-wrap:wrap}
  .course-foot .btn{margin-left:0; width:100%}
  .lecture-acts{flex-direction:column; align-items:flex-end}
  .foot .said{margin-left:0}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important; transition:none!important}}

/* the signed-in half of the top bar, so the name and the button stay together */
.signed{display:inline-flex; align-items:center; gap:12px}

/* ---------- the team's screens ---------- */
.admin-head{display:flex; align-items:flex-end; justify-content:space-between; gap:20px}
.admin-acts{display:flex; gap:10px; flex:none}
.crumb{font-size:14.5px; margin-bottom:6px}
.crumb a{text-decoration:none; font-weight:600}
.crumb a:hover{text-decoration:underline}
.admin-list{display:grid; gap:12px; margin:0 0 50px; padding:0; list-style:none}
.admin-row{display:flex; align-items:center; gap:18px; padding:16px 20px; background:#fff;
  border:1px solid var(--hair); border-radius:14px}
.admin-row-main{min-width:0; flex:1 1 auto}
.admin-row h2{font-size:19px; margin-top:8px}
.admin-row h2 a{color:inherit; text-decoration:none}
.admin-row h2 a:hover{color:var(--olive)}
.admin-row-acts{flex:none; display:flex; gap:8px}
.admin-meta{margin-top:3px; font-size:14px; color:var(--mute)}
.pill-draft{background:var(--hair); color:var(--mute)}
.pill-quiet{background:var(--paper); color:var(--ink-2); border:1px solid var(--hair)}

.admin-panel{background:#fff; border:1px solid var(--hair); border-radius:16px; margin:0 0 22px; overflow:hidden}
.admin-panel-head{display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:16px 20px; border-bottom:1px solid var(--hair)}
.admin-panel-head h2{font-size:20px}
.admin-rows{margin:0; padding:0; list-style:none}
.admin-rows-row{display:flex; align-items:center; gap:16px; padding:14px 20px; border-top:1px solid var(--hair)}
.admin-rows-row:first-child{border-top:0}
.admin-rows-row h3{font-size:16.5px; font-weight:600; font-family:var(--body)}
.admin-none{padding:22px 20px; color:var(--mute); font-size:15.5px}

/* ---------- the dialog ---------- */
.sheet-back{position:fixed; inset:0; z-index:80; display:grid; place-items:center; padding:20px;
  background:rgba(21,26,48,.5); backdrop-filter:blur(3px); animation:sheet-in .16s ease}
.sheet-back.is-going{opacity:0; transition:opacity .12s ease}
.sheet{width:100%; max-width:470px; max-height:calc(100vh - 40px); overflow-y:auto; background:#fff;
  border-radius:20px; padding:28px 28px 22px; border:1px solid var(--hair);
  box-shadow:0 30px 70px -24px rgba(21,26,48,.45); animation:sheet-rise .2s cubic-bezier(.22,.61,.36,1)}
.sheet-wide{max-width:640px}
.sheet-head{display:flex; align-items:flex-start; gap:14px}
.sheet-mark{display:grid; place-items:center; width:42px; height:42px; flex:none; border-radius:50%;
  background:var(--olive-soft); color:var(--olive-dark); font-family:var(--display); font-size:24px;
  font-weight:700; line-height:1; padding-bottom:2px}
.sheet-mark.is-danger{background:#fdf3f1; color:var(--bad)}
.sheet h2{font-size:23px; line-height:1.2}
.sheet-words{margin-top:6px; color:var(--ink-2); font-size:15.5px; line-height:1.5}
.sheet-fields{display:grid; gap:16px; margin-top:22px}
.sheet-wide .sheet-fields{grid-template-columns:1fr 1fr}
.sheet-wide .sheet-fields > label:nth-child(-n+2),
.sheet-wide .sheet-fields > label:has(textarea){grid-column:1 / -1}
.sheet-label{display:block; font-weight:600; font-size:15px; margin:0}
.sheet-label > span{display:block; margin-bottom:7px}
.sheet-label input,.sheet-label select,.sheet-label textarea{width:100%; min-height:46px; padding:10px 14px;
  border:1px solid var(--line); border-radius:10px; background:#fff; font:inherit; font-size:16px; color:var(--ink);
  font-weight:400}
.sheet-label textarea{min-height:90px; resize:vertical; line-height:1.5}
.sheet-label input:focus,.sheet-label select:focus,.sheet-label textarea:focus{border-color:var(--olive);
  outline:none; box-shadow:0 0 0 3px var(--olive-soft)}
.sheet-hint{display:block; margin-top:6px; font-style:normal; font-size:13.5px; color:var(--mute); font-weight:400}
.sheet-switch{display:flex; align-items:flex-start; gap:10px; font-weight:500; margin:0}
.sheet-switch input{width:20px; height:20px; margin:2px 0 0; accent-color:var(--olive); flex:none}
.sheet-switch b{display:block; font-weight:700; font-size:15px}
.sheet-switch em{font-style:normal; font-size:13.5px; color:var(--mute)}
.sheet-acts{display:flex; justify-content:flex-end; gap:10px; margin-top:24px}
@keyframes sheet-in{from{opacity:0}to{opacity:1}}
@keyframes sheet-rise{from{opacity:0; transform:translateY(10px) scale(.98)}to{opacity:1; transform:none}}
@media (prefers-reduced-motion:reduce){.sheet-back,.sheet{animation:none}}
@media (max-width:640px){
  .sheet{padding:22px 18px 18px; border-radius:16px}
  .sheet-wide .sheet-fields{grid-template-columns:1fr}
  .sheet-acts{flex-direction:column-reverse}
  .sheet-acts .btn{width:100%}
  .admin-head,.admin-rows-row{flex-wrap:wrap}
  .admin-row-acts{width:100%}
}

/* ---------- the settings screen ---------- */
.keys{margin-bottom:22px}
.keys-in{padding:20px; display:grid; gap:18px}
.keys-say{font-size:15.5px; color:var(--ink-2); max-width:62ch}
.keys-acts{display:flex; justify-content:flex-end}
.keys-foot{font-size:15px; color:var(--mute); margin-bottom:56px}
.keys-foot b{font-family:var(--display); letter-spacing:.02em}

/* a lecture on its way to the video library */
.up{margin-top:10px; display:flex; align-items:center; gap:12px; max-width:420px}
.up-say{font-size:14px; color:var(--olive-dark); white-space:nowrap; font-weight:600}
.up-bar{flex:1 1 auto; height:7px; border-radius:999px; background:var(--hair); overflow:hidden}
.up-bar i{display:block; height:100%; width:0; background:var(--olive); border-radius:999px; transition:width .3s ease}
