/* CS Job Board. One stylesheet, no build step, no external fonts.
 *
 * Direction: a printed classified sheet. A student scans this the way you
 * scan the back pages of a newspaper, so the page is ruled rather than
 * carded, dense rather than airy, and warm paper rather than dark glass.
 * A serif carries the thing you read (the job title) and a monospace carries
 * everything you compare (employer, counts, chips, controls). One accent, a
 * printer's rust red, and it is spent on two things only: the match rail and
 * the current filter.
 *
 * The page is light on purpose and does not follow the system dark setting.
 * Paper is paper. Every text pair below was measured against WCAG AA:
 *
 *   ink on paper            15.70
 *   ink-soft on paper        7.14
 *   ink-soft on band         6.23
 *   accent on paper          6.94
 *   accent on band           6.05
 *   paper on accent          6.94
 *   paper on ink            15.70
 *   have on have-bg          7.34
 *   working on working-bg    6.79
 *   ink on have-bg          14.09
 *   ink on working-bg       14.00
 *   rule-ui on paper         3.42  (borders, meets the 3:1 non-text bar)
 */

:root {
  --paper: #f4efe4;
  --band: #e8e0ce;
  --ink: #1a1610;
  --ink-soft: #564e42;
  --rule: #c2b49a;          /* hairlines between rows, decorative */
  --rule-ui: #8c7f68;       /* borders of things you operate */
  --accent: #97290f;
  --have: #14512a;
  --have-bg: #dce7d5;
  --working: #6b4200;
  --working-bg: #f0e2be;

  --serif: "Iowan Old Style", "Hoefler Text", Charter, "Palatino Linotype",
    Palatino, "Book Antiqua", Georgia, serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, "DejaVu Sans Mono",
    Consolas, "Liberation Mono", monospace;

  --tabs-height: 44px;
  --measure: 62rem;
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  /* Laid-paper grain. A static repeating gradient, no image, no request.
   * Kept faint and widely spaced: any stronger and it reads as banding on a
   * screen rather than as tone. */
  background-image: repeating-linear-gradient(
    0deg, rgba(26, 22, 16, 0.013) 0 1px, transparent 1px 7px);
  font: 17px/1.45 var(--serif);
  -webkit-text-size-adjust: 100%;
  overflow-wrap: break-word;
}

/* Every small label on this page is set in the same way, so the mono voice
 * reads as one thing rather than five near misses. */
.headline,
.tabs a,
.control-label,
.switch,
.result-count,
.flag,
.chip,
.job-org,
.employer-count,
.category-count,
.skill-demand,
.tri-button,
.filter-label,
.filter-clear,
.fact-label,
.status,
.quiet-button {
  font-family: var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

a { color: var(--accent); }

/* A hidden section stays hidden whatever display rule lands on it later. */
.view[hidden],
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ----------------------------------------------------------- masthead */

.masthead {
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
}

.masthead-inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 22px 24px 14px;
  display: flex;
  align-items: baseline;
  gap: 20px;
  flex-wrap: wrap;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}

.wordmark-rule {
  display: inline-block;
  width: 2px;
  height: 0.85em;
  background: var(--accent);
  transform: translateY(0.06em);
}

.headline {
  margin: 0 auto 0 0;
  font-size: 0.7rem;
  color: var(--ink-soft);
}

.quiet-button {
  background: none;
  border: none;
  border-bottom: 1px solid var(--rule-ui);
  color: var(--ink-soft);
  font-size: 0.68rem;
  padding: 4px 0;
  cursor: pointer;
}

.quiet-button:hover { color: var(--accent); border-color: var(--accent); }

/* --------------------------------------------------------------- tabs */

/* A child of body, not of the masthead, so it stays put for the whole page. */
.tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
  display: flex;
  overflow-x: auto;
}

.tabs a {
  display: flex;
  align-items: center;
  height: var(--tabs-height);
  padding: 0 18px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
  border-right: 1px solid var(--rule);
}

.tabs a:hover { color: var(--ink); background: var(--band); }

.tabs a[aria-current="page"] {
  color: var(--ink);
  box-shadow: inset 0 -4px 0 var(--accent);
}

/* --------------------------------------------------------------- main */

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 24px 96px;
}

h1, h2, h3 { font-weight: 600; }

.section-title { font-size: 1.5rem; margin: 24px 0 6px; }

.fine { font-size: 0.85rem; color: var(--ink-soft); }

/* ----------------------------------------------------------- controls */

.controls {
  position: sticky;
  /* clears the tab strip, which is the tab height plus its bottom rule */
  top: calc(var(--tabs-height) + 1px);
  z-index: 15;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
  display: flex;
  align-items: flex-end;
  gap: 20px;
  padding: 12px 0 10px;
  flex-wrap: wrap;
}

.control { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

.search-control { flex: 1 1 16rem; }

.control-label {
  font-size: 0.62rem;
  color: var(--ink-soft);
}

.controls input[type="search"],
.controls select {
  font: 15px/1.4 var(--mono);
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule-ui);
  padding: 8px 2px;
  min-height: 40px;
  width: 100%;
  border-radius: 0;
}

.controls select { min-width: 9rem; }

.controls input[type="search"]::placeholder { color: var(--ink-soft); }

.controls input[type="search"]:focus,
.controls select:focus { border-bottom-color: var(--accent); }

.switches { display: flex; gap: 18px; flex-wrap: wrap; }

.switch {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.66rem;
  color: var(--ink-soft);
  cursor: pointer;
  min-height: 40px;
}

.switch input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.switch:hover { color: var(--ink); }

/* ------------------------------------------------------- list heading */

.active-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 8px 12px;
  background: var(--band);
  border-left: 4px solid var(--accent);
}

.filter-label { font-size: 0.62rem; color: var(--ink-soft); }

.filter-value {
  font-family: var(--serif);
  font-weight: 600;
  margin-right: auto;
}

.filter-clear {
  background: none;
  border: 1px solid var(--rule-ui);
  color: var(--ink);
  font-size: 0.62rem;
  padding: 6px 12px;
  min-height: 32px;
  cursor: pointer;
}

.filter-clear:hover { border-color: var(--accent); color: var(--accent); }

.list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 18px 0 4px;
}

.result-count {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink);
}

.legend {
  margin: 0;
  font-size: 0.82rem;
  font-style: italic;
  color: var(--ink-soft);
  max-width: 46ch;
}

.nudge {
  margin: 14px 0 0;
  padding: 12px 14px;
  background: var(--band);
  border-left: 4px solid var(--ink);
  font-size: 0.95rem;
  max-width: 62ch;
}

/* --------------------------------------------------------------- jobs */

/* The list settles into place once, on load. It moves and never fades: an
 * engine that applies the first keyframe and never advances would otherwise
 * leave the whole board invisible, which is exactly what a Quick Look render
 * of this page did. A list of jobs must not need an animation to be read. */
#board-list { margin-top: 10px; animation: settle 200ms ease-out; }

@keyframes settle {
  from { transform: translateY(5px); }
  to { transform: none; }
}

.job {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 16px;
  padding: 13px 12px;
  margin: 0 -12px;
  border-top: 1px solid var(--rule);
  transition: background-color 90ms linear;
}

.job:first-child { border-top: none; }

.job:hover { background: var(--band); }

/* The match rail. Filled in proportion to the skills a student has against
 * the skills the posting asks for, so a scroll reads as a gradient. */
.rail { position: relative; background: rgba(26, 22, 16, 0.08); }

.rail-fill {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: var(--accent);
}

.job-body { min-width: 0; }

.job-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.job-title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
  min-width: 0;
}

.job-title a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule-ui);
}

.job-title a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.flags { display: flex; gap: 6px; flex-wrap: wrap; }

.flag {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 7px;
  white-space: nowrap;
  border: 1px solid var(--rule-ui);
  color: var(--ink-soft);
}

.flag-new { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.flag-entry { border-color: var(--ink); color: var(--ink); }
.flag-score { border-color: transparent; padding-right: 0; }

.job-org {
  margin: 5px 0 0;
  font-size: 0.66rem;
  color: var(--ink-soft);
}

.job-employer { color: var(--ink); font-weight: 600; }

.job-place::before {
  content: " / ";
  color: var(--rule-ui);
}

.job-readiness {
  margin: 6px 0 0;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--ink-soft);
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.chip {
  font-size: 0.62rem;
  font-weight: 600;
  padding: 5px 9px;
  min-height: 30px;
  background: transparent;
  border: 1px solid var(--rule-ui);
  color: var(--ink-soft);
  cursor: pointer;
  border-radius: 0;
}

.chip:hover { border-color: var(--ink); color: var(--ink); }

.chip-have {
  background: var(--have-bg);
  border-color: var(--have);
  color: var(--have);
}

.chip-working {
  background: var(--working-bg);
  border-style: dashed;
  border-color: var(--working);
  color: var(--working);
}

.chip-on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* ------------------------------------------------------ employer view */

.employer-group { margin-top: 34px; }

.employer-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-top: 3px solid var(--ink);
  padding: 8px 0 10px;
}

.employer-name { margin: 0; font-size: 1.15rem; }

.employer-count {
  font-size: 0.64rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

.empty {
  padding: 40px 0;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--ink-soft);
}

/* ---------------------------------------------------------- my skills */

.skills-head { padding: 26px 0 4px; max-width: 62ch; }

.skills-summary { margin: 0 0 12px; font-size: 1.05rem; }

.meter {
  display: flex;
  height: 8px;
  background: rgba(26, 22, 16, 0.08);
  margin-bottom: 12px;
}

.meter-have { background: var(--have); }
.meter-working { background: var(--working); }

.category { margin-top: 34px; }

.category-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-top: 3px solid var(--ink);
  padding: 8px 0 10px;
}

.category-name { margin: 0; font-size: 1.15rem; }
.category-count { font-size: 0.64rem; color: var(--ink-soft); }

.skill {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 20px;
  padding: 10px 12px;
  margin: 0 -12px;
  border-top: 1px solid var(--rule);
}

.skill:hover { background: var(--band); }

.skill-child { padding-left: 26px; border-left: 3px solid var(--rule); }

.skill-main { min-width: 0; }

.skill-name { font-weight: 600; }

.skill-demand {
  font-size: 0.6rem;
  color: var(--ink-soft);
  margin-left: 10px;
  white-space: nowrap;
}

/* A skill the student has marked gets a quiet rule at the left edge, in line
 * with the match rail on a job row. The accent is not spent here: it means
 * match strength and current filter, and nothing else. */
.skill-marked { box-shadow: inset 3px 0 0 var(--rule-ui); }

.skill-desc {
  margin: 3px 0 0;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--ink-soft);
}

/* A joined three-way switch. One line, one border, no full-width buttons. */
.tri { display: flex; border: 1px solid var(--rule-ui); }

.tri-button {
  font-size: 0.62rem;
  font-weight: 600;
  padding: 0 12px;
  min-height: 40px;
  background: transparent;
  border: none;
  border-right: 1px solid var(--rule-ui);
  color: var(--ink-soft);
  cursor: pointer;
  white-space: nowrap;
}

.tri-button:last-child { border-right: none; }
.tri-button:hover { background: var(--band); color: var(--ink); }

.tri-button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* Not yet is the resting state, so being on it is marked quietly. */
.tri-button.tri-none[aria-pressed="true"] {
  background: var(--band);
  color: var(--ink);
  box-shadow: inset 0 -4px 0 var(--ink-soft);
}

.tri-button.tri-working[aria-pressed="true"] {
  background: var(--working-bg);
  color: var(--working);
  box-shadow: inset 0 -4px 0 var(--working);
}

.tri-button.tri-have[aria-pressed="true"] {
  background: var(--have);
  color: var(--paper);
}

.evidence { grid-column: 1 / -1; }

.evidence label {
  display: block;
  font-size: 0.8rem;
  font-style: italic;
  color: var(--ink-soft);
  margin-bottom: 4px;
}

.evidence input {
  width: 100%;
  font: 15px/1.4 var(--mono);
  padding: 9px 10px;
  min-height: 40px;
  border: 1px solid var(--rule-ui);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
}

.evidence input:focus { border-color: var(--accent); }

/* --------------------------------------------------------- signed out */

.intro { padding: 40px 0 20px; }

.intro-title {
  margin: 0 0 18px;
  font-size: 2.3rem;
  line-height: 1.12;
  letter-spacing: -0.01em;
  max-width: 18ch;
}

.intro-lede {
  margin: 0;
  font-size: 1.1rem;
  max-width: 58ch;
  color: var(--ink-soft);
}

.intro .fine { max-width: 58ch; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 0.72rem/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 0 26px;
  min-height: 52px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  margin: 26px 0 14px;
}

.btn:hover { background: var(--accent); border-color: var(--accent); }

.unavailable {
  margin: 26px 0 14px;
  padding: 14px 16px;
  background: var(--band);
  border-left: 4px solid var(--working);
  max-width: 58ch;
}

.unavailable strong { display: block; margin-bottom: 4px; }
.unavailable span { color: var(--ink-soft); font-size: 0.92rem; }

.intro-facts {
  list-style: none;
  margin: 34px 0 0;
  padding: 0;
  max-width: 58ch;
  border-top: 3px solid var(--ink);
}

.intro-facts li {
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.fact-label {
  display: block;
  font-size: 0.62rem;
  color: var(--ink);
  margin-bottom: 3px;
}

/* ------------------------------------------------------------- status */

.status {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 22px;
  z-index: 30;
  margin: 0;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.66rem;
  max-width: calc(100% - 32px);
}

/* --------------------------------------------------------------- small */

@media (max-width: 640px) {
  body { font-size: 16px; }

  .masthead-inner { padding: 16px 16px 12px; gap: 10px; }
  .wordmark { font-size: 1.3rem; }
  .headline { flex-basis: 100%; margin: 0; }
  main { padding: 0 16px 96px; }

  .tabs a { padding: 0 14px; font-size: 0.66rem; }

  .controls { gap: 12px; padding: 10px 0 8px; }
  .search-control { flex-basis: 100%; }
  .control { flex: 1 1 100%; }

  .list-head { display: block; }
  .legend { margin-top: 6px; }

  .job { gap: 12px; grid-template-columns: 6px minmax(0, 1fr); }
  .intro-title { font-size: 1.8rem; max-width: none; }

  .skill { grid-template-columns: minmax(0, 1fr); }
  .tri { justify-self: start; }
  .tri-button { flex: 1 1 auto; padding: 0 10px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

@media print {
  .tabs, .controls, .quiet-button, .status { display: none; }
  body { background: #fff; }
}
