@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/SourceSerif4.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/SourceSans3-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/SourceSans3-Semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/SourceSans3-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f3eee4;
  --ink: #1b1814;
  --muted: #5c564c;
  --rust: #9c3a1c;
  --rust-deep: #7a2c14;
  --card: #fffcf6;
  --line: #d6cec0;
  --shade: #e7e0d3;
  --focus: #1b1814;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { font-size: 20px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  line-height: 1.45;
}

img { max-width: 100%; display: block; }

.hero {
  position: relative;
  min-height: 18rem;
  height: 58vw;
  max-height: 32rem;
  overflow: hidden;
  background: #2a241c;
  color: #fffaf3;
}
.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 88%;
}
.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(16,12,8,.92) 0%, rgba(16,12,8,.42) 46%, rgba(16,12,8,.22) 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding: 1.5rem 1.15rem 1.7rem;
}
.eyebrow {
  margin: 0 0 .35rem;
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 600;
  color: #f0e4d2;
}
.hero h1 {
  margin: 0;
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  font-size: clamp(2.4rem, 9vw, 4.4rem);
  letter-spacing: -0.03em;
  line-height: 1.02;
}
.tagline {
  margin: .45rem 0 0;
  max-width: 36em;
  font-size: clamp(1.05rem, 3.4vw, 1.35rem);
  font-weight: 400;
  color: #f3eadc;
}

main {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1.15rem 3rem;
}

.filters {
  position: relative;
  z-index: 2;
  margin-top: -1.15rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1rem 1.15rem;
  box-shadow: 0 10px 30px rgba(28, 22, 14, .08);
}
fieldset {
  border: 0;
  margin: 0 0 1rem;
  padding: 0;
}
legend, .sort-label span {
  display: block;
  margin: 0 0 .45rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.trade-row, .seg {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}
.trade-btn, .seg-btn, .apply, select {
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}
.trade-btn, .seg-btn {
  min-height: 3.1rem;
  padding: .55rem 1rem;
  font-size: 1.02rem;
}
.trade-btn { flex: 1 1 calc(50% - .45rem); }
@media (min-width: 720px) {
  .trade-btn { flex: 1 1 0; }
}
.trade-btn.is-on, .seg-btn.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: #fffaf3;
}
.trade-btn:focus-visible, .seg-btn:focus-visible, .apply:focus-visible, select:focus-visible {
  outline: 3px solid #e0a060;
  outline-offset: 3px;
}

.filter-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 800px) {
  .filter-grid {
    grid-template-columns: 1fr 1fr auto;
    align-items: end;
  }
  .filter-grid fieldset { margin: 0; }
}
.sort-label { display: block; }
select {
  display: block;
  width: 100%;
  min-width: 12rem;
  min-height: 3.1rem;
  padding: .5rem 1rem;
  border-radius: 12px;
  background: var(--paper);
  appearance: auto;
}

.count {
  margin: 1.25rem 0 .7rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.jobs {
  display: grid;
  gap: .9rem;
}
@media (min-width: 900px) {
  .jobs { grid-template-columns: 1fr 1fr; }
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.15rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.pill {
  align-self: flex-start;
  margin: 0;
  padding: .15rem .55rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--rust-deep);
  background: #f3e1d4;
  border-radius: 999px;
}
.card h2 {
  margin: 0;
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.meta, .level, .found {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
}
.wage {
  margin: .15rem 0 .2rem;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--rust);
  line-height: 1.25;
}
.wage.is-missing {
  color: var(--muted);
  font-family: "Source Sans 3", sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
}
.apply {
  display: block;
  width: 100%;
  margin-top: auto;
  min-height: 3.4rem;
  padding: .7rem 1rem;
  border-radius: 12px;
  border-color: var(--rust);
  background: var(--rust);
  color: #fffaf3;
  text-align: center;
  text-decoration: none;
  font-size: 1.12rem;
}
.apply:hover { background: var(--rust-deep); border-color: var(--rust-deep); }
.apply[aria-disabled="true"] {
  background: var(--shade);
  border-color: var(--line);
  color: var(--muted);
  pointer-events: none;
}

.empty {
  margin: 2rem 0;
  font-size: 1.1rem;
  color: var(--muted);
}

footer {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1.15rem 3rem;
  color: var(--muted);
  font-size: .95rem;
}
footer p { margin: 0 0 .4rem; }
.brand-foot {
  color: var(--ink);
  font-weight: 600;
}
.fine { font-size: .85rem; }

@media (max-width: 420px) {
  .seg-btn, .trade-btn { font-size: .98rem; padding-left: .75rem; padding-right: .75rem; }
}

@media (max-width: 720px) {
  .hero {
    min-height: 9.5rem;
    height: 42vw;
    max-height: 13rem;
  }
  .hero-inner { padding: .55rem 1rem .75rem; }
  .tagline {
    font-size: clamp(.92rem, 3.4vw, 1.08rem);
    max-width: 28em;
  }
  .filters { padding: .5rem .75rem .55rem; margin-top: -.65rem; }
  .filter-grid { gap: .45rem; }
  fieldset { margin-bottom: .3rem; }
  legend, .sort-label span { margin-bottom: .2rem; }
  .trade-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .35rem;
  }
  .trade-btn { flex: none; width: 100%; }
  .seg {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: .35rem;
  }
  .trade-btn, .seg-btn {
    min-height: 2.2rem;
    padding: .28rem .3rem;
    font-size: .86rem;
    width: 100%;
    justify-content: center;
    line-height: 1.15;
  }
  .seg-btn { flex: none; white-space: nowrap; }
  select { min-height: 2.35rem; }
}

/* First job card should read as the start of the list, especially on a phone. */
.card:first-child {
  box-shadow: 0 1px 0 rgba(28, 22, 14, .04);
}
@media (max-width: 720px) {
  .count { margin: .7rem 0 .45rem; }
}

.trade-btn, .seg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Keep every Apply button pinned to the bottom of its card, so paired cards line up. */
.card .found { margin-bottom: .65rem; }
.card .apply { flex: 0 0 auto; }
.jobs { align-items: stretch; }
.card h2, .meta { overflow-wrap: anywhere; }

/* Final layout pass (Nov 23): no text auto-boost on phones, filters that never spill out of their panel,
   and a taller phone hero so the technician's head sits clear of the headline. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (min-width: 800px) {
  .filter-grid { display: flex; flex-wrap: wrap; gap: 1rem 1.6rem; align-items: flex-end; }
  .filter-grid .seg { flex-wrap: nowrap; }
  .filter-grid .sort-label { flex: 1 1 12rem; }
  .seg-btn { white-space: nowrap; }
}
@media (max-width: 720px) {
  .hero { height: 21rem; min-height: 21rem; max-height: none; }
  .hero-photo { object-position: 62% 70%; }
  .hero-shade { background: linear-gradient(to top, rgba(16,12,8,.92) 0%, rgba(16,12,8,.55) 42%, rgba(16,12,8,0) 70%); }
  .trade-row, .seg { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .trade-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .trade-btn, .seg-btn { white-space: normal; min-width: 0; font-size: .84rem; }
  select { min-width: 0; }
  .apply { white-space: normal; text-align: center; }
}

/* Short pill labels on phones so every filter stays on one line. */
.lbl-sm { display: none; }
@media (max-width: 720px) {
  .lbl-lg { display: none; }
  .lbl-sm { display: inline; }
  .trade-btn, .seg-btn { white-space: nowrap; font-size: .92rem; }
}
@media (max-width: 720px) {
  .trade-btn, .seg-btn { padding-left: .2rem; padding-right: .2rem; font-size: .9rem; }
  .trade-row { grid-template-columns: minmax(0,.72fr) minmax(0,.85fr) minmax(0,1.2fr) minmax(0,1.23fr); }
  .seg[role="group"]:has([data-level]) { grid-template-columns: minmax(0,.75fr) minmax(0,1.45fr) minmax(0,.8fr); }
}

/* Launch pass (Nov 24): skip link, How it works, 404 page, visible focus everywhere. */
.skip {
  position: absolute;
  left: .75rem;
  top: -4rem;
  z-index: 10;
  padding: .55rem .9rem;
  background: var(--ink);
  color: #fffaf3;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: .75rem; }
main:focus { outline: none; }
a:focus-visible { outline: 3px solid #e0a060; outline-offset: 3px; border-radius: 4px; }
.about {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1.15rem 2rem;
}
.about h2 {
  margin: 0 0 .7rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}
.about ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: .75rem;
}
@media (min-width: 900px) { .about ul { grid-template-columns: 1fr 1fr; gap: .9rem 2rem; } }
.about li { color: var(--muted); font-size: .98rem; }
.about strong { color: var(--ink); }
.updated { font-size: .9rem; }
.page-404 {
  max-width: 40rem;
  margin: 0 auto;
  padding: 4rem 1.15rem;
}
.page-404 h1 {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  font-size: 2.2rem;
  margin: 0 0 .6rem;
}
.page-404 .apply { display: inline-block; width: auto; padding: .7rem 1.4rem; margin-top: 1rem; }
