/* Careers hub + dedicated job pages — layered on the shared legal-document theme. */
@media (min-width: 901px) { .legal-layout { grid-template-columns: minmax(0, 260px) minmax(0, 1fr); } }
.doc-hero .pill { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-hover); }
.home-footer__brand-name { display: none; }
.content { min-width: 0; }
.doc-hero h1 { margin-bottom: 14px; }
.doc-hero p { font-size: 1.02rem; line-height: 1.65; }

/* ---- Job listing cards (careers.html) ---- */
.job-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin: 0 0 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.job-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}
.job-card:last-child { margin-bottom: 0; }
.job-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 8px;
}
.job-card h3 {
  margin: 2px 0 8px;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.job-card p { margin: 0 0 14px; color: var(--ink-muted); line-height: 1.6; }
.job-card__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.job__code {
  font: 700 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.04em;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent-hover);
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.job__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.job__tag {
  font: 600 12px/1 var(--font);
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-muted);
  padding: 5px 10px;
  border-radius: 999px;
}
.job__badge-open {
  font: 700 11px/1 var(--font);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #0b7a3b;
  background: rgba(16, 160, 80, 0.12);
  padding: 5px 10px;
  border-radius: 999px;
}

/* ---- Preliminary round callout (dedicated job pages) ---- */
.prelim {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin: 14px 0 4px;
  background: color-mix(in srgb, var(--accent) 4%, var(--surface-2));
}
.prelim h4 {
  margin: 0 0 10px;
  font: 700 14px/1.3 var(--font);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.01em;
}
.prelim h4::before { content: "✦"; color: var(--accent); }
.prelim ol { margin: 0; padding-left: 20px; }
.prelim ol li { margin: 7px 0; line-height: 1.55; }
.prelim ol li:last-child { margin-bottom: 0; }

/* ---- Buttons ---- */
.btn-primary,
.apply-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border: 0;
  border-radius: 10px;
  padding: 11px 20px;
  font: 700 14px/1 var(--font);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(26, 23, 20, 0.12);
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
.btn-primary:hover,
.apply-btn:hover { background: var(--accent-hover); box-shadow: var(--shadow-sm); }
.btn-primary:active,
.apply-btn:active { transform: translateY(1px); }
.btn-primary:focus-visible,
.apply-btn:focus-visible,
.btn-secondary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 18px;
  font: 700 14px/1 var(--font);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.btn-secondary:hover { background: var(--surface-2); }

/* ---- Inline application form (revealed on "Apply Now") ---- */
.apply-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px 24px 24px;
  margin: 16px 0 0;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  display: none;
}
.apply-panel.is-open { display: block; animation: careersPanelIn 0.22s ease; }
@keyframes careersPanelIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.apply-panel h3 {
  margin: 0 0 6px;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.apply-panel > p.apply-panel__hint {
  margin: 0 0 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-muted);
}

.fb-form { display: grid; gap: 16px; margin: 0; }
.fb-field { display: grid; gap: 6px; }
.fb-field label { font: 600 13px/1.3 var(--font); color: var(--ink); }
.fb-field input,
.fb-field textarea {
  font: 400 15px/1.5 var(--font);
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid color-mix(in srgb, var(--ink) 30%, transparent);
  border-radius: 10px;
  padding: 11px 13px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.fb-field input::placeholder,
.fb-field textarea::placeholder { color: var(--ink-muted); opacity: 0.7; }
.fb-field textarea { resize: vertical; min-height: 96px; }
.fb-field input:hover,
.fb-field textarea:hover { border-color: color-mix(in srgb, var(--ink) 45%, transparent); }

.fb-field input[type="file"] {
  padding: 9px 12px;
  cursor: pointer;
  background: var(--surface-2);
}
.fb-field input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 7px 14px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: var(--surface);
  font: 700 13px/1 var(--font);
  cursor: pointer;
  transition: background 0.15s ease;
}
.fb-field input[type="file"]::file-selector-button:hover { background: color-mix(in srgb, var(--ink) 85%, var(--accent)); }
.fb-field .fb-file-hint { font-size: 12px; color: var(--ink-muted); }
.fb-field input:focus,
.fb-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.fb-grid { display: grid; gap: 16px; }
@media (min-width: 560px) { .fb-grid { grid-template-columns: 1fr 1fr; } }

/* Each Game-N block gets breathing room above it, separate from the plain
   16px field gap — otherwise a "Current company" field butts straight up
   against the next "Game 1" card with no visual break between them. */
.fb-game {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 18px 20px;
  background: var(--surface-2);
  display: grid;
  gap: 14px;
}
.fb-game > strong {
  font: 700 13px/1 var(--font);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}

.fb-submit {
  /* Extra breathing room above the button, on top of the .fb-form gap —
     keeps it visually separated from the field right above it (e.g. a
     textarea), not just evenly spaced like every other field pair. */
  margin-top: 10px;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 12px 24px;
  font: 700 14px/1 var(--font);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(26, 23, 20, 0.12);
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease, opacity 0.15s ease;
}
.fb-submit:hover:not(:disabled) { background: var(--accent-hover); box-shadow: var(--shadow-sm); }
.fb-submit:active:not(:disabled) { transform: translateY(1px); }
.fb-submit:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fb-submit:disabled { opacity: 0.65; cursor: default; }
.fb-note { font-size: 13px; color: var(--ink-muted); margin: 10px 0 0; }

.fb-success,
.fb-error {
  display: none;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  padding: 13px 15px;
  border-radius: 10px;
  font: 600 14px/1.5 var(--font);
}
.fb-success.is-visible,
.fb-error.is-visible { display: flex; }
.fb-success::before { content: "✓"; flex: none; }
.fb-error::before { content: "!"; flex: none; font-weight: 800; }
.fb-success {
  background: rgba(16, 160, 80, 0.1);
  color: #0b7a3b;
  border: 1px solid rgba(16, 160, 80, 0.25);
}
.fb-error {
  background: rgba(200, 40, 40, 0.08);
  color: #b3261e;
  border: 1px solid rgba(200, 40, 40, 0.22);
}

@media (prefers-color-scheme: dark) {
  .job-card,
  .prelim,
  .fb-game,
  .apply-panel { background: var(--surface); border-color: var(--line); }
  .prelim { background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
  .job__tag { background: var(--surface-2); border-color: var(--line); }
  .fb-field input,
  .fb-field textarea { background: var(--surface-2); border-color: color-mix(in srgb, var(--ink) 30%, transparent); }
  .fb-game { background: var(--surface-2); }
  .fb-success { background: rgba(46, 204, 113, 0.14); color: #7fe0a8; border-color: rgba(46, 204, 113, 0.3); }
  .fb-error { background: rgba(255, 90, 90, 0.14); color: #ff8a80; border-color: rgba(255, 90, 90, 0.3); }
}

@media (max-width: 620px) {
  .job-card { padding: 16px 18px; }
  .apply-panel { padding: 18px 16px 20px; }
}
