/* =====================================================================
   Bernard Bout Book — Premium book-inspired design system
   Palette: maroon · gold · parchment · charcoal
   ===================================================================== */

:root {
    --maroon:        #7c1d2b;
    --maroon-dark:   #571017;
    --maroon-deep:   #3d0a10;
    --gold:          #c8a24a;
    --gold-soft:     #e6cf95;
    --gold-dark:     #9c7a2f;
    --parchment:     #f6efdf;
    --parchment-2:   #efe5cf;
    --cream:         #fbf7ec;
    --ink:           #2a2723;
    --ink-soft:      #55504a;
    --charcoal:      #23252b;
    --navy:          #1e2531;
    --line:          #dccfae;
    --line-soft:     #e8dcc0;
    --white:         #ffffff;
    --success:       #2f7d4f;
    --danger:        #b23b3b;
    --warning:       #b9822b;
    --info:          #35617d;

    --shadow-sm: 0 1px 2px rgba(61, 10, 16, .08);
    --shadow-md: 0 8px 24px rgba(61, 10, 16, .12);
    --shadow-lg: 0 18px 50px rgba(61, 10, 16, .22);

    --font-display: "Playfair Display", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
    --font-serif:   "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
    --font-sans:    "Inter", "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;

    --radius: 12px;
    --radius-sm: 8px;
    --maxw: 1160px;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--ink);
    line-height: 1.6;
    background-color: var(--parchment);
    background-image:
        radial-gradient(circle at 12% 18%, rgba(200,162,74,.10), transparent 40%),
        radial-gradient(circle at 88% 12%, rgba(124,29,43,.08), transparent 42%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.035'/%3E%3C/svg%3E");
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.18; color: var(--maroon-dark); margin: 0 0 .5em; letter-spacing: .2px; }
a { color: var(--maroon); text-decoration: none; }
a:hover { color: var(--maroon-dark); text-decoration: underline; }
img { max-width: 100%; height: auto; }
p { margin: 0 0 1em; }
hr { border: none; border-top: 1px solid var(--line); margin: 2rem 0; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Skip link / a11y ---------- */
.skip-link { position: absolute; left: -999px; top: 0; background: var(--maroon); color: #fff; padding: 10px 16px; z-index: 200; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Top bar / masthead ---------- */
.masthead {
    background: linear-gradient(160deg, var(--maroon) 0%, var(--maroon-dark) 60%, var(--maroon-deep) 100%);
    color: var(--cream);
    border-bottom: 3px solid var(--gold);
    box-shadow: var(--shadow-md);
    position: sticky; top: 0; z-index: 100;
}
.masthead .container { display: flex; align-items: center; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--cream); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img { width: 48px; height: 48px; border-radius: 50%; background: var(--cream); padding: 3px; box-shadow: var(--shadow-sm); }
.brand-title { font-family: var(--font-display); font-size: 1.28rem; font-weight: 800; letter-spacing: .4px; line-height: 1; color: var(--cream); }
.brand-sub { font-size: .68rem; letter-spacing: 2.5px; text-transform: uppercase; color: var(--gold-soft); }

.nav-toggle { margin-left: auto; display: none; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); color: #fff; font-size: 1.4rem; line-height: 1; padding: 6px 12px; border-radius: 8px; cursor: pointer; }

.topnav { margin-left: auto; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.topnav a { color: var(--gold-soft); padding: 8px 12px; border-radius: 8px; font-size: .82rem; font-weight: 600; letter-spacing: .3px; text-transform: uppercase; }
.topnav a:hover, .topnav a.active { color: #fff; background: rgba(255,255,255,.12); text-decoration: none; }
.topnav .btn { text-transform: none; }

/* ---------- Bookmark ribbon sub-nav ---------- */
.chapter-nav { background: var(--cream); border-bottom: 1px solid var(--line); }
.chapter-nav .container { display: flex; gap: 4px; overflow-x: auto; padding-top: 6px; padding-bottom: 6px; scrollbar-width: thin; }
.chapter-nav a {
    white-space: nowrap; font-size: .78rem; font-weight: 600; color: var(--ink-soft);
    padding: 7px 14px; border-radius: 999px; letter-spacing: .3px;
}
.chapter-nav a:hover { color: var(--maroon); background: var(--parchment-2); text-decoration: none; }
.chapter-nav a.active { color: #fff; background: var(--maroon); }

/* ---------- Layout ---------- */
main { flex: 1 0 auto; padding: 32px 0 56px; }
.page-narrow { max-width: 860px; }

/* ---------- Chapter header ---------- */
.chapter-header { text-align: center; margin: 8px auto 34px; max-width: 780px; position: relative; }
.chapter-eyebrow {
    display: inline-block; font-family: var(--font-sans); font-size: .72rem; font-weight: 700;
    letter-spacing: 3px; text-transform: uppercase; color: var(--gold-dark);
    padding: 4px 0; margin-bottom: 6px;
}
.chapter-header h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); margin-bottom: .3em; }
.chapter-header p.lede { font-family: var(--font-serif); font-size: 1.12rem; color: var(--ink-soft); font-style: italic; }
.rule-ornament { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 14px auto 0; color: var(--gold-dark); }
.rule-ornament::before, .rule-ornament::after { content: ""; height: 1px; width: min(120px, 22vw); background: linear-gradient(90deg, transparent, var(--gold-dark)); }
.rule-ornament::after { background: linear-gradient(90deg, var(--gold-dark), transparent); }

/* ---------- Cards / pages ---------- */
.card {
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 22px;
    position: relative;
}
.card.page-card { background:
    linear-gradient(90deg, rgba(124,29,43,.05), transparent 5%),
    var(--cream); border-left: 3px solid var(--gold); }
.card h2, .card h3 { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: var(--font-sans); font-weight: 700; font-size: .9rem; letter-spacing: .3px;
    padding: 11px 20px; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
    text-decoration: none; transition: transform .08s ease, box-shadow .15s ease, background .15s ease;
    background: var(--maroon); color: #fff; box-shadow: var(--shadow-sm);
}
.btn:hover { text-decoration: none; color: #fff; background: var(--maroon-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn-gold { background: linear-gradient(160deg, var(--gold), var(--gold-dark)); color: #3a2c08; }
.btn-gold:hover { color: #2a2005; filter: brightness(1.05); }
.btn-outline { background: transparent; color: var(--maroon); border-color: var(--maroon); box-shadow: none; }
.btn-outline:hover { background: var(--maroon); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink-soft); border-color: var(--line); box-shadow: none; }
.btn-ghost:hover { background: var(--parchment-2); color: var(--ink); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #8f2c2c; }
.btn-sm { padding: 7px 14px; font-size: .8rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Badges ---------- */
.badge {
    display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 700;
    letter-spacing: .4px; text-transform: uppercase; padding: 4px 10px; border-radius: 999px;
    border: 1px solid transparent; white-space: nowrap;
}
.badge-blades { font-size: .8em; }
.badge-weapon { background: #efe3c8; color: #6a5312; border-color: var(--gold-soft); }
.weapon-foil   { background: #e7eef5; color: #2b5170; border-color: #bcd2e4; }
.weapon-epee   { background: #e9f1e8; color: #2e6136; border-color: #c2dcbf; }
.weapon-saber  { background: #f6e7e3; color: #8a3a29; border-color: #e4c3b8; }
.weapon-multiple { background: #efe3c8; color: #6a5312; border-color: var(--gold-soft); }
.badge-level { background: #eee; color: #444; }
.level-novice  { background: #eef1f4; color: #4a5b6b; }
.level-jv      { background: #e9eef9; color: #33518f; }
.level-varsity { background: var(--maroon); color: #fff; }
.level-coach   { background: linear-gradient(160deg, var(--gold), var(--gold-dark)); color: #3a2c08; }
.badge-status { }
.status-eligible, .status-overridden_eligible, .badge-eligible { background: #e4f2e8; color: #226b41; border-color: #b8dcc4; }
.status-ineligible, .status-overridden_ineligible, .badge-ineligible { background: #f8e6e6; color: #a13232; border-color: #e6c2c2; }
.badge-present  { background: #e4f2e8; color: #226b41; }
.badge-late     { background: #fdf1dc; color: #8a6114; }
.badge-excused  { background: #e9eef9; color: #33518f; }
.badge-absent   { background: #f8e6e6; color: #a13232; }
.badge-available { background: #e4f2e8; color: #226b41; }
.badge-signed_out { background: #fdf1dc; color: #8a6114; }
.badge-maintenance { background: #e9eef9; color: #33518f; }
.badge-lost, .badge-retired { background: #ecebe8; color: #6a655d; }
.badge-featured { background: linear-gradient(160deg, var(--gold), var(--gold-dark)); color: #3a2c08; }
.badge-pending { background: #fdf1dc; color: #8a6114; }
.badge-approved { background: #e4f2e8; color: #226b41; }
.badge-rejected { background: #f8e6e6; color: #a13232; }
.badge-override { background: var(--charcoal); color: var(--gold-soft); }

/* ---------- Stat cards / bout cards ---------- */
.stat-card {
    background: linear-gradient(165deg, var(--white), var(--cream));
    border: 1px solid var(--line); border-radius: var(--radius);
    padding: 18px 20px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.stat-card::after { content: ""; position: absolute; right: -18px; top: -18px; width: 70px; height: 70px; border-radius: 50%; background: radial-gradient(circle, rgba(200,162,74,.16), transparent 70%); }
.stat-label { font-size: .72rem; text-transform: uppercase; letter-spacing: 1.4px; color: var(--ink-soft); font-weight: 700; }
.stat-value { font-family: var(--font-display); font-size: 2.2rem; font-weight: 800; color: var(--maroon-dark); line-height: 1.1; margin-top: 2px; }
.stat-sub { font-size: .82rem; color: var(--ink-soft); }
.stat-card.accent { background: linear-gradient(160deg, var(--maroon), var(--maroon-dark)); border-color: var(--maroon-dark); }
.stat-card.accent .stat-label { color: var(--gold-soft); }
.stat-card.accent .stat-value, .stat-card.accent .stat-sub { color: #fff; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--cream); }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 520px; }
table.data th { text-align: left; font-family: var(--font-sans); font-size: .72rem; letter-spacing: .8px; text-transform: uppercase; color: var(--ink-soft); background: var(--parchment-2); padding: 12px 14px; border-bottom: 2px solid var(--line); position: sticky; top: 0; }
table.data td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.data tbody tr:hover { background: rgba(200,162,74,.07); }
table.data tbody tr:last-child td { border-bottom: none; }
.table-num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 16px; }
label { display: block; font-weight: 600; font-size: .86rem; margin-bottom: 6px; color: var(--ink); }
label .req { color: var(--danger); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time],
input[type=number], input[type=search], input[type=file], select, textarea {
    width: 100%; font-family: var(--font-sans); font-size: .95rem; color: var(--ink);
    padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: var(--white); transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold-dark); box-shadow: 0 0 0 3px rgba(200,162,74,.25); }
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.help { font-size: .8rem; color: var(--ink-soft); margin-top: 4px; }
.form-actions { display: flex; gap: 12px; align-items: center; margin-top: 20px; flex-wrap: wrap; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; margin: 0 0 18px; }
legend { font-family: var(--font-display); font-weight: 700; color: var(--maroon-dark); padding: 0 8px; }
.checkbox-row { display: flex; align-items: center; gap: 10px; }
.checkbox-row input { width: auto; }
.checkbox-row label { margin: 0; }

/* ---------- Flash / alerts ---------- */
.flash { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 14px; border: 1px solid; font-weight: 500; display: flex; gap: 10px; align-items: flex-start; }
.flash-success { background: #e8f4ec; border-color: #b8dcc4; color: #1f6a3f; }
.flash-error   { background: #fbe9e9; border-color: #e6c2c2; color: #9d2f2f; }
.flash-info    { background: #e9eff6; border-color: #c3d5e6; color: #2f5670; }
.flash-warning { background: #fbf1de; border-color: #ecd6a6; color: #886017; }

/* ---------- Empty & loading states ---------- */
.empty-state { text-align: center; padding: 48px 24px; color: var(--ink-soft); }
.empty-state .icon { font-size: 2.6rem; opacity: .5; }
.empty-state h3 { color: var(--ink-soft); font-family: var(--font-display); }
.spinner { width: 32px; height: 32px; border: 3px solid var(--line); border-top-color: var(--maroon); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 24px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Team member cards ---------- */
.member-card {
    background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); overflow: hidden; transition: transform .12s ease, box-shadow .18s ease;
    display: flex; flex-direction: column;
}
.member-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.member-card .photo { aspect-ratio: 1/1; background: linear-gradient(160deg, var(--parchment-2), var(--line-soft)); position: relative; overflow: hidden; }
.member-card .photo img { width: 100%; height: 100%; object-fit: cover; }
.member-card .photo .corner-badge { position: absolute; top: 10px; left: 10px; }
.member-card .photo .corner-badge.right { left: auto; right: 10px; }
.member-card .body { padding: 14px 16px 18px; text-align: center; }
.member-card .name { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: var(--maroon-dark); margin: 0; }
.member-card .meta { font-size: .82rem; color: var(--ink-soft); margin: 2px 0 10px; }
.member-card .badges { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.member-card .quote { font-family: var(--font-serif); font-style: italic; font-size: .86rem; color: var(--ink-soft); margin-top: 10px; }

/* ---------- Filters bar ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 22px; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.filters .form-group { margin: 0; flex: 1 1 150px; }
.filters label { font-size: .72rem; text-transform: uppercase; letter-spacing: .6px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 2px solid var(--line); margin-bottom: 20px; }
.tabs a, .tabs button { background: none; border: none; font-family: var(--font-sans); font-weight: 700; font-size: .86rem; color: var(--ink-soft); padding: 10px 16px; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs a.active, .tabs button.active { color: var(--maroon); border-bottom-color: var(--gold); text-decoration: none; }

/* ---------- Hero (landing) ---------- */
.hero { position: relative; text-align: center; color: var(--cream); padding: 72px 20px 84px; overflow: hidden;
    background: radial-gradient(circle at 50% -10%, var(--maroon) 0%, var(--maroon-dark) 55%, var(--maroon-deep) 100%); }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .08;
    background-image: repeating-linear-gradient(90deg, #fff 0 1px, transparent 1px 42px); }
.hero-logo { width: 132px; height: 132px; border-radius: 50%; background: var(--cream); padding: 8px; box-shadow: var(--shadow-lg); position: relative; }
.hero h1 { color: #fff; font-size: clamp(2.4rem, 6vw, 4.2rem); margin: 22px 0 6px; text-shadow: 0 2px 20px rgba(0,0,0,.3); }
.hero .subtitle { font-family: var(--font-serif); font-style: italic; font-size: clamp(1.05rem, 2.4vw, 1.4rem); color: var(--gold-soft); position: relative; }
.hero .hero-actions { margin-top: 28px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position: relative; }
.hero-crest { position: relative; display: inline-block; }
.hero-crest .blade { position: absolute; top: 50%; width: 150px; height: 2px; background: linear-gradient(90deg, transparent, var(--gold-soft)); }
.hero-crest .blade.l { right: 100%; margin-right: 18px; }
.hero-crest .blade.r { left: 100%; margin-left: 18px; background: linear-gradient(90deg, var(--gold-soft), transparent); }
@media (max-width: 640px){ .hero-crest .blade { display: none; } }

/* ---------- Feature chapters grid (landing) ---------- */
.chapter-tile { display: block; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); transition: transform .12s, box-shadow .18s; height: 100%; }
.chapter-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); text-decoration: none; border-color: var(--gold-soft); }
.chapter-tile .num { font-family: var(--font-display); font-size: .8rem; letter-spacing: 2px; text-transform: uppercase; color: var(--gold-dark); }
.chapter-tile .icon { font-size: 1.8rem; }
.chapter-tile h3 { margin: 6px 0 6px; }
.chapter-tile p { color: var(--ink-soft); font-size: .9rem; margin: 0; }

/* ---------- Photo gallery (masonry) ---------- */
.masonry { columns: 4 240px; column-gap: 16px; }
.masonry .photo-card { break-inside: avoid; margin-bottom: 16px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--cream); box-shadow: var(--shadow-sm); cursor: pointer; position: relative; }
.masonry .photo-card img { width: 100%; display: block; }
.masonry .photo-card .cap { padding: 8px 12px; font-size: .82rem; color: var(--ink-soft); }
.masonry .photo-card .feat { position: absolute; top: 8px; right: 8px; }

/* lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(30,10,14,.9); display: none; align-items: center; justify-content: center; z-index: 300; padding: 24px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 82vh; border-radius: 8px; box-shadow: var(--shadow-lg); border: 4px solid var(--cream); }
.lightbox .cap { position: absolute; bottom: 20px; color: var(--cream); text-align: center; width: 100%; font-family: var(--font-serif); font-style: italic; }
.lightbox .close { position: absolute; top: 18px; right: 24px; color: #fff; font-size: 2rem; cursor: pointer; background: none; border: none; }

/* ---------- Glossary ---------- */
.alpha-nav { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 20px; }
.alpha-nav a { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--cream); border: 1px solid var(--line); font-weight: 700; font-size: .82rem; }
.alpha-nav a:hover { background: var(--maroon); color: #fff; text-decoration: none; }
.term-card { background: var(--cream); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: var(--radius-sm); padding: 16px 18px; }
.term-card h4 { margin: 0 0 4px; font-size: 1.1rem; display: flex; align-items: center; gap: 8px; }
.term-card .cat { font-size: .68rem; text-transform: uppercase; letter-spacing: 1px; color: var(--gold-dark); font-weight: 700; }

/* ---------- Timeline (history) ---------- */
.timeline { position: relative; margin: 20px 0; padding-left: 28px; border-left: 2px solid var(--gold-soft); }
.timeline .event { position: relative; margin-bottom: 26px; }
.timeline .event::before { content: ""; position: absolute; left: -35px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--maroon); border: 2px solid var(--gold); }
.timeline .year { font-family: var(--font-display); font-weight: 800; color: var(--maroon); }

/* ---------- Do / Don't cards ---------- */
.dodont { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.do-card, .dont-card { border-radius: var(--radius); padding: 16px 18px; border: 1px solid; }
.do-card { background: #edf6f0; border-color: #bfe0cd; }
.dont-card { background: #fbecec; border-color: #e8c6c6; }
.do-card h4, .dont-card h4 { margin: 0 0 8px; }
.do-card h4 { color: #1f6a3f; } .dont-card h4 { color: #a13232; }
.do-card ul, .dont-card ul { margin: 0; padding-left: 20px; }

/* ---------- Checklist ---------- */
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); align-items: flex-start; }
.checklist li::before { content: "✓"; color: var(--gold-dark); font-weight: 800; flex: 0 0 auto; }

/* ---------- QR display ---------- */
.qr-panel { text-align: center; }
.qr-panel .qr-box { display: inline-block; background: #fff; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-md); }
.qr-panel .qr-box canvas, .qr-panel .qr-box img { display: block; }
.qr-code-text { font-family: var(--font-display); font-size: 2rem; letter-spacing: 6px; color: var(--maroon); background: var(--cream); border: 2px dashed var(--gold); border-radius: 10px; padding: 12px 20px; display: inline-block; }

/* ---------- Prose (page_content) ---------- */
.prose { font-family: var(--font-serif); font-size: 1.05rem; color: var(--ink); }
.prose h2 { font-size: 1.6rem; margin-top: 1.4em; }
.prose h3 { font-size: 1.25rem; margin-top: 1.2em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose blockquote { border-left: 3px solid var(--gold); margin: 1em 0; padding: .4em 1.2em; background: var(--parchment-2); font-style: italic; }
.prose p:first-letter { }
.dropcap::first-letter { font-family: var(--font-display); font-size: 3.4rem; font-weight: 800; float: left; line-height: .8; padding: 6px 10px 0 0; color: var(--maroon); }

/* ---------- Coach note ---------- */
.coach-note { background: var(--charcoal); color: var(--cream); border-radius: var(--radius); padding: 18px 22px; border-left: 4px solid var(--gold); }
.coach-note h4 { color: var(--gold-soft); margin: 0 0 6px; }
.coach-note p { margin: 0; color: #e7e2d6; }

/* ---------- Admin sidebar layout ---------- */
.admin-shell { display: grid; grid-template-columns: 232px 1fr; gap: 24px; }
.admin-side { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; align-self: start; position: sticky; top: 96px; }
.admin-side .group-label { font-size: .68rem; text-transform: uppercase; letter-spacing: 1.2px; color: var(--gold-dark); font-weight: 700; padding: 12px 10px 4px; }
.admin-side a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; color: var(--ink); font-size: .88rem; font-weight: 500; }
.admin-side a:hover { background: var(--parchment-2); text-decoration: none; }
.admin-side a.active { background: var(--maroon); color: #fff; }
.admin-side a .badge { margin-left: auto; }

/* ---------- Modal (confirm) ---------- */
dialog.modal { border: none; border-radius: var(--radius); padding: 0; box-shadow: var(--shadow-lg); max-width: 440px; width: 92%; background: var(--cream); }
dialog.modal::backdrop { background: rgba(30,10,14,.55); }
dialog.modal .modal-body { padding: 24px; }
dialog.modal h3 { margin-top: 0; }

/* ---------- Misc ---------- */
.muted { color: var(--ink-soft); }
.text-center { text-align: center; }
.mt-0{margin-top:0}.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}.mt-4{margin-top:32px}
.mb-0{margin-bottom:0}.mb-2{margin-bottom:16px}.mb-3{margin-bottom:24px}
.flex { display: flex; } .flex-between { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap: wrap; }
.gap-1{gap:8px}.gap-2{gap:16px}
.tag { display:inline-block; font-size:.72rem; background:var(--parchment-2); border:1px solid var(--line); border-radius:999px; padding:2px 9px; color:var(--ink-soft); }
.pill-row { display:flex; gap:8px; flex-wrap:wrap; }
.win { color: var(--success); font-weight: 700; }
.loss { color: var(--danger); font-weight: 700; }
.divider-fleur { text-align:center; color: var(--gold-dark); margin: 28px 0; font-size: 1.2rem; }
.divider-fleur::before, .divider-fleur::after { content: "⚜"; margin: 0 12px; opacity: .6; }

/* ---------- Footer ---------- */
footer.site { background: var(--charcoal); color: #cfc9bd; border-top: 3px solid var(--gold); margin-top: auto; padding: 30px 0; font-size: .86rem; }
footer.site .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
footer.site a { color: var(--gold-soft); }
footer.site .foot-brand { font-family: var(--font-display); color: var(--cream); font-size: 1.05rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .admin-shell { grid-template-columns: 1fr; }
    .admin-side { position: static; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); }
    .admin-side .group-label { grid-column: 1/-1; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .masonry { columns: 3 200px; }
}
@media (max-width: 720px) {
    .nav-toggle { display: block; }
    .topnav { display: none; flex-direction: column; align-items: stretch; width: 100%; order: 3; padding-bottom: 8px; }
    .topnav.open { display: flex; }
    .topnav a { width: 100%; }
    .masthead .container { flex-wrap: wrap; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .dodont { grid-template-columns: 1fr; }
    .masonry { columns: 2 140px; }
    .chapter-header p.lede { font-size: 1rem; }
}
@media (max-width: 420px) {
    .brand-sub { display: none; }
    .masonry { columns: 1; }
}

/* ---------- Print ---------- */
@media print {
    .masthead, .chapter-nav, footer.site, .no-print, .btn, .filters { display: none !important; }
    body { background: #fff; }
    .card, .stat-card { box-shadow: none; border-color: #ccc; }
}
