/* Gadget Rumours — modernisation layer (2026-11-26). Loads last, after gr-site.css. */

/* Native form controls, scrollbars and UA colours follow the chosen theme. */
:root:where([data-theme="dark"]){color-scheme:dark}
:root:where([data-theme="light"]){color-scheme:light}

/* Smooth page background: a soft vertical gradient between the two surface tokens (no grain/noise). */
body{background-image:linear-gradient(180deg,var(--gr-surface) 0%,var(--gr-surface-hi) 100%)!important;background-attachment:fixed!important}

/* Ad wrappers only (never the Google iframes): a quiet frame so auto ads sit calmly on the dark surface. */
:where(html[data-theme="dark"]) .google-auto-placed{background:var(--gr-surface-hi);border-radius:14px;box-shadow:0 0 0 1px var(--gr-edge)}

/* Colour theme toggle in the header. */
.gr-theme-toggle{display:inline-grid;place-items:center;inline-size:40px;block-size:40px;padding:0;border:1px solid var(--gr-edge);border-radius:50%;background:transparent;color:var(--gr-heading);cursor:pointer;flex:none;transition:background-color .2s,border-color .2s,transform .2s}
.gr-theme-toggle:hover{background:var(--gr-signal-lo);border-color:var(--gr-signal)}
.gr-theme-toggle:focus-visible{outline:2px solid var(--gr-signal);outline-offset:3px}
.gr-theme-toggle:active{transform:scale(.92)}
.gr-theme-toggle svg{display:block}
.gr-theme-toggle .gr-i-sun,:where(html[data-theme="dark"]) .gr-theme-toggle .gr-i-moon{display:none}
:where(html[data-theme="dark"]) .gr-theme-toggle .gr-i-sun{display:block}
@media (max-width:781px){.gr-theme-toggle{inline-size:44px;block-size:44px}}

/* Modern typography: balanced headlines, nicer paragraph rag. */
:where(h1,h2,h3,.wp-block-post-title){text-wrap:balance}
:where(.gr-prose,.wp-block-post-content,.gr-page__head) p{text-wrap:pretty}

/* Bigger tap targets on phones. Vertical padding on inline links grows the hit area without moving the layout. */
@media (max-width:781px){
  .wp-block-post-terms a,.gr-chips a,.gr-links a,.gr-legal a,.custom-breadcrumbs a{padding-block:6px}
  .wp-block-query-pagination :is(a,span.page-numbers){min-inline-size:44px;min-block-size:44px;display:inline-grid;place-items:center}
}

/* Cross-document view transitions: thumbnails morph into the article hero (names are set in functions.php). */
@view-transition{navigation:auto}
::view-transition-old(root),::view-transition-new(root){animation-duration:.22s}
@media (prefers-reduced-motion:reduce){@view-transition{navigation:none}}

/* Reading progress bar: already provided in gr-site.css (.single-post .gr-header__bar::after, CSS view timeline
   "--gr-reading", reduced-motion aware), so it is not duplicated here. */
