:root {
  --bg: #f4efe6;
  --ink: #1c1914;
  --muted: #6d675c;
  --line: #d8cfc0;
  --paper: #fffdf8;
  --accent: #1f4af2;
  --accent-dark: #173bc4;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Outfit, sans-serif;
  font-size: 17px;
  line-height: 1.55;
}

.page {
  width: min(760px, calc(100% - 40px));
  margin: 0 auto;
  padding: 64px 0 96px;
  scroll-margin-top: 24px;
}

.eyebrow {
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--accent);
  margin: 0 0 12px;
}

.brand {
  display: inline-block;
  line-height: 1;
  margin: 0 0 28px;
}

.brand-logo {
  display: block;
  height: 24px;
  width: auto;
}

h1, h2 {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.05;
  margin: 0 0 20px;
}

h2 {
  font-size: 1.55rem;
  margin: 0 0 14px;
}

.lede, .meta, .help, .save-status, .muted, .empty {
  color: var(--muted);
}

.lede { font-size: 1.08rem; max-width: 42rem; }

.progress-wrap { margin: 32px 0 8px; }
.progress-bar {
  height: 4px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
}
.progress-bar span {
  display: block;
  height: 100%;
  background: var(--accent);
  width: 0;
  transition: width 0.35s ease;
}
.progress-label { font-size: 13px; margin: 8px 0 0; }

/* --- Multi-step form ------------------------------------------------ */

#careersForm { position: relative; }

.step {
  display: none;
}

.step.is-active {
  display: block;
  animation: step-in 0.32s ease both;
}

@keyframes step-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .step.is-active { animation: none; }
}

.step-head { margin: 8px 0 22px; }
.step-count {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
}
.step-title { margin: 0 0 6px; }
.step-subtitle { color: var(--muted); margin: 0; }

.step-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
}

.step-nav .step-back {
  visibility: visible;
}

.step[data-step="1"] .step-nav .step-back {
  visibility: hidden;
  pointer-events: none;
}

.step-nav .submit { margin-top: 0; margin-left: auto; }

.question {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 28px;
  margin: 16px 0;
}

.question h3 {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

.req { color: var(--accent); }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 10px 0;
  font: inherit;
  color: inherit;
  outline: none;
}

textarea { resize: vertical; }

select {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 10px 0;
  font: inherit;
  color: inherit;
  outline: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 6px) 18px, calc(100% - 1px) 18px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

input:focus, textarea:focus, select:focus { border-bottom-color: var(--accent); }

.choices { display: grid; gap: 8px; }

.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.choice:hover { border-color: #c9baa5; }

.choice:has(input:checked) {
  border-color: var(--accent);
  background: #e9eefd;
}

.choice input { accent-color: var(--accent); }

.range-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.range-row input { flex: 1; accent-color: var(--accent); }
.range-row strong { min-width: 1.5rem; }

.submit {
  appearance: none;
  border: 0;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  padding: 16px 28px;
  border-radius: 999px;
  cursor: pointer;
  margin-top: 12px;
  transition: background 0.15s ease, transform 0.1s ease;
}

.submit:hover { background: var(--accent-dark); }
.submit:active { transform: scale(0.98); }

.ghost {
  appearance: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  padding: 14px 22px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ghost:hover { border-color: var(--accent); color: var(--accent); }

.form-error {
  color: #9b1c1c;
  background: #fbeaea;
  border: 1px solid #f0c8c8;
  border-radius: 12px;
  padding: 12px 16px;
  margin: 16px 0;
}
.save-status { font-size: 14px; margin-top: 14px; text-align: center; }

.thanks { padding-top: 18vh; }

.login-form { display: grid; gap: 16px; max-width: 360px; }

.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.ghost, .back {
  color: var(--ink);
  text-decoration: none;
}

a.back {
  border-bottom: 1px solid var(--line);
  display: inline-block;
}

.tabs-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 28px 0;
}

.tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tabs a {
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  background: transparent;
}

.tabs a.is-active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.tabs span {
  opacity: 0.7;
  margin-left: 6px;
}

.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 18px;
  background: var(--paper);
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.btn-export:hover { border-color: var(--accent); color: var(--accent); background: #e9eefd; }
.btn-export svg { flex: none; }

.app-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.app-list li {
  display: grid;
  gap: 4px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 20px;
  position: relative;
}

.app-list a {
  text-decoration: none;
  color: inherit;
  display: grid;
  gap: 4px;
  padding-right: 90px;
}

.app-list li:hover { border-color: var(--accent); }

.app-list .row-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
}

.stars {
  color: #cbb98a;
  letter-spacing: 1px;
  font-size: 14px;
}
.stars .on { color: var(--accent); }

.mini-delete {
  position: absolute;
  top: 14px;
  right: 16px;
}

.mini-delete button {
  appearance: none;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.mini-delete button svg { flex: none; }
.mini-delete button:hover { border-color: #9b1c1c; color: #9b1c1c; background: #fbeaea; }

.answers {
  display: grid;
  gap: 18px;
  margin-top: 32px;
}

.answers > div {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
}

.answers dt { font-weight: 600; margin-bottom: 8px; }
.answers dd { margin: 0; white-space: pre-wrap; color: var(--muted); }

.admin-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 22px;
  margin-top: 28px;
}

.admin-panel h2 {
  font-size: 1.15rem;
  margin: 0 0 14px;
}

.admin-panel label.field-label {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
}

.admin-panel select {
  max-width: 220px;
  margin-bottom: 16px;
}

.admin-panel textarea {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  width: 100%;
  font: inherit;
  color: inherit;
  background: #fff;
}

.admin-panel .row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
  flex-wrap: wrap;
}

.danger-form { margin-top: 10px; }

.danger {
  appearance: none;
  background: #fff;
  border: 1px solid #e0b3b3;
  color: #9b1c1c;
  font: inherit;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.danger svg { flex: none; }
.danger:hover { background: #fbeaea; }

@media (max-width: 640px) {
  .page { width: calc(100% - 28px); padding-top: 36px; }
  .question { padding: 20px; }
  .step-nav { flex-wrap: wrap; }
  .app-list a { padding-right: 0; }
  .mini-delete { position: static; margin-top: 10px; }
}

/* ===================================================================
   Typeform-style candidate pages (index.php, thanks.php)
   Scoped entirely under body.tf-page so the admin palette/fonts are
   untouched — these custom properties shadow the :root ones only here.
   =================================================================== */

body.tf-page {
  --bg: #ffffff;
  --ink: #14171f;
  --muted: #75797f;
  --line: #e7e5e0;
  --paper: #ffffff;
  --accent: #1f4af2;
  --accent-dark: #173bc4;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  position: relative;
}

body.tf-page h1,
body.tf-page h2,
body.tf-page h3 {
  font-family: 'Inter', sans-serif;
}

body.tf-page .brand {
  margin: 0;
}

body.tf-page .brand-logo {
  height: 20px;
}

.tf-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px clamp(24px, 5vw, 64px);
  z-index: 30;
}

.tf-percent {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  transition: opacity 0.2s ease;
}

.tf-track {
  position: fixed;
  top: 62px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--line);
  z-index: 29;
  transition: opacity 0.2s ease;
}

.tf-track span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.35s ease;
}

[hidden] { display: none !important; }

.tf-screen {
  display: none;
  min-height: 100vh;
  align-items: center;
  padding: 128px clamp(24px, 6vw, 96px) 100px;
  box-sizing: border-box;
}

.tf-screen.is-active {
  display: flex;
  animation: tf-in 0.32s ease both;
}

@keyframes tf-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .tf-screen.is-active { animation: none; }
}

.tf-col { width: 100%; max-width: 480px; }

.tf-eyebrow {
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  margin: 0 0 12px;
}

.tf-h1 {
  font-weight: 800;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
}

.tf-lede {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 420px;
  margin: 0 0 36px;
}

.tf-counter {
  color: var(--accent);
  font-weight: 700;
  font-size: 15px;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tf-counter svg { width: 13px; height: 13px; }

.tf-title {
  font-weight: 700;
  font-size: clamp(1.5rem, 3.2vw, 2rem);
  line-height: 1.28;
  margin: 0 0 12px;
}

.tf-title .req { color: var(--accent); }

.tf-help {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 20px;
}

.tf-field { margin-top: 20px; }

.tf-input,
.tf-select,
.tf-textarea {
  width: 100%;
  border: 0;
  border-bottom: 2px solid var(--line);
  background: transparent;
  padding: 10px 2px;
  font: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  outline: none;
  box-sizing: border-box;
}

.tf-textarea { resize: vertical; }

.tf-select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 6px) 18px, calc(100% - 1px) 18px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.tf-input::placeholder { color: #bdb9b0; }
.tf-input:focus, .tf-select:focus, .tf-textarea:focus { border-bottom-color: var(--accent); }

.tf-choices { display: grid; gap: 10px; margin-top: 20px; }

.tf-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.98rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.tf-choice:hover { border-color: #d2cec4; }
.tf-choice:has(input:checked) { border-color: var(--accent); background: #e9eefd; }
.tf-choice input { accent-color: var(--accent); }

.tf-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.tf-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  border-radius: 999px;
  padding: 4px 4px 4px 22px;
  gap: 14px;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.tf-btn:hover { opacity: 0.88; }
.tf-btn:active { transform: scale(0.98); }

.tf-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 50%;
  color: #fff;
  flex: none;
}

.tf-btn-icon svg { width: 15px; height: 15px; }

.tf-hint {
  color: var(--muted);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
}

.tf-hint kbd {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 8px;
  font-family: inherit;
  font-size: 12px;
  color: var(--muted);
  background: #fafaf8;
}

.tf-nav {
  position: fixed;
  right: clamp(20px, 4vw, 48px);
  bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 30;
  transition: opacity 0.2s ease;
}

.tf-nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.tf-nav-btn:hover { opacity: 0.85; }
.tf-nav-btn:disabled { opacity: 0.28; cursor: default; }
.tf-nav-btn svg { width: 18px; height: 18px; }

.tf-error {
  color: #9b1c1c;
  background: #fdeceb;
  border: 1px solid #f3c9c6;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  margin-top: 20px;
  max-width: 420px;
}

.tf-save-status {
  position: fixed;
  bottom: 26px;
  left: clamp(24px, 5vw, 64px);
  color: var(--muted);
  font-size: 12px;
  z-index: 30;
  margin: 0;
}

@media (max-width: 640px) {
  .tf-screen { padding: 104px 22px 140px; }
  .tf-nav { bottom: 18px; right: 18px; }
  .tf-save-status { left: 22px; bottom: 18px; }
  .tf-topbar { padding: 20px 22px; }
  .tf-track { top: 56px; }
}
