/* =============================================================================
 * Shared chrome for the student pages.
 *
 * Deliberately NOT the dark admin palette the teacher pages use. A student's
 * pages are a sibling of course/simple/beginnings.html — the same warm paper,
 * the same serif, the same navy and gold — because that page is where they
 * spend their time and these are a continuation of it, not a visit to the
 * tool the school is run with.
 * ========================================================================== */

:root {
    --navy: #1b365d;
    --navy-2: #3d5a80;
    --gold: #c4a35a;
    --cream: #f4f1ea;
    --ink: #222;
    --muted: #555;
    --line: #ddd7c8;
    --ok: #2f7a4d;
    --warn: #9a6b12;
    --bad: #a3352b;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    color: var(--ink);
    background: #faf8f4;
    line-height: 1.55;
}
a { color: var(--navy); }

.wrap { max-width: 940px; margin: 0 auto; padding: 0 20px 70px; }

/* Hero ----------------------------------------------------------------- */
header.hero {
    background: var(--navy);
    color: #fff;
    padding: 26px 20px 22px;
    margin-bottom: 26px;
}
header.hero .inner { max-width: 940px; margin: 0 auto; }
header.hero .org {
    font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
    color: var(--gold); margin-bottom: 6px;
}
header.hero h1 { margin: 0 0 4px; font-size: 1.7rem; font-weight: normal; }
header.hero .sub { color: #cfd8e6; font-size: .95rem; }
header.hero nav { margin-top: 14px; display: flex; gap: 16px; flex-wrap: wrap; font-size: .9rem; }
header.hero nav a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.35); }
header.hero nav a:hover { border-bottom-color: var(--gold); }
header.hero nav a[aria-current="page"] { color: var(--gold); border-bottom-color: var(--gold); }

/* Cards ---------------------------------------------------------------- */
.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 22px 24px;
    margin-bottom: 22px;
}
.card h2 {
    margin: 0 0 4px; font-size: 1.2rem; font-weight: normal; color: var(--navy);
}
.card .note { color: var(--muted); font-size: .88rem; margin: 0 0 16px; }
.card h2 + .note { margin-top: 2px; }

/* Stats ---------------------------------------------------------------- */
.stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1px; background: var(--line);
    border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
    margin-bottom: 22px;
}
.stat { background: var(--cream); padding: 14px 16px; }
.stat .k {
    font-family: system-ui, sans-serif;
    font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.stat .v { font-size: 1.5rem; color: var(--navy); margin-top: 3px; line-height: 1.2; }
.stat .v small { font-size: .8rem; color: var(--muted); }

/* The current lesson --------------------------------------------------- */
.now { border-left: 4px solid var(--gold); }
.now h3 { margin: 0 0 2px; font-size: 1.35rem; font-weight: normal; color: var(--navy); }
.now .ref { font-family: ui-monospace, monospace; font-size: .85rem; color: var(--muted); }
.now .assignment { margin: 14px 0 0; }

/* Buttons -------------------------------------------------------------- */
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
button, .btn {
    font-family: system-ui, sans-serif; font-size: .88rem;
    padding: 9px 16px; border-radius: 4px; cursor: pointer;
    border: 1px solid var(--navy); background: #fff; color: var(--navy);
    text-decoration: none; display: inline-block;
}
button:hover, .btn:hover { background: var(--cream); }
button.primary, .btn.primary { background: var(--navy); color: #fff; }
button.primary:hover, .btn.primary:hover { background: var(--navy-2); }
button.quiet, .btn.quiet { border-color: var(--line); color: var(--muted); }
button.danger { border-color: var(--bad); color: var(--bad); }
button:disabled { opacity: .5; cursor: not-allowed; }

/* Stepping between lessons. Sits at the foot of the lesson card, below a rule,
   so it reads as navigation rather than as one more thing the lesson asks for.
   The ends of the course keep their button in place but disabled — a row that
   loses a button shifts the other one under the cursor. */
.lesson-steps {
    display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
    justify-content: space-between;
    margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line);
}
.lesson-steps .step { font-size: .84rem; padding: 7px 13px; }

/* Lists ---------------------------------------------------------------- */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li {
    display: flex; gap: 16px; align-items: baseline; flex-wrap: wrap;
    padding: 12px 0; border-bottom: 1px solid var(--line);
}
.rows li:last-child { border-bottom: 0; }
.rows .what { flex: 1 1 240px; }
.rows .what b { font-weight: normal; color: var(--navy); }
.rows .when { color: var(--muted); font-size: .85rem; font-family: ui-monospace, monospace; }
.rows .score { font-size: 1.05rem; min-width: 68px; text-align: right; }
.rows .score.low { color: var(--bad); }
.muted { color: var(--muted); }
.empty { color: var(--muted); padding: 20px 0; }

.tag {
    font-family: system-ui, sans-serif; font-size: .68rem; letter-spacing: .05em;
    padding: 2px 7px; border-radius: 3px; border: 1px solid var(--line);
    color: var(--muted); white-space: nowrap;
}
.tag.ok { border-color: var(--ok); color: var(--ok); }
.tag.warn { border-color: var(--warn); color: var(--warn); }
.tag.note { border-color: var(--gold); color: #86682c; }

/* The teacher's verdict on a lesson with no test ------------------------ */
.review {
    margin-top: 12px; padding: 10px 14px; font-size: .93rem;
    border-left: 3px solid var(--line); background: #f7f4ed;
}
.review.waiting { border-left-color: var(--gold); }
.review.passed { border-left-color: var(--ok); }
.review.failed { border-left-color: var(--bad); }

/* The verse to learn by heart ------------------------------------------ */
.verse {
    margin-top: 16px; padding: 12px 16px;
    background: #faf6ea; border: 1px solid #e6dcc2; border-radius: 4px;
}
.verse-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.verse-label {
    font-family: system-ui, sans-serif; font-size: .68rem; letter-spacing: .12em;
    text-transform: uppercase; color: var(--navy-2); font-weight: 700;
}
/* A button, because it opens the reading panel rather than going anywhere —
   but it reads as the reference it is. */
.verse-ref {
    background: none; border: 0; padding: 0; font: inherit; font-weight: 700;
    color: var(--navy); cursor: pointer; text-decoration: underline;
    text-underline-offset: 3px;
}
.verse-ref:hover { background: none; color: var(--navy-2); }
.verse-text { margin: 8px 0 0; font-size: 1rem; line-height: 1.6; }
.verse-text .vn {
    font-family: system-ui, sans-serif; font-size: .68rem; color: var(--muted);
    vertical-align: super; margin-right: 2px;
}
.verse-mark {
    margin: 10px 0 0; padding: 8px 12px; font-size: .9rem;
    border-left: 3px solid var(--line); background: #fffdf7;
}
.verse-mark.waiting { border-left-color: var(--gold); }
.verse-mark.passed { border-left-color: var(--ok); }
.verse-mark.failed { border-left-color: var(--bad); }

/* A teacher's note ----------------------------------------------------- */
.teachernote {
    background: #fbf7ec; border-left: 3px solid var(--gold);
    padding: 10px 14px; margin-top: 10px; font-size: .92rem;
}
.teachernote b { font-family: system-ui, sans-serif; font-size: .7rem; letter-spacing: .09em;
    text-transform: uppercase; color: #86682c; display: block; margin-bottom: 3px; }

/* Progress bar --------------------------------------------------------- */
.track { height: 8px; border-radius: 999px; background: #e4ddd0; overflow: hidden; margin-top: 8px; }
.track i { display: block; height: 100%; background: var(--ok); }

/* Forms ---------------------------------------------------------------- */
.field { display: block; margin-bottom: 16px; }
.field span {
    display: block; font-family: system-ui, sans-serif; font-size: .76rem;
    letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px;
}
input[type=text], input[type=email], input[type=password] {
    width: 100%; font-family: inherit; font-size: 1rem; padding: 9px 11px;
    border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink);
}
input:focus { outline: 2px solid var(--navy-2); outline-offset: 1px; }
.hint { font-size: .82rem; color: var(--muted); margin-top: -10px; margin-bottom: 16px; }

/* Messages ------------------------------------------------------------- */
.message { display: none; padding: 12px 16px; border-radius: 4px; margin-bottom: 20px; font-size: .92rem; }
.message.visible { display: block; }
.message.error { background: #fbeceb; border: 1px solid var(--bad); color: #7d251d; }
.message.success { background: #eef6f0; border: 1px solid var(--ok); color: #1f5433; }
.message.info { background: #f1f4f9; border: 1px solid var(--navy-2); color: #26405f; }

/* The account-closing block, kept visually apart from the rest ---------- */
.danger-zone { border-color: #e6c9c5; background: #fdf8f7; }
.danger-zone h2 { color: var(--bad); }
