/* =============================================================================
   STREAK phone app (/app) - 2 Oct 2026. Built on theme.css tokens (dark + light).
   Layout: sticky top bar · one screen at a time · five-tab bar at the bottom.
   On a wide screen the app sits in a phone-width column.
   ============================================================================= */

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body {
  min-height: 100dvh;
}
a {
  color: var(--accent);
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
}
.mono,
.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.up {
  color: var(--up);
}
.down {
  color: var(--down);
}
.flat,
.muted {
  color: var(--muted);
}
.dim {
  color: var(--text-3);
}
.warn {
  color: var(--amber);
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
[hidden] {
  display: none !important;
}

/* ---- frame ---- */
.m-app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
}
@media (min-width: 560px) {
  .m-app {
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }
}
.m-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  background: var(--nav);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--nav-line);
}
.m-brand {
  font-family: "Syne", var(--display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.04em;
  color: var(--accent);
}
.m-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.m-chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--flat);
}
.m-chip[data-state="open"] {
  color: var(--up);
  border-color: color-mix(in srgb, var(--up) 45%, transparent);
  background: var(--up-bg);
}
.m-chip[data-state="open"] .dot {
  background: var(--up);
  animation: m-pulse 1.8s ease-in-out infinite;
}
.m-chip[data-state="pre_open"] {
  color: var(--amber);
  border-color: color-mix(in srgb, var(--amber) 45%, transparent);
  background: var(--amber-bg);
}
.m-chip[data-state="pre_open"] .dot {
  background: var(--amber);
}
.m-chip[data-state="holiday"] {
  color: var(--down);
  border-color: color-mix(in srgb, var(--down) 45%, transparent);
  background: var(--down-bg);
}
.m-chip[data-state="holiday"] .dot {
  background: var(--down);
}
@keyframes m-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}
@media (prefers-reduced-motion: reduce) {
  .m-chip .dot {
    animation: none !important;
  }
}
.m-spacer {
  flex: 1;
}
.m-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.m-icon-btn svg {
  width: 18px;
  height: 18px;
}
.m-tier {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
  background: var(--accent-bg);
  color: var(--accent);
}
.m-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--amber-bg);
  color: var(--amber);
  font-size: 12px;
  font-weight: 600;
}
.m-preview button {
  margin-left: auto;
  border: 0;
  background: none;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.m-main {
  flex: 1;
  padding: 14px 16px calc(96px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.m-main:focus {
  outline: none;
}

/* ---- bottom tab bar ---- */
.m-tabs {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(480px, 100%);
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 6px 6px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--nav);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--nav-line);
}
.m-tabs a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 48px;
  color: var(--ink-muted);
  font-size: 11px;
}
.m-tabs a svg {
  width: 22px;
  height: 22px;
}
.m-tabs a[aria-current="page"] {
  color: var(--accent);
  font-weight: 600;
}

/* ---- type ---- */
.m-h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.m-h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}
.m-sub {
  font-size: 13px;
  color: var(--muted);
}
.m-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.m-p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-2);
}
.m-fine {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-3);
}
.m-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.m-back {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: -6px 0 -4px -10px;
}
.m-back a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--ink);
}
.m-back a svg {
  width: 22px;
  height: 22px;
}
.m-back span {
  font-size: 16px;
  font-weight: 600;
}

/* ---- market filter ---- */
.m-filter {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 -16px;
  padding: 0 16px;
}
.m-filter::-webkit-scrollbar {
  display: none;
}
.m-filter button {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.m-filter button[aria-pressed="true"] {
  background: var(--accent-bg);
  border-color: var(--accent);
  color: var(--accent);
}
.m-filter button:disabled {
  opacity: 0.55;
}
.m-filter button.later {
  border-style: dashed;
}
.m-filter small {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-3);
}

/* ---- price ---- */
.m-price {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.m-price .big {
  font-family: var(--mono);
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}
.m-price .chg {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  padding-bottom: 3px;
}
.m-price .asof {
  width: 100%;
  font-size: 12px;
  color: var(--text-3);
}

/* ---- cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow);
}
.card.raised {
  background: var(--raised);
  border-color: var(--line-strong);
}
.card.tight {
  padding: 10px 12px;
  border-radius: 14px;
  gap: 4px;
}
.card.dashed {
  border-style: dashed;
  border-color: var(--line-strong);
  box-shadow: none;
}
a.card {
  color: var(--ink);
}
.card-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  box-shadow: var(--shadow);
}
.tile .v {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 600;
}
.tile .v.sm {
  font-size: 15px;
}
.tile .s {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.3;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge.up {
  background: var(--up-bg);
  color: var(--up);
}
.badge.down {
  background: var(--down-bg);
  color: var(--down);
}
.badge.flat {
  background: var(--flat-bg);
  color: var(--muted);
}
.badge.warn {
  background: var(--amber-bg);
  color: var(--amber);
}
.badge.accent {
  background: var(--accent-bg);
  color: var(--accent);
}
.pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 12px;
  background: var(--surface-2);
  color: var(--muted);
}
.pill.up {
  background: var(--up-bg);
  color: var(--up);
}
.pill.down {
  background: var(--down-bg);
  color: var(--down);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* shift card */
.shift {
  border-left: 3px solid var(--line-strong);
}
.shift.up {
  border-left-color: var(--up);
  color: var(--ink);
}
.shift.down {
  border-left-color: var(--down);
  color: var(--ink);
}
.shift .line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.shift .pts {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 600;
}
.rungs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.rung {
  min-width: 42px;
  padding: 5px 8px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  color: var(--muted);
}
.rung.hit {
  border-color: transparent;
  background: var(--accent-bg);
  color: var(--accent);
}
.rung.stop {
  border-color: color-mix(in srgb, var(--amber) 60%, transparent);
  color: var(--amber);
}

/* indicators */
.ind {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.ind > div {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.ind b {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.ind .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--up);
  flex: none;
}
.ind .dot.warn {
  background: var(--amber);
}
.ind .dot.bad {
  background: var(--down);
}
.ind span {
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted);
}
.ind a {
  font-size: 11px;
  font-weight: 600;
}

/* alerts inside cards */
.alert {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid;
}
.alert.warn {
  background: var(--amber-bg);
  border-color: color-mix(in srgb, var(--amber) 45%, transparent);
}
.alert.bad {
  background: var(--down-bg);
  border-color: color-mix(in srgb, var(--down) 45%, transparent);
}
.alert.ok {
  background: var(--surface);
  border-color: var(--line);
}
.alert .t {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.alert.warn .t {
  color: var(--amber);
}
.alert.bad .t {
  color: var(--down);
}
.alert p {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
}

.notice {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--amber-bg);
  color: var(--amber);
  font-size: 13px;
  line-height: 1.4;
}

/* lock */
.lock {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px dashed var(--line-strong);
  color: var(--ink);
}
.lock svg {
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--muted);
}
.lock b {
  display: block;
  font-size: 14px;
}
.lock span {
  font-size: 12px;
  color: var(--muted);
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}
.btn.block {
  width: 100%;
}
.btn.sm {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 10px;
}
.btn-row {
  display: flex;
  gap: 10px;
}
.btn-row .btn {
  flex: 1;
}
.link-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  background: var(--surface);
}
.link-row .go {
  margin-left: auto;
  color: var(--accent);
  font-weight: 700;
}
.link-row svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
  flex: none;
}

/* segmented */
.seg {
  display: flex;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 3px;
}
.seg button {
  flex: 1;
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.seg button[aria-pressed="true"] {
  background: var(--line-strong);
  color: var(--ink);
}

/* list rows */
.rows {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 2px 14px;
  box-shadow: var(--shadow);
}
.rows > * + * {
  border-top: 1px solid var(--line);
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 8px 0;
  color: var(--ink);
}
.row .main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.row .main b {
  font-size: 15px;
}
.row .main span {
  font-size: 12px;
  color: var(--muted);
}
.row .end {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.row .t {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  width: 44px;
  flex: none;
}
.row .chev {
  color: var(--text-3);
}
label.row {
  cursor: pointer;
}
.switch {
  appearance: none;
  -webkit-appearance: none;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: var(--line-strong);
  position: relative;
  flex: none;
  cursor: pointer;
  transition: background 0.15s ease;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s ease;
}
.switch:checked {
  background: var(--accent);
}
.switch:checked::after {
  transform: translateX(18px);
}
.switch:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ladder */
.ladder {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 6px 14px;
  box-shadow: var(--shadow);
}
.ladder .lr {
  display: grid;
  grid-template-columns: 58px 1fr 1fr 70px;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.ladder .lr.lr3 {
  grid-template-columns: 72px 1fr 1.6fr; /* BTST: step · NIFTY · when */
}
.ladder .lr.head {
  border-top: 0;
  padding: 6px 0;
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.ladder .lr > :last-child {
  text-align: right;
  font-size: 12px;
  color: var(--muted);
}
.ladder .lr .mono {
  font-size: 14px;
}
.ladder .lr.next {
  color: var(--muted);
}
.ladder .lr.stopnow {
  background: var(--amber-bg);
  margin: 0 -14px;
  padding-left: 14px;
  padding-right: 14px;
}
.ladder .lr.stopnow > :first-child,
.ladder .lr.stopnow > :last-child {
  color: var(--amber);
  font-weight: 700;
}
.ladder .lr.old {
  color: var(--text-3);
}
.ladder .lr.old > :nth-child(-n + 3) {
  text-decoration: line-through;
}
.ladder .lr.now {
  border-top: 1px dashed color-mix(in srgb, var(--amber) 60%, transparent);
  color: var(--amber);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 0;
}
.ladder .lr.exit {
  color: var(--accent);
  font-weight: 600;
}
.ladder b.hit {
  color: var(--accent);
}

/* chart */
.chart {
  width: 100%;
  display: block;
}
.chart text {
  font-family: var(--mono);
  font-size: 10px;
  fill: var(--text-3);
}

/* record */
.ring {
  display: flex;
  align-items: center;
  gap: 16px;
}
.bars {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 96px;
  border-bottom: 1px solid var(--line-strong);
}
.bars > div {
  flex: 1;
  min-width: 0; /* many sessions: the bars narrow instead of running past the card (7 Nov 2026) */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 4px;
}
.bars i {
  display: block;
  width: 100%;
  max-width: 28px;
  border-radius: 4px 4px 0 0;
  background: var(--up);
}
.bars i.neg {
  background: var(--down);
  border-radius: 2px;
}
.bars span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.bar-labels {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
}
.bar-labels span {
  flex: 1;
  text-align: center;
}

/* plans */
.plan {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer;
}
.plan.on {
  background: var(--raised);
  border: 2px solid var(--accent);
}
.plan input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}
.plan .main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.plan .main b {
  font-size: 16px;
}
.plan .main span {
  font-size: 13px;
  color: var(--muted);
}
.plan .price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.plan .price b {
  font-family: var(--mono);
  font-size: 18px;
}
.plan .price span {
  font-size: 11px;
  color: var(--muted);
}
.plan .main .tag {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--on-accent);
  margin-left: 6px;
  vertical-align: 2px;
}

/* notification preview */
.notif {
  background: var(--raised);
  border-radius: 18px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--line-strong);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}
.notif.warn {
  border-left: 3px solid var(--amber);
}
.notif .hd {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.notif .ic {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--on-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Syne", sans-serif;
  font-weight: 800;
  font-size: 11px;
}
.notif b {
  font-size: 15px;
}
.notif span.body {
  font-size: 14px;
  color: var(--ink-2);
}

/* skeleton */
.skel {
  border-radius: 14px;
  background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%);
  background-size: 200% 100%;
  animation: m-skel 1.2s linear infinite;
}
@keyframes m-skel {
  to {
    background-position: -200% 0;
  }
}

/* onboarding */
.m-onboard {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--bg);
  display: flex;
  justify-content: center;
}
.m-onboard > div {
  width: min(480px, 100%);
  padding: calc(40px + env(safe-area-inset-top, 0px)) 24px calc(24px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.m-onboard .steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.m-onboard .step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.m-onboard .step i {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-bg);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-weight: 800;
}
.m-onboard .step b {
  display: block;
  font-size: 16px;
  margin-bottom: 2px;
}
.m-onboard .step span {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
}

/* toasts from lean-alerts.js */
.lean-alert-toasts {
  position: fixed;
  top: calc(64px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: min(448px, calc(100% - 32px));
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lean-alert-toast {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 40px 12px 14px;
  border-radius: 16px;
  background: var(--raised);
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--accent);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  font-size: 13px;
  cursor: pointer;
}
.lean-alert-toast.up {
  border-left-color: var(--up);
}
.lean-alert-toast.down,
.lean-alert-toast.stop {
  border-left-color: var(--down);
}
.lean-alert-toast.near_stop,
.lean-alert-toast.pullback {
  border-left-color: var(--amber);
}
.lean-alert-toast b {
  font-size: 14px;
}
.lean-alert-toast span {
  color: var(--ink-2);
}
.lean-alert-toast button {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 30px;
  height: 30px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
}

/* signals (Why?) */
.sig {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 10px 0;
}
.sig .arrow {
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  padding-top: 1px;
}
.sig b {
  display: block;
  font-size: 14px;
}
.sig span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}
.sig .hr {
  font-family: var(--mono);
  font-size: 13px;
  text-align: right;
}
.sig .hr small {
  display: block;
  font-family: var(--body);
  font-size: 10px;
  color: var(--text-3);
}
[data-href] {
  cursor: pointer;
}
.card.ring {
  flex-direction: row;
}

/* sign-in errors (mobile.js · toast) */
.m-toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-2, #222);
  color: var(--ink, #fff);
  border: 1px solid var(--down, #c33);
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* Trade strategies (mobile.js · strategiesSection / screenStrategy) */
.strat-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.strat-group > .m-label {
  margin: 4px 2px 0;
}
.strat-group .link-row .m-sub {
  margin-left: auto;
  text-align: right;
}
.strat-group .link-row .go {
  margin-left: 4px;
}
.strat-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  font-size: 13px;
  font-weight: 800;
  flex: none;
}
.strat-mark.lean {
  color: var(--shift-up, #2563eb);
  font-size: 11px;
  letter-spacing: -1px;
}
.strat-mark.gann {
  color: var(--strat-gann, #7c3aed);
}
.strat-mark.opening_sell {
  color: var(--strat-open, #c026d3);
}
.strat-rec {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-2);
}
.strat-deep summary {
  cursor: pointer;
  list-style: none;
}
.strat-deep summary::-webkit-details-marker {
  display: none;
}
.m-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--ink-2);
}
.strat-rec .ladder {
  margin-top: 6px;
}
.strat-rec .btn-row {
  margin-top: 6px;
}
.ladder .lr b.hit {
  color: var(--accent);
}

/* Session filter (mobile.js · sessionBar): ‹ [Sessions ▾] › on Lean shifts and every strategy screen; the picker
   itself is session-picker.js (theme.css .sp) */
.m-sess {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}
.m-sess .btn.sm {
  flex: 0 0 40px;
  min-height: 40px;
  padding: 0;
  font-size: 18px;
}
.m-sess .btn.sm[aria-disabled="true"] {
  opacity: 0.3;
  pointer-events: none;
}
.m-sess .sp {
  position: static;
  flex: 1;
  min-width: 0;
}
.m-sess .sp-btn {
  width: 100%;
  min-height: 40px;
  font-size: 14px;
}
.m-sess .sp-car {
  margin-left: auto;
}
.m-sess .sp-pop {
  left: 0;
  right: 0;
  width: auto;
}
.m-sess .sp-opt {
  min-height: 44px;
  font-size: 15px;
}
.m-dayhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 6px 2px -2px;
  font-size: 13px;
  color: var(--ink-muted);
}
.m-dayhead b:first-child {
  color: var(--ink);
  font-size: 14px;
}

/* Opening drive (13 Oct 2026): the Today strip and the 5-minute read */
.drive-strip { display: flex; flex-direction: column; gap: 2px; border-left: 3px solid var(--line); }
.drive-strip.up { border-left-color: var(--up); }
.drive-strip.down { border-left-color: var(--down); }
.drive-strip.building { border-left-color: var(--amber); }
.drive-reads { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 6px; }
.drive-read { display: inline-flex; gap: 4px; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line); font-size: 12px; font-variant-numeric: tabular-nums; }
.drive-read.is-check { border-width: 2px; border-color: var(--ink-2, var(--line)); }
.drive-read.building { color: var(--amber); background: var(--amber-bg); }
.drive-read.up { color: var(--up); background: var(--up-bg); }
.drive-read.down { color: var(--down); background: var(--down-bg); }

/* shift quality grades and the day's regime (api/regime.py, 23 Oct 2026) */
.q-chip { display: inline-block; min-width: 1.4em; padding: 0 4px; margin-right: 5px; border-radius: 4px; border: 1px solid currentColor; font-size: 11px; font-weight: 700; line-height: 1.45; text-align: center; vertical-align: 1px; }
.q-chip.g-A { color: var(--up); background: var(--up-bg); }
.q-chip.g-B { color: var(--flat); background: var(--flat-bg); }
.q-chip.g-C { color: var(--down); background: var(--down-bg); }
.q-card .card-row { gap: 8px; justify-content: flex-start; align-items: center; }
.q-tags { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; margin: 4px 0; }
.q-tag.good { color: var(--up); }
.q-tag.bad { color: var(--down); }
.regime-card { display: flex; flex-direction: column; gap: 2px; border-left: 3px solid var(--line); }
.regime-card.up { border-left-color: var(--up); }
.regime-card.down { border-left-color: var(--down); }
.regime-card.side { border-left-color: var(--amber); }

/* straddle-breakout shift (7 Nov 2026) */
/* the straddle-breakout trigger: a small filled pill beside "bullish / bearish" (7 Nov 2026: an empty outlined box read as nothing) */
.trig-chip { display: inline-flex; align-items: center; gap: 2px; margin-left: 8px; padding: 1px 7px; border-radius: 999px; font-style: normal; font-size: 11px; font-weight: 700; line-height: 16px; letter-spacing: 0.01em; color: var(--amber); background: var(--amber-bg); border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); vertical-align: 2px; white-space: nowrap; }

/* track record with more than 10 sessions: thinner bars, no value labels (title / tap shows them), day numbers only */
.bars.dense { gap: 3px; }
.bars.dense span { display: none; }
.bar-labels.dense { gap: 3px; font-size: 10px; }
.bar-labels span { min-width: 0; overflow: hidden; }

/* MoodShift wordmark (7 Nov 2026) */
.m-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.m-brand .brand-mark {
  width: 1.05em;
  height: 1.05em;
  border-radius: 0.26em;
  flex: none;
}
.m-brand .brand-shift {
  color: var(--accent);
}
img.ic {
  background: none;
  object-fit: cover;
}

.brand-word {
  font-family: "Inter", "IBM Plex Sans", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.045em;
}

.breakout-note { margin: 8px 0 0; line-height: 1.45; }
.breakout-note .trig-chip { margin: 0 6px 0 0; }

/* ---------------------------------------------------------------- indices: switch, all-three strip, beta screen (7 Nov 2026) */
.ix-switch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; margin: 0 0 12px; border-radius: 14px; background: var(--surface-2); }
.ix-switch button { min-height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.ix-switch button[aria-pressed="true"] { background: var(--raised, var(--surface)); color: var(--ink); box-shadow: 0 1px 3px rgba(15, 23, 32, 0.14), inset 0 -2px 0 var(--ix); }
.ix-name { display: inline-flex; align-items: center; gap: 6px; }
.ix-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ix); flex: none; display: inline-block; }
.ix-beta { font-size: 9px; letter-spacing: 0.06em; color: var(--amber); }
.ix-strip-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.ix-cells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ix-cell { text-align: left; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 3px; padding: 8px; min-height: 44px; border-radius: 12px; background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); }
.ix-cell[aria-pressed="true"] { border-color: var(--ix); }
.ix-cell .ix-name { font-size: 11px; font-weight: 600; color: var(--ink-2); }
.ix-cell b { font-size: 14px; }
.ix-split { margin: 10px 0 0; padding: 8px 10px; border-radius: 12px; background: var(--amber-bg); color: var(--amber); font-size: 12px; line-height: 1.4; }
.ix-beta-note { background: var(--amber-bg); color: var(--ink); font-size: 13px; line-height: 1.45; }
.ix-beta-note b { color: var(--amber); }
.ix-card { border-top: 4px solid var(--ix); display: flex; flex-direction: column; gap: 10px; }
.ix-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ix-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--ix); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 0.02em; }
.ix-chip .ix-dot { background: #fff; width: 6px; height: 6px; }
.ix-exp { margin-left: auto; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 11px; font-weight: 600; color: var(--ink-2); }
.ix-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ix-level { font-size: 26px; font-weight: 600; }
.ix-mood { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ix-mood b { font-size: 17px; }
.ix-chart { width: 100%; height: auto; display: block; border-radius: 8px; background: var(--surface-2); }
.ix-band-up { fill: var(--up); fill-opacity: 0.12; }
.ix-band-dn { fill: var(--down); fill-opacity: 0.12; }
