/* ReportWriter: large type, high contrast, nothing decorative that slows a teacher down. */
:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #fbfaf7;
  --ink: #1d2430;
  --muted: #566070;
  --line: #e0dbd1;
  --field: #c3bdb0;
  --accent: #1f6f5c;
  --accent-ink: #ffffff;
  --accent-soft: #e3f0eb;
  --pencil: #f2c14e;
  --danger: #b3261e;
  --danger-soft: #fbe9e7;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(29, 36, 48, 0.06), 0 2px 8px rgba(29, 36, 48, 0.05);
  --font: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.55 var(--font); }
a { color: var(--accent); }
img, svg { display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 21px; color: var(--ink); text-decoration: none; }
.brand svg { width: 32px; height: 32px; }
.topbar .spacer { flex: 1; }
.pill { font-size: 15px; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 700; white-space: nowrap; }
.pill.warn { background: #fdf3d8; color: #7a5600; }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 10px; border: 2px solid var(--accent); background: var(--accent); color: var(--accent-ink); font: 700 17px var(--font); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: 0.55; cursor: default; filter: none; }
.btn.secondary { background: var(--surface); color: var(--accent); }
.btn.quiet { background: transparent; border-color: transparent; color: var(--accent); padding: 0 10px; }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 15px; }
.btn.big { min-height: 56px; font-size: 19px; padding: 0 28px; }
label.field { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 15px; color: var(--muted); }
select, input[type=text], input[type=number], textarea {
  font: 17px var(--font); color: var(--ink); background: var(--surface); border: 1.5px solid var(--field); border-radius: 8px;
  min-height: 46px; padding: 8px 12px; width: 100%;
}
select { padding-right: 32px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23566070' stroke-width='2' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; cursor: pointer; }
select:focus, input:focus, textarea:focus, .btn:focus-visible { outline: 3px solid rgba(31, 111, 92, 0.35); outline-offset: 1px; border-color: var(--accent); }
.check { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); }

/* app layout */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
main.app { padding: 20px 0 80px; }
.setup { display: grid; grid-template-columns: minmax(230px, 1.1fr) minmax(170px, 0.8fr) minmax(280px, 1.6fr); gap: 14px; align-items: end; }
.setup .subject-row { display: flex; gap: 8px; align-items: end; }
.setup .subject-row label { flex: 1; }
.limits { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 16px; color: var(--muted); }
.limits label { flex-direction: row; align-items: center; gap: 8px; font-size: 16px; }
.limits input { width: 110px; min-height: 40px; padding: 6px 10px; }
.topics { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.topics summary { cursor: pointer; font-weight: 700; color: var(--accent); }
.topic-list { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; }
.topic-list .check { font-size: 16px; }
.evidence { margin-top: 10px; max-width: 640px; }
.evidence p { margin: 8px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { border: 1.5px solid var(--field); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 6px 14px; font: 15px var(--font); cursor: pointer; }
.chip:hover { border-color: var(--accent); color: var(--accent); }

.tabs { display: flex; gap: 6px; margin: 22px 0 0; }
.tab { font: 700 17px var(--font); border: 1px solid var(--line); border-bottom: none; background: #ece8df; color: var(--muted); padding: 12px 20px; border-radius: 10px 10px 0 0; cursor: pointer; }
.tab[aria-selected=true] { background: var(--surface); color: var(--ink); }
.panel { border-top-left-radius: 0; }

.classbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 16px; }
.classbar label { min-width: 240px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }

.student { border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 12px; background: var(--surface); }
.student.done { border-color: #b9d8cc; }
.student-head { display: grid; grid-template-columns: minmax(120px, 1fr) 130px 170px minmax(200px, 2fr); gap: 10px; align-items: end; }
.student-name { font-weight: 700; font-size: 19px; align-self: center; overflow-wrap: anywhere; }
.ratings { display: grid; grid-template-columns: repeat(6, minmax(70px, 1fr)); gap: 6px; grid-column: 3 / 5; }
.ratings label { font-size: 13px; }
.ratings select { padding: 6px 26px 6px 8px; background-position: right 8px center; }
.comment { margin-top: 10px; }
.comment textarea { background: var(--surface-2); line-height: 1.55; resize: vertical; min-height: 90px; }
.comment-foot { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.count { font-size: 15px; color: var(--muted); margin-right: auto; }
.count.over { color: var(--danger); font-weight: 700; }
.row-msg { color: var(--danger); font-size: 15px; margin-top: 6px; }
.locked { background: #fdf3d8; border-radius: 8px; padding: 10px 14px; margin-top: 10px; font-size: 16px; }

.empty { text-align: center; padding: 30px 10px; }
.empty textarea { max-width: 520px; min-height: 220px; margin: 10px auto 14px; display: block; }

.permark { display: grid; gap: 12px; }
.permark .item { border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.permark .item h3 { font-size: 17px; margin-bottom: 6px; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(20, 24, 32, 0.45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.modal { background: var(--surface); border-radius: 14px; max-width: 560px; width: 100%; max-height: calc(100vh - 32px); overflow: auto; padding: 26px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2); }
.modal h2 { font-size: 24px; }
.modal .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.modal .close { float: right; border: none; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 4px; }
.option { border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 8px 0; display: flex; gap: 12px; cursor: pointer; }
.option input { width: 22px; height: 22px; margin-top: 3px; accent-color: var(--accent); flex: none; }
.option.on { border-color: var(--accent); background: var(--accent-soft); }
.copyline { display: flex; gap: 8px; }
.copyline input { font-size: 16px; }
#gsi { min-height: 44px; margin: 10px 0; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 10px; font-weight: 700; z-index: 60; }

/* marketing pages */
.hero { padding: 64px 0 40px; }
.hero h1 { font-size: clamp(34px, 5vw, 52px); max-width: 15ch; }
.hero .lead { font-size: 21px; max-width: 40ch; color: var(--muted); }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 26px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.sample { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 20px; font-size: 17px; }
.sample .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.sample .meta span { font-size: 14px; font-weight: 700; background: #ece8df; border-radius: 6px; padding: 3px 9px; }
.sample p { margin: 0; background: var(--surface-2); border-left: 4px solid var(--pencil); padding: 12px 14px; border-radius: 4px; }
section.band { padding: 48px 0; border-top: 1px solid var(--line); }
section.band h2 { font-size: 30px; }
.steps, .features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 18px; }
.steps .card h3, .features .card h3 { font-size: 19px; }
.step-num { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 10px; }
.price { max-width: 460px; }
.price .amount { font-size: 46px; font-weight: 700; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: 10px 0 0; }
footer.site { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 15px; color: var(--muted); }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.prose { max-width: 760px; padding: 40px 20px 60px; margin: 0 auto; }
.prose h1 { font-size: 34px; }
.prose h2 { font-size: 22px; margin-top: 1.6em; }

@media (max-width: 900px) {
  .setup { grid-template-columns: 1fr 1fr; }
  .setup .subject-row { grid-column: 1 / -1; }
  .student-head { grid-template-columns: 1fr 1fr; }
  .student-name { grid-column: 1 / -1; }
  .ratings { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); }
  .hero-grid, .steps, .features { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .wrap { padding: 0 16px; }
  .setup { grid-template-columns: 1fr; }
  .student-head { grid-template-columns: 1fr; }
  .tab { padding: 10px 12px; font-size: 16px; }
  .topbar .pill { display: none; }
  .topbar .wrap { gap: 10px; }
  .brand { font-size: 19px; }
  .topbar .btn.small { padding: 0 12px; }
}
