/* Layout: white page, sticky left index + saved list, one long reading column; SSW vernacular (maize-highlighted title, navy labels, arrow link lists, calendar date tiles). */
:root {
  --navy: #00274c;
  --maize: #ffcb05;
  --ink: #111418;
  --muted: #4b5563;
  --rule: #d8dce2;
  --wash: #f3f5f8;
  --link: #19417c;
  --open: #1d6b3a;
  --likely: #19417c;
  --check: #8a5a00;
  --font: "Public Sans", "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: #fff; color: var(--ink); font-family: var(--font); font-size: 16.5px; line-height: 1.6; font-variant-numeric: lining-nums; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--navy); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--maize); outline-offset: 2px; }
.wrap { max-width: 1240px; margin: 0 auto; padding-inline: 24px; }

/* Masthead: one quiet line of type, no bar */
.masthead { border-bottom: 1px solid var(--rule); }
.masthead-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 14px; font-size: 14px; color: var(--navy); }
.masthead-row span:first-child { font-weight: 700; }

.layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; padding-block: 40px 72px; }
.side { position: sticky; top: 24px; align-self: start; display: grid; gap: 36px; max-height: calc(100vh - 48px); overflow-y: auto; }
.side-head { margin: 0 0 8px; font-size: 14px; color: var(--muted); }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { border-bottom: 1px solid var(--rule); }
.toc a { display: flex; gap: 10px; align-items: baseline; padding-block: 9px; color: var(--ink); text-decoration: none; }
.toc a::before { content: "\2192"; color: #c99a00; font-weight: 700; }
.toc a:hover { color: var(--link); text-decoration: underline; }
.n { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }

.mylist ol { margin: 0 0 12px; padding-left: 22px; font-size: 15px; }
.mylist li { margin-bottom: 6px; line-height: 1.4; }
.mylist li button { white-space: nowrap; }
.mylist li button { border: 0; background: none; padding: 0 0 0 6px; color: var(--muted); cursor: pointer; font: inherit; font-size: 13px; text-decoration: underline; }
.list-empty { margin: 0 0 12px; font-size: 14px; color: var(--muted); }

.btn { font: inherit; font-weight: 800; font-size: 16px; background: var(--maize); color: #000; border: 2px solid var(--maize); padding: 10px 18px; cursor: pointer; }
.btn:hover { background: #fff; }
.btn:disabled { background: var(--wash); border-color: var(--rule); color: var(--muted); cursor: default; }
.linkbtn { display: block; margin-top: 8px; border: 0; background: none; padding: 0; font: inherit; font-size: 14px; color: var(--link); text-decoration: underline; cursor: pointer; }

/* Title: SSW maize highlight */
.intro h1 { margin: 0 0 18px; font-size: clamp(34px, 5vw, 48px); line-height: 1.2; font-weight: 800; letter-spacing: -0.01em; }
.intro h1 span { background: var(--maize); padding: 2px 12px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.intro p { margin: 0; max-width: 68ch; }

.block { margin-top: 56px; scroll-margin-top: 24px; }
.label { display: inline-block; margin: 0 0 16px; padding: 4px 10px; background: var(--navy); color: #fff; font-size: 24px; font-weight: 800; line-height: 1.3; }
.lede { margin: 0 0 20px; max-width: 72ch; color: var(--ink); }

/* Ask box */
#ask label { display: block; font-weight: 700; margin-bottom: 8px; }
textarea, input[type=search] { width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid #8a94a3; border-radius: 0; padding: 12px 14px; }
textarea { resize: vertical; min-height: 96px; }
.ask-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 14px; }
.tip { margin: 0; font-size: 15px; color: var(--muted); max-width: 70ch; }

/* Results */
#results { margin-top: 28px; }
.status { padding: 14px 0; color: var(--muted); }
.status.err { color: #8f2d2d; }
.summary { margin: 0 0 8px; padding: 14px 18px; background: var(--wash); border-left: 4px solid var(--maize); max-width: 80ch; }
.rgroup { margin: 28px 0 0; font-size: 20px; font-weight: 700; color: var(--navy); }

/* Entry rows (shared by results and directory) */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.row { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 4px 12px; padding-block: 16px; border-bottom: 1px solid var(--rule); }
.row.with-why { grid-template-columns: 28px minmax(0, 1.15fr) minmax(0, 1fr); column-gap: 24px; }
.row.saved { background: rgba(255, 203, 5, .14); }
.row input[type=checkbox] { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--navy); cursor: pointer; }
.row h3, .row h4 { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.35; }
.row .org { margin: 2px 0 0; font-size: 15px; color: var(--muted); }
.row .desc { margin: 6px 0 0; font-size: 16px; max-width: 70ch; }
.row .facts { margin: 6px 0 0; font-size: 15px; }
.row .facts b { font-weight: 700; }
.elig { display: inline-flex; align-items: baseline; gap: 6px; margin-top: 6px; font-size: 15px; }
.elig::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; transform: translateY(-1px); }
.elig.Open { color: var(--open); } .elig.Likely { color: var(--likely); } .elig.Check { color: var(--check); }
.why { margin: 0; font-size: 16px; padding-left: 18px; border-left: 3px solid var(--maize); align-self: start; }
.why b { font-weight: 700; }

.kind { margin: 30px 0 8px; font-size: 19px; font-weight: 800; display: flex; gap: 8px; align-items: baseline; }
.kind .n { font-weight: 400; }
.subhub { margin: 34px 0 0; font-size: 22px; font-weight: 800; color: var(--navy); border-bottom: 3px solid var(--maize); padding-bottom: 4px; display: inline-block; }

/* Upcoming deadline tiles, SSW academic-calendar style */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px 28px; }
.tile { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 14px; align-items: start; padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.date { border: 1px solid var(--rule); text-align: center; line-height: 1.1; }
.date .m { display: block; background: var(--maize); font-size: 13px; font-weight: 700; padding: 3px 0; }
.date .d { display: block; font-size: 22px; font-weight: 700; padding: 6px 0; font-variant-numeric: tabular-nums; }
.tile a { font-weight: 700; }
.tile p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }

/* Filter bar */
.filterbar { margin-top: 64px; padding: 20px 22px; background: var(--wash); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 28px; align-items: end; }
.filterbar > label { grid-column: 1 / -1; font-weight: 700; margin-bottom: -4px; }
.filterbar fieldset { border: 0; margin: 0; padding: 0; display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: 15px; }
.filterbar legend { font-size: 14px; color: var(--muted); padding: 0; margin-bottom: 4px; }
.filterbar fieldset label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.noitems { color: var(--muted); padding: 12px 0; }

/* Footer */
.foot { background: var(--navy); color: #fff; }
.foot-row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; padding-block: 36px; font-size: 15px; }
.foot p { margin: 0 0 8px; max-width: 60ch; }
.addr { user-select: all; font-weight: 700; }

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-block: 24px 56px; }
  .side { position: static; max-height: none; grid-template-columns: 1fr; order: 2; }
  .toc { display: none; }
  .row.with-why { grid-template-columns: 28px minmax(0, 1fr); }
  .row.with-why .why { grid-column: 2; margin-top: 8px; }
  .ask-row, .filterbar, .foot-row { grid-template-columns: minmax(0, 1fr); }
  .mylist { position: sticky; bottom: 0; background: #fff; border-top: 2px solid var(--navy); padding: 12px 0; }
  .mylist ol, .list-empty { display: none; }
}
@media (max-width: 480px) {
  .wrap { padding-inline: 16px; }
  .label { font-size: 22px; }
  .masthead-row span:last-child { display: none; }
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
