/* Launchpad -- shared styles
   Design tokens: maroon + gray (placeholder brand, site.config.js).
   No framework, no build step. */

:root {
  --maroon: var(--brand-primary);
  --maroon-dark: var(--brand-primary-dark);
  /* --maroon as TEXT (links, the collapsed-section state label) reads fine in
     light mode already; --maroon-text exists so those rules share a token
     with the dark theme, where plain --maroon is tuned as a fill and is only
     3.0:1 as foreground text. */
  --maroon-text: var(--brand-text);
  --gray: #9EA2A6;
  --gray-soft: #c9ccce;
  --ink: #1b1b1d;
  --muted: #6b6b70;
  --bg: var(--brand-page);
  --card: #ffffff;
  --line: #E3E6F0;
  --search-border: var(--line);
  --radius: 14px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 6px 18px rgba(0,0,0,.06);
  /* a neutral slate, not a brand colour: the header ink turns light in dark mode */
  --shadow-hover: 0 2px 6px rgba(15,23,42,.10), 0 14px 30px rgba(15,23,42,.12);
  --maxw: 1400px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Readable font (2026-09-27). Atkinson Hyperlegible Next, Braille Institute,
   OFL 1.1 (assets/vendor/fonts/OFL.txt), a variable file that covers 400 and 700.
   Switched on from the gear (settings.js writes lehs.font and sets
   html[data-font="readable"]). The rule needs !important because most tool
   pages still set body{font-family} in their own <style>; KaTeX keeps its
   own faces so math is unchanged. A copy of tool.css's rules, for the
   launchpads, which never load that file. */
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("vendor/fonts/AtkinsonHyperlegibleNext.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("vendor/fonts/AtkinsonHyperlegibleNext-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
html[data-font="readable"] :where(body, body *):not(.katex, .katex *, code, pre, kbd, samp, .mny) {
  font-family: "Atkinson Hyperlegible Next", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}

/* ---------- Header ---------- */
/* .site-header itself (colours, the graph-paper grid) is styled in tool.css. */
.site-header__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.site-header__logo {
  height: 42px;
  width: auto;
  display: block;
  flex: none;
}
.site-header__title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: .2px;
  margin: 0;
}
.site-header__title .sep { opacity: .5; font-weight: 400; margin: 0 .4em; }
.site-header__title .role { font-weight: 500; opacity: .92; }

/* Header mode switcher. Despite the name this styles BOTH directions:
   "Activate Teacher Mode" in the student header and "Student View" in the
   teacher header.
   DO NOT RENAME without cache-busting the stylesheet URL. /teacher/* is served
   no-store so its HTML is always fresh, but /assets/styles.css comes back
   public, max-age=14400, must-revalidate -- so for up to 4h a returning user
   can pair new HTML with an old stylesheet. A renamed selector renders the link
   as unstyled blue browser-default text. */
.teacher-link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  font-weight: 600;
  color: inherit;
  text-decoration: none;
  padding: 7px 12px;
  border: 1px solid currentColor;
  border-radius: 999px;
  white-space: nowrap;
  transition: background .14s ease, border-color .14s ease;
}
.teacher-link:hover { background: var(--card); }
.teacher-link:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.teacher-link svg { width: 15px; height: 15px; flex: none; }

/* ---------- Layout ---------- */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 20px 48px;
}
.lede {
  color: var(--muted);
  margin: 0 0 22px;
  font-size: .98rem;
}
.lede a {
  color: var(--maroon-text);
  font-weight: 600;
}

/* ---------- Skip link (keyboard users) ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  background: var(--maroon);
  color: #fff;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 0 0 10px 0;
  text-decoration: none;
}
.skip-link:focus-visible { left: 0; outline: 2px solid #fff; outline-offset: -4px; }

/* ---------- Tile search ---------- */
.tile-search-wrap {
  position: relative;
  max-width: 440px;
  margin: 0 0 24px;
}
.tile-search-wrap__icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--muted);
  pointer-events: none;
}
.tile-search {
  width: 100%;
  padding: 11px 14px 11px 38px;
  font-size: .95rem;
  font-family: inherit;
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid var(--search-border);
  border-radius: 999px;
  outline: none;
  transition: border-color .14s ease, box-shadow .14s ease;
}
.tile-search::placeholder { color: var(--muted); }
.tile-search:focus { border-color: var(--maroon); }
.tile-search:focus-visible { outline: 2px solid var(--maroon); outline-offset: 2px; }
.grid-empty { color: var(--muted); margin: 8px 0 0; }
.tile[hidden], .tile-section[hidden] { display: none; }

/* Recents sit above the regular sections so yesterday's tool is one click,
   including course tools that otherwise live behind a course door. */
.tile-section--recents { margin-bottom: 28px; }
.tile-section--recents .section-title { color: var(--maroon-text); border-bottom-color: var(--maroon); }
.section-hint { font-size: .82rem; color: var(--muted); margin: -6px 0 14px; line-height: 1.45; }

.tile__star {
  position: absolute;
  top: 8px;
  right: 8px;
  /* 44px hit area for a control that used to be a 34px square -- grown
     outward from the same center with a matching negative margin, and the
     padding increased by the same amount, so the visible icon and its hover
     circle stay exactly the size and position they were at 34px. Only the
     invisible tap target got bigger. */
  width: 44px;
  height: 44px;
  margin: -5px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: 999px;
  padding: 9px;
  line-height: 0;
  z-index: 1;
}
.tile__star svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}
.tile__star.is-on { color: var(--maroon-text); }
.tile__star.is-on svg { fill: currentColor; }
.tile__star:hover { background: color-mix(in srgb, var(--maroon) 8%, transparent); color: var(--maroon); }
.tile__star:focus-visible { outline: 2px solid var(--maroon); outline-offset: 2px; }

/* The only feedback for a refused star, so it has to be seen. It was small,
   low-contrast and bottom-centred, far from the star that was clicked. */
.star-note {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(12px);
  background: var(--maroon);
  color: #fff;
  padding: 14px 22px;
  border-radius: 12px;
  border: 2px solid #fff;
  max-width: min(92vw, 30rem);
  text-align: center;
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
  z-index: 40;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .34);
}
.star-note.on { opacity: 1; transform: translateX(-50%) translateY(0); }
html[data-theme="dark"] .star-note { background: var(--brand-tint-text); color: var(--brand-tint); border-color: var(--brand-tint); }

/* Knock the star back where the user is looking, not only at the page edge. */
@keyframes star-refused {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-4px); }
  45%      { transform: translateX(4px); }
  70%      { transform: translateX(-2px); }
}
.tile__star.is-refused {
  animation: star-refused .34s ease both;
  color: var(--maroon);
  background: color-mix(in srgb, var(--maroon) 18%, transparent);
}
@media (prefers-reduced-motion: reduce) {
  .tile__star.is-refused { animation: none; }
}

/* ---------- Tile grid ---------- */
/* Six cards across on a desktop. --maxw is 1400px so six 200px+ tiles fit;
   narrower screens drop columns as the minmax allows, and the cap keeps a
   wide monitor from stretching to seven or eight. */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
@media (min-width: 1300px) {
  .grid { grid-template-columns: repeat(6, 1fr); }
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 40px 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  min-height: 134px;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
a.tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--maroon);
}
a.tile:focus-visible {
  outline: 3px solid var(--maroon);
  outline-offset: 2px;
}

.tile__icon {
  width: 44px;
  height: 44px;
  padding: 9px;
  border-radius: 12px;
  color: var(--tone-ink, var(--maroon));
  background: var(--tone-bg, color-mix(in srgb, var(--maroon) 8%, transparent));
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tile__icon svg { width: 100%; height: 100%; display: block; }

/* Tone per topic family (set on the tile as data-tone by app.js). Light
   tones are highlighter pastels with an ink of 5.3:1 or better on them. The icon
   badge and the label's hover colour take it; everything else on the card
   stays neutral so the grid reads as one site, not a rainbow. */
.tile[data-tone="maroon"], .tile-section[data-tone="maroon"] { --tone-ink: var(--brand-tint-text); --tone-bg: var(--brand-tint); }
.tile[data-tone="teal"], .tile-section[data-tone="teal"]   { --tone-ink: #0E6B5C; --tone-bg: #DDF4EC; }
.tile[data-tone="amber"], .tile-section[data-tone="amber"]  { --tone-ink: #8A5300; --tone-bg: #FFF1C7; }
.tile[data-tone="green"], .tile-section[data-tone="green"]  { --tone-ink: #3A5A2A; --tone-bg: #E6F4DC; }
.tile[data-tone="indigo"], .tile-section[data-tone="indigo"] { --tone-ink: #3E4FA8; --tone-bg: #E5E9FD; }
.tile[data-tone="slate"], .tile-section[data-tone="slate"]  { --tone-ink: #475569; --tone-bg: #ECEFF4; }
.tile[data-tone="rose"], .tile-section[data-tone="rose"]   { --tone-ink: #A3365A; --tone-bg: #FCE3EA; }
.tile[data-tone="gold"], .tile-section[data-tone="gold"]   { --tone-ink: #7A5A00; --tone-bg: #FAF0CF; }
.tile[data-tone="plum"], .tile-section[data-tone="plum"]   { --tone-ink: #6B2F7A; --tone-bg: #F4E7F7; }
html[data-theme="dark"] .tile[data-tone="maroon"], html[data-theme="dark"] .tile-section[data-tone="maroon"] { --tone-ink: var(--brand-tint-text); --tone-bg: var(--brand-tint); }
html[data-theme="dark"] .tile[data-tone="teal"], html[data-theme="dark"] .tile-section[data-tone="teal"]   { --tone-ink: #7fd3d9; --tone-bg: #14343a; }
html[data-theme="dark"] .tile[data-tone="amber"], html[data-theme="dark"] .tile-section[data-tone="amber"]  { --tone-ink: #f2c46d; --tone-bg: #3d2d12; }
html[data-theme="dark"] .tile[data-tone="green"], html[data-theme="dark"] .tile-section[data-tone="green"]  { --tone-ink: #9dd39a; --tone-bg: #1d3320; }
html[data-theme="dark"] .tile[data-tone="indigo"], html[data-theme="dark"] .tile-section[data-tone="indigo"] { --tone-ink: #aeb7f0; --tone-bg: #24284a; }
html[data-theme="dark"] .tile[data-tone="slate"], html[data-theme="dark"] .tile-section[data-tone="slate"]  { --tone-ink: #b8c2d1; --tone-bg: #262c36; }
html[data-theme="dark"] .tile[data-tone="rose"], html[data-theme="dark"] .tile-section[data-tone="rose"]   { --tone-ink: #f0a2bd; --tone-bg: #3d1e2b; }
html[data-theme="dark"] .tile[data-tone="gold"], html[data-theme="dark"] .tile-section[data-tone="gold"]   { --tone-ink: #e9d37a; --tone-bg: #3a3413; }
html[data-theme="dark"] .tile[data-tone="plum"], html[data-theme="dark"] .tile-section[data-tone="plum"]   { --tone-ink: #d7b3e6; --tone-bg: #33203b; }
a.tile:hover { border-color: var(--tone-ink, var(--maroon)); }

.tile__label { font-size: 1.06rem; font-weight: 700; margin: 0; }
.tile__desc  { font-size: .87rem; color: var(--muted); margin: 0; }
.tile__course { margin: auto 0 0; font-size: .72rem; font-weight: 750; letter-spacing: .02em; color: var(--maroon-text); }
.global-search-title { padding: .25rem 0 .65rem; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Column layout (teacher 2026-10-05, student 2026-10-07) ----------
   renderTiles(..., { layout: "dash" }) marks #grid .lp-dash: the sections
   side by side as panels, a monospace title bar in the section's tone, each
   tool one compact row. A star, when there is one, is a chip under the
   panels in place of the hint. The teacher page is five panels; the student
   page sets data-cols to its panel count: "2" (Practice, Course Tools) until
   Reference moves, then "3".
   scripts/test-student-home.js and scripts/test-launchpad-ux.js pin both. */
/* One row above the panels: the status bar takes the width, search sits at
   its end. The lede is a hint line under the panels (.dash-hint). */
.dash-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 0 0 14px; }
.dash-top .dash-status { flex: 1 1 560px; min-width: 0; margin: 0; }
.dash-top .tile-search-wrap { margin: 0; flex: 0 1 330px; }
.dash-hint { margin: 14px 0 0; font-size: .85rem; }
.lp-dash { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
/* Student columns are only as tall as their tools. Teacher columns keep
   stretch so the short panels' previews fill the row. */
.lp-dash[data-cols="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.lp-dash[data-cols="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; max-width: 960px; }
.lp-dash .tile-section.is-collapsed { align-self: start; }
/* :not([hidden]) is only the display. Folding the whole layout into that
   selector outweighs .tile--join, and the Join row then has no track of its
   own: the title column collapses to a few letters. A later display value
   paints a hidden element anyway (the hidden attribute does not win a tie). */
.lp-dash .tile-section:not([hidden]) { margin: 0; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--tone-ink, var(--maroon)); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; }
.lp-dash .tile[hidden], .lp-dash .tile-section[hidden] { display: none !important; }
.lp-dash .tile-section--recents { grid-column: 1 / -1; }
.lp-dash .section-title { margin: 0; font-size: .74rem; font-weight: 800; letter-spacing: .1em; }
.lp-dash .tile-section .section-toggle, .lp-dash .tile-section:not(.is-collapsed) .section-toggle { min-height: 44px; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: color-mix(in srgb, var(--tone-bg, var(--sunken)) 55%, var(--card)); box-shadow: none; }
.lp-dash .section-toggle:hover { background: var(--tone-bg, var(--sunken)); }
.lp-dash .tile-section.is-collapsed .section-toggle { border-bottom: 0; }
.lp-dash .section-toggle__label { color: var(--tone-ink, var(--maroon-text)); }
.lp-dash .section-toggle__count, .lp-dash .section-toggle__state { font-family: inherit; font-weight: 600; letter-spacing: 0; }
.lp-dash .section-toggle__state { color: var(--muted); }
.lp-dash .section-toggle:hover .section-toggle__state { color: var(--tone-ink, var(--maroon-text)); }
.lp-dash .section-body { padding: 6px; flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
.lp-dash .section-hint { margin: 2px 6px 8px; }
.lp-dash .grid--panel { display: flex; flex-direction: column; gap: 4px; }
.lp-dash .tile:not([hidden]) { display: grid; }
.lp-dash .tile { grid-template-columns: 32px minmax(0, 1fr); grid-template-areas: "icon label" "icon desc"; gap: 1px 10px; align-content: center; min-height: 56px; padding: 8px 40px 8px 8px; border: 1px solid transparent; border-radius: 8px; background: transparent; box-shadow: none; }
.lp-dash a.tile:hover { transform: none; box-shadow: none; border-color: transparent; background: var(--tone-bg, var(--sunken)); }
.lp-dash .tile__icon { grid-area: icon; width: 32px; height: 32px; padding: 6px; border-radius: 8px; align-self: center; }
.lp-dash .tile__label { grid-area: label; font-size: .95rem; font-weight: 700; line-height: 1.25; align-self: end; }
.lp-dash .tile__desc { grid-area: desc; font-size: .8rem; line-height: 1.3; color: var(--muted); align-self: start; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lp-dash .tile__star { top: calc(50% - 17px); right: 2px; }
/* One line under the four Course Tools, opening the rest of that course. */
.lp-dash .course-rest { display: flex; align-items: center; min-height: 44px; margin: 2px 8px; padding: 0 4px; font-size: .92rem; font-weight: 700; color: var(--tone-ink, var(--maroon-text)); text-decoration: none; }
.lp-dash .course-rest:hover { text-decoration: underline; }
.lp-dash .course-rest:focus-visible { outline: 2px solid var(--maroon); outline-offset: 2px; }
/* Join with a code sits in the Practice column as a form, not a link. */
.lp-dash .tile--join { grid-template-areas: "icon label" "icon desc" "join join"; align-content: start; min-width: 0; }
.lp-dash .tile--join:hover { background: var(--tone-bg, var(--sunken)); }
.lp-dash .tile--join .tile__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-dash .tile--join .tile__desc { white-space: normal; display: block; -webkit-line-clamp: unset; }
.lp-dash .tile__join { grid-area: join; display: flex; gap: 6px; margin-top: 6px; min-width: 0; }
.lp-dash .tile__join input { flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 0 10px; font: 600 1.05rem/1 ui-monospace, Consolas, monospace; letter-spacing: .18em; text-transform: uppercase; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.lp-dash .tile__go { flex: 0 0 auto; white-space: nowrap; min-height: 44px; padding: 0 14px; border: 0; border-radius: 8px; background: var(--tone-ink, var(--maroon)); color: var(--card); font-weight: 700; font-size: .95rem; cursor: pointer; }
.lp-dash .tile__join input:focus-visible, .lp-dash .tile__go:focus-visible { outline: 3px solid var(--maroon); outline-offset: 2px; }
/* Leftover height in a short panel. The preview sits under that panel's
   tools and stretches to the row. Run Class has no preview. Plan is one
   line. Under 760px the graph and the problem stay, capped so they do
   not become a second page of chrome. */
.lp-dash .panel-preview { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: flex-start; margin: 6px 2px 2px; padding: 8px 10px; min-width: 0; min-height: 0; border: 1px solid var(--line); border-radius: 8px; background: color-mix(in srgb, var(--tone-bg, var(--sunken)) 40%, var(--card)); color: var(--ink); text-decoration: none; overflow: hidden; }
.lp-dash .panel-preview:hover { background: var(--tone-bg, var(--sunken)); border-color: var(--tone-ink, var(--maroon)); }
.lp-dash .panel-preview:focus-visible { outline: 3px solid var(--maroon); outline-offset: 2px; }
.lp-dash .panel-preview__page { display: flex; flex-direction: column; gap: 4px; min-width: 0; min-height: 0; }
.lp-dash .panel-preview__phone { display: none; }
.lp-dash .panel-preview__kicker { font-size: .7rem; font-weight: 800; line-height: 1.2; letter-spacing: .1em; text-transform: uppercase; color: var(--maroon-text); }
.lp-dash .panel-preview__stem { font-size: .92rem; font-weight: 650; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.lp-dash .panel-preview__stem p { margin: 0; }
.lp-dash .panel-preview__choices { display: flex; flex-direction: column; gap: 1px; font-size: .78rem; line-height: 1.3; }
.lp-dash .panel-preview__choice { display: flex; gap: 4px; min-width: 0; }
.lp-dash .panel-preview__choice-k { flex: 0 0 auto; font-weight: 700; }
.lp-dash .panel-preview__choice-t { min-width: 0; }
.lp-dash .panel-preview__fig { display: block; max-width: 100%; max-height: 72px; width: auto; margin-top: 2px; object-fit: contain; }
.lp-dash .panel-preview__stats { display: flex; gap: 14px; margin: 2px 0 2px; }
.lp-dash .panel-preview__stats:empty { display: none; }
.lp-dash .panel-preview__stat { display: flex; flex-direction: column; min-width: 0; }
.lp-dash .panel-preview__stat-n { font-size: 1.6rem; font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; }
.lp-dash .panel-preview__stat--lynn .panel-preview__stat-n { color: var(--maroon-text); }
.lp-dash .panel-preview__stat--state .panel-preview__stat-n { color: var(--teal, #1f6f78); }
.lp-dash .panel-preview__stat-k { font-size: .72rem; font-weight: 650; color: var(--muted); }
.lp-dash .panel-preview__series--gap { stroke-width: 1.5; stroke-dasharray: 3 3; opacity: .7; }
.lp-dash .panel-preview__unit { font-size: .72rem; color: var(--muted); }
.lp-dash .panel-preview__page > * { flex-shrink: 0; }
.lp-dash .panel-preview__grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 3; }
.lp-dash .panel-preview__open { margin-top: auto; padding-top: 8px; font-size: .8rem; font-weight: 700; color: var(--tone-ink, var(--maroon-text)); }
.lp-dash .panel-preview:hover .panel-preview__open { text-decoration: underline; }
.lp-dash .panel-preview__svg { width: 100%; height: auto; max-height: 150px; display: block; margin-top: 4px; overflow: visible; }
.lp-dash .panel-preview__series { fill: none; stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.lp-dash .panel-preview__series--lynn { stroke: var(--maroon); }
.lp-dash .panel-preview__series--state { stroke: var(--teal, #1f6f78); }
.lp-dash .panel-preview__dot--lynn { fill: var(--maroon); }
.lp-dash .panel-preview__dot--state { fill: var(--teal, #1f6f78); }
.lp-dash .panel-preview__axis { stroke: var(--line); stroke-width: 1; }
.lp-dash .panel-preview__tick { fill: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; }
.lp-dash .panel-preview__note { font-size: .78rem; font-weight: 650; color: var(--ink); }
.lp-dash .panel-preview--sheet .panel-preview__page { flex: 1 1 auto; align-self: stretch; gap: 2px; background: #fff; color: #1d1d1f; border: 1px solid #ddd6d4; border-radius: 3px; padding: 10px 12px 12px; box-shadow: 3px 3px 0 -1px #fff, 3px 3px 0 0 #ddd6d4, 0 2px 6px rgba(0,0,0,.08); overflow: hidden; -webkit-mask-image: linear-gradient(#000 78%, transparent); mask-image: linear-gradient(#000 78%, transparent); }
.lp-dash .panel-preview--sheet .panel-preview__name { color: #6b6b70; }
.lp-dash .panel-preview--sheet .katex { color: #1d1d1f; }
.lp-dash .panel-preview--sheet .panel-preview__name-line { border-bottom-color: #1d1d1f; }
.lp-dash .panel-preview__name-line--short { flex: 0 1 3.5em; }
.lp-dash .panel-preview--sheet .panel-preview__title { margin: 2px 0 4px; padding-bottom: 4px; border-bottom: 1.5px solid #1d1d1f; }
.lp-dash .panel-preview--sheet .panel-preview__q { margin-top: 6px; }
.lp-dash .panel-preview--sample .panel-preview__title { color: #6b6b70; }
.lp-dash .panel-preview__name { display: flex; align-items: flex-end; gap: 8px; margin: 0 0 6px; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.lp-dash .panel-preview__name-line { flex: 1 1 auto; border-bottom: 1px solid var(--ink); min-height: .9em; }
.lp-dash .panel-preview__title { font-size: .95rem; font-weight: 750; line-height: 1.3; text-align: center; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lp-dash .panel-preview__q { display: flex; gap: 6px; margin-top: 4px; font-size: .8rem; line-height: 1.35; }
.lp-dash .panel-preview__qn { flex: 0 0 auto; font-weight: 750; }
.lp-dash .panel-preview__qt { min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lp-dash .panel-preview__qt p { margin: 0; }
.lp-dash .panel-preview--plan { flex: 0 0 auto; min-height: 44px; justify-content: center; }
.lp-dash .panel-preview--plan .panel-preview__phone { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; font-weight: 650; }
/* The status bar above the panels (assets/teacher-status.js): one line
   line, segments split by a rule, wrapping onto a second line when narrow. */
.dash-status { display: flex; flex-wrap: nowrap; align-items: stretch; margin: 0 0 14px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); font-size: .9rem; font-weight: 600; line-height: 1.3; font-variant-numeric: tabular-nums; color: var(--ink); overflow: hidden; }
.dash-status[hidden] { display: none; }
.dash-status__seg { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 12px; border-right: 1px solid var(--line); color: inherit; text-decoration: none; white-space: nowrap; flex: 0 0 auto; }
.dash-status__seg:last-child { border-right: 0; }
a.dash-status__seg:hover { background: var(--sunken); }
a.dash-status__seg:focus-visible { outline: 2px solid var(--maroon); outline-offset: -2px; }
/* The student bar's course control. The menu drops out of the bar, so the
   bar stops clipping while it is open. Options are 44px, same as the button. */
.dash-status__seg--course { position: relative; gap: 8px; }
.dash-status__course { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: 0; padding: 0 10px; border: 0; border-radius: 8px; background: var(--sunken); color: inherit; font: inherit; cursor: pointer; }
.dash-status__course:hover { background: var(--line); }
.dash-status__course:focus-visible { outline: 2px solid var(--maroon); outline-offset: 2px; }
.dash-status__chev { flex: 0 0 auto; font-size: .8rem; line-height: 1; }
.dash-status__menu { position: absolute; z-index: 30; top: calc(100% + 4px); right: 0; min-width: 16rem; max-width: min(22rem, calc(100vw - 24px)); margin: 0; padding: 4px; list-style: none; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.dash-status__menu[hidden] { display: none; }
.dash-status__menu li { margin: 0; padding: 0; }
.dash-status__option { display: block; width: 100%; min-height: 44px; margin: 0; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.dash-status__option[aria-selected="true"] { background: var(--sunken); }
.dash-status__option:hover { background: var(--line); }
.dash-status__option:focus-visible { outline: 2px solid var(--maroon); outline-offset: -2px; }
.dash-status:has(.dash-status__course[aria-expanded="true"]) { overflow: visible; }
/* the one segment that gives way: its title shortens with an ellipsis, so the bar stays one line */
.dash-status__seg--last, .dash-status__seg--jam { margin-left: auto; border-left: 1px solid var(--line); min-width: 0; flex: 0 1 auto; overflow: hidden; }
.dash-status__seg--course { overflow: visible; padding-top: 0; padding-bottom: 0; }
.dash-status__k { color: var(--maroon-text); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.dash-status__clock { font-variant-numeric: tabular-nums; }
.dash-status__dim { color: var(--muted); font-weight: 500; }
.dash-status__bar { display: inline-block; width: 72px; height: 6px; border-radius: 3px; background: var(--sunken); border: 1px solid var(--line); overflow: hidden; }
.dash-status__bar > span { display: block; height: 100%; background: var(--maroon); }
.dash-status__tag { padding: 2px 8px; border-radius: 999px; background: var(--warn); color: #fff; font-size: .74rem; }
.dash-status__code { letter-spacing: .12em; }
.dash-status__title { font-family: inherit; font-weight: 500; overflow: hidden; text-overflow: ellipsis; max-width: 22ch; min-width: 0; flex: 0 1 auto; }
.dash-status__seg--jam { background: var(--maroon); color: #fff; }
.dash-status__seg--jam .dash-status__dim { color: #fff; }
a.dash-status__seg--jam:hover { background: var(--maroon-dark, var(--maroon)); }
/* Under 1280 the search takes its own line, so the bar keeps the full width;
   under 900 the bar itself may wrap. */
@media (max-width: 1280px) { .dash-top .dash-status { flex-basis: 100%; } }
@media (max-width: 900px) { .dash-status { flex-wrap: wrap; } }
/* Phone: segments share lines, and the code title stays on one line. */
@media (max-width: 520px) {
  .dash-status { flex-wrap: wrap; }
  .dash-status__seg { flex: 1 1 40%; white-space: nowrap; min-width: 0; border-right: 0; border-top: 1px solid var(--line); }
  .dash-status__seg:first-child { flex-basis: 100%; border-top: 0; }
  .dash-status__seg--course { flex-basis: 100%; justify-content: space-between; }
  .dash-status__seg--last,
  .dash-status__seg--jam { flex: 1 1 auto; min-width: 0; margin-left: 0; overflow: hidden; }
  .dash-status__seg--last .dash-status__title,
  .dash-status__seg--jam .dash-status__title {
    flex: 1 1 auto; min-width: 0; max-width: none;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .dash-status__seg--course { overflow: visible; }
  .dash-top .tile-search-wrap { flex: 1 1 100%; max-width: none; width: 100%; }
}
/* A search that reaches past the columns adds its block directly under the
   search box, spanning the row. */
.lp-dash .global-search-results { grid-column: 1 / -1; }
.lp-dash .global-search-title { margin: 0; padding: 12px; border-bottom: 1px solid var(--line); }
.lp-dash .global-search-results .grid { display: flex; flex-direction: column; gap: 2px; }
.lp-dash .tile__course { grid-column: 2; margin: 0; }
@media (max-width: 1100px) {
  .lp-dash { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .lp-dash { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-dash[data-cols="3"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-dash .panel-preview { flex: 0 1 auto; max-height: 168px; min-height: 0; overflow: hidden; }
  .lp-dash .panel-preview--plan { flex: 0 0 auto; max-height: none; min-height: 44px; }
  .lp-dash .panel-preview--data { max-height: none; }
  .lp-dash .panel-preview--sheet { max-height: 260px; }
}
@media (max-width: 520px) {
  .lp-dash { grid-template-columns: minmax(0, 1fr); }
  .lp-dash[data-cols="3"] { grid-template-columns: minmax(0, 1fr); }
  .lp-dash[data-cols="2"] { grid-template-columns: minmax(0, 1fr); }
  /* One header row. The short word is the visible switch; the full phrase
     stays in the page for the accessible name. Scoped to the two launchpads. */
  .lp-launch .site-header__inner {
    flex-wrap: nowrap;
    height: 44px;
    min-height: 44px;
    padding: 0 12px;
    gap: 8px;
  }
  .lp-launch .site-header__logo { height: 28px; width: auto; }
  .lp-launch .site-header__title {
    font-size: 1.05rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .lp-launch .teacher-link { padding: 0 10px; min-height: 44px; }
  .lp-launch .teacher-link__full {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }
  .lp-launch .teacher-link__short { display: inline; }
  .lp-launch main { padding: 10px 12px 32px; }
  .lp-launch .dash-top { margin-bottom: 8px; }
}
.teacher-link__short { display: none; }
/* Stars, when there are any: one row of chips in place of the hint line.
   Width follows the label. No star, no row. */
.star-row:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 0; }
.star-row[hidden], .star-chip[hidden] { display: none !important; }
.star-chip:not([hidden]) {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  max-width: 100%;
  min-height: 44px;
  padding: 0 4px 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
}
.star-chip__link {
  color: inherit;
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.star-chip__link:hover { text-decoration: underline; }
.star-chip__link:focus-visible, .star-chip__star:focus-visible { outline: 2px solid var(--maroon); outline-offset: 2px; }
.star-chip__star {
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 11px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--maroon-text);
  cursor: pointer;
  line-height: 0;
}
.star-chip__star svg { width: 18px; height: 18px; display: block; fill: currentColor; stroke: currentColor; stroke-width: 1.2; }

/* ---------- Coming-soon tiles ---------- */
.tile--soon {
  cursor: default;
  border-style: dashed;
  border-color: var(--gray-soft);
  box-shadow: none;
  background: #fcfbfb;
}
.tile--soon .tile__icon  { color: var(--gray); }
.tile--soon .tile__label { color: var(--muted); }
.badge {
  align-self: flex-start;
  margin-top: auto;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gray);
  background: #f1eeed;
  border: 1px solid var(--gray-soft);
  padding: 2px 8px;
  border-radius: 999px;
}

/* ---------- Section groups (teacher grid) ---------- */
.tile-section { margin-bottom: 36px; }
.tile-section:last-child { margin-bottom: 0; }
.section-title {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--muted);
  margin: 0 0 14px;
}
.section-toggle {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.section-toggle:hover { border-color: var(--maroon); }
.section-toggle:hover .section-toggle__label { color: var(--ink); }
.section-toggle:focus-visible { outline: 2px solid var(--maroon); outline-offset: 2px; }
.section-toggle__chev {
  flex-shrink: 0;
  width: 1em;
  text-align: center;
  font-size: 1rem;
  line-height: 1;
  transform: rotate(90deg);
  transition: transform .15s ease;
}
.section-toggle[aria-expanded="false"] .section-toggle__chev { transform: rotate(0deg); }
.section-toggle__label { flex: 1; color: var(--ink); }
.section-toggle__count,
.section-toggle__state {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}
.section-toggle__state { color: var(--maroon-text); }
.section-body[hidden] { display: none !important; }
.tile-section.is-collapsed { margin-bottom: 10px; }
.tile-section.is-collapsed .section-title { margin-bottom: 0; }
.tile-section:not(.is-collapsed) .section-toggle {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  padding: 4px 2px 10px;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px 40px;
  color: var(--muted);
  font-size: .8rem;
}
.site-footer a { color: var(--maroon-text); }

/* ---------- Simple text pages (404) ---------- */
.prose { max-width: var(--maxw); margin: 0 auto; padding: 36px 20px 60px; }
.prose h2 { margin: 0 0 6px; }

/* Save on your phone. The role chooser and the student launchpad.
   Same disclosure as a tool page's How to use this (tool.css .how-to):
   a 44px summary and a focus ring. Colors are the shared tokens.
   Light reads the :root palette in this file. Dark reads the same names
   after tool.css re-points them on html[data-theme="dark"]. */
.how-to.save-phone {
  margin: 18px 0 0;
  max-width: 40rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
}
.landing > .how-to.save-phone {
  flex: 1 0 100%;
  max-width: 36rem;
  margin: 8px auto 0;
}
.how-to.save-phone > summary {
  box-sizing: border-box;
  min-height: 44px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
}
.how-to.save-phone > summary:focus-visible {
  outline: 2px solid var(--maroon);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--maroon);
}
.how-to.save-phone .how-to-body {
  padding: 0 14px 12px;
  font-size: .95rem;
  line-height: 1.5;
  color: var(--ink);
}
.how-to.save-phone .how-to-body ul { margin: 0; padding-left: 1.25em; }
.how-to.save-phone .how-to-body li { margin: 0 0 8px; }
.how-to.save-phone .how-to-body li:last-child { margin-bottom: 0; }
html[data-theme="dark"] .how-to.save-phone {
  background: var(--card);
  color: var(--ink);
  border-color: var(--line);
}
html[data-theme="dark"] .how-to.save-phone > summary,
html[data-theme="dark"] .how-to.save-phone .how-to-body {
  color: var(--ink);
}
/* Phone advice only: a mouse-driven screen (a desktop or laptop) hides it.
   Touch screens, phones and tablets alike, keep it. */
@media (hover: hover) and (pointer: fine) {
  .how-to.save-phone { display: none; }
}

/* The name and the tagline under it (src/chrome/header-launchpad.html). */
.site-header__name { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.site-header__tagline { margin: 0; font-size: .82rem; font-weight: 500; opacity: .85; }
.site-footer:empty { display: none; }

/* The skip link's target: <main tabindex="-1"> takes focus so the next Tab
   lands inside the content, but needs no ring of its own. */
main[tabindex="-1"]:focus { outline: none; }
/* Links in plain text pages (the 404) read as site links, not browser blue. */
.prose a { color: var(--maroon-text); }
