/*
Theme Name: Blooket Guide
Theme URI: https://blooket.us.com/
Author: Blooket Guide
Author URI: https://blooket.us.com/
Description: A magazine-style blog theme for the Blooket Guide fan site — red branding, dark navy ticker and cards, featured post grid, dropdown navigation, join-code widget, and a token/XP calculator page template. Independent fan-made guide; not affiliated with Blooket Inc.
Version: 1.2.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: blooket-guide
Tags: blog, education, red, responsive, custom-menu
*/

:root {
  --red-700: #a51f1f;
  --red-600: #d62828;
  --red-500: #e5383b;
  --red-400: #ef4444;
  --red-100: #fee2e2;
  --red-50: #fef2f2;
  --orange-500: #f77f00;
  --amber-500: #f59e0b;
  --rose-500: #f43f5e;
  --navy: #0f1e33;
  --navy-2: #16283f;
  --navy-3: #1e324f;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #fafaf8;
  --bg-soft: #f8f9fa;
  --card: #ffffff;
  --dark: #111827;
  --dark-2: #1f2937;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 6px 24px rgba(17, 24, 39, 0.08);
  --shadow-sm: 0 2px 8px rgba(17, 24, 39, 0.06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--red-600); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ---------- layout ---------- */
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 780px; margin: 0 auto; padding: 0 20px; }

main { padding: 28px 0 64px; }
.site-main { min-height: 40vh; }

/* ---------- magazine header: logo badge ---------- */
.site-header { background: #fff; }
.logo-bar { text-align: center; padding: 26px 0 20px; background: #fff; }
.logo-badge {
  display: inline-block;
  background: linear-gradient(180deg, var(--red-500), var(--red-600) 55%, var(--red-700));
  color: #fff;
  font-weight: 900;
  font-size: 36px;
  letter-spacing: 3px;
  padding: 10px 30px 12px;
  border-radius: 14px;
  box-shadow: 0 4px 0 #7f1d1d, 0 10px 22px rgba(214, 40, 40, 0.35);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
}
.logo-badge:hover { color: #fff; text-decoration: none; }

/* ---------- magazine header: red nav bar ---------- */
.nav-bar {
  background: var(--red-600);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.18);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav-bar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-bar nav { flex: 1; min-width: 0; }

.main-nav {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav > li { position: relative; margin: 0; }
.main-nav a {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 12px;
  display: block;
  white-space: nowrap;
}
.main-nav a:hover { background: rgba(0, 0, 0, 0.16); text-decoration: none; }
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a,
.main-nav .current-menu-ancestor > a,
.main-nav .current-category-ancestor > a,
.main-nav .current-post-ancestor > a {
  background: rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 -3px 0 #fff;
}
.main-nav .menu-item-has-children > a::after {
  content: " \25BE";
  font-size: 11px;
  opacity: 0.85;
}
.main-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  list-style: none;
  margin: 0;
  padding: 6px 0;
  background: var(--navy);
  border-top: 3px solid #fff;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
  z-index: 60;
}
.main-nav li:hover > .sub-menu,
.main-nav li:focus-within > .sub-menu { display: block; }
.main-nav .sub-menu li { margin: 0; }
.main-nav .sub-menu a {
  color: #e5e7eb;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  white-space: normal;
}
.main-nav .sub-menu a:hover { background: var(--navy-3); color: #fff; }
.main-nav .sub-menu .current-menu-item > a {
  background: var(--navy-3);
  color: #fff;
  box-shadow: none;
}

.nav-search { position: relative; flex-shrink: 0; }
.search-toggle {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 12px 10px;
  display: flex;
  align-items: center;
}
.search-toggle:hover { background: rgba(0, 0, 0, 0.16); }
.header-search {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  padding: 12px;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
  z-index: 60;
}
.header-search.open { display: block; }
.header-search .search-form { display: flex; gap: 6px; }
.header-search input[type="search"] {
  width: 200px;
  padding: 9px 12px;
  font-size: 14px;
  border: 2px solid var(--line);
  border-radius: 999px;
  font-family: var(--font);
}
.header-search input[type="search"]:focus { outline: none; border-color: var(--red-500); }
.header-search button {
  background: var(--red-600);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.header-search button:hover { background: var(--red-700); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  padding: 12px 10px;
  font-size: 20px;
  cursor: pointer;
  font-weight: 700;
}

/* ---------- UPDATES ticker ---------- */
.ticker {
  background: var(--navy);
  display: flex;
  align-items: stretch;
  overflow: hidden;
}
.ticker-label {
  background: var(--red-600);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 26px 10px 20px;
  flex-shrink: 0;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%);
}
.ticker-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  display: inline-block;
  animation: ticker-blink 1.4s ease-in-out infinite;
}
@keyframes ticker-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.ticker-viewport { overflow: hidden; flex: 1; display: flex; align-items: center; }
.ticker-track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  animation: ticker-scroll 45s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.ticker-item {
  color: #e5e7eb;
  font-size: 14px;
  font-weight: 600;
  padding: 0 16px;
}
.ticker-item:hover { color: #fff; text-decoration: none; }
.ticker-sep { color: var(--red-500); font-size: 10px; }

/* ---------- homepage intro ---------- */
.home-intro { padding: 26px 0 6px; max-width: 760px; }
.home-intro h1 {
  margin: 0 0 10px;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.7px;
}
.home-intro h1 .accent { color: var(--red-600); }
.home-intro .lede { font-size: 17px; color: var(--muted); margin: 0; }

/* ---------- featured grid (magazine, asymmetric) ---------- */
.featured-grid { margin: 26px 0 8px; }
.featured-block-a,
.featured-block-b {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 22px;
}
.featured-quad {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.featured-quad.quad-full { grid-column: 1 / -1; }

.featured-card {
  background: var(--navy);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.featured-thumb {
  min-height: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--red-700), var(--red-500));
  position: relative;
  overflow: visible;
}
.featured-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.14), transparent 50%),
    radial-gradient(circle at 10% 90%, rgba(0, 0, 0, 0.25), transparent 55%);
}
.featured-letter {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  border: 3px solid rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 66px;
  font-weight: 900;
  color: #fff;
  position: relative;
  z-index: 1;
}
.featured-body { padding: 26px 28px 28px; }
.featured-cat {
  display: inline-block;
  background: var(--red-600);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 5px 13px;
  border-radius: 999px;
  position: absolute;
  left: 28px;
  bottom: 0;
  transform: translateY(50%);
  z-index: 2;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}
.featured-cat:hover { background: var(--red-500); color: #fff; text-decoration: none; }
.featured-body { padding: 30px 28px 28px; }
.featured-body h2 { margin: 0 0 10px; font-size: 30px; line-height: 1.2; letter-spacing: -0.5px; }
.featured-body h2 a { color: #fff; }
.featured-body h2 a:hover { color: #fecaca; text-decoration: none; }
.featured-body p { margin: 0 0 14px; color: #cbd5e1; font-size: 15px; }
.featured-body .post-meta { color: #94a3b8; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; }
.featured-body .read-more { margin-top: 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  background: var(--red-600);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  padding: 12px 22px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(214, 40, 40, 0.35);
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.15s ease;
}
.btn:hover { background: var(--red-500); color: #fff; text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-ghost {
  background: transparent;
  color: var(--red-600);
  border: 2px solid var(--red-600);
  box-shadow: none;
}
.btn-ghost:hover { background: var(--red-50); }
.btn-dark { background: var(--dark-2); box-shadow: 0 4px 14px rgba(17, 24, 39, 0.3); }
.btn-dark:hover { background: var(--dark); }
.btn-sm { padding: 9px 18px; font-size: 15px; }

/* ---------- cards & sections ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin: 0 0 24px;
}
.card h2, .card h3 { margin-top: 0; }

.section { margin: 44px 0; }
.pillar-section { margin-top: 20px; }
.section-title {
  font-size: 28px;
  letter-spacing: -0.5px;
  margin: 0 0 8px;
}
.section-sub { color: var(--muted); margin: 0 0 22px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 820px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.mode-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.mode-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.mode-card .mode-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 23px;
  margin-bottom: 12px;
  background: var(--red-50);
}
.mode-card h3 { margin: 0 0 6px; font-size: 19px; }
.mode-card p { margin: 0; color: var(--muted); font-size: 15px; }
.mode-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--red-700);
  background: var(--red-100);
  border-radius: 999px;
  padding: 3px 10px;
  margin-top: 12px;
}

/* ---------- post cards & grids (magazine: gradient thumb + navy body) ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 860px) { .post-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .post-grid { grid-template-columns: 1fr; } }

.post-card {
  background: var(--navy);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  display: flex;
  flex-direction: column;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.post-thumb {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  padding: 16px;
  background: linear-gradient(135deg, var(--red-700), var(--red-500));
  position: relative;
}
.post-thumb .thumb-letter {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 2px solid rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 900;
}
.thumb-cat-blooket { background: linear-gradient(135deg, #7f1d1d, #d62828); }
.thumb-cat-blooket-blogs { background: linear-gradient(135deg, #a51f1f, #e5383b); }
.thumb-cat-guides { background: linear-gradient(135deg, #a51f1f, #e5383b); }
.thumb-cat-game-modes { background: linear-gradient(135deg, #7f1717, #d62828); }
.thumb-cat-codes-login { background: linear-gradient(135deg, #c2410c, #f77f00); }
.thumb-cat-tips-tricks { background: linear-gradient(135deg, #9d0208, #ef4444); }
.thumb-cat-for-teachers { background: linear-gradient(135deg, #6d28d9, #d62828); }
.thumb-cat-tech { background: linear-gradient(135deg, #1d4ed8, #0ea5e9); }
.thumb-cat-home-improvement { background: linear-gradient(135deg, #15803d, #84cc16); }
.thumb-cat-business { background: linear-gradient(135deg, #334155, #64748b); }
.thumb-cat-education { background: linear-gradient(135deg, #b45309, #f59e0b); }
.thumb-cat-health { background: linear-gradient(135deg, #0f766e, #34d399); }
.thumb-cat-lifestyle { background: linear-gradient(135deg, #be185d, #f472b6); }
.thumb-cat-marketing { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.thumb-cat-travel { background: linear-gradient(135deg, #0369a1, #38bdf8); }
.post-card-body { padding: 26px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.post-cat {
  display: inline-block;
  background: var(--red-600);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 4px 11px;
  border-radius: 999px;
  position: absolute;
  left: 20px;
  bottom: 0;
  transform: translateY(50%);
  z-index: 2;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}
.post-cat:hover { background: var(--red-500); color: #fff; text-decoration: none; }
.post-card h3 { margin: 0 0 8px; font-size: 19px; line-height: 1.35; }
.post-card h3 a { color: #fff; }
.post-card h3 a:hover { color: #fecaca; text-decoration: none; }
.post-card p { margin: 0 0 12px; color: #cbd5e1; font-size: 15px; flex: 1; }
.post-meta { font-size: 12px; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.5px; }
.post-meta a { color: #94a3b8; }
.post-meta a:hover { color: #fff; }
.read-more {
  display: inline-block;
  margin-top: 10px;
  color: #f87171;
  font-weight: 800;
  font-size: 15px;
}
.read-more:hover { color: #fff; text-decoration: none; }
.white-card .read-more { color: var(--red-600); }
.white-card .read-more:hover { color: var(--red-700); }

/* ---------- white cards (carousel + Latest Guides) ---------- */
.white-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  display: flex;
  flex-direction: column;
}
.white-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.white-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.white-cat {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--red-600);
  margin-bottom: 8px;
}
.white-cat:hover { color: var(--red-700); }
.white-card h3 { margin: 0 0 8px; font-size: 19px; line-height: 1.35; }
.white-card h3 a { color: var(--ink); }
.white-card h3 a:hover { color: var(--red-600); text-decoration: none; }
.white-card .post-meta { color: var(--muted); text-transform: uppercase; font-size: 12px; letter-spacing: 0.5px; margin-bottom: 8px; }
.white-excerpt {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 15px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- carousel (Blooket Latest Posts) ---------- */
.carousel-section { margin: 44px 0; }
.carousel-title {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.4px;
  text-transform: uppercase;
  margin: 0 0 20px;
}
.carousel { overflow: hidden; }
.carousel-track {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track .white-card {
  flex: 0 0 calc((100% - 44px) / 3);
  scroll-snap-align: start;
}
.carousel-controls {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}
.carousel-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}
.carousel-btn:hover { border-color: var(--red-500); color: var(--red-600); }

/* ---------- Latest Guides section ---------- */
.guides-section { margin: 44px 0; text-align: center; }
.section-eyebrow {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--red-600);
  margin: 0 0 6px;
}
.guides-section .section-title { text-align: center; }
.guides-section .section-sub { text-align: center; max-width: 640px; margin-left: auto; margin-right: auto; }
.guides-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  text-align: left;
  margin-bottom: 26px;
}
.guides-more { text-align: center; margin: 0; }

/* ---------- empty state (no posts yet) ---------- */
.empty-posts {
  background: #fff;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 38px 28px;
  text-align: center;
  margin: 26px 0;
}
.empty-posts p { margin: 0 0 8px; color: var(--muted); }
.empty-posts p strong { color: var(--ink); font-size: 19px; }

/* ---------- join panel (dark navy, mid-pillar) ---------- */
.join-panel,
.howto-panel {
  background: var(--navy);
  border-radius: var(--radius);
  padding: 32px 30px;
  margin: 30px 0;
  box-shadow: var(--shadow);
  color: #fff;
}
.panel-eyebrow {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #f87171;
  margin: 0 0 8px;
}
.join-panel h2,
.howto-panel h2 {
  margin: 0 0 10px;
  font-size: 28px;
  letter-spacing: -0.4px;
  color: #fff;
}
.panel-sub { color: #cbd5e1; margin: 0 0 22px; max-width: 640px; }
.join-panel .join-form {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  flex-wrap: wrap;
}
.join-panel .join-form input {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 3px;
  text-align: center;
  width: 230px;
  padding: 13px 14px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  font-family: var(--font);
  background: #fff;
  color: var(--ink);
}
.join-panel .join-form input:focus { outline: none; border-color: var(--red-500); box-shadow: 0 0 0 3px rgba(214, 40, 40, 0.45); }
.join-error { color: #fca5a5; font-weight: 600; font-size: 14px; min-height: 20px; margin: 10px 0 0; width: 100%; }
.join-redirect-note { color: #94a3b8; font-size: 14px; margin: 14px 0 0; }
.join-redirect-note strong { color: #e5e7eb; }
.join-redirect-note a { color: #f87171; font-weight: 700; }
.join-steps {
  list-style: none;
  counter-reset: joinstep;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 26px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.join-steps li {
  counter-increment: joinstep;
  position: relative;
  padding-top: 34px;
}
.join-steps li::before {
  content: counter(joinstep);
  position: absolute;
  top: 0;
  left: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--red-600);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
.join-steps strong { display: block; font-size: 15px; margin-bottom: 4px; color: #fff; }
.join-steps span { font-size: 13px; color: #94a3b8; line-height: 1.5; display: block; }

/* ---------- How to Play panel ---------- */
.howto-tabs { display: flex; gap: 10px; margin: 0 0 22px; flex-wrap: wrap; }
.howto-tab {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.25);
  color: #e5e7eb;
  border-radius: 999px;
  padding: 9px 22px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
}
.howto-tab:hover { border-color: #fff; color: #fff; }
.howto-tab.active { background: var(--red-600); border-color: var(--red-600); color: #fff; }
.howto-steps {
  list-style: none;
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
}
.howto-steps.active { display: grid; }
.howto-steps li {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 20px 16px;
}
.howto-num {
  display: block;
  font-size: 30px;
  font-weight: 900;
  color: var(--red-500);
  line-height: 1;
  margin-bottom: 10px;
}
.howto-steps strong { display: block; font-size: 16px; margin-bottom: 6px; color: #fff; }
.howto-steps span { font-size: 14px; color: #94a3b8; line-height: 1.55; display: block; }

/* ---------- article typography ---------- */
.article h1, .entry-content h1 { font-size: 36px; letter-spacing: -0.8px; line-height: 1.15; margin: 0 0 10px; }
.article .meta, .entry-meta { color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.article h2, .entry-content h2 { font-size: 26px; margin: 36px 0 10px; letter-spacing: -0.4px; }
/* Pillar guide H2s sit on wide red bars (white text). */
.entry-content h2.section-title {
  background: var(--red-600);
  color: #fff;
  padding: 13px 18px;
  border-radius: 10px;
  font-size: 24px;
}
.article h3, .entry-content h3 { font-size: 20px; margin: 26px 0 8px; color: var(--ink); }
.article p, .entry-content p { margin: 0 0 16px; }
.article ul, .article ol, .entry-content ul, .entry-content ol { margin: 0 0 18px; padding-left: 24px; }
.article li, .entry-content li { margin-bottom: 8px; }
.article li::marker, .entry-content li::marker { color: var(--red-600); font-weight: 700; }
.entry-content > *:first-child { margin-top: 0; }

.breadcrumb { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--red-600); }

.callout {
  border-left: 4px solid var(--red-500);
  background: var(--red-50);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  margin: 22px 0;
}
.callout strong { color: var(--dark-2); }
.callout.warn { border-left-color: var(--amber-500); background: #fffbeb; }
.callout.danger { border-left-color: var(--rose-500); background: #fff1f2; }
.callout.info { border-left-color: var(--orange-500); background: #fff7ed; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 20px; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 4px 0 16px 52px;
  margin: 0;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--red-600);
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}
.steps li strong { display: block; font-size: 17px; }

/* ---------- tables ---------- */
.table-scroll { overflow-x: auto; margin: 0 0 22px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-size: 15px; background: #fff; }
th { background: var(--navy); color: #fff; text-align: left; padding: 12px 14px; font-weight: 700; }
td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: top; }
tr:nth-child(even) td { background: #f8fafc; }
td:first-child, th:first-child { font-weight: 600; }

/* ---------- FAQ ---------- */
details.faq {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
details.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 15px 18px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font-size: 22px; color: var(--red-600); flex-shrink: 0; }
details.faq[open] summary::after { content: "−"; }
details.faq p { margin: 0; padding: 0 18px 16px; color: var(--muted); }

/* ---------- calculator ---------- */
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 720px) { .calc-grid { grid-template-columns: 1fr; } }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.field .hint { font-weight: 400; color: var(--muted); font-size: 13px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 11px 13px;
  font-size: 16px;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--red-500); box-shadow: 0 0 0 3px var(--red-100);
}
.calc-results { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 24px; }
.calc-results h3 { margin: 0 0 16px; color: #fecaca; font-size: 17px; text-transform: uppercase; letter-spacing: 0.5px; }
.result-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.result-row:last-child { border-bottom: none; }
.result-row .label { color: #d1d5db; }
.result-row .value { font-weight: 800; font-size: 19px; color: #fff; }
.result-row .value.big { font-size: 30px; color: var(--red-400); }
.cap-note { background: rgba(245, 158, 11, 0.15); border: 1px solid rgba(245, 158, 11, 0.5); color: #fde68a; border-radius: var(--radius-sm); padding: 10px 13px; font-size: 14px; margin-top: 14px; }

/* ---------- misc ---------- */
.toc {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 0 0 28px;
  box-shadow: var(--shadow-sm);
}
.toc h2 { margin: 0 0 10px; font-size: 17px; }
.toc ol { margin: 0; padding-left: 22px; }
.toc li { margin-bottom: 5px; }
.toc a { font-weight: 600; }

.kicker {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--red-600);
  margin: 0 0 6px;
}
.related {
  background: var(--red-50);
  border: 1px solid var(--red-100);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 36px 0 0;
}
.related h2 { margin: 0 0 10px; font-size: 20px; }
.related ul { margin: 0; padding-left: 20px; }
.related li { margin-bottom: 6px; }

.teaser {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  background: linear-gradient(135deg, var(--red-700), var(--red-500));
  color: #fff;
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.teaser h2 { margin: 0 0 8px; color: #fff; }
.teaser p { margin: 0; color: #fee2e2; }
.teaser .teaser-text { flex: 1 1 320px; }
.teaser .teaser-cta { flex-shrink: 0; }

.official-line {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 26px;
  text-align: center;
  font-size: 16px;
  margin: 44px 0 0;
}
.official-line a { font-weight: 700; }

/* ---------- page header / archives ---------- */
.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: 34px; letter-spacing: -0.6px; margin: 0 0 8px; }
.page-header p { color: var(--muted); margin: 0; max-width: 640px; }
.cat-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 28px; padding: 0; list-style: none; }
.cat-list a {
  display: inline-block;
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 7px 16px;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
}
.cat-list a:hover { border-color: var(--red-500); color: var(--red-600); text-decoration: none; }
.cat-list .current-cat > a { background: var(--red-600); border-color: var(--red-600); color: #fff; }

/* ---------- pagination ---------- */
.pagination { margin: 36px 0 0; text-align: center; }
.nav-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.page-numbers {
  display: inline-block;
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 8px 14px;
  font-weight: 700;
  color: var(--ink);
  font-size: 15px;
  background: #fff;
}
.page-numbers:hover { border-color: var(--red-500); color: var(--red-600); text-decoration: none; }
.page-numbers.current { background: var(--red-600); border-color: var(--red-600); color: #fff; }

/* ---------- single post extras ---------- */
.post-nav { display: flex; justify-content: space-between; gap: 16px; margin: 40px 0 0; flex-wrap: wrap; }
.post-nav a {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-weight: 600;
  color: var(--ink);
  max-width: 48%;
  flex: 1;
  background: #fff;
}
.post-nav a:hover { border-color: var(--red-500); color: var(--red-600); text-decoration: none; }
.post-nav .nav-label { display: block; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); margin-bottom: 4px; }
.tags { margin: 28px 0 0; font-size: 14px; color: var(--muted); }
.tags a { font-weight: 600; }

.search-results-head { margin-bottom: 24px; }
.search-form-large { display: flex; gap: 10px; max-width: 480px; margin: 16px 0 0; }
.search-form-large input[type="search"] {
  flex: 1;
  padding: 12px 14px;
  font-size: 16px;
  border: 2px solid var(--line);
  border-radius: 12px;
  font-family: var(--font);
}
.search-form-large input[type="search"]:focus { outline: none; border-color: var(--red-500); }

/* ---------- footer (solid red) ---------- */
.site-footer {
  background: linear-gradient(180deg, var(--red-600), var(--red-700));
  color: #fee2e2;
  padding: 44px 0 30px;
  font-size: 14px;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 28px; margin-bottom: 28px; }
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h3 { color: #fff; font-size: 16px; margin: 0 0 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #fecaca; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 7px; }
.footer-menu { list-style: none; margin: 0; padding: 0; }
.footer-menu li { margin-bottom: 7px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  padding-top: 18px;
  margin: 0;
  color: #fecaca;
  text-align: center;
}
.footer-bottom a { color: #fff; font-weight: 700; }

/* ---------- scroll to top ---------- */
.scroll-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--navy);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
}
.scroll-top.visible { display: flex; }
.scroll-top:hover { background: var(--red-600); }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .featured-block-a,
  .featured-block-b { grid-template-columns: 1fr; }
  .carousel-track .white-card { flex-basis: calc((100% - 22px) / 2); }
  .howto-steps,
  .join-steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-bar-inner { flex-wrap: wrap; }
  .nav-bar nav { order: 3; flex-basis: 100%; }
  .main-nav {
    display: none;
    flex-direction: column;
    padding: 6px 0 12px;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 11px 4px; }
  .main-nav .menu-item-has-children > a::after { content: ""; }
  .main-nav .sub-menu {
    display: block;
    position: static;
    background: rgba(0, 0, 0, 0.18);
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0 0 4px 18px;
    min-width: 0;
  }
  .main-nav .sub-menu a { color: #fee2e2; font-size: 14px; padding: 8px 12px; }
  .main-nav .sub-menu a:hover { background: rgba(0, 0, 0, 0.16); color: #fff; }
  .featured-quad { grid-template-columns: 1fr; }
  .carousel-track .white-card { flex-basis: 82%; }
  .guides-grid { grid-template-columns: 1fr; }
  .home-intro h1 { font-size: 28px; }
  .featured-body h2 { font-size: 25px; }
  .article h1, .entry-content h1 { font-size: 29px; }
  body { font-size: 16px; }
}
@media (max-width: 600px) {
  .logo-badge { font-size: 28px; padding: 8px 22px 10px; }
  .ticker-label { padding: 10px 20px 10px 14px; font-size: 12px; }
  .howto-steps,
  .join-steps { grid-template-columns: 1fr; }
  .join-panel,
  .howto-panel { padding: 24px 20px; }
  .join-panel h2,
  .howto-panel h2 { font-size: 23px; }
}
