/* The statistics workspace shares the app palette and responds to its card width. */
.statistics-explorer{display:grid;gap:24px;min-width:0}
.statistics-explorer>*{min-width:0}
.statistics-explorer [id]{scroll-margin-top:116px}
.statistics-explorer h2{font-size:clamp(21px,2.3vw,27px);line-height:1.25;letter-spacing:-.7px}
.statistics-explorer h3{font-size:17px;line-height:1.4;letter-spacing:-.25px}
.explorer-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:20px}
.explorer-heading>div{min-width:0}
.explorer-heading .section-kicker{font-size:11px;line-height:1.5;margin-bottom:8px}
.explorer-heading .soft-icon{width:44px;height:44px;border-radius:13px;flex-shrink:0}
.explorer-period-form{display:flex;align-items:flex-end;gap:14px;flex-wrap:wrap}
.explorer-period-form label,.explorer-sort-form label{display:flex;flex-direction:column;gap:7px;min-width:0;font-size:13px;color:var(--muted);line-height:1.5}
.explorer-period-form .explorer-period-label{flex:1 1 220px}
.statistics-explorer select,.statistics-explorer input{min-height:46px;border:1px solid var(--line);border-radius:11px;background:var(--field-bg);color:var(--ink);font-size:14px;padding:10px 12px;max-width:100%;min-width:0;box-shadow:none}
.statistics-explorer select{width:100%;padding-right:32px}
.statistics-explorer input:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.statistics-explorer .button{min-height:46px;padding:11px 18px;font-size:13px;line-height:1.5;gap:12px}
.explorer-custom-dates{display:flex;flex:2 1 330px;gap:12px;min-width:0}
.explorer-custom-dates label{flex:1 1 0;min-width:0}
.explorer-custom-dates input{width:100%;min-width:0}
.explorer-period-form>.button{flex:0 0 auto}
.explorer-coverage{display:flex;align-items:baseline;gap:12px 24px;flex-wrap:wrap;margin-top:22px;padding-top:18px;border-top:1px solid var(--line);font-size:12px;line-height:1.6;color:var(--muted)}
.explorer-coverage>span:first-child{color:var(--ink);font-size:14px}
.explorer-coverage strong{font-size:24px;line-height:1.3;font-variant-numeric:tabular-nums;letter-spacing:-.5px;margin-right:5px}
.explorer-note,.explorer-method,.explorer-empty{font-size:12px;line-height:1.75;color:var(--muted);max-width:100ch;margin-top:14px}
.explorer-method{padding:0 2px;margin-top:0}
.explorer-error{background:var(--error-bg);color:var(--error-ink);padding:14px 16px;border-radius:11px;margin-top:18px;font-size:13px;line-height:1.65}
.explorer-section-nav{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;padding:2px;min-width:0;margin:-4px -2px 0}
.explorer-section-nav::-webkit-scrollbar{display:none}
.explorer-section-nav a{display:flex;align-items:center;justify-content:center;min-height:44px;padding:10px 18px;background:var(--surface);border:1px solid var(--line);border-radius:999px;color:var(--muted);font-size:13px;font-weight:650;white-space:nowrap;flex-shrink:0}
.explorer-section-nav a:hover,.explorer-section-nav a:focus-visible{background:var(--accent-soft);color:var(--accent);border-color:var(--accent-border)}
.explorer-sort-form{display:flex;align-items:flex-end;gap:8px;min-width:0}
.explorer-sort-form label{min-width:190px;max-width:100%;flex:1}
.explorer-sort-form select{font-size:13px}
.explorer-sort-form .button{background:var(--surface-subtle);color:var(--ink)}
.explorer-number-list,.explorer-combo-list,.explorer-matches{list-style:none;padding:0;margin:20px 0 0;display:grid;gap:10px;min-width:0}
.explorer-number-row{display:grid;grid-template-columns:40px minmax(115px,1fr) minmax(120px,1fr) minmax(100px,.7fr);align-items:center;gap:16px;padding:14px 16px;border:1px solid var(--line);border-radius:13px;min-width:0;background:var(--surface-subtle)}
.explorer-number-badge{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;font-size:17px;line-height:1;font-weight:750;letter-spacing:-.3px;font-variant-numeric:tabular-nums;color:var(--accent);background:var(--surface);flex:0 0 36px}
.explorer-number-row>.stats-star{width:40px;height:40px;min-width:40px;font-size:15px;line-height:1;flex-basis:40px}
.explorer-number-row>span{display:flex;flex-direction:column;gap:3px;min-width:0}
.explorer-number-row b{font-size:14px;line-height:1.5;font-weight:700;font-variant-numeric:tabular-nums}
.explorer-number-frequency>b,.explorer-number-absence>b{font-size:17px;line-height:1.3}
.explorer-number-row small,.explorer-number-frequency>span{font-size:12px;line-height:1.6;color:var(--muted)}
.explorer-number-date b{font-size:13px;font-weight:550}
.explorer-number-absence{align-items:flex-end;text-align:right}
.explorer-inner-details{margin-top:22px;border-top:1px solid var(--line);padding-top:0;min-width:0}
.explorer-inner-details>summary,.explorer-details>summary{display:flex;justify-content:space-between;align-items:center;gap:16px;list-style:none;cursor:pointer;min-height:50px;padding:16px 0;font-size:14px;font-weight:700;color:var(--ink);line-height:1.5;min-width:0}
.explorer-inner-details>summary::-webkit-details-marker,.explorer-details>summary::-webkit-details-marker{display:none}
.explorer-inner-details>summary::marker,.explorer-details>summary::marker{content:""}
.explorer-inner-details>summary:after,.explorer-details>summary:after{content:"";width:8px;height:8px;flex:0 0 8px;margin:0 4px 4px 0;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);transition:transform .15s}
.explorer-inner-details[open]>summary:after,.explorer-details[open]>summary:after{transform:rotate(225deg);margin-bottom:0}
.explorer-inner-details>summary:focus-visible,.explorer-details>summary:focus-visible{outline:3px solid var(--accent);outline-offset:3px;border-radius:6px}
.explorer-inner-details[open]>summary{padding-bottom:14px}
.explorer-inner-details .explorer-number-list,.explorer-inner-details .explorer-combo-list{margin-top:8px}
.explorer-subheading{margin:24px 0 0}
.explorer-group-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:30px;margin-top:24px;min-width:0}
.explorer-group-columns>div{min-width:0}
.explorer-group-columns h3{font-size:15px}
.explorer-combo-list{gap:8px;margin-top:14px}
.explorer-combo-list>li{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:12px;align-items:center;padding:12px;border:1px solid var(--line);border-radius:12px;min-width:0;background:var(--surface-subtle)}
.explorer-combo-balls{display:flex;gap:5px;align-items:center;min-width:0;flex-wrap:wrap}
.explorer-combo-balls .explorer-number-badge{width:30px;height:30px;flex-basis:30px;font-size:14px}
.explorer-combo-balls .stats-star{width:36px;height:36px;min-width:36px;font-size:13px;flex-basis:36px}
.explorer-combo-count{display:flex;flex-direction:column;align-items:flex-end;gap:1px;min-width:0}
.explorer-combo-count strong{font-size:15px;line-height:1.4;font-variant-numeric:tabular-nums}
.explorer-combo-count small,.explorer-combo-percent{font-size:12px;line-height:1.5;color:var(--muted)}
.explorer-combo-percent{min-width:42px;text-align:right;font-variant-numeric:tabular-nums}
.explorer-patterns .parity-breakdown{margin-top:0}
.explorer-patterns .parity-breakdown>summary{font-size:14px}
.explorer-distribution{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,125px),1fr));gap:9px;list-style:none;padding:0;margin:18px 0 0;min-width:0}
.explorer-distribution>li{display:flex;flex-direction:column;align-items:flex-start;gap:7px;padding:15px 12px;min-width:0;border:1px solid var(--line);border-radius:12px;background:var(--surface-subtle)}
.explorer-distribution>li.is-most-frequent{border-color:var(--accent-border);background:var(--accent-soft)}
.explorer-distribution strong{font-size:21px;line-height:1.3;font-weight:750;color:var(--ink);font-variant-numeric:tabular-nums;letter-spacing:-.5px}
.explorer-distribution b{font-size:15px;line-height:1.5;color:var(--ink);font-variant-numeric:tabular-nums}
.explorer-distribution span,.explorer-distribution small{font-size:12px;line-height:1.6;color:var(--muted);font-weight:450}
.explorer-mini-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:0;margin:20px 0 0}
.explorer-mini-metrics>div{padding:14px 16px;background:var(--accent-soft);border:1px solid var(--accent-border);border-radius:12px}
.explorer-mini-metrics dt{font-size:12px;line-height:1.5;color:var(--muted)}
.explorer-mini-metrics dd{font-size:24px;line-height:1.3;color:var(--ink);font-weight:750;margin:6px 0 0;font-variant-numeric:tabular-nums}
.explorer-pick-form{display:grid;gap:20px;margin-top:24px}
.explorer-pick-form fieldset{border:0;margin:0;padding:0;min-width:0}
.explorer-pick-form legend{font-size:13px;font-weight:650;line-height:1.6;color:var(--ink);padding:0;margin-bottom:12px}
.explorer-pick-inputs{display:grid;grid-template-columns:repeat(var(--pick-columns),minmax(0,1fr));gap:10px;max-width:480px}
.explorer-pick-inputs>label{min-width:0}
.explorer-pick-inputs input{width:100%;min-height:54px;text-align:center;font-size:22px;font-weight:700;font-variant-numeric:tabular-nums;padding:8px 3px;border-radius:12px;-moz-appearance:textfield;appearance:textfield}
.explorer-pick-inputs input::-webkit-outer-spin-button,.explorer-pick-inputs input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.explorer-star-inputs .explorer-pick-inputs{max-width:150px}
.explorer-star-inputs input{border-color:color-mix(in srgb,#dba731 45%,var(--line));background:color-mix(in srgb,#f6c658 9%,var(--surface));color:var(--ink)}
.explorer-pick-actions{display:flex;align-items:center;gap:18px;flex-wrap:wrap}
.explorer-pick-actions .quiet-link{font-size:13px;min-height:44px;display:inline-flex;align-items:center}
.explorer-analysis-result{margin-top:28px;border-top:1px solid var(--line);padding-top:24px;min-width:0}
.explorer-analysis-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.explorer-analysis-summary>div{display:flex;flex-direction:column;gap:7px;padding:20px;border:1px solid var(--accent-border);border-radius:14px;background:var(--accent-soft);min-width:0}
.explorer-analysis-summary span,.explorer-analysis-summary small{font-size:12px;line-height:1.5;color:var(--muted)}
.explorer-analysis-summary strong{font-size:30px;letter-spacing:-.8px;line-height:1.25;color:var(--ink);font-variant-numeric:tabular-nums}
.explorer-analysis-summary strong small{font-size:20px}
.explorer-joint-table{width:100%;min-width:0;margin-top:18px}
.explorer-joint-table table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:13px}
.explorer-joint-table th,.explorer-joint-table td{text-align:center;vertical-align:middle;padding:13px 6px;border-bottom:1px solid var(--line);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.explorer-joint-table thead th{font-size:12px;line-height:1.6;color:var(--muted);font-weight:550;background:var(--surface-subtle)}
.explorer-joint-table tbody th{color:var(--accent);font-weight:750}
.explorer-match-heading{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:10px;margin-top:28px}
.explorer-match-heading h3{font-size:17px}
.explorer-match-heading>span{font-size:12px;color:var(--muted);white-space:nowrap}
.explorer-matches{gap:0}
.explorer-matches>li{border-top:1px solid var(--line);min-width:0}
.explorer-matches a{display:grid;grid-template-columns:minmax(140px,.7fr) minmax(0,1fr) 18px;align-items:center;gap:16px;padding:18px 0;min-width:0}
.explorer-match-date{display:flex;flex-direction:column;gap:6px;font-size:13px;line-height:1.5;color:var(--muted)}
.explorer-match-date strong{color:var(--ink);font-size:12px;line-height:1.5;font-weight:650}
.explorer-match-balls{display:flex;align-items:center;gap:5px;flex-wrap:wrap;min-width:0}
.explorer-match-balls .explorer-number-badge{width:30px;height:30px;flex-basis:30px;font-size:13px;background:var(--surface-subtle);color:var(--muted);border:1px solid var(--line)}
.explorer-match-balls .explorer-number-badge.is-hit{background:var(--accent-soft);color:var(--accent);border-color:var(--accent-border)}
.explorer-match-balls .stats-star{width:34px;height:34px;min-width:34px;flex-basis:34px;font-size:12px}
.explorer-matches .icon{width:18px;height:18px;color:var(--muted)}
.explorer-calendar>.explorer-details{padding:0 var(--card-padding)}
.explorer-details>summary{padding:22px 0;min-height:80px}
.explorer-details>summary>span{display:flex;flex-direction:column;gap:5px;min-width:0}
.explorer-details>summary strong{font-size:18px;line-height:1.4;letter-spacing:-.3px}
.explorer-details>summary small{font-size:12px;line-height:1.6;font-weight:450;color:var(--muted)}
.explorer-details-body{padding:6px 0 24px;min-width:0}
.explorer-details-body .calendar-statistics{margin:0}
.explorer-details-body .calendar-stats-heading{margin:0 0 20px}
.explorer-details-body .calendar-stats-heading h2{font-size:22px}
.explorer-details-body .calendar-stat-card{box-shadow:none;padding:20px}
.explorer-details-body .calendar-stats-grid{grid-template-columns:minmax(0,1fr)}
@media(min-width:700px){.explorer-details-body .calendar-stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:759px){
 .explorer-group-columns{grid-template-columns:minmax(0,1fr);gap:24px}
 .explorer-number-row{grid-template-columns:36px minmax(0,1fr) minmax(100px,.8fr);gap:10px 14px;padding:14px}
 .explorer-number-row>.explorer-number-badge{grid-row:1/3;align-self:start;margin-top:1px}
 .explorer-number-frequency{grid-column:2;grid-row:1}
 .explorer-number-date{grid-column:2;grid-row:2}
 .explorer-number-absence{grid-column:3;grid-row:1/3;align-self:center}
 .explorer-number-date small{display:none}
 .explorer-matches a{grid-template-columns:minmax(0,1fr) 18px;gap:12px;padding:18px 0}
 .explorer-match-date{grid-column:1;flex-direction:row;justify-content:space-between;align-items:baseline;gap:12px;flex-wrap:wrap}
 .explorer-match-balls{grid-column:1;grid-row:2}
 .explorer-matches .icon{grid-column:2;grid-row:1/3}
}
@media(max-width:479px){
 .statistics-explorer{gap:20px}
 .explorer-heading{gap:12px;margin-bottom:18px}
 .explorer-heading .soft-icon{display:none}
 .explorer-heading .section-kicker{font-size:10px;letter-spacing:1.1px}
 .explorer-period-form{gap:12px}
 .explorer-period-form .explorer-period-label{flex-basis:100%}
 .explorer-custom-dates{flex-basis:100%;gap:10px}
 .explorer-period-form>.button{width:100%}
 .explorer-coverage{gap:8px 14px}
 .explorer-coverage>span{flex-basis:100%}
 .explorer-sort-form{width:100%;flex-wrap:wrap}
 .explorer-sort-form label{flex:1;min-width:130px}
 .explorer-sort-form .button{padding:11px 13px}
 .explorer-number-row{grid-template-columns:32px minmax(0,1fr) minmax(75px,.7fr);gap:8px 10px;padding:12px}
 .explorer-number-badge{width:32px;height:32px;flex-basis:32px;font-size:16px}
 .explorer-number-row>.stats-star{width:34px;height:34px;min-width:34px;font-size:13px}
 .explorer-number-frequency>span{font-size:12px}
 .explorer-number-date b{font-size:12px}
 .explorer-number-absence small{max-width:85px}
 .explorer-group-columns{gap:22px}
 .explorer-combo-list>li{gap:8px;padding:11px}
 .explorer-combo-balls{gap:4px}
 .explorer-combo-balls .explorer-number-badge{width:28px;height:28px;flex-basis:28px;font-size:13px}
 .explorer-combo-count strong{font-size:14px}
 .explorer-combo-percent{min-width:38px}
 .explorer-mini-metrics{gap:8px}
 .explorer-mini-metrics>div{padding:12px}
 .explorer-mini-metrics dd{font-size:22px}
 .explorer-pick-inputs{gap:7px}
 .explorer-pick-inputs input{min-height:48px;font-size:19px;border-radius:10px}
 .explorer-pick-actions>.button{width:100%}
 .explorer-analysis-summary{gap:10px}
 .explorer-analysis-summary>div{padding:14px}
 .explorer-analysis-summary strong{font-size:26px}
 .explorer-match-date{font-size:12px}
 .explorer-match-date strong{font-size:12px}
 .explorer-details-body .calendar-stat-card{padding:16px}
 .explorer-details-body .calendar-stats-heading h2{font-size:20px}
}
@media(prefers-reduced-motion:reduce){.explorer-inner-details>summary:after,.explorer-details>summary:after{transition:none}}
@media(max-width:380px){
 .explorer-pick-inputs{grid-template-columns:repeat(3,minmax(0,1fr))}
 .explorer-star-inputs .explorer-pick-inputs{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Native anchors become compact panels when JavaScript is available. */
.statistics-explorer [hidden]{display:none!important}
.explorer-section-nav a[aria-current="location"]{background:var(--accent-soft);color:var(--accent);border-color:var(--accent-border)}
.explorer-section-nav{position:sticky;top:0;z-index:25;padding:10px 2px;background:var(--canvas)}
.statistics-explorer>section[id]{scroll-margin-top:150px}
@media(min-width:1101px){.admin-bar .explorer-section-nav{top:32px}}
@media(max-width:1100px){.explorer-section-nav{top:76px}}
@media(max-width:600px){.explorer-section-nav{top:72px}}
@media(min-width:601px) and (max-width:782px){.admin-bar .explorer-section-nav{top:122px}}
@media(min-width:783px) and (max-width:1100px){.admin-bar .explorer-section-nav{top:108px}}
