/* Homepage draw overview. Keep each digit in its original draw position. */
.home-results {
  --draw-ball: 28px;
  --draw-gap: 5px;
  margin-bottom: 32px;
}
.home-results .page-header { align-items: baseline; gap: 4px 20px; margin-bottom: 14px; }
.home-results .page-header h1 { font-size: clamp(22px, 2.3vw, 29px); }
.home-results .dataset-summary { color: var(--dim); font-size: 12px; }
.home-results .latest-panel { border-top: 3px solid var(--blue); }
.home-results .table-latest thead th { padding-block: 10px; }
.home-results .td-name, .home-results .td-actions { white-space: nowrap; }
.home-results .table-latest .td-period { font-size: 13px; }
.home-results .result-balls { gap: var(--draw-gap); }
.home-results .ball-sm {
  width: var(--draw-ball);
  height: var(--draw-ball);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.home-results .ball-sm, .home-analysis-layout .ball-sm, .home-analysis-layout .analysis-number { border-radius: 50%; }
.home-results .kl8-balls { display: grid; grid-template-columns: repeat(10, var(--draw-ball)); }
.home-results .link-sm { display: inline-block; font-size: 12px; }
#lottery-analysis { scroll-margin-top: 112px; }
.home-tool-picker { display: none; scroll-margin-top: 120px; }
.home-tool-picker:target { display: block; margin-bottom: 14px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 9px; background: #fff; }
.home-tool-picker h2 { margin-bottom: 6px; font-size: 15px; }
.home-tool-picker div { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.home-tool-picker a { display: inline-block; padding-block: 6px; }

.home-shortcuts, .home-day-games { display: flex; gap: 6px; flex-wrap: wrap; }
.home-shortcuts a, .home-day-games a {
  display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 13px;
  color: var(--blue); background: var(--blue-soft);
}
.home-shortcuts a { border: 1px solid var(--border); background: #fff; }
.home-discovery, .home-tool-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.home-discovery { margin-bottom: 24px; }
.home-card { padding: 19px 22px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); }
.home-card header, .home-note, .home-note-side, .home-note-title { display: flex; align-items: center; }
.home-card header, .home-note { justify-content: space-between; gap: 12px; }
.home-card header { padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.home-card h2, .home-experience h2 { font-size: 19px; color: var(--ink); line-height: 1.5; }
.home-card header a, .home-note-side, .home-note-title > span, .home-footnote { color: var(--dim); font-size: 12px; }
.home-card header a { color: var(--blue); }
.home-day { display: grid; grid-template-columns: 83px 1fr; align-items: center; gap: 10px; padding: 15px 0; }
.home-day + .home-day, .home-note + .home-note { border-top: 1px solid var(--border-soft); }
.home-day-date { display: grid; gap: 2px; }
.home-day-date strong, .home-note-title strong { color: var(--ink); font-size: 15px; }
.home-day-date time { color: var(--dim); font-size: 12px; }
.home-day-games { gap: 5px; }
.home-day-games a { padding: 3px 10px; }
.home-footnote { line-height: 1.65; margin-top: 8px; }
.home-note { padding: 9px 0; }
.home-note:last-child { padding-bottom: 0; }
.home-note-title { gap: 8px; flex-wrap: wrap; }
.home-note-facts { display: block; font-size: 13px; color: var(--dim); }
.home-note-facts b { font-weight: 600; color: var(--text); }
.home-note-side { gap: 10px; white-space: nowrap; }
.home-note-side > span { color: var(--blue); }
.home-experience { margin-bottom: 24px; }
.home-experience h2 { margin-bottom: 10px; }
.home-tool-cards > a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 20px;
  margin: 0; border: 1px solid var(--border); border-radius: 14px;
}
.home-demo { color: var(--ink); background: #edf5f2; }
.home-number-trend { background: #eef4f8; }
.home-number-trend .home-demo-copy small { color: #38647a; }
@media (min-width: 769px) {
  .home-tool-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-tool-cards > a { flex-direction: column; align-items: flex-start; }
}
.home-demo:hover { border-color: var(--blue); }
.home-demo-copy { display: grid; gap: 3px; }
.home-demo-copy small { color: var(--blue); font-size: 12px; }
.home-demo-copy strong { font-size: 19px; }
.home-demo-copy > span { color: var(--dim); font-size: 12px; }
.home-tool-cards .simulation-entry-icon { display: none; }
.home-demo-action, .home-tool-cards .simulation-entry-action {
  padding: 6px 12px; min-height: 0; border: 1px solid var(--border); border-radius: 999px;
  background: #fff; color: var(--blue); font-size: 13px; white-space: nowrap;
}
@media (max-width: 768px) {
  .home-shortcuts { margin-top: 9px; }
  .home-discovery, .home-tool-cards { grid-template-columns: 1fr; gap: 12px; }
  .home-card, .home-tool-cards > a { padding: 15px; }
  .home-day { grid-template-columns: 76px 1fr; }
  .home-note-side { gap: 4px; }
}
@media (max-width: 390px) {
  .home-tool-cards > a { align-items: flex-start; flex-direction: column; gap: 8px; }
}

@media (min-width: 769px) and (max-width: 1000px) {
  .home-results { --draw-ball: 22px; --draw-gap: 3px; }
  .home-results .table-latest td, .home-results .table-latest th { padding-inline: 8px; }
  .home-results .td-actions .link-sm { padding-inline: 4px; }
}
@media (max-width: 768px) {
  .home-results { --draw-ball: 25px; --draw-gap: 4px; margin-bottom: 24px; }
  .home-results .latest-panel { border: 0; }
  .home-results .page-header { display: block; }
  .home-results .dataset-summary { margin-top: 4px; }
  .home-results .table-latest tbody tr {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 8px;
    padding: 12px 14px;
  }
  .home-results .table-latest tbody th, .home-results .table-latest tbody td { padding: 0; }
  .home-results .table-latest .td-balls { margin: 0; }
  .home-results .td-actions .link-sm { padding: 5px 4px; font-size: 11px; }
  #lottery-analysis, .home-tool-picker { scroll-margin-top: 12px; }
}
@media (max-width: 360px) {
  .home-results { --draw-ball: 22px; --draw-gap: 3px; }
  .home-results .ball-sm { font-size: 11px; }
}
