/* ==========================================================================
   Christmas Card Swap
   Brand colors live in section 1 (and in includes/config.php for emails).
   Table of contents
   1. Tokens
   2. Base
   3. Layout
   4. Header, footer & credit animation (snowfall)
   5. Buttons
   6. Hero
   7. How it works
   8. Sign-up form
   9. Notices & thank-you page
   10. Admin
   11. Responsive
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
    --green: #1e6b3c;
    --green-dark: #165430;
    --green-deep: #0e3b21;
    --yellow: #c9a24a;
    --red: #b3202f;
    --red-dark: #8f1824;
    --orange: #d98a2b;
    --brown: #12392a;
    --brown-dark: #0d2a1e;
    --ink: #1b2a22;
    --muted: #5a6a61;
    --line: #e1e8e1;
    --paper: #ffffff;
    --paper-alt: #f6f8f4;
    --radius: 12px;
    --shadow: 0 2px 6px rgba(18, 57, 42, 0.08), 0 8px 24px rgba(18, 57, 42, 0.06);
    --shadow-hover: 0 4px 10px rgba(18, 57, 42, 0.12), 0 12px 28px rgba(18, 57, 42, 0.10);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --transition: 0.2s ease;
}

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* Sticky footer: main fills the space so the footer sits at the bottom on short pages */
main { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { color: var(--brown); line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

a { color: var(--green-dark); text-underline-offset: 3px; }
a:hover { color: var(--green-deep); }

:focus-visible { outline: 3px solid var(--brown); outline-offset: 2px; }

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--brown);
    color: #fff;
    padding: 10px 16px;
    z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* 3. Layout ---------------------------------------------------------------- */
.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 680px; }

.section { padding: 64px 0; }
.section-alt { background: var(--paper-alt); }
.section-title { text-align: center; margin-bottom: 0.75em; }
.section-intro { text-align: center; color: var(--muted); max-width: 520px; margin: 0 auto 28px; }

.card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px;
}

/* 4. Header & footer ------------------------------------------------------- */
.brand-stripe {
    height: 8px;
    background: repeating-linear-gradient(135deg, var(--red) 0, var(--red) 10px, #ffffff 10px, #ffffff 20px);
}

.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    padding-top: 14px;
    padding-bottom: 14px;
}
.header-link {
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    color: var(--green-dark);
    white-space: nowrap;
    transition: color var(--transition);
}
.header-link:hover { color: var(--green-deep); text-decoration: underline; }

.site-footer {
    background: var(--brown-dark);
    color: #dfeae4;
    padding: 28px 0;
    font-size: 0.92rem;
}
.site-footer { overflow: hidden; }
.site-footer p { margin: 0; }
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px 24px;
    flex-wrap: wrap;
}
.site-footer a { color: #f3d98b; }
.site-footer a:hover { color: #fff; }

/* Credit animation: light snowfall over the credit on hover/focus */
:root { --spring: cubic-bezier(0.34, 1.56, 0.64, 1); }

.footer-credit { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }

.credit-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    text-decoration: none;
}
.credit-link:hover .credit-name { text-decoration: underline; }

.credit-logo {
    height: 30px;
    width: auto;
    padding: 3px;
    background: #fff;
    border-radius: 8px;
    transition: transform 0.4s var(--spring);
}
.credit-link:hover .credit-logo,
.credit-link:focus-visible .credit-logo { transform: rotate(-6deg) scale(1.08); }

.credit-snow {
    position: absolute;
    left: -8px;
    right: -8px;
    top: -24px;
    height: 84px;
    overflow: hidden;
    pointer-events: none;
}
.credit-snow i {
    position: absolute;
    top: -8px;
    left: var(--x);
    width: var(--s);
    height: var(--s);
    background: #fff;
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.7);
}
.credit-snow i:nth-child(1)  { --x: 4%;  --s: 5px; --d: 2.1s; --t: 0s;    --w: 8px; }
.credit-snow i:nth-child(2)  { --x: 12%; --s: 3px; --d: 2.8s; --t: 0.4s;  --w: -6px; }
.credit-snow i:nth-child(3)  { --x: 20%; --s: 6px; --d: 2.4s; --t: 0.9s;  --w: 10px; }
.credit-snow i:nth-child(4)  { --x: 29%; --s: 4px; --d: 3s;   --t: 0.2s;  --w: -9px; }
.credit-snow i:nth-child(5)  { --x: 37%; --s: 5px; --d: 2.2s; --t: 1.3s;  --w: 7px; }
.credit-snow i:nth-child(6)  { --x: 45%; --s: 3px; --d: 2.6s; --t: 0.6s;  --w: -5px; }
.credit-snow i:nth-child(7)  { --x: 53%; --s: 6px; --d: 2.9s; --t: 1.1s;  --w: 9px; }
.credit-snow i:nth-child(8)  { --x: 61%; --s: 4px; --d: 2.3s; --t: 0.1s;  --w: -8px; }
.credit-snow i:nth-child(9)  { --x: 69%; --s: 5px; --d: 2.7s; --t: 1.6s;  --w: 6px; }
.credit-snow i:nth-child(10) { --x: 77%; --s: 3px; --d: 2.5s; --t: 0.7s;  --w: -7px; }
.credit-snow i:nth-child(11) { --x: 85%; --s: 6px; --d: 3.1s; --t: 1.9s;  --w: 10px; }
.credit-snow i:nth-child(12) { --x: 93%; --s: 4px; --d: 2.2s; --t: 0.3s;  --w: -6px; }
.credit-snow i:nth-child(13) { --x: 8%;  --s: 4px; --d: 2.9s; --t: 1.5s;  --w: 5px; }
.credit-snow i:nth-child(14) { --x: 33%; --s: 3px; --d: 2.4s; --t: 2.1s;  --w: -4px; }
.credit-snow i:nth-child(15) { --x: 57%; --s: 5px; --d: 2.8s; --t: 2.4s;  --w: 8px; }
.credit-snow i:nth-child(16) { --x: 81%; --s: 3px; --d: 2.6s; --t: 1.2s;  --w: -5px; }

.footer-credit:hover .credit-snow i,
.footer-credit:focus-within .credit-snow i,
.footer-credit.snow-play .credit-snow i {
    animation: snowfall var(--d) linear var(--t) infinite;
}
@keyframes snowfall {
    0%   { transform: translate(0, 0); opacity: 0; }
    12%  { opacity: 0.95; }
    50%  { transform: translate(var(--w), 40px); }
    88%  { opacity: 0.9; }
    100% { transform: translate(calc(var(--w) * -0.4), 88px); opacity: 0; }
}

/* Credit animation, part 2: a short string of blinking Christmas lights over the credit */
.credit-lights {
    position: absolute;
    left: -6px;
    right: -6px;
    top: -14px;
    height: 26px;
    pointer-events: none;
}
.credit-lights::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -10px;
    height: 18px;
    border-bottom: 2px solid #4f7f66;
    border-radius: 0 0 50% 50% / 0 0 100% 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.credit-lights i {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 8px;
    height: 11px;
    margin-left: -4px;
    background: var(--c);
    border-radius: 45% 45% 50% 50% / 35% 35% 65% 65%;
    box-shadow: 0 0 9px 2px var(--c);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.credit-lights i:nth-child(1) { --x: 5.0%; --y: -1.2px; --c: #e03145; --b: 0.00s; }
.credit-lights i:nth-child(2) { --x: 15.0%; --y: 3.9px; --c: #fff0c4; --b: 0.37s; }
.credit-lights i:nth-child(3) { --x: 25.0%; --y: 6.6px; --c: #25a85a; --b: 0.74s; }
.credit-lights i:nth-child(4) { --x: 35.0%; --y: 8.2px; --c: #fff0c4; --b: 1.11s; }
.credit-lights i:nth-child(5) { --x: 45.0%; --y: 8.9px; --c: #e03145; --b: 0.08s; }
.credit-lights i:nth-child(6) { --x: 55.0%; --y: 8.9px; --c: #fff0c4; --b: 0.45s; }
.credit-lights i:nth-child(7) { --x: 65.0%; --y: 8.2px; --c: #25a85a; --b: 0.82s; }
.credit-lights i:nth-child(8) { --x: 75.0%; --y: 6.6px; --c: #fff0c4; --b: 1.19s; }
.credit-lights i:nth-child(9) { --x: 85.0%; --y: 3.9px; --c: #e03145; --b: 0.16s; }
.credit-lights i:nth-child(10) { --x: 95.0%; --y: -1.2px; --c: #fff0c4; --b: 0.53s; }
.footer-credit:hover .credit-lights::before,
.footer-credit:focus-within .credit-lights::before,
.footer-credit.snow-play .credit-lights::before { opacity: 1; }
.footer-credit:hover .credit-lights i,
.footer-credit:focus-within .credit-lights i,
.footer-credit.snow-play .credit-lights i {
    opacity: 1;
    animation: lightblink 1.1s ease-in-out var(--b) infinite;
}
@keyframes lightblink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.22; box-shadow: 0 0 3px 1px var(--c); }
}

/* 5. Buttons --------------------------------------------------------------- */
.btn {
    display: inline-block;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    padding: 14px 28px;
    border-radius: 999px;
    border: 2px solid transparent;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.btn-primary { background: var(--green-dark); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--green-deep); color: #fff; box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--green-dark); border-color: var(--green-dark); }
.btn-outline:hover { background: var(--green-dark); color: #fff; }
.btn-block { display: block; width: 100%; }
.btn[disabled] { opacity: 0.7; cursor: wait; transform: none; }

/* 6. Hero ------------------------------------------------------------------ */
.hero { background: #fff; text-align: center; padding: 40px 0 64px; }
.hero-image { width: 100%; max-width: 760px; margin: 0 auto 24px; }
.hero h1 { margin-bottom: 0.35em; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 640px; margin: 0 auto 1.5em; }
.hero-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; }
.deadline-note { margin: 22px 0 0; color: var(--brown); }
.signup-count { margin: 18px 0 0; color: var(--brown); font-size: 1.1rem; font-weight: 600; }
.signup-count strong { color: var(--red); font-size: 1.7rem; margin-left: 4px; vertical-align: -2px; }

/* 7. How it works ---------------------------------------------------------- */
.steps {
    list-style: none;
    margin: 36px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.step {
    background: var(--paper);
    border: 1px solid var(--line);
    border-top: 5px solid var(--green);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px 24px;
    transition: transform var(--transition), box-shadow var(--transition);
}
.step:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.step:nth-child(2) { border-top-color: var(--red); }
.step:nth-child(3) { border-top-color: var(--green); }
.step p { margin: 0; color: var(--muted); }

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--green-dark);
    color: #fff;
    font-weight: 700;
    margin-bottom: 14px;
}
.step:nth-child(2) .step-number { background: var(--red); }
.step:nth-child(3) .step-number { background: var(--green-dark); }

/* 8. Sign-up form ---------------------------------------------------------- */
.signup-form { padding: 36px; }

.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--brown); }
.req { color: var(--red); }
.optional { font-weight: 400; color: var(--muted); font-size: 0.9em; }

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="date"] {
    width: 100%;
    font-family: inherit;
    font-size: 1rem;
    color: var(--ink);
    padding: 12px 14px;
    background: #fff;
    border: 1.5px solid #c3cfc9;
    border-radius: 8px;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.field input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(30, 107, 60, 0.22); }
.field input[aria-invalid="true"] { border-color: var(--red); }

.field-row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 16px; }
.field-help { margin: 6px 0 0; font-size: 0.88rem; color: var(--muted); }
.field-error { margin: 6px 0 0; font-size: 0.9rem; font-weight: 600; color: var(--red); }

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.privacy-note,
.household-note {
    background: #fff8e6;
    border-left: 4px solid var(--yellow);
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 0.92rem;
    color: var(--ink);
    margin: 4px 0 20px;
}
.household-note { margin: 0 0 24px; font-size: 0.97rem; }

.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--green-dark); flex-shrink: 0; }

/* 9. Notices & thank-you page --------------------------------------------- */
.notice-closed { text-align: center; border-top: 5px solid var(--yellow); }
.notice-closed p { margin: 0; color: var(--muted); }

.error-summary { border-left: 5px solid var(--red); background: #fbecee; margin-bottom: 20px; padding: 20px 24px; }
.error-summary h3 { margin-bottom: 8px; }
.error-summary ul { margin: 0; padding-left: 20px; }
.error-summary:focus { outline: none; }

.thanks { padding: 72px 0; }
.thanks-card { text-align: center; border-top: 5px solid var(--green); padding: 48px 32px; }
.thanks-card .lead { margin-bottom: 1em; }
.thanks-card .hero-actions { margin-top: 28px; }

/* 10. Admin ---------------------------------------------------------------- */
.admin-body { background: var(--paper-alt); }
.admin-wrap { max-width: 1280px; margin: 0 auto; padding: 28px 20px 60px; }
.admin-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.admin-bar h1 { font-size: 1.6rem; margin: 0; }
.admin-nav { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-nav .btn { padding: 9px 18px; font-size: 0.92rem; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #9a2030; color: #fff; }
.btn-small { padding: 6px 12px !important; font-size: 0.82rem !important; }

.admin-login { max-width: 420px; margin: 80px auto; }
.admin-card { margin-bottom: 24px; padding: 24px; }
.admin-card h2 { font-size: 1.25rem; }
.admin-stats { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; }
.stat-number { font-size: 2rem; font-weight: 700; color: var(--green-dark); line-height: 1; }
.stat-label { color: var(--muted); font-size: 0.9rem; }
.status-pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 0.85rem; font-weight: 700; }
.status-open { background: #dff3e6; color: var(--green-deep); }
.status-closed { background: #fbdcdf; color: #8a1e2c; }

.admin-flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; font-weight: 600; }
.admin-flash.ok { background: #dff3e6; color: var(--green-deep); }
.admin-flash.bad { background: #fbdcdf; color: #8a1e2c; }

.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.admin-form .field { margin-bottom: 14px; }
.admin-form .check { font-weight: 600; }

.search-form { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.search-form input[type="text"] { flex: 1; min-width: 200px; padding: 10px 14px; border: 1.5px solid #c3cfc9; border-radius: 8px; font: inherit; }

.table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.data-table th, .data-table td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.data-table th { background: var(--paper-alt); color: var(--brown); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #f8fbf8; }
.data-table .nowrap { white-space: nowrap; }
.row-actions { display: flex; flex-wrap: wrap; gap: 0; align-items: flex-start; }
.row-actions form { margin: 0; }
.row-actions .btn { margin: 0 10px 10px 0; }
.admin-edit { max-width: 720px; margin: 0 auto; }
.admin-edit .btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.muted { color: var(--muted); font-size: 0.88rem; }
.missing { color: var(--red); font-weight: 600; font-size: 0.88rem; }
.status-wait { background: #fff1c2; color: #7a5b00; }
.warn-box { background: #fff8e6; border-left: 4px solid var(--yellow); border-radius: 8px; padding: 12px 16px; margin-top: 14px; font-size: 0.95rem; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.assign-list { margin: 0; padding-left: 1.25em; }
.assign-list li { margin: 0 0 2px; }
.assign-form .field { max-width: 260px; }
.field-row-2 { grid-template-columns: 3fr 1fr; }
.field select {
    width: 100%;
    font-family: inherit;
    font-size: 1rem;
    color: var(--ink);
    padding: 12px 14px;
    background: #fff;
    border: 1.5px solid #c3cfc9;
    border-radius: 8px;
}
.field select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(30, 107, 60, 0.22); }
.empty-state { padding: 40px; text-align: center; color: var(--muted); }

/* 11. Responsive ----------------------------------------------------------- */
@media (max-width: 760px) {
    .section { padding: 48px 0; }
    .hero { padding: 28px 0 48px; }
    .steps { grid-template-columns: 1fr; }
    .signup-form { padding: 24px 20px; }
    .field-row { grid-template-columns: 1fr 1fr; }
    .field-city { grid-column: 1 / -1; }
    .header-inner { flex-direction: column; align-items: flex-start; gap: 4px; }
    .footer-inner { flex-direction: column; align-items: flex-start; }
    .hero-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
    .credit-snow i { animation: none !important; }
    .credit-lights i { animation: none !important; }
}

/* 12. Dashboard state bars, received page */
.state-details { margin-top: 18px; }
.state-details summary { cursor: pointer; font-weight: 600; color: var(--brown); }
.state-bars { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.state-bars li { display: grid; grid-template-columns: 44px 1fr 32px; gap: 10px; align-items: center; font-size: 0.92rem; }
.state-name { font-weight: 600; }
.state-bar { background: #e8efea; border-radius: 999px; height: 10px; overflow: hidden; }
.state-bar span { display: block; height: 100%; background: var(--green); border-radius: 999px; }
.state-count { text-align: right; color: var(--muted); }
.received-form { max-width: 280px; margin: 18px auto 0; text-align: left; }
.received-form .btn { margin-top: 6px; }
details summary { cursor: pointer; }

/* 13. Christmas lights under the header */
.lights { height: 46px; overflow: hidden; pointer-events: none; }
.lights ul { display: flex; list-style: none; margin: 0 0 0 -24px; padding: 0; width: max-content; }
.lights li { position: relative; flex: 0 0 48px; width: 48px; height: 46px; --c: var(--red); }
.lights li { --c: #d62839; }
.lights li:nth-child(4n+2) { --c: #fff0c4; }
.lights li:nth-child(4n+3) { --c: #1f9a52; }
.lights li:nth-child(4n+4) { --c: #fff0c4; }
.lights li::before {
    content: "";
    position: absolute;
    left: 0;
    top: -12px;
    width: 48px;
    height: 20px;
    border-bottom: 2px solid #10261f;
    border-radius: 0 0 50% 50% / 0 0 100% 100%;
}
.lights i {
    position: absolute;
    left: -6px;
    top: 3px;
    width: 12px;
    height: 18px;
    background: var(--c);
    border-radius: 45% 45% 50% 50% / 35% 35% 65% 65%;
    box-shadow: 0 0 10px 2px var(--c);
    animation: twinkle 3.2s ease-in-out infinite;
}
.lights i::before {
    content: "";
    position: absolute;
    left: 2px;
    top: -5px;
    width: 8px;
    height: 6px;
    background: #10261f;
    border-radius: 2px 2px 0 0;
}
.lights i::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 4px;
    width: 3px;
    height: 5px;
    background: rgba(255, 255, 255, 0.55);
    border-radius: 50%;
}
.lights li:nth-child(3n+1) i { animation-delay: -0.6s; }
.lights li:nth-child(3n+2) i { animation-delay: -1.7s; }
.lights li:nth-child(5n) i { animation-delay: -2.5s; }
@keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; box-shadow: 0 0 5px 1px var(--c); }
}
@media (prefers-reduced-motion: reduce) {
    .lights i { animation: none; }
}
@media print { .lights { display: none; } }

/* 14. Print page: address labels and envelopes */
.print-controls { padding-bottom: 8px; }
.print-form { max-width: 520px; }
.print-scroll { overflow-x: auto; padding: 0 16px 40px; text-align: center; }
.print-page .sheet, .print-page .envelope { background: #fff; margin: 0 auto 24px; text-align: left; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18); }
.sheet { width: 8.5in; height: 11in; box-sizing: border-box; display: grid; page-break-after: always; break-after: page; overflow: hidden; }
.sheet-5160 { padding: 0.5in 0 0 0.21875in; grid-template-columns: repeat(3, 2.625in); grid-auto-rows: 1in; column-gap: 0.125in; }
.sheet-5163 { padding: 0.5in 0 0 0.15625in; grid-template-columns: repeat(2, 4in); grid-auto-rows: 2in; column-gap: 0.1875in; }
.sheet-5160 .label { padding: 0.12in 0.16in; font-size: 10.5pt; line-height: 1.25; }
.sheet-5163 .label { padding: 0.35in 0.4in; font-size: 13pt; line-height: 1.3; }
.label { box-sizing: border-box; overflow: hidden; color: #000; display: flex; align-items: center; }
.label-text { width: 100%; }
.label:not(.label-blank) { outline: 1px dashed #cfdad4; outline-offset: -1px; }
.envelope { position: relative; width: 9.5in; height: 4.125in; box-sizing: border-box; overflow: hidden; page-break-after: always; break-after: page; color: #000; }
.env-return { position: absolute; top: 0.4in; left: 0.5in; font-size: 10.5pt; line-height: 1.3; }
.env-to { position: absolute; top: 1.85in; left: 4.1in; font-size: 14pt; line-height: 1.35; }
@media print {
    html, body { background: #fff !important; margin: 0; padding: 0; }
    .print-hide { display: none !important; }
    .print-scroll { overflow: visible; padding: 0; }
    .print-page .sheet, .print-page .envelope { margin: 0; box-shadow: none; }
    .label:not(.label-blank) { outline: none; }
    .sheet:last-child, .envelope:last-child { page-break-after: auto; break-after: auto; }
}

/* 15. Season note, "two ways to take part", nominations */
.season-note { background: #fbeff0; border-bottom: 1px solid #f1d3d6; text-align: center; padding: 18px 0; }
.season-note p { margin: 0 auto; max-width: 760px; font-size: 1.05rem; color: var(--red-dark); font-weight: 600; line-height: 1.5; }

.ways { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 32px; }
.way {
    background: var(--paper);
    border: 1px solid var(--line);
    border-top: 5px solid var(--green);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px 26px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.way-surprise { border-top-color: var(--red); }
.way h3 { margin-bottom: 0.4em; }
.way p { color: var(--muted); flex: 1; }
.way .btn { margin-top: 6px; }
.way-surprise .btn-primary { background: var(--red); }
.way-surprise .btn-primary:hover { background: var(--red-dark); }

.ways-note { text-align: center; margin: 28px 0 0; color: var(--muted); }
.ways-note a { font-weight: 600; }

.form-subhead { margin: 4px 0 18px; padding-bottom: 8px; border-bottom: 2px solid var(--line); color: var(--green-dark); }
.form-subhead:not(:first-of-type) { margin-top: 30px; }

.nom-table td, .nom-table th { vertical-align: top; }
.badge { display: inline-block; font-size: 0.8rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: #e8efea; color: var(--green-deep); }
.badge-pending { background: #fff3d6; color: #7a5a00; }
.badge-approved { background: #dff3e6; color: var(--green-deep); }
.badge-declined, .badge-optout { background: #fbecee; color: var(--red-dark); }
.badge-unconfirmed { background: #eceff0; color: var(--muted); }

@media (max-width: 760px) {
    .ways { grid-template-columns: 1fr; }
    .way .btn { width: 100%; }
}
