/* drill.css — page-specific styles for index.php (Conjugaison drill page) */
* {
    font-family: "DM Sans", sans-serif;
}
.font-display,
h1,
h2 {
    font-family: var(--font-display);
}
.tab-on {
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
    border-radius: 0.75rem 0.75rem 0 0;
}
.tab-off {
    color: rgba(255, 255, 255, 0.6);
    border-radius: 0.75rem 0.75rem 0 0;
}
.tab-off:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}
.card {
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(10, 22, 40, 0.11);
}
.underinput {
    border: none;
    border-bottom: 2px solid var(--border);
    background: transparent;
    outline: none;
    transition: border-color 0.2s;
    color: var(--text);
}
/* Shown while loadDataBundle() (js/drill/methods.js) fetches a tab's lazy-loaded data — see M29 */
.drill-tab-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 5rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.drill-tab-spinner .spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: drill-spin 0.7s linear infinite;
}
@keyframes drill-spin {
    to {
        transform: rotate(360deg);
    }
}
.underinput:focus {
    border-bottom-color: var(--accent);
}
.underinput.ok {
    border-bottom-color: var(--green);
    background: var(--green-soft);
    color: var(--green);
}
.underinput.no {
    border-bottom-color: var(--red);
    background: var(--red-soft);
    color: var(--red);
}
select {
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath fill='%236b7280' d='M5 7L0 0h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    padding-right: 1.75rem;
}
@keyframes pop {
    0% {
        transform: scale(0.85);
        opacity: 0;
    }
    60% {
        transform: scale(1.08);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}
.pop {
    animation: pop 0.25s ease forwards;
}
@keyframes slidein {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}
.slide {
    animation: slidein 0.3s ease forwards;
}
.progress-bar {
    transition: width 0.6s ease;
}
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.stripe-even:nth-child(even) {
    background: #fafafa;
}

/* Scratch card styles */
.scratch-mask {
    position: relative;
    display: inline-block;
    cursor: pointer;
    user-select: none;
    background: linear-gradient(135deg, #1a3063 0%, #0a1628 100%);
    border-radius: 0.5rem;
    padding: 0.25rem 0.75rem;
    min-width: 100px;
    text-align: center;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}
.scratch-mask::before {
    content: "✦ scratch ✦";
    color: rgba(255, 255, 255, 0.72);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 600;
}
.scratch-mask:hover {
    box-shadow: 0 0 18px rgba(26, 48, 99, 0.3);
    transform: scale(1.02);
}
.scratch-mask.revealed {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    border-radius: 0.5rem;
    padding: 0.25rem 0.75rem;
}
.scratch-mask.revealed::before {
    content: none;
}

.scratch-self-check {
    opacity: 0;
    pointer-events: none;
    max-height: 0;
    transition: all 0.3s ease;
}
.scratch-self-check.show {
    opacity: 1;
    pointer-events: auto;
    max-height: 60px;
    margin-top: 0.5rem;
}

/* Scratch blocks — drag & drop */
.scratch-block {
    position: relative;
    display: inline-block;
    padding: 0.5rem 1.25rem;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 0.5rem;
    user-select: none;
    box-shadow:
        0 3px 0 rgba(0, 0, 0, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.1);
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        opacity 0.15s ease;
    -webkit-user-select: none;
    touch-action: none;
}
.scratch-block::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 14px;
    width: 16px;
    height: 6px;
    border-radius: 4px 4px 0 0;
    background: inherit;
    filter: brightness(1.1);
}
.scratch-block::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 30px;
    width: 16px;
    height: 6px;
    border-radius: 0 0 4px 4px;
    background: inherit;
    filter: brightness(0.9);
}
.piece-block {
    cursor: grab;
    margin-top: 8px;
}
.piece-block:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow:
        0 6px 0 rgba(0, 0, 0, 0.15),
        0 6px 20px rgba(0, 0, 0, 0.15);
}
.piece-block:active {
    cursor: grabbing;
    transform: scale(0.97);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}
.placed-block {
    cursor: default;
}
.placed-block::before,
.placed-block::after {
    display: none;
}

.scratch-drop-zone {
    min-width: 160px;
    min-height: 46px;
    border: 2.5px dashed var(--border);
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.5rem;
    margin: 0 0.25rem;
    transition: all 0.2s ease;
    background: var(--surface);
}
.drop-zone-active {
    border-color: var(--accent);
    background: var(--accent-soft);
    transform: scale(1.04);
}
.drop-zone-filled {
    border-color: var(--green);
    background: var(--green-soft);
    border-style: solid;
}
.drop-zone-wrong {
    border-color: var(--red);
    background: var(--red-soft);
    animation: wrongShake 0.4s ease;
}

@keyframes wrongShake {
    0%,
    100% {
        transform: translateX(0);
    }
    20% {
        transform: translateX(-6px);
    }
    40% {
        transform: translateX(6px);
    }
    60% {
        transform: translateX(-4px);
    }
    80% {
        transform: translateX(4px);
    }
}
.piece-wrong-shake {
    animation: wrongShake 0.4s ease;
    opacity: 0.7;
}

.scratch-drag-ghost {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.85;
    transform: scale(1.1) rotate(-2deg);
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.25));
}

/* Toast notification */
.toast-wrap {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.toast-wrap.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
}
.toast-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    border-radius: 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
}
.toast-correct {
    background: rgba(21, 128, 61, 0.97); /* M621: green-700, AA for white text */
    color: #fff;
}
.toast-wrong {
    background: rgba(220, 38, 38, 0.92);
    color: #fff;
}
.toast-icon {
    font-size: 1.3rem;
}

/* Select option buttons */
.opt-btn {
    transition: all 0.15s ease;
}
.opt-btn:hover:not(:disabled) {
    transform: scale(1.02);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}
.opt-btn.correct {
    background: var(--green-soft) !important;
    border-color: var(--green) !important;
    color: var(--green) !important;
}
.opt-btn.wrong {
    background: var(--red-soft) !important;
    border-color: var(--red) !important;
    color: var(--red) !important;
}
.opt-btn.dimmed {
    opacity: 0.5;
}

/* TTS speaker button */
.tts-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--text-muted);
    flex-shrink: 0;
    position: relative;
}
.tts-btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    transform: scale(1.1);
}
.tts-btn:active {
    transform: scale(0.9);
}
.tts-btn.speaking {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    animation: pulse-tts 1s ease infinite;
}
.tts-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}
@keyframes pulse-tts {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Accent bar */
.accent-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 4px 6px;
    border-radius: 0.5rem 0.5rem 0 0;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-bottom: none;
}
.accent-bar button {
    padding: 2px 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    line-height: 1.3;
    transition: all 0.12s ease;
}
.accent-bar button:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.accent-bar button:active {
    transform: scale(0.92);
}

/* Quiz timer */
.timer-bar {
    transition: width 1s linear;
}

/* User toggle */
.user-toggle {
    position: relative;
    width: 36px;
    height: 20px;
    border-radius: 10px;
    background: #475569;
    cursor: pointer;
    transition: background 0.2s;
}
.user-toggle.on {
    background: #16a34a;
}
.user-toggle::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s;
}
.user-toggle.on::after {
    transform: translateX(16px);
}

/* ── Mode Picker ── */
.mode-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(10, 22, 40, 0.88);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: fadeIn 0.18s ease;
}
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
/* M220 (drills theme-token rewrite): .mode-panel/.mode-card are hand-written
   page-specific CSS, not part of the Tailwind-replacement block above, but
   the same "generic UI structure → token, brand accent → literal" split
   applies. active-mode's rouge border stays literal (deliberate brand
   selection indicator); everything else here is generic card chrome. */
.mode-panel {
    background: var(--surface);
    border-radius: 1.5rem;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem 1.75rem;
}
.mode-panel h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 0.25rem;
}
.mode-panel p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}
.mode-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.9rem;
}
.mode-card {
    border: 2px solid var(--border);
    border-radius: 1.1rem;
    padding: 1.25rem 0.9rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.18s ease;
    background: var(--surface);
    box-shadow: none;
    font: inherit;
    color: inherit;
}
.mode-card > *,
.mode-card:hover > * {
    background: transparent;
    box-shadow: none;
    text-shadow: none;
}
.mode-panel > .s-btn {
    display: inline-block;
    margin-bottom: 1.1rem;
}
.mode-dash-note {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.72rem;
    color: var(--text-muted);
}
.mode-card:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
    transform: translateY(-3px);
}
.mode-card.active-mode {
    border-color: #c1121f;
    background: var(--red-soft);
}
.mode-card-icon {
    font-size: 2.2rem;
    margin-bottom: 0.45rem;
}
.mode-card-label {
    font-weight: 700;
    color: var(--text);
    font-size: 0.92rem;
}
.mode-card-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
    line-height: 1.4;
}
.mode-card-badge { margin-top:0.4rem; }
.mode-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0 0.8rem;
}
.mode-current {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: rgba(255, 255, 255, 0.9);
}
.mode-current-icon {
    font-size: 1.2rem;
}
.mode-current-label {
    font-weight: 700;
    font-size: 0.95rem;
}
.mode-change-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    border-radius: 0.75rem;
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}
.mode-change-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}
@media (max-width: 640px) {
    .mode-overlay {
        align-items: flex-end;
        padding: 0;
    }
    .mode-panel {
        border-radius: 1.5rem 1.5rem 0 0;
        max-height: 85vh;
        padding: 1.25rem 1rem 2rem;
    }
    .mode-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* M104 (Track A design-system consolidation, part 3): drills.html's
 * Tailwind build retired. Every rule below is a mechanical, value-for-
 * value transcription of the 485 real Tailwind utility classes used
 * across drills.html and its 10 views/drill/*.php partials — generated
 * by tools/gen-tailwind-replacement-css.js (fed this page's own custom
 * navy/cream/rouge/gold palette from tools/tailwind/drills.config.js,
 * which intentionally differs from dashboard/path's palette under the
 * same token names), then verified class-by-class against the actual
 * markup (see tmp_verify_drills_css.js's logic, run once and discarded).
 * Colors were not remapped to shared.css tokens in this pass — same
 * reasoning as css/path.css's and css/dashboard.css's own headers (no
 * working browser in this environment to visually verify a remap).
 *
 * Three classes found in the markup were deliberately left undefined
 * here because they are already no-ops in the live production build:
 * border-navy-200/text-navy-400/text-navy-600 (drills' Tailwind config
 * never defines a navy 200/400/600 shade, so Tailwind's JIT generates no
 * rule for them today either) and bare btn/btn-secondary on the mode
 * picker's "Back to Home" link (not a real Tailwind utility and not
 * defined in shared.css or drill.css — already unstyled today). Adding
 * real styling for any of these now would be a visual change made
 * without the ability to verify it, so all three are left exactly as-is.
 */
.-right-24 { right: -6rem; }
.-top-24 { top: -6rem; }
.absolute { position: absolute; }
.align-middle { vertical-align: middle; }
.animate-pulse { animation: tw-pulse 2s cubic-bezier(0.4,0,0.6,1) infinite; }
.animate-spin { animation: tw-spin 1s linear infinite; }
.backdrop-blur-sm { backdrop-filter: blur(4px); }
/* M220 (drills theme-token rewrite, phase 2/backgrounds): converted every
   class below whose role is generic UI structure (page/card background,
   neutral surface) or status feedback (correct/incorrect/warning/info) to
   the matching shared.css token — same token used by every other themed
   page, so switching themes now actually changes this page too. Classes
   tied to this page's own deliberate navy/cream/rouge/gold brand identity
   (the header background, the French-tricolore flag stripe, the rouge/
   gold accents — see M219's docs/STATUS.md entry for why those stay fixed)
   and pure-opacity variants of an already-converted base color (color-mix()
   isn't used here for browser-support reasons, so a /NN opacity suffix on
   a token-derived value isn't expressible the same simple way) are left as
   literal values, unconverted, on purpose — not missed. */
.bg-amber-100 { background-color: var(--warning-soft); }
.bg-amber-400 { background-color: var(--warning); }
.bg-amber-50 { background-color: var(--warning-soft); }
.bg-amber-50\/40 { background-color: rgba(255, 251, 235, 0.4); }
.bg-amber-50\/50 { background-color: rgba(255, 251, 235, 0.5); }
.bg-amber-500 { background-color: var(--warning); }
.bg-black\/40 { background-color: rgba(0, 0, 0, 0.4); }
.bg-blue-100 { background-color: var(--teal-soft); }
.bg-blue-50 { background-color: var(--teal-soft); }
.bg-blue-50\/60 { background-color: rgba(239, 246, 255, 0.6); }
.bg-blue-700 { background-color: #1d4ed8; }
.bg-cream { background-color: var(--bg); }
.bg-cream-100 { background-color: var(--surface); }
.bg-cyan-50 { background-color: var(--teal-soft); }
.bg-emerald-100 { background-color: var(--green-soft); }
.bg-emerald-400 { background-color: var(--green); }
.bg-emerald-50 { background-color: var(--green-soft); }
.bg-emerald-50\/40 { background-color: rgba(236, 253, 245, 0.4); }
.bg-emerald-50\/60 { background-color: rgba(236, 253, 245, 0.6); }
.bg-gold { background-color: #D4A853; }
.bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-gradient-from), var(--tw-gradient-to)); }
.bg-gray-100 { background-color: var(--surface-2); }
.bg-gray-200 { background-color: var(--surface-2); }
.bg-gray-400 { background-color: var(--surface-2); }
.bg-gray-50 { background-color: var(--surface); }
.bg-indigo-50 { background-color: var(--purple-soft); }
.bg-navy-50 { background-color: #f0f4ff; }
.bg-navy-700 { background-color: #1a3063; }
.bg-navy-900 { background-color: #0A1628; }
/* The drills header stays navy in every theme, so its toggle can't inherit the theme text. */
.bg-navy-900 .hdr-collapse-toggle { color: #e6edf3; }
.bg-navy-900\/5 { background-color: rgba(10, 22, 40, 0.05); }
.bg-orange-50 { background-color: var(--warning-soft); }
.bg-pink-400 { background-color: #f472b6; }
.bg-purple-400 { background-color: var(--purple); }
.bg-purple-50 { background-color: var(--purple-soft); }
.bg-red-100 { background-color: var(--red-soft); }
.bg-red-50 { background-color: var(--red-soft); }
.bg-red-50\/60 { background-color: rgba(254, 242, 242, 0.6); }
.bg-red-500 { background-color: var(--red); }
.bg-rouge { background-color: #C1121F; }
.bg-sky-400 { background-color: #38bdf8; }
.bg-teal-400 { background-color: var(--teal); }
.bg-teal-50 { background-color: var(--teal-soft); }
.bg-transparent { background-color: transparent; }
.bg-violet-100 { background-color: var(--purple-soft); }
.bg-violet-50 { background-color: var(--purple-soft); }
.bg-violet-50\/30 { background-color: rgba(245, 243, 255, 0.3); }
.bg-violet-50\/50 { background-color: rgba(245, 243, 255, 0.5); }
.bg-violet-50\/60 { background-color: rgba(245, 243, 255, 0.6); }
.bg-white { background-color: var(--surface); }
.bg-white\/10 { background-color: rgba(255, 255, 255, 0.1); }
.bg-white\/70 { background-color: rgba(255, 255, 255, 0.7); }
.bg-white\/90 { background-color: rgba(255, 255, 255, 0.9); }
.bg-white\/\[\.06\] { background-color: rgba(255, 255, 255, 0.06); }
.blur-3xl { filter: blur(64px); }
.border { border-width: 1px; border-style: solid; }
.border-2 { border-width: 2px; border-style: solid; }
.border-4 { border-width: 4px; border-style: solid; }
.border-amber-100 { border-color: var(--warning-soft); }
.border-amber-200 { border-color: var(--warning-soft); }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.border-blue-100 { border-color: var(--teal-soft); }
.border-emerald-100 { border-color: var(--green-soft); }
.border-emerald-200 { border-color: var(--green-soft); }
.border-emerald-400 { border-color: var(--green); }
.border-emerald-500 { border-color: var(--green); }
.border-gray-100 { border-color: var(--border); }
.border-gray-200 { border-color: var(--border); }
.border-gray-300 { border-color: var(--border); }
.border-gray-50 { border-color: var(--border); }
.border-red-200 { border-color: var(--red-soft); }
.border-red-400 { border-color: var(--red); }
.border-t { border-top-width: 1px; border-top-style: solid; }
.border-t-navy-700 { border-top-color: #1a3063; }
.border-violet-100 { border-color: var(--purple-soft); }
.border-white\/10 { border-color: rgba(255, 255, 255, 0.1); }
.bottom-2 { bottom: .5rem; }
.cursor-not-allowed { cursor: not-allowed; }
.cursor-pointer { cursor: pointer; }
.duration-200 { transition-duration: 200ms; }
.duration-300 { transition-duration: 300ms; }
.duration-500 { transition-duration: 500ms; }
.fill-current { fill: currentColor; }
.fixed { position: fixed; }
.flex { display: flex; }
.flex-1 { flex: 1 1 0%; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.focus\:border-navy-700:focus { border-color: #1a3063; }
.focus\:border-white\/30:focus { border-color: rgba(255, 255, 255, 0.3); }
.focus\:ring-navy-700:focus { box-shadow: 0 0 0 3px #1a3063; }
.font-body { font-family: "DM Sans", sans-serif; }
.font-bold { font-weight: 700; }
.font-display { font-family: var(--font-display); }
.font-medium { font-weight: 500; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.font-semibold { font-weight: 600; }
.from-navy-50 { --tw-gradient-from: #f0f4ff; }
.gap-0 { gap: 0px; }
.gap-0\.5 { gap: .125rem; }
.gap-1 { gap: .25rem; }
.gap-1\.5 { gap: .375rem; }
.gap-2 { gap: .5rem; }
.gap-2\.5 { gap: .625rem; }
.gap-3 { gap: .75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-x-3 { column-gap: .75rem; }
.gap-y-0\.5 { row-gap: .125rem; }
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-rows-3 { grid-template-rows: repeat(3, minmax(0, 1fr)); }
.h-1 { height: .25rem; }
.h-10 { height: 2.5rem; }
.h-2 { height: .5rem; }
.h-2\.5 { height: .625rem; }
.h-4 { height: 1rem; }
.h-64 { height: 16rem; }
.h-7 { height: 1.75rem; }
.h-8 { height: 2rem; }
.h-96 { height: 24rem; }
.h-full { height: 100%; }
.hidden { display: none; }
.hover\:bg-emerald-100:hover { background-color: var(--green-soft); }
.hover\:bg-gray-200:hover { background-color: var(--surface-2); }
.hover\:bg-gray-50:hover { background-color: var(--surface); }
.hover\:bg-gray-50\/50:hover { background-color: rgba(249, 250, 251, 0.5); }
.hover\:bg-navy-50:hover { background-color: #f0f4ff; }
.hover\:bg-navy-800:hover { background-color: #12224a; }
.hover\:bg-red-100:hover { background-color: var(--red-soft); }
.hover\:bg-rouge-light:hover { background-color: #e02020; }
.hover\:bg-white\/20:hover { background-color: rgba(255, 255, 255, 0.2); }
.hover\:scale-\[1\.02\]:hover { transform: scale(1.02); }
.hover\:shadow-xl:hover { box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); }
.hover\:text-gray-600:hover { color: var(--text-muted); }
.hover\:text-navy-900:hover { color: var(--text); }
.hover\:text-rouge:hover { color: #C1121F; }
.hover\:text-rouge-dark:hover { color: #8B0D14; }
.hover\:text-white:hover { color: #fff; }
.inline-block { display: inline-block; }
.inline-flex { display: inline-flex; }
.inset-0 { inset: 0; }
.italic { font-style: italic; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.leading-none { line-height: 1; }
.leading-relaxed { line-height: 1.625; }
.leading-tight { line-height: 1.25; }
.left-0 { left: 0; }
.left-3 { left: .75rem; }
@media (min-width: 1024px) {
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.max-h-\[80vh\] { max-height: 80vh; }
.max-w-5xl { max-width: 64rem; }
.max-w-md { max-width: 28rem; }
.mb-0 { margin-bottom: 0px; }
.mb-0\.5 { margin-bottom: .125rem; }
.mb-1 { margin-bottom: .25rem; }
.mb-1\.5 { margin-bottom: .375rem; }
.mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: .75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-7 { margin-bottom: 1.75rem; }
.mb-8 { margin-bottom: 2rem; }
@media (min-width: 768px) {
    .md\:block { display: block; }
}
@media (min-width: 768px) {
    .md\:border-r { border-right-width: 1px; border-right-style: solid; }
}
@media (min-width: 768px) {
    .md\:flex-row { flex-direction: row; }
}
@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
    .md\:h-80 { height: 20rem; }
}
@media (min-width: 768px) {
    .md\:items-center { align-items: center; }
}
@media (min-width: 768px) {
    .md\:max-w-xs { max-width: 20rem; }
}
@media (min-width: 768px) {
    .md\:mx-0 { margin-left: 0px; margin-right: 0px; }
}
@media (min-width: 768px) {
    .md\:p-4 { padding: 1rem; }
}
@media (min-width: 768px) {
    .md\:p-8 { padding: 2rem; }
}
@media (min-width: 768px) {
    .md\:py-8 { padding-top: 2rem; padding-bottom: 2rem; }
}
@media (min-width: 768px) {
    .md\:self-center { align-self: center; }
}
@media (min-width: 768px) {
    .md\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
}
@media (min-width: 768px) {
    .md\:text-5xl { font-size: 3rem; line-height: 1; }
}
@media (min-width: 768px) {
    .md\:w-52 { width: 13rem; }
}
.min-h-\[28px\] { min-height: 28px; }
.min-h-\[52px\] { min-height: 52px; }
.min-h-screen { min-height: 100vh; }
.min-w-0 { min-width: 0px; }
.ml-1 { margin-left: .25rem; }
.ml-2 { margin-left: .5rem; }
.ml-auto { margin-left: auto; }
.mr-2 { margin-right: .5rem; }
.mt-0\.5 { margin-top: .125rem; }
.mt-1 { margin-top: .25rem; }
.mt-1\.5 { margin-top: .375rem; }
.mt-2 { margin-top: .5rem; }
.mt-2\.5 { margin-top: .625rem; }
.mt-3 { margin-top: .75rem; }
.mt-4 { margin-top: 1rem; }
.mx-2 { margin-left: .5rem; margin-right: .5rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.no-underline { text-decoration: none; }
.object-cover { object-fit: cover; }
.opacity-\[\.06\] { opacity: .06; }
.outline-none { outline: none; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }
.p-10 { padding: 2.5rem; }
.p-2 { padding: .5rem; }
.p-3 { padding: .75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.pb-0 { padding-bottom: 0px; }
.placeholder-gray-300::placeholder { color: #d1d5db; }
.placeholder-white\/30::placeholder { color: rgba(255, 255, 255, 0.3); }
.pointer-events-none { pointer-events: none; }
.pr-2 { padding-right: .5rem; }
.pt-1 { padding-top: .25rem; }
.pt-3 { padding-top: .75rem; }
.pt-8 { padding-top: 2rem; }
.px-1 { padding-left: .25rem; padding-right: .25rem; }
.px-1\.5 { padding-left: .375rem; padding-right: .375rem; }
.px-10 { padding-left: 2.5rem; padding-right: 2.5rem; }
.px-2 { padding-left: .5rem; padding-right: .5rem; }
.px-2\.5 { padding-left: .625rem; padding-right: .625rem; }
.px-3 { padding-left: .75rem; padding-right: .75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-0\.5 { padding-top: .125rem; padding-bottom: .125rem; }
.py-1 { padding-top: .25rem; padding-bottom: .25rem; }
.py-1\.5 { padding-top: .375rem; padding-bottom: .375rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-2 { padding-top: .5rem; padding-bottom: .5rem; }
.py-2\.5 { padding-top: .625rem; padding-bottom: .625rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.py-3 { padding-top: .75rem; padding-bottom: .75rem; }
.py-3\.5 { padding-top: .875rem; padding-bottom: .875rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.relative { position: relative; }
.right-2 { right: .5rem; }
.right-3 { right: .75rem; }
.right-4 { right: 1rem; }
.rotate-180 { transform: rotate(180deg); }
.rounded { border-radius: .25rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }
.rounded-full { border-radius: 9999px; }
.rounded-lg { border-radius: .5rem; }
.rounded-sm { border-radius: .125rem; }
.rounded-xl { border-radius: .75rem; }
.select-none { user-select: none; }
.self-start { align-self: flex-start; }
.shadow-emerald-50 { box-shadow: 0 10px 15px -3px rgba(236, 253, 245, 0.4); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }
.shadow-md { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); }
.shadow-sm { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); }
.shrink-0 { flex-shrink: 0; }
.space-y-0\.5 > * + * { margin-top: .125rem; }
.space-y-1 > * + * { margin-top: .25rem; }
.space-y-1\.5 > * + * { margin-top: .375rem; }
.space-y-2 > * + * { margin-top: .5rem; }
.space-y-3 > * + * { margin-top: .75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.tabular-nums { font-variant-numeric: tabular-nums; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }
.text-6xl { font-size: 3.75rem; line-height: 1; }
.text-7xl { font-size: 4.5rem; line-height: 1; }
.text-8xl { font-size: 6rem; line-height: 1; }
.text-\[10px\] { font-size: 10px; }
.text-\[9px\] { font-size: 9px; }
.text-amber-500 { color: var(--warning); }
.text-amber-600 { color: var(--warning); }
.text-amber-700 { color: var(--warning); }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-blue-400 { color: var(--teal-text); }
.text-blue-500 { color: var(--teal-text); }
.text-blue-600 { color: var(--teal-text); }
.text-blue-700 { color: #1d4ed8; }
.text-center { text-align: center; }
.text-cyan-600 { color: var(--teal-text); }
.text-emerald-600 { color: var(--green); }
.text-emerald-700 { color: var(--green); }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: var(--text-dim); }
.text-gray-500 { color: var(--text-muted); }
.text-gray-600 { color: var(--text-muted); }
.text-indigo-600 { color: var(--purple); }
.text-left { text-align: left; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-navy-700 { color: var(--text); }
.text-navy-800 { color: var(--text); }
.text-navy-900 { color: var(--text); }
.text-orange-500 { color: var(--warning); }
.text-purple-600 { color: var(--purple); }
.text-red-400 { color: var(--red); }
.text-red-500 { color: var(--red); }
.text-red-600 { color: var(--red); }
.text-right { text-align: right; }
.text-rouge { color: #C1121F; }
.text-sm { font-size: .875rem; line-height: 1.25rem; }
.text-teal-600 { color: var(--teal-text); }
.text-violet-500 { color: var(--purple); }
.text-violet-600 { color: var(--purple); }
.text-violet-700 { color: var(--purple); }
.text-white { color: #fff; }
.text-white\/20 { color: rgba(255, 255, 255, 0.55); }
.text-white\/30 { color: rgba(255, 255, 255, 0.58); }
.text-white\/40 { color: rgba(255, 255, 255, 0.62); }
.text-white\/50 { color: rgba(255, 255, 255, 0.66); }
.text-white\/60 { color: rgba(255, 255, 255, 0.6); }
.text-white\/70 { color: rgba(255, 255, 255, 0.7); }
.text-white\/80 { color: rgba(255, 255, 255, 0.8); }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-xs { font-size: .75rem; line-height: 1rem; }
.to-cream { --tw-gradient-to: #FAF8F3; }
.top-0 { top: 0; }
.top-3 { top: .75rem; }
.top-4 { top: 1rem; }
.tracking-\[\.15em\] { letter-spacing: .15em; }
.tracking-\[\.18em\] { letter-spacing: .18em; }
.tracking-\[\.2em\] { letter-spacing: .2em; }
.tracking-wide { letter-spacing: .025em; }
.tracking-wider { letter-spacing: .05em; }
.tracking-widest { letter-spacing: .1em; }
.transform { transform: var(--tw-transform, none); }
.transition { transition-property: color, background-color, border-color, opacity, box-shadow, transform; transition-duration: .15s; }
.transition-all { transition-property: all; transition-duration: .15s; }
.transition-colors { transition-property: color, background-color, border-color; transition-duration: .15s; }
.transition-transform { transition-property: transform; transition-duration: .15s; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.underline { text-decoration: underline; }
.uppercase { text-transform: uppercase; }
.w-10 { width: 2.5rem; }
.w-12 { width: 3rem; }
.w-14 { width: 3.5rem; }
.w-16 { width: 4rem; }
.w-2 { width: .5rem; }
.w-20 { width: 5rem; }
.w-24 { width: 6rem; }
.w-4 { width: 1rem; }
.w-40 { width: 10rem; }
.w-44 { width: 11rem; }
.w-52 { width: 13rem; }
.w-7 { width: 1.75rem; }
.w-8 { width: 2rem; }
.w-96 { width: 24rem; }
.w-full { width: 100%; }
.whitespace-pre-wrap { white-space: pre-wrap; }
.z-50 { z-index: 50; }
@keyframes tw-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
@keyframes tw-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Mobile touch-targets (M190) — page-unique, not duplicated elsewhere.
   .tts-btn is a fixed 28x28 icon button, needs min-width too;
   .mode-change-btn is text/icon-label, min-height alone is enough. */
@media (max-width: 768px) {
    .tts-btn {
        min-height: 44px;
        min-width: 44px;
    }
    .mode-change-btn {
        min-height: 44px;
    }
}

/* ── "100% free" pill + Explore-more cross-sell (M545) ───────────────────── */
.dr-free-pill{display:inline-flex;align-items:center;gap:.3rem;font-size:.72rem;font-weight:700;
  letter-spacing:.02em;padding:.28rem .6rem;border-radius:999px;color:#064e3b;
  background:linear-gradient(90deg,#86efac,#34d399);box-shadow:0 2px 10px rgba(52,211,153,.35);white-space:nowrap}
.dr-explore{max-width:72rem;margin:0 auto;padding:1.75rem 0 .5rem}
.dr-explore-head{text-align:center;margin-bottom:1.1rem}
.dr-explore-sub{color:var(--text-muted);font-size:.92rem;margin-top:.25rem}
.dr-explore-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.9rem}
.dr-explore-card{display:flex;flex-direction:column;gap:.35rem;text-decoration:none;padding:1.1rem 1.15rem;
  border-radius:18px;background:#fff;border:1px solid rgba(15,23,42,.08);
  box-shadow:0 4px 14px rgba(15,23,42,.05);transition:transform .14s,box-shadow .2s,border-color .2s}
.dr-explore-card:hover{transform:translateY(-3px);box-shadow:0 12px 28px rgba(15,23,42,.12);border-color:rgba(245,166,35,.5)}
.dr-explore-ico{font-size:1.7rem;line-height:1}
.dr-explore-name{font-weight:700;color:#0f172a;font-size:1.02rem}
.dr-explore-desc{color:#64748b;font-size:.82rem;line-height:1.35;flex:1}
.dr-explore-go{margin-top:.3rem;font-weight:700;font-size:.82rem;color:#b45309}
.dr-explore-foot{text-align:center;margin-top:1.3rem}
.dr-explore-plans{display:inline-block;text-decoration:none;font-weight:700;font-size:.95rem;color:#1f1300; /* M621: dark ink on yellow */
  padding:.7rem 1.4rem;border-radius:13px;background:linear-gradient(90deg,#fcd34d,#f5a623);
  box-shadow:0 8px 22px rgba(245,166,35,.34);transition:transform .12s,box-shadow .2s}
.dr-explore-plans:hover{transform:translateY(-1px);box-shadow:0 12px 28px rgba(245,166,35,.46)}

/* M639: toast fits the phone and clears the tab bar / home indicator. */
.toast-wrap { max-width: calc(100vw - 32px); }
@media (max-width: 768px) {
    .toast-wrap { bottom: calc(16px + env(safe-area-inset-bottom)); }
    body.has-tabbar .toast-wrap { bottom: calc(76px + env(safe-area-inset-bottom)); }
}
