.at-tool {
  width: 100%;
  color: #ffffff;
}
.at-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: #181818;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 24px;
}
.at-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: #b3b3b3;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 14px;
  min-height: 44px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.at-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}
.at-tab.is-active {
  background: #1ed760;
  color: #121212;
}
.at-tab:focus-visible,
.at-btn-primary:focus-visible,
.at-btn-ghost:focus-visible,
.at-btn-danger:focus-visible,
.at-chip:focus-visible,
.at-field:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}
.at-wizard {
  max-width: 540px;
  margin: 0 auto;
}
.at-prog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.at-prog-label {
  font-size: 14px;
  font-weight: 700;
  color: #b3b3b3;
}
.at-prog-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.at-subtle-btn {
  appearance: none;
  background: none;
  border: 0;
  padding: 4px 6px;
  color: #b3b3b3;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}
.at-subtle-btn:hover {
  color: #ffffff;
}
.at-prog-track {
  height: 5px;
  width: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}
.at-prog-fill {
  display: block;
  height: 100%;
  background: #ffffff;
  transition: width 0.35s ease;
}
.at-prog-note {
  margin: 8px 0 16px;
  font-size: 13px;
  color: #b3b3b3;
}
.at-restored-note {
  margin: -8px 0 14px;
  font-size: 13px;
  color: #1ed760;
  font-weight: 600;
}
.at-step-card,
.at-score-banner {
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}
.at-grad-1 { background: linear-gradient(135deg, #5b21b6, #9333ea 52%, #db2777); }
.at-grad-2 { background: linear-gradient(135deg, #065f46, #059669 52%, #1ed760); }
.at-grad-3 { background: linear-gradient(135deg, #9a3412, #ea580c 52%, #facc15); }
.at-grad-4 { background: linear-gradient(135deg, #1e3a8a, #2563eb 52%, #06b6d4); }
.at-grad-5 { background: linear-gradient(135deg, #111827, #14532d 52%, #1ed760); }
.at-eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.84);
}
.at-step-title {
  margin: 8px 0 20px;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #ffffff;
}
.at-step-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}
.at-subhead {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}
.at-fields {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.at-field-group {
  display: flex;
  flex-direction: column;
}
.at-label-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 10px;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}
.at-label-left {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.at-hint {
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.78);
}
.at-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.at-badge-req {
  background: #ffffff;
  color: #121212;
}
.at-badge-opt {
  background: rgba(0, 0, 0, 0.34);
  color: rgba(255, 255, 255, 0.88);
}
.at-field {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.36);
  color: #ffffff;
  font: inherit;
  font-size: 16px;
  box-sizing: border-box;
}
.at-field::placeholder {
  color: rgba(255, 255, 255, 0.56);
}
.at-field option {
  background: #181818;
  color: #ffffff;
}
.at-field-sm {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 14px;
}
.at-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.at-chip {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  min-height: 36px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.34);
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.at-chip:hover {
  background: rgba(0, 0, 0, 0.54);
}
.at-chip.is-active {
  background: #ffffff;
  color: #121212;
}
.at-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.at-hop-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 10px;
}
.at-hop-arrow {
  padding-bottom: 12px;
  font-size: 20px;
  font-weight: 900;
}
.at-city-wrap {
  position: relative;
}
.at-city-picked {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  min-height: 46px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.at-city-picked-txt {
  font-weight: 700;
  font-size: 15px;
}
.at-link-btn {
  appearance: none;
  background: none;
  border: 0;
  color: rgba(255, 255, 255, 0.88);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}
.at-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  background: #282828;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  max-height: 280px;
  overflow-y: auto;
}
.at-drop-item,
.at-drop-custom {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #ffffff;
  font: inherit;
  font-size: 14px;
  padding: 11px 14px;
  cursor: pointer;
  display: block;
}
.at-drop-item:hover,
.at-drop-custom:hover {
  background: rgba(255, 255, 255, 0.08);
}
.at-drop-meta {
  color: #b3b3b3;
}
.at-drop-custom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #1ed760;
  font-weight: 700;
}
.at-custom-city {
  margin-top: 10px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.36);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.at-custom-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}
.at-btn-sm {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: #1ed760;
  color: #121212;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  padding: 8px 16px;
  cursor: pointer;
}
.at-inline-err {
  margin: 0;
  font-size: 13px;
  color: #ffb4bd;
  font-weight: 600;
}
.at-check-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.34);
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
}
.at-chk {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: #1ed760;
  flex-shrink: 0;
}
.at-inline-link {
  color: #ffffff;
  font-weight: 700;
  text-decoration: underline;
}
.at-alert {
  margin: 14px 0 0;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(241, 94, 108, 0.18);
  border: 1px solid rgba(241, 94, 108, 0.4);
  color: #ff99a4;
  font-size: 14px;
  font-weight: 600;
}
.at-step-nav {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.at-btn-primary,
.at-btn-ghost,
.at-btn-danger {
  appearance: none;
  border-radius: 999px;
  padding: 12px 26px;
  min-height: 46px;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.at-btn-primary {
  border: 0;
  background: #1ed760;
  color: #121212;
}
.at-btn-primary:hover {
  background: #3be477;
  transform: scale(1.02);
}
.at-btn-primary:disabled {
  opacity: 0.45;
  pointer-events: none;
}
.at-btn-ghost {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.42);
}
.at-btn-ghost:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}
.at-btn-danger {
  background: transparent;
  color: #ff99a4;
  border: 1px solid rgba(241, 94, 108, 0.55);
}
.at-btn-danger:hover {
  background: rgba(241, 94, 108, 0.16);
}
.is-hidden {
  visibility: hidden;
  pointer-events: none;
}
.at-panel,
.at-notice-card,
.at-cmp-block {
  background: #181818;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 16px;
}
.at-panel-title,
.at-cmp-title,
.at-notice-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
}
.at-panel-desc,
.at-cmp-sub,
.at-notice-card p {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.55;
  color: #b3b3b3;
}
.at-inline-form {
  display: flex;
  gap: 10px;
  align-items: center;
}
.at-quick-links {
  margin-top: 10px;
}
.at-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.at-score-banner {
  margin-bottom: 16px;
}
.at-score-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.at-score-name {
  margin: 6px 0 0;
  font-size: 30px;
  font-weight: 900;
}
.at-banner-sub {
  margin: 8px 0 0;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.9);
}
.at-save-pill {
  display: inline-block;
  margin: 12px 0 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.34);
  font-size: 13px;
  font-weight: 700;
}
.at-score-pill {
  background: rgba(0, 0, 0, 0.34);
  border-radius: 14px;
  padding: 12px 18px;
  text-align: right;
}
.at-score-num {
  display: block;
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
}
.at-score-sub {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}
.at-cmp-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.at-cmp-row {
  padding: 12px 14px;
  border-radius: 12px;
  background: #202020;
  border-left: 4px solid #666666;
}
.at-cmp-row.is-ok { border-left-color: #1ed760; }
.at-cmp-row.is-partial { border-left-color: #facc15; }
.at-cmp-row.is-miss { border-left-color: #f15e6c; }
.at-cmp-row-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}
.at-cmp-status {
  font-size: 13px;
  color: #b3b3b3;
}
.at-cmp-row.is-ok .at-cmp-status { color: #1ed760; }
.at-cmp-row.is-partial .at-cmp-status { color: #facc15; }
.at-cmp-row.is-miss .at-cmp-status { color: #ff99a4; }
.at-cmp-vals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  color: #e5e5e5;
}
.at-cmp-vs {
  color: #888888;
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 700;
}
.at-empty-note {
  margin: 0;
  font-size: 14px;
  color: #b3b3b3;
}
.at-real-test {
  border-color: rgba(255, 106, 213, 0.45);
}
.at-gifted-line {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
}
.at-code-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.at-code-pill {
  padding: 11px 16px;
  border-radius: 10px;
  background: #121212;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #1ed760;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.at-code-trunc {
  font-size: 13px;
  letter-spacing: 0;
  word-break: break-all;
}
.at-story-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
}
.at-story-preview {
  display: flex;
  justify-content: center;
}
.at-story-canvas {
  width: 100%;
  max-width: 280px;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}
.at-block-hint {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  color: #b3b3b3;
}
.at-ok-note {
  margin: 12px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: #1ed760;
}
.at-safe-note {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: #b3b3b3;
}
@media (max-width: 640px) {
  .at-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-radius: 18px;
  }
  .at-step-card,
  .at-score-banner,
  .at-panel {
    padding: 18px;
  }
  .at-step-title {
    font-size: 24px;
  }
  .at-grid-2,
  .at-story-grid {
    grid-template-columns: 1fr;
  }
  .at-inline-form {
    flex-direction: column;
    align-items: stretch;
  }
  .at-step-nav .at-btn-primary,
  .at-step-nav .at-btn-ghost {
    flex: 1;
    padding: 12px 16px;
  }
}
/* ---- shared tokens + pinned colors on gradient cards ---- */
.at-step-card,
.at-score-banner {
  color: #ffffff;
}

/* ---- light theme ---- */
html[data-theme="light"] .at-tool {
  color: #121212;
}
html[data-theme="light"] .at-tabs {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.14);
}
html[data-theme="light"] .at-tab {
  color: #4a4f55;
}
html[data-theme="light"] .at-tab:hover {
  color: #121212;
  background: rgba(0, 0, 0, 0.06);
}
html[data-theme="light"] .at-tab.is-active {
  background: #1ed760;
  color: #121212;
}
html[data-theme="light"] .at-tab:focus-visible,
html[data-theme="light"] .at-btn-primary:focus-visible,
html[data-theme="light"] .at-btn-ghost:focus-visible,
html[data-theme="light"] .at-btn-danger:focus-visible,
html[data-theme="light"] .at-panel .at-chip:focus-visible,
html[data-theme="light"] .at-panel .at-field:focus-visible {
  outline-color: #121212;
}
html[data-theme="light"] .at-prog-label,
html[data-theme="light"] .at-prog-note,
html[data-theme="light"] .at-subtle-btn {
  color: #4a4f55;
}
html[data-theme="light"] .at-subtle-btn:hover {
  color: #121212;
}
html[data-theme="light"] .at-prog-track {
  background: rgba(0, 0, 0, 0.16);
}
html[data-theme="light"] .at-prog-fill {
  background: #121212;
}
html[data-theme="light"] .at-restored-note,
html[data-theme="light"] .at-ok-note {
  color: #0b6b30;
}
html[data-theme="light"] .at-step-card,
html[data-theme="light"] .at-score-banner {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
html[data-theme="light"] .at-btn-ghost {
  color: #121212;
  border-color: rgba(0, 0, 0, 0.42);
}
html[data-theme="light"] .at-btn-ghost:hover {
  border-color: #121212;
  background: rgba(0, 0, 0, 0.05);
}
html[data-theme="light"] .at-btn-primary:hover {
  background: #19c455;
}
html[data-theme="light"] .at-btn-danger {
  color: #b3202f;
  border-color: rgba(179, 32, 47, 0.55);
}
html[data-theme="light"] .at-btn-danger:hover {
  background: rgba(179, 32, 47, 0.08);
}
html[data-theme="light"] .at-alert {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(179, 32, 47, 0.45);
  color: #a11b29;
}
html[data-theme="light"] .at-panel,
html[data-theme="light"] .at-notice-card,
html[data-theme="light"] .at-cmp-block {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.14);
}
html[data-theme="light"] .at-panel-title,
html[data-theme="light"] .at-cmp-title,
html[data-theme="light"] .at-notice-card h3,
html[data-theme="light"] .at-gifted-line {
  color: #121212;
}
html[data-theme="light"] .at-panel-desc,
html[data-theme="light"] .at-cmp-sub,
html[data-theme="light"] .at-notice-card p,
html[data-theme="light"] .at-empty-note,
html[data-theme="light"] .at-block-hint,
html[data-theme="light"] .at-safe-note {
  color: #4a4f55;
}
html[data-theme="light"] .at-panel .at-eyebrow,
html[data-theme="light"] .at-notice-card .at-eyebrow {
  color: #0b6b30;
}
html[data-theme="light"] .at-real-test {
  border-color: rgba(180, 0, 127, 0.45);
}
html[data-theme="light"] .at-panel .at-field {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.3);
  color: #121212;
}
html[data-theme="light"] .at-panel .at-field::placeholder {
  color: #5b6168;
}
html[data-theme="light"] .at-panel .at-label-row {
  color: #121212;
}
html[data-theme="light"] .at-panel .at-hint {
  color: #4a4f55;
}
html[data-theme="light"] .at-panel .at-check-row {
  background: #eceef1;
  color: #121212;
}
html[data-theme="light"] .at-panel .at-chip {
  background: #eceef1;
  color: #121212;
}
html[data-theme="light"] .at-panel .at-chip:hover {
  background: #dfe2e6;
}
html[data-theme="light"] .at-panel .at-chip.is-active {
  background: #121212;
  color: #ffffff;
}
html[data-theme="light"] .at-cmp-row {
  background: #f1f3f5;
}
html[data-theme="light"] .at-cmp-status {
  color: #4a4f55;
}
html[data-theme="light"] .at-cmp-row.is-ok .at-cmp-status {
  color: #0b6b30;
}
html[data-theme="light"] .at-cmp-row.is-partial .at-cmp-status {
  color: #7a5500;
}
html[data-theme="light"] .at-cmp-row.is-miss .at-cmp-status {
  color: #a11b29;
}
html[data-theme="light"] .at-cmp-vals {
  color: #1f2328;
}
html[data-theme="light"] .at-cmp-vs {
  color: #5b6168;
}
html[data-theme="light"] .at-code-pill {
  background: #f1f3f5;
  border-color: rgba(0, 0, 0, 0.18);
  color: #0b6b30;
}
html[data-theme="light"] .at-story-canvas {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}
html[data-theme="light"] .at-dropdown {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.16);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}
html[data-theme="light"] .at-drop-item,
html[data-theme="light"] .at-drop-custom:hover {
  color: #121212;
}
html[data-theme="light"] .at-drop-item:hover,
html[data-theme="light"] .at-drop-custom:hover {
  background: rgba(0, 0, 0, 0.06);
}
html[data-theme="light"] .at-drop-meta {
  color: #4a4f55;
}
html[data-theme="light"] .at-drop-custom {
  border-top-color: rgba(0, 0, 0, 0.12);
  color: #0b6b30;
}
html[data-theme="light"] .at-field option {
  background: #ffffff;
  color: #121212;
}

/* ---- longer labels (de/fr) and CJK ---- */
.at-tab {
  overflow-wrap: anywhere;
}
.at-btn-primary,
.at-btn-ghost,
.at-btn-danger {
  text-align: center;
}

.at-inline-form .at-btn-primary {
  white-space: nowrap;
  flex-shrink: 0;
}
