/* Custom finals calendar (assets/js/finals-calendar.js). Uses the site tokens from styles.css. */
.fc-form { display: grid; gap: 10px; }
.fc-h { margin: 8px 0 0; font-size: 16px; letter-spacing: -0.01em; }
.fc-sub { margin: -4px 0 2px; font-size: 14px; color: var(--text-faint); }
.fc-items { display: grid; gap: 8px; }
.fc-row { display: grid; grid-template-columns: 150px minmax(0, 1.2fr) 144px 122px 180px 32px; gap: 8px; align-items: center; }
.fc-time { -webkit-appearance: none; appearance: none; padding-right: 30px; background: var(--bg-card) var(--fc-chev) no-repeat right 11px center / 12px 12px; }
.fc-time.fc-ph { color: var(--text-faint); }
.fc-awayrow { grid-template-columns: 30px minmax(0, 1.4fr) 150px auto 150px 32px; }
.fc-in { font: inherit; font-size: 15px; height: 44px; box-sizing: border-box; padding: 9px 11px; border-radius: 11px; border: 1px solid var(--line-strong); background: var(--bg-card); color: var(--text); width: 100%; min-width: 0; }
.fc-in:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(29,177,0,.18); }
/* The priority menu draws its own dot and arrow. A native menu ignores left padding in Safari,
   so the dot sat on top of the words (Joe, 2026-11-15). */
.fc-imp { font-weight: 600; -webkit-appearance: none; appearance: none; padding: 9px 30px 9px 30px; text-overflow: ellipsis;
  background-repeat: no-repeat, no-repeat; background-position: 12px center, right 11px center; background-size: 10px 10px, 12px 12px; }
.fc-imp.imp3 { background-image: radial-gradient(circle, #EE220C 60%, transparent 62%), var(--fc-chev); }
.fc-imp.imp2 { background-image: radial-gradient(circle, #E8960F 60%, transparent 62%), var(--fc-chev); }
.fc-imp.imp1 { background-image: radial-gradient(circle, #2F6FDB 60%, transparent 62%), var(--fc-chev); }
.fc-form { --fc-chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A8A96' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.fc-date.fc-ph { color: var(--text-faint); }
.fc-x { font: inherit; font-size: 22px; line-height: 1; border: 0; background: none; color: var(--text-faint); cursor: pointer; padding: 4px; }
.fc-x:hover { color: var(--red); }
.fc-ic { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--tint-2); color: var(--text-dim); }
.fc-ic svg, .fc-ev svg, .fc-print svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.fc-to { font-size: 14px; color: var(--text-faint); }
.fc-addbar { display: flex; flex-wrap: wrap; gap: 8px; }
.fc-add { font: inherit; font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 999px; border: 1.5px dashed var(--line-strong); background: transparent; color: var(--text-dim); cursor: pointer; justify-self: start; }
.fc-add:hover { border-color: var(--green); color: var(--text); }
.fc-opts { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: end; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.fc-opt { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--text-dim); }
.fc-opt .fc-in { width: auto; min-width: 160px; }
.fc-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 600; padding-bottom: 10px; cursor: pointer; }
.fc-check input { width: 18px; height: 18px; accent-color: var(--green-deep); }
.fc-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 6px; }
.fc-print { display: inline-flex; align-items: center; gap: 8px; }
.fc-print[hidden] { display: none; }
.fc-reset { font: inherit; font-size: 14px; border: 0; background: none; color: var(--text-faint); cursor: pointer; margin-left: auto; }
.fc-err { color: var(--red); font-size: 15px; margin: 0; }
.fc-saved { margin-top: 0; }

.fc-out { margin-top: 28px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; min-width: 0; }
.fc-month, .fc-form { min-width: 0; }
#finals-calendar { min-width: 0; }
.fc-out:empty { display: none; }
.fc-intro h3 { margin: 0 0 6px; font-size: 22px; letter-spacing: -0.02em; }
.fc-intro p { margin: 0; color: var(--text-dim); max-width: 62ch; }
.fc-mhead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 8px; }
.fc-mhead h3 { margin: 0; font-size: 24px; letter-spacing: -0.02em; }
.fc-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--text-dim); }
.fc-legend span { display: inline-flex; align-items: center; gap: 5px; }
.fc-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.fc-legend i.imp3 { background: #EE220C; } .fc-legend i.imp2 { background: #E8960F; } .fc-legend i.imp1 { background: #2F6FDB; }
.fc-legend i.away { background: repeating-linear-gradient(135deg, #C9C9D2 0 3px, #EFEFF3 3px 6px); }
.fc-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-card); }
.fc-grid { display: grid; grid-template-columns: repeat(7, minmax(96px, 1fr)); min-width: 700px; }
.fc-dow { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); padding: 8px 8px; border-bottom: 1px solid var(--line); }
.fc-day { min-height: 104px; padding: 6px 6px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fc-day:nth-child(7n) { border-right: 0; }
.fc-day.out { background: var(--tint-1); }
.fc-day.out .fc-n { color: var(--text-faint); opacity: .5; }
.fc-day.is-away { background: repeating-linear-gradient(135deg, rgba(150,150,165,.10) 0 6px, transparent 6px 12px); }
.fc-dtop { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; }
.fc-n { font-size: 13px; font-weight: 800; }
.fc-hol { font-size: 10px; font-weight: 700; color: #B86E00; }
.fc-awaytag { font-size: 10.5px; font-weight: 700; color: var(--text-dim); }
.fc-ev { display: flex; align-items: flex-start; gap: 4px; font-size: 11.5px; line-height: 1.25; padding: 3px 6px; border-radius: 7px; color: #fff; min-width: 0; }
.fc-ev b { font-weight: 700; overflow-wrap: anywhere; }
.fc-ev svg { margin-top: 1px; }
.fc-ev svg { width: 12px; height: 12px; }
.fc-ev.imp3 { background: #EE220C; } .fc-ev.imp2 { background: #D48508; } .fc-ev.imp1 { background: #2F6FDB; }
.fc-block { display: flex; align-items: flex-start; gap: 5px; font-size: 11px; line-height: 1.25; color: var(--text-dim); min-width: 0; overflow-wrap: anywhere; }
.fc-block i { margin-top: 3px; }
.fc-block i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.fc-block.imp3 i { background: #EE220C; } .fc-block.imp2 i { background: #E8960F; } .fc-block.imp1 i { background: #2F6FDB; }

@media (max-width: 760px) {
  .fc-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 32px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
  .fc-row .fc-name { grid-column: 1 / 3; grid-row: 1; }
  .fc-row .fc-x { grid-column: 3; grid-row: 1; }
  .fc-row .fc-type { grid-column: 1 / 3; } .fc-row .fc-date { grid-column: 1; } .fc-row .fc-time { grid-column: 2; }
  .fc-row .fc-imp { grid-column: 1 / 3; }
  .fc-awayrow { grid-template-columns: 30px minmax(0, 1fr) 32px; }
  .fc-awayrow .fc-ic { grid-row: 1; } .fc-awayrow .fc-name { grid-column: 2; grid-row: 1; } .fc-awayrow .fc-x { grid-column: 3; grid-row: 1; }
  .fc-awayrow .fc-date { grid-column: 2; } .fc-awayrow .fc-to { display: none; }
  .fc-reset { margin-left: 0; }
}

/* Print: only the two months, each filling its own landscape page so the day boxes are as tall
   as the paper allows. The script hides everything else (.fc-hide). */
@media print {
  @page { size: letter landscape; margin: 0.35in; }
  body.fc-printing .fc-hide { display: none !important; }
  body.fc-printing main, body.fc-printing section, body.fc-printing .wrap, body.fc-printing details, body.fc-printing details > div { padding: 0 !important; margin: 0 !important; max-width: none !important; box-shadow: none !important; border: 0 !important; background: none !important; }
  /* Page breaks are unreliable inside a grid, so the months sit in plain blocks. */
  body.fc-printing #fc-out, body.fc-printing #finals-calendar { display: block; margin: 0; }
  body.fc-printing .fc-intro, body.fc-printing .fc-err { display: none; }
  body.fc-printing .fc-month { height: 7.55in; display: flex; flex-direction: column; break-after: page; page-break-after: always; break-inside: avoid; page-break-inside: avoid; }
  body.fc-printing .fc-month:last-child { break-after: auto; page-break-after: auto; }
  body.fc-printing .fc-scroll { flex: 1; display: flex; overflow: visible; border-color: #ccc; min-height: 0; }
  body.fc-printing .fc-grid { flex: 1; min-width: 0; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: auto; grid-auto-rows: 1fr; }
  body.fc-printing .fc-day { min-height: 0; }
  body.fc-printing, body.fc-printing * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.fc-namef { max-width: 280px; }
.fc-namef .fc-in { width: 100%; }
/* The form's three parts, one shown at a time. */
.fc-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: var(--bg-raised); border: 1px solid var(--line); justify-self: start; }
.fc-tabs button { font: inherit; font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 999px; border: 0; background: transparent; color: var(--text-dim); cursor: pointer; white-space: nowrap; }
.fc-tabs button[aria-selected="true"] { background: var(--bg-card); color: var(--text); box-shadow: 0 1px 3px var(--shadow-md); }
.fc-tabs button:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.fc-panel { display: grid; gap: 10px; min-width: 0; }
.fc-panel[hidden] { display: none; }
.fc-panel .fc-opts { margin-top: 0; padding-top: 0; border-top: 0; }
.fc-form > .fc-reset { justify-self: end; margin: 0; }
@media (max-width: 520px) { .fc-tabs { flex-wrap: nowrap; max-width: 100%; } .fc-tabs button { padding: 7px 9px; font-size: 12.5px; } }
#finals-name .fc-namef { max-width: 100%; }
#finals-name .fc-in { min-width: 0; width: 100%; }
