:root {
  color-scheme: dark;
  --page: #0d0d0d;
  --paper: #f5f0e8;
  --secondary: #b4aea7;
  --muted: #9d9690;
  --accent: #ff6900;
  --focus: #ffbc90;
  --error: #ffa08e;
  --surface: 620px;
  --field-gap: 23px;
  --control-size: 18px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

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

body {
  margin: 0;
  background: var(--page);
  color: var(--paper);
  font: 1rem/1.6 Inter, -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
.interview { overflow-wrap: anywhere; }
.interview-brand {
  width: min(1240px, calc(100% - 16px));
  margin: 8px auto 0;
}
.interview-brand a { display: block; width: fit-content; }
.interview-brand img { display: block; object-fit: contain; }
.interview-shell {
  width: min(850px, calc(100% - 46px));
  min-height: calc(100svh - 167px);
  padding: clamp(48px, 11svh, 100px) 0 91px;
  margin: auto;
  display: flex;
  flex-direction: column;
}
.interview-header { text-align: center; margin-bottom: 44px; }
.interview-title {
  margin: 0 auto 10px;
  font-size: clamp(29px, 4.8vw, 48px);
  line-height: 1.27;
  letter-spacing: -.055em;
  font-weight: 560;
}
.interview-lead, .interview-message {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  white-space: pre-line;
}
.interview-body, .interview-alert { width: min(100%, var(--surface)); margin-inline: auto; }
.interview-step-meta { display: flex; align-items: baseline; gap: 12px; margin-bottom: 17px; }
.interview-step-title { margin: 0; line-height: 1.5; }
.interview-step-meta h2 { color: var(--paper); font-size: 12px; flex: none; letter-spacing: .07em; }
.interview-step-title:focus { outline: none; }

.interview-field {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  isolation: isolate;
}
.interview-field + .interview-field { margin-top: var(--field-gap); }
.interview-field::before {
  content: "";
  position: absolute;
  inset: -5px -10px;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(ellipse at center, #ff690012, transparent 75%);
  opacity: 0;
  transition: opacity 220ms ease;
}
.interview-field:hover::before { opacity: .45; }
.interview-field:focus-within::before { opacity: 1; }
.interview-label-text, .interview-write-in label {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--secondary);
  font-size: 12px;
  font-weight: 560;
  letter-spacing: .08em;
}
.interview-field legend { padding: 0; }
.interview-requirement { margin-left: 10px; font-size: 10px; color: var(--muted); }
.interview-field:focus-within .interview-label-text { color: var(--focus); }
.interview-field :is(input[type=text], input[type=email], textarea, select) {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 2px 22px 6px 0;
  border: 0;
  border-bottom: 1px solid #39332e;
  border-radius: 0;
  background: transparent;
  color: var(--paper);
  font-size: var(--control-size);
}
.interview-field .interview-ctl textarea {
  field-sizing: content;
  line-height: 1.4;
  padding-block: 9px;
  resize: vertical;
}
.interview-field select { cursor: pointer; }
.interview-field select option { background: #171717; }
.interview-field[data-filled=true] > label:first-child::after {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-left: 9px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
}
.interview-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 22px; }
.interview-option {
  display: inline-flex;
  min-height: 44px;
  max-width: 100%;
  align-items: center;
  gap: 8px;
  color: var(--secondary);
  font-size: 14px;
  cursor: pointer;
}
.interview-option input { accent-color: var(--accent); margin: 0; flex: none; }
.interview-option:has(:checked) { color: var(--paper); font-weight: 560; }
.interview-option:hover { color: white; }
.interview-write-in { margin-top: 8px; }
:where(input:not([type=radio], [type=checkbox]), textarea, select, button, a):focus-visible,
.interview-option:has(:focus-visible) { outline: 2px solid var(--focus); outline-offset: 3px; }
.interview-field :is(input, textarea, select)[aria-invalid=true] { border-color: var(--error); }
.interview-field-error, .interview-alert, .interview-failed-text, .interview-noscript {
  color: var(--error);
  font-size: 13px;
}
.interview-field-error { margin: 6px 0 0; }
.interview-alert { margin-bottom: 12px; }

.interview-actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 24px; margin-top: 32px; }
.interview-form .interview-submit { margin-inline-start: auto; }
.interview-form .interview-back { margin-inline-end: auto; }
.interview-submit, .interview-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  min-height: 47px;
  padding: 12px 28px;
  border-radius: 100px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 220ms var(--ease), background-color 220ms ease;
}
.interview-submit { background: var(--accent); color: #1a100a; font-weight: 720; }
.interview-back { background: transparent; color: var(--secondary); padding-inline: 8px; }
.interview-submit:hover:not(:disabled) { background: #ff8330; transform: translateY(-2px); }
.interview-back:hover { color: var(--paper); }
.interview-actions :is(button, a):active:not(:disabled) { transform: scale(.97); }
.interview-actions button:disabled { opacity: .65; cursor: wait; }
.interview-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.interview-loading, .interview-body[data-phase=done] {
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
  min-height: 355px;
  gap: 17px;
}
.interview-loading p { margin: 0; }
.interview-spinner::before, .interview-body[data-phase=done]::before {
  content: "✦" / "";
  color: var(--focus);
  font-size: 30px;
}
.interview-shell:has(.interview-body[data-phase=done]) .interview-header { display: none; }
.interview-body[data-phase=done] { min-height: auto; gap: 12px; }
.interview-body[data-phase=done] .interview-step-title { font-size: clamp(28px, 4vw, 40px); }
.interview-body[data-phase=done] .interview-message { font-size: 16px; color: var(--secondary); }
.interview-body[data-phase=done] .interview-actions { margin-top: 12px; }
@media (prefers-reduced-motion: no-preference) {
  .interview-spinner { animation: breathe 1.4s ease-in-out infinite alternate; }
  @keyframes breathe { to { opacity: .45; } }
}
@media (max-width: 720px) {
  :root { --control-size: 17px; }
  .interview-shell { width: calc(100% - 44px); justify-content: flex-start; padding: 38px 0 65px; }
  .interview-header { margin-bottom: 40px; }
  .interview-title { font-size: clamp(28px, 7.7vw, 39px); }
  .interview-choices { grid-template-columns: minmax(0, 1fr); }
  .interview-actions { margin-top: 24px; }
  .interview-body[data-phase=done] .interview-actions { flex-direction: column; width: 100%; gap: 4px; }
  .interview-body[data-phase=done] .interview-submit { width: 100%; }
}
/* ---- Breathing motion: slow pace set by --motion, all of it off under prefers-reduced-motion ---- */
:root { --motion: 1.6; }
.interview { position: relative; isolation: isolate; }
.interview-aura { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.interview-orb {
  position: absolute; left: 0; top: 0; width: 460px; height: 460px; margin: -230px 0 0 -230px;
  background: radial-gradient(circle at 42% 42%, #ff690038, #ff8a6b17 42%, transparent 70%);
  filter: blur(36px); opacity: .85;
  transform: translate(var(--x, 50vw), var(--y, 110vh)) scale(var(--s, 1));
  transition: transform calc(900ms * var(--motion)) var(--ease), opacity calc(600ms * var(--motion));
}
.interview-orb.is-thinking { animation: orb-breathe calc(1.4s * var(--motion)) ease-in-out infinite; }
.interview-burst { position: absolute; width: 60px; height: 60px; margin: -30px 0 0 -30px; border-radius: 50%; border: 1.5px solid var(--focus); animation: ring-burst calc(1.2s * var(--motion)) var(--ease) forwards; }
.interview-char { display: inline-block; }
.interview-title.is-lit {
  background: linear-gradient(100deg, var(--paper) 30%, var(--focus) 52%, var(--paper) 74%) 0 0 / 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: title-sweep 6s ease-in-out 3;
}
.interview-ctl { position: relative; }
.interview-spark { position: absolute; right: 2px; top: 22px; translate: 0 -62%; color: var(--focus); font-size: 15px; opacity: 0; pointer-events: none; }
.interview-ctl[data-filled=true] > .interview-spark { opacity: .4; }
.interview-spark.on { animation: spark-flash calc(520ms * var(--motion)) var(--ease); }
.interview-field :is(input[type=text], input[type=email], textarea) {
  background: linear-gradient(90deg, var(--accent), var(--focus), transparent) left bottom / 0% 2px no-repeat;
  transition: background-size calc(650ms * var(--motion)) var(--ease), border-color .2s, box-shadow .3s;
  box-shadow: 0 9px 22px -14px rgb(255 105 0 / calc(var(--fill, 0) * .95));
}
.interview-field :is(input[type=text], input[type=email], textarea):focus { background-size: 100% 2px; border-bottom-color: transparent; outline: none; }
.interview-option { position: relative; isolation: isolate; }
.interview-ripple { position: absolute; left: 0; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: #ff690019; pointer-events: none; z-index: -1; animation: option-ripple calc(650ms * var(--motion)) var(--ease) forwards; }
.interview-submit.is-sending { min-width: 11.5em; background: linear-gradient(100deg, #ff6900 0%, #ffbc90 45%, #ff6900 90%) 0 0 / 220% 100%; animation: button-shimmer calc(1.3s * var(--motion)) linear infinite; }
.interview-submit.is-sending:disabled { opacity: .9; }
.interview-glyph { display: inline-block; margin-right: 8px; animation: glyph-spin calc(1.1s * var(--motion)) linear infinite; }
.interview-sending-label { animation: rise-in calc(260ms * var(--motion)) var(--ease); }
.interview-body[data-phase=done]::before { animation: glyph-spin calc(1.4s * var(--motion)) var(--ease) 1; }
.interview-body[data-phase=done] a.interview-submit { background: linear-gradient(105deg, var(--accent) 40%, #ffd2b0 50%, var(--accent) 60%) 120% 0 / 250% 100%; animation: button-sheen calc(1.6s * var(--motion)) calc(.5s * var(--motion)) ease-out 1 forwards; }
@media (prefers-reduced-motion: no-preference) {
  /* Hold the header back until the entrance takes over, and show it anyway if the script never runs. */
  @media (scripting: enabled) {
    .interview:not([data-entered]) :is(.interview-title, .interview-lead) { opacity: 0; animation: header-unhide 0s 6s forwards; }
  }
}
@keyframes orb-breathe { 50% { scale: 1.16; opacity: 1; } }
@keyframes ring-burst { to { transform: scale(10); opacity: 0; } }
@keyframes title-sweep { 50% { background-position: -120% 0; } }
@keyframes spark-flash { 0% { opacity: 1; scale: .5; } 60% { opacity: 1; scale: 1.5; } 100% { scale: 1; } }
@keyframes option-ripple { to { transform: scale(16); opacity: 0; } }
@keyframes button-shimmer { to { background-position: -220% 0; } }
@keyframes button-sheen { to { background-position: -40% 0; } }
@keyframes glyph-spin { to { rotate: 360deg; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes header-unhide { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; transform: none; }
  .interview-actions :is(button, a):is(:hover, :active) { transform: none; }
  .interview-aura { display: none; }
}
