/*
Theme Name: Gamedev.js
Theme URI: https://gamedevjs.com
Author: Gamedev.js
Description: Lightweight, fast, SEO-friendly theme for Gamedev.js. Light by default, with dark and automatic color schemes and a visitor toggle. One small stylesheet, one 22 KB heading font, no dependencies, and JavaScript only for the color toggle and the 404 mini game. Visual style based on the Gamedev.js news banners.
Version: 1.3.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gamedevjs
*/

/* Design rules: flat surfaces and hard offset shadows only; no glows, glass, gradient text or side stripes.
   Spatial motion (lifts, smooth scrolling, page transitions) only inside prefers-reduced-motion: no-preference. */

/* Headings use Lato Black (SIL OFL, one 22 KB file in assets/fonts) to echo the banners; everything else is the system font.
   While it loads, headings use Arial Bold scaled to Lato's metrics so the swap does not move the layout. */
@font-face {
  font-family: "Gamedev Heading";
  src: url("assets/fonts/lato-black-latin.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Gamedev Heading Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("Arimo Bold");
  font-weight: 900;
  size-adjust: 94.5%;
  ascent-override: 104.4%;
  descent-override: 22.5%;
  line-gap-override: 0%;
}

/* Light is the default. Customizer > Color scheme sets data-scheme="auto" (follow the device) or "dark" on <html>. */
:root {
  color-scheme: light;
  --c1: #00d3fa;
  --c2: #0560f0;
  --c3: #2a2fe6;
  --ink: #04123f;
  --accent: #ffd23f;
  --bg: light-dark(#eef3fd, #060b2c);
  --card: light-dark(#fff, #0e1747);
  --card2: light-dark(#e3ebff, #172266);
  --line: light-dark(rgb(10 30 110 / .14), rgb(140 170 255 / .16));
  --text: light-dark(#14224f, #e9edff);
  --muted: light-dark(#4a5886, #a8b3e8);
  --head: light-dark(#04123f, #fff);
  --link: light-dark(#0557d6, #00d3fa);
  --link-hover: light-dark(#2a2fe6, #fff);
  --header-bg: light-dark(#fff, #060b2c);
  --code-bg: light-dark(rgb(5 96 240 / .09), rgb(255 255 255 / .1));
  --field-line: light-dark(#6d7ba8, #5f70c4);
  --focus: light-dark(#0560f0, #ffd23f);
  --bad: light-dark(#b3001b, #ff8a9b);
  --logo-ink: light-dark(#070808, #fff);
  --shade: light-dark(rgb(4 18 63 / .16), rgb(0 0 0 / .55));
  --grad: linear-gradient(120deg, #0a98e8 0%, #0985ec 45%, #0560f0 72%, #2a2fe6 100%);
  --radius: .875rem;
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Gamedev Heading", "Gamedev Heading Fallback", var(--font);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  accent-color: var(--c2);
}
:root[data-scheme="auto"] { color-scheme: light dark; }
:root[data-scheme="dark"] { color-scheme: dark; }
@media (prefers-contrast: more) { :root { --line: light-dark(#4a5886, #8ea0ee); } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; font: 400 1.0625rem/1.7 var(--font); color: var(--text); background: var(--bg); overflow-wrap: break-word; }
.admin-bar { min-height: calc(100vh - 32px); min-height: calc(100dvh - 32px); }
@media (max-width: 782px) { .admin-bar { min-height: calc(100vh - 46px); min-height: calc(100dvh - 46px); } }
img, video, iframe, svg { max-inline-size: 100%; }
img, video { block-size: auto; }
h1, h2, h3, h4, h5, h6 { text-wrap: balance; }
p, li, blockquote, figcaption { text-wrap: pretty; }
a { color: var(--link); text-underline-offset: .18em; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
::selection { background: light-dark(#bcd6ff, #2a4fd0); color: light-dark(#04123f, #fff); }

.screen-reader-text, .skip-link:not(:focus) { position: absolute !important; inline-size: 1px; block-size: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; inset-block-start: .5rem; inset-inline-start: .5rem; z-index: 100; padding: .6em 1em; background: var(--accent); color: var(--ink); border-radius: .5rem; font-weight: 800; }
.admin-bar .skip-link:focus { inset-block-start: 2.5rem; }

.wrap { inline-size: min(70rem, 100% - 2rem); margin-inline: auto; }

/* Header: logo, primary nav, search and the light/dark toggle.
   Below the desktop breakpoint, browsers with the Popover API move the nav and search into a sheet opened by the Menu button (no JavaScript needed); the rest keep the two-row layout. */
.site-header { background: var(--header-bg); border-block-end: 1px solid var(--line); }
.bar { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1.25rem; padding-block: .6rem; }
.brand { display: block; padding-block: .25rem; color: var(--logo-ink); text-decoration: none; }
.brand:hover { color: var(--logo-ink); }
.brand .logo { display: block; inline-size: clamp(9.5rem, 20vw, 13.125rem); block-size: auto; }
.custom-logo-link { display: block; line-height: 0; }
.custom-logo { display: block; inline-size: auto; max-block-size: 2.75rem; }
.menu-panel { display: contents; color: inherit; }
.menu-head, .menu-button { display: none; }
.main-nav { order: 3; flex: 1 0 100%; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.main-nav a { display: block; padding-block: .5rem; border-block-end: 3px solid transparent; color: var(--text); text-decoration: none; font-weight: 700; font-size: .95rem; line-height: 1.4; }
.main-nav a:hover, .main-nav a[aria-current], .main-nav :is(.current-menu-item, .current-cat, .current_page_item) > a { border-block-end-color: var(--link); }
.header-search { order: 2; margin-inline-start: auto; }
.header-search .search-form { max-inline-size: 14rem; }
.header-search :is(input[type="search"], button) { min-block-size: 2.25rem; padding-block: .25rem; }

/* Light/dark toggle: shown once the inline script in the head marks the page as scripted. The icon shows the current scheme. */
.scheme-toggle { order: 2; display: none; flex: none; inline-size: 2.75rem; padding: 0; color: var(--text); background: transparent; border-color: var(--field-line); box-shadow: none; }
.js .scheme-toggle { display: inline-flex; }
.scheme-toggle:hover { color: var(--text); background: var(--card2); }
.scheme-toggle:active { box-shadow: none; }
:is(.scheme-toggle, .menu-button, .menu-close) svg { flex: none; display: block; inline-size: 1.375rem; block-size: 1.375rem; }
.scheme-toggle .i-moon, :root[data-scheme="dark"] .scheme-toggle .i-sun { display: none; }
:root[data-scheme="dark"] .scheme-toggle .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root[data-scheme="auto"] .scheme-toggle .i-sun { display: none; }
  :root[data-scheme="auto"] .scheme-toggle .i-moon { display: block; }
}

@media (max-width: 599px) {
  .bar { gap: .5rem .75rem; }
  .header-search { flex: 1 1 0; min-inline-size: 0; }
  .header-search .search-form { max-inline-size: none; }
  .main-nav ul { gap: .25rem 1rem; }
}

@media (min-width: 70em) {
  html { scroll-padding-block-start: 6rem; }
  .site-header { position: sticky; inset-block-start: 0; z-index: 50; }
  .admin-bar .site-header { inset-block-start: 32px; }
  .main-nav { order: 2; flex: 1 1 auto; margin-inline-start: auto; }
  .main-nav ul { justify-content: flex-end; }
  .header-search { order: 3; margin-inline-start: 0; }
  .scheme-toggle { order: 4; }
}

/* Compact header: logo, color toggle and Menu button in one row; the nav and search open as a sheet over the header.
   It is a non-modal popover (Esc or a tap outside closes it, focus is not trapped). While it is open the page behind ignores pointer input, so a tap outside only closes it instead of also following a link underneath. */
@supports selector(:popover-open) {
  @media (width < 70em) {
    body:has(.menu-panel:popover-open) { pointer-events: none; }
    .bar { flex-wrap: nowrap; gap: .5rem; padding-block: .5rem; }
    .brand { margin-inline-end: auto; }
    .scheme-toggle { order: 0; }
    .menu-button { flex: none; display: inline-flex; padding-inline: 1rem; }
    .menu-panel { display: none; position: fixed; inset: 0 0 auto; inline-size: auto; block-size: auto; max-block-size: 100dvh; margin: 0; padding: 0 1rem 1.25rem; overflow-y: auto; overscroll-behavior: contain; pointer-events: auto; color: var(--text); background: var(--header-bg); border: 0; border-block-end: 1px solid var(--line); border-end-start-radius: var(--radius); border-end-end-radius: var(--radius); box-shadow: 0 .375rem 0 var(--shade); }
    .menu-panel:popover-open { display: block; }
    .menu-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-block-size: 3.75rem; }
    .menu-label { font: 900 1rem/1.4 var(--font-head); text-transform: uppercase; letter-spacing: .05em; color: var(--head); }
    .menu-close { flex: none; inline-size: 2.75rem; padding: 0; }
    .main-nav ul { flex-direction: column; flex-wrap: nowrap; gap: .25rem; }
    .main-nav a { padding: .75rem 1rem; border: 0; border-radius: .625rem; font-size: 1.125rem; }
    .main-nav a:hover, .main-nav a[aria-current], .main-nav :is(.current-menu-item, .current-cat, .current_page_item) > a { background: var(--card2); }
    .main-nav a[aria-current], .main-nav :is(.current-menu-item, .current-cat, .current_page_item) > a { color: var(--link); }
    .header-search { margin: .75rem 0 0; padding-block-start: 1rem; border-block-start: 1px solid var(--line); }
    .header-search .search-form { max-inline-size: none; }
    .header-search :is(input[type="search"], button) { min-block-size: 2.75rem; }
    @media (max-width: 21.5rem) {
      .menu-button { inline-size: 2.75rem; padding-inline: 0; }
      .menu-button-label { position: absolute; inline-size: 1px; block-size: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    }
    @media (prefers-reduced-motion: no-preference) {
      .menu-panel { opacity: 1; translate: 0 0; transition: opacity .2s ease-out, translate .2s ease-out, display .2s allow-discrete, overlay .2s allow-discrete; }
      .menu-panel:not(:popover-open) { opacity: 0; translate: 0 -.75rem; }
      @starting-style {
        .menu-panel:popover-open { opacity: 0; translate: 0 -.75rem; }
      }
    }
    @media (forced-colors: active) {
      .main-nav a { border: 2px solid Canvas; }
      .main-nav a:hover, .main-nav a[aria-current], .main-nav :is(.current-menu-item, .current-cat, .current_page_item) > a { border-color: Highlight; }
    }
  }
}

/* Hero: the pattern sits right of the text column (or along the bottom edge on small screens), never behind text, so contrast stays above AA.
   For the same reason the gradient only turns deep blue past --lit: just after the text column on wide screens, just before the pad on narrow ones. */
.hero { --focus: var(--ink); --text-col: 34rem; --pad: clamp(7rem, 20vw, 13rem); --lit: min(calc(100% - .866 * (var(--pad) + 2rem)), calc(.866 * (max(1rem, (100vw - 70rem) / 2) + var(--text-col)) + 7.5rem)); position: relative; isolation: isolate; overflow: hidden; background-color: #0985ec; background-image: linear-gradient(120deg, #0a98e8, #0985ec var(--lit), #0560f0 calc(var(--lit) + (100% - var(--lit)) / 2), #2a2fe6); }
@supports (mask-image: linear-gradient(#000, #000)) {
  .hero::before { content: ""; position: absolute; inset-block: auto 0; inset-inline: 0; z-index: -1; block-size: 2.5rem; pointer-events: none; background: url("assets/facets-1x.png") right bottom / 15rem; background-image: image-set(url("assets/facets-1x.png") 1x, url("assets/facets.png") 2x); mask-image: linear-gradient(0deg, #000, transparent); }
}
.hero .wrap { position: relative; padding-block: clamp(1.75rem, 5vw, 3.25rem) calc(clamp(1.75rem, 5vw, 3.25rem) + 1.25rem); }
.hero h1 { max-inline-size: var(--text-col); margin: 0 0 .35rem; font-family: var(--font-head); font-weight: 900; text-transform: uppercase; line-height: 1; letter-spacing: -.01em; font-size: clamp(2rem, 1.2rem + 4vw, 3.75rem); color: #fff; text-shadow: 0 4px 0 rgb(4 18 63 / .28); }
.hero p { max-inline-size: var(--text-col); margin: 0; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; font-size: clamp(.875rem, .8rem + .5vw, 1.0625rem); color: var(--ink); }
.hero .desc, .hero .desc p { max-inline-size: 46ch; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--ink); }
.hero a, .hero a:hover { color: inherit; }
.hero a:hover { text-decoration-thickness: .125em; }
.hero .search-form { margin-block-start: 1rem; }
.hero .search-form button { background: var(--ink); box-shadow: 0 3px 0 rgb(4 18 63 / .4); }
.hero .search-form button:hover { background: #0c2475; }
.hero-pad { position: absolute; inset-inline-end: 0; inset-block-start: 50%; inline-size: var(--pad); transform: translateY(-50%) rotate(-8deg); color: #fff; filter: drop-shadow(0 .375rem 0 rgb(4 18 63 / .28)); }
.hero-pad svg { display: block; inline-size: 100%; block-size: auto; }
@media (min-width: 600px) {
  .hero .wrap { padding-inline-end: calc(var(--pad) + 1rem); }
}
@media (min-width: 900px) {
  .hero .wrap { padding-block: clamp(1.75rem, 5vw, 3.25rem); }
  @supports (mask-image: linear-gradient(#000, #000)) {
    .hero::before { inset-block: 0; inset-inline: auto 0; inline-size: calc(100% - max(1rem, (100% - 70rem) / 2) - var(--text-col)); block-size: auto; background-position: right top; background-size: 380px; mask-image: linear-gradient(90deg, transparent, #000 10rem); }
  }
}
@media (max-width: 599px) {
  .hero { background-image: linear-gradient(135deg, #0a98e8, #0985ec); }
  .hero-pad { display: none; }
}

/* Layout */
.layout { padding-block: 2rem 3.5rem; display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .layout.has-sidebar { grid-template-columns: minmax(0, 1fr) 18.75rem; align-items: start; } }
.page-heading { margin: 0 0 1.25rem; font-family: var(--font-head); font-size: 1.6rem; font-weight: 900; text-transform: uppercase; color: var(--head); }

/* Cards */
.grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr)); container-type: inline-size; }
.card { position: relative; display: flex; flex-direction: column; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s, box-shadow .2s; }
@media (hover: hover) {
  .card:hover { border-color: var(--link); box-shadow: 0 .25rem 0 var(--shade); }
  .card:hover .title a { text-decoration: underline; }
}
.card .thumb { display: block; aspect-ratio: 728 / 394; background: var(--grad); }
.card .thumb[aria-hidden] { background: url("assets/facets-1x.png") center / 15rem, var(--grad); background-image: image-set(url("assets/facets-1x.png") 1x, url("assets/facets.png") 2x), var(--grad); }
.card .thumb img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
.card .body { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; flex: 1; padding: 1rem 1.2rem 1.25rem; }
.card .title { margin: 0; font-family: var(--font-head); font-size: 1.2rem; line-height: 1.25; font-weight: 900; }
.card .title a { color: var(--head); text-decoration: none; }
.card .title a::after { content: ""; position: absolute; inset: 0; }
@supports selector(:has(a)) {
  .card .title a:focus-visible { outline: none; }
  .card:has(.title a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
}
.card .excerpt { color: var(--muted); font-size: .95rem; line-height: 1.55; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
.card .excerpt p { margin: 0; }
.card .meta { margin-block-start: auto; padding-block-start: .25rem; }
.chip { position: relative; z-index: 1; display: inline-block; padding-block: .25rem; color: var(--link); font-weight: 800; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; line-height: 1.5; }
.chip:hover { text-decoration: underline; }
.meta { color: var(--muted); font-size: .85rem; }
.meta a { color: inherit; }

.card.featured { grid-column: 1 / -1; }
.card.featured .body { gap: .65rem; padding: 1.4rem 1.6rem 1.7rem; }
.card.featured .title { font-size: clamp(1.5rem, 1rem + 2vw, 2.25rem); text-transform: uppercase; font-weight: 900; line-height: 1.08; }
.card.featured .excerpt { font-size: 1.05rem; -webkit-line-clamp: 6; line-clamp: 6; }
@container (min-width: 50rem) {
  .card.featured { flex-direction: row; }
  .card.featured .thumb { flex: 1 1 60%; aspect-ratio: auto; min-block-size: 17.5rem; }
  .card.featured .body { flex: 1 1 40%; justify-content: center; padding: 2rem; }
}

/* Single */
.layout > .narrow { inline-size: 100%; max-inline-size: 46rem; margin-inline: auto; }
#content:focus { outline: none; }
.article-head h1 { margin: .7rem 0 .5rem; font-family: var(--font-head); font-weight: 900; text-transform: uppercase; line-height: 1.06; font-size: clamp(1.75rem, 1rem + 3.5vw, 3rem); color: var(--head); overflow-wrap: anywhere; }
.featured-img { margin: 1.25rem 0 2rem; }
.featured-img img { display: block; inline-size: 100%; border: 1px solid var(--line); border-radius: var(--radius); }
.featured-img figcaption { margin-block-start: .6rem; }
.entry-content { font-size: 1.125rem; }
.entry-content > * { margin-block: 0 1.25em; }
.entry-content :is(h2, h3, h4) { margin-block-start: 2em; font-family: var(--font-head); line-height: 1.2; font-weight: 900; color: var(--head); }
.entry-content h2 { font-size: 1.75rem; }
.entry-content h3 { font-size: 1.4rem; }
.entry-content h4 { font-size: 1.15rem; }
.entry-content :is(ul, ol) { padding-inline-start: 1.4em; }
.entry-content li { margin: .3em 0; }
.entry-content img { border-radius: .75rem; }
.entry-content hr, .wp-block-separator { border: 0; block-size: 2px; background: var(--line); margin-block: 2em; }
.entry-content blockquote { margin-inline: 0; padding: 1rem 0; border-block: 2px solid var(--line); font-size: 1.2em; font-weight: 600; }
.entry-content blockquote > :first-child { margin-block-start: 0; }
.entry-content blockquote > :last-child { margin-block-end: 0; }
.entry-content code { font-family: var(--mono); background: var(--code-bg); padding: .1em .35em; border-radius: .375rem; font-size: .88em; }
.entry-content pre { color-scheme: dark; color: var(--text); overflow-x: auto; overscroll-behavior-x: contain; padding: 1rem 1.25rem; background: #030720; border: 1px solid var(--line); border-radius: .75rem; line-height: 1.5; font-size: .95rem; }
.entry-content pre code { background: none; padding: 0; font-size: inherit; }
.entry-content table { inline-size: 100%; border-collapse: collapse; display: block; overflow-x: auto; overscroll-behavior-x: contain; }
.entry-content :is(th, td) { padding: .5rem .75rem; border: 1px solid var(--line); text-align: start; vertical-align: top; }
.entry-content figure { margin-inline: 0; }
.entry-content iframe { border: 0; }
.entry-content iframe[src*="youtube"], .entry-content iframe[src*="youtu.be"], .entry-content iframe[src*="vimeo"], .wp-block-embed.is-type-video iframe { inline-size: 100%; aspect-ratio: 16 / 9; block-size: auto; border-radius: .75rem; }
.entry-content video { inline-size: 100%; border-radius: .75rem; }
.alignleft { float: left; margin: 0 1.25rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.25rem; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption { max-inline-size: 100%; }
.wp-caption-text, figcaption { color: var(--muted); font-size: .85rem; text-align: center; }
.entry-content form p { margin: 0 0 1rem; }
.entry-content label { display: block; font-weight: 700; margin-block-end: .25rem; }

/* Block compatibility without loading the block library CSS */
.wp-block-image { margin-inline: 0; }
.wp-block-columns { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.wp-block-column { flex: 1 1 15rem; min-inline-size: 0; }
.wp-block-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr)); gap: .75rem; list-style: none; padding: 0; }
.wp-block-gallery figure { margin: 0; }
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: .75rem; }

.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: 2rem 0 0; }
.tags a { padding: .2rem .75rem; border: 1px solid var(--field-line); border-radius: .5rem; color: var(--text); font-size: .85rem; text-decoration: none; }
.tags a:hover { border-color: var(--link); color: var(--link); }
.post-navigation { margin-block-start: 2rem; padding-block-start: 1.25rem; border-block-start: 1px solid var(--line); }
.post-navigation .nav-links { display: flex; justify-content: space-between; gap: 1.5rem; }
.post-navigation .nav-links > div { flex: 1 1 0; min-inline-size: 0; }
.post-navigation a { display: block; font-family: var(--font-head); font-weight: 900; line-height: 1.3; text-decoration: none; }
.post-navigation a:hover { text-decoration: underline; }
.post-navigation .meta { display: block; margin-block-end: .2rem; font-family: var(--font); font-weight: 800; }
.post-navigation .nav-next { text-align: end; }
.page-links { margin-block-start: 1.5rem; font-weight: 800; }
.section-title { margin: 3rem 0 1rem; font-family: var(--font-head); font-weight: 900; text-transform: uppercase; font-size: 1.4rem; color: var(--head); }

/* Pagination */
.pagination { margin-block-start: 2.5rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; }
.pagination .page-numbers { display: inline-grid; place-items: center; min-inline-size: 2.75rem; min-block-size: 2.75rem; padding-inline: .75rem; border: 2px solid var(--line); border-radius: .625rem; color: var(--text); font-weight: 800; text-decoration: none; }
.pagination a.page-numbers:hover { border-color: var(--link); color: var(--link); }
.pagination .current { background: var(--c2); border-color: var(--c2); color: #fff; }
.pagination .dots { border-color: transparent; }

/* Forms & buttons */
:is(input:is([type="text"], [type="email"], [type="url"], [type="search"], [type="tel"], [type="password"], [type="number"]), textarea, select) { inline-size: 100%; min-block-size: 2.75rem; padding: .5rem .85rem; font: inherit; color: var(--text); background: var(--card); border: 2px solid var(--field-line); border-radius: .625rem; }
textarea { min-block-size: 8rem; resize: vertical; }
:is(input, textarea, select):focus { border-color: var(--link); }
::placeholder { color: var(--muted); opacity: 1; }
:is(input, textarea, select):user-invalid { border-color: var(--bad); }
:is(input:is([type="text"], [type="email"], [type="url"], [type="tel"], [type="password"], [type="number"]), textarea):user-invalid { padding-inline-end: 2.5rem; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='11' fill='%23e5284a'/%3E%3Crect x='11' y='6' width='2' height='8' rx='1' fill='%23fff'/%3E%3Ccircle cx='12' cy='17.5' r='1.4' fill='%23fff'/%3E%3C/svg%3E") no-repeat right .75rem top .75rem / 1.25rem; }
input:is(:autofill, :-webkit-autofill) { border-color: var(--link); box-shadow: inset 0 0 0 2px var(--link); }
.btn, button, input[type="submit"], .wp-block-button__link, .wp-block-file__button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-block-size: 2.75rem; padding: .5rem 1.25rem; font: inherit; font-weight: 800; line-height: 1.2; text-transform: uppercase; letter-spacing: .04em; text-decoration: none; color: #fff; background: var(--c2); border: 2px solid transparent; border-radius: .625rem; box-shadow: 0 3px 0 #0a3fb0; cursor: pointer; transition: background-color .15s, box-shadow .15s; }
.btn:hover, button:hover, input[type="submit"]:hover, .wp-block-button__link:hover, .wp-block-file__button:hover { background: var(--c3); color: #fff; }
.btn:active, button:active, input[type="submit"]:active, .wp-block-button__link:active, .wp-block-file__button:active { box-shadow: 0 1px 0 #0a3fb0; }
.search-form { display: flex; gap: .5rem; max-inline-size: 32.5rem; }
.search-form input[type="search"] { flex: 1; min-inline-size: 0; }
.search-form button { padding-inline: .9rem; }
.search-form svg { inline-size: 1.125rem; block-size: 1.125rem; flex: none; }

/* Sidebar & widgets */
.sidebar { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16.25rem), 1fr)); align-items: start; }
@media (min-width: 1024px) { .sidebar { grid-template-columns: minmax(0, 1fr); } }
.widget { margin: 0; padding: 1.1rem 1.25rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); font-size: .97rem; overflow-wrap: anywhere; }
.widget:has(> .wp-block-image:only-child) { padding: 0; background: none; border: 0; }
.widget .wp-block-image { margin: 0; }
.widget .wp-block-image img { display: block; inline-size: 100%; border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s, box-shadow .2s; }
.widget .wp-block-image a:focus-visible img { border-color: var(--link); box-shadow: 0 .25rem 0 var(--shade); }
@media (hover: hover) { .widget .wp-block-image a:hover img { border-color: var(--link); box-shadow: 0 .25rem 0 var(--shade); } }
.widget-title, .widget .wp-block-heading { margin: 0 0 .75rem; font-family: var(--font-head); font-size: 1rem; font-weight: 900; line-height: 1.4; text-transform: uppercase; letter-spacing: .05em; color: var(--head); }
.widget ul { margin: 0; padding: 0; list-style: none; }
.widget li { padding: .25rem 0; }
.widget li + li { border-block-start: 1px solid var(--line); }
.widget .textwidget ul { list-style: disc; padding-inline-start: 1.2rem; }
.widget .textwidget li + li { border: 0; }
.widget .tagcloud { display: flex; flex-wrap: wrap; gap: .35rem; }
.widget .tagcloud a { padding: .1rem .65rem; border: 1px solid var(--field-line); border-radius: .5rem; color: var(--text); font-size: .82rem !important; text-decoration: none; }
.widget .tagcloud a:hover { border-color: var(--link); color: var(--link); }
.widget form p { margin: 0 0 .75rem; }
.widget label { display: block; font-weight: 700; margin-block-end: .25rem; }
.wp-block-search__inside-wrapper { display: flex; gap: .5rem; }
.wp-block-search__input { flex: 1 1 8rem; min-inline-size: 0; }
.wp-block-search__button { flex: none; padding-inline: .9rem; white-space: nowrap; }

/* Comments */
.comments-area { margin-block-start: 3rem; }
.comment-list, .comment-list .children { list-style: none; padding: 0; }
.comment-list .children { padding-inline-start: 1.25rem; }
.comment-body { margin-block-end: 1rem; padding: 1rem 1.25rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.comment-author { display: flex; align-items: center; gap: .6rem; font-size: 1rem; font-weight: 800; color: var(--text); }
.comment-author .avatar { border-radius: 50%; }
.comment-author .says { display: none; }
.comment-meta, .comment-metadata { font-size: .85rem; color: var(--muted); }
.comment-metadata a { color: inherit; }
.reply a { font-size: .85rem; font-weight: 800; }
.comment-form label { display: block; font-weight: 700; margin-block-end: .25rem; }
.comment-form p { margin: 0 0 1rem; }
.comment-form .comment-form-cookies-consent { display: flex; gap: .5rem; align-items: center; }
.comment-form .comment-form-cookies-consent input { flex: none; inline-size: 1.5rem; block-size: 1.5rem; margin: 0; }
.comment-form .comment-form-cookies-consent label { margin: 0; font-weight: 400; }

/* Footer */
.site-footer { color-scheme: dark; margin-block-start: auto; background: #030720; color: var(--muted); border-block-start: 1px solid var(--line); font-size: .92rem; }
.foot { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; justify-content: space-between; align-items: center; padding-block: 2rem 1.25rem; }
.foot .brand .logo { inline-size: 11.25rem; }
.foot p { margin: .5rem 0 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--link); }
.legal { padding-block: 0 2rem; font-size: .85rem; }
.legal p { margin: 0; }
.legal a { text-decoration: underline; text-underline-offset: .18em; }

/* Follow us tiles, used in the footer and the widget; keep after the footer link rules (equal specificity) */
.social { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.social a { display: grid; place-items: center; inline-size: 2.75rem; block-size: 2.75rem; color: #fff; background: var(--c2); border: 2px solid transparent; border-radius: .625rem; box-shadow: 0 3px 0 #0a3fb0; text-decoration: none; transition: background-color .15s; }
.social a:hover { background: var(--c3); color: #fff; }
.social svg { inline-size: 1.375rem; block-size: 1.375rem; }
.widget .social li { padding: 0; border: 0; }
.site-footer .social { gap: .5rem; }
.site-footer .social a:hover { border-color: currentColor; }

@media (max-width: 599px) {
  .card.featured .body { padding: 1.1rem 1.2rem 1.4rem; }
  .entry-content { font-size: 1.0625rem; }
  .alignleft, .alignright { float: none; display: block; margin: 0 auto 1rem; }
}
@media (pointer: coarse) {
  .main-nav a { display: flex; align-items: center; min-block-size: 2.75rem; }
  .header-search :is(input[type="search"], button) { min-block-size: 2.75rem; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .card { transition: border-color .2s, box-shadow .2s, transform .2s; }
  .widget .wp-block-image img { transition: border-color .2s, box-shadow .2s, transform .2s; }
  .widget .wp-block-image a:focus-visible img { transform: translateY(-.25rem); }
  @media (hover: hover) { .card:hover, .widget .wp-block-image a:hover img { transform: translateY(-.25rem); } }
  .btn:active, button:active, input[type="submit"]:active, .wp-block-button__link:active, .wp-block-file__button:active, .social a:active { transform: translateY(2px); }
}
@media (forced-colors: active) {
  .hero, .card .thumb, .card .thumb[aria-hidden] { background-image: none; }
  .hero::before { display: none; }
  .main-nav a { border-block-end-color: Canvas; }
  .main-nav a:hover, .main-nav a[aria-current], .main-nav :is(.current-menu-item, .current-cat, .current_page_item) > a { border-block-end-color: Highlight; }
  .pagination .current { border-color: Highlight; text-decoration: underline; }
}
