/* Careers: open roles list (/careers/) and the role page with its application
   form (/careers/<slug>/). Site tokens from /css/style.css; one accent action
   per screen (Apply / Send application). */
.careers-roles__list { display: grid; }
.careers-role {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 24px; align-items: center;
  padding: 26px 4px; border-top: 1px solid var(--border); color: inherit; text-decoration: none;
  transition: background .18s var(--ease), padding .32s var(--ease);
}
.careers-role:last-child { border-bottom: 1px solid var(--border); }
.careers-role h3 { margin: 0; color: var(--fg-strong); font-size: 1.22rem; letter-spacing: -.02em; }
.careers-role p { grid-column: 1; margin: 0; color: var(--fg-muted); font-size: .93rem; line-height: 1.6; }
.careers-role__meta { grid-column: 1; display: flex; flex-wrap: wrap; gap: 4px 0; color: var(--fg-dim); font-size: .82rem; }
.careers-role__meta > span + span::before { content: '·'; margin: 0 8px; }
.careers-role__go {
  grid-column: 2; grid-row: 1 / span 3; display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: 999px; border: 1px solid var(--border-strong); color: var(--fg-strong);
  transition: transform .18s var(--ease), border-color .18s var(--ease);
}
.careers-role__go .reicon { width: 18px; height: 18px; }
.careers-role:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 12px; }
.careers-roles__empty { padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-lg); color: var(--fg-muted); line-height: 1.6; }
.careers-roles__empty a { color: var(--fg-strong); text-decoration: underline; text-underline-offset: 3px; }
.careers-skeleton { height: 108px; border-top: 1px solid var(--border); background: linear-gradient(90deg, transparent, rgba(245,239,224,.04), transparent); background-size: 200% 100%; animation: careers-shimmer 1.4s linear infinite; }
@keyframes careers-shimmer { to { background-position: -200% 0; } }
@media (hover: hover) and (pointer: fine) {
  .careers-role:hover { background: var(--bg-subtle); padding-left: 14px; padding-right: 14px; }
  .careers-role:hover .careers-role__go { transform: translateX(2px); border-color: var(--border-hover); }
}

/* Role page */
.careers-job { padding-top: 132px; }
.careers-job__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: 56px; align-items: start; }
.careers-job__back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-bottom: 18px; color: var(--fg-muted); font-size: .88rem; font-weight: 600; text-decoration: none; }
.careers-job__back:hover { color: var(--fg-strong); opacity: 1; }
.careers-job__back .reicon { width: 17px; height: 17px; }
.careers-job__title { margin: 0 0 14px; color: var(--fg-strong); font-family: var(--font-display); font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.08; letter-spacing: -.03em; text-wrap: balance; }
/* Chinese titles break at punctuation, not inside a word (广告投放专员 / （实习）). */
.careers-job__title :lang(zh-CN), .careers-role h3 :lang(zh-CN) { word-break: keep-all; overflow-wrap: anywhere; }
.careers-job__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 34px; }
.careers-job__summary { margin: 0 0 30px; color: var(--fg); font-size: 1.08rem; line-height: 1.65; text-wrap: pretty; }
/* Both classes: .careers-submit is declared later and would otherwise win. */
.careers-job__jump.careers-submit { display: none; text-decoration: none; margin: 0 0 30px; }
.careers-job__body { color: var(--fg-muted); font-size: 1rem; line-height: 1.7; }
.careers-job__body h2 { margin: 34px 0 10px; color: var(--fg-strong); font-size: 1.2rem; letter-spacing: -.02em; }
.careers-job__body p { margin: 0 0 14px; text-wrap: pretty; }
.careers-job__body ul { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 6px; }
.careers-job__body li::marker { color: var(--accent-blue); }

.careers-apply {
  position: sticky; top: 104px; padding: 28px; border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  background: rgba(12, 21, 48, .78); -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
}
.careers-apply h2 { margin: 0 0 6px; color: var(--fg-strong); font-size: 1.3rem; letter-spacing: -.02em; }
.careers-apply__lede { margin: 0 0 20px; color: var(--fg-muted); font-size: .9rem; line-height: 1.55; }
.careers-form { display: grid; gap: 14px; }
.careers-form label.careers-field { display: grid; gap: 6px; color: var(--fg-muted); font-size: .84rem; font-weight: 600; }
.careers-field small { color: var(--fg-dim); font-weight: 400; }
.careers-form input[type="text"], .careers-form input[type="email"], .careers-form input[type="tel"], .careers-form input[type="url"], .careers-form textarea {
  width: 100%; min-height: 46px; padding: 11px 14px; border: 1px solid var(--border-strong); border-radius: 12px;
  background: rgba(6, 13, 30, .6); color: var(--fg-strong); font: inherit; font-size: 1rem;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.careers-form textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.careers-form input::placeholder, .careers-form textarea::placeholder { color: var(--fg-dim); }
.careers-form input:focus, .careers-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.careers-form [aria-invalid="true"] { border-color: #ff8a80; }
.careers-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.careers-file {
  position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 2px 12px; align-items: center;
  min-height: 64px; padding: 12px 14px; border: 1px dashed var(--border-hover); border-radius: 14px; cursor: pointer;
  background: rgba(6, 13, 30, .4); transition: border-color .18s var(--ease), background .18s var(--ease);
}
.careers-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.careers-file__icon { grid-row: span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(122, 227, 255, .09); color: var(--accent-blue); }
.careers-file__icon .reicon { width: 20px; height: 20px; }
.careers-file strong { color: var(--fg-strong); font-size: .94rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.careers-file span.careers-file__hint { color: var(--fg-dim); font-size: .8rem; font-weight: 400; }
.careers-file.is-over, .careers-file:focus-within { border-color: var(--accent); background: var(--bg-subtle); }
.careers-file.has-file { border-style: solid; }
.careers-file[aria-invalid="true"] { border-color: #ff8a80; }

.careers-consent { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; color: var(--fg-muted); font-size: .84rem; line-height: 1.5; cursor: pointer; }
.careers-consent input { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; margin: 0; border: 1px solid var(--border-hover); border-radius: 7px; background: rgba(6, 13, 30, .6); display: grid; place-items: center; cursor: pointer; transition: background .18s var(--ease), border-color .18s var(--ease); }
.careers-consent input::after { content: ''; width: 14px; height: 14px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1205' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat; transform: scale(0); transition: transform .18s var(--ease); }
.careers-consent input:checked { background: var(--accent); border-color: var(--accent); }
.careers-consent input:checked::after { transform: scale(1); }
.careers-consent input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.careers-consent a { color: var(--fg-strong); text-decoration: underline; text-underline-offset: 3px; }

.careers-submit {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 50px; margin-top: 4px;
  border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-fg); font: inherit; font-size: 1rem; font-weight: 700; cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), opacity .18s var(--ease);
}
.careers-submit:disabled { opacity: .6; cursor: progress; }
.careers-submit:focus-visible { outline: 2px solid var(--fg-strong); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .careers-submit:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 12px 28px var(--accent-glow); } }
.careers-submit:not(:disabled):active { transform: scale(.97); transition-duration: .06s; }
.careers-form__msg { min-height: 1.2em; margin: 0; color: #ff8a80; font-size: .86rem; line-height: 1.5; }
.careers-done { display: grid; gap: 10px; text-align: left; }
.careers-done__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: rgba(122, 227, 255, .1); color: var(--accent-blue); }
.careers-done__icon .reicon { width: 24px; height: 24px; }
.careers-done h2 { margin: 6px 0 0; }
.careers-done p { margin: 0; color: var(--fg-muted); line-height: 1.6; }
.careers-enter { animation: careers-enter .32s var(--ease) both; }
@keyframes careers-enter { from { opacity: 0; transform: translateY(6px); } }
.careers-missing { max-width: 640px; }
.careers-missing p { color: var(--fg-muted); line-height: 1.6; margin: 0 0 24px; }

@media (max-width: 900px) {
  .careers-job { padding-top: 104px; }
  .careers-job__grid { grid-template-columns: 1fr; gap: 36px; }
  .careers-apply { position: static; }
  .careers-apply { scroll-margin-top: 96px; }
  .careers-job__jump.careers-submit { display: inline-flex; }
}
@media (max-width: 560px) {
  .careers-role { padding: 22px 0; }
  .careers-apply { padding: 22px 18px; margin: 0 -4px; }
}
@media (prefers-reduced-motion: reduce) {
  .careers-role, .careers-role__go, .careers-submit, .careers-consent input::after { transition: none; }
  .careers-role:hover { padding-left: 4px; padding-right: 4px; }
  .careers-skeleton { animation: none; }
  .careers-enter { animation: careers-fade .15s linear both; }
  @keyframes careers-fade { from { opacity: 0; } }
}
@media (prefers-reduced-transparency: reduce) {
  .careers-apply { background: var(--bg-elevated); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (forced-colors: active) {
  .careers-consent input:checked { background: Highlight; }
  .careers-submit { border: 1px solid ButtonText; }
}
