/* Wonderscape homework pages v1.0.0 (2026-11-02)
   Screen: the site's night-sky pages with a paper worksheet in the middle.
   Print: just the worksheet, black on white, with ruled lines to write on. */
[hidden] { display: none !important; }
.hw { max-width: 900px; margin: 0 auto; padding: 22px 16px 72px; }
.hw-eyebrow { margin: 0; letter-spacing: .14em; text-transform: uppercase; font-size: .78rem; font-weight: 800; color: #ffd27a; }
.hw h1 { margin: .15em 0 .2em; font-size: clamp(1.7rem, 5vw, 2.5rem); }
.hw-lede { color: #d2c9ec; margin: 0 0 14px; max-width: 680px; }

/* toolbar */
.hw-bar { position: sticky; top: 66px; z-index: 3; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  margin: 10px 0 18px; padding: 12px 14px; border-radius: 18px; background: rgba(20,14,58,.92); border: 1px solid rgba(255,210,122,.28);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.hw-bar-l, .hw-bar-r { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hw-bar label { display: flex; gap: 8px; align-items: center; font-weight: 700; }
.hw-bar select, .hw-sel { font: inherit; padding: 8px 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,.28); background: rgba(10,6,40,.75); color: #fff; min-height: 44px; }
.hw-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 0;
  background: linear-gradient(#ffd98a, #f2b84b); color: #2a1a06; font: 800 1rem/1 var(--body, system-ui, sans-serif); cursor: pointer; text-decoration: none; }
.hw-btn.ghost { background: transparent; color: #ffe3a3; border: 1px solid rgba(255,210,122,.6); }
.hw-btn:hover { filter: brightness(1.06); }
.hw-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.hw-btn[disabled] { opacity: .55; cursor: default; }
.hw-msg { flex-basis: 100%; margin: 0; min-height: 1.2em; font-size: .92rem; color: #d2c9ec; }
.hw-msg.ok { color: #8ff0c0; } .hw-msg.err { color: #ffb3a1; }
.hw-check { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.hw-check input { width: 22px; height: 22px; accent-color: #ffd27a; }

.hw-bar ~ .hw-bar { position: static; }
#gOut > label { margin: 10px 0 4px; }
#gOut h3 { margin-top: 18px; }

/* the paper */
.sheet { background: #fffdf7; color: #1d1838; border-radius: 18px; padding: 28px clamp(16px, 4vw, 40px) 36px; box-shadow: 0 24px 70px -24px rgba(0,0,0,.7);
  font-family: var(--body, system-ui, sans-serif); line-height: 1.5; }
.sheet h2, .sheet h3 { color: #1b1450; font-family: var(--display, Georgia, serif); }
.sheet a { color: #6b3fd1; }
.sheet-head { display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; align-items: end; border-bottom: 2px solid #1b1450; padding-bottom: 12px; margin-bottom: 8px; }
.sheet-head h2 { margin: 0; font-size: clamp(1.35rem, 3.6vw, 1.8rem); }
.sheet-head .sub { margin: 2px 0 0; color: #5b5675; font-size: .95rem; }
.sheet-who { display: grid; gap: 6px; min-width: 230px; font-weight: 700; }
.sheet-who span { display: flex; gap: 8px; align-items: flex-end; }
.sheet-who i { flex: 1; min-width: 150px; border-bottom: 1.5px solid #1b1450; font-style: normal; font-weight: 600; min-height: 1.4em; padding: 0 4px; }
.sec { margin: 22px 0 0; break-inside: avoid; page-break-inside: avoid; }
.sec > h3 { margin: 0 0 4px; font-size: 1.15rem; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.sec > h3 small { font-family: var(--body, system-ui, sans-serif); font-size: .78rem; font-weight: 700; color: #7a7396; letter-spacing: .04em; }
.sec .do { margin: 4px 0 8px; padding-left: 1.2em; color: #2c2650; }
.sec .do li { margin: 2px 0; }
.sec .note { margin: 4px 0 8px; color: #5b5675; font-size: .92rem; }
.q { margin: 10px 0 0; }
.q > label, .q > .ql { display: block; font-weight: 800; color: #1b1450; margin: 0 0 4px; }
.q textarea, .q input[type=text] { width: 100%; font: 1.05rem/2rem var(--body, system-ui, sans-serif); color: #1d1838; border: 1.5px solid #c9c2e6; border-radius: 12px;
  padding: 2px 12px; background: #fffdf7 repeating-linear-gradient(180deg, transparent 0 calc(2rem - 1px), #d9d3ee calc(2rem - 1px) 2rem) local; resize: vertical; }
.q input[type=text] { min-height: 44px; background: #fffdf7; }
.q textarea:focus-visible, .q input:focus-visible { outline: 3px solid #6b3fd1; outline-offset: 2px; border-color: #6b3fd1; }
.q .hint { display: block; font-weight: 400; font-size: .85rem; color: #6c6688; }
.pr { display: none; }
.words { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0; padding: 0; list-style: none; font-weight: 700; color: #1b1450; }
.words li { border-bottom: 1px dashed #b9b0dc; }
.drawbox { height: 220px; border: 2px dashed #b9b0dc; border-radius: 14px; display: grid; place-items: center; color: #8b84a8; font-weight: 700; }
.stars { display: flex; gap: 8px; flex-wrap: wrap; }
.stars label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1.5px solid #c9c2e6; border-radius: 999px; font-weight: 700; cursor: pointer; min-height: 44px; }
.stars input { width: 20px; height: 20px; accent-color: #6b3fd1; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 18px; }
.sheet-foot { margin-top: 26px; padding-top: 10px; border-top: 1px solid #e3def3; color: #7a7396; font-size: .82rem; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.locked { padding: 22px; border-radius: 16px; border: 1px dashed rgba(255,210,122,.5); background: rgba(255,210,122,.06); }

/* timer (essays) */
.timer { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.timer output { font: 800 1.6rem/1 var(--body, system-ui, sans-serif); color: #ffe3a3; min-width: 4.5ch; font-variant-numeric: tabular-nums; }
.timer .phase { color: #d2c9ec; font-weight: 700; }
.timer.done output { color: #8ff0c0; }

/* hub */
a.hw-card.hw-link { display: flex; flex-direction: column; color: inherit; text-decoration: none; transition: border-color .15s, transform .15s, background .15s; }
a.hw-card.hw-link p { flex: 1; }
a.hw-card.hw-link:hover, a.hw-card.hw-link:focus-visible { border-color: #ffd27a; background: #1d1550d9; transform: translateY(-2px); }
.hw-go { font-weight: 800; color: #ffd27a; }
#gOut h2 { scroll-margin-top: 80px; } #tips, #whats-here { scroll-margin-top: 80px; }
@media (prefers-reduced-motion: reduce) { a.hw-card.hw-link { transition: none; } a.hw-card.hw-link:hover { transform: none; } }
.hw-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 18px 0; }
.hw-card { border-radius: 20px; padding: 16px 18px; background: #140e3ab8; border: 1px solid rgba(255,210,122,.22); }
.hw-card h3 { margin: 0 0 4px; }
.hw-card p { margin: .2em 0 .6em; color: #d2c9ec; }
.hw-weeks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 10px 0 24px; padding: 0; list-style: none; }
.hw-weeks a { display: block; padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(255,210,122,.3); color: #f6efdd; text-decoration: none; min-height: 44px; font-size: .92rem; }
.hw-weeks a b { color: #ffd27a; display: block; }
.hw-weeks a:hover, .hw-weeks a:focus-visible { border-color: #ffd27a; background: rgba(255,210,122,.08); }
.hw-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.hw-tabs button { font: 700 .95rem var(--body, system-ui, sans-serif); min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255,210,122,.4); background: transparent; color: #f6efdd; cursor: pointer; }
.hw-tabs button[aria-pressed=true] { background: #ffd27a; color: #2a1a06; border-color: #ffd27a; }

html.hc .sheet { border: 2px solid #000; }
html.hc .hw-bar, html.hc .hw-card { background: #000; border-color: #fff; }

@media (max-width: 640px) {
  .hw-bar { top: 58px; border-radius: 14px; }
  .sheet { border-radius: 12px; }
  .sheet-head { grid-template-columns: 1fr; }
  .sheet-who { min-width: 0; }
}

@media print {
  @page { size: letter; margin: 12mm 13mm; }
  html, body { background: #fff !important; color: #000 !important; }
  body:before, header.top, .skip, .hw-bar, .hw-intro, .no-print, footer, .ws-prog-toast, .hw > .hw-eyebrow, .hw > h1, .hw > .hw-lede, .hw-tabs { display: none !important; }
  .hw { max-width: none; padding: 0; margin: 0; }
  .sheet { box-shadow: none; border-radius: 0; padding: 0; background: #fff; color: #000; }
  .sheet h2, .sheet h3, .q > label, .q > .ql, .words { color: #000 !important; }
  .q textarea, .q input[type=text] { display: none !important; }
  .q .pr { display: block; white-space: pre-wrap; overflow-wrap: anywhere; font: 12.5pt/9mm var(--body, Arial, sans-serif); color: #000;
    min-height: calc(var(--n, 3) * 9mm); padding: 0 2mm; margin: 0;
    background-image: linear-gradient(to bottom, transparent calc(9mm - .7pt), #8f8f9f calc(9mm - .7pt), #8f8f9f 9mm);
    background-size: 100% 9mm; background-repeat: repeat; background-position: 0 0;
    -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .q .pr.one { min-height: 9mm; }
  .stars label { border-color: #999; }
  .drawbox { border-color: #999; color: #999; }
  .sec { margin-top: 14px; break-inside: auto; page-break-inside: auto; }
  .sec > h3 { break-after: avoid; page-break-after: avoid; }
  .q, .do, .words { break-inside: avoid; page-break-inside: avoid; }
  .sheet-foot { color: #555; }
  a[href]::after { content: none !important; }
}
