/* =============================================================================
   Lunch at TJ — application stylesheet
   =============================================================================

   ONE file, four layers, marked by the section comments below. Not four files:
   there is no build step in this project to concatenate them, four <link>s
   multiply requests on a phone and multiply the cache-busting surface, and the
   layer discipline is enforced by review rather than by the filesystem.
   [Step 9b, 2026-10-16] The ONE exception: the TOKENS layer is its own file,
   app-tokens.css, linked before this one, so that a page can take the tokens
   without these rules (shared/login.html, step 9d).

   Layer order is cascade order. Later layers may override earlier ones; the
   reverse is a bug. Within a layer, keep declarations in the order a reader
   would look for them, not in the order they were written.

   Populated in steps, so that a visual regression is always attributable:

     step 1  TOKENS      <- this commit. Nothing consumes them yet, by design.
     step 2  (no CSS)       the screen- and area- identifiers on <body>
     step 3  BASE,
             COMPONENTS  the two already-global blocks, relocated byte-identical
     step 4  PAGES       the 21 page-scoped blocks, in batches

   Steps 1 and 2 ship together and NEITHER MAY CHANGE A PIXEL. Every rule here
   is inert until step 3 begins, which is what makes a visual difference after
   this deploy an unambiguous regression rather than a judgement call.
   ============================================================================= */


/* ============================== TOKENS ============================== */
/* In app/static/css/app-tokens.css since step 9b: :root only, linked before
   this file by every page that links this one. app.css holds no :root. */


/* =============================== BASE =============================== */
/* Element defaults, relocated from shared/base.html in step 3. A closed list
   of four rules -- *, body, a, a:hover -- not a pattern to extend. Several
   element-anchored selectors under COMPONENTS (.form-group input,
   .data-table th) are components rather than defaults. */

/* ---------- Reset & Base ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--surface-page);
    color: var(--text-primary);
    line-height: 1.6;
}

a {
    color: var(--brand-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}


/* ============================ COMPONENTS ============================ */
/* shared/base.html's 53 remaining rules, then shared/base_app.html's 14,
   both in source order, relocated in step 3. Relative order is unchanged
   from the concatenation of the two blocks in cascade order. Four pairs here
   are equal-specificity and therefore order-decided. Three set disjoint
   properties, so their order is immaterial -- measured 2026-09-15 at
   6dc656cb1d60. The fourth is real: the :focus group (:453) sets
   border-color, and the input[type="checkbox"]/[type="radio"] group (:489)
   carries border: none, which resets the same four longhands. See that
   rule's own comment, which says not to move it above the :focus rule and is
   correct. Keep source order regardless -- it costs nothing and removes a
   class of reasoning error. Rules moved as they were, including the
   .form-group input rule that breaks checkbox rendering on three admin
   screens. Named follow-up, not an inline fix. */

/* ---------- Navigation ---------- */
.navbar {
    background-color: var(--brand-primary);
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    color: var(--app-text-on-brand);
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.navbar-brand:hover {
    text-decoration: none;
    color: var(--app-text-on-brand);
}

/* The school mark, inline in shared/base_app.html with fill="currentColor".
   White, the same literal as the brand text. 30px keeps it inside the
   brand's 30.72px line box (1.2rem x 1.6), so the navbar stays 54.72px tall;
   anything above 30.72px grows the navbar and moves every element below it. */
.navbar-mark {
    height: 30px;
    width: auto;
    flex: none;
    color: var(--app-text-on-brand);
}

.navbar-links {
    display: flex;
    gap: 0.75rem 1.5rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* The phone Menu button (shared/base_app.html): never shown at desktop. The
   narrow block above the print rule shows it once the navbar script has
   given it navbar-menu-ready. */
.navbar-menu-button {
    display: none;
}

/* The Cart link (shared/base_app.html; Samuel, 2026-11-05): outside every
   dropdown, after the Menu button and before .navbar-links. At desktop it
   reads "Cart" with the gold count badge (.nav-cart-badge, below), just left
   of the links: margin-left auto takes the navbar's free space, so the brand
   stays left. The nav links' colour and size, gold on hover, and the 3px
   gold focus ring of the toggles. The icon is the phone's; the narrow block
   shows it, gated on navbar-menu-ready. */
.navbar-cart {
    margin-left: auto;
    margin-right: 1.5rem;
    color: var(--app-nav-link-text);
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
}

.navbar-cart:hover {
    color: var(--accent-gold);
    text-decoration: none;
}

.navbar-cart:focus-visible {
    outline: 3px solid var(--accent-gold);
}

.navbar-cart-icon {
    display: none;
}

/* ---------- Nav Dropdown ---------- */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    cursor: pointer;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--app-nav-dropdown-bg);
    border-radius: 4px;
    box-shadow: var(--app-shadow-nav-dropdown);
    min-width: 180px;
    padding: 0.4rem 0;
    margin-top: 0.5rem;
    z-index: 100;
}

.nav-dropdown-menu.show {
    display: block;
}

.nav-dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--app-nav-link-text);
    font-size: 0.85rem;
    text-decoration: none;
    white-space: nowrap;
}

.nav-dropdown-menu a:hover {
    background: var(--brand-primary);
    color: var(--accent-gold);
    text-decoration: none;
}

.navbar-links a {
    color: var(--app-nav-link-text);
    font-size: 0.9rem;
    text-decoration: none;
}

.nav-separator {
    color: var(--app-nav-separator);
}

.navbar-links a:hover {
    color: var(--accent-gold);
    text-decoration: none;
}

/* The three dropdown toggles are <button>s (nav accessibility slice,
   2026-11-02), and were <a>s styled by `.navbar-links a` above. This resets
   the button to what that rule gave the link: the inherited font at
   0.9rem, the nav link colour, gold on hover, and no button chrome. The
   font is in longhands because containment does not expand `font`, and
   there is no `appearance` (containment does not classify it): an author
   background and border already drop the native button look. 0-2-0,
   so it outranks `.user-dropdown-toggle` (COMPONENTS, user dropdown), whose
   colour and size never applied to the link and must not wake up on the
   button; that rule's cursor and colour transition still apply. Top level,
   so print matches the screen. The focus ring matches the phone Menu
   button's. */
.navbar-links .nav-dropdown-toggle,
.navbar-links .user-dropdown-toggle {
    font-family: inherit;
    font-size: 0.9rem;
    font-style: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: var(--app-nav-link-text);
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    text-align: inherit;
    cursor: pointer;
}

.navbar-links .nav-dropdown-toggle:hover,
.navbar-links .user-dropdown-toggle:hover {
    color: var(--accent-gold);
}

.navbar-links .nav-dropdown-toggle:focus-visible,
.navbar-links .user-dropdown-toggle:focus-visible {
    outline: 3px solid var(--accent-gold);
}

/* ---------- Main Content ---------- */
.main-content {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ---------- Flash Messages ---------- */
.flash-messages {
    margin-bottom: 1.5rem;
}

.flash-message {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.flash-message.success {
    background-color: var(--status-success-bg);
    color: var(--status-success-text);
    border: 1px solid var(--status-success-border);
}

.flash-message.error {
    background-color: var(--status-danger-bg);
    color: var(--status-danger-text);
    border: 1px solid var(--status-danger-border);
}

/* ---------- Page Headers ---------- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.page-header h1 {
    color: var(--brand-primary);
    font-size: 1.75rem;
}

/* ---------- Household Banner ---------- */
/* PROMOTED from four templates in batch 3 -- admin/backfill_entry.html,
   admin/order_cancel_confirm.html, admin/order_detail.html and
   admin/order_edit.html. Bucket (D): all twelve comparisons across the four
   came back IDENTICAL, declaration order included, so there is no winner to
   choose. `household-banner` is markup in exactly those four templates and,
   AT THE TIME OF THE PROMOTION, all four styled it -- so the blast radius
   was known and there was no unstyled third party for the move to style for
   the first time. BATCH 6 REMOVED THE LAST OF THE FOUR PAGE COPIES
   (admin/order_cancel_confirm.html), so these three rules are now the only
   thing styling any of them. Amended rather than left standing: as a
   present-tense claim `all four style it` is now false, and a comment a
   reader trusts instead of checking is the failure this project keeps
   finding.

   WHY HERE, with no family to sit beside. This is the first promotion with no
   natural neighbour, so the choice is on the record rather than inherited.
   It sits after .page-header because the two are the page-TOP blocks and they
   are adjacent in the markup -- order_detail.html renders .page-header at 93
   and .household-banner at 104 -- so a reader looking for the second will
   find it beside the first. It gets its own labelled section rather than
   being wedged into Page Headers, because it is a separate component that
   happens to live nearby, and because the next promotion with no neighbour
   should take a section of its own too rather than accrete here.

   Placement cannot change an outcome in this case, which was checked rather
   than assumed: nothing else in app.css selects `.label` or `.name` as a
   class at any layer, so these three rules have no tie-break to lose. That is
   why the reasoning above is about where a reader looks, and .badge-info's is
   about the cascade -- it had siblings that could tie, and these do not.

   Kept with the rules, because it is the reason they look like this: the same
   treatment as backfill_entry.html's household banner, deliberately and not
   decoratively -- the nav shows the ADMIN's own household name for the whole
   session (Amendment B), so a page's actual household has to be impossible to
   mistake for that, the same hazard the backfill screens already had to
   solve. */
.household-banner {
    background: var(--brand-primary);
    color: var(--app-text-on-brand);
    padding: 1rem 1.5rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.household-banner .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    opacity: 0.75;
}

.household-banner .name {
    font-size: 1.3rem;
    font-weight: 700;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.6;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background-color 0.15s;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background-color: var(--brand-primary);
    color: var(--app-text-on-brand);
}

.btn-primary:hover {
    background-color: var(--app-brand-hover);
}

/* Outlined purple. The 1px border is taken out of the padding, so a
   secondary is the same size as a filled button beside it. */
.btn-secondary {
    background-color: var(--surface-raised);
    color: var(--brand-primary);
    border: 1px solid var(--brand-primary);
    padding: calc(0.5rem - 1px) calc(1rem - 1px);
}

.btn-secondary.btn-sm {
    padding: calc(0.3rem - 1px) calc(0.75rem - 1px);
}

.btn-secondary:hover {
    background-color: var(--app-fill-subtle);
    color: var(--brand-primary-dark);
    border-color: var(--brand-primary-dark);
}

.btn-danger {
    background-color: var(--action-danger);
    color: var(--app-text-on-fill);
}

.btn-danger:hover {
    background-color: var(--app-action-danger-hover);
}

.btn-sm {
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
}

/* ---------- Tables ---------- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface-raised);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--app-shadow-card);
}

.data-table th,
.data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
}

.data-table th {
    background-color: var(--table-header-bg);
    color: var(--app-text-on-table-header);
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.data-table tr:nth-child(even) {
    background-color: var(--app-surface-stripe);
}

.data-table tr:hover {
    background-color: var(--app-row-hover-bg);
}

.data-table td {
    font-size: 0.9rem;
}

/* ---------- Calendar tables ----------

   Promoted in step 4 batch 1b from admin/menu_detail.html, which held one
   copy, and parent/menu.html, which holds the other. Bodies were identical
   declaration-for-declaration and value-for-value, measured 2026-09-15 at
   2441c80b51a2, so one surviving copy replaces two. parent/menu.html keeps
   its own copies until its batch: an identical rule EARLIER in the cascade
   cannot change a winner while the later original still stands, which is
   what makes promoting before that template migrates safe.

   Filed here rather than appended because .data-table above is the sibling
   component -- same six declarations in .calendar-table, in fact, which is a
   merge candidate and deliberately NOT merged: merging is a rule change, not
   a relocation, and it would forfeit the byte-identity this batch is
   verified against.

   .calendar-table td is NOT here, and the gap is deliberate. The two copies
   DRIFTED -- height:100px here against 110px in parent/menu.html -- so it
   cannot be promoted without picking a winner. It lives in the PAGES layer
   prefixed to this screen, and parent/menu.html keeps its 110px. That is the
   one rule of the seven shared selectors that could not collapse.

   .day-number and .day-cancelled are calendar CELL CONTENT rather than table
   rules, but they appear nowhere except inside a calendar table, so they sit
   with the component they belong to rather than in a section of their own. */
.calendar-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface-raised);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--app-shadow-card);
}

.calendar-table th {
    background-color: var(--table-header-bg);
    color: var(--app-text-on-table-header);
    padding: 0.6rem;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 500;
}

.calendar-table td.weekend {
    background-color: var(--app-calendar-weekend-bg);
}

.calendar-table td.empty {
    background-color: var(--app-surface-stripe);
}

.day-number {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--brand-primary-dark);
    margin-bottom: 0.3rem;
}

.day-cancelled {
    background-color: var(--app-status-danger-wash);
}

/* ---------- Forms ---------- */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-default);
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--app-focus-border);
    box-shadow: 0 0 0 2px var(--app-focus-ring);
}

/* ---------- Checkboxes and radios inside a form group ----------

   The .form-group input rule above is text-field styling and was
   written for text fields, but `input` with no [type] qualifier
   matches a checkbox too -- so a checkbox inside a .form-group was
   getting width: 100%. As a flex item that made its flex BASE SIZE
   the whole row, so it absorbed nearly all the shrinkage, rendered
   the native control centred in a box hundreds of pixels wide, and
   squeezed the sibling label until the name wrapped mid-row.

   Positioned AFTER the :focus rule deliberately: that rule is also
   0-2-1, the same specificity as this one, so source order is what
   breaks the tie. Do not move this above it.

   The existing .form-group input rule is deliberately NOT modified.
   It styles every text input, select and textarea in the app, so
   narrowing it would need a sweep of every form; this wins on
   specificity instead and reaches only checkboxes and radios.

   .notify-row is carried on the same rule rather than duplicating
   the values: the shared notify partial puts its rows in a .card
   rather than a .form-group (see the notify block below), so its
   checkboxes have no .form-group ancestor and the first two
   selectors would miss them.

   CONSEQUENCE, accepted: with border: none the focus rule's purple
   box-shadow is the only focus indicator left, since that rule also
   sets outline: none. */
.form-group input[type="checkbox"],
.form-group input[type="radio"],
.notify-row input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    padding: 0;
    border: none;
    border-radius: 0;
    accent-color: var(--brand-primary);
    flex-shrink: 0;
}

/* ---------- Order Form: Recipient Sections ----------

   PROMOTED from admin/order_edit.html in batch 4, thirteen rules in one move.
   They are one structure, not thirteen components, and they are written here
   outermost to innermost so the stylesheet reads in the order the DOM nests:

     .recipient-section                  one recipient's card
       .recipient-header  h3  .type-badge  .type-badge.staff-badge
       .recipient-body                    its content area
         .group-section  .group-name      one menu-item group
           .item-name  .item-right  .item-qty  .item-price  .item-description

   ARGUED FROM INDEPENDENT SOURCES, NOT CARRIERS. admin/backfill_entry.html and
   admin/order_edit.html are the same stylesheet in two files -- all nineteen
   selectors, all bodies IDENTICAL -- so they are ONE authoring, not two. Nine
   of these rules have three independent authorings (the admin pair,
   parent/order_edit.html, parent/order_form.html); .recipient-header
   .type-badge, its .staff-badge modifier and .item-description have two;
   .item-qty has ONE and is named as such below. Counting carriers would have
   said 4/3/2 and overstated every one of them.

   PLACEMENT IS PART OF A PROMOTION, because source order in this layer is a
   promoted rule's only tie-break. Checked before choosing, for all thirteen
   against every BASE and COMPONENTS rule, on BOTH conditions a tie needs -- a
   shared subject key AND an overlapping longhand, via props_overlap so
   `border: none` against `border-color` is not read as disjoint: ZERO of the
   thirteen can tie with anything already here. So placement cannot change an
   outcome and the choice is readability. It sits after Forms because this is
   form markup, and it takes its own section rather than accreting onto Forms,
   per the rule batch 3 set when the household banner had no natural
   neighbour.

   THE COST THIS POLICY ACCEPTS, recorded here rather than rediscovered in a
   later batch. The three (C) rules that stayed behind -- .item-option and its
   two descendants -- drift from the parent templates by exactly one
   declaration each, and always in the same direction: the parent side ADDS
   `cursor: pointer` twice and `transition: background-color 0.1s` once. Never
   a different value for a shared property. The parent item option is styled as
   a clickable control and the admin one is not, corroborated by
   .item-option:hover existing on the parent side and neither admin file. That
   is why byte-identity was enough to clear these thirteen: the admin body is a
   strict SUBSET of the parent body in the drifted cases, and identity is
   strictly stronger than subset, so the divergence this cluster is capable of
   producing cannot be hiding in them. The cost is the other direction: if a
   parent template later gains an interaction declaration on one of these
   thirteen, the promoted rule here is the ADMIN version and the parent's
   addition has nowhere to live but a prefixed override in PAGES. */
.recipient-section {
    border: 2px solid var(--border-subtle);
    border-radius: 6px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.recipient-header {
    background: var(--app-surface-muted);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-subtle);
}

.recipient-header h3 {
    color: var(--brand-primary-dark);
    font-size: 1.1rem;
    margin: 0;
}

.recipient-header .type-badge {
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: var(--surface-raised);
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
}

/* THESE TWO MOVE TOGETHER OR NOT AT ALL, and the warning lives here rather
   than in containment_adjudications.tsv because the hazard is about THESE
   RULES, which survive, not about any page rule, which does not.

   Written as a kind=bucket `advice-harmful` row by batch 7 and relocated here
   by batch 8, applying the file's own rule to a row already written: a row
   earns its place when the page rule it is about will still be declared after
   the batch's commit. That one was keyed to parent/order_form.html, which the
   same batch migrated, so its key could never match again -- while the fact
   it records applies to any future page rule in this family, in any template.

   THE HAZARD. A page rule `.recipient-header .type-badge` is (0,2,0) and
   loses today to the (0,3,0) modifier below, which is what paints a staff
   badge #e8e0f0 on #4a2878. Prefixing ONLY that rule with a screen-* class
   makes it (0,3,0) -- a tie -- and PAGES sits after COMPONENTS in this file,
   so the prefixed rule wins and every staff badge turns white on #666.
   Prefixing BOTH is safe: the modifier becomes (0,4,0) and wins again. The
   hazard is the PARTIAL application across the family, not either rule.

   Every other advice-void verdict in this project means the advice is
   redundant -- a prefix that scopes an app-wide rule too narrowly, or a walk
   whose targets render identically. This is the only one where following the
   prefix column changes what a user sees. Re-check by expanding both bodies
   to longhands: nine overlap, eight background plus color. */
.recipient-header .type-badge.staff-badge {
    background: var(--app-fill-subtle);
    color: var(--brand-primary);
}

.recipient-body {
    padding: 1rem;
}

.group-section {
    margin-bottom: 1.25rem;
}

.group-name {
    font-weight: 600;
    color: var(--brand-primary);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.item-name {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.item-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    white-space: nowrap;
}

/* THE WEAKEST OF THE THIRTEEN, and promoted anyway -- stated so it is not
   passed over unremarked. Its only two carriers are admin/backfill_entry.html
   and admin/order_edit.html, which are the same stylesheet duplicated, so it
   asserts an app-wide component on the evidence of ONE authoring appearing
   twice. Every other rule in this section has at least two. It is promoted
   because it is a member of the .item-* family being promoted wholesale, and
   splitting one member into PAGES recreates exactly the .badge-info problem
   batch 3 fixed -- a family member in a different layer from its siblings on
   the strength of "only one template happens to use it today".

   One fact that does NOT rescue it, recorded so nobody mistakes it for
   support: the markup is `class="form-control item-qty"`, and .form-control is
   markup in seven templates and has no rule anywhere in app.css. This is a
   bare width/alignment modifier on an unstyled input, not a modifier of an
   existing component. */
.item-qty {
    width: 3rem;
    text-align: center;
}

.item-price {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--brand-primary);
}

.item-description {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-left: 2.3rem;
    margin-bottom: 0.25rem;
}


/* ---------- Quantity Stepper ----------
   PROMOTED from parent/order_form.html and parent/order_edit.html. Six rules,
   and here is the whole list so a later reader starts from the boundary:

     .qty-stepper                      the collapsed box
     .qty-stepper.visible              the expanded box
     .qty-stepper button               both step buttons
     .qty-stepper button:hover         the hover feedback
     .qty-stepper input                the number field
     .qty-stepper input::-webkit-inner-spin-button,
     .qty-stepper input::-webkit-outer-spin-button, and
     .qty-stepper input[type=number]   the native-spinner suppression

   THE LIST IS HERE BECAUSE THE WIDGET'S EXTENT WAS ENUMERATED FOUR TIMES AND
   WAS WRONG THREE OF THEM -- three missing pieces, then seven differences,
   then four rules, then six. Each count was taken against the previous one
   rather than against the whole widget, which is how it kept growing.

   THIS PROMOTION IS NOT LIKE THE OTHERS. Every earlier one was argued from
   independent carriers or from membership of a naming family already here.
   This has neither: parent/order_edit.html was DERIVED from
   parent/order_form.html at 7ec2a8b, so the two carriers are one authoring,
   and there was no .qty-* family here to join. The duplication exists because
   the D90 fix created it -- before that the two copies differed, which is
   what D90 was.

   THE ARGUMENT IS A THREE-LAYER SPLIT. The component owns its APPEARANCE; the
   page owns its STATE and INTEGRATION.

     CSS      byte-identical across both screens, all six rules. This is the
              appearance, it is genuinely one thing, and it is what is
              promoted.
     MARKUP   structurally identical -- same element tree, same id and name
              schemes. It differs only in what the SERVER SEEDS: the edit
              screen sets the initial `visible` class and the ordered
              quantity, the order form starts collapsed at 1.
     JS       NOT identical, and deliberately so. toggleItemCheckbox() resets
              the quantity on untick only here and in both branches there,
              because the edit screen opens on an order that already exists;
              and it calls updateReviewState() where the form calls
              updateTotals(), which does not exist on the edit screen at all.

   So promoting the CSS says something true, and sharing the JS would say
   something false. The JS stays per page.

   ONE PIECE OF THE JS IS GRATUITOUS DRIFT AND IS BEING LEFT ALONE: clampQty()
   is `if (val < 1) val = 1` on one screen and `Math.max(1, val)` on the
   other, identical in behaviour and different for no reason. That is exactly
   the kind of divergence that became D90, and it is named here rather than
   fixed because this commit is a CSS promotion and quietly rewriting JS in it
   would be the scope creep the batch discipline exists to prevent.

   WHY THE DUPLICATION WAS NOT KEPT. The argument for keeping it was that two
   prefixed copies make a future divergence visible as a diff between two
   named blocks. That mechanism was tested and failed: the divergence sat in
   two page <style> blocks for five weeks and in two adjacent prefixed blocks
   here for two more batches, and nothing noticed -- a person opening the page
   found it. Worse, the duplication was written up in the batch-7 and batch-8
   comments as "two components sharing a class name" and defended as a cost
   worth paying, which immunised the difference against exactly the review the
   argument depended on. Those passages are corrected below.

   NOT RENAMED, and the test was whether the two screens could legitimately
   need different steppers. They differ in INTEGRATION, not appearance, and a
   screen that ever needed a visually different stepper wants a modifier on
   this component rather than a second base name. `.qty-stepper` carries its
   own weight.

   PLACEMENT CANNOT CHANGE AN OUTCOME, checked rather than assumed: nothing
   else in app.css selects `qty-stepper` at any layer, so these rules have no
   tie-break to lose. It sits with the .item-* family above because that is
   its rendering context -- the stepper lives inside .item-right.

   WHAT THIS GOT VERIFIED BY, AND WHAT IT DID NOT. The computed-style harness
   CANNOT SEE THIS CHANGE: no probed selector mentions qty-stepper, because
   the probe set is built from page <style> blocks and neither parent template
   has had one since batches 7 and 8. A green run here means nothing about
   this promotion. The safety argument is CASCADE REASONING, labelled as
   reasoning: the prefixed rules were (0,2,0) and up, the promoted ones are
   (0,1,0) and up, and nothing else in BASE, COMPONENTS or PAGES selects these
   elements at any specificity -- so no rule that previously lost can now win.
   The check is the walk. This is the D90 boundary again, on the same widget,
   one layer down. */
.qty-stepper {
    display: none;
    align-items: center;
    gap: 0;
    border: 1px solid var(--border-default);
    border-radius: 4px;
    overflow: hidden;
    height: 28px;
}

.qty-stepper.visible {
    display: inline-flex;
}

.qty-stepper button {
    background: var(--app-surface-muted);
    border: none;
    width: 28px;
    height: 28px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--brand-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.1s;
    padding: 0;
}

.qty-stepper button:hover {
    background: var(--app-fill-subtle);
}

.qty-stepper input {
    width: 32px;
    height: 28px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--border-default);
    border-right: 1px solid var(--border-default);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--brand-primary-dark);
    padding: 0;
}

/* The instrument records these two selectors in UNVERIFIABLE with the note
   that querySelectorAll cannot return them in any state -- they are shadow
   pseudo-elements, not nodes. So the thing that would confirm this pair works
   already wrote down that it cannot, which is why that category carries a
   reason PER ENTRY rather than one reason for all of them. Without these the
   number field renders native increment arrows immediately beside the `+`. */
.qty-stepper input::-webkit-inner-spin-button,
.qty-stepper input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-stepper input[type=number] {
    -moz-appearance: textfield;
}

/* ---------- Notify block (shared/_notify_members.html) ----------

   These are global because a shared partial's rules have to be: the partial
   is included at three sites -- admin/backfill_entry.html,
   admin/order_cancel_confirm.html and admin/order_edit.html -- and a style
   block inside it would be emitted once per include. Before step 3 there was
   nowhere global for them but this template's head; now it is this file.

   The block owns its own vertical rhythm. Neither rhythm it replaced
   was chosen: order_edit and backfill_entry put .form-group on each
   ROW, so the rows inherited 1.25rem of text-field spacing by
   position; order_cancel_confirm put it on the wrapper, so the rows
   had none at all. 0.5rem between rows is the deliberate value.

   The row is a LABEL wrapping its input, following
   admin/restore_day_confirmation.html -- the one checkbox in the app
   that sat inside a .form-group and still rendered correctly. That
   makes the whole row a click target and makes a mid-name wrap
   structurally impossible rather than merely unlikely, because the
   name is no longer a shrinkable flex sibling of the checkbox. */
/* The uncarded form of the block (notify_card = false), used where
   the block already sits inside a card. It takes .form-group's
   1.25rem so it keeps step with the Reason and Notes groups it sits
   among, rather than the 1.5rem a .card would have given it. */
.notify-plain {
    margin-bottom: 1.25rem;
}

.notify-heading {
    font-weight: 600;
    color: var(--brand-primary-dark);
    margin-bottom: 0.5rem;
}

.notify-rows {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notify-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 400;
    margin-bottom: 0;
    cursor: pointer;
}

/* The blank-address flag. Never shows an address -- only that there
   is not one. */
.notify-row .notify-flag {
    font-size: 0.8rem;
    color: var(--app-text-danger);
    font-weight: 500;
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* ---------- Cards ---------- */
.card {
    background: var(--surface-raised);
    border-radius: 4px;
    padding: 1.5rem;
    box-shadow: var(--app-shadow-card);
    margin-bottom: 1rem;
}

/* ---------- Status Badges ---------- */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-active {
    background-color: var(--status-success-bg);
    color: var(--status-success-text);
}

.badge-inactive {
    background-color: var(--status-danger-bg);
    color: var(--status-danger-text);
}

/* PROMOTED from admin/order_detail.html in batch 3, not moved to PAGES.
   `badge-info` is markup in that one template, so the classifier calls it
   bucket (B) -- markup-local, no prefix needed. Bucket says nothing about
   which LAYER a rule belongs in, and this is a member of a family that was
   already split: .badge, .badge-active and .badge-inactive are markup in six
   templates and styled by none of them, because they live here. .badge-info
   was the one member that did not.

   Membership is role and shape, never the shared word. .badge is the
   structural base at six declarations; each modifier is exactly two,
   background-color then color, in that order. order_detail.html:119-125
   renders `badge badge-active`, `badge badge-inactive` and `badge badge-info`
   as three parallel spans, which is the role established by use rather than
   by naming. `.order-status` and `.order-summary` share a word and are not a
   family.

   PLACEMENT IS PART OF THE PROMOTION. Source order within this layer is a
   promoted rule's only tie-break, so .badge-info sits AFTER .badge-inactive:
   an element carrying two modifiers then resolves exactly as it did when this
   rule lived in the template's own <style> block, which rendered after the
   stylesheet link. No element carries two today -- the three spans are
   separate -- so this is not load-bearing now; it is correct regardless of
   what later markup does.

   The move rests on the CONTAINMENT answer, not on the layer being tidier.
   Promoting changes this rule's source position against every rule here, and
   the computed-style probe only covers pages that RENDER it. Had any other
   template carried `badge-info` in markup with no rule styling it, this move
   would style that page for the first time and no probe would catch it,
   because no probe covers a rule that does not apply. jinja_class_scanner's
   effective markup was read directly: one template. */
.badge-info {
    background-color: var(--app-fill-subtle);
    color: var(--brand-primary);
}

/* ---------- Empty States ---------- */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.empty-state p {
    margin-bottom: 1rem;
    font-size: 1rem;
}

/* ---------- User dropdown and notification email (shared/base_app.html) ---------- */
.user-dropdown {
    position: relative;
}

.user-dropdown-toggle {
    color: var(--app-nav-toggle-text);
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.15s;
}

.user-dropdown-toggle:hover {
    color: var(--app-nav-toggle-hover-text);
    text-decoration: none;
}

.user-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.5rem;
    background: var(--surface-raised);
    border-radius: 6px;
    box-shadow: var(--app-shadow-dropdown);
    min-width: 300px;
    padding: 1rem;
    z-index: 200;
}

.user-dropdown-menu.show {
    display: block;
}

.user-dropdown-menu h4 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin: 0 0 0.5rem;
}

/* THE WHOLE `.email-field <descendant>` FAMILY CAN REACH EXACTLY TWO
   ELEMENTS IN THIS APPLICATION, and recording that here retires a question
   rather than answering it five times.

   `class="email-field"` appears ONCE in the codebase -- shared/base_app.html,
   inside the navbar's user-dropdown-menu -- and its children are one <input>
   and one <button>, both leaves with no container between them. So every
   selector below can only ever match those two elements, whatever page is
   rendered and whatever state it is driven into.

   FIVE FLIP CANDIDATES WERE ADJUDICATED `impossible` ON THIS FACT, across
   batches 7 and 8: .qty-stepper button, .qty-stepper input and the two
   ::-webkit-*-spin-button pseudo-elements, each pairing against
   `.email-field button:hover` or `.email-field input:focus` because they
   share a subject key. `.qty-stepper` is a <span> in page content on the two
   parent order screens, so no element is a descendant of both and no flip can
   occur. That is stronger than the argument it replaced -- "navbar chrome
   versus page content" -- because it is checkable: grep for the class, read
   its two children.

   IT MATTERED MOST WHERE THE OVERLAP WAS REAL. `.qty-stepper input` shares
   four longhands with `.email-field input:focus` -- the four border colours --
   so had containment not held, the stepper's dividers would have changed
   colour on focus. VOID if a second `.email-field` ever appears, or if this
   one gains a child that can contain other markup. */
.email-field {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.email-field input {
    flex: 1;
    font-size: 0.85rem;
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--border-default);
    border-radius: 3px;
    width: auto;
}

.email-field input:focus {
    outline: none;
    border-color: var(--app-focus-border);
    box-shadow: 0 0 0 2px var(--app-focus-ring);
}

.email-field button {
    font-size: 0.8rem;
    padding: 0.35rem 0.6rem;
    background: var(--brand-primary);
    color: var(--app-text-on-brand);
    border: none;
    border-radius: 3px;
    cursor: pointer;
    white-space: nowrap;
}

.email-field button:hover {
    background: var(--app-brand-hover);
}

.email-status {
    font-size: 0.75rem;
    margin-top: 0.35rem;
    min-height: 1.1em;
}

.email-current {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.email-current strong {
    color: var(--brand-primary-dark);
}


/* ---------- Animations ----------

   Relocated from admin/blackbaud_progress.html in batch 1a. An animation
   NAME is a global namespace wherever the block sits, so keeping it inside
   a page's style block bought no scoping -- and left that template holding
   a block for one at-rule. `spin` is the only @keyframes and the only
   animation reference in the repository, measured 2026-09-15 at
   6dc656cb1d60, so the move cannot collide.

   Filed at the end of COMPONENTS rather than under a marker of its own:
   @keyframes takes no part in the cascade (only a duplicate NAME competes,
   last definition winning), so its position among cascade-ordered layers is
   presentational, and a fifth marker would have meant rewriting the file
   header's four-layer description as well. Its only consumer today is
   .spinner, which stays in blackbaud_progress.html as a page rule until
   that template's own batch. */
@keyframes spin {
    to { transform: rotate(360deg); }
}


/* ---------- Checklist tables (admin/daily_order_report.html, staff/checklist.html) ----------
   Promoted in step 4's batch 18. These six rules were byte-identical in both
   pages' <style> blocks, and both pages compute identically on screen with
   them, so one unprefixed copy serves both. That is a lean, not a
   requirement: nothing says the two checklists must look alike, and if they
   are to differ, the way back is to prefix the rules per file
   (.screen-admin-daily-order-report / .screen-staff-checklist), as the rest
   of each page's rules are. Batch 19 deleted staff/checklist.html's own
   identical copies, so these are the only ones.

   Each page's PRINT overrides of these rules stay in that page's print
   block, at the same specificity as these, and win on source order. */
.grade-section {
    margin-bottom: 1.5rem;
}

.checklist-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface-raised);
    border: 1px solid var(--border-subtle);
    border-top: none;
    border-radius: 0 0 4px 4px;
}

.checklist-table th {
    background: var(--app-surface-muted);
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--brand-primary-dark);
    border-bottom: 2px solid var(--border-subtle);
}

.checklist-table td {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--app-border-divider);
}

.checklist-table tr:last-child td {
    border-bottom: none;
}

.checklist-table .recipient-name-cell {
    font-weight: 500;
    white-space: nowrap;
    width: 200px;
}


/* ---------- Announcements (Item A1) ----------
   Shared by the admin list and detail pages and the parent pages, so they
   live here rather than under PAGES. Existing tokens only. The body is plain
   text, escaped by Jinja; pre-line keeps the author's line breaks and still
   wraps long lines, so no markup is ever built from it. */
.announcement-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

/* The admin list (admin/announcements.html). Its actions cell keeps Edit,
   Publish or Unpublish or Cancel Schedule, and Delete on one line: a
   wrapping flex row has the widest button as its min-content, so the
   table's auto layout squeezed the column to that and the buttons stacked.
   The dates and "N of M" do not wrap either; the title takes the squeeze.
   Too wide for a phone, the table scrolls inside its wrapper (overflow is
   the classifier's modelled shorthand), not the page. */
.announcement-actions-cell .announcement-actions {
    flex-wrap: nowrap;
}

.announcement-nowrap {
    white-space: nowrap;
}

/* The announcement form's button row (admin/announcement_form.html). Cancel
   is an <a class="btn">, whose line-height is body's 1.6, taller than a
   <button>'s; stretched, a wrapped line holding Cancel made its buttons 39px
   and the other line's 32px. Centred, every button keeps its own height. */
.form-actions.announcement-actions {
    align-items: center;
}

.announcement-table-scroll {
    overflow: auto;
}

.announcement-inline-form {
    display: inline;
}

.announcement-help {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.announcement-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.announcement-body {
    white-space: pre-line;
    line-height: 1.6;
}

.announcement-title {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

/* The bottom tab (shared/base_app.html), a native <details>: no script and
   no screen media query. Fixed flush with the bottom edge, right-aligned;
   opened, the box grows upward from that edge, the panel under the tab.
   Widths use min(), so at a 390px phone the panel is the viewport less
   1rem a side. Nothing reserves room for the closed tab: a rule on
   .main-content would pair with the print blocks' own .main-content rules
   as flip candidates. The closed tab is about 2.3rem tall and sits over
   the corner of .main-content's 2rem bottom padding. At 860px and under
   the phone block reserves it (mobile phase 3); see that block. */
.announcement-tab {
    position: fixed;
    bottom: 0;
    right: 1rem;
    z-index: 900;
    max-width: calc(100vw - 2rem);
}

.announcement-tab-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px 6px 0 0;
}

.announcement-tab-summary:focus-visible {
    outline: 3px solid var(--brand-primary-dark);
}

/* Unread: purple, white label (13.23:1), gold badge with dark text (6.78:1). */
.announcement-tab-unread .announcement-tab-summary {
    background: var(--brand-primary);
    color: var(--app-text-on-brand);
}

/* Quiet -- everything read, or nothing active: lavender, purple label
   (10.91:1), a hairline so the edge reads against a white page. */
.announcement-tab-quiet .announcement-tab-summary {
    background: var(--app-fill-subtle);
    color: var(--brand-primary);
    border: 1px solid var(--border-subtle);
    border-bottom: none;
}

.announcement-tab-badge {
    background: var(--accent-gold);
    color: var(--brand-primary-dark);
    border-radius: 999px;
    padding: 0 0.5rem;
    font-size: 0.8rem;
    line-height: 1.5;
}

.announcement-tab-panel {
    width: min(22rem, calc(100vw - 2rem));
    max-height: min(60vh, 24rem);
    overflow-y: auto;
    background: var(--surface-raised);
    border: 1px solid var(--border-subtle);
    border-bottom: none;
    box-shadow: var(--app-shadow-card);
    padding: 0.5rem 0;
}

.announcement-tab-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.announcement-tab-row a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
}

/* Unread rows: the soft yellow fill, purple text (12.22:1), a gold dot. */
.announcement-tab-row-unread a {
    background: var(--app-announcement-bg);
    color: var(--brand-primary);
    font-weight: 600;
}

.announcement-tab-dot {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--accent-gold);
    margin-right: 0.5rem;
}

.announcement-tab-all {
    display: block;
    padding: 0.5rem 1rem 0.25rem;
    font-size: 0.85rem;
}

/* Feedback's only way in (Item A2): the open panel's header, far right. A
   sibling of <summary>, laid over the summary's right end; as <details>
   content it is hidden while the tab is closed. Smaller and regular weight
   under the bold label, underlined as a link: --app-nav-link-text on the
   unread purple (8.29:1), --text-secondary on the quiet lavender (5.86:1).
   line-height 1.45rem makes it the summary's height (39px measured), so
   its text centres on the label's line. While open the summary keeps 8.5rem clear at its right, the link's
   width with room over: at a 390px phone the panel is 358px, and label,
   badge and link stay on one line, the link never wrapping. */
.announcement-tab-feedback {
    position: absolute;
    top: 0;
    right: 0;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.45rem;
    white-space: nowrap;
    text-decoration: underline;
}

.announcement-tab-unread .announcement-tab-feedback {
    color: var(--app-nav-link-text);
}

.announcement-tab-quiet .announcement-tab-feedback {
    color: var(--text-secondary);
}

/* Focus: dark purple on lavender (12.78:1), gold on purple (5.79:1).
   Shorthands only: the containment classifier models outline and padding,
   not outline-offset or a lone padding-right. */
.announcement-tab-quiet .announcement-tab-feedback:focus-visible {
    outline: 3px solid var(--brand-primary-dark);
}

.announcement-tab-unread .announcement-tab-feedback:focus-visible {
    outline: 3px solid var(--accent-gold);
}

.announcement-tab[open] .announcement-tab-summary {
    padding: 0.5rem 8.5rem 0.5rem 1rem;
}

.announcement-tab-empty {
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Read by a screen reader, not shown: " unread" after the badge's number,
   "Unread: " before an unread row's title. */
.announcement-tab-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    white-space: nowrap;
}

/* ---------- The phone navbar (mobile phase 2, 2026-10-26) ----------
   Pattern A: at 860px and under, the navbar is the brand and a Menu button,
   and the button opens the links as an in-flow panel under them. In flow,
   so a tall panel pushes the page down and scrolls with it: its last row can
   always be scrolled clear of the fixed announcement tab, with no inner
   scroll and no z-index. The Order Lunch and Admin dropdowns and the user
   menu open inside the panel as accordions, on their own scripts.

   Every collapse rule is gated on .navbar-menu-ready, which only the navbar
   script adds: without script the links stay visible, wrapped under the
   brand. The one ungated rule is that wrap. The query is the single form
   the computed-style guard admits: `screen` at the top level, so print and
   the 1280 renders never match it. 860 is the working value: the admin
   navbar measured one row down to 755px at 1px steps, with room for a
   longer name.

   Mobile phase 3 (2026-10-26) adds the parent pages' phone rules at the end
   of this block: fields at 16px, tap targets of 44px, and room at the
   bottom of the page for the tab. */
@media screen and (max-width: 860px) {
    .navbar {
        flex-wrap: wrap;
    }

    /* margin-left auto keeps Menu and the Cart button together at the right
       (the navbar's space-between would put Menu mid-row). */
    .navbar-menu-button.navbar-menu-ready {
        display: block;
        margin-left: auto;
        min-height: 44px;
        padding: 0 1rem;
        background: none;
        color: var(--app-text-on-brand);
        border: 1px solid var(--app-nav-separator);
        border-radius: 4px;
        font: inherit;
        font-size: 0.9rem;
        font-weight: 600;
        cursor: pointer;
    }

    .navbar-menu-button.navbar-menu-ready:focus-visible {
        outline: 3px solid var(--accent-gold);
    }

    /* The Cart link on a phone (Samuel, 2026-11-05, layout A): a 44px icon
       button right of Menu, framed as Menu is, with the count badge over its
       top right corner, so the badge adds no width. "Cart" stays the link's
       name, off-screen. Measured to fit beside Menu at 360px and wider; at
       320px it wraps to a second row, accepted. Without script the link
       keeps its desktop look, wrapped with the links. */
    .navbar-menu-ready ~ .navbar-cart {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        min-height: 44px;
        margin: 0 0 0 0.5rem;
        border: 1px solid var(--app-nav-separator);
        border-radius: 4px;
    }

    .navbar-menu-ready ~ .navbar-cart .navbar-cart-icon {
        display: block;
    }

    .navbar-menu-ready ~ .navbar-cart .navbar-cart-label {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        border: 0;
        overflow: hidden;
        white-space: nowrap;
    }

    .navbar-menu-ready ~ .navbar-cart .nav-cart-badge {
        position: absolute;
        top: -6px;
        right: -6px;
        margin: 0;
    }

    .navbar-menu-ready ~ .navbar-links {
        display: none;
    }

    .navbar-menu-ready ~ .navbar-links.navbar-links-open {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        gap: 0;
        width: 100%;
        margin-top: 0.75rem;
    }

    /* Tap targets: every link and toggle in the panel is at least 44px. */
    .navbar-links-open > a,
    .navbar-links-open .nav-dropdown-toggle,
    .navbar-links-open .user-dropdown-toggle,
    .navbar-links-open .nav-dropdown-menu a,
    .navbar-links-open .user-dropdown-menu a {
        display: flex;
        align-items: center;
        min-height: 44px;
    }

    /* The toggles are <button>s, which shrink to their text where a link
       filled the panel's width. */
    .navbar-links-open .nav-dropdown-toggle,
    .navbar-links-open .user-dropdown-toggle {
        width: 100%;
    }

    /* The "|" between sections becomes a hairline across the panel. */
    .navbar-links-open .nav-separator {
        height: 0;
        overflow: hidden;
        border-top: 1px solid var(--app-nav-separator);
        margin: 0.25rem 0;
    }

    /* The accordions: the same menus, in flow under their toggles. */
    .navbar-links-open .nav-dropdown-menu,
    .navbar-links-open .user-dropdown-menu {
        position: static;
        margin: 0 0 0.5rem;
        min-width: 0;
        box-shadow: none;
    }

    .navbar-links-open .nav-dropdown-menu a {
        white-space: normal;
    }

    /* 16px, so iOS does not zoom the page when the field takes focus. */
    .navbar-links-open .email-field input {
        font-size: 1rem;
        min-height: 44px;
    }

    .navbar-links-open .email-field button {
        min-height: 44px;
    }

    /* ---------- Mobile phase 3: the parent pages ----------
       Scoped to .area-parent (the parent blueprint's pages) except where the
       component is shared furniture: the brand, the tab and the page's
       bottom room apply on every page. The calendar page's own controls are
       left for the calendar rebuild, hence :not(.screen-parent-view-menu).
       Every selector here outranks the rule it extends, so the PAGES rules
       later in the file cannot win on source order. */

    /* Room for the tab: 2rem as before, plus the closed tab's 44px, so a
       page scrolled to the bottom ends with its last control clear of the
       tab. Inside this block containment's top-level reader does not see
       it, and print never matches screen, so it pairs with no print rule. */
    .main-content {
        padding-bottom: calc(2rem + 44px);
    }

    .navbar-brand {
        min-height: 44px;
    }

    .announcement-tab-summary {
        min-height: 44px;
    }

    .announcement-tab-feedback,
    .announcement-tab-row a,
    .announcement-tab-all {
        display: flex;
        align-items: center;
        min-height: 44px;
    }

    /* 16px, so iOS does not zoom the page when a field takes focus. */
    .area-parent .form-group select,
    .area-parent .form-group textarea,
    .area-parent .form-group input,
    .area-parent .month-filter select {
        font-size: 1rem;
        min-height: 44px;
    }

    .area-parent:not(.screen-parent-view-menu) .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
    }

    /* A checkbox's target is its row: each label below is the checkbox's
       own (wrapping it, or for= it). */
    .area-parent .item-option label,
    .area-parent .ordering-toggle,
    .area-parent .remove-toggle,
    .area-parent .apply-day-option label {
        min-height: 44px;
    }

    .area-parent .form-group label[for] {
        display: flex;
        align-items: flex-end;
        min-height: 44px;
    }

    .area-parent .announcement-title a,
    .area-parent .apply-select-controls a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }

    .area-parent .qty-stepper {
        height: 44px;
    }

    .area-parent .qty-stepper button {
        width: 44px;
        height: 44px;
    }

    .area-parent .qty-stepper input {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    /* The order calendar's phone day list (parent/menu.html): the list
       shows and the table directly after it hides. New class names and a
       sibling combinator, so no selector here names the calendar page or
       its table; the calendar's own controls stay as they are on desktop. */
    .area-parent .day-list {
        display: block;
    }

    .area-parent .day-list + table {
        display: none;
    }

    /* The list's actions, and the month links and Back above it (.btn-sm,
       which the .btn rule above leaves out on the calendar page). */
    .area-parent .btn-sm,
    .area-parent .day-list .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
    }

    /* The month links: the short label shows, on one line; the full name is
       visually hidden but stays in the accessibility tree (the short one
       is aria-hidden), so the link's name is unchanged. The row they sit in
       and the page header are reached by :has(), so the desktop markup
       gains only the two spans. */
    .area-parent .month-nav-short {
        display: inline;
        white-space: nowrap;
    }

    .area-parent .month-nav-full {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        border: 0;
        overflow: hidden;
        white-space: nowrap;
        clip-path: inset(50%);
    }

    .area-parent div:has(> a > .month-nav-full) {
        gap: 0.75rem;
    }

    /* The calendar's header: "← Back" on one line beside a wrapping title. */
    .area-parent .page-header:has(~ .day-list) {
        gap: 0.75rem;
    }

    .area-parent .page-header:has(~ .day-list) .btn-sm {
        white-space: nowrap;
    }

    /* The cart (parent/cart.html, Item D B2): a line's controls wrap under
       its name, and the quantity reads at 16px in a 44px cell beside the
       stepper's 44px buttons (the .qty-stepper rules above). */
    .area-parent .cart-line {
        flex-wrap: wrap;
    }

    .area-parent .cart-line-controls {
        width: 100%;
        justify-content: flex-end;
    }

    .area-parent .cart-qty-value {
        min-width: 44px;
        font-size: 1rem;
    }

    /* The order form's bottom bar (parent/order_form.html, Item D B4). With
       Add to cart beside Cancel and Review Order, the three squeezed beside
       the summary and wrapped onto two and three lines, and the bar grew
       22px. Here the buttons share the bar's width on one line each, and
       the summary is one row below them, total first, so the announcement
       tab, fixed at the bottom right, covers the end of the summary line
       rather than Review Order: the same buttons, names and order
       (column-reverse and order change where they show, not the markup or
       the tab order). Three
       classes, so they outrank the order form's own rules later in the
       file; only the order form has these classes. */
    .area-parent .order-summary .summary-content {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 0.5rem;
    }

    .area-parent .order-summary .summary-details {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 0 0.75rem;
    }

    /* The total leads the line, clear of the tab. */
    .area-parent .order-summary .summary-total {
        order: -1;
    }

    .area-parent .order-summary .summary-breakdown {
        width: 100%;
    }

    .area-parent .order-summary .summary-actions {
        gap: 0.5rem;
    }

    .area-parent .order-summary .summary-actions .btn {
        flex: 1 1 auto;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        white-space: nowrap;
    }

    /* Student ordering (parent/student_ordering.html, Item E B2): each
       choice is a 44px row; the amount field takes the
       16px, 44px field above (.form-group input) and the buttons the 44px
       .btn rule. The buttons share the card's width. */
    .area-parent .allowance-option {
        min-height: 44px;
    }

    .area-parent .allowance-actions .btn {
        flex: 1 1 auto;
    }

    /* The student pages (Item E B4c part 2), under .area-student (the
       student blueprint's pages): the navbar's three links, every button,
       each item row and the stepper are 44px targets, and the stepper's
       field is 16px, as the parent pages' rules above. The order bar's
       buttons share its width. */
    .area-student .navbar-links a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }

    .area-student .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
    }

    .area-student .item-option label {
        min-height: 44px;
    }

    .area-student .qty-stepper {
        height: 44px;
    }

    .area-student .qty-stepper button {
        width: 44px;
        height: 44px;
    }

    .area-student .qty-stepper input {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    .area-student .student-order-actions .btn {
        flex: 1 1 auto;
    }
}

/* app.css's only print rule: the tab is screen furniture. Top level and
   exactly `print`, as the computed-style media guard requires. */
@media print {
    .announcement-tab {
        display: none;
    }
}


/* ============================== PAGES =============================== */
/* Empty until step 4. Scoped by the .screen-* identifier that shared/base.html
   emits on <body>; .area-* where a rule is genuinely area-wide rather than
   page-specific. Shared partials get no identifier and are scoped by their own
   class names in the components layer above.

   NOTE: `page-` is NOT the identifier prefix. `.page-header` is an existing
   component class with 41 usages, and a stylesheet containing both
   .page-header and .page-admin-backfill-entry would read as a typo forever.
   `.page-*` here means component; `.screen-*` means page identity. */


/* ---------- admin/menu_detail.html (batch 1b) ----------

   Relocated from that template's <style> block, in source order. The block
   and its {% block extra_css %} wrapper are gone; none of its rules were
   inside @media print, so nothing stayed behind. Six more rules from the same
   block were promoted to COMPONENTS instead -- see "Calendar tables" above.

   `.screen-admin-menu-detail` is read off a rendered response, not built from
   the file path: endpoint admin.menu_detail, one route, one render_template
   call site, no screen_id override. Verified 2026-09-15 at 2441c80b51a2.

   WHY .btn-tiny IS PREFIXED AND .btn-tiny-danger IS NOT. They look like one
   visual family and they are, but they have different containment. `btn-tiny`
   also appears in the markup of admin/daily_order_report.html:326,
   admin/pizza_friday.html:170 and staff/checklist.html:196 -- all three as
   `class="btn-tiny no-print"` -- and NO stylesheet anywhere defines .btn-tiny
   except the block this came from. So on those three pages the class is inert
   decoration today, and moving the rule here unprefixed would style them for
   the first time: a pixel change on three pages from a batch that touches
   one. `btn-tiny-danger` occurs in exactly one place in the repository, this
   screen, so it needs no prefix and an unnecessary prefix is just a
   gratuitous specificity bump. The asymmetry is the containment difference,
   not an oversight.

   Two rules here gained a class point: the prefixed td rule (0,1,1)->(0,2,1)
   and .btn-tiny (0,1,0)->(0,2,0). Every rule in app.css and in this block
   that can co-match either element was enumerated and expanded to longhands;
   none shares a property, so neither bump moves a winner. .calendar-table th
   ties with the td rule on padding but a <td> is never a <th>, so the tie
   cannot arise on any element.

   Moved as they were. The literal #4a2878 in .save-bar is NOT swapped for a
   token: token adoption and the brand flip are separate deploys. */
.screen-admin-menu-detail .calendar-table td {
    border: 1px solid var(--border-subtle);
    padding: 0.5rem;
    vertical-align: top;
    height: 100px;
    width: 14.28%;
}

.day-select {
    width: 100%;
    font-size: 0.75rem;
    padding: 0.2rem 0.3rem;
    border: 1px solid var(--border-default);
    border-radius: 3px;
}

.screen-admin-menu-detail .btn-tiny {
    font-size: 0.7rem;
    padding: 0.15rem 0.35rem;
    border-radius: 3px;
    cursor: pointer;
    border: none;
    color: var(--app-text-on-fill);
}

.btn-tiny-danger {
    background: var(--action-danger);
}

.btn-tiny-danger:hover {
    background: var(--app-action-danger-hover);
}

.save-bar {
    position: sticky;
    bottom: 44px;
    background: var(--surface-raised);
    padding: 1rem 0;
    border-top: 2px solid var(--brand-primary);
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    z-index: 10;
}


/* ---------- parent/menu.html (batch 2) ----------

   Relocated from that template's <style> block, in source order. The block
   and its {% block extra_css %} wrapper are gone; the template carries no CSS
   at all now, and it had no @media print block, so nothing stayed behind.

   SIX RULES LEFT THIS TEMPLATE WITH NO ADDITION ANYWHERE. .calendar-table,
   .calendar-table th, .calendar-table td.weekend, .calendar-table td.empty,
   .day-number and .day-cancelled were promoted into COMPONENTS by batch 1b
   from admin/menu_detail.html; parent/menu.html held the byte-identical other
   copy, so deleting it completes that promotion rather than losing a rule.
   Re-verified declaration-for-declaration against COMPONENTS at
   a8895669fead before deletion: all six identical, no drift.

   `.screen-parent-view-menu` is read off the resolved endpoint, not built
   from the file path: endpoint parent.view_menu, one route, no screen_id
   override. The path would give `parent-menu`, which is wrong.

   WHY .calendar-table td IS PREFIXED RATHER THAN PROMOTED. It is the one
   shared selector of the seven that DRIFTED: height 110px here against 100px
   in admin/menu_detail.html, which batch 1b already prefixed and parked above
   in this same block. Prefixing per file preserves both bodies and picks no
   winner; promotion would have forced one.

   Prefixing it lifts (0,1,1) to (0,2,1), which ties .calendar-table
   td.weekend and .calendar-table td.empty in COMPONENTS and hands them to
   this block on source order -- a real cascade flip, adjudicated `harmless`
   in tests/containment_adjudications.tsv. The two rules share no longhand:
   this one expands to 19 (border-* x12, padding-* x4, height, width,
   vertical-align), those to one (background-color). Every element matching
   .calendar-table td.weekend was already matched by .calendar-table td, so
   the prefix changes which of two already-applying rules wins, not which
   elements are involved. If this rule ever gains a background or
   background-color declaration, that adjudication is void.

   .calendar-table td.past is prefixed because it is bucket (E) --
   `calendar-table` is markup on admin/menu_detail.html -- even though `past`
   appears in no other template, so the unprefixed form would match nothing
   new today. Prefixed anyway: (E) takes a prefix, and the cheaper reading is
   not the one that has been wrong before.

   The remaining six are bucket (B), markup-local, and move unprefixed. They
   gain no specificity, and PAGES sits after COMPONENTS, so their position
   relative to every other rule is unchanged.

   NOT VERIFIED BY COMPUTED STYLE: .order-status.ordered and .day-order-link
   need an Order fixture the harness does not have, and .day-order-link:hover
   is unmeasurable by --dump-dom at all. See the LIMITS block (the state
   pseudo) and UNREACHABLE (the fixture gap) in
   tests/test_computed_style_harness.py, and project_docs/projectStatus.md
   section 7 item 6, where what would close each is recorded. */
.screen-parent-view-menu .calendar-table td {
    border: 1px solid var(--border-subtle);
    padding: 0.5rem;
    vertical-align: top;
    height: 110px;
    width: 14.28%;
}

.screen-parent-view-menu .calendar-table td.past {
    opacity: 0.5;
}

.day-restaurant {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--brand-primary);
    margin-bottom: 0.35rem;
}

.order-status {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
}

.order-status.ordered {
    background-color: var(--status-success-bg);
    color: var(--status-success-text);
}

.order-status.closed {
    background-color: var(--app-status-neutral-bg);
    color: var(--app-status-neutral-text);
}

.day-order-link {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--brand-primary);
    font-weight: 500;
    text-decoration: none;
    margin-top: 0.2rem;
}

.day-order-link:hover {
    text-decoration: underline;
}

/* The phone day list (mobile phase 3, 2026-10-26): parent/menu.html's days
   as one card per weekday, shown only at 860px and under, where the phone
   block shows it and hides the table beside it. Hidden here, so the desktop
   page and print are the table alone. Existing tokens only. The muted rows
   (past, closed, Pizza Friday, no lunch) are one rule, to be easy to
   change. */
.day-list {
    display: none;
}

.day-list-row {
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.day-list-date {
    font-weight: 700;
    color: var(--brand-primary-dark);
}

.day-list-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.day-list-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.day-list-status {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.day-list-cancelled {
    font-weight: 600;
    color: var(--app-text-danger);
}

.day-list-reason {
    display: block;
    font-size: 0.85rem;
}

.day-list-muted {
    background: var(--app-surface-muted);
    box-shadow: none;
}

.order-status.partial {
    background-color: var(--status-warning-bg);
    color: var(--status-warning-text);
}

/* The month links' short labels ("← September"), for phones only; the
   phone block shows them and visually hides the full names. */
.month-nav-short {
    display: none;
}

/* ---------- admin/order_detail.html (batch 3) ----------
   Thirteen top-level rules, no @media print, no flip candidates. Four left
   this block entirely and were PROMOTED to COMPONENTS: .badge-info, beside the
   badge family it belonged to, and the .household-banner trio, beside
   .page-header. Both promotions are documented where they landed, because
   that is where a reader meets them.

   The nine here are the eight bucket (B) rows, unprefixed because every class
   in them is markup in this template alone, and the one bucket (E) row, which
   takes the screen identifier.

   BUCKET DECIDES THE PREFIX; REACH DECIDES THE WALK. This is the first batch
   where the two columns could have disagreed, so the rule is stated rather
   than left implicit. `.audit-diff-recipient .name` is (E) because `name` is
   markup in four templates, and its `reach` is `anchored` under BOTH readings
   -- compound and occurrence -- because `audit-diff-recipient` is markup here
   alone, so no other page can match the whole selector today. It is prefixed
   anyway. Anchored is a fact about today's markup, not a property of the
   selector: nothing stops a later template using `audit-diff-recipient`, and
   if one did, an unprefixed rule would silently style it in the direction no
   probe covers -- a rule that does not currently apply is a rule no probe
   watches. And `reach` exists to say which pages need a human to look at
   them, not to decide prefixing; letting `anchored` suppress a prefix would
   make a walk-scheduling column into a cascade decision, the same conflation
   as reading File B's `prefix` column as a work order. The prefix costs one
   class-column point on a selector with no competitor.

   `screen-admin-order-detail` was read from emittable_identifiers(), not
   constructed from the path: admin.order_detail is the template's only
   endpoint, it declares no screen_id override, and the value is in the
   emittable set.

   A NOTE FOR THE NEXT PERSON WRITING A CLASS-COUNTING CHECK. \b is not a
   class-token boundary. Counting this template's markup with
   `\baudit-entry\b` returns 4, because the regex engine treats the hyphen in
   `audit-entry-header` as a word boundary while the class name treats it as an
   interior character -- so the count silently includes every sibling. Splitting
   the class attribute on whitespace and comparing tokens returns 1, which is
   the true figure. Most classes in this project are hyphenated, so a check
   built on \b will over-count almost everywhere it is used. */
.audit-entry {
    border-left: 3px solid var(--border-subtle);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.audit-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.audit-entry-action {
    font-weight: 600;
    color: var(--brand-primary-dark);
}

.audit-entry-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.audit-diff {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.audit-diff h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 0.25rem;
}

.audit-diff-recipient {
    margin-bottom: 0.4rem;
}

.screen-admin-order-detail .audit-diff-recipient .name {
    font-weight: 500;
}

.audit-diff-recipient ul {
    margin: 0.15rem 0 0 1.1rem;
    padding: 0;
    color: var(--app-text-detail);
}

/* ---------- admin/order_edit.html (batch 4) ----------
   Nineteen top-level rules, no @media print, eight flip pairs all `excluded`,
   no (E) rows. Sixteen left this block: thirteen PROMOTED to COMPONENTS, in
   the Order Form section above, and three DELETED outright -- the
   .household-banner trio, which batch 3 put in COMPONENTS at 374/382/388 and
   which was verified IDENTICAL here before removal. A deletion leaves with no
   corresponding addition anywhere; reading the bucket letter or the prefix
   column as a work order would have promoted three rules that should vanish.
   Second time that trap has fired in three batches.

   The three below are the (C) rows, and prefixing them is LOAD-BEARING rather
   than ceremonial. Each differs from the parent templates by exactly one
   declaration, always the parent ADDING an interaction affordance:
   .item-option gains `transition: background-color 0.1s` in
   parent/order_form.html; the checkbox and label each gain `cursor: pointer`
   in both parent templates. Promoting either side would silently hand one
   family of screens the other's affordances -- give the admin screens a
   pointer cursor they deliberately do not have, or take the parents'. Prefix,
   don't choose.

   `screen-admin-order-edit` was read from emittable_identifiers(): its only
   endpoint is admin.order_edit, it declares no screen_id override, and the
   value is in the emittable set. */
.screen-admin-order-edit .item-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    margin-bottom: 0.25rem;
}

.screen-admin-order-edit .item-option input[type="checkbox"] {
    accent-color: var(--brand-primary);
    width: 1.1rem;
    height: 1.1rem;
    margin: 0;
    flex-shrink: 0;
}

.screen-admin-order-edit .item-option label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: 0;
}

/* ---------- admin/backfill_entry.html (batch 5) ----------
   The twin of batch 4. Nineteen rules, the same nineteen selectors with
   byte-identical bodies, so this batch made NO promotion decisions -- batch 4
   made all of them from admin/order_edit.html's copies. SIXTEEN DELETIONS and
   the three below.

   A deletion leaves with no corresponding addition anywhere, so the safety
   argument is entirely that the copy is already in COMPONENTS. All sixteen
   were verified IDENTICAL declaration-by-declaration before removal: the
   thirteen batch 4 promoted (660-748) and the .household-banner trio batch 3
   promoted (374/382/388). Sixteen is the batch-2 shape at nearly three times
   the scale; batch 2's six were the largest before this.

   .item-qty WAS A DELETION DESPITE READING LIKE A PREFIXED MOVE, and the
   baseline said the opposite. After batch 4 it is the only page carrier, so
   it reclassified to bucket (E) with prefix screen-admin-backfill-entry and
   reach `reachable` -- all three mechanically correct and all three wrong to
   act on, because the classifier has no knowledge of app.css and the page it
   "reaches" is styled by COMPONENTS:737 byte-identically. That is recorded as
   a kind=bucket row in containment_adjudications.tsv, written by batch 4 and
   consumed here. It is the first time that file has been read as a work
   INSTRUCTION rather than as a record, and it worked: the row's ACTION line
   gave the opposite instruction to the baseline in one sentence, and named
   the single measurement to re-run.

   The three below are the (C) rows, and the drift is the same shape batch 4
   found on order_edit's copies -- the parent side adding one declaration and
   never changing a shared one: `transition: background-color 0.1s` on
   .item-option in parent/order_form.html, `cursor: pointer` on the checkbox
   and the label in both parent templates. The admin body is a strict subset.
   Prefix, don't choose.

   ONE THIRD-PARTY CONSEQUENCE, measured before the edit and recorded because
   a pure-deletion batch causing it is surprising. Removing this template's
   copies drops `.recipient-header .type-badge` in parent/order_form.html to a
   single page carrier, reclassifying it to (E) -- which makes it a flip
   TARGET, and it then pairs against the COMPONENTS .type-badge.staff-badge
   batch 4 promoted, as a CANDIDATE with nine overlapping longhands. Deleting
   a rule here promoted a selector two templates away into a bucket that owes
   a decision. It is on the harness's OWED list, owed by the
   parent/order_form.html batch.

   `screen-admin-backfill-entry` was read from emittable_identifiers():
   admin.backfill_entry is the template's only endpoint, it declares no
   screen_id override, and the value is in the emittable set. */
.screen-admin-backfill-entry .item-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    margin-bottom: 0.25rem;
}

.screen-admin-backfill-entry .item-option input[type="checkbox"] {
    accent-color: var(--brand-primary);
    width: 1.1rem;
    height: 1.1rem;
    margin: 0;
    flex-shrink: 0;
}

.screen-admin-backfill-entry .item-option label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: 0;
}

/* ---------- parent/order_form.html (batch 7) ----------
   THE LARGEST TEMPLATE IN THE MIGRATION: 58 rules, 12 DELETED and 46 moved
   here. First half of the hard pair; parent/order_edit.html follows and
   inherits every ruling below.

   THE TWELVE DELETIONS were verified IDENTICAL declaration-by-declaration
   against COMPONENTS before removal -- the .recipient-* family at 666-701,
   .group-* at 705/709 and the .item-* content rules at 716/721/748/754, all
   promoted by batch 4 from the admin twins. One app.css copy each, zero
   drift. `.recipient-header .type-badge` and its `.staff-badge` modifier are
   BOTH deletions, so the family moved together; the advice-harmful row in
   containment_adjudications.tsv is written for a future reader who might
   prefix one without the other, not for a hazard this batch faced.

   ZERO PROMOTIONS, FOR TWO INDEPENDENT REASONS, and neither needs the other.

   (1) ONE WITNESS, NOT TWO. `git log --follow` settles it: order_form is the
   original at dca80e2 (2026-08-03) and order_edit was derived from it at
   7ec2a8b (2026-08-14), arriving with the shared block already in it. So the
   24 byte-identical rules the two share are one authoring, and the 15
   shared-(D) rules whose only peer is the other half of the pair have nothing
   to promote on. No baseline records authorship lineage -- File A, B and C
   are all silent on it -- so a batch working from the tables alone would have
   promoted fifteen rules on one witness. That is .item-qty's trap at fifteen
   times the scale.

   (2) THE BASE DECLARATION GENUINELY DIFFERS, for .qty-stepper. This reason
   would survive even if a third independent carrier appeared tomorrow, which
   is why it is recorded beside the lineage argument rather than folded into
   it: a later reader with a third carrier should not reopen (1) and conclude
   the promotion is now available.

   .qty-stepper WAS DESCRIBED HERE AS TWO COMPONENTS SHARING A CLASS NAME.
   IT IS ONE COMPONENT, AND ALL SIX OF ITS RULES NOW LIVE IN COMPONENTS.

   What this passage said, and why it was wrong twice over. First it read "a
   ONE-STATE widget, because on the edit screen every item is already in the
   order and there is no unticked state", and called the divergence
   deliberate. Rendering both screens showed the edit screen DOES have an
   unticked state, and that THREE PIECES OF ONE WIDGET went missing together
   in the commit that created order_edit -- the `+` button, the `.visible`
   rule and the toggle JS -- which is an incomplete copy, not a redesign. Git
   shows WHEN the divergence was introduced; it does not show intent.

   Then, with the widget completed by the D90 fix, the remaining claim went
   false too: there was no longer any difference for "two components" to
   describe. The rules were byte-identical, and the duplication existed only
   because the fix had created it.

   THE ARGUMENT THIS PASSAGE MADE FOR KEEPING THE DUPLICATION WAS TESTED AND
   FAILED. It held that two prefixed copies make a future divergence visible
   as a diff between two named blocks. The divergence sat in two page <style>
   blocks for five weeks and in two adjacent prefixed blocks here for two more
   batches, and nothing noticed -- a person opening the page found it. Worse,
   this comment and its twin in the batch-8 block wrote the difference up as a
   cost worth paying, which immunised it against exactly the review the
   argument depended on. Duplication documented as deliberate is harder to see
   than duplication nobody has explained.

   The component, the promotion argument and what verification it did and did
   not get are all recorded in the Quantity Stepper section of COMPONENTS.

   APPEND, NOT INSERT, and the distinction is now stated rather than
   re-measured every batch. File C's unique key includes app_line. An APPEND
   at the end of app.css shifts no existing rule's line number; an INSERT
   shifts every rule below it -- and a comment added above an existing rule is
   an insert. Batch 6 inserted six lines at 348 and re-keyed 67 File C rows
   against a prediction of none. This batch appends and shifts none, which was
   modelled both ways and measured to agree rather than assumed.

   `screen-parent-place-order` was read from emittable_identifiers():
   parent.place_order is the template's only endpoint, it declares no
   screen_id override, and the value is in the emittable set. */
.screen-parent-place-order .recipient-body.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.screen-parent-place-order .item-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    margin-bottom: 0.25rem;
    transition: background-color 0.1s;
}

.screen-parent-place-order .item-option:hover {
    background-color: var(--app-option-hover-bg);
}

.screen-parent-place-order .item-option input[type="checkbox"] {
    accent-color: var(--brand-primary);
    width: 1.1rem;
    height: 1.1rem;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
}

.screen-parent-place-order .item-option label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    cursor: pointer;
    margin: 0;
}


.screen-parent-place-order .ordering-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.screen-parent-place-order .ordering-toggle input[type="checkbox"] {
    accent-color: var(--brand-primary);
    width: 1.1rem;
    height: 1.1rem;
}

/* Staff self-order toggle */

.screen-parent-place-order .self-order-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1.5rem;
    border: 2px dashed var(--app-option-border);
    border-radius: 6px;
    background: var(--app-surface-sunken);
    color: var(--brand-primary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}

.screen-parent-place-order .self-order-toggle:hover {
    background: var(--app-option-selected-bg);
    border-color: var(--brand-primary);
}

.screen-parent-place-order .self-order-toggle.active {
    border-style: solid;
    border-color: var(--brand-primary);
    background: var(--app-option-selected-bg);
}

.screen-parent-place-order .self-order-toggle .toggle-icon {
    font-size: 1.1rem;
    transition: transform 0.2s;
}

.screen-parent-place-order .self-order-toggle.active .toggle-icon {
    transform: rotate(45deg);
}

.screen-parent-place-order .self-order-section {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.2s ease, margin 0.3s ease;
    margin-bottom: 0;
}

.screen-parent-place-order .self-order-section.expanded {
    max-height: 5000px;
    opacity: 1;
    margin-bottom: 1.5rem;
}

.screen-parent-place-order .order-summary {
    position: sticky;
    bottom: 0;
    background: var(--surface-raised);
    padding: 1rem 1.5rem;
    border-top: 2px solid var(--brand-primary);
    margin-top: 1rem;
    z-index: 10;
    box-shadow: var(--app-shadow-sticky);
}

.screen-parent-place-order .summary-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.screen-parent-place-order .summary-details {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.screen-parent-place-order .summary-person-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.screen-parent-place-order .summary-total {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--brand-primary);
}

.screen-parent-place-order .summary-breakdown {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.screen-parent-place-order .summary-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Confirmation Overlay */

.screen-parent-place-order .confirm-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--app-scrim);
    z-index: 100;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.screen-parent-place-order .confirm-overlay.visible {
    display: flex;
}

.screen-parent-place-order .confirm-modal {
    background: var(--surface-raised);
    border-radius: 8px;
    max-width: 550px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--app-shadow-modal);
}

.screen-parent-place-order .confirm-header {
    background: var(--brand-primary);
    color: var(--app-text-on-brand);
    padding: 1rem 1.5rem;
    border-radius: 8px 8px 0 0;
}

.screen-parent-place-order .confirm-header h2 {
    font-size: 1.2rem;
    margin: 0;
}

.screen-parent-place-order .confirm-body {
    padding: 1.25rem 1.5rem;
}

.screen-parent-place-order .confirm-person {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.screen-parent-place-order .confirm-person:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.screen-parent-place-order .confirm-person-name {
    font-weight: 600;
    color: var(--brand-primary-dark);
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
}

.screen-parent-place-order .confirm-item {
    display: flex;
    justify-content: space-between;
    padding: 0.2rem 0;
    font-size: 0.85rem;
}

.screen-parent-place-order .confirm-item-name {
    color: var(--app-text-strong);
}

.screen-parent-place-order .confirm-item-group {
    color: var(--text-tertiary);
    font-size: 0.75rem;
}

.screen-parent-place-order .confirm-item-price {
    font-weight: 500;
}

.screen-parent-place-order .confirm-total {
    background: var(--app-surface-muted);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.screen-parent-place-order .confirm-total-amount {
    font-size: 1.3rem;
    color: var(--brand-primary);
}

.screen-parent-place-order .confirm-footer {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    border-top: 1px solid var(--border-light);
}

.screen-parent-place-order .confirm-note {
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding: 0 1.5rem 0.5rem;
}

/* ---------- parent/order_edit.html (batch 8) ----------
   The second half of the hard pair, and the last batch carrying decisions.
   Forty rules: NINE DELETED and thirty-one moved here.

   THE NINE were .recipient-section, .recipient-header, .recipient-header h3,
   .recipient-body, .group-section, .group-name, .item-name, .item-right and
   .item-price, all byte-identical to COMPONENTS 666-748 and verified
   declaration-by-declaration before removal.

   HOW THE NINE WERE IDENTIFIED, so the list can be re-derived rather than
   trusted: the regenerator's (E) advisory named them. Batch 7 removed this
   template's only peer, which reclassified 28 of its rows to bucket (E) --
   the advisory's first load test, against a previous maximum of six -- and
   printed every one with its prefix and reach at the regeneration stamped
   500626e, recorded in dcb815d. NINE of those rows, not 28, are advice-void:
   the other 21 have no identical app.css copy, so (E)-with-prefix is correct
   advice for them and they are prefixed below. From batch 8 the advisory
   makes that split itself, labelling each flagged row IDENTICAL -> DELETE or
   no identical app.css copy -> prefix, so no later batch has to do by hand
   what this one did.

   NO BUCKET ROWS WERE WRITTEN FOR THE NINE, and that is a change of practice
   rather than an omission. A row in containment_adjudications.tsv earns its
   place when the page rule it is about will still be declared after the
   batch's commit -- that is the only thing the file's machinery does. These
   nine are deleted by the batch that found them, so a row would be born
   consumed and, because a bucket row's key includes the template and
   migration is a one-way door, could never match again. The reasoning lives
   here instead, beside the COMPONENTS rules that survive.

   ZERO PROMOTIONS, FOR TWO INDEPENDENT REASONS, inherited from batch 7 and
   not revisited. (1) ONE WITNESS: order_form is the original at dca80e2 and
   this file was derived from it at 7ec2a8b, arriving with the shared block
   already in it, so byte-identity across the pair was never two witnesses.
   (2) .qty-stepper's BASE DECLARATION genuinely differs, which would hold
   even against a third independent carrier.

   AND THE (C) BUCKET DISSOLVED RATHER THAN RESOLVING. At the selection pass
   four rules here were (C) -- .item-option, .qty-stepper, .qty-stepper button
   and .order-summary -- drifted against their twin in order_form. Batch 7
   migrated that twin, so all four now read (E) with `peers=none`: the (C)
   bucket needs two carriers and there is only one. Nothing about the rules
   changed. This matters for a later reader, because the two-components
   argument below is made against a bucket letter that no longer says (C) and
   would otherwise look over-argued.

   .qty-stepper WAS DESCRIBED HERE AS TWO COMPONENTS SHARING A CLASS NAME.
   IT IS ONE COMPONENT, AND ALL SIX OF ITS RULES NOW LIVE IN COMPONENTS.

   What this passage said, and why it was wrong twice over. First it read "a
   ONE-STATE widget, because on the edit screen every item is already in the
   order and there is no unticked state", and called the divergence
   deliberate. Rendering both screens showed the edit screen DOES have an
   unticked state, and that THREE PIECES OF ONE WIDGET went missing together
   in the commit that created order_edit -- the `+` button, the `.visible`
   rule and the toggle JS -- which is an incomplete copy, not a redesign. Git
   shows WHEN the divergence was introduced; it does not show intent.

   Then, with the widget completed by the D90 fix, the remaining claim went
   false too: there was no longer any difference for "two components" to
   describe. The rules were byte-identical, and the duplication existed only
   because the fix had created it.

   THE ARGUMENT THIS PASSAGE MADE FOR KEEPING THE DUPLICATION WAS TESTED AND
   FAILED. It held that two prefixed copies make a future divergence visible
   as a diff between two named blocks. The divergence sat in two page <style>
   blocks for five weeks and in two adjacent prefixed blocks here for two more
   batches, and nothing noticed -- a person opening the page found it. Worse,
   this comment and its twin in the batch-8 block wrote the difference up as a
   cost worth paying, which immunised it against exactly the review the
   argument depended on. Duplication documented as deliberate is harder to see
   than duplication nobody has explained.

   The component, the promotion argument and what verification it did and did
   not get are all recorded in the Quantity Stepper section of COMPONENTS.

   APPEND VERSUS INSERT IS A PROPERTY OF THE COMMIT, NOT OF THIS BLOCK, and
   this paragraph got that wrong when it was written. It claimed the batch
   appended and shifted nothing. The PAGES block did append -- and the same
   commit then INSERTED two comments into COMPONENTS, at .type-badge.staff-
   badge and at .email-field, which shifts app_line for every rule below them.
   File C's key includes app_line, so the prediction had to be corrected from
   `added 0, removed 28` to `added 2, removed 30` before regenerating. The
   diagnosis was confirmed rather than merely fitted by re-keying File C
   WITHOUT app_line, which recovered the original numbers exactly.

   SHARPER STILL, measured when this correction was itself predicted: what
   matters is not where the insert is but whether it is above a rule FILE C
   REFERENCES. File C pairs page selectors against BASE and COMPONENTS only,
   never PAGES -- all 37 of its rows point at COMPONENTS and the highest
   app_line among them is 927. So an insert inside a PAGES block, which is
   what this correction is, shifts nothing it keys on: predicted 0/0/0 on all
   three baselines and measured 0/0/0. Batch 8's inserts were at COMPONENTS
   696 and 952, above COMPONENTS rules, which is why those did shift.

   `screen-parent-edit-order` was read from emittable_identifiers():
   parent.edit_order is the template's only endpoint, it declares no
   screen_id override, and the value is in the emittable set. */
.screen-parent-edit-order .recipient-section.marked-for-removal {
    border-color: var(--app-border-danger);
    background: var(--app-status-danger-tint);
}

.screen-parent-edit-order .recipient-body.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.screen-parent-edit-order .item-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    margin-bottom: 0.25rem;
}

.screen-parent-edit-order .item-option:hover {
    background-color: var(--app-option-hover-bg);
}

.screen-parent-edit-order .item-option input[type="checkbox"] {
    accent-color: var(--brand-primary);
    width: 1.1rem;
    height: 1.1rem;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
}

.screen-parent-edit-order .item-option label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    cursor: pointer;
    margin: 0;
}


.screen-parent-edit-order .remove-toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--action-danger);
    cursor: pointer;
    user-select: none;
}

.screen-parent-edit-order .remove-toggle input[type="checkbox"] {
    accent-color: var(--action-danger);
    width: 1.05rem;
    height: 1.05rem;
    cursor: pointer;
}

.screen-parent-edit-order .removal-note {
    font-size: 0.8rem;
    color: var(--app-text-danger);
    padding: 0.5rem 1rem;
    display: none;
}

.screen-parent-edit-order .recipient-section.marked-for-removal .removal-note {
    display: block;
}

.screen-parent-edit-order .order-summary {
    position: sticky;
    bottom: 0;
    background: var(--surface-raised);
    padding: 1rem 1.5rem;
    border-top: 2px solid var(--brand-primary);
    margin-top: 1rem;
    z-index: 10;
    box-shadow: var(--app-shadow-sticky);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.screen-parent-edit-order .confirm-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--app-scrim);
    z-index: 100;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.screen-parent-edit-order .confirm-overlay.visible {
    display: flex;
}

.screen-parent-edit-order .confirm-modal {
    background: var(--surface-raised);
    border-radius: 8px;
    max-width: 550px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--app-shadow-modal);
}

.screen-parent-edit-order .confirm-header {
    background: var(--brand-primary); color: var(--app-text-on-brand); padding: 1rem 1.5rem; border-radius: 8px 8px 0 0;
}

.screen-parent-edit-order .confirm-header h2 {
    font-size: 1.2rem; margin: 0;
}

.screen-parent-edit-order .confirm-body {
    padding: 1.25rem 1.5rem;
}

.screen-parent-edit-order .confirm-person {
    margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border-subtle);
}

.screen-parent-edit-order .confirm-person:last-child {
    border-bottom: none; margin-bottom: 0; padding-bottom: 0;
}

.screen-parent-edit-order .confirm-person-name {
    font-weight: 600; color: var(--brand-primary-dark); font-size: 0.95rem; margin-bottom: 0.4rem;
}

.screen-parent-edit-order .confirm-line {
    font-size: 0.85rem; padding: 0.15rem 0;
}

.screen-parent-edit-order .confirm-line.added {
    color: var(--app-text-added);
}

.screen-parent-edit-order .confirm-line.removed {
    color: var(--app-text-danger); text-decoration: line-through;
}

.screen-parent-edit-order .confirm-line.removed-person {
    color: var(--app-text-danger); font-weight: 600; text-decoration: none;
}

.screen-parent-edit-order .confirm-line.signpost {
    color: var(--status-warning-text); font-style: italic; text-decoration: none;
}

.screen-parent-edit-order .confirm-empty-warning {
    background: var(--status-warning-bg);
    border: 1px solid var(--app-status-warning-border);
    color: var(--app-status-warning-strong-text);
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.screen-parent-edit-order .confirm-no-change-note {
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.screen-parent-edit-order .confirm-footer {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    border-top: 1px solid var(--border-light);
}

/* ---------- admin/pizza_friday.html (batch 9) ----------
   The first of the four print-block templates, and the first batch in the
   programme that could not have been verified whole before the print pass
   existed. Nine top-level rules: EIGHT MOVED here, verbatim, in source
   order, UNPREFIXED; ONE DELETED.

   UNPREFIXED because all nine rows were bucket (B), markup-local, and that
   was measured rather than read off the bucket letter: no template, script
   or rule anywhere else in the repository uses a pizza-* or write-in class,
   so moving these unprefixed styles no other page. There was no pizza-*
   family in COMPONENTS to join, so no promotion decision existed.

   AND UNPREFIXED IS ALSO WHAT KEEPS THE PRINT LAYOUT. The template keeps its
   @media print block, and those print rules override these on SOURCE ORDER
   at equal specificity -- this file loads before the page's <style>. A
   prefix on any rule here would lift it to (0,2,0) and defeat the print
   override on every property the override sets without !important, while
   the screen showed nothing: the container partition protects print rules
   from being moved, not from being defeated. Rehearsed before this batch
   was written, by prefixing .pizza-grade-header alone: screen probe 0
   differences, print pass 59, the header's border-radius going 0px -> 4px
   4px 0px 0px. As committed: 0 and 0.

   THE DELETED RULE is .pizza-table .write-in, dead since the initial commit
   -- `git log -S write-in` finds only the commit that added it, and no
   markup has ever carried the class. Deleting it did not stop the batch
   probing it, because the probe set comes from tree A, so it is recorded in
   the harness's DEAD_RULES and retires itself one batch later.

   admin/pizza_friday.html IS THE FIRST TEMPLATE TO MIGRATE WHILE KEEPING A
   <style> BLOCK. The previous eight left their templates routed with no
   block at all; this one stays styled and routed until D83, and the
   harness's declaration assertion treats it as exactly that.

   APPEND, NOT INSERT. Nothing above PAGES changed, and File C's app_line
   points only at BASE and COMPONENTS, so no File C row shifts. Predicted by
   running the classifier on the post-batch template before editing:
   classes 1710 unchanged, buckets 260 -> 251, flips 39 unchanged. */

.pizza-grade-section {
    margin-bottom: 1.5rem;
}

.pizza-grade-header {
    background: var(--brand-primary);
    color: var(--app-text-on-brand);
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 4px 4px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pizza-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface-raised);
    border: 1px solid var(--border-subtle);
    border-top: none;
    border-radius: 0 0 4px 4px;
}

.pizza-table th {
    background: var(--app-surface-muted);
    padding: 0.5rem 0.75rem;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--brand-primary-dark);
    border-bottom: 2px solid var(--border-subtle);
}

.pizza-table th:first-child {
    text-align: left;
    width: 220px;
}

.pizza-table td {
    padding: 0.45rem 0.75rem;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--app-border-divider);
    text-align: center;
}

.pizza-table td:first-child {
    text-align: left;
    font-weight: 500;
}

.pizza-table tr:last-child td {
    border-bottom: none;
}

/* ---------- admin/billing_report.html (batch 10) ----------
   The first batch carrying a real print-override hazard, and the first to
   apply the ruling on it. Nineteen top-level rules moved here, verbatim, in
   source order: the fourteen bucket-(B) rules UNPREFIXED, and five under
   .screen-admin-billing-report -- the (C) .household-card, the two (E)
   .expanded states, and the two (D) rows. The six print rules stay in the
   template; one of them is now prefixed in place.

   THE RULING: PREFIX THE PRINT OVERRIDE IN PLACE. A prefix is a transform
   applied to a cascade relationship, so it has to be applied to both sides
   of any relationship it would otherwise break; prefixing only the top-level
   rule is half a transform. The container partition, canonical since batch
   1b, now reads: nothing in a print block moves or promotes; a print rule may
   be prefixed in place when the rule it overrides is prefixed, so the cascade
   is preserved. Rejected: !important on the override (changes its meaning
   more broadly than needed) and moving it here (moves a print rule -- D83's
   job). Recorded in full beside OUT_OF_SCOPE in the computed-style harness.

   THE HAZARD, FOUND BY RENDERING RATHER THAN BY SELECTOR TEXT. The batch was
   simulated without the fix and rendered under the print pass on
   /admin/billing/{menu_id}, menu 2, with every print selector probed on the
   longhands its own declarations set, in two states: as served, and with
   `expanded` added exactly as toggleHousehold() adds it. Exactly one print
   declaration lost -- .household-card box-shadow, none -> rgba(0,0,0,0.1)
   0 1px 3px -- in both states and whichever way the (D) rows went. The
   same-selector string match had predicted the same one; rendering found
   nothing it missed. THE LIMIT, stated so "by element" does not read broader
   than it was: the fixture renders ONE .household-card, so it meant one
   element.

   THE DELIBERATE MISTAKE, run on these files: this block as written, with
   the print override left unprefixed. Screen probe 0 differences; print pass
   exactly 1, that box-shadow. With the in-place prefix: 0 and 0. That is the
   ruling's evidence, not just this batch's.

   THE (D) ROWS ARE PREFIXED PER FILE, not promoted. .household-header and
   .household-header:hover are byte-identical here and in
   admin/blackbaud_preview.html, and the evidence says one authoring: both
   files first appear in the squashed initial commit, the first 18 lines of
   their <style> blocks are identical, :hover differs only in wrapping, and
   preview's .household-body pair carries this page's .household-details
   bodies under renamed classes. No naming-family membership either:
   COMPONENTS' .household-banner trio shares the prefix only, and differs in
   role and shape. The policy gives no ground to promote.

   WHY THAT IS NOT INCONSISTENT WITH THE .qty-stepper PROMOTION, which was
   also one authoring with no family. That promotion rested on a positive
   decision that the two should be the same: the D90 fix had completed the
   widget to parity, and the three-layer split showed the CSS was one
   component. Here the evidence points the other way -- preview renamed this
   page's classes, which is divergence already under way, on two screens with
   different purposes. ONE AUTHORING IS NOT A REASON TO PROMOTE; IT IS THE
   ABSENCE OF A REASON. It is also the cheaper disposition: an append rather
   than an insert, File C 0/0, and admin/blackbaud_preview.html's two rows
   reclassify (D) -> (E) with a prefix that is correct advice for its batch,
   rather than advice-void.

   UNVERIFIABLE GAINED ITS FIRST ENTRIES SINCE BATCH 7: the two .expanded
   states and .household-header:hover. The .expanded pair's reason says what
   was measured -- the state was rendered in Phase 0 by synthesising the
   class; the screen pass simply does not do that -- rather than claiming a
   CDP probe is needed. Only :hover genuinely needs interaction.

   NONE OF THE NINETEEN HAS AN app.css COPY to verify against; checked by
   parsing, selector by selector. `.screen-admin-billing-report` is read off
   the rendered response -- <body class="area-admin
   screen-admin-billing-report"> -- and from emittable_identifiers(), endpoint
   admin.billing_report with no override. css_prefix now also checks the
   in-place print prefix, which lives in a page block it did not read before.

   APPEND, NOT INSERT: nothing above PAGES changed, so no File C row shifts.
   Predicted by running the classifier on the post-batch template before
   editing: classes 1710 unchanged, buckets 251 -> 232 (+5 -24, including
   four peer rows re-emitted in blackbaud_preview and impersonate), flips 39
   unchanged.
   BILLING ROUND 3 (ruling R13) removed seven of these rules, which the
   redesigned page no longer renders: .household-card, .household-header
   and its :hover, .household-details and its .expanded state,
   .billing-order-date, .billing-recipient-name, .toggle-arrow.expanded and
   .grand-total-bar -- with the template's two print rules that matched
   nothing. .household-name, .household-stats, .household-total and
   .toggle-arrow stay: the redesign reuses them. The history above is kept
   as the record of the batch. */

.household-name { font-weight: 600; color: var(--brand-primary-dark); font-size: 1rem; }

.household-stats { font-size: 0.8rem; color: var(--text-secondary); }

.household-total { font-weight: 700; color: var(--brand-primary); font-size: 1.1rem; }

.toggle-arrow { transition: transform 0.2s; font-size: 0.8rem; color: var(--text-tertiary); }

/* ---------- parent/order_confirmation.html (batch 11) ----------
   Nineteen top-level rules, all MOVED here verbatim and in source order:
   EIGHTEEN UNPREFIXED, ONE PREFIXED, NONE DELETED. No rule had an app.css
   copy, so there was nothing to delete, and no template shares a selector
   with this one, so there was no promotion question.

   UNPREFIXED because eighteen rows are bucket (B), and markup-locality was
   measured rather than read off the letter: no other template, script or
   rule uses an apply-* class (the two apply-* hits elsewhere are element
   ids on the Blackbaud preview page). Moving them unprefixed styles no other
   page.

   THE ONE PREFIX is .apply-overlay.visible, bucket (E) because `visible` is
   markup on other pages, and `anchored` because .apply-overlay is local to
   this one. Prefixed as batches 3 and 10 treated their anchored (E) rows. It
   lifts (0,2,0) to (0,3,0) over a base rule at (0,1,0), so the override the
   modal depends on wins by more, not less. Its excluded File C pair, against
   .qty-stepper.visible in COMPONENTS, needs a .qty-stepper this page never
   renders.

   :hover KEEPS ITS RELATIONSHIP. .apply-select-controls a and its :hover are
   both (B) and both move unprefixed, so the two sides of that cascade
   relationship are treated the same -- billing's rule, satisfied without a
   prefix on either side.

   APPEND, NOT INSERT. Nothing above PAGES changed, and File C's app_line
   points only at BASE and COMPONENTS, so no File C row shifts. Predicted by
   running the classifier on the post-batch tree before the edit was made
   here: see the baselines commit that follows. */

.apply-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--app-scrim);
    z-index: 100;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.screen-parent-order-confirmation .apply-overlay.visible {
    display: flex;
}

.apply-modal {
    background: var(--surface-raised);
    border-radius: 8px;
    max-width: 450px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--app-shadow-modal);
}

.apply-modal-header {
    background: var(--brand-primary);
    color: var(--app-text-on-brand);
    padding: 1rem 1.5rem;
    border-radius: 8px 8px 0 0;
}

.apply-modal-header h2 {
    font-size: 1.1rem;
    margin: 0;
}

.apply-modal-header p {
    font-size: 0.85rem;
    color: var(--app-modal-header-subtext);
    margin: 0.25rem 0 0;
}

.apply-modal-body {
    padding: 1rem 1.5rem;
}

.apply-day-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--app-border-divider);
}

.apply-day-option:last-child {
    border-bottom: none;
}

.apply-day-option input[type="checkbox"] {
    accent-color: var(--brand-primary);
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
}

.apply-day-option label {
    cursor: pointer;
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.apply-day-date {
    font-weight: 500;
    color: var(--brand-primary-dark);
    font-size: 0.95rem;
}

.apply-day-weekday {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.apply-select-controls {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

.apply-select-controls a {
    color: var(--brand-primary);
    cursor: pointer;
    text-decoration: none;
}

.apply-select-controls a:hover {
    text-decoration: underline;
}

.apply-modal-footer {
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-light);
}

.apply-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.apply-footer-buttons {
    display: flex;
    gap: 0.5rem;
}

/* ---------- parent/my_orders.html (batch 12) ----------
   Twenty-nine top-level rules, all MOVED here verbatim and in source order:
   TWENTY-EIGHT UNPREFIXED, ONE PREFIXED, NONE DELETED. No rule had an
   app.css copy and no app.css rule names any of this page's 24 classes, so
   there was nothing to delete; no template shares a selector with this one.

   NOT PROMOTED. COMPONENTS has a .recipient-* family (.recipient-section,
   -header, -body, batch 4), but its role is the order form's recipient card.
   The five .recipient-* rules here are summary rows inside a past order's
   card -- a shared word, not a shared role or declaration shape.

   UNPREFIXED because twenty-eight rows are bucket (B): every class in them
   is markup on this page only, and `open` is added only by this page's
   toggleCard(). Moving them unprefixed styles no other page.

   THE ONE PREFIX is .recipient-subtotal, bucket (E) and `reachable`:
   parent/order_form.html carries the class at three sites, styled there
   only inline. MEASURED on both order_form routes: unprefixed, this rule
   would widen the visible subtotal 35.45px -> 55px, move it 19.5px left and
   right-align it; prefixed, nothing changes. It lifts (0,1,0) to (0,2,0)
   over no competing rule.

   :hover KEEPS ITS RELATIONSHIP. .order-card-header and its :hover are both
   (B) and both move unprefixed, as are .expand-arrow / .order-card-body and
   their .open states.

   APPEND, NOT INSERT. Nothing above PAGES changed, and File C's app_line
   points only at BASE and COMPONENTS, so no File C row shifts. */

.orders-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.month-filter select {
    font-size: 0.85rem;
    padding: 0.3rem 0.5rem;
    border: 1px solid var(--border-default);
    border-radius: 3px;
}

.order-card {
    background: var(--surface-raised);
    border-radius: 6px;
    box-shadow: var(--app-shadow-card);
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.order-card.cancelled-card {
    opacity: 0.55;
}

/* The cancellation reason (D63). Sits between the header and the body
   rather than inside it, because .order-card-body is display:none until
   the card is clicked -- and the point of this line is that a family
   whose order vanished sees why without having to click anything. */
.cancelled-card-reason {
    padding: 0.5rem 1rem;
    border-top: 1px solid var(--app-border-divider);
    font-size: 0.8rem;
    line-height: 1.35;
    color: var(--brand-primary-dark);
}

/* This one element is exempt from the cancelled card's dimming, and it
   is exempted by COLOUR, not by opacity. Do not "consolidate" it back
   into .cancelled-card, and do not replace it with
   `opacity: 1` -- that rule looks like the obvious fix and does
   nothing at all.
   WHY: `opacity` on .cancelled-card renders that element and its whole
   subtree as one group and then composites the group at 0.55. A
   descendant cannot raise its own effective opacity above an
   ancestor's; `opacity: 1` here is a no-op.
   WHY IT MATTERS HERE: since D63 this line is the only channel that
   ever explains a vanished order to a family -- a day cascade sends no
   email by design (§4.2), and the same wording otherwise appears only
   in cancel_order's refusal flash, which needs a POST. At 0.8rem it
   has to clear WCAG AA (4.5:1).
   THE NUMBERS, composited through the 0.55 and measured against the
   card's own composited white over the #f5f3f7 page: #321856 gives
   ~3.7:1 (fails), #000 gives ~4.9:1 (passes). ~4.9:1 is also the
   CEILING -- inside a 0.55-opacity ancestor no text colour can do
   better than pure black, so anything lighter than #000 fails AA here.
   That is why this is #000 and not the palette purple.
   NOT LIFTED: .cancelled-card keeps its opacity: 0.55. Dimming the
   card is doing real work distinguishing cancelled from active, and
   the rest of the card being worse (recipient names at ~2.3:1) stays
   D64's problem, not this rule's. */
.order-card.cancelled-card .cancelled-card-reason {
    color: var(--app-text-emphasis);
}

/* The note at the top of an expanded cancelled card's body (D112): either
   that cancelled orders are not charged, or that no meals remain. Added
   2026-10-05, after batch 12, so it is a new rule rather than a moved one,
   and it is prefixed to this screen like any new page rule.
   NOT .cancelled-card-reason: that class carries a border-top, and inside
   the body it would sit directly under the body's own border, doubling it.
   The text style is the same, and so is the colour, for the same reason:
   it renders inside the 0.55-opacity cancelled card, where #000 at 0.8rem
   (~4.9:1) is the only colour that clears AA -- see the rule above. The
   bottom padding is 0 because .order-card-recipients below supplies the
   gap. */
.screen-parent-my-orders .cancelled-card-note {
    padding: 0.75rem 1rem 0;
    font-size: 0.8rem;
    line-height: 1.35;
    color: var(--app-text-emphasis);
}

.order-card-header {
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: background 0.1s;
}

.order-card-header:hover {
    background: var(--app-header-hover-bg);
}

.order-card-header-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.order-card-date {
    min-width: 130px;
}

.order-card-date-day {
    font-weight: 600;
    color: var(--brand-primary-dark);
    font-size: 0.95rem;
}

.order-card-date-rest {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.order-card-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.order-card-amount {
    font-weight: 600;
    color: var(--brand-primary);
    font-size: 1rem;
    min-width: 60px;
    text-align: right;
}

.expand-arrow {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    transition: transform 0.2s;
}

.expand-arrow.open {
    transform: rotate(90deg);
}

.order-card-body {
    display: none;
    border-top: 1px solid var(--app-border-divider);
}

.order-card-body.open {
    display: block;
}

.order-card-recipients {
    padding: 0.75rem 1rem;
}

.recipient-order-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.25rem 0;
    font-size: 0.85rem;
}

.recipient-order-row:not(:last-child) {
    border-bottom: 1px solid var(--app-border-divider-faint);
}

.recipient-name {
    font-weight: 500;
    color: var(--brand-primary-dark);
    min-width: 120px;
}

.recipient-items {
    color: var(--text-secondary);
    flex: 1;
    margin: 0 0.75rem;
}

.screen-parent-my-orders .recipient-subtotal {
    color: var(--brand-primary);
    font-weight: 500;
    min-width: 55px;
    text-align: right;
}

.order-card-actions {
    padding: 0.5rem 1rem;
    border-top: 1px solid var(--app-border-divider);
    display: flex;
    justify-content: flex-end;
    gap: 0.4rem;
}

.orders-summary {
    text-align: right;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-subtle);
}

.orders-summary strong {
    color: var(--brand-primary);
    font-size: 1.05rem;
}

.cancelled-section-header {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    margin: 1.5rem 0 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--border-subtle);
}

.recipient-count-badge {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* ---------- admin/impersonate.html (batch 13) ----------
   Batch 13 is two templates, this one and admin/staff_management.html below;
   each has its own section. Fifteen top-level rules, all MOVED here verbatim
   and in source order: SEVEN UNPREFIXED, EIGHT PREFIXED, NONE DELETED. No
   rule had an app.css copy, so there was nothing to delete.

   UNPREFIXED: the seven bucket-(B) rules (.household-card-header, its h3,
   -body, .member-row and its :not(:last-child), .member-info,
   .recipients-list). Every class in them is markup on this page only.

   PREFIXED under .screen-admin-impersonate:
   - (C) .household-card -- admin/blackbaud_preview.html styles the same class
     differently in its own block (and billing_report's copy above is already
     prefixed to its screen).
   - (C) .role-badge and .search-box -- staff_management styles both, with
     different bodies.
   - (E) .role-badge.parent / .admin / .lunch_staff / .faculty -- `admin`,
     `parent` and the rest are markup on other pages. MEASURED reach: no other
     template carries role-badge together with any of them, so all four are
     anchored; the baseline's `reachable` on .parent is the compound reading.
   - (D) .search-box:focus, PREFIXED PER FILE, NOT PROMOTED. Its base
     .search-box is (C) and prefixed, so a global :focus would tie it at
     (0,2,0) and leave source order to decide. Prefixing both sides gives
     (0,3,0) over (0,2,0) and makes order irrelevant. MEASURED by calling
     focus() on the input in the harness's render: border #ccc -> #4a2878 and
     the glow on, identical before and after on both pages, and a tree with
     the wrong order fails.

   NOT PROMOTED: .role-badge. staff_management's body matches COMPONENTS'
   .badge on six declarations, and the .parent / .admin colours match
   .badge-active / .badge-inactive, but this page's body has no
   inline-block and a different size and padding, so one shared rule cannot
   be neutral on both pages. Recorded as a merge candidate after step 4.

   APPEND, NOT INSERT. Nothing above PAGES changed, and File C's app_line
   points only at BASE and COMPONENTS, so no File C row shifts. */

.screen-admin-impersonate .household-card {
    background: var(--surface-raised);
    border-radius: 6px;
    box-shadow: var(--app-shadow-card);
    margin-bottom: 1rem;
    overflow: hidden;
}

.household-card-header {
    background: var(--app-surface-muted);
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.household-card-header h3 {
    color: var(--brand-primary-dark);
    font-size: 1rem;
    margin: 0;
}

.household-card-body {
    padding: 0.75rem 1rem;
}

.member-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
}

.member-row:not(:last-child) {
    border-bottom: 1px solid var(--app-border-divider);
}

.member-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.screen-admin-impersonate .role-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    text-transform: uppercase;
}

.screen-admin-impersonate .role-badge.parent { background: var(--status-success-bg); color: var(--status-success-text); }
.screen-admin-impersonate .role-badge.admin { background: var(--status-danger-bg); color: var(--status-danger-text); }
.screen-admin-impersonate .role-badge.lunch_staff { background: var(--status-warning-bg); color: var(--status-warning-text); }
.screen-admin-impersonate .role-badge.faculty { background: var(--app-status-info-bg); color: var(--app-status-info-text); }

.recipients-list {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    padding-left: 0.5rem;
}

.screen-admin-impersonate .search-box {
    width: 100%;
    padding: 0.6rem 1rem;
    border: 1px solid var(--border-default);
    border-radius: 4px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.screen-admin-impersonate .search-box:focus {
    outline: none;
    border-color: var(--app-focus-border);
    box-shadow: 0 0 0 2px var(--app-focus-ring);
}

/* ---------- admin/staff_management.html (batch 13) ----------
   Eighteen top-level rules, all MOVED here verbatim and in source order:
   FOURTEEN UNPREFIXED, FOUR PREFIXED, NONE DELETED. No rule had an app.css
   copy.

   UNPREFIXED: the fourteen bucket-(B) rules, among them the .role-admin /
   .role-lunch_staff / .role-faculty colours. They are markup on this page
   only, and they set only background-color and color, which the prefixed
   .role-badge below does not, so the change of specificity between them
   decides nothing.

   PREFIXED under .screen-admin-staff-management:
   - (C) .role-badge and .search-box -- impersonate styles both, with
     different bodies (see the section above).
   - (E) .staff-card.inactive -- `inactive` is markup on
     admin/family_detail.html; no other template carries it with staff-card,
     so it is anchored.
   - (D) .search-box:focus, prefixed per file for the reason given above,
     MEASURED the same way. */

.screen-admin-staff-management .role-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.role-admin {
    background-color: var(--brand-primary);
    color: var(--app-text-on-brand);
}

.role-lunch_staff {
    background-color: var(--app-role-badge-staff-bg);
    color: var(--app-text-on-fill);
}

.role-faculty {
    background-color: var(--app-fill-neutral);
    color: var(--app-text-on-fill);
}

.staff-card {
    background: var(--surface-raised);
    border-radius: 6px;
    box-shadow: var(--app-shadow-card);
    margin-bottom: 0.5rem;
    padding: 0.75rem 1rem;
}

.screen-admin-staff-management .staff-card.inactive {
    opacity: 0.5;
}

.staff-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.staff-identity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.staff-name {
    font-weight: 600;
    color: var(--brand-primary-dark);
    font-size: 0.95rem;
}

.staff-email {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.staff-card-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.control-group label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    font-weight: 600;
    min-width: 65px;
}

.control-group select {
    font-size: 0.8rem;
    padding: 0.2rem 0.35rem;
    border: 1px solid var(--border-default);
    border-radius: 3px;
}

.control-group .household-select {
    max-width: 190px;
}

.staff-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.screen-admin-staff-management .search-box {
    width: 100%;
    padding: 0.6rem 1rem;
    border: 1px solid var(--border-default);
    border-radius: 4px;
    font-size: 0.9rem;
}

.screen-admin-staff-management .search-box:focus {
    outline: none;
    border-color: var(--app-focus-border);
    box-shadow: 0 0 0 2px var(--app-focus-ring);
}

/* ---------- admin/blackbaud_preview.html (batch 14) ----------
   Twelve top-level rules: ELEVEN MOVED here verbatim and in source order,
   SIX UNPREFIXED, FIVE PREFIXED, ONE DELETED. No rule had an app.css copy,
   and the block held no print rules.

   UNPREFIXED: the six surviving bucket-(B) rules (.household-body,
   .preview-student, .preview-adult, .role-tag, .role-tag.teacher,
   .role-tag.non_teaching_staff). Every class in them is markup on this page
   only.

   PREFIXED under .screen-blackbaud-preview, all bucket (E), none (C) or (D):
   - .household-card -- reachable: admin/billing_report.html and
     admin/impersonate.html carry the class; both copies above are already
     prefixed to their own screens.
   - .household-header and .household-header:hover -- reachable:
     admin/billing_report.html carries the class. Both sides of the :hover
     pair carry the prefix, so their relationship is unchanged.
   - .household-body.expanded and .role-tag.parent -- anchored: no other
     template carries household-body or role-tag, so nothing else can match
     them. They are prefixed because they are (E), not because of anything
     measured elsewhere.

   DELETED: .preview-student:last-child. Dead CSS: .preview-student is
   emitted only inside the students loop, and both arms of the
   `{% if hh.adults %}` that follows it emit a <p>, so the last student
   always has a later element sibling. No script inserts or removes
   elements. Deleted as batch 9 deleted .pizza-table .write-in, with a
   DEAD_RULES entry that retires itself one batch later.

   APPEND, NOT INSERT. Nothing above PAGES changed, so no File C row
   shifts. The page's 29 inline hex values and the Apply card's gold border
   stay inline: step 8 and the step 10 ruling own them. */

.screen-blackbaud-preview .household-card {
    background: var(--surface-raised);
    border-radius: 6px;
    box-shadow: var(--app-shadow-card);
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.screen-blackbaud-preview .household-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--app-border-divider);
}

.screen-blackbaud-preview .household-header:hover {
    background: var(--app-header-hover-bg);
}

.household-body {
    display: none;
    padding: 0.75rem 1rem;
    background: var(--app-surface-sunken);
}

.screen-blackbaud-preview .household-body.expanded {
    display: block;
}

.preview-student {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--app-border-divider);
}

.preview-adult {
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding: 0.2rem 0;
}

.role-tag {
    display: inline-block;
    font-size: 0.7rem;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    margin-left: 0.3rem;
    font-weight: 500;
}

.screen-blackbaud-preview .role-tag.parent {
    background: var(--app-fill-subtle);
    color: var(--brand-primary);
}

.role-tag.teacher {
    background: var(--status-success-bg);
    color: var(--status-success-text);
}

.role-tag.non_teaching_staff {
    background: var(--status-warning-bg);
    color: var(--status-warning-text);
}

/* ---------- admin/family_detail.html (batch 15) ----------
   Twenty-two top-level rules, all MOVED here verbatim and in source order
   with their four comments: EIGHTEEN UNPREFIXED, FOUR PREFIXED. Two of the
   unprefixed rules lose a dead member from their selector list. No rule had
   an app.css copy, and the block held no print rules.

   UNPREFIXED: the eighteen bucket-(B) rules. Every class in them is markup
   on this page only.

   PREFIXED under .screen-admin-family-detail, none (C) or (D):
   - summary and summary::-webkit-details-marker -- bucket (A), bare element
     selectors. admin/blackbaud_sync.html also carries <summary>.
   - .member-card.inactive and .edit-form.visible -- bucket (E), anchored:
     inactive and visible are markup elsewhere, but no other template
     carries member-card or edit-form. They are prefixed because they are
     (E), not because of anything measured elsewhere.

   DELETED: the .action-links button member of `.action-links a,
   .action-links button` and of its :hover pair. Dead CSS: both
   .action-links divs hold two literal <a> and no Jinja branch, the page
   has no include or macro, and no script inserts a button. Deleted with a
   DEAD_RULES entry that retires itself one batch later.

   ONE COMMENT REWORDED, one word: the .household-history comment said the
   native marker is suppressed "file-wide". In app.css that would be false,
   since the rule is prefixed to this screen, so it now says "screen-wide".
   The other three comments are verbatim.

   APPEND, NOT INSERT. Nothing above PAGES changed, so no File C row
   shifts. The page's 51 inline style= attributes and their 30 hex values
   stay inline: step 8 owns them. */

.member-card {
    background: var(--app-surface-sunken);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
}

.screen-admin-family-detail .member-card.inactive {
    opacity: 0.5;
    background: var(--app-surface-inactive);
    border-color: var(--app-border-inactive);
}

.edit-form {
    display: none;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-subtle);
}

.screen-admin-family-detail .edit-form.visible {
    display: block;
}

.inline-form {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    flex-wrap: wrap;
}

.inline-form input {
    padding: 0.3rem 0.5rem;
    font-size: 0.85rem;
    border: 1px solid var(--border-default);
    border-radius: 3px;
}

.inline-form select {
    padding: 0.3rem 0.5rem;
    font-size: 0.85rem;
    border: 1px solid var(--border-default);
    border-radius: 3px;
}

.action-links {
    font-size: 0.8rem;
    display: flex;
    gap: 0.75rem;
    margin-top: 0.35rem;
}

.action-links a {
    color: var(--brand-primary);
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 0.8rem;
}

.action-links a:hover {
    text-decoration: underline;
}

/* Deactivate/Reactivate live in their own <details> below .action-links
   now (see .activation-control), not inside it -- .action-links .danger
   and .action-links .btn (Piece 2) are gone because nothing inside
   .action-links carries those classes anymore. A <details>/<summary>
   needs no JavaScript to open, unlike the .edit-form/.visible toggle
   Edit/Move still use: if these two specific controls stopped working,
   the reason a status change happened goes unrecorded, which isn't
   true of Edit or Move failing. */
.screen-admin-family-detail summary {
    list-style: none;
}

.screen-admin-family-detail summary::-webkit-details-marker {
    display: none;
}

.activation-control {
    margin-top: 0.5rem;
}

.activation-control form {
    margin-top: 0.4rem;
    padding-top: 0.4rem;
    border-top: 1px solid var(--border-subtle);
}

.activation-control textarea {
    display: block;
    width: 100%;
    max-width: 400px;
    padding: 0.3rem 0.5rem;
    font-size: 0.85rem;
    font-family: inherit;
    border: 1px solid var(--border-default);
    border-radius: 3px;
    margin-bottom: 0.4rem;
    resize: vertical;
}

/* Standalone now (not .action-links .danger) since Deactivate summaries
   no longer sit inside .action-links -- same look, full rule instead of
   a color-only override on a button reset that batch 15 deleted. */
.danger {
    display: inline-block;
    color: var(--app-text-danger);
    text-decoration: none;
    cursor: pointer;
    font-size: 0.8rem;
}

.danger:hover {
    text-decoration: underline;
}

/* Surface A: the one-liner on an inactive card (Piece 1, Slice 3). */
.activation-summary {
    font-size: 0.8rem;
    color: var(--app-text-detail);
    margin: 0.35rem 0 0;
}

.activation-summary-empty {
    color: var(--text-tertiary);
    font-style: italic;
}

/* Surface B: the household-wide history disclosure. Its own trigger
   look, distinct from .activation-control's Deactivate/Reactivate
   buttons -- this isn't an action, it's informational, so it gets a
   plain heading-style trigger with a manual disclosure indicator
   (summary's native marker is suppressed screen-wide, above). */
.household-history summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--brand-primary);
    font-size: 1rem;
}

.household-history summary::before {
    content: '▸ ';
}

.household-history[open] summary::before {
    content: '▾ ';
}

/* ---------- admin/blackbaud_progress.html (batch 16) ----------
   Twenty top-level rules, all MOVED here verbatim and in source order:
   SEVENTEEN UNPREFIXED, THREE PREFIXED. No rule had an app.css copy, and
   the block held no comments and no print rules. Its @keyframes spin
   already moved in batch 1a (COMPONENTS, above).

   UNPREFIXED: the seventeen bucket-(B) rules. Every class in them is
   markup on this page only.

   PREFIXED under .screen-blackbaud-sync-progress-page:
   - .progress-bar-fill -- bucket (C): staff/checklist.html carries the
     class and declares its own rule. Unprefixed here, this rule would
     reach checklist's bar. Checklist is UNROUTED, so no comparison can see
     that page: this prefix is the only guard. After this batch checklist's
     row is (E), reachable, which commits its batch to prefixing it.
   - .progress-phase.active and .phase-status.error -- bucket (E),
     anchored: active and error are markup elsewhere, but no other template
     carries progress-phase or phase-status.

   STATES. .waiting is in the markup; .active, .completed, .failed,
   .running, .done and .error are set by the page's own script from
   /blackbaud/sync/status. The harnesses render seven sync states through
   that script, so each was compared, not assumed.

   APPEND, NOT INSERT. Nothing above PAGES changed position, so no File C row
   shifts. The page's 18 inline style= attributes and their 11 hex values
   stay inline: step 8 owns them. */

.progress-container {
    max-width: 600px;
    margin: 2rem auto;
}

.progress-phase {
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: var(--surface-raised);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
}

.screen-blackbaud-sync-progress-page .progress-phase.active {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 1px var(--brand-primary);
}

.progress-phase.completed {
    border-color: var(--app-status-success-accent);
    background: var(--app-status-success-tint);
}

.progress-phase.failed {
    border-color: var(--app-border-danger);
    background: var(--app-status-danger-tint);
}

.phase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.phase-title {
    font-weight: 600;
    color: var(--brand-primary-dark);
}

.phase-status {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
}

.phase-status.waiting {
    background: var(--app-status-neutral-bg);
    color: var(--app-status-neutral-text);
}

.phase-status.running {
    background: var(--status-warning-bg);
    color: var(--status-warning-text);
}

.phase-status.done {
    background: var(--status-success-bg);
    color: var(--status-success-text);
}

.screen-blackbaud-sync-progress-page .phase-status.error {
    background: var(--status-danger-bg);
    color: var(--status-danger-text);
}

.progress-bar-track {
    height: 8px;
    background: var(--app-fill-subtle);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.screen-blackbaud-sync-progress-page .progress-bar-fill {
    height: 100%;
    background: var(--brand-primary);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-detail {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.35rem;
}

.progress-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.stat-card {
    background: var(--surface-raised);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 0.75rem;
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-primary);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-subtle);
    border-top-color: var(--brand-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 0.4rem;
    vertical-align: middle;
}

/* ---------- admin/blackbaud_test.html (batch 17) ----------
   Nine top-level rules, all MOVED here verbatim and in source order:
   EIGHT UNPREFIXED, ONE PREFIXED. No rule had an app.css copy, and the
   block held no comments and no print rules.

   UNPREFIXED: the eight bucket-(B) rules. Every class in them is markup on
   this page only.

   PREFIXED under .screen-blackbaud-test-connection:
   - .endpoint-body.expanded -- bucket (E), anchored: `expanded` is markup
     elsewhere, but no other template carries endpoint-body.

   STATES. The page is the real /blackbaud/test route rendered against
   canned Blackbaud responses (SERVER_STATES in the computed-style harness):
   success, partial and error, each at rest and with every .endpoint-body
   expanded by the page's own toggleEndpoint(). That toggle reaches the body
   through nextElementSibling -- D112's shape, as in D113 -- recorded, not
   changed.

   APPEND, NOT INSERT. Nothing above PAGES changed position, so no File C row
   shifts. The page's 22 inline style= attributes and their 17 hex values
   stay inline, the Jinja colour conditional among them: step 8 owns them. */

.json-container {
    position: relative;
    background: var(--app-code-bg);
    border-radius: 4px;
    padding: 1rem;
    margin-top: 0.5rem;
}

.json-container pre {
    font-size: 0.75rem;
    color: var(--app-code-text);
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
}

.copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--brand-primary);
    color: var(--app-text-on-brand);
    border: none;
    padding: 0.3rem 0.6rem;
    border-radius: 3px;
    font-size: 0.75rem;
    cursor: pointer;
}

.copy-btn:hover {
    background: var(--app-brand-hover);
}

.endpoint-card {
    margin-bottom: 1rem;
}

.endpoint-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 0.75rem 1rem;
    background: var(--surface-raised);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
}

.endpoint-header:hover {
    background: var(--app-header-hover-bg);
}

.endpoint-body {
    display: none;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-subtle);
    border-top: none;
    border-radius: 0 0 4px 4px;
    background: var(--surface-raised);
}

.screen-blackbaud-test-connection .endpoint-body.expanded {
    display: block;
}

/* ---------- admin/daily_order_report.html (batch 18) ----------
   Twelve of the page's eighteen top-level rules, verbatim and in source
   order: the eight bucket-(B) rules UNPREFIXED, and four under
   .screen-admin-daily-order-report -- .grade-header (C), whose body differs
   from staff/checklist.html's, and the three (E) rules .report-section,
   .report-section h2 and .checklist-table .check-cell. The other six were
   promoted to COMPONENTS (Checklist tables).

   .grade-header IS PREFIXED, NOT PROMOTED. Checklist's copy adds
   display:flex, justify-content and align-items; this page gets the same
   three from an inline style= on the element, so the two compute the same on
   screen. Neither body was changed, and the inline style is step 8's.

   THE PRINT BLOCK stays in the template, two of its rules prefixed in place
   (see the template's comment). The page's 21 inline style= attributes and
   their 13 hex values are untouched. */

.screen-admin-daily-order-report .report-section {
    margin-bottom: 2rem;
}

.screen-admin-daily-order-report .report-section h2 {
    color: var(--brand-primary);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-subtle);
}

.count-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface-raised);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: var(--app-shadow-card);
    margin-bottom: 1rem;
}

.count-table th {
    background-color: var(--table-header-bg);
    color: var(--app-text-on-table-header);
    padding: 0.6rem 1rem;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 500;
}

.count-table td {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--app-border-divider);
    font-size: 0.9rem;
}

.count-table tr:last-child td {
    border-bottom: none;
}

.count-table .count-number {
    font-weight: 700;
    color: var(--brand-primary);
    font-size: 1.1rem;
    text-align: center;
    width: 80px;
}

.count-table .count-revenue {
    text-align: right;
    color: var(--text-secondary);
    width: 100px;
}

.group-header-row td {
    background: var(--app-surface-muted);
    font-weight: 600;
    color: var(--brand-primary-dark);
}

.totals-row td {
    background: var(--app-surface-muted);
    font-weight: 600;
}

.screen-admin-daily-order-report .grade-header {
    background: var(--brand-primary);
    color: var(--app-text-on-brand);
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 4px 4px 0 0;
}

.screen-admin-daily-order-report .checklist-table .check-cell {
    width: 40px;
    text-align: center;
}

/* ---------- staff/checklist.html (batch 19) ----------
   Seven of the page's thirteen top-level rules, verbatim and in source
   order: the two bucket-(B) rules UNPREFIXED, and five under
   .screen-staff-checklist -- .progress-bar-fill (admin/blackbaud_progress.html
   has its own, prefixed, with a different body), .grade-header (its body
   differs from the daily report's) and the three (E) rules th.check-col,
   tr.received and tr.received td. The other six were byte-identical to the
   COMPONENTS copies batch 18 promoted (Checklist tables) and were deleted.

   THE PRINT BLOCK stays in the template, two of its rules prefixed in place
   (see the template's comment). The page's 13 inline style= attributes,
   their 6 hex values and the progress bar's Jinja width are untouched. */

.progress-bar-container {
    background: var(--app-fill-subtle);
    border-radius: 4px;
    height: 8px;
    margin-top: 0.5rem;
}

.screen-staff-checklist .progress-bar-fill {
    background: var(--brand-primary);
    border-radius: 4px;
    height: 100%;
    transition: width 0.3s;
}

.screen-staff-checklist .grade-header {
    background: var(--brand-primary);
    color: var(--app-text-on-brand);
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 4px 4px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.screen-staff-checklist .checklist-table th.check-col {
    width: 60px;
    text-align: center;
}

.screen-staff-checklist .checklist-table tr.received {
    background: var(--status-success-bg);
}

.screen-staff-checklist .checklist-table tr.received td {
    color: var(--status-success-text);
}

.receive-checkbox {
    width: 1.3rem;
    height: 1.3rem;
    accent-color: var(--brand-primary);
    cursor: pointer;
}


/* ---------- shared/login.html (login redesign) ----------

   The split panel: brand purple on the left with the mark, the name and a
   gold rule; white on the right with Sign In. Moved here from login's own
   <style> block, which is gone. login.html extends nothing, so it emits its
   own <body class="area-main screen-main-index">, derived from main.index as
   base.html derives it.

   FULL BLEED: the two panels fill the window edge to edge, with no gutter,
   shadow or rounded corners around them. The body is a row flex container at
   least the viewport's height; .login-container grows to its width and is
   stretched to its height, so each panel is as tall as the window.

   NO @media. The panels stack on a phone by flex-wrap alone: they sit side by
   side while the window is at least 17.5rem + 20rem wide, and wrap onto a row
   each below that, every one taking the full width. Stacked, the two rows
   share the window's height: align-content's default stretches each row by an
   equal share of the space left over after their contents.

   THE BASE LAYER REACHES THIS PAGE NOW, and two of its four rules would change
   it. body's line-height 1.6 is put back to normal on this body, which is what
   login had before it linked app.css; a:hover's underline is cancelled on
   .login-btn, the production Sign In link.

   The flashes take app.css's .flash-message rules above, as every other page
   does; login's own .flash-error/.flash-success rules went with its block
   (C22). The partial still emits both class conventions. */
.screen-main-index {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    line-height: normal;
}

.login-container {
    flex: 1 1 auto;
    display: flex;
    flex-wrap: wrap;
    background: var(--surface-raised);
    text-align: center;
}

/* ONE GROUP, left-aligned and centred vertically: the mark, the name, the rule
   and the school stack on the panel's left padding, and justify-content
   centres the stack in the panel's height. Same padding as .login-card, so
   both panels share one edge rhythm. */
.logo-area {
    flex: 1 1 17.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    padding: 2.5rem 2rem;
    background-color: var(--brand-primary);
    color: var(--app-text-on-brand);
    /* The seam: the brand panel sits above the white one. The shadow falls on
       .login-card, the later sibling, which has no background of its own, so
       it shows over the container's white with no positioning or z-index --
       give .login-card a background and it is painted over. The token falls
       2px down with an 8px blur and no x offset: below the panel when they
       stack, only the blur's edge at the side seam. */
    box-shadow: var(--app-shadow-panel);
}

/* The inline mark: fill="currentColor", so this colour is the mark's. */
.login-mark {
    display: block;
    width: 7.5rem;
    height: auto;
    margin-bottom: 1.25rem;
    color: var(--app-text-on-brand);
}

.logo-area h1 {
    color: var(--app-text-on-brand);
    font-size: 1.8rem;
}

/* Between the name and the school, an equal 0.85rem either side. */
.login-rule {
    width: 3rem;
    border-top: 2px solid var(--accent-gold);
    margin: 0.85rem 0;
}

.logo-area p {
    color: var(--app-text-on-brand);
    font-size: 0.95rem;
}

.login-card {
    flex: 1.4 1 20rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2.5rem 2rem;
}

/* The sign-in column: capped and centred, so on a wide window the button does
   not stretch across half the screen. Children, not a wrapper, so the markup
   and its classes stay as they are. */
.login-card > * {
    width: 100%;
    max-width: 24rem;
}

.login-btn {
    display: block;
    width: 100%;
    padding: 0.85rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.15s;
    background-color: var(--brand-primary);
    color: var(--app-text-on-brand);
}

.login-btn:hover {
    background-color: var(--app-brand-hover);
    text-decoration: none;
}

.login-help {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-top: 0.75rem;
    line-height: 1.4;
}


/* ---------- parent/cart.html (Item D, batch B2) ----------

   A new page, so new rules, appended. UNPREFIXED where every class is this
   page's own markup (the cart-* classes appear in no other template), which
   also keeps them at (0,1,0) so the phone rules in the 860px block, at
   (0,2,0) under .area-parent, win on a phone. PREFIXED where the rule
   reaches a component another page uses: the order form's .qty-stepper,
   reused here as the quantity control with submit buttons. No new token,
   no colour literal. */

.cart-note {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.cart-day {
    margin-bottom: 1rem;
}

.cart-day-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.cart-day-date {
    font-size: 1.1rem;
    color: var(--brand-primary-dark);
}

.cart-day-restaurant {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.cart-person {
    padding: 0.5rem 0;
    border-top: 1px solid var(--app-border-divider);
}

.cart-person-name {
    font-size: 1rem;
    color: var(--brand-primary-dark);
    margin-bottom: 0.25rem;
}

.cart-person-label {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-left: 0.4rem;
}

.cart-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.4rem 0;
}

.cart-line + .cart-line {
    border-top: 1px solid var(--app-border-divider-faint);
}

.cart-line-name {
    font-size: 0.95rem;
}

.cart-line-group {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* "Was $X when added, now $Y" (spec P1). */
.cart-price-note {
    font-size: 0.8rem;
    color: var(--app-status-warning-strong-text);
}

.cart-line-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-qty-value {
    min-width: 32px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--brand-primary-dark);
}

/* Inside the stepper the value takes the order form's number field's place,
   with its borders. Borders and alignment only, so the phone rule above
   still sets the size. */
.screen-parent-cart .qty-stepper .cart-qty-value {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid var(--border-default);
    border-right: 1px solid var(--border-default);
}

/* − at 1 and + at the cap of 10. */
.screen-parent-cart .qty-stepper button:disabled {
    opacity: 0.4;
    cursor: default;
}

.cart-line-total {
    min-width: 4rem;
    text-align: right;
    font-weight: 500;
    color: var(--brand-primary);
}

.cart-day-subtotal {
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-subtle);
}

.cart-total {
    text-align: right;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-subtle);
}

.cart-total strong {
    color: var(--brand-primary);
    font-size: 1.05rem;
}


/* ---------- Item D, batch B4: the cart strip, the calendar's cart marks
   and the cart page's day actions ----------

   New markup, so new rules, appended and unprefixed, as B2's: every class
   here is B4's own (cart-strip and cart-strip-text in
   parent/_cart_strip.html; in-cart, day-in-cart and day-list-in-cart in
   parent/menu.html; cart-day-actions in parent/cart.html). A day in the
   cart has a gold left edge in the table and in the day list alike. No
   new token, no colour literal. */

.cart-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    background: var(--surface-raised);
    border-left: 4px solid var(--accent-gold);
    border-radius: 4px;
    box-shadow: var(--app-shadow-card);
}

.cart-strip-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.cart-strip-text strong {
    color: var(--brand-primary-dark);
}

/* "In your cart": the announcement badge's gold and text. */
.order-status.in-cart {
    background-color: var(--accent-gold);
    color: var(--brand-primary-dark);
}

/* A table cell's border is the calendar's own rule, which outranks this,
   so the cell's edge is an inset shadow; the day list's card has none. */
.day-in-cart {
    box-shadow: inset 4px 0 0 var(--accent-gold);
}

.day-list-in-cart {
    border-left: 4px solid var(--accent-gold);
}

.cart-day-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* The navbar Cart link (base_app.html; the dashboard card has no badge): the
   day count in the announcement gold; " days to place" for a screen reader. */
.nav-cart-badge {
    margin-left: 0.25rem;
    background: var(--accent-gold);
    color: var(--brand-primary-dark);
    border-radius: 999px;
    padding: 0 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.nav-cart-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    white-space: nowrap;
}


/* ---------- The dashboard's cart card (shared/dashboard.html; Samuel,
   2026-11-05) ----------

   First under the welcome line, for an active member with a household.
   A card with the cart strip's gold left edge: "Your cart" and the strip's
   "N days · $X" with View Cart, or how to fill an empty cart and the Order
   Calendar. Top level only: the text and the button wrap under each other
   on a phone by flex-wrap, and the button and the link carry their own
   44px, since the dashboard is area-main and the phone .btn rule is
   area-parent's. Its own classes, not cart-strip, which the dashboard must
   not carry. No new token, no colour literal. */

.cart-card {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--accent-gold);
}

.cart-card-body {
    flex: 1 1 16rem;
}

.cart-card-title {
    color: var(--brand-primary);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.cart-card-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.cart-card-text strong {
    color: var(--brand-primary-dark);
}

.cart-card-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
}

.cart-card-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--brand-primary);
    font-size: 0.9rem;
    font-weight: 500;
}


/* ---------- Student ordering (Item E, batch B2) ----------

   parent/student_ordering.html, the "does not count" notice on the order
   form, the edit page and the cart, and the admin dashboard's master
   switch. New classes, so new rules, appended and UNPREFIXED: every class
   here is this feature's own markup. The cards reuse .card, .badge,
   .badge-active, .badge-info, .btn and .form-group. Phone rules are in the
   860px block, under .area-parent. No new token, no colour literal. */

.allowance-intro {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.allowance-card {
    max-width: 40rem;
}

.allowance-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem 1rem;
    margin-bottom: 0.5rem;
}

.allowance-name {
    font-size: 1.1rem;
    color: var(--brand-primary-dark);
}

.allowance-label {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-left: 0.4rem;
}

.allowance-spent {
    font-weight: 600;
    color: var(--brand-primary-dark);
}

.allowance-note,
.allowance-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.allowance-meta {
    margin: 0.75rem 0 0;
}

.allowance-error {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--app-text-danger);
    margin: 0.5rem 0;
}

.allowance-choices {
    border: none;
    margin: 0.75rem 0 0;
    padding: 0;
    min-width: 0;
}

.allowance-legend {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.allowance-choice {
    padding: 0.5rem 0;
    border-top: 1px solid var(--app-border-divider);
}

.allowance-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.allowance-option {
    font-weight: 600;
}

.allowance-option input {
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
    accent-color: var(--brand-primary);
}

.allowance-amount {
    max-width: 16rem;
    margin: 0.5rem 0;
}

.allowance-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.allowance-notice {
    font-size: 0.85rem;
    color: var(--brand-primary);
    background: var(--app-fill-subtle);
    border-radius: 3px;
    padding: 0.4rem 0.75rem;
    margin: 0 0 0.75rem;
}

.settings-switch {
    padding: 1rem 1.25rem;
}

.settings-switch-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem 1rem;
}

.settings-switch-state {
    font-size: 0.9rem;
}

.settings-switch-help {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0.5rem 0 0;
}

/* ---------- Item E B4c part 2: the student pages ----------
   student/menu.html, order_form.html, order_placed.html and my_orders.html
   (the student blueprint). New classes, student-*, appended and
   UNPREFIXED: each is this feature's own markup. The menu is a list of
   day cards at every width, not a table. The pages reuse .card, .btn,
   .order-status and the allowance text classes. The order form reuses the
   parent form's .item-option and confirm-overlay markup; those rules are
   screen-prefixed there, so this page's copies follow, under
   .screen-student-place-order, with the parent form's values; My Orders'
   cancel dialog (B4d-1) shares seven of them, .screen-student-my-orders
   added to their selectors. Phone rules
   are in the 860px block, under .area-student. No new token, no colour
   literal. */

.student-month-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.student-days {
    display: flex;
    flex-direction: column;
}

.student-day {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    padding: 1rem 1.25rem;
}

.student-day-head {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1 1 12rem;
    min-width: 0;
}

.student-day-date {
    font-size: 1rem;
    font-weight: 600;
    color: var(--brand-primary-dark);
    margin: 0;
}

.student-day-place,
.student-day-open {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.student-day-labels {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.student-day-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.student-order-for {
    font-size: 1.05rem;
    color: var(--brand-primary-dark);
    margin-bottom: 1rem;
}

.student-item-out {
    opacity: 0.4;
}

.student-order-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.student-order-total {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--brand-primary);
    margin: 0;
}

.student-order-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.student-order-warning {
    font-weight: 600;
    color: var(--app-text-danger);
}

.student-items {
    list-style: none;
    margin: 0.5rem 0;
    padding: 0;
}

.student-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--app-border-divider);
    font-size: 0.9rem;
}

.student-item-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.student-item-total {
    font-weight: 600;
    color: var(--brand-primary-dark);
    text-align: right;
    margin: 0.5rem 0 1rem;
}

.student-orders-heading {
    font-size: 1.1rem;
    color: var(--brand-primary);
    margin: 1.5rem 0 0.75rem;
}

.screen-student-place-order .item-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    margin-bottom: 0.25rem;
}

.screen-student-place-order .item-option:hover {
    background-color: var(--app-option-hover-bg);
}

.screen-student-place-order .item-option input[type="checkbox"] {
    accent-color: var(--brand-primary);
    width: 1.1rem;
    height: 1.1rem;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
}

.screen-student-place-order .item-option label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    cursor: pointer;
    margin: 0;
}

.screen-student-place-order .confirm-overlay,
.screen-student-my-orders .confirm-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--app-scrim);
    z-index: 100;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.screen-student-place-order .confirm-overlay.visible,
.screen-student-my-orders .confirm-overlay.visible {
    display: flex;
}

.screen-student-place-order .confirm-modal,
.screen-student-my-orders .confirm-modal {
    background: var(--surface-raised);
    border-radius: 8px;
    max-width: 550px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--app-shadow-modal);
}

.screen-student-place-order .confirm-header,
.screen-student-my-orders .confirm-header {
    background: var(--brand-primary);
    color: var(--app-text-on-brand);
    padding: 1rem 1.5rem;
    border-radius: 8px 8px 0 0;
}

.screen-student-place-order .confirm-header h2,
.screen-student-my-orders .confirm-header h2 {
    font-size: 1.2rem;
    margin: 0;
}

.screen-student-place-order .confirm-body,
.screen-student-my-orders .confirm-body {
    padding: 1.25rem 1.5rem;
}

.screen-student-place-order .confirm-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.2rem 0;
    font-size: 0.85rem;
}

.screen-student-place-order .confirm-item-name {
    color: var(--app-text-strong);
}

.screen-student-place-order .confirm-item-price {
    font-weight: 500;
}

.screen-student-place-order .confirm-total {
    background: var(--app-surface-muted);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.screen-student-place-order .confirm-total-amount {
    font-size: 1.3rem;
    color: var(--brand-primary);
}

.screen-student-place-order .confirm-note {
    font-size: 0.85rem;
    padding: 0.75rem 1.5rem 0.5rem;
}

.screen-student-place-order .confirm-footer,
.screen-student-my-orders .confirm-footer {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.75rem;
    border-top: 1px solid var(--border-light);
}

/* ---------- admin/billing_report.html: the billing redesign (rounds 2 to 4) ----------
   APPENDED, not inserted beside the batch-10 block above. Round 2 replaced
   round 1's block whole (rulings R5-R8); round 3 reworked both views
   (rulings R10-R13, defaults D-j to D-n); round 4 restyled the page (rulings
   R14, R15, defaults D-o to D-t) and removed the rules it left unused. Every
   rule is under .screen-admin-billing-report. Every class is new to this
   page except the batch-10 .household-name, .household-stats,
   .household-total and .toggle-arrow, restyled here, and the shared
   .page-header and .btn-sm, given this page's width cap and minimum size.
   Colours are tokens only, no new ones. No media query and no table: rows
   are flex lines in one fluid column and the chart's bars shrink, so nothing
   scrolls sideways. Bar widths and heights are inline `width: N%` /
   `height: N%`, set by the server -- lengths, never colours.

   SURFACES AND MEASURE (D-o). The summary and the tabs-plus-view are white
   panels in .billing-col; the column and the page header are capped at
   64rem. .main-content (base) is itself capped at 960px with 1.5rem padding,
   a 912px column, so at any window wider than that the cap does not bind:
   it only keeps header and panels on one column if .main-content widens.

   TYPE (D-p). Nothing under 0.8125rem. Amounts are right-aligned in each
   row's last box at weight 500 or 400. font-variant-numeric is not a
   property the containment scanner classifies, so there is no tabular-nums:
   on Windows, weight 500 has no Segoe UI face and renders the Regular face,
   whose ten digits share one advance width (read from segoeui.ttf); the
   Semibold face's do not, so no amount here is 600.

   COLOUR (D-q, R15). Names, amounts and headings are the default text
   colour; purple is the total, the active tab, links and bars. The
   leaderboard and ranking bars are --brand-primary only. The per-day chart
   has three solid slots, cycled by restaurant: --brand-primary,
   --accent-gold, and --brand-primary mixed 55% over --surface-raised (no
   solid mid-purple token exists; --purple-600 is 1.25:1 against the brand).
   color-mix() holds no literal, so the colour ratchet does not count it.
   The legend and every bar's title name the restaurant. The slots and the
   one-colour fill ask print to keep their fills (D-h).

   CHEVRONS (D-r). An empty span, two borders turned 45 degrees: right when
   closed, down when open. It keeps the batch-10 .toggle-arrow class so the
   page's print rule still hides it. Each level's body is indented by the
   gutter, so a row's chevron sits under its parent's name and every amount
   ends on the panel's right edge.

   CLIPPED, NOT ELLIPSISED: a day row's two lines are nowrap with overflow
   hidden, so the row height never jumps (D-l). text-overflow is not a
   property the containment scanner classifies; the full line is in the
   day's breakdown. */

.screen-admin-billing-report .page-header,
.screen-admin-billing-report .billing-col {
    max-width: 64rem;
    margin-left: auto;
    margin-right: auto;
}

.screen-admin-billing-report .btn-sm {
    font-size: 0.8125rem;
}

.screen-admin-billing-report .billing-summary,
.screen-admin-billing-report .billing-main {
    background: var(--surface-raised);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
}

.screen-admin-billing-report .billing-summary {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem 2rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.screen-admin-billing-report .billing-main {
    padding: 0.25rem 1.25rem 1.25rem;
}

.screen-admin-billing-report .billing-summary-main {
    flex: 1 1 14rem;
}

.screen-admin-billing-report .billing-summary-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.screen-admin-billing-report .billing-summary-total {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--brand-primary);
}

.screen-admin-billing-report .billing-summary-split {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.screen-admin-billing-report .billing-summary-side {
    flex: 1 1 18rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.screen-admin-billing-report .billing-summary-counts {
    color: var(--text-primary);
}

.screen-admin-billing-report .billing-summary-when {
    cursor: help;
}

.screen-admin-billing-report .billing-status-warn {
    background: var(--status-warning-bg);
    color: var(--status-warning-text);
    border: 1px solid var(--app-status-warning-border);
    border-radius: var(--radius-md);
    padding: 0.35rem 0.6rem;
}

.screen-admin-billing-report .billing-status-note {
    color: var(--status-warning-text);
}

.screen-admin-billing-report .billing-tabs {
    display: flex;
    gap: 1.5rem;
    border-bottom: 1px solid var(--app-border-divider);
    margin-bottom: 1rem;
}

.screen-admin-billing-report .billing-tab {
    padding: 0.625rem 0.125rem;
    margin-bottom: -1px;
    font-size: 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 3px solid transparent;
}

.screen-admin-billing-report .billing-tab.is-active {
    color: var(--brand-primary);
    font-weight: 600;
    border-bottom: 3px solid var(--brand-primary);
}

.screen-admin-billing-report .billing-filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.screen-admin-billing-report .billing-search {
    flex: 1 1 14rem;
    min-width: 0;
    padding: 0.35rem 0.6rem;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
}

.screen-admin-billing-report .billing-filter-menu {
    flex: 0 1 auto;
}

.screen-admin-billing-report .billing-filter-menu[open] {
    flex: 1 1 100%;
}

.screen-admin-billing-report .billing-filter-menu > summary {
    list-style: none;
}

.screen-admin-billing-report .billing-filter-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.5rem 0.75rem;
    margin-top: 0.5rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    background: var(--app-surface-muted);
}

.screen-admin-billing-report .billing-filter-panel .form-group {
    margin-bottom: 0;
    flex: 1 1 8rem;
}

.screen-admin-billing-report .billing-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.screen-admin-billing-report .billing-chip {
    padding: 0.1rem 0.6rem;
    border-radius: 999px;
    background: var(--app-fill-subtle);
    color: var(--brand-primary-dark);
    text-decoration: none;
}

.screen-admin-billing-report .billing-quiet,
.screen-admin-billing-report .billing-sort {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* Disclosure rows (D-r): no marker, a chevron in a left gutter, and only a
   row's OWN chevron turns. Rows share a horizontal padding and the bodies
   indent on the left only, so the amounts form one right edge. */

.screen-admin-billing-report .billing-hh-row,
.screen-admin-billing-report .billing-person-row,
.screen-admin-billing-report .billing-day-row,
.screen-admin-billing-report .billing-rest-row {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.25rem;
}

.screen-admin-billing-report .billing-hh-row:hover,
.screen-admin-billing-report .billing-person-row:hover,
.screen-admin-billing-report .billing-day-row:hover,
.screen-admin-billing-report .billing-rest-row:hover {
    background: var(--app-header-hover-bg);
}

.screen-admin-billing-report .billing-chev {
    flex: 0 0 auto;
    width: 0.5rem;
    height: 0.5rem;
    margin-left: 0.25rem;
    border-right: 2px solid var(--text-secondary);
    border-bottom: 2px solid var(--text-secondary);
    transform: rotate(-45deg);
}

.screen-admin-billing-report details[open] > summary > .billing-chev {
    transform: rotate(45deg);
}

/* Households (R10, R11, D-p). */

.screen-admin-billing-report .billing-rows {
    border-top: 1px solid var(--app-border-divider);
}

.screen-admin-billing-report .billing-hh,
.screen-admin-billing-report .billing-rest {
    border-bottom: 1px solid var(--app-border-divider);
}

.screen-admin-billing-report .billing-hh-main,
.screen-admin-billing-report .billing-person-main,
.screen-admin-billing-report .billing-day-main {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.screen-admin-billing-report .household-name {
    font-size: 1.0625rem;
    font-weight: 500;
    color: var(--text-primary);
}

.screen-admin-billing-report .household-stats {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.screen-admin-billing-report .household-total {
    flex: 0 0 auto;
    text-align: right;
    font-size: 1.0625rem;
    font-weight: 500;
    color: var(--text-primary);
}

.screen-admin-billing-report .billing-hh-body,
.screen-admin-billing-report .billing-days {
    padding: 0 0 0.5rem 1.25rem;
}

.screen-admin-billing-report .billing-person-row {
    padding: 0.5rem 0.25rem;
}

.screen-admin-billing-report .billing-person-name {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.screen-admin-billing-report .billing-person-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.screen-admin-billing-report .billing-person-total {
    flex: 0 0 auto;
    text-align: right;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.screen-admin-billing-report .billing-day {
    border-top: 1px solid var(--border-light);
}

.screen-admin-billing-report .billing-day-row {
    padding: 0.4rem 0.25rem;
    line-height: 1.4;
}

.screen-admin-billing-report .billing-day-date {
    flex: 0 0 4.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.screen-admin-billing-report .billing-day-items,
.screen-admin-billing-report .billing-day-sub {
    white-space: nowrap;
    overflow: hidden;
}

.screen-admin-billing-report .billing-day-items {
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.screen-admin-billing-report .billing-day-sub {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.screen-admin-billing-report .billing-day-edited {
    color: var(--status-warning-text);
}

.screen-admin-billing-report .billing-day-total {
    flex: 0 0 auto;
    text-align: right;
    font-size: 0.9375rem;
    font-weight: 400;
    color: var(--text-primary);
}

/* A day's breakdown starts under its items: the chevron (0.25rem + 0.5rem),
   two 0.5rem gaps and the 4.25rem date column, 6rem in all. */
.screen-admin-billing-report .billing-day-detail {
    padding: 0 0.25rem 0.625rem 6rem;
    font-size: 0.875rem;
}

.screen-admin-billing-report .billing-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0 1rem;
    padding: 0.1rem 0;
}

.screen-admin-billing-report .billing-line-name {
    flex: 1 1 8rem;
    min-width: 0;
}

.screen-admin-billing-report .billing-line-calc {
    color: var(--text-secondary);
}

.screen-admin-billing-report .billing-line-total {
    flex: 0 0 4.5rem;
    text-align: right;
}

.screen-admin-billing-report .billing-day-link {
    font-size: 0.8125rem;
}

/* Restaurants (R12, R15, D-s, D-t). */

.screen-admin-billing-report .billing-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.screen-admin-billing-report .billing-tile {
    flex: 1 1 12rem;
    min-width: 0;
    padding: 0.75rem 1rem;
    background: var(--app-surface-muted);
    border-radius: var(--radius-md);
}

.screen-admin-billing-report .billing-tile-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.screen-admin-billing-report .billing-tile-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-word;
}

.screen-admin-billing-report .billing-tile-sub {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.screen-admin-billing-report .billing-panel {
    border-top: 1px solid var(--app-border-divider);
    padding-top: 1rem;
    margin-bottom: 1.5rem;
}

.screen-admin-billing-report .billing-h2 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.75rem;
}

.screen-admin-billing-report .billing-lead,
.screen-admin-billing-report .billing-rank {
    list-style: none;
    padding: 0;
    margin: 0;
}

.screen-admin-billing-report .billing-lead-row {
    padding: 0.625rem 0.25rem;
    border-bottom: 1px solid var(--border-light);
}

.screen-admin-billing-report .billing-row-line {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0 1rem;
}

.screen-admin-billing-report .billing-row-name {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.screen-admin-billing-report .billing-row-amount,
.screen-admin-billing-report .billing-lead-metric {
    text-align: right;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.screen-admin-billing-report .billing-row-sub {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.screen-admin-billing-report .billing-lead-empty {
    font-size: 0.875rem;
    color: var(--status-warning-text);
}

.screen-admin-billing-report .billing-track {
    display: block;
    height: 0.5rem;
    margin: 0.375rem 0;
    background: var(--app-fill-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.screen-admin-billing-report .billing-fill {
    display: block;
    height: 100%;
    background: var(--brand-primary);
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.screen-admin-billing-report .billing-slot-0 {
    background: var(--brand-primary);
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.screen-admin-billing-report .billing-slot-1 {
    background: var(--accent-gold);
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.screen-admin-billing-report .billing-slot-2 {
    background: color-mix(in srgb, var(--brand-primary) 55%, var(--surface-raised));
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.screen-admin-billing-report .billing-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.25rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.screen-admin-billing-report .billing-swatch {
    display: inline-block;
    width: 0.75rem;
    height: 0.75rem;
    margin-right: 0.35rem;
    border-radius: 2px;
    vertical-align: middle;
}

/* The per-day chart (D-s). The plot is 9rem with 1.25rem of headroom: the
   tallest bar fills the rest, and its count, printed above it, rises into
   the headroom. Bars cap at 2.5rem and centre in equal columns; 22 fit the
   912px column at about 34px each. */

.screen-admin-billing-report .billing-chart {
    display: flex;
    gap: 0.375rem;
}

.screen-admin-billing-report .billing-chart-col {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.screen-admin-billing-report .billing-chart-plot {
    height: 9rem;
    padding-top: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    border-bottom: 1px solid var(--border-default);
}

.screen-admin-billing-report .billing-chart-value {
    flex: 0 0 auto;
    padding-bottom: 0.125rem;
    font-size: 0.8125rem;
    line-height: 1.2;
    color: var(--text-primary);
}

.screen-admin-billing-report .billing-chart-bar,
.screen-admin-billing-report .billing-chart-zero {
    flex: 0 0 auto;
    width: 100%;
    max-width: 2.5rem;
}

.screen-admin-billing-report .billing-chart-bar {
    border-radius: 2px 2px 0 0;
}

.screen-admin-billing-report .billing-chart-zero {
    height: 3px;
    background: var(--text-tertiary);
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.screen-admin-billing-report .billing-chart-label {
    font-size: 0.8125rem;
    line-height: 1.2;
    text-align: center;
    color: var(--text-secondary);
    padding-top: 0.25rem;
    word-break: break-word;
}

.screen-admin-billing-report .billing-chart-month {
    display: block;
}

.screen-admin-billing-report .billing-rank-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 0.75rem;
    padding: 0.5rem 0.25rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9375rem;
}

.screen-admin-billing-report .billing-rank-name {
    flex: 1 1 12rem;
    min-width: 0;
    color: var(--text-primary);
}

.screen-admin-billing-report .billing-rank-rest {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.screen-admin-billing-report .billing-rank-track {
    flex: 2 1 8rem;
}

.screen-admin-billing-report .billing-rank-units {
    flex: 0 0 2.5rem;
    text-align: right;
    font-weight: 500;
}

.screen-admin-billing-report .billing-rest-row .billing-row-name {
    flex: 1 1 0;
    min-width: 0;
}

.screen-admin-billing-report .billing-rest-body {
    padding: 0 0.25rem 0.75rem 1.25rem;
}

.screen-admin-billing-report .billing-item-list {
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.screen-admin-billing-report .billing-item-line {
    display: flex;
    gap: 1rem;
    padding: 0.125rem 0;
}

.screen-admin-billing-report .billing-item-head {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.screen-admin-billing-report .billing-item-name {
    flex: 1 1 auto;
    min-width: 0;
}

.screen-admin-billing-report .billing-item-units {
    flex: 0 0 3rem;
    text-align: right;
    color: var(--text-secondary);
}

.screen-admin-billing-report .billing-item-dollars {
    flex: 0 0 4.5rem;
    text-align: right;
}

.screen-admin-billing-report .billing-howto {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 1.25rem;
}

.screen-admin-billing-report .billing-howto > summary {
    cursor: pointer;
}

.screen-admin-billing-report .billing-howto p {
    margin: 0.4rem 0 0 1rem;
}
