:root {
  --paper: #f5f0e8;
  --paper-deep: #eae1d4;
  --ink: #1d2422;
  --muted: #6c746f;
  --line: rgba(29, 36, 34, 0.16);
  --line-strong: rgba(29, 36, 34, 0.42);
  --cobalt: #2854c5;
  --cobalt-dark: #173889;
  --vermillion: #d8563d;
  --sage: #6d836b;
  --gold: #bd8a2d;
  --white: #fffdf9;
  --shadow: 0 18px 45px rgba(33, 39, 33, 0.08);
  color-scheme: light;
  font-family: "Avenir Next", "Noto Sans SC", "Helvetica Neue", sans-serif;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 12% 8%, rgba(40, 84, 197, 0.08), transparent 28rem),
    radial-gradient(circle at 88% 30%, rgba(216, 86, 61, 0.08), transparent 30rem),
    var(--paper);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(rgba(29, 36, 34, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(29, 36, 34, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

button, input, select { font: inherit; }
button, select { cursor: pointer; }

.shell {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 30px 0 48px;
}

.masthead { padding-bottom: 24px; }
.masthead__rule { height: 5px; background: var(--ink); margin-bottom: 12px; }
.masthead__topline, .masthead__bottomline {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.masthead__body {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 32px;
  padding: 54px 0 42px;
}
.kicker, .section-label {
  margin: 0 0 16px;
  color: var(--cobalt);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 710px;
  margin-bottom: 0;
  font-family: "Iowan Old Style", "Noto Serif SC", Georgia, serif;
  font-size: clamp(52px, 7.2vw, 104px);
  font-weight: 500;
  letter-spacing: -0.08em;
  line-height: 0.82;
}
h1 em { color: var(--vermillion); font-style: italic; }
.masthead__note {
  width: 215px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.masthead__bottomline { border-top: 1px solid var(--line); padding-top: 12px; }

.metrics {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: 1px;
  margin: 0 0 72px;
  border: 1px solid var(--line-strong);
  background: var(--line-strong);
}
.metric {
  min-height: 142px;
  padding: 22px 18px 18px;
  background: rgba(245, 240, 232, 0.78);
}
.metric--hero { background: var(--cobalt); color: white; }
.metric--pending { background: #eadfc2; }
.metric__label, .metric__hint { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.metric__label { opacity: 0.74; }
.metric strong { display: block; margin: 17px 0 8px; font-family: "Iowan Old Style", Georgia, serif; font-size: 54px; font-weight: 500; line-height: 0.8; }
.metric__hint { color: var(--muted); font-size: 10px; letter-spacing: 0.04em; text-transform: none; }
.metric--hero .metric__hint { color: rgba(255,255,255,0.75); }

.control-deck { margin-bottom: 28px; }
.control-deck__heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; border-bottom: 1px solid var(--line-strong); padding-bottom: 18px; }
.control-deck h2 { margin-bottom: 0; font-family: "Iowan Old Style", "Noto Serif SC", Georgia, serif; font-size: clamp(32px, 4vw, 52px); font-weight: 500; letter-spacing: -0.05em; }
.filters { display: grid; grid-template-columns: minmax(220px, 2fr) repeat(4, 1fr); gap: 8px; padding: 14px 0; }
.search-field { position: relative; }
.search-field input, select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(255, 253, 249, 0.65);
  color: var(--ink);
  padding: 0 13px;
  outline: none;
}
.search-field input { padding-left: 36px; }
.search-field input:focus, select:focus { border-color: var(--cobalt); box-shadow: 0 0 0 3px rgba(40, 84, 197, 0.12); }
.search-icon { position: absolute; left: 13px; top: 8px; color: var(--cobalt); font-size: 23px; line-height: 1; }
.filter-status { display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 12px; }

.jobs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.job-card {
  position: relative;
  display: flex;
  min-height: 318px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.72);
  padding: 24px;
  box-shadow: 0 0 0 rgba(33,39,33,0);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.job-card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.job-card__top, .job-card__footer, .job-card__meta { display: flex; justify-content: space-between; gap: 16px; }
.job-card__top { align-items: start; }
.job-card__index { color: var(--muted); font-family: monospace; font-size: 11px; }
.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; border: 1px solid currentColor; color: var(--cobalt); font-size: 10px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.badge--remote { color: var(--cobalt); background: rgba(40, 84, 197, 0.08); }
.badge--hybrid { color: var(--gold); background: rgba(189, 138, 45, 0.1); }
.badge--onsite { color: var(--vermillion); background: rgba(216, 86, 61, 0.08); }
.badge--pending { color: #8b6420; background: rgba(189, 138, 45, 0.12); }
.job-card h3 { max-width: 90%; margin: 22px 0 6px; font-family: "Iowan Old Style", "Noto Serif SC", Georgia, serif; font-size: 32px; font-weight: 500; letter-spacing: -0.045em; line-height: 0.98; }
.job-card__company { margin-bottom: 25px; font-size: 14px; font-weight: 800; }
.job-card__meta { justify-content: start; flex-wrap: wrap; color: var(--muted); font-size: 12px; line-height: 1.55; }
.job-card__meta span { display: inline-flex; align-items: center; gap: 5px; }
.job-card__meta span::before { color: var(--vermillion); content: "·"; font-weight: 900; }
.job-card__meta span:first-child::before { content: ""; }
.job-card__footer { align-items: end; margin-top: 26px; border-top: 1px solid var(--line); padding-top: 14px; }
.job-card__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.type-tag { color: var(--ink); font-size: 10px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.type-tag + .type-tag::before { margin-right: 6px; color: var(--vermillion); content: "/"; }
.text-link, .jd-button { border: 0; background: none; color: var(--cobalt-dark); font-size: 12px; font-weight: 900; text-decoration: underline; text-underline-offset: 3px; }
.jd-button { padding: 0; }
.jd-button:hover, .text-link:hover { color: var(--vermillion); }

.pending-section { margin-top: 28px; border-top: 1px solid var(--line-strong); }
.pending-section details > summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 0; cursor: pointer; list-style: none; }
.pending-section details > summary::-webkit-details-marker { display: none; }
.pending-section details > summary strong { display: block; font-family: "Iowan Old Style", Georgia, serif; font-size: 27px; font-weight: 500; }
.pending-section details > summary > span:last-child { color: var(--muted); font-size: 12px; }
.pending-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding-bottom: 24px; }
.pending-card { border: 1px dashed var(--line-strong); padding: 17px; background: rgba(234, 223, 194, 0.4); }
.pending-card h3 { margin: 12px 0 7px; font-family: "Iowan Old Style", Georgia, serif; font-size: 23px; font-weight: 500; }
.pending-card p { margin-bottom: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }

.changes-panel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 0 0 18px; background: var(--line); border: 1px solid var(--line); }
.change-item { min-height: 90px; padding: 16px; background: rgba(255, 253, 249, 0.62); }
.change-item strong { display: block; margin-top: 8px; font-family: "Iowan Old Style", Georgia, serif; font-size: 30px; font-weight: 500; }
.change-item--new strong { color: var(--cobalt); }
.change-item--closed strong { color: var(--vermillion); }
.change-item--changed strong { color: var(--gold); }

.empty-state { display: none; min-height: 250px; place-items: center; align-content: center; border: 1px dashed var(--line-strong); text-align: center; }
.empty-state.is-visible { display: grid; }
.empty-state__mark { color: var(--cobalt); font-size: 42px; }
.empty-state h2 { margin: 18px 0 8px; font-family: "Iowan Old Style", Georgia, serif; font-size: 32px; font-weight: 500; }
.empty-state p { margin: 0; color: var(--muted); font-size: 13px; }

.footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 72px; border-top: 1px solid var(--line-strong); padding-top: 14px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }

.drawer { position: fixed; inset: 0; z-index: 20; visibility: hidden; pointer-events: none; }
.drawer.is-open { visibility: visible; pointer-events: auto; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(20, 25, 24, 0.42); opacity: 0; transition: opacity 220ms ease; }
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer__panel { position: absolute; top: 0; right: 0; display: flex; width: min(680px, 100%); height: 100%; flex-direction: column; overflow: auto; transform: translateX(100%); background: var(--white); padding: 54px clamp(24px, 5vw, 60px) 40px; box-shadow: -20px 0 60px rgba(0,0,0,0.12); transition: transform 260ms cubic-bezier(.22,.61,.36,1); }
.drawer.is-open .drawer__panel { transform: translateX(0); }
.drawer__close { position: absolute; top: 20px; right: 25px; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); font-size: 24px; line-height: 1; }
.drawer__close:hover { border-color: var(--vermillion); color: var(--vermillion); }
.drawer__eyebrow { color: var(--cobalt); font-size: 10px; font-weight: 900; letter-spacing: 0.16em; text-transform: uppercase; }
.drawer h2 { margin: 13px 0 7px; font-family: "Iowan Old Style", "Noto Serif SC", Georgia, serif; font-size: clamp(36px, 6vw, 58px); font-weight: 500; letter-spacing: -0.06em; line-height: 0.95; }
.drawer__company { margin-bottom: 24px; font-weight: 800; }
.drawer__facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 22px 0 30px; background: var(--line); border: 1px solid var(--line); }
.drawer__fact { min-height: 70px; padding: 12px; background: var(--paper); }
.drawer__fact span { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.drawer__fact strong { display: block; margin-top: 7px; font-size: 13px; }
.drawer__section { border-top: 1px solid var(--line-strong); padding-top: 17px; }
.drawer__section h3 { margin: 0 0 13px; font-family: "Iowan Old Style", Georgia, serif; font-size: 25px; font-weight: 500; }
.drawer__copy { white-space: pre-wrap; color: #303936; font-size: 14px; line-height: 1.78; }
.drawer details { margin-top: 28px; border-top: 1px dashed var(--line-strong); padding-top: 17px; }
.drawer details summary { cursor: pointer; color: var(--cobalt-dark); font-size: 12px; font-weight: 900; }
.drawer details .drawer__copy { margin-top: 16px; color: var(--muted); font-size: 13px; }
.drawer__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.drawer__action { display: inline-flex; align-items: center; min-height: 42px; border: 1px solid var(--ink); padding: 0 14px; color: var(--ink); font-size: 12px; font-weight: 900; text-decoration: none; }
.drawer__action--primary { border-color: var(--cobalt); background: var(--cobalt); color: white; }
.drawer__action:hover { border-color: var(--vermillion); background: var(--vermillion); color: white; }

.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; }
.is-hidden { display: none !important; }

@media (max-width: 980px) {
  .metrics { grid-template-columns: repeat(3, 1fr); }
  .metric--hero { grid-column: span 3; }
  .filters { grid-template-columns: repeat(2, 1fr); }
  .search-field { grid-column: span 2; }
}

@media (max-width: 680px) {
  .shell { width: min(100% - 28px, 1240px); padding-top: 18px; }
  .masthead__body { display: block; padding: 46px 0 30px; }
  .masthead__note { width: auto; margin-top: 30px; }
  .masthead__topline, .masthead__bottomline { font-size: 8px; }
  .masthead__topline span:last-child, .masthead__bottomline span:last-child { text-align: right; }
  h1 { font-size: clamp(52px, 16vw, 88px); }
  .metrics { grid-template-columns: repeat(2, 1fr); margin-bottom: 52px; }
  .metric--hero { grid-column: span 2; }
  .metric { min-height: 122px; }
  .metric strong { font-size: 44px; }
  .control-deck__heading { display: block; }
  .filters { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: span 2; }
  .filter-status { display: block; }
  .filter-status span { display: block; margin-top: 5px; }
  .jobs-grid { grid-template-columns: 1fr; }
  .job-card { min-height: 295px; }
  .pending-grid { grid-template-columns: 1fr; }
  .changes-panel { grid-template-columns: 1fr; }
  .footer { display: block; line-height: 1.8; }
  .footer span { display: block; }
}
