/* Executors Premium — dark + light modes, system font stack, no external assets.
   Dark is the default; html[data-theme="light"] switches the palette. */
:root {
  --bg: #0b0e14;
  --bg-soft: #12161f;
  --bg-card: #151a26;
  --border: #232a3a;
  --text: #e8ecf3;
  --text-muted: #9aa4b8;
  --accent: #7c5cff;
  --accent-soft: #7c5cff26;
  --header-bg: rgba(11, 14, 20, .92);
  --radius: 16px;
  --container: 1120px;
}
html[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-soft: #ffffff;
  --bg-card: #ffffff;
  --border: #dde2ec;
  --text: #141824;
  --text-muted: #5a6478;
  --accent-soft: #7c5cff1a;
  --header-bg: rgba(255, 255, 255, .92);
}
html[data-theme="light"] .badge { color: var(--accent); }
html[data-theme="light"] .card-media-placeholder,
html[data-theme="light"] .post-thumbnail-placeholder { color: #fff; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; border-radius: 12px; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 820px; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--accent);
  color: #fff; padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

/* Sticky header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.theme-toggle {
  background: var(--bg-card); color: var(--text); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 12px; font-size: .9rem; font-weight: 600; cursor: pointer;
  white-space: nowrap; flex-shrink: 0;
}
/* v1.3.1: the toggle is the last element in .header-inner (after the
 * primary nav and the header download slot). The nav's margin-left:auto
 * pushes nav + download slot + toggle to the right, so the toggle sits
 * at the far right corner on desktop. When the download slot is hidden
 * (display:none by ad-button.js when unconfigured), it takes no space
 * and the toggle is still last and far right. */
.theme-toggle:hover { border-color: var(--accent); }
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.site-brand { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.site-title { color: var(--text); font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
.site-title:hover { text-decoration: none; }
.site-tagline { color: var(--text-muted); font-size: .85rem; }
.custom-logo { max-height: 44px; width: auto; }
.primary-nav { margin-left: auto; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.primary-nav a { color: var(--text); padding: 8px 12px; border-radius: 10px; display: block; }
.primary-nav a:hover { background: var(--bg-card); text-decoration: none; }
.menu-toggle { display: none; margin-left: auto; background: var(--bg-card); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; font-size: 1.2rem; cursor: pointer; }

/* Header download button — same JS ad button as posts/pages, but
 * styled as a plain purple Download button in the header (Fluxus-style
 * position, right of the primary nav). Uses var(--accent), so it is
 * purple in both dark and light modes; the small "Ad" label is hidden
 * in the header only (post/page slots still show it). The slot is set
 * to display:none by ad-button.js when unconfigured for the visitor's
 * OS, so an empty slot takes no space. */
.header-ad-slot { margin: 0; flex-shrink: 0; }
.header-ad-slot .executor-ad-label { display: none; }
.header-ad-slot .executor-ad-btn {
  padding: 10px 18px; font-size: .95rem; border-radius: 10px; white-space: nowrap;
}

/* Buttons */
.btn {
  display: inline-block; background: var(--accent); color: #fff;
  padding: 12px 22px; border-radius: 12px; font-weight: 700; border: 0; cursor: pointer;
}
.btn:hover { text-decoration: none; filter: brightness(1.1); }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-small { padding: 9px 16px; font-size: .9rem; }
.btn-large { padding: 14px 28px; font-size: 1.05rem; }
.btn-disabled { background: var(--bg-card); color: var(--text-muted); border: 1px dashed var(--border); cursor: not-allowed; }

/* Hero */
.hero { padding: 64px 0 40px; background: radial-gradient(600px 300px at 20% 0%, var(--accent-soft), transparent 70%), var(--bg); }
.hero-eyebrow { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; margin: 0 0 10px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.1; margin: 0 0 14px; letter-spacing: -.03em; }
.hero-subtext { color: var(--text-muted); font-size: 1.15rem; max-width: 680px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* Sections */
.section { padding: 48px 0; }
.section-alt { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section h2, .section h3 { margin-top: 0; }
.page-title { font-size: 2rem; }
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 6px; }
.filter-btn { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px; cursor: pointer; font-weight: 600; }
.filter-btn.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.filter-note, .table-note, .faq-note { color: var(--text-muted); font-size: .9rem; }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; }
.executor-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s ease, border-color .15s ease; }
.executor-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.card-media { display: block; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--accent-soft), var(--bg-soft)); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.card-media-placeholder, .post-thumbnail-placeholder {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  font-size: 4rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--accent), #2a1f5c);
}
.card-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h2, .card-body h3 { margin: 0; font-size: 1.15rem; }
.card-body h2 a, .card-body h3 a { color: var(--text); }
.card-body p { color: var(--text-muted); margin: 0; }
.card-meta { list-style: none; margin: auto 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; color: var(--text-muted); font-size: .9rem; }
.badge { background: var(--accent-soft); color: #fff; border: 1px solid var(--accent); border-radius: 999px; padding: 2px 10px; font-size: .8rem; font-weight: 700; }

/* Features, steps, FAQ, tables */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 24px; }
.feature-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.feature-icon { font-size: 1.8rem; }
.feature-card h3 { margin: 10px 0 6px; }
.feature-card p { color: var(--text-muted); margin: 0; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 0; list-style: none; margin: 20px 0 36px; }
.steps li { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.steps span { color: var(--text-muted); }
.faq-list { display: grid; gap: 12px; margin-top: 20px; }
.faq-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; }
.faq-item summary { cursor: pointer; font-weight: 700; }
.faq-item p { color: var(--text-muted); }
.table-wrap { overflow-x: auto; margin-top: 20px; }
.compare-table { width: 100%; border-collapse: collapse; background: var(--bg-card); border-radius: 12px; overflow: hidden; }
.compare-table th, .compare-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left; }
.compare-table th { background: var(--bg-soft); }
.compare-table a { color: var(--text); }

/* Single post */
.single-post, .page-content { padding: 32px 0 16px; }
.post-header h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; }
.post-meta { color: var(--text-muted); }
.post-thumbnail { margin: 20px 0; }
.post-thumbnail-placeholder { aspect-ratio: 16 / 9; border-radius: 12px; }
.info-card { background: var(--bg-card); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 22px; margin: 24px 0; }
.info-card h2 { margin: 0 0 14px; font-size: 1.2rem; }
.info-card dl { margin: 0; display: grid; gap: 10px; }
.info-card dl div { display: flex; justify-content: space-between; gap: 16px; }
.info-card dt { color: var(--text-muted); }
.info-card dd { margin: 0; font-weight: 600; text-align: right; }
.download-area { margin: 24px 0; }

/* Download button ad — JS-built, auto-appended to posts and pages */
.executor-ad-slot { margin: 28px 0; text-align: center; }
.executor-ad-label {
  display: block; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 8px;
}
.executor-ad-btn {
  display: inline-block; background: var(--accent); color: #fff;
  padding: 14px 28px; border-radius: 12px; font-weight: 700; font-size: 1.05rem; border: 0; cursor: pointer;
}
.executor-ad-btn:hover { text-decoration: none; filter: brightness(1.1); }
.download-placeholder { background: var(--bg-card); border: 1px dashed var(--border); border-radius: 12px; padding: 16px 20px; color: var(--text-muted); }
.post-content { font-size: 1.05rem; }
.post-content h2, .post-content h3 { margin-top: 1.6em; }
.post-disclaimer { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin: 28px 0; }
.post-disclaimer p { color: var(--text-muted); }
.post-nav { display: flex; justify-content: space-between; gap: 16px; margin: 32px 0; flex-wrap: wrap; }
.pagination { margin: 28px 0; }
.pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 8px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-card); color: var(--text); }
.pagination span.current { background: var(--accent); border-color: var(--accent); }

/* Footer + mobile download bar */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding: 40px 0 28px; margin-top: 24px; }
.footer-widgets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 24px; }
.footer-disclaimer, .footer-text { color: var(--text-muted); }
.footer-menu { list-style: none; margin: 0 0 16px; padding: 0; display: flex; gap: 14px; flex-wrap: wrap; }
.footer-menu a { color: var(--text); }
.mobile-download-bar { display: none; }

/* Search form */
.search-form { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.search-form input[type="search"] { flex: 1; min-width: 220px; background: var(--bg-card); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 11px 14px; }
.search-form input[type="submit"] { background: var(--accent); color: #fff; border: 0; border-radius: 10px; padding: 11px 18px; font-weight: 700; cursor: pointer; }

/* Mobile-first responsive */
@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .footer-widgets { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .card-grid, .feature-grid { grid-template-columns: 1fr; }
  .menu-toggle { display: block; }
  .primary-nav { display: none; width: 100%; }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; padding: 12px 0 18px; }
  .header-inner { flex-wrap: wrap; }
  /* Mobile header: the download button stays visible (it is NOT hidden
   * with the menu toggle) — pushed to the right of the top row when
   * the menu is closed, and to its own right-aligned row below the
   * opened menu. It never overlaps the menu. v1.3.1: the theme toggle
   * is last in the DOM, so it follows the download slot in that same
   * right-aligned cluster — visible in the top row when the menu is
   * closed (download slot hidden when unconfigured), and on its own
   * right-aligned row below the opened menu, never overlapping it. */
  .header-ad-slot { margin-left: auto; }
  .theme-toggle { flex-shrink: 0; }
  .hero { padding: 44px 0 28px; }
  .info-card dl div { flex-direction: column; gap: 2px; }
  .info-card dd { text-align: left; }
  /* Sticky mobile download bar (single posts only, rendered in footer.php) */
  .mobile-download-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--bg-soft); border-top: 1px solid var(--border); padding: 12px 16px;
  }
  .mobile-download-title { font-weight: 700; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-download-bar .btn { padding: 10px 16px; white-space: nowrap; }
  body { padding-bottom: 64px; }
}
/* v1.2 — top info card, rating card, hub template */
.top-info-card { border-left: 0; border-top: 4px solid var(--accent); }
.top-info-card dl { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 640px) {
  .top-info-card dl { grid-template-columns: 1fr; }
}
.rating-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 22px; margin: 28px 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.rating-stars { color: var(--accent); font-size: 1.4rem; letter-spacing: 2px; }
.rating-value { font-size: 1.4rem; font-weight: 800; }
.rating-count { color: var(--text-muted); }
.hub-hero { text-align: center; }
.hub-hero-inner h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
.hub-subtitle { margin: 0 auto; }
.hub-subtitle p { color: var(--text-muted); font-size: 1.15rem; }
.hub-badge {
  display: inline-block; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 999px; padding: 8px 18px; font-weight: 700; margin-top: 18px;
}
.hub-card-body { gap: 8px; }
.badge-latest { align-self: flex-start; }
.hub-downloads { color: var(--text-muted); font-weight: 600; }
.search-count { color: var(--text-muted); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .executor-card { transition: none; }
}

/* v1.3 — footer columns + bottom bar (screenshot structure, own menu) */
.footer-columns { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding: 16px 0 24px; }
.footer-site-title { font-size: 1.35rem; }
.footer-tagline { color: var(--text-muted); max-width: 360px; }
.footer-column-title { text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; color: var(--text); margin: 0 0 14px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--text); text-decoration: none; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-bottom p { color: var(--text-muted); font-size: .9rem; margin: 0; }

/* v1.3 — hub breadcrumb, eyebrow, horizontal cards */
.breadcrumb { color: var(--text-muted); font-size: .9rem; margin: 0 0 18px; text-align: left; }
.breadcrumb a { color: var(--text-muted); }
.hub-eyebrow {
  display: inline-block; background: var(--accent-soft); border: 1px solid var(--accent);
  color: var(--accent); border-radius: 999px; padding: 6px 16px;
  font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 16px;
}
html[data-theme="light"] .hub-eyebrow { color: var(--accent); }
.hub-card-horizontal { flex-direction: row; align-items: center; gap: 16px; padding: 16px; }
.hub-card-icon { display: block; width: 72px; height: 72px; flex-shrink: 0; border-radius: 12px; overflow: hidden; background: linear-gradient(135deg, var(--accent-soft), var(--bg-soft)); }
.hub-card-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.hub-card-icon-placeholder {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  font-size: 2rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--accent), #2a1f5c);
}
.hub-card-horizontal .hub-card-body { padding: 0; gap: 6px; }
.hub-card-horizontal h2, .hub-card-horizontal h3 { font-size: 1.05rem; }
.hub-platforms { color: var(--text-muted); font-size: .9rem; }

/* v1.3 — homepage sections */
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero-pill {
  display: inline-block; background: var(--accent-soft); border: 1px solid var(--accent);
  color: var(--accent); border-radius: 999px; padding: 6px 14px; font-size: .8rem; font-weight: 700; margin: 0 0 14px;
}
.hero-checklist { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--text-muted); font-size: .9rem; }
.hero-checklist li::before { content: "✓ "; color: var(--accent); font-weight: 700; }
.hero-visual {
  min-height: 280px; border: 1px dashed var(--border); border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent-soft), var(--bg-soft));
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px;
}
.hero-visual-label { color: var(--text-muted); font-size: .95rem; }
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: start; }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mini-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.mini-card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.mini-card p { color: var(--text-muted); margin: 0; font-size: .95rem; }
.section-eyebrow { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; margin: 0 0 10px; }
.section-eyebrow-center, .section-title-center, .section-subtitle-center { text-align: center; }
.section-subtitle-center { color: var(--text-muted); max-width: 680px; margin: 0 auto; }
.feature-grid-6 { grid-template-columns: repeat(3, 1fr); }
.steps-numbered { grid-template-columns: repeat(3, 1fr); }
.key-system-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: start; }
.key-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: keystep; }
.key-steps li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.key-steps li::before {
  counter-increment: keystep; content: counter(keystep);
  width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0;
}
.key-steps li span { color: var(--text-muted); font-size: .95rem; }
.callout { background: var(--bg-card); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 22px 24px; }
.callout-title { font-weight: 800; margin: 0 0 8px; }
.callout p:last-child { color: var(--text-muted); margin: 0; }
.section-head-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.section-head-row h2 { margin: 0; }
.section-cta-inner { text-align: center; }
.section-cta-inner .btn { margin: 8px 0 16px; }
@media (max-width: 900px) {
  .hero-grid, .about-grid, .key-system-grid { grid-template-columns: 1fr; }
  .feature-grid-6, .steps-numbered { grid-template-columns: repeat(2, 1fr); }
  .footer-columns { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .feature-grid-6, .steps-numbered, .mini-grid, .footer-columns { grid-template-columns: 1fr; }
  .hero-visual { min-height: 180px; }
}
