/* Keep iOS text inflation from enlarging individual blocks independently of
   their layout. Browser zoom and the rem-based reading preferences still work. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
.spark{display:inline-flex;width:18px;height:18px;flex:0 0 18px;align-items:center;justify-content:center;color:var(--accent)}
.spark svg{display:block;width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.25;stroke-linecap:round}

/* A phone gets one full-width story at a time. No absolute text overlays,
   fixed card heights, or hidden headline lines: longer text grows the card. */
@media(max-width:760px){
 html[data-reader-theme] #featured.feature-grid{display:block;grid-template-columns:none;grid-template-rows:none}
 html[data-reader-theme] #featured .feature-card{display:flex;flex-direction:column;grid-row:auto;grid-column:auto;height:auto;min-width:0;margin-bottom:20px;background:var(--panel);color:var(--text)}
 html[data-reader-theme] #featured .feature-card:last-child{margin-bottom:0}
 html[data-reader-theme] #featured .feature-card:after{display:none}
 html[data-reader-theme] #featured .feature-card>img{display:block;position:static;inset:auto;width:100%;height:210px;z-index:auto;transform:none}
 html[data-reader-theme] #featured .feature-topline{position:static;inset:auto;order:-1;display:flex;flex-wrap:wrap;gap:12px;padding:14px 18px;min-height:60px}
 html[data-reader-theme] #featured .feature-topline .tag{max-width:calc(100% - 48px);font-size:.65rem;line-height:1.5;letter-spacing:.06em}
 html[data-reader-theme] #featured .feature-topline .bookmark{position:static!important;min-width:36px;min-height:36px;margin-left:auto;flex-shrink:0}
 html[data-reader-theme] #featured .feature-copy{position:static;inset:auto;display:block;flex:none;min-width:0;padding:18px}
 html[data-reader-theme] #featured .feature-card h3{display:block;max-width:none;max-height:none;font-size:1.375rem;line-height:1.35;letter-spacing:-.02em;margin:0 0 14px;overflow:visible;-webkit-line-clamp:unset}
 html[data-reader-theme] #featured .story-heading-text{display:block;overflow:visible;-webkit-line-clamp:unset}
 html[data-reader-theme] #featured .feature-summary{display:block;font-size:.875rem;line-height:1.7;color:var(--text);overflow:visible;-webkit-line-clamp:unset}
 html[data-reader-theme] #featured .feature-copy .meta{font-size:.75rem;line-height:1.6;gap:6px}
 html[data-reader-theme] #featured .feature-copy .meta time{display:inline;flex-basis:auto}
 html[data-reader-theme] #featured .feature-copy .reuse-credit{font-size:.7rem;line-height:1.6}
 html[data-reader-theme] #featured .visual-credit-details summary{font-size:.75rem;line-height:1.6}
 /* Explicit widths and legacy vh fallbacks also cover older dialog sizing. */
 dialog{width:calc(100% - 24px);max-width:670px;min-width:0;max-height:88vh;max-height:88dvh;overflow-y:auto;-webkit-overflow-scrolling:touch}
 #story-dialog{width:calc(100% - 24px);max-width:670px}
 #story-content,.dialog-body,.editorial-context,.context-section,.source-passages{min-width:0;max-width:100%}
 #story-dialog .dialog-body{padding:22px 18px;text-align:left}
 #story-dialog .dialog-body h2{font-size:1.625rem;line-height:1.3;letter-spacing:-.025em}
 #story-dialog .editorial-context{padding:20px 14px}
 #story-dialog p,#story-dialog h2,#story-dialog h3,#story-dialog h4,#story-dialog a,#story-dialog blockquote{word-wrap:break-word;overflow-wrap:break-word;overflow-wrap:anywhere}
 #story-dialog .dialog-actions .button{white-space:normal;text-align:left;min-height:44px;padding-block:12px}
 .reading-options-dialog{max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
 #light-second-dialog{max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px)}
}
