/* Public Careers layout */
body.careers-page {
  background: var(--canvas);
  height: auto;
  min-height: 100vh;
  overflow: auto;
}

.public-header {
  align-items: center;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 20px;
  height: 56px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.public-brand {
  align-items: center;
  color: var(--ink);
  display: flex;
  font-size: 14px;
  font-weight: 800;
  gap: 10px;
  text-decoration: none;
  white-space: nowrap;
}

.public-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.public-nav a {
  border-radius: 7px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 750;
  padding: 9px 12px;
  text-decoration: none;
  white-space: nowrap;
}

.public-nav a:hover,
.public-nav a.active {
  background: var(--paper-strong);
  color: var(--ink);
}

.public-main {
  margin: 0 auto;
  max-width: 1040px;
  padding: 32px 24px 72px;
}

.public-footer {
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 11px;
  padding: 20px 24px;
  text-align: center;
}

.public-footer a {
  color: var(--ink);
  font-weight: 700;
}

/* Board intro */
.careers-intro {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  margin-bottom: 20px;
  padding: 28px;
}

.careers-intro h1 {
  font-size: 30px;
  margin: 0 0 8px;
}

.careers-intro p {
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
}

.careers-values {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.careers-value {
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 3px;
  padding: 12px;
}

.careers-value strong {
  font-size: 12px;
}

.careers-value span {
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.45;
}

/* Filters */
.careers-tools {
  align-items: end;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(200px, 1.4fr) repeat(4, minmax(130px, 0.7fr));
  margin-bottom: 14px;
  padding: 16px;
}

.careers-tools .control input,
.careers-tools .control select {
  min-height: 38px;
}

.careers-result-bar {
  align-items: center;
  color: var(--ink-muted);
  display: flex;
  font-size: 11px;
  font-weight: 700;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.careers-result-bar button {
  background: transparent;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Listing */
.careers-group {
  margin-bottom: 20px;
}

.careers-group[hidden] {
  display: none;
}

.careers-group-heading {
  align-items: baseline;
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.careers-group-heading h2 {
  font-size: 15px;
  margin: 0;
}

.careers-group-heading span {
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 700;
}

.post-list {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  display: grid;
  overflow: hidden;
}

.post-row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto;
  padding: 14px 18px;
}

.post-row:first-child {
  border-top: 0;
}

.post-row[hidden] {
  display: none;
}

.post-row:hover {
  background: var(--paper-soft);
}

.post-row-title {
  color: var(--ink);
  display: block;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.post-row-title:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-meta {
  color: var(--ink-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 11px;
  gap: 4px 10px;
  margin-top: 4px;
}

.post-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.post-chip {
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 750;
  padding: 3px 8px;
  white-space: nowrap;
}

.post-chip.strong {
  border-color: var(--line-strong);
  color: var(--ink);
}

.post-row-actions {
  display: flex;
  gap: 8px;
}

.careers-empty {
  background: var(--paper);
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  color: var(--ink-muted);
  font-size: 12px;
  padding: 36px;
  text-align: center;
}

.careers-empty[hidden] {
  display: none;
}

/* Post detail */
.post-article {
  align-items: start;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) 300px;
}

.post-content {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  padding: 28px;
}

.post-content h1 {
  font-size: 26px;
  margin: 10px 0 6px;
}

.post-content > .post-meta {
  font-size: 12px;
  margin-bottom: 18px;
}

.post-section {
  border-top: 1px solid var(--line);
  padding: 18px 0 4px;
}

.post-section h2 {
  font-size: 15px;
  margin: 0 0 10px;
}

.post-section p,
.post-section li {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
}

.post-section ul,
.post-section ol {
  margin: 0;
  padding-left: 20px;
}

.post-section li + li {
  margin-top: 6px;
}

.hiring-steps {
  counter-reset: step;
  display: grid;
  gap: 8px;
  list-style: none;
  padding: 0;
}

.hiring-steps li {
  align-items: center;
  display: flex;
  gap: 12px;
}

.hiring-steps li::before {
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink-muted);
  content: counter(step);
  counter-increment: step;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 800;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.post-summary-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 14px;
  padding: 20px;
  position: sticky;
  top: 76px;
}

.post-summary-card .button {
  width: 100%;
}

.post-summary-card dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.post-summary-card dl div {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 2px;
  padding-top: 10px;
}

.post-summary-card dt {
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.post-summary-card dd {
  font-size: 12px;
  margin: 0;
}

.post-closed-note {
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-muted);
  font-size: 11px;
  line-height: 1.5;
  padding: 10px 12px;
}

.post-closed-note[hidden] {
  display: none;
}

/* Application form */
.apply-layout {
  display: grid;
  gap: 16px;
  margin: 0 auto;
  max-width: 760px;
}

.apply-post-header {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  border-top: 5px solid var(--ink-muted);
  box-shadow: var(--shadow-sm);
  padding: 22px 24px;
}

.apply-post-header h1 {
  font-size: 24px;
  margin: 8px 0 4px;
}

.apply-post-header p {
  color: var(--ink-muted);
  font-size: 12px;
  margin: 0;
}

.apply-section {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  padding: 22px 24px;
}

.apply-section h2 {
  font-size: 15px;
  margin: 0 0 4px;
}

.apply-section > p {
  color: var(--ink-muted);
  font-size: 11px;
  margin: 0 0 16px;
}

.apply-section .form-grid {
  gap: 14px;
}

.apply-section .form-field small,
.apply-section .field-help {
  color: var(--ink-muted);
  font-size: 10px;
}

.form-field.has-error input,
.form-field.has-error select,
.form-field.has-error textarea {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.form-field .field-error {
  color: var(--ink);
  font-size: 10px;
  font-weight: 750;
  margin: 0;
}

.form-field .field-error[hidden] {
  display: none;
}

.form-error-summary {
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 10px;
  padding: 14px 16px;
}

.form-error-summary[hidden] {
  display: none;
}

.form-error-summary strong {
  display: block;
  font-size: 12px;
  margin-bottom: 6px;
}

.form-error-summary ul {
  margin: 0;
  padding-left: 18px;
}

.form-error-summary li {
  font-size: 11px;
}

.form-error-summary a {
  color: var(--ink);
  font-weight: 750;
}

.url-list {
  display: grid;
  gap: 8px;
}

.url-list-row {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.consent-row {
  align-items: flex-start;
  display: flex;
  font-size: 12px;
  gap: 10px;
  line-height: 1.5;
}

.consent-row input {
  margin-top: 3px;
  min-height: auto;
  width: auto;
}

.apply-footer {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.apply-footer > span {
  color: var(--ink-muted);
  font-size: 10px;
  margin-right: auto;
}

.apply-success {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 14px;
  padding: 26px;
}

.apply-success[hidden] {
  display: none;
}

.apply-success h1 {
  font-size: 22px;
  margin: 0;
}

.apply-success p {
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.55;
  margin: 0;
}

.reference-block {
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 12px 14px;
}

.reference-block span {
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.reference-block strong {
  font-size: 18px;
  letter-spacing: 0.04em;
}

.apply-success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Tracking */
.track-layout {
  align-items: start;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) 320px;
}

.track-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  padding: 24px;
}

.track-card h1 {
  font-size: 22px;
  margin: 6px 0 4px;
}

.track-card > p {
  color: var(--ink-muted);
  font-size: 12px;
  margin: 0 0 18px;
}

.status-timeline {
  display: grid;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.status-timeline li {
  display: grid;
  gap: 2px 14px;
  grid-template-columns: 24px minmax(0, 1fr);
  padding-bottom: 18px;
  position: relative;
}

.status-timeline li::before {
  background: var(--paper);
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  content: "";
  grid-row: 1 / span 2;
  height: 14px;
  margin-top: 2px;
  width: 14px;
}

.status-timeline li::after {
  background: var(--line);
  content: "";
  height: calc(100% - 18px);
  left: 7px;
  position: absolute;
  top: 18px;
  width: 2px;
}

.status-timeline li:last-child::after {
  display: none;
}

.status-timeline li.is-done::before {
  background: var(--control);
  border-color: var(--control);
}

.status-timeline li.is-current::before {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 3px var(--paper);
  background: var(--ink);
}

.status-timeline strong {
  font-size: 13px;
}

.status-timeline li.is-current strong {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.status-timeline span {
  color: var(--ink-muted);
  font-size: 11px;
  line-height: 1.45;
}

.track-outcome {
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.5;
  margin-top: 6px;
  padding: 12px 14px;
}

.track-outcome[hidden] {
  display: none;
}

.track-summary {
  display: grid;
  gap: 12px;
}

.track-summary .track-card {
  padding: 18px;
}

.track-summary h2 {
  font-size: 14px;
  margin: 0 0 10px;
}

.track-summary dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.track-summary dl div {
  display: grid;
  gap: 2px;
}

.track-summary dt {
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.track-summary dd {
  font-size: 12px;
  margin: 0;
}

.track-summary .button {
  width: 100%;
}

.track-note {
  color: var(--ink-muted);
  font-size: 11px;
  line-height: 1.5;
  margin: 0 0 10px;
}

.application-list {
  display: grid;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.application-list a {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  text-decoration: none;
}

.application-list a:hover {
  background: var(--paper-soft);
}

.application-list a[aria-current="page"] {
  background: var(--paper-soft);
  border-color: var(--line-strong);
}

.application-list strong {
  font-size: 12px;
}

.application-list small {
  color: var(--ink-muted);
  font-size: 10px;
}

.application-list .status-badge {
  justify-self: start;
  margin-top: 2px;
}

.withdraw-reason {
  margin: 8px 0 0;
  text-align: center;
}

.withdraw-reason[hidden] {
  display: none;
}

.track-expired {
  background: var(--paper);
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  color: var(--ink-muted);
  font-size: 12px;
  padding: 36px;
  text-align: center;
}

.track-expired[hidden] {
  display: none;
}

.track-layout[hidden] {
  display: none;
}

/* Public toast */
.careers-page .workflow-toast {
  z-index: 90;
}

@media (max-width: 900px) {
  .careers-intro,
  .post-article,
  .track-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .post-summary-card {
    position: static;
  }

  .careers-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .careers-tools .control:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .public-header {
    gap: 10px;
    padding: 0 14px;
  }

  .public-brand > span:last-child {
    display: none;
  }

  .public-nav {
    gap: 2px;
  }

  .public-nav a {
    font-size: 11px;
    padding: 8px 8px;
  }

  .public-main {
    padding: 18px 14px 56px;
  }

  .careers-intro {
    padding: 20px;
  }

  .careers-values {
    grid-template-columns: minmax(0, 1fr);
  }

  .careers-tools {
    grid-template-columns: minmax(0, 1fr);
  }

  .post-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .post-row-actions .button {
    width: 100%;
  }

  .post-content {
    padding: 20px;
  }

  .apply-section .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .apply-footer {
    flex-wrap: wrap;
  }

  .apply-footer > span {
    width: 100%;
  }
}

.form-field > .field-help,
.form-field > small {
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 400;
}
