/* Fonts are served from this site (no outside font service). See fonts/LICENSE.txt. */
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 300 700; font-display: swap; src: url('../fonts/fredoka.woff2') format('woff2'); }
@font-face { font-family: 'Lexend'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('../fonts/lexend.woff2') format('woff2'); }

/* bee101: a spelling notebook you can play. Ruled paper, marker ink, sticker buttons. Same family as math101. */
:root {
  --ink: #18224f;
  --paper: #f3f7ff;
  --grid: #dbe5fa;
  --white: #fff;
  --blue: #2f6bff;
  --yellow: #ffcf33;
  --green: #12b76a;
  --red: #f04438;
  --purple: #7a5af8;
  --muted: #5b668f;
  --display: 'Fredoka', 'Trebuchet MS', system-ui, sans-serif;
  --body: 'Lexend', 'Verdana', system-ui, sans-serif;
  --press: 0 5px 0 var(--ink);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font: 400 18px/1.5 var(--body);
  background-color: var(--paper);
  background-image: linear-gradient(var(--grid) 2px, transparent 2px);
  background-size: 100% 32px;
  min-height: 100vh;
}
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0; }
h1 { font-size: 2.2rem; } h2 { font-size: 1.7rem; } h3 { font-size: 1.25rem; }
p { margin: 0; }
a { color: var(--blue); }
b { font-weight: 600; }
.wrap { max-width: 860px; margin: 0 auto; padding: 16px 16px 64px; }
.muted { color: var(--muted); font-size: .95rem; }
[hidden] { display: none !important; }
:focus-visible { outline: 4px solid var(--yellow); outline-offset: 3px; }

/* ---------- buttons ---------- */
.btn, .choice, .key, .pm {
  font: 600 1.15rem/1.2 var(--display); color: var(--ink); background: var(--white);
  border: 3px solid var(--ink); border-radius: 16px; box-shadow: var(--press);
  padding: 14px 22px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .06s, box-shadow .06s; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.btn:active, .choice:active, .key:active, .pm:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.btn.go { background: var(--yellow); }
.btn.big { font-size: 1.5rem; padding: 18px 44px; }
.btn.small { font-size: 1rem; padding: 8px 18px; box-shadow: 0 3px 0 var(--ink); }
.btn.ghost { background: transparent; box-shadow: none; border-color: transparent; text-decoration: underline; }
.btn[disabled] { opacity: .5; cursor: default; }
.icon-btn { font-size: 1.5rem; width: 52px; height: 52px; border-radius: 50%; border: 3px solid var(--ink); background: var(--white); box-shadow: 0 3px 0 var(--ink);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; flex: none; }
.speak { font-size: 1.1rem; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--ink); background: var(--white); cursor: pointer; margin-left: 10px; vertical-align: middle; flex: none; }
.row { display: flex; gap: 14px; justify-content: center; align-items: center; margin-top: 18px; }
.row.wrap { flex-wrap: wrap; padding: 0; max-width: none; }

/* ---------- home ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0 18px; }
.logo { font: 700 1.9rem/1 var(--display); color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.logo span { background: var(--yellow); border: 3px solid var(--ink); border-radius: 10px; padding: 0 8px; margin-left: 2px; display: inline-block; transform: rotate(-3deg); }
.chip { display: inline-flex; align-items: center; gap: 8px; background: var(--white); border: 3px solid var(--ink); border-radius: 999px; padding: 4px 14px 4px 6px; font-weight: 600; }
.chip .av { font-size: 1.6rem; }
.panel { background: var(--white); border: 3px solid var(--ink); border-radius: 22px; box-shadow: 0 7px 0 var(--ink); padding: 22px; margin-bottom: 30px; }
.next-up { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; background: var(--blue); color: #fff; }
.next-up .big-emoji { font-size: 4rem; margin: 0; }
.next-up p { opacity: .92; }
.section-title { margin: 0 0 14px 4px; }
.lessons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 34px; padding: 0; list-style: none; }
.lesson { background: var(--white); border: 3px solid var(--ink); border-radius: 18px; box-shadow: var(--press); padding: 14px; text-decoration: none; color: var(--ink);
  display: flex; flex-direction: column; gap: 4px; min-height: 150px; transition: transform .06s, box-shadow .06s; }
.lesson:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.lesson .em { font-size: 2.3rem; line-height: 1; }
.lesson .nm { font: 600 1.1rem/1.2 var(--display); }
.lesson .gm { color: var(--muted); font-size: .85rem; }
.lesson .st { margin-top: auto; font-size: 1.4rem; letter-spacing: 2px; color: #c9d2ea; }
.lesson .st b { color: #f5a400; font-weight: 400; }
.lesson.boss { background: var(--ink); color: #fff; }
.lesson.boss .gm { color: #b8c2ea; }
.lesson.boss .st { color: #4a568a; }
.board { list-style: none; margin: 0; padding: 0; }
.board li { display: grid; grid-template-columns: 44px 44px 1fr auto auto; align-items: center; gap: 8px; padding: 8px 6px; border-bottom: 2px dashed var(--grid); font-weight: 500; }
.board li:last-child { border-bottom: 0; }
.board .rk { font: 700 1.3rem var(--display); text-align: center; }
.board .av { font-size: 1.7rem; }
.board .me { background: #fff6cf; border-radius: 12px; }
.board .n { font: 600 1.1rem var(--display); min-width: 64px; text-align: right; }
.soon { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; margin: 0; }
.soon li { background: rgba(255, 255, 255, .7); border: 2px dashed #9aa6cf; color: var(--muted); border-radius: 12px; padding: 6px 12px; font-size: .9rem; }
.two { display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; align-items: start; }
details.chapter { margin-bottom: 14px; }
details.chapter > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--white); border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 4px 0 var(--ink); padding: 12px 16px; font: 600 1.2rem/1.2 var(--display); }
details.chapter > summary::-webkit-details-marker { display: none; }
details.chapter > summary::after { content: '▸'; margin-left: 4px; font-size: 1.2rem; }
details.chapter[open] > summary::after { content: '▾'; }
details.chapter[open] > summary { background: #fff6cf; margin-bottom: 16px; }
.ch-em { font-size: 1.6rem; } .ch-nm { flex: 1; min-width: 180px; } .ch-st { font: 600 1rem var(--display); color: var(--muted); white-space: nowrap; }
details.chapter .lessons { margin-bottom: 22px; }
details.chapter .challenge-tag { margin-left: 0; }
.sheet-pick { font: 500 1rem var(--body); padding: 12px; border: 3px solid var(--ink); border-radius: 14px; background: #fff; color: var(--ink); max-width: 100%; }
.foot { text-align: center; margin-top: 30px; }
.voice-pick { margin-top: 12px; }
.voice-pick select { font: 500 .95rem var(--body); padding: 8px; border: 2px solid var(--ink); border-radius: 10px; background: #fff; color: var(--ink); max-width: 260px; }

/* ---------- sign in ---------- */
.field { display: block; margin: 16px 0 6px; font: 600 1.1rem var(--display); }
input[type=text], input[type=password], input[type=email] { font: 500 1.3rem var(--body); padding: 12px 14px; border: 3px solid var(--ink); border-radius: 14px; width: 100%; max-width: 340px; color: var(--ink); background: #fff; }
.picks { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; max-width: 420px; }
.picks button { font-size: 1.9rem; aspect-ratio: 1; border: 3px solid var(--ink); border-radius: 14px; background: var(--white); cursor: pointer; position: relative; padding: 0; }
.picks button.on { background: var(--yellow); }
.picks button .ord { position: absolute; top: -8px; right: -8px; background: var(--ink); color: #fff; font: 700 .8rem var(--display); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.err { color: #b42318; font-weight: 600; min-height: 1.5em; margin-top: 10px; }
.tabs { display: flex; gap: 10px; margin-bottom: 6px; }
.tabs button { font: 600 1.05rem var(--display); border: 3px solid var(--ink); background: var(--white); color: var(--ink); border-radius: 999px; padding: 8px 18px; cursor: pointer; }
.tabs button[aria-selected=true] { background: var(--ink); color: #fff; }


/* ---------- bee101 ---------- */
.tiny-foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 0 16px 26px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.tiny-foot a { color: var(--muted); }
.modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 30px; }
.lesson.m1 { background: #fff6cf; } .lesson.m2 { background: #e6f0ff; } .lesson.m3 { background: var(--ink); color: #fff; } .lesson.m3 .gm { color: #b8c2ea; } .lesson.m3 .st { color: #4a568a; } .lesson.m4 { background: #eee9ff; }
.sets { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 26px; }
.set { background: var(--white); border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 4px 0 var(--ink); padding: 10px 12px; }
.set h3 { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.15rem; }
.set h3 small { font: 500 .75rem var(--body); color: var(--muted); }
.set .bar { height: 8px; border-radius: 99px; background: var(--grid); margin: 8px 0; overflow: hidden; }
.set .bar i { display: block; height: 100%; background: var(--green); }
.set .acts { display: flex; gap: 6px; }
.set .acts a { flex: 1; text-align: center; font: 600 .9rem var(--display); color: var(--ink); text-decoration: none; border: 2px solid var(--ink); border-radius: 10px; padding: 5px 0; background: #fff; }
.set .acts a.done { background: #d9f7e8; } .set .acts a.go { background: var(--yellow); }
.part-title { margin: 6px 4px 12px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.bar-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.bar-top h2 { flex: 1; font-size: 1.3rem; text-align: center; }
.prog { height: 12px; border: 2px solid var(--ink); border-radius: 99px; background: #fff; overflow: hidden; margin-bottom: 16px; }
.prog i { display: block; height: 100%; background: var(--yellow); transition: width .25s; }
.stage { text-align: center; }
.bigword { font: 600 clamp(2.2rem, 9vw, 4rem)/1.1 var(--display); letter-spacing: .02em; margin: 6px 0 4px; word-break: break-word; }
.bigword .trap { color: #e8590c; text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 6px; }
.bigword .pa { color: #c2410c; } .bigword .pb { color: var(--blue); }
.facts { display: grid; gap: 8px; text-align: left; max-width: 560px; margin: 14px auto 0; }
.facts div { background: var(--paper); border: 2px solid var(--grid); border-radius: 12px; padding: 8px 12px; }
.facts b { font-family: var(--display); margin-right: 6px; }
.facts .hook { background: #fff6cf; border-color: var(--yellow); }
.spell-in { font: 600 clamp(1.5rem, 6vw, 2.3rem) var(--display) !important; text-align: center; letter-spacing: .12em; max-width: 560px !important; margin: 14px auto 0; display: block; }
.asks { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 14px; }
.said { min-height: 2.2em; margin-top: 12px; color: var(--muted); font-weight: 500; }
.verdict { font: 600 1.5rem var(--display); margin-top: 12px; }
.verdict.ok { color: #0b8a4f; } .verdict.no { color: #b42318; }
.diff { font: 600 1.8rem var(--display); letter-spacing: .1em; margin: 6px 0; word-break: break-word; }
.diff .g { color: #0b8a4f; } .diff .b { color: #b42318; text-decoration: line-through; }
.steps5 { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.steps5 span { font: 600 .9rem var(--display); border: 2px solid var(--ink); border-radius: 99px; padding: 3px 12px; background: #fff; opacity: .45; }
.steps5 span.on { background: var(--yellow); opacity: 1; }
.breath { width: 150px; height: 150px; border-radius: 50%; border: 4px solid var(--ink); background: #e6f0ff; margin: 16px auto; display: grid; place-items: center; font: 600 1.3rem var(--display); transition: transform 4s ease-in-out; }
.breath.in { transform: scale(1.25); } .breath.out { transform: scale(.85); transition-duration: 6s; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 2px dashed var(--grid); flex-wrap: wrap; }
.list li:last-child { border-bottom: 0; }
.list .w { font: 600 1.25rem var(--display); min-width: 150px; }
.list .w.miss { color: #b42318; } .list .hk { color: var(--muted); font-size: .9rem; flex: 1; min-width: 200px; }
.dots { letter-spacing: 3px; color: #c9d2ea; font-size: 1.1rem; } .dots b { color: var(--green); font-weight: 400; }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card { background: #fff; border: 3px solid var(--ink); border-radius: 18px; box-shadow: var(--press); padding: 16px; }
.card h3 { margin-bottom: 8px; } .card ol, .card ul { margin: 0; padding-left: 22px; } .card li { margin-bottom: 4px; }
.card.y { background: #fff6cf; } .card.b { background: #e6f0ff; } .card.g { background: #e3f8ec; } .card.r { background: #ffe9e6; }
.rule { background: #fff6cf; border: 3px solid var(--ink); border-radius: 16px; padding: 12px 16px; margin-bottom: 16px; font-weight: 500; }
.pill { display: inline-block; font: 600 .8rem var(--display); border: 2px solid var(--ink); border-radius: 99px; padding: 1px 10px; background: #fff; }
.pill.red { background: #ffe1dd; } .pill.t3 { background: var(--ink); color: #fff; }
table.coach { width: 100%; border-collapse: collapse; } table.coach th, table.coach td { text-align: left; padding: 8px 6px; border-bottom: 2px dashed var(--grid); vertical-align: top; font-size: .95rem; }
.banner { background: #e6f0ff; border: 2px dashed var(--blue); border-radius: 14px; padding: 10px 14px; margin-bottom: 18px; font-size: .95rem; }
@media (max-width: 720px) {
  .modes { grid-template-columns: repeat(2, 1fr); } .cards { grid-template-columns: 1fr; } .two { grid-template-columns: 1fr; }
  .next-up { grid-template-columns: 1fr; text-align: center; } .lessons { grid-template-columns: repeat(2, 1fr); }
  body { font-size: 16px; } .panel { padding: 16px; }
}
.set .acts a { white-space: nowrap; font-size: .82rem; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 30px); background: var(--ink); color: #fff; font: 600 1rem var(--display); padding: 12px 20px; border-radius: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.25); opacity: 0; pointer-events: none; transition: all .2s; z-index: 50; max-width: 90vw; text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.set.locked, .lesson.locked { background: #eef1f8; color: var(--muted); border-style: dashed; box-shadow: none; cursor: pointer; text-align: left; font: inherit; width: 100%; }
.set.locked .acts span { font-size: .82rem; }
/* ---------- coach section and reports ---------- */
body.coachpage .wrap { max-width: 1080px; }
.prose h2 { margin-top: 18px; font-size: 1.2rem; } .prose p, .prose ul { margin-top: 8px; }
select { font: 500 1rem var(--body); padding: 8px 10px; border: 2px solid var(--ink); border-radius: 10px; background: #fff; color: var(--ink); max-width: 100%; }
table.coach select { padding: 4px 6px; font-size: .9rem; border-width: 1.5px; }
table.coach td.acts { white-space: nowrap; } table.coach td.acts .btn { margin-right: 4px; }
table.coach td.typed { font-family: ui-monospace, Menlo, monospace; color: #b42318; }
.btn.danger { background: #ffe1dd; } .pill.ok { background: #d9f7e8; } .small { font-size: .85rem; }
.tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 14px 0; }
.tile { border: 2px solid var(--ink); border-radius: 12px; padding: 10px; text-align: center; background: #fff; }
.tile b { display: block; font: 600 1.35rem var(--display); } .tile span { font-size: .8rem; color: var(--muted); }
.report h2 { font-size: 1.15rem; margin: 22px 0 8px; padding-top: 10px; border-top: 2px dashed var(--grid); }
.chart { width: 100%; height: auto; display: block; } .chart .ax { font: 500 11px var(--body); fill: #5b6584; } .chart .lb { font: 500 13px var(--body); fill: var(--ink); }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; }
.dx { padding-left: 22px; } .dx li { margin-bottom: 6px; }
.cells { display: grid; grid-template-columns: repeat(17, 1fr); gap: 4px; }
.cell { border: 1.5px solid var(--ink); border-radius: 6px; font: 600 .72rem var(--display); text-align: center; padding: 6px 0; position: relative; }
.cell i { position: absolute; top: -5px; right: -2px; color: #d6453b; font-style: normal; font-size: .8rem; }
.advice { display: grid; gap: 10px; margin-top: 10px; } .adv { border: 2px solid var(--grid); border-radius: 12px; padding: 10px 12px; break-inside: avoid; }
.adv h4 { font: 600 1rem var(--display); margin-bottom: 4px; } .adv p { font-size: .92rem; margin-top: 3px; }
.classform { margin-top: 6px; }
@media (max-width: 720px) { .tiles { grid-template-columns: repeat(3, 1fr); } .cells { grid-template-columns: repeat(9, 1fr); } }
@media print {
  .noprint, .tiny-foot, .toast { display: none !important; }
  body { background: #fff !important; font-size: 11pt; } .wrap { max-width: none !important; padding: 0 !important; }
  .panel { border: 0 !important; box-shadow: none !important; padding: 0 !important; margin: 0 !important; }
  .tile, .adv, table.coach tr, .chart, .cells, .tiles { break-inside: avoid; } h2 { break-after: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
/* Printed pages: real margins, a header and a footer on every page (same layout as math101).
   The right header and the print date are filled in by js/coach.js through <style id="pagetext">. */
@page {
  size: letter;
  margin: 0.95in 0.75in 0.9in 0.75in;
  @top-left { content: "bee101.us"; font: 600 10pt 'Lexend', Verdana, sans-serif; color: #18224f; }
  @top-right { content: "bee101"; font: 500 10pt 'Lexend', Verdana, sans-serif; color: #444; }
  @bottom-left { content: "bee101 Academic Research Team"; font: 500 8.5pt 'Lexend', Verdana, sans-serif; color: #444; }
  @bottom-center { content: ""; font: 500 8.5pt 'Lexend', Verdana, sans-serif; color: #444; }
  @bottom-right { content: "Page " counter(page) " of " counter(pages); font: 500 8.5pt 'Lexend', Verdana, sans-serif; color: #444; }
}
.howscore { margin-top: 14px; padding-top: 12px; border-top: 2px dashed var(--grid); font-size: .88rem; color: var(--muted); } .howscore p + p { margin-top: 6px; } .howscore b { color: var(--ink); }
