/* Reading Insights 0.18.1 mobile/responsive polish. Design System v1.1 consumer layer. */
.rs-statistics,.rs-statistics>*{min-width:0;max-width:100%}
.rs-statistics img,.rs-statistics svg{max-width:100%}
.rs-statistics h1,.rs-statistics h2,.rs-statistics h3,.rs-statistics p,.rs-statistics strong,.rs-statistics span,.rs-statistics small{overflow-wrap:anywhere}
.rs-statistics .section-head>*,.rs-statistics .card-head>*,.rs-statistics .overview-feature-head>*,.rs-statistics .drilldown-head>*,.rs-statistics .drilldown-subhead>*,.rs-statistics .overview-community>header>*{min-width:0}
.rs-statistics .rating-distribution>a{display:grid;grid-template-rows:18px 130px 16px 15px;gap:2px;align-items:end;min-width:0;text-align:center;color:var(--rs-text-muted);font-size:9px;text-decoration:none;border-radius:6px}
.rs-statistics .rating-distribution>a:hover i,.rs-statistics .rating-distribution>a:focus-visible i{filter:brightness(1.25);transform:translateY(-2px)}
.rs-statistics .rating-distribution i{transition:filter .14s ease,transform .14s ease}
.rs-statistics .overview-rating-bars>a{display:grid;grid-template-rows:76px 15px;gap:3px;align-items:end;min-width:0;text-align:center;color:inherit;text-decoration:none;border-radius:5px}
.rs-statistics .overview-rating-bars>a:hover i,.rs-statistics .overview-rating-bars>a:focus-visible i{filter:brightness(1.25);transform:translateY(-2px)}
.rs-statistics .overview-rating-bars>a i{transition:filter .14s ease,transform .14s ease}
.rs-statistics .rating-books-drilldown{margin:22px 0;padding:24px;border:1px solid rgba(214,168,75,.20);border-radius:14px;background:linear-gradient(145deg,rgba(214,168,75,.055),rgba(255,255,255,.012));box-shadow:inset 3px 0 0 rgba(214,168,75,.55);scroll-margin-top:22px}
.rs-statistics .drilldown-book-grid .rs-media-card{grid-template-columns:54px minmax(0,1fr);padding:10px;background:rgba(255,255,255,.012)}
.rs-statistics .drilldown-book-grid .rs-media-card__media{width:54px}
.rs-statistics .drilldown-book-grid .rs-rating{margin-top:2px}
.rs-statistics .history-book-main .rs-rating{margin-top:5px}
.rs-statistics .drilldown-pagination a{min-width:44px;min-height:44px;height:44px}
@media(pointer:coarse){
 .rs-statistics .overview-deep-link,.rs-statistics .history-close,.rs-statistics .drilldown-head>a,.rs-statistics .drilldown-subhead>a{min-height:44px;display:inline-flex;align-items:center}
 .rs-statistics .semantic-tags a{min-height:44px;padding-inline:12px}
}
@media(max-width:760px){
 .rs-statistics{width:100%;overflow-x:clip}
 .rs-statistics .rs-hero{min-height:210px;padding:28px 20px}.rs-statistics .rs-hero h1{font-size:clamp(30px,10vw,38px)}.rs-statistics .rs-hero p{font-size:15px}
 .rs-statistics .product-nav{max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch;scrollbar-width:thin}
 .rs-statistics .product-nav a{flex:0 0 auto;min-height:44px;display:inline-flex;align-items:center}
 .rs-statistics .section-head{gap:12px}.rs-statistics .section-head p{margin:0}
 .rs-statistics .card-head{align-items:flex-start;flex-direction:column;gap:7px}.rs-statistics .card-head small{text-align:left}
 .rs-statistics .overview-community>header{align-items:flex-start;flex-direction:column;gap:8px}
 .rs-statistics .overview-depth{gap:8px}
 .rs-statistics .reader-facts{grid-template-columns:1fr 1fr}.rs-statistics .reader-facts span:last-child{grid-column:1/-1}
 .rs-statistics .dna-row{grid-template-columns:minmax(0,1fr)}.rs-statistics .dna-row>i{margin-top:3px}
 .rs-statistics .taste-row{grid-template-columns:minmax(0,1fr) 42px}.rs-statistics .taste-row>i{grid-column:1/-1;grid-row:auto}
 .rs-statistics .genre-row{grid-template-columns:minmax(0,1fr) 48px;gap:8px}.rs-statistics .genre-track{grid-column:1/-1;grid-row:2}.rs-statistics .genre-change{grid-column:2;grid-row:1}.rs-statistics .genre-name span{white-space:normal}
 .rs-statistics .foundation span{align-items:flex-start;flex-direction:column;gap:3px}
 .rs-statistics .history-book-main{min-width:0}.rs-statistics .history-book-main a{overflow-wrap:anywhere}
 .rs-statistics .history-year-form{flex-wrap:wrap}.rs-statistics .history-save-state{min-width:0}
 .rs-statistics .drilldown-subhead{align-items:flex-start;flex-direction:column;gap:6px}
 .rs-statistics .concept-drilldown,.rs-statistics .publication-drilldown,.rs-statistics .rating-books-drilldown{padding:17px}
 .rs-statistics .drilldown-head h2{font-size:22px}
 .rs-statistics .drilldown-book-grid .rs-media-card{grid-template-columns:64px minmax(0,1fr)}.rs-statistics .drilldown-book-grid .rs-media-card__media{width:64px}
 /* Dense timelines preserve chronology with an intentional touch-scroll viewport. */
 .rs-statistics .timeline-bars,.rs-statistics .overview-timeline,.rs-statistics .concept-timeline-bars,.rs-statistics .publication-bars{overflow-x:auto;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch;scrollbar-width:thin}
 .rs-statistics .timeline-bars>a,.rs-statistics .overview-timeline>a,.rs-statistics .concept-timeline-bars>a,.rs-statistics .publication-bars>a{flex:0 0 32px;min-width:32px}
 .rs-statistics .rating-distribution,.rs-statistics .overview-rating-bars{display:flex;overflow-x:auto;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch;scrollbar-width:thin}
 .rs-statistics .rating-distribution>a{flex:0 0 44px;grid-template-rows:90px 16px 14px;min-height:124px}
 .rs-statistics .overview-rating-bars>a{flex:0 0 44px;grid-template-rows:76px 15px;min-height:96px}
}
@media(max-width:520px){
 .rs-statistics .overview-kpis,.rs-statistics .reading-snapshot,.rs-statistics .overview-community-metrics{grid-template-columns:1fr}
 .rs-statistics .overview-kpis article,.rs-statistics .reading-snapshot article{min-height:0}
 .rs-statistics .metrics{grid-template-columns:1fr}
 .rs-statistics .reader-facts{grid-template-columns:1fr}.rs-statistics .reader-facts span:last-child{grid-column:auto}
 .rs-statistics .overview-rating-body{gap:14px}
 .rs-statistics .explore-card,.rs-statistics .genre-card{padding:17px}
 .rs-statistics .release-years .release-year>div{align-items:flex-start;flex-direction:column;gap:3px}.rs-statistics .release-years span{text-align:left}
 .rs-statistics .decade-landscape>a>span{align-items:flex-start;flex-direction:column;gap:2px}.rs-statistics .decade-landscape small{white-space:normal}
 .rs-statistics .history-book{grid-template-columns:22px 38px minmax(0,1fr)}
 .rs-statistics .history-year-form,.rs-statistics .history-not-editable{grid-column:2/-1}
 .rs-statistics .history-bulk-form label{flex-wrap:wrap}
}
/* 0.18.2: primary product navigation must remain fully visible on narrow screens. */
@media(max-width:760px){
 .rs-statistics .product-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;overflow:visible;overscroll-behavior:auto}
 .rs-statistics .product-nav a{display:flex;justify-content:center;min-width:0;width:100%;min-height:48px;padding:10px 8px;text-align:center;white-space:normal;overflow-wrap:normal;word-break:normal;line-height:1.25}
}
@media(max-width:360px){
 .rs-statistics .product-nav{grid-template-columns:1fr}
}

/* 0.18.4 consolidated mobile audit: preserve meaning instead of desktop geometry. */
@media(max-width:760px){
 /* Bounded distributions belong in one viewport. */
 .rs-statistics .rating-distribution,.rs-statistics .overview-rating-bars{
   display:grid;grid-template-columns:repeat(10,minmax(0,1fr));overflow:visible;gap:3px;width:100%;
 }
 .rs-statistics .rating-distribution>a{display:grid;min-width:0;min-height:0;grid-template-rows:16px 70px 16px 14px;font-size:8px}
 .rs-statistics .overview-rating-bars>a{display:grid;min-width:0;min-height:0;grid-template-rows:68px 15px}
 .rs-statistics .rating-distribution>a,.rs-statistics .overview-rating-bars>a{touch-action:manipulation}

 /* Long reading histories stay complete but compact. First/last years remain explicit in the axis. */
 .rs-statistics .timeline-bars,.rs-statistics .overview-timeline,.rs-statistics .concept-timeline-bars{
   display:flex;overflow:visible;gap:2px;width:100%;max-width:100%;
 }
 .rs-statistics .timeline-bars>a,.rs-statistics .overview-timeline>a,.rs-statistics .concept-timeline-bars>a{
   flex:1 1 0;min-width:0;width:auto;
 }
 .rs-statistics .reading-time,.rs-statistics .concept-timeline{min-width:0;overflow:hidden}
 .rs-statistics .reading-time{padding-bottom:2px}
 .rs-statistics .timeline-bars{height:112px}
 .rs-statistics .overview-timeline{height:92px;margin-top:14px}
 .rs-statistics .concept-timeline-bars{height:118px}
 .rs-statistics .reading-time p,.rs-statistics .concept-timeline p{max-width:100%;overflow-wrap:anywhere}

 /* Recent publication years are a bounded comparison, not a horizontal scroller. */
 .rs-statistics .publication-bars{display:flex;overflow:visible;gap:4px;width:100%;max-width:100%}
 .rs-statistics .publication-bars>a{flex:1 1 0;min-width:0;width:auto;grid-template-rows:104px 17px}
 .rs-statistics .publication-years{min-width:0;overflow:hidden}

 /* Taste signals: keep value, meter and evidence together with less vertical travel. */
 .rs-statistics .taste-row{grid-template-columns:minmax(0,1fr) auto;gap:7px 12px;padding-top:12px;padding-bottom:12px;align-items:center}
 .rs-statistics .taste-row>div:first-child{grid-column:1/-1}
 .rs-statistics .taste-row .taste-meter{grid-column:1;grid-row:2;width:100%;min-width:0}
 .rs-statistics .taste-row>span{grid-column:2;grid-row:2;align-self:center;white-space:nowrap}

 /* Drilldowns should reach evidence quickly on small screens. */
 .rs-statistics .concept-drilldown,.rs-statistics .publication-drilldown,.rs-statistics .rating-books-drilldown{padding:15px}
 .rs-statistics .drilldown-head{position:relative;gap:8px}
 .rs-statistics .drilldown-head>div{padding-right:58px}
 .rs-statistics .drilldown-head>a{position:absolute;right:0;top:0;justify-content:center;min-width:44px;padding:0 8px;border:1px solid rgba(145,195,239,.12);border-radius:9px;background:rgba(255,255,255,.025)}
 .rs-statistics .drilldown-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .rs-statistics .drilldown-kpis article{min-height:0;padding:13px}

 /* Catalog scale is a compact metric group on mobile, not four full-width cards. */
 .rs-statistics .metrics,.rs-statistics .overview-community-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .rs-statistics .metrics article,.rs-statistics .overview-community-metrics span{min-width:0;padding:14px}
 .rs-statistics .metrics strong,.rs-statistics .overview-community-metrics strong{font-size:21px}
 .rs-statistics .catalog-composition{grid-column:1/-1}
}
@media(max-width:420px){
 .rs-statistics .rating-distribution,.rs-statistics .overview-rating-bars{gap:2px}
 .rs-statistics .rating-distribution>a{grid-template-rows:15px 64px 15px 13px}
 .rs-statistics .rating-distribution span,.rs-statistics .rating-distribution small,.rs-statistics .overview-rating-bars b{font-size:7px}
 .rs-statistics .drilldown-kpis{grid-template-columns:1fr 1fr}
}

/* 0.19.0: intermediate-width reading territories keep labels readable before bars. */
@media(max-width:980px) and (min-width:761px){
 .rs-statistics .dna-row{grid-template-columns:minmax(190px,.8fr) minmax(180px,1.2fr)}
 .rs-statistics .dna-row>div{min-width:0;grid-template-columns:minmax(120px,1fr) minmax(92px,auto)}.rs-statistics .dna-row>div>span{display:flex;flex-wrap:wrap;gap:5px 7px;align-items:center;overflow-wrap:normal;word-break:normal}.rs-statistics .dna-row small{white-space:nowrap;overflow-wrap:normal;word-break:normal}
}
@media(max-width:760px){
 .rs-statistics .catalog-books-metric .catalog-composition-text{font-size:9px;white-space:normal}
 .rs-statistics .catalog-books-metric .catalog-composition-share{font-size:9px}
}

/* 0.19.4: bounded year charts share available mobile width instead of overlapping. */
@media(max-width:760px){
 .rs-statistics .publication-bars{display:grid;grid-template-columns:repeat(var(--publication-columns,21),minmax(0,1fr));gap:2px;overflow:visible;width:100%;max-width:100%}
 .rs-statistics .publication-bars>a{display:grid;width:100%;min-width:0;max-width:100%;grid-template-rows:104px 17px}
 .rs-statistics .publication-bars>a i{width:100%;min-width:0;max-width:100%;box-shadow:none}
}
