/* /class-chat/ — the class chat reader (UX run-13). A v2 page on the css/toys.css tokens
   (DESIGN.md § 8c): putty surface, one cobalt accent (the paste stage, the dots that need you, the
   marks and the «New» tags), physical depth, springy keys, light and dark, Geist + Geist Mono like
   /week/ and /headcount/. The shared header floats fixed over the page; the body clears its height. */
body.cc {
  --t-display: "Geist", ui-sans-serif, system-ui, sans-serif;
  --cc-gutter: max(16px, env(safe-area-inset-left), env(safe-area-inset-right));
  --cc-paper: #fff;
  --cc-mark: rgba(47, 85, 255, .14);
  --cc-dot: rgba(20, 20, 20, .14);
  padding-top: var(--header-h);
  font-family: var(--t-display);
  font-variation-settings: normal;
}
@media (prefers-color-scheme: dark) {
  body.cc { --cc-paper: #f7f6f2; --cc-mark: rgba(141, 162, 255, .24); --cc-dot: rgba(255, 255, 255, .16); }
}
html:has(body.cc) { scroll-padding-top: calc(var(--header-h) + 18px); }
body.cc .t-wrap,
body.cc .container-wide { width: min(100% - 2 * var(--cc-gutter), 1240px); }
.cc-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Until class-chat.js has drawn what this browser keeps, the app's room is laid out but not painted. */
html.cc-wait #cc-app,
html.cc-wait .cc-main > section:not(.cc-mast),
html.cc-wait .site-foot { visibility: hidden; animation: cc-show 0s 3s forwards; }
@keyframes cc-show { to { visibility: visible; } }
@media (scripting: none) { #cc-app { display: none; } }
.cc-noscript { margin: 0 0 32px; padding: 18px 20px; border-radius: var(--t-r-m); background: var(--t-card); box-shadow: inset 0 0 0 2px var(--t-line); }

/* Masthead */
.cc-main { padding-bottom: 40px; }
.cc-mast { padding: 36px 0 24px; }
.cc-kicker { margin: 0 0 14px; color: var(--t-ink-2); }
.cc-mast h1 {
  margin: 0; max-width: 14ch;
  font-size: 2.5rem; line-height: .94; font-weight: 800; letter-spacing: -.02em; text-wrap: balance;
  animation: cc-rise .7s var(--t-spring) both;
}
.cc-lede { margin: 20px 0 0; max-width: 50ch; font-size: 1.125rem; line-height: 1.4; color: var(--t-ink-2); text-wrap: pretty; }
.cc-lede strong { color: var(--t-ink); font-weight: 600; }
@keyframes cc-rise { from { transform: translateY(28px) scale(.97); } }
@media (min-width: 380px) { .cc-mast h1 { font-size: 2.75rem; } }
@media (min-width: 600px) { .cc-mast h1 { font-size: 4.25rem; } .cc-lede { font-size: 1.3125rem; } }
@media (min-width: 1100px) { .cc-mast { padding-top: 56px; } .cc-mast h1 { font-size: 5.5rem; } }

.cc-app { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }

/* Keys */
body.cc .cc-key {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 18px; border: 0; border-radius: var(--t-r-btn, 10px); cursor: pointer;
  background: var(--t-card); color: var(--t-ink); text-decoration: none; text-align: center;
  font: 600 .9375rem/1.2 var(--t-display);
  box-shadow: inset 0 0 0 1.5px var(--t-line), inset 0 -4px 0 rgba(0,0,0,.08);
  transition: transform var(--t-base) var(--t-spring);
}
body.cc .cc-key:active { transform: translateY(2px) scale(.97); }
body.cc .cc-key:disabled { cursor: default; }
body.cc .cc-key-ink { background: var(--t-ink); color: var(--t-surface); box-shadow: inset 0 -4px 0 rgba(255,255,255,.14); font-weight: 700; }
.cc-keys { display: flex; flex-wrap: wrap; gap: 10px; }

/* The stage: the cobalt slab where the chat is pasted. White text in both schemes. */
.cc-stage {
  position: relative; padding: 22px 16px 18px; border-radius: 34px;
  background: var(--t-cobalt); color: #fff;
  box-shadow: inset 0 -10px 0 rgba(0,0,0,.2), 0 20px 40px -24px rgba(0,0,0,.45);
}
@media (min-width: 600px) { .cc-stage { padding: 30px 28px 24px; } }
@media (min-width: 1100px) { .cc-stage { padding: 40px 44px 30px; } }
body.cc .cc-stage :focus-visible { outline-color: #fff; }
.cc-stage-title { margin: 0 0 10px; font-size: 1.75rem; line-height: 1.05; font-weight: 800; letter-spacing: -.01em; text-wrap: balance; }
.cc-stage-title:focus { outline: none; }
@media (min-width: 600px) { .cc-stage-title { font-size: 2.25rem; } }
.cc-stage-text { margin: 0 0 16px; max-width: 62ch; font-size: 1.0625rem; line-height: 1.45; }
.cc-text {
  display: block; box-sizing: border-box; width: 100%; min-height: 168px; max-height: 50vh; margin: 0 0 14px; padding: 14px 16px;
  border: 0; border-radius: var(--t-r-m); resize: vertical;
  background: var(--cc-paper); color: #141414; font: 500 1rem/1.45 var(--t-mono) !important;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.08), 0 10px 24px -18px rgba(0,0,0,.6);
}
.cc-text::placeholder { color: #5d5b55; opacity: 1; }
body.cc .cc-stage .cc-text:focus-visible { outline: 4px solid #fff; outline-offset: 3px; }
body.cc .cc-stage .cc-key { background: var(--cc-paper); color: #141414; box-shadow: inset 0 -4px 0 rgba(0,0,0,.1), 0 8px 18px -14px rgba(0,0,0,.6); }
body.cc .cc-stage .cc-key-ink { background: #141414; color: #fff; box-shadow: inset 0 -4px 0 rgba(255,255,255,.16); }
body.cc .cc-stage .cc-key:disabled { color: #5d5b55; }
body.cc .cc-stage .cc-key-ink:disabled { color: #c9c7c0; }
@media (max-width: 599px) { .cc-stage .cc-keys > .cc-key { flex: 1 1 100%; } }
.cc-privacy { margin: 14px 0 0; font-size: .9375rem; line-height: 1.4; }
.cc-howto { margin: 10px 0 0; }
.cc-howto summary { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-weight: 700; list-style: none; text-decoration: underline; text-underline-offset: .2em; }
.cc-howto summary::-webkit-details-marker { display: none; }
.cc-howto summary::after { content: "+"; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.6); font: 600 1.1rem/1 var(--t-display); text-decoration: none; }
.cc-howto[open] summary::after { content: "\2212"; }
.cc-howto ol { margin: 6px 0 0; padding-left: 1.3em; max-width: 70ch; line-height: 1.5; }
.cc-howto li + li { margin-top: 6px; }
.cc-status { min-height: 1.5em; margin: 12px 4px 0; font-size: 1rem; line-height: 1.5; overflow-wrap: anywhere; }
.cc-status button { margin-left: 8px; }

/* A returning visitor's line on the stage */
.cc-welcome {
  display: grid; gap: 4px; margin: 0 0 18px; padding: 16px 18px; border-radius: var(--t-r-m);
  background: rgba(0,0,0,.16); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.3);
}
.cc-welcome p { margin: 0; line-height: 1.45; }
.cc-welcome-k { font: 600 .75rem/1.3 var(--t-mono); letter-spacing: .08em; text-transform: uppercase; }
.cc-welcome-big { font-size: 1.25rem; font-weight: 800; line-height: 1.25; }
.cc-welcome a { display: inline-flex; align-items: center; min-height: 44px; color: #fff; font-weight: 700; text-underline-offset: .2em; }

/* The result of one read */
.cc-result { padding: 24px 18px; border-radius: var(--t-r-l); background: var(--t-card); box-shadow: inset 0 0 0 1.5px var(--t-line); }
@media (min-width: 600px) { .cc-result { padding: 32px 30px; } }
@media (min-width: 1100px) { .cc-result { padding: 40px 44px; } }
.cc-result-k { margin: 0 0 8px; font: 600 .75rem/1.3 var(--t-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--t-ink-2); }
.cc-result-title { margin: 0 0 12px; max-width: 22ch; font-size: 2.25rem; line-height: 1; font-weight: 800; letter-spacing: -.02em; text-wrap: balance; }
.cc-result-title:focus { outline: none; }
.cc-result-title b { color: var(--toy-text); }
@media (min-width: 600px) { .cc-result-title { font-size: 3.25rem; } }
.cc-result-text { margin: 0 0 18px; max-width: 64ch; font-size: 1.0625rem; line-height: 1.5; color: var(--t-ink-2); }
.cc-result-text strong { color: var(--t-ink); }
.cc-result-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
@media (min-width: 900px) { .cc-result-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; } }

/* The sieve: one dot per message read, the ones that need you in cobalt. */
.cc-sieve-wrap { margin: 0; }
.cc-sieve { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 10px; padding: 0; list-style: none; }
.cc-sieve i { display: block; width: 8px; height: 8px; border-radius: 2px; background: var(--cc-dot); }
.cc-sieve.is-mid { gap: 5px; }
.cc-sieve.is-mid i { width: 13px; height: 13px; border-radius: 4px; }
.cc-sieve.is-big { gap: 7px; }
.cc-sieve.is-big i { width: 20px; height: 20px; border-radius: 6px; }
.cc-sieve i.is-need { background: var(--t-cobalt); box-shadow: 0 0 0 2px var(--t-card), 0 0 0 3.5px var(--t-cobalt); }
.cc-sieve.is-in i:not(.is-need) { animation: cc-sift .9s var(--t-out) both; animation-delay: calc(var(--i, 0) * 3ms); }
.cc-sieve.is-in i.is-need { animation: cc-pop .6s var(--t-spring) both; animation-delay: calc(300ms + var(--i, 0) * 3ms); }
@keyframes cc-sift { from { transform: translateY(-10px); opacity: 0; } }
@keyframes cc-pop { from { transform: scale(.2); } }
.cc-sieve-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; font-size: .9375rem; color: var(--t-ink-2); }
.cc-sieve-legend li { display: inline-flex; align-items: center; gap: 8px; }
.cc-sieve-legend i { width: 12px; height: 12px; border-radius: 3px; background: var(--cc-dot); }
.cc-sieve-legend i.is-need { background: var(--t-cobalt); }

/* What was folded */
.cc-folds { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cc-folds li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1.5px solid var(--t-line); font-size: 1rem; }
.cc-folds b { font: 600 1rem/1.3 var(--t-mono); font-variant-numeric: tabular-nums; }
.cc-fold { margin-top: 14px; }
.cc-fold summary, .cc-more summary { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; list-style: none; font-weight: 700; }
.cc-fold summary::-webkit-details-marker, .cc-more summary::-webkit-details-marker { display: none; }
.cc-fold summary::after, .cc-more summary::after { content: "+"; display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--t-line); font: 600 1.2rem/1 var(--t-display); }
.cc-fold[open] summary::after, .cc-more[open] summary::after { content: "\2212"; }
.cc-fold h3 { margin: 14px 0 6px; font: 600 .75rem/1.3 var(--t-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--t-ink-2); }
.cc-fold ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.cc-fold ul li { padding: 6px 10px; border-radius: var(--t-r-s); background: var(--t-surface); font-size: .9375rem; line-height: 1.4; overflow-wrap: anywhere; white-space: pre-line; }
.cc-fold ul li span { display: block; font: 500 .75rem/1.3 var(--t-mono); color: var(--t-ink-2); }
.cc-fold-text { margin: 0; }
.cc-fold-text:focus { outline: none; }
body.cc .cc-fold-whole { margin-top: 6px; }
body.cc .cc-fold-more { margin-top: 8px; max-width: 100%; text-align: left; }

/* The board: what is still open */
.cc-board { padding: 24px 18px; border-radius: var(--t-r-l); background: var(--t-surface-2); }
@media (min-width: 600px) { .cc-board { padding: 32px 30px; } }
@media (min-width: 1100px) { .cc-board { padding: 40px 44px; } }
.cc-board-title { margin: 0 0 6px; font-size: 2rem; line-height: 1; font-weight: 800; letter-spacing: -.02em; }
.cc-board-title:focus { outline: none; }
.cc-board-sub { margin: 0 0 18px; max-width: 64ch; color: var(--t-ink-2); }
.cc-group-title { margin: 22px 0 10px; font: 600 .8125rem/1.3 var(--t-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--t-ink-2); }
.cc-group-title:first-child { margin-top: 0; }
.cc-items { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 900px) { .cc-items { grid-template-columns: 1fr 1fr; } }

.cc-item {
  display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 12px 14px; align-items: start;
  padding: 16px; border-radius: var(--t-r-m); background: var(--t-card); box-shadow: inset 0 0 0 1.5px var(--t-line);
}
.cc-item.is-in { animation: cc-item-in .5s var(--t-spring) both; }
@keyframes cc-item-in { from { transform: translateY(12px) scale(.98); } }
.cc-item.is-done .cc-msg { color: var(--t-ink-2); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.cc-when { display: grid; justify-items: center; gap: 2px; padding: 8px 0; border-radius: var(--t-r-s); background: var(--t-surface); text-align: center; font-variant-numeric: tabular-nums; }
.cc-when-wd, .cc-when-m, .cc-when-t { font: 600 .6875rem/1.2 var(--t-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--t-ink-2); }
.cc-when-d { font-size: 1.75rem; line-height: 1; font-weight: 800; letter-spacing: -.02em; }
.cc-when-t { color: var(--t-ink); }
.cc-when.is-soon { background: var(--t-cobalt); color: #fff; }
.cc-when.is-soon .cc-when-wd, .cc-when.is-soon .cc-when-m, .cc-when.is-soon .cc-when-t { color: #fff; }
.cc-when.is-none .cc-when-wd { padding: 10px 2px; line-height: 1.3; }
.cc-body { min-width: 0; }
.cc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; padding: 0; list-style: none; }
.cc-tag { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; border-radius: 999px; font: 600 .6875rem/1.2 var(--t-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--toy-text); box-shadow: inset 0 0 0 1.5px var(--t-line); }
.cc-tag.is-new { background: var(--t-cobalt); color: #fff; box-shadow: none; }
/* Things from the made-up chat: a dashed edge and a «Made up» tag wherever they show. */
.cc-tag.is-made { box-shadow: none; border: 1.5px dashed currentColor; }
.cc-item.is-made { box-shadow: none; border: 1.5px dashed var(--t-ink-2); }
.cc-made-note, .cc-order { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 0 0 18px; }
.cc-made-note { padding: 14px 16px; border-radius: var(--t-r-m); border: 1.5px dashed var(--t-ink-2); }
.cc-msg { margin: 0 0 6px; font-size: 1.0625rem; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-line; }
.cc-item.is-done .cc-msg mark { background: none; box-shadow: none; }
.cc-msg mark { background: var(--cc-mark); color: inherit; border-radius: 3px; box-shadow: inset 0 -2px 0 var(--toy-text); padding: 0 1px; }
.cc-from { margin: 0; font: 500 .8125rem/1.35 var(--t-mono); color: var(--t-ink-2); overflow-wrap: anywhere; }
.cc-acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
@media (min-width: 600px) { .cc-item { grid-template-columns: 64px minmax(0, 1fr); } .cc-acts { grid-column: 2; } }
body.cc .cc-act {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border: 0; border-radius: var(--t-r-btn, 10px); cursor: pointer;
  background: var(--t-surface); color: var(--t-ink); font: 600 .9375rem/1.2 var(--t-display); text-decoration: none;
  box-shadow: inset 0 0 0 1.5px var(--t-line), inset 0 -3px 0 rgba(0,0,0,.06);
  transition: transform var(--t-base) var(--t-spring);
}
body.cc .cc-act:active { transform: translateY(2px) scale(.97); }
body.cc .cc-act[aria-pressed="true"] { background: var(--t-ink); color: var(--t-surface); box-shadow: inset 0 -3px 0 rgba(255,255,255,.14); }
body.cc .cc-act-tick { width: 18px; height: 18px; border-radius: 5px; box-shadow: inset 0 0 0 2px currentColor; display: inline-grid; place-items: center; font-size: .75rem; }
body.cc .cc-act[aria-pressed="true"] .cc-act-tick::before { content: ""; width: 9px; height: 5px; border-left: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: translateY(-1px) rotate(-45deg); }
body.cc a.cc-act { color: var(--toy-text); }
.cc-more { margin-top: 18px; }
.cc-more .cc-items { margin-top: 8px; }
.cc-empty { margin: 0; padding: 18px; border-radius: var(--t-r-m); background: var(--t-card); color: var(--t-ink-2); }
.cc-keep { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 24px; padding-top: 18px; border-top: 1.5px solid var(--t-line); }
.cc-note { flex: 1 1 22em; margin: 0; font-size: .9375rem; color: var(--t-ink-2); }

/* How it reads, and the real thing */
.cc-how { margin-top: 40px; }
.cc-how-title { margin: 0 0 16px; font-size: 1.75rem; line-height: 1.05; font-weight: 800; letter-spacing: -.01em; }
.cc-steps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 0 0 18px; padding: 0; list-style: none; }
@media (min-width: 900px) { .cc-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cc-steps li { padding: 18px; border-radius: var(--t-r-m); background: var(--t-card); box-shadow: inset 0 0 0 1.5px var(--t-line); }
.cc-step-n { display: block; margin-bottom: 8px; font: 600 .75rem/1 var(--t-mono); color: var(--toy-text); }
.cc-steps strong { display: block; margin-bottom: 4px; font-size: 1.125rem; }
.cc-steps p { margin: 0; color: var(--t-ink-2); }
.cc-limits { margin: 0; max-width: 72ch; color: var(--t-ink-2); }
.cc-real { margin-top: 40px; padding: 26px 22px; border-radius: var(--t-r-l); background: var(--t-surface-2); }
.cc-real .t-label { margin: 0 0 10px; color: var(--t-ink-2); }
.cc-real h2 { margin: 0 0 10px; max-width: 22ch; font-size: 1.75rem; line-height: 1.05; font-weight: 800; letter-spacing: -.01em; text-wrap: balance; }
.cc-real p { margin: 0 0 16px; max-width: 62ch; color: var(--t-ink-2); }
@media (min-width: 900px) { .cc-real { padding: 36px 40px; } .cc-real h2 { font-size: 2.25rem; } }

@media (prefers-reduced-motion: reduce) {
  .cc-mast h1, .cc-item.is-in, .cc-sieve.is-in i { animation: none !important; }
  body.cc .cc-key, body.cc .cc-act { transition: none; }
  body.cc .cc-key:active, body.cc .cc-act:active { transform: none; }
}
