/* The folders page. Brand tokens match the rest of the site: Montserrat,
   #1C208B, and #FCC200 used only ever as a fill — yellow on white is about
   1.8:1 and unreadable as ink (#21). */
:root {
  --ink: #1C208B;
  --accent: #FCC200;
  --body: #1b1b20;
  --muted: #6b6b76;
  --rule: #e4e4ea;
  --panel: #f7f7fa;
  --warn: #8a5a00;
}
* { box-sizing: border-box }

body {
  margin: 0;
  background: #fff;
  color: var(--body);
  font: 15px/1.55 Montserrat, system-ui, -apple-system, sans-serif;
}

header {
  background: var(--ink);
  color: #fff;
  padding: 14px 24px;
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
header h1 { margin: 0; font-size: 17px; font-weight: 500; letter-spacing: .04em }
header a { color: var(--accent); font-size: 13px; text-decoration: none }
header a:hover { text-decoration: underline }

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 16px 64px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}
@media (max-width: 900px) { main { grid-template-columns: 1fr } }

h2 {
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 34px 0 4px;
}
h2:first-child { margin-top: 0 }
.hint { color: var(--muted); font-size: 13px; margin: 0 0 14px }

.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end }
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px }
input, select {
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: #fff;
  color: inherit;
}
input[type=number] { width: 74px }
input:focus-visible, select:focus-visible, button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px }
.chip {
  font: inherit;
  font-size: 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  background: #fff;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 9px;
}
.chip:hover { border-color: var(--ink) }
/* The running order is filled in; the row of contests to add from is not. It
   used to key off aria-pressed, which stopped meaning anything once a contest
   could be added twice — the bottom row adds, the top row removes, and neither
   is a toggle (#83). */
#picked .chip { border-color: var(--ink); background: var(--ink); color: #fff }
#picked .chip:hover { background: #151a6e }
/* The position is the whole point of the ordered list, so it gets the accent
   as a fill on the blue chip rather than as ink anywhere. */
.chip .pos {
  background: var(--accent);
  color: var(--ink);
  border-radius: 999px;
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  font-size: 11px;
}
.muted-chips .chip { color: var(--muted) }

table { width: 100%; border-collapse: collapse; margin-top: 6px }
th {
  text-align: left;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
  padding: 6px 8px;
  border-bottom: 1px solid var(--rule);
}
td { padding: 7px 8px; border-bottom: 1px solid var(--rule); vertical-align: middle }
td.n, th.n { text-align: right; white-space: nowrap }
.warn { color: var(--warn); font-size: 12px }
.scope { color: var(--muted); font-size: 12px }

details { margin-top: 30px; border-top: 1px solid var(--rule); padding-top: 12px }
summary { cursor: pointer; font-size: 13px; color: var(--ink) }
.folder-contents { margin: 18px 0 0 }
.folder-contents h4 {
  margin: 0 0 2px;
  font-size: 13px;
  font-weight: 600;
}
.folder-contents ol { margin: 4px 0 0; padding-left: 20px; font-size: 13px }
.folder-contents li { padding: 1px 0 }
.folder-contents li span { color: var(--muted); font-size: 12px }
.folder-contents .byhand { color: var(--muted); font-size: 12.5px; margin: 5px 0 0 }

aside {
  position: sticky;
  top: 24px;
  background: var(--panel);
  border-radius: 10px;
  padding: 20px;
}
aside h3 {
  margin: 0 0 2px;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
}
.total { font-size: 30px; margin: 10px 0 0; line-height: 1.2 }
.total small { font-size: 13px; color: var(--muted); display: block; margin-top: 2px }
.stack { margin: 16px 0 0; padding: 0; list-style: none; font-size: 13px }
.stack li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
  border-bottom: 1px solid var(--rule);
}
.stack li span:last-child { color: var(--muted); white-space: nowrap }

button.go {
  margin-top: 18px;
  width: 100%;
  background: var(--ink);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 13px;
  font: inherit;
  cursor: pointer;
}
button.go:hover { background: #151a6e }
button.go[disabled] { background: var(--muted); cursor: default }

.progress { font-size: 12px; color: var(--muted); margin: 8px 0 0 }
.print-note { font-size: 12.5px; margin: 16px 0 0; line-height: 1.5 }
.print-note strong { color: var(--ink) }
.note { font-size: 12px; color: var(--muted); margin-top: 14px; line-height: 1.5 }

footer {
  border-top: 1px solid var(--rule);
  padding: 22px 16px 40px;
  max-width: 1180px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 12.5px;
}
footer p { margin: 0 0 6px }
footer a { color: var(--ink) }
