/* ==========================================================================
   PixelFX Studio v2.0 — Modern Pixel Art VFX Engine & Interactive Gallery
   Designed for https://pixelfx.getpicforge.com/gallery/
   ========================================================================== */

:root {
  --bg-void: #07070c;
  --bg-ground: #0b0a12;
  --bg-surface: #12111d;
  --bg-elevated: #191728;
  --bg-stage: #141220;
  --bg-glass: rgba(14, 13, 23, 0.86);
  --ink: #f8f7fc;
  --ink-secondary: #b9b5cc;
  --ink-muted: #7e7996;
  --line: #27243a;
  --line-bright: #3d3859;
  --accent: #f53cd1;
  --accent-soft: rgba(245, 60, 209, 0.15);
  --accent-glow: rgba(245, 60, 209, 0.38);
  --cyan: #2de2e6;
  --cyan-soft: rgba(45, 226, 230, 0.14);
  --emerald: #36e29a;
  --amber: #ffb84d;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --display: "Press Start 2P", ui-monospace, "SFMono-Regular", monospace;
  --text: "Funnel Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "Red Hat Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg-void);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 0%, rgba(245, 60, 209, 0.08) 0%, transparent 42%),
    radial-gradient(circle at 82% 4%, rgba(45, 226, 230, 0.06) 0%, transparent 40%),
    var(--bg-void);
  color: var(--ink);
  font: 400 15px/1.55 var(--text);
  padding-left: max(18px, env(safe-area-inset-left, 0px));
  padding-right: max(18px, env(safe-area-inset-right, 0px));
  padding-block: 0 56px;
  min-height: 100vh;
}

a {
  color: inherit;
  transition: color 0.15s ease, border-color 0.15s ease;
}

button, input, select {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Skip link for accessibility & SEO */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--accent);
  color: #000;
  font: 600 13px/1 var(--mono);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
}

/* ==========================================================================
   Header & Hero Studio Banner
   ========================================================================== */
.head-wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding-top: 24px;
  padding-bottom: 18px;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.mark {
  width: 38px;
  height: 38px;
  flex: none;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 10px rgba(245, 60, 209, 0.35));
}

.brand-text {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.brand-title {
  margin: 0;
  font: 400 24px/1.2 var(--display);
  letter-spacing: -0.02em;
  color: var(--ink);
}

.brand-badge {
  font: 500 11px/1 var(--mono);
  color: var(--cyan);
  background: var(--cyan-soft);
  border: 1px solid rgba(45, 226, 230, 0.3);
  padding: 4px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.links {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 500 12px/1 var(--mono);
  flex-wrap: wrap;
}

.links a {
  text-decoration: none;
  color: var(--ink-secondary);
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-surface);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.links a:hover {
  color: var(--ink);
  border-color: var(--line-bright);
  background: var(--bg-elevated);
}

.lang-btn {
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  font: 500 12px/1 var(--mono);
  cursor: pointer;
  transition: all 0.15s ease;
}

.lang-btn:hover {
  background: var(--accent);
  color: #000;
}

/* Hero Banner */
.hero-banner {
  margin-top: 20px;
  background: linear-gradient(135deg, rgba(25, 23, 40, 0.85) 0%, rgba(15, 14, 25, 0.92) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 16px 16px;
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 500 11px/1 var(--mono);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.hero-eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
}

.hero-headline {
  margin: 0 0 10px;
  font: 600 22px/1.35 var(--text);
  color: var(--ink);
}

.hero-sub {
  margin: 0;
  font: 400 14px/1.55 var(--text);
  color: var(--ink-secondary);
  max-width: 68ch;
}

.hero-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stat-card {
  background: rgba(9, 8, 15, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-val {
  font: 400 16px/1.2 var(--display);
  color: var(--ink);
}

.stat-val.accent { color: var(--accent); }
.stat-val.cyan { color: var(--cyan); }
.stat-val.emerald { color: var(--emerald); }
.stat-val.amber { color: var(--amber); }

.stat-lbl {
  font: 400 11px/1.3 var(--mono);
  color: var(--ink-muted);
}

/* ==========================================================================
   Sticky Control & Filter Bar
   ========================================================================== */
.bar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.bar-in {
  max-width: 1320px;
  margin: 0 auto;
  padding-block: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.search-wrap {
  position: relative;
  flex: 1 1 280px;
  max-width: 440px;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 11px;
  width: 15px;
  height: 15px;
  color: var(--ink-muted);
  pointer-events: none;
}

#q {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 64px 8px 34px;
  font: 400 13px/1.2 var(--mono);
  color: var(--ink);
  transition: border-color 0.15s ease, background 0.15s ease;
}

#q:focus {
  border-color: var(--accent);
  background: var(--bg-elevated);
  outline: none;
}

#q::placeholder {
  color: var(--ink-muted);
}

.kbd-hint {
  position: absolute;
  right: 8px;
  font: 500 10px/1 var(--mono);
  color: var(--ink-muted);
  background: var(--bg-void);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 3px 6px;
  pointer-events: none;
}

.quick-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.q-chip {
  border: 1px solid var(--line);
  background: var(--bg-surface);
  color: var(--ink-secondary);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font: 500 11px/1 var(--mono);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.q-chip:hover {
  border-color: var(--line-bright);
  color: var(--ink);
}

.q-chip[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--ink);
}

.result-counter {
  font: 500 12px/1 var(--mono);
  color: var(--ink-muted);
  margin-left: auto;
  white-space: nowrap;
}

.result-counter strong {
  color: var(--ink);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  padding-block: 2px;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: none;
  border: 1px solid var(--line);
  background: var(--bg-surface);
  color: var(--ink-secondary);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.02em;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.14s ease;
}

.chip span {
  color: var(--ink-muted);
  margin-left: 5px;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
}

.chip:hover {
  border-color: var(--line-bright);
  color: var(--ink);
  background: var(--bg-elevated);
}

.chip[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg-void);
  border-color: var(--ink);
  font-weight: 600;
}

.chip[aria-pressed="true"] span {
  color: #444;
}

/* ==========================================================================
   Main Grid & Effect Tiles
   ========================================================================== */
main {
  max-width: 1320px;
  margin: 0 auto;
}

main section {
  scroll-margin-top: 165px;
  margin-bottom: 18px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-block: 24px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.section-title-group {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.section-head h2 {
  margin: 0;
  font: 400 20px/1.3 var(--display);
  color: var(--ink);
}

.section-head p {
  margin: 0;
  color: var(--ink-secondary);
  font: 400 14px/1.4 var(--text);
}

.section-count {
  font: 500 11px/1 var(--mono);
  color: var(--ink-muted);
  background: var(--bg-surface);
  border: 1px solid var(--line);
  padding: 4px 8px;
  border-radius: 999px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(184px, 1fr));
  grid-auto-flow: dense;
  gap: 14px;
}

.tile {
  margin: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 8px;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  position: relative;
}

.tile:hover,
.tile:focus-visible {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(245, 60, 209, 0.2);
}

.tile.big {
  grid-column: span 2;
  grid-row: span 2;
}

.tile.screen .stage,
.sheet .big.screen {
  aspect-ratio: 16 / 9;
}

.tile .stage {
  background: var(--bg-stage);
  aspect-ratio: 6 / 5;
  overflow: hidden;
  border-radius: var(--radius-sm);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.tile canvas,
.detail canvas {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}

.tile-badges {
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 2;
}

.badge-pill {
  font: 500 9px/1 var(--mono);
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(7, 7, 12, 0.78);
  color: var(--ink-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-pill.act {
  color: var(--cyan);
  border-color: rgba(45, 226, 230, 0.35);
}

.fav-star {
  pointer-events: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 7, 12, 0.78);
  color: var(--ink-muted);
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.tile:hover .fav-star,
.fav-star.active {
  opacity: 1;
}

.fav-star.active {
  color: var(--amber);
  border-color: rgba(255, 184, 77, 0.45);
}

.fav-star:hover {
  transform: scale(1.12);
}

.tile figcaption {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
  min-width: 0;
  padding: 2px 2px 0;
}

.tile b {
  font: 500 13.5px/1.3 var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  color: var(--ink);
}

.tile small {
  font: 400 11px/1.3 var(--mono);
  color: var(--ink-muted);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.empty {
  color: var(--ink-secondary);
  padding: 56px 20px;
  text-align: center;
  background: var(--bg-surface);
  border: 1px dashed var(--line-bright);
  border-radius: var(--radius-lg);
  margin: 24px 0;
  font: 400 15px/1.6 var(--text);
}

/* ==========================================================================
   Detail Inspector Modal
   ========================================================================== */
.detail {
  border: 0;
  padding: 0;
  margin: 0;
  max-width: none;
  max-height: none;
  width: 100%;
  height: 100%;
  background: rgba(5, 5, 10, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--ink);
  z-index: 50;
}

.detail::backdrop {
  background: transparent;
}

.sheet {
  max-width: 1320px;
  margin: 0 auto;
  min-height: 100%;
  padding: max(24px, env(safe-area-inset-top, 0px)) max(18px, env(safe-area-inset-right, 0px)) 40px max(18px, env(safe-area-inset-left, 0px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 28px;
  align-content: start;
}

.stage-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sheet .big {
  background: var(--bg-stage);
  aspect-ratio: 16 / 10;
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-bright);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.modal-top-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  z-index: 3;
}

.close, .modal-icon-btn {
  border: 1px solid var(--line-bright);
  background: rgba(9, 9, 15, 0.85);
  color: var(--ink);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font: 500 12px/1 var(--mono);
  cursor: pointer;
  transition: all 0.15s ease;
}

.close:hover, .modal-icon-btn:hover {
  border-color: var(--accent);
  background: var(--bg-elevated);
}

.export-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  align-items: center;
  justify-content: space-between;
}

.export-bar-label {
  font: 500 11px/1 var(--mono);
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.export-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-primary {
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font: 500 12px/1 var(--mono);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-primary:hover {
  background: var(--accent);
  color: #000;
}

.info {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.info h2 {
  margin: 0;
  font: 400 22px/1.35 var(--display);
  color: var(--ink);
}

.info .id-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 6px 0 12px;
}

.info .id {
  font: 500 12px/1.4 var(--mono);
  color: var(--accent);
  letter-spacing: 0.03em;
}

.info p {
  margin: 0 0 16px;
  color: var(--ink-secondary);
  font-size: 14px;
  line-height: 1.55;
}

.facts {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 6px 14px;
  font: 400 12px/1.5 var(--mono);
  margin: 0 0 18px;
  padding: 12px;
  background: var(--bg-void);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.facts dt {
  color: var(--ink-muted);
}

.facts dd {
  margin: 0;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.row label {
  font: 500 11px/1 var(--mono);
  color: var(--ink-muted);
  width: 68px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.btn {
  border: 1px solid var(--line-bright);
  background: var(--bg-void);
  color: var(--ink-secondary);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font: 500 12px/1 var(--mono);
  cursor: pointer;
  transition: all 0.14s ease;
}

.btn:hover {
  border-color: var(--ink-secondary);
  color: var(--ink);
}

.btn[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg-void);
  border-color: var(--ink);
  font-weight: 600;
}

select.btn {
  padding: 5px 8px;
  background: var(--bg-void);
  color: var(--ink);
}

pre {
  margin: 0;
  background: var(--bg-void);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px;
  font: 400 11.5px/1.55 var(--mono);
  overflow-x: auto;
  white-space: pre;
  color: #e4e2f0;
}

.code-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font: 500 11px/1 var(--mono);
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sheetout {
  grid-column: 1 / -1;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.sheetout:empty {
  display: none;
}

.sheetout-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.sheetout-head h3 {
  margin: 0;
  font: 500 13px/1.3 var(--mono);
  color: var(--ink);
}

.sheetout img {
  image-rendering: pixelated;
  max-width: 100%;
  height: auto;
  background: repeating-conic-gradient(#181624 0% 25%, #0e0d16 0% 50%) 0 0 / 16px 16px;
  display: block;
  border: 1px solid var(--line-bright);
  border-radius: var(--radius-sm);
}

.sheetout p {
  font: 400 12px/1.5 var(--mono);
  color: var(--ink-secondary);
  margin: 10px 0 0;
}

/* ==========================================================================
   SEO Documentation & Engine Integration Guide Section
   ========================================================================== */
.seo-guide {
  max-width: 1320px;
  margin: 48px auto 0;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}

.seo-guide-header {
  margin-bottom: 24px;
}

.seo-guide-header h2 {
  margin: 0 0 8px;
  font: 400 20px/1.4 var(--display);
  color: var(--ink);
}

.seo-guide-header p {
  margin: 0;
  color: var(--ink-secondary);
  font-size: 15px;
}

.guide-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.guide-card {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
}

.guide-card h3 {
  margin: 0 0 8px;
  font: 600 16px/1.35 var(--text);
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide-card p {
  margin: 0 0 12px;
  font-size: 13.5px;
  color: var(--ink-secondary);
  line-height: 1.55;
}

.faq-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 14px;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}

.faq-item summary {
  font: 600 14.5px/1.4 var(--text);
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font: 500 16px/1 var(--mono);
  color: var(--accent);
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin: 10px 0 0;
  font-size: 13.5px;
  color: var(--ink-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  max-width: 1320px;
  margin: 40px auto 0;
  padding: 28px 0 12px;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font: 400 12.5px/1.75 var(--mono);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--ink-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 960px) {
  .hero-banner {
    grid-template-columns: 1fr;
  }
  .sheet {
    grid-template-columns: minmax(0, 1fr);
  }
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }
  .faq-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .brand-title {
    font-size: 20px;
  }
  .hero-banner {
    padding: 16px;
  }
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .search-wrap {
    max-width: none;
    width: 100%;
  }
}

@media (max-width: 360px) {
  .tile.big {
    grid-column: auto;
    grid-row: auto;
  }
}

.seo-guide { scroll-margin-top: 165px; }

/* Fix: author display rules (.tile{display:flex} etc.) override the UA [hidden] rule,
   which broke app.js filtering that relies on the hidden attribute. */
[hidden] { display: none !important; }
