/* Local font faces inlined from fonts-local.css (generated by scripts/download_google_fonts.py) */
/* Mirrored from: https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=Space+Grotesk:wght@500;600;700&display=swap */
/* cyrillic-ext */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url('../fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxTKYbABA.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

/* cyrillic */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url('../fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxaKYbABA.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* greek */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url('../fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxdKYbABA.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

/* vietnamese */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url('../fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxRKYbABA.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

/* latin-ext */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url('../fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxQKYbABA.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url('../fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxeKYY.woff2') format('woff2');
  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;
}

/* cyrillic-ext */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url('../fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxTKYbABA.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

/* cyrillic */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url('../fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxaKYbABA.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* greek */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url('../fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxdKYbABA.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

/* vietnamese */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url('../fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxRKYbABA.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

/* latin-ext */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url('../fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxQKYbABA.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url('../fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxeKYY.woff2') format('woff2');
  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;
}

/* cyrillic-ext */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url('../fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxTKYbABA.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

/* cyrillic */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url('../fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxaKYbABA.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* greek */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url('../fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxdKYbABA.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

/* vietnamese */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url('../fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxRKYbABA.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

/* latin-ext */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url('../fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxQKYbABA.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url('../fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxeKYY.woff2') format('woff2');
  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;
}

/* vietnamese */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/V8mDoQDjQSkFtoMM3T6r8E7mPb54C-s0.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

/* latin-ext */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/V8mDoQDjQSkFtoMM3T6r8E7mPb94C-s0.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/V8mDoQDjQSkFtoMM3T6r8E7mPbF4Cw.woff2') format('woff2');
  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;
}

/* vietnamese */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/V8mDoQDjQSkFtoMM3T6r8E7mPb54C-s0.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

/* latin-ext */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/V8mDoQDjQSkFtoMM3T6r8E7mPb94C-s0.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/V8mDoQDjQSkFtoMM3T6r8E7mPbF4Cw.woff2') format('woff2');
  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;
}

/* vietnamese */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/V8mDoQDjQSkFtoMM3T6r8E7mPb54C-s0.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

/* latin-ext */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/V8mDoQDjQSkFtoMM3T6r8E7mPb94C-s0.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/V8mDoQDjQSkFtoMM3T6r8E7mPbF4Cw.woff2') format('woff2');
  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;
}

:root {
  /* Keep dark background from base styles */
  --bg: #0e0e0e;
  --text: #f1f1f1;
  --muted: #c6c6c6;
  --accent: #ffd300;
  /* subtle accent if needed */
  --card-bg: #1d1d22;
  --dm-title-transform: uppercase;
  --header-bg: #000;
  --g-bg-top: #050818;
  --g-bg-mid: #020208;
  --g-bg-bottom: #000000;
  --g-header-left: #050818;
  --g-header-right: #080b1b;
  --g-article-panel: #05050a;
  --g-chip-start: #ffd54a;
  --g-chip-end: #ff9100;
  --g-card-hover-start: #14192a;
  --g-card-hover-end: #070711;
  --chip-gradient: linear-gradient(135deg, var(--g-chip-start), var(--g-chip-end));
  --card-hover-gradient: radial-gradient(circle at top left, var(--g-card-hover-start) 0, var(--g-card-hover-end) 55%, var(--g-bg-bottom) 100%);
  --bg-gradient: radial-gradient(circle at top, var(--g-bg-top) 0%, var(--g-bg-mid) 45%, var(--g-bg-bottom) 100%);
  --article-panel: var(--g-article-panel);
  /* Layout vars (rem-based defaults); JS may update with exact px */
  /* Desktop fallback: topbar + searchbar */
  --header-h: 7.25rem;
  --catbar-h: 2.75rem;
}

/* Tablet/mobile fallback: topbar only (searchbar hidden; catbar may appear) */
@media (max-width: 1023px) {
  :root {
    --header-h: 4.75rem;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body,
.article,
.article h1,
.article h2,
.article h3,
.article p,
h1,
h2,
h3,
h4,
h5,
h6 {
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

/* Layout shell */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Wide desktop: use more horizontal space without changing tablet/laptop layouts */
@media (min-width: 1600px) {
  .container {
    max-width: 1360px;
  }

  body .article-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
    gap: 24px;
  }

  body .header-searchbar .search-panel {
    width: min(600px, 100%);
  }
}

body[data-gradients="on"] {
  background: var(--bg-gradient, var(--bg));
}

.article.main {
  background: var(--article-bg-main, var(--article-panel, #05050a));
  color: var(--article-text, var(--text));
  border-radius: 14px;
  border: 1px solid #161616;
  padding: 20px 20px 22px;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.55);
}

body[data-title-transform="none"] {
  --dm-title-transform: none;
}

body[data-title-transform="capitalize"] {
  --dm-title-transform: capitalize;
}

body[data-title-transform="uppercase"] {
  --dm-title-transform: uppercase;
}

html,
body {
  overflow-x: hidden;
}

/* Desktop/tablet default: offset by header height only */
body {
  padding-top: calc(var(--header-h) + env(safe-area-inset-top));
}

/* Header: bold black bar, fixed to top for all viewports */
.site-header {
  background: #000;
  /* Solid black to prevent content bleeding */
  border-bottom: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  padding-top: env(safe-area-inset-top);
}

/* Header bars */
.header-topbar {
  background: var(--header-bg, #000);
}

.header-top {
  min-height: 4.75rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-searchbar {
  background: #000;
  /* Solid black to prevent bleeding */
  border-bottom: none;
}

.header-bottom {
  display: flex;
}

.header-bottom-inner {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 10px;
  position: relative;
}

/* Header search: align under logo + allow full-width dropdown aligned to container */
.header-searchbar .search-container {
  width: 100%;
}

.header-searchbar #search-input {
  width: 100%;
}

.header-searchbar .search-results-dropdown {
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  width: auto;
  max-width: none;
  z-index: 10050;
  border-radius: 0;
}

.header-searchbar .search-panel {
  width: min(560px, 100%);
  background: rgba(28, 28, 36, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

.header-searchbar .search-input-wrapper {
  padding: 0;
  display: flex;
  align-items: center;
}

.header-searchbar #search-input {
  background: rgba(0, 0, 0, 0.0);
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 10px 12px;
}

.header-searchbar #search-input:focus {
  outline: none;
  border: none;
  box-shadow: none;
}

.header-searchbar .search-button {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(255, 211, 0, 0.18), rgba(255, 107, 0, 0.10));
  border: none;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  padding: 0;
  cursor: pointer;
}

.header-searchbar .search-button:hover {
  filter: brightness(1.06);
}

.header-searchbar .search-button-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.header-searchbar .search-input-wrapper:focus-within .search-button {
  color: var(--accent);
}

.header-searchbar #search-input {
  flex: 1 1 auto;
  min-width: 0;
}

.header-searchbar .search-panel {
  position: relative;
}

.header-searchbar .search-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 211, 0, 0.08);
}

/* Prevent page scroll while dropdown is open */
html.search-open,
body.search-open {
  overflow: hidden;
}

/* On mobile, header-searchbar now shows below the catbar */

.logo {
  flex-shrink: 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
}

.logo-block {
  display: inline-block;
  background: #fff;
  color: #000;
  font-weight: 900;
  padding: 7px 9px;
  line-height: 1;
  letter-spacing: .06em;
  font-size: 18px;
}

.logo-text {
  display: inline-block;
  color: #fff;
  font-weight: 800;
  letter-spacing: .12em;
  font-size: 15px;
}

.nav {
  display: none;
  flex: 1 1 auto;
  justify-content: center;
  gap: 18px;
  margin-left: 0;
}

.nav a {
  color: #fff !important;
  opacity: 1 !important;
  text-decoration: none;
  font-weight: 800;
  text-transform: var(--dm-title-transform, uppercase);
  letter-spacing: .16em;
  font-size: 14px;
  padding: 2px 4px 4px;
  border-radius: 999px;
  position: relative;
  transition:
    background-color .18s ease,
    color .18s ease,
    transform .12s ease,
    opacity .18s ease;
}

.nav a::after {
  content: '';
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffd300, #ff6b00);
  opacity: 0;
  transform: scaleX(0.6);
  transform-origin: center;
  transition: opacity .18s ease, transform .18s ease;
}

.nav a:hover,
.nav a:focus-visible {
  opacity: 1 !important;
  color: #fff !important;
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.nav a:hover::after,
.nav a:focus-visible::after {
  opacity: 1;
  transform: scaleX(1);
}

/* Slightly compact header on mid-width desktops to prevent wrapping */
@media (min-width: 1024px) and (max-width: 1366px) {
  .logo-block {
    font-size: 16px;
    padding: 6px 8px;
    letter-spacing: .05em;
  }

  .logo-text {
    font-size: 13px;
    letter-spacing: .10em;
  }

  .nav {
    gap: 14px;
    margin-left: 0;
  }

  .nav a {
    font-size: 13px;
    letter-spacing: .12em;
    padding: 2px 3px 3px;
  }
}

@media (min-width: 1024px) {
  .nav {
    display: flex;
  }
}

.catbar {
  display: none !important;
  background: #000;
  border-top: 1px solid #161616;
  border-bottom: 1px solid #161616;
  position: fixed;
  top: calc(var(--header-h) + env(safe-area-inset-top));
  left: 0;
  right: 0;
  z-index: 9998;
}

.catbar-inner {
  padding: 0 16px;
}

.cat-scroll {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  overflow: visible;
  -webkit-overflow-scrolling: touch;
  padding: 10px 0;
}

.cat-link {
  flex: 0 1 auto;
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: #111;
  border: 1px solid #262626;
  color: #eaeaea;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  text-transform: var(--dm-title-transform, uppercase);
  letter-spacing: .12em;
}

.cat-link:hover {
  background: #131313;
}

@media (max-width: 700px) {
  .search {
    display: none;
  }
}

/* Hide header search by default; show only on wide viewports */
.search {
  display: none;
}

@media (min-width: 1300px) {
  .search {
    display: block;
  }
}

/* Show catbar on mobile/tablet up to 1023px; hide on wider desktops */
@media (max-width: 1023px) {
  .catbar {
    display: block !important;
  }

  /* Show search bar on mobile, positioned after catbar */
  .header-searchbar {
    display: block;
    background: #000;
    /* Solid black to prevent content bleeding through */
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: fixed;
    top: calc(var(--header-h) + var(--catbar-h) + env(safe-area-inset-top));
    left: 0;
    right: 0;
    z-index: 9997;
    padding: 8px 0;
  }

  .header-searchbar .search-panel {
    width: 100%;
    max-width: none;
    border-radius: 8px;
    display: block !important;
    /* Override global hide rule */
  }

  /* Force search container visible on mobile - override global hide rule */
  .header-searchbar .search-container {
    display: block !important;
  }

  .header-searchbar #search-input {
    font-size: 16px;
    /* Prevent iOS zoom on focus */
  }

  /* On mobile offset body by header + catbar + searchbar height */
  body {
    padding-top: calc(var(--header-h) + var(--catbar-h) + 52px + env(safe-area-inset-top));
  }

  /* Mobile search results dropdown positioning */
  .header-searchbar .search-results-dropdown {
    position: fixed;
    top: calc(var(--header-h) + var(--catbar-h) + 52px + env(safe-area-inset-top) + 8px);
    left: 16px;
    right: 16px;
    width: auto;
    max-width: none;
    max-height: calc(100vh - var(--header-h) - var(--catbar-h) - 80px);
    border-radius: 12px;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  /* Give article content extra breathing room below the mobile searchbar */
  .article.main {
    margin-top: 12px;
  }
}

/* Hide category chip bar on desktop */
@media (min-width: 1025px) {
  .catbar {
    display: none !important;
  }
}

/* Spacer no longer needed; keep inert */
.catbar-spacer {
  display: none !important;
  height: 0 !important;
}

.chip,
.chip-overlay,
.hero-chip,
.article .meta .chip {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
  display: inline-flex;
  align-items: center;
}

@media (max-width: 480px) {

  .chip,
  .chip-overlay,
  .hero-chip,
  .article .meta .chip {
    font-size: 11px;
    letter-spacing: 0.08em;
    padding: 2px 8px;
  }
}

/* Mobile auth button (user icon) */
.mobile-auth-link {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-left: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.35);
  text-decoration: none;
}

.mobile-auth-link:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.mobile-auth-link svg {
  width: 18px;
  height: 18px;
  display: block;
}

@media (max-width: 700px) {
  .mobile-auth-link {
    display: inline-flex;
  }
}

.desktop-auth-link {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-left: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.35);
  text-decoration: none;
}

.desktop-auth-link:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.desktop-auth-link svg {
  width: 18px;
  height: 18px;
  display: block;
}

@media (min-width: 1024px) {
  .desktop-auth-link {
    display: inline-flex;
  }
}

/* Mobile: slightly smaller chips */
@media (max-width: 700px) {
  .cat-link {
    font-size: 12px;
    padding: 4px 8px;
    letter-spacing: .08em;
  }
}

/* Ensure article headings don't hide under fixed header/catbar on mobile */
@media (max-width: 900px) {
  .article {
    padding-top: 8px;
  }
}

/* Grid and cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  background: var(--grid-bg-main, var(--card-bg-main, transparent));
  padding: 6px;
  border-radius: 10px;
}

/* Mobile grid: comfortable single column */
@media (max-width: 700px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .container {
    padding: 0 12px;
  }
}

.card {
  background: var(--card-bg-main, var(--card-bg));
  color: var(--card-text, var(--text));
  border: 1px solid #222;
  border-radius: 8px;
  overflow: hidden;
}

.image-link {
  display: block;
  position: relative;
}

.image-link img,
.image-link .placeholder {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  /* cleaner landscape thumbs */
  object-fit: cover;
  object-position: center top;
  /* bias crop to top */
  transition: filter .25s ease;
}

.image-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.16);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.card:hover .image-link img,
.card:hover .image-link .placeholder {
  filter: grayscale(0.15) brightness(1.05);
}

.card:hover .image-link::after {
  opacity: 1;
}

.card:hover {
  border-color: #444;
  background: var(--card-hover-gradient, var(--card-bg));
}


/* Category chips */
.chip,
.chip-overlay,
.hero-chip {
  font-weight: 800;
  text-transform: var(--dm-title-transform, uppercase);
}

.chip-overlay {
  position: static;
  letter-spacing: .3px;
  padding: 4px 8px;
  font-size: 12px;
  border: none;
}

.chip-stack {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.chip,
.hero-chip {
  padding: 4px 10px;
  border: none;
  text-decoration: none;
  letter-spacing: .05em;
}

/* Contextual chips */
.chip,
.chip-overlay {
  background: var(--card-chip-bg, var(--chip-bg, #ffd300)) !important;
  color: var(--card-chip-text, var(--chip-text, #000)) !important;
  border-radius: 0 !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.chip.hero-chip,
.hero-chip {
  background: var(--hero-chip-bg, var(--chip-bg, #ffd300)) !important;
  color: var(--hero-chip-text, var(--chip-text, #000)) !important;
  border-radius: 0 !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

/* Secondary category chips (for extra categories) */
.chip-secondary {
  background: #111 !important;
  color: #eaeaea !important;
  border-radius: 0 !important;
  border: 1px solid #333;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

.article .meta .chip,
.article-tags .chip,
.tag-page .chip {
  background: var(--article-chip-bg, var(--chip-bg, #ffd300)) !important;
  color: var(--article-chip-text, var(--chip-text, #000)) !important;
  border-radius: 0 !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

/* Soft glow for article tag chips without changing colour */
.article-tags .chip {
  box-shadow: 0 0 8px rgba(255, 226, 71, 0.3);
}

/* Headline overlay at bottom of image */
.card-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 16px;
  color: #fff;
  font-weight: 900;
  text-transform: var(--dm-title-transform, uppercase);
  letter-spacing: .4px;
  font-size: 20px;
  line-height: 1.1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .6) 100%);
}

.card-meta {
  /* Subtle accent stripe under card image for author + time */
  background: radial-gradient(circle at top left,
      rgba(255, 211, 0, 0.18),
      rgba(5, 5, 5, 0.95));
  color: var(--muted);
  border-top: 1px solid rgba(255, 211, 0, 0.35);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px 12px;
}

.card.small img {
  aspect-ratio: 16 / 9;
}

/* Article + sidebar layout */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  gap: 20px;
  align-items: start;
  margin: 0;
}

.article {
  max-width: none;
  margin: 0;
  padding: 20px 0;
}

.article.main {
  background: var(--article-bg-main, var(--article-panel, #05050a)) !important;
  color: var(--article-text, var(--text)) !important;
  border-radius: 14px;
  border: 1px solid #161616;
  padding: 20px 20px 22px;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.55);
}

.article-title {
  font-size: 42px;
  line-height: 1.05;
  text-transform: var(--dm-title-transform, uppercase);
  font-weight: 900;
  letter-spacing: .4px;
  margin: 0 0 8px;
}

.article-title {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.article .meta {
  gap: 10px;
  font-size: 14px;
  color: #999;
  display: flex;
  align-items: center;
}

.article .hero {
  border-radius: 8px;
  width: 100%;
  height: auto;
  display: block;
  margin: 12px 0 8px;
  max-height: 70vh;
  object-fit: cover;
}

.article .summary {
  color: #ddd;
  font-size: 20px;
  margin: 10px 0 18px;
}

.article .summary {
  padding: 0 16px;
}

/* Article summary block – slightly elevated for readability */
.article .summary {
  font-family: 'IBM Plex Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 18px;
  line-height: 1.55;
  color: #ededed;
  font-weight: 520;
  letter-spacing: 0.1px;
  margin-bottom: 0.6em;
  opacity: 0.95;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding-bottom: 0.5em;
}

.article .body {
  color: #e8e8e8;
  font-size: 18px;
  line-height: 1.7;
}

.article .body {
  background: var(--article-bg-main, var(--article-panel, #05050a)) !important;
  color: var(--article-text, var(--text)) !important;
  border-radius: 12px;
  padding: 10px 16px 16px;
}

.article .body h1,
.article .body h2,
.article .body h3 {
  margin: 1.2em 0 .4em;
  line-height: 1.2;
}

.article .body p {
  margin: .8em 0;
}

.article .body img {
  max-width: 100% !important;
  width: 100% !important;
  height: auto;
  display: block;
  border-radius: 8px;
  margin: 12px 0;
  object-fit: contain;
}

.article .body iframe,
.article .body video {
  max-width: 100%;
  width: 100%;
  border-radius: 8px;
}

.article .body figure {
  margin: 16px 0;
}

.article .body figcaption {
  color: var(--muted);
  font-size: 14px;
  margin-top: 6px;
}

.article .body a,
.article .summary a,
.article .body a:visited,
.article .summary a:visited {
  color: var(--accent) !important;
  text-decoration: none;
}

.article .body a:hover,
.article .summary a:hover {
  text-decoration: underline;
}

/* Article meta line */
.article .meta {
  font-family: 'IBM Plex Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: #b0b0b0;
}

/* Article typography refinements for readability */
.article .body.article-content {
  font-family: 'IBM Plex Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 18px;
  line-height: 1.75;
  color: #f0f0f0;
  max-width: none;
  margin: 0;
}

.article .body.article-content p {
  margin-bottom: 1.3em;
}

.article .body.article-content h1,
.article .body.article-content h2,
.article .body.article-content h3 {
  font-family: 'Space Grotesk', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  letter-spacing: 0.03em;
}

.article .body.article-content h1 {
  font-size: 34px;
  line-height: 1.3;
  color: #ffffff;
  margin-bottom: 0.7em;
}

.article .body.article-content h2 {
  font-size: 26px;
  line-height: 1.35;
  color: #ffffff;
  margin-top: 0.9em;
  margin-bottom: 0.6em;
}

.article .body.article-content h3 {
  font-size: 21px;
  line-height: 1.4;
  color: #f5f5f5;
  margin-top: 1.4em;
  margin-bottom: 0.5em;
}

.article .body.article-content a,
.article .body.article-content a:visited {
  color: #ffcf33 !important;
  text-decoration: none;
}

.article .body.article-content a:hover {
  text-decoration: underline;
}

/* Nicer bullets inside article body */
.article .body.article-content ul {
  list-style: none;
  margin-left: 0;
  padding-left: 1.4rem;
}

.article .body.article-content ul li {
  position: relative;
  margin-bottom: 0.45em;
}

.article .body.article-content ul li::before {
  content: '';
  position: absolute;
  left: -0.9rem;
  top: 0.6em;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 999px;
  background: #ffd95a;
  box-shadow: 0 0 6px rgba(255, 217, 90, 0.5);
}

.section-title {
  margin: 20px 0 0;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  padding: 20px 0;
}

.source-link a {
  color: var(--accent);
}

/* DataTables-style pagination buttons */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 0;
  flex-wrap: wrap;
}

.pagination .page-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid #333;
  background: #050505;
  color: #e5e5e5;
  font-size: 13px;
  font-family: 'IBM Plex Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .12s ease;
}

.pagination .page-btn:hover {
  border-color: var(--accent);
  background: #111111;
  color: #ffffff;
  transform: translateY(-1px);
}

.pagination .page-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
  font-weight: 600;
}

.pagination .page-btn.page-nav {
  min-width: 40px;
}

.pagination .page-info {
  font-size: 12px;
  color: var(--muted);
  font-family: 'IBM Plex Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  margin-left: 4px;
}

@media (max-width: 700px) {
  .article-title {
    font-size: 21px !important;
    line-height: 1.2 !important;
    letter-spacing: .08em !important;
  }

  .article .meta {
    font-size: 12px;
  }

  .article .summary {
    font-size: 16px;
  }

  .article .body {
    font-size: 16px;
  }

  .article .body h1,
  .article .body h2,
  .article .body h3 {
    font-size: 1.05em;
  }

  .hero-title {
    font-size: 20px;
  }

  .card-title {
    font-size: 16px;
    letter-spacing: .2px;
  }

  .section-title,
  .page-title,
  .author-page-name {
    font-size: 20px;
    letter-spacing: .12em;
  }

  .author-page-heading {
    font-size: 13px;
  }

  .author-page-tagline,
  .page-subtitle {
    font-size: 13px;
  }
}

.sidebar {
  position: sticky;
  top: calc(var(--header-h) - 48px + env(safe-area-inset-top));
  padding-top: 0;
  background: var(--grid-bg-main, transparent);
}

.sidebar h3 {
  margin: 0 0 12px;
  font-size: 18px;
  color: #ddd;
}

.side-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.side-card {
  display: flex;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  align-items: flex-start;
  padding: 8px;
  border-radius: 8px;
  background: var(--card-bg-main, #141414);
  border: 1px solid #1f1f1f;
  overflow: hidden;
}

.side-card:hover {
  background: #161616;
}

.side-thumb {
  width: 120px;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 6px;
  flex: 0 0 auto;
}

.side-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.side-title {
  font-size: 15px;
  line-height: 1.2;
}

.side-time {
  color: var(--muted);
  font-size: 12px;
}

.sidebar a,
.sidebar a:visited {
  color: #e5e5e5;
}

.sidebar a:hover {
  color: var(--accent);
}

.muted {
  color: var(--muted);
}

.author-box {
  margin-top: 32px;
  padding: 18px 18px 20px;
  border-radius: 10px;
  background: #111;
  border: 1px solid #262626;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.author-avatar-wrap {
  flex: 0 0 auto;
}

.author-avatar {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid #333;
}

.author-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.author-name {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.author-tagline {
  margin: 0;
  color: #ddd;
  font-size: 14px;
}

.author-meta {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.author-bio {
  margin: 6px 0 0;
  font-size: 14px;
  color: #e0e0e0;
  line-height: 1.6;
}

.byline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.byline-link {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.byline-link:hover {
  text-decoration: underline;
}

.author-page {
  margin: 20px 0 8px;
}

.author-page-header {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.author-page-avatar {
  width: 96px;
  height: 96px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid #333;
}

.author-page-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.author-page-name {
  margin: 0;
  font-size: 26px;
  text-transform: var(--dm-title-transform, uppercase);
  letter-spacing: .12em;
}

.author-page-tagline {
  margin: 0;
  color: #ddd;
  font-size: 15px;
}

.author-page-meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.author-page-bio {
  margin: 8px 0 0;
  font-size: 14px;
  color: #e0e0e0;
  line-height: 1.6;
}

.author-page-heading {
  margin: 18px 0 0;
  font-size: 15px;
  text-transform: var(--dm-title-transform, uppercase);
  letter-spacing: .18em;
  color: var(--muted);
}

.tag-page .card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 8px 12px 12px;
  color: #ddd;
  font-size: 13px;
}

.tag-page .tag-card-summary {
  display: block;
  color: #e0e0e0;
}

.tag-page .card-meta time {
  font-size: 12px;
  color: var(--muted);
}

.tag-page .card-meta a:link,
.tag-page .card-meta a:visited {
  color: var(--accent);
  text-decoration: none;
}

.tag-page .card-meta a:hover {
  text-decoration: underline;
}

/* Author links inside bios/meta */
.author-box a:link,
.author-box a:visited,
.author-page-bio a:link,
.author-page-bio a:visited,
.author-page-meta a:link,
.author-page-meta a:visited {
  color: var(--accent);
  text-decoration: none;
}

.author-box a:hover,
.author-page-bio a:hover,
.author-page-meta a:hover {
  text-decoration: underline;
}

/* Share bar */
.share-bar {
  margin: 10px 0 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.share-label {
  font-size: 11px;
  text-transform: var(--dm-title-transform, uppercase);
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-right: 4px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid #333;
  background: #050505;
  color: #f9fafb;
  text-decoration: none;
  font-size: 13px;
  cursor: pointer;
}

.share-btn svg {
  width: 16px;
  height: 16px;
}

.share-btn:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #111827;
}

@media (max-width: 700px) {
  .share-bar {
    gap: 6px;
  }

  .share-btn {
    width: 30px;
    height: 30px;
  }
}

@media (max-width: 1024px) {
  .article-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }
}

/* Footer */
.site-footer {
  border-top: 1px solid #181818;
  margin-top: 40px;
  padding: 32px 0 18px;
  background: #050505;
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.02);
}

.site-footer p {
  color: var(--muted);
  font-size: 12px;
}

.footer-brand-row {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #fff;
}

.footer-logo-block {
  display: inline-block;
  background: #fff;
  color: #000;
  font-weight: 900;
  padding: 4px 8px;
  font-size: 14px;
  letter-spacing: .08em;
}

.footer-logo-text {
  display: inline-block;
  color: #fff;
  font-weight: 800;
  letter-spacing: .12em;
  font-size: 13px;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px;
  padding-bottom: 10px;
}

.footer-col {
  min-width: 0;
}

.footer-title {
  margin: 0 0 10px;
  font-size: 12px;
  text-transform: var(--dm-title-transform, uppercase);
  letter-spacing: 0.18em;
  color: #e5e5e5;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-links li {
  line-height: 1.4;
}

.footer-links a,
.footer-links a:visited {
  color: #f3f4f6;
  font-size: 13px;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-socials {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-socials a,
.footer-socials a:visited {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #f3f4f6;
  text-decoration: none;
  font-size: 13px;
}

.footer-socials a:hover {
  color: var(--accent);
}

.footer-social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #111;
  border: 1px solid #333;
}

.footer-social-icon svg {
  width: 14px;
  height: 14px;
}

.footer-social-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.footer-social-static {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #4b5563;
  font-size: 13px;
  opacity: 0.7;
}

.footer-social-static .footer-social-icon {
  background: #0b0b0b;
  border-color: #222;
}

.footer-bottom {
  border-top: 1px solid #161616;
  padding-top: 10px;
  margin-top: 8px;
}

@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .footer-brand-row {
    margin-bottom: 16px;
  }
}

/* Forms */
.search input {
  background: #0f0f0f;
  border-color: #222;
}

.search input {
  background: #101010;
  color: #e5e5e5;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 6px 10px;
  min-width: 180px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.search input::placeholder {
  color: #888;
}

/* RSS button on header */
.rss-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-left: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff8a00, #ff3d00);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 16px rgba(255, 90, 0, 0.35);
  text-decoration: none;
}

.rss-link:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
}

.rss-link svg {
  width: 18px;
  height: 18px;
  display: block;
}


.comments {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid #222;
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment {
  padding: 10px 12px;
  border-radius: 8px;
  background: #111;
  border: 1px solid #262626;
}

.comment-meta {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 12px;
  color: var(--muted);
}

.comment-body {
  margin: 4px 0 0;
  font-size: 14px;
  color: #e0e0e0;
}

.comment-form textarea {
  width: 100%;
  background: #050505;
  border-radius: 6px;
  border: 1px solid #333;
  padding: 8px;
  color: #e5e5e5;
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

.comment-form .btn {
  margin-top: 8px;
}

/* Share toast */
.share-toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(20px);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.92);
  color: #f9fafb;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: var(--dm-title-transform, uppercase);
  border: 1px solid #4b5563;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 99999;
}

.share-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.subscription-form {
  max-width: 480px;
  margin: 12px 0 32px;
}

.subscription-form .form-row {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.subscription-form label {
  font-size: 13px;
}

.subscription-form input[type="email"],
.subscription-form input[type="text"] {
  background: #050505;
  border-radius: 6px;
  border: 1px solid #333;
  padding: 6px 8px;
  color: #e5e5e5;
}

.subscription-form .help {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.subscription-form .checkbox-row {
  flex-direction: row;
  gap: 6px;
  align-items: center;
}

.sidebar-subscribe {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #222;
}

.sidebar-subscribe .btn {
  display: block;
  text-align: center;
  background: var(--accent);
  color: #111;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

.subscription-status {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}

.status-pill {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: var(--dm-title-transform, uppercase);
  letter-spacing: 0.16em;
}

.status-on {
  background: #16a34a;
  color: #f9fafb;
}

.status-off {
  background: #4b5563;
  color: #f9fafb;
}

.btn.secondary {
  background: transparent;
  border-color: #4b5563;
  color: #e5e7eb;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04);
  transition: all .15s ease;
}

.btn.secondary:hover {
  border-color: #f87171;
  color: #fee2e2;
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.25);
}

.btn.tertiary.google-subscribe-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid #2563eb;
  background: linear-gradient(90deg, #1d4ed8, #3b82f6);
  color: #f9fafb;
  font-weight: 600;
  text-transform: none;
  padding: 8px 14px;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
  letter-spacing: .2px;
}

.btn.tertiary.google-subscribe-btn:hover {
  filter: brightness(1.1);
}

/* Make the Save button on the newsletter form pop a bit more */
.subscription-form .btn {
  background: #ffd300;
  color: #111;
  border-color: #e6c200;
  font-weight: 700;
}

.subscription-form .btn:hover {
  filter: brightness(0.95);
}

/* Notifications status text */
.notifications-footnote {
  color: var(--muted);
}

.auth-page {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 0;
}

.auth-card {
  max-width: 420px;
  width: 100%;
  background: #050505;
  border-radius: 12px;
  border: 1px solid #222;
  padding: 24px 22px 26px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55);
}

.auth-title {
  margin: 0 0 6px;
  font-size: 22px;
  text-transform: var(--dm-title-transform, uppercase);
  letter-spacing: 0.12em;
}

.auth-tagline {
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--muted);
}

.btn-google {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #111;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  font-size: 14px;
}

.btn-google:hover {
  border-color: #4285f4;
  background: radial-gradient(circle at top left, #4285f4 0, #111 52%);
}

.google-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #fff;
  color: #4285f4;
  font-weight: 800;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-hint {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.notifications-cta {
  margin: 16px 0 32px;
}

.notifications-card {
  position: relative;
  border-radius: 14px;
  padding: 20px 18px 22px;
  background: radial-gradient(circle at top left, rgba(255, 211, 0, 0.08), #050505);
  border: 1px solid #333;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.6);
}

.notifications-badge {
  position: absolute;
  top: 14px;
  right: 16px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: var(--dm-title-transform, uppercase);
  background: #ffd300;
  color: #000;
  font-weight: 800;
}

.notifications-title {
  margin: 0 0 6px;
  font-size: 18px;
  text-transform: var(--dm-title-transform, uppercase);
  letter-spacing: 0.16em;
}

.notifications-text {
  margin: 0 0 14px;
  font-size: 14px;
  color: #e0e0e0;
}

.notifications-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.notifications-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #111;
  border: 1px solid #333;
  font-size: 13px;
  cursor: pointer;
}

.notifications-chip input {
  accent-color: #ffd300;
}

.notifications-btn {
  width: 100%;
  justify-content: center;
  font-weight: 800;
  border: 1px solid #10b981;
  color: #052e1d;
  background: linear-gradient(90deg, #10b981, #34d399);
  box-shadow: 0 10px 24px rgba(16, 185, 129, 0.35);
  padding: 12px 16px;
  text-transform: var(--dm-title-transform, uppercase);
  letter-spacing: .12em;
}

.notifications-btn:hover {
  filter: brightness(1.05);
}

.notifications-footnote {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
}

/* Utilities */
.btn {
  background: #000;
  border: none;
}

/* Sidebar buttons should stay accent-colored (overrides generic .btn) */
.sidebar-subscribe .btn {
  background: var(--accent) !important;
  color: #111 !important;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

/* Hero slider */
.hero-slider {
  margin: 12px 0 32px;
}

.hero-slider-inner {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  background: var(--hero-bg, #101010);
  border: 1px solid #252525;
  min-height: 520px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .45s ease-in-out;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-media {
  position: relative;
  overflow: hidden;
}

.hero-media img,
.hero-placeholder {
  width: 100%;
  height: 100%;
  min-height: 460px;
  max-height: 620px;
  object-fit: cover;
  display: block;
}

.hero-placeholder {
  background: linear-gradient(135deg, #222, #111);
}

.hero-chip {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
}

/* Spacing when multiple category chips appear on hero or cards */
.hero-chip+.hero-chip,
.chip-overlay+.chip-overlay {
  margin-left: 6px;
}

.hero-info {
  padding: 28px 26px 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 12px;
}

.hero-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-pill-category {
  background: #111;
  color: #eaeaea;
  border: 1px solid #343434;
}

.hero-pill-category.hero-pill-secondary {
  background: linear-gradient(135deg, #f2f4f7, #ebedf1);
  color: #000;
  border-color: transparent;
}

.hero-kicker {
  background: #ffd300;
  color: #000;
}

.hero-title {
  margin: 0;
  font-size: 52px;
  line-height: 1.08;
  text-transform: var(--dm-title-transform, uppercase);
  letter-spacing: .5px;
}

.hero-title {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.hero-title a {
  color: #fff;
  text-decoration: none;
}

.hero-title a:hover {
  text-decoration: none;
}

.hero-summary {
  margin: 0;
  color: #d0d0d0;
  font-size: 19px;
}

.hero-meta {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.hero-meta-sep {
  opacity: 0.8;
}

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px 0 4px;
}

.hero-dot {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  border-radius: 999px;
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease, width .2s ease;
}

.hero-dot::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: inherit;
  background: #444;
  transition: background .2s ease, transform .2s ease, width .2s ease;
}

.hero-dot.is-active::before {
  background: var(--accent);
  width: 22px;
  transform: translateY(-1px);
}

.home-heading {
  /* Align exactly with the main .container edges */
  margin: 8px 0 8px;
  padding: 0;
  font-size: 14px;
  font-weight: 800;
  text-transform: var(--dm-title-transform, uppercase);
  letter-spacing: .18em;
  color: #fff !important;
}

@media (max-width: 900px) {

  /* Make hero content flow and resize naturally */
  .hero-slider-inner {
    min-height: initial;
  }

  .hero-slide {
    position: static;
    inset: auto;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    display: none;
    grid-template-columns: 1fr;
  }

  .hero-slide.is-active {
    display: block;
  }

  .hero-media img,
  .hero-placeholder {
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: 260px;
  }

  .hero-title {
    font-size: 22px;
  }
}

.header-top {
  flex-wrap: nowrap;
}

.header-icons {
  display: flex;
  align-items: center;
  gap: 5px;
}

@media (max-width: 480px) {
  .header-top {
    flex-wrap: wrap;
    row-gap: 6px;
  }

  .logo-block,
  .logo-text {
    font-size: 18px;
    padding: 4px 6px;
  }
}

@media (max-width: 700px) {
  .header-top {
    justify-content: flex-start;
    gap: 4px;
  }

  .header-icons {
    margin-left: auto;
  }

  .mobile-auth-link {
    margin-left: auto;
    width: 30px;
    height: 30px;
  }

  .rss-link {
    width: 30px;
    height: 30px;
    margin-left: 4px;
  }
}

/* ==========================================================================
   AJAX Search Dropdown - Glassmorphism Style
   ========================================================================== */

/* Search container with relative positioning for dropdown */
.search-container {
  position: relative;
  z-index: 10001;
}

/* Search input wrapper with icon */
.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  width: 18px;
  height: 18px;
  color: #888;
  pointer-events: none;
  transition: color 0.2s ease;
}

.search-input-wrapper input:focus+.search-icon,
.search-input-wrapper:focus-within .search-icon {
  color: var(--accent);
}

.search input,
#search-input {
  width: 280px;
  padding: 10px 14px 10px 40px;
  background: #1e1e1e;
  /* Solid dark background, no blur */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
  transition: all 0.25s ease;
}

.search input:focus,
#search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 211, 0, 0.15), 0 8px 24px rgba(0, 0, 0, 0.4);
  background: rgba(40, 40, 40, 0.95);
}

.search input::placeholder,
#search-input::placeholder {
  color: rgba(255, 255, 255, 0.62);
}

/* Search overlay background (dims page) */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  /* Keep the overlay below the fixed header so the dropdown remains clickable. */
  z-index: 9999;
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Search results dropdown */
.search-results-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 440px;
  max-height: 520px;
  overflow-y: auto;
  background: #2a2a35;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.7),
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 211, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-12px) scale(0.98);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.25s ease;
  z-index: 10002;
}

.search-results-dropdown.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Close button inside dropdown */
.search-results-toolbar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  padding: 8px;
  background: #2a2a35;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.search-close {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, color 0.2s ease;
}

.search-close:hover {
  background: linear-gradient(135deg, rgba(255, 100, 100, 0.25), rgba(255, 80, 80, 0.15));
  color: #ff8888;
  transform: scale(1.08);
}

.search-close svg {
  width: 16px;
  height: 16px;
  display: block;
}

/* Custom scrollbar for results */
.search-results-dropdown::-webkit-scrollbar {
  width: 6px;
}

.search-results-dropdown::-webkit-scrollbar-track {
  background: transparent;
}

.search-results-dropdown::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.search-results-dropdown::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Results list container */
.search-results-list {
  padding: 8px;
}

/* Individual result item */
.search-result-item {
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.search-result-item:hover,
.search-result-item.selected {
  background: linear-gradient(135deg, rgba(255, 211, 0, 0.06), rgba(255, 180, 0, 0.03));
  border-color: rgba(255, 211, 0, 0.12);
  transform: translateX(3px);
}

.search-result-item.selected {
  box-shadow: inset 3px 0 0 var(--accent);
}

/* Separator between result items */
.search-result-item:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px 14px 0 0;
  margin-bottom: 2px;
}

/* Result thumbnail image */
.search-result-image {
  flex-shrink: 0;
  width: 100px;
  height: 66px;
  border-radius: 8px;
  overflow: hidden;
  background: #1a1a1a;
}

.search-result-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.search-result-item:hover .search-result-image img {
  transform: scale(1.05);
}

.search-result-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1a1a, #252525);
}

/* Result content */
.search-result-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.search-result-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  color: #ffffff !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-title mark {
  background: rgba(255, 211, 0, 0.35);
  color: #ffd740;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 800;
}

.search-result-summary {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  color: #e8e8e8 !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-summary mark {
  background: rgba(255, 211, 0, 0.25);
  color: #ffe066;
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 600;
}

/* Result meta line */
.search-result-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 4px;
}

.search-result-category {
  background: linear-gradient(135deg, rgba(255, 211, 0, 0.95), rgba(255, 160, 0, 0.90));
  color: #1a1a1a;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  box-shadow: 0 2px 8px rgba(255, 200, 0, 0.25);
}

.search-result-author::before {
  content: "by ";
  opacity: 0.7;
}

.search-result-time::before {
  content: "•";
  margin-right: 6px;
  opacity: 0.5;
}

/* Keyboard hints */
.search-keyboard-hints {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 10px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.68);
}

.search-keyboard-hints kbd {
  display: inline-block;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  font-family: inherit;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.8);
  margin-right: 4px;
}

/* Loading state */
.search-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 20px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
}

.search-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 211, 0, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* No results state */
.search-no-results {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 20px;
  text-align: center;
  color: #888;
}

.search-no-results svg {
  color: #555;
  margin-bottom: 8px;
}

.search-no-results p {
  margin: 0;
  font-size: 15px;
  color: #aaa;
}

.search-no-results strong {
  color: var(--accent);
}

.search-hint {
  font-size: 13px;
  color: #666;
}

/* Error state */
.search-error {
  padding: 30px 20px;
  text-align: center;
  color: #e74c3c;
  font-size: 14px;
}

@media (max-width: 900px) {
  .search-results-dropdown {
    position: fixed;
    left: 12px;
    right: 12px;
    top: calc(var(--top-offset, var(--header-h)) + 64px);
    bottom: 12px;
    width: auto;
    max-height: none;
    transform: translateY(-10px);
    overflow-x: hidden;
    box-sizing: border-box;
  }

  .search-results-dropdown.active {
    transform: translateY(0);
  }

  .search-result-image {
    width: 80px;
    height: 54px;
  }

  .search-results-toolbar {
    padding: 10px;
    background: rgba(20, 20, 28, 0.98);
  }

  .search-close {
    width: 40px;
    height: 40px;
  }
}

/* Ensure header search overrides win over generic search rules */
.header-searchbar .search-results-dropdown {
  z-index: 10060;
}

/* ========================================
   Cookie Consent Banner
   ======================================== */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  padding: 16px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 100%);
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.cookie-consent.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cookie-consent.hiding {
  opacity: 0;
  transform: translateY(20px);
}

.cookie-consent-inner {
  max-width: 900px;
  margin: 0 auto;
  background: #1e1e26;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow:
    0 -8px 40px rgba(0, 0, 0, 0.4),
    0 4px 24px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.cookie-consent-content {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex: 1;
}

.cookie-consent-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255, 211, 0, 0.15), rgba(255, 150, 0, 0.1));
  border-radius: 12px;
  color: var(--accent, #ffd300);
}

.cookie-consent-icon svg {
  width: 26px;
  height: 26px;
}

.cookie-consent-text {
  flex: 1;
}

.cookie-consent-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.cookie-consent-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #b0b0b0;
}

.cookie-consent-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cookie-btn-primary {
  background: linear-gradient(135deg, #ffd300 0%, #ff9500 100%);
  color: #000;
  box-shadow: 0 4px 16px rgba(255, 200, 0, 0.3);
}

.cookie-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 200, 0, 0.4);
}

.cookie-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #ccc;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.cookie-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .cookie-consent {
    padding: 12px;
  }

  .cookie-consent-inner {
    flex-direction: column;
    padding: 18px 16px;
    gap: 16px;
  }

  .cookie-consent-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
  }

  .cookie-consent-icon {
    width: 48px;
    height: 48px;
  }

  .cookie-consent-icon svg {
    width: 28px;
    height: 28px;
  }

  .cookie-consent-title {
    font-size: 17px;
  }

  .cookie-consent-desc {
    font-size: 13px;
  }

  .cookie-consent-actions {
    width: 100%;
    flex-direction: column-reverse;
  }

  .cookie-btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 13px;
  }
}
