@import url("fonts.css");  /* fonts + heading sizes: see design-system/fonts.css */

/* ============================================================
   Launchpad design system — shared styles
   Loaded by every app via:
     <link rel="stylesheet" href="[relative path]/design-system/styles.css">

   What lives here vs. what stays in each app's own <style> block
   is explained in design-system/INSTRUCTIONS.md. Short version:
   this file holds only what is genuinely identical across apps
   today (colors, fonts, base reset, a couple of shared components).
   Everything else — layout, one-off widgets, per-app spacing —
   stays inline in that app's own file. Change something here and
   it updates everywhere at once; that's the point.
   ============================================================ */

/* ---------- Host boilerplate reset ---------- */
/* Identical across every app's original file — safe-area insets for
   notched phones, a plain fallback background/font before web fonts
   load, and basic [hidden]/img handling. */
:root{
  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
html{ scroll-padding-top: env(safe-area-inset-top, 0px); }
body{
  margin: 0;
  padding: 0;
  font: 16px -apple-system, BlinkMacSystemFont, sans-serif;
  background: #F7F9FD;
  color: #22304A;
}
img{ max-width: 100%; }
[hidden]:not([hidden=until-found i]){ display: none !important; }

/* ---------- Design tokens ---------- */
/* Daybreak (decided Oct 18, 2026). Brand colors: navy #22304A (ink), aqua #9FDDE6,
   peach #FBC9A8, with sky blue as a soft background. Light only: the apps look
   the same whatever a teacher's computer is set to (no dark mode, decided Oct 18). */
:root{
  color-scheme: light;
  --paper: #F7F9FD;
  --surface: #FFFFFF;  /* cards and panels: white, crisp, on the pale page */
  --surface-hover: #EEF3FA;
  --ink: #22304A;
  --ink-soft: #4C576E;
  --ink-faint: #56627A;  /* still readable on paper and cards; never lighten */
  --line: #E3E9F3;
  --line-strong: #C9D3E3;
  --pill-fill: #22304A;
  --pill-text: #FFFFFF;
  --good: #1B6A5A;
  --warn: #9C4D25;
  --focus: #22304A;

  /* Whose tool it is: aqua for student tools, sky blue for teacher tools */
  --stu-card: #E2F4F6; --stu-edge: #BDE1E6; --stu-ico: #1A7484;
  --you-card: #E3EFFA; --you-edge: #BCD3EE; --you-ico: #2F5DB8;
  --card: #FFFFFF;  /* plain white card on the page */

  --new: #DCE7FB; --new-ink: #2A55B3;   /* the small "New" tag */
  --accent: #2F5DB8;                     /* focus rings, radio dots */
  --usual-card: #DCF2E8; --usual-edge: #A6D8C1; --usual-ink: #22304A;  /* "your usual" items: soft mint green (Oct 20, 2026; was peach) */

  /* Page layout, the same in every app: back link in the top-left corner,
     app name as the title, a plain description under it. */
  --page-width: 1040px;    /* every app's content width, so the left edge lines up from page to page */
  --page-wide: 1040px;     /* (kept as a name for the boards; the same width since Oct 19, 2026) */
  --page-top: 72px;        /* room for the back link above the title */
  /* Two content widths (Oct 21, 2026). Every page's title starts at the same left edge.
     Full: the whole page width (My List, Quick Links, On the Record, The Getaway, Calm Challenge).
     Reading: a narrower centered column for forms, menus and anything read top to bottom
     (Parent Email Writer, the survey, Take a Breather, Just Quiet, Meditations, the Brain Breaks and Focus Challenges menus). */
  --read-width: 720px;

  /* Brand colors, for logos and small accents */
  --navy: #22304A; --aqua: #9FDDE6; --peach: #FBC9A8;

  /* The Daybreak sky behind the top of a page: peach, ivory, then the page,
     with a soft aqua glow on the right. Used by body.daybreak. */
  --sky:
    radial-gradient(38% 55% at 88% 52%, rgba(178,228,236,.5) 0%, rgba(178,228,236,0) 70%),
    linear-gradient(180deg, #FCDAC7 0%, #FDEDE4 32%, #FAF6F3 62%, rgba(247,249,253,0) 100%);

  /* Launchpad's right-hand window (the same sky, taller) */
  --window-sky: linear-gradient(175deg, #FCDAC7 0%, #FDEDE4 20%, #FAF6F3 36%, #E6EFFC 58%, #EEF3FC 100%);
  --window-glow:
    radial-gradient(70% 34% at 78% 46%, rgba(178,228,236,.75) 0%, transparent 72%),
    radial-gradient(45% 30% at 12% 88%, #BDEFF0 0%, transparent 70%),
    radial-gradient(30% 18% at 70% 102%, #FCDCC8 0%, transparent 70%);

  /* Build a World's landscape (that game keeps its own scene colors) */
  --land-far: #C9C0A6;
  --land-mid: #9B9374;
  --land-ground: #3A3527;
  --land-glow: #6B644C;

  /* Font families and sizes live in design-system/fonts.css */
}

/* ---------- The other two palettes (Change colors on Launchpad) ----------
   design-system/theme.js puts the teacher's choice on <html>, so every app follows it.
   Daybreak is the default (the :root values above). */
html.t-seaglass{
  --stu-card: #DCF2E8; --stu-edge: #A6D8C1; --stu-ico: #1B6A5A;
  --you-card: #DDEFF6; --you-edge: #A9D2E3; --you-ico: #1F7182;
  --new: #CDEFE4; --new-ink: #1A6656; --accent: #1F7182;
  --sky:
    radial-gradient(38% 55% at 88% 52%, rgba(207,221,251,.55) 0%, rgba(207,221,251,0) 70%),
    linear-gradient(180deg, #CDEAF3 0%, #E3F6F1 45%, rgba(247,249,253,0) 100%);
  --window-sky: linear-gradient(170deg, #CDEAF3 0%, #E3F6F1 55%, #F7F9FD 100%);
  --window-glow:
    radial-gradient(45% 30% at 15% 85%, #BDEFF0 0%, transparent 70%),
    radial-gradient(40% 28% at 92% 62%, #CFDDFB 0%, transparent 70%),
    radial-gradient(30% 20% at 60% 100%, #CBF2DF 0%, transparent 70%);
}
html.t-moonstone{
  --stu-card: #E1F3F5; --stu-edge: #BBDFE3; --stu-ico: #1A7484;
  --you-card: #ECE8F8; --you-edge: #CEC6EC; --you-ico: #5B4BA8;
  --new: #ECE8F8; --new-ink: #4F3F9A; --accent: #3566CF;
  --sky:
    radial-gradient(38% 55% at 88% 52%, rgba(189,239,240,.5) 0%, rgba(189,239,240,0) 70%),
    linear-gradient(180deg, #E5DFF5 0%, #F9E7EE 45%, rgba(247,249,253,0) 100%);
  --window-sky: linear-gradient(170deg, #E5DFF5 0%, #F9E7EE 55%, #F7F9FD 100%);
  --window-glow:
    radial-gradient(45% 30% at 15% 85%, #BDEFF0 0%, transparent 70%),
    radial-gradient(40% 28% at 92% 62%, #F8DAE6 0%, transparent 70%),
    radial-gradient(30% 20% at 60% 100%, #DCD6F2 0%, transparent 70%);
}

/* ---------- Page layout (same in every app) ----------
   <a class="page-back"> sits in the top-left corner (fonts.css).
   .app-title is the app's name; .app-desc is one plain sentence under it. */
.help-corner{ position: absolute; top: 18px; right: 28px; z-index: 20; }
.app-head{ max-width: var(--page-width); margin: 0 auto var(--space-lg); padding: var(--page-top) 32px 0; }
.app-head.wide{ max-width: var(--page-wide); }
@media (max-width: 640px){ .app-head{ padding: 64px 16px 0; } .help-corner{ top: 14px; right: 14px; } }
.app-title{ font-family: var(--serif); font-weight: var(--heading-weight); font-size: var(--title-size); line-height: var(--heading-line); letter-spacing: -0.01em; margin: 0; }
.app-desc{ color: var(--ink-soft); margin: 8px 0 0; max-width: 60ch; }
/* A reading-width page: put class="read" on <body>. The whole page (title and content) becomes one
   centered column, --read-width wide, so it sits in the middle of the screen instead of hugging the left. */
body.read .app-head, body.read .wrap{ max-width: calc(var(--read-width) + 64px); }
body.read .tool-list{ max-width: none; }

/* The grade switch (K–2 / Grades 3+) and similar two-or-three-way switches:
   rounded, soft, never black. */
.soft-switch{ display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.soft-switch button{ font: inherit; font-size: var(--small-size); border: 0; background: none; color: var(--ink-soft); padding: 6px 16px; border-radius: 999px; cursor: pointer; }
.soft-switch button[aria-pressed="true"], .soft-switch button.active, .soft-switch button.on{ background: var(--stu-card); color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--stu-edge); }

/* ---------- Base reset ---------- */
*{ box-sizing: border-box; }
html{ background: var(--paper); }
body{
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--body-size);
  line-height: var(--body-line);
  -webkit-font-smoothing: antialiased;
}
a{ color: inherit; }
button, input, textarea, select{ font-family: inherit; color: inherit; }
:focus-visible{ outline: 2px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- Daybreak sky ---------- */
/* Add class="daybreak" to <body> on teacher tools and menus to get the soft
   sky at the top of the page. Projected or full-screen student views leave it off.
   (!important so an app's own "background: var(--paper)" can't wipe it out.) */
body.daybreak{
  background-color: var(--paper);
  background-image: var(--sky) !important;
  background-repeat: no-repeat !important;
  background-size: 100% 440px !important;
}

/* ---------- Shared components ---------- */
/* Buttons: each page has ONE solid navy button for its main action (.btn-main);
   everything else is a soft outline (.btn-line), so the page stays calm. */
.btn-main, .btn-line{
  font: inherit; font-weight: 600; border: 0; border-radius: 999px;
  padding: 10px 20px; cursor: pointer; white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
}
.btn-main{ background: var(--ink); color: #fff; }
.btn-main:hover{ background: #33476B; }
.btn-line{ background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px rgba(34,48,74,.35); }
.btn-line:hover{ background: rgba(34,48,74,.06); box-shadow: inset 0 0 0 1.5px rgba(34,48,74,.55); }

/* Crisp cards: white, a light edge, a soft lift. .card-stu / .card-you color a
   tool card by whose tool it is (aqua for students, sky blue for teachers). */
.crisp-card{ background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 1px 2px rgba(34,48,74,.05); }
.card-stu{ background: var(--stu-card); border: 1px solid var(--stu-edge); border-radius: 16px; box-shadow: 0 1px 2px rgba(34,48,74,.05); }
.card-you{ background: var(--you-card); border: 1px solid var(--you-edge); border-radius: 16px; box-shadow: 0 1px 2px rgba(34,48,74,.05); }

/* ".back" — the small "← Launchpad" / "← Focus Challenges" link every
   sub-app uses to return one level up. Identical everywhere it appears. */
.back{
  font-family: var(--mono);
  font-size: var(--label-size);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-decoration: none;
  display: block;
  margin-bottom: 10px;
}
.back:hover{ color: var(--ink); }

/* ".pill" / ".pill.soon" — the small tag on a tile ("New · Sep",
   "Coming soon"). Identical in Launchpad and Focus Challenges. */
.pill{
  font-family: var(--mono);
  font-size: var(--label-size);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--pill-fill);
  color: var(--pill-text);
  padding: 3px 7px;
  line-height: 1.5;
  white-space: nowrap;
}
.pill.soon{
  background: none;
  border: 1px solid var(--line-strong);
  color: var(--ink-faint);
}

/* ---------- Tool list: one column of cards (Oct 21, 2026) ----------
   The same cards as Launchpad's tool list, for the Brain Breaks and Focus Challenges menus.
   One column, up and down, so every menu reads the same way.
   <div class="tool-list">
     <a class="tool-row" href="..."><span class="tool-ico">svg</span>
       <span class="tool-txt"><b>Title</b><span>One short line.</span></span></a>
   </div>
   Student tools are aqua (the default); add class "you" on the list for teacher tools (sky blue). */
.tool-list{ display: grid; gap: var(--space-sm, 12px); max-width: var(--read-width, 680px); }
.tool-sec + .tool-sec{ margin-top: var(--space-lg, 32px); }
.tool-sec-h{ font-family: var(--serif); font-weight: var(--heading-weight); font-size: var(--section-size); line-height: var(--heading-line); margin: 0 0 12px 4px; }
.tool-row{ display: flex; align-items: center; gap: 18px; padding: 15px 18px; border-radius: 14px; text-decoration: none; color: var(--ink);
  background: var(--stu-card); border: 1px solid var(--stu-edge);
  box-shadow: 0 1px 2px rgba(34,48,74,.06), 0 3px 8px rgba(34,48,74,.05);
  transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease; }
.tool-row:hover, .tool-row:focus-visible{ transform: translateY(-1px); border-color: var(--stu-ico); box-shadow: 0 2px 4px rgba(34,48,74,.08), 0 8px 18px rgba(34,48,74,.08); }
.tool-ico{ width: 24px; flex: none; display: grid; place-items: center; color: var(--stu-ico); }
.tool-ico svg{ width: 24px; height: 24px; display: block; }
.tool-txt b{ display: block; font-weight: 600; font-size: 1.15rem; line-height: 1.3; }
.tool-txt > span{ display: block; color: var(--ink-soft); margin-top: 2px; }
.tool-list.you .tool-row{ background: var(--you-card); border-color: var(--you-edge); }
.tool-list.you .tool-row:hover{ border-color: var(--you-ico); }
.tool-list.you .tool-ico{ color: var(--you-ico); }
.tool-note{ margin: var(--space-lg, 32px) 0 0; color: var(--ink-soft); max-width: 62ch; }
.tool-note b{ color: var(--ink); }
