/* ==========================================================================
   IndieFounder "Pixel Office" Design System
   Loaded LAST to re-skin the entire application across all public,
   admin, and modal views with consistent retro aesthetics:
   - Pixel display typography ("Pixelify Sans" / "Press Start 2P")
   - Square pixel-perfect corners (0px border-radius)
   - Hard 2px ink borders & tactile drop shadows (offset blocks)
   - Retro window panels, physical press buttons, and tactile controls
   - Cohesive light cream office & warm charcoal dark mode
   ========================================================================== */

/* ---------- 1. Global feel & geometry ---------- */
html body {
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--ink);
  font-family: var(--font-text);
  image-rendering: pixelated;
}

/* Enforce crisp square corners everywhere across all templates */
html:root:root:root body *:not(svg):not(svg *):not(.keep-radius) {
  border-radius: 0 !important;
}
html:root:root:root body * {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html:root:root:root body a {
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
:focus-visible {
  outline: 3px solid var(--accent) !important;
  outline-offset: 2px !important;
}
::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

/* ---------- 2. Typography: Pixel Headings & Display ---------- */
html:root:root:root body h1,
html:root:root:root body h2,
html:root:root:root body h3,
html:root:root:root body h4,
html:root:root:root body h5,
html:root:root:root body h6,
html:root:root:root body .brand-name,
html:root:root:root body .foot-brand-name,
html:root:root:root body .launch-name,
html:root:root:root body .launches-cat-heading,
html:root:root:root body .section-head h2,
html:root:root:root body .page-head h1,
html:root:root:root body .page-head h2,
html:root:root:root body .story-hero h1,
html:root:root:root body .story-card-title,
html:root:root:root body .course-card-title,
html:root:root:root body .courses-hub-title,
html:root:root:root body .docs-course-title,
html:root:root:root body .docs-group-title,
html:root:root:root body .ft-card h2,
html:root:root:root body .maker-card-identity h2,
html:root:root:root body .maker-hero-name,
html:root:root:root body .dash-head h1,
html:root:root:root body .dash-panel h2,
html:root:root:root body .job-title,
html:root:root:root body .fc-head h1,
html:root:root:root body .fc-post-by,
html:root:root:root body .wk-name,
html:root:root:root body .entry-body h2,
html:root:root:root body .entry-body h3,
html:root:root:root body .modal-title,
html:root:root:root body .launch-modal-title,
html:root:root:root body #submit-modal-title {
  font-family: var(--font-pixel) !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  line-height: 1.15;
  text-wrap: balance;
}
html:root:root:root body h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
html:root:root:root body h2 { font-size: clamp(1.5rem, 3vw, 2.15rem); }
html:root:root:root body h3 { font-size: 1.25rem; }

/* Eyebrows & Kickers */
html:root:root:root body .pixel-hero-kicker,
html:root:root:root body .hero-kicker,
html:root:root:root body .eyebrow,
html:root:root:root body .ft-eyebrow,
html:root:root:root body .docs-eyebrow,
html:root:root:root body .makers-eyebrow,
html:root:root:root body .dash-eyebrow,
html:root:root:root body .fc-eyebrow,
html:root:root:root body .ft-card-kicker,
html:root:root:root body .curriculum-head,
html:root:root:root body .story-deck-kicker,
html:root:root:root body .learn-explorer-kicker {
  font-family: var(--font-pixel) !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase;
}

/* Key Metrics & Big Numbers */
html:root:root:root body .status-bar b,
html:root:root:root body .stories-listing-stat strong,
html:root:root:root body .maker-stat-val,
html:root:root:root body .dash-metric-val,
html:root:root:root body .ft-primary-result strong,
html:root:root:root body .ft-result-row strong,
html:root:root:root body .fp-stat-value,
html:root:root:root body .launch-rank,
html:root:root:root body .wk-rank,
html:root:root:root body .step-num,
html:root:root:root body .share-step,
html:root:root:root body .today-rank-num {
  font-family: var(--font-pixel) !important;
  font-weight: 700 !important;
}

/* ---------- 3. Window panel mixin (Cards, Panels & Windows across ALL pages) ---------- */
html:root:root:root body .launch-card,
html:root:root:root body .home-launch-card,
html:root:root:root body .launches-panel,
html:root:root:root body .launches-side-panel,
html:root:root:root body .activity-card,
html:root:root:root body .activity-sidebar-card,
html:root:root:root body .ranking-sidebar-card,
html:root:root:root body .story-card,
html:root:root:root body .story-featured,
html:root:root:root body .stories-listing-stat,
html:root:root:root body .story-explorer-tools,
html:root:root:root body .maker-card,
html:root:root:root body .maker-product-card,
html:root:root:root body .maker-hero-card,
html:root:root:root body .topic-tile,
html:root:root:root body .cats-card,
html:root:root:root body .category-card,
html:root:root:root body .course-card-featured,
html:root:root:root body .course-card,
html:root:root:root body .docs-resource-card,
html:root:root:root body .docs-pager-card,
html:root:root:root body .docs-tabs,
html:root:root:root body .author-card,
html:root:root:root body .digest-story-card,
html:root:root:root body .digest-product-card,
html:root:root:root body .digest-article-card,
html:root:root:root body .tool-card,
html:root:root:root body .tool-panel,
html:root:root:root body .ft-card,
html:root:root:root body .ft-form-panel,
html:root:root:root body .ft-results,
html:root:root:root body .stats-panel,
html:root:root:root body .stat-card,
html:root:root:root body .potw-card,
html:root:root:root body .spotlight-card,
html:root:root:root body .post-card,
html:root:root:root body .entry,
html:root:root:root body .callout,
html:root:root:root body .sponsored-slot,
html:root:root:root body .sponsor-inline,
html:root:root:root body .foot-news,
html:root:root:root body .launches-search-bar,
html:root:root:root body .launch-modal-dialog,
html:root:root:root body .palette-dialog,
html:root:root:root body .palette-panel,
html:root:root:root body .roadmap-card,
html:root:root:root body .roadmap-node-card,
html:root:root:root body .library-card,
html:root:root:root body .series-card,
html:root:root:root body .series-hub-card,
html:root:root:root body .series-banner,
html:root:root:root body .dash-card,
html:root:root:root body .dash-panel,
html:root:root:root body .dash-preview-card,
html:root:root:root body .dash-login,
html:root:root:root body .dash-note,
html:root:root:root body .dash-msg,
html:root:root:root body .wk-item,
html:root:root:root body .today-ranking-card,
html:root:root:root body .cal-day,
html:root:root:root body .launch-calendar-card,
html:root:root:root body .job-card,
html:root:root:root body .jobs-post,
html:root:root:root body .fc-head,
html:root:root:root body .fc-compose,
html:root:root:root body .fc-feed-section,
html:root:root:root body .fc-post,
html:root:root:root body .fp-card,
html:root:root:root body .fc-empty,
html:root:root:root body .share-editor,
html:root:root:root body .share-preview-pane,
html:root:root:root body .post-rail .toc,
html:root:root:root body .post-author-box,
html:root:root:root body .article-author-card,
html:root:root:root body .article-cta,
html:root:root:root body .related-posts,
html:root:root:root body .admin-section,
html:root:root:root body .admin-card,
html:root:root:root body .nf-card,
html:root:root:root body .nf-search-box {
  background: var(--card-bg) !important;
  border: var(--bw) solid var(--card-border) !important;
  box-shadow: var(--card-shadow) !important;
  transition: transform 0.08s steps(2), box-shadow 0.08s steps(2), border-color 0.08s steps(2);
}

/* Card hover tactile lift */
html:root:root:root body .launch-card:hover,
html:root:root:root body .home-launch-card:hover,
html:root:root:root body .story-card:hover,
html:root:root:root body .story-featured:hover,
html:root:root:root body .maker-card:hover,
html:root:root:root body .maker-product-card:hover,
html:root:root:root body .topic-tile:hover,
html:root:root:root body .cats-card:hover,
html:root:root:root body .category-card:hover,
html:root:root:root body .course-card-featured:hover,
html:root:root:root body .course-card:hover,
html:root:root:root body .docs-resource-card:hover,
html:root:root:root body .docs-pager-card:hover,
html:root:root:root body .author-card:hover,
html:root:root:root body .tool-card:hover,
html:root:root:root body .ft-card:hover,
html:root:root:root body .potw-card:hover,
html:root:root:root body .digest-story-card:hover,
html:root:root:root body .digest-product-card:hover,
html:root:root:root body .digest-article-card:hover,
html:root:root:root body .post-card:hover,
html:root:root:root body .entry:hover,
html:root:root:root body .wk-item:hover,
html:root:root:root body .job-card:hover,
html:root:root:root body .fc-post:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--card-hover-shadow) !important;
  border-color: var(--card-hover-border) !important;
}

/* Card active press */
html:root:root:root body .launch-card:active,
html:root:root:root body .story-card:active,
html:root:root:root body .topic-tile:active,
html:root:root:root body .entry:active,
html:root:root:root body .wk-item:active,
html:root:root:root body .job-card:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink) !important;
}

/* ---------- 4. Buttons & Interactive Controls ---------- */
html:root:root:root body .button,
html:root:root:root body .btn,
html:root:root:root body .btn-primary,
html:root:root:root body .lcat-hero-submit-btn,
html:root:root:root body .launch-submit-trigger,
html:root:root:root body .hm-btn,
html:root:root:root body .hm-btn-primary,
html:root:root:root body .pg-btn,
html:root:root:root body .pg-btn-primary,
html:root:root:root body .dash-btn,
html:root:root:root body .dash-btn-primary,
html:root:root:root body .spotlight-visit-btn,
html:root:root:root body .spotlight-story-btn,
html:root:root:root body .cats-btn,
html:root:root:root body .foot-news-row button,
html:root:root:root body button[type="submit"],
html:root:root:root body .launch-page-btn,
html:root:root:root body .maker-x-btn,
html:root:root:root body .course-start-btn,
html:root:root:root body .detail-badge-btn,
html:root:root:root body .detail-visit-btn,
html:root:root:root body .badge-copy-btn,
html:root:root:root body .badge-style-btn,
html:root:root:root body .digest-share-btn,
html:root:root:root body .otp-resend-btn,
html:root:root:root body .login-btn,
html:root:root:root body .docs-vote-btn,
html:root:root:root body .docs-copy-page-btn,
html:root:root:root body .docs-mobile-nav-toggle,
html:root:root:root body .nav-submit {
  font-family: var(--font-pixel) !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  background: var(--accent) !important;
  color: var(--accent-ink) !important;
  border: var(--bw) solid var(--line-strong) !important;
  box-shadow: 3px 3px 0 var(--line-strong) !important;
  text-decoration: none !important;
  cursor: pointer;
  transition: transform 0.06s steps(2), box-shadow 0.06s steps(2), background-color 0.06s steps(2);
}

html:root:root:root body .button:hover,
html:root:root:root body .btn:hover,
html:root:root:root body .btn-primary:hover,
html:root:root:root body .lcat-hero-submit-btn:hover,
html:root:root:root body .hm-btn:hover,
html:root:root:root body .hm-btn-primary:hover,
html:root:root:root body .pg-btn:hover,
html:root:root:root body .dash-btn:hover,
html:root:root:root body .course-start-btn:hover,
html:root:root:root body .foot-news-row button:hover,
html:root:root:root body button[type="submit"]:hover {
  background: var(--accent-hover) !important;
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--line-strong) !important;
}

html:root:root:root body .button:active,
html:root:root:root body .btn:active,
html:root:root:root body .lcat-hero-submit-btn:active,
html:root:root:root body .hm-btn:active,
html:root:root:root body .pg-btn:active,
html:root:root:root body .dash-btn:active,
html:root:root:root body .course-start-btn:active,
html:root:root:root body button[type="submit"]:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--line-strong) !important;
}

/* Secondary / Ghost buttons */
html:root:root:root body .button.ghost,
html:root:root:root body .button.quiet,
html:root:root:root body .hm-btn-ghost,
html:root:root:root body .pg-btn-ghost,
html:root:root:root body .dash-btn-quiet,
html:root:root:root body .btn-quiet,
html:root:root:root body .cats-btn-quiet,
html:root:root:root body .palette-trigger,
html:root:root:root body .theme-toggle {
  background: var(--btn-quiet-bg) !important;
  color: var(--ink) !important;
  border: var(--bw) solid var(--line-strong) !important;
  box-shadow: 2px 2px 0 var(--line-strong) !important;
}
html:root:root:root body .button.ghost:hover,
html:root:root:root body .hm-btn-ghost:hover,
html:root:root:root body .pg-btn-ghost:hover,
html:root:root:root body .dash-btn-quiet:hover {
  background: var(--surface-2) !important;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--line-strong) !important;
}

/* Upvote buttons */
html:root:root:root body .launch-upvote-btn,
html:root:root:root body .vote-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 52px;
  padding: 8px 6px !important;
  background: var(--surface) !important;
  color: var(--ink) !important;
  border: var(--bw) solid var(--line-strong) !important;
  box-shadow: 3px 3px 0 var(--line-strong) !important;
  font-family: var(--font-pixel) !important;
  font-weight: 700;
  cursor: pointer;
}
html:root:root:root body .launch-upvote-btn:hover,
html:root:root:root body .vote-btn:hover {
  background: var(--accent) !important;
  color: var(--accent-ink) !important;
  transform: translate(-1px, -1px);
}
html:root:root:root body .launch-upvote-btn[aria-pressed="true"],
html:root:root:root body .launch-upvote-btn.is-voted,
html:root:root:root body .vote-btn.is-voted {
  background: var(--accent) !important;
  color: var(--accent-ink) !important;
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--line-strong) !important;
}

/* ---------- 5. Pills, Badges, Tabs & Chips across ALL pages ---------- */
html:root:root:root body .tag,
html:root:root:root body .chip,
html:root:root:root body .badge,
html:root:root:root body .launch-rank,
html:root:root:root body .launch-cat-pill,
html:root:root:root body .lcat-pill,
html:root:root:root body .lcat-time-btn,
html:root:root:root body .launch-filter-pill,
html:root:root:root body .launch-sort-btn,
html:root:root:root body .pricing-filter-btn,
html:root:root:root body .stats-tab-btn,
html:root:root:root body .roadmap-tab-btn,
html:root:root:root body .submit-cat-btn,
html:root:root:root body .topic-pill,
html:root:root:root body .post-category-pill,
html:root:root:root body .story-stage-pill,
html:root:root:root body .story-type-badge,
html:root:root:root body .course-badge,
html:root:root:root body .docs-course-chip,
html:root:root:root body .docs-tab,
html:root:root:root body .job-type,
html:root:root:root body .jobs-filter,
html:root:root:root body .fp-verified,
html:root:root:root body .share-live-pill,
html:root:root:root body .wk-tag,
html:root:root:root body .palette-filter-pill,
html:root:root:root body .palette-kbd,
html:root:root:root body .palette-esc-badge,
html:root:root:root body .launch-pricing-pill,
html:root:root:root body .launch-fresh-pill,
html:root:root:root body .spotlight-crown-badge,
html:root:root:root body .spotlight-tag,
html:root:root:root body .status-badge,
html:root:root:root body .rank-badge,
html:root:root:root body .phase-pill,
html:root:root:root body .tech-pill,
html:root:root:root body .library-tab,
html:root:root:root body .glossary-cat-pill,
html:root:root:root body .launches-top20-label {
  font-family: var(--font-pixel) !important;
  letter-spacing: 0.02em !important;
  text-transform: none;
  background: var(--surface) !important;
  color: var(--ink) !important;
  border: 1px solid var(--line-strong) !important;
  box-shadow: 2px 2px 0 var(--line-strong);
  padding: 4px 10px;
  font-size: 0.88rem;
  white-space: nowrap;
}

html:root:root:root body .lcat-pill:hover,
html:root:root:root body .lcat-time-btn:hover,
html:root:root:root body .jobs-filter:hover,
html:root:root:root body .docs-tab:hover,
html:root:root:root body .topic-pill:hover {
  background: var(--surface-2) !important;
}

html:root:root:root body .lcat-pill.is-active,
html:root:root:root body .lcat-time-btn.is-active,
html:root:root:root body .launch-filter-pill.is-active,
html:root:root:root body .stats-tab-btn.is-active,
html:root:root:root body .roadmap-tab-btn.is-active,
html:root:root:root body .submit-cat-btn.is-active,
html:root:root:root body .palette-filter-pill.is-active,
html:root:root:root body .jobs-filter.is-active,
html:root:root:root body .docs-tab.is-active,
html:root:root:root body .topic-pill.is-active {
  background: var(--accent) !important;
  color: var(--accent-ink) !important;
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--line-strong) !important;
}
html:root:root:root body .lcat-divider {
  background: var(--line-strong) !important;
  width: 2px !important;
}

/* Rank badges */
html:root:root:root body .launch-rank.rank-1,
html:root:root:root body .wk-item[data-rank="1"] .wk-rank {
  background: #ffd34d !important;
  color: #2b2118 !important;
}
html:root:root:root body .launch-rank.rank-2,
html:root:root:root body .wk-item[data-rank="2"] .wk-rank {
  background: #cfd3d8 !important;
  color: #2b2118 !important;
}
html:root:root:root body .launch-rank.rank-3,
html:root:root:root body .wk-item[data-rank="3"] .wk-rank {
  background: #e39a5b !important;
  color: #2b2118 !important;
}

/* ---------- 6. Avatars, Media & Icons ---------- */
html:root:root:root body .maker-avatar,
html:root:root:root body .story-avatar,
html:root:root:root body .launch-maker-avatar,
html:root:root:root body .fc-avatar,
html:root:root:root body .fp-avatar,
html:root:root:root body .author-avatar,
html:root:root:root body .user-avatar,
html:root:root:root body .curriculum-icon,
html:root:root:root body .launch-icon-box,
html:root:root:root body .wk-icon {
  border-radius: 0 !important;
  border: var(--bw) solid var(--line-strong) !important;
  box-shadow: 2px 2px 0 var(--line-strong);
  image-rendering: auto !important;
  background: var(--surface-2) !important;
  color: var(--ink) !important;
}
html:root:root:root body .brand-mark,
html:root:root:root body .foot-mark {
  width: 32px !important;
  height: 32px !important;
  display: block;
  flex-shrink: 0;
  transition: transform 0.08s steps(2);
}
html:root:root:root body .brand-mark .mark-face,
html:root:root:root body .foot-mark .mark-face {
  fill: var(--accent) !important;
  stroke: var(--line-strong) !important;
  stroke-width: 2;
}
html:root:root:root body .brand-mark .mark-shadow,
html:root:root:root body .foot-mark .mark-shadow {
  fill: var(--line-strong) !important;
}
html:root:root:root body .brand-mark .mark-glyph,
html:root:root:root body .foot-mark .mark-glyph {
  fill: var(--accent-ink) !important;
}

/* ---------- 7. Forms, Inputs, Textareas & Selects ---------- */
html:root:root:root body input,
html:root:root:root body textarea,
html:root:root:root body select,
html:root:root:root body .launches-search-input,
html:root:root:root body .palette-input {
  background: var(--surface) !important;
  color: var(--ink) !important;
  border: var(--bw) solid var(--line-strong) !important;
  box-shadow: inset 3px 3px 0 var(--line);
  font-family: var(--font-text);
  border-radius: 0 !important;
}
html:root:root:root body .launches-search-input,
html:root:root:root body .palette-input {
  border: 0 !important;
  box-shadow: none !important;
}
html:root:root:root body input::placeholder,
html:root:root:root body textarea::placeholder {
  color: var(--muted);
}

/* Retro Range Sliders */
html:root:root:root body input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: var(--surface-2) !important;
  border: var(--bw) solid var(--line-strong) !important;
  height: 14px;
  box-shadow: inset 2px 2px 0 var(--line);
  padding: 0;
}
html:root:root:root body input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 26px;
  background: var(--accent);
  border: var(--bw) solid var(--line-strong);
  box-shadow: 2px 2px 0 var(--line-strong);
  cursor: pointer;
  border-radius: 0;
}

/* Retro Step Wizard (Submit modal) */
html:root:root:root body .submit-steps-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: var(--bw) dashed var(--line-strong);
  margin-bottom: 16px;
}
html:root:root:root body .submit-step-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: var(--bw) solid var(--line-strong);
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--font-pixel);
  font-size: 0.95rem;
}
html:root:root:root body .submit-step-indicator.is-active {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 2px 2px 0 var(--line-strong);
}

/* ---------- 8. Modals, Backdrops & Dialogs ---------- */
html:root:root:root body .launch-modal-dialog,
html:root:root:root body .palette-dialog,
html:root:root:root body .palette-panel,
html:root:root:root body .badge-modal-dialog {
  box-shadow: 8px 8px 0 var(--line-strong) !important;
  border: var(--bw) solid var(--line-strong) !important;
  background: var(--card-bg) !important;
}
html:root:root:root body .launch-modal-header,
html:root:root:root body .palette-search-bar {
  border-bottom: var(--bw) solid var(--line-strong) !important;
}
html:root:root:root body .launch-modal-close,
html:root:root:root body .palette-esc-badge {
  border: var(--bw) solid var(--line-strong) !important;
  background: var(--surface-2) !important;
  color: var(--ink) !important;
  cursor: pointer;
}
html:root:root:root body .launch-modal-close:hover,
html:root:root:root body .palette-esc-badge:hover {
  background: var(--accent) !important;
  color: var(--accent-ink) !important;
}
html:root:root:root body .launch-modal-overlay,
html:root:root:root body .launch-modal-backdrop,
html:root:root:root body .palette-backdrop,
html:root:root:root body .palette-overlay {
  background: rgba(30, 24, 18, 0.65) !important;
}

/* ---------- 9. Prose, Callouts, Tables & Code ---------- */
html:root:root:root body .prose a,
html:root:root:root body .post-body a,
html:root:root:root body article p a {
  color: var(--accent-text);
  font-weight: 600;
  text-decoration-color: var(--accent);
}
html:root:root:root body .prose blockquote,
html:root:root:root body blockquote {
  border-left: 6px solid var(--accent) !important;
  background: var(--surface-2);
  padding: 12px 16px;
  margin-inline: 0;
  border: var(--bw) solid var(--line-strong);
  border-left-width: 8px !important;
  box-shadow: 3px 3px 0 var(--line-strong);
}
html:root:root:root body pre,
html:root:root:root body .code-block,
html:root:root:root body .highlight {
  background: var(--code-bg) !important;
  color: var(--code-ink) !important;
  border: var(--bw) solid var(--line-strong) !important;
  box-shadow: 4px 4px 0 var(--line-strong);
}
html:root:root:root body code { font-family: var(--font-mono); }
html:root:root:root body :not(pre) > code {
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  padding: 0 5px;
  color: var(--ink);
}
html:root:root:root body table {
  border-collapse: collapse;
  border: var(--bw) solid var(--line-strong);
  width: 100%;
}
html:root:root:root body th {
  background: var(--accent-soft);
  font-family: var(--font-pixel);
  text-align: left;
}
html:root:root:root body th,
html:root:root:root body td {
  border: 1px solid var(--line-strong);
  padding: 8px 10px;
}
html:root:root:root body hr {
  border: 0;
  border-top: var(--bw) dashed var(--line-strong);
  margin-block: 2rem;
}

/* ---------- 10. Header, Navigation & Sticky Category Nav ---------- */
html:root:root:root body .site-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 120 !important;
  background: var(--header-bg) !important;
  border-bottom: var(--bw) solid var(--header-border) !important;
  box-shadow: 0 4px 0 var(--accent);
}
html:root:root:root body .site-header .bar {
  min-height: var(--header-h);
  gap: clamp(10px, 1.6vw, 22px);
}
html:root:root:root body .brand,
html:root:root:root body .foot-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
}
html:root:root:root body .brand-name,
html:root:root:root body .foot-brand-name {
  font-family: var(--font-pixel) !important;
  font-weight: 700 !important;
  font-size: 1.35rem;
  letter-spacing: 0;
  text-decoration: none !important;
  color: var(--ink);
}
html:root:root:root body .foot-brand-name {
  color: var(--floor-ink) !important;
}
html:root:root:root body .brand-name b {
  color: var(--accent-text);
  font-weight: 700;
}
html:root:root:root body .foot-brand-name b {
  color: var(--ink) !important;
}
html:root:root:root body .brand-cursor,
html:root:root:root body .foot-cursor {
  display: inline-block;
  color: var(--accent);
  font-weight: 700;
  margin-left: 2px;
  animation: retro-blink 1.1s steps(2, start) infinite;
}
@keyframes retro-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
html:root:root:root body .brand:hover .brand-mark,
html:root:root:root body .foot-brand:hover .foot-mark {
  transform: translate(-1px, -1px);
}
html:root:root:root body .brand:active .brand-mark,
html:root:root:root body .foot-brand:active .foot-mark {
  transform: translate(2px, 2px);
}

html:root:root:root body .main-nav a {
  font-family: var(--font-pixel) !important;
  font-size: 1rem !important;
  font-weight: 600;
  color: var(--ink-soft);
  border: var(--bw) solid transparent;
  letter-spacing: 0 !important;
}
html:root:root:root body .main-nav a:hover {
  background: var(--surface-2);
  border-color: var(--line-strong);
  color: var(--ink);
}
html:root:root:root body .main-nav a[aria-current="page"] {
  background: var(--accent) !important;
  color: var(--accent-ink) !important;
  border-color: var(--line-strong);
  box-shadow: 2px 2px 0 var(--line-strong);
}
html:root:root:root body .main-nav a[aria-current="page"]::after {
  display: none !important;
}

/* Desktop sticky category nav */
html:root:root:root body .launches-cat-nav-wrap {
  position: sticky !important;
  top: var(--header-h, 60px) !important;
  z-index: 95 !important;
  background: var(--surface) !important;
  border-bottom: var(--bw) solid var(--line-strong) !important;
}
html:root:root:root body .launches-cat-nav {
  gap: 8px !important;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 10px 0;
}

/* Mobile & Tablet Header & Sticky Category Nav (< 1080px) */
@media (max-width: 1080px) {
  :root {
    --header-h: 96px;
    --if-main-nav-sticky-height: 96px;
  }
  html:root:root:root body .site-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 120 !important;
  }
  html:root:root:root body .main-nav {
    justify-content: flex-start !important;
    overflow-x: auto !important;
    gap: 4px !important;
    scrollbar-width: none;
    border-top: var(--bw) dashed var(--line-strong) !important;
    padding: 8px 0 4px !important;
  }
  html:root:root:root body .main-nav a {
    letter-spacing: 0 !important;
    font-size: 1rem !important;
    padding: 6px 10px !important;
    flex: 0 0 auto !important;
  }
  html:root:root:root body .launches-cat-nav-wrap {
    position: sticky !important;
    top: var(--header-h) !important;
    z-index: 110 !important;
    margin-block: 0 !important;
    padding-block: 0 !important;
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25);
  }
  html:root:root:root body .launches-cat-nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    max-width: 100%;
    padding: 8px var(--gutter, 16px) !important;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 720px) {
  :root {
    --header-h: 96px;
    --if-main-nav-sticky-height: 96px;
  }
  html:root:root:root body .bar-actions > .button.nav-submit {
    display: inline-flex !important;
    min-height: 34px;
    padding: 0 10px;
  }
  html:root:root:root body .bar-actions > #nav-login {
    display: none !important;
  }
  html:root:root:root body .launches-cat-nav {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
  }
}

/* Home hero: pixel office banner */
html:root:root:root body .pixel-hero {
  border-bottom: var(--bw) solid var(--line-strong);
  background: var(--floor);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 2px, transparent 2px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 2px, transparent 2px);
  background-size: 32px 32px;
  color: var(--floor-ink);
}
html:root:root:root body .pixel-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(16px, 3vw, 40px);
  align-items: center;
  padding-block: clamp(1.5rem, 4vw, 3rem);
}
html:root:root:root body .pixel-hero-kicker {
  display: inline-block;
  padding: 4px 10px;
  margin-bottom: 14px;
  font: 700 0.8rem var(--font-pixel);
  background: var(--ink);
  color: var(--bg);
  border: var(--bw) solid var(--line-strong);
}
html:root:root:root body .pixel-hero h1 {
  color: var(--floor-ink);
  margin: 0 0 12px;
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.18);
}
html:root:root:root body .pixel-hero p {
  max-width: 46ch;
  font-size: 1.05rem;
  color: var(--floor-ink);
  margin: 0 0 18px;
}
html:root:root:root body .pixel-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
html:root:root:root body .pixel-hero-cta .button {
  min-height: 44px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
}
html:root:root:root body .pixel-hero-art {
  image-rendering: pixelated;
  shape-rendering: crispEdges;
  width: 100%;
  height: auto;
  border: var(--bw) solid var(--line-strong);
  box-shadow: 6px 6px 0 var(--line-strong);
  background: var(--surface);
}
html:root:root:root body .status-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding: 8px 0;
  font: 600 0.9rem var(--font-pixel);
  color: var(--floor-ink);
}
html:root:root:root body .status-bar b {
  color: var(--ink);
  background: var(--accent);
  padding: 0 6px;
  border: 1px solid var(--line-strong);
  margin-right: 6px;
}
@media (max-width: 820px) {
  html:root:root:root body .pixel-hero-inner { grid-template-columns: 1fr; }
  html:root:root:root body .pixel-hero-art { max-width: 520px; }
}

/* Product feed list */
html:root:root:root body .launches-feed,
html:root:root:root body .launches-main-col .launches-feed {
  display: flex !important;
  flex-direction: column !important;
  gap: 18px !important;
  border: 0 !important;
  background: transparent !important;
  overflow: visible !important;
  box-shadow: none !important;
  padding: 0 0 6px !important;
}
html:root:root:root body .launches-feed .launch-card,
html:root:root:root body .launches-main-col .launch-card {
  grid-template-columns: 54px 56px minmax(0, 1fr) 56px !important;
  column-gap: 14px !important;
  border: var(--bw) solid var(--card-border) !important;
}
html:root:root:root body .launches-feed .launch-card:hover {
  background: color-mix(in srgb, var(--accent) 20%, var(--card-bg)) !important;
}
@media (max-width: 680px) {
  html:root:root:root body .launches-main-col .launch-card,
  html:root:root:root body .launches-feed .launch-card {
    grid-template-columns: 44px 52px minmax(0, 1fr) 48px !important;
    column-gap: 8px !important;
    padding: 12px !important;
  }
  html:root:root:root body .launches-main-col .launch-icon-box {
    width: 52px !important;
    min-width: 52px !important;
    height: 52px !important;
  }
}

/* Sponsored slots */
html:root:root:root body .sponsored-slot,
html:root:root:root body .sponsor-inline {
  background: repeating-linear-gradient(45deg, var(--surface), var(--surface) 10px, var(--surface-2) 10px, var(--surface-2) 20px) !important;
}

/* ---------- 11. Footer: office floor taskbar ---------- */
html:root:root:root body .site-footer {
  background: var(--floor) !important;
  color: var(--floor-ink) !important;
  border-top: var(--bw) solid var(--line-strong) !important;
  box-shadow: 0 -4px 0 var(--accent);
  margin-top: 3rem;
}
html:root:root:root body .site-footer a {
  color: var(--floor-ink) !important;
}
html:root:root:root body .site-footer a:hover {
  background: var(--accent);
  color: var(--accent-ink) !important;
}
html:root:root:root body .foot-col h2 {
  font-size: 1.1rem;
  color: var(--ink);
  background: var(--accent);
  display: inline-block;
  padding: 1px 8px;
  border: var(--bw) solid var(--line-strong);
}
html:root:root:root body .foot-news {
  background: var(--surface) !important;
  color: var(--ink) !important;
}
html:root:root:root body .foot-news a,
html:root:root:root body .foot-news * {
  color: var(--ink);
}
html:root:root:root body .foot-dots {
  display: none !important;
}
html:root:root:root body .foot-base {
  border-top: var(--bw) dashed var(--line-strong) !important;
}
html:root:root:root body .foot-visitors strong {
  background: var(--ink);
  color: var(--bg);
  padding: 0 6px;
}
html:root:root:root body .theme-switch {
  border: var(--bw) solid var(--line-strong);
  background: var(--surface);
}
html:root:root:root body .theme-switch button {
  color: var(--ink);
}
html:root:root:root body .theme-switch button[aria-pressed="true"],
html:root:root:root body .theme-switch button.is-active {
  background: var(--accent);
  color: var(--accent-ink);
}

/* ---------- 12. Dark theme: soften cream outlines & ensure high contrast ---------- */
:root[data-theme="dark"],
:root.dark {
  --line-strong: #c5c0b2;
  --header-border: #8b877d;
  --card-border: #77746d;
  --card-hover-border: #facc15;
  --card-shadow: 3px 3px 0 #080808;
  --card-hover-shadow: 4px 4px 0 #080808;
  --btn-quiet-bg: #262626;
  --btn-quiet-hover: #303030;
}

:root[data-theme="dark"] body .launch-card,
:root.dark body .launch-card,
:root[data-theme="dark"] body .home-launch-card,
:root.dark body .home-launch-card,
:root[data-theme="dark"] body .launches-panel,
:root.dark body .launches-panel,
:root[data-theme="dark"] body .sponsored-slot,
:root.dark body .sponsored-slot,
:root[data-theme="dark"] body .sponsor-inline,
:root.dark body .sponsor-inline,
:root[data-theme="dark"] body .entry,
:root.dark body .entry,
:root[data-theme="dark"] body .course-card-featured,
:root.dark body .course-card-featured,
:root[data-theme="dark"] body .story-card,
:root.dark body .story-card,
:root[data-theme="dark"] body .maker-card,
:root.dark body .maker-card,
:root[data-theme="dark"] body .dash-card,
:root.dark body .dash-card,
:root[data-theme="dark"] body .job-card,
:root.dark body .job-card,
:root[data-theme="dark"] body .ft-card,
:root.dark body .ft-card,
:root[data-theme="dark"] body .wk-item,
:root.dark body .wk-item {
  border-color: #77746d !important;
}

:root[data-theme="dark"] body .palette-trigger,
:root.dark body .palette-trigger,
:root[data-theme="dark"] body .theme-toggle,
:root.dark body .theme-toggle,
:root[data-theme="dark"] body .launches-cat-nav-wrap,
:root.dark body .launches-cat-nav-wrap,
:root[data-theme="dark"] body .launches-cat-hero,
:root.dark body .launches-cat-hero {
  background-color: #202020 !important;
}

:root[data-theme="dark"] body .launches-search-bar,
:root.dark body .launches-search-bar,
:root[data-theme="dark"] body .launches-search-input,
:root.dark body .launches-search-input,
:root[data-theme="dark"] body input,
:root.dark body input,
:root[data-theme="dark"] body textarea,
:root.dark body textarea,
:root[data-theme="dark"] body select,
:root.dark body select {
  border-color: #77746d !important;
}

:root[data-theme="dark"] body .brand-mark .mark-shadow,
:root.dark body .brand-mark .mark-shadow,
:root[data-theme="dark"] body .foot-mark .mark-shadow,
:root.dark body .foot-mark .mark-shadow {
  fill: #000000 !important;
}
:root[data-theme="dark"] body .brand-mark .mark-face,
:root.dark body .brand-mark .mark-face,
:root[data-theme="dark"] body .foot-mark .mark-face,
:root.dark body .foot-mark .mark-face {
  fill: #facc15 !important;
  stroke: #171512 !important;
}
:root[data-theme="dark"] body .brand-mark .mark-glyph,
:root.dark body .brand-mark .mark-glyph,
:root[data-theme="dark"] body .foot-mark .mark-glyph,
:root.dark body .foot-mark .mark-glyph {
  fill: #171512 !important;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
