:root {
  font: 100%/1.5 "Segoe UI", system-ui, sans-serif;
  color: #18233a;
  background: #f3f6fb;
  --ink: #18233a;
  --muted: #52617a;
  --line: #dce3ee;
  --accent: #314abc;
  --accent-dark: #253b9c;
  --pale: #e9eeff;
  --navy: #182540;
  --surface: #fff;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
h1, h2, h3, h4, p, dl, dd { margin: 0; }
h1, h2, h3, h4 { line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 2.8rem); letter-spacing: -.055em; }
h2 { font-size: 1.2rem; letter-spacing: -.022em; }
h3 { font-size: 1.05rem; }
h4 { font-size: .9rem; margin: 1rem 0 .6rem; }
p { overflow-wrap: anywhere; }
a { color: var(--accent-dark); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #547aff; outline-offset: 3px; }

.workspace { min-height: 100vh; display: grid; grid-template-columns: 216px minmax(0, 1fr); }
.sidebar {
  display: flex;
  position: sticky;
  top: 0;
  height: 100vh;
  flex-direction: column;
  padding: 1.65rem 1rem 1.35rem;
  background: var(--navy);
  color: #fff;
}
.brand {
  display: flex;
  align-items: center;
  gap: .62rem;
  width: max-content;
  padding: 0 .4rem;
  font-size: 1.4rem;
  font-weight: 720;
  text-decoration: none;
  letter-spacing: -.045em;
  color: #fff;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  height: 2rem;
  width: 2rem;
  border-radius: .58rem;
  background: #bac6ff;
}
.brand-mark::before {
  content: "";
  width: 1rem;
  height: 1.13rem;
  background: #273b9a;
  clip-path: polygon(49% 0, 100% 0, 66% 41%, 89% 41%, 28% 100%, 41% 58%, 0 58%);
}
.sidebar nav { display: grid; gap: .35rem; margin-top: 2.8rem; }
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .7rem .75rem;
  border-radius: .52rem;
  color: #d4deef;
  text-decoration: none;
  font-size: .95rem;
  font-weight: 600;
}
.sidebar nav a:hover { background: #202f50; color: #fff; }
.sidebar nav a[aria-current="page"] { background: #303f66; color: #fff; }
.nav-icon { display: inline-grid; place-items: center; width: 1.2rem; font-size: 1.28rem; color: #c8d3ff; line-height: 1; }
.sidebar-footer { display: flex; align-items: center; gap: .62rem; margin-top: auto; padding: .7rem .45rem 0; font-size: .84rem; color: #c6d2e9; }
.indicator { height: .48rem; width: .48rem; background: #a8dcca; border-radius: 50%; }

main { width: 100%; max-width: 1500px; padding: clamp(1.25rem, 4vw, 3.5rem); margin: 0 auto; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; margin-bottom: 1.75rem; }
.page-header p { margin-top: .45rem; color: var(--muted); }
.header-actions, .row-actions { display: flex; gap: .55rem; align-items: center; flex-wrap: wrap; }
.header-actions { flex-shrink: 0; }
.row-actions { margin-top: .9rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .55rem .83rem;
  min-height: 2.55rem;
  border: 1px solid #cbd5e6;
  border-radius: .52rem;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  font-size: .9rem;
  font-weight: 600;
}
.button:hover { border-color: #8d9cbc; background: #f6f8fc; }
.button.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.button.primary:hover { border-color: var(--accent-dark); background: var(--accent-dark); }
.button.quiet { padding: .4rem .55rem; border-color: transparent; color: var(--accent-dark); }
.button.danger { color: #982737; }
.button:disabled { cursor: default; opacity: .56; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; margin-bottom: 1.45rem; }
.metric, .panel { border: 1px solid var(--line); border-radius: .8rem; background: var(--surface); box-shadow: 0 2px 4px #18254006; }
.metric { display: flex; flex-direction: column; padding: .9rem 1.05rem; }
.metric dt { font-size: .9rem; font-weight: 610; color: var(--muted); }
.metric dd { margin-top: .22rem; color: var(--ink); font-size: 1.85rem; font-weight: 690; font-variant-numeric: tabular-nums; letter-spacing: -.04em; line-height: 1.2; }
.metric.ready dd { color: #3c51b4; }
.metric.submitted dd { color: #24715e; }
.metric.interview dd { color: #795a17; }
.board { display: grid; grid-template-columns: minmax(230px, .75fr) minmax(0, 1.67fr); gap: 1rem; align-items: start; }
.queue { min-height: 366px; overflow: hidden; }
.section-header { display: flex; align-items: center; justify-content: space-between; gap: .65rem; }
.queue > header { min-height: 4rem; padding: .85rem; border-bottom: 1px solid var(--line); }
.queue select { min-width: 0; width: auto; font-size: .82rem; padding-block: .38rem; }
.queue h2 { white-space: nowrap; }
.queue-empty { padding: 1.2rem .9rem; font-size: .9rem; color: var(--muted); }
.job-row {
  display: grid;
  gap: .2rem;
  width: 100%;
  padding: .9rem .86rem .9rem .75rem;
  border: 0;
  border-left: 3px solid transparent;
  border-bottom: 1px solid #e8edf5;
  background: #fff;
  text-align: left;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.job-row:last-child { border-bottom: 0; }
.job-row:hover { background: #f4f7fc; }
.job-row[aria-current="true"] { border-left-color: var(--accent); background: #f0f3ff; }
.job-row:focus-visible { outline-offset: -3px; }
.job-title { font-weight: 650; line-height: 1.3; }
.metadata { color: var(--muted); font-size: .89rem; }
.stage { width: fit-content; margin-top: .35rem; padding: .11rem .48rem; border-radius: 1rem; background: #edf1f7; color: #40516d; font-size: .8rem; font-weight: 640; }
.stage.ready { color: #293c9b; background: #e2e8ff; }
.stage.submitted { color: #1d6652; background: #dff3eb; }
.stage.interview { color: #6b4f17; background: #f8edcf; }
.detail { min-height: 366px; }
.empty-detail {
  display: flex;
  min-height: 364px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.6rem;
  text-align: center;
}
.empty-detail h2 { font-size: 1.35rem; }
.empty-detail p { max-width: 30ch; margin: .52rem 0 1.05rem; color: var(--muted); }
.empty-icon {
  display: grid;
  width: 3.1rem;
  height: 3.1rem;
  place-items: center;
  margin-bottom: .9rem;
  border-radius: .95rem;
  background: var(--pale);
  color: var(--accent-dark);
  font-size: 1.8rem;
}
.detail-header { display: flex; justify-content: space-between; align-items: start; gap: .9rem; padding: 1.25rem 1.15rem 1.05rem; }
.detail-header h2 { margin: .2rem 0 .25rem; font-size: clamp(1.2rem, 3vw, 1.7rem); overflow-wrap: anywhere; }
.company { color: var(--accent-dark); font-size: .9rem; font-weight: 650; }
.detail-nav { display: flex; gap: .18rem; padding: 0 .7rem; border-bottom: 1px solid var(--line); }
.detail-nav button { padding: .68rem .54rem; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: .88rem; font-weight: 620; }
.detail-nav button:hover { color: var(--accent-dark); }
.detail-nav button[aria-pressed="true"] { border-bottom-color: var(--accent); color: var(--accent-dark); }
.detail-content { padding: 1.1rem 1.15rem 1.3rem; }
.description-header { margin-top: 1.35rem; }
.description { white-space: pre-wrap; margin-top: .18rem; }
.help { margin-top: .45rem; color: var(--muted); font-size: .93rem; }
.terms { display: flex; flex-wrap: wrap; gap: .33rem; margin: 0; padding: 0; list-style: none; }
.terms li { padding: .16rem .55rem; border-radius: .3rem; background: #e5f2ed; color: #225f4b; font-size: .85rem; }
.terms.review li { background: #f2f4f8; color: #475775; }

.form-panel { max-width: 780px; padding: clamp(1rem, 3vw, 1.5rem); }
.form-panel.storage { margin-top: 1rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
form, label { display: block; }
.detail-content form { margin-top: 1rem; }
label { font-size: .95rem; font-weight: 640; }
input:not([type="checkbox"]), select, textarea {
  display: block;
  width: 100%;
  min-width: 0;
  padding: .55rem .64rem;
  border: 1px solid #cbd5e6;
  border-radius: .48rem;
  background: #fff;
  color: var(--ink);
}
select {
  appearance: none;
  padding-right: 1.75rem;
  background-image: linear-gradient(45deg, transparent 50%, #53627c 50%), linear-gradient(135deg, #53627c 50%, transparent 50%);
  background-position: right .9rem center, right .6rem center;
  background-size: .3rem .3rem;
  background-repeat: no-repeat;
}
textarea { resize: vertical; }
label + input, label + textarea, p.help + textarea, label input, label select, label textarea { margin-top: .32rem; }
form .form-grid + label, form label + label, form label + .form-grid { margin-top: .8rem; }
.check { display: flex; align-items: baseline; gap: .55rem; margin-top: .9rem; font-weight: 500; }
.check input { accent-color: var(--accent); }
.search-links { display: grid; gap: .65rem; margin-top: 1rem; }
.search-links a {
  display: grid;
  gap: .1rem;
  padding: .8rem .9rem;
  border: 1px solid var(--line);
  border-radius: .6rem;
  text-decoration: none;
  font-weight: 640;
}
.search-links a:hover { background: #f0f3ff; border-color: #bfcaf2; }
.search-links small { color: var(--muted); font-weight: 400; }
.notice {
  position: fixed;
  z-index: 5;
  bottom: 1rem;
  right: 1rem;
  max-width: min(31rem, calc(100vw - 2rem));
  padding: .75rem 1rem;
  border-radius: .6rem;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 5px 20px #18254030;
  overflow-wrap: anywhere;
}
.notice.failure { background: #7a2936; }
.error { color: #982737; font-size: .9rem; }
dialog {
  width: min(100% - 1.5rem, 590px);
  max-height: calc(100dvh - 1.5rem);
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: .8rem;
  box-shadow: 0 20px 64px #18254066;
  color: var(--ink);
}
dialog::backdrop { background: #18254091; }
dialog .section-header { margin-bottom: .7rem; }
dialog button[type="submit"], dialog .error { margin-top: .85rem; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; top: .5rem; left: .5rem; z-index: 10; padding: .55rem; color: var(--ink); background: #fff; transform: translateY(-150%); }
.skip:focus { transform: none; }
#print-resume { display: none; }

@media (max-width: 1050px) {
  .workspace { grid-template-columns: 182px minmax(0, 1fr); }
  .page-header { align-items: start; flex-direction: column; }
  .board { grid-template-columns: minmax(205px, .85fr) minmax(0, 1.5fr); gap: .7rem; }
  .detail-header { flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .workspace { display: block; }
  .sidebar { position: static; height: auto; padding: .8rem 1rem .58rem; gap: .75rem; }
  .sidebar nav { display: flex; flex-wrap: wrap; gap: .25rem; margin: 0; }
  .sidebar nav a { padding: .48rem .55rem; font-size: .88rem; }
  .sidebar-footer { display: none; }
  .board { grid-template-columns: 1fr; }
  .queue { min-height: initial; }
  .detail { min-height: 300px; }
  .empty-detail { min-height: 298px; }
}
@media (max-width: 435px) {
  main { padding: 1.2rem .85rem; }
  .metrics, .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
  .form-grid { grid-template-columns: 1fr; }
  .metric { padding: .65rem .75rem; }
  .detail-nav { padding: 0 .35rem; }
  .detail-nav button { padding: .62rem .38rem; }
}
@media print {
  @page { margin: .65in; }
  body { background: #fff; color: #000; }
  body:has(#print-resume:not([hidden])) .workspace { display: none; }
  #print-resume { display: block; font: 10.5pt/1.32 Arial, sans-serif; white-space: pre-wrap; overflow-wrap: break-word; }
  #print-resume strong { font-size: 17pt; }
}
