/* Winston V3 — Settings screen (tracker #141 M7).
   Anchored left-rail sub-nav with scroll-spy. On narrow viewports the
   rail collapses to a horizontal scroll strip above the cards so the
   operator can still deep-link any section. */

.settings-has-subnav {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: var(--space-6);
  align-items: start;
}

.settings-subnav {
  position: sticky;
  top: calc(var(--top-bar-h) + var(--space-3));
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-2) 0;
  border-right: 1px solid var(--hairline);
}

.settings-subnav-item {
  display: block;
  padding: 6px 12px;
  border-left: 2px solid transparent;
  color: var(--ink-muted);
  font-size: var(--type-sm);
  text-decoration: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.settings-subnav-item:hover {
  background: var(--surface-hover);
  color: var(--ink);
}
.settings-subnav-item.is-active {
  background: var(--ai-tint, rgba(56, 132, 255, 0.08));
  border-left-color: var(--ai);
  color: var(--ai);
  font-weight: var(--weight-semi);
}

/* Narrow viewports — collapse the rail to a horizontal scroll strip. */
@media (max-width: 900px) {
  .settings-has-subnav {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
  .settings-subnav {
    position: relative;
    top: 0;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;  /* horizontal-only subnav — block the coerced vertical scrollbar */
    gap: 4px;
    border-right: 0;
    border-bottom: 1px solid var(--hairline);
    padding: 0 0 var(--space-2);
  }
  .settings-subnav-item {
    flex: 0 0 auto;
    border-left: 0;
    border-bottom: 2px solid transparent;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    white-space: nowrap;
  }
  .settings-subnav-item.is-active {
    border-left: 0;
    border-bottom-color: var(--ai);
  }
}

/* Ticker tape symbol picker. Chip-shaped tokens with an × remove button.
   The component lives in Settings; the tape itself is rendered by
   /v3/js/components/ticker-tape.js (styled in components/ticker-tape.css). */
.ticker-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  min-height: 32px;
  align-items: center;
}

.ticker-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 4px 4px 10px;
  background: var(--surface-hover, var(--surface));
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-mono, 'JetBrains Mono', ui-monospace, monospace);
  font-size: var(--type-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.ticker-chip-sym { color: var(--ink-strong, var(--ink)); }

/* Audit M3 (2026-05-27): tap target. The × glyph itself stays small for
   visual density, but the hittable region extends to 32px desktop / 44px
   mobile via position:relative + an absolutely-positioned ::before that
   doesn't push siblings around (the chip row stays the same height). */
.ticker-chip-remove {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.ticker-chip-remove::before {
  content: '';
  position: absolute;
  inset: -6px;       /* 24px visual + 12px hit-zone padding = 36px on desktop */
}

@media (max-width: 600px) {
  /* Phone — Apple HIG 44×44 floor. Visual glyph stays small; hit-zone
     extends. */
  .ticker-chip-remove::before { inset: -10px; }
}

.ticker-chip-remove:hover,
.ticker-chip-remove:focus {
  background: var(--neg, #C8201F);
  color: #fff;
  outline: none;
}

