/* Homecoming planner. Palette per Neil's brand rules: red leads, blue secondary, light gray/white behind;
   warm gray only for copy; green/amber only for status. */
:root {
  --red: #C8102E;
  --red-hover: #A50D26;
  --blue: #489FDF;
  --blue-wash: #EAF4FC;
  --red-wash: #FCEEF0;
  --gray-light: #D0D3D4;
  --gray-wash: #F4F5F5;
  --copy: #5E514D;
  --ink: #1F1F1F; /* brand-check: allow body copy only (black sparingly for body copy) */
  --line: #E3E4E4;
  --ok: #2E7D4F;
  --ok-wash: #E8F5EC;
  --warn: #B26A00;
  --warn-wash: #FFF4E0;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--gray-wash); color: var(--ink); font-family: "gotham", "Helvetica Neue", Arial, sans-serif; font-size: 15px; line-height: 1.5; }
a { color: var(--red); }
.display { font-family: "beachwood-variable", "gotham", sans-serif; font-weight: 600; font-variation-settings: "wght" 600; text-transform: uppercase; letter-spacing: .01em; line-height: 1.05; }

/* Header: Biola Script REV on red, blue rule under it. */
.masthead { background: var(--red); color: #fff; }
.masthead-inner { max-width: 1200px; margin: 0 auto; padding: 14px 16px; display: flex; align-items: center; gap: 16px; }
.masthead img { height: 44px; width: auto; display: block; }
.masthead .rule { width: 2px; align-self: stretch; background: rgba(255,255,255,.5); }
.masthead h1 { margin: 0; font-size: clamp(20px, 4vw, 28px); }
.masthead p { margin: 2px 0 0; font-size: 13px; }
.bluebar { height: 5px; background: var(--blue); }

nav.tabs { max-width: 1200px; margin: 0 auto; padding: 10px 16px 0; display: flex; gap: 6px; flex-wrap: wrap; }
nav.tabs a { text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--red); background: #fff; border: 1.5px solid var(--gray-light); }
nav.tabs a.on { background: var(--red); color: #fff; border-color: var(--red); }
nav.tabs .count { margin-left: 6px; background: var(--red-wash); color: var(--red); border-radius: 999px; padding: 0 7px; font-size: 12px; }
nav.tabs a.on .count { background: #fff; }

main { max-width: 1200px; margin: 0 auto; padding: 16px 16px 80px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.card h2 { margin: 0 0 8px; font-size: 22px; color: var(--red); }
.card h3 { margin: 16px 0 6px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--red); }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--red); }
.muted, .copy { color: var(--copy); }
.small { font-size: 13px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.btn { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 9px 16px; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-hover); }
.btn-ghost { background: #fff; color: var(--red); border: 1.5px solid var(--gray-light); }
.btn-ghost:hover { border-color: var(--red); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.linkbtn { background: none; border: 0; color: var(--red); font: inherit; font-size: 13px; cursor: pointer; padding: 0; text-decoration: underline; }

input[type=text], input[type=email], input[type=tel], input[type=date], input[type=password], select, textarea { width: 100%; padding: 9px 11px; border: 1.5px solid var(--gray-light); border-radius: 9px; font: inherit; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(72,159,223,.25); }
textarea { min-height: 70px; resize: vertical; }
label.field { display: block; font-size: 13px; font-weight: 700; color: var(--copy); margin-top: 10px; }

/* Meeting timeline */
.timeline { display: grid; gap: 8px; }
.slot { display: grid; grid-template-columns: 90px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; text-decoration: none; color: inherit; }
.slot:hover { border-color: var(--red); }
.slot .time { font-weight: 700; color: var(--red); }
.slot.now { border-color: var(--red); background: var(--red-wash); }
.slot.done { opacity: .75; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--gray-wash); color: var(--copy); border: 1px solid var(--line); }
.tag.ok { background: var(--ok-wash); color: var(--ok); border-color: #CFE8D7; }
.tag.warn { background: var(--warn-wash); color: var(--warn); border-color: #F5DDB0; }
.tag.red { background: var(--red); color: #fff; border-color: var(--red); }
.tag.blue { background: var(--blue-wash); color: var(--red); border-color: var(--blue); }

/* Prep and notes */
.prep { border-left: 4px solid var(--blue); background: var(--blue-wash); border-radius: 0 10px 10px 0; padding: 12px 14px; }
.prep ul { margin: 6px 0 0; padding-left: 18px; }
.q { border-top: 1px solid var(--line); padding: 12px 0; }
.q:first-of-type { border-top: 0; }
.q .q-label { font-weight: 700; }
.q.answered .q-label::after { content: "  ✓"; color: var(--ok); }

.recorder { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 10px; background: var(--red-wash); border: 1.5px solid #F2C3CB; }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--red); display: inline-block; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.transcript { white-space: pre-wrap; font-size: 14px; max-height: 320px; overflow: auto; background: var(--gray-wash); border-radius: 10px; padding: 12px; }
.ai-notes { border: 2px solid var(--blue); border-radius: 12px; padding: 12px 14px; background: #fff; }
.ai-notes ul { margin: 4px 0 8px; padding-left: 18px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table.grid { border-collapse: collapse; width: 100%; font-size: 14px; }
table.grid th, table.grid td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.grid th { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--copy); background: var(--gray-wash); white-space: nowrap; }
table.grid td.c { text-align: center; }
.cell { display: inline-block; min-width: 26px; padding: 3px 8px; border-radius: 6px; font-weight: 700; font-size: 12px; cursor: pointer; border: 1px solid var(--line); background: #fff; color: var(--copy); }
.cell.yes { background: var(--ok-wash); color: var(--ok); border-color: #CFE8D7; }
.cell.no { background: var(--gray-wash); color: var(--copy); }
.cell.tbd { background: var(--warn-wash); color: var(--warn); border-color: #F5DDB0; }
.cell.gap { background: var(--red-wash); color: var(--red); border-color: #F2C3CB; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.filters select, .filters input { width: auto; }
.alert { padding: 10px 12px; border-radius: 9px; margin: 10px 0 0; font-size: 14px; }
.alert.error { background: var(--red-wash); color: var(--red); }
.alert.info { background: var(--blue-wash); color: var(--ink); border-left: 4px solid var(--blue); }
.saved { font-size: 12px; color: var(--ok); }
[hidden] { display: none !important; }
footer { text-align: center; font-size: 12px; color: var(--copy); padding: 20px 16px 30px; }

@media (max-width: 760px) {
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .slot { grid-template-columns: 70px 1fr; }
  .slot > :last-child { grid-column: 1 / -1; }
}

/* Public sign-in and coach live view */
main.narrow { max-width: 560px; }
body.public .card h2 { font-size: 26px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 15px; color: var(--ink); }
.check input { flex: none; width: 20px; height: 20px; margin-top: 1px; accent-color: var(--red); }
.btn-big { width: 100%; justify-content: center; padding: 14px 18px; font-size: 17px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.center { text-align: center; }
body.public input, body.public select, body.public textarea { font-size: 16px; } /* no zoom on iPhone */
.stat-row { display: flex; gap: 14px; }
.stat { flex: 1; background: var(--red-wash); border-radius: 10px; padding: 12px; text-align: center; }
.stat .n { font-size: 34px; font-weight: 800; color: var(--red); line-height: 1; }
.stat .l { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--copy); margin-top: 4px; }

/* Printable QR cards */
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.qr-card { border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; text-align: center; break-inside: avoid; }
.qr-card .band { background: var(--red); padding: 10px; border-bottom: 4px solid var(--blue); }
.qr-card .band img { height: 30px; }
.qr-card .qr { padding: 14px; display: flex; justify-content: center; }
.qr-card .qr img, .qr-card .qr canvas { width: 170px; height: 170px; }
.qr-card .lbl { font-weight: 800; color: var(--red); padding: 0 10px; }
.qr-card .url { font-size: 11px; color: var(--copy); padding: 2px 10px 12px; word-break: break-all; }
@media print {
  .masthead, .bluebar, nav.tabs, footer, .no-print { display: none !important; }
  body { background: #fff; }
  main { padding: 0; max-width: none; }
  .card { border: 0; padding: 0; }
  .qr-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

/* Editable draft notes */
.act-row { display: grid; grid-template-columns: 1fr 150px 150px auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.act-btns { white-space: nowrap; }
.cov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 12px; }
.cov-grid label { display: block; color: var(--copy); font-weight: 700; }
.cov-grid select { margin-top: 3px; padding: 6px 8px; }
@media (max-width: 760px) { .act-row { grid-template-columns: 1fr 1fr; } .act-row .a-title { grid-column: 1 / -1; } }

/* Team: sign-in name, send box, updates feed */
.masthead p.who { font-size: 12px; opacity: .9; margin-top: 2px; }
.send-box { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.upd-form { margin-bottom: 6px; }
.feed { display: grid; gap: 10px; margin-top: 10px; }
.upd { border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 0 10px 10px 0; padding: 10px 12px; background: #fff; }
.upd-head { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.upd-body { margin: 6px 0; }

.mail-prev { width: 100%; height: 720px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }

/* Tasks */
.t-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--gray-light); border-radius: 8px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: none; height: 34px; padding: 0 14px; font: inherit; font-weight: 700; font-size: 13px; color: var(--copy); cursor: pointer; }
.seg button[aria-pressed=true] { background: var(--blue-wash); color: var(--red); box-shadow: inset 0 -3px 0 var(--blue); }
.tg-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 6px; }
.tg-head h3 { margin: 0 !important; }
.bar { flex: 1 1 120px; height: 6px; background: var(--gray-wash); border-radius: 3px; overflow: hidden; align-self: center; }
.bar i { display: block; height: 100%; background: var(--ok); }
.task { display: grid; grid-template-columns: 24px 1fr 210px; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); align-items: start; }
.task .done { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--ok); }
.task.done .t-title { text-decoration: line-through; color: var(--copy); }
.t-title { font-weight: 700; }
.t-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 3px; }
.t-upd { margin-top: 4px; padding-left: 8px; border-left: 3px solid var(--blue); }
.t-side { display: grid; gap: 6px; }
.t-side select, .t-side input { padding: 6px 8px; font-size: 13px; }
.t-side input.late { border-color: var(--red); color: var(--red); }
.alert.warn { background: var(--warn-wash); color: var(--warn); }
@media (max-width: 760px) { .task { grid-template-columns: 24px 1fr; } .t-side { grid-column: 2; grid-template-columns: 1fr 1fr; } }

/* Schedule grid (DAYBREAK day view) */
.cal { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; margin-top: 10px; }
.calin { min-width: calc(60px + var(--cols) * 165px); }
.crow { display: grid; grid-template-columns: 60px repeat(var(--cols), minmax(165px, 1fr)); }
.crow.head { border-bottom: 1px solid var(--gray-light); }
.fach { border-left: 1px solid var(--line); border-top: 4px solid var(--fac); padding: 7px 8px 8px; min-width: 0; }
.fach b { display: block; font-size: 12px; line-height: 1.2; text-transform: uppercase; letter-spacing: .04em; color: var(--copy); overflow-wrap: anywhere; }
.gut { font-size: 10.5px; color: var(--copy); text-align: right; padding-right: 6px; }
.hours { position: relative; }
.hours span { position: absolute; right: 6px; transform: translateY(-50%); white-space: nowrap; }
.hours span:first-child { transform: none; }
.col { position: relative; border-left: 1px solid var(--line); min-width: 0;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--hour) - 1px), var(--line) calc(var(--hour) - 1px), var(--line) var(--hour)); }
.ev { position: absolute; display: block; text-align: left; border: 1px solid var(--edge); border-radius: 6px; background-color: var(--tint); padding: 0; font: inherit; font-size: 11.5px; line-height: 1.25; overflow: hidden; color: var(--ink); cursor: pointer; z-index: 1; }
.ev:hover { z-index: 4; box-shadow: 0 2px 10px rgba(26,22,20,.22); }
.ev.prop { border-style: dashed; }
.ev .sp { position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--stripe); }
.ev .in { display: flex; flex-direction: column; height: 100%; padding: 3px 4px 2px 10px; min-width: 0; }
.ev b { font-weight: 700; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; overflow-wrap: break-word; flex: none; }
.ev.mid .w { font-size: 10px; }
.ev.mid .f { display: none; }
.ev .w { color: var(--copy); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev .f { font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--copy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.short .in { flex-direction: row; gap: 6px; align-items: center; }
.ev.short b { display: block; white-space: nowrap; text-overflow: ellipsis; -webkit-line-clamp: 1; flex: 0 1 auto; min-width: 0; }
.ev.short .f { display: none; }
.ev-editor { border: 2px solid var(--blue); border-radius: 10px; padding: 12px 14px; margin: 10px 0; background: var(--blue-wash); }
.ev-row { cursor: pointer; }
.ev-row:hover td { background: var(--blue-wash); }

/* Blurbs */
.blurb { border-top: 1px solid var(--line); padding: 12px 0; }
.blurb.ready { border-left: 4px solid var(--ok); padding-left: 12px; }
label.field input, label.field textarea, label.field select { font-weight: 400; }

/* Coach email compose window */
.compose { border: 1px solid var(--gray-light); border-radius: 10px; overflow: hidden; background: #fff; }
.c-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.c-lab { width: 60px; flex: none; font-size: 13px; color: var(--copy); }
.c-row input[type=text] { border: 0; padding: 4px 0; font-weight: 700; }
.c-row input[type=text]:focus { box-shadow: none; }
.chip-to { background: var(--gray-wash); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 13px; }
.c-ccs { display: flex; gap: 12px; flex-wrap: wrap; }
.c-cc { font-size: 13px; display: inline-flex; gap: 5px; align-items: center; }
.c-tools { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; padding: 6px 10px; border-bottom: 1px solid var(--line); background: var(--gray-wash); }
.c-tools button { border: 1px solid transparent; background: none; border-radius: 6px; padding: 4px 9px; font: inherit; font-size: 13px; color: var(--copy); cursor: pointer; }
.c-tools button:hover { background: #fff; border-color: var(--line); }
.c-tools .sep { width: 1px; height: 18px; background: var(--gray-light); margin: 0 4px; }
.c-hint { margin-left: auto; font-size: 12px; color: var(--copy); }
.c-body { display: block; width: 100%; border: 0; min-height: 400px; background: #F4F5F5; }
.c-foot { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.c-right { margin-left: auto; }

/* View-only people */
body.viewer .vo-hide { display: none !important; }

/* 25Live check on schedule blocks: status words, green/amber only as status */
.ev .s25.booked { color: var(--ok); font-weight: 700; }
.ev .s25.partial, .ev .s25.missing { color: var(--warn); font-weight: 700; }
.ev .s25.held { color: var(--ok); font-weight: 700; }

/* Booking updates */
.upd-book { border-left: 4px solid var(--blue); background: var(--blue-wash); border-radius: 0 10px 10px 0; padding: 8px 12px 12px; margin-top: 8px; }
.t2 { display: flex; gap: 6px; align-items: center; }
.upd-cal { color: var(--ok); margin-top: 4px; }
.upd-sug { margin-top: 8px; padding: 10px 12px; border: 1.5px dashed var(--blue); border-radius: 10px; background: var(--blue-wash); font-size: 14px; }
