/* Hyde Science Lab shared styles.
   Hyde blue (#02168F, from the school's lion logo) frames every page. Same
   structure and fonts as the courses so they feel like one site; each course
   keeps its own accent color. */

:root{
  --bg:#F5F7FC; --paper:#FFFFFF; --paper-alt:#EAEEF9; --line:#D3DBEF;
  --ink:#0D1430; --ink-2:#2D3654; --muted:#525B78;
  --brand:#02168F; --kicker:#1F3FC4; --focus:#2B5BFF;
  --hero-bg:#02168F; --hero-ink:#FFFFFF; --hero-muted:#D3DAFF;
  --bad-bg:#F4E3D8; --bad-ink:#5C2A12;
  --f-display:'Zilla Slab', Georgia, serif;
  --f-body:'Public Sans', system-ui, sans-serif;
  --f-mono:'IBM Plex Mono', ui-monospace, monospace;
  --r-card:16px; --r-ctl:10px;
  --shadow:0 1px 2px rgba(5,15,60,.06), 0 10px 26px rgba(5,15,60,.08);
  --shadow-lift:0 4px 10px rgba(5,15,60,.10), 0 18px 40px rgba(5,15,60,.14);
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg:#0A0F22; --paper:#111936; --paper-alt:#18224A; --line:#27345F;
    --ink:#EEF1FB; --ink-2:#CDD5EE; --muted:#9AA6CA;
    --brand:#A9B9FF; --kicker:#8EA5FF; --focus:#A9B9FF;
    --hero-bg:#02168F; --hero-ink:#FFFFFF; --hero-muted:#D3DAFF;
    --bad-bg:#3A2418; --bad-ink:#F3C9B2;
    --shadow:0 1px 2px rgba(0,0,0,.35), 0 12px 30px rgba(0,0,0,.4);
    --shadow-lift:0 6px 14px rgba(0,0,0,.4), 0 20px 44px rgba(0,0,0,.45);
    color-scheme:dark;
  }
  :root:not([data-theme="light"]) .event{--accent:var(--accent-dark);}
}
:root[data-theme="dark"]{
  --bg:#0A0F22; --paper:#111936; --paper-alt:#18224A; --line:#27345F;
  --ink:#EEF1FB; --ink-2:#CDD5EE; --muted:#9AA6CA;
  --brand:#A9B9FF; --kicker:#8EA5FF; --focus:#A9B9FF;
  --hero-bg:#02168F; --hero-ink:#FFFFFF; --hero-muted:#D3DAFF;
  --bad-bg:#3A2418; --bad-ink:#F3C9B2;
  --shadow:0 1px 2px rgba(0,0,0,.35), 0 12px 30px rgba(0,0,0,.4);
  --shadow-lift:0 6px 14px rgba(0,0,0,.4), 0 20px 44px rgba(0,0,0,.45);
  color-scheme:dark;
}
:root[data-theme="dark"] .event{--accent:var(--accent-dark);}

*{box-sizing:border-box;}
html{-webkit-text-size-adjust:100%;}
body{
  margin:0; background:var(--bg); color:var(--ink);
  font-family:var(--f-body); font-size:16px; line-height:1.55;
}
a{color:var(--brand);}
:focus-visible{outline:2px solid var(--focus); outline-offset:3px;}
svg.icon{fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round;}

.wrap{max-width:920px; margin:0 auto; padding:32px 16px 48px;}

/* ---------- top bar ---------- */
.topbar{display:flex; align-items:center; justify-content:flex-end; gap:12px; margin-bottom:28px;}
.eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  font-family:var(--f-mono); font-size:12px; font-weight:600; letter-spacing:.1em; text-transform:uppercase;
  color:var(--ink-2); background:var(--paper-alt); border:1px solid var(--line);
  padding:6px 12px; border-radius:999px;
}
/* Account chip (signed in): initial + first name, opens a small menu. */
/* Account chip and menu: the same sizes as Disease Detectives'
   account-menu.js (and the other courses), so it looks the same on every page. */
.acct{position:relative; display:inline-flex; align-items:center; font-size:.82rem; line-height:1.6; text-align:left;}
.acct-btn{display:inline-flex; align-items:center; gap:7px; max-width:190px; min-height:32px; padding:2px 9px 2px 2px; border:1px solid var(--line); border-radius:999px; background:var(--paper); color:var(--ink); font:inherit; font-weight:600; cursor:pointer;}
.acct-btn:hover, .acct-btn[aria-expanded="true"]{border-color:var(--brand);}
.acct-av{flex:none; width:22px; height:22px; border-radius:50%; background:var(--hero-bg); color:#fff; display:inline-flex; align-items:center; justify-content:center; font-size:.72rem; font-weight:700; text-transform:uppercase;}
.acct-name{overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0;}
.acct-caret{flex:none; font-size:.62rem; color:var(--muted);}
.acct-menu{position:absolute; top:calc(100% + 6px); right:0; z-index:60; min-width:210px; max-width:calc(100vw - 32px); padding:6px; background:var(--paper); border:1px solid var(--line); border-radius:12px; box-shadow:0 10px 28px rgba(0,0,0,.16);}
.acct-menu[hidden]{display:none;}
.acct-head{padding:6px 10px 8px; margin-bottom:4px; border-bottom:1px solid var(--line);}
.acct-head b{display:block; color:var(--ink); font-size:.88rem; overflow-wrap:anywhere;}
.acct-head span{display:block; color:var(--muted); font-size:.76rem; overflow-wrap:anywhere;}
.acct-menu a, .acct-menu button{display:block; width:100%; box-sizing:border-box; padding:7px 10px; border:0; border-radius:8px; background:none; color:var(--ink); font:inherit; font-weight:600; text-align:left; text-decoration:none; cursor:pointer;}
.acct-menu a:hover, .acct-menu button:hover{background:var(--paper-alt);}
.acct-sep{height:1px; margin:4px 0; background:var(--line);}
@media (max-width:420px){ .acct-btn{max-width:140px;} }
.foot-btn{font:inherit; color:inherit; background:none; border:0; padding:0; text-decoration:underline; cursor:pointer;}

.topbar-right{display:flex; align-items:center; gap:12px;}
.session-line{margin:0; font-size:14px; color:var(--muted); text-align:right;}
.session-line b{color:var(--ink);}
.link-btn{
  display:inline-flex; align-items:center;
  font:inherit; font-weight:600; color:var(--brand); background:none; border:0; padding:0 0 0 10px;
  text-decoration:underline; cursor:pointer; min-height:44px;
}
.signin-btn{
  display:inline-flex; align-items:center; min-height:44px; padding:0 16px; border-radius:var(--r-ctl);
  font-weight:600; text-decoration:none; color:var(--bg); background:var(--brand); white-space:nowrap;
}
.backlink{display:inline-flex; align-items:center; min-height:44px; font-weight:600; text-decoration:none;}
@media (max-width:480px){
  .topbar{align-items:flex-start;}
  .topbar > .eyebrow{display:none;}
  .topbar-right{margin-left:auto;}
  .session-team{display:none;}
}

/* ---------- forms (sign in) ---------- */
.wrap.narrow{max-width:520px;}
.card{
  background:var(--paper); border:1px solid var(--line); border-radius:var(--r-card);
  padding:24px 22px; box-shadow:var(--shadow); margin:14px 0 18px;
}
.card[hidden]{display:none;}
.card-title{font-family:var(--f-display); font-size:30px; line-height:1.1; color:var(--brand); margin:0 0 8px;}
.sub{margin:0 0 18px; color:var(--ink-2); font-size:15px;}
.sub .link-btn{padding-left:4px; min-height:0;}
.field{margin-bottom:16px;}
.field label{display:block; font-family:var(--f-mono); font-size:12px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); margin-bottom:6px;}
.field input{
  width:100%; min-height:48px; padding:10px 14px; font:inherit; font-size:17px;
  color:var(--ink); background:var(--bg); border:2px solid var(--line); border-radius:var(--r-ctl);
}
.field input:focus{border-color:var(--brand); outline:none;}
.field input:focus-visible{outline:2px solid var(--focus); outline-offset:3px;}
.field input[aria-invalid="true"]{border-color:var(--bad-ink);}
.code-input{font-family:var(--f-mono) !important; letter-spacing:.08em; text-transform:uppercase;}
.hint{margin:6px 0 0; font-size:13px; color:var(--muted);}
.btn{
  width:100%; min-height:52px; font:inherit; font-size:16px; font-weight:700; cursor:pointer;
  color:var(--bg); background:var(--brand); border:0; border-radius:var(--r-ctl);
}
.btn:disabled{opacity:.6; cursor:progress;}
.error{margin:14px 0 0; padding:10px 14px; border-radius:var(--r-ctl); background:var(--bad-bg); color:var(--bad-ink); font-size:14px; font-weight:600;}
.error[hidden]{display:none;}
.footnote{font-size:14px; color:var(--muted); text-align:center; margin:8px 0;}
.spin{
  display:inline-block; width:14px; height:14px; margin-right:8px; vertical-align:-2px;
  border:2px solid var(--line); border-top-color:var(--brand); border-radius:50%;
  animation:spin .8s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg);}}

/* ---------- hero ---------- */
.hero{
  display:flex; align-items:center; gap:18px; margin:0 0 28px;
  background:var(--hero-bg); color:var(--hero-ink);
  border-radius:var(--r-card); padding:22px 24px; box-shadow:var(--shadow);
}
.hero-logo{flex:none; width:84px; height:auto; border-radius:12px; display:block;}
.hero-kicker{
  display:block; font-family:var(--f-mono); font-size:12px; font-weight:600;
  letter-spacing:.1em; text-transform:uppercase; color:var(--hero-muted); margin-bottom:4px;
}
h1{
  font-family:var(--f-display); font-weight:700; color:inherit;
  font-size:clamp(32px, 7vw, 48px); line-height:1.05; margin:0; text-wrap:balance;
}
.hero p{margin:8px 0 0; color:var(--hero-muted); font-size:16px; max-width:52ch;}
.lede{font-size:18px; color:var(--ink-2); margin:0 0 36px;}
@media (max-width:480px){
  .hero{padding:18px 16px; gap:14px; align-items:flex-start;}
  .hero-logo{width:60px;}
}

/* ---------- section labels ---------- */
.section-label{
  display:flex; align-items:center; gap:9px; margin:0 0 6px;
  font-family:var(--f-mono); font-size:12px; font-weight:600; letter-spacing:.1em; text-transform:uppercase;
  color:var(--muted);
}
.section-label .dot{width:8px; height:8px; border-radius:50%; background:var(--kicker); flex:none;}
.section-label.events .dot{background:var(--brand);}
.section-sub{font-size:14px; color:var(--muted); margin:0 0 18px;}
section + section{margin-top:44px;}

/* ---------- event cards ---------- */
.event-grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(270px, 1fr)); gap:18px;}
.event{
  --accent:var(--accent-light);
  position:relative; display:flex; flex-direction:column; gap:12px;
  text-decoration:none; color:inherit;
  background:var(--paper); border:1px solid var(--line); border-top:4px solid var(--accent);
  border-radius:var(--r-card); padding:22px 20px 20px; box-shadow:var(--shadow);
}
a.event{transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease;}
a.event:hover{transform:translateY(-3px); box-shadow:var(--shadow-lift); border-color:var(--accent);}
.event.is-off{box-shadow:none; background:transparent; border-style:dashed; border-top-style:solid;}
.event-head{display:flex; align-items:flex-start; gap:14px;}
.event-mark{
  flex:none; width:52px; height:52px; border-radius:12px;
  display:flex; align-items:center; justify-content:center;
  color:var(--accent); background:var(--paper-alt); border:1px solid var(--line);
}
.event-mark svg{width:28px; height:28px;}
.event-kicker{
  display:block; font-family:var(--f-mono); font-size:11px; font-weight:600;
  letter-spacing:.08em; text-transform:uppercase; color:var(--accent);
}
.event h3{font-family:var(--f-display); font-size:22px; line-height:1.15; font-weight:700; color:var(--ink); margin:2px 0 0;}
.event p{margin:0; font-size:15px; color:var(--ink-2);}
.event .event-has{font-size:13px; line-height:1.5; color:var(--muted);}
.event-foot{margin-top:auto; display:flex; align-items:center; justify-content:space-between; gap:10px; padding-top:4px;}
.status{
  display:inline-flex; align-items:center; gap:6px;
  font-family:var(--f-mono); font-size:11px; font-weight:600; letter-spacing:.08em; text-transform:uppercase;
  color:var(--muted);
}
.status::before{content:""; width:8px; height:8px; border-radius:50%; border:2px solid currentColor;}
.status.live{color:var(--accent);}
.status.live::before{background:currentColor;}
.go{display:inline-flex; color:var(--accent);}
.go .icon{width:22px; height:22px; stroke-width:2.2; transition:transform .15s;}
.event:hover .go .icon, .event:focus-visible .go .icon{transform:translateX(3px);}
@media (prefers-reduced-motion: reduce){ .go .icon{transition:none;} }

/* ---------- steps ---------- */
.steps{display:grid; grid-template-columns:repeat(3, 1fr); gap:14px; margin:0; padding:0; list-style:none; counter-reset:step;}
.steps li{
  background:var(--paper); border:1px solid var(--line); border-radius:14px;
  padding:16px 18px; box-shadow:var(--shadow);
}
.steps .num{
  display:flex; align-items:center; gap:8px; margin-bottom:6px;
  font-family:var(--f-mono); font-size:11px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--kicker);
}
.steps .num svg{width:20px; height:20px;}
.steps h3{font-family:var(--f-display); font-size:18px; color:var(--brand); margin:0 0 4px;}
.steps p{margin:0; font-size:14px; color:var(--muted);}
@media (max-width:700px){ .steps{grid-template-columns:1fr;} }

/* ---------- coach note ---------- */
.note{
  background:var(--paper-alt); border:1px solid var(--line); border-radius:var(--r-card);
  padding:20px 22px;
}
.note h3{font-family:var(--f-display); font-size:20px; color:var(--brand); margin:0 0 6px;}
.note p{margin:0; color:var(--ink-2); font-size:15px;}
.note p + p{margin-top:8px;}

footer{margin-top:48px; padding-top:18px; border-top:1px solid var(--line); font-size:14px; color:var(--muted); text-align:center;}
footer p{margin:0 0 6px; max-width:none;}
footer a{color:inherit;}

@media (max-width:480px){
  .wrap{padding-top:20px;}
  .event{padding:18px 16px;}
  .event-mark{width:44px; height:44px;}
}
@media (prefers-reduced-motion: reduce){
  *{transition:none !important; animation:none !important;}
  a.event:hover{transform:none;}
}
