/* ============================================================
   JotTower — assets/css/style.css
   One stylesheet for the whole product.

   Palette (fixed by the design brief): paper, ink, muted, line,
   and one amber accent — "rise" — reserved for growth: the
   wordmark's second half, the tower on every shelf card, the
   primary button. Nothing else is amber.

   Type: one family, DM Sans, for everything. Headings and the
   wordmark are set heavier and larger, not in a second face.
   Falls back to the system stack if the font files can't load.

   The signature element is the shelf: cards stand on a plank,
   each carrying a tower whose height is its entry count.
   Everything else stays quiet.
   ============================================================ */

:root {
    --paper: #f7f9fa;
    --paper-2: #eef2f4;
    --card: #ffffff;
    --ink: #1c2b33;
    --ink-2: #33454f;
    --muted: #5c6e78;
    --line: #dde5e9;
    --line-2: #c9d3d9;
    --python-blue: #306998; /* the wordmark's first half — Python's mid blue */
    --rise: #e8930c;
    --rise-deep: #c97a05;
    --rise-bg: #fdf3e3;
    --rise-line: #f0d5a6;
    --ok-bg: #e8f4ec;
    --ok: #2e7d4f;
    --ok-line: #bfdfcb;
    --warn-bg: #fbeaea;
    --warn: #a33a3a;
    --warn-line: #ebc3c3;

    --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        sans-serif;

    --col: 880px;
    --radius: 10px;
    --radius-sm: 7px;
    --shadow: 0 1px 2px rgba(28, 43, 51, 0.06),
        0 6px 18px -12px rgba(28, 43, 51, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 16px/1.6 var(--sans);
    font-feature-settings: "kern", "liga";
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--ink-2);
}

main {
    max-width: var(--col);
    margin: 0 auto;
    padding: 0 24px 96px;
}

/* ============================================================
   Masthead
   ============================================================ */

header.mast {
    max-width: var(--col);
    margin: 0 auto;
    padding: 30px 24px 18px;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
}

.wordmark {
    font-family: var(--sans);
    font-weight: 700;
    font-size: 24px;
    letter-spacing: -0.02em;
    text-decoration: none;
    color: var(--python-blue);
    line-height: 1;
}

.wordmark .rise {
    color: var(--rise);
    position: relative;
    top: -3px;
}

.mast nav {
    display: flex;
    margin-left: 28px;
}

.mast nav a + a {
    margin-left: 20px;
}

.mast nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 15px;
    padding-bottom: 2px;
    border-bottom: 1.5px solid transparent;
}

.mast nav a:hover {
    color: var(--ink);
    border-bottom-color: var(--line-2);
}

.mast .who {
    margin-left: auto;
    display: flex;
    align-items: baseline;
    font-size: 15px;
    color: var(--muted);
}

.mast .who > * + * {
    margin-left: 14px;
}

.mast .who span {
    color: var(--ink-2);
}

.mast .who a {
    color: var(--muted);
    text-decoration: none;
}

.mast .who a:hover {
    color: var(--ink);
}

.mast .who form {
    display: inline;
}

.mast .who button.link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-size: 15px;
    color: var(--muted);
    cursor: pointer;
}

.mast .who button.link:hover {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ============================================================
   Type scale
   ============================================================ */

h1 {
    font-family: var(--sans);
    font-weight: 700;
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 28px 0 8px;
}

h2 {
    font-family: var(--sans);
    font-weight: 600;
    font-size: 20px;
    line-height: 1.25;
    margin: 40px 0 14px;
}

h3 {
    font-family: var(--sans);
    font-weight: 600;
    font-size: 19px;
    margin: 0 0 6px;
}

.sub {
    color: var(--muted);
    font-size: 15px;
    margin: 0 0 22px;
}

.small {
    font-size: 13.5px;
    color: var(--muted);
}

.empty {
    color: var(--muted);
    margin: 0;
    padding: 28px 22px;
    border: 1.5px dashed var(--line-2);
    border-radius: var(--radius);
    background: transparent;
}

/* Page header row: title on the left, figures on the right */
.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 26px;
}

.page-head h1 {
    margin-bottom: 0;
}

.figures {
    display: flex;
    padding-bottom: 6px;
}

.figures .stat + .stat {
    margin-left: 26px;
}

.figures .stat {
    font-size: 15px;
    color: var(--muted);
    white-space: nowrap;
}

.figures .stat b {
    font-family: var(--sans);
    font-weight: 600;
    font-size: 21px;
    color: var(--ink);
    margin-right: 5px;
}

/* A heading with a small control on its right (the search) */
.h-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-top: 40px;
    margin-bottom: 14px;
}

.h-row h2 {
    margin: 0;
}

/* ============================================================
   Cards, forms, buttons
   ============================================================ */

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

/* The capture card is the product's front door: bigger, warmer edge */
.card.capture {
    padding: 22px 22px 18px;
    border-color: var(--rise-line);
}

textarea {
    display: block;
    width: 100%;
    min-height: 130px;
    resize: vertical;
    font: inherit;
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    background: #fff;
}

textarea::placeholder,
input::placeholder {
    color: #8a9aa3;
}

textarea:focus,
input:focus,
select:focus {
    outline: none;
    border-color: var(--rise);
    box-shadow: 0 0 0 3px rgba(232, 147, 12, 0.18);
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--rise);
    outline-offset: 2px;
}

input[type="date"],
input[type="search"],
input[type="text"],
input[type="email"],
input[type="password"],
select {
    font: inherit;
    font-size: 15px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
}

input[type="search"] {
    -webkit-appearance: none;
    appearance: none;
}

.row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 12px;
}

.row > * + * {
    margin-left: 10px;
}

.row.end {
    justify-content: flex-end;
}

button,
.btn {
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--rise);
    border-radius: var(--radius-sm);
    background: var(--rise);
    color: #fff;
    padding: 10px 18px;
    text-decoration: none;
    display: inline-block;
    line-height: 1.3;
}

button:hover,
.btn:hover {
    background: var(--rise-deep);
    border-color: var(--rise-deep);
}

button.quiet,
.btn.quiet {
    background: #fff;
    color: var(--ink-2);
    border-color: var(--line-2);
    font-weight: 500;
}

button.quiet:hover,
.btn.quiet:hover {
    background: var(--paper-2);
    color: var(--ink);
    border-color: var(--line-2);
}

/* Search: one compact control */
.search {
    display: flex;
    align-items: center;
}

.search button {
    margin-left: 8px;
}

.search input[type="search"] {
    width: 260px;
    max-width: 100%;
}

/* ============================================================
   Banners — one message, one left edge of colour
   ============================================================ */

.banner {
    border-radius: var(--radius-sm);
    padding: 13px 16px 13px 18px;
    margin: 14px 0;
    font-size: 15px;
    border: 1px solid var(--line);
    border-left-width: 4px;
    background: var(--card);
}

.banner.new-shelf {
    background: var(--rise-bg);
    border-color: var(--rise-line);
    border-left-color: var(--rise);
}

.banner.saved {
    background: var(--ok-bg);
    border-color: var(--ok-line);
    border-left-color: var(--ok);
    color: var(--ok);
}

.banner.saved a {
    color: inherit;
}

.banner.unfiled {
    background: var(--warn-bg);
    border-color: var(--warn-line);
    border-left-color: var(--warn);
    color: var(--warn);
}

.banner form {
    display: inline;
}

.banner .row {
    margin-top: 10px;
}

/* ============================================================
   The shelf — cards stand on a plank; each carries its tower
   ============================================================ */

.shelves {
    display: flex;
    flex-wrap: wrap;
    margin-right: -14px;
}

.shelf-card {
    position: relative;
    flex: 1 1 200px;
    max-width: calc(33.333% - 14px);
    margin: 0 14px 14px 0;
    min-height: 112px;
    background: var(--card);
    border: 1px solid var(--line);
    border-bottom: 3px solid var(--line-2); /* the plank */
    border-radius: var(--radius) var(--radius) 4px 4px;
    padding: 16px 16px 14px 26px;
    text-decoration: none;
    color: var(--ink);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.shelf-card:hover {
    border-color: var(--rise-line);
    border-bottom-color: var(--rise);
}

/* The tower: width fixed, height = entry_count / max × 48px (set inline) */
.shelf-card .bar {
    position: absolute;
    left: 10px;
    bottom: 0;
    width: 8px;
    background: var(--rise);
    border-radius: 3px 3px 0 0;
}

.shelf-card .name {
    font-family: var(--sans);
    font-weight: 600;
    font-size: 17px;
    line-height: 1.25;
}

.shelf-card .count {
    color: var(--muted);
    font-size: 13.5px;
    margin-top: 3px;
}

@media (max-width: 700px) {
    .shelf-card {
        max-width: calc(50% - 14px);
    }
}

@media (max-width: 460px) {
    .shelf-card {
        max-width: calc(100% - 14px);
    }
}

/* ============================================================
   Entries
   ============================================================ */

.entry {
    border-bottom: 1px solid var(--line);
    padding: 14px 2px;
    font-size: 16px;
}

.entry:first-child {
    padding-top: 4px;
}

.entry:last-child {
    border-bottom: none;
    padding-bottom: 4px;
}

.entry .meta {
    color: var(--muted);
    font-size: 13.5px;
    margin-top: 5px;
}

.entry .meta a {
    color: var(--muted);
}

.entry .meta.row {
    margin-top: 8px;
}

/* ============================================================
   Ambiguity modal
   ============================================================ */

dialog {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 26px;
    max-width: 500px;
    width: calc(100% - 40px);
    background: var(--card);
    color: var(--ink);
    box-shadow: 0 24px 60px -20px rgba(28, 43, 51, 0.35);
}

dialog::backdrop {
    background: rgba(28, 43, 51, 0.45);
}

dialog .why {
    color: var(--muted);
    font-size: 15px;
    margin: 0 0 16px;
}

.candidate {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    width: 100%;
    text-align: left;
    margin: 8px 0;
    padding: 12px 16px;
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--line-2);
    font-weight: 500;
}

.candidate:hover {
    border-color: var(--rise);
    background: var(--rise-bg);
    color: var(--ink);
}

.candidate .cnt {
    color: var(--muted);
    font-weight: 400;
    font-size: 13.5px;
}

/* ============================================================
   Auth pages: a narrow sheet under a large wordmark
   ============================================================ */

.auth {
    max-width: 400px;
    margin: 36px auto 0;
}

.auth h1 {
    margin-top: 0;
}

.auth .card {
    padding: 26px;
}

.auth .field {
    display: block;
    margin-bottom: 16px;
}

.auth .field span {
    display: block;
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 6px;
}

.auth .field input {
    width: 100%;
    font-size: 16px;
    padding: 11px 13px;
}

.auth button[type="submit"] {
    width: 100%;
    padding: 12px 18px;
    font-size: 16px;
    margin-top: 6px;
}

.auth .alt {
    margin: 18px 0 0;
    font-size: 14.5px;
    color: var(--muted);
    text-align: center;
}

.auth .banner {
    margin-top: 0;
}

/* ============================================================
   Motion — only in answer to an action
   ============================================================ */

@media (prefers-reduced-motion: no-preference) {
    .shelf-card .bar {
        transition: height 0.4s ease;
    }

    button,
    .btn,
    .shelf-card {
        transition: background-color 0.15s ease, border-color 0.15s ease;
    }
}

/* ============================================================
   Calendar — one month, Monday first; days with jottings link
   ============================================================ */

.cal {
    padding: 18px 18px 14px;
}

.cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.cal-head h2 {
    margin: 0;
    font-size: 19px;
}

.cal-head .btn {
    padding: 7px 12px;
    font-size: 14px;
}

.cal-grid {
    display: flex;
    flex-wrap: wrap;
}

.cal-wd {
    width: 14.2857%;
    font-size: 12.5px;
    color: var(--muted);
    padding: 4px 8px 8px;
}

.cal-day {
    width: 14.2857%;
    min-height: 66px;
    padding: 8px;
    border-top: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
    display: block;
    position: relative;
}

.cal-day.blank {
    border-top-color: transparent;
}

.cal-day .n {
    display: block;
    font-size: 14px;
    color: var(--ink-2);
    width: 26px;
    height: 26px;
    line-height: 26px;
    text-align: center;
    border-radius: 13px;
}

.cal-day.future .n {
    color: var(--line-2);
}

.cal-day.today .n {
    box-shadow: inset 0 0 0 1.5px var(--line-2);
}

.cal-day .c {
    display: block;
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--muted);
    padding-left: 10px;
    position: relative;
}

.cal-day .c::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    width: 6px;
    height: 6px;
    border-radius: 3px;
    background: var(--rise);
}

a.cal-day.has:hover {
    background: var(--paper-2);
    border-radius: var(--radius-sm);
}

a.cal-day.has .n {
    font-weight: 600;
}

.cal-day.picked {
    background: var(--rise-bg);
    border-radius: var(--radius-sm);
}

.cal-day.picked .n {
    background: var(--rise);
    color: #fff;
    font-weight: 600;
}

@media (max-width: 560px) {
    .cal-day {
        min-height: 54px;
        padding: 6px 4px;
    }

    .cal-day .c {
        font-size: 11px;
        padding-left: 8px;
    }

    .cal-day .c::before {
        top: 5px;
        width: 5px;
        height: 5px;
    }
}

/* ============================================================
   Map — the whole shelf as a graph plus an outline
   ============================================================ */

.map-card {
    padding: 10px;
}

.shelf-map {
    display: block;
    width: 100%;
    height: auto;
}

.shelf-map a circle:hover {
    fill: var(--rise-deep);
}

.map-shelf-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    padding-bottom: 10px;
    margin-bottom: 4px;
}

.map-shelf-head a,
.map-shelf-head > span:first-child {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
}

.map-shelf-head a:hover {
    color: var(--rise-deep);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ============================================================
   Substance gate: the "needs one more sentence" tray state
   ============================================================ */

.needs-detail {
    margin-top: 10px;
    padding: 10px 12px;
    background: var(--rise-bg);
    border: 1px solid var(--rise-line);
    border-radius: var(--radius-sm);
}

.needs-detail .hint {
    color: var(--ink-2);
    margin-bottom: 4px;
}

.needs-detail form.row {
    margin-top: 6px;
}

.auth .field select {
    width: 100%;
    font: inherit;
    font-size: 16px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
}

/* ============================================================
   Coverage — the green/red bar toward the learner's level
   ============================================================ */

.coverage-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
    font-size: 15px;
}

.progress {
    display: flex;
    width: 100%;
    height: 18px;
    border-radius: 9px;
    overflow: hidden;
    border: 1px solid var(--line-2);
    background: var(--paper-2);
}

.progress .seg {
    display: block;
    height: 100%;
    border: none;
    border-radius: 0;
    padding: 0;
    cursor: pointer;
}

.progress .seg.green {
    background: var(--ok);
}

.progress .seg.green:hover {
    background: #256b43;
}

.progress .seg.red {
    background: #d96a5b;
}

.progress .seg.red:hover {
    background: var(--warn);
}

.coverage-actions {
    justify-content: space-between;
    margin-top: 10px;
}

.cp-list {
    margin: 0 0 6px;
    padding-left: 22px;
    max-height: 340px;
    overflow-y: auto;
}

.cp-list li {
    margin-bottom: 8px;
}

.cp-list .receipt {
    color: var(--ok);
    margin-top: 2px;
}

/* Mini bar on the shelf cards */
.mini-progress {
    display: flex;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 8px;
    background: var(--paper-2);
}

.mini-progress .green {
    background: var(--ok);
    height: 100%;
}

.mini-progress .red {
    background: #d96a5b;
    height: 100%;
}

.shelf-card .count.cov {
    margin-top: 3px;
}

/* Strength: full green = demonstrated, light green = touched */
.progress .seg.lightgreen {
    background: #8cc5a4;
}

.progress .seg.lightgreen:hover {
    background: #79b794;
}

.mini-progress .lightgreen {
    background: #8cc5a4;
    height: 100%;
}

.badge {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 600;
    padding: 1px 8px;
    border-radius: 9px;
    margin-left: 6px;
    vertical-align: 1px;
}

.badge.demo {
    background: var(--ok-bg);
    color: var(--ok);
    border: 1px solid var(--ok-line);
}

.badge.touch {
    background: #eff7f2;
    color: #4e8a68;
    border: 1px solid #cbe3d5;
}

/* Locked remaining-list: the shape without the names */
.lock-shape {
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 10px;
}

/* ============================================================
   Sidebar layout — everything about you on the left
   ============================================================ */

.layout {
    display: flex;
    max-width: 1160px;
    margin: 0 auto;
    align-items: flex-start;
}

.side {
    width: 240px;
    flex-shrink: 0;
    padding: 30px 22px 40px;
    position: sticky;
    top: 0;
    border-right: 1px solid var(--line);
    min-height: 100vh;
    box-sizing: border-box;
}

.layout main {
    flex: 1;
    min-width: 0;
    max-width: none;
    padding: 8px 32px 96px;
}

.side nav {
    display: block;
    margin: 26px 0 0;
}

.side nav a {
    display: block;
    color: var(--muted);
    text-decoration: none;
    font-size: 15px;
    padding: 6px 0;
}

.side nav a:hover {
    color: var(--ink);
}

.side-block {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.side-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}

.side-stat {
    font-size: 14px;
    color: var(--muted);
    padding: 2px 0;
}

.side-stat b {
    color: var(--ink);
    font-size: 15px;
    margin-right: 4px;
}

.side-shelf {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    text-decoration: none;
    color: var(--ink-2);
    font-size: 14px;
    padding: 4px 0;
}

.side-shelf:hover span:first-child {
    color: var(--rise-deep);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.side-shelf .n {
    color: var(--muted);
    font-size: 13px;
}

.side-foot {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.side-foot .who-link {
    color: var(--ink-2);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
}

.side-foot .who-link:hover {
    color: var(--rise-deep);
}

.side-foot form {
    display: inline;
}

.side-foot button.link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-size: 14px;
    color: var(--muted);
    cursor: pointer;
}

.side-foot button.link:hover {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 860px) {
    .layout {
        display: block;
    }

    .side {
        width: 100%;
        min-height: 0;
        position: static;
        border-right: none;
        border-bottom: 1px solid var(--line);
        padding: 22px 24px 18px;
    }

    .side-block {
        display: none; /* figures live in the pages on small screens */
    }

    .side nav {
        margin-top: 12px;
    }

    .side nav a {
        display: inline-block;
        margin-right: 18px;
    }

    .side-foot {
        margin-top: 10px;
        padding-top: 10px;
        border-top: none;
    }

    .layout main {
        padding: 8px 24px 96px;
    }
}

.needs-detail.check {
    background: var(--warn-bg);
    border-color: var(--warn-line);
}

.needs-detail .tiny {
    font-size: 12px;
    color: var(--muted);
}

/* An overridden soundness doubt stays visible on the entry */
.entry .doubt {
    color: var(--warn);
    margin-top: 4px;
}

/* A corrected line: kept, but never presented as knowledge */
s.was-wrong {
    color: #9aa9b1;
    text-decoration-color: #c4837c;
    font-size: 0.94em;
}

.paste-note {
    margin-top: 6px;
}

.paste-note.blocked {
    color: var(--warn);
}

/* ============================================================
   Trainer dashboard — topics left, learners right
   ============================================================ */

.dash {
    display: flex;
    align-items: flex-start;
    margin-right: -22px;
}

.dash-col {
    flex: 1 1 0;
    min-width: 0;
    margin-right: 22px;
}

.dash-row {
    padding: 10px 2px;
    border-bottom: 1px solid var(--line);
}

.dash-row:last-child {
    border-bottom: none;
}

.dash-row-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
}

.dash-row-head a {
    text-decoration: none;
    color: var(--ink);
}

.dash-row-head a:hover {
    color: var(--rise-deep);
}

.mini-progress .untouched {
    background: var(--paper-2);
    height: 100%;
}

button.link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

button.link:hover {
    color: var(--warn);
}

@media (max-width: 900px) {
    .dash {
        display: block;
        margin-right: 0;
    }

    .dash-col {
        margin-right: 0;
    }
}

.auth .field .joining {
    display: block;
    margin-top: 5px;
    color: var(--ok);
}

/* EXPERTPATH: what the learner already knew — their word, not evidence */
.claim-strip {
    background: var(--paper-2);
    border-color: var(--line-2);
}

.claim-item {
    display: block;
    padding: 4px 0;
    font-size: 14.5px;
    color: var(--ink-2);
}

.claim-item input {
    margin-right: 8px;
}

.progress .seg.claimed {
    background: #b8c4cb;
}

.progress .seg.claimed:hover {
    background: #a3b1ba;
}

.badge.knew {
    background: var(--paper-2);
    color: var(--muted);
    border: 1px solid var(--line-2);
}

.receipt.claimed-note {
    color: var(--muted);
}

/* Trainer dashboard: a topic opens to show which idea the batch is thin on */
.dash-row summary {
    cursor: pointer;
    list-style: none;
}

.dash-row summary::-webkit-details-marker {
    display: none;
}

.dash-row[open] {
    background: var(--paper-2);
    border-radius: var(--radius-sm);
    padding-left: 8px;
    padding-right: 8px;
}

.idea-list {
    margin: 10px 0 2px;
    padding-left: 20px;
    font-size: 13.5px;
    color: var(--ink-2);
}

.idea-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    padding: 3px 0;
}

.idea-list li.idea-cold span:first-child {
    color: var(--muted);
}

.idea-list li.idea-cold .small {
    color: var(--warn);
}

.card.revisit {
    background: var(--rise-bg);
    border-color: var(--rise-line);
    padding: 12px 14px;
}

/* The silence signal, wherever it appears */
.doubt {
    color: var(--warn);
}

/* Code inside an entry: indentation preserved, monospace, never pushing the
   page sideways */
pre.code {
    margin: 4px 0 8px;
    padding: 10px 12px;
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-family: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    line-height: 1.5;
    color: var(--ink);
    white-space: pre;
    overflow-x: auto;
    tab-size: 4;
}

/* The capture box keeps typed indentation visible while writing */
#capture {
    tab-size: 4;
}

/* Code colouring: muted, print-friendly, and deliberately not amber — amber
   stays reserved for growth (the wordmark, the towers, the primary button). */
pre.code {
    border-left: 3px solid var(--line-2);
}

.c-com {
    /* comments: present but quiet */
    color: #7e8c94;
    font-style: italic;
}

.c-str {
    /* strings */
    color: #2e7d4f;
}

.c-kw {
    /* keywords */
    color: #7a4fa3;
    font-weight: 600;
}

.c-fn {
    /* built-ins being called */
    color: #2c6e9b;
}

.c-num {
    /* numbers */
    color: #a8600c;
}

button.link.danger {
    color: var(--muted);
}

button.link.danger:hover {
    color: var(--warn);
}

/* Trainer: batch admin strip, inline move, roster filter */
.batch-edit summary {
    cursor: pointer;
    color: var(--muted);
}

.batch-edit[open] summary {
    color: var(--ink);
    margin-bottom: 6px;
}

.tiny-select {
    font: inherit;
    font-size: 12.5px;
    padding: 1px 4px;
    border: 1px solid var(--line-2);
    border-radius: 5px;
    background: #fff;
    color: var(--muted);
    margin-left: 6px;
}

.find-box {
    width: 100%;
    margin-bottom: 10px;
}

.batch-note {
    color: var(--ink-2);
}

.starts-label {
    color: var(--muted);
}

hr.setup-rule {
    border: none;
    border-top: 1px solid var(--line);
    margin: 18px 0;
}

/* Sign-up: learner or trainer */
.pills {
    display: flex;
    margin-top: 2px;
}

.pill {
    flex: 1;
    text-align: center;
    padding: 9px 10px;
    border: 1px solid var(--line-2);
    background: #fff;
    color: var(--ink-2);
    cursor: pointer;
    font-size: 15px;
}

.pill:first-child {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.pill:last-child {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    border-left: none;
}

.pill input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* The selected pill. .on is set by PHP on load and by the script on click, so
   this works everywhere. The :has() rules below are a bonus for modern
   browsers and are kept SEPARATE — an engine that cannot parse :has() throws
   away the whole rule it appears in, which would take .on down with it. */
.pill.on {
    background: var(--rise-bg);
    border-color: var(--rise);
    color: var(--ink);
    font-weight: 600;
}

.pill:has(input:checked) {
    background: var(--rise-bg);
    border-color: var(--rise);
    color: var(--ink);
    font-weight: 600;
}

.pill:has(input:focus-visible) {
    outline: 2px solid var(--rise);
    outline-offset: 1px;
}

.joining-hint {
    display: block;
    font-weight: 400;
}

/* Hiding is done with a class, not the hidden attribute: .joining-hint sets
   display:block, which beats the browser's own rule for [hidden] in some
   engines. Both are covered here. */
.is-hidden,
.joining-hint[hidden],
.field[hidden] {
    display: none !important;
}

/* ============================================================
   The wordmark as frosted glass
   ------------------------------------------------------------
   A translucent chip: the page shows through it, softened by
   backdrop-filter, with a light top edge and a whisper of a
   shadow. No glow behind it — that read as a second rectangle
   around the mark.

   Browsers without backdrop-filter see a plain white chip,
   which is a perfectly good mark, just flatter.
   ============================================================ */

.mark-stage {
    position: relative;
    display: inline-block;
}

.mark-stage .wordmark {
    position: relative;
    display: inline-block;
    padding: 9px 15px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 2px 8px rgba(28, 43, 51, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px) saturate(1.5);
    -webkit-backdrop-filter: blur(12px) saturate(1.5);
}

.mark-stage .wordmark:hover {
    background: rgba(255, 255, 255, 0.68);
}

@media print {
    /* glass is a screen idea: print the mark flat */
    .mark-stage::before {
        display: none;
    }

    .mark-stage .wordmark {
        background: none;
        border: none;
        box-shadow: none;
        backdrop-filter: none;
    }
}

/* The mark, inside the glass chip, left of the wordmark */
.wordmark .mark-img {
    display: inline-block;
    vertical-align: -4px;
    margin-right: 8px;
    width: 24px;
    height: 24px;
}

/* The parent's consent page: the notice must be readable, not fine print */
.consent-page .notice-text {
    font-size: 15px;
    line-height: 1.65;
    color: var(--ink-2);
    margin: 10px 0 18px;
}

/* ============================================================
   Trainer: enrolling a learner
   Labels above fields, because the column is narrow and a row
   of placeholders wraps into nonsense. The parent block is set
   apart so it reads as a condition, not as more of the same.
   ============================================================ */

.enrol-card .sub {
    margin-bottom: 14px;
}

.enrol-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px 12px;
}

.enrol-field {
    display: block;
    min-width: 0;
}

.enrol-field.wide {
    grid-column: 1 / -1;
}

.enrol-field > span {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 4px;
}

.enrol-field > span .small {
    color: var(--line-2);
}

.enrol-field input {
    width: 100%;
}

.enrol-parent {
    margin-top: 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--rise-line, #f0d5a6);
    border-radius: var(--radius-sm);
    background: var(--paper-2);
}

.enrol-parent-head {
    margin: 0 0 2px;
    font-weight: 600;
    font-size: 14.5px;
    color: var(--ink);
}

.enrol-parent .small {
    margin: 0 0 12px;
}

.enrol-actions {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
}

.attest {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    margin-top: 14px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--ink-2);
}

.attest input {
    margin-top: 3px;
}
