/* ==========================================================================
   DIME9 LABS — careers variant stylesheet (bespoke; not token-rewritten).
   Design language from the Dime9 Labs front page: near-black ground, off-white
   type, 1px hairlines, mono uppercase micro-labels, sharp corners, oversized
   tight-tracking display headings, subtle grid overlays. Inter/system sans.
   Same class inventory as frontend/public/css/app.css — pages HTML is shared.
   ========================================================================== */

:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: #0a0a0a;
  --panel-2: #101010;
  --fg: #f5f5f2;
  --muted: #8b8b86;
  --faint: #6f6f6b;
  --line: #232323;
  --line-2: #353535;
  --accent: #f2f2ef; /* "light" action color: near-white blocks */
  --accent-text: #080808;
  --focus: #f5f5f2;
  --error: #ff6b57;
  --error-soft: rgba(255, 107, 87, 0.09);
  --ok: #63d297;
  --ok-soft: rgba(99, 210, 151, 0.09);
  --gutter: clamp(20px, 4.4vw, 72px);
  --wrap-max: 1440px;
  --wrap-narrow: 780px;
  --font:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---- Base ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  border-radius: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font: 15px / 1.65 var(--font);
  color: var(--fg);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
main {
  flex: 1;
}
::selection {
  background: #f5f5f2;
  color: #050505;
}
h1,
h2,
h3 {
  margin: 0 0 0.5em;
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 0.98;
  text-wrap: balance;
}
h1 {
  font-size: clamp(44px, 6.5vw, 92px);
  max-width: 14ch;
}
h2 {
  font-size: 1rem;
}
h3 {
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  line-height: 1.08;
}
p {
  margin: 0 0 1em;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: #fff;
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.wrap {
  width: 100%;
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.muted,
.lead,
.notice {
  color: var(--muted);
}
.lead {
  font-size: 1.05rem;
  max-width: 58ch;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip {
  position: fixed;
  left: 12px;
  top: -80px;
  z-index: 999;
  padding: 10px 14px;
  background: #fff;
  color: #000;
  font-weight: 600;
}
.skip:focus {
  top: 12px;
}
.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Micro-label: the mono uppercase voice used for kickers, steps, buttons. */
.site-header nav a,
.btn,
.apply-progress,
.apply-rolebar-title,
.step,
.ref-label,
.file-zone-action,
.role-menu-title,
.role-menu label,
.field label,
.q-number,
.sec-no,
.brand::after,
.site-footer p,
.back {
  font-family: var(--font-mono);
  text-transform: uppercase;
}

/* ---- Header: fixed bar, byte-for-byte the Dime9 Labs front page top bar
   (height, gutter padding, translucent blur, grid, wordmark, mono CTA) ---- */
body {
  padding-top: 76px;
}
.site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  width: 100%;
  height: 76px;
  padding: 0 var(--gutter);
  /* the front page puts the 1fr auto grid directly on the 76px bar so the wordmark and CTA
     are vertically centered; the hiring markup's .wrap/.row wrappers are dissolved with
     display:contents so the grid geometry matches byte-for-byte (measured: wordmark y=26 @1280). */
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  background: rgba(5, 5, 5, 0.76);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.site-header .wrap,
.site-header .row {
  display: contents;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  width: max-content;
  font-weight: 740;
  font-size: 1.5rem;
  letter-spacing: -0.07em;
  line-height: 1;
  color: var(--fg);
  text-transform: lowercase;
}
/* dime9 text wordmark — copied from DIME9_LABS_FRONT_PAGE styles.css (.wordmark*) */
.brand .wordmark-main {
  display: inline-block;
  font-size: 23px;
  font-weight: 740;
  letter-spacing: -0.07em;
  line-height: 1;
}
.brand .wordmark-main > span {
  display: inline-block;
  margin-left: 1px;
  font-weight: 400;
  background: linear-gradient(140deg, #fff 18%, #777 54%, #fff 84%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand .wordmark-labs {
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #8a8a85;
  font-weight: 650;
}
/* the front-page top bar has no tag next to the wordmark */
.brand::after {
  content: none;
}
.brand-logo {
  height: 1.6em;
  width: auto;
  align-self: center;
}
/* nav CTA — same slot and voice as the front page's "Careers ↗" (.nav-cta) */
.site-header nav a {
  font: 600 11px / 1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--fg);
  padding: 0;
  border-bottom: 0;
  transition: color 0.25s ease;
}
.site-header nav a::after {
  content: "↗";
  padding-left: 6px;
  color: #777;
}
.site-header nav a:hover {
  color: #fff;
}
.site-header nav a[aria-current] {
  color: var(--fg);
}
@media (max-width: 960px) {
  body {
    padding-top: 68px;
  }
  .site-header {
    height: 68px;
  }
}
@media (max-width: 600px) {
  body {
    padding-top: 64px;
  }
  .site-header {
    height: 64px;
  }
  .site-header nav a {
    font-size: 9px;
  }
}
.site-footer {
  border-top: 1px solid var(--line);
  color: var(--faint);
  padding: 28px 0 36px;
  margin-top: 84px;
}
.site-footer p {
  margin: 0;
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.1em;
}

/* ---- Document head / steps: kickers with status dot ---- */
.doc-head {
  padding: clamp(48px, 8vw, 110px) 0 0;
}
.doc-head h1 {
  margin-bottom: 0.25em;
}
.doc-lead {
  color: var(--muted);
  font-size: clamp(15px, 1.35vw, 19px);
  line-height: 1.65;
  max-width: 590px;
  margin-bottom: 0;
}
.step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.62rem;
  font-weight: 550;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin: 0 0 16px;
}
.step::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f4f4f0;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.07);
}
.step::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ---- Ruled section titles: kicker + display heading ---- */
.sec-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin: clamp(40px, 6vw, 72px) 0 26px;
}
.sec-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 450;
  letter-spacing: -0.045em;
  line-height: 1.02;
}
.sec-no {
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--faint);
  letter-spacing: 0.13em;
  white-space: nowrap;
}

/* ---- Hero (jobs page): grid overlay behind the statement ---- */
.hero {
  position: relative;
  padding: clamp(56px, 9vw, 120px) 0 clamp(16px, 3vw, 32px);
}
.hero::before {
  content: "";
  position: absolute;
  inset: -100px 0 0;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: linear-gradient(to bottom, #000 0, transparent 72%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0, transparent 72%);
}
.hero > * {
  position: relative;
}
.hero h1 {
  margin-bottom: 0.3em;
}
.hero .doc-lead {
  margin-bottom: 0;
}

/* ---- Roles list: one role per row, spanning the viewport edge to edge ----
   The list breaks out of the centered .wrap so its hairlines reach both screen
   edges; row content is padded back to the page gutter so titles, pills and the
   Apply action stay aligned with the rest of the page. */
.roles {
  list-style: none;
  padding: 0;
  margin: 30px 0 0;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  border-top: 1px solid var(--line);
  display: block;
}
.job-row {
  /* distance from the viewport edge to the page's content edge */
  --row-inset: max(var(--gutter), calc((100vw - var(--wrap-max)) / 2 + var(--gutter)));
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 20px var(--row-inset);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background-color 0.25s ease;
}
.job-row:hover,
.job-row:focus-visible {
  background: var(--panel);
}
.job-row:focus-visible {
  outline: 1px solid var(--line-2);
  outline-offset: -1px;
}
.job-row .row-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 0.5em;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-align: left;
  color: var(--fg);
}
.job-row .row-toggle:hover .row-title {
  color: #fff;
}
.row-caret {
  width: 8px;
  height: 8px;
  flex: none;
  border-right: 1px solid var(--muted);
  border-bottom: 1px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}
.job-row.is-open .row-caret {
  transform: rotate(-135deg);
}
.job-row .chips {
  margin: 0;
}
.row-main {
  min-width: 0;
}
.row-apply {
  white-space: nowrap;
}
.row-panel {
  grid-column: 1 / -1;
  padding: 6px 0 4px;
  max-width: 68ch;
}
.row-summary {
  margin: 0 0 0.8em;
  color: var(--muted);
  font-size: 15px;
}
.row-more {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
}
@media (max-width: 640px) {
  .job-row {
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 14px;
  }
  .row-apply {
    align-self: center;
  }
}

/* ---- Cards: hairline panels with inner frame ---- */
.cards {
  list-style: none;
  padding: 0;
  margin: 30px 0 0;
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.card {
  background: var(--bg);
  padding: 26px 26px 24px;
}
.cards .card {
  display: flex;
  flex-direction: column;
  position: relative;
  transition: background-color 0.3s ease;
}
.cards .card:hover {
  background: var(--panel);
}
.cards .card > :first-child {
  margin-top: 2px;
}
.cards .card h3 {
  margin: 0 0 0.4em;
}
.cards .card h3 a {
  color: var(--fg);
}
.cards .card h3 a:hover {
  color: #fff;
}
.cards .card p:last-of-type {
  flex: 1;
  color: var(--muted);
  font-size: 14px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 1em;
}
.chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #262626;
  border-radius: 999px;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #757570;
}
.empty {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 48px 44px;
  text-align: center;
  margin: 26px auto 0;
  max-width: calc(var(--wrap-narrow) - 2 * var(--gutter));
}
.empty h1,
.empty h2 {
  margin-bottom: 0.3em;
}

/* ---- Buttons: mono uppercase blocks; light = filled near-white ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 20px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  border: 1px solid var(--line-2);
  transition:
    background-color 0.25s,
    color 0.25s,
    border-color 0.25s;
}
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}
.btn-primary:hover {
  background: var(--bg);
  border-color: var(--line-2);
  color: #fff;
}
.btn-primary[disabled] {
  opacity: 0.55;
  cursor: progress;
}
.btn-secondary {
  background: transparent;
  color: var(--fg);
  border-color: var(--line-2);
}
.btn-secondary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

/* ---- Job detail ---- */
.back {
  display: inline-block;
  margin: clamp(24px, 4vw, 40px) 0 6px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.back:hover {
  color: #fff;
}
.back::before {
  content: "← ";
}
.job-header {
  border-bottom: 1px solid var(--line-2);
  padding: 8px 0 26px;
  margin-bottom: 30px;
}
.job-header h1 {
  margin-bottom: 0.35em;
}
.job-aside .card {
  margin-bottom: 18px;
}
.job-body {
  display: grid;
  gap: 10px 44px;
  grid-template-columns: minmax(0, 1fr);
}
.job-body .span {
  grid-column: 1 / -1;
}
.job-body section {
  margin: 0 0 28px;
}
.job-body h2 {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 550;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 14px;
}
.job-body ul {
  color: var(--muted);
}
.job-body li {
  margin-bottom: 0.5em;
}
.job-layout {
  display: grid;
  gap: 40px;
  grid-template-columns: minmax(0, 1fr);
}
.cta {
  margin: 30px 0 8px;
  padding: 26px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.cta p {
  margin: 0;
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

/* ---- Forms: hairline underline fields on dark ---- */
form {
  width: 100%;
}
.field {
  margin: 0 0 26px;
}
.field label {
  display: block;
  font-size: 0.6rem;
  font-weight: 550;
  letter-spacing: 0.13em;
  margin-bottom: 10px;
  color: var(--fg);
}
.field .req {
  color: var(--faint);
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: none;
}
.help,
.count {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 6px;
}
.count {
  text-align: right;
  margin: 6px 0 0;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
}
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="search"],
textarea,
select {
  width: 100%;
  font: inherit;
  padding: 12px 2px 10px;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  background: transparent;
  color: var(--fg);
  transition: border-color 0.2s;
}
input:hover,
textarea:hover,
select:hover {
  border-bottom-color: #57574f;
}
input:focus,
textarea:focus,
select:focus {
  outline: 1px solid var(--focus);
  outline-offset: 4px;
  border-bottom-color: var(--fg);
}
textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}
input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-bottom: 2px solid var(--error);
}
input[type="file"] {
  font: inherit;
  width: 100%;
}
.field-error {
  color: var(--error);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  margin: 8px 0 0;
}
.field-error::before {
  content: "× ";
  font-weight: 700;
}
.alert {
  padding: 16px 20px;
  margin: 0 0 24px;
  font-size: 0.9rem;
  border: 1px solid var(--line-2);
  background: var(--panel);
}
.alert p {
  margin: 0 0 0.4em;
}
.alert ul {
  margin: 0;
  padding-left: 1.1em;
}
.alert-error {
  background: var(--error-soft);
  border-color: var(--error);
  color: #ffc9bf;
}
.alert-error a {
  color: inherit;
  text-decoration: underline;
}
.alert-ok {
  background: var(--ok-soft);
  border-color: var(--ok);
}
.summary {
  border: 1px solid var(--line-2);
  background: var(--panel);
  padding: 14px 18px;
  margin: 0 0 26px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.summary p {
  margin: 0;
}

/* ---- Questions ---- */
.q-number {
  display: block;
  font-size: 0.6rem;
  font-weight: 550;
  letter-spacing: 0.16em;
  color: var(--faint);
  margin-bottom: 6px;
}
.questions-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 24px;
}
.actions {
  margin-top: 10px;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

/* ---- Confirmation: reference block ---- */
.ref {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  border: 1px solid var(--fg);
  color: var(--fg);
  padding: 12px 16px;
  display: inline-block;
}
.ref-label {
  font-size: 0.6rem;
  font-weight: 550;
  letter-spacing: 0.16em;
  color: var(--faint);
  margin: 0 0 10px;
}
.confirm-layout {
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  margin-top: 8px;
}

/* ---- Apply page: role bar + form panel ---- */
.apply-rolebar {
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  padding: 14px 18px;
}
.apply-rolebar-inner {
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: clamp(20px, 3vw, 32px) 0 0;
}
.apply-rolebar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.6rem;
  font-weight: 550;
  letter-spacing: 0.16em;
  color: var(--faint);
  margin: 0 0 14px;
}
.apply-rolebar-title::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--fg);
}
.apply-rolebar .role-picker {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 100%;
  padding-bottom: 18px;
}
.role-pill {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line-2);
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  padding: 12px 18px;
  cursor: pointer;
  transition:
    background-color 0.25s,
    color 0.25s,
    border-color 0.25s;
}
.role-pill:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}
.role-pill:hover .role-pill-chevron {
  color: var(--accent-text);
}
.role-pill:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.role-pill:disabled {
  background: var(--panel);
  border-color: var(--line);
  color: var(--muted);
  cursor: wait;
}
.role-pill-chevron {
  font-size: 0.85rem;
  line-height: 0.7;
}
.role-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0 0;
}
.role-meta-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid #262626;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 4px 8px;
}
.role-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 10;
  width: min(440px, calc(100vw - 32px));
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
  color: var(--fg);
}
.role-menu-title,
.role-menu label {
  font-size: 0.6rem;
  font-weight: 550;
  letter-spacing: 0.14em;
  margin: 0 0 10px;
}
.role-menu .role-search {
  display: block;
  width: 100%;
  min-height: 44px;
  margin: 0;
  border: 1px solid var(--line-2);
  background: var(--bg);
  color: var(--fg);
  padding: 10px 12px;
}
.role-menu .role-search:focus {
  outline: 1px solid var(--focus);
  outline-offset: 2px;
  border-color: var(--fg);
}
.role-options {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 260px;
  overflow-y: auto;
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.role-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--fg);
  font: inherit;
  text-align: left;
  padding: 10px 10px;
  cursor: pointer;
}
.role-option:hover,
.role-option.is-active {
  background: var(--panel-2);
  color: #fff;
}
.role-option.is-current {
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--fg);
}
.role-option-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.role-option-meta {
  color: var(--muted);
  font-size: 0.76rem;
  white-space: nowrap;
}
.role-option[aria-selected="true"]::after {
  content: "current";
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 550;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.role-empty,
.role-menu .role-help,
.role-menu .role-status {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 6px 8px;
}
.role-menu .role-help {
  margin: 14px 0 0;
}

/* ---- Apply form panel ---- */
.apply-shell {
  max-width: var(--wrap-narrow);
  margin: 0 auto;
  padding-top: clamp(32px, 5vw, 56px);
  padding-bottom: clamp(48px, 7vw, 88px);
}
.apply-form-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: clamp(26px, 4vw, 48px);
  position: relative;
}
.apply-form-panel::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  pointer-events: none;
}
.apply-form-panel > * {
  position: relative;
}
.apply-form-panel h2 {
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 450;
  letter-spacing: -0.04em;
  margin-bottom: 0.4em;
}
.field-grid {
  display: grid;
  gap: 0 28px;
  grid-template-columns: minmax(0, 1fr);
}
.field-wide {
  grid-column: 1 / -1;
}
.apply-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--faint);
  font-size: 0.6rem;
  font-weight: 550;
  letter-spacing: 0.16em;
  margin: 0 0 32px;
}
.apply-progress-track {
  display: block;
  width: clamp(60px, 10vw, 120px);
  height: 1px;
  background: var(--line-2);
  overflow: hidden;
}
.apply-progress-track span {
  display: block;
  width: 50%;
  height: 100%;
  background: var(--fg);
}
.actions {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 24px;
  gap: 18px;
  justify-content: space-between;
}
.action-note {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
  max-width: 260px;
  margin: 0;
}
.apply-message {
  max-width: var(--wrap-narrow);
  margin: 48px auto 0;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 48px 44px;
}

/* ---- File zone ---- */
.file-zone {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 96px;
  padding: 16px 18px;
  border: 1px solid var(--line-2);
  background: var(--bg);
  cursor: pointer;
  transition:
    border-color 0.2s,
    background-color 0.2s;
}
.file-zone:hover {
  border-color: #57574f;
  background: var(--panel);
}
.file-zone-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid currentColor;
  font-size: 1.05rem;
  flex: none;
}
.file-zone-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.file-zone-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.94rem;
  font-weight: 500;
}
.file-zone-copy .help {
  margin: 0;
}
.file-zone-action {
  font-size: 0.6rem;
  font-weight: 550;
  letter-spacing: 0.12em;
  white-space: nowrap;
  color: var(--fg);
}
.file-zone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}
.file-zone:focus-within {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.file-zone:has(input[aria-invalid="true"]) {
  border: 1px solid var(--error);
}

/* ---- Responsive ---- */
@media (min-width: 720px) {
  .field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .job-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .confirm-layout {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 44px;
  }
}
@media (min-width: 1000px) {
  .job-layout {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  }
  .job-aside {
    position: sticky;
    top: 100px; /* fixed 76px header + 24px breathing room */
    align-self: start;
  }
}
@media (max-width: 700px) {
  :root {
    --gutter: 20px;
  }
  .card {
    padding: 20px 18px;
  }
  .cta {
    padding: 20px;
  }
  .actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .actions .btn {
    width: 100%;
  }
  .action-note {
    max-width: none;
    text-align: center;
  }
  .apply-form-panel {
    padding: 24px 18px;
  }
  .empty {
    padding: 36px 22px;
  }
}

/* ---- Motion: quiet; panels settle, nothing decorative ---- */
@media (prefers-reduced-motion: no-preference) {
  .apply-form-panel {
    animation: panel-in 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
  @keyframes panel-in {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
  a,
  .btn,
  .role-pill,
  .cards .card,
  input,
  textarea,
  select {
    transition:
      color 0.2s,
      background-color 0.2s,
      border-color 0.2s;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}
