/* ==========================================================================
   WaspJobs — refined editorial design system
   Paper, ink and vermilion; Playfair for display, Georgia for reading,
   a system sans for chrome.

   Tokens:      --s-* spacing scale, --r-* radius scale, --t-* type sizes
   Labels:      .micro-label is the ONE label style (cards, fields, tables,
                stats, ad tags). Spacing around it comes from its context
                (.card-head, .field, .table th, .stat).
   Metadata:    .chip = sentence-case metadata (tags, salary, type, category)
                .status = uppercase pill, status only (open/closed/accepted)
   Buttons:     .btn primary · .secondary · .ghost (quiet chrome) · .danger
                RULE: exactly one primary button per page.
   Records:     .job-card (listings) · .list-row (dashboards) · .table (admin)
   ========================================================================== */

/* Self-hosted Playfair Display (variable, Google Fonts v40) — latin and
   latin-ext subsets; any other script falls back to Georgia. Served
   immutable from /fonts (see public/_headers); the HTML busts caches via
   /app.css?v=<ASSET_VERSION>. */
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("./fonts/playfair-display-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("./fonts/playfair-display-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* palette */
  --paper: #f5f1e8;
  --surface: #fffdf8;
  --surface-2: #efe9dc;
  --ink: #241d17;
  --ink-2: #4b4139;
  --muted: #7a6e60;
  --line: #e2dacb;
  --line-2: #c9c0ac;
  --vermilion: #cf3c1c;
  --vermilion-deep: #a32c12;
  --vermilion-wash: #f7e6df;
  --amber: #d9a441;
  --ok: #4a6b2c;
  --ok-wash: #e9eedd;
  --stone: #8b8272;

  /* type */
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --display: "Playfair Display", Georgia, "Times New Roman", serif;
  --t-micro: 10.5px;
  --t-small: 14px;
  --t-body: 17px;
  --t-lead: 18px;

  /* space scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-7: 32px;
  --s-8: 48px;
  --s-9: 64px;

  /* radius scale */
  --r-sm: 3px;
  --r: 4px;
  --r-lg: 8px;
  --r-pill: 999px;

  /* metrics */
  --container: 1040px;
  --measure: 760px;      /* page column (.narrow) */
  --measure-form: 620px; /* standard form */
  --measure-wide: 760px; /* long form (job posting) */
  --shadow-1: 0 1px 2px rgba(36, 29, 23, 0.06);
  --shadow-2: 0 6px 22px rgba(36, 29, 23, 0.09);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

/* Skip link: first focusable element, revealed only on keyboard focus. */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--s-3);
  z-index: 50;
  padding: var(--s-2) var(--s-4);
  background: var(--ink);
  color: var(--surface);
  font-family: var(--sans);
  font-size: var(--t-small);
  border-radius: var(--r);
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: var(--s-3);
}

body {
  margin: 0;
  font-family: var(--serif);
  font-size: var(--t-body);
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(120% 90% at 50% -10%, rgba(207, 60, 28, 0.035) 0, transparent 55%);
}

a { color: var(--vermilion-deep); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

form { margin: 0; }

:focus-visible {
  outline: 2px solid var(--vermilion);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--s-6);
}

.narrow { max-width: var(--measure); }

/* ------------------------------------------------------------------ header */

.site-header {
  background: var(--surface);
  border-bottom: 3px double var(--vermilion);
  position: sticky;
  top: 0;
  z-index: 40;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  min-height: 72px;
  padding-top: var(--s-3);
  padding-bottom: var(--s-3);
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  color: var(--ink);
}
.brand:hover { text-decoration: none; }

.brand .logo {
  width: 44px;
  height: 44px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--vermilion);
  background:
    radial-gradient(circle at center, var(--surface) 0 46%, rgba(0, 0, 0, 0) 48%),
    repeating-conic-gradient(var(--vermilion) 0 4.5deg, rgba(207, 60, 28, 0) 4.5deg 9deg);
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px var(--vermilion);
}
.brand .logo svg { position: relative; }

.brand .name {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.01em;
}
.brand .dot { color: var(--vermilion); }

.brand .tag {
  display: block;
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 5px;
}

.site-nav { display: flex; align-items: center; gap: var(--s-1); flex-wrap: wrap; }

.site-nav a:not(.btn) {
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: var(--s-2) 10px;
  border-radius: var(--r-sm);
  white-space: nowrap;
}
.site-nav a:not(.btn):hover {
  color: var(--vermilion-deep);
  background: var(--vermilion-wash);
  text-decoration: none;
}

.nav-sep { width: 1px; align-self: stretch; background: var(--line); margin: 6px; }

.nav-form { display: inline-flex; }

/* ------------------------------------------------------------------- main */

main { padding: var(--s-8) 0 72px; }

h1, h2, h3, h4 { font-family: var(--display); color: var(--ink); line-height: 1.18; }

h1 { font-size: clamp(30px, 4.4vw, 42px); margin: 0 0 10px; font-weight: 800; letter-spacing: -0.015em; }
h2 { font-size: 25px; margin: 34px 0 14px; font-weight: 700; }
h3 { font-size: 20px; margin: 0 0 6px; font-weight: 700; }

p { margin: 0 0 var(--s-4); }

.lead {
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--t-lead);
  color: var(--ink-2);
  margin: 0 0 26px;
}

.muted { color: var(--muted); }
.small { font-size: var(--t-small); }
.sans { font-family: var(--sans); }

/* quiet sans footnote (links, bios) */
.fineprint {
  margin: 0;
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--muted);
}

.back-link {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-block;
  margin-bottom: var(--s-4);
}
.back-link:hover { color: var(--vermilion-deep); }

/* --------------------------------------------------------- label (ONE) */

.micro-label {
  font-family: var(--sans);
  font-size: var(--t-micro);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ------------------------------------------------------------------ layout */

.row { display: flex; gap: var(--s-3); flex-wrap: wrap; align-items: center; }
.row.top { align-items: flex-start; }
.spacer { flex: 1; }
.stack-inline { display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: center; }
.grow { flex: 1 1 240px; min-width: 0; }

/* page header: title + optional lead + optional actions */
.page-head { margin-bottom: var(--s-6); }
.page-head h1 { margin: 0; }
.page-head > h1 { margin: 0 0 var(--s-2); }
.page-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
}
.page-head .lead { margin: 0; }
.page-head-top + .lead { margin-top: var(--s-2); }
.page-head > .row { margin-bottom: var(--s-2); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-4); }
.page-actions { display: flex; gap: var(--s-3); flex-wrap: wrap; align-items: center; }

/* ------------------------------------------------------------------ cards */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px var(--s-6);
  margin-bottom: 18px;
  box-shadow: var(--shadow-1);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
  margin-bottom: var(--s-4);
}
.card-head + * { margin-top: 0; }

/* ------------------------------------------------------------- job listing */

.job-list { display: flex; flex-direction: column; gap: var(--s-3); }

.job-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid transparent;
  border-radius: var(--r);
  padding: 18px 22px;
  color: var(--ink);
  box-shadow: var(--shadow-1);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.job-card:hover {
  text-decoration: none;
  border-left-color: var(--vermilion);
  border-color: var(--line-2);
  box-shadow: var(--shadow-2);
  transform: translateY(-1px);
}

.job-card h3 { font-size: 21px; margin: 0 0 var(--s-1); }
.job-card:hover h3 { color: var(--vermilion-deep); }

.company {
  font-family: var(--sans);
  font-size: var(--t-small);
  font-weight: 600;
  color: var(--ink-2);
}
a.company:hover { color: var(--vermilion-deep); }

.job-meta {
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin-top: var(--s-2);
}
.job-meta strong { color: var(--ink-2); font-weight: 600; }
.job-meta .sep { color: var(--line-2); }
.page-head .job-meta { font-size: 15px; }

.job-card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
  margin-top: var(--s-3);
}

/* ------------------------------------------------- chips & status (meta) */

.chip {
  display: inline-block;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 2px var(--s-2);
}
.chip.solid {
  font-weight: 700;
  color: var(--ink);
  background: var(--surface-2);
  border-color: var(--line);
}
a.chip:hover {
  text-decoration: none;
  border-color: var(--vermilion);
  color: var(--vermilion-deep);
  background: var(--vermilion-wash);
}

.status {
  display: inline-block;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--vermilion-deep);
  background: var(--vermilion-wash);
  border: 1px solid rgba(207, 60, 28, 0.25);
  border-radius: var(--r-pill);
  padding: 3px 10px;
}
.status.plain { color: var(--ink-2); background: var(--surface-2); border-color: var(--line); }
.status.closed { color: #6c6558; background: #ebe6da; border-color: var(--line-2); }
.status.ok { color: var(--ok); background: var(--ok-wash); border-color: rgba(74, 107, 44, 0.3); }

/* ------------------------------------------------------------------- hero */

.hero { text-align: center; padding: 26px 0 var(--s-2); }
.hero h1 { margin-bottom: var(--s-3); }
.hero .masthead-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--t-lead);
  color: var(--muted);
  margin: 0 auto;
  max-width: 620px;
}

/* --------------------------------------------------------------- controls */

.filterbar {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--s-3);
  align-items: end;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: var(--s-4) 18px;
  margin: 26px 0 14px;
  box-shadow: var(--shadow-1);
}

.filterbar .f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.filterbar .f.submit { grid-column: 3 / -1; justify-self: end; }

.filterbar input,
.filterbar select { padding: 9px 11px; font-size: 14.5px; }

/* labels are always .micro-label; spacing comes from .field / .f / .card-head */
label { display: block; margin: 0; }

input, select, textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 10px 12px;
}

input:hover, select:hover, textarea:hover { border-color: #b6ab93; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--vermilion);
  box-shadow: 0 0 0 3px rgba(207, 60, 28, 0.14);
}

textarea { min-height: 180px; resize: vertical; line-height: 1.6; }

input::placeholder, textarea::placeholder { color: #a49a89; }

.field { display: flex; flex-direction: column; gap: 6px; }
.filterbar .f { gap: 6px; }
.field .hint, .form-actions .hint, .save-search .hint { margin-top: 0; }

.field-row { display: flex; gap: var(--s-4); }
.field-row > * { flex: 1; min-width: 0; }

.hint { font-family: var(--sans); font-size: 12.5px; color: var(--muted); margin-top: 6px; }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  padding: 11px var(--s-5);
  border: 1px solid var(--vermilion);
  border-radius: var(--r-sm);
  background: var(--vermilion);
  color: #fffdf8;
  text-align: center;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.06s ease;
}
.btn:hover { background: var(--vermilion-deep); border-color: var(--vermilion-deep); color: #fffdf8; text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn.secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-2);
}
.btn.secondary:hover { background: var(--surface-2); color: var(--ink); border-color: var(--stone); }

.btn.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-2);
}
.btn.ghost:hover { background: var(--vermilion-wash); border-color: transparent; color: var(--vermilion-deep); }

.btn.danger { background: var(--surface); color: var(--vermilion-deep); border-color: rgba(207, 60, 28, 0.5); }
.btn.danger:hover { background: var(--vermilion-wash); color: var(--vermilion-deep); }

.btn.small { font-size: 13.5px; padding: 7px 14px; }
.btn.block { width: 100%; }

.btn[disabled], .btn.disabled { opacity: 0.45; pointer-events: none; }

/* --------------------------------------------------------------- notices */

.notice {
  padding: 13px var(--s-4);
  border: 1px solid;
  border-radius: var(--r);
  margin-bottom: 18px;
  font-family: var(--sans);
  font-size: 15px;
}
.notice.error { background: var(--vermilion-wash); color: #8a2c10; border-color: rgba(207, 60, 28, 0.45); }
.notice.ok { background: var(--ok-wash); color: var(--ok); border-color: rgba(74, 107, 44, 0.4); }
.notice a { color: inherit; text-decoration: underline; }

.empty {
  text-align: center;
  padding: var(--s-9) var(--s-5);
  color: var(--muted);
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--t-lead);
  background: var(--surface);
  border: 1px dashed var(--line-2);
  border-radius: var(--r);
}
.empty.plain { background: none; border: 0; padding: var(--s-8) var(--s-5); }
.empty h1 { font-size: 46px; margin-bottom: 6px; font-style: normal; }

/* --------------------------------------------------------------- results */

.resultcount {
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--muted);
  margin: var(--s-5) 0 14px;
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pagination {
  display: flex;
  gap: var(--s-4);
  align-items: center;
  justify-content: center;
  margin-top: var(--s-7);
  font-family: var(--sans);
}

/* ------------------------------------------------------------ job detail */

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: var(--s-6);
  align-items: start;
}

.detail-rail { display: flex; flex-direction: column; gap: var(--s-4); position: static; top: 96px; }

@media (min-width: 901px) {
  .detail-rail { position: sticky; top: 96px; }
}

.facts dl { margin: 0; }
.facts .fact {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--sans);
  font-size: var(--t-small);
}
.facts .fact:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); letter-spacing: 0.04em; }
.facts dd { margin: 0; font-weight: 600; color: var(--ink); text-align: right; }
.facts .row { margin-top: var(--s-3); gap: var(--s-2); }

.posting { position: relative; padding-top: 26px; }

.stamp {
  position: absolute;
  top: 16px;
  right: 18px;
  transform: rotate(-7deg);
  border: 2.5px double var(--vermilion);
  color: var(--vermilion);
  border-radius: var(--r-lg);
  padding: 4px 13px;
  font-family: var(--sans);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  opacity: 0.85;
  pointer-events: none;
  user-select: none;
}
.stamp.filled { color: var(--stone); border-color: var(--stone); transform: rotate(5deg); }

.prose { line-height: 1.7; }
.prose > :first-child { margin-top: 0; }
.prose h1, .prose h2, .prose h3, .prose h4 { margin: 26px 0 10px; font-size: 22px; }
.prose h1 { font-size: 26px; }
.prose h3 { font-size: 20px; }
.prose h4 { font-size: 18px; }
.prose ul, .prose ol { margin: 0 0 var(--s-4); padding-left: var(--s-6); }
.prose li { margin-bottom: 6px; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 1px 5px;
}
.prose pre {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px var(--s-4);
  overflow-x: auto;
  font-size: var(--t-small);
  line-height: 1.5;
}
.prose pre code { background: none; border: 0; padding: 0; }
.prose blockquote {
  margin: 0 0 var(--s-4);
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--vermilion);
  color: var(--ink-2);
  font-style: italic;
}
.prose img { max-width: 100%; }
.prose table { border-collapse: collapse; width: 100%; margin-bottom: var(--s-4); font-family: var(--sans); font-size: 14.5px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 26px 0; }

/* ------------------------------------------------------------------ forms */

form.stack { display: flex; flex-direction: column; gap: 18px; max-width: var(--measure-form); }
form.stack.wide { max-width: var(--measure-wide); }
.form-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.save-search { display: inline-flex; align-items: center; gap: 10px; margin: 0; }

.form-inline { display: flex; gap: var(--s-3); align-items: center; flex-wrap: wrap; }
.form-inline input { width: auto; flex: 1 1 240px; max-width: 320px; }

/* stacked adjacent forms (e.g. profile + résumé delete) */
.stack + form { margin-top: var(--s-4); }
.fineprint + form { margin-top: var(--s-3); }

/* -------------------------------------------------------------- dashboards */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: var(--s-6);
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px 18px;
  box-shadow: var(--shadow-1);
}
.stat .num {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.05;
  color: var(--ink);
}
.stat .num.accent { color: var(--vermilion); }
.stat > .micro-label { margin-top: var(--s-1); }

.list-row {
  display: flex;
  gap: var(--s-4);
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px var(--s-5);
  margin-bottom: var(--s-3);
  box-shadow: var(--shadow-1);
}
.list-row:hover { border-color: var(--line-2); }
.list-row h3 { margin: 0 0 var(--s-1); font-size: 18px; }

/* applicant card: children stack at one rhythm */
.card.applicant > * + * { margin-top: var(--s-3); }
.card.applicant > p { margin-bottom: 0; }
.status-form { min-width: 150px; }

/* simple bar chart, no JS */
.chart { display: flex; align-items: flex-end; gap: var(--s-2); height: 120px; margin: var(--s-2) 0 6px; }
.chart .bar {
  flex: 1;
  background: linear-gradient(180deg, var(--vermilion), var(--vermilion-deep));
  border-radius: 2px 2px 0 0;
  min-height: 3px;
  position: relative;
}
/* bar heights, quantized to 5% steps so the chart needs no inline styles */
.chart .bar.h0 { height: 0%; }
.chart .bar.h5 { height: 5%; }
.chart .bar.h10 { height: 10%; }
.chart .bar.h15 { height: 15%; }
.chart .bar.h20 { height: 20%; }
.chart .bar.h25 { height: 25%; }
.chart .bar.h30 { height: 30%; }
.chart .bar.h35 { height: 35%; }
.chart .bar.h40 { height: 40%; }
.chart .bar.h45 { height: 45%; }
.chart .bar.h50 { height: 50%; }
.chart .bar.h55 { height: 55%; }
.chart .bar.h60 { height: 60%; }
.chart .bar.h65 { height: 65%; }
.chart .bar.h70 { height: 70%; }
.chart .bar.h75 { height: 75%; }
.chart .bar.h80 { height: 80%; }
.chart .bar.h85 { height: 85%; }
.chart .bar.h90 { height: 90%; }
.chart .bar.h95 { height: 95%; }
.chart .bar.h100 { height: 100%; }
.chart .bar span {
  position: absolute;
  bottom: -20px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--sans);
  font-size: 10px;
  color: var(--muted);
}
.chart-wrap { padding-bottom: 24px; }

/* --------------------------------------------------------------- hub links */

.hub-section { margin-bottom: var(--s-2); }
.hublinks { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin: 0 0 30px; }
.hublink {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px 15px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.hublink:hover { border-color: var(--vermilion); color: var(--vermilion-deep); text-decoration: none; transform: translateY(-1px); }
.hublink .count { font-size: 13px; font-weight: 500; color: var(--muted); }

/* --------------------------------------------------------------- tables */

.table-wrap { overflow-x: auto; }
.table-wrap .table { min-width: 620px; }

.table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 14.5px; }
.table th {
  padding: 0 var(--s-3) var(--s-2);
  border-bottom: 1px solid var(--line-2);
  text-align: left;
  vertical-align: bottom;
}
.table th:last-child, .table td:last-child { padding-right: 0; }
.table th:first-child, .table td:first-child { padding-left: 0; }
.table td { padding: var(--s-3); border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; padding-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table td .stack-inline { justify-content: flex-end; }

/* ------------------------------------------------------------ ads & promos */

.ad-slot {
  margin: var(--s-5) 0;
  padding: var(--s-2);
  min-height: 90px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r);
  background: rgba(239, 233, 220, 0.55);
  overflow: hidden;
}
.ad-slot::before {
  content: "Advertisement";
  display: block;
  text-align: center;
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.affiliate {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--vermilion);
  border-radius: var(--r);
  padding: var(--s-4) 18px;
  margin: 18px 0;
}
.affiliate:hover { text-decoration: none; border-color: var(--line-2); border-left-color: var(--vermilion); box-shadow: var(--shadow-1); }
.affiliate > .micro-label { display: block; margin-bottom: 5px; }
.affiliate strong { display: block; font-family: var(--display); font-size: 17px; color: var(--ink); }
.aff-blurb { display: block; color: var(--muted); font-family: var(--sans); font-size: var(--t-small); margin-top: 3px; }
.aff-cta { display: inline-block; margin-top: 7px; color: var(--vermilion-deep); font-family: var(--sans); font-size: 13.5px; font-weight: 700; }

/* ----------------------------------------------------------------- footer */

.site-footer {
  border-top: 3px double var(--line-2);
  padding: 30px 0 40px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: var(--t-small);
  background: var(--surface);
}
.site-footer .row { gap: 8px 18px; }
.site-footer a { color: var(--ink-2); }
.site-footer .motto { font-family: var(--serif); font-style: italic; }

/* ------------------------------------------------------------ responsive */

@media (max-width: 900px) {
  .detail-grid { grid-template-columns: 1fr; }
  .filterbar { grid-template-columns: 1fr 1fr; }
  .filterbar .f.wide { grid-column: 1 / -1; }
  .filterbar .f.submit { grid-column: 1 / -1; justify-self: stretch; }
  .filterbar .btn { width: 100%; }
}

@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .site-header .container { min-height: 62px; }
  .brand .tag { display: none; }
  .site-nav { gap: 0; }
  .site-nav a:not(.btn) { padding: var(--s-2) 7px; font-size: 11.5px; letter-spacing: 0.06em; }
  .hide-sm { display: none; }
  main { padding: 28px 0 56px; }
  .filterbar { grid-template-columns: 1fr; }
  .field-row { flex-direction: column; gap: 18px; }
  .card { padding: 18px 16px; }
  .job-card { padding: 16px; }
  .stamp { display: none; }
  .posting { padding-top: 0; }
  .list-row { flex-direction: column; align-items: flex-start; }
  .site-footer { text-align: center; }
  .site-footer .row { justify-content: center; }
}
