/* Dvija login atrium — Janeu-only; not Rudraksha torana / mala loom */

.jy-vault.jy-state-loading #accountLoggedIn,
.jy-vault.jy-state-loading #accountLoggedOut {
  display: none !important;
}

.jy-vault.jy-state-guest #accountLoggedIn {
  display: none !important;
}

.jy-vault.jy-state-signed #accountLoggedOut {
  display: none !important;
}

.jy-vault.jy-state-guest .dv-loading {
  display: none;
}

.jy-vault.jy-state-guest .jy-route-crest {
  margin-bottom: clamp(0.5rem, 1.5vw, 0.85rem);
  padding: clamp(0.85rem, 2vw, 1.1rem);
}

.jy-vault.jy-state-guest .jy-route-crest .jy-ix-lede {
  display: none;
}

.jy-vault.jy-state-guest .jy-route-crest-title {
  font-size: clamp(1.1rem, 1.4vw + 0.65rem, 1.35rem);
}

.jy-dvija-atrium {
  position: relative;
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.35rem);
  padding: clamp(1rem, 2.8vw, 1.55rem);
  border-radius: var(--a118-radius-lg);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.97) 0%, rgba(255, 250, 245, 0.9) 45%, rgba(245, 248, 255, 0.88) 100%);
  border: 1px solid rgba(15, 27, 60, 0.1);
  box-shadow:
    0 12px 40px rgba(15, 27, 60, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  overflow: hidden;
}

.jy-atrium-weave {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.4;
  background: repeating-linear-gradient(
    -58deg,
    transparent 0 18px,
    rgba(232, 117, 26, 0.035) 18px 19px
  );
}

.jy-dvija-atrium > *:not(.jy-atrium-weave) {
  position: relative;
  z-index: 1;
}

@media (min-width: 960px) {
  .jy-dvija-atrium {
    grid-template-columns: minmax(11rem, 14rem) minmax(0, 1.35fr) minmax(10.5rem, 13rem);
    grid-template-areas:
      "twist torana ledger";
    align-items: stretch;
  }

  .jy-twist-stage {
    grid-area: twist;
  }

  .jy-torana-hall {
    grid-area: torana;
  }

  .jy-vidhi-ledger {
    grid-area: ledger;
  }
}

@media (max-width: 959px) {
  .jy-dvija-atrium {
    grid-template-columns: 1fr;
  }
}

/* Twist stage */
.jy-twist-stage {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: clamp(0.85rem, 2vw, 1.1rem);
  border-radius: 14px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(22, 38, 84, 0.06), transparent 55%),
    rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(15, 27, 60, 0.09);
}

.jy-twist-head {
  text-align: center;
}

.jy-twist-cap {
  margin: 0;
  font-family: var(--a118-font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--jy-saffron-deep);
}

.jy-twist-score {
  margin: 0.35rem 0 0.5rem;
  font-family: var(--a118-font-mono);
  font-size: 0.68rem;
  color: var(--jy-mute);
}

.jy-twist-meter {
  height: 4px;
  border-radius: 4px;
  background: rgba(15, 27, 60, 0.08);
  overflow: hidden;
}

.jy-twist-meter-fill {
  display: block;
  height: 100%;
  width: calc(var(--jy-meter, 0) * 33.34%);
  border-radius: inherit;
  background: linear-gradient(90deg, #9a8f6e, #fff 45%, var(--jy-saffron));
  transition: width 0.45s var(--a118-ease);
}

.jy-twist-loom-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  justify-content: center;
  min-height: 10.5rem;
  padding: 0.5rem 0;
}

.jy-twist-cords {
  display: flex;
  gap: clamp(0.65rem, 2vw, 1rem);
  align-items: flex-end;
  justify-content: center;
  width: 100%;
}

.jy-twist-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
  max-width: 3.5rem;
}

.jy-twist-label {
  font-family: var(--a118-font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--jy-mute);
}

.jy-twist-stage .jy-twist {
  width: 0.5rem;
  height: 2.5rem;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, var(--jy-mist), #d5d0c8);
  opacity: 0.5;
  transform-origin: bottom center;
  transition: height 0.5s var(--a118-ease), opacity 0.35s, box-shadow 0.35s;
}

.jy-twist-stage .jy-twist--munj.is-live {
  height: 5rem;
  background: linear-gradient(180deg, #e8e4d0, #9a8f6e);
  opacity: 1;
  box-shadow: 0 0 12px rgba(154, 143, 110, 0.4);
}

.jy-twist-stage .jy-twist--cotton.is-live {
  height: 5.75rem;
  background: linear-gradient(180deg, #fff, #e8e4dc);
  opacity: 1;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.75);
}

.jy-twist-stage .jy-twist--wool.is-live {
  height: 6.25rem;
  background: linear-gradient(180deg, var(--jy-saffron), var(--jy-saffron-deep));
  opacity: 1;
  box-shadow: 0 0 14px rgba(232, 117, 26, 0.5);
}

.jy-twist-stage .jy-twist-yajna {
  margin-top: 0.65rem;
}

.jy-twist-stage.is-watching {
  border-color: rgba(232, 117, 26, 0.35);
  box-shadow: inset 0 0 0 1px rgba(232, 117, 26, 0.12);
}

.jy-twist-hint {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.5;
  text-align: center;
  color: var(--jy-mute);
}

/* Torana hall */
.jy-torana-hall {
  min-width: 0;
}

.jy-torana-slab {
  position: relative;
  padding: clamp(1rem, 2.5vw, 1.35rem);
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(15, 27, 60, 0.1);
  box-shadow: 0 8px 28px rgba(15, 27, 60, 0.06);
}

.jy-torana-threads {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.25rem;
  padding-top: 0.35rem;
}

.jy-torana-thread {
  display: block;
  width: 3px;
  height: 1.25rem;
  border-radius: 2px;
}

.jy-torana-thread--saffron {
  background: var(--jy-saffron);
}

.jy-torana-thread--white {
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(15, 27, 60, 0.1);
}

.jy-torana-thread--indigo {
  background: var(--jy-ink);
}

.jy-torana-head {
  text-align: center;
  margin-bottom: 0.85rem;
  padding-top: 0.65rem;
}

.jy-torana-title {
  margin: 0;
  font-family: var(--a118-font-display);
  font-size: clamp(1.05rem, 1.2vw + 0.75rem, 1.35rem);
  color: var(--jy-ink);
}

.jy-torana-lede {
  margin: 0.4rem 0 0;
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--jy-mute);
  max-width: 36ch;
  margin-inline: auto;
}

.jy-torana-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin-bottom: 1rem;
  padding: 0.25rem;
  border-radius: var(--a118-radius-pill);
  background: rgba(15, 27, 60, 0.04);
}

.jy-vault .jy-torana-tabs .auth-split-tab {
  border: none;
  border-radius: var(--a118-radius-pill);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 0.55rem 0.65rem;
  background: transparent;
  color: var(--jy-mute);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.jy-vault .jy-torana-tabs .auth-split-tab.is-active {
  background: #fff;
  color: var(--jy-ink);
  box-shadow: 0 2px 8px rgba(15, 27, 60, 0.08);
}

.jy-auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.jy-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.jy-field span {
  font-family: var(--a118-font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--jy-mute);
}

.jy-field input {
  width: 100%;
  padding: 0.6rem 0.65rem;
  font-size: 0.82rem;
  border: 1px solid rgba(15, 27, 60, 0.14);
  border-radius: 10px;
  background: #fffefb;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.jy-field input:focus {
  outline: none;
  border-color: var(--jy-saffron);
  box-shadow: 0 0 0 3px rgba(232, 117, 26, 0.15);
}

.jy-auth-submit {
  width: 100%;
  margin-top: 0.25rem;
  min-height: 2.65rem;
  font-size: 0.78rem;
}

.jy-forgot-fold {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(15, 27, 60, 0.12);
}

.jy-forgot-fold summary {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--jy-saffron-deep);
  cursor: pointer;
  list-style: none;
}

.jy-forgot-fold summary::-webkit-details-marker {
  display: none;
}

.jy-forgot-fold[open] summary {
  margin-bottom: 0.65rem;
}

.jy-auth-form--compact {
  gap: 0.55rem;
}

.jy-torana-slab.jy-gate-focus {
  border-color: rgba(232, 117, 26, 0.35);
}

/* Vidhi ledger */
.jy-vidhi-ledger {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: clamp(0.85rem, 2vw, 1.1rem);
  border-radius: 14px;
  background: rgba(15, 27, 60, 0.03);
  border: 1px solid rgba(15, 27, 60, 0.08);
}

.jy-vidhi-title {
  margin: 0;
  font-family: var(--a118-font-display);
  font-size: 0.95rem;
  color: var(--jy-ink);
}

.jy-vidhi-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

.jy-vidhi-row {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.5rem;
  align-items: start;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--jy-ink);
}

.jy-vidhi-num {
  font-family: var(--a118-font-mono);
  font-size: 0.62rem;
  color: var(--jy-saffron-deep);
  padding-top: 0.1rem;
}

.jy-gate-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(15, 27, 60, 0.08);
}

.jy-gate-shortcuts a {
  font-size: 0.65rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--jy-ink);
  padding: 0.3rem 0.55rem;
  border-radius: var(--a118-radius-pill);
  border: 1px solid rgba(15, 27, 60, 0.12);
  background: #fff;
}

.jy-gate-shortcuts a:hover {
  border-color: var(--jy-saffron);
  color: var(--jy-saffron-deep);
}

.jy-vault .dv-loading {
  text-align: center;
  padding: 2rem;
  font-size: 0.78rem;
  color: var(--jy-mute);
}