/* The Chromozone: account, teacher and student pages (/account/, /teach/, /teach/class/, /join/, /my/).
   Accounts build, 4 Nov 2026. Builds on site.css (.field, .btn, .tag, .role, .consent, .topic-check, .form-status). */

.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.acct [hidden] { display: none !important; }

.acct { padding: 40px 0 80px; }
.acct > .wrap { max-width: 760px; display: grid; gap: 18px; }
.acct--wide > .wrap { max-width: 1100px; }
.acct h1 { font-size: clamp(2rem, 7vw, 3rem); }
.acct h1:focus, .acct h2:focus { outline: none; }
.acct h1:focus-visible, .acct h2:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
.acct h2 { font-size: 1.45rem; }
.acct h3 { font-size: 1.12rem; }
.acct .lead { margin-top: -4px; }
.lp-crumb { font-size: 0.88rem; color: var(--ink-3); }
.lp-crumb a { color: var(--ink-3); }

.acct-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 14px; box-shadow: var(--shadow); min-width: 0; }
@media (min-width: 720px) { .acct-card { padding: 24px 26px; } }
.acct-card > * { min-width: 0; } /* grade book table scrolls inside its card instead of widening the page at 375 px */
.acct-form { display: grid; gap: 14px; }
.acct-fields { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .acct-fields { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }
.acct-new { border-top: 1px dashed var(--line); padding-top: 16px; }
.acct-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.acct-bar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.acct-hint { font-size: 0.92rem; color: var(--ink-3); }
.acct-meta { color: var(--ink-2); }
.acct-foot { font-size: 0.92rem; color: var(--ink-3); }
.acct-sub { margin-top: 6px; }
.acct-empty { background: var(--paper); border-radius: 10px; padding: 12px 14px; color: var(--ink-2); }
.acct-learner { display: grid; gap: 14px; border-left: 3px solid var(--leaf-tint); padding-left: 14px; }
.acct-privacy { font-size: 0.9rem; color: var(--ink-2); background: var(--paper); border-radius: 8px; padding: 8px 12px; }
.acct .form .btn, .acct-form > .btn { justify-self: start; width: auto; }

/* inputs site.css does not cover */
.acct .field input[type="password"], .acct .field input[type="date"], .acct-input {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff;
  font: 400 1rem var(--font-body); color: var(--ink);
}
.acct .field input[type="password"]:focus, .acct .field input[type="date"]:focus, .acct-input:focus { border-color: var(--leaf); outline: 3px solid var(--leaf-tint); outline-offset: 0; }
.acct .field input[aria-invalid="true"] { border-color: var(--red); }
.acct-input--date, .acct-date input[type="date"] { max-width: 14em; }
.acct-code { text-transform: uppercase; letter-spacing: 0.16em; font-family: var(--font-mono) !important; max-width: 12em; }
.acct-code--short { max-width: 8em; }
.acct-err { color: #8f2a19; font-size: 0.92rem; font-weight: 600; }
.acct-err:empty { display: none; }

.acct-link { background: none; border: 0; padding: 4px 0; min-height: 44px; font: 600 0.97rem var(--font-body); color: var(--leaf); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-align: left; }
.acct-link:hover { color: var(--leaf-strong); }

.acct-msg { border-radius: 10px; padding: 10px 14px; background: var(--paper-2); color: var(--ink-2); }
.acct-msg:empty { display: none; }
.acct-msg--ok { background: var(--leaf-tint); color: var(--leaf-strong); font-weight: 600; }
.acct-msg--error { background: var(--red-tint); color: #7a2617; font-weight: 600; }
.acct-msg--warn { background: var(--amber-tint); color: #5c3f00; }
.acct-confirm { display: grid; gap: 10px; background: var(--amber-tint); border-radius: 10px; padding: 10px 14px; }
.acct-confirm p { font-weight: 600; }
.acct-confirm p:focus { outline: none; }
.acct .btn[disabled] { opacity: 0.55; cursor: progress; }

/* teacher home */
.acct-checks { display: grid; gap: 8px; }
@media (min-width: 720px) { .acct-checks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.acct-classes { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.acct-class { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 14px 16px; display: grid; gap: 10px; }
.acct-class.is-archived { background: var(--paper); }
.acct-class-head { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; }
.acct-class-head h3 a { color: var(--ink); text-decoration: none; }
.acct-class-head h3 a:hover { text-decoration: underline; }
.acct-code-chip { display: inline-flex; align-items: baseline; gap: 8px; background: var(--paper-2); border-radius: 8px; padding: 4px 10px; }
.acct-code-k { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.acct-code-chip b, .acct-code-inline { font-family: var(--font-mono); letter-spacing: 0.14em; font-size: 1.05rem; }
.acct-code-inline { background: var(--paper-2); border-radius: 6px; padding: 1px 6px; }
.acct-inline { display: grid; gap: 8px; }
.acct-inline label { font-weight: 600; font-size: 0.95rem; }
.acct-archived summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.acct-archived[open] summary { margin-bottom: 10px; }

/* class page */
.acct-join { background: var(--leaf-tint); color: var(--leaf-strong); border-radius: 12px; padding: 12px 16px; }
.acct-join .acct-msg { margin: 0; }
.acct-tabs { display: flex; flex-wrap: wrap; gap: 6px; background: var(--paper-2); border-radius: 999px; padding: 4px; justify-self: start; max-width: 100%; }
.acct-tab { border: 0; background: transparent; font: 600 0.95rem var(--font-body); color: var(--ink-2); padding: 8px 16px; border-radius: 999px; cursor: pointer; min-height: 44px; }
.acct-tab[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.gb-scroll { overflow-x: auto; max-width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.gb-scroll:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.gb { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: 0.95rem; }
.gb th, .gb td { border-bottom: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); padding: 8px 10px; text-align: left; vertical-align: top; }
.gb thead th { background: var(--paper-2); font-weight: 600; width: 11em; min-width: 9em; max-width: 13em; }
.gb-title { display: block; color: var(--ink); text-decoration: none; line-height: 1.3; overflow-wrap: anywhere; }
.gb-title:hover { text-decoration: underline; }
.gb-sub { display: block; font-size: 0.8rem; font-weight: 500; color: var(--ink-3); margin-top: 4px; }
.gb .gb-name { position: sticky; left: 0; z-index: 1; background: #fff; font-family: var(--font-mono); font-weight: 700; min-width: 5.5em; width: 5.5em; }
.gb thead .gb-name { background: var(--paper-2); font-family: var(--font-body); z-index: 2; }
.gb tfoot th, .gb tfoot td { background: var(--paper); font-size: 0.82rem; color: var(--ink-2); border-bottom: 0; }
.gb tfoot .gb-name { background: var(--paper); font-family: var(--font-body); }
.gb-none { color: var(--ink-3); }
.gb-cell { display: grid; gap: 2px; justify-items: start; width: 100%; min-height: 44px; border-radius: 8px; border: 1.5px solid transparent; padding: 6px 10px; cursor: pointer; font: 600 0.95rem var(--font-body); text-align: left; }
.gb-cell.is-todo { background: var(--amber-tint); color: #5c3f00; border-color: #e7c873; }
.gb-cell.is-done { background: var(--leaf-tint); color: var(--leaf-strong); }
.gb-cell:hover { border-color: var(--ink); }
.gb-auto { font-size: 0.78rem; font-weight: 500; }

.acct-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.acct-item { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 12px 14px; display: grid; gap: 6px; min-width: 0; }
.acct-item-title { font-weight: 600; overflow-wrap: anywhere; }
.my-mark b { font-size: 1.2rem; color: var(--leaf-strong); }
.acct .hw-comment { background: var(--leaf-tint); border-radius: 10px; padding: 10px 14px; }
.acct .hw-comment-k { font-weight: 600; font-size: 0.9rem; color: var(--leaf-strong); }
.acct .hw-comment-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.my-group { display: grid; gap: 8px; }
.my-group h3 { font-family: var(--font-body); font-size: 1rem; letter-spacing: 0; }

.acct-table { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
.acct-table th, .acct-table td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; vertical-align: middle; }
.acct-table thead th { background: var(--paper-2); font-size: 0.85rem; }
.acct-table tbody th { font-family: var(--font-mono); }
.acct-pin { font-family: var(--font-mono); letter-spacing: 0.12em; }
.acct-pin .tag { margin-left: 8px; letter-spacing: 0.04em; font-family: var(--font-body); }
.acct-act { text-align: right; }
.acct-act .acct-confirm { text-align: left; }
@media (max-width: 600px) {
  .acct-table thead { display: none; }
  .acct-table, .acct-table tbody, .acct-table tr, .acct-table th, .acct-table td { display: block; width: 100%; }
  .acct-table tr { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; background: #fff; }
  .acct-table th, .acct-table td { border: 0; padding: 4px 0; }
  .acct-table td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; font-family: var(--font-body); letter-spacing: 0; color: var(--ink-2); }
  .acct-act { text-align: left; }
}


/* Plans build (4 Nov 2026): the remove button in a confirmation, the trial-class line on /teach/, what a free
   account gives on /account/ */
.acct-danger { color: #8f2a19; border-color: #c9a39b; }
.acct-danger:hover { background: var(--red-tint); }
.acct-plan-note { margin: 4px 0 14px; padding: 10px 14px; border-radius: 10px; background: var(--leaf-tint); }
.acct-plan-note[hidden] { display: none; }
.acct-plan-note .acct-hint { color: var(--ink); }
.acct-gives { display: grid; gap: 8px; margin: 4px 0 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); }
.acct-gives[hidden] { display: none; }
.acct-gives ul { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; color: var(--ink-2); }
.acct-gives .ticks { padding-left: 0; gap: 6px; color: var(--ink); }
.acct-plan { font-weight: 600; }

/* Payments build (4 Nov 2026): /account/ signed in is a profile page: your details, your plan, choose your plan
   (the plan cards of /plans/, styled by plans.css; js/account.js, js/account-billing.js, js/plans.js) */
.acct-profile { display: grid; gap: 18px; min-width: 0; }
.acct-details { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line-soft, var(--line)); }
.acct-details > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line-soft, var(--line)); }
.acct-details dt { font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.acct-details dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.acct-details .acct-inline { margin-top: 8px; }
.acct-link--inline { min-height: 44px; margin-left: 6px; padding: 0 4px; font-size: 0.92rem; vertical-align: baseline; }
@media (min-width: 560px) {
  .acct-details > div { grid-template-columns: 9.5em minmax(0, 1fr); align-items: baseline; gap: 12px; }
}
.acct-plan-name { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; margin: 0; }
.acct-plan-name:empty { display: none; }
.acct-plan-lines { display: grid; gap: 6px; color: var(--ink-2); }
.acct-plan-lines:empty { display: none; }
.acct-plan-lines p { margin: 0; }
.acct-choose { display: grid; gap: 12px; min-width: 0; margin-top: 10px; }
.acct-choose > p { margin: 0; color: var(--ink-2); }
.acct-choose .plans--4 { margin: 4px 0 6px; }
.acct-choose .plan h3 { font-size: 1.35rem; margin: 0; }
@media (min-width: 1100px) { .acct-choose .plans--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Where the class is (class page): progress through the course, the lesson now and the next one */
.c-progress { height: 12px; border-radius: 999px; background: var(--paper-2); overflow: hidden; margin: 6px 0 12px; }
.c-progress > span { display: block; height: 100%; border-radius: inherit; background: var(--leaf); }
.c-where-now { font-weight: 700; margin: 0 0 4px; }
.c-where-set select { max-width: 100%; }
.c-where-more { margin-top: 12px; }
.c-where-more > summary { cursor: pointer; color: var(--leaf-strong); font-weight: 600; }

/* Points build (5 Nov 2026): the "Your points" card on /my/ (js/points.js, badge sprite from tools/points_badges.py)
   and the Points panel on /teach/class/ (js/teach-class.js). Earned tokens take the badge or course colour, unearned
   ones are grey outlines; the colours reach the sprite's <use> copies through the custom properties. */
.pt-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.pt-card h3 { font-family: var(--font-body); font-size: 1rem; letter-spacing: 0; margin: 0; }
.pt-nums { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.pt-from { margin: 10px 0 0; color: var(--ink-2); font-size: 0.95rem; }
.pt-num { display: grid; gap: 0; }
.pt-num b { font-family: var(--font-display); font-size: 1.9rem; line-height: 1.1; color: var(--leaf-strong); }
.pt-num span { font-size: 0.85rem; color: var(--ink-3); }
.pt-badges { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 14px 8px; }
.pt-badge { display: grid; justify-items: center; align-content: start; text-align: center; gap: 4px; font-size: 0.78rem; line-height: 1.25; color: var(--ink-2); min-width: 0; }
.pt-badge.is-locked { color: var(--ink-3); }
.pt-badge-name { font-weight: 600; overflow-wrap: anywhere; }
.pt-badge-sub { font-size: 0.72rem; color: var(--ink-3); }
.pt-token { width: 44px; height: 44px; display: block; --pt-fill: var(--paper); --pt-ring: #c9c3b6; --pt-ink: #aaa394; }
.pt-badge.is-earned .pt-token { --pt-fill: var(--pt-colour, var(--leaf)); --pt-ring: var(--pt-colour, var(--leaf)); --pt-ink: #fff; }
.pt-bronze { --pt-colour: #b5713a; }
.pt-silver { --pt-colour: #7f8891; }
.pt-gold { --pt-colour: #c9960c; }
.pt-leaf { --pt-colour: var(--leaf); }
.pt-blue { --pt-colour: #2f6fb3; }
.pt-flame { --pt-colour: #d2602a; }
.pt-course-igcse-coordinated-science { --pt-colour: var(--leaf); }
.pt-course-igcse-psychology { --pt-colour: #6b4c9a; }
.pt-course-ial-biology { --pt-colour: var(--leaf-strong, #2c4a40); }
.pt-course-ial-psychology { --pt-colour: #6b4c9a; }
.pt-course-ial-chemistry { --pt-colour: #9b4a45; }
/* How points and badges work (site/js/points-guide.js; Laura, 12 Nov 2026) */
.pt-guide { border: 1px solid var(--line, #e3ded3); border-radius: 10px; background: var(--paper, #fff); margin: 4px 0 8px; }
.pt-guide > summary { cursor: pointer; padding: 10px 14px; font-weight: 700; color: var(--leaf-strong, #2c4a40); }
.pt-guide > summary:focus-visible { outline: 3px solid #e3c567; outline-offset: 2px; }
.pt-guide-body { padding: 0 14px 12px; display: grid; gap: 10px; }
.pt-guide-body h4 { margin: 4px 0 0; font-size: 0.95rem; }
.pt-guide-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.pt-guide-table caption { text-align: left; font-weight: 700; padding: 4px 0 6px; }
.pt-guide-table th, .pt-guide-table td { text-align: left; vertical-align: top; padding: 6px 8px; border-top: 1px solid var(--line, #e3ded3); }
.pt-guide-table thead th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-3, #6b6b6b); border-top: 0; }
.pt-guide-table tbody th { font-weight: 600; width: 45%; }
.pt-guide-table td { white-space: normal; }
.pt-guide-note { margin: 0; font-size: 0.88rem; color: var(--ink-2, #444); }
.pt-guide-list { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; font-size: 0.9rem; }
.pt-goal { display: grid; gap: 4px; }
.pt-goal .c-progress { margin: 4px 0 2px; }
.pt-board { margin: 0; padding-left: 1.6em; display: grid; gap: 4px; max-width: 24em; }
.pt-board li { display: flex; justify-content: space-between; gap: 12px; }
.pt-board li.is-me { font-weight: 700; }
.pt-board b { font-family: var(--font-mono); }
.c-points-total b { font-family: var(--font-display); font-size: 1.6rem; color: var(--leaf-strong); }
.c-points-form { display: grid; gap: 12px; }
.c-points-form .acct-fields { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .c-points-form .acct-fields { grid-template-columns: minmax(0, 9em) minmax(0, 1fr); } }
.c-points-form input[type="number"] { max-width: 9em; }
.acct-table .c-pts { white-space: nowrap; }
.acct-table .c-pts small { color: var(--ink-3); font-size: 0.85em; }
.acct-table .c-pts .c-pts-from { display: block; white-space: normal; max-width: 16em; line-height: 1.3; }

/* Set work versus self-started work (9 Nov 2026): the "How marking works" box in Set work (the same three rules
   on /plans/), and "Done on their own" on the class page (one student per row, their pages in a <details>;
   js/teach-class.js) */
.c-rules { display: grid; gap: 6px; background: var(--paper); border-radius: 10px; padding: 12px 16px; }
.c-rules h3 { font-family: var(--font-body); font-size: 1rem; letter-spacing: 0; margin: 0; }
.c-rules ol, .plans-rules { margin: 0; padding-left: 1.3em; display: grid; gap: 4px; color: var(--ink-2); }
.c-own-more > summary { cursor: pointer; padding: 8px 0; }
.c-own-who { font-family: var(--font-mono); }
.c-own-list { margin: 4px 0 6px; padding-left: 1.2em; display: grid; gap: 6px; font-size: 0.95rem; overflow-wrap: anywhere; }
.c-practice-topics { display: block; color: var(--ink-3); font-size: 0.9em; }
#c-own-body .acct-sub { margin-top: 18px; }

/* A student on their own (9 Nov 2026): lessons studied per course, in a student's entry on /teach/ (js/teach.js)
   and in "Lessons you have studied" on /my/ (js/my.js). The bar is .c-progress, the list of self-marked pages
   .c-own-more and .c-own-list. */
.lv { display: grid; gap: 10px; }
.lv-course { display: grid; gap: 2px; }
.lv-course .c-progress { margin: 4px 0; }
.lv-last { margin: 2px 0 0; padding-left: 1.2em; display: grid; gap: 4px; font-size: 0.95rem; overflow-wrap: anywhere; }
/* a student's entry now has two choices (a course to set work for, a class to add to): on a wide screen each list
   sits beside its button; on a phone it keeps the full width, with the button under it */
@media (min-width: 720px) { #t-learners .acct-row > .acct-input { width: auto; flex: 1 1 14em; max-width: 28em; } }

/* Streams and co-teachers (9 Nov 2026; js/teach-class.js, js/teach.js, js/my.js). A class of a course with streams
   (Co-ordinated Sciences: Biology, Chemistry, Physics): the subjects it takes as tick boxes, one block per subject
   under "Where the class is" and on /my/ (heading, .c-progress bar, the lesson now), and the grade book's subject
   filter. Several teachers on one class: an invite link with its Copy button in the Teachers tab. */
.c-streams { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.c-streams legend { padding: 0; margin-bottom: 6px; font-weight: 600; font-size: 0.95rem; }
.c-streams-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.c-streams-checks .topic-check { font-weight: 400; }
.c-stream { display: grid; gap: 6px; min-width: 0; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft, var(--line)); }
.c-stream h3 { font-family: var(--font-body); font-size: 1.05rem; letter-spacing: 0; margin: 0; }
.c-stream .c-progress { margin: 2px 0 4px; }
.c-stream .c-where-more { margin-top: 4px; }
.c-book-filter { max-width: 22em; }
.c-invite-link { display: grid; gap: 8px; background: var(--paper); border-radius: 10px; padding: 12px 14px; min-width: 0; }
.c-invite-link .acct-input { font-family: var(--font-mono); font-size: 0.9rem; min-height: 44px; }
.my-where .c-stream:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

/* Projector and big desktop screens (Laura, 10 Nov 2026: "when you project the website it doesn't fill the screen. It's very
   narrow in the middle"): the account pages scale up when the viewport is wide. Laptops at 125 to 150 % OS scaling have a
   CSS viewport under 1600 px and are not affected. */
@media (min-width: 1600px) { .acct { zoom: 1.25; } }
@media (min-width: 1900px) { .acct { zoom: 1.45; } }

/* Your notes on /account/ (10 Nov 2026) */
.acct-note .acct-note-text { margin: 4px 0; white-space: pre-line; }
.acct-note .acct-note-reply { margin: 6px 0 0; padding: 10px 12px; background: var(--leaf-tint); border-radius: 10px; white-space: pre-line; }

/* Work to mark on a class card (Laura, 11 Nov 2026) */
.acct-tomark { display: inline-flex; align-items: center; gap: 6px; margin-right: auto; background: #e3c567; color: #12302b;
  font-weight: 700; font-size: 0.9rem; text-decoration: none; border-radius: 999px; padding: 4px 12px; min-height: 32px; }
.acct-tomark::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #9b4a45; }
.acct-tomark:hover { background: #d9b84f; }
.acct-tomark:focus-visible { outline: 3px solid #12302b; outline-offset: 2px; }
