/* Public market wall — full-bleed chart composition, brand first. */

:root {
  --ak-wall-ink: #0c1a18;
  --ak-wall-muted: #5b6b68;
  --ak-wall-field: #0b6b63;
  --ak-wall-bindu: #2dd4bf;
  --ak-wall-bg0: #edf3f1;
  --ak-wall-bg1: #d9e8e4;
  --ak-wall-stage: #f7fbfa;
  --ak-wall-chip: rgba(247, 251, 250, 0.78);
  --ak-wall-chip-border: rgba(11, 107, 99, 0.22);
  --ak-wall-chip-active-bg: rgba(11, 107, 99, 0.16);
  --ak-wall-chip-active-ink: #0b6b63;
  --ak-wall-veil: linear-gradient(
    180deg,
    rgba(237, 243, 241, 0.92) 0%,
    rgba(237, 243, 241, 0.45) 42%,
    rgba(237, 243, 241, 0) 72%
  );
}

html[data-bs-theme="dark"] {
  --ak-wall-ink: #f1f5f9;
  --ak-wall-muted: #9aa8a5;
  --ak-wall-bg0: #060908;
  --ak-wall-bg1: #0a1614;
  --ak-wall-stage: #08110f;
  --ak-wall-chip: rgba(8, 17, 15, 0.72);
  --ak-wall-chip-border: rgba(45, 212, 191, 0.28);
  --ak-wall-chip-active-bg: rgba(45, 212, 191, 0.2);
  --ak-wall-chip-active-ink: #f8fafc;
  --ak-wall-veil: linear-gradient(
    180deg,
    rgba(6, 9, 8, 0.88) 0%,
    rgba(6, 9, 8, 0.4) 42%,
    rgba(6, 9, 8, 0) 72%
  );
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body.ak-wall {
  margin: 0;
  min-height: 100%;
}

body.ak-wall {
  font-family: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  color: var(--ak-wall-ink);
  background:
    radial-gradient(900px 520px at 8% -8%, rgba(45, 212, 191, 0.18), transparent 58%),
    radial-gradient(780px 480px at 96% 8%, rgba(11, 107, 99, 0.16), transparent 55%),
    linear-gradient(160deg, var(--ak-wall-bg0), var(--ak-wall-bg1));
}

.ak-wall-shell {
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.ak-wall-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem clamp(1rem, 3vw, 2rem) 0.65rem;
  position: relative;
  z-index: 2;
  animation: ak-wall-rise 0.7s ease-out both;
}

.ak-wall-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.ak-wall-mark {
  width: 3rem;
  height: 3rem;
  border-radius: 0.7rem;
  box-shadow: 0 8px 24px rgba(11, 107, 99, 0.18);
}

html[data-bs-theme="dark"] .ak-wall-mark {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.ak-wall-word-main {
  font-size: clamp(1.7rem, 3.4vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
}

.ak-wall-word-algo {
  color: var(--ak-wall-field);
}

html[data-bs-theme="dark"] .ak-wall-word-algo {
  color: var(--ak-wall-bindu);
}

.ak-wall-nav {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.ak-wall-theme,
.ak-wall-signin,
.ak-wall-chip {
  font: inherit;
  cursor: pointer;
}

.ak-wall-theme {
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--ak-wall-chip-border);
  background: var(--ak-wall-chip);
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  backdrop-filter: blur(8px);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.ak-wall-theme:hover {
  transform: translateY(-1px);
  border-color: var(--ak-wall-field);
}

.ak-wall-theme-icon {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #f8fafc 0 42%, transparent 43%),
    conic-gradient(from 210deg, #0b6b63, #2dd4bf, #0b6b63);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.ak-wall-signin {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.55rem 1.15rem;
  font-size: 0.9rem;
  font-weight: 650;
  color: #fff;
  background: var(--ak-wall-field);
  box-shadow: 0 10px 28px rgba(11, 107, 99, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ak-wall-signin:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(11, 107, 99, 0.34);
}

html[data-bs-theme="dark"] .ak-wall-signin {
  color: #07090c;
  background: var(--ak-wall-bindu);
  box-shadow: 0 10px 28px rgba(45, 212, 191, 0.22);
}

.ak-wall-main {
  padding: 0;
  min-height: 0;
  height: 100%;
  display: flex;
}

.ak-wall-stage {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  cursor: crosshair;
  /* pan-y: page scroll still works; tap highlight via pointerdown */
  touch-action: pan-y;
  background:
    radial-gradient(120% 80% at 50% 120%, rgba(11, 107, 99, 0.08), transparent 55%),
    var(--ak-wall-stage);
  animation: ak-wall-fade 0.9s ease-out 0.08s both;
}

.ak-wall-stage::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 7.5rem;
  background: var(--ak-wall-veil);
  pointer-events: none;
  z-index: 1;
}

.ak-wall-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.88;
  mix-blend-mode: multiply;
}

html[data-bs-theme="dark"] .ak-wall-canvas {
  opacity: 0.72;
  mix-blend-mode: screen;
}

.ak-wall-controls {
  position: absolute;
  top: 0.85rem;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem 1rem;
  padding: 0 clamp(1rem, 3vw, 2rem);
  animation: ak-wall-rise 0.75s ease-out 0.12s both;
}

.ak-wall-ohlc {
  position: absolute;
  top: 3.55rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.55rem 1rem;
  padding: 0.4rem 0.85rem;
  border-radius: 0.55rem;
  border: 1px solid var(--ak-wall-chip-border);
  background: var(--ak-wall-chip);
  backdrop-filter: blur(10px);
  pointer-events: none;
  font-size: 0.82rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--ak-wall-ink);
  white-space: nowrap;
}

.ak-wall-ohlc[hidden] {
  display: none !important;
}

.ak-wall-ohlc-time {
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ak-wall-field);
}

html[data-bs-theme="dark"] .ak-wall-ohlc-time {
  color: var(--ak-wall-bindu);
}

.ak-wall-ohlc-k {
  color: var(--ak-wall-muted);
  font-weight: 600;
  margin-right: 0.15rem;
}

.ak-wall-ohlc.is-zone [data-ohlc-item="o"],
.ak-wall-ohlc.is-zone [data-ohlc-item="h"],
.ak-wall-ohlc.is-zone [data-ohlc-item="l"],
.ak-wall-ohlc.is-zone [data-ohlc-item="c"] {
  display: none;
}

.ak-wall-ohlc.is-zone [data-ohlc-item="zone"] {
  display: inline;
}

.ak-wall-ohlc:not(.is-zone) [data-ohlc-item="zone"] {
  display: none !important;
}

.ak-wall-ohlc-zone-range {
  font-weight: 700;
  color: var(--ak-wall-field);
}

html[data-bs-theme="dark"] .ak-wall-ohlc-zone-range {
  color: var(--ak-wall-bindu);
}

.ak-wall-index,
.ak-wall-tf {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.28rem;
  border-radius: 0.7rem;
  background: var(--ak-wall-chip);
  border: 1px solid var(--ak-wall-chip-border);
  backdrop-filter: blur(10px);
}

.ak-wall-chip {
  margin: 0;
  padding: 0.32rem 0.7rem;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  color: var(--ak-wall-muted);
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.2;
  transition: background 0.18s ease, color 0.18s ease;
}

.ak-wall-chip:hover {
  color: var(--ak-wall-ink);
}

.ak-wall-chip.is-active {
  background: var(--ak-wall-chip-active-bg);
  color: var(--ak-wall-chip-active-ink);
}

.ak-wall-meta {
  position: absolute;
  right: clamp(1rem, 3vw, 2rem);
  bottom: 1rem;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}

.ak-wall-status {
  margin-top: 0.2rem;
  max-width: min(22rem, 70vw);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.25;
  color: var(--ak-wall-muted);
  text-align: right;
}

.ak-wall-spot {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
  text-align: right;
}

.ak-wall-spot-label {
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ak-wall-muted);
}

.ak-wall-spot-value {
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--ak-wall-ink);
  line-height: 1;
}

.ak-wall-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1.25rem;
  padding: 0.4rem clamp(1rem, 3vw, 2rem) 0.55rem;
  animation: ak-wall-rise 0.7s ease-out 0.18s both;
}

.ak-wall-foot-copy,
.ak-wall-foot-brand {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.3;
  color: var(--ak-wall-muted);
}

.ak-wall-foot-copy {
  max-width: 38rem;
}

.ak-wall-foot-brand a {
  color: var(--ak-wall-field);
  font-weight: 650;
  text-decoration: none;
}

html[data-bs-theme="dark"] .ak-wall-foot-brand a {
  color: var(--ak-wall-bindu);
}

.ak-wall-foot-brand a:hover {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

@keyframes ak-wall-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes ak-wall-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 720px) {
  .ak-wall-top {
    padding: 0.75rem 0.85rem 0.35rem;
    gap: 0.65rem;
  }

  .ak-wall-mark {
    width: 2.35rem;
    height: 2.35rem;
  }

  .ak-wall-word-main {
    font-size: 1.45rem;
  }

  .ak-wall-signin {
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
  }

  .ak-wall-shell {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .ak-wall-stage {
    min-height: min(68vh, 28rem);
  }

  .ak-wall-stage::before {
    height: 8.5rem;
  }

  .ak-wall-controls {
    top: 0.55rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    padding: 0 0.75rem;
  }

  .ak-wall-index {
    width: 100%;
    justify-content: center;
  }

  /* Exactly three TF chips; swipe the strip to step TF — no wrap overflow / no arrows. */
  .ak-wall-tf {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: stretch;
    gap: 0.3rem;
    overflow: hidden;
    touch-action: pan-y;
    user-select: none;
  }

  .ak-wall-tf .ak-wall-chip[data-wall-tf] {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    padding: 0.28rem 0.35rem;
    font-size: 0.72rem;
  }

  .ak-wall-tf .ak-wall-chip[data-wall-tf][hidden] {
    display: none !important;
  }

  .ak-wall-index .ak-wall-chip {
    padding: 0.28rem 0.52rem;
    font-size: 0.72rem;
  }

  .ak-wall-ohlc {
    top: auto;
    bottom: 4.35rem;
    left: 0.75rem;
    right: 0.75rem;
    transform: none;
    width: auto;
    max-width: none;
    justify-content: center;
    gap: 0.3rem 0.65rem;
    padding: 0.35rem 0.65rem;
    font-size: 0.72rem;
    white-space: normal;
    line-height: 1.35;
  }

  .ak-wall-meta {
    right: 0.75rem;
    bottom: 0.65rem;
  }

  .ak-wall-status {
    font-size: 0.68rem;
    max-width: min(18rem, 72vw);
  }

  .ak-wall-spot-value {
    font-size: 1.2rem;
  }

  .ak-wall-foot {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.35rem 0.85rem 0.5rem;
  }
}

@media (max-width: 420px) {
  .ak-wall-tf {
    gap: 0.18rem;
    padding: 0.22rem;
  }

  .ak-wall-tf .ak-wall-chip[data-wall-tf] {
    padding: 0.24rem 0.28rem;
    font-size: 0.68rem;
  }

  .ak-wall-index .ak-wall-chip {
    padding: 0.24rem 0.4rem;
    font-size: 0.68rem;
  }

  .ak-wall-ohlc {
    bottom: 4.1rem;
    font-size: 0.68rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ak-wall-top,
  .ak-wall-stage,
  .ak-wall-controls,
  .ak-wall-foot,
  .ak-wall-theme,
  .ak-wall-signin {
    animation: none;
    transition: none;
  }
}
