/**
 * PPF Pro Blueprint LMS: button component layer (v0.3.17, T2 slice 1).
 *
 * Single authority for every button-rendering surface in the student
 * backend: dashboard, lesson pages, locked lessons, quiz submit adjacency.
 * v0.3.63: the capstone submit and certificate/verify surfaces are removed
 * with the grading extraction. Quiz-submit authority stays
 * plugin-scoped in ppfb-lesson.css (#ppfb-quiz .ff-btn-submit, T1 rule,
 * untouched here); the token foundation it references now resolves
 * (assets/css/ppfb-tokens.css, byte-identical to the T0 tree).
 *
 * ZERO-CHANGE RULE: every moved rule keeps its current computed values.
 * Values are re-expressed as var(--ppfb-10k-*, <current literal>) ONLY where
 * the T0 token value is byte-identical to the current rendering; anywhere
 * the T0 value retargets, the current literal stays and the target token is
 * named in a T2 comment. The var() fallbacks keep buttons correct on any
 * surface outside the token scope, where the tokens are not declared.
 * (v0.3.63: the former .ppfb-capstone and .ppfb-verify surfaces no longer
 * exist; they are named here only as the historical reason for the
 * fallbacks.)
 *
 * Locked rules enforced in this slice (build spec 2026-09-13):
 *   - §1.8/32-34 color usage: light surfaces use ink or gold-deep text;
 *     charcoal surfaces use ivory or gold, never green/red; #c9a227 is
 *     dark-surface-only for text.
 *   - §1.6/16 gold tie-break: claim actions ("Mark complete",
 *     "Submit for grading") take solid charcoal-ink on light surfaces,
 *     gold-fill only on the dark receipt. One gold per screen state.
 *   - §1.4/15 finish rule: named material set only; ties resolve as
 *     decoration and are removed. Adjudication log ships with the slice.
 *   - 44px minimum targets; 16px minimum on inputs that pair with buttons.
 *
 * No em dashes or en dashes in this file. No prohibited gamification terms.
 * overflow-x: no declaration in this layer (the .ppfb-scope guard in
 * ppfb-lesson.css uses `clip`, never `hidden`, per spec §1/47).
 */

/* ============ 0. Display type foundation (Source Serif 4 fallback) ============
 * The Google Fonts stylesheet (variable roman, opsz 8-60 + wght 200-900,
 * latin subset, font-display: swap, preconnected + preloaded) is enqueued by
 * ppfb_lesson_stylesheet() / ppfb_button_layer_stylesheet(). This @font-face
 * is the swap fallback: local Georgia, then Times New Roman, with a measured
 * size-adjust so the fallback does not reflow numerals when the webfont is
 * late or blocked.
 *
 * Measurement (2026-09-13, fontTools on the served latin woff2):
 *   Source Serif 4: sCapHeight 670 / UPM 1000 = 0.670
 *   Georgia: cap-height ratio 0.692871 (measured, rhythm-sass)
 *   size-adjust = 0.670 / 0.692871 = 96.7%
 * Cap-height matching is chosen because the display role is numerals and
 * ceremony (lining figures align to cap height). The x-height-matched
 * alternative (101.3%) is recorded for the independent verifier; Georgia on
 * a Mac is the reference for re-measurement. Times New Roman rides the same
 * 96.7% as fallback-of-fallback. Served latin woff2 measured 122168 bytes.
 * Inert in slice 1: no shipped rule references --ppfb-10k-font-display yet;
 * later slices wire it per the numeral-role rule (spec §1.7/28). */
@font-face {
    font-family: "Source Serif 4 Fallback";
    src: local("Georgia"), local("Times New Roman");
    size-adjust: 96.7%;
}

/* ============ 1. Primary button (moved from ppfb-lesson.css, v0.3.17) ============
 * v0.3.56 (seat I): Princess Blue leads on primary buttons (owner scope
 * ruling 2026-09-19: all buttons site-wide). White text on Princess Blue
 * is 7.73:1 (contract-measured). The T0
 * --ppfb-10k-btn-* component-starter names (ppfb-tokens.css) alias the same
 * contract values, so both paths compute identically. */
.ppfb-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: var(--ppfb-10k-text-ui, 1rem);
    font-weight: 700;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    background: var(--course-button-bg);
    color: var(--course-button-text);
    min-height: 44px;
    line-height: 1.4;
    text-align: center;
}
.ppfb-btn:hover {
    background: var(--course-button-bg-hover);
    color: var(--course-button-text-hover);
}
.ppfb-btn:focus-visible {
    outline: 3px solid var(--course-focus-ring);
    outline-offset: var(--ppfb-10k-outline-offset, 2px);
}

/* ============ 2. Quiet button (moved from ppfb-lesson.css, v0.3.17) ============
 * v0.3.56 (seat I): Kiln Ink text, Kiln Ink hover (was #17191c / #000000). */
.ppfb-btn-quiet {
    display: inline-block;
    padding: 0.75rem 1.25rem;
    font-size: var(--ppfb-10k-text-ui, 1rem);
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: var(--ppfb-10k-underline-offset, 2px);
    background: transparent;
    color: var(--course-text-primary);
    border: 1px solid transparent;
    min-height: 44px;
    line-height: 1.4;
}
.ppfb-btn-quiet:hover {
    color: var(--course-link-hover);
}
.ppfb-btn-quiet:focus-visible {
    outline: 3px solid var(--course-focus-ring);
    outline-offset: var(--ppfb-10k-outline-offset, 2px);
}

/* ============ 3. Quiz-gated aria-disabled control (moved, v0.3.17) ============
 * Token re-expression, zero computed change:
 *   gold #c9a227 = --ppfb-10k-gold-500 (canonical gold: fills, text on
 *   charcoal; 7.82:1 on #0e1116)
 * Kept: transparent fill, 1px gold border, full-opacity gold label on
 * charcoal. The flat 40%-opacity treatment stays prohibited. This is the
 * PRE-claim state (quiz not yet passed); its redesign belongs to the
 * completion-gate slice, not the button slice. */
.ppfb-btn-gated {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: var(--ppfb-10k-text-ui, 1rem);
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    background: transparent;
    border: 1px solid var(--ppfb-10k-gold-500, #c9a227);
    color: var(--ppfb-10k-gold-500, #c9a227);
    min-height: 44px;
    line-height: 1.4;
    text-decoration: none;
    opacity: 1;
}
.ppfb-btn-gated:focus-visible {
    outline: 3px solid var(--ppfb-10k-focus-charcoal, #c9a227);
    outline-offset: var(--ppfb-10k-outline-offset, 2px);
}

/* ============ 4. Contextual quiet-button placements (moved, v0.3.17) ============
 * v0.3.56 (seat I): on deep surfaces, Egret text only (contract rule 1). */
.ppfb-upnext .ppfb-btn-quiet {
    padding-left: 0;
}
.ppfb-endcard .ppfb-btn-quiet {
    color: var(--course-text-on-deep);
}
.ppfb-endcard .ppfb-btn-quiet:hover {
    color: var(--course-text-on-deep);
}
.ppfb-endcard .ppfb-btn-quiet:focus-visible {
    outline: 3px solid var(--course-focus-ring-on-deep);
    outline-offset: var(--ppfb-10k-outline-offset, 2px);
}

/* ============ 5. Claim action (v0.3.56, seat I) ==============================
 * "Mark complete" / "Submit for grading" are primary buttons: Princess Blue
 * (owner scope ruling 2026-09-19: all buttons site-wide). This supersedes the v0.3.17 charcoal-ink treatment,
 * whose rationale (keep one gold per screen) is moot now that primary
 * buttons are no longer gold. Applied in markup as
 * class="ppfb-btn ppfb-btn-claim" (.ppfb-btn.ppfb-btn-claim at 0,2,0
 * outranks the .ppfb-btn rest rule at 0,1,0 regardless of order; on hover
 * the 0,3,0 :hover rule wins outright). 44px target. */
.ppfb-btn.ppfb-btn-claim {
    background: var(--course-button-bg);
    border-color: var(--course-button-bg);
    color: var(--course-button-text);
}
.ppfb-btn.ppfb-btn-claim:hover {
    background: var(--course-button-bg-hover);
    border-color: var(--course-button-bg-hover);
    color: var(--course-button-text-hover);
}
.ppfb-btn.ppfb-btn-claim:focus-visible {
    outline: 3px solid var(--course-focus-ring);
    outline-offset: var(--ppfb-10k-outline-offset, 2px);
}

/* ============ 8. 16px input floor where inputs pair with buttons ============
 * Spec §1.6/24: 16px minimum on ALL form inputs (iOS Safari zoom-on-focus on
 * a $10,000 form reads as broken). Scoped to the quiz instrument, the only
 * button-paired input surface left in this slice. (v0.3.63: the capstone
 * evidence form and the verify code field are gone with the grading
 * extraction.) The token --ppfb-10k-input-font-size (16px,
 * "NEVER lower") carries the floor. Where Fluent Forms already computes
 * 16px this rule is a no-op guard; where a value was smaller, the locked
 * rule mandates the change. */
#ppfb-quiz .fluentform .ff-el-form-control {
    font-size: var(--ppfb-10k-input-font-size, 16px);
}
