/* ASCENDOJO — shell component styles. Built on tokens.css. */

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--shell-bg);
  color: var(--shell-ink);
  font-family: var(--font-body);
  font-weight: 350;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* The shell's one ambient texture: a quiet vignette, nothing tiled or
   gridded — the calm ground the Dojo accent colors are meant to stand out
   against. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse 60% 45% at 82% -10%,
    rgba(185, 188, 195, 0.08) 0%,
    transparent 60%
  );
}

#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
}

button {
  font-family: inherit;
}

::selection {
  background: var(--shell-metal-300);
  color: var(--shell-bg);
}

:focus-visible {
  outline: 2px solid var(--shell-metal-100);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Type rhythm ── */
.font-display {
  font-family: var(--font-display);
}
.font-mono {
  font-family: var(--font-mono);
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.08;
}
p {
  margin: 0;
}

/* ── Persistent shell nav ── */
.shell-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(20px, 4vw, 48px);
  background: rgba(11, 11, 12, 0.62);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--shell-border-hairline);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--shell-ink);
  padding: 0;
}
.brand-mark svg {
  width: 22px;
  height: 22px;
  color: var(--shell-metal-100);
}
.brand-mark__word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 550;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  border-radius: var(--r-pill);
  padding: 13px 26px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.5s var(--ease-ascend), box-shadow 0.5s var(--ease-ascend),
    background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  white-space: nowrap;
}
.btn:active {
  transform: scale(0.98);
}
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.btn-primary {
  background: var(--shell-ink);
  color: var(--shell-bg);
}
.btn-primary:hover:not(:disabled) {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--shell-border-strong);
  color: var(--shell-ink-dim);
}
.btn-ghost:hover:not(:disabled) {
  border-color: var(--shell-metal-300);
  color: var(--shell-ink);
}

.btn-accent {
  background: var(--dojo-accent);
  color: var(--dojo-accent-ink);
}
.btn-accent:hover:not(:disabled) {
  box-shadow: 0 16px 40px -16px var(--dojo-accent);
  transform: translateY(-1px);
}

.btn-text {
  background: none;
  border: none;
  color: var(--shell-ink-muted);
  padding: 8px 4px;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.btn-text:hover {
  color: var(--shell-ink);
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--r-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--shell-surface);
  border: 1px solid var(--shell-border);
  color: var(--shell-ink-muted);
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.icon-btn:hover {
  color: var(--shell-ink);
  border-color: var(--shell-border-strong);
  background: var(--shell-surface-hover);
}
.icon-btn svg {
  width: 17px;
  height: 17px;
}

/* ── Language switcher ── */
.lang-switch {
  display: flex;
  border: 1px solid var(--shell-border);
  border-radius: var(--r-pill);
  padding: 3px;
  background: var(--shell-surface);
}
.lang-switch button {
  border: none;
  background: transparent;
  color: var(--shell-ink-faint);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}
.lang-switch button.active {
  background: var(--shell-ink);
  color: var(--shell-bg);
}

/* ── Rank / XP chip ── */
.rank-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px 8px 10px;
  border-radius: var(--r-pill);
  background: var(--shell-surface);
  border: 1px solid var(--shell-border);
}
.rank-chip svg {
  width: 15px;
  height: 15px;
  color: var(--shell-metal-100);
}
.rank-chip__value {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--shell-ink-dim);
}
.rank-chip__label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--shell-ink-faint);
}

/* ── Sections ── */
.section {
  padding-block: var(--space-section);
}
.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 48px);
}

/* ── Hero ── */
.hero {
  display: grid;
  gap: 40px;
  align-items: center;
  padding-top: clamp(40px, 7vw, 96px);
}
.hero__headline {
  font-size: clamp(2.6rem, 5.4vw, 4.6rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  max-width: 14ch;
}
.hero__headline em {
  font-style: normal;
  font-weight: 700;
  color: var(--shell-metal-100);
}
.hero__sub {
  margin-top: 22px;
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.7;
  color: var(--shell-ink-muted);
  max-width: 62ch;
  font-weight: 320;
}
.hero__actions {
  margin-top: 34px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ── How-it-works: quiet numbered columns, not another card wall ── */
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 32px;
}
.how-step {
  padding-top: 20px;
  border-top: 1px solid var(--shell-border);
}
.how-step__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.how-step__num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--shell-ink-faint);
  letter-spacing: 0.04em;
}
.how-step__icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--glass-border-hover);
  background: var(--glass-bg-raised);
  color: var(--shell-ink-dim);
}
.how-step__icon svg {
  width: 15px;
  height: 15px;
}
.how-step__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  margin-top: 10px;
}
.how-step__body {
  color: var(--shell-ink-muted);
  font-size: 13.5px;
  line-height: 1.6;
  margin-top: 8px;
  font-weight: 320;
}
@media (max-width: 760px) {
  .how-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Dojo registry grid (asymmetric: active dojo is the featured card) ── */
.dojo-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  margin-top: 20px;
}
.dojo-tile {
  grid-column: span 6;
  position: relative;
  border-radius: var(--r-lg);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--glass-inner-glow), var(--glass-shadow);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  cursor: pointer;
  transition: border-color 0.5s var(--ease-ascend), transform 0.5s var(--ease-ascend),
    box-shadow 0.5s var(--ease-ascend), background-color 0.5s ease;
  text-align: left;
}
@media (min-width: 760px) {
  .dojo-tile--featured {
    grid-column: span 4;
  }
  .dojo-tile--compact {
    grid-column: span 2;
  }
}
.dojo-tile--featured {
  padding: 40px;
  background: linear-gradient(
    165deg,
    var(--glass-bg-raised) 0%,
    var(--glass-bg) 60%
  );
}
.dojo-tile:hover {
  transform: translateY(-4px);
  border-color: var(--dojo-accent);
  box-shadow: var(--glass-inner-glow), var(--glass-shadow), 0 0 48px -12px var(--dojo-accent-soft);
}
.dojo-tile--soon {
  opacity: 0.72;
}
.dojo-tile__art {
  position: relative;
  height: 168px;
  border-radius: var(--r-md);
  background: linear-gradient(180deg, var(--dojo-accent-soft) 0%, var(--shell-bg-raised) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}
.dojo-tile--compact .dojo-tile__art {
  height: 110px;
}
.dojo-tile__art-glow {
  width: 60%;
  height: 60%;
  top: 20%;
  left: 20%;
  background: radial-gradient(circle, var(--dojo-accent-soft) 0%, transparent 70%);
}
.dojo-tile__art-ring {
  position: relative;
  z-index: 1;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--dojo-accent);
  background: var(--glass-bg-raised);
  color: var(--dojo-accent);
}
.dojo-tile--compact .dojo-tile__art-ring {
  width: 54px;
  height: 54px;
}
.dojo-tile__art-ring svg {
  width: 32px;
  height: 32px;
}
.dojo-tile--compact .dojo-tile__art-ring svg {
  width: 22px;
  height: 22px;
}
.dojo-tile__art-ring::before,
.dojo-tile__art-ring::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid currentColor;
  border-right-color: transparent;
  border-bottom-color: transparent;
}
.dojo-tile__art-ring::before {
  inset: -16px;
  opacity: 0.3;
  animation: orbitSpin 16s linear infinite;
}
.dojo-tile__art-ring::after {
  inset: -30px;
  opacity: 0.15;
  border-left-color: transparent;
  border-right-color: currentColor;
  animation: orbitSpin 24s linear infinite reverse;
}
@media (prefers-reduced-motion: reduce) {
  .dojo-tile__art-ring::before,
  .dojo-tile__art-ring::after {
    animation: none;
  }
}
.dojo-tile__art-chip {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  background: var(--glass-bg-raised);
  border: 1px solid var(--glass-border);
  box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.6);
  color: var(--shell-ink-faint);
}
.dojo-tile__art-chip svg {
  width: 14px;
  height: 14px;
}
.dojo-tile__art-chip--a {
  top: 14px;
  right: 20%;
  transform: rotate(-8deg);
}
.dojo-tile__art-chip--b {
  bottom: 14px;
  left: 16%;
  transform: rotate(6deg);
}
@media (max-width: 480px) {
  .dojo-tile__art-chip {
    display: none;
  }
}
.dojo-tile__top {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 12px;
}
.dojo-tile__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dojo-accent-soft);
  color: var(--dojo-accent);
  flex-shrink: 0;
}
.dojo-tile__icon svg {
  width: 22px;
  height: 22px;
}
.dojo-tile--compact .dojo-tile__icon {
  width: 36px;
  height: 36px;
}
.dojo-tile--compact .dojo-tile__icon svg {
  width: 18px;
  height: 18px;
}
.dojo-tile__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: -0.01em;
}
.dojo-tile--compact .dojo-tile__name {
  font-size: 16px;
}
.dojo-tile__desc {
  color: var(--shell-ink-muted);
  font-size: 13.5px;
  line-height: 1.6;
  font-weight: 320;
}
.dojo-tile__foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dojo-accent-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dojo-accent);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px var(--dojo-accent-soft);
}

/* ── Status badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  border: 1px solid var(--shell-border);
  white-space: nowrap;
}
/* Shell-level semantic mapping: green = free/live/active, orange =
   premium/locked. This overrides the per-Dojo accent on purpose — a
   Dojo's own color lives on its icon and accent dot, not on its status. */
.badge--active {
  color: var(--accent-green);
  border-color: var(--accent-green);
  background: var(--accent-green-soft);
}
.badge--soon {
  color: var(--shell-ink-faint);
  border-color: var(--shell-border);
}
.badge--owned {
  color: var(--accent-green);
  border-color: var(--accent-green);
  background: var(--accent-green-soft);
}
.badge--locked {
  color: var(--accent-orange);
  border-color: var(--accent-orange);
  background: var(--accent-orange-soft);
}

/* ── Generic content card (used sparingly: hub sections, admin) ── */
.panel {
  border-radius: var(--r-lg);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--glass-inner-glow), var(--glass-shadow);
  padding: 28px;
}

/* ── Forms ── */
.field {
  width: 100%;
  background: var(--shell-bg-raised);
  border: 1px solid var(--shell-border);
  color: var(--shell-ink);
  padding: 14px 16px;
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 350;
  margin-bottom: 12px;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}
.field::placeholder {
  color: var(--shell-ink-faint);
}
.field:focus {
  outline: none;
  border-color: var(--shell-metal-300);
  background: var(--shell-surface);
}
.field-label {
  display: block;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--shell-ink-faint);
  margin-bottom: 8px;
}
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}
.check-row input {
  margin-top: 3px;
  accent-color: var(--shell-metal-100);
  cursor: pointer;
  flex-shrink: 0;
}
.check-row label {
  font-size: 11.5px;
  color: var(--shell-ink-muted);
  line-height: 1.6;
  cursor: pointer;
}

/* ── Auth tabs ── */
.tabbar {
  display: flex;
  border-bottom: 1px solid var(--shell-border);
  margin-bottom: 26px;
}
.tabbar button {
  flex: 1;
  background: none;
  border: none;
  color: var(--shell-ink-faint);
  font-family: var(--font-display);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 12px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.tabbar button.active {
  color: var(--shell-ink);
  border-color: var(--shell-metal-100);
}

/* ── Modals ── */
.modal-veil {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 6, 7, 0.78);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}
.modal-veil.is-open {
  display: flex;
}
.modal-panel {
  width: 100%;
  max-width: 440px;
  max-height: 88vh;
  overflow-y: auto;
  background: rgba(19, 19, 21, 0.82);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--glass-border-hover);
  border-radius: var(--r-xl);
  padding: clamp(28px, 4vw, 44px);
  box-shadow: var(--glass-inner-glow), var(--shadow-lg);
  position: relative;
}
.modal-panel--wide {
  max-width: 620px;
}
.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
}
.modal-eyebrow-free {
  text-align: center;
  margin-bottom: 28px;
}
.modal-eyebrow-dojo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dojo-accent-soft);
  border: 1px solid var(--dojo-accent);
  color: var(--dojo-accent);
  margin-bottom: 16px;
}
.modal-eyebrow-dojo svg {
  width: 20px;
  height: 20px;
}
.modal-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
}

/* ── Settings modal: Personal / Neural Log / Privacy — ported from the
   KR1PTX dashboard's window.Settings, reskinned onto shell tokens. Uses
   --accent-orange (not --dojo-accent): this modal is global chrome, not
   scoped inside a Dojo, and orange is already the shell's own "premium"
   semantic (tokens.css), which is exactly what the Neural Log is. ── */
.settings-panel {
  max-width: 560px;
}
.settings-view {
  display: none;
}
.settings-view.active {
  display: block;
}
.settings-identity {
  display: flex;
  gap: 22px;
  align-items: flex-start;
}
.settings-identity__fields {
  flex: 1;
  min-width: 0;
}
.avatar-upload {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  cursor: pointer;
  background: var(--shell-bg-raised);
  border: 1px solid var(--shell-border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.25s ease;
}
.avatar-upload:hover {
  border-color: var(--accent-orange);
}
.avatar-upload__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-upload__hint {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--shell-ink-faint);
}
.color-swatches {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}
.color-swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  padding: 3px;
  border: 1.5px solid transparent;
  background: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.color-swatch span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid var(--shell-border-strong);
}
.color-swatch.selected {
  border-color: var(--accent-orange);
}

/* ── Neural Log ── */
.neural-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.neural-head h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--shell-ink-faint);
}
.neural-head__actions {
  display: flex;
  gap: 6px;
}
.neural-assessment {
  margin-bottom: 14px;
}
.neural-bar {
  position: relative;
  height: 10px;
  border-radius: var(--r-pill);
  overflow: hidden;
  border: 1px solid var(--shell-border);
  background: linear-gradient(to right, #dc2626, #f97316, #eab308, #22c55e, #06b6d4);
}
.neural-bar__marker {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0%;
  width: 3px;
  background: #fff;
  box-shadow: 0 0 8px #fff;
  transition: left 0.8s var(--ease-ascend);
}
.neural-bar__scale {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--shell-ink-faint);
  margin-top: 6px;
}
.neural-assessment__text {
  margin-top: 10px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.neural-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.neural-stat {
  padding: 14px;
}
.neural-stat__value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  color: var(--shell-ink);
  margin-top: 4px;
}
.neural-list {
  margin-bottom: 12px;
}
.neural-list__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--shell-ink-faint);
}
.neural-list__item {
  padding-left: 10px;
  border-left: 2px solid var(--shell-border-strong);
}
.neural-list__item--warning {
  border-color: var(--state-danger);
}
.neural-list__item--strength {
  border-color: var(--accent-green);
}
.neural-list__item-head {
  color: var(--shell-ink);
  font-weight: 700;
  font-size: 10px;
  margin-bottom: 2px;
}
.neural-table-wrap {
  padding: 0;
  overflow: hidden;
}
.neural-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 11px;
}
.neural-table thead {
  background: var(--shell-bg-raised);
}
.neural-table th {
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--shell-ink-faint);
  border-bottom: 1px solid var(--shell-border);
}
.neural-table td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--shell-border-hairline);
  color: var(--shell-ink-dim);
}
.neural-table tbody tr:last-child td {
  border-bottom: none;
}

/* ── Privacy tab ── */
.privacy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.privacy-row__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--shell-ink);
  margin-bottom: 4px;
}
.privacy-row__body {
  font-size: 11.5px;
  color: var(--shell-ink-faint);
  line-height: 1.5;
}
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-switch span {
  position: absolute;
  inset: 0;
  border-radius: var(--r-pill);
  background: var(--shell-surface-2);
  border: 1px solid var(--shell-border-strong);
  cursor: pointer;
  transition: background 0.25s ease;
}
.toggle-switch span::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: var(--shell-ink-faint);
  transition: transform 0.25s ease, background 0.25s ease;
}
.toggle-switch input:checked + span {
  background: var(--accent-orange-soft);
  border-color: var(--accent-orange);
}
.toggle-switch input:checked + span::before {
  transform: translateX(18px);
  background: var(--accent-orange);
}
.settings-danger {
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--shell-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Onboarding stepper ── */
.stepper {
  display: flex;
  gap: 8px;
  margin-bottom: 30px;
}
.stepper__dot {
  flex: 1;
  height: 3px;
  border-radius: var(--r-pill);
  background: var(--shell-border-strong);
  overflow: hidden;
}
.stepper__dot::after {
  content: "";
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--shell-ink);
  transition: transform 0.5s var(--ease-ascend);
}
.stepper__dot.done::after,
.stepper__dot.active::after {
  transform: scaleX(1);
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.choice-pill {
  border: 1px solid var(--shell-border);
  background: var(--shell-bg-raised);
  color: var(--shell-ink-dim);
  border-radius: var(--r-md);
  padding: 13px;
  font-size: 12.5px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease;
}
.choice-pill.selected {
  border-color: var(--shell-ink);
  color: var(--shell-ink);
  background: var(--shell-surface-hover);
}

/* ── Traders Pay checkout ── */
.tp-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(6, 6, 7, 0.86);
  backdrop-filter: blur(18px);
}
.tp-overlay.is-open {
  display: flex;
}
.tp-frame-wrap {
  width: 100%;
  max-width: 460px;
  height: min(84vh, 760px);
  background: var(--shell-surface-2);
  border: 1px solid var(--shell-border-strong);
  border-radius: var(--r-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.tp-frame-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--shell-border);
}
.tp-frame-body {
  position: relative;
  flex: 1;
  background: #000;
}
.tp-frame-body iframe {
  width: 100%;
  height: 100%;
  border: none;
}
.tp-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--shell-bg);
}
.tp-frame-foot {
  padding: 12px 20px;
  border-top: 1px solid var(--shell-border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--state-success-ink);
}

.spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--shell-border-strong);
  border-top-color: var(--shell-ink);
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Hub ── */
.hub-greeting {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.owned-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

/* ── Shared glow primitive: a blurred, absolutely-positioned radial patch.
   Always animate opacity/transform on these, never top/left/width.
   Moved here from landing.css: originally landing-only, now also used by
   the Dojo card art system below (hub.js's "Your Dojos" grid, the Trading
   Dojo interface) — this is the correct shared home, not a duplicate. ── */
.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}
.glow--orange {
  background: radial-gradient(circle, var(--accent-orange-glow) 0%, transparent 70%);
}
.glow--green {
  background: radial-gradient(circle, var(--accent-green-glow) 0%, transparent 70%);
}
.glow--white {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16) 0%, transparent 70%);
}
@keyframes glowPulse {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}
.glow--pulse {
  animation: glowPulse 6s ease-in-out infinite;
}
@keyframes floatDrift {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}
.drift {
  animation: floatDrift 5s ease-in-out infinite;
}
.glow--pulse-strong {
  animation: glowPulse 4s ease-in-out infinite;
  opacity: 0.85;
}
@keyframes radarPing {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(2.6);
    opacity: 0;
  }
}
@keyframes orbitSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .glow--pulse,
  .glow--pulse-strong,
  .drift {
    animation: none;
  }
}

/* Any <img> in a placeholder slot hides itself on load failure — the glow
   behind it still reads as intentional, never a broken-image icon.
   !important is deliberate: this state class must win over every
   component's own `display` rule regardless of selector specificity or
   source order. */
img.is-missing {
  display: none !important;
}

/* ── Dojo card: the shared premium card renderer (js/views/dojoTile.js
   dojoCardHtml()) — large image-led art area dissolving into the card,
   used by the landing page's closing showcase AND hub.js's "Your Dojos"
   grid. The <img> (when a real asset is supplied) covers the fallback
   illustration entirely; img.is-missing above hides the <img> on load
   failure, revealing the fallback underneath — never an empty box, just
   two states of the same slot. ── */
.dojo-tile--showcase {
  padding: 0;
  overflow: hidden;
}
.dojo-tile__art--photo {
  position: relative;
  height: 280px;
  overflow: hidden;
  background: radial-gradient(ellipse 85% 65% at 50% 42%, var(--dojo-accent-soft) 0%, var(--shell-bg-raised) 82%);
}
/* Taller, more portrait-friendly variant for a standing Sensei figure
   instead of a wide illustration — hub.js's Dojo boxes use this. */
.dojo-tile__art--photo.dojo-tile__art--tall {
  height: 360px;
}
/* Rich CSS fallback: glowing core + concentric rotating rings + the
   Dojo's own line icon at hero scale + a few drifting light particles —
   a real lit illustration, not a flat tint, until a photo/render lands
   in assets/dojo-<id>.png or assets/sensei-<id>.png. */
.dojo-tile__art-fallback {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dojo-tile__art-core {
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--dojo-accent) 0%, var(--dojo-accent-soft) 45%, transparent 74%);
  filter: blur(18px);
  opacity: 0.9;
  animation: glowPulse 5s ease-in-out infinite;
}
.dojo-tile__art-rings {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dojo-tile__art-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--dojo-accent);
}
.dojo-tile__art-ring--1 {
  width: 110px;
  height: 110px;
  opacity: 0.55;
}
.dojo-tile__art-ring--2 {
  width: 156px;
  height: 156px;
  opacity: 0.34;
  border-right-color: transparent;
  border-bottom-color: transparent;
  animation: orbitSpin 18s linear infinite;
}
.dojo-tile__art-ring--3 {
  width: 206px;
  height: 206px;
  opacity: 0.18;
  border-left-color: transparent;
  border-top-color: transparent;
  animation: orbitSpin 26s linear infinite reverse;
}
.dojo-tile__art-icon {
  position: relative;
  z-index: 1;
  width: 74px;
  height: 74px;
  color: var(--dojo-accent);
  filter: drop-shadow(0 0 20px var(--dojo-accent));
}
.dojo-tile__art-icon svg {
  width: 100%;
  height: 100%;
}
.dojo-tile__art-particle {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--dojo-accent);
  box-shadow: 0 0 10px 2px var(--dojo-accent);
}
.dojo-tile__art-particle--a {
  top: 26%;
  left: 23%;
}
.dojo-tile__art-particle--b {
  top: 64%;
  left: 78%;
}
.dojo-tile__art-particle--c {
  top: 76%;
  left: 30%;
}
@media (prefers-reduced-motion: reduce) {
  .dojo-tile__art-core,
  .dojo-tile__art-ring--2,
  .dojo-tile__art-ring--3 {
    animation: none;
  }
}
.dojo-tile__art-img {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 38%;
  mask-image: radial-gradient(ellipse 82% 85% at 50% 36%, black 46%, transparent 95%);
  -webkit-mask-image: radial-gradient(ellipse 82% 85% at 50% 36%, black 46%, transparent 95%);
}
.dojo-tile__art-fade {
  position: absolute;
  z-index: 2;
  inset: auto 0 0 0;
  height: 72%;
  background: linear-gradient(to bottom, transparent 0%, rgba(9, 9, 10, 0.94) 92%);
  pointer-events: none;
}
.dojo-tile__art-badge {
  position: absolute;
  z-index: 3;
  top: 18px;
  left: 18px;
}
/* Pulled up over the art's faded lower edge — title sits partly on the
   artwork instead of cleanly below it. */
.dojo-tile__content {
  position: relative;
  z-index: 3;
  margin-top: -50px;
  padding: 0 26px 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.dojo-tile--showcase .dojo-tile__name {
  font-size: 22px;
}
.dojo-tile--showcase .dojo-tile__foot {
  margin-top: 4px;
}

/* ── Hub "Your Dojos" grid: a clean, even 3-across row (no cascade
   stagger — that's the landing page's own composition, kept there) ── */
.hub-dojo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
/* .dojo-tile's base rule assumes a 6-column grid (span 6) — override for
   this dedicated 3-column layout, same fix landing.css's own grid needed. */
.hub-dojo-grid .dojo-tile {
  grid-column: auto;
}
@media (max-width: 900px) {
  .hub-dojo-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Zen/Torii decoration: a large, faint background silhouette + ambient
   glow, used behind the Hub greeting and the Trading Dojo interface
   header. Purely decorative (aria-hidden), never affects layout. ── */
.zen-deco {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.zen-deco__torii {
  position: absolute;
  top: -190px;
  right: -30px;
  width: 260px;
  height: 260px;
  color: var(--shell-metal-700);
  opacity: 0.22;
}
@media (max-width: 640px) {
  .zen-deco__torii {
    width: 160px;
    height: 160px;
  }
}

/* ── Sensei portrait: small circular mentor image, used in the Trading
   Dojo interface's rank panel. Same fallback contract as the Dojo card
   art (img.is-missing above) — an empty ring reads as intentional, not
   broken. ── */
.sensei-portrait {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  background: radial-gradient(circle, var(--dojo-accent-soft) 0%, var(--shell-bg-raised) 78%);
  border: 1px solid var(--dojo-accent);
  box-shadow: 0 0 28px -6px var(--dojo-accent);
}
.sensei-portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
}

/* ── Trading Dojo interface (the view after "Dojo betreten") ── */
.dojo-interface__status {
  color: var(--shell-ink-muted);
  font-size: 13px;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.dojo-interface__status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green-glow);
  flex-shrink: 0;
}

.rank-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 230px;
}
.rank-panel__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.rank-panel__tier {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.03em;
  color: var(--shell-ink);
}
.rank-panel__xp {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--shell-ink-faint);
}
.rank-panel__track {
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--shell-surface-2);
  overflow: hidden;
}
.rank-panel__fill {
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--dojo-accent);
  transition: width 0.6s var(--ease-ascend);
}
.rank-panel__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.rank-panel__note {
  font-size: 11px;
  color: var(--shell-ink-faint);
}
.rank-panel__coins {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--shell-ink-muted);
}
.rank-panel__coins svg {
  width: 13px;
  height: 13px;
  color: var(--shell-metal-300);
}

/* Shared empty-state layout: the Fortschritt panel and the per-tool
   "kommt gleich" placeholder both use it. */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 40px 32px;
  text-align: left;
}
.empty-state__icon {
  width: 42px;
  height: 42px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg-raised);
  border: 1px solid var(--glass-border-hover);
  color: var(--shell-ink-faint);
  margin-bottom: 6px;
}
.empty-state__icon svg {
  width: 19px;
  height: 19px;
}
.empty-state__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--shell-ink-dim);
}
.empty-state__body {
  color: var(--shell-ink-faint);
  font-size: 13px;
  line-height: 1.65;
  max-width: 48ch;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.tool-tile {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  border-radius: var(--r-lg);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--glass-inner-glow), var(--glass-shadow);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color 0.4s var(--ease-ascend), transform 0.4s var(--ease-ascend),
    box-shadow 0.4s var(--ease-ascend);
}
.tool-tile:hover,
.tool-tile:focus-visible {
  transform: translateY(-3px);
  border-color: var(--dojo-accent);
  box-shadow: var(--glass-inner-glow), var(--glass-shadow), 0 0 40px -18px var(--dojo-accent-soft);
  outline: none;
}
/* Circular ring badge — echoes the Dojo card's art-ring motif at nav-tile
   scale, so the tool grid still reads as "this Dojo" and not a generic
   settings-style icon list. */
.tool-tile__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dojo-accent-soft);
  border: 1px solid var(--dojo-accent);
  color: var(--dojo-accent);
  box-shadow: 0 0 0 4px var(--glass-bg-raised);
  flex-shrink: 0;
  transition: box-shadow 0.4s var(--ease-ascend);
}
.tool-tile:hover .tool-tile__icon,
.tool-tile:focus-visible .tool-tile__icon {
  box-shadow: 0 0 0 4px var(--glass-bg-raised), 0 0 22px -4px var(--dojo-accent);
}
.tool-tile__icon svg {
  width: 20px;
  height: 20px;
}
.tool-tile__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--shell-ink);
}
.tool-tile__tagline {
  font-size: 12.5px;
  color: var(--shell-ink-muted);
  line-height: 1.55;
}

/* ── Footer ── */
.shell-footer {
  margin-top: auto;
  border-top: 1px solid var(--shell-border-hairline);
  padding: 40px clamp(20px, 4vw, 48px) 56px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  color: var(--shell-ink-faint);
  font-size: 11.5px;
}
.shell-footer a {
  text-decoration: none;
  color: inherit;
}
.shell-footer a:hover {
  color: var(--shell-ink);
}

/* ── Ascend reveal: the one authored motion, used once per view mount ── */
.ascend-in {
  animation: ascendIn var(--dur-ascend) var(--ease-ascend) both;
}
@keyframes ascendIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.status-line {
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  min-height: 16px;
}
.status-line--danger {
  color: var(--state-danger-ink);
}
.status-line--success {
  color: var(--state-success-ink);
}

.hidden {
  display: none !important;
}

@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .dojo-grid {
    grid-template-columns: 1fr;
  }
  .dojo-tile--featured,
  .dojo-tile--compact {
    grid-column: span 1;
  }
}
