/* Smart Chalk study tools (flashcards, practice tests, saved list). Shared by the website, app and extension.
   Everything sits on its own chalkboard so it looks the same on light or dark pages. */
:root { --st-chalk: #f7f5ee; --st-soft: #dfe9e3; --st-yellow: #f2c230; --st-line: rgba(247,245,238,.5); --st-good: #8fe3a5; --st-bad: #ffb4a8; }
.st-wrap { background: linear-gradient(#2c4f3c, #24463a); color: var(--st-chalk); border: 10px solid #7a4d2a; border-radius: 14px; padding: 18px; box-shadow: 0 6px 18px rgba(0,0,0,.3);
  font-family: var(--hand-font, 'Patrick Hand', 'Chalkboard SE', cursive); }
.st-wrap h3 { margin: 0 0 6px; font: 700 1.5rem/1.15 var(--chalk-font, 'Cabin Sketch', cursive); color: var(--st-yellow); }
.st-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 12px; font-size: 1.15rem; }
.st-top b { font: 700 1.3rem/1.15 var(--chalk-font, 'Cabin Sketch', cursive); color: var(--st-yellow); min-width: 0; }
.st-top span { color: var(--st-soft); white-space: nowrap; }
.st-card { width: 100%; min-height: 190px; display: grid; align-content: center; justify-items: center; gap: 8px; text-align: center; padding: 22px 16px; border-radius: 14px;
  border: 2px dashed var(--st-line); background: rgba(0,0,0,.18); color: var(--st-chalk); cursor: pointer; font: inherit; transition: transform .15s; }
.st-card:active { transform: scale(.98); }
.st-card.flip { border-style: solid; border-color: var(--st-yellow); background: rgba(242,194,48,.08); }
.st-side { font-size: .95rem; letter-spacing: .08em; text-transform: uppercase; color: var(--st-soft); }
.st-txt { font-size: 1.45rem; line-height: 1.3; overflow-wrap: anywhere; }
.st-tap { font-size: 1rem; color: var(--st-soft); opacity: .8; }
.st-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.st-b { flex: 1 1 140px; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 2px solid var(--st-line); background: transparent; color: var(--st-chalk); font: 1.15rem/1.1 var(--hand-font, cursive); cursor: pointer; }
.st-b:disabled { opacity: .4; }
.st-b.st-main { background: var(--st-yellow); border-color: var(--st-yellow); color: #1d2520; font: 700 1.25rem/1 var(--chalk-font, cursive); }
.st-done { text-align: center; margin-top: 8px; }
.st-big { font: 700 1.6rem/1.2 var(--chalk-font, cursive); margin: 8px 0; }
.st-test { margin: 0; padding-left: 26px; display: grid; gap: 18px; font-size: 1.2rem; }
.st-q { margin: 0 0 8px; line-height: 1.35; }
.st-ch { display: grid; gap: 8px; }
.st-c { display: flex; gap: 10px; align-items: flex-start; text-align: left; width: 100%; padding: 10px 12px; border-radius: 10px; border: 2px solid var(--st-line); background: rgba(0,0,0,.15); color: var(--st-chalk); font: 1.15rem/1.3 var(--hand-font, cursive); cursor: pointer; }
.st-c span { flex: none; width: 1.6em; height: 1.6em; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--st-line); font-size: .95rem; }
.st-c.right { border-color: var(--st-good); background: rgba(143,227,165,.15); }
.st-c.wrong { border-color: var(--st-bad); background: rgba(255,180,168,.15); }
.st-c.dim { opacity: .55; }
.st-c:disabled { cursor: default; color: var(--st-chalk); }
.st-why { margin: 8px 0 0; color: var(--st-soft); line-height: 1.35; }
.st-why b { color: var(--st-yellow); }
.st-empty { margin: 0; color: var(--st-soft); font-size: 1.15rem; }
.st-list { display: grid; gap: 8px; }
.st-row { display: flex; gap: 6px; align-items: stretch; }
.st-open { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; text-align: left; padding: 10px 12px; border-radius: 12px;
  border: 2px dashed var(--st-line); background: rgba(0,0,0,.15); color: var(--st-chalk); font: 1.15rem/1.25 var(--hand-font, cursive); cursor: pointer; }
.st-kind { justify-self: start; grid-column: 1 / -1; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: #1d2520; background: var(--st-yellow); border-radius: 999px; padding: 1px 8px; }
.st-ttl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-when { color: var(--st-soft); font-size: .95rem; }
.st-del { flex: none; width: 44px; border-radius: 12px; border: 2px solid var(--st-line); background: transparent; color: var(--st-soft); font-size: 1.4rem; cursor: pointer; }
.st-seg { display: flex; gap: 3px; padding: 3px; border-radius: 10px; border: 1.5px solid var(--line, #d9e0da); background: var(--card, #fff); }
.st-seg button { flex: 1 1 0; min-width: 0; min-height: 40px; border-radius: 7px; border: 0; background: transparent; color: var(--ink-2, #4a5750); font: 700 .92rem/1.1 var(--ui, system-ui, sans-serif); cursor: pointer; padding: 6px 4px; }
.st-seg button.on { background: var(--ink, #18231e); color: var(--bg, var(--paper, #f4f6f2)); }
.st-seg button[hidden] { display: none; }
.st-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.st-kinds label { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 8px; border: 1.5px solid var(--line, #d9e0da); background: var(--card, #fff); color: var(--ink, #18231e); cursor: pointer; font: 700 .98rem/1.1 var(--ui, system-ui, sans-serif); }
.st-kinds label:has(input:checked) { border-color: var(--ink, #18231e); }
.st-kinds input { accent-color: var(--board, #24463a); width: 18px; height: 18px; }
.st-saved-note { margin: 8px 0 0; font: .9rem/1.4 var(--ui, system-ui, sans-serif); color: var(--ink-2, #4a5750); }
/* Follow-ups under an answer */
.fu-thread { display: grid; gap: 14px; }
.fu-turn { display: grid; gap: 8px; }
.fu-you { margin: 0; justify-self: end; max-width: 92%; padding: 8px 12px; border-radius: 14px 14px 4px 14px; background: var(--st-yellow); color: #1d2520; font: 1.1rem/1.3 var(--hand-font, cursive); }
.fu-wait { padding: 16px; text-align: center; border-radius: 12px; border: 2px dashed var(--st-line); background: rgba(0,0,0,.18); color: var(--st-chalk); font: 700 1.3rem var(--chalk-font, cursive); }
.fu { margin-top: 14px; display: grid; gap: 8px; padding: 14px; border-radius: 14px; border: 2px dashed var(--st-line); background: #24463a; color: var(--st-chalk); }
.fu-h { margin: 0; font: 700 1.2rem/1.1 var(--chalk-font, 'Cabin Sketch', cursive); }
.fu-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fu-chip { min-height: 38px; padding: 6px 12px; border-radius: 999px; border: 2px solid var(--st-line); background: transparent; color: var(--st-chalk); font: 1.05rem/1 var(--hand-font, cursive); cursor: pointer; }
.fu-f { display: flex; gap: 8px; }
.fu-f input { flex: 1; min-width: 0; min-height: 46px; padding: 8px 12px; border-radius: 12px; border: 2px solid var(--st-line); background: rgba(0,0,0,.22); color: var(--st-chalk); font: 1.15rem var(--hand-font, cursive); }
.fu-f input::placeholder { color: rgba(247,245,238,.5); }
.fu-go { flex: none; min-height: 46px; padding: 0 18px; border-radius: 12px; border: 0; background: var(--st-yellow); color: #1d2520; font: 700 1.15rem var(--chalk-font, cursive); cursor: pointer; }
.fu button:disabled, .fu input:disabled { opacity: .55; }
.fu-err { margin: 0; color: var(--st-bad); font-weight: 600; }
/* Calendar */
.pl { display: grid; gap: 12px; }
.pl-top { display: flex; align-items: center; justify-content: space-between; }
.pl-top b { font: 700 1.45rem/1 var(--chalk-font, 'Cabin Sketch', cursive); color: var(--st-yellow); }
.pl-nav { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--st-line); background: transparent; color: var(--st-chalk); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.pl-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.pl-wd { text-align: center; color: var(--st-soft); font-size: .95rem; }
.pl-day { aspect-ratio: 1; min-height: 40px; display: grid; grid-template-rows: 1fr auto; justify-items: center; padding: 4px 0; border-radius: 10px; border: 1.5px solid transparent; background: rgba(0,0,0,.14); color: var(--st-chalk); font: 1.1rem/1 var(--hand-font, cursive); cursor: pointer; }
.pl-day.out { opacity: .35; }
.pl-day.today { border-color: var(--st-yellow); }
.pl-day.pick { background: var(--st-yellow); color: #1d2520; }
.pl-day i { display: flex; gap: 2px; height: 7px; }
.pl-day em { width: 6px; height: 6px; border-radius: 50%; background: var(--st-chalk); }
.pl-day em.done { opacity: .35; }
.pl-day em.k-test, .pl-day em.k-quiz { background: #ff9b8f; }
.pl-day em.k-project { background: #9fd0ee; }
.pl-day.pick em { background: #1d2520; }
.pl-add { width: 100%; }
.pl-listh { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pl-listh h3 { margin: 0; }
.pl-list { display: grid; gap: 8px; }
.pl-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 12px; border: 2px dashed var(--st-line); background: rgba(0,0,0,.15); }
.pl-row.done { opacity: .6; }
.pl-row.done b { text-decoration: line-through; }
.pl-check { flex: none; width: 30px; height: 30px; margin-top: 2px; border-radius: 8px; border: 2px solid var(--st-chalk); background: transparent; color: var(--st-yellow); font: 700 1.1rem/1 sans-serif; cursor: pointer; }
.pl-main { flex: 1; min-width: 0; display: grid; gap: 2px; font-size: 1.15rem; }
.pl-main b { font-weight: 400; overflow-wrap: anywhere; }
.pl-main small { color: var(--st-soft); font-size: 1rem; }
.pl-kind { justify-self: start; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: #1d2520; background: var(--st-chalk); border-radius: 999px; padding: 1px 8px; }
.pl-kind.k-test, .pl-kind.k-quiz { background: #ff9b8f; }
.pl-kind.k-project { background: #9fd0ee; }
.pl-kind.k-homework { background: var(--st-yellow); }
.pl-due { color: var(--st-soft); }
.pl-due.late { color: var(--st-bad); }
.pl-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.pl-act { min-height: 34px; padding: 4px 10px; border-radius: 999px; border: 1.5px solid var(--st-line); background: transparent; color: var(--st-chalk); font: 1rem/1 var(--hand-font, cursive); cursor: pointer; }
.pl-act.pl-prac { background: var(--st-yellow); border-color: var(--st-yellow); color: #1d2520; }
.pl-form { display: grid; gap: 10px; padding: 14px; border-radius: 12px; border: 2px solid var(--st-yellow); background: rgba(0,0,0,.18); }
.pl-form label { display: grid; gap: 4px; font-size: 1.1rem; color: var(--st-soft); }
.pl-form label span { font-size: .95rem; opacity: .8; }
.pl-form input:not([type=checkbox]), .pl-form select { width: 100%; min-height: 44px; padding: 8px 10px; border-radius: 10px; border: 2px solid var(--st-line); background: rgba(0,0,0,.22); color: var(--st-chalk); font: 1.15rem var(--hand-font, cursive); color-scheme: dark; }
.pl-form select option { color: #1d2520; background: #fff; }
.pl-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pl-form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.pl-form legend { padding: 0; margin-bottom: 4px; font-size: 1.1rem; color: var(--st-soft); }
.pl-form .pl-cb { display: flex; gap: 8px; align-items: center; color: var(--st-chalk); }
.pl-cb input { width: 20px; height: 20px; accent-color: var(--st-yellow); }
.pl-note { margin: 0; color: var(--st-soft); }
.pl-err { margin: 0; color: var(--st-bad); font-weight: 600; }
.pl-btns { display: flex; gap: 8px; }
/* Files */
.fl-in { width: 100%; min-height: 46px; padding: 8px 12px; border-radius: 12px; border: 2px solid var(--st-line); background: rgba(0,0,0,.22); color: var(--st-chalk); font: 1.15rem var(--hand-font, cursive); }
.fl-in::placeholder { color: rgba(247,245,238,.45); }
.fl-item { display: grid; gap: 8px; }
.fl-open { display: grid; gap: 10px; padding: 12px; border-radius: 12px; border: 2px solid var(--st-yellow); background: rgba(0,0,0,.18); }
.fl-open img { width: 100%; max-height: 320px; object-fit: contain; border-radius: 8px; background: #000; }
.fl-text { margin: 0; white-space: pre-wrap; max-height: 220px; overflow: auto; font-size: 1.1rem; line-height: 1.35; }
.fl-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.fl-acts .st-b { flex: 1 1 120px; margin: 0; }
.fl-n { display: grid; gap: 4px; font-size: 1rem; color: var(--st-soft); }
.fl-n select { min-height: 44px; padding: 6px 10px; border-radius: 10px; border: 2px solid var(--st-line); background: rgba(0,0,0,.22); color: var(--st-chalk); font: 1.1rem var(--hand-font, cursive); color-scheme: dark; }
.fl-note { margin: 0; color: var(--st-soft); font-size: 1rem; }
/* Scan a whole page */
.sc-first { display: flex; gap: 8px; align-items: center; margin: 0 0 10px; font-size: 1.1rem; color: var(--st-soft); }
.sc-first input { width: 20px; height: 20px; accent-color: var(--st-yellow); }
.sc-list { display: grid; gap: 8px; }
.sc-item { border-radius: 12px; border: 2px dashed var(--st-line); background: rgba(0,0,0,.15); }
.sc-item.done { border-style: solid; border-color: var(--st-good); }
.sc-head { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; padding: 10px 12px; border: 0; background: none; color: var(--st-chalk); font: 1.15rem/1.3 var(--hand-font, cursive); cursor: pointer; }
.sc-n { flex: none; min-width: 1.8em; height: 1.8em; display: grid; place-items: center; border-radius: 50%; background: var(--st-yellow); color: #1d2520; font-weight: 700; font-size: .95rem; }
.sc-item.done .sc-n { background: var(--st-good); }
.sc-q { min-width: 0; overflow-wrap: anywhere; }
.sc-body { padding: 0 12px 12px; display: grid; gap: 8px; }
.sc-mine { margin: 0; color: var(--st-soft); }
.sc-try { display: grid; gap: 8px; }

/* Inputs: on the page they match the page; on a chalkboard they're chalk */
.fl-in { width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 8px; border: 1.5px solid var(--line, #d9e0da); background: var(--card, #fff); color: var(--ink, #18231e); font: 16px/1.4 var(--ui, system-ui, sans-serif); }
.fl-in::placeholder { color: var(--ink-2, #4a5750); opacity: .75; }
.st-wrap .fl-in { border: 2px solid var(--st-line); background: rgba(0,0,0,.22); color: var(--st-chalk); font: 1.1rem var(--hand-font, cursive); }
.st-wrap .fl-in::placeholder { color: rgba(247,245,238,.5); opacity: 1; }
/* Files: topic folders */
.fl-folder { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 12px; border-radius: 12px; border: 2px solid var(--st-line); background: rgba(0,0,0,.15); color: var(--st-chalk); font: 1.2rem/1.2 var(--hand-font, cursive); cursor: pointer; }
.fl-folder.on { border-color: var(--st-yellow); }
.fl-fi { width: 22px; height: 16px; border-radius: 2px 4px 3px 3px; background: var(--st-yellow); position: relative; }
.fl-fi::before { content: ""; position: absolute; left: 0; top: -4px; width: 10px; height: 5px; border-radius: 2px 2px 0 0; background: var(--st-yellow); }
.fl-in-folder { display: grid; gap: 8px; padding-left: 14px; border-left: 2px dashed var(--st-line); margin: 2px 0 6px 10px; }
.sv-row { display: grid; gap: 6px; margin-top: 12px; }
.sv-go { display: flex; gap: 8px; } .sv-go .fl-in { flex: 1; min-width: 0; } .sv-go .st-b { flex: none; margin: 0; }
/* Scan mode and Check my work */
.sm-pages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sm-page { position: relative; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; border: 1.5px solid var(--line, #d9e0da); background: #000; }
.sm-page img { width: 100%; height: 100%; object-fit: cover; }
.sm-page .x { width: 30px; height: 30px; font-size: 1.1rem; top: 4px; right: 4px; }
.sm-page span { position: absolute; left: 6px; bottom: 6px; background: rgba(0,0,0,.65); color: #fff; font: 700 .8rem/1 var(--ui, sans-serif); padding: 3px 7px; border-radius: 99px; }
.sm-doc { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.sm-docx { margin-left: 6px; border: 0; background: none; color: var(--red, #c8412f); font: 700 .9rem var(--ui, sans-serif); cursor: pointer; text-decoration: underline; }
.sm-file { cursor: pointer; }
.sm-hint { color: var(--ink-2, #4a5750); font: .85rem/1.4 var(--ui, sans-serif); }
.sm-cost { margin: 0 0 10px; font-size: 1.2rem; color: var(--st-yellow); }
.sm-qs { display: grid; gap: 8px; }
.sm-q { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; border: 2px dashed var(--st-line); background: rgba(0,0,0,.15); font-size: 1.12rem; line-height: 1.3; flex-wrap: wrap; }
.sm-q .sc-q { flex: 1; min-width: 0; }
.sm-mine { flex: 1 1 100%; display: grid; gap: 4px; font-size: 1rem; color: var(--st-soft); }
.sm-body { flex: 1; min-width: 0; display: grid; gap: 6px; }
.sm-ans { margin: 0; color: var(--st-yellow); font-size: 1.2rem; overflow-wrap: anywhere; }
.sm-mine2 { margin: 0; color: var(--st-soft); }
.sm-explain { white-space: pre-line; padding: 10px 12px; border-radius: 10px; background: rgba(0,0,0,.2); line-height: 1.4; }
.sm-right { border-style: solid; border-color: var(--st-good); } .sm-right .sc-n { background: var(--st-good); }
.sm-wrong { border-style: solid; border-color: var(--st-bad); } .sm-wrong .sc-n { background: var(--st-bad); }
.sm-how { flex: none; justify-self: start; min-height: 40px; margin: 0; }
.sm-body .tutor-a { margin-top: 4px; border-width: 6px; }
/* Listen (the device reads it out loud) */
.st-listen { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 12px; border-radius: 999px; border: 1.5px solid currentColor; background: transparent; color: inherit; font: 700 .9rem/1 var(--ui, system-ui, sans-serif); cursor: pointer; opacity: .85; vertical-align: middle; }
.st-listen.on { opacity: 1; background: var(--st-yellow); border-color: var(--st-yellow); color: #1d2520; }
.fu-thread > .st-listen, .fu-turn > .st-listen { justify-self: start; margin-top: 2px; }
.st-top .st-listen { min-height: 30px; padding: 2px 10px; font-size: .8rem; margin-right: 6px; }
.st-btns .st-listen { flex: 0 0 auto; min-height: 48px; }
.st-why2 { font-size: 1rem; line-height: 1.35; white-space: pre-line; opacity: .95; }
/* Study: Review today and My mistakes */
.td-row { display: flex; gap: 10px; flex-wrap: wrap; }
.td-b { flex: 1 1 150px; display: flex; gap: 12px; align-items: center; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line, #d9e0da); background: var(--card, #fff); color: var(--ink, #18231e); font: 700 1rem/1.2 var(--ui, system-ui, sans-serif); cursor: pointer; }
.td-b b { flex: none; min-width: 40px; height: 40px; padding: 0 8px; display: grid; place-items: center; border-radius: 999px; background: var(--yellow, #f2c230); color: #1d2219; font-size: 1.1rem; }
.td-b span { display: grid; gap: 2px; } .td-b small { font-weight: 400; color: var(--ink-2, #4a5750); font-size: .85rem; }
.td-run:empty { display: none; }
/* Files: study guide for a topic folder */
.fl-guide { width: 100%; margin: 0 0 4px; }

/* Calendar: how urgent (red = do this first, yellow = get started, green = can wait) */
.pl-day em.u-red, .pl-key em.u-red { background: #ff8f7e; } .pl-day em.u-yellow, .pl-key em.u-yellow { background: #f2c230; } .pl-day em.u-green, .pl-key em.u-green { background: #8fe3a5; }
.pl-day.pick em.u-red, .pl-day.pick em.u-yellow, .pl-day.pick em.u-green { box-shadow: 0 0 0 1.5px #1d2520; }
.pl-key { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; font-size: 1rem; color: var(--st-soft); }
.pl-key span { display: inline-flex; align-items: center; gap: 6px; } .pl-key em { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.pl-row.u-red { border-style: solid; border-color: #ff8f7e; box-shadow: inset 5px 0 0 #ff8f7e; }
.pl-row.u-yellow { border-style: solid; border-color: #f2c230; box-shadow: inset 5px 0 0 #f2c230; }
.pl-row.u-green { border-style: solid; border-color: #8fe3a5; box-shadow: inset 5px 0 0 #8fe3a5; }
.pl-u { display: inline-block; padding: 0 8px; border-radius: 999px; color: #1d2520; font-size: .85rem; font-weight: 700; }
.pl-u.u-red { background: #ff8f7e; } .pl-u.u-yellow { background: #f2c230; } .pl-u.u-green { background: #8fe3a5; }
