/* Same look as the Foothill Sidequest applicant quiz. */
:root {
  --ink: #253d63;
  --blue: #315ee8;
  --line: #cbd6e4;
  --muted: #566a85;
  --soft: #f3f7fb;
  --red: #a02f3d;
  font-family: system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: #eef3fa;
}

* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }

header {
  display: flex;
  align-items: center;
  padding: 18px max(20px, calc((100% - 1040px) / 2));
  border-bottom: 1px solid var(--line);
  background: #fff;
}
header .brand { font: 700 17px 'Trebuchet MS', sans-serif; letter-spacing: -0.3px; }

main { max-width: 720px; margin: 36px auto; padding: 0 20px 48px; }
main.wide { max-width: 1100px; }

h1, h2 { font-family: 'Trebuchet MS', system-ui, sans-serif; font-weight: 700; line-height: 1.15; letter-spacing: -0.7px; }
h1 { font-size: clamp(28px, 5vw, 40px); margin: 0 0 16px; }
h2 { font-size: 24px; margin: 0 0 12px; }
p { line-height: 1.6; color: var(--muted); }
a { color: var(--blue); }
code { font-size: 12px; overflow-wrap: anywhere; }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 5px 15px #253d6306;
}
.card.narrow { max-width: 450px; margin: 70px auto; }
.eyebrow { font: 600 13px ui-monospace, monospace; color: var(--blue); margin: 0 0 14px; }
.muted { color: var(--muted); }
.notice { background: #e8efff; border-radius: 8px; padding: 12px 16px; margin: 18px 0; color: var(--ink); }
.error { color: var(--red); font-weight: 600; min-height: 20px; margin: 0; white-space: pre-line; }
.hint { font-size: 13px; font-weight: 400; color: var(--muted); }

button, input, select, textarea { font: inherit; }
button {
  border: 0;
  border-radius: 9px;
  background: var(--blue);
  color: #fff;
  padding: 12px 18px;
  font-weight: 650;
  min-height: 46px;
  cursor: pointer;
}
button.secondary { background: #e7edf7; color: var(--ink); }
button.small { min-height: 0; padding: 6px 12px; font-size: 13px; }
button:disabled { opacity: 0.6; cursor: wait; }
:focus-visible { outline: 3px solid #957c17; outline-offset: 3px; }

.stack { display: flex; flex-direction: column; gap: 16px; }
.stack > button { align-self: flex-start; }
.field { display: flex; flex-direction: column; gap: 6px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.toolbar h1 { margin: 0; }

fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 700; margin-bottom: 12px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.fields.three { grid-template-columns: 2fr 1fr 1fr; }
.fields legend { grid-column: 1 / -1; }
label { display: flex; flex-direction: column; gap: 7px; font-size: 14px; font-weight: 600; }
input, select, textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 11px;
  border: 1px solid #a8b8cd;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
}
textarea { font-family: ui-monospace, monospace; font-size: 14px; }
.actions input { flex: 1; }

.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice legend { grid-column: 1 / -1; }
.option {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
}
.option:has(input:checked) { border-color: var(--blue); background: #edf2ff; }
.option input { width: 18px; height: 18px; min-height: 18px; margin: 0; accent-color: var(--blue); }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0 0 24px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 10px; margin: 20px 0 0; background: #fff; }
table { border-collapse: collapse; width: 100%; font-size: 13px; text-align: left; }
th, td { padding: 10px 12px; border-bottom: 1px solid #e0e7f1; }
th { background: var(--soft); font-weight: 650; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }

.badge { display: inline-block; border-radius: 5px; padding: 3px 7px; background: #e7edf7; font-size: 12px; }
.badge.joined { background: #e2f2eb; color: #215843; }
.badge.declined { background: #fff0e0; color: #794411; }

@media (max-width: 600px) {
  main { margin: 22px auto; padding: 0 12px 32px; }
  .card { padding: 22px 18px; border-radius: 12px; }
  .fields, .fields.three, .choice { grid-template-columns: 1fr; }
  header { padding: 16px; }
}
