/* Learner page look (Carriann, 2026-10-02): the same dark blue as the projected wall in the
   header, a soft blue-gray page, and white cards. Loaded after app.css, on index.html only.
   Contrast, by the WCAG formula:

   LIGHT page #d8e2f2                          HEADER (lightest stop #16386b; darkest #0a1730)
   text    #1a1a1a 13.33                       white text #ffffff 11.59 (17.82)
   muted   #4b5058  6.21                       pill #375480 (white at 14% on #16386b):
   accent  #1d4ed8  5.13                         white text 7.66, connected dot #7fd89a 4.45,
   border  #6b7280  3.70                         not-connected dot #ff9b8f 3.77
   focus   #0f766e  4.19                       focus in the header #ffcf4d 7.88 (12.12)
   error   #b3261e  5.01   ok #1e6b35 5.01
   Cards are #ffffff (light) and #202227 (dark), where app.css's ratios already hold.
   Reading-level labels: text #1a1a1a on #e8eefc 14.97; dark #f2f2f2 on #2a3550 10.88.
   Sent icon: ok #1e6b35 on #e7f4ec 5.78; dark #7fd89a on #183524 7.75. */

.learner { --option: #f7f9fe; --page: #d8e2f2; --card: #ffffff; --card-line: #d5dce8; --chip: #e8eefc; --done-bg: #e7f4ec; }
@media (prefers-color-scheme: dark) {
  .learner { --option: #262a33; --page: #121212; --card: #202227; --card-line: #3a3f4a; --chip: #2a3550; --done-bg: #183524; }
}
/* Soft light on the blue page, like the first, paler background (Carriann, 2026-10-02). It only
   lightens the blue, so every ratio above holds or improves. Dark mode keeps a plain page. */
body.learner { background: var(--page); }
@media (prefers-color-scheme: light) {
  body.learner { background: radial-gradient(60rem 40rem at 12% -10%, rgb(255 255 255 / 0.75), transparent 70%),
    radial-gradient(50rem 36rem at 95% 15%, rgb(255 255 255 / 0.55), transparent 70%),
    radial-gradient(60rem 40rem at 45% 115%, rgb(255 255 255 / 0.5), transparent 70%), var(--page); background-attachment: fixed; }
}

/* ---------------------------------------------------------------- header */

.learner .site-header {
  background: linear-gradient(160deg, #0b1d3a 0%, #16386b 50%, #0a1730 100%); color: #ffffff; border: 0;
}
.learner .site-header h1 { color: #ffffff; margin-right: auto; }
/* A greeting, not a heading: the screen's heading is "Join your team", which says what it's for. */
.learner .welcome { font-family: var(--font-heading); font-size: 2rem; font-weight: 600; line-height: 1.2; margin: 0 0 0.25rem; }
.learner .site-header :focus-visible { outline-color: #ffcf4d; }
.learner .pills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; }
.learner .pill {
  display: inline-flex; align-items: center; gap: 0.45rem; margin: 0; padding: 0.2rem 0.75rem;
  border-radius: 999px; background: rgb(255 255 255 / 0.14); color: #ffffff; font-family: var(--font-heading); font-size: 0.95rem; font-weight: 600;
}
/* The connection: a dot and a word, so color is never the only sign. */
.learner .pill.conn::before { content: ""; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: #7fd89a; }
.learner .pill.conn.is-off::before { background: #ff9b8f; }
/* On a phone the header wraps to several rows, so it scrolls away instead of staying on top,
   where it could cover what has focus (2.4.11). */
@media (max-width: 40rem) { .learner .site-header { position: static; } html:has(.learner) { scroll-padding-top: 0; } }

/* ---------------------------------------------------------------- Today strip: links as chips */

.learner .today { border: 0; }
.learner .today .inner { padding-top: 0.75rem; padding-bottom: 0; }
.learner .today a, .learner .today-toggle {
  min-height: 44px; padding: 0.25rem 1rem; border-radius: 999px; border: 1px solid var(--border);
  background: var(--card); text-decoration: none; font-weight: 600;
}
.learner .today a:hover { text-decoration: underline; }
.learner .today .link-kind { font-weight: 400; color: var(--muted); }

/* ---------------------------------------------------------------- cards */

.learner .panel, .learner .card {
  background: var(--card); border: 1px solid var(--card-line); border-radius: 16px;
  box-shadow: 0 1px 2px rgb(15 30 60 / 0.06), 0 8px 24px rgb(15 30 60 / 0.08);
}
.learner .panel { padding: clamp(1.25rem, 4vw, 2.5rem); margin: 1.5rem auto 0; }
.learner .card { padding: clamp(1rem, 3vw, 1.75rem); }
.learner .panel-narrow { max-width: 30rem; }
.learner .panel-mid { max-width: 44rem; }
.learner .status-panel { text-align: center; }
.learner .status-panel .actions { justify-content: center; }
.learner .status-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 4rem; height: 4rem;
  border-radius: 50%; background: var(--chip); color: var(--accent); margin-bottom: 0.75rem;
}
.learner .status-icon.done { background: var(--done-bg); color: var(--ok); }
.learner .status-icon svg { width: 2rem; height: 2rem; }
.learner .meta { color: var(--muted); font-weight: 600; }

/* Join and Your team: a large field and a full-width button. */
.learner .panel-narrow input[type="text"] { max-width: none; font-size: 1.25rem; }
.learner .code-input { text-transform: uppercase; letter-spacing: 0.2em; font-weight: 700; text-align: center; }
.learner .panel-narrow button[type="submit"] { width: 100%; }

/* While you wait: the Today links as tiles. */
.learner .wait-more { text-align: left; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--card-line); }
.learner .wait-more h3 { font-size: 1.1rem; }
.learner .tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr)); }
.learner .tiles a {
  display: flex; flex-direction: column; justify-content: center; min-height: 4.5rem; padding: 0.75rem 1rem;
  border: 1px solid var(--border); border-radius: 12px; background: var(--card); text-decoration: none; font-weight: 700;
}
.learner .tiles a:hover { text-decoration: underline; }
.learner .tiles .link-kind { font-weight: 400; color: var(--muted); font-size: 0.9rem; }

/* Sent: what you sent, as a card like the wall's, and the reading level as labels. */
.learner .sent-preview { text-align: left; margin-top: 2rem; }
.learner .sent-preview h3 { font-size: 1.1rem; }
.learner .preview-card { border: 1px solid var(--card-line); border-radius: 16px; padding: clamp(1rem, 3vw, 1.75rem); background: var(--card); }
.learner .stats-label { margin: max(20pt, 1em) 0 0.4rem; color: var(--muted); font-size: 0.95rem; font-weight: 600; }
.learner .stats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.learner .stats li { padding: 0.25rem 0.75rem; border-radius: 999px; background: var(--chip); font-size: 0.95rem; }

/* ---------------------------------------------------------------- respond (Carriann, 2026-10-03)
   Task heading #1e40af on #ffffff 8.72; task text #374151 on #ffffff 10.31. Dark mode keeps the
   page's own text colors. The two choices are light, floating cards: #f7f9fe (dark #262a33). */
.learner #prompt-heading { color: #1e40af; }
.learner #prompt-text { color: #374151; }
@media (prefers-color-scheme: dark) { .learner #prompt-heading { color: var(--accent); } .learner #prompt-text { color: var(--text); } }
.learner .way-option {
  border: 1px solid var(--card-line); border-radius: 14px; background: var(--option); padding: 1rem 1.25rem;
  box-shadow: 0 1px 2px rgb(15 30 60 / 0.05), 0 6px 16px rgb(15 30 60 / 0.07);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.learner .way-option:hover, .learner .way-option:focus-within {
  box-shadow: 0 2px 4px rgb(15 30 60 / 0.06), 0 12px 28px rgb(15 30 60 / 0.12); transform: translateY(-2px);
}

/* The choice buttons themselves: soft blue with dark blue text, and a light shadow.
   Light: #1e3a8a on #e3ebfd 8.67 (hover #d6e2fc 7.96). Dark: #e8eefc on #2a3a66 9.53 (hover #33467a 7.86). */
.learner .way-option > button {
  background: #e3ebfd; color: #1e3a8a; border: 1px solid #b9cdf8; border-radius: 10px;
  box-shadow: 0 1px 2px rgb(29 78 216 / 0.12), 0 4px 10px rgb(29 78 216 / 0.12);
}
.learner .way-option > button:hover { background: #d6e2fc; }
@media (prefers-color-scheme: dark) {
  .learner .way-option > button { background: #2a3a66; color: #e8eefc; border-color: #4a5f99; }
  .learner .way-option > button:hover { background: #33467a; }
}
@media (prefers-reduced-motion: reduce) { .learner .way-option:hover, .learner .way-option:focus-within { transform: none; } }

/* A wider page while responding, with the response column wider than the task column, so the six
   formatting buttons fit on one line on a laptop (Carriann, 2026-10-03). The header lines up with it. */
.learner main, .learner .inner { max-width: 96rem; padding-left: 1.5rem; padding-right: 1.5rem; }
@media (max-width: 40rem) { .learner main, .learner .inner { padding-left: 1rem; padding-right: 1rem; } }
@media (min-width: 56rem) { .learner .respond { grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); } }
.learner .toolbar button { padding-left: 0.65rem; padding-right: 0.65rem; font-size: 1rem; } /* 16 px; still 44 px tall */
.learner .toolbar { gap: 0.4rem; }

/* A task with an activity link: a large button to open it. A task with no response: one column. */
.learner .activity { margin: 1rem 0; }
.learner .activity-link { font-size: 1.125rem; padding: 0.75rem 1.25rem; }
.learner .activity .hint { margin-top: 0.4rem; }
@media (min-width: 56rem) { .learner .respond.one-column { grid-template-columns: minmax(0, 48rem); justify-content: center; } }

/* A short fade as a screen opens, only for people who haven't asked for less motion. */
@media (prefers-reduced-motion: no-preference) {
  .learner main > section:not([hidden]) { animation: sw-enter 0.2s ease-out; }
  @keyframes sw-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}
