/* Prowess look and feel. One stylesheet for both apps.
   Values are taken from the storyboard: navy, teal, orange, square corners, system font. */
:root {
  --navy: #0B1F3A;
  --ink: #1E2A38;
  --muted: #4A5868;
  --teal: #0E6B6B;
  --teal-pale: #9EE3E3;
  --orange: #F28C28;
  --orange-hover: #FFA54D;
  --line: #C5CED8;
  --page: #F3F6F9;
  --white: #ffffff;
  --danger: #b3261e;
  --ok: #1a7f37;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--page);
}

a { color: var(--teal); }
a:hover { color: var(--navy); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; background: var(--white); padding: 8px 12px; z-index: 10; }

/* Top bar */
.topbar {
  background: var(--navy);
  color: var(--white);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(158, 227, 227, .4);
}
.topbar .mark {
  width: 28px; height: 28px;
  background: var(--orange); color: var(--navy);
  font-weight: 800; font-size: 19px; line-height: 1;
  display: grid; place-items: center;
}
.topbar .name { font-weight: 700; font-size: 19px; letter-spacing: .02em; }
.topbar a { font-size: 14px; color: var(--teal-pale); }
.topbar a:hover, .topbar a[aria-current="page"] { color: var(--white); }
.topbar a[aria-current="page"] { font-weight: 600; }
.topbar .name + a { margin-left: 24px; }
.topbar .who { margin-left: auto; font: 13px var(--mono); color: var(--teal-pale); }

/* Page */
.page { max-width: 1040px; margin: 0 auto; padding: 32px; }
.page.narrow { max-width: 720px; }

h1 { margin: 0 0 24px; font-size: 32px; font-weight: 700; letter-spacing: -.02em; color: var(--navy); }
h2 { margin: 0 0 8px; font-size: 20px; font-weight: 600; }
p { margin: 0 0 16px; }
.muted { color: var(--muted); }
.lede { margin: 0 0 24px; border-left: 3px solid var(--teal); padding-left: 12px; }
.heading-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
.heading-row h1 { margin: 0; }

/* Panels */
.panel { background: var(--white); border: 1px solid var(--navy); padding: 24px; margin-bottom: 24px; }
.panel.empty { padding: 48px 24px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.panel.empty p { margin: 0; color: var(--muted); }
.notice { background: var(--white); border: 1px solid var(--navy); padding: 12px 16px; margin-bottom: 20px; }
.notice.dev { border-style: dashed; font: 13px var(--mono); }

/* Buttons. The "blueprint" corner marks are the storyboard's signature. */
.btn {
  position: relative;
  display: inline-block;
  background: var(--orange); color: var(--navy);
  padding: 12px 20px;
  border: 0; border-radius: 0;
  font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--orange-hover); color: var(--navy); }
.btn.quiet { background: var(--white); border: 1px solid var(--navy); }
.btn.quiet:hover { background: var(--page); }
.btn::before, .btn::after {
  content: ""; position: absolute; width: 11px; height: 11px; pointer-events: none;
  background:
    linear-gradient(rgba(11, 31, 58, .6), rgba(11, 31, 58, .6)) 5px 0 / 1px 100% no-repeat,
    linear-gradient(rgba(11, 31, 58, .6), rgba(11, 31, 58, .6)) 0 5px / 100% 1px no-repeat;
}
.btn::before { top: -6px; left: -6px; }
.btn::after { bottom: -6px; right: -6px; }

/* Forms */
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; }
input, select, textarea {
  font: inherit; font-weight: 400;
  padding: 12px;
  border: 1px solid var(--navy); border-radius: 0;
  background: var(--white); color: var(--ink);
}

/* Tables */
table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--navy); }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top; }
th { font-weight: 600; color: var(--navy); background: var(--page); }
tr:last-child td { border-bottom: 0; }
td.mono, .mono { font-family: var(--mono); font-size: 13px; }

.footer { max-width: 1040px; margin: 0 auto; padding: 0 32px 32px; font-size: 13px; color: var(--muted); }

@media (max-width: 600px) {
  .topbar { padding: 12px 16px; }
  .page { padding: 20px 16px; }
  h1 { font-size: 26px; }
}

/* Forms, continued */
.page.slim { max-width: 560px; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.hint { font-size: 13px; font-weight: 400; color: var(--muted); }
.hint.indent { display: block; margin: -2px 0 8px 28px; }
.error { font-size: 14px; font-weight: 600; color: var(--danger); }
.notice.problem { border-color: var(--danger); border-left-width: 4px; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
legend { padding: 0; margin-bottom: 6px; font-size: 14px; font-weight: 500; }
label.choice { flex-direction: row; align-items: center; gap: 10px; font-size: 15px; font-weight: 400; }
input[type="radio"], input[type="checkbox"] { width: 18px; height: 18px; padding: 0; accent-color: var(--teal); flex: none; }
[aria-invalid="true"] { border-color: var(--danger); border-width: 2px; }

/* Sign out sits in the top bar as a quiet link */
form.inline { display: inline; margin: 0; }
.linklike { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; color: var(--teal-pale); text-decoration: underline; cursor: pointer; }
.linklike:hover { color: var(--white); }

/* Job screens */
[hidden] { display: none !important; }
textarea { width: 100%; min-height: 160px; resize: vertical; }
textarea.short { min-height: 90px; }
.row { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.row > * { flex: 1 1 180px; }
.row.tight > * { flex: 0 1 auto; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.count { font-size: 13px; font-weight: 400; color: var(--muted); }
.warn { font-size: 14px; color: #7d4e00; background: #FDF3E3; border-left: 3px solid var(--orange); padding: 8px 12px; }
.step-of { margin: -16px 0 20px; color: var(--muted); }
.badge { display: inline-block; font: 600 12px var(--mono); letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border: 1px solid var(--navy); background: var(--white); color: var(--navy); vertical-align: middle; }
.badge.open { background: var(--teal); border-color: var(--teal); color: var(--white); }
.badge.closed { background: var(--muted); border-color: var(--muted); color: var(--white); }
h1 .badge { margin-left: 10px; }
h3 { margin: 0 0 8px; font-size: 16px; font-weight: 600; color: var(--navy); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.section-head h2, .section-head h3 { margin: 0; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.facts li { border: 1px solid var(--line); padding: 4px 10px; font-size: 14px; background: var(--page); }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; }
details.guide { background: var(--white); border: 1px solid var(--navy); margin-bottom: 20px; }
details.guide > summary { padding: 12px 16px; font-weight: 600; cursor: pointer; }
details.guide > div { padding: 0 16px 8px; }

/* Buttons that are not the main action */
.btn.small { padding: 6px 12px; font-size: 14px; }
.btn.small::before, .btn.small::after { display: none; }
.btn[disabled], .btn.disabled { background: var(--line); color: var(--muted); cursor: not-allowed; }

/* Criteria */
.criteria { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.criterion { background: var(--white); border: 1px solid var(--line); padding: 12px 16px; display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: start; }
.criterion .body p { margin: 0; }
.criterion .meta { font-size: 13px; color: var(--muted); }
.criterion .tools { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.criterion.editing { display: block; border-color: var(--navy); }
.chip { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; font: 700 13px var(--mono); }
.chip.k { background: var(--navy); color: var(--white); }
.chip.c0 { background: #BFE6E6; color: #0E6B6B; } .chip.c1 { background: #FBD9B3; color: #A85A00; }
.chip.c2 { background: #C9D5EA; color: #0B1F3A; } .chip.c3 { background: #F3E9A6; color: #6B5A00; }
.chip.c4 { background: #E5CDEB; color: #6A2C7A; } .chip.c5 { background: #CFE8C5; color: #2E6B1E; }
.chip.c6 { background: #F6CBD0; color: #8E1B2B; }
.tag { font-size: 12px; font-weight: 600; border: 1px solid var(--muted); color: var(--muted); padding: 1px 6px; }

/* Checks, workflow strip, history, filters */
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.checks li:last-child { border-bottom: 0; }
.checks .ok { color: var(--ok); font-weight: 600; }
.checks .missing { color: var(--danger); font-weight: 600; }
.steps { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.steps li { border: 1px solid var(--navy); background: var(--white); padding: 8px 12px; font-size: 14px; min-width: 120px; }
.steps li.review { border-style: dashed; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filters a { border: 1px solid var(--navy); background: var(--white); color: var(--ink); padding: 6px 12px; font-size: 14px; text-decoration: none; }
.filters a[aria-current="true"] { background: var(--navy); color: var(--white); }
.history { list-style: none; margin: 0; padding: 0; background: var(--white); border: 1px solid var(--navy); }
.history li { padding: 10px 16px; border-bottom: 1px solid var(--line); }
.history li:last-child { border-bottom: 0; }
.history .when { font: 13px var(--mono); color: var(--muted); }
.history ul { margin: 4px 0 0; padding-left: 20px; font-size: 14px; color: var(--muted); }
td a.title { font-weight: 600; }

/* Applicant pages */
.topbar a.who { font: 13px var(--mono); }
.joblist { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.joblist .panel { margin: 0; padding: 16px 20px; }
.joblist h3 { font-size: 18px; }
.soon { color: #7d4e00; font-weight: 600; }
.panel.before { border-left: 4px solid var(--teal); }
.points { margin: 0 0 16px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.points li { border-left: 3px solid var(--line); padding-left: 12px; }
.points.plain li { border-left-color: var(--teal); }
.numbered { margin: 0 0 16px; padding-left: 24px; display: flex; flex-direction: column; gap: 6px; }
.applybar { display: none; }
@media (max-width: 600px) {
  .applybar { display: flex; position: sticky; bottom: 0; margin: 0 -16px -20px; padding: 12px 16px; background: var(--white); border-top: 1px solid var(--navy); justify-content: space-between; align-items: center; gap: 12px; }
}
fieldset.question { border: 1px solid var(--line); padding: 14px 16px; margin: 0 0 16px; }
fieldset.question legend { font-weight: 600; padding: 0 6px; }
label.choice { display: inline-flex; align-items: center; gap: 8px; margin-right: 24px; font-weight: 400; }
.field-error { color: #a4262c; margin: 8px 0 0; }
.counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0 0 12px; padding: 0; list-style: none; }
.counts li { border: 1px solid var(--line); background: var(--white); padding: 12px 14px; }
.counts strong { display: block; font-size: 24px; font-weight: 500; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.reference { border: 1px dashed var(--navy); padding: 12px 16px; margin: 0 0 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.reference strong { font: 600 20px var(--mono); letter-spacing: 1px; }
.btn.small { padding: 4px 10px; font-size: 13px; }
dl.summary { display: grid; grid-template-columns: minmax(140px, 1fr) 2fr; gap: 8px 16px; margin: 0 0 16px; }
dl.summary dt { color: var(--muted); }
dl.summary dd { margin: 0; overflow-wrap: anywhere; }
.privacy { border-top: 1px solid var(--line); padding-top: 16px; }
@media (max-width: 600px) { dl.summary { grid-template-columns: 1fr; gap: 2px; } dl.summary dd { margin-bottom: 10px; } }
@media print { .topbar, .actions, .applybar { display: none; } }
