:root {
  --ink: #17212b;
  --muted: #63707d;
  --line: #d8dee5;
  --paper: #f6f8fa;
  --panel: #ffffff;
  --navy: #12344d;
  --blue: #1b6ca8;
  --blue-soft: #e7f2fa;
  --teal: #117c73;
  --teal-soft: #e4f4f0;
  --amber: #9b6100;
  --amber-soft: #fff4dc;
  --red: #a33a3a;
  --red-soft: #fbe8e8;
  --shadow: 0 10px 30px rgba(18, 52, 77, 0.07);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--paper); }
a { color: var(--blue); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.shell { width: min(1240px, calc(100% - 40px)); margin: 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.site-header { border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.95); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(12px); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); font-size: 0.73rem; margin-top: 2px; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; background: var(--navy); color: white; font-weight: 800; letter-spacing: 0.03em; }
.header-actions { display: flex; align-items: center; gap: 15px; }
.verified { color: var(--muted); font-size: 0.8rem; }
.button { border: 1px solid var(--blue); background: var(--blue); color: white; border-radius: 6px; padding: 9px 13px; font-weight: 700; }
.button:hover { background: #155b8e; }
.button-quiet { background: transparent; color: var(--blue); }
.button-quiet:hover { background: var(--blue-soft); }

.hero { padding: 62px 0 35px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr); gap: 50px; align-items: end; }
.eyebrow { margin: 0 0 10px; text-transform: uppercase; letter-spacing: 0.09em; font-size: 0.72rem; font-weight: 800; color: var(--blue); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 17px; max-width: 800px; color: var(--navy); font-size: clamp(2.1rem, 5vw, 4.05rem); line-height: 1.03; letter-spacing: 0; }
h2 { margin-bottom: 0; font-size: clamp(1.45rem, 3vw, 2.05rem); letter-spacing: 0; }
h3 { font-size: 1.1rem; }
.hero-copy { max-width: 730px; margin-bottom: 0; color: #42515e; font-size: 1.05rem; line-height: 1.7; }
.profile-strip { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.profile-strip span, .tag { display: inline-flex; align-items: center; border: 1px solid var(--line); color: var(--navy); background: white; padding: 7px 9px; border-radius: 4px; font-size: 0.78rem; font-weight: 700; }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.metric { background: white; border: 1px solid var(--line); padding: 17px 18px; border-radius: 6px; box-shadow: var(--shadow); }
.metric strong { display: block; font-size: 1.7rem; color: var(--navy); }
.metric span { color: var(--muted); font-size: 0.8rem; }

.toolbar { display: grid; grid-template-columns: minmax(230px, 1.5fr) repeat(4, minmax(120px, 0.65fr)); gap: 9px; margin-bottom: 28px; }
.toolbar input, .toolbar select, .notes-input { width: 100%; min-height: 43px; border: 1px solid var(--line); border-radius: 5px; padding: 10px 12px; color: var(--ink); background: white; }
.toolbar input:focus, .toolbar select:focus, .notes-input:focus { outline: 3px solid var(--blue-soft); border-color: var(--blue); }

.content-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; align-items: start; }
.sidebar { position: sticky; top: 94px; }
.sidebar-block { border-top: 2px solid var(--navy); padding-top: 13px; margin-bottom: 30px; }
.sidebar-label { color: var(--navy); font-size: 0.73rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 11px; }
.view-button { width: 100%; display: flex; justify-content: space-between; gap: 8px; text-align: left; border: 0; background: transparent; padding: 9px 8px; border-radius: 4px; color: #42515e; font-size: 0.87rem; }
.view-button:hover, .view-button.is-selected { color: var(--navy); background: var(--blue-soft); font-weight: 800; }
.view-button span { color: var(--blue); }
.guidance p, .source-note p { color: var(--muted); font-size: 0.83rem; line-height: 1.55; }
.muted { color: var(--muted); }
.source-note a { font-size: 0.82rem; font-weight: 700; }

.results-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 14px; }
.result-count { color: var(--muted); font-size: 0.85rem; }
.job-list { display: grid; gap: 12px; }
.job-card { border: 1px solid var(--line); border-radius: 7px; background: var(--panel); box-shadow: var(--shadow); overflow: hidden; }
.job-card.watch { border-left: 4px solid var(--amber); }
.job-card.closed { opacity: 0.74; }
.job-card-main { padding: 18px 20px 16px; }
.job-topline, .job-footer, .dialog-header, .detail-row, .section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.job-company { color: var(--blue); font-size: 0.77rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 6px; }
.job-title { font-size: 1.23rem; line-height: 1.25; margin-bottom: 7px; }
.job-location { color: var(--muted); font-size: 0.86rem; margin-bottom: 0; }
.score { flex: 0 0 auto; text-align: right; }
.score strong { display: block; color: var(--navy); font-size: 1.55rem; }
.score span { color: var(--muted); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em; }
.status-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.status-badge, .eligibility-badge { display: inline-flex; align-items: center; border-radius: 4px; padding: 5px 8px; font-size: 0.7rem; font-weight: 800; }
.status-active { color: var(--teal); background: var(--teal-soft); }
.status-watch { color: var(--amber); background: var(--amber-soft); }
.status-closed { color: var(--red); background: var(--red-soft); }
.eligibility-likely { color: var(--blue); background: var(--blue-soft); }
.eligibility-conditional, .eligibility-unknown { color: var(--amber); background: var(--amber-soft); }
.deadline-badge { display: inline-flex; align-items: center; border-radius: 4px; padding: 5px 8px; font-size: 0.7rem; font-weight: 800; }
.deadline-urgent { color: var(--red); background: var(--red-soft); }
.deadline-soon { color: var(--amber); background: var(--amber-soft); }
.deadline-open { color: var(--teal); background: var(--teal-soft); }
.deadline-rolling { color: var(--muted); background: #eef1f3; }
.deadline-closed { color: var(--red); background: var(--red-soft); }
.job-fit { color: #42515e; line-height: 1.55; font-size: 0.92rem; margin-bottom: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 17px; }
.tag { font-size: 0.69rem; padding: 5px 7px; background: #f8fafb; color: #53616d; }
.job-footer { align-items: center; border-top: 1px solid #edf0f2; padding-top: 13px; }
.job-footer-left, .job-footer-right { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.job-footer a, .text-button { font-size: 0.79rem; font-weight: 800; }
.text-button { border: 0; background: transparent; color: var(--blue); padding: 4px 0; }
.text-button:hover { text-decoration: underline; }
.complete-button { border: 1px solid var(--teal); background: var(--teal-soft); color: var(--teal); border-radius: 4px; padding: 7px 9px; font-size: 0.76rem; font-weight: 800; }
.complete-button:hover { background: #d2eee8; }
.save-button { border: 1px solid var(--line); background: white; color: var(--muted); border-radius: 4px; padding: 6px 8px; font-size: 0.76rem; font-weight: 800; }
.save-button.is-saved { color: var(--navy); border-color: var(--navy); background: var(--blue-soft); }
.empty-state { border: 1px dashed var(--line); text-align: center; padding: 44px 25px; background: white; }
.empty-state p { color: var(--muted); line-height: 1.6; }

.job-dialog { width: min(900px, calc(100% - 30px)); max-height: min(850px, calc(100% - 30px)); border: 0; padding: 0; border-radius: 8px; box-shadow: 0 30px 90px rgba(10, 28, 41, 0.3); color: var(--ink); }
.job-dialog::backdrop { background: rgba(15, 32, 44, 0.58); }
.dialog-header { padding: 25px 28px 20px; border-bottom: 1px solid var(--line); background: white; }
.dialog-header h2 { max-width: 720px; margin-bottom: 8px; }
.dialog-subtitle { color: var(--muted); margin-bottom: 0; }
.icon-button { flex: 0 0 auto; border: 0; background: transparent; color: var(--muted); font-size: 1.8rem; line-height: 1; padding: 0 2px; }
.dialog-body { padding: 25px 28px 32px; background: var(--paper); }
.detail-section { background: white; border: 1px solid var(--line); border-radius: 6px; padding: 17px 18px; margin-bottom: 14px; }
.detail-section h3 { color: var(--navy); margin-bottom: 11px; }
.detail-section p, .detail-section li { color: #42515e; line-height: 1.55; font-size: 0.9rem; }
.detail-section ul { padding-left: 20px; margin: 0; }
.detail-section li + li { margin-top: 7px; }
.detail-row { padding: 9px 0; border-bottom: 1px solid #edf0f2; font-size: 0.86rem; }
.detail-row:last-child { border-bottom: 0; }
.detail-row strong { color: var(--navy); }
.detail-row span { max-width: 65%; text-align: right; color: #42515e; }
.prep-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.prep-box { border: 1px solid var(--line); padding: 13px; border-radius: 5px; }
.prep-box h4 { margin: 0 0 8px; font-size: 0.82rem; color: var(--navy); }
.prep-box ul { padding-left: 17px; }
.prep-box li { font-size: 0.82rem; }
.dialog-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; }
.notes-input { min-height: 90px; resize: vertical; margin-top: 8px; }
.source-line { color: var(--muted); font-size: 0.76rem; margin-top: 12px; }

.site-footer { border-top: 1px solid var(--line); margin-top: 60px; background: white; }
.footer-inner { min-height: 90px; }
.footer-inner p { color: var(--muted); font-size: 0.76rem; max-width: 780px; margin: 0; line-height: 1.5; }
.footer-inner a { font-size: 0.78rem; font-weight: 800; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 25px; }
  .profile-strip { justify-content: flex-start; }
  .toolbar { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: span 2; }
  .content-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }
  .sidebar-block { margin-bottom: 0; }
}

@media (max-width: 620px) {
  .shell { width: min(100% - 24px, 1240px); }
  .header-inner { min-height: 62px; }
  .verified { display: none; }
  .hero { padding-top: 40px; }
  h1 { font-size: 2.35rem; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .toolbar { grid-template-columns: 1fr; }
  .search-field { grid-column: auto; }
  .sidebar { display: block; }
  .sidebar-block { margin-bottom: 25px; }
  .job-topline { display: block; }
  .score { text-align: left; margin-top: 12px; }
  .job-footer { display: block; }
  .job-footer-right { margin-top: 10px; }
  .dialog-header, .dialog-body { padding-left: 18px; padding-right: 18px; }
  .prep-grid { grid-template-columns: 1fr; }
  .detail-row { display: block; }
  .detail-row span { display: block; max-width: none; text-align: left; margin-top: 5px; }
  .footer-inner { display: block; padding: 22px 0; }
  .footer-inner a { display: inline-block; margin-top: 10px; }
}
