/* pages.css — the rules the generated public pages share.
 *
 * Until 2026-10-31 each of these blocks was inlined into every page that used
 * it: the drill-page block into 115 pages (drills, legends, players/<position>,
 * history), the recruiting block into 11 (recruiting, juggle-counter,
 * trainer-rate-calculator) and the state block into 56 (/states/<slug>). One
 * copy here, linked as /marketing/pages.css?v=N; style.css stays the site's
 * sheet and this one is loaded after it. Bump the ?v= with
 * tools/bump_asset_version.py pages.css when it changes (nginx holds
 * /marketing/ for seven days). The breakpoints are style.css's own (640, 1024)
 * where the inline blocks said 620 and 1000.
 *
 * Who emits the link: tools/build_drill_pages.py (and every generator that
 * renders through its page(): legends, positions, history, recruiting, the
 * free tools), tools/build_state_pages.py, and the four hand-written state
 * pages. A page-specific rule stays inline on its page (page()'s extra_css).
 */

/* ── Drill, legend, position and history pages (.dp-*) ─────────────────────
 * From tools/build_drill_pages.py. Shared by /drills and /legends so the two
 * sections cannot drift apart. */
.dp-hero { padding-bottom: 26px; }
.dp-hero .breadcrumb { font-size: .85rem; color: var(--text-dim); margin-bottom: 14px; }
.dp-hero .breadcrumb a { color: var(--primary-ink); text-decoration: underline; text-underline-offset: 2px; }
.dp-hero h1 { font-weight: 800; margin: 6px 0 14px; }
.dp-hero h1 span { color: var(--primary-ink); }
.dp-hero p { color: var(--text-muted); font-size: 1.05rem; line-height: 1.75; }
.dp-kicker { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--primary-ink); }
.dp-wrap { padding-bottom: 64px; }
.dp-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 8px 0 28px; }
.dp-fact { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.dp-fact .k { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-dim); margin-bottom: 4px; }
.dp-fact .v { font-size: 1rem; font-weight: 700; color: var(--text); line-height: 1.4; }
.dp-fact .v a { color: var(--primary-ink); }
.dp-block { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 28px 30px; margin-bottom: 20px; }
.dp-block h2 { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em; color: var(--text); margin-bottom: 12px; }
.dp-block h3 { font-size: 1rem; font-weight: 700; color: var(--text); margin: 16px 0 8px; }
.dp-block p { color: var(--text-muted); line-height: 1.75; font-size: .96rem; }
.dp-block p + p { margin-top: 10px; }
.dp-block ul, .dp-block ol { padding-left: 1.3em; color: var(--text-muted); line-height: 1.7; font-size: .95rem; }
.dp-block li + li { margin-top: 7px; }
.dp-block li strong { color: var(--text); }
.dp-block a { color: var(--primary-ink); }
.dp-steps li::marker { color: var(--primary-ink); font-weight: 700; }
.dp-note { border-left: 3px solid var(--primary); padding-left: 16px; }
/* A note after a list stands apart from its last item rather than reading as one more line of it. */
.dp-block * + .dp-note { margin-top: 16px; }
.dp-quiet { font-size: .85rem; color: var(--text-dim); line-height: 1.65; margin-top: 12px; }
/* auto-fill, not auto-fit: a section with one drill keeps a card's width
   rather than stretching that card across the whole column. */
.dp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.dp-card { display: block; border: 1px solid var(--border); border-radius: 13px; padding: 16px 18px; background: var(--surface); text-decoration: none; color: inherit; }
.dp-card:hover { border-color: var(--primary); }
.dp-card h3 { font-size: 1rem; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.dp-card p { color: var(--text-muted); font-size: .88rem; line-height: 1.55; }
.dp-card .dp-meta { color: var(--text-dim); font-size: .78rem; margin-top: 8px; font-variant-numeric: tabular-nums; }
.dp-section { padding: 30px 0 6px; border-top: 1px solid var(--border); }
.dp-section h2 { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 6px; }
.dp-section > p { color: var(--text-muted); line-height: 1.7; margin-bottom: 16px; }
.dp-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.dp-jump a { font-size: .85rem; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; color: var(--text-muted); text-decoration: none; }
.dp-jump a:hover { border-color: var(--primary); color: var(--text); }
.dp-cta { text-align: center; padding: 34px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; margin-top: 26px; }
.dp-cta h2 { font-size: 1.4rem; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.dp-cta p { color: var(--text-muted); line-height: 1.7; margin: 0 auto 18px; }
.dp-cta-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.dp-more { margin-top: 12px; }
.dp-more > summary { cursor: pointer; display: inline-block; font-size: .9rem; font-weight: 700; color: var(--primary-ink); padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; list-style: none; }
.dp-more > summary::-webkit-details-marker { display: none; }
.dp-more[open] > summary { margin-bottom: 12px; }
.dp-more[open] > summary .dp-more-show, .dp-more:not([open]) > summary .dp-more-hide { display: none; }
.dp-hear { margin-bottom: 20px; }
.dp-hear-modes { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.dp-hear-mode { font: inherit; font-size: .88rem; font-weight: 700; padding: 8px 14px; min-height: 40px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-muted); cursor: pointer; }
.dp-hear-mode.on { border-color: var(--primary); color: var(--text); }
.dp-hear-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.dp-hear-note { font-size: .85rem; color: var(--text-dim); }
.dp-hear-script { display: grid; gap: 4px; }
.dp-hear-line { display: grid; grid-template-columns: 3.2em minmax(0, 1fr); gap: 10px; text-align: left; font: inherit; font-size: .93rem; line-height: 1.55; color: var(--text-muted); background: none; border: 0; border-radius: 8px; padding: 8px; min-height: 40px; cursor: pointer; }
.dp-hear-line time { color: var(--text-dim); font-variant-numeric: tabular-nums; }
.dp-hear-line:hover { background: var(--bg-alt, rgba(127,127,127,.08)); }
.dp-hear-line.on { color: var(--text); background: var(--bg-alt, rgba(127,127,127,.08)); }
.dp-hear-line.on time { color: var(--primary-ink); font-weight: 700; }
.dp-hear-line.past { opacity: .7; }
@media (min-width: 1024px) {
  /* Two short lists side by side rather than one wide column half empty,
     both cards as tall as the taller, so the row reads as one band. */
  .dp-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: stretch; margin-bottom: 20px; }
  .dp-pair > .dp-block { margin-bottom: 0; }
}
@media (max-width: 640px) {
  .dp-hero { padding-bottom: 20px; }
  .dp-block { padding: 20px 18px; }
  /* The index lists every drill: on a phone a card is its name and its line. */
  .dp-index .dp-card .dp-desc { display: none; }
  .dp-index .dp-grid { gap: 8px; }
  .dp-index .dp-card { padding: 12px 16px; }
  .dp-index .dp-card h3 { margin-bottom: 0; }
  .dp-index .dp-card .dp-meta { margin-top: 4px; }
}

/* ── Recruiting timeline, juggle counter, rate calculator (.rc-*) ───────────
 * From tools/build_recruiting_pages.py: the dated steps and their chips, the
 * FAQ accordion and the letter form these free tools share. */
.rc-steps { list-style: none; padding: 0; margin: 0; }
.rc-step { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; margin-bottom: 12px; }
.rc-step.is-past { background: var(--bg); border-style: dashed; }
.rc-when { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .86rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.rc-when strong { color: var(--text); }
.rc-chip { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-dim); }
.rc-chip:empty { display: none; }
.rc-step h3 { font-size: 1.02rem; font-weight: 800; color: var(--text); margin: 8px 0 6px; }
.rc-step p { color: var(--text-muted); line-height: 1.65; font-size: .93rem; }
.rc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.rc-tag { font-size: .74rem; padding: 2px 9px; border-radius: 999px; background: var(--bg-muted, var(--surface)); border: 1px solid var(--border); color: var(--text-muted); }
.rc-tag-ours { border-style: dashed; }
.rc-src { margin-top: 10px; font-size: .86rem; }
.rc-src summary { cursor: pointer; color: var(--primary-ink); font-weight: 600; }
.rc-src p { margin-top: 6px; font-size: .86rem; }
.rc-src a { color: var(--primary-ink); overflow-wrap: anywhere; }
.rc-stale { border-left: 3px solid var(--primary); padding: 10px 14px; background: var(--surface); border-radius: 8px; margin-bottom: 16px; color: var(--text-muted); }
.rc-classes { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.rc-class { display: block; text-align: center; padding: 16px 12px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); text-decoration: none; color: var(--text); font-weight: 800; font-size: 1.05rem; }
.rc-class span { display: block; font-size: .8rem; font-weight: 500; color: var(--text-dim); margin-top: 4px; }
.rc-class:hover { border-color: var(--primary); }
.rc-form label { display: block; font-size: .85rem; font-weight: 600; color: var(--text); margin-bottom: 10px; }
.rc-form input, .rc-form select, .rc-form textarea { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; font-size: 16px; font-family: inherit; color: var(--text); background: var(--bg, var(--surface)); border: 1px solid var(--border); border-radius: 10px; }
.rc-form textarea { min-height: 260px; line-height: 1.6; }
.rc-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 14px; }
.rc-row { display: grid; grid-template-columns: 2fr 1.4fr 0.8fr 1fr 0.8fr auto auto; gap: 8px; align-items: end; padding: 12px 0; border-bottom: 1px solid var(--border); }
.rc-row label { margin: 0; font-size: .78rem; }
.rc-row .rc-check { display: flex; gap: 6px; align-items: center; min-height: 44px; }
.rc-row .rc-check input { width: auto; margin: 0; }
.rc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; align-items: center; }
.rc-actions .btn { min-height: 44px; }
.rc-levels { display: flex; gap: 16px; flex-wrap: wrap; margin: 6px 0 12px; }
.rc-levels label { display: flex; gap: 6px; align-items: center; font-weight: 600; margin: 0; min-height: 44px; }
.rc-levels input { width: auto; margin: 0; }
.rc-result table { width: 100%; border-collapse: collapse; font-size: .9rem; margin: 8px 0 12px; font-variant-numeric: tabular-nums; }
.rc-result th, .rc-result td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); color: var(--text-muted); }
.rc-result th { color: var(--text); }
.rc-status { min-height: 1.4em; color: var(--text-muted); font-size: .9rem; }
.rc-faq .faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.rc-faq .faq-item.open { border-color: var(--primary); }
.rc-faq .faq-question { width: 100%; padding: 16px 20px; background: none; border: none; font-size: .95rem; font-weight: 600; color: var(--text); text-align: left; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-family: inherit; min-height: 44px; }
.rc-faq .faq-chevron { display: inline-flex; flex-shrink: 0; transition: transform var(--motion-base) var(--ease-standard); color: var(--text-dim); }
.rc-faq:not(.is-collapsible) .faq-chevron { display: none; }
.rc-faq .faq-item.open .faq-chevron { transform: rotate(180deg); }
.rc-faq .faq-answer-inner { padding: 0 20px 16px; }
.rc-faq .faq-answer-inner p { font-size: .92rem; line-height: 1.7; margin: 0; color: var(--text-muted); }
.rc-standards { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 16px; align-items: start; }
.rc-standards .dp-block { margin-bottom: 0; }
.rc-standards .dp-block h3 { font-size: 1.1rem; font-weight: 800; margin: 0 0 10px; }
@media (min-width: 1024px) {
  /* Two columns of steps, read across then down, in date order. */
  .rc-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
  .rc-step { margin-bottom: 0; }
}
@media (max-width: 720px) {
  .rc-standards { grid-template-columns: 1fr; }
  .rc-row { grid-template-columns: 1fr 1fr; }
  .rc-row label:first-child { grid-column: 1 / -1; }
}

/* ── State pages (/states/<slug>) ───────────────────────────────────────────
 * From the hand-written Texas page, which tools/build_state_pages.py used to
 * lift as the template block; the generated pages and the four hand-written
 * ones (California, Florida, New York, Texas) link it alike. */
.state-hero {
  padding-bottom: 40px;
  text-align: center;
}
.state-hero .breadcrumb {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.state-hero .breadcrumb a { color: var(--primary-ink); text-decoration: underline; text-underline-offset: 2px; }
.state-hero h1 {
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text);
}
.state-hero h1 span {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.state-hero p {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin: 0 auto;
}

.state-section { padding: 0 32px 80px; }
.state-content { max-width: calc(var(--max-w) - 64px); margin: 0 auto; }

.state-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}
.state-source { margin: 18px 0 0; padding: 12px 14px; font-size: 13px;
  line-height: 1.6; color: var(--text-muted); background: var(--surface-alt);
  border-left: 3px solid var(--border); border-radius: 0 6px 6px 0; }
.state-source a { color: var(--primary-ink); }
.summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}
.summary-card .label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
}
.summary-card .value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}
.summary-card .value.green { color: var(--success); }
.summary-card .value.yellow { color: var(--warning); }

.state-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px;
  margin-bottom: 24px;
}
.state-block h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}
.state-block p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 12px;
}
.state-block ul {
  list-style: none;
  padding: 0;
}
.state-block ul li {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
  padding-left: 24px;
  position: relative;
  margin-bottom: 8px;
}
.state-block ul li::before {
  content: ''; display: inline-block; width: 1em; height: 1em; background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M20%206%209%2017l-5-5%27%2F%3E%3C%2Fsvg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M20%206%209%2017l-5-5%27%2F%3E%3C%2Fsvg%3E") center/contain no-repeat;
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

.spatrian-fit {
  background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(139,92,246,0.05));
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 16px;
  padding: 36px;
  margin-bottom: 24px;
}
.spatrian-fit h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.state-cta {
  text-align: center;
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-top: 24px;
}
.state-cta h2 { font-size: 1.4rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.state-cta p { color: var(--text-muted); margin-bottom: 20px; }

@media (max-width: 768px) {
  .state-block { padding: 24px; }
}
@media (max-width: 640px) {
  /* Four one-word facts two to a row, and one gutter rather than two. */
  .state-hero { padding-bottom: 32px; }
  .state-section { padding: 0 16px 60px; }
  .state-summary { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 28px; }
  .summary-card { padding: 14px; }
  .state-block { padding: 20px; }
}
/* When the figures were last checked, and the primary source on file. */
.state-hero .state-checked {
  margin: 18px auto 0;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-dim);
}
.state-hero .state-checked strong { color: var(--text-muted); font-weight: 600; }
.state-hero .state-checked a { color: var(--primary-ink); overflow-wrap: anywhere; }
/* Common questions: the /faq accordion. Open until the script runs. */
.state-faq .faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.state-faq .faq-item:hover, .state-faq .faq-item.open { border-color: var(--primary); }
.state-faq .faq-question {
  width: 100%;
  padding: 16px 20px;
  background: none;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: inherit;
}
.state-faq .faq-question:hover { color: var(--primary-ink); }
.state-faq .faq-chevron {
  display: inline-flex;
  flex-shrink: 0;
  transition: transform var(--motion-base) var(--ease-standard);
  color: var(--text-dim);
}
.state-faq:not(.is-collapsible) .faq-chevron { display: none; }
.state-faq .faq-item.open .faq-chevron { transform: rotate(180deg); color: var(--primary-ink); }
.state-faq .faq-answer-inner { padding: 0 20px 16px; }
.state-faq .faq-answer-inner p { font-size: 0.92rem; line-height: 1.7; margin: 0; }
/* Plan for this state: the two tools, opened on it. */
.state-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 12px;
}
.state-tool {
  display: block;
  padding: 18px 20px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  transition: border-color 0.2s;
}
.state-tool:hover, .state-tool:focus-visible { border-color: var(--primary); }
.state-tool-name { display: block; font-weight: 700; color: var(--primary-ink); margin-bottom: 4px; }
.state-tool-desc { display: block; font-size: 0.88rem; line-height: 1.55; color: var(--text-muted); }
/* Link to this guide: a plain anchor to copy, no frame and no script. */
.state-embed-code {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  resize: vertical;
}
.state-embed-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.state-embed-status { font-size: 0.88rem; color: var(--success); }
.state-block .state-embed-preview { margin: 14px 0 0; font-size: 0.88rem; }
.state-embed-preview a { color: var(--primary-ink); }
/* The reading column sits centred under the page's centred heading and photos. */
.state-content > * { margin-inline: auto; }
