/* ==========================================================================
   FaviconX — Design System
   Brand: indigo/violet on slate. System font stack, no external font download.
   ========================================================================== */

:root {
  --indigo-50: #eef2ff;
  --indigo-100: #e0e7ff;
  --indigo-200: #c7d2fe;
  --indigo-300: #a5b4fc;
  --indigo-500: #6366f1;
  --indigo-600: #4f46e5;
  --indigo-700: #4338ca;
  --violet-500: #8b5cf6;
  --violet-600: #7c3aed;
  --amber-500: #f59e0b;
  --green-600: #16a34a;
  --green-700: #15803d;
  --red-600: #dc2626;

  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;

  --white: #ffffff;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);

  --maxw: 1140px;
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--slate-800);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--slate-900);
  line-height: 1.22;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-top: 1.6em; }
h3 { font-size: 1.2rem; margin-top: 1.4em; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1em; }

a {
  color: var(--indigo-700);
  text-decoration: underline;
  text-underline-offset: 2px;
}
a:hover { color: var(--indigo-600); }

img, svg, canvas { max-width: 100%; display: block; }

ul, ol { padding-left: 1.4em; }
li { margin-bottom: 0.35em; }

hr { border: 0; border-top: 1px solid var(--slate-200); margin: 2em 0; }

small { font-size: 0.85em; color: var(--slate-500); }

code, pre, kbd {
  font-family: var(--font-mono);
  font-size: 0.92em;
}
code { background: var(--slate-100); padding: 0.12em 0.4em; border-radius: 4px; }
pre {
  background: var(--slate-900);
  color: var(--slate-100);
  padding: 1.1em 1.3em;
  border-radius: var(--radius);
  overflow-x: auto;
  line-height: 1.55;
  margin: 0 0 1.2em;
}
pre code { background: none; padding: 0; color: inherit; font-size: 0.88em; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95em;
  margin: 0 0 1.4em;
}
th, td { text-align: left; padding: 0.6em 0.8em; border-bottom: 1px solid var(--slate-200); vertical-align: top; }
th { background: var(--slate-50); color: var(--slate-900); font-weight: 700; }
tbody tr:nth-child(even) { background: var(--slate-50); }
.table-wrap { overflow-x: auto; }

blockquote {
  margin: 1.4em 0;
  padding: 0.6em 1.2em;
  border-left: 4px solid var(--indigo-500);
  background: var(--indigo-50);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--slate-700);
}
blockquote p { margin-bottom: 0.3em; }

/* ---------- Utilities ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.sr-only, .visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: 1rem; top: -3rem;
  background: var(--indigo-700); color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius) var(--radius);
  z-index: 2000;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; color: #fff; }

.text-center { text-align: center; }
.text-muted { color: var(--slate-600); }
.text-brand { color: var(--indigo-600); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s, box-shadow 0.15s;
  background: var(--slate-100);
  color: var(--slate-800);
}
.btn:hover { background: var(--slate-200); color: var(--slate-900); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--indigo-300); outline-offset: 2px; }

.btn-primary { background: var(--indigo-600); color: #fff; }
.btn-primary:hover { background: var(--indigo-700); color: #fff; }

.btn-accent { background: var(--amber-500); color: var(--slate-900); }
.btn-accent:hover { background: #d97706; color: #fff; }

.btn-outline { background: transparent; border-color: var(--slate-300); color: var(--indigo-700); }
.btn-outline:hover { background: var(--indigo-50); border-color: var(--indigo-500); color: var(--indigo-700); }

.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.875rem; border-radius: 8px; }
.btn-lg { padding: 0.9rem 1.6rem; font-size: 1.05rem; }

.btn[disabled], .btn.is-disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }

/* ---------- Forms ---------- */
label { font-weight: 600; color: var(--slate-900); display: block; margin-bottom: 0.3rem; font-size: 0.95rem; }
.field { margin-bottom: 1.1rem; }
.field-hint { font-size: 0.82rem; color: var(--slate-500); margin-top: 0.25rem; }
input[type="text"], input[type="email"], input[type="url"], input[type="search"],
input[type="password"], input[type="number"], textarea, select {
  width: 100%;
  font-family: inherit;
  font-size: 0.98rem;
  color: var(--slate-900);
  padding: 0.6rem 0.8rem;
  border: 1.5px solid var(--slate-300);
  border-radius: var(--radius-sm);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--indigo-500);
  box-shadow: 0 0 0 3px var(--indigo-100);
}
textarea { resize: vertical; min-height: 8rem; }

/* range slider */
input[type="range"] {
  width: 100%;
  accent-color: var(--indigo-600);
  cursor: pointer;
}
.range-row { display: flex; align-items: center; gap: 0.8rem; }
.range-row output { min-width: 3ch; text-align: right; font-weight: 700; color: var(--indigo-700); font-variant-numeric: tabular-nums; }

/* color input */
input[type="color"] {
  width: 2.6rem; height: 2.6rem;
  padding: 0; border: 1.5px solid var(--slate-300);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
}
input[type="color"]::-webkit-color-swatch-wrapper { padding: 3px; }
input[type="color"]::-webkit-color-swatch { border: none; border-radius: 4px; }

/* toggle switch */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; margin-bottom: 0.9rem; }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track {
  position: absolute; inset: 0;
  background: var(--slate-300);
  border-radius: 26px;
  transition: background 0.15s;
  cursor: pointer;
}
.switch .track::before {
  content: "";
  position: absolute;
  width: 20px; height: 20px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  transition: transform 0.15s;
}
.switch input:checked + .track { background: var(--indigo-600); }
.switch input:checked + .track::before { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 3px solid var(--indigo-300); outline-offset: 2px; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--slate-200);
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--slate-900); }
.brand:hover { color: var(--slate-900); }
.brand img { width: 34px; height: 34px; }
.brand .brand-name { font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; }

.main-nav ul { list-style: none; display: flex; align-items: center; gap: 0.4rem; margin: 0; padding: 0; }
.main-nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  color: var(--slate-700);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}
.main-nav a:hover { color: var(--slate-900); background: var(--slate-100); }
.main-nav a[aria-current="page"] { color: var(--indigo-700); background: var(--indigo-50); }

.nav-cta { margin-left: 0.4rem; }

.nav-toggle {
  display: none;
  background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px;
  border-radius: 8px;
  align-items: center; justify-content: center;
  color: var(--slate-800);
}
.nav-toggle:hover { background: var(--slate-100); }
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--slate-200);
    box-shadow: var(--shadow-lg);
    padding: 0.75rem 1.25rem 1.25rem;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0.2rem; }
  .main-nav a { padding: 0.8rem 0.75rem; }
  .nav-cta { margin: 0.5rem 0 0; }
  .nav-cta .btn { width: 100%; }
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(60% 80% at 20% 0%, var(--indigo-50) 0%, rgba(238, 242, 255, 0) 60%),
    radial-gradient(50% 70% at 85% 20%, #fdf4ff 0%, rgba(253, 244, 255, 0) 55%),
    var(--white);
  padding: 3.2rem 0 3.4rem;
  text-align: center;
}
.hero h1 { margin-bottom: 0.7rem; }
.hero .lead { font-size: 1.18rem; color: var(--slate-600); max-width: 640px; margin: 0 auto 1.6rem; }
.hero-actions { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }
.hero-trust { list-style: none; margin: 1.4rem 0 0; padding: 0; font-size: 0.88rem; color: var(--slate-500); display: flex; gap: 1.2rem; justify-content: center; flex-wrap: wrap; }
.hero-trust li { display: inline-flex; align-items: center; gap: 0.35rem; margin: 0; }
.hero-trust svg { width: 16px; height: 16px; color: var(--green-600); }

/* AEO-friendly summary */
.aeo-summary {
  max-width: 780px;
  margin: 1.2rem auto 0;
  background: #fff;
  border: 1px solid var(--slate-200);
  border-left: 4px solid var(--indigo-600);
  border-radius: var(--radius);
  padding: 1rem 1.3rem;
  text-align: left;
  box-shadow: var(--shadow-sm);
}
.aeo-summary .label { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--indigo-600); margin-bottom: 0.3rem; }
.aeo-summary p { margin: 0; font-size: 0.98rem; color: var(--slate-700); }

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.4rem;
}
.card h2 { margin-top: 0; }
.card h3 { margin-top: 0.4rem; }

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ---------- Ad slots ---------- */
.ad-slot {
  margin: 1.5rem auto;
  max-width: var(--maxw);
  text-align: center;
}
.ad-slot-inner {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed var(--slate-300);
  border-radius: var(--radius);
  background: repeating-linear-gradient(-45deg, #fbfcfe, #fbfcfe 12px, #f6f8fb 12px, #f6f8fb 24px);
  color: var(--slate-400);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1.4rem;
}
.ad-slot-inner.is-skyscraper { min-height: 400px; max-width: 300px; margin: 0 auto; }
.ad-slot-inner.is-banner { min-height: 250px; }

/* ---------- Tool page ---------- */
.tool-section { padding: 2.4rem 0 3rem; }
.tool-intro { text-align: center; margin-bottom: 1.8rem; }
.tool-intro h2 { margin-top: 0; }

.tool-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 1.5rem; align-items: start; }
@media (max-width: 900px) {
  .tool-grid { grid-template-columns: 1fr; }
}

.tool-card { padding: 1.5rem; }
.tool-card h2, .tool-card h3 { margin-top: 0; }

/* mode tabs */
.mode-tabs { display: flex; gap: 0.4rem; background: var(--slate-100); padding: 0.3rem; border-radius: var(--radius); margin-bottom: 1.4rem; }
.mode-tab {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 0.55rem 0.5rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--slate-600);
  cursor: pointer;
}
.mode-tab[aria-selected="true"] { background: #fff; color: var(--indigo-700); box-shadow: var(--shadow-sm); }
.mode-tab:focus-visible { outline: 3px solid var(--indigo-300); outline-offset: 2px; }

/* dropzone */
.dropzone {
  border: 2px dashed var(--slate-300);
  border-radius: var(--radius-lg);
  background: var(--slate-50);
  padding: 2rem 1.2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone.is-dragover { border-color: var(--indigo-500); background: var(--indigo-50); }
.dropzone-icon { width: 52px; height: 52px; margin: 0 auto 0.8rem; color: var(--indigo-600); }
.dropzone p { margin-bottom: 0.4rem; }
.dropzone .dz-sub { font-size: 0.85rem; color: var(--slate-500); }
.dz-preview-row { display: flex; gap: 1.2rem; align-items: center; margin-top: 1rem; }
.dz-preview-row img { width: 64px; height: 64px; object-fit: contain; border: 1px solid var(--slate-200); border-radius: var(--radius); background: #fff; padding: 4px; }

/* options */
.options { margin-top: 1.4rem; }
.options > .opt-group + .opt-group { border-top: 1px solid var(--slate-200); margin-top: 1.2rem; padding-top: 1.2rem; }
.opt-group h4 { margin: 0 0 0.7rem; font-size: 0.95rem; }

.shape-options { display: flex; gap: 0.5rem; }
.shape-btn {
  flex: 1;
  border: 2px solid var(--slate-300);
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.4rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--slate-600);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.shape-btn:hover { border-color: var(--indigo-400); }
.shape-btn[aria-pressed="true"] { border-color: var(--indigo-600); background: var(--indigo-50); color: var(--indigo-700); }
.shape-btn:focus-visible { outline: 3px solid var(--indigo-300); outline-offset: 2px; }
.shape-btn svg { width: 26px; height: 26px; }

.color-row { display: flex; align-items: center; gap: 0.8rem; }
.color-row input[type="color"] { flex: 0 0 auto; }

.pill-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pill {
  border: 1.5px solid var(--slate-300);
  background: #fff;
  color: var(--slate-600);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}
.pill:hover { border-color: var(--indigo-400); }
.pill[aria-pressed="true"] { background: var(--indigo-600); border-color: var(--indigo-600); color: #fff; }

.swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  padding: 0;
  border-radius: 8px;
}
.swatch .dot { width: 20px; height: 20px; border-radius: 5px; border: 1px solid rgba(15, 23, 42, 0.18); }

.file-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }

/* text mode */
.text-mode { display: none; }
.text-mode.is-active { display: block; }
.image-mode.is-hidden { display: none; }
.text-input-wrap { display: flex; gap: 0.5rem; }
.text-input-wrap input { flex: 1; text-align: center; font-size: 1.1rem; letter-spacing: 0.05em; text-transform: uppercase; }

/* previews */
.preview-panel { display: flex; flex-direction: column; gap: 1.2rem; }
.preview-main { display: flex; flex-direction: column; align-items: center; gap: 0.8rem; }
.preview-main .stage {
  width: 160px; height: 160px;
  display: flex; align-items: center; justify-content: center;
  background:
    linear-gradient(45deg, var(--slate-100) 25%, transparent 25%),
    linear-gradient(-45deg, var(--slate-100) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--slate-100) 75%),
    linear-gradient(-45deg, transparent 75%, var(--slate-100) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 1rem;
}
.preview-main .stage img { width: 96px; height: 96px; border-radius: 6px; box-shadow: var(--shadow); }
.preview-main .stage img.shape-square { border-radius: 0; }
.preview-main .stage img.shape-circle { border-radius: 50%; }
.preview-main .stage img.shape-rounded { border-radius: 0; }

.mockups { display: grid; gap: 1rem; }
.mockup { border: 1px solid var(--slate-200); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.mockup-head { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--slate-400); padding: 0.5rem 0.85rem; border-bottom: 1px solid var(--slate-100); }
.mockup-body { padding: 1.1rem; display: flex; justify-content: center; }

/* browser tab mockup */
.browser-mock { width: 100%; max-width: 340px; border: 1px solid var(--slate-200); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: var(--slate-100); border-bottom: 1px solid var(--slate-200); }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-r { background: #f87171; } .dot-y { background: #fbbf24; } .dot-g { background: #34d399; }
.tab-row { display: flex; padding: 8px 10px 0; gap: 6px; background: var(--slate-50); }
.tab {
  display: flex; align-items: center; gap: 7px;
  background: #fff;
  border: 1px solid var(--slate-200);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  padding: 7px 14px 8px;
  font-size: 0.8rem;
  color: var(--slate-700);
  font-weight: 600;
  max-width: 200px;
}
.tab img { width: 14px; height: 14px; flex: 0 0 auto; }
.tab .tab-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser-page { display: flex; align-items: center; justify-content: center; height: 130px; background: linear-gradient(160deg, var(--indigo-50), #fff); }
.browser-page .stage { width: 64px; height: 64px; }

/* bookmark bar mockup */
.bookmark-mock { width: 100%; max-width: 340px; background: #fff; border: 1px solid var(--slate-200); border-radius: 10px; padding: 12px 14px; box-shadow: var(--shadow); }
.bm-label { font-size: 0.72rem; font-weight: 800; color: var(--slate-400); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }
.bm-items { display: flex; gap: 16px; }
.bm-item { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.bm-item img { width: 28px; height: 28px; }
.bm-item span { font-size: 0.72rem; color: var(--slate-600); font-weight: 600; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* mobile home screen mockup */
.home-mock { width: 100%; max-width: 340px; background: linear-gradient(165deg, #0f172a, #334155); border-radius: 18px; padding: 22px 20px 26px; box-shadow: var(--shadow-lg); }
.home-status { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--slate-300); font-weight: 600; margin-bottom: 20px; }
.home-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px 10px; justify-items: center; }
.home-app { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.home-app img { width: 52px; height: 52px; border-radius: 13px; box-shadow: 0 6px 16px rgba(0,0,0,0.35); background: #fff; }
.home-app img.shape-circle { border-radius: 50%; }
.home-app img.shape-square { border-radius: 0; }
.home-app img.shape-rounded { border-radius: 13px; }
.home-app span { font-size: 0.7rem; color: var(--slate-200); font-weight: 600; max-width: 60px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* results / downloads */
.results-section { margin-top: 2.4rem; }
.results-section .card { padding: 1.6rem; }
.results-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.results-header h2 { margin: 0; }

.code-block { position: relative; margin-bottom: 1.2rem; }
.code-block pre { max-height: 260px; overflow-y: auto; margin: 0; }
.code-block .copy-btn {
  position: absolute;
  top: 0.6rem; right: 0.6rem;
  background: var(--slate-700); color: #fff;
  border: 0; border-radius: 6px;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.code-block .copy-btn:hover { background: var(--slate-600); }
.code-block .copy-btn.is-copied { background: var(--green-600); }

.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.8rem; margin-bottom: 1.2rem; }
.file-card {
  display: flex; flex-direction: column; align-items: center; gap: 0.45rem;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  background: var(--slate-50);
  padding: 0.9rem 0.6rem;
  text-align: center;
}
.file-card img { width: 40px; height: 40px; object-fit: contain; border-radius: 5px; }
.file-card .ico-preview { display: flex; align-items: flex-end; height: 40px; gap: 2px; }
.file-card .ico-preview img { width: auto; height: 100%; border-radius: 2px; }
.file-card .fname { font-size: 0.72rem; font-weight: 700; color: var(--slate-800); word-break: break-all; line-height: 1.25; }
.file-card .fsize { font-size: 0.72rem; color: var(--slate-500); }
.file-card .btn { margin-top: 0.25rem; }

.download-all-bar { display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; }
.download-all-bar .btn { flex: 1 1 200px; }
.btn-zip { background: var(--green-600); color: #fff; }
.btn-zip:hover { background: var(--green-700); color: #fff; }

/* status / toasts */
.status-msg { font-size: 0.9rem; color: var(--slate-600); min-height: 1.4em; margin-top: 0.6rem; }
.status-msg.is-error { color: var(--red-600); }
.status-msg.is-success { color: var(--green-700); font-weight: 600; }

/* ---------- Steps / how it works ---------- */
.steps-section { padding: 3rem 0; background: var(--slate-50); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius-lg); padding: 1.6rem 1.4rem; box-shadow: var(--shadow-sm); }
.step-num {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--indigo-600); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.05rem;
  margin-bottom: 0.9rem;
}
.step h3 { margin: 0 0 0.5rem; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item { border: 1px solid var(--slate-200); border-radius: var(--radius); background: #fff; margin-bottom: 0.8rem; overflow: hidden; }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  background: none;
  border: 0;
  padding: 1rem 1.2rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--slate-900);
  cursor: pointer;
}
.faq-q:hover { background: var(--slate-50); }
.faq-q .chev { flex: 0 0 auto; width: 20px; height: 20px; color: var(--indigo-600); transition: transform 0.2s; }
.faq-item.is-open .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; }
.faq-a-inner { padding: 0 1.2rem 1.1rem; color: var(--slate-700); }
.faq-a-inner p:last-child { margin-bottom: 0; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: 0.85rem; color: var(--slate-500); padding: 1rem 0 0; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; }
.breadcrumbs li { display: flex; align-items: center; gap: 0.4rem; margin: 0; }
.breadcrumbs li + li::before { content: "/"; color: var(--slate-400); }
.breadcrumbs a { color: var(--indigo-700); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

/* ---------- Page header (inner pages) ---------- */
.page-header { padding: 2.6rem 0 1.6rem; background: linear-gradient(180deg, var(--indigo-50), #fff); }
.page-header h1 { margin: 0.4rem 0 0.6rem; }
.page-header .lead { color: var(--slate-600); font-size: 1.08rem; max-width: 720px; margin: 0; }

/* ---------- Content pages ---------- */
.content { padding: 2rem 0 3.4rem; }
.content .prose { max-width: 780px; }
.content .prose h2 { margin-top: 2em; }
.content .prose h3 { margin-top: 1.6em; }
.content .prose li { margin-bottom: 0.5em; }
.content .prose > h2:first-child { margin-top: 0; }

/* info / callout boxes */
.note {
  border: 1px solid var(--indigo-200);
  background: var(--indigo-50);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  margin: 1.2em 0;
  font-size: 0.95em;
}
.note-warn { border-color: #fde68a; background: #fffbeb; }
.note-warn strong { color: #92400e; }

/* ---------- Blog ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.4rem; }
.post-card { display: flex; flex-direction: column; border: 1px solid var(--slate-200); border-radius: var(--radius-lg); overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); transition: box-shadow 0.15s, transform 0.15s; }
.post-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.post-thumb { aspect-ratio: 16/9; overflow: hidden; background: linear-gradient(135deg, var(--indigo-100), var(--violet-500)); display: flex; align-items: center; justify-content: center; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-thumb .emoji-tile { font-size: 3.4rem; filter: drop-shadow(0 4px 10px rgba(15,23,42,0.25)); }
.post-body { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.post-meta { font-size: 0.8rem; color: var(--slate-500); display: flex; flex-wrap: wrap; gap: 0.6rem; }
.post-title { font-size: 1.18rem; font-weight: 800; line-height: 1.3; }
.post-title a { color: var(--slate-900); text-decoration: none; }
.post-title a:hover { color: var(--indigo-700); text-decoration: underline; }
.post-excerpt { font-size: 0.92rem; color: var(--slate-600); flex: 1; }

.article { max-width: 780px; }
.article header { margin-bottom: 1.8rem; }
.article header h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.article-meta { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; color: var(--slate-500); font-size: 0.88rem; margin-top: 0.8rem; }
.author-badge { display: inline-flex; align-items: center; gap: 0.6rem; background: var(--slate-100); border-radius: 999px; padding: 0.35rem 0.85rem 0.35rem 0.4rem; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, var(--indigo-500), var(--violet-500)); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 800; }
.tag { display: inline-block; background: var(--indigo-50); color: var(--indigo-700); font-size: 0.78rem; font-weight: 700; border-radius: 999px; padding: 0.18rem 0.7rem; }
.article .prose h2 { margin-top: 2em; border-top: 1px solid var(--slate-100); padding-top: 1.4em; }
.article .prose h2:first-of-type { border-top: 0; padding-top: 0; }

.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid var(--slate-200); }
.pager a { font-weight: 700; }

/* ---------- Blog Layout ---------- */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 900px) {
  .blog-layout {
    grid-template-columns: 1fr;
  }
}
.blog-main {
  min-width: 0;
}
.blog-sidebar {
  position: sticky;
  top: 2rem;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--slate-900); color: var(--slate-400); margin-top: 3rem; }
.footer-top { max-width: var(--maxw); margin: 0 auto; padding: 2.8rem 1.25rem 1.6rem; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
@media (max-width: 900px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-top { grid-template-columns: 1fr; } }
.footer-brand p { margin-top: 0.8rem; font-size: 0.92rem; }
.footer-brand .brand { color: #fff; }
.footer-col h3 { color: #fff; font-size: 0.95rem; margin: 0 0 0.9rem; letter-spacing: 0; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { color: var(--slate-400); text-decoration: none; font-size: 0.92rem; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { border-top: 1px solid var(--slate-800); }
.footer-bottom-inner { max-width: var(--maxw); margin: 0 auto; padding: 1.1rem 1.25rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; font-size: 0.85rem; }
.footer-bottom-inner .bmc a { color: #fff; font-weight: 700; text-decoration: none; border-bottom: 1px dashed var(--slate-500); }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  left: 1rem; right: 1rem; bottom: 1rem;
  max-width: 520px;
  margin: 0 auto;
  background: var(--slate-900);
  color: var(--slate-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.1rem 1.3rem;
  z-index: 1000;
  transform: translateY(150%);
  transition: transform 0.3s ease;
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner p { margin: 0 0 0.9rem; font-size: 0.9rem; }
.cookie-banner .cb-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.cookie-banner a { color: var(--indigo-300); }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center; justify-content: center;
  z-index: 1500;
  padding: 1rem;
}
.modal-backdrop.is-open { display: flex; }
.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.3rem; border-bottom: 1px solid var(--slate-200); }
.modal-head h3 { margin: 0; }
.modal-close { background: none; border: 0; font-size: 1.4rem; line-height: 1; color: var(--slate-500); cursor: pointer; padding: 0.3rem; border-radius: 6px; }
.modal-close:hover { color: var(--slate-900); background: var(--slate-100); }
.modal-body { padding: 1.3rem; overflow: auto; }
.modal-foot { padding: 1rem 1.3rem; border-top: 1px solid var(--slate-200); display: flex; justify-content: flex-end; gap: 0.6rem; }

.crop-stage {
  position: relative;
  width: 100%;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--slate-200);
  background: var(--slate-900);
}
.crop-stage img { width: 100%; display: block; pointer-events: none; }
.crop-box {
  position: absolute;
  border: 2px solid #fff;
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.5);
  cursor: move;
  border-radius: 4px;
}
.crop-handle {
  position: absolute;
  width: 18px; height: 18px;
  background: var(--indigo-600);
  border: 2px solid #fff;
  border-radius: 50%;
  bottom: -7px; right: -7px;
  cursor: nwse-resize;
}
.crop-size { text-align: center; margin-top: 0.7rem; font-size: 0.85rem; color: var(--slate-600); font-weight: 600; }

/* ---------- 404 ---------- */
.error-page { padding: 5rem 1.25rem; text-align: center; }
.error-code { font-size: clamp(5rem, 16vw, 9rem); font-weight: 900; line-height: 1; background: linear-gradient(135deg, var(--indigo-500), var(--violet-500)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-page p { max-width: 520px; margin: 1rem auto 1.6rem; color: var(--slate-600); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info ul { list-style: none; margin: 1rem 0; padding: 0; }
.contact-info li { display: flex; gap: 0.7rem; align-items: flex-start; margin-bottom: 0.9rem; }
.contact-info svg { width: 20px; height: 20px; flex: 0 0 auto; color: var(--indigo-600); margin-top: 0.2rem; }

/* ---------- Hero Highlights ---------- */
.hero-trust {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin: 2.2rem auto 0;
  padding: 1rem 2rem;
  list-style: none;
  font-size: 0.95rem;
  color: var(--slate-600);
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: 99px;
}
.hero-trust li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.hero-trust span {
  display: inline-flex;
  color: var(--green-600);
}
.hero-trust svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* ---------- AEO Summary ---------- */
.aeo-summary {
  max-width: 800px;
  margin: 0 auto 3rem;
  padding: 1.25rem 1.5rem;
  background: #fff;
  border: 1px solid var(--slate-200);
  border-left: 5px solid var(--indigo-600);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05);
}
.aeo-summary .label {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--indigo-700);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}
.aeo-summary p:not(.label) {
  margin: 0;
  color: var(--slate-700);
  line-height: 1.6;
  font-size: 1.05rem;
}

/* ---------- Ads ---------- */
.ad-slot {
  display: flex;
  justify-content: center;
  margin: 2.5rem 0;
}
.ad-slot-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--slate-100);
  border: 1px dashed var(--slate-300);
  color: var(--slate-500);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius);
}
.ad-slot-inner.is-banner {
  width: 100%;
  max-width: 728px;
  height: 90px;
}
.ad-slot-inner.is-square {
  width: 300px;
  height: 250px;
}

/* ---------- Misc ---------- */
.badges-inline { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.download-hint { font-size: 0.82rem; color: var(--slate-500); }
.no-js-note { background: #fff7ed; border: 1px solid #fdba74; color: #9a3412; padding: 0.7rem 1rem; border-radius: var(--radius); margin-bottom: 1.4rem; font-weight: 600; }
.section-title { text-align: center; margin-bottom: 1.6rem; }
.section-title h2 { margin: 0 0 0.4rem; }
.section-title p { color: var(--slate-600); max-width: 640px; margin: 0 auto; }

/* ---------- Blog Hub Styles ---------- */
.hub-container {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  margin-top: 1rem;
}

@media (min-width: 900px) {
  .hub-container {
    flex-direction: row;
    align-items: flex-start;
  }
}

.hub-nav {
  position: sticky;
  top: 1.5rem;
  flex: 0 0 280px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.hub-nav-title {
  font-weight: 700;
  color: var(--slate-900);
  margin: 0 0 1rem;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.hub-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hub-nav-list .pill {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  background: #fff;
  border: 1px solid var(--slate-300);
  border-radius: 99px;
  font-size: 0.9rem;
  color: var(--slate-700);
  text-decoration: none;
  transition: all 0.2s;
}

.hub-nav-list .pill:hover {
  background: var(--indigo-50);
  border-color: var(--indigo-300);
  color: var(--indigo-700);
}

.hub-sections {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.hub-section {
  scroll-margin-top: 2rem;
}

.hub-section-title {
  font-size: 1.5rem;
  margin-top: 0;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--slate-100);
  color: var(--indigo-900);
}

.hub-post-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 600px) {
  .hub-post-list {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
}

.hub-post-list li a {
  display: block;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  color: var(--slate-800);
  text-decoration: none;
  font-weight: 600;
  line-height: 1.4;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.02);
}

.hub-post-list li a:hover {
  border-color: var(--indigo-300);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05);
  transform: translateY(-1px);
  color: var(--indigo-700);
}

/* ---------- Accessibility / motion ---------- */
:focus-visible { outline: 3px solid var(--indigo-500); outline-offset: 2px; }

.bmc a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

