/**
 * Singularity Design System
 * Singularity.Kiwi — Premium dark editorial
 * Built: 2026-03-07
 * Steps 1–8: Global base, header, cards, single posts,
 *             footer, pillar pages, mobile polish, scrollbar/focus
 */

/* ============================================================
   STEP 1 — GLOBAL BASE + CSS VARIABLES
   ============================================================ */

:root {
  /* Colour system */
  --bg:           #0d0d0d;
  --surface:      #161616;
  --surface-2:    #1e1e1e;
  --border:       #2a2a2a;
  --border-light: #333333;
  --text:         #f0f0f0;
  --text-2:       #999999;
  --text-3:       #666666;
  --accent:       #00e676;
  --accent-dim:   rgba(0, 230, 118, 0.15);
  --accent-glow:  rgba(0, 230, 118, 0.08);

  /* Typography */
  --font-body: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;

  /* Base */
  font-size: 16px;
}

html {
  scroll-behavior: smooth;
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Global links */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  text-decoration: underline;
  color: var(--accent);
}

/* Selection highlight */
::selection {
  background: rgba(0, 230, 118, 0.25);
  color: var(--text);
}

::-moz-selection {
  background: rgba(0, 230, 118, 0.25);
  color: var(--text);
}

/* ============================================================
   STEP 2 — HEADER OVERRIDE
   ============================================================ */

/* Main site header — sticky glassmorphism bar */
.site-header,
#masthead {
  background: transparent !important;
  border: none !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Brand area — visible, styled */
.main-header-brand,
.header-brand {
  background: var(--bg) !important;
  border-bottom: 1px solid var(--border) !important;
}

/* Breaking news — visible, styled */
.breaking-news-holder,
.breaking-news-wrapper {
  background: var(--surface) !important;
  border-bottom: 1px solid var(--border) !important;
}
.breaking-news-holder .wrap {
  max-width: 1300px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
}

/* Fix white background on marquee (breaking news ticker) */
.dark-layer .marquee,
.dark-layer .top-header,
.dark-layer .top-header-inner,
.dark-layer .breaking-news {
  background: var(--surface) !important;
  border-color: var(--border) !important;
}
.dark-layer .marquee .news-post-title h3,
.dark-layer .marquee .news-post-title h3 a {
  color: var(--text) !important;
}

/* Secondary nav — visible, styled */
.secondary-nav-wrap,
.secondary-navigation {
  background: var(--bg) !important;
  border-bottom: 1px solid var(--border) !important;
}

/* Hide only the search toggle (cosmetic, not navigation) */
.search-toggle,
.header-search {
  display: none !important;
}

/* The actual nav bar */
.navigation-top {
  background: rgba(13, 13, 13, 0.85) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  border-bottom: 1px solid var(--border) !important;
  border-top: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.navigation-top .wrap {
  max-width: 1300px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
  height: 60px !important;
  display: flex !important;
  align-items: center !important;
  background: transparent !important;
}

/* Site logo / title in nav */
.site-logo,
.site-title {
  flex-shrink: 0;
}

.site-logo a,
.site-title a {
  font-size: 1.1em !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  text-decoration: none !important;
  letter-spacing: -0.02em !important;
  transition: color 0.2s ease !important;
}

.site-logo a:hover,
.site-title a:hover {
  color: var(--accent) !important;
  text-decoration: none !important;
}

/* Navigation links pushed to the right */
.main-navigation {
  display: flex !important;
  margin-left: auto !important;
  gap: 0 !important;
}

.main-navigation ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 0 !important;
}

.main-navigation ul li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
}

.main-navigation ul li a {
  display: flex !important;
  align-items: center !important;
  padding: 8px 16px !important;
  color: #fff !important;
  font-size: 0.9em !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  border-radius: 6px !important;
  min-height: 44px !important;
  white-space: nowrap !important;
  position: relative !important;
}

/* Hide sub-menus for clean look */
.main-navigation ul ul {
  display: none !important;
}

/* ============================================
   MOBILE MENU - SLIDE-OUT PANEL (MacRumors-style)
   ============================================================ */

/* Slide-out menu panel - dark theme */
.mobile-menu-panel {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  max-width: 85vw;
  height: 100vh;
  height: 100dvh;
  background: var(--surface, #161616);
  z-index: 10001;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
}

.mobile-menu-panel.open {
  transform: translateX(0);
}

/* Menu overlay backdrop */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.visible {
  opacity: 1;
}

/* Panel header */
.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border, #2a2a2a);
}

.mobile-menu-header .site-name {
  font-family: var(--font-body);
  font-size: 1.5em;
  font-weight: 700;
  color: var(--text, #f0f0f0);
  letter-spacing: -0.02em;
}

.mobile-menu-header .site-name .site-title-ext {
  font-size: 0.7em;
  color: rgba(0, 212, 255, 0.7);
  font-weight: 400;
}

.mobile-menu-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2, #1e1e1e);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-2, #999);
  font-size: 22px;
  line-height: 1;
  padding: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.mobile-menu-close:hover {
  background: var(--border, #2a2a2a);
  color: var(--text, #f0f0f0);
}

/* Panel navigation */
.mobile-menu-nav {
  padding: 8px 0;
}

.mobile-menu-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-menu-nav li {
  border-bottom: 1px solid var(--border, #2a2a2a);
}

.mobile-menu-nav li:last-child {
  border-bottom: none;
}

.mobile-menu-nav li a {
  display: block;
  padding: 14px 20px;
  color: var(--text, #f0f0f0);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.mobile-menu-nav li a:hover {
  background: var(--surface-2, #1e1e1e);
  color: rgba(0, 212, 255, 0.9);
}

.mobile-menu-nav li.current-menu-item > a,
.mobile-menu-nav li.current_page_item > a {
  color: rgba(0, 212, 255, 0.9);
  font-weight: 600;
}

/* Hide everything on mobile, rebuild from scratch */
@media (max-width: 768px) {
  
  /* 1. HIDE THEME'S MOBILE STYLES */
  #wpadminbar { display: none !important; }
  html { margin-top: 0 !important; }
  .main-header > .navigation-top:before { display: none !important; }
  
  /* 2. DARK NAV BAR */
  .main-header > .navigation-top,
  #nav-sticker .navigation-top {
    background: #111 !important;
    height: 50px !important;
    position: relative !important;
  }
  
  /* Hide the main header brand section on mobile - it's above the nav */
  .main-header-brand {
    display: none !important;
  }
  
  /* Hide the branding in the nav - we'll show it differently */
  .navigation-top .site-branding {
    display: none !important;
  }
  
  /* Add logo text to nav bar via pseudo-element */
  .navigation-top .wrap {
    display: flex !important;
    align-items: center !important;
    height: 50px !important;
    padding: 0 16px !important;
    flex-wrap: nowrap !important;
  }
  
  .navigation-top .wrap::before {
    content: "Singularity" !important;
    font-family: var(--font-body) !important;
    color: var(--text) !important;
    font-size: 2em !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    letter-spacing: -0.02em !important;
    order: 1 !important;
  }
  
  .navigation-top .wrap::after {
    content: ".kiwi" !important;
    font-family: var(--font-body) !important;
    color: rgba(0, 212, 255, 0.7) !important;
    font-size: 1.5em !important;
    font-weight: 400 !important;
    white-space: nowrap !important;
    letter-spacing: -0.02em !important;
    order: 2 !important;
  }
  
  /* 3. SHOW HAMBURGER ON RIGHT */
  #site-header-menu {
    position: absolute !important;
    right: 0 !important;
    top: 0 !important;
    height: 50px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    padding-right: 16px !important;
    width: auto !important;
    order: 3 !important;
  }
  
  /* Hide the "Menu" text label */
  .menu-toggle .toggle-text {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
  }
  
  .menu-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    position: static !important;
    background: transparent !important;
    cursor: pointer !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  /* Ensure hamburger bars are visible */
  .toggle-bar {
    display: block !important;
    position: relative !important;
  }
  
  /* White bars */
  .toggle-bar,
  .toggle-bar:before,
  .toggle-bar:after {
    background: #fff !important;
  }
  
  /* 4. HIDE THEME'S DROPDOWN MENU - we use slide-out panel instead */
  .main-navigation ul,
  .main-navigation ul.menu,
  .main-navigation .menu > ul,
  .main-navigation nav > ul,
  #site-header-menu .main-navigation ul {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
  }
  
  /* Hide dropdown toggles */
  .dropdown-toggle { display: none !important; }
  
  /* Show the panel and overlay */
  .mobile-menu-panel { display: block; }
  .mobile-menu-overlay { display: block; }
  
}

/* Desktop: show normal menu, hide mobile panel */
@media (min-width: 769px) {
  /* Hide mobile panel and overlay */
  .mobile-menu-panel,
  .mobile-menu-overlay {
    display: none !important;
  }
  
  /* Hide hamburger on desktop */
  .menu-toggle {
    display: none !important;
  }
  
  /* Show site branding on desktop */
  .main-header-brand {
    display: block !important;
  }
  
  /* Show nav top bar normally */
  .navigation-top .site-branding {
    display: block !important;
  }
  
  /* Remove mobile logo pseudo-elements */
  .navigation-top .wrap::before,
  .navigation-top .wrap::after {
    display: none !important;
    content: none !important;
  }
  
  /* Reset order for desktop */
  #site-header-menu {
    order: unset !important;
    position: static !important;
  }
  
  /* Restore desktop menu visibility */
  .main-navigation ul,
  .main-navigation ul.menu,
  .main-navigation .menu > ul,
  .main-navigation nav > ul,
  #site-header-menu .main-navigation ul {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    height: auto !important;
    overflow: visible !important;
    position: static !important;
    left: auto !important;
  }
  
  /* Restore dropdown toggles */
  .dropdown-toggle {
    display: block !important;
  }
}

/* ============================================================
   STEP 3 — HOMEPAGE ARTICLE CARDS
   ============================================================ */

/* Posts grid container — mobile first (1 column) */
.posts-holder {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 16px !important;
  max-width: 1300px !important;
  margin: 24px auto !important;
  padding: 0 16px !important;
}

/* Card base */
.posts-holder article,
.posts-holder .post,
.posts-holder .type-post {
  background: var(--surface) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  border: 1px solid var(--border) !important;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
  aspect-ratio: unset !important;
  position: relative !important;
}

/* Card hover lift */
.posts-holder article:hover,
.posts-holder .post:hover {
  transform: translateY(-3px) !important;
  border-color: var(--border-light) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
}

/* Card thumbnail */
.posts-holder .post-thumbnail,
.posts-holder .post-thumbnail a {
  display: block !important;
  overflow: hidden !important;
}

.posts-holder .post-thumbnail img {
  width: 100% !important;
  height: 200px !important;
  object-fit: cover !important;
  display: block !important;
  transition: transform 0.3s ease !important;
}

.posts-holder article:hover .post-thumbnail img {
  transform: scale(1.03) !important;
}

/* Card content area */
.posts-holder .entry-content-holder {
  padding: 18px 20px 20px !important;
  background: transparent !important;
  position: static !important;
  top: unset !important;
  left: unset !important;
  right: unset !important;
  bottom: unset !important;
}

/* Card title */
.posts-holder .entry-title,
.posts-holder h2.entry-title {
  font-size: 1.05em !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  margin: 0 0 8px !important;
  color: var(--text) !important;
}

.posts-holder .entry-title a {
  color: var(--text) !important;
  text-decoration: none !important;
  transition: color 0.2s ease !important;
}

.posts-holder .entry-title a:hover {
  color: var(--accent) !important;
  text-decoration: none !important;
}

/* Card meta (date, author) */
.posts-holder .entry-meta,
.posts-holder .entry-meta *,
.posts-holder .entry-meta a {
  font-size: 0.78em !important;
  color: var(--text-3) !important;
  text-decoration: none !important;
}

/* Card excerpt */
.posts-holder .entry-content p {
  font-size: 0.88em !important;
  color: var(--text-2) !important;
  line-height: 1.6 !important;
  margin: 0 !important;
}

/* Read more link */
.posts-holder .read-more-link,
.posts-holder .more-link,
a.read-more-link,
a.more-link {
  display: inline-block !important;
  margin-top: 12px !important;
  font-size: 0.82em !important;
  color: var(--accent) !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  transition: text-decoration 0.2s ease !important;
}

.posts-holder .read-more-link:hover,
.posts-holder .more-link:hover {
  text-decoration: underline !important;
}

/* Tablet: 2 columns */
@media (min-width: 768px) {
  .posts-holder {
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
    padding: 0 20px !important;
  }
}

/* Desktop: 3 columns */
@media (min-width: 1025px) {
  .posts-holder {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px !important;
  }
}

/* ============================================================
   STEP 4 — SINGLE ARTICLE / POST PAGES
   ============================================================ */

/* Single post container */
#primary article.post,
#primary article.hentry,
#primary .hentry {
  max-width: 740px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
}

/* Single post header */
#primary article.post .entry-header,
#primary .hentry .entry-header {
  margin-bottom: 28px !important;
  padding-bottom: 20px !important;
  border-bottom: 1px solid var(--border) !important;
}

/* Single post title */
#primary .entry-header .entry-title,
#primary .hentry .entry-title,
.single .entry-title {
  font-size: clamp(1.6em, 4vw, 2.4em) !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  color: var(--text) !important;
  margin: 0 0 12px !important;
  letter-spacing: -0.02em !important;
}

/* Category badge */
.cat-links a {
  display: inline-block !important;
  background: var(--accent-dim) !important;
  color: var(--accent) !important;
  font-size: 0.75em !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  padding: 4px 10px !important;
  border-radius: 20px !important;
  text-decoration: none !important;
  margin-bottom: 12px !important;
  border: 1px solid rgba(0, 230, 118, 0.3) !important;
  transition: background 0.2s ease !important;
}

.cat-links a:hover {
  background: rgba(0, 230, 118, 0.25) !important;
  text-decoration: none !important;
}

/* Body copy */
.single .entry-content,
#primary article.post .entry-content {
  font-size: 1.05em !important;
  line-height: 1.75 !important;
  color: #d0d0d0 !important;
}

.single .entry-content h2,
.single .entry-content h3,
#primary .entry-content h2,
#primary .entry-content h3 {
  color: var(--text) !important;
  margin-top: 2em !important;
  font-weight: 700 !important;
}

.single .entry-content a,
#primary .entry-content a {
  color: var(--accent) !important;
}

.single .entry-content a:hover,
#primary .entry-content a:hover {
  text-decoration: underline !important;
}

.single .entry-content img,
#primary .entry-content img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 8px !important;
  display: block !important;
  margin: 1.5em auto !important;
}

.single .entry-content blockquote,
#primary .entry-content blockquote {
  border-left: 3px solid var(--accent) !important;
  padding-left: 20px !important;
  color: var(--text-2) !important;
  font-style: italic !important;
  margin: 1.5em 0 !important;
  background: var(--accent-glow) !important;
  border-radius: 0 8px 8px 0 !important;
  padding: 12px 20px !important;
}

/* Post navigation */
.post-navigation,
.nav-links {
  border-top: 1px solid var(--border) !important;
  margin-top: 40px !important;
  padding-top: 24px !important;
}

.nav-links .nav-previous a,
.nav-links .nav-next a {
  color: var(--text-2) !important;
  font-size: 0.9em !important;
  text-decoration: none !important;
  transition: color 0.2s ease !important;
}

.nav-links .nav-previous a:hover,
.nav-links .nav-next a:hover {
  color: var(--accent) !important;
}

/* ============================================================
   STEP 5 — FOOTER
   ============================================================ */

#colophon,
.site-footer {
  background: #0a0a0a !important;
  border-top: 1px solid var(--border) !important;
  padding: 24px 0 !important;
  margin-top: 40px !important;
}

.copyright-area .wrap,
.site-footer .wrap {
  max-width: 1300px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
}

.site-info,
.footer-menu,
.copyright-area {
  font-size: 0.82em !important;
  color: var(--text-3) !important;
}

.site-info a {
  color: var(--text-3) !important;
  text-decoration: none !important;
  transition: color 0.2s ease !important;
}

.site-info a:hover {
  color: var(--accent) !important;
}

.footer-menu li {
  list-style: none !important;
}

.footer-menu li a {
  color: var(--text-3) !important;
  text-decoration: none !important;
  transition: color 0.2s ease !important;
  padding: 4px 0 !important;
  display: inline-block !important;
}

.footer-menu li a:hover {
  color: var(--accent) !important;
}

.back-to-top {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-2) !important;
  border-radius: 8px !important;
  padding: 8px 14px !important;
  font-size: 0.82em !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
}

.back-to-top:hover {
  background: var(--surface-2) !important;
  border-color: var(--border-light) !important;
  color: var(--text) !important;
}

/* ============================================================
   STEP 6 — PILLAR PAGE HERO SECTIONS
   ============================================================ */

/* Pillar wrapper */
.pillar-wrapper {
  max-width: 1300px !important;
  margin: 0 auto !important;
  padding: 20px !important;
}

/* Pillar hero */
.pillar-hero {
  border-radius: 12px !important;
  overflow: hidden !important;
}

/* Pillar grid — mobile default: single column */
.pillar-grid {
  grid-template-columns: 1fr !important;
}

/* Pillar cards */
.pillar-card {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  transition: transform 0.2s ease, border-color 0.2s ease !important;
}

.pillar-card:hover {
  transform: translateY(-3px) !important;
  border-color: var(--border-light) !important;
}

/* Restore grid on tablet+ */
@media (min-width: 768px) {
  .pillar-wrapper {
    padding: 20px !important;
  }

  .pillar-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (min-width: 1025px) {
  .pillar-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* ============================================================
   STEP 7 — GLOBAL UTILITIES + MOBILE POLISH
   ============================================================ */

/* Universal image safety */
img {
  max-width: 100%;
  height: auto;
}

/* Responsive tables */
table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Wrap padding */
.wrap {
  max-width: 1300px;
  margin-left: auto;
  margin-right: auto;
}

/* Mobile-first rules — max 767px */
@media (max-width: 767px) {
  /* Base font confirmed */
  html {
    font-size: 16px;
  }

  /* Tap targets */
  a,
  button,
  input[type="submit"],
  input[type="button"],
  .button,
  .btn {
    min-height: 44px;
  }

  /* No horizontal overflow */
  img,
  video,
  iframe,
  embed {
    max-width: 100% !important;
    width: auto;
  }

  /* Padding on containers */
  .wrap,
  .pillar-wrapper {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* Cards — single column */
  .posts-holder {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    padding: 0 16px !important;
  }

  /* Shorter card images on mobile */
  .posts-holder .post-thumbnail img {
    height: 180px !important;
  }

  /* Card title smaller on mobile */
  .posts-holder .entry-title,
  .posts-holder h2.entry-title {
    font-size: 1em !important;
  }

  /* Pillar hero — tighter on mobile */
  .pillar-hero {
    border-radius: 8px !important;
    padding: 20px 16px !important;
  }

  .pillar-grid {
    grid-template-columns: 1fr !important;
  }

  .pillar-card {
    width: 100% !important;
  }

  /* Pillar hero widget safety */
  .pillar-hero-widget {
    max-width: 100% !important;
    width: 100% !important;
    overflow: hidden !important;
  }

  /* Career Compass tool */
  .cc-search-row {
    flex-direction: column !important;
    gap: 12px !important;
  }

  .cc-pathways-grid,
  .cc-resources-grid {
    grid-template-columns: 1fr !important;
  }

  /* Single post */
  #primary article.post,
  #primary .hentry {
    padding: 0 16px !important;
  }

  /* Footer */
  .copyright-area .wrap,
  .site-footer .wrap {
    padding: 0 16px !important;
  }
}

/* Tablet: 768–1024px */
@media (min-width: 768px) and (max-width: 1024px) {
  .posts-holder {
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
    padding: 0 20px !important;
  }
}

/* Desktop: 1025px+ */
@media (min-width: 1025px) {
  .posts-holder {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px !important;
  }
}

/* ============================================================
   STEP 8 — SCROLLBAR + SELECTION + FOCUS STYLES
   ============================================================ */

/* Custom scrollbar — WebKit */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #0a0a0a;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #333333;
  border-radius: 4px;
  border: 2px solid #0a0a0a;
  transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

::-webkit-scrollbar-corner {
  background: #0a0a0a;
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: #333333 #0a0a0a;
}

/* Focus accessibility */
:focus-visible {
  outline: 2px solid var(--accent) !important;
  outline-offset: 2px !important;
  border-radius: 4px;
}

/* Smooth scroll already on html element above */

/* ============================================================
   ADDITIONAL POLISH — page layout, sidebar, content area
   ============================================================ */

/* Main content area */
#page {
  background: var(--bg);
}

#content,
#primary,
.site-content {
  background: var(--bg);
}

/* Content wrap */
.content-area {
  padding-top: 32px;
}

/* Sidebar */
#secondary,
.widget-area {
  border-left: 1px solid var(--border);
}

.widget {
  background: var(--surface);
  border-radius: 10px;
  padding: 20px;
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

.widget-title {
  font-size: 0.85em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin: 0 0 16px;
}

/* Pagination */
.nav-links .page-numbers,
.page-numbers {
  color: var(--text-2) !important;
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
  padding: 6px 12px !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
}

.page-numbers.current,
.page-numbers:hover {
  background: var(--accent-dim) !important;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}

/* Category / tag pages */
.archive .page-header,
.search .page-header {
  max-width: 1300px;
  margin: 32px auto 20px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
}

.archive .page-title,
.search-title {
  font-size: 1.4em;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

/* Comments area */
.comments-area {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 20px;
}

.comment-list li {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.comment-meta,
.comment-author {
  color: var(--text-2);
  font-size: 0.85em;
}

/* Form elements */
input[type="text"],
input[type="email"],
input[type="search"],
textarea,
select {
  background: var(--surface-2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  font-family: var(--font-body) !important;
  font-size: 0.95em !important;
  transition: border-color 0.2s ease !important;
  width: 100%;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
  border-color: var(--accent) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px var(--accent-glow) !important;
}

input[type="submit"],
button[type="submit"],
.wp-block-button__link {
  background: var(--accent) !important;
  color: #000 !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 12px 24px !important;
  font-weight: 700 !important;
  font-size: 0.9em !important;
  cursor: pointer !important;
  transition: opacity 0.2s ease, transform 0.1s ease !important;
  min-height: 44px !important;
}

input[type="submit"]:hover,
button[type="submit"]:hover,
.wp-block-button__link:hover {
  opacity: 0.88 !important;
  transform: translateY(-1px) !important;
}

/* Ensure no white flash on page load */
.site-header,
.navigation-top,
#page,
body {
  background-color: var(--bg);
}
