/* ATH + Retest screener (staged 2026-11-13). Additive: new classes only, board styles untouched. */
/* the board swap (hiding board-only controls) lives in board-tabs.css */
.ath-panel.hidden { display: none !important; }

.ath-panel { margin-top: 4px; font-family: var(--sans); color: var(--text); }
.ath-head { background: var(--bg2); border: 1px solid var(--border); border-left: 4px solid #ff7a1a; border-radius: 10px; padding: 12px 16px; margin: 0 0 12px; }
.ath-title-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.ath-title { margin: 0; font-size: 16px; font-weight: 700; color: #fff; letter-spacing: .2px; }
.ath-help-tip { font-family: var(--sans); max-height: min(72vh, 520px); overflow-y: auto; overscroll-behavior: contain; }
.ath-controls { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: flex-end; }
.ath-ctl { display: flex; flex-direction: column; gap: 6px; }
.ath-ctl .field-label { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ath-seg { flex-wrap: wrap; }
.ath-seg-btn { background: transparent; color: var(--muted); border: none; padding: 6px 12px; font: inherit; font-family: var(--sans);
  font-size: 13px; font-weight: 600; cursor: pointer; min-height: 32px; touch-action: manipulation; }
.ath-seg-btn + .ath-seg-btn { border-left: 1px solid var(--border); }
.ath-seg-btn.active { background: #ff7a1a; color: #0b0e11; }
@media (hover: hover) { .ath-seg-btn:not(.active):hover { color: var(--text); background: rgba(255,122,26,.10); } }
.ath-seg-btn:focus-visible { outline: 2px solid #ff7a1a; outline-offset: -2px; }
.ath-n { display: inline-block; min-width: 1.4em; margin-left: 4px; padding: 0 5px; border-radius: 999px; font-size: 11px;
  background: rgba(255,255,255,.07); color: inherit; text-align: center; }
.ath-seg-btn.active .ath-n { background: rgba(11,14,17,.18); }
.ath-list { min-height: 32px; font-family: var(--sans); }

.ath-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.ath-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ath-table th { text-align: left; padding: 10px 12px; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  background: var(--bg3); border-bottom: 1px solid var(--border); font-weight: 700; white-space: nowrap; }
.ath-table th.ath-sortable { cursor: pointer; user-select: none; color: var(--text); }
.ath-table th.ath-sortable:hover { color: #ff7a1a; }
.ath-table th.num, .ath-table td.num { text-align: right; }
.ath-table td { padding: 10px 12px; border-bottom: 1px solid var(--bg3); vertical-align: top; }
.ath-table tbody tr { cursor: pointer; }
.ath-table tbody tr:last-child td { border-bottom: none; }
.ath-table tbody tr:hover td, .ath-table tbody tr:focus-visible td { background: rgba(255,122,26,.07); }
.ath-table tbody tr:focus-visible { outline: 2px solid #ff7a1a; outline-offset: -2px; }
.ath-ticker { display: block; color: #ff7a1a; font-weight: 700; font-size: 15px; }
.ath-lists, .ath-sub { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; white-space: nowrap; }
.ath-lists { white-space: normal; max-width: 14rem; }
.ath-stage { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; letter-spacing: .3px; white-space: nowrap; border: 1px solid var(--border); }
.ath-stage.held { color: #0b0e11; background: #ff7a1a; border-color: #ff7a1a; }
.ath-stage.broke { color: #ff7a1a; border-color: rgba(255,122,26,.7); }
.ath-stage.traded { color: #ffb27a; border-style: dashed; border-color: rgba(255,178,122,.7); }
.ath-stage.below { color: var(--muted); }
.ath-detail { color: #c9d2de; font-size: 12.5px; line-height: 1.45; margin-top: 5px; max-width: 30rem; }
.ath-lvl { font-variant-numeric: tabular-nums; }
.ath-table td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ath-pct.up { color: var(--green); }
.ath-pct.down { color: var(--red); }
.ath-basis { display: block; margin-top: 2px; font-size: 10.5px; font-weight: 700; color: #ffb27a; letter-spacing: .2px; }
.ath-empty { color: var(--muted); padding: 22px 12px; text-align: center; border: 1px solid var(--border); border-radius: 10px; }
.ath-foot { display: flex; flex-wrap: wrap; gap: 8px 14px; justify-content: space-between; margin: 12px 0 6px; color: var(--muted); font-size: 12px; }

/* phones: each row becomes a card (no sideways scrolling) */

/* ticker lookup (top of the panel) */
.ath-lookup { margin: 0 0 12px; }
.ath-lookup .field-label { display: block; margin-bottom: 6px; }
.ath-lookup-row { display: flex; gap: 8px; align-items: stretch; max-width: 460px; }
.ath-lookup-input { flex: 1 1 auto; min-width: 0; background: var(--bg3); color: var(--text); border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 12px; font-family: var(--sans); font-size: 15px; font-weight: 600; letter-spacing: .3px; text-transform: uppercase; }
.ath-lookup-input::placeholder { text-transform: none; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.ath-lookup-input:focus { outline: none; border-color: #ff7a1a; box-shadow: 0 0 0 2px rgba(255,122,26,.25); }
.ath-lookup-btn { flex: 0 0 auto; background: #ff7a1a; color: #0b0e11; border: 1px solid #ff7a1a; border-radius: 8px; padding: 0 18px;
  font-family: var(--sans); font-size: 14px; font-weight: 700; cursor: pointer; touch-action: manipulation; }
.ath-lookup-btn:disabled { opacity: .6; cursor: progress; }
@media (hover: hover) { .ath-lookup-btn:not(:disabled):hover { background: #ff8f3d; } }
.ath-lk-out { margin: 0 0 14px; }
.ath-lk-msg { color: var(--muted); padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg2); font-size: 14px; }
.ath-lk-msg.err { color: #ffb27a; border-color: rgba(255,122,26,.5); }
.ath-lk-table { border-color: rgba(255,122,26,.55); }
.ath-lk-note { color: var(--muted); font-size: 12px; margin: 6px 2px 0; line-height: 1.45; }
.ath-stage.none { color: var(--muted); border-style: dotted; }

@media (max-width: 640px) {
  .ath-lookup-row { max-width: none; }
  .ath-lk-table .ath-table tbody tr { border-color: rgba(255,122,26,.55); }
  .ath-head { padding: 12px; }
  .ath-controls { gap: 10px; }
  .ath-ctl { width: 100%; }
  .ath-seg { display: flex; width: 100%; }
  .ath-seg-btn { flex: 1 1 auto; padding: 6px 8px; }
  .ath-list { width: 100%; }
  .ath-table-wrap { border: none; overflow: visible; }
  .ath-table thead { display: none; }
  .ath-table, .ath-table tbody { display: block; }
  .ath-table tbody tr { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px 10px; padding: 12px; margin: 0 0 10px;
    border: 1px solid var(--border); border-radius: 10px; background: var(--bg2); }
  .ath-table td { display: block; padding: 0; border: none; text-align: left !important; }
  .ath-table td { order: 2; }
  .ath-table td.ath-sym { grid-column: 1 / 3; order: 0; }
  .ath-table td[data-k="Days"] { order: 1; text-align: right !important; }
  .ath-table td[data-k="Breakout"] { order: 3; grid-column: 1 / -1; }
  .ath-table td.ath-stage-td { grid-column: 1 / -1; order: 4; }
  .ath-table td[data-k="Breakout"] .ath-sub { display: inline; margin-left: 6px; }
  .ath-table td[data-k]:not(.ath-sym):not(.ath-stage-td)::before { content: attr(data-k); display: block; font-size: 10px; letter-spacing: .08em;
    text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
  .ath-table td.ath-sym::before, .ath-table td.ath-stage-td::before { content: none; }
  .ath-detail { max-width: none; }
  .ath-table tbody tr:hover td, .ath-table tbody tr:focus-visible td { background: transparent; }
  .ath-table tbody tr:hover, .ath-table tbody tr:focus-visible { background: #161b22; }
}
