/* The Board of Regents' seat history (inc/bor-seats.php, bor/bor-seats.js), from Renedel's draft regents.css, on top
   of cti-program, gofurther, explore-programs, directory and bor.css. Quiet chrome, one accent: past terms are grey
   tiles, the sitting regents NMC red, a term run out (held over) a red outline; the chart is the page's one rich thing. */

.bor .bor-hero { padding-bottom: clamp(28px, 4vh, 44px); }
.bor .bor-tl-wrap { padding: 24px 0 88px; }

/* ---- the bar: the shared floating glass pill (changes 0108): search + range ---- */
.bor-tl-pin .ep-bar-in { justify-content: center; flex-wrap: nowrap; gap: 12px; }
.bor-tl-find { position: relative; flex: 1 1 auto; max-width: 520px; }
.bor .bor-tl-search { max-width: none; width: 100%; }
.bor .bor-tl-search input { height: 44px; border-radius: 12px; }
.bor-tl-range { flex: none; }
.bor .bor-tl-meta { min-height: 16px; margin: 8px 0 0; text-align: center; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bor-tl-meta:empty { display: none; }
.bor-tl-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 30; max-height: 360px; overflow-y: auto; padding: 6px;
  border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 12px 32px rgba(0, 0, 0, .14);
}
.bor .bor-tl-result { display: flex; flex-direction: column; gap: 2px; width: 100%; margin: 0; padding: 9px 12px; border: 0; border-radius: 10px; background: none; text-align: left; cursor: pointer; font: inherit; color: var(--ink); }
.bor .bor-tl-result:hover, .bor .bor-tl-result:focus-visible { background: #f5f5f7; outline: none; }
.bor-tl-result-name { font-size: 15px; font-weight: 600; }
.bor-tl-result-meta { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bor-tl-result mark { background: rgba(255, 214, 10, .45); color: inherit; border-radius: 3px; padding: 0 1px; }
.bor .bor-tl-results-more { margin: 4px 12px 6px; font-size: 12px; color: var(--muted); }

/* ---- the chart: a white card, wider than the text column so seven seats breathe ---- */
.bor-tl-in { max-width: 1360px; margin-top: 28px; }
.bor-tl-chart { display: flex; align-items: stretch; overflow: hidden; border-radius: 22px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.bor-tl-rail { position: relative; z-index: 2; flex: 0 0 64px; width: 64px; border-right: 1px solid rgba(0, 0, 0, .06); background: #fff; }
.bor-tl-corner { display: flex; align-items: center; justify-content: center; height: 52px; border-bottom: 1px solid rgba(0, 0, 0, .06); }
.bor .bor-tl-reset { margin: 0; padding: 4px 8px; border: 0; border-radius: 8px; background: rgba(162, 38, 49, .08); color: var(--red); font: 600 12px/1.2 var(--font); cursor: pointer; }
.bor .bor-tl-reset:hover { background: rgba(162, 38, 49, .14); }
.bor-tl-years { position: relative; cursor: ns-resize; }
.bor-tl-ytick { position: absolute; right: 12px; transform: translateY(-50%); font-size: 12px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; pointer-events: none; }
.bor-tl-nowflag { position: absolute; right: 6px; z-index: 2; transform: translateY(-50%); padding: 2px 7px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 600; pointer-events: none; }
.bor-tl-sel { display: none; position: absolute; left: 4px; right: 4px; border-radius: 6px; background: rgba(162, 38, 49, .12); box-shadow: inset 0 0 0 1px rgba(162, 38, 49, .4); pointer-events: none; }
.bor-tl-sel.is-on { display: block; }

.bor-tl-scroll { flex: 1 1 auto; min-width: 0; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.bor-tl-cols { display: flex; align-items: stretch; min-width: 100%; }
.bor-tl-col { display: flex; flex-direction: column; flex: 1 0 auto; min-width: 150px; border-right: 1px solid rgba(0, 0, 0, .04); scroll-snap-align: start; }
.bor-tl-col:last-child { border-right: 0; }
.bor-tl-colhead { display: flex; flex-direction: column; justify-content: center; flex: none; height: 52px; padding: 0 12px; border-bottom: 1px solid rgba(0, 0, 0, .06); background: #fff; }
.bor-tl-colhead-seat { font-size: 12px; font-weight: 500; color: var(--muted); line-height: 1.2; }
.bor-tl-colhead-group { font-size: 15px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); line-height: 1.25; }
.bor-tl-track { position: relative; margin: 0 6px; }
.bor-tl-gridline { position: absolute; left: -6px; right: -6px; height: 1px; background: rgba(0, 0, 0, .04); pointer-events: none; }
.bor-tl-now { position: absolute; left: -6px; right: -6px; z-index: 0; height: 0; border-top: 1.5px solid var(--red); pointer-events: none; }
.bor .bor-tl-bar { z-index: 1; } /* the Today line runs behind the terms, never through a name */

/* ---- a term ---- */
.bor .bor-tl-bar {
  position: absolute; left: 0; right: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; overflow: hidden;
  margin: 0; padding: 6px 10px; border: 0; border-radius: 10px; background: #ececf0; color: var(--ink); text-align: left; cursor: pointer;
  font: inherit; transition: background-color .15s ease, opacity .2s ease, transform .15s cubic-bezier(.16, 1, .3, 1);
}
.bor .bor-tl-bar:hover { background: #e2e2e7; }
.bor .bor-tl-bar:active { transform: scale(.98); transition-duration: .08s; }
.bor .bor-tl-bar:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; z-index: 3; }
.bor-tl-bar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; line-height: 1.2; letter-spacing: -.005em; }
.bor-tl-bar-years { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; line-height: 1.2; }
/* recorded in the minutes only: a dashed edge, a lighter tile */
.bor .bor-tl-bar[data-src="m"] { background: #f5f5f7; }
.bor .bor-tl-bar[data-src="m"]::before { content: ""; position: absolute; inset: 0; border: 1px dashed rgba(0, 0, 0, .28); border-radius: inherit; pointer-events: none; }
/* the sitting regents */
.bor .bor-tl-bar[data-status="serving"] { background: var(--red); color: #fff; }
.bor .bor-tl-bar[data-status="serving"]:hover { background: var(--red-ink, #8c1f29); }
.bor .bor-tl-bar[data-status="serving"] .bor-tl-bar-years { color: rgba(255, 255, 255, .78); }
/* ran out, held over until the seat is filled */
.bor .bor-tl-bar[data-status="expired"] { background: #fff; color: var(--red); box-shadow: inset 0 0 0 1.5px var(--red); }
.bor .bor-tl-bar[data-status="expired"]:hover { background: #fdf3f4; }
.bor .bor-tl-bar[data-status="expired"] .bor-tl-bar-years { color: var(--red); opacity: .75; }
/* no end on record: the tile fades out at the bottom instead of ending on a date nobody recorded */
.bor .bor-tl-bar[data-open="1"] { -webkit-mask-image: linear-gradient(#000 55%, rgba(0, 0, 0, .25)); mask-image: linear-gradient(#000 55%, rgba(0, 0, 0, .25)); }
/* drawn taller than the term so the name stays readable: a thin notch on the left */
.bor .bor-tl-bar[data-squeezed="1"]::after { content: ""; position: absolute; left: 3px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: currentColor; opacity: .25; }
/* search */
.bor .bor-tl-bar.is-dim { opacity: .28; }
.bor .bor-tl-bar.is-hit { z-index: 2; box-shadow: 0 0 0 2px var(--ink), 0 6px 16px rgba(0, 0, 0, .14); }

/* ---- legend, hint ---- */
.bor .bor-tl-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 18px 4px 0 !important; padding: 0 !important; list-style: none !important; font-size: 13px; color: var(--muted); }
.bor-tl-legend li { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.bor-tl-legend i { display: inline-block; width: 18px; height: 12px; border-radius: 4px; background: #ececf0; }
.bor-tl-legend i[data-sw="serving"] { background: var(--red); }
.bor-tl-legend i[data-sw="expired"] { background: #fff; box-shadow: inset 0 0 0 1.5px var(--red); }
.bor-tl-legend i[data-sw="minutes"] { background: #f5f5f7; border: 1px dashed rgba(0, 0, 0, .35); }
.bor-tl-legend i[data-sw="open"] { background: linear-gradient(#d8d8de, rgba(216, 216, 222, .2)); }
.bor .bor-tl-hint { max-width: 760px; margin: 12px 4px 0; font-size: 13px; line-height: 1.55; color: var(--muted); }
.bor-tl-noscript { padding: 40px; text-align: center; color: var(--muted); }

/* ---- a term's record ---- */
.bor-tl-sheet {
  width: min(460px, calc(100vw - 32px)); max-width: none; margin: auto; padding: 28px 28px 24px; border: 0; border-radius: 24px;
  background: #fff; color: var(--ink); box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}
.bor-tl-sheet[open] { animation: bor-tl-in .3s cubic-bezier(.16, 1, .3, 1); }
.bor-tl-sheet::backdrop { background: rgba(0, 0, 0, .38); }
@keyframes bor-tl-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.bor-tl-sheet-x { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 32px; height: 32px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: #f0f0f3; color: var(--ink); cursor: pointer; }
.bor-tl-sheet-x:hover { background: #e6e6ea; }
.bor-tl-sheet-x:focus-visible { outline: 2px solid #a22631; outline-offset: 2px; }
.bor-tl-sheet-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.bor-tl-sheet-k { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: #a22631; }
.bor-tl-sheet-t { margin: 0 40px 18px 0; font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.bor-tl-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 20px; padding: 16px 18px; border-radius: 14px; background: #f5f5f7; }
.bor-tl-dt { font-size: 14px; color: #6e6e73; }
.bor-tl-dd { font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
.bor-tl-muted { color: #6e6e73; font-weight: 400; }
.bor-tl-flag { margin: 12px 0 0; font-size: 14px; line-height: 1.5; color: #424245; }
.bor-tl-flag--now { color: #a22631; font-weight: 600; }

@media (max-width: 900px) {
  .bor-tl-pin .ep-bar-in { flex-wrap: wrap; }
  .bor-tl-find { flex-basis: 100%; max-width: none; }
  .bor-tl-range { margin: 0 auto; }
}
@media (max-width: 767px) {
  .bor .bor-tl-wrap { padding: 16px 0 64px; }
  .bor-tl-range { display: flex; width: 100%; }
  .bor-tl-range .ep-seg-btn { flex: 1 1 auto; padding: 0 6px; font-size: 14px; }
  .bor-tl-in { padding: 0 !important; margin-top: 20px; }
  .bor-tl-chart { border-radius: 0; }
  .bor-tl-rail { flex-basis: 50px; width: 50px; }
  .bor-tl-ytick { right: 8px; font-size: 11px; }
  .bor-tl-col { flex: 0 0 132px; min-width: 132px; }
  .bor-tl-colhead { padding: 0 8px; }
  .bor-tl-colhead-group { font-size: 14px; }
  .bor .bor-tl-legend, .bor .bor-tl-hint { margin-left: 16px; margin-right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .bor .bor-tl-bar { transition: none; }
  .bor .bor-tl-bar:active { transform: none; }
  .bor-tl-sheet[open] { animation: none; }
}
