
:root{
  --black:#0a0a0a;
  --black-soft:#161616;
  --gold:#d4a017;
  --gold-light:#f0c14b;
  --gold-dark:#a9790e;
  --cream:#f8f6ef;
  --text:#1a1a1a;
  --gray:#666666;
  --white:#ffffff;
  --radius:10px;
  --shadow:0 4px 16px rgba(0,0,0,0.15);
}
*{box-sizing:border-box;margin:0;padding:0;}
body{font-family:'Segoe UI',system-ui,-apple-system,sans-serif;color:var(--text);background:var(--cream);line-height:1.6;}
a{color:inherit;text-decoration:none;}
img{max-width:100%;display:block;}
.container{max-width:1140px;margin:0 auto;padding:0 24px;}

/* HEADER */
header{background:var(--black);color:var(--gold-light);position:sticky;top:0;z-index:100;box-shadow:var(--shadow);border-bottom:2px solid var(--gold);}
.navbar{display:flex;align-items:center;justify-content:space-between;padding:10px 24px;max-width:1140px;margin:0 auto;}
.logo{display:flex;align-items:center;gap:12px;font-weight:700;font-size:1.2rem;color:var(--gold-light);}
.logo img{height:52px;width:52px;border-radius:50%;object-fit:cover;border:2px solid var(--gold);}
.logo span.tag{font-size:0.68rem;font-weight:400;color:#c9c9c9;display:block;}
.nav-links{display:flex;gap:26px;font-weight:500;flex-wrap:wrap;}
.nav-links a{padding:6px 4px;border-bottom:2px solid transparent;transition:.2s;color:#eee;}
.nav-links a:hover,.nav-links a.active{border-bottom:2px solid var(--gold);color:var(--gold-light);}
.menu-toggle{display:none;background:none;border:none;color:var(--gold-light);font-size:1.6rem;cursor:pointer;}
@media(max-width:820px){
  .nav-links{display:none;flex-direction:column;position:absolute;top:72px;left:0;right:0;background:var(--black);padding:16px 24px;gap:14px;border-bottom:2px solid var(--gold);}
  .nav-links.open{display:flex;}
  .menu-toggle{display:block;}
}

/* HERO */
.hero{background:linear-gradient(135deg,var(--black) 0%,var(--black-soft) 60%,#2b2100 100%);color:var(--white);padding:80px 0 64px;text-align:center;border-bottom:3px solid var(--gold);}
.hero h1{font-size:2.4rem;margin-bottom:14px;color:var(--gold-light);}
.hero p{max-width:700px;margin:0 auto 28px;font-size:1.1rem;color:#e5e0d0;}
.btn{display:inline-block;background:var(--gold);color:var(--black);padding:12px 28px;border-radius:var(--radius);font-weight:700;transition:.2s;border:none;cursor:pointer;font-size:1rem;}
.btn:hover{background:var(--gold-light);transform:translateY(-2px);}
.btn-outline{background:transparent;border:2px solid var(--gold);color:var(--gold-light);}
.btn-outline:hover{background:var(--gold);color:var(--black);}
.hero-btns{display:flex;gap:16px;justify-content:center;flex-wrap:wrap;}

/* SECTIONS */
section{padding:64px 0;}
.section-title{text-align:center;margin-bottom:12px;font-size:2rem;color:var(--black);}
.section-title::after{content:"";display:block;width:60px;height:3px;background:var(--gold);margin:10px auto 0;}
.section-sub{text-align:center;color:var(--gray);max-width:640px;margin:0 auto 40px;}
.alt{background:#111111;color:#e8e4d8;}
.alt .section-title{color:var(--gold-light);}
.alt .section-sub{color:#bdb9ac;}
.alt table{color:var(--text);}

/* CARDS GRID */
.grid{display:grid;gap:24px;}
.grid-2{grid-template-columns:repeat(2,1fr);}
.grid-3{grid-template-columns:repeat(3,1fr);}
.grid-4{grid-template-columns:repeat(4,1fr);}
@media(max-width:900px){.grid-3,.grid-4{grid-template-columns:repeat(2,1fr);}}
@media(max-width:600px){.grid-2,.grid-3,.grid-4{grid-template-columns:1fr;}}

.card{background:var(--white);border-radius:var(--radius);box-shadow:var(--shadow);padding:28px;transition:.2s;border-top:3px solid var(--gold);}
.card:hover{transform:translateY(-4px);}
.card h3{color:var(--black);margin-bottom:10px;font-size:1.2rem;}
.card .icon{font-size:2rem;margin-bottom:12px;}
.badge{display:inline-block;background:var(--black);color:var(--gold-light);font-size:0.75rem;padding:4px 10px;border-radius:20px;margin-bottom:8px;border:1px solid var(--gold);}

/* STATS */
.stats{display:flex;justify-content:space-around;flex-wrap:wrap;gap:24px;text-align:center;}
.stat h2{font-size:2.2rem;color:var(--gold);}
.stat p{color:#cfcfcf;font-size:0.95rem;}
section:not(.alt) .stat p{color:var(--gray);}

/* TABLE */
table{width:100%;border-collapse:collapse;background:white;border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);}
th,td{padding:14px 16px;text-align:left;border-bottom:1px solid #eee;}
th{background:var(--black);color:var(--gold-light);}
tr:hover{background:#faf6e8;}

/* FORM */
.form-box{background:white;border-radius:var(--radius);box-shadow:var(--shadow);padding:32px;max-width:640px;margin:0 auto;border:1px solid var(--gold);}
label{display:block;font-weight:600;margin:14px 0 6px;font-size:0.9rem;}
input,select,textarea{width:100%;padding:10px 12px;border:1px solid #ccc;border-radius:6px;font-size:1rem;font-family:inherit;}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--gold);}
textarea{min-height:90px;}
/* Side-by-side inputs (city / state / ZIP), stacking on narrow screens. */
.field-row{display:grid;grid-template-columns:2fr 1fr 1fr;gap:12px;}
@media(max-width:520px){.field-row{grid-template-columns:1fr;}}

/* CALENDAR */
.cal-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px;}
.cal-header button{background:var(--black);color:var(--gold-light);border:1px solid var(--gold);padding:8px 14px;border-radius:6px;cursor:pointer;font-size:1rem;}
.cal-header button:hover{background:var(--gold);color:var(--black);}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;}
.cal-day-label{text-align:center;font-weight:700;color:var(--black);padding:6px 0;font-size:0.85rem;}
.cal-cell{background:white;border-radius:8px;min-height:90px;padding:6px;font-size:0.8rem;box-shadow:0 1px 4px rgba(0,0,0,0.06);position:relative;border:1px solid #eee;}
.cal-cell.empty{background:transparent;box-shadow:none;border:none;}
.cal-date{font-weight:700;color:var(--gray);}
.cal-event{margin-top:4px;background:var(--black);color:var(--gold-light);border-radius:4px;padding:2px 5px;font-size:0.7rem;margin-bottom:2px;}
.cal-event.charity{background:var(--gold);color:var(--black);}
.cal-event.mentor{background:#2b2b2b;color:var(--gold-light);}
.legend{display:flex;gap:16px;margin-top:16px;flex-wrap:wrap;font-size:0.85rem;}
.legend span{display:flex;align-items:center;gap:6px;}
.dot{width:12px;height:12px;border-radius:50%;display:inline-block;}
.cal-date-row{display:flex;justify-content:space-between;align-items:center;}
.cal-add{border:none;background:transparent;color:var(--gold-dark);font-size:1rem;line-height:1;font-weight:700;cursor:pointer;opacity:0;transition:.15s;padding:0 2px;}
.cal-cell:hover .cal-add{opacity:1;}
.cal-add:hover{color:var(--black);}
.cal-event{cursor:pointer;}
.cal-event:hover{filter:brightness(1.08);}
.cal-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:22px;}
.gcal-status{margin-top:12px;font-size:0.9rem;color:var(--gray);background:#faf4e2;border:1px solid var(--gold);border-radius:var(--radius);padding:10px 14px;}
.gcal-status.error{color:#b3261e;background:#fbeceb;border-color:#e5b3af;}
#gcal-sync:disabled{opacity:.6;cursor:default;transform:none;}

/* CALENDAR — month / week / day views */
.cal-header{flex-wrap:wrap;gap:12px;}
.cal-nav{display:flex;gap:8px;flex-wrap:wrap;}
/* Segmented month/week/day switcher. These rules follow `.cal-header button`
   on purpose so the selected segment keeps its gold fill. */
.cal-views{display:flex;border:1px solid var(--gold);border-radius:6px;overflow:hidden;}
.cal-views button{background:var(--white);color:var(--black);border:none;border-left:1px solid var(--gold);border-radius:0;padding:8px 16px;font-size:0.9rem;}
.cal-views button:first-child{border-left:none;}
.cal-views button:hover{background:var(--gold-light);color:var(--black);}
.cal-views button.active{background:var(--gold);color:var(--black);font-weight:700;}
/* Today's box, in whichever view is showing. */
.cal-cell.today{border-color:var(--gold);box-shadow:inset 0 0 0 2px var(--gold-light);}
.cal-cell.today .cal-date{color:var(--gold-dark);}
/* A single week has one row of boxes, so they can be much taller. */
.cal-grid.week .cal-cell{min-height:190px;}
/* Day view: one agenda panel rather than a grid of boxes. */
.cal-grid.day{grid-template-columns:1fr;}
.cal-day-panel{background:white;border-radius:8px;border:1px solid #eee;box-shadow:0 1px 4px rgba(0,0,0,0.06);padding:18px;}
.cal-day-panel.today{border-color:var(--gold);}
.cal-day-panel-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;border-bottom:2px solid var(--gold);padding-bottom:10px;margin-bottom:14px;}
.cal-day-panel-head h3{color:var(--black);font-size:1.05rem;}
.cal-day-empty{color:var(--gray);font-size:0.9rem;}
.cal-day-item{display:flex;flex-direction:column;gap:2px;width:100%;text-align:left;border:none;border-left:4px solid var(--gold);background:#faf7ef;border-radius:6px;padding:10px 12px;margin-bottom:8px;cursor:pointer;font-family:inherit;}
.cal-day-item:hover{background:#f3ecd9;}
.cal-day-item.mentor{border-left-color:#2b2b2b;background:#f4f4f4;}
.cal-day-item.mentor:hover{background:#ebebeb;}
.cal-day-item-title{font-weight:700;color:var(--black);font-size:0.95rem;}
.cal-day-item-meta{color:var(--gray);font-size:0.8rem;}
/* Seven tall boxes side by side don't fit a phone, so the week stacks. Each box
   already names its own date, making the weekday header row redundant. */
@media(max-width:700px){
  .cal-grid.week{grid-template-columns:1fr;}
  .cal-grid.week .cal-day-label{display:none;}
  .cal-grid.week .cal-cell{min-height:0;}
  .cal-grid.week .cal-add{opacity:1;}
}

/* CALENDAR — drag an event onto another day to reschedule it */
/* Event chips are buttons so they can be reached by keyboard; they still need to
   look like flat labels rather than form controls. */
.cal-event{display:block;width:100%;text-align:left;border:none;font-family:inherit;font-size:0.7rem;line-height:1.35;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;touch-action:manipulation;}
.cal-grid.month .cal-event{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.cal-day-item{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;touch-action:manipulation;}
/* While a drag is live: no text selection, no scroll-by-touch, grab cursor. */
html.cal-dragging{cursor:grabbing;-webkit-user-select:none;user-select:none;touch-action:none;}
html.cal-dragging .cal-event,html.cal-dragging .cal-day-item{cursor:grabbing;}
.cal-drag-source{opacity:.35;}
/* The chip that follows the pointer. Positioned at the origin and moved with a
   transform, and transparent to hit-testing so the day underneath is found. */
.cal-drag-ghost{position:fixed;top:0;left:0;z-index:500;pointer-events:none;max-width:230px;padding:6px 10px;border-radius:6px;background:var(--black);color:var(--gold-light);font-size:0.78rem;font-weight:700;box-shadow:0 10px 26px rgba(0,0,0,.35);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.cal-drag-ghost.charity{background:var(--gold);color:var(--black);}
.cal-drag-ghost.mentor{background:#2b2b2b;color:var(--gold-light);}
/* The day being hovered over, and the Prev / Next button about to page. */
.cal-drop-target{outline:2px dashed var(--gold-dark);outline-offset:-2px;background:#fffcef;}
.cal-cell.cal-drop-target,.cal-day-panel.cal-drop-target{box-shadow:0 0 0 3px var(--gold-light);}
.cal-nav-armed{background:var(--gold)!important;color:var(--black)!important;}
.cal-hint{margin-top:14px;color:var(--gray);font-size:0.88rem;line-height:1.55;}
.cal-hint strong{color:var(--black);}
.cal-hint kbd{background:#fff;border:1px solid #ccc;border-bottom-width:2px;border-radius:4px;padding:1px 5px;font-family:inherit;font-size:0.82em;}
.cal-status{margin-top:12px;font-size:0.9rem;color:var(--black);background:#faf4e2;border:1px solid var(--gold);border-radius:var(--radius);padding:10px 14px;}
.cal-status:empty{display:none;}
.cal-status.error{color:#b3261e;background:#fbeceb;border-color:#e5b3af;}

/* CALENDAR — archive + modal */
.archive-section{margin-top:28px;}
.archive-table{width:100%;border-collapse:collapse;}
.archive-table th{background:var(--black);color:var(--gold-light);text-align:left;padding:10px;}
.archive-table td{padding:10px;border-bottom:1px solid #eee;vertical-align:middle;}
.mini-btn{border:1px solid var(--gold);background:var(--black);color:var(--gold-light);padding:5px 10px;border-radius:6px;cursor:pointer;font-size:0.8rem;margin-right:6px;}
.mini-btn:hover{background:var(--gold);color:var(--black);}
.mini-btn.danger{border-color:#b3261e;background:#fff;color:#b3261e;}
.mini-btn.danger:hover{background:#b3261e;color:#fff;}
.modal{display:none;position:fixed;inset:0;background:rgba(0,0,0,0.6);z-index:200;align-items:center;justify-content:center;padding:20px;}
.modal.open{display:flex;}
.modal-box{background:#fff;border-radius:var(--radius);box-shadow:var(--shadow);padding:28px;width:100%;max-width:460px;border-top:4px solid var(--gold);max-height:90vh;overflow-y:auto;}
.modal-box label{display:block;margin:14px 0 4px;font-weight:600;font-size:0.9rem;color:var(--black);}
.modal-box input,.modal-box select{width:100%;padding:10px;border:1px solid #ccc;border-radius:6px;font-size:0.95rem;}
.modal-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-top:22px;}
.form-error{color:#b3261e;font-size:0.85rem;margin-top:10px;min-height:1em;}

/* GALLERY */
.gallery-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;}
@media(max-width:900px){.gallery-grid{grid-template-columns:repeat(2,1fr);}}
.gallery-item{position:relative;border-radius:var(--radius);overflow:hidden;cursor:pointer;aspect-ratio:1/1;background:#222;display:flex;align-items:center;justify-content:center;color:var(--gold-light);font-weight:700;text-align:center;padding:10px;font-size:0.9rem;border:2px solid var(--gold-dark);}
.gallery-item span.tag2{position:absolute;bottom:8px;left:8px;background:rgba(0,0,0,0.7);color:var(--gold-light);padding:3px 8px;border-radius:4px;font-size:0.7rem;}
.lightbox{position:fixed;inset:0;background:rgba(0,0,0,0.9);display:none;align-items:center;justify-content:center;z-index:999;flex-direction:column;}
.lightbox.open{display:flex;}
.lightbox-content{max-width:80%;max-height:70%;background:#333;border-radius:8px;display:flex;align-items:center;justify-content:center;color:var(--gold-light);font-size:1.4rem;width:500px;height:350px;border:2px solid var(--gold);}
.lightbox-close{position:absolute;top:20px;right:30px;color:var(--gold-light);font-size:2rem;cursor:pointer;}
.lightbox-images{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;max-width:90%;max-height:75%;overflow-y:auto;padding:6px;}
.lightbox-images img{width:100%;height:180px;object-fit:cover;border-radius:8px;border:2px solid var(--gold);cursor:zoom-in;transition:transform 0.15s ease;}
.lightbox-images img:hover{transform:scale(1.03);}
@media(max-width:900px){.lightbox-images{grid-template-columns:repeat(2,1fr);}.lightbox-images img{height:140px;}}
.image-zoom{position:fixed;inset:0;background:rgba(0,0,0,0.95);display:none;align-items:center;justify-content:center;z-index:1000;cursor:zoom-out;}
.image-zoom.open{display:flex;}
.image-zoom img{max-width:92%;max-height:92%;object-fit:contain;border-radius:8px;border:2px solid var(--gold);cursor:default;box-shadow:0 0 40px rgba(0,0,0,0.6);}

/* INVOICE */
.invoice-preview{background:white;padding:36px;border-radius:var(--radius);box-shadow:var(--shadow);margin-top:30px;border:1px solid var(--gold);}
.invoice-header{display:flex;justify-content:space-between;border-bottom:3px solid var(--black);padding-bottom:16px;margin-bottom:16px;}
.invoice-header h2{color:var(--black);}
.invoice-table{margin-top:16px;}
/* "Bill To" block on the generated invoice: name, service address and phone.
   Empty lines are hidden from JS so a partly-filled address doesn't leave gaps. */
.invoice-billto{margin-top:4px;font-size:0.95rem;line-height:1.5;}
.invoice-billto-label{font-size:0.75rem;letter-spacing:1px;text-transform:uppercase;color:var(--gray);margin-bottom:4px;}
.invoice-billto-name{font-weight:700;color:var(--black);}
.invoice-total{text-align:right;font-size:1.3rem;font-weight:700;color:var(--gold-dark);margin-top:12px;}
.print-btn{margin-top:20px;}
@media print{header,footer,.no-print{display:none !important;}}

/* FOOTER */
footer{background:var(--black);color:#c9c9c9;padding:40px 0 20px;text-align:center;font-size:0.9rem;border-top:2px solid var(--gold);}
footer a{color:var(--gold-light);}
.footer-logo{height:60px;width:60px;border-radius:50%;object-fit:cover;border:2px solid var(--gold);margin:0 auto 16px;}
.footer-links{display:flex;gap:20px;justify-content:center;margin-bottom:16px;flex-wrap:wrap;}

/* TIMELINE for tracks */
.track{display:flex;gap:20px;align-items:flex-start;background:white;border-radius:var(--radius);box-shadow:var(--shadow);padding:24px;margin-bottom:20px;border-left:4px solid var(--gold);}
.track .num{background:var(--black);color:var(--gold-light);font-weight:700;width:42px;height:42px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0;border:2px solid var(--gold);}
.progress-bar{background:#e0e0e0;border-radius:20px;height:20px;overflow:hidden;margin-top:8px;}
.progress-fill{background:var(--gold);height:100%;color:var(--black);font-size:0.75rem;display:flex;align-items:center;justify-content:center;font-weight:700;}


/* READABILITY TWEAKS */
body{font-size:17px;}
.card p{font-size:1rem;color:#333;line-height:1.65;}
.card h3{font-size:1.25rem;}
.section-sub{font-size:1.05rem;color:#555;}
.alt .section-sub{color:#d4d0c2;font-size:1.05rem;}
.stat p{font-size:1rem;font-weight:500;}
section:not(.alt) .stat p{color:#444;}
.hero p{font-size:1.15rem;color:#f0ece0;}
.gallery-item{font-size:1rem;font-weight:700;}
.gallery-item span.tag2{font-size:0.78rem;padding:4px 10px;}
table{font-size:1rem;}
th,td{padding:16px 18px;}
.track p{font-size:1rem;color:#333;line-height:1.65;}
.badge{font-size:0.8rem;padding:5px 12px;}
label{font-size:0.95rem;}
input,select,textarea{font-size:1.05rem;}
.progress-bar{height:26px;}
.progress-fill{font-size:0.85rem;font-weight:800;}
.progress-label{font-size:0.9rem;color:var(--gray);margin-top:6px;font-weight:600;}

/* ADMIN — report generator */
.report-controls{text-align:left;}
.report-type-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin-bottom:20px;}
@media(max-width:520px){.report-type-grid{grid-template-columns:1fr;}}
.report-type{display:flex;align-items:center;gap:10px;background:var(--cream);border:2px solid #e2ddca;border-radius:var(--radius);padding:14px 16px;font-weight:700;font-size:0.98rem;color:var(--black);cursor:pointer;transition:.15s;text-align:left;}
.report-type:hover{border-color:var(--gold);}
.report-type.active{border-color:var(--gold);background:#fff;box-shadow:0 0 0 2px var(--gold-light) inset;}
.report-type .rt-icon{font-size:1.3rem;}
.report-range{display:grid;grid-template-columns:1fr 1fr;gap:16px;}
@media(max-width:520px){.report-range{grid-template-columns:1fr;}}
.report-hint{color:var(--gray);font-size:0.85rem;margin:8px 0 4px;}

/* ADMIN — record tabs & tables */
.record-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:22px;justify-content:center;}
.record-tab{background:transparent;border:2px solid var(--gold);color:var(--gold-light);padding:10px 18px;border-radius:var(--radius);font-weight:700;cursor:pointer;font-size:0.95rem;transition:.15s;}
.record-tab:hover{background:var(--gold-dark);color:var(--black);}
.record-tab.active{background:var(--gold);color:var(--black);}
.panel-head{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:16px;}
.panel-head h3{color:var(--gold-light);font-size:1.3rem;}
.record-empty{color:#cfcbbd;padding:16px 0;}
.table-wrap{overflow-x:auto;border-radius:var(--radius);box-shadow:var(--shadow);}
.record-table{width:100%;border-collapse:collapse;background:#fff;color:var(--text);min-width:640px;}
.record-table th{background:var(--black);color:var(--gold-light);text-align:left;padding:12px 14px;font-size:0.92rem;}
.record-table td{padding:12px 14px;border-bottom:1px solid #eee;font-size:0.95rem;vertical-align:middle;}
.record-table td small{color:var(--gray);}
.pill{display:inline-block;background:#eee;color:#333;font-size:0.75rem;font-weight:700;padding:3px 10px;border-radius:20px;}
.pill-gold{background:var(--gold);color:var(--black);}
.field-row{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.checkbox-label{display:flex;align-items:flex-start;gap:8px;font-weight:500;margin-top:14px;line-height:1.3;}
.checkbox-label input{width:auto;margin-top:3px;}

/* ADMIN — customer contacts */
.record-filters{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:14px;}
.record-filters input,.record-filters select{width:auto;flex:1 1 240px;max-width:340px;}
.record-filters select{flex:0 0 auto;}
.field-row.three{grid-template-columns:2fr 1fr 1fr;}
.contact-line{display:block;line-height:1.45;}
.contact-line a{color:#1a1a1a;border-bottom:1px solid var(--gold);text-decoration:none;}
.contact-line a:hover{color:var(--gold-dark);}
.contact-none{color:var(--gray);}
@media(max-width:520px){.field-row.three{grid-template-columns:1fr;}}

/* ADMIN — report output sheet */
.report-toolbar{display:flex;gap:12px;flex-wrap:wrap;margin:24px 0;}
.report-sheet{background:#fff;color:#1a1a1a;border-radius:var(--radius);box-shadow:var(--shadow);padding:44px;border-top:5px solid var(--gold);}
.report-head{display:flex;justify-content:space-between;gap:24px;flex-wrap:wrap;border-bottom:3px solid var(--black);padding-bottom:18px;margin-bottom:22px;}
.report-brand{display:flex;align-items:center;gap:14px;}
.report-brand img{height:64px;width:64px;border-radius:50%;object-fit:cover;border:2px solid var(--gold);}
.report-brand h2{color:var(--black);font-size:1.4rem;}
.report-brand p{color:var(--gray);font-size:0.82rem;line-height:1.4;}
.report-meta{text-align:right;}
.report-meta h3{color:var(--gold-dark);font-size:1.15rem;margin-bottom:8px;}
.report-meta p{font-size:0.88rem;color:#333;}
.report-intro{color:#444;margin-bottom:22px;font-size:0.98rem;}
.report-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:26px;}
@media(max-width:600px){.report-stats{grid-template-columns:repeat(2,1fr);}}
.report-stat{background:var(--cream);border-radius:var(--radius);padding:16px;text-align:center;border:1px solid #ece7d5;}
.rs-num{display:block;font-size:1.6rem;font-weight:800;color:var(--gold-dark);}
.rs-label{display:block;font-size:0.82rem;color:var(--gray);margin-top:4px;}
.report-subhead{color:var(--black);font-size:1.05rem;margin:24px 0 10px;padding-bottom:6px;border-bottom:2px solid var(--gold);}
.report-table{width:100%;border-collapse:collapse;box-shadow:none;font-size:0.9rem;}
.report-table th{background:#f2eede;color:var(--black);text-align:left;padding:10px 12px;border-bottom:2px solid var(--gold);}
.report-table td{padding:9px 12px;border-bottom:1px solid #eee;}
.report-table .report-total-row td{font-weight:800;background:#faf6e8;border-top:2px solid var(--gold-dark);}
.report-none{color:var(--gray);font-style:italic;padding:6px 0 14px;}
.report-narrative{width:100%;min-height:120px;border:1px solid #ccc;border-radius:6px;padding:12px;font-family:inherit;font-size:0.95rem;margin-bottom:8px;}
.report-cert{margin-top:28px;font-size:0.88rem;color:#333;}
.report-sign{display:flex;justify-content:space-between;gap:40px;margin-top:44px;}
.report-sign div{flex:1;border-top:1px solid #333;padding-top:6px;font-size:0.82rem;color:var(--gray);}

@media print{
  body{background:#fff;font-size:12pt;}
  .report-sheet{box-shadow:none;border-top:none;padding:0;}
  section{padding:0;}
  .report-stat{border:1px solid #ccc;}
}

/* ---- Community care chatbot ---- */
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important;}
.mpl-chat{--chat-ink:#171914;--chat-green:#415f3b;--chat-green-dark:#2f482c;--chat-paper:#fbf8ec;--chat-line:#ded8c5;position:fixed;right:22px;bottom:22px;z-index:1000;font-family:Georgia,'Times New Roman',serif;}
.mpl-chat svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
.mpl-chat__launcher{display:flex;align-items:center;gap:10px;min-height:56px;padding:0 19px;border:1px solid rgba(255,255,255,.16);border-radius:18px;background:var(--chat-ink);color:#f4d273;box-shadow:0 16px 42px rgba(10,10,10,.28);font:700 .92rem 'Segoe UI',sans-serif;letter-spacing:.02em;cursor:pointer;transition:transform .2s ease,background .2s ease,box-shadow .2s ease;}
.mpl-chat__launcher:hover{background:#25281f;transform:translateY(-3px);box-shadow:0 20px 50px rgba(10,10,10,.34);}
.mpl-chat__launcher:focus-visible,.mpl-chat button:focus-visible,.mpl-chat textarea:focus-visible,.mpl-chat a:focus-visible{outline:3px solid #f0c14b;outline-offset:3px;}
.mpl-chat__launcher-icon{display:grid;place-items:center;}
.mpl-chat__panel{position:absolute;right:0;bottom:0;display:grid;grid-template-rows:auto minmax(190px,1fr) auto auto auto auto;width:min(390px,calc(100vw - 32px));height:min(620px,calc(100dvh - 38px));padding:0;overflow:hidden;border:1px solid rgba(23,25,20,.14);border-radius:24px;background:var(--chat-paper);box-shadow:0 28px 80px rgba(10,10,10,.32);opacity:0;visibility:hidden;transform:translateY(18px) scale(.96);transform-origin:bottom right;transition:opacity .2s ease,transform .2s ease,visibility .2s;}
.mpl-chat.is-open .mpl-chat__panel{opacity:1;visibility:visible;transform:translateY(0) scale(1);}
.mpl-chat.is-open .mpl-chat__launcher{opacity:0;visibility:hidden;pointer-events:none;}
.mpl-chat__header{position:static;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:18px 18px 17px;background:var(--chat-ink);color:#fff;border-bottom:3px solid #c89c2a;box-shadow:none;}
.mpl-chat__identity{display:flex;align-items:center;gap:12px;min-width:0;}
.mpl-chat__mark{display:grid;place-items:center;width:43px;height:43px;flex:0 0 auto;border:1px solid #d7b75c;border-radius:50%;color:#f4d273;font:700 .72rem 'Segoe UI',sans-serif;letter-spacing:.12em;}
.mpl-chat__header h2{margin:0;color:#fff;font-size:1.04rem;line-height:1.15;letter-spacing:.01em;}
.mpl-chat__header p{display:flex;align-items:center;gap:6px;margin:5px 0 0;color:#c9caba;font:500 .72rem 'Segoe UI',sans-serif;}
.mpl-chat__status-dot{width:7px;height:7px;border-radius:50%;background:#8dac75;box-shadow:0 0 0 3px rgba(141,172,117,.14);}
.mpl-chat__close{display:grid;place-items:center;width:38px;height:38px;flex:0 0 auto;border:0;border-radius:50%;background:rgba(255,255,255,.08);color:#eee;cursor:pointer;transition:background .2s ease,transform .2s ease;}
.mpl-chat__close:hover{background:rgba(255,255,255,.16);transform:rotate(4deg);}
.mpl-chat__messages{min-height:0;overflow-y:auto;padding:21px 17px 12px;scrollbar-width:thin;scrollbar-color:#c5bea8 transparent;background-image:radial-gradient(circle at 12% 5%,rgba(196,156,49,.08),transparent 28%),linear-gradient(rgba(65,95,59,.035) 1px,transparent 1px);background-size:auto,100% 28px;}
.mpl-chat__message{display:flex;align-items:flex-end;gap:8px;margin-bottom:14px;animation:mpl-message-in .28s ease both;}
.mpl-chat__message--user{justify-content:flex-end;padding-left:42px;}
.mpl-chat__message--bot{padding-right:28px;}
.mpl-chat__avatar{display:grid;place-items:center;width:27px;height:27px;flex:0 0 auto;border-radius:50%;background:var(--chat-green);color:#fff;font:700 .72rem 'Segoe UI',sans-serif;}
.mpl-chat__bubble{max-width:100%;padding:11px 13px;border:1px solid var(--chat-line);border-radius:15px 15px 15px 4px;background:#fff;color:var(--chat-ink);box-shadow:0 5px 14px rgba(23,25,20,.06);}
.mpl-chat__message--user .mpl-chat__bubble{border-color:var(--chat-green);border-radius:15px 15px 4px 15px;background:var(--chat-green);color:#fff;}
.mpl-chat__bubble p{margin:0;font:400 .9rem/1.5 'Segoe UI',sans-serif;}
.mpl-chat__bubble a{display:inline-flex;align-items:center;margin-top:9px;color:var(--chat-green-dark);font:700 .8rem 'Segoe UI',sans-serif;text-decoration:underline;text-decoration-color:#c5a64b;text-underline-offset:3px;}
.mpl-chat__typing{display:flex;align-items:center;gap:4px;padding:13px 15px;border:1px solid var(--chat-line);border-radius:15px 15px 15px 4px;background:#fff;}
.mpl-chat__typing i{width:6px;height:6px;border-radius:50%;background:#7d826f;animation:mpl-typing 1s ease-in-out infinite;}
.mpl-chat__typing i:nth-child(2){animation-delay:.14s;}.mpl-chat__typing i:nth-child(3){animation-delay:.28s;}
.mpl-chat__suggestions{display:flex;gap:7px;overflow-x:auto;padding:2px 17px 11px;scrollbar-width:none;}
.mpl-chat__suggestions::-webkit-scrollbar{display:none;}
.mpl-chat__suggestions button{flex:0 0 auto;padding:8px 11px;border:1px solid #b9b197;border-radius:999px;background:transparent;color:#3b4936;font:700 .73rem 'Segoe UI',sans-serif;cursor:pointer;transition:background .2s ease,border-color .2s ease;}
.mpl-chat__suggestions button:hover{border-color:var(--chat-green);background:#eef1e8;}
.mpl-chat__speech-status{min-height:19px;padding:0 18px;color:#5d634f;font:600 .7rem/1.35 'Segoe UI',sans-serif;}
.mpl-chat__form{display:grid;grid-template-columns:minmax(0,1fr) 42px 42px;align-items:end;gap:7px;margin:0 12px;padding:8px;border:1px solid #cfc8b4;border-radius:17px;background:#fff;box-shadow:0 5px 16px rgba(23,25,20,.07);}
.mpl-chat__form textarea{width:100%;max-height:112px;min-height:40px;padding:9px 7px;border:0;border-radius:8px;resize:none;background:transparent;color:var(--chat-ink);font:400 .9rem/1.4 'Segoe UI',sans-serif;}
.mpl-chat__form textarea:focus{outline:0;}
.mpl-chat__form textarea::placeholder{color:#7f8178;}
.mpl-chat__mic,.mpl-chat__send{display:grid;place-items:center;width:42px;height:42px;border:0;border-radius:13px;cursor:pointer;transition:transform .18s ease,background .18s ease;}
.mpl-chat__mic{background:#eeece3;color:#4d5747;}
.mpl-chat__mic:hover:not(:disabled){background:#e1e6d9;transform:translateY(-1px);}
.mpl-chat__mic.is-listening{background:#8c4b3d;color:#fff;animation:mpl-listening 1.3s ease-in-out infinite;}
.mpl-chat__mic:disabled{opacity:.38;cursor:not-allowed;}
.mpl-chat__send{background:var(--chat-green);color:#fff;}
.mpl-chat__send:hover{background:var(--chat-green-dark);transform:translateY(-1px);}
.mpl-chat__note{margin:7px 16px 11px;color:#77796f;text-align:center;font:500 .65rem 'Segoe UI',sans-serif;}
@keyframes mpl-message-in{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}
@keyframes mpl-typing{0%,60%,100%{opacity:.35;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}
@keyframes mpl-listening{0%,100%{box-shadow:0 0 0 0 rgba(140,75,61,.28)}50%{box-shadow:0 0 0 7px rgba(140,75,61,0)}}
@media(max-width:600px){
  .mpl-chat{right:12px;bottom:12px;}
  .mpl-chat__launcher{min-height:53px;padding:0 16px;border-radius:16px;}
  .mpl-chat__panel{position:fixed;inset:0;width:100%;height:100dvh;border:0;border-radius:0;transform:translateY(24px);transform-origin:center bottom;}
  .mpl-chat__header{padding-top:max(17px,env(safe-area-inset-top));}
  .mpl-chat__messages{padding-left:14px;padding-right:14px;}
  .mpl-chat__form{margin-left:10px;margin-right:10px;}
  .mpl-chat__note{margin-bottom:max(9px,env(safe-area-inset-bottom));}
}
@media(prefers-reduced-motion:reduce){
  .mpl-chat *{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;}
}

/* ---- Digital impact documentation: before/after photos, hours, feedback ----
   A charitable job is only grant-compliant once all four pieces of evidence are
   on file, so the UI's job is to make a gap obvious at a glance. */
.doc-flags{display:flex;flex-wrap:wrap;gap:4px;}
.doc-flag{font-size:0.72rem;font-weight:700;padding:2px 7px;border-radius:20px;white-space:nowrap;}
.doc-flag.ok{background:#e4f1e4;color:#1e6b2c;}
.doc-flag.missing{background:#f6ece9;color:#9a3b28;}
.doc-na{color:var(--gray);font-style:italic;}

/* The impact dialog is wider than the record forms so before and after sit side
   by side — the comparison is the whole point. */
.impact-box{max-width:780px;}
.impact-job{color:#444;font-size:0.92rem;margin:2px 0 14px;}
.impact-checklist{list-style:none;display:flex;flex-wrap:wrap;gap:6px 16px;margin:0 0 18px;padding:14px;background:var(--cream);border:1px solid #ece7d5;border-radius:var(--radius);}
.impact-checklist .ck{font-size:0.85rem;font-weight:600;color:#8a5a4a;}
.impact-checklist .ck.done{color:#1e6b2c;}
.impact-checklist .ck-summary{flex:1 1 100%;font-size:0.9rem;font-weight:800;color:var(--black);}
.impact-checklist .ck-summary.done{color:#1e6b2c;}
.impact-phases{display:grid;grid-template-columns:1fr 1fr;gap:16px;}
.impact-phase{border:1px solid #e6e2d2;border-radius:var(--radius);padding:14px;}
.impact-phase-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:10px;}
.impact-phase-head h4{color:var(--black);font-size:0.98rem;}
.photo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(88px,1fr));gap:8px;}
.photo-item{position:relative;margin:0;}
.photo-item img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;border:1px solid #ddd;border-radius:8px;}
.photo-del{position:absolute;top:4px;right:4px;width:24px;height:24px;border:0;border-radius:50%;background:rgba(0,0,0,0.62);color:#fff;font-size:0.72rem;line-height:1;cursor:pointer;}
.photo-del:hover{background:#b3261e;}
.photo-empty{grid-column:1/-1;margin:0;color:var(--gray);font-size:0.85rem;font-style:italic;}
/* The file input covers its label, so the whole dashed box is the drop target
   and the control still reaches the keyboard and screen readers. */
.photo-add{position:relative;display:block;overflow:hidden;margin-top:10px;padding:10px;border:2px dashed var(--gold);border-radius:8px;color:var(--gold-dark);font-weight:700;font-size:0.85rem;text-align:center;cursor:pointer;}
.photo-add:hover{background:var(--cream);}
.photo-add input{position:absolute;inset:0;width:100%;height:100%;padding:0;opacity:0;cursor:pointer;}
.photo-add:focus-within{outline:3px solid var(--gold-dark);outline-offset:2px;}

/* Impact evidence as it appears in a printed report. */
.report-body{margin-bottom:6px;color:#444;font-size:0.95rem;}
.doc-tag{display:inline-block;padding:2px 8px;border-radius:20px;font-size:0.75rem;font-weight:700;}
.doc-tag.ok{background:#e4f1e4;color:#1e6b2c;}
.doc-tag.missing{background:#f6ece9;color:#9a3b28;}
.impact-card{margin-bottom:18px;padding:18px;border:1px solid #e6e2d2;border-radius:var(--radius);break-inside:avoid;}
.impact-card-head{display:flex;justify-content:space-between;align-items:baseline;gap:12px;flex-wrap:wrap;margin-bottom:12px;padding-bottom:8px;border-bottom:1px solid #eee;}
.impact-card-head h5{color:var(--black);font-size:1rem;}
.impact-card-head span{color:var(--gray);font-size:0.82rem;}
.impact-facts{display:flex;flex-wrap:wrap;gap:8px 28px;margin:0 0 14px;}
.impact-facts dt{color:var(--gray);font-size:0.72rem;text-transform:uppercase;letter-spacing:0.04em;}
.impact-facts dd{margin:2px 0 0;color:var(--black);font-size:0.92rem;font-weight:700;}
.impact-pair{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
.impact-pair h6{margin-bottom:6px;color:var(--gold-dark);font-size:0.78rem;text-transform:uppercase;letter-spacing:0.06em;}
.impact-strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:8px;}
.impact-strip img{width:100%;aspect-ratio:4/3;object-fit:cover;border:1px solid #ddd;border-radius:8px;}
.impact-cap{display:block;color:var(--gray);font-size:0.75rem;}
.impact-quote{margin:14px 0 0;padding:12px 16px;background:var(--cream);border-left:4px solid var(--gold);border-radius:0 8px 8px 0;}
.impact-stars{color:var(--gold-dark);font-size:0.9rem;letter-spacing:2px;}
.impact-quote p{margin:0;color:#333;font-size:0.95rem;font-style:italic;}
.impact-quote cite{display:block;margin-top:6px;color:var(--gray);font-size:0.8rem;font-style:normal;}
@media(max-width:640px){
  .impact-phases,.impact-pair{grid-template-columns:1fr;}
}
@media print{
  /* Photographs and the feedback callout are the evidence — they have to survive
     the browser's default habit of dropping backgrounds and colour. */
  .impact-quote,.doc-tag,.impact-strip img{print-color-adjust:exact;-webkit-print-color-adjust:exact;}
  .impact-card{border-color:#ccc;}
  .impact-strip img{max-height:2.4in;}
  .impact-phases,.photo-add{display:none;}
}

/* ==========================================================================
   RESPONSIVE LAYER — phones, tablets, desktops and large displays
   Appended last on purpose: these rules refine the fixed sizes set above, so
   they need to win without every selector carrying !important.
   ========================================================================== */

/* One shared page width, widened on large monitors so a 27" display isn't
   mostly empty margin. */
:root{--container:1140px;}
@media(min-width:1500px){:root{--container:1280px;}}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;}
body{overflow-wrap:break-word;}
/* Padding grows with the viewport, so text never touches a phone's edge. */
.container{max-width:var(--container);padding:0 clamp(16px,4vw,24px);}
.navbar{max-width:var(--container);padding:10px clamp(16px,4vw,24px);}
/* Nothing may push the page sideways on a narrow screen. */
img,video,canvas,svg{max-width:100%;height:auto;}
:focus-visible{outline:3px solid var(--gold-dark);outline-offset:2px;}

/* Fluid type and spacing rather than one size per breakpoint. */
body{font-size:clamp(16px,0.55vw + 14.4px,17px);}
@media(min-width:1500px){body{font-size:17.5px;}}
section{padding:clamp(40px,6vw,64px) 0;}
.hero{padding:clamp(48px,8vw,80px) 0 clamp(40px,6vw,64px);}
.hero h1{font-size:clamp(1.65rem,4.6vw,2.4rem);}
.hero p{font-size:clamp(1rem,1.6vw,1.15rem);}
.section-title{font-size:clamp(1.45rem,3.6vw,2rem);}
.card{padding:clamp(20px,3vw,28px);}
.form-box{padding:clamp(20px,3.5vw,32px);}
h1,h2,h3{line-height:1.25;}

/* Header: the link row only fits on a wide screen, so tablets get the menu
   button too. The panel hangs off the bottom of the header itself, whatever
   height the logo gives it. */
@media(max-width:1000px){
  .menu-toggle{display:block;}
  .nav-links{display:none;flex-direction:column;position:absolute;top:100%;left:0;right:0;background:var(--black);padding:16px clamp(16px,4vw,24px);gap:4px;border-bottom:2px solid var(--gold);max-height:70dvh;overflow-y:auto;}
  .nav-links.open{display:flex;}
  .nav-links a{padding:12px 4px;border-bottom:1px solid #2a2a2a;}
  .nav-links a:hover,.nav-links a.active{border-bottom-color:var(--gold);}
}
.menu-toggle{min-width:44px;min-height:44px;line-height:1;border-radius:8px;}
@media(max-width:520px){
  .logo{font-size:1rem;gap:9px;}
  .logo img{height:42px;width:42px;}
  .logo span.tag{font-size:0.62rem;}
}

/* Comfortable touch targets on anything without a mouse. */
@media(hover:none){
  .btn{min-height:46px;}
  .mini-btn{min-height:38px;padding:8px 12px;}
  .cal-add{opacity:1;}          /* a hover-only "+" is invisible on a phone */
  .card:hover,.btn:hover{transform:none;}
}
.cal-add{min-width:28px;min-height:24px;}

/* Forms: iOS zooms the page in when a focused field is under 16px. */
@media(max-width:820px){
  input,select,textarea,.modal-box input,.modal-box select{font-size:16px;}
}
@media(max-width:560px){
  .field-row,.report-range,.report-type-grid{grid-template-columns:1fr;}
}

/* Tables are the usual cause of sideways scrolling: let the wrapper scroll
   instead of the page, and keep enough width to stay readable. */
.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;}
.table-wrap>table{min-width:460px;}
.table-wrap>.record-table{min-width:640px;}
th,td{padding:clamp(10px,1.5vw,18px);}
@media(max-width:600px){table{font-size:0.92rem;}}

/* Home / marketing sections */
@media(max-width:600px){
  .stats{display:grid;grid-template-columns:repeat(2,1fr);gap:18px;}
  .stat h2{font-size:1.8rem;}
  .track{flex-direction:column;gap:14px;padding:20px;}
}
@media(max-width:480px){
  .stats{grid-template-columns:1fr;}
  .hero-btns{flex-direction:column;align-items:stretch;}
  .hero-btns .btn{width:100%;text-align:center;}
}

/* Calendar: a seven-column month grid has to give up padding, not columns —
   dropping to fewer columns would stop being a month. */
@media(max-width:760px){
  .cal-header{flex-direction:column;align-items:stretch;gap:10px;}
  .cal-header #cal-label{text-align:center;font-size:1.2rem;order:-1;}
  .cal-nav{display:flex;}
  .cal-nav button{flex:1;padding:10px 6px;font-size:0.9rem;}
  .cal-views{width:100%;}
  .cal-views button{flex:1;padding:10px 6px;}
  .cal-actions .btn{flex:1 1 200px;}
}
@media(max-width:640px){
  .cal-grid{gap:4px;}
  .cal-cell{min-height:70px;padding:4px;border-radius:6px;}
  .cal-date{font-size:0.78rem;}
  .cal-day-label{font-size:0.68rem;padding:4px 0;}
  .cal-event{font-size:0.62rem;padding:2px 4px;}
  .cal-grid.week .cal-event{font-size:0.72rem;}
  .cal-drag-ghost{max-width:60vw;}
}
@media(max-width:400px){
  .cal-cell{min-height:60px;}
  .cal-event{font-size:0.58rem;}
}

/* Dialogs become bottom sheets on a phone: reachable by thumb, and clear of the
   home-screen gesture area. */
@media(max-width:560px){
  .modal{padding:0;align-items:flex-end;}
  .modal-box{max-width:none;border-radius:16px 16px 0 0;max-height:92dvh;padding:22px 18px calc(20px + env(safe-area-inset-bottom));}
  .modal-actions{gap:8px;}
  .modal-actions .btn,.modal-actions .mini-btn{flex:1 1 46%;text-align:center;margin-right:0;}
}

/* Invoices and reports print to paper but are read on phones. */
.invoice-header{flex-wrap:wrap;gap:16px;}
.invoice-preview{padding:clamp(20px,4vw,36px);}
.invoice-brand{display:flex;align-items:center;gap:14px;}
.invoice-brand img{height:60px;width:60px;border-radius:50%;object-fit:cover;border:2px solid var(--gold);}
.invoice-meta{text-align:right;}
@media(max-width:600px){.invoice-meta{text-align:left;}}
.report-sheet{padding:clamp(20px,4vw,44px);}
@media(max-width:600px){
  .report-meta{text-align:left;}
  .report-sign{flex-direction:column;gap:28px;}
}
@media(max-width:420px){.report-stats{grid-template-columns:1fr;}}

/* Gallery */
@media(max-width:520px){
  .gallery-grid{gap:10px;}
  .lightbox-content{width:100%;height:auto;aspect-ratio:4/3;}
  .lightbox-images{max-width:94%;gap:8px;}
  .lightbox-images img{height:118px;}
  .lightbox-close{top:10px;right:16px;}
}

/* The chat launcher is fixed over the bottom-right corner, so leave the footer
   links room to be tapped. */
@media(max-width:600px){
  footer{padding-bottom:92px;}
  .footer-links{gap:14px;}
}

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important;}
  .card:hover,.btn:hover{transform:none;}
  .pwa-prompt,.pwa-toast{transition:none!important;}
}

/* INSTALL PROMPT (PWA)
   Built by js/pwa.js. It sits bottom-left on desktop and above the chat
   launcher on phones so the two fixed elements never overlap. */
.pwa-prompt{position:fixed;left:16px;right:16px;bottom:94px;z-index:1001;display:flex;align-items:center;gap:14px;max-width:440px;padding:14px 16px;border:1px solid rgba(212,160,23,.5);border-left:4px solid var(--gold);border-radius:14px;background:var(--black);color:#f2efe6;box-shadow:0 18px 46px rgba(10,10,10,.4);font-size:.9rem;opacity:0;transform:translateY(14px);visibility:hidden;transition:opacity .25s ease,transform .25s ease,visibility .25s;}
.pwa-prompt.is-visible{opacity:1;transform:translateY(0);visibility:visible;}
.pwa-prompt__icon{width:46px;height:46px;flex:0 0 auto;border-radius:12px;border:1px solid rgba(212,160,23,.45);}
.pwa-prompt__text{flex:1;min-width:0;}
.pwa-prompt__title{display:block;font-weight:700;color:var(--gold-light);line-height:1.3;}
.pwa-prompt__body{display:block;margin-top:2px;color:#c9c5b8;font-size:.82rem;line-height:1.4;}
.pwa-prompt__actions{display:flex;align-items:center;gap:8px;flex:0 0 auto;}
.pwa-prompt__install{padding:9px 16px;border:none;border-radius:8px;background:var(--gold);color:var(--black);font-weight:700;font-size:.85rem;font-family:inherit;cursor:pointer;transition:background .2s ease;}
.pwa-prompt__install:hover{background:var(--gold-light);}
.pwa-prompt__close{display:grid;place-items:center;width:32px;height:32px;flex:0 0 auto;border:none;border-radius:50%;background:rgba(255,255,255,.08);color:#ddd;font-size:1.1rem;line-height:1;cursor:pointer;transition:background .2s ease;}
.pwa-prompt__close:hover{background:rgba(255,255,255,.18);}
.pwa-prompt :focus-visible{outline:3px solid var(--gold-light);outline-offset:2px;}
/* iOS has no install API, so that variant explains the Share-sheet steps and
   stacks its text instead of showing a button that could not do anything. */
.pwa-prompt.is-ios{flex-wrap:wrap;}
.pwa-prompt.is-ios .pwa-prompt__actions{margin-left:auto;}
.pwa-prompt__share{display:inline-block;padding:0 4px;color:var(--gold-light);font-weight:700;}
@media(min-width:601px){
  .pwa-prompt{left:22px;right:auto;bottom:22px;width:420px;}
}

/* Update toast — shown when a new deploy is waiting behind the service worker. */
.pwa-toast{position:fixed;left:50%;top:16px;z-index:1002;display:flex;align-items:center;gap:12px;padding:11px 14px;border:1px solid rgba(212,160,23,.5);border-radius:12px;background:var(--black);color:#f2efe6;box-shadow:0 14px 36px rgba(10,10,10,.4);font-size:.86rem;opacity:0;transform:translate(-50%,-14px);visibility:hidden;transition:opacity .25s ease,transform .25s ease,visibility .25s;}
.pwa-toast.is-visible{opacity:1;transform:translate(-50%,0);visibility:visible;}
.pwa-toast__reload{padding:7px 13px;border:none;border-radius:8px;background:var(--gold);color:var(--black);font-weight:700;font-size:.82rem;font-family:inherit;cursor:pointer;}
.pwa-toast__reload:hover{background:var(--gold-light);}

/* In standalone mode there is no browser chrome, so the sticky header needs to
   clear the status bar / notch itself. */
@media(display-mode:standalone){
  header{padding-top:env(safe-area-inset-top);}
  footer{padding-bottom:calc(92px + env(safe-area-inset-bottom));}
}

.footer-install{margin:18px 0 6px;}
/* Already installed — offering it again would only confuse. */
.pwa-standalone .footer-install{display:none;}


/* ==========================================================================
   Sharing
   ========================================================================== */

/* The nav share button sits next to the menu toggle so it stays reachable with
   a thumb on a phone, where the OS share sheet is what actually opens. */
.nav-share{display:grid;place-items:center;width:38px;height:38px;margin-left:auto;border:1px solid var(--gold);border-radius:50%;background:transparent;color:var(--gold-light);font-size:1rem;line-height:1;font-family:inherit;cursor:pointer;transition:.2s;}
.nav-share:hover{background:var(--gold);color:var(--black);}
.navbar .nav-share + .menu-toggle{margin-left:10px;}
@media(min-width:769px){
  .nav-share{margin-left:16px;order:3;}
}

/* Share buttons layered over a gallery tile or an event card. */
.share-btn{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border:1px solid var(--gold);border-radius:20px;background:rgba(10,10,10,.72);color:var(--gold-light);font-size:.78rem;font-weight:600;font-family:inherit;cursor:pointer;transition:.2s;}
.share-btn:hover{background:var(--gold);color:var(--black);}
.gallery-item .share-btn{position:absolute;top:10px;right:10px;z-index:2;opacity:0;transition:opacity .2s ease,background .2s ease,color .2s ease;}
.gallery-item:hover .share-btn,.gallery-item:focus-within .share-btn{opacity:1;}
/* Touch screens have no hover, so the button has to be visible from the start. */
@media(hover:none){
  .gallery-item .share-btn{opacity:1;}
}

/* Fallback share menu — desktop browsers mostly have no navigator.share. */
.share-menu{position:fixed;left:50%;bottom:24px;z-index:1003;width:min(420px,calc(100vw - 32px));padding:18px;border:1px solid rgba(212,160,23,.5);border-radius:16px;background:var(--black);color:#f2efe6;box-shadow:0 20px 50px rgba(10,10,10,.45);opacity:0;transform:translate(-50%,14px);transition:opacity .2s ease,transform .2s ease;}
.share-menu.is-visible{opacity:1;transform:translate(-50%,0);}
.share-menu__head{display:grid;grid-template-columns:1fr auto;align-items:start;gap:4px 12px;margin-bottom:14px;}
.share-menu__head strong{color:var(--gold-light);font-size:1rem;}
.share-menu__head span{grid-column:1;color:#c9c5b8;font-size:.8rem;line-height:1.35;}
.share-menu__close{grid-row:1 / span 2;display:grid;place-items:center;width:30px;height:30px;border:none;border-radius:50%;background:rgba(255,255,255,.08);color:#ddd;font-size:1.1rem;line-height:1;cursor:pointer;}
.share-menu__close:hover{background:rgba(255,255,255,.18);}
.share-menu__grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;}
.share-menu__item{display:flex;flex-direction:column;align-items:center;gap:6px;padding:12px 6px;border:1px solid rgba(212,160,23,.28);border-radius:12px;background:rgba(255,255,255,.04);color:#f2efe6;font-size:.76rem;font-family:inherit;text-align:center;cursor:pointer;transition:.2s;}
.share-menu__item:hover{background:var(--gold);border-color:var(--gold);color:var(--black);}
.share-menu__icon{font-size:1.15rem;line-height:1;}
.share-menu__url{margin-top:12px;color:#8f8b80;font-size:.72rem;word-break:break-all;}
.share-menu :focus-visible{outline:3px solid var(--gold-light);outline-offset:2px;}

/* Received shares — thumbnails of what the phone handed to the app. */
.share-thumbs{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:14px;margin:18px 0;}
.share-thumb{margin:0;}
.share-thumb img{width:100%;height:150px;object-fit:cover;border-radius:var(--radius);border:1px solid var(--gold);}
.share-thumb figcaption{margin-top:6px;color:var(--gray);font-size:.76rem;word-break:break-word;}
.share-thumb.is-oversize img{opacity:.5;}
.share-received{white-space:pre-wrap;word-break:break-word;background:var(--cream);border-left:3px solid var(--gold);border-radius:6px;padding:12px 14px;}

/* ==========================================================================
   Accounts (Netlify Identity)
   ========================================================================== */

/* A staff page marks itself with class="auth-pending", and js/auth.js clears it
   once the role is confirmed — so program records cannot flash on screen before
   the check completes. The CDN Role redirect is the real gate; this only stops
   the page painting for a moment on the way there. */
html.auth-pending body{visibility:hidden;}

.auth-box{margin-bottom:28px;}
.auth-box__title{color:var(--black);font-size:1.3rem;margin-bottom:8px;}
.auth-box p{color:var(--gray);}

.auth-tabs{display:flex;gap:8px;margin-bottom:22px;border-bottom:1px solid #e7e1cf;}
.auth-tab{flex:1;padding:10px 8px;border:none;border-bottom:3px solid transparent;background:none;color:var(--gray);font-size:.95rem;font-weight:600;font-family:inherit;cursor:pointer;transition:.2s;}
.auth-tab:hover{color:var(--black);}
.auth-tab.is-active{border-bottom-color:var(--gold);color:var(--black);}

.auth-fineprint{margin-top:14px;font-size:.85rem;color:var(--gray);}
.auth-fineprint .btn{margin-right:8px;}

/* A plain-text button for actions that read as links (sign out, forgot
   password) — a real <button> so it is reachable by keyboard and screen reader. */
.link-btn{padding:0;border:none;background:none;color:var(--gold-dark);font:inherit;font-weight:600;text-decoration:underline;cursor:pointer;}
.link-btn:hover{color:var(--black);}
footer .link-btn{color:var(--gold-light);}
footer .link-btn:hover{color:var(--white);}

.auth-status{max-width:640px;margin:0 auto 20px;padding:12px 16px;border-radius:var(--radius);border-left:4px solid var(--gold);background:#faf4e2;color:var(--text);font-size:.92rem;}
.auth-status.is-error{border-left-color:#b3261e;background:#fbeceb;color:#7f1d17;}
.auth-status.is-ok{border-left-color:#2e7d32;background:#eef7ee;color:#1b5e20;}

.auth-details{display:grid;grid-template-columns:auto 1fr;gap:8px 18px;margin:0 0 22px;padding-bottom:18px;border-bottom:1px solid #e7e1cf;}
.auth-details dt{color:var(--gray);font-size:.85rem;font-weight:600;}
.auth-details dd{margin:0;color:var(--text);font-weight:600;word-break:break-word;}

.auth-oauth{margin-top:24px;padding-top:20px;border-top:1px solid #e7e1cf;text-align:center;}
.auth-oauth__label{color:var(--gray);font-size:.85rem;margin-bottom:12px;}
.auth-oauth__buttons{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;}
.auth-oauth__btn{padding:10px 22px;font-size:.9rem;}

/* Shown in place of a staff page when the signed-in account lacks the role. */
.auth-block{display:grid;place-items:center;min-height:100vh;padding:40px 24px;background:var(--black);}
.auth-block__card{max-width:520px;text-align:center;background:var(--white);border-top:3px solid var(--gold);border-radius:var(--radius);box-shadow:var(--shadow);padding:36px 30px;}
.auth-block__card h1{color:var(--black);font-size:1.5rem;margin-bottom:12px;}
.auth-block__card p{color:var(--gray);margin-bottom:22px;}
.auth-block__card .btn{margin:0 6px 8px;}

@media(max-width:600px){
  .share-menu__grid{grid-template-columns:repeat(2,1fr);}
  .auth-details{grid-template-columns:1fr;gap:2px;}
  .auth-details dd{margin-bottom:10px;}
}

/* Links to staff-only pages are hidden until an admin session is confirmed by
   js/auth.js — a visitor bounced to a sign-in page they cannot use is worse
   than not seeing the link. Handled in CSS rather than JS so the links never
   flash on screen first. */
[data-staff-only]{display:none;}
html.is-admin [data-staff-only]{display:inline-block;}

.footer-share{margin:22px 0 6px;}
.footer-auth{margin:6px 0 0;color:#b9b5aa;font-size:.85rem;}
.footer-auth a{color:var(--gold-light);text-decoration:underline;}
