/* Classroom Dark Mode site: a classroom wall with the lights off. */

:root {
  /* Wall */
  --wall-0: #0f1115;
  --wall-1: #14161b;
  --wall-2: #1b1e25;
  --wall-3: #2a2e38;
  /* Projector light */
  --lamp: #f3ecd8;
  --lamp-dim: #c9c2ae;
  /* Ink on the wall */
  --ink-1: #ece7da;
  --ink-2: #bdbbb3;
  --ink-3: #8f929c;
  /* Markers (the extension's accents) */
  --marker-blue: #8fb0ff;
  --marker-green: #8fbf7a;
  --marker-orange: #f0a35a;
  --accent-green: #5c7e4d;
  --accent-blue: #5b8def;
  --accent-orange: #d68a3c;

  --font-set: 'Atkinson Hyperlegible', system-ui, sans-serif;
  --font-marker: 'Kalam', 'Comic Sans MS', cursive;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --flip: 700ms;

  --gutter: clamp(16px, 4vw, 56px);
}

* { box-sizing: border-box; }
html { scrollbar-color: var(--wall-3) var(--wall-0); }
html, body { margin: 0; }
body {
  background: var(--wall-1);
  color: var(--ink-1);
  font-family: var(--font-set);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--marker-blue);
}
::selection { background: var(--lamp); color: var(--wall-1); }
:focus-visible { outline: 2px solid var(--marker-blue); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; height: auto; display: block; }
p { margin: 0 0 1em; text-wrap: pretty; }
h1, h2 { margin: 0; text-wrap: balance; }

.marker {
  font-family: var(--font-marker);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.02;
}

.skip {
  position: absolute; left: var(--gutter); top: -60px;
  background: var(--lamp); color: var(--wall-1); padding: 8px 14px; border-radius: 6px; z-index: 10;
}
.skip:focus { top: 12px; }

.textlink {
  color: var(--ink-1);
  text-decoration: underline;
  text-decoration-color: var(--marker-blue);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.textlink:hover { color: var(--marker-blue); }

/* ---------- nav ---------- */
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px var(--gutter);
}
.nav__brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink-1); text-decoration: none; font-weight: 700; font-size: 1rem;
}
.nav__links { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 28px); font-size: 0.95rem; }
.nav__links a { color: var(--ink-2); text-decoration: none; }
.nav__links a:hover { color: var(--ink-1); }
.nav__links .nav__install {
  color: var(--wall-1); background: var(--lamp); padding: 8px 14px; border-radius: 6px; font-weight: 700;
}
.nav__links .nav__install:hover { color: var(--wall-1); background: #fff; }

/* ---------- acetate sheets ---------- */
.acetate {
  position: relative;
  background: rgba(236, 231, 218, 0.045);
  border: 1px solid rgba(236, 231, 218, 0.16);
  border-radius: 4px;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7);
}

/* The one element held level: action placards never tilt. */
.placard {
  display: inline-block;
  background: var(--lamp);
  color: var(--wall-1);
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  padding: 16px 26px;
  border-radius: 6px;
  box-shadow: 0 10px 24px -10px rgba(243, 236, 216, 0.45);
  transition: background 160ms var(--ease-out), transform 160ms var(--ease-out);
  transform: rotate(0deg);
}
.placard:hover { background: #fff; transform: translateY(-1px); }
.placard--big { font-size: 1.3rem; padding: 20px 34px; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(0, 1.3fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  padding: clamp(16px, 4vh, 48px) var(--gutter) clamp(48px, 8vh, 96px);
  /* Light spill from the beam onto the wall. */
  background: radial-gradient(ellipse 55% 60% at 68% 52%, rgba(243, 236, 216, 0.10), transparent 70%);
  transition: background var(--flip) var(--ease-out);
}
.hero:has(.projector[data-theme="dark"]) {
  background: radial-gradient(ellipse 45% 50% at 68% 52%, rgba(143, 176, 255, 0.06), transparent 70%);
}
.hero__sheet {
  z-index: 2;
  --tilt: -2.5deg;
  padding: clamp(24px, 3vw, 40px);
  transform: rotate(var(--tilt));
  transition: transform var(--flip) var(--ease-out);
}
.hero:has(.projector[data-theme="dark"]) .hero__sheet { transform: rotate(var(--tilt)) translateX(8px); }
.hero__sheet h1 {
  font-size: clamp(2.6rem, 4.4vw, 4.4rem);
  color: var(--marker-blue);
}
.hero__lead { margin: 20px 0 28px; max-width: 34ch; color: var(--ink-1); font-size: 1.15rem; }
.hero__sheet .placard { transform: rotate(calc(-1 * var(--tilt))); }
.hero__sheet .placard:hover { transform: rotate(calc(-1 * var(--tilt))) translateY(-1px); }
.hero__facts { margin: 22px 0 0; font-size: 0.95rem; color: var(--ink-2); }

/* ---------- projector ---------- */
.projector { position: relative; margin: 0; }
.stage { position: relative; padding: 5% 3% 4%; }
.beam {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 45%, #fdf9ee, var(--lamp) 60%, #e4dabf);
  clip-path: polygon(3% 0, 97% 0, 100% 100%, 0 100%);
  opacity: 0.92;
  transition: clip-path var(--flip) var(--ease-out), background var(--flip) var(--ease-out), opacity var(--flip) var(--ease-out);
}
.projector[data-theme="dark"] .beam {
  background: radial-gradient(ellipse 70% 60% at 50% 45%, #313750, #252a39);
  clip-path: polygon(6% 3%, 94% 3%, 97% 97%, 3% 97%);
  opacity: 1;
}
.screen { position: relative; z-index: 1; padding: 0 4% 0; }
.projector__note {
  position: relative; z-index: 1;
  margin: 10px 4% 0; font-size: 1rem; font-weight: 400; color: #4a4636;
  transition: color var(--flip) var(--ease-out);
}
.projector[data-theme="dark"] .projector__note { color: var(--ink-2); }

.controls {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  margin-top: 26px;
}
.switch {
  display: inline-flex; align-items: center; gap: 14px;
  background: var(--wall-0); color: var(--ink-1);
  border: 1px solid var(--wall-3); border-radius: 10px;
  padding: 10px 14px 10px 18px;
  font: 700 1rem var(--font-set);
  cursor: pointer;
}
.switch__track {
  position: relative; width: 58px; height: 32px; border-radius: 999px;
  background: var(--wall-3);
  transition: background var(--flip) var(--ease-out);
}
.switch__thumb {
  position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--lamp);
  transition: transform var(--flip) var(--ease-out), background var(--flip) var(--ease-out);
}
.switch[aria-checked="true"] .switch__track { background: var(--accent); }
.switch[aria-checked="true"] .switch__thumb { transform: translateX(26px); background: var(--wall-0); }

.markers { display: flex; gap: 12px; }
.marker-pen {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--wall-3); background: var(--pen); cursor: pointer;
  transition: transform 160ms var(--ease-out), border-color 160ms var(--ease-out);
}
.marker-pen:hover { transform: translateY(-2px); }
.marker-pen[aria-pressed="true"] { border-color: var(--lamp); transform: scale(1.08); }
.marker-pen[data-accent="green"] { --pen: var(--accent-green); }
.marker-pen[data-accent="blue"] { --pen: var(--accent-blue); }
.marker-pen[data-accent="orange"] { --pen: var(--accent-orange); }

.projector[data-accent="green"] { --accent: var(--accent-green); }
.projector[data-accent="blue"] { --accent: var(--accent-blue); }
.projector[data-accent="orange"] { --accent: var(--accent-orange); }
.tray[data-accent="green"] { --accent: var(--accent-green); }
.tray[data-accent="blue"] { --accent: var(--accent-blue); }
.tray[data-accent="orange"] { --accent: var(--accent-orange); }

/* ---------- the Classroom illustration ---------- */
.cr {
  --cr-bg: #ffffff; --cr-fg: #3c4043; --cr-muted: #5f6368; --cr-line: #dadce0;
  --cr-card: #ffffff; --cr-active: #e6f4ea; --cr-active-fg: #137333;
  background: var(--cr-bg); color: var(--cr-fg);
  border-radius: 8px; overflow: hidden;
  font-family: Roboto, Arial, sans-serif; font-size: clamp(9px, 0.85vw, 13px); line-height: 1.3;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
  transition: background var(--flip) var(--ease-out), color var(--flip) var(--ease-out);
}
.projector[data-theme="dark"] .cr,
.cr--dark {
  --cr-bg: #1f1f21; --cr-fg: #e3e3e3; --cr-muted: #a8abb2; --cr-line: #3a3b3f;
  --cr-card: #2a2b2e; --cr-active: color-mix(in srgb, var(--accent) 28%, #1f1f21); --cr-active-fg: #e3e3e3;
}
.cr__bar {
  display: flex; align-items: center; gap: 1em; padding: 0.9em 1.4em;
  border-bottom: 1px solid var(--cr-line);
  transition: border-color var(--flip) var(--ease-out);
}
.cr__menu { width: 1.4em; height: 0.9em; border-block: 2px solid var(--cr-muted); position: relative; }
.cr__logo { width: 1.6em; height: 1.3em; border-radius: 3px; background: #1e8e3e; }
.cr__title { font-size: 1.35em; flex: 1; }
.cr__avatar {
  width: 2em; height: 2em; border-radius: 50%; background: #8e44ad; color: #fff;
  display: grid; place-items: center; font-size: 0.95em;
}
.cr__body { display: grid; grid-template-columns: 22% 1fr; }
.cr__side {
  list-style: none; margin: 0; padding: 0.8em 0.8em 0.8em 0;
  border-right: 1px solid var(--cr-line);
  transition: border-color var(--flip) var(--ease-out);
}
.cr__side li { padding: 0.6em 1.2em; border-radius: 0 999px 999px 0; color: var(--cr-fg); }
.cr__side .is-active {
  background: var(--cr-active); color: var(--cr-active-fg); font-weight: 700;
  transition: background var(--flip) var(--ease-out), color var(--flip) var(--ease-out);
}
.cr__side .cr__rule { padding: 0; margin: 0.6em 0; border-top: 1px solid var(--cr-line); border-radius: 0; }
.cr__cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1em; padding: 1.4em;
}
.cr__card {
  display: flex; flex-direction: column;
  min-height: 9em;
  background: var(--cr-card);
  border: 1px solid var(--cr-line); border-radius: 8px; overflow: hidden;
  transition: background var(--flip) var(--ease-out), border-color var(--flip) var(--ease-out);
}
.cr__card b, .cr__card small {
  background: var(--banner); color: #fff; padding: 0 0.9em; display: block;
}
.cr__card b { padding-top: 0.8em; font-size: 1.2em; font-weight: 500; }
.cr__card small { padding-bottom: 1.4em; font-size: 0.9em; opacity: 0.95; }

/* ---------- Classroom screens (illustrations) ---------- */
.tray__slide { container-type: inline-size; }
.scr { font-size: 1.22cqi; aspect-ratio: 16 / 10; overflow: hidden; display: flex; flex-direction: column; box-shadow: none; }
.scr[hidden] { display: none; }
.cr__link { color: var(--cr-link, #8ab4f8); font-weight: 500; }
.cr__link--right { display: block; text-align: right; margin-top: 0.8em; }
.scr__tabs { display: flex; gap: 2.4em; padding: 0 2em; border-bottom: 1px solid var(--cr-line); color: var(--cr-muted); }
.scr__tabs span { padding: 0.9em 0; }
.scr__tabs .is-on { color: var(--cr-fg); box-shadow: inset 0 -3px 0 var(--accent); font-weight: 500; }
.post__icon {
  flex: none; width: 2.6em; height: 2.6em; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: var(--accent);
}
.post__icon svg { width: 1.4em; height: 1.4em; }

.stream { padding: 1.4em 2.4em; overflow: hidden; }
.stream__banner {
  height: 7em; border-radius: 10px; padding: 1.4em 1.8em; color: #fff;
  background: linear-gradient(115deg, #1e6fd9, #1a56b0);
  display: flex; flex-direction: column; justify-content: flex-end;
}
.stream__banner b { font-size: 2em; font-weight: 500; }
.stream__cols { display: grid; grid-template-columns: 24% 1fr; gap: 1.6em; margin-top: 1.6em; }
.stream__side, .post, .work, .file, .todo__item {
  background: var(--cr-card); border: 1px solid var(--cr-line); border-radius: 8px;
}
.stream__side { padding: 1.1em 1.2em; align-self: start; }
.stream__side p { margin: 0.6em 0 0; color: var(--cr-muted); }
.stream__feed { display: flex; flex-direction: column; gap: 1em; }
.post { padding: 1.1em 1.3em; }
.post p { margin: 0.8em 0 0; }
.post--input, .post--task { display: flex; align-items: center; gap: 1em; color: var(--cr-muted); }
.post--task b { color: var(--cr-fg); font-weight: 500; display: block; }
.post__head { display: flex; align-items: center; gap: 0.9em; }
.post__head b { display: block; font-weight: 500; }
.post small, .post__head small, .task small, .todo__item small, .work small, .file small { color: var(--cr-muted); font-size: 0.9em; }
.post__comment { margin-top: 1em; padding-top: 0.8em; border-top: 1px solid var(--cr-line); color: var(--cr-muted); }

.task { display: grid; grid-template-columns: 1fr 30%; gap: 2.4em; padding: 2em 3em; }
.task__title { display: flex; align-items: center; gap: 1em; }
.task__title h3 { margin: 0; font-size: 2em; font-weight: 400; color: var(--cr-fg); }
.task__main > small { display: block; margin: 0.4em 0 0 3.6em; }
.task__meta { display: flex; justify-content: space-between; margin: 1em 0 0 3.6em; padding-bottom: 1em; border-bottom: 1px solid var(--accent); }
.task__main p { margin: 1.2em 0 0 3.6em; }
.task__files { display: grid; grid-template-columns: 1fr 1fr; gap: 1em; margin: 1.4em 0 0 3.6em; }
.file { padding: 1em 1.2em; display: flex; flex-direction: column; }
.file b { font-weight: 500; }
.task__comments { margin: 1.6em 0 0 3.6em; padding-top: 1em; border-top: 1px solid var(--cr-line); color: var(--cr-muted); }
.work { padding: 1.3em; display: flex; flex-direction: column; gap: 0.9em; }
.work + .work { margin-top: 1.2em; }
.work__head { display: flex; justify-content: space-between; align-items: baseline; }
.work__head b, .work--private b { font-size: 1.2em; font-weight: 400; }
.work__add, .work__done { text-align: center; padding: 0.7em; border-radius: 6px; font-weight: 500; }
.work__add { border: 1px solid var(--cr-line); color: var(--cr-link, #8ab4f8); }
.work__done { background: var(--accent); color: #fff; }

.cal { padding: 1.4em 2.4em; flex: 1; display: flex; flex-direction: column; }
.cal__top { display: flex; align-items: center; gap: 3em; margin-bottom: 1.2em; }
.cal__select { padding: 0.7em 1.2em; min-width: 14em; background: var(--cr-card); border-radius: 4px; }
.cal__range { color: var(--cr-muted); }
.cal__grid { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid var(--cr-line); border-radius: 8px; overflow: hidden; }
.cal__day { border-left: 1px solid var(--cr-line); padding: 0.8em 0.5em; display: flex; flex-direction: column; align-items: center; gap: 0.5em; }
.cal__day:first-child { border-left: 0; }
.cal__day small { color: var(--cr-muted); text-transform: uppercase; font-size: 0.8em; }
.cal__day b { font-size: 1.8em; font-weight: 400; width: 1.7em; height: 1.7em; display: grid; place-items: center; border-radius: 50%; }
.cal__day.is-today b { background: var(--accent); color: #fff; }
.cal__day i {
  align-self: stretch; font-style: normal; font-size: 0.9em; padding: 0.4em 0.6em; border-radius: 4px;
  background: color-mix(in srgb, var(--banner) 55%, var(--cr-card)); color: #fff;
}

.todo { padding: 1em 2.4em; display: flex; flex-direction: column; gap: 0.7em; overflow: hidden; }
.todo__group { display: flex; justify-content: space-between; padding: 0.6em 0.2em 0.2em; }
.todo__group b { font-size: 1.2em; font-weight: 400; }
.todo__group small { color: var(--cr-muted); }
.todo__item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1em; padding: 0.8em 1.2em; }
.todo__item b { font-weight: 500; display: block; }
.todo__item em { font-style: normal; color: var(--cr-muted); font-size: 0.95em; }

/* ---------- screens tray ---------- */
.pages { padding: clamp(56px, 9vh, 104px) var(--gutter); background: var(--wall-0); }
.pages__head { max-width: 760px; margin: 0 0 40px; }
.pages__head h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); color: var(--marker-green); margin-bottom: 16px; }
.pages__head p { color: var(--ink-2); max-width: 62ch; }
.tray { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 24px; align-items: start; }
.tray__slide {
  background: var(--lamp); padding: clamp(8px, 1.2vw, 16px); border-radius: 4px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
}
.tray__note { margin: 10px 4px 0; font-size: 1rem; font-weight: 400; color: #4a4636; }
.tray__thumbs { display: flex; flex-direction: column; gap: 10px; }
.tray__thumbs button {
  text-align: left; cursor: pointer;
  background: transparent; color: var(--ink-2);
  border: 1px solid var(--wall-3); border-radius: 6px;
  padding: 12px 16px; font: 400 1.05rem var(--font-set);
  transition: color 160ms var(--ease-out), border-color 160ms var(--ease-out), background 160ms var(--ease-out);
}
.tray__thumbs button:hover { color: var(--ink-1); border-color: var(--ink-3); }
.tray__thumbs button[aria-pressed="true"] {
  color: var(--wall-1); background: var(--lamp); border-color: var(--lamp); font-weight: 700;
}

/* ---------- notes ---------- */
.notes {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(20px, 3vw, 40px);
  padding: clamp(56px, 9vh, 104px) var(--gutter);
}
.note { padding: clamp(24px, 2.6vw, 36px); }
.note h2 { font-size: clamp(1.9rem, 3vw, 2.6rem); margin-bottom: 14px; }
.note p { color: var(--ink-2); max-width: 52ch; }
.note:nth-child(1) { grid-column: 1 / span 5; transform: rotate(-1.5deg); }
.note:nth-child(1) h2 { color: var(--marker-blue); }
.note:nth-child(2) { grid-column: 7 / span 5; transform: rotate(1.2deg); margin-top: 48px; }
.note:nth-child(2) h2 { color: var(--marker-orange); }
.note:nth-child(3) { grid-column: 3 / span 7; transform: rotate(-0.6deg); }
.note:nth-child(3) h2 { color: var(--marker-green); }

/* ---------- close ---------- */
.close {
  text-align: center;
  padding: clamp(64px, 11vh, 128px) var(--gutter);
  background: radial-gradient(ellipse 50% 60% at 50% 40%, rgba(243, 236, 216, 0.08), transparent 70%), var(--wall-0);
}
.close h2 { font-size: clamp(2.4rem, 5vw, 4.4rem); color: var(--lamp); margin: 0 auto 36px; max-width: 16ch; }
.close__support { margin: 56px auto 0; max-width: 640px; color: var(--ink-2); }
.close__links { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px 28px; }

/* ---------- footer ---------- */
.foot {
  padding: 28px var(--gutter) 36px;
  border-top: 1px solid var(--wall-3);
  color: var(--ink-3); font-size: 0.9rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px;
}
.foot p { margin: 0; }
.foot .textlink { color: var(--ink-2); }

/* ---------- privacy page ---------- */
.doc { max-width: 70ch; margin: 0 auto; padding: clamp(32px, 8vh, 96px) var(--gutter) 96px; }
.doc h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); color: var(--marker-blue); margin-bottom: 8px; }
.doc h2 { font-size: 1.5rem; color: var(--marker-green); margin: 2em 0 0.5em; }
.doc .updated { color: var(--ink-3); margin-bottom: 2em; }
.doc ul { padding-left: 1.2em; color: var(--ink-2); }
.doc li { margin-bottom: 0.4em; }
.doc p { color: var(--ink-2); }
.doc code { font-size: 0.95em; color: var(--ink-1); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero__sheet { --tilt: -1.5deg; }
  .tray { grid-template-columns: 1fr; }
  .tray__thumbs { flex-direction: row; flex-wrap: wrap; }
  .tray__thumbs button { flex: 1 1 40%; }
  .note:nth-child(n) { grid-column: 1 / -1; margin-top: 0; }
}
@media (max-width: 560px) {
  .nav__links a:not(.nav__install) { display: none; }
  .cr__body { grid-template-columns: 1fr; }
  .cr__side { display: none; }
  .cr__cards { grid-template-columns: repeat(2, 1fr); }
  .controls { justify-content: flex-start; }
  .scr { font-size: 3cqi; aspect-ratio: auto; height: 132cqi; }
  .stream { padding: 1.2em; }
  .stream__cols { grid-template-columns: 1fr; }
  .stream__side, .post--input { display: none; }
  .task { grid-template-columns: 1fr; padding: 1.4em; gap: 1.2em; }
  .task__main > small, .task__meta, .task__main p, .task__files, .task__comments { margin-left: 0; }
  .task__files { grid-template-columns: 1fr; }
  .work--private, .task__comments { display: none; }
  .cal { padding: 1em; }
  .cal__top { gap: 1em; }
  .cal__select { min-width: 0; }
  .cal__grid { grid-template-columns: repeat(4, 1fr); }
  .cal__day:nth-child(-n+3) { display: none; }
  .todo { padding: 1em; }
  .todo__item { grid-template-columns: auto 1fr; }
  .todo__item em { grid-column: 2; }
  .scr__tabs { padding: 0 1.2em; gap: 1.6em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; }
}
