:root,
html[data-theme="dark"] {
  --bg: #080b10;
  --surface: rgba(22, 28, 38, 0.72);
  --surface-solid: #161c26;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --brand: #ff6b4a;
  --brand2: #ff3d8e;
  --brand-glow: rgba(255, 77, 142, 0.25);
  --ok: #34d399;
  --radius: 20px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --header-bg: rgba(8, 11, 16, 0.82);
  --link: #ff9f7a;
  --link-hover: #ffc4a8;
  --hero-title: #faf8f6;
  --hero-tag: #e8e2dc;
  --hero-kicker: #c4a99a;
}

html[data-theme="light"] {
  --bg: #f6f3ef;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-solid: #ffffff;
  --border: rgba(20, 24, 32, 0.1);
  --text: #161a22;
  --muted: #5c6575;
  --brand: #e85a3a;
  --brand2: #d63d7a;
  --brand-glow: rgba(232, 90, 58, 0.2);
  --ok: #0f9f6e;
  --shadow: 0 18px 50px rgba(30, 20, 10, 0.1);
  --header-bg: rgba(246, 243, 239, 0.9);
  --link: #c2410c;
  --link-hover: #9a3412;
  --hero-title: #12151c;
  --hero-tag: #2a3140;
  --hero-kicker: #8a604f;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }
body {
  margin: 0;
  font-family: "Sora", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color 0.25s ease, color 0.25s ease;
}
a { color: var(--link); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--link-hover); }
.container { max-width: 1320px; margin: 0 auto; padding: 0 1.5rem; }

.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(255, 107, 74, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(255, 61, 142, 0.08), transparent),
    var(--bg);
}
html[data-theme="light"] .bg-mesh {
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(232, 90, 58, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(214, 61, 122, 0.08), transparent),
    var(--bg);
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.hide-mobile { display: block; }
@media (max-width: 768px) { .hide-mobile { display: none; } }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  backdrop-filter: blur(16px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 0.5rem;
  flex-wrap: nowrap;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: 0.25rem;
  flex-shrink: 0;
}
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.theme-toggle:hover { border-color: rgba(255, 107, 74, 0.45); }
.theme-icon { display: none; line-height: 0; }
html[data-theme="dark"] .theme-icon-sun { display: block; }
html[data-theme="light"] .theme-icon-moon { display: block; }
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}
.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px var(--brand-glow);
  flex-shrink: 0;
}
.logo-text { font-weight: 800; font-size: 1rem; letter-spacing: -0.02em; }
.logo-text small { display: block; font-size: 0.65rem; color: var(--muted); font-weight: 500; }
.nav-toggle {
  display: none;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  font-size: 1.2rem;
  cursor: pointer;
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-wrap: nowrap;
  flex: 1 1 auto;
  justify-content: flex-end;
  min-width: 0;
  overflow: visible;
}
.header-nav > a {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.header-nav > a:hover,
.header-nav > a.active { color: var(--text); background: rgba(255,255,255,0.06); }
.nav-ext { opacity: 0.85; }

.nav-more {
  position: relative;
  flex-shrink: 0;
}
.nav-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 500;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  border: none;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
}
.nav-more-btn:hover,
.nav-more.is-active .nav-more-btn,
.nav-more.is-open .nav-more-btn {
  color: var(--text);
  background: rgba(255,255,255,0.06);
}
.nav-more-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  min-width: 180px;
  padding: 0.4rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  box-shadow: var(--shadow);
  display: none;
  flex-direction: column;
  gap: 0.15rem;
  z-index: 60;
}
.nav-more.is-open .nav-more-menu,
.nav-more-menu:not([hidden]) {
  display: flex;
}
.nav-more-menu[hidden] { display: none !important; }
.nav-more.is-open .nav-more-menu[hidden] { display: flex !important; }
.nav-more-menu a {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  text-decoration: none;
  white-space: nowrap;
}
.nav-more-menu a:hover,
.nav-more-menu a.active {
  color: var(--text);
  background: rgba(255,255,255,0.06);
}

.user-chip {
  font-size: 0.8rem;
  color: var(--muted);
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.btn-primary, .btn-ghost {
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.15rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: transform 0.15s, box-shadow 0.2s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: white;
  box-shadow: 0 8px 28px var(--brand-glow);
}
.btn-primary:hover { transform: translateY(-1px); color: white; }
.btn-lg { padding: 0.85rem 1.5rem; font-size: 1rem; }
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

/* Hero */
.hero-banner { padding: 2rem 0 0.5rem; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 107, 74, 0.12);
  color: #ff9f7a;
  border: 1px solid rgba(255, 107, 74, 0.2);
  margin-bottom: 1rem;
}
.hero-copy h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  font-weight: 800;
}
.lead { color: var(--muted); font-size: 1.1rem; max-width: 52ch; margin: 0; }

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
.hero-stats span { font-size: 0.82rem; color: var(--muted); }

.visual-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.visual-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  margin-bottom: 0.75rem;
  font-weight: 600;
}
.visual-bar em { font-style: normal; color: var(--muted); font-size: 0.9rem; }
.visual-bar.before { background: rgba(255,255,255,0.04); width: 100%; }
.visual-bar.after {
  background: linear-gradient(90deg, rgba(255,107,74,0.25), rgba(255,61,142,0.2));
  width: 28%;
  min-width: 120px;
}
.visual-note { margin: 0.5rem 0 0; color: var(--ok); font-size: 0.9rem; font-weight: 600; }

/* Tool */
.tool-section { padding: 0.5rem 0 2.5rem; }
.tool-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 960px) { .tool-grid { grid-template-columns: 1fr; } }

.card-glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  backdrop-filter: blur(12px);
  margin-bottom: 1rem;
}
.card-glass h3 { margin: 0 0 0.75rem; font-size: 1rem; }

.tool-controls { margin-bottom: 1rem; }
.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}
.control-row:last-child { margin-bottom: 0; }
.control-row label { font-size: 0.9rem; font-weight: 500; color: var(--muted); }
.control-row input[type="range"] { flex: 1; accent-color: var(--brand2); }
.control-row select {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  font-size: 0.9rem;
}

.dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(22, 28, 38, 0.5);
  min-height: 260px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--brand);
  background: rgba(255, 107, 74, 0.06);
  box-shadow: 0 0 0 4px rgba(255, 107, 74, 0.08);
}
.dropzone-inner { text-align: center; padding: 2.5rem 1.5rem; }
.drop-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  display: grid;
  place-items: center;
  box-shadow: 0 12px 32px var(--brand-glow);
}
.drop-title { font-size: 1.25rem; font-weight: 700; margin: 0; letter-spacing: -0.02em; }
.drop-sub { color: var(--muted); margin: 0.5rem 0 0; font-size: 0.92rem; }

.progress { margin-top: 1.25rem; text-align: center; }
.progress-track {
  height: 6px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
  margin-bottom: 0.6rem;
}
.progress-fill {
  height: 100%;
  width: 35%;
  background: linear-gradient(90deg, var(--brand), var(--brand2));
  animation: progress-slide 1.2s ease-in-out infinite;
}
@keyframes progress-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(300%); }
}

.results { margin-top: 1.25rem; display: grid; gap: 1rem; }
.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: grid;
  gap: 1rem;
  animation: fadeUp 0.35s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.result-top { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: flex-start; }
.result-name { font-weight: 700; word-break: break-all; font-size: 1rem; }
.badge-ok {
  background: rgba(52, 211, 153, 0.12);
  color: var(--ok);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}
.result-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 500px) { .result-preview { grid-template-columns: 1fr; } }
.preview-box {
  border-radius: 12px;
  overflow: hidden;
  background: #0d1117;
  border: 1px solid var(--border);
  aspect-ratio: 16/10;
  display: grid;
  place-items: center;
}
.preview-box.preview-checker {
  background-color: #1a1f2a;
  background-image:
    linear-gradient(45deg, #2a3140 25%, transparent 25%),
    linear-gradient(-45deg, #2a3140 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #2a3140 75%),
    linear-gradient(-45deg, transparent 75%, #2a3140 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}
.preview-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.field-hint {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
}
.control-row.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}
.preview-label { font-size: 0.75rem; color: var(--muted); margin-bottom: 0.35rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

.size-bars { display: grid; gap: 0.5rem; }
.size-bar-row { display: flex; align-items: center; gap: 0.75rem; font-size: 0.88rem; }
.size-bar-row span { width: 52px; color: var(--muted); flex-shrink: 0; }
.bar-track { flex: 1; height: 8px; background: var(--border); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; }
.bar-fill.before { background: #475569; }
.bar-fill.after { background: linear-gradient(90deg, var(--brand), var(--brand2)); }

.result-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.download-btn {
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: white;
  text-decoration: none;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 8px 24px var(--brand-glow);
  transition: transform 0.15s;
}
.download-btn:hover { transform: translateY(-1px); color: white; }
.result-note { margin: 0; color: var(--muted); font-size: 0.82rem; }

.check-list { margin: 0; padding: 0; list-style: none; }
.check-list li {
  padding: 0.35rem 0 0.35rem 1.5rem;
  position: relative;
  color: var(--muted);
  font-size: 0.9rem;
}
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--ok);
  font-weight: 700;
}

.mini-post {
  display: block;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}
.mini-post:last-of-type { border-bottom: none; }
.mini-cat { display: block; font-size: 0.72rem; color: var(--brand); font-weight: 600; text-transform: uppercase; }
.mini-title { display: block; color: var(--text); font-size: 0.9rem; font-weight: 500; margin-top: 0.15rem; }
.link-more { display: inline-block; margin-top: 0.75rem; font-size: 0.88rem; font-weight: 600; }

/* Features strip */
.features-strip {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  background: rgba(255,255,255,0.02);
}
.strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
@media (max-width: 800px) { .strip-grid { grid-template-columns: repeat(2, 1fr); } }
.strip-grid article { text-align: center; }
.strip-icon { font-size: 1.75rem; margin-bottom: 0.5rem; }
.strip-grid h3 { margin: 0 0 0.35rem; font-size: 1rem; }
.strip-grid p { margin: 0; color: var(--muted); font-size: 0.88rem; }

/* Pages */
.page-hero { padding: 3rem 0 1.5rem; }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 0.5rem 0; letter-spacing: -0.03em; }

.blog-list { padding: 1rem 0 4rem; }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}
.blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1rem;
  min-height: 0;
}
.blog-card .blog-cover {
  display: block;
  flex: 0 0 auto;
  margin-bottom: 0.75rem;
}
.blog-card .blog-cat { flex: 0 0 auto; }
.blog-card h2 {
  margin: 0.5rem 0;
  font-size: 1.1rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.3em;
}
.blog-card h2 a { color: var(--text); }
.blog-card h3 { margin: 0.5rem 0; font-size: 1.05rem; line-height: 1.35; color: var(--text); }
.blog-card .blog-excerpt,
.blog-card > p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 0.75rem;
  flex: 1 1 auto;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 4.2em;
}
.blog-card .blog-meta {
  flex: 0 0 auto;
  margin-top: auto;
  margin-bottom: 0;
}
.blog-card .read-link {
  flex: 0 0 auto;
  margin-top: 0.65rem;
}
.blog-card-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; height: 100%; }
.blog-cover {
  display: block;
  margin: 0 0 0.85rem;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  width: 100%;
  background: #12161e;
  border: 1px solid var(--border);
}
.blog-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.blog-cover-hero {
  margin: 1rem 0 1.25rem;
  border-radius: 16px;
}
.blog-grid-home .blog-card { padding: 1rem; }
.blog-cat {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand);
}
.blog-meta { display: flex; gap: 1rem; font-size: 0.82rem; color: var(--muted); margin-bottom: 0.75rem; }
.read-link { font-weight: 600; font-size: 0.9rem; }
@media (max-width: 640px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
}

.blog-article { padding: 1rem 0 4rem; max-width: 760px; }
.article-header { margin-bottom: 2rem; }
.back-link { display: inline-block; margin-bottom: 1rem; font-size: 0.9rem; }
.article-header h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); line-height: 1.15; letter-spacing: -0.03em; }
.article-cta { margin-top: 2.5rem; text-align: center; }
.article-cta h3 { margin-top: 0; }

.prose h2 { margin-top: 2rem; font-size: 1.35rem; }
.prose p, .prose li { color: #cbd5e1; }
.prose code { background: rgba(255,255,255,0.06); padding: 0.15rem 0.4rem; border-radius: 6px; font-size: 0.9em; }

.features-page { padding: 1rem 0 4rem; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.feature-card { text-align: center; }
.feature-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.feature-card h2 { font-size: 1.05rem; margin: 0 0 0.5rem; }
.feature-card p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.cta-banner { text-align: center; padding: 2.5rem; }
.cta-banner h2 { margin: 0 0 1.25rem; }

.about-page { padding: 1rem 0 4rem; max-width: 760px; }
.content-wrap {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding-bottom: 4rem;
}
.content-card {
  width: 100%;
  box-sizing: border-box;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.1rem, 4vw, 1.75rem);
  backdrop-filter: blur(12px);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.page-hero .lead {
  max-width: 40rem;
  font-size: clamp(0.95rem, 2.8vw, 1.1rem);
  line-height: 1.55;
}
.page-hero h1 {
  font-size: clamp(1.45rem, 5.5vw, 2.6rem);
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.prose h2 {
  margin-top: 1.5rem;
  margin-bottom: 0.65rem;
  font-size: clamp(1.1rem, 3.5vw, 1.3rem);
  line-height: 1.25;
}
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li {
  color: #cbd5e1;
  font-size: clamp(0.92rem, 2.6vw, 1rem);
  line-height: 1.65;
}
.prose ul, .prose ol {
  padding-left: 1.25rem;
  margin: 0.5rem 0 1rem;
}
.prose li { margin: 0.4rem 0; }
.prose a { word-break: break-word; }
.about-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.about-cta-row .btn-primary,
.about-cta-row .btn-ghost {
  flex: 1 1 auto;
  text-align: center;
  justify-content: center;
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.contact-card {
  padding: clamp(1rem, 3.5vw, 1.35rem);
}
.contact-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}
.contact-card p { margin: 0.25rem 0; }
.contact-card .muted,
.contact-cta .muted { color: var(--muted); font-size: 0.9rem; }
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.why-card {
  padding: 1.15rem 1.25rem;
}
.why-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
}
.why-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}
.howto-block,
.intro-block,
.contact-cta {
  padding: clamp(1rem, 3.5vw, 1.4rem);
}
.intro-block p { color: var(--muted); }
html[data-theme="light"] .prose p,
html[data-theme="light"] .prose li {
  color: var(--muted);
}
.ad-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.ad-slot { margin: 1rem 0; text-align: center; }
.ad-slot:empty { display: none; margin: 0; }
.ad-sidebar { min-height: 0; }
.ad-top, .ad-bottom { min-height: 0; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
  background: rgba(0,0,0,0.25);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-brand { font-size: 1.1rem; }
.site-footer p { color: var(--muted); font-size: 0.9rem; margin: 0.5rem 0 0; }
.site-footer h4 { margin: 0 0 0.75rem; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.site-footer a { display: block; color: var(--muted); font-size: 0.9rem; margin-bottom: 0.4rem; }
.footer-stats { font-size: 0.85rem !important; }
.footer-copy { color: var(--muted); font-size: 0.82rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }

.hidden { display: none !important; }
.legal { padding: 2rem 0 4rem; }

/* AI Chat */
.chat-fab {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: white;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 8px 28px var(--brand-glow);
}
.chat-panel {
  position: fixed;
  right: 1rem;
  bottom: 5rem;
  z-index: 61;
  width: min(360px, calc(100vw - 2rem));
  max-height: min(480px, 70vh);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}
.chat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}
.chat-head strong { display: block; font-size: 0.95rem; }
.chat-head small { color: var(--muted); font-size: 0.75rem; }
.chat-head button { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1.1rem; }
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.chat-msg {
  max-width: 88%;
  padding: 0.55rem 0.75rem;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.45;
  white-space: pre-wrap;
}
.chat-msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: white;
}
.chat-msg.bot {
  align-self: flex-start;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
}
html[data-theme="light"] .chat-msg.bot {
  background: rgba(20, 24, 32, 0.05);
}
.chat-msg.thinking { opacity: 0.7; font-style: italic; }
.chat-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--border);
}
.chat-form input {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  font-size: 0.88rem;
  outline: none;
}
.chat-form button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: white;
  cursor: pointer;
}

@media (max-width: 960px) {
  .logo-text small { display: none; }
  .header-nav > a { padding: 0.35rem 0.5rem; font-size: 0.82rem; }
}
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .header-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--header-bg);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.25rem 1rem;
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 0.2rem;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }
  .header-nav.open { display: flex; }
  .header-nav > a {
    border-radius: 12px;
    padding: 0.7rem 0.85rem;
  }
  .nav-more { width: 100%; }
  .nav-more-btn {
    width: 100%;
    justify-content: space-between;
    border-radius: 12px;
    padding: 0.7rem 0.85rem;
  }
  .nav-more-menu {
    position: static;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0 0 0 0.5rem;
    min-width: 0;
  }
  .nav-more.is-open .nav-more-menu[hidden],
  .nav-more.is-open .nav-more-menu { display: flex !important; }
  .site-header .container { position: relative; }
}
@media (max-width: 768px) {
  .logo-text small { display: none; }
}

/* ========== Fah Swe Tools hub / app shell (appended) ========== */
body.with-tabbar {
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

.footer-note { font-size: 0.82rem !important; opacity: 0.85; }

/* Mobile bottom tab bar */
.mobile-tabbar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  background: var(--header-bg);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
  padding: 0.35rem 0.25rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
}
.mobile-tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.4rem 0.2rem;
  text-decoration: none;
  border-radius: 12px;
}
.mobile-tabbar a .tab-ico { font-size: 1.05rem; line-height: 1; opacity: 0.9; }
.mobile-tabbar a.active,
.mobile-tabbar a:hover {
  color: var(--text);
  background: rgba(255, 107, 74, 0.12);
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  z-index: 70;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 720px;
  margin: 0 auto;
}
.cookie-banner p {
  margin: 0;
  flex: 1;
  min-width: 200px;
  color: var(--muted);
  font-size: 0.88rem;
}
@media (min-width: 769px) {
  .cookie-banner { bottom: 1.5rem; left: 1.5rem; right: auto; }
}

/* Hub hero — brand-led, full-bleed atmosphere */
.hub-hero {
  position: relative;
  isolation: isolate;
  min-height: min(58vh, 520px);
  padding: clamp(2.75rem, 8vw, 5rem) 0 clamp(2.5rem, 6vw, 3.75rem);
  display: flex;
  align-items: center;
  text-align: center;
  overflow: hidden;
}
.spider-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}
.hub-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 75% 60% at 50% -15%, rgba(255, 107, 74, 0.18), transparent 58%),
    radial-gradient(ellipse 45% 40% at 12% 70%, rgba(45, 212, 191, 0.1), transparent 55%),
    radial-gradient(ellipse 40% 35% at 88% 55%, rgba(56, 189, 248, 0.09), transparent 50%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 48%);
  pointer-events: none;
  z-index: 0;
}
html[data-theme="light"] .hub-hero::before {
  background:
    radial-gradient(ellipse 75% 60% at 50% -15%, rgba(232, 90, 58, 0.14), transparent 58%),
    radial-gradient(ellipse 45% 40% at 12% 70%, rgba(13, 148, 136, 0.08), transparent 55%),
    radial-gradient(ellipse 40% 35% at 88% 55%, rgba(14, 165, 233, 0.08), transparent 50%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.4), transparent 48%);
}
.hub-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 4.5rem;
  background: linear-gradient(180deg, transparent, var(--bg));
  pointer-events: none;
  z-index: 0;
}

/* Soft floating orbs — transform/opacity only, no blur filters */
.hero-bubbles {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-bubble {
  position: absolute;
  border-radius: 50%;
  opacity: 0.45;
  will-change: transform;
  animation: hero-bubble-float 14s ease-in-out infinite;
}
.hero-bubble-1 {
  width: 11rem;
  height: 11rem;
  top: 8%;
  left: 6%;
  background: rgba(255, 107, 74, 0.22);
  animation-duration: 16s;
  animation-delay: -2s;
}
.hero-bubble-2 {
  width: 7.5rem;
  height: 7.5rem;
  top: 18%;
  right: 10%;
  background: rgba(45, 212, 191, 0.18);
  animation-duration: 18s;
  animation-delay: -5s;
}
.hero-bubble-3 {
  width: 5.5rem;
  height: 5.5rem;
  bottom: 22%;
  left: 14%;
  background: rgba(56, 189, 248, 0.16);
  animation-duration: 13s;
  animation-delay: -1s;
}
.hero-bubble-4 {
  width: 9rem;
  height: 9rem;
  bottom: 10%;
  right: 8%;
  background: rgba(255, 61, 142, 0.12);
  animation-duration: 20s;
  animation-delay: -8s;
}
.hero-bubble-5 {
  width: 3.5rem;
  height: 3.5rem;
  top: 42%;
  left: 42%;
  background: rgba(94, 234, 212, 0.2);
  animation-duration: 11s;
  animation-delay: -3s;
}
.hero-bubble-6 {
  width: 4.25rem;
  height: 4.25rem;
  top: 12%;
  left: 58%;
  background: rgba(125, 211, 252, 0.14);
  animation-duration: 15s;
  animation-delay: -6s;
}
.hero-bubble-7 {
  width: 6rem;
  height: 6rem;
  bottom: 28%;
  right: 28%;
  background: rgba(255, 159, 122, 0.14);
  animation-duration: 17s;
  animation-delay: -4s;
}
@keyframes hero-bubble-float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.4; }
  33% { transform: translate3d(12px, -18px, 0) scale(1.04); opacity: 0.55; }
  66% { transform: translate3d(-10px, 10px, 0) scale(0.96); opacity: 0.35; }
}
@media (max-width: 720px) {
  .hero-bubble-5,
  .hero-bubble-6,
  .hero-bubble-7 { display: none; }
  .hero-bubble-1 { width: 7rem; height: 7rem; opacity: 0.35; }
  .hero-bubble-2 { width: 5rem; height: 5rem; }
  .hero-bubble-3 { width: 4rem; height: 4rem; }
  .hero-bubble-4 { width: 5.5rem; height: 5.5rem; }
  .spider-canvas { opacity: 0.35; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-bubble {
    animation: none !important;
    opacity: 0.28;
  }
}

.hub-hero-inner {
  position: relative;
  z-index: 1;
  max-width: min(42rem, 100%);
  margin: 0 auto;
  width: 100%;
}
.hub-kicker {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7dd3c0;
}
html[data-theme="light"] .hub-kicker {
  color: #0f766e;
}
.hub-brand-title {
  margin: 0;
  font-size: clamp(2.5rem, 9.5vw, 4.75rem);
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: -0.055em;
  color: var(--hero-title);
  text-wrap: balance;
}
.hub-brand-title::after {
  content: "";
  display: block;
  width: 3.25rem;
  height: 3px;
  margin: 1rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), #2dd4bf);
}
.hub-tagline {
  margin: 1.2rem 0 0;
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.025em;
  color: var(--hero-tag);
  text-wrap: balance;
}
.hub-lead {
  margin: 0.7rem auto 0;
  max-width: 32rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
}
@media (max-width: 480px) {
  .hub-hero { min-height: auto; padding-top: 2rem; }
}
.hub-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
  margin-top: 1.35rem;
}
.hub-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 46px;
  padding: 0.7rem 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.hub-hero .btn-primary {
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(255, 77, 100, 0.22);
  letter-spacing: -0.01em;
}
.hub-hero .btn-ghost {
  border-radius: 14px;
  color: #d6dde8;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
}
.hub-hero .btn-ghost:hover {
  color: #fff;
  border-color: rgba(45, 212, 191, 0.45);
  background: rgba(45, 212, 191, 0.08);
}
html[data-theme="light"] .hub-hero .btn-ghost {
  color: var(--text);
  border-color: rgba(20, 24, 32, 0.14);
  background: rgba(255, 255, 255, 0.7);
}
html[data-theme="light"] .hub-hero .btn-ghost:hover {
  border-color: rgba(15, 118, 110, 0.4);
  background: rgba(15, 118, 110, 0.06);
}

.hub-main { padding-bottom: 3rem; width: 100%; }
.hub-section { margin: 2.5rem 0; width: 100%; }
.hub-section h2 {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}
.section-lead { color: var(--muted); margin: 0 0 1.25rem; font-size: 0.95rem; }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
}
@media (max-width: 1100px) {
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .cat-grid { grid-template-columns: 1fr; }
}
.cat-card {
  display: block;
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(12px);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.cat-card:hover {
  border-color: rgba(255, 107, 74, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
.cat-card h3 {
  margin: 0 0 0.4rem;
  color: var(--text);
  font-size: 1.05rem;
}
.cat-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.cat-card-link {
  display: inline-block;
  margin-top: 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #ff9f7a;
}
.cat-card-blog {
  border-color: rgba(255, 107, 74, 0.28);
  background: linear-gradient(160deg, rgba(255, 107, 74, 0.08), transparent 55%);
}

.tool-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
}
@media (max-width: 1100px) {
  .tool-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .tool-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .tool-card-grid { grid-template-columns: 1fr; }
}
.tool-card {
  display: block;
  padding: 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.15s;
}
.tool-card:hover {
  border-color: rgba(255, 61, 142, 0.4);
  transform: translateY(-2px);
}
.tool-card-icon {
  display: block;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.tool-card h3 {
  margin: 0 0 0.35rem;
  color: var(--text);
  font-size: 1rem;
}
.tool-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.faq-list { display: grid; gap: 0.65rem; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.75rem 1rem;
  background: rgba(22, 28, 38, 0.45);
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p { margin: 0.65rem 0 0; color: var(--muted); font-size: 0.9rem; }
.hub-blog { margin-top: 0.75rem; }

/* Tool workspace */
.tool-workspace { margin-bottom: 1.25rem; }
.tool-fields {
  margin-top: 1rem;
}
.tool-fields.hidden { display: none; }
.tool-fields .control-row {
  flex-wrap: wrap;
}
.tool-fields input[type="number"],
.tool-fields input[type="text"],
.tool-fields input[type="url"],
.tool-fields textarea,
.tool-fields select {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  font-family: inherit;
  max-width: 100%;
}
.tool-fields textarea { width: 100%; resize: vertical; }
.tool-fields .field-stack {
  flex-direction: column;
  align-items: stretch;
}
.tool-fields .field-stack label { margin-bottom: 0.35rem; }
.tool-run-row {
  margin: 1rem 0;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.file-picked {
  margin: 0.85rem 0 0;
  color: var(--ok);
  font-size: 0.88rem;
  font-weight: 600;
}
.howto-block h2,
.faq-block h2 {
  margin-top: 0;
  font-size: 1.1rem;
}
.howto-block ol { margin: 0; padding-left: 1.2rem; color: var(--muted); }
.howto-block li { margin-bottom: 0.4rem; }

.result-pre {
  margin: 0;
  padding: 0.85rem;
  border-radius: 12px;
  background: #0d1117;
  border: 1px solid var(--border);
  overflow: auto;
  max-height: 320px;
  font-size: 0.82rem;
  white-space: pre-wrap;
  word-break: break-word;
  color: #cbd5e1;
}
.result-pre-lg { font-size: 1.05rem; font-weight: 600; letter-spacing: 0.02em; }

.serp-preview {
  padding: 1rem;
  border-radius: 12px;
  background: #fff;
  color: #202124;
  text-align: left;
}
.serp-title { color: #1a0dab; font-size: 1.15rem; line-height: 1.3; }
.serp-url { color: #006621; font-size: 0.82rem; margin: 0.15rem 0; }
.serp-desc { color: #4d5156; font-size: 0.88rem; }

.tool-page-hero { padding-bottom: 0.5rem; }
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--text); text-decoration: underline; }
.seo-body-block { margin-top: 1.25rem; }
.seo-body-block p { color: var(--muted); line-height: 1.65; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.75rem; }

/* App-like mobile */
@media (max-width: 768px) {
  .mobile-tabbar { display: grid; }
  .header-nav { /* desktop nav remains behind toggle */ }
  .chat-fab {
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }
  .chat-panel {
    bottom: calc(140px + env(safe-area-inset-bottom, 0px));
  }
  .hub-hero { padding-top: 1.75rem; }
  .site-footer { margin-bottom: 0.5rem; }
  .dropzone { min-height: 200px; }
  .why-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .container { padding: 0 1rem; }
  .hub-brand-title { font-size: clamp(2rem, 11vw, 3rem); }
  .page-hero { padding: 1.5rem 0 1rem; }
  .page-hero h1 { font-size: clamp(1.35rem, 6.5vw, 1.85rem); }
  .page-hero .lead { max-width: 100%; }
  .content-wrap { max-width: 100%; padding-bottom: 5.5rem; }
  .content-card { padding: 1.15rem 1rem; border-radius: 16px; }
  .prose, .about-page, .legal { max-width: 100%; }
  .prose ul, .prose ol { padding-left: 1.1rem; }
  .faq-item summary { min-height: 44px; }
  .btn-primary, .btn-ghost { min-height: 44px; }
  .about-cta-row { flex-direction: column; }
  .about-cta-row a { width: 100%; }
}

@media (max-width: 480px) {
  .why-grid { grid-template-columns: 1fr; }
  .header-inner { min-height: 64px; }
  .logo-text { font-size: 0.95rem; }
  .container { padding: 0 0.85rem; }
  .content-card { padding: 1rem 0.9rem; }
  .page-hero h1 { font-size: 1.3rem; }
}

.chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.chat-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 1rem;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff !important;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: 0 8px 22px rgba(255, 77, 100, 0.28);
}
.chat-action-btn:hover { filter: brightness(1.08); color: #fff !important; }
.chat-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--brand);
  animation: chatBlink 1s step-end infinite;
}
@keyframes chatBlink {
  50% { opacity: 0; }
}

@media (min-width: 769px) {
  body.with-tabbar { padding-bottom: 0; }
}

/* —— Random Key Generator (app-like) —— */
.keygen-hero .lead code {
  font-size: 0.92em;
  padding: 0.1em 0.35em;
  border-radius: 6px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
}
.keygen-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.25rem;
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.btn-ghost:hover { border-color: var(--brand); color: var(--link-hover); }
.keygen-engine {
  font-size: 0.85rem;
  color: var(--muted);
}
.keygen-page { padding-bottom: 5rem; }
.keygen-chips {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.25rem 0 1rem;
  margin-bottom: 0.5rem;
  scrollbar-width: none;
  position: sticky;
  top: 64px;
  z-index: 5;
  background: linear-gradient(to bottom, var(--bg) 70%, transparent);
}
.keygen-chips::-webkit-scrollbar { display: none; }
.keygen-chip {
  flex: 0 0 auto;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.keygen-chip:hover { border-color: var(--brand); color: var(--link); }
.keygen-sections {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.keygen-card {
  padding: 1.1rem 1.15rem 1.25rem;
  scroll-margin-top: 120px;
  transition: opacity 0.2s ease;
}
.keygen-card.is-loading,
.keygen-sections.is-loading { opacity: 0.55; pointer-events: none; }
.keygen-card-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}
.keygen-card-head h2 {
  margin: 0.25rem 0 0.35rem;
  font-size: 1.2rem;
  line-height: 1.25;
}
.keygen-card-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.keygen-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}
.keygen-regen {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
}
.keygen-regen:active { transform: scale(0.96); }
.keygen-group { margin-top: 0.75rem; }
.keygen-group-label {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.keygen-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.keygen-key {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 48px;
  padding: 0.7rem 0.85rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.keygen-key:hover { border-color: var(--brand); }
.keygen-key:active,
.keygen-key.copied {
  transform: scale(0.99);
  border-color: var(--ok);
  background: color-mix(in srgb, var(--ok) 10%, var(--bg));
}
.keygen-key-text {
  word-break: break-all;
  flex: 1;
  line-height: 1.35;
}
.keygen-copy-hint {
  flex: 0 0 auto;
  font-family: "Sora", system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
}
.keygen-key.copied .keygen-copy-hint { color: var(--ok); }
.keygen-about,
.keygen-page .howto-block,
.keygen-page .faq-block,
.keygen-related {
  margin-top: 1.25rem;
}
.keygen-related-grid {
  display: grid;
  gap: 0.5rem;
}
.keygen-toast {
  position: fixed;
  left: 50%;
  bottom: calc(72px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 80;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-weight: 600;
  font-size: 0.9rem;
}
.keygen-toast.hidden { display: none; }

@media (min-width: 900px) {
  .keygen-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  .keygen-card#fort-knox,
  .keygen-card#ridiculous,
  .keygen-card#wpa,
  .keygen-about {
    grid-column: 1 / -1;
  }
  .keygen-chips { top: 72px; }
}

@media (max-width: 768px) {
  .keygen-hero h1 { font-size: 1.75rem; }
  .keygen-toolbar .btn-primary,
  .keygen-toolbar .btn-ghost { flex: 1 1 auto; min-width: 42%; }
  .keygen-key { font-size: 0.8rem; border-radius: 12px; }
  .keygen-card { border-radius: 18px; }
}

/* —— Privacy Policy Generator wizard —— */
.ppg-page { padding-bottom: 5.5rem; }
.ppg-steps {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0.75rem 0.5rem;
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: sticky;
  top: 60px;
  z-index: 6;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-radius: 16px;
}
.ppg-steps::-webkit-scrollbar { display: none; }
.ppg-step {
  flex: 1 1 0;
  min-width: 7.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}
.ppg-step span {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 2px solid var(--border);
  background: var(--surface-solid);
  font-size: 0.85rem;
}
.ppg-step.is-active { color: var(--text); }
.ppg-step.is-active span,
.ppg-step.is-done span {
  border-color: #1d4ed8;
  background: #1d4ed8;
  color: #fff;
}
.ppg-step em { font-style: normal; line-height: 1.25; max-width: 9rem; }
.ppg-card {
  padding: 1.25rem 1.15rem 1rem;
  margin-bottom: 1.25rem;
}
.ppg-panel { display: none; }
.ppg-panel.is-active { display: block; }
.ppg-panel h2 {
  margin: 0 0 1rem;
  font-size: 1.45rem;
}
.ppg-field {
  border: none;
  margin: 0 0 1.15rem;
  padding: 0;
}
.ppg-field legend,
.ppg-field > label:first-child {
  display: block;
  font-weight: 700;
  margin-bottom: 0.55rem;
  color: var(--text);
}
.req { color: #ef4444; }
.ppg-hint {
  margin: 0.35rem 0 0.55rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.ppg-check,
.ppg-radio {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0.45rem 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  cursor: pointer;
  font-weight: 500;
  line-height: 1.4;
  min-height: 48px;
}
.ppg-check:has(input:checked),
.ppg-radio:has(input:checked) {
  border-color: #1d4ed8;
  background: color-mix(in srgb, #1d4ed8 10%, var(--bg));
}
.ppg-check input,
.ppg-radio input {
  width: 18px;
  height: 18px;
  margin-top: 0.15rem;
  accent-color: #1d4ed8;
  flex: 0 0 auto;
}
.ppg-grid {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1rem;
}
@media (min-width: 720px) {
  .ppg-grid { grid-template-columns: 1fr 1fr; }
}
.ppg-field input[type="text"],
.ppg-field input[type="url"],
.ppg-field input[type="email"],
.ppg-field input[type="date"],
.ppg-scan-row input {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.ppg-scan {
  padding: 0.9rem;
  margin-bottom: 1.15rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, #1d4ed8 6%, var(--surface));
}
.ppg-scan-row {
  display: flex;
  gap: 0.55rem;
  margin-top: 0.45rem;
}
.ppg-scan-row input { flex: 1; }
.ppg-info {
  border: 1px solid color-mix(in srgb, #1d4ed8 35%, var(--border));
  background: color-mix(in srgb, #1d4ed8 8%, var(--bg));
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.65rem;
}
.ppg-info strong { display: block; margin-bottom: 0.25rem; color: #1d4ed8; }
.ppg-info p { margin: 0; font-size: 0.88rem; color: var(--muted); }
.ppg-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: calc(58px + env(safe-area-inset-bottom));
  background: var(--surface-solid);
  margin: 0 -1.15rem -1rem;
  padding: 0.85rem 1.15rem;
  border-radius: 0 0 var(--radius) var(--radius);
  z-index: 4;
}
@media (min-width: 769px) {
  .ppg-nav { bottom: 0; }
}
.ppg-back {
  background: none;
  border: none;
  color: #1d4ed8;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  min-height: 44px;
  padding: 0.4rem 0.2rem;
}
.ppg-back.hidden,
.ppg-panel .hidden,
.ppg-page .hidden { display: none !important; }
.ppg-actions-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0.75rem 0;
}
.ppg-format { margin-bottom: 0.5rem; }
.ppg-preview {
  margin-top: 1rem;
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--border);
  min-height: 320px;
}
.ppg-iframe {
  width: 100%;
  height: 480px;
  border: 0;
  background: #fff;
}
.ppg-download-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.85rem;
}
.ppg-disclaimer {
  margin-top: 1rem;
  font-size: 0.88rem;
  color: var(--muted);
}
.ppg-about { margin-top: 1.25rem; }
.ppg-lead { color: var(--muted); }
.ppg-match-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}
.ppg-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  padding: 0.28rem 0.55rem;
  border-radius: 0.4rem;
  background: rgba(29, 78, 216, 0.1);
  color: #1e3a5f;
  border: 1px solid rgba(29, 78, 216, 0.22);
}
.ppg-live-match { margin: 0.75rem 0 1rem; }
.ppg-match-report { margin: 1rem 0; padding: 1rem 1.1rem; }
.ppg-match-report h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  color: #0f2744;
}
.ppg-match-report-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.ppg-match-report-list li {
  display: grid;
  gap: 0.15rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border, #dbe3ef);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.55);
}
.ppg-match-meta {
  font-size: 0.82rem;
  color: var(--muted);
}
.ppg-match-evidence {
  font-size: 0.8rem;
  color: var(--muted);
}
.ppg-match-report-list a {
  font-size: 0.85rem;
  width: fit-content;
}

@media (max-width: 768px) {
  .ppg-hero h1 { font-size: 1.7rem; }
  .ppg-step em { font-size: 0.65rem; }
  .ppg-scan-row { flex-direction: column; }
  .ppg-nav .btn-primary { flex: 1; justify-content: center; }
}

/* —— My IP page —— */
.ip-page { padding-bottom: 5rem; }
.ip-hero-card {
  text-align: center;
  padding: 1.75rem 1.25rem;
  margin-bottom: 1rem;
}
.ip-kicker {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.ip-value {
  margin: 0.5rem 0 0.85rem;
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.ip-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  margin-bottom: 1rem;
}
.ip-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
}
.ip-badge.warn { color: #f59e0b; border-color: color-mix(in srgb, #f59e0b 40%, var(--border)); }
.ip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}
.ip-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 1rem;
}
@media (min-width: 800px) {
  .ip-grid { grid-template-columns: repeat(3, 1fr); }
}
.ip-field { padding: 1rem 1.05rem; }
.ip-field h2 {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.ip-field-value {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  word-break: break-word;
}
.ip-field-value.mono,
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92rem;
}
.wrap { white-space: pre-wrap; word-break: break-word; }
.ip-details { padding: 1.15rem; margin-bottom: 1rem; }
.ip-details h2 { margin-top: 0; }
.ip-dl { margin: 0; }
.ip-dl > div {
  display: grid;
  gap: 0.25rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
@media (min-width: 700px) {
  .ip-dl > div {
    grid-template-columns: 180px 1fr;
    gap: 1rem;
    align-items: start;
  }
}
.ip-dl dt {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.ip-dl dd { margin: 0; }

/* SEO tool result cards */
.seo-result-fields { display: flex; flex-direction: column; gap: 0.45rem; margin: 0.5rem 0 0.75rem; }
.seo-result-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
}
@media (max-width: 560px) {
  .seo-result-row { grid-template-columns: 1fr; }
  .ip-grid { grid-template-columns: 1fr; }
}
.seo-result-label { font-size: 0.78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.seo-result-value { font-weight: 600; word-break: break-word; }
.seo-feedback { margin: 0.5rem 0 0; padding-left: 1.1rem; color: var(--muted); }
.seo-feedback li { margin-bottom: 0.35rem; }
.seo-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0; }
.seo-chip {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.seo-chip.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--border)); }
.seo-chip.no { color: var(--muted); }

/* —— UX: search, recent carousel, perf —— */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.header-search {
  display: none;
}
.header-search-toggle,
.header-search-panel {
  display: none !important;
}

.tools-search-input {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 12px;
  padding: 0.55rem 0.85rem;
  font: inherit;
  font-size: 0.9rem;
  outline: none;
}
.tools-search-input:focus {
  border-color: rgba(45, 212, 191, 0.55);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.12);
}
.tools-search-input-lg {
  padding: 0.95rem 1.15rem 0.95rem 2.85rem;
  border-radius: 18px;
  font-size: 1.02rem;
  background: var(--surface-solid);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.1);
  min-height: 52px;
}
html[data-theme="light"] .tools-search-input-lg {
  border-color: rgba(20, 24, 32, 0.12);
  box-shadow: 0 10px 28px rgba(30, 20, 10, 0.08);
}
.hub-search {
  position: relative;
  max-width: 36rem;
  margin: 1.65rem auto 0;
  text-align: left;
  z-index: 2;
}
.hub-search-field {
  position: relative;
}
.hub-search-ico {
  position: absolute;
  left: 1.05rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  opacity: 0.85;
}
.hub-search-field:focus-within .hub-search-ico {
  color: #2dd4bf;
  opacity: 1;
}
.tools-search-results {
  margin-top: 0.4rem;
  max-height: min(55vh, 320px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-solid);
}
.tools-search-results[hidden] { display: none !important; }
.tools-search-results-lg {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 8;
  margin-top: 0.55rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
}
.tools-search-item {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.7rem 0.85rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--border);
}
.tools-search-item:last-child { border-bottom: none; }
.tools-search-item:hover,
.tools-search-item:focus {
  background: rgba(45, 212, 191, 0.08);
  outline: none;
}
.tools-search-ico { font-size: 1.15rem; line-height: 1.2; flex-shrink: 0; }
.tools-search-meta { min-width: 0; display: grid; gap: 0.15rem; }
.tools-search-meta strong {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 650;
}
.tools-search-meta small {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tools-search-empty {
  padding: 0.85rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.hero-tool-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  max-width: 40rem;
  margin: 1.35rem auto 0;
  text-align: left;
}
@media (max-width: 560px) {
  .hero-tool-strip { grid-template-columns: 1fr; }
  .hub-cta { flex-direction: column; align-items: stretch; }
  .hub-cta-btn { justify-content: center; width: 100%; }
  .tools-search-input-lg {
    font-size: 1rem;
    min-height: 48px;
  }
}
.hero-tool-chip {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 107, 74, 0.35);
  background: var(--surface-solid);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s;
}
.hero-tool-chip:hover {
  border-color: rgba(255, 107, 74, 0.7);
  color: inherit;
}
.hero-tool-chip-icon { font-size: 1.35rem; line-height: 1; }
.hero-tool-chip-text { min-width: 0; display: grid; gap: 0.2rem; }
.hero-tool-chip-text strong {
  color: var(--text);
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}
.hero-tool-chip-text small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.tool-card-spotlight {
  border-color: rgba(255, 107, 74, 0.4);
  background: color-mix(in srgb, var(--surface-solid) 92%, rgba(255, 107, 74, 0.12));
}

.recent-tools-section { margin-top: 1.5rem; }
.recent-tools-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.recent-tools-head .section-lead { margin-bottom: 0; }
.recent-tools-nav { display: flex; gap: 0.35rem; flex-shrink: 0; }
.recent-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}
.recent-nav-btn:hover { border-color: rgba(255, 107, 74, 0.45); }
.recent-tools-track {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0.25rem;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  padding: 0.15rem 0.1rem 0.55rem;
  cursor: grab;
}
.recent-tools-track.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}
.recent-tools-track::-webkit-scrollbar { height: 6px; }
.recent-tools-track::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}
.recent-tool-card {
  flex: 0 0 min(72vw, 220px);
  scroll-snap-align: start;
  display: flex;
  gap: 0.65rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  text-decoration: none;
  color: inherit;
  content-visibility: auto;
  contain-intrinsic-size: 220px 72px;
}
.recent-tool-card:hover {
  border-color: rgba(255, 107, 74, 0.45);
  color: inherit;
}
.recent-tool-ico { font-size: 1.35rem; }
.recent-tool-body { min-width: 0; display: grid; gap: 0.1rem; }
.recent-tool-body strong {
  color: var(--text);
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recent-tool-body small {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: capitalize;
}

.tool-card,
.cat-card,
.blog-card,
.faq-item,
.why-card {
  content-visibility: auto;
  contain-intrinsic-size: 1px 140px;
}

/* Cheaper paint on scroll: solid surfaces, no blur/filters on small screens */
@media (max-width: 900px) {
  .site-header,
  .header-nav,
  .mobile-tabbar,
  .card-glass,
  .cat-card,
  .visual-card,
  .content-card,
  .ppg-steps {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .site-header,
  .header-nav,
  .mobile-tabbar {
    background: var(--surface-solid);
  }
  .card-glass,
  .cat-card,
  .visual-card,
  .content-card,
  .why-card,
  .blog-card,
  .faq-item {
    background: var(--surface-solid);
    box-shadow: none;
  }
  .cat-card:hover,
  .tool-card:hover {
    transform: none;
    box-shadow: none;
  }
  .bg-mesh {
    background: var(--bg);
  }
  html[data-theme="light"] .bg-mesh {
    background: var(--bg);
  }
  .hub-hero::before {
    opacity: 0.55;
  }
  .spider-canvas { display: none !important; }
  .hero-bubble {
    animation-duration: 22s;
  }
}

@media (max-width: 768px) {
  html { scroll-behavior: auto; }
  body { transition: none; }
  .logo-mark { box-shadow: none; }
  .chat-fab {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  }
}

@media (min-width: 901px) {
  .site-header {
    background: color-mix(in srgb, var(--header-bg) 92%, var(--surface-solid));
  }
}

