/* NFL Anytime Touchdown history pages (/nfl/anytime-touchdown[/<player>]).
   Historical closing prices per book, joined to whether the player scored.
   Uses the v2/v3 design tokens from base.html, same conventions as
   public-odds.css. Prefix: .atd- */

.atd-wrap {
  --atd-accent: var(--accent, #00E676);
  --atd-accent-dim: var(--accent-dim, rgba(0, 230, 118, .15));
  --atd-bg: var(--bg-primary, #0A0A0F);
  --atd-elev: var(--bg-elevated, #12121A);
  --atd-hover: var(--bg-hover, #1A1A26);
  --atd-border: var(--border, #2A2A3A);
  --atd-text: var(--text-primary, #E8E6E3);
  --atd-dim: var(--text-secondary, #9C9CAD);
  --atd-mono: var(--font-mono, 'JetBrains Mono', monospace);
  --atd-display: var(--font-display, 'Outfit', sans-serif);
  max-width: 1560px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 36px) clamp(12px, 4vw, 28px) 64px;
  color: var(--atd-text);
}

/* ---- Breadcrumbs ---- */
.atd-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: 13px; color: var(--atd-dim); margin: 0 0 20px; }
.atd-crumbs a { color: var(--atd-dim); text-decoration: none; }
.atd-crumbs a:hover { color: var(--atd-accent); }
.atd-crumb-sep { opacity: .5; }
.atd-crumb-current { color: var(--atd-text); }

/* ---- Hero ---- */
.atd-hero { display: flex; align-items: center; gap: 18px; margin: 0 0 6px; }
.atd-shot { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; background: var(--atd-elev); border: 1px solid var(--atd-border); flex: 0 0 auto; }
.atd-hero h1 { font-family: var(--atd-display); font-weight: 700; font-size: clamp(24px, 3.4vw, 36px); line-height: 1.12; margin: 0; }
.atd-hero .atd-sub { color: var(--atd-dim); font-size: 15px; line-height: 1.55; margin: 6px 0 0; max-width: 74ch; }
.atd-team { display: inline-block; font-family: var(--atd-mono); font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--atd-accent); background: var(--atd-accent-dim); border: 1px solid rgba(0, 230, 118, .3); border-radius: 999px; padding: 2px 9px; margin-right: 8px; vertical-align: 1px; }

/* ---- Season + market tabs ---- */
.atd-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 8px; }
/* The market switcher sits above the season row and reads as the bigger choice. */
.atd-markets { margin: 20px 0 4px; }
.atd-markets .atd-tab { font-family: var(--atd-display); font-weight: 600; }
.atd-tab-none { opacity: .5; }
.atd-tab { text-decoration: none; color: var(--atd-dim); background: var(--atd-elev); border: 1px solid var(--atd-border); border-radius: 8px; padding: 7px 15px; font-size: 14px; font-weight: 500; font-family: var(--atd-mono); }
.atd-tab:hover { color: var(--atd-text); border-color: var(--atd-accent); }
.atd-tab.is-active { color: var(--atd-accent); border-color: var(--atd-accent); background: var(--atd-accent-dim); font-weight: 600; }

/* ---- Sibling free tools for the same market ---- */
/* Quieter than .atd-tabs on purpose: these leave the page, the tabs do not. */
.atd-siblings { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 14px 0 4px; font-size: 13px; }
.atd-siblings-label { font-family: var(--atd-display); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--atd-dim); }
.atd-siblings a { color: var(--atd-dim); text-decoration: none; border-bottom: 1px solid var(--atd-border); padding-bottom: 1px; }
.atd-siblings a:hover { color: var(--atd-accent); border-bottom-color: var(--atd-accent); }

/* ---- Summary stat cards ---- */
.atd-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 22px 0 20px; }
.atd-stat { background: var(--atd-elev); border: 1px solid var(--atd-border); border-radius: 12px; padding: 14px 16px; }
.atd-stat .atd-stat-k { font-family: var(--atd-display); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--atd-dim); }
.atd-stat .atd-stat-v { font-family: var(--atd-mono); font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--atd-text); margin-top: 6px; line-height: 1.1; }
.atd-stat.is-accent { border-color: rgba(0, 230, 118, .35); }
.atd-stat.is-accent .atd-stat-v { color: var(--atd-accent); }

/* ---- Note callout ---- */
.atd-note { display: flex; gap: 12px; background: var(--atd-elev); border: 1px solid var(--atd-border); border-left: 3px solid var(--atd-accent); border-radius: 10px; padding: 13px 16px; margin: 0 0 20px; color: var(--atd-dim); font-size: 13.5px; line-height: 1.6; max-width: 96ch; }
.atd-note strong { color: var(--atd-text); font-weight: 600; }

/* ---- Search ---- */
.atd-search { margin: 18px 0 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.atd-search input { width: 100%; max-width: 340px; padding: 10px 14px; font-size: 14px; font-family: inherit; color: var(--atd-text); background: var(--atd-elev); border: 1px solid var(--atd-border); border-radius: 8px; }
.atd-search input::placeholder { color: var(--atd-dim); }
.atd-search input:focus { outline: none; border-color: var(--atd-accent); box-shadow: 0 0 0 2px var(--atd-accent-dim); }
.atd-count { font-family: var(--atd-mono); font-size: 13px; color: var(--atd-dim); }

/* ---- Table ---- */
.atd-table-wrap { border: 1px solid var(--atd-border); border-radius: 12px; overflow-x: auto; background: var(--atd-bg); }
table.atd-table { width: 100%; border-collapse: collapse; font-size: 14px; white-space: nowrap; margin: 0; }

table.atd-table thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--atd-elev);
  font-family: var(--atd-display); font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: .05em; color: var(--atd-dim);
  padding: 11px 12px; text-align: center;
  border-bottom: 1px solid var(--atd-border);
}
table.atd-table th.atd-left, table.atd-table td.atd-left { text-align: left; }

table.atd-table td {
  background: var(--atd-bg); color: var(--atd-text);
  padding: 10px 12px; text-align: center; line-height: 1.3;
  border-bottom: 1px solid var(--row-line, #1B1B26);
  font-size: 14px;
}
table.atd-table tbody tr:last-child td { border-bottom: 0; }
table.atd-table tbody tr:hover td { background: var(--atd-hover); }

/* First column stays put while the book columns scroll. */
table.atd-table .atd-pin { position: sticky; left: 0; z-index: 1; box-shadow: 3px 0 6px -3px rgba(0, 0, 0, .85); }
table.atd-table thead .atd-pin { z-index: 3; }
table.atd-table tbody tr:hover .atd-pin { background: var(--atd-hover); }

/* Book columns */
.atd-book-head { display: inline-flex; align-items: center; gap: 6px; }
.atd-book-head img { width: 18px; height: 18px; object-fit: contain; border-radius: 4px; }
.atd-odd { font-family: var(--atd-mono); font-weight: 600; font-variant-numeric: tabular-nums; }
.atd-empty-cell { color: var(--atd-dim); opacity: .55; }

/* The anchor book leads the table and reads as the reference price. */
table.atd-table .atd-anchor { border-left: 1px solid rgba(0, 230, 118, .28); border-right: 1px solid rgba(0, 230, 118, .28); }
table.atd-table thead .atd-anchor { color: var(--atd-accent); background: linear-gradient(180deg, rgba(0, 230, 118, .10), var(--atd-elev)); }
table.atd-table td.atd-anchor .atd-odd { color: var(--atd-accent); }

/* Result pills */
.atd-pill { display: inline-block; min-width: 52px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.atd-pill-hit { color: var(--atd-accent); background: var(--atd-accent-dim); box-shadow: inset 0 0 0 1px rgba(0, 230, 118, .4); }
.atd-pill-miss { color: var(--atd-dim); background: rgba(156, 156, 173, .10); box-shadow: inset 0 0 0 1px rgba(156, 156, 173, .25); }

.atd-name { font-weight: 600; color: var(--atd-text); text-decoration: none; }
.atd-name:hover { color: var(--atd-accent); }
.atd-num { font-family: var(--atd-mono); font-variant-numeric: tabular-nums; }
.atd-rate { font-family: var(--atd-mono); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--atd-accent); }

/* ---- CTAs ---- */
.atd-cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 16px; }
.atd-cta { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; border-radius: 8px; padding: 11px 18px; font-size: 15px; border: 0; transition: transform .15s ease, box-shadow .15s ease; }
.atd-cta-primary { background: linear-gradient(135deg, var(--gradient-start, #00E676), var(--gradient-end, #00BFA5)); color: #06110B; }
.atd-cta-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0, 230, 118, .28); color: #06110B; }
.atd-cta-secondary { background: var(--atd-elev); color: var(--atd-accent); border: 1px solid var(--atd-border); }
.atd-cta-secondary:hover { background: var(--atd-accent-dim); border-color: var(--atd-accent); }

.atd-cta-band { margin: 32px 0; padding: 20px 24px; border-radius: 12px; background: linear-gradient(90deg, var(--atd-elev), rgba(0, 230, 118, .06)); border: 1px solid rgba(0, 230, 118, .35); display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; }
.atd-cta-band h2 { font-family: var(--atd-display); font-size: 20px; margin: 0 0 6px; }
.atd-cta-band p { margin: 0; color: var(--atd-dim); font-size: 14px; line-height: 1.6; max-width: 62ch; }
.atd-cta-band .atd-cta-row { margin-top: 0; }

/* ---- Search form ---- */
.atd-search-go { font-family: var(--atd-display); font-weight: 600; font-size: 14px; color: var(--atd-accent); background: var(--atd-elev); border: 1px solid var(--atd-border); border-radius: 8px; padding: 10px 18px; cursor: pointer; }
.atd-search-go:hover { border-color: var(--atd-accent); background: var(--atd-accent-dim); }
.atd-select { padding: 10px 12px; font-size: 14px; font-family: var(--atd-mono); color: var(--atd-text); background: var(--atd-elev); border: 1px solid var(--atd-border); border-radius: 8px; cursor: pointer; }
.atd-select:focus { outline: none; border-color: var(--atd-accent); box-shadow: 0 0 0 2px var(--atd-accent-dim); }
.atd-search-clear { font-size: 13px; color: var(--atd-dim); text-decoration: none; }
.atd-search-clear:hover { color: var(--atd-accent); }

/* ---- Pagination ---- */
.atd-pager { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: center; margin: 20px 0 0; }
.atd-page { font-family: var(--atd-display); font-weight: 600; font-size: 14px; color: var(--atd-accent); background: var(--atd-elev); border: 1px solid var(--atd-border); border-radius: 8px; padding: 10px 20px; text-decoration: none; }
.atd-page:hover { border-color: var(--atd-accent); background: var(--atd-accent-dim); }
.atd-page-info { font-family: var(--atd-mono); font-size: 13px; color: var(--atd-dim); }

/* ---- Teammate chips ---- */
.atd-related { margin: 30px 0; }
.atd-related h2 { font-family: var(--atd-display); font-size: 20px; margin: 0 0 12px; }
.atd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.atd-chip { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--atd-text); background: var(--atd-elev); border: 1px solid var(--atd-border); border-radius: 999px; padding: 6px 14px; text-decoration: none; }
.atd-chip:hover { border-color: var(--atd-accent); color: var(--atd-accent); }
.atd-chip-n { font-family: var(--atd-mono); font-size: 11px; color: var(--atd-dim); }

/* ---- Prose + FAQ ---- */
.atd-prose { margin: 32px 0; max-width: 78ch; line-height: 1.7; }
.atd-prose h2 { font-family: var(--atd-display); font-size: 22px; margin: 28px 0 12px; }
.atd-prose p { color: var(--atd-dim); margin: 0 0 12px; }
.atd-prose a { color: var(--atd-accent); text-decoration: none; }
.atd-prose a:hover { text-decoration: underline; }

.atd-faq { margin: 28px 0; max-width: 78ch; }
.atd-faq h2 { font-family: var(--atd-display); font-size: 22px; margin: 0 0 12px; }
.atd-faq details { border: 1px solid var(--atd-border); border-radius: 8px; padding: 14px 16px; margin-bottom: 8px; background: var(--atd-elev); }
.atd-faq summary { cursor: pointer; font-weight: 600; }
.atd-faq details p { margin: 10px 0 0; color: var(--atd-dim); line-height: 1.6; }

/* Screen-reader-only table caption: gives the table a name for assistive tech
   and for search engines without printing a heading above every table. */
.atd-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- Show-more + empty ---- */
.atd-more { display: flex; justify-content: center; margin: 18px 0 0; }
.atd-more button { font-family: var(--atd-display); font-weight: 600; font-size: 14px; color: var(--atd-accent); background: var(--atd-elev); border: 1px solid var(--atd-border); border-radius: 8px; padding: 10px 22px; cursor: pointer; }
.atd-more button:hover { border-color: var(--atd-accent); background: var(--atd-accent-dim); }
.atd-empty { padding: 48px 24px; text-align: center; color: var(--atd-dim); border: 1px dashed var(--atd-border); border-radius: 12px; }

@media (max-width: 640px) {
  .atd-hero { gap: 14px; }
  .atd-shot { width: 54px; height: 54px; }
  .atd-stats { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
  .atd-stat .atd-stat-v { font-size: 22px; }
}
