/* ============================================================
   styles.css: the 5x5 grid explainer.
   Layers on top of /css/sbcss-tool.css, which supplies the palette,
   header, footer, nav, and button primitives.
   ============================================================ */

/* White page, not the shared pale blue. */
body {
    background: #ffffff;
}

/* Wide by default. The shared container caps at 1100px, which wastes most of
   a wide monitor on a page whose main object is a 5-column grid. */
main.container {
    max-width: 1700px;
}

section {
    margin-bottom: 2rem;
}

p {
    max-width: 78ch;
}

.note {
    color: var(--sbcss-muted);
    font-size: 0.93rem;
}

/* Instruction line telling the reader what a control will do to the grid. */
.prompt {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--sbcss-blue);
    margin-bottom: 0.5rem;
}

/* Callout for anything still being verified. Tinted panel with a colored
   heading, no edge stripe. */
.flag {
    background: #fdf6e3;
    border: 1px solid #f0dfae;
    border-radius: 10px;
    padding: 14px 18px;
    color: #6b4e00;
    font-size: 0.93rem;
    max-width: none;
}

/* ============================================================
   Indicator picker: every state indicator that has a 5x5 table.
   ============================================================ */
.picker {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 4px 0 18px;
    border-bottom: 2px solid var(--sbcss-border);
    padding-bottom: 10px;
}

.picker-item {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid var(--sbcss-border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--sbcss-blue);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.picker-item:hover {
    background: #f2f8fd;
    border-color: var(--sbcss-blue);
    text-decoration: none;
}

.picker-item.is-on {
    background: var(--sbcss-blue);
    border-color: var(--sbcss-blue-dark);
    color: #ffffff;
}

.picker-item:focus-visible {
    outline: 3px solid var(--sbcss-yellow);
}

/* Second picker row: which of an indicator's published tables to show. Only
   appears for the three indicators that have more than one. */
.picker-variant {
    align-items: center;
    border-bottom: none;
    margin-top: -10px;
    padding-bottom: 4px;
}

.picker-note {
    font-size: 0.85rem;
    color: var(--sbcss-muted);
    margin-right: 4px;
}

.picker-variant .picker-item {
    font-size: 0.83rem;
    padding: 6px 12px;
}

/* ============================================================
   Compact opener. Deliberately short: the working parts of the
   page start immediately below it.
   ============================================================ */
.opener {
    margin-bottom: 1.25rem;
}

.opener-lead {
    max-width: 105ch;
    font-size: 1.02rem;
    margin: 0 0 12px;
}

.key-idea-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.plus {
    font-weight: 700;
    color: var(--sbcss-blue-dark);
    font-size: 1.1rem;
}

/* Small labels that keep the two axes visually distinct everywhere they
   appear, so "Status" and "Change" stop blurring together. */
.axis-chip {
    display: inline-block;
    border-radius: 999px;
    padding: 3px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

/* ADA (2026-11-18, by request): the grey fills were too faint. Status and
   Change are white with a dark 2px outline (text 17.1:1, outline 17.1:1
   against the page); Color stays solid dark (text 17.1:1). Blue is kept for
   links on this page, so none of these are blue. */
.axis-status { background: #ffffff; color: #1a1a2e; border: 2px solid #1a1a2e; }
.axis-change { background: #ffffff; color: #1a1a2e; border: 2px solid #1a1a2e; }
.axis-color  { background: #1a1a2e; color: #ffffff; border: 2px solid #1a1a2e; }

/* ============================================================
   Working area: the calculator and everything that explains it
   scroll on the left, one grid stays pinned on the right.
   ============================================================ */
.explainer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(600px, 47%);
    gap: 44px;
    align-items: start;
}

.grid-sticky {
    /* Clears the sticky site header so the grid never hides behind it. */
    position: sticky;
    top: 88px;
}

.grid-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
}

.grid-title {
    font-weight: 700;
    color: var(--sbcss-blue-dark);
    font-size: 1.05rem;
}

.link-btn {
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--sbcss-blue);
    text-decoration: underline;
    cursor: pointer;
}

/* The calculator is the lead item, so its heading sits flush at the top. */
.lead-section > h2 {
    margin-top: 0;
}

/* The two routes to a color, stated before the inputs. */
.two-ways {
    margin: 8px 0 4px;
    padding-left: 22px;
    max-width: 78ch;
}

.two-ways li {
    margin-bottom: 7px;
}

/* ---- Buttons that focus part of the grid ---- */
.focus-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 8px;
    margin: 10px 0 14px;
}

.focus-btn {
    text-align: left;
    background: #ffffff;
    border: 1px solid var(--sbcss-border);
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.focus-btn:hover {
    background: #f2f8fd;
    border-color: var(--sbcss-blue);
}

.focus-btn:focus-visible {
    outline: 3px solid var(--sbcss-yellow);
}

.focus-btn.is-active {
    background: #e3f0fb;
    border-color: var(--sbcss-blue);
    box-shadow: inset 0 0 0 1px var(--sbcss-blue);
}

.focus-name {
    font-weight: 700;
    color: var(--sbcss-blue-dark);
    font-size: 0.95rem;
}

.focus-rule {
    font-size: 0.84rem;
    color: var(--sbcss-muted);
}

/* ============================================================
   The grid. Sharp edges throughout: no rounded corners anywhere
   on the table.
   ============================================================ */
.grid-wrap {
    overflow-x: auto;
    /* Room for the raised crossing square: its outline and drop shadow sit
       outside the cell, and this container scrolls, so without padding they
       get clipped on the edge squares. */
    padding: 8px;
    margin: -8px;
}

.cast-grid {
    border-collapse: separate;
    border-spacing: 3px;
    width: 100%;
    table-layout: fixed;
}

.cast-grid .corner {
    width: 140px;
    vertical-align: bottom;
    font-size: 0.78rem;
    color: var(--sbcss-muted);
}

.corner-status,
.corner-change {
    display: block;
    font-weight: 700;
}

.cast-grid thead th {
    background: #dcdfe3;
    color: #2f3438;
    border-radius: 0;
    padding: 0;
    font-size: 0.8rem;
    vertical-align: top;
    text-align: center;
}

/* Column headers carry their cut points the same way the row headers do, so
   the numbers live on the grid rather than only in the text beside it. */
.cast-grid thead .th-sub {
    color: #565d64;
    text-align: center;
    font-size: 0.7rem;
    line-height: 1.3;
    margin-top: 3px;
}

.cast-grid tbody th {
    background: #e9ebee;
    color: #2f3438;
    border-radius: 0;
    padding: 0;
    text-align: left;
    vertical-align: middle;
    width: 140px;
}

/* Row and column headers are the primary control: clicking one lights that
   whole band. Clicking it again releases it.

   The control is a real <button> INSIDE the th rather than role="button" on
   the th itself, because that role replaces the columnheader/rowheader role
   and takes table navigation away from screen reader users. The button also
   brings native Enter and Space handling. */
.th-click {
    cursor: pointer;
    transition: background-color 0.12s ease;
}

.th-btn,
.cell-btn {
    display: block;
    width: 100%;
    background: none;
    border: none;
    margin: 0;
    font: inherit;
    color: inherit;
    text-align: inherit;
    cursor: pointer;
}

.cast-grid thead .th-btn { padding: 9px 7px; }
.cast-grid tbody .th-btn { padding: 9px 12px; }
.cell-btn { padding: 22px 6px; }

.th-btn:focus-visible,
.cell-btn:focus-visible {
    outline: 3px solid #1a1a2e;
    outline-offset: -3px;
}

.cell-btn:focus-visible {
    outline-color: #ffffff;
}

.cast-grid thead th.th-click:hover { background: #cbcfd4; }
.cast-grid tbody th.th-click:hover { background: #d8dbdf; }

/* The header the reader actually clicked, as opposed to one that merely is not
   dimmed. Matters because the two axes accumulate: pick a row, then a column. */
.cast-grid tbody th.is-picked,
.cast-grid thead th.is-picked {
    background: #3c4247;
    color: #ffffff;
}

.cast-grid th.is-picked .th-sub {
    color: rgba(255, 255, 255, 0.85);
}

.cast-grid tbody th.is-picked:hover,
.cast-grid thead th.is-picked:hover { background: #2c3135; }

.th-click:focus-visible {
    outline: 3px solid #2f3438;
    outline-offset: -3px;
}

.th-main {
    display: block;
    font-weight: 700;
    font-size: 0.86rem;
}

.th-sub {
    display: block;
    font-weight: 400;
    font-size: 0.74rem;
    color: #5a6169;
    margin-top: 2px;
}

.cell {
    background: var(--cell-bg);
    color: var(--cell-fg);
    border-radius: 0;
    text-align: center;
    padding: 0;
    font-weight: 700;
    /* The color name is always printed in the square. Nobody should have to
       distinguish these by hue alone. */
    font-size: 0.9rem;
    transition: opacity 0.15s ease, filter 0.15s ease;
}

.cell:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: -3px;
}

/* ---- Focus mode ----------------------------------------------------------
   The picked band is marked by an OUTLINE, not by how light everything else
   is. That is forced by the palette, not a stylistic preference: yellow sits
   at maximum lightness, so a lightened yellow lands within a 1.04 contrast
   ratio of full yellow and cannot be told apart by fill at all. Orange is
   nearly as bad at 1.81. An outline reads the same on all six colors.

   Out-of-focus squares take a pale 12% tint of their OWN color, so a faded
   Blue still reads as Blue, with a lighter label weight so they sit back.
   Their only job is to stay legible and out of the way; the outline does the
   work of showing what is picked. */
.cast-grid.has-focus .cell.is-dim {
    background: var(--cell-dim);
    color: #565d64;
    font-weight: 400;
}

/* Squares on the picked row and column: a thin guide line, deliberately quiet.
   These are context, not the answer, so they get the least treatment that
   still separates them from the pale background. */
.cast-grid.has-focus .cell.is-cross,
.cast-grid.has-focus.one-axis .cell.is-lit {
    box-shadow: inset 0 0 0 2px rgba(26, 26, 46, 0.45);
}

/* Both axes picked: the crossing square is the answer, so it is raised OUT of
   the grid rather than ringed inside it. An inset ring eats into the fill and
   makes the square read as smaller, which is the opposite of emphasis. An
   outer outline plus a drop shadow makes it read as bigger and lifted, and it
   works the same on all six colors. */
.cast-grid.has-focus:not(.one-axis) .cell.is-lit {
    position: relative;
    z-index: 2;
    outline: 4px solid #1a1a2e;
    outline-offset: 2px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.cast-grid.has-focus:not(.one-axis) .cell.is-lit .cell-color {
    font-size: 1.05rem;
}

.cast-grid:not(.has-focus) .cell:hover {
    filter: brightness(1.08);
}

/* Small-school view: the two extreme Change columns come out entirely.
   Which columns those are differs by indicator (the lower-is-better grids
   print theirs in the opposite order), so PHP marks them rather than the
   stylesheet naming them. */
.cast-grid.mode-3x5 .cell-outer,
.cast-grid.mode-3x5 thead th[data-outer="1"] {
    display: none;
}

/* N/A squares are published gray. They are not a performance level, so they
   get a muted, non-clickable-looking treatment. */
.cell-na {
    font-style: italic;
    font-weight: 600;
}

/* ---- Readout under the grid ---- */
.cell-readout {
    min-height: 150px;
    background: #ffffff;
    border: 1px solid var(--sbcss-border);
    border-radius: 12px;
    padding: 16px 20px;
    margin-top: 10px;
}

.readout-empty {
    color: var(--sbcss-muted);
    margin: 0;
}

.readout-inner {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.readout-lane {
    display: block;
}

.readout-color {
    flex-shrink: 0;
    border-radius: 0;
    padding: 16px 22px;
    font-weight: 700;
    font-size: 1.05rem;
    min-width: 110px;
    text-align: center;
}

.readout-text p { max-width: none; }

.readout-lead {
    margin: 0 0 8px;
    font-size: 1rem;
}

.readout-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 26px;
    margin: 0 0 8px;
    font-size: 0.88rem;
}

.readout-part {
    display: flex;
    align-items: center;
    gap: 8px;
}

.readout-detail-text {
    margin: 0 0 10px;
    font-size: 0.92rem;
}

.readout-meaning {
    margin: 0;
    color: var(--sbcss-muted);
    font-size: 0.9rem;
}

/* Prompt for the second click when only one axis is picked so far. */
.readout-next {
    margin: 10px 0 0;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--sbcss-blue);
}

/* Row of results read off the lit row or column. */
.lane {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lane-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: center;
    flex: 1 1 90px;
}

.chip {
    display: block;
    width: 100%;
    text-align: center;
    padding: 6px 8px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 0;
}

.lane-label {
    font-size: 0.72rem;
    color: var(--sbcss-muted);
    text-align: center;
    line-height: 1.25;
}

/* ---- 3x5 toggle ---- */
.toggle-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin: 10px 0 14px;
}

/* ============================================================
   Calculator. Sits directly beside the grid, so it stacks its
   own parts rather than competing for horizontal room.
   ============================================================ */
.calc {
    background: #ffffff;
    border: 1px solid var(--sbcss-border);
    border-radius: 12px;
    padding: 20px 24px;
    margin-top: 12px;
}

.calc-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.calc-field label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: var(--sbcss-blue-dark);
}

.calc-field input {
    width: 100%;
    font-family: inherit;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 9px 12px;
    border: 2px solid var(--sbcss-border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--sbcss-text);
}

.calc-field input:focus {
    outline: none;
    border-color: var(--sbcss-blue);
}

.calc-hint {
    font-size: 0.85rem;
    color: var(--sbcss-muted);
    max-width: none;
    margin: 8px 0 0;
}

.calc-results {
    display: grid;
    /* Last year | This year | Next year: three equal thirds. The arrows sit on
       the column boundaries (absolutely placed), so they take no width. */
    grid-template-columns: repeat(3, minmax(0, 1fr));
    position: relative;
    gap: 24px;
    align-items: start;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--sbcss-border);
}

.calc-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--sbcss-muted);
    margin: 0 0 8px;
    max-width: none;
}

/* The timeline's year numbers and the arrows between them. */
.calc-num {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--sbcss-blue-dark);
    margin: 0 0 8px;
    max-width: none;
}
.calc-arrow {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.4rem;
    color: var(--sbcss-muted);
    pointer-events: none;
}
.calc-arrow:nth-of-type(2) { left: calc(100% / 3); }
.calc-arrow:nth-of-type(4) { left: calc(200% / 3); }
.calc-label-sub {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    margin-left: 6px;
}

.calc-color {
    border-radius: 0;
    padding: 20px;
    text-align: center;
    font-weight: 700;
    font-size: 1.4rem;
}

.calc-because {
    font-size: 0.88rem;
    margin: 10px 0 0;
    max-width: none;
}

.calc-empty { color: var(--sbcss-muted); }

/* Each rung is one target color and what it would take to get there. */
.rung {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 6px 14px;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid var(--sbcss-border);
}

.rung:last-of-type { border-bottom: none; }

.rung-color {
    border-radius: 0;
    padding: 7px 10px;
    text-align: center;
    font-weight: 700;
    font-size: 0.85rem;
    grid-row: span 2;
}

.rung-need {
    font-weight: 700;
    color: var(--sbcss-blue-dark);
    font-size: 0.95rem;
    align-self: end;
}

.rung-delta {
    color: var(--sbcss-muted);
    font-size: 0.86rem;
    align-self: start;
}

.rung-out .rung-need {
    color: var(--sbcss-muted);
    font-weight: 400;
}

.calc-footnote {
    margin: 14px 0 0;
    font-size: 0.85rem;
    color: var(--sbcss-muted);
    max-width: none;
}

/* ============================================================
   Responsive: stack, and let the grid scroll normally.
   ============================================================ */
@media (max-width: 1150px) {
    .explainer {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .grid-sticky {
        position: static;
    }
    .cast-grid {
        min-width: 760px;
    }
}

@media (max-width: 700px) {
    .calc-inputs,
    .calc-results {
        grid-template-columns: 1fr;
    }
    .calc-arrow { display: none; }   /* stacked columns: the year labels carry the order */
    .readout-inner {
        flex-direction: column;
    }
    .rung {
        grid-template-columns: 1fr;
    }
    .rung-color {
        grid-row: auto;
    }
}

/* District / charter lookup above the calculator. */
.lea-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 4px 0 10px; }
.lea-pick label { font-weight: 600; }
.lea-pick select { flex: 1 1 280px; max-width: 460px; padding: 6px 8px; font: inherit; border: 1px solid var(--sbcss-border); }
.lea-note { margin: 0 0 12px; font-size: 0.9rem; max-width: none; }

/* Last-year and this-year color boxes: original height and text, but NARROWER
   than their column, so they read as a color swatch rather than a banner
   (2026-10-02, "less wide"). */
.calc-last .calc-color, .calc-now .calc-color { max-width: 150px; }

/* Next-year rungs below today's color: same layout, quieter text. */
.rung-down .rung-need { color: var(--sbcss-muted); }

/* Timeline headers and dividers (2026-10-02): each column is headed by its
   school year, large and bold, with a rule between columns. Gap is zero so the
   rules (and the arrows on them) sit exactly on the thirds. */
.calc-results { column-gap: 0; }
.calc-results > .calc-last,
.calc-results > .calc-now,
.calc-results > .calc-ladder { padding: 0 18px; min-width: 0; }
.calc-results > .calc-last { padding-left: 0; }
.calc-results > .calc-ladder { padding-right: 0; }
.calc-results > .calc-now,
.calc-results > .calc-ladder { border-left: 1px solid var(--sbcss-border); }
.calc-year {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--sbcss-blue-dark);
    text-transform: none;
    letter-spacing: 0;
    margin: 0 0 10px;
}
/* The arrow sits ON the divider, on a white chip so the rule passes behind it. */
.calc-arrow { background: #ffffff; padding: 2px 4px; line-height: 1; }
@media (max-width: 700px) {
    .calc-results > .calc-last,
    .calc-results > .calc-now,
    .calc-results > .calc-ladder { padding: 14px 0 0; border-left: 0; }
    .calc-results > .calc-now,
    .calc-results > .calc-ladder { border-top: 1px solid var(--sbcss-border); }
}

/* TEXT COLOR RULE (2026-10-02): blue is for LINKS ONLY. Every other piece of
   text that used to be blue (headings, labels, numbers, years, targets, card
   titles, prompts) is the body text color. Links keep their blue: the
   indicator/table pickers (.picker-item) and link-styled buttons (.link-btn).
   Declared last so it wins over the rules above and over the sitewide h2/h3
   blue in /css/sbcss-tool.css, without editing that shared file. */
main h1, main h2, main h3,
.prompt, .plus, .grid-title, .focus-name, .readout-next,
.calc-field label, .calc-num, .calc-year, .rung-need {
    color: var(--sbcss-text, #1a1a2e);
}

/* District / charter and School menus on their own rows, labels in one column
   and the menus lined up in the next, same width (2026-10-05). */
.lea-pick {
    display: grid;
    grid-template-columns: max-content minmax(0, 460px);
    align-items: center;
    gap: 8px 12px;
}
.lea-pick select { width: 100%; max-width: none; }
.lea-pick noscript { grid-column: 2; }
@media (max-width: 700px) {
    .lea-pick { grid-template-columns: 1fr; }
    .lea-pick noscript { grid-column: auto; }
}

/* The readout under the grid only carries the one-header hint now; with
   nothing in it, it takes no space. */
.cell-readout:empty { display: none; }

/* Grid corner (2026-10-05): "Change ->" sits on the right edge of the corner,
   up against the first Change column and centred vertically, so it reads as
   labelling the columns. "Status" stays bottom-left over the Status rows.
   Arrows thickened with a text stroke (the font's arrow has no bold weight). */
.cast-grid .corner { position: relative; }
.corner-change {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
}
.corner-arrow {
    font-size: 1.15em;
    -webkit-text-stroke: 0.7px currentColor;
}

/* Next-year rows carry no second line now: centre the range on its swatch. */
.rung-delta:empty { display: none; }
.rung:has(.rung-delta:empty) .rung-need { align-self: center; }

/* Grid heading: the fixed title, and the picked square on the line under it. */
.grid-heading { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.grid-sub { font-size: 0.92rem; color: var(--sbcss-text, #1a1a2e); }
.grid-sub:empty { display: none; }

/* Grid heading: nothing shares a line (2026-10-05). The head stacks: title,
   Dashboard line, picked square, then "Show the whole grid". */
.grid-head { flex-direction: column; align-items: flex-start; gap: 6px; }
.grid-title-2 { font-size: 0.95rem; color: var(--sbcss-text, #1a1a2e); }

/* Grid heading centred over the table; buttons under the table (2026-10-05). */
.grid-head { align-items: center; text-align: center; }
.grid-heading { align-items: center; }
.grid-foot { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 12px 0 4px; }
.grid-foot .link-btn[hidden] { display: none; }
/* Table description: for screen readers only (it was showing on screen). */
.cast-grid caption.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Indicator tabs the picked LEA has no result for: dimmed, still clickable. */
.picker-item.is-empty { opacity: 0.45; }
.picker-item.is-empty.is-on { opacity: 0.7; }

/* Inner Change headers: the 5x5 range normally, the open-ended 3x5 range when
   the three-by-five is showing. */
.cast-grid .th-sub-3x5 { display: none; }
.cast-grid.mode-3x5 .th-sub-3x5 { display: block; }
.cast-grid.mode-3x5 .th-sub-5x5 { display: none; }

/* Indicator buttons all the same width (2026-10-29), sized to fit the longest
   label ("College/Career"). The table picker under it keeps natural widths. */
.picker:not(.picker-variant) .picker-item {
    box-sizing: border-box;
    width: 9.5rem;
    padding-left: 8px;
    padding-right: 8px;
    text-align: center;
}
@media (max-width: 700px) {
    .picker:not(.picker-variant) .picker-item { width: calc(50% - 3px); }
}

/* ============================================================
   MENU BAR on indicator pages (2026-11-18): indicator, district or
   charter, school and student group, four equal menus across the top.
   Two per row on tablets, one per row on phones.
   ============================================================ */
.fbf-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 16px;
    align-items: end;
    margin: 4px 0 18px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--sbcss-border);
}
.fbf-bar-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fbf-bar-field label { font-weight: 600; font-size: 0.9rem; }
.fbf-bar select {
    width: 100%;
    padding: 8px 10px;
    font: inherit;
    border: 1px solid var(--sbcss-border);
    border-radius: 8px;
    background: #ffffff;
}
.fbf-bar select:disabled { background: #f4f6f8; color: var(--sbcss-muted); }
.fbf-bar select:focus-visible { outline: 3px solid var(--sbcss-yellow); outline-offset: 1px; }
.fbf-bar noscript { grid-column: 1 / -1; }
@media (max-width: 1000px) { .fbf-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .fbf-bar { grid-template-columns: 1fr; } }

/* ============================================================
   LANDING PAGE (2026-11-18)
   ============================================================ */
/* Indicator buttons spread evenly across the full width. */
.fbf-ind-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 10px;
    margin: 4px 0 26px;
    padding-bottom: 18px;
    border-bottom: 2px solid var(--sbcss-border);
}
.fbf-ind-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 3rem;
    padding: 10px 8px;
    border: 1px solid var(--sbcss-border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--sbcss-blue);
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
}
.fbf-ind-btn:hover { background: #f2f8fd; border-color: var(--sbcss-blue); text-decoration: none; }
.fbf-ind-btn:focus-visible { outline: 3px solid var(--sbcss-yellow); }
@media (max-width: 1100px) { .fbf-ind-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .fbf-ind-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Explanation on the left, the example grid on the right; stacked below 1100px. */
.fbf-landing {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}
@media (max-width: 1100px) { .fbf-landing { grid-template-columns: 1fr; } }
.fbf-list { padding-left: 1.2rem; max-width: 78ch; }
.fbf-list li { margin-bottom: 6px; }
.fbf-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.fbf-swatch { padding: 6px 14px; border-radius: 6px; font-weight: 700; font-size: 0.9rem; }

.fbf-example { margin: 0; position: sticky; top: 16px; }
@media (max-width: 1100px) { .fbf-example { position: static; } }
/* The example grid reuses .cast-grid (the indicator pages' grid). These only
   stand in for the padding its buttons give the headers and squares. */
.fbf-ex-title { font-weight: 700; margin: 0 0 10px; max-width: none; }
.fbf-ex-th { display: block; }
.fbf-ex-grid thead .fbf-ex-th { padding: 9px 7px; }
.fbf-ex-grid tbody .fbf-ex-th { padding: 9px 12px; }
.fbf-ex-cell { display: block; padding: 22px 6px; }
.fbf-example figcaption { margin-top: 12px; }

/* The "5x5 Overview" tab beside Home (2026-11-18): the shared tabs are a fixed
   7rem, which this label overflowed. This one sizes to its text, never
   narrower than its neighbor. */
.page-nav-link.page-nav-fit { width: auto; min-width: 7rem; }
@media (max-width: 480px) { .page-nav-link.page-nav-fit { min-width: 0; } }

/* Two-line axis chips (2026-11-18): a small label (Status, Change, Color) over
   the plain words, in the "result + change = color" line. */
.axis-chip.axis-chip-2 {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    border-radius: 10px;
    padding: 6px 14px;
    line-height: 1.25;
}
/* The term is the point (2026-11-18, by request): Status / Change / Color are
   the big words, and the plain definition sits under them in regular weight. */
.axis-chip-2 .chip-label {
    font-size: 1.15rem;
    font-weight: 800;
}
.axis-chip-2 .chip-text { font-size: 0.88rem; font-weight: 500; }

/* Walkthrough under the overview's example grid (2026-11-18): Play / Pause and
   a live caption. The caption keeps a fixed minimum height so the page does
   not jump as the text changes. */
.fbf-walk { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 16px; margin-top: 14px; }
.fbf-walk .secondary-btn { flex: 0 0 auto; }
.fbf-walk-caption { flex: 1 1 260px; margin: 0; min-height: 4.2em; font-size: 0.98rem; max-width: none; }
.fbf-walk-count { font-weight: 700; }
.fbf-ex-grid .cell, .fbf-ex-grid th { transition: background-color 0.35s ease, box-shadow 0.35s ease, outline-color 0.35s ease; }
@media (prefers-reduced-motion: reduce) {
    .fbf-ex-grid .cell, .fbf-ex-grid th { transition: none; }
}

/* ============================================================
   PAPER-AND-PENCIL WALKTHROUGH (2026-11-18, js/landing.js)
   A note card, pencil outlines and pencil lines drawn over the
   example grid. The stage is the positioning box for all three.
   ============================================================ */
.fbf-walk-bar { margin: 4px 0 10px; }
.fbf-stage { position: relative; }
/* Space above the grid where the note card parks. Opens when Play is pressed. */
.fbf-dock { height: 0; transition: height 0.6s ease; }
.fbf-stage.is-playing .fbf-dock { height: 12.5rem; }
.fbf-pencil {
    position: absolute;
    left: 0;
    top: 0;
    pointer-events: none;
    z-index: 4;
    overflow: visible;
}
.pencil-rect {
    fill: rgba(253, 224, 71, 0.22);
    stroke: #1a1a2e;
    stroke-width: 3;
    stroke-linejoin: round;
    transition: opacity 0.5s ease;
}
.pencil-line {
    stroke: #1a1a2e;
    stroke-width: 3;
    stroke-linecap: round;
    transition: opacity 0.6s ease;
}
.fbf-pencil .is-faded { opacity: 0; }

/* The note card: paper-white, dark outline, numbers in even columns. */
.fbf-card {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 3;
    width: 300px;
    box-sizing: border-box;
    padding: 12px 14px;
    background: #fffef7;
    color: #1a1a2e;
    border: 2px solid #1a1a2e;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    font-variant-numeric: tabular-nums;
    opacity: 0;
}
.fbf-card[hidden] { display: none; }
.fbf-card-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 3px 4px;
    font-size: 1rem;
    clip-path: inset(0 100% 0 0);
}
.fbf-card-row b { font-weight: 800; white-space: nowrap; }
.fbf-card-rule {
    height: 2px;
    margin: 6px 4px;
    background: #1a1a2e;
    transform: scaleX(0);
    transform-origin: left center;
}
.fbf-card-color { margin-top: 4px; }

/* The answer square grows a little as the two lines meet on it. */
.fbf-ex-grid .cell { transition: background-color 0.5s ease, box-shadow 0.5s ease, transform 0.6s ease; }
.fbf-ex-grid .cell.is-pop { transform: scale(1.12); }

.fbf-walk-caption { margin: 12px 0 0; min-height: 3em; font-size: 0.98rem; max-width: none; }

@media (prefers-reduced-motion: reduce) {
    .fbf-dock, .fbf-ex-grid .cell, .pencil-rect, .pencil-line { transition: none; }
}

/* Bigger, bolder thinking (2026-11-18, by request): the numbers on the card and
   the question at each row and column are the point, so they are the biggest
   text in the walkthrough. */
.fbf-card { width: 360px; padding: 14px 18px; }
.fbf-card-row { font-size: 1.05rem; padding: 4px 4px; }
.fbf-card-row b { font-size: 1.35rem; font-weight: 900; }
.fbf-card-math b { display: inline-flex; align-items: baseline; gap: 2px; }
.fbf-card .m-expr { font-size: 1.1rem; font-weight: 700; }
.fbf-card .m-res {
    font-size: 1.9rem;
    font-weight: 900;
    padding: 0 4px;   /* no highlighter (2026-11-18: it looked off); size and weight carry it */
}
.fbf-stage.is-playing .fbf-dock { height: 15rem; }

/* The question bubble beside the row (or under the column) being checked: a
   small two-column table that never wraps (2026-11-18). Labels regular weight,
   numbers bold and right-aligned so they read straight down. */
.fbf-think {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: auto auto;
    column-gap: 18px;
    row-gap: 4px;
    align-items: baseline;
    padding: 12px 18px;
    background: #ffffff;
    color: #1a1a2e;
    border: 2px solid #1a1a2e;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    pointer-events: none;
}
.fbf-think[hidden] { display: none; }
.fbf-think-k { font-size: 1rem; font-weight: 500; color: #3c4247; }
.fbf-think-v { font-size: 1.25rem; font-weight: 700; text-align: right; }
.fbf-think-a { min-height: 1.25em; }
.fbf-think-a.is-yes { color: #006500; }   /* 7.3:1 on white, with a check mark and the word */
.fbf-think-a.is-no  { color: #a20000; }   /* 8.3:1 on white, with an x mark and the word */

/* Signs on numbers as small raised marks: "+1.6", "(−32.0)". */
.fbf-sign {
    font-size: 0.6em;
    vertical-align: 0.5em;
    line-height: 0;
    margin-right: 1px;
    font-weight: 800;
}
.pencil-arrowhead { fill: #1a1a2e; }

/* The note card as subtraction on paper (2026-11-18): label | sign | number.
   The rule spans the sign and number columns only, never the labels. */
.fbf-card {
    display: grid;
    grid-template-columns: auto 1.4rem auto;
    column-gap: 10px;
    row-gap: 6px;
    align-items: baseline;
    width: auto;
    min-width: 300px;
}
.fbf-card-k { font-size: 1rem; font-weight: 500; color: #3c4247; white-space: nowrap; }
.fbf-card-k-change, .fbf-card-k-color { font-weight: 700; color: #1a1a2e; }
.fbf-card-op { font-size: 1.5rem; font-weight: 700; text-align: center; line-height: 1; }
.fbf-card-v { font-size: 1.4rem; font-weight: 800; text-align: right; white-space: nowrap; }
.fbf-card .m-res { font-size: 1.9rem; font-weight: 900; padding: 0; }
.fbf-card .fbf-card-rule {
    grid-column: 2 / 4;
    height: 2px;
    margin: 2px 0 4px;
    background: #1a1a2e;
    transform: none;
}
.fbf-card-k-color { margin-top: 6px; }

/* No-jump layout (2026-11-18). Card: label | number, the number column a fixed
   width with the minus sign inside it beside the number; the rule spans only
   the number column. */
.fbf-card { grid-template-columns: auto 8rem; column-gap: 18px; min-width: 0; }
.fbf-card-v { display: block; text-align: right; font-size: 1.4rem; font-weight: 800; white-space: nowrap; }
.fbf-card-v b { font-weight: inherit; }
.fbf-card-v .fbf-card-op { display: inline-block; font-size: 1.4rem; font-weight: 700; margin-right: 0.45em; }
.fbf-card .fbf-card-rule { grid-column: 2; }

/* Thought bubble: fixed width, every line in place before it shows, and the
   answer line keeps its space while it waits, so nothing moves. */
.fbf-think {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 23rem;
    box-sizing: border-box;
    white-space: normal;
}
.fbf-think-top { display: flex; justify-content: space-between; align-items: baseline; }
.fbf-think-top .fbf-think-k { font-size: 1rem; font-weight: 600; color: #3c4247; }
.fbf-think-q { font-size: 1rem; font-weight: 600; line-height: 1.35; }
.fbf-think-range { display: flex; align-items: center; justify-content: center; gap: 10px; }
.fbf-think-v { font-size: 1.3rem; font-weight: 800; white-space: nowrap; text-align: left; }
.fbf-think-more { font-size: 1rem; font-weight: 600; color: #3c4247; white-space: nowrap; }
.fbf-think-arrow { flex: 0 0 auto; }
.fbf-think-arrow path { fill: none; stroke: #1a1a2e; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.fbf-think-a { font-size: 1.4rem; font-weight: 900; text-align: center; min-height: 1.4em; }
.fbf-think-a.is-waiting { visibility: hidden; }

/* 2026-11-18 round: a little air around each raised sign; the dock opens in
   step with the card's glide; bounce and "Now subtract!" pop; everything that
   animates stops while paused. */
.fbf-sign { margin-left: 0.25em; margin-right: 0.12em; }
.fbf-dock { transition: height 1.3s cubic-bezier(0.65, 0, 0.35, 1); }
.fbf-card-v b, .fbf-card-v .fbf-card-op { display: inline-block; transform-origin: center; }
@keyframes fbf-bounce {
    0%   { transform: scale(1); }
    25%  { transform: scale(1.45); }
    45%  { transform: scale(0.9); }
    65%  { transform: scale(1.18); }
    82%  { transform: scale(0.97); }
    100% { transform: scale(1); }
}
.is-bounce { animation: fbf-bounce 1s cubic-bezier(0.3, 0, 0.3, 1); }

.fbf-callout {
    position: absolute;
    z-index: 6;
    padding: 10px 22px;
    background: #1a1a2e;
    color: #ffffff;
    border-radius: 12px;
    font-size: 1.7rem;
    font-weight: 900;
    white-space: nowrap;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
    pointer-events: none;
    opacity: 0;
}
.fbf-callout[hidden] { display: none; }
@keyframes fbf-pop {
    0%   { opacity: 0; transform: scale(0.4); }
    55%  { opacity: 1; transform: scale(1.15); }
    75%  { transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}
.fbf-callout.is-pop { animation: fbf-pop 0.7s cubic-bezier(0.3, 0, 0.3, 1) forwards; }
@keyframes fbf-fade { from { opacity: 1; } to { opacity: 0; } }
.fbf-callout.is-pop.is-gone { animation: fbf-fade 0.4s ease forwards; }

.fbf-stage.is-paused * { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
    .is-bounce { animation: none; }
    .fbf-callout.is-pop { animation: none; opacity: 1; }
    .fbf-callout.is-pop.is-gone { animation: none; opacity: 0; }
    .fbf-dock { transition: none; }
}

/* The number inside the question, "Is +6.5 between these two numbers?":
   big and bold, with room on both sides. */
.fbf-think-q { font-size: 1.1rem; }
.fbf-think-num { display: inline-block; margin: 0 0.3em; font-size: 1.4rem; vertical-align: baseline; }

/* Example grid: the cut points are what a learner needs to read, so they are
   full-size here (2026-11-18). While the walkthrough checks a row or column,
   that header's cut points light up (yellow, bold) and bounce: that is where
   the bubble's two numbers come from. */
.fbf-ex-grid .th-main { font-size: 0.95rem; }
.fbf-ex-grid .th-sub,
.fbf-ex-grid thead .th-sub { font-size: 0.9rem; line-height: 1.35; color: #2f3438; margin-top: 4px; }


/* Flashing the cut points (2026-11-18): just the numbers, never the words.
   They grow and blink for about a second using transform and opacity only,
   so no row or column changes size and the grid stays still. */
.fbf-ex-grid .cut { display: inline-block; position: relative; transform-origin: center; }
@keyframes fbf-flash {
    0%   { transform: scale(1);   opacity: 1; }
    15%  { transform: scale(1.5); opacity: 0.3; }
    30%  { transform: scale(1.5); opacity: 1; }
    45%  { transform: scale(1.5); opacity: 0.3; }
    62%  { transform: scale(1.5); opacity: 1; }
    100% { transform: scale(1);   opacity: 1; }
}
.fbf-ex-grid .cut.is-flash { animation: fbf-flash 1.2s ease-in-out; z-index: 1; }
@media (prefers-reduced-motion: reduce) {
    .fbf-ex-grid .cut.is-flash { animation: none; text-decoration: underline 2px; }
}
/* The indicator pages enlarge the picked square's label, which would make its
   row taller here; on the example grid it keeps one size. */
.fbf-ex-grid.has-focus:not(.one-axis) .cell.is-lit .cell-color { font-size: inherit; }

/* "Now subtract!" sits INSIDE the card, over the lines that are still blank
   (Change and Color) while it shows. */
.fbf-card .fbf-callout {
    left: 0;
    right: 0;
    bottom: 14px;
    top: auto;
    width: max-content;
    margin: 0 auto;
    padding: 8px 18px;
    font-size: 1.45rem;
    z-index: 2;
}

/* No tinted "highlighter" fills (2026-11-18: the yellow wash over gray read as
   brown). Focus is shown by a crisp dark outline with a soft shadow that lifts
   it off the grid, and the note card is plain white. */
.pencil-rect {
    fill: none;
    stroke: #1a1a2e;
    stroke-width: 3.5;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.35));
}
.fbf-card { background: #ffffff; }

/* While a header's numbers grow, its words fade almost away and each number
   sits on a solid white chip, so the enlarged numbers are the only thing to
   read there. Color and shadow only: nothing changes size. */
.fbf-ex-grid .th-sub { transition: color 0.25s ease; }
.fbf-ex-grid .th-sub.is-flashing { color: rgba(47, 52, 56, 0.12); }
.fbf-ex-grid .th-sub.is-flashing .cut {
    color: #1a1a2e;
    background: #ffffff;
    border-radius: 4px;
    box-shadow: 0 0 0 3px #ffffff, 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* Numbers closer to their labels (2026-11-18): a narrower number column, just
   wide enough for the longest value ("Orange", "+15.9"), still fixed so
   nothing shifts as numbers are written in. */
.fbf-card { grid-template-columns: auto 6.2rem; column-gap: 14px; width: auto; }

/* The flash stays inside its header cell (2026-11-18): a smaller grow (1.3x)
   fits within the header's padding, and the pencil outline now sits outside
   the cell (js: pad 7px), so it never crosses the flashing numbers. */
@keyframes fbf-flash {
    0%   { transform: scale(1);   opacity: 1; }
    15%  { transform: scale(1.3); opacity: 0.3; }
    30%  { transform: scale(1.3); opacity: 1; }
    45%  { transform: scale(1.3); opacity: 0.3; }
    62%  { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(1);   opacity: 1; }
}
