/* Nexora Website Stabilization V01
   Loaded after nexora.css to provide low-risk runtime, accessibility, and
   failure-state improvements without redesigning the existing website. */

:root {
  --nx-stable-focus: #70d7c4;
  --nx-stable-live: #b8f34c;
  --nx-stable-demo: #71c7ff;
  --nx-stable-warning: #ffc766;
  --nx-stable-error: #ff8e82;
}

/* Make keyboard navigation visible across both the public site and workspace. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--nx-stable-focus) 78%, white 22%);
  outline-offset: 3px;
}

:where(button, input, select, textarea):disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: .56;
}


/* Demo session controls belong to the shared stylesheet, not inline markup. */
.nx-demo-session-exit { margin: 0; }
.nx-demo-session-exit button {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
}
.nx-demo-session-exit button:hover { opacity: .62; }
.nx11-mobile-menu .nx-demo-session-exit button {
  width: 100%;
  padding: 14px 0;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

/* Truthful runtime state: live, local demo, setup required, or invalid. */
.nx-runtime-state[data-runtime-state="live_ready"] i {
  background: var(--nx-stable-live) !important;
  box-shadow: 0 0 14px color-mix(in srgb, var(--nx-stable-live) 72%, transparent) !important;
}

.nx-runtime-state[data-runtime-state="demo_local"] i {
  background: var(--nx-stable-demo) !important;
  box-shadow: 0 0 14px color-mix(in srgb, var(--nx-stable-demo) 70%, transparent) !important;
}

.nx-runtime-state[data-runtime-state="live_unconfigured"] i {
  background: var(--nx-stable-warning) !important;
  box-shadow: 0 0 14px color-mix(in srgb, var(--nx-stable-warning) 70%, transparent) !important;
}

.nx-runtime-state[data-runtime-state="invalid_configuration"] i {
  background: var(--nx-stable-error) !important;
  box-shadow: 0 0 14px color-mix(in srgb, var(--nx-stable-error) 68%, transparent) !important;
}

.nx-runtime-state[data-runtime-state="live_unconfigured"],
.nx-runtime-state[data-runtime-state="invalid_configuration"] {
  font-weight: 700;
}

/* Keep long operational values from breaking cards on narrow screens. */
.nx-demo :where(code, pre, .nx-value, [data-long-value]) {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.nx-demo table {
  width: 100%;
}

.nx-demo :where(.nx-table-wrap, .table-wrap, [data-table-scroll]) {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

/* Clearer busy state while preserving native disabled controls. */
#nexora-demo[aria-busy="true"] [data-api-action]:not(:disabled) {
  pointer-events: none;
}

.nx-alert[hidden],
.nx-loading[hidden] {
  display: none !important;
}

/* The footer can be skipped during the first paint. Sections above #contact must not be: an
   in-page link (开始使用 -> #contact) scrolls smoothly past them, they grow from the 900px placeholder
   mid-scroll (impact by ~2400px on a phone) and the jump stops short of its target (10/30). */
@supports (content-visibility: auto) {
  .nexora-home-11x :where(.nx11-footer) {
    content-visibility: auto;
    contain-intrinsic-size: 900px;
  }
}

/* Avoid layout overflow from media supplied by future assets. */
.nexora-site img,
.nexora-site video {
  max-width: 100%;
}

@media (max-width: 720px) {
  .nx-demo :where(button, .nx11-pill, input[type="submit"], input[type="button"]) {
    min-height: 42px;
  }

  .nxr4-hero-console__top {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* -------------------------------------------------------------------------
   Website Optimization V02: scalable candidate review and sequence controls
   ------------------------------------------------------------------------- */

.nx-source-row {
  flex-wrap: wrap;
  gap: 8px;
}

.nx-evaluation-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid #d6ded8;
  border-radius: 999px;
  background: #f6f8f4;
  color: #4d6254;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}

.nx-evaluation-badge[data-mode="fast_rule"] {
  border-color: #dce7be;
  background: #f5f8e9;
  color: #5c7517;
}

.nx-candidate-summary {
  margin: 16px 0 0;
  padding: 15px 16px;
  border: 1px solid #dfe4df;
  border-radius: 14px;
  background: #fbfcfa;
}

.nx-candidate-summary .nx-candidate-card__summary {
  margin: 7px 0 0;
  color: #2e3c35;
  font-size: 14px;
  line-height: 1.75;
}

.nx-candidate-summary__original {
  margin-top: 10px;
  border-top: 1px dashed #d9dfda;
  padding-top: 9px;
}

.nx-candidate-summary__original summary {
  color: #52715f;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.nx-candidate-summary__original p {
  margin: 8px 0 0;
  color: #68746d;
  font-size: 12px;
  line-height: 1.65;
}

.nx-fit-feedback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid #d8e1db;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8faf7, #f4f7ee);
}

.nx-fit-feedback__copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.nx-fit-feedback__copy strong {
  color: #24382e;
  font-size: 13px;
}

.nx-fit-feedback__copy small {
  color: #6a776f;
  line-height: 1.45;
}

.nx-fit-feedback__actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.nx-fit-feedback__button {
  min-height: 36px;
  padding: 7px 13px;
  border: 1px solid #cfd9d2;
  border-radius: 999px;
  background: #fff;
  color: #3e5146;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  transition: border-color .18s ease, background-color .18s ease, color .18s ease, transform .18s ease;
}

.nx-fit-feedback__button:hover:not(:disabled) {
  border-color: #6b8d75;
  transform: translateY(-1px);
}

.nx-fit-feedback__button[data-candidate-feedback="fit"][data-active="true"] {
  border-color: #4f7e28;
  background: #eaf4d7;
  color: #365d17;
}

.nx-fit-feedback__button[data-candidate-feedback="not_fit"][data-active="true"] {
  border-color: #b86c63;
  background: #fff0ed;
  color: #8a3d35;
}

.nx-scheduler-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 18px 0;
  padding: 15px 18px;
  border: 1px solid #d8e1db;
  border-left: 4px solid #b8c5bc;
  border-radius: 14px;
  background: #f8faf8;
}

.nx-scheduler-state[data-status="running"] {
  border-left-color: #6d9621;
  background: #f5f9ea;
}

.nx-scheduler-state[data-status="stopped"] {
  border-left-color: #d58c36;
  background: #fff8ee;
}

.nx-scheduler-state strong {
  display: block;
  margin-top: 4px;
  color: #253b2f;
}

.nx-scheduler-state p {
  max-width: 820px;
  margin: 5px 0 0;
  color: #65736b;
  line-height: 1.55;
}

.nx-schedule-list {
  display: grid;
  gap: 14px;
}

.nx-sequence-card {
  overflow: hidden;
  border: 1px solid #d8e0da;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 7px 22px rgba(25, 52, 38, .035);
}

.nx-sequence-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 18px 12px;
}

.nx-sequence-card__header h3 {
  margin: 3px 0 3px;
  color: #1f3328;
  font-size: 16px;
}

.nx-sequence-card__header p {
  margin: 0;
  color: #68756e;
  font-size: 12px;
}

.nx-sequence-timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 18px 15px;
}

.nx-sequence-timeline__item {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 2px 8px;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid #e0e5e1;
  border-radius: 11px;
  background: #f8faf8;
}

.nx-sequence-timeline__item b {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 9px;
  background: #e8eee9;
  color: #3f5d4d;
  font-size: 11px;
}

.nx-sequence-timeline__item > span,
.nx-sequence-timeline__item small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nx-sequence-timeline__item > span {
  color: #31473a;
  font-size: 11px;
  font-weight: 700;
}

.nx-sequence-timeline__item small {
  color: #78847c;
  font-size: 10px;
}

.nx-sequence-timeline__item[data-status="sent"] {
  border-color: #bcd49a;
  background: #f2f8e8;
}

.nx-sequence-timeline__item[data-status="sent"] b {
  background: #dcebbf;
  color: #436819;
}

.nx-sequence-timeline__item[data-status="suppressed"],
.nx-sequence-timeline__item[data-status="delivery_unknown"],
.nx-sequence-timeline__item[data-status="send_failed"] {
  border-color: #eed0cb;
  background: #fff5f3;
}

.nx-sequence-card__details {
  border-top: 1px solid #e3e8e4;
}

.nx-sequence-card__details > summary {
  padding: 12px 18px;
  color: #41604f;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  list-style-position: inside;
}

.nx-sequence-card__details[open] > summary {
  background: #f8faf8;
}

.nx-sequence-touch-list {
  display: grid;
  gap: 1px;
  background: #e8ece9;
}

.nx-sequence-touch {
  padding: 16px 18px;
  background: #fff;
}

.nx-sequence-touch__header,
.nx-sequence-touch__header > div,
.nx-sequence-touch__meta,
.nx-sequence-touch__actions {
  display: flex;
  align-items: center;
}

.nx-sequence-touch__header {
  justify-content: space-between;
  gap: 14px;
}

.nx-sequence-touch__header > div {
  gap: 9px;
  min-width: 0;
}

.nx-sequence-touch__header strong {
  min-width: 0;
  overflow: hidden;
  color: #283a30;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nx-touch-number {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eaf0e9;
  color: #4c6a59;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .03em;
}

.nx-sequence-touch__meta {
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 9px;
  color: #748078;
  font-size: 11px;
}

.nx-sequence-touch__controls {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: end;
  gap: 14px;
  margin-top: 13px;
}

.nx-sequence-touch__time {
  margin: 0;
}

.nx-sequence-touch__time input {
  width: 100%;
}

.nx-sequence-touch__actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding-bottom: 1px;
}

.nx-plan-pagination,
.nx-candidate-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
}

.nx-plan-pagination span,
.nx-candidate-pagination span {
  color: #66736b;
  font-size: 12px;
  text-align: center;
}

@media (max-width: 820px) {
  .nx-fit-feedback,
  .nx-sequence-card__header {
    align-items: stretch;
    flex-direction: column;
  }

  .nx-fit-feedback__actions {
    width: 100%;
  }

  .nx-fit-feedback__button {
    flex: 1;
  }

  .nx-sequence-timeline {
    grid-template-columns: 1fr;
  }

  .nx-sequence-touch__controls {
    grid-template-columns: 1fr;
  }

  .nx-sequence-touch__actions {
    justify-content: stretch;
  }

  .nx-sequence-touch__actions .nx-button {
    flex: 1;
  }
}
