/* Bunkhouse — rugged western, mobile-first */
:root {
  --ink: #2a1d10;
  --ink-soft: #5a4632;
  --bg: #f7f1e3;
  --card: #fffdf7;
  --line: #d9c9a8;
  --brand: #7a4a1e;
  --brand-dark: #5e3712;
  --header: #221709;
  --ok: #2e6b34;
  --err: #a02c1d;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); line-height: 1.55; font-size: 16px;
}
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; color: var(--ink); }
h1 { font-size: 1.9rem; margin: 1.2rem 0 0.6rem; }
h2 { font-size: 1.4rem; margin: 1.6rem 0 0.5rem; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

/* header */
.site-header { background: var(--header); color: #f3e9d2; }
.header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 16px; gap: 8px; }
.brand { font-family: var(--serif); font-size: 1.5rem; color: #f3e9d2; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border: 2px solid #c9a15c; border-radius: 50%;
  font-size: 0.95rem; letter-spacing: 1px; color: #e8c87e;
}
.site-nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.site-nav a { color: #f3e9d2; text-decoration: none; font-size: 0.95rem; }
.site-nav a:hover { text-decoration: underline; }
.btn-nav { border: 1px solid #c9a15c; border-radius: 6px; padding: 6px 12px; }
.nav-logout { display: inline; margin: 0; }
.nav-logout button, .linklike {
  background: none; border: none; color: #f3e9d2; cursor: pointer;
  font-size: 0.95rem; padding: 0; text-decoration: underline;
}
table .linklike { color: var(--brand); }

/* hero */
.hero { padding: 2rem 0 1rem; border-bottom: 3px double var(--line); margin-bottom: 1rem; }
.kicker { text-transform: uppercase; letter-spacing: 2px; font-size: 0.8rem; color: var(--brand); margin: 0 0 0.4rem; }
.hero h1 { font-size: 2.4rem; margin: 0 0 0.6rem; }
.lede { font-size: 1.1rem; color: var(--ink-soft); max-width: 640px; }
.search { display: flex; flex-direction: column; gap: 8px; margin: 1.2rem 0; }
@media (min-width: 640px) { .search { flex-direction: row; } .search input[type=search] { flex: 2; } .search select { flex: 1; } }

/* forms */
.form, .filters { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }
.form label, .filters label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 0.95rem; }
.form label.check, .skill-grid .check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
input, select, textarea {
  font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px;
  background: #fff; color: var(--ink); width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
input[type=checkbox] { width: auto; }
button[type=submit], .btn {
  display: inline-block; background: var(--brand); color: #fff; border: none; border-radius: 6px;
  padding: 12px 22px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; text-align: center;
}
button[type=submit]:hover, .btn:hover { background: var(--brand-dark); color: #fff; }
.btn.secondary { background: transparent; color: var(--brand); border: 2px solid var(--brand); }
.btn.secondary:hover { background: var(--brand); color: #fff; }
.row2 { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .row2 { grid-template-columns: 1fr 1fr; } }
.opt { font-weight: 400; color: var(--ink-soft); font-size: 0.85rem; }
fieldset { border: 1px solid var(--line); border-radius: 6px; padding: 12px; }
legend { font-weight: 700; padding: 0 6px; }
.skill-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.filters { flex-direction: column; }
@media (min-width: 640px) { .filters { flex-direction: row; flex-wrap: wrap; align-items: flex-end; } .filters label { min-width: 150px; flex: 1; } }
.clear { align-self: center; font-size: 0.9rem; }

/* chips, cards */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: var(--card); border-radius: 20px;
  padding: 6px 14px; text-decoration: none; color: var(--ink); font-size: 0.95rem;
}
.chip:hover { border-color: var(--brand); color: var(--brand-dark); }
.job-list { display: flex; flex-direction: column; gap: 14px; margin: 1rem 0 2rem; }
.job-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 16px;
}
.job-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.job-card h3 { margin: 0 0 4px; font-size: 1.25rem; }
.job-card h3 a { color: var(--ink); text-decoration: none; }
.job-card h3 a:hover { color: var(--brand); }
.job-meta { color: var(--ink-soft); margin: 0 0 8px; font-size: 0.95rem; }
.job-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.tag {
  background: #efe4cc; border-radius: 4px; padding: 2px 10px; font-size: 0.82rem; font-weight: 600;
}
.tag.housing { background: #dcead3; color: #2e6b34; }
.tag.pay { background: transparent; border: 1px solid var(--line); }
.badge {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  border-radius: 4px; padding: 3px 8px; white-space: nowrap;
}
.badge.sample { background: #e8dcc0; color: #6b5a2e; }
.badge.off { background: #e5d5d5; color: #7c2a1e; }
.job-desc { margin: 0 0 8px; color: var(--ink-soft); }
.job-foot { display: flex; justify-content: space-between; align-items: center; margin: 0; font-size: 0.9rem; }
.posted { color: var(--ink-soft); }
.count { color: var(--ink-soft); font-size: 0.95rem; }
.empty { background: var(--card); border: 1px dashed var(--line); border-radius: 8px; padding: 24px; }

/* job detail */
.crumb { margin: 1rem 0 0; font-size: 0.95rem; }
.job-detail h1 { margin-top: 0.4rem; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; background: var(--card);
  border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }
.facts div { margin: 0; }
.facts dt { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-soft); }
.facts dd { margin: 2px 0 0; font-weight: 700; }
.body-text { white-space: normal; max-width: 700px; }
.apply-box { background: var(--card); border: 2px solid var(--brand); border-radius: 8px; padding: 18px; margin: 2rem 0; }
.apply-box h2 { margin-top: 0; }
.apply-box form { display: flex; flex-direction: column; gap: 12px; max-width: 560px; }
.apply-box label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }

/* tables */
.tbl { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; font-size: 0.95rem; }
.tbl th, .tbl td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { background: #efe4cc; font-family: var(--serif); }
.tbl tr:last-child td { border-bottom: none; }
.tbl .actions { white-space: nowrap; }
.tbl .inline { display: inline; margin-left: 10px; }
.muted { color: var(--ink-soft); font-size: 0.88rem; }

/* misc */
.flash { border-radius: 6px; padding: 12px 16px; margin: 1rem 0; font-weight: 600; }
.flash.ok { background: #dcead3; color: #234d27; border: 1px solid #9cc184; }
.flash.error { background: #f3d9d2; color: #7c2a1e; border: 1px solid #d69a8a; }
.notice { background: #fdf6e3; border: 1px solid var(--line); border-left: 4px solid var(--brand);
  border-radius: 6px; padding: 12px 16px; max-width: 640px; }
.two-col { display: grid; grid-template-columns: 1fr; gap: 14px; margin: 1.5rem 0; }
@media (min-width: 640px) { .two-col { grid-template-columns: 1fr 1fr; } }
.cta-card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 20px; }
.cta-card h3 { margin-top: 0; }
.prose { max-width: 700px; }
.site-footer { margin-top: 3rem; border-top: 3px double var(--line); padding: 1.5rem 0 2.5rem; color: var(--ink-soft); font-size: 0.92rem; }
.foot-links a { color: var(--ink-soft); }
