/* ==========================================================================
   CherokeeWorks design system
   --------------------------------------------------------------------------
   Editorial/almanac direction: warm paper stock, pine-ink type, Georgia clay
   accents, hairline rules and tabular figures. Listings read as a printed
   county ledger rather than a grid of cards.
   ========================================================================== */

:root {
  /* Paper + ink */
  --paper: #f6f2e9;
  --paper-raised: #fffdf8;
  --paper-deep: #eae2d1;
  --paper-sunk: #e2d9c5;

  --ink: #1c211c;
  --ink-soft: #545c52;
  --ink-faint: #8a8f83;

  /* Pine is the primary; the brighter tone carries links and actions. */
  --pine: #14453d;
  --pine-deep: #0d2f29;
  --pine-bright: #0a6b60;
  --pine-wash: #e4ece7;

  /* Accents */
  --clay: #a8452a;
  --clay-wash: #f6e6df;
  --wheat: #b8801f;
  --wheat-wash: #f7ecd3;
  --rule: #d9d0bd;
  --rule-strong: #c3b79d;

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Archivo", "Helvetica Neue", Helvetica, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Space + shape */
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --measure: 74rem;
  --radius: 3px;
  --radius-lg: 6px;

  --shadow-low: 0 1px 2px rgb(28 33 28 / 0.06), 0 2px 8px rgb(28 33 28 / 0.04);
  --shadow-mid: 0 2px 4px rgb(28 33 28 / 0.07), 0 12px 28px -8px rgb(28 33 28 / 0.14);
  --shadow-high: 0 4px 8px rgb(28 33 28 / 0.08), 0 24px 48px -12px rgb(28 33 28 / 0.2);

  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Paper grain. Fixed and inert so it never repaints during scroll. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23g)' opacity='0.055'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------- typography */

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-variation-settings: "SOFT" 20, "WONK" 1;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  color: var(--pine-deep);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.35rem, 5.5vw, 4.1rem);
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}
h3 {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
}
h4 {
  font-size: 1.02rem;
  font-variation-settings: "SOFT" 0, "WONK" 0;
}

p {
  margin: 0 0 1rem;
  max-width: 62ch;
}

a {
  color: var(--pine-bright);
  font-weight: 500;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--pine-bright) 40%, transparent);
  transition: text-decoration-color 0.15s var(--ease), color 0.15s var(--ease);
}

a:hover,
a:focus-visible {
  text-decoration-color: var(--pine-bright);
}

:focus-visible {
  outline: 2px solid var(--pine-bright);
  outline-offset: 2px;
  border-radius: 2px;
}

hr {
  border: 0;
  height: 1px;
  background: var(--rule);
  margin: 1.5rem 0;
}

/* Small-caps meta label used above sections and beside field groups. */
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--clay);
  margin: 0 0 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.eyebrow::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--rule);
}

.eyebrow--plain::after {
  display: none;
}

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  color: var(--ink-soft);
  line-height: 1.55;
  max-width: 54ch;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.82em;
  letter-spacing: -0.01em;
}

.muted {
  color: var(--ink-soft);
}

.small {
  font-size: 0.875rem;
}

.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;
}

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

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow {
  max-width: 48rem;
}

.wrap--mid {
  max-width: 60rem;
}

main {
  flex: 1 0 auto;
}

.section {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.section--tight {
  padding-block: clamp(2rem, 4vw, 3rem);
}

.section--sunk {
  background: var(--paper-deep);
  border-block: 1px solid var(--rule);
}

.stack > * + * {
  margin-top: 1rem;
}

.row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.row--between {
  justify-content: space-between;
}

.row--end {
  justify-content: flex-end;
}

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

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px) saturate(1.3);
  border-bottom: 1px solid var(--rule);
}

.masthead__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4.25rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-variation-settings: "SOFT" 0, "WONK" 0;
  font-size: 1.24rem;
  letter-spacing: -0.03em;
  color: var(--pine-deep);
  text-decoration: none;
  flex: none;
}

.wordmark:hover {
  color: var(--pine-bright);
}

.wordmark__mark {
  width: 1.65rem;
  height: 1.65rem;
  flex: none;
  color: var(--clay);
}

.wordmark strong {
  font-weight: 700;
}

.wordmark span {
  font-weight: 400;
  color: var(--pine);
}

.masthead__nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin-left: auto;
}

.masthead__nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  padding-block: 0.4rem;
  border-bottom: 2px solid transparent;
}

.masthead__nav a:hover,
.masthead__nav a[aria-current="page"] {
  color: var(--pine-deep);
  border-bottom-color: var(--clay);
}

.masthead__account {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: none;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  padding: 0.4rem 0.55rem;
  color: var(--pine-deep);
  cursor: pointer;
}

@media (max-width: 60rem) {
  .nav-toggle {
    display: inline-flex;
  }

  .masthead__nav,
  .masthead__account {
    display: none;
  }

  .masthead[data-open="true"] .masthead__nav,
  .masthead[data-open="true"] .masthead__account {
    display: flex;
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
    gap: 1rem;
    padding-bottom: 1rem;
  }

  .masthead[data-open="true"] .masthead__inner {
    flex-wrap: wrap;
  }
}

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

.btn {
  --btn-bg: var(--pine);
  --btn-fg: var(--paper-raised);
  --btn-border: var(--pine);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 1;
  padding: 0.72rem 1.15rem;
  border: 1px solid var(--btn-border);
  border-radius: var(--radius);
  background: var(--btn-bg);
  color: var(--btn-fg);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s var(--ease), box-shadow 0.15s var(--ease),
    background-color 0.15s var(--ease), color 0.15s var(--ease);
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-low);
  background: var(--pine-deep);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn--clay {
  --btn-bg: var(--clay);
  --btn-border: var(--clay);
}

.btn--clay:hover:not(:disabled) {
  background: #8d3721;
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--pine-deep);
  --btn-border: var(--rule-strong);
}

.btn--ghost:hover:not(:disabled) {
  background: var(--paper-raised);
  --btn-border: var(--pine);
}

.btn--quiet {
  --btn-bg: transparent;
  --btn-fg: var(--ink-soft);
  --btn-border: transparent;
  padding-inline: 0.5rem;
}

.btn--quiet:hover:not(:disabled) {
  background: var(--paper-deep);
  color: var(--pine-deep);
}

.btn--sm {
  font-size: 0.8rem;
  padding: 0.5rem 0.8rem;
}

.btn--lg {
  font-size: 1rem;
  padding: 0.95rem 1.6rem;
}

.btn--block {
  width: 100%;
}

.btn__spinner {
  width: 0.85em;
  height: 0.85em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(178deg, var(--paper) 0%, var(--paper-deep) 100%);
}

/* Contour lines standing in for the North Georgia foothills. */
.hero__contours {
  position: absolute;
  inset: auto -10% -35% -10%;
  height: 130%;
  color: var(--pine);
  opacity: 0.11;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: end;
  padding-block: clamp(3.25rem, 8vw, 6rem);
}

@media (max-width: 62rem) {
  .hero__inner {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

.hero h1 {
  margin-bottom: 1rem;
}

.hero h1 em {
  font-style: normal;
  color: var(--clay);
  font-variation-settings: "SOFT" 60, "WONK" 1;
}

.hero__note {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 1.25rem;
}

/* Search bar shared by the hero and the browse page. */
.searchbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.75fr) auto;
  gap: 0;
  margin-top: 1.75rem;
  background: var(--paper-raised);
  border: 1.5px solid var(--pine);
  border-radius: var(--radius);
  box-shadow: var(--shadow-mid);
  overflow: hidden;
  max-width: 40rem;
}

.searchbar input,
.searchbar select {
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  padding: 0.95rem 1rem;
  min-width: 0;
}

.searchbar select {
  border-left: 1px solid var(--rule);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%23545c52' stroke-width='1.5'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.1rem;
}

.searchbar input:focus,
.searchbar select:focus {
  outline: none;
  background: var(--pine-wash);
}

.searchbar button {
  border: 0;
  border-radius: 0;
  padding-inline: 1.4rem;
}

.searchbar button:hover {
  transform: none;
}

@media (max-width: 34rem) {
  .searchbar {
    grid-template-columns: 1fr;
  }
  .searchbar select {
    border-left: 0;
    border-top: 1px solid var(--rule);
  }
}

/* ------------------------------------------------------- the ledger (stats) */

.ledger {
  background: var(--paper-raised);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-high);
  padding: 1.5rem 1.6rem;
  position: relative;
}

.ledger::before {
  content: "";
  position: absolute;
  inset: 0.35rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  pointer-events: none;
}

.ledger__title {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1rem;
}

.ledger__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.6rem;
  border-bottom: 1px dotted var(--rule-strong);
}

.ledger__row:last-of-type {
  border-bottom: 0;
}

.ledger__row dt {
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.ledger__row dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  font-variation-settings: "SOFT" 0, "WONK" 0;
  color: var(--pine-deep);
  line-height: 1;
}

.ledger dl {
  margin: 0;
}

.ledger__foot {
  margin: 1rem 0 0;
  font-size: 0.78rem;
  color: var(--ink-faint);
  max-width: none;
}

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

.listings {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule-strong);
}

.listing {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0 1.15rem;
  align-items: start;
  padding: 1.35rem 0.5rem 1.35rem 0.85rem;
  border-bottom: 1px solid var(--rule);
  transition: background-color 0.15s var(--ease), padding-left 0.15s var(--ease);
}

.listing::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--clay);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.18s var(--ease);
}

.listing:hover {
  background: var(--paper-raised);
  padding-left: 1.15rem;
}

.listing:hover::before {
  transform: scaleY(1);
}

.listing[data-featured="true"] {
  background: linear-gradient(90deg, var(--wheat-wash), transparent 55%);
}

.listing__monogram {
  width: 2.9rem;
  height: 2.9rem;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--paper-deep);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  font-variation-settings: "SOFT" 0, "WONK" 0;
  color: var(--pine);
  letter-spacing: -0.02em;
}

.listing__body {
  min-width: 0;
}

.listing__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  font-variation-settings: "SOFT" 10, "WONK" 0;
  line-height: 1.2;
  margin: 0 0 0.15rem;
  letter-spacing: -0.01em;
}

.listing__title a {
  color: var(--pine-deep);
  text-decoration: none;
}

.listing__title a:hover {
  color: var(--pine-bright);
}

.listing__company {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 0 0 0.55rem;
}

.listing__company b {
  color: var(--ink);
  font-weight: 600;
}

.listing__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  align-items: center;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.listing__aside {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
  flex: none;
}

.listing__pay {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--pine-deep);
  white-space: nowrap;
}

.listing__age {
  font-size: 0.72rem;
  color: var(--ink-faint);
  white-space: nowrap;
}

@media (max-width: 46rem) {
  .listing {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .listing__aside {
    grid-column: 2;
    align-items: flex-start;
    text-align: left;
    margin-top: 0.5rem;
    flex-direction: row;
    gap: 0.75rem;
  }
}

/* --------------------------------------------------------------------- tags */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  background: var(--paper-raised);
  color: var(--ink-soft);
  white-space: nowrap;
}

.tag--pine {
  border-color: color-mix(in srgb, var(--pine) 35%, transparent);
  background: var(--pine-wash);
  color: var(--pine-deep);
}

.tag--clay {
  border-color: color-mix(in srgb, var(--clay) 35%, transparent);
  background: var(--clay-wash);
  color: var(--clay);
}

.tag--wheat {
  border-color: color-mix(in srgb, var(--wheat) 40%, transparent);
  background: var(--wheat-wash);
  color: #8a5f13;
}

.tag--dot::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* -------------------------------------------------------------- status pill */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.24rem 0.55rem;
  border-radius: 2px;
  border: 1px solid;
  white-space: nowrap;
}

.pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.pill[data-status="approved"],
.pill[data-status="live"] {
  color: #1c6b3f;
  border-color: #b6d6c1;
  background: #e8f3ec;
}

.pill[data-status="pending"] {
  color: #8a5f13;
  border-color: #e0c894;
  background: var(--wheat-wash);
}

.pill[data-status="rejected"],
.pill[data-status="declined"] {
  color: var(--clay);
  border-color: #e2bfb3;
  background: var(--clay-wash);
}

.pill[data-status="closed"],
.pill[data-status="withdrawn"],
.pill[data-status="expired"] {
  color: var(--ink-faint);
  border-color: var(--rule-strong);
  background: var(--paper-deep);
}

.pill[data-status="new"] {
  color: var(--pine-bright);
  border-color: #a9cfc9;
  background: var(--pine-wash);
}

.pill[data-status="shortlisted"] {
  color: #6b3fa0;
  border-color: #cfc0e2;
  background: #f0eaf7;
}

.pill[data-status="reviewed"] {
  color: var(--ink-soft);
  border-color: var(--rule-strong);
  background: var(--paper-raised);
}

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

.card {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-low);
}

.card--flush {
  padding: 0;
  overflow: hidden;
}

.card__head {
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--rule);
  background: var(--paper-deep);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.card__head h3,
.card__head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.card__body {
  padding: 1.4rem;
}

.card__foot {
  padding: 1rem 1.4rem;
  border-top: 1px solid var(--rule);
  background: var(--paper-deep);
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}

/* --------------------------------------------------------------- categories */

.index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 0 2.5rem;
  border-top: 1px solid var(--rule-strong);
}

.index-grid a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.72rem 0.25rem;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: var(--ink);
  font-size: 0.92rem;
  transition: color 0.15s var(--ease), padding-left 0.15s var(--ease);
}

.index-grid a:hover {
  color: var(--pine-bright);
  padding-left: 0.6rem;
}

.index-grid a span:first-child {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.index-grid a::after {
  content: "";
}

.index-grid__count {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
  flex: none;
}

/* ------------------------------------------------------------------- steps */

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-top: 2.75rem;
  border-top: 2px solid var(--pine);
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 0.85rem;
  left: 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--clay);
  letter-spacing: 0.08em;
}

.steps h4 {
  margin-bottom: 0.35rem;
  color: var(--pine-deep);
}

.steps p {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0;
}

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

.field {
  margin-bottom: 1.15rem;
}

.field > label,
.fieldset > legend {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--pine-deep);
  margin-bottom: 0.35rem;
}

.field__hint {
  font-size: 0.78rem;
  color: var(--ink-faint);
  margin: 0.3rem 0 0;
  max-width: none;
}

.field__error {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--clay);
  margin: 0.3rem 0 0;
  max-width: none;
  display: none;
}

.field[data-invalid="true"] .field__error {
  display: block;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="search"],
select,
textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper-raised);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  padding: 0.6rem 0.7rem;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

textarea {
  resize: vertical;
  min-height: 7rem;
  line-height: 1.6;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--pine-bright);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pine-bright) 18%, transparent);
}

.field[data-invalid="true"] input,
.field[data-invalid="true"] select,
.field[data-invalid="true"] textarea {
  border-color: var(--clay);
}

select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%23545c52' stroke-width='1.5'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

.field-row {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
}

.fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 1.15rem;
}

/* Radio/checkbox cards used for account type and apply method. */
.choice-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.choice {
  position: relative;
  display: block;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--paper-raised);
  padding: 0.9rem 1rem;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease),
    box-shadow 0.15s var(--ease);
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice__label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--pine-deep);
  margin-bottom: 0.15rem;
}

.choice__hint {
  display: block;
  font-size: 0.79rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

.choice:hover {
  border-color: var(--pine);
}

.choice:has(input:checked) {
  border-color: var(--pine);
  background: var(--pine-wash);
  box-shadow: inset 0 0 0 1px var(--pine);
}

.choice:has(input:focus-visible) {
  outline: 2px solid var(--pine-bright);
  outline-offset: 2px;
}

.checkline {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.checkline input {
  margin-top: 0.28rem;
  accent-color: var(--pine);
  width: auto;
}

/* File input */
.filedrop {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border: 1px dashed var(--rule-strong);
  border-radius: var(--radius);
  background: var(--paper-deep);
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
  flex-wrap: wrap;
}

.filedrop input[type="file"] {
  font-size: 0.85rem;
  max-width: 100%;
}

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

.notice {
  border: 1px solid var(--rule-strong);
  border-left: 3px solid var(--pine);
  border-radius: var(--radius);
  background: var(--paper-raised);
  padding: 0.85rem 1.1rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 1.25rem;
}

.notice p {
  margin: 0;
  max-width: none;
}

.notice p + p {
  margin-top: 0.5rem;
}

.notice strong {
  color: var(--pine-deep);
}

.notice--good {
  border-left-color: #2f8a55;
  background: #eef6f1;
}

.notice--warn {
  border-left-color: var(--wheat);
  background: var(--wheat-wash);
}

.notice--bad {
  border-left-color: var(--clay);
  background: var(--clay-wash);
  color: #7d3520;
}

.notice[hidden] {
  display: none;
}

/* ------------------------------------------------------------------- toast */

.toast-stack {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: min(24rem, calc(100vw - 2.5rem));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--pine-deep);
  color: #f2f6f2;
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  font-size: 0.88rem;
  line-height: 1.45;
  box-shadow: var(--shadow-high);
  border-left: 3px solid var(--clay);
  animation: toast-in 0.24s var(--ease);
}

.toast--good {
  border-left-color: #6cc08a;
}

.toast--bad {
  border-left-color: #e0785c;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

/* ------------------------------------------------------- loading + empty */

.skeleton {
  border-bottom: 1px solid var(--rule);
  padding: 1.35rem 0.85rem;
  display: grid;
  grid-template-columns: 2.9rem minmax(0, 1fr);
  gap: 1.15rem;
}

.skeleton__block,
.skeleton__line {
  background: linear-gradient(
    90deg,
    var(--paper-deep) 0%,
    var(--paper-sunk) 40%,
    var(--paper-deep) 80%
  );
  background-size: 300% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 2px;
}

.skeleton__block {
  width: 2.9rem;
  height: 2.9rem;
}

.skeleton__line {
  height: 0.7rem;
  margin-bottom: 0.55rem;
}

.skeleton__line:nth-child(1) {
  width: 45%;
  height: 1rem;
}
.skeleton__line:nth-child(2) {
  width: 28%;
}
.skeleton__line:nth-child(3) {
  width: 62%;
}

@keyframes shimmer {
  0% {
    background-position: 150% 0;
  }
  100% {
    background-position: -50% 0;
  }
}

.empty {
  text-align: center;
  padding: clamp(2.5rem, 6vw, 4.5rem) 1.5rem;
  border: 1px dashed var(--rule-strong);
  border-radius: var(--radius-lg);
  background: var(--paper-raised);
}

.empty__mark {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  color: var(--rule-strong);
}

.empty h3 {
  margin-bottom: 0.4rem;
}

.empty p {
  margin: 0 auto 1.25rem;
  max-width: 34ch;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

/* -------------------------------------------------------- browse (2 col) */

.browse {
  display: grid;
  grid-template-columns: 15.5rem minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

@media (max-width: 62rem) {
  .browse {
    grid-template-columns: 1fr;
  }
}

.filters {
  position: sticky;
  top: 5.25rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--paper-raised);
  padding: 1.25rem;
}

@media (max-width: 62rem) {
  .filters {
    position: static;
  }
}

.filters h2 {
  font-size: 0.72rem;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1rem;
}

.filters .field {
  margin-bottom: 0.9rem;
}

.results-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.results-head p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.chips {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  padding: 0.25rem 0.4rem 0.25rem 0.6rem;
  border: 1px solid var(--pine);
  border-radius: 2px;
  background: var(--pine-wash);
  color: var(--pine-deep);
}

.chip button {
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  padding: 0 0.15rem;
  font-size: 1rem;
  line-height: 1;
  opacity: 0.6;
}

.chip button:hover {
  opacity: 1;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding-top: 1.75rem;
}

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

.detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20.5rem;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: start;
}

@media (max-width: 64rem) {
  .detail {
    grid-template-columns: 1fr;
  }
}

.detail__head {
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 1.5rem;
  margin-bottom: 1.75rem;
}

.detail__head h1 {
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  margin-bottom: 0.5rem;
}

.detail__org {
  font-size: 1.02rem;
  color: var(--ink-soft);
  margin-bottom: 0.9rem;
}

.detail__org b {
  color: var(--pine-deep);
  font-weight: 600;
}

/* Renders the plain-text description with paragraph and bullet structure. */
.prose {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
}

.prose p {
  margin-bottom: 1rem;
  max-width: 68ch;
}

.prose h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 1.75rem 0 0.6rem;
  color: var(--pine-deep);
}

.prose ul {
  margin: 0 0 1.25rem;
  padding-left: 1.1rem;
  max-width: 66ch;
}

.prose li {
  margin-bottom: 0.4rem;
  padding-left: 0.2rem;
}

.prose li::marker {
  color: var(--clay);
}

.apply-panel {
  position: sticky;
  top: 5.25rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-lg);
  background: var(--paper-raised);
  box-shadow: var(--shadow-mid);
  overflow: hidden;
}

@media (max-width: 64rem) {
  .apply-panel {
    position: static;
  }
}

.apply-panel__head {
  padding: 1.25rem 1.35rem;
  background: var(--pine-deep);
  color: var(--paper);
}

.apply-panel__head .apply-panel__pay {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  font-variation-settings: "SOFT" 0, "WONK" 0;
  line-height: 1.1;
  color: #fdfaf3;
  margin: 0;
}

.apply-panel__head p {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: #b9c9c2;
  max-width: none;
}

.apply-panel__body {
  padding: 1.35rem;
}

.factlist {
  margin: 0;
  font-size: 0.88rem;
}

.factlist div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.5rem;
  border-bottom: 1px dotted var(--rule-strong);
}

.factlist div:last-child {
  border-bottom: 0;
}

.factlist dt {
  color: var(--ink-faint);
  flex: none;
}

.factlist dd {
  margin: 0;
  text-align: right;
  color: var(--ink);
  font-weight: 500;
}

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

.dash-head {
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.dash-head h1 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
}

.dash-head p {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.statbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2rem;
}

.statbar div {
  background: var(--paper-raised);
  padding: 1.1rem 1.2rem;
}

.statbar dt {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.35rem;
}

.statbar dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 600;
  font-variation-settings: "SOFT" 0, "WONK" 0;
  line-height: 1;
  color: var(--pine-deep);
}

.statbar div[data-tone="alert"] dd {
  color: var(--clay);
}

.tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--rule-strong);
  margin-bottom: 1.75rem;
  overflow-x: auto;
}

.tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 0.7rem 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.tabs button:hover {
  color: var(--pine-deep);
}

.tabs button[aria-selected="true"] {
  color: var(--pine-deep);
  border-bottom-color: var(--clay);
}

.tabs .tabs__count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--clay);
  margin-left: 0.3rem;
}

.panel[hidden] {
  display: none;
}

/* Review cards in the admin queue */
.review {
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-lg);
  background: var(--paper-raised);
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.review__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.3rem;
  border-bottom: 1px solid var(--rule);
  flex-wrap: wrap;
}

.review__head h3 {
  margin: 0 0 0.2rem;
  font-size: 1.12rem;
}

.review__sub {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0;
}

.review__body {
  padding: 1.2rem 1.3rem;
}

.review__excerpt {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--ink-soft);
  white-space: pre-wrap;
  max-height: 11rem;
  overflow: hidden;
  position: relative;
  margin: 0 0 0.75rem;
  max-width: none;
}

.review__excerpt[data-expanded="true"] {
  max-height: none;
}

.review__excerpt:not([data-expanded="true"])::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3rem;
  background: linear-gradient(transparent, var(--paper-raised));
}

.review__actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  padding: 1rem 1.3rem;
  border-top: 1px solid var(--rule);
  background: var(--paper-deep);
  flex-wrap: wrap;
}

.review__actions input[type="text"] {
  flex: 1 1 14rem;
  min-width: 0;
  font-size: 0.85rem;
  padding: 0.5rem 0.6rem;
}

.datagrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.85rem 1.5rem;
  font-size: 0.88rem;
  margin: 0 0 1rem;
}

.datagrid dt {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.15rem;
}

.datagrid dd {
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.logtable {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.logtable th {
  text-align: left;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 0.5rem 0.75rem 0.5rem 0;
  border-bottom: 1px solid var(--rule-strong);
  font-weight: 600;
}

.logtable td {
  padding: 0.6rem 0.75rem 0.6rem 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-soft);
  vertical-align: top;
}

/* ------------------------------------------------------------ auth pages */

.auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  min-height: calc(100vh - 4.25rem);
}

@media (max-width: 58rem) {
  .auth {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .auth__aside {
    display: none;
  }
}

.auth__aside {
  position: relative;
  background: var(--pine-deep);
  color: #dfe7e1;
  padding: clamp(2.5rem, 5vw, 4.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.auth__aside h2 {
  color: #fdfaf3;
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  max-width: 22ch;
}

.auth__aside p {
  color: #b9c9c2;
  font-size: 0.98rem;
  max-width: 34ch;
}

.auth__aside .hero__contours {
  color: #7fb3a6;
  opacity: 0.16;
  inset: auto -20% -40% -20%;
}

.auth__quote {
  position: relative;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(255 255 255 / 0.15);
  font-size: 0.88rem;
  color: #9fb5ac;
}

.auth__form {
  padding: clamp(2rem, 5vw, 4rem) clamp(1.25rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 34rem;
}

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

.footer {
  border-top: 1px solid var(--rule);
  background: var(--paper-deep);
  padding-block: 2.75rem 2rem;
  margin-top: auto;
  font-size: 0.88rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

@media (max-width: 52rem) {
  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.footer h4 {
  font-size: 0.7rem;
  font-family: var(--font-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.75rem;
}

.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer li {
  margin-bottom: 0.4rem;
}

.footer a {
  color: var(--ink-soft);
  text-decoration: none;
}

.footer a:hover {
  color: var(--pine-bright);
}

.footer__note {
  color: var(--ink-faint);
  font-size: 0.82rem;
  max-width: 34ch;
  margin: 0.75rem 0 0;
}

.footer__base {
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule-strong);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--ink-faint);
  font-size: 0.8rem;
}

/* --------------------------------------------------------- entry animation */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: rise 0.6s var(--ease) backwards;
  }

  .reveal:nth-child(1) {
    animation-delay: 0.04s;
  }
  .reveal:nth-child(2) {
    animation-delay: 0.12s;
  }
  .reveal:nth-child(3) {
    animation-delay: 0.2s;
  }
  .reveal:nth-child(4) {
    animation-delay: 0.28s;
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ------------------------------------------------------------ 404 / notice */

.standalone {
  min-height: calc(100vh - 4.25rem);
  display: grid;
  place-items: center;
  padding: var(--gutter);
}

.standalone__card {
  max-width: 30rem;
  width: 100%;
  background: var(--paper-raised);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-mid);
  padding: clamp(1.5rem, 4vw, 2.25rem);
}

.standalone__card h1 {
  font-size: 1.7rem;
  margin-bottom: 0.5rem;
}
