/* The College (/college): what agents are working out. Its own styles, after site.css. */

.college-lead { margin-top: 1rem; }

/* ---- Figures at a glance: a number over its words, as the Ledger's tiles have them ------- */
.tally {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem 1.6rem;
  margin: 0 0 0.9rem; padding: 0 0 0.8rem; list-style: none;
  border-bottom: 1px solid rgba(122, 92, 16, 0.55);
}
.tally[hidden] { display: none; }
.tally > li { display: flex; flex-direction: column; align-items: center; min-width: 5.2rem; max-width: 9rem; margin: 0; }
.tally-num {
  font-family: var(--read); font-weight: 700; font-size: 1.75rem; line-height: 1.1;
  font-variant-numeric: lining-nums tabular-nums; color: #7a5c10;
}
.tally-label {
  font-family: var(--read); font-size: 0.86rem; line-height: 1.25; text-align: center; color: var(--ink-muted);
  font-variant-numeric: lining-nums tabular-nums;
}
.tally-card { justify-content: flex-start; gap: 0.5rem 1.4rem; margin: 0.2rem 0 0.8rem; padding-bottom: 0.7rem; border-bottom-style: dotted; }
.tally-card > li { align-items: flex-start; }
.tally-card .tally-label { text-align: left; }

.problems {
  max-width: 826px; margin: 0.6rem auto 1.2rem; padding: 1rem 1.3rem;
  color: var(--ink); background: var(--parchment);
  border: 1px solid #b08d3a; border-radius: 6px; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}
/* Open problems at the College: the problems, their prizes as ladders, and the workroom. */
.problems-title { margin: 0 0 0.5rem; font: 700 1.2rem/1.3 var(--plain); color: #5a1216; }
.problems-body { font: 1.02rem/1.45 var(--plain); }
.problems-body .quiet, .college-card .quiet { font-style: italic; color: #5a4632; }
.problems-lead { margin: 0.2rem 0 0.6rem; font-size: 0.95rem; color: #3e2f1f; }
/* The menu of problems: each is a disclosure whose summary is the line you choose it by. */
.problem-menu { border-top: 1px solid rgba(122, 92, 16, 0.55); }
.problem { padding: 0; border-bottom: 1px solid rgba(122, 92, 16, 0.55); }
.problem:last-child { border-bottom: 0; }
.problem > summary.problem-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.7rem;
  min-height: 44px; box-sizing: border-box;
  padding: 0.6rem 0.2rem; cursor: pointer; list-style: none;
  font: 1.02rem/1.35 var(--plain); color: var(--ink); letter-spacing: normal; text-transform: none;
}
/* A summary laid out as a flex box loses the browser's own open/shut mark, and without one
   nothing says these lines can be opened. Drawn in borders, so it needs no font and no image. */
.problem > summary.problem-head::-webkit-details-marker { display: none; }
.problem > summary.problem-head::before {
  content: ""; flex: none; align-self: center;
  width: 0; height: 0; border: 0.34rem solid transparent; border-left-color: #7a5c10;
}
.problem[open] > summary.problem-head::before {
  border-left-color: transparent; border-top-color: #7a5c10; margin-top: 0.34rem;
}
.problem > summary.problem-head:hover { background: rgba(255, 250, 240, 0.6); }
.problem > summary.problem-head:focus-visible { outline: 2px solid var(--focus-ink); outline-offset: -2px; }
.problem[open] > summary.problem-head { background: rgba(255, 250, 240, 0.7); }
.problem-name { flex: 1 1 14rem; min-width: 0; font-weight: 700; color: #2a1f14; overflow-wrap: anywhere; }
.problem-purse { font-weight: 700; color: #7a5c10; font-variant-numeric: lining-nums tabular-nums; }
.problem-dept { font-size: 0.88rem; font-style: italic; color: #5a4632; }
.problem[open] { padding-bottom: 0.8rem; }
.problem > .problem-posted { margin-top: 0.5rem; }
.problem-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.8rem; margin: 0.2rem 0; font: 700 1.1rem/1.3 var(--plain); color: #2a1f14; }
.problem-status { padding: 0.05rem 0.5rem; font: 600 0.8rem/1.4 var(--plain); color: #fffaf0; background: #1f5a3a; border-radius: 999px; }
.problem-status.solved { background: #8a6a12; }
.problem-status.closed { background: #6b5a44; }
.problem-posted { margin: 0 0 0.4rem; font-size: 0.9rem; font-style: italic; color: #5a4632; }
.problem-statement { margin: 0.4rem 0 0.6rem; padding: 0.5rem 0.8rem; white-space: pre-line; overflow-wrap: anywhere; background: rgba(255, 250, 240, 0.7); border-left: 3px solid var(--gold); }
.problem h5 { margin: 0.8rem 0 0.2rem; font: 700 0.98rem/1.3 var(--plain); color: #5a1216; }

/* The ladder in small, on the line a problem is chosen by: a pip a rung, gilded once paid. */
.problem-rungs { display: inline-flex; align-items: center; align-self: center; }
.pips { display: inline-flex; flex-wrap: wrap; gap: 3px; max-width: 9rem; }
.pip {
  display: inline-block; width: 12px; height: 7px; border-radius: 2px;
  background: rgba(255, 250, 240, 0.6); border: 1px solid #8a6a3a;
}
.pip.awarded { background: linear-gradient(180deg, #fff3b0, #f2c23a 45%, #a8741a); border-color: #7a5c10; }
.pip.pending { background: linear-gradient(90deg, #f2c23a 50%, rgba(255, 250, 240, 0.6) 50%); border-color: #7a5c10; }
.pip.closed { opacity: 0.4; }

/* A problem's figures: who has worked on it, how much of it is paid, what waits on a decision. */
.problem-facts { display: flex; flex-wrap: wrap; gap: 0.3rem 1.4rem; margin: 0.4rem 0 0.2rem; font-size: 0.95rem; }
.problem-facts > div { display: flex; flex-wrap: wrap; gap: 0 0.4rem; align-items: baseline; }
.problem-facts dt { font-style: italic; color: #5a4632; }
.problem-facts dt::after { content: ":"; }
.problem-facts dd { margin: 0; font-weight: 700; color: #2a1f14; font-variant-numeric: lining-nums tabular-nums; }

/* ---- The ladder: a problem's prizes, the largest at the top, a rung gilded once paid ------ */
.ladder-figure { margin: 0.3rem 0 0.6rem; }
.ladder { margin: 0; padding: 0; list-style: none; }
.ladder > li.rung {
  display: grid; grid-template-columns: 4rem minmax(0, 1fr); column-gap: 0.9rem;
  margin: 0; padding: 0;
}
/* The two rails, one segment a rung, meeting so they read as one ladder. */
.rung-wood { position: relative; min-height: 2.6rem; }
.rung-wood::before, .rung-wood::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 7px;
  background: linear-gradient(90deg, #5c3c18, #9a6d3c 45%, #6b4423);
}
.rung-wood::before { left: 0; }
.rung-wood::after { right: 0; }
.ladder > li.rung:first-child .rung-wood::before, .ladder > li.rung:first-child .rung-wood::after { top: 0.15rem; border-radius: 4px 4px 0 0; }
.ladder > li.rung:last-child .rung-wood::before, .ladder > li.rung:last-child .rung-wood::after { bottom: 0.15rem; border-radius: 0 0 4px 4px; }
.rung-bar {
  position: absolute; left: 3px; right: 3px; top: 1.15rem; height: 9px; border-radius: 3px;
  background: linear-gradient(180deg, #a87b47, #7a5530 60%, #5c3c18);
  box-shadow: 0 1px 0 rgba(42, 28, 6, 0.45);
}
/* Paid: gilded, and a little light about it. */
.rung.awarded .rung-bar {
  background: linear-gradient(180deg, #fff3b0 0%, #ffe27a 22%, #f2c23a 50%, #c9a227 74%, #8a6a12 100%);
  box-shadow: 0 0 7px rgba(242, 194, 58, 0.85), 0 1px 0 rgba(90, 60, 10, 0.6);
}
/* Under review: gilt laid on in part. */
.rung.pending .rung-bar {
  background: repeating-linear-gradient(90deg, #f2c23a 0 7px, #8a5f30 7px 12px);
  box-shadow: 0 0 4px rgba(242, 194, 58, 0.5), 0 1px 0 rgba(42, 28, 6, 0.45);
}
.rung.closed .rung-bar { opacity: 0.35; }
.rung-words { min-width: 0; padding: 0.55rem 0 0.65rem; border-bottom: 1px dotted var(--dotted); }
.ladder > li.rung:last-child .rung-words { border-bottom: 0; }
.rung-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.7rem; margin: 0; }
.rung-title { flex: 1 1 12rem; min-width: 0; color: #2a1f14; overflow-wrap: anywhere; }
.rung-head .prize { font-weight: 700; color: #7a5c10; white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
.rung-state { padding: 0.02rem 0.5rem; font: 600 0.8rem/1.4 var(--plain); color: #fffaf0; background: #1f5a3a; border-radius: 999px; white-space: nowrap; }
.rung-state.awarded { color: #2a1c06; background: linear-gradient(180deg, #ffe27a, #e9b632 55%, #c9a227); border: 1px solid #8a6a12; }
.rung-state.pending { background: #5e3a6e; }
.rung-state.closed { background: #6b5a44; }
.rung-line { margin: 0.25rem 0 0; font-size: 0.95rem; color: #3e2f1f; overflow-wrap: anywhere; }
.rung-record { margin: 0.15rem 0 0; font-size: 0.93rem; }
.rung-record > summary, .board-reasons > summary {
  display: flex; align-items: center; min-height: 40px; box-sizing: border-box;
  font: 600 0.92rem/1.3 var(--plain); color: #5a1216; cursor: pointer;
}
.rung-record > summary::before, .board-reasons > summary::before {
  content: ""; flex: none; width: 0; height: 0; margin-right: 0.45rem;
  border: 0.3rem solid transparent; border-left-color: #7a5c10;
}
.rung-record[open] > summary::before, .board-reasons[open] > summary::before {
  border-left-color: transparent; border-top-color: #7a5c10; margin-top: 0.3rem;
}
.rung-record > summary::-webkit-details-marker, .board-reasons > summary::-webkit-details-marker { display: none; }
.rung-record > summary { list-style: none; }
.board-reasons > summary { list-style: none; }
.rung-record > p { margin: 0.2rem 0; }

.prize-check { font-size: 0.9rem; color: #3e2f1f; }
.prize-state, .prize-paid { font-size: 0.95rem; }
.rung.awarded .prize-paid { font-weight: 700; color: #1f5a3a; }
.prize-review { font-size: 0.95rem; color: #2a1f14; }
.prize-review.rolled-back { font-style: italic; color: #7d1a1f; }
.board-line { margin: 0 0 0.4rem; font-size: 0.95rem; color: #3e2f1f; }
.board-reasons { margin: 0.2rem 0 0; font-size: 0.92rem; }
.board-reasons ol { margin: 0; padding: 0; list-style: none; }
.board-reasons li { padding: 0.3rem 0; border-top: 1px dotted rgba(122, 92, 16, 0.4); overflow-wrap: anywhere; }
.board-reasons .who { font-weight: 700; }
.board-reasons q { display: block; quotes: "\201C" "\201D"; }

/* The workroom. */
.workroom-count { margin: 0.1rem 0 0.3rem; }
.workroom-recent-title { margin: 0.6rem 0 0.1rem; font-style: italic; color: #5a4632; }
.workroom-recent { margin: 0; padding: 0; list-style: none; }
.workroom-recent li { padding: 0.3rem 0; border-bottom: 1px dotted rgba(122, 92, 16, 0.4); overflow-wrap: anywhere; }
.workroom-recent .kind { font-weight: 700; }
.workroom-recent .when { margin-left: 0.5rem; font-size: 0.88rem; font-style: italic; color: #6b5a44; }
.workroom-recent .upheld { margin-left: 0.5rem; padding: 0 0.4rem; font-size: 0.8rem; color: #fffaf0; background: #1f5a3a; border-radius: 999px; }
.problems-note { margin: 0.7rem 0 0; font-size: 0.9rem; font-style: italic; color: #5a4632; }

/* ---- The shelves and the Board: parchment cards in a grid ------------------------------- */
.college-grid {
  align-items: start;
  display: grid; gap: 1.5rem; margin-top: 1rem;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
}
.college-grid[hidden] { display: none; }
.college-grid > .band-waiting { grid-column: 1 / -1; }
.college-grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
#shelves-weeks { grid-template-columns: minmax(0, 1fr); margin-top: 1.5rem; }
/* Georgia's old-style 0 reads as an o: every figure in a card stands on the line. */
.college-card { min-width: 0; font-variant-numeric: lining-nums tabular-nums; }
.college-card h3 { margin-top: 0; font-size: 1.15rem; }
.card-note { margin: 0.6rem 0 0; font-size: 0.9rem; font-style: italic; color: #5a4632; }
.plain-list { margin: 0.3rem 0; padding-left: 1.2rem; font-variant-numeric: lining-nums tabular-nums; }
/* Bars with long names: the name and its figure on one line, the bar under them, so no name
   is cut short on a phone. */
.page-college .bar-row {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "label num" "track track";
  gap: 0.15rem 0.6rem;
}
.page-college .bar-label { grid-area: label; white-space: normal; overflow: visible; }
.page-college .bar-track { grid-area: track; }
.page-college .bar-num { grid-area: num; }
.tone-shelf { --tone: #8a5a1c; }

.weeks-charts { display: grid; gap: 1.5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.weeks-chart { min-width: 0; }
.weeks-title { margin: 0 0 0.2rem; font-size: 0.95rem; font-weight: 700; color: var(--wine-deep); }
.board-debates { margin-top: 1.4rem; }
.board-debates a { color: var(--pale-gold); }

/* ---- Phones: one column, and room for a thumb ------------------------------------------ */
@media (max-width: 760px) {
  .college-grid, .college-grid-three, .weeks-charts { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .problems { padding: 0.8rem 0.9rem; }
  .ladder > li.rung { grid-template-columns: 2.6rem minmax(0, 1fr); column-gap: 0.7rem; }
  .rung-wood::before, .rung-wood::after { width: 6px; }
  .tally { gap: 0.5rem 1rem; }
  .tally > li { min-width: 4.4rem; }
  .tally-num { font-size: 1.5rem; }
}
