/* The launchers: the root (which course?) and each course's list of apps
   (shared/js/site/launcher.js). Theme tokens only. */

body { min-height: 100dvh; background: var(--bg-page); }

.wrap { max-width: 60rem; margin: 0 auto; padding: 3.2rem max(1.25rem, env(safe-area-inset-right)) 3rem max(1.25rem, env(safe-area-inset-left)); }

#btn-theme { position: fixed; top: max(1rem, env(safe-area-inset-top)); right: max(1rem, env(safe-area-inset-right)); z-index: 10; }

/* the course's own icon, then a small line above a plain title: "3C6 Vibration", the name softer than the code */
header.hero { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0.3rem 1rem; margin-bottom: 2.4rem; }
.hero .mark { width: 56px; height: 56px; border-radius: 13px; box-shadow: 0 0 0 1px var(--line); }
.hero .titles { min-width: 0; }
.hero .back { grid-column: 1 / -1; font-size: 0.85rem; color: var(--text-faint); text-decoration: none; margin-bottom: 0.4rem; }
.hero .back:hover { color: var(--accent); }
.hero .kicker { margin: 0 0 0.15rem; font-size: 0.85rem; color: var(--text-dim); }
.hero h1 { margin: 0; font-size: clamp(1.7rem, 5.5vw, 2.5rem); font-weight: 600; line-height: 1.1; color: var(--text); text-wrap: balance; }
.hero h1 span { color: var(--text-dim); font-weight: 500; }
.hero .titles:only-child, .hero .back + .titles { grid-column: 1 / -1; }
.hero p.tagline { grid-column: 1 / -1; margin: 0.8rem 0 0; font-size: 1rem; color: var(--text-dim); max-width: 36rem; line-height: 1.55; }

#modepill {
  grid-column: 1 / -1; justify-self: start; margin-top: 0.6rem;
  font: 600 0.72rem/1 var(--font-mono); color: var(--gold-on); background: var(--gold-ink); border: 1px solid rgba(122, 84, 16, 0.5); border-radius: 999px; padding: 0.35rem 0.65rem;
}
body.testmode #modepill { background: var(--accent); color: var(--on-accent); }
body.studentview #modepill { background: var(--text-dim); }

.group { padding: 0; margin: 0 0 2rem; }
.group + .group { border-top: 0; }
.group h3, .tool h3 { font-size: 0.85rem; font-weight: 600; color: var(--text-faint); margin: 0 0 0.7rem; }
.group.drafts h3 { color: var(--gold-deep); background: var(--gold-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 0.8rem; }

a.card {
  display: flex; gap: 0.9rem; align-items: flex-start; padding: 0.9rem; text-decoration: none;
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: 12px;
  transition: border-color 0.2s, transform 0.2s;
}
a.card:hover { border-color: var(--accent-border); transform: translateY(-1px); }
.card img { width: 56px; height: 56px; border-radius: 13px; flex: none; box-shadow: 0 0 0 1px var(--line); }
.card h2 { margin: 0 0 0.2rem; font-size: 1.05rem; font-weight: 600; color: var(--text); }
.card h2 span { color: var(--text-dim); font-weight: 500; }
.card p { margin: 0; font-size: 0.88rem; line-height: 1.45; color: var(--text-dim); }
.card .tags { margin-top: 0.5rem; display: flex; flex-wrap: wrap; gap: 0.35rem; }

/* the tags, the fine print and the foot in --text-dim: --text-faint is 3:1 on a card, and these are the
   smallest words on the site (WCAG asks 4.5:1 of text; review, 5 Oct). The draft tag keeps its gold. */
.tag { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-dim); border: 1px solid var(--line); border-radius: 4px; padding: 0.1rem 0.4rem; }
.tag.draft { color: var(--gold-deep); border-color: transparent; background: linear-gradient(var(--bg-raised), var(--bg-raised)) padding-box, var(--gold-sheen) border-box; }

.soon { border: 1px dashed var(--line); border-radius: var(--radius); padding: 1.1rem; color: var(--text-dim); font-size: 0.95rem; line-height: 1.5; margin: 0 0 2rem; }
.fine { color: var(--text-dim); font-size: 0.82rem; margin: -0.4rem 0 0.8rem; }

.tool { padding: 1rem 1.1rem; margin: 0 0 1.2rem; }
table.sched { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
table.sched th { text-align: left; font-size: 0.78rem; font-weight: 600; color: var(--text-faint); padding: 0.2rem 0.4rem; }
table.sched td { border-top: 1px solid var(--line); padding: 0.4rem; vertical-align: top; color: var(--text-dim); }
table.sched td b { color: var(--text); font-family: var(--font-mono); }
table.sched tr.ec td { color: var(--text-faint); }
table.sched th:last-child { width: 55%; }
table.sched .it { display: block; }
table.sched .it + .it { margin-top: 0.2rem; }
table.sched .nw { white-space: nowrap; }
table.sched + .fine { margin: 0.7rem 0 0; }
.ways { margin: 0; padding-left: 1.1rem; color: var(--text-dim); font-size: 0.9rem; line-height: 1.5; }
.ways li { margin: 0.35rem 0; }
.ways b { color: var(--text); }
.ways code, footer code { font-family: var(--font-mono); font-size: 0.8em; color: var(--accent); }

footer { margin-top: 3rem; font-size: 0.82rem; color: var(--text-dim); line-height: 1.7; }
footer p { margin: 0 0 0.5rem; }
footer a { color: var(--text); }
footer a:hover { color: var(--accent); }
/* each mode's own links: Tore's in draft mode, the way out of test mode and of student view */
.indraft, .intest, .instudent { display: none; }
body.draftmode .indraft, body.testmode .intest, body.studentview .instudent { display: block; }

#toast {
  position: fixed; left: 50%; bottom: max(1.2rem, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50;
  background: var(--sheet); color: var(--text); border: 1px solid var(--line-strong); border-radius: 999px; padding: 0.45rem 0.9rem; font-size: 0.9rem;
}

/* the course's own QR code and how to keep the list on a phone: on the students' page too, so they can pass it on */
.share { display: flex; flex-wrap: wrap; gap: 1.2rem 1.8rem; align-items: center; margin: 2.4rem 0 0; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.qr { margin: 0; text-align: center; }
.qr img { display: block; width: clamp(150px, 24vw, 220px); height: auto; border-radius: 8px; box-shadow: 0 0 0 1px var(--line); }
.qr figcaption { margin-top: 0.5rem; font: 500 0.75rem/1.6 var(--font-mono); color: var(--text-faint); }
.qr figcaption a { color: var(--text-dim); }
/* on a phone the QR code has a row to itself: in the middle of it (Tore, 5 Oct) */
@media (max-width: 600px) { .qr { width: 100%; } .qr img { margin: 0 auto; } }
.install { flex: 1 1 16rem; min-width: 0; color: var(--text-dim); font-size: 0.95rem; line-height: 1.5; }
.install h3 { margin: 0 0 0.5rem; font-size: 0.85rem; font-weight: 600; color: var(--text-faint); }
.install p { margin: 0 0 0.45rem; }
.install b { color: var(--text); }
