/* ============================================================
   SEOKit — Professional Design System v1.5
   Single authoritative file. No appending. No conflicts.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* === VARIABLES === */
:root {
  --bg:         #ffffff;
  --bg2:        #f8f9fc;
  --bg3:        #f1f3f8;
  --border:     #e2e6f0;
  --border2:    #cbd2e1;
  --text:       #374151;
  --text2:      #6b7280;
  --muted:      #9ca3af;
  --heading:    #0f172a;

  --accent:     #4f46e5;
  --accent-lt:  #eef2ff;
  --accent-mid: #c7d2fe;
  --accent-dk:  #3730a3;

  --green:  #059669; --green-lt:  #ecfdf5;
  --amber:  #d97706; --amber-lt:  #fffbeb;
  --red:    #dc2626; --red-lt:    #fef2f2;
  --blue:   #2563eb; --blue-lt:   #eff6ff;
  --purple: #7c3aed; --purple-lt: #f5f3ff;
  --pink:   #db2777; --pink-lt:   #fdf2f8;
  --teal:   #0d9488; --teal-lt:   #f0fdfa;

  --r-sm: 6px; --r: 10px; --r-lg: 14px; --r-xl: 20px;
  --sh-xs: 0 1px 3px rgba(15,23,42,.06),0 1px 2px rgba(15,23,42,.04);
  --sh-sm: 0 2px 8px rgba(15,23,42,.08),0 1px 3px rgba(15,23,42,.05);
  --sh:    0 4px 20px rgba(15,23,42,.10),0 2px 8px rgba(15,23,42,.06);
  --sh-lg: 0 12px 40px rgba(15,23,42,.14),0 4px 12px rgba(15,23,42,.08);

  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;

  --hd-h: 60px;
  --hd-ticker-h: 36px;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img  { max-width: 100%; display: block; }
body {
  background: var(--bg2);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track  { background: var(--bg3); }
::-webkit-scrollbar-thumb  { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* === LAYOUT === */
.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* === TYPOGRAPHY === */
h1,h2,h3,h4 { font-family: var(--font); font-weight: 700; color: var(--heading); line-height: 1.25; letter-spacing: -.02em; }
h1 { font-size: 2.2rem; font-weight: 800; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.1rem; }
h4 { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .09em; color: var(--text2); }
p  { color: var(--text); line-height: 1.7; }
a  { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-dk); }
code { font-family: var(--mono); font-size: .84em; background: var(--bg3); border: 1px solid var(--border); padding: 1px 5px; border-radius: 4px; color: var(--accent); }

/* ============================================================
   HEADER — Modern Mega-Menu Design
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--bg);
  box-shadow: 0 1px 0 var(--border), var(--sh-xs);
}

/* Top bar */
.hd-inner {
  display: flex;
  align-items: center;
  height: var(--hd-h);
  gap: 0;
}

/* Logo */
.hd-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 24px;
}
.hd-logo-mark {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--accent), #6d28d9);
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.hd-logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -.03em;
  line-height: 1;
}
.hd-logo-text strong { color: var(--accent); font-weight: 800; }
.hd-logo-badge {
  background: linear-gradient(135deg, var(--accent), #6d28d9);
  color: #fff;
  font-size: .55rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 20px;
  letter-spacing: .1em;
  line-height: 1;
  align-self: flex-start;
  margin-top: 3px;
}

/* Desktop mega-nav */
.hd-nav {
  display: flex;
  align-items: stretch;
  flex: 1;
  height: 100%;
  gap: 0;
}
.hd-nav-item {
  position: relative;
  display: flex;
  align-items: center;
}
.hd-nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font);
  font-size: .8rem;
  font-weight: 500;
  color: var(--text2);
  padding: 0 12px;
  height: 100%;
  background: none;
  border: none;
  cursor: pointer;
  transition: color .15s, background .15s;
  white-space: nowrap;
  position: relative;
}
.hd-nav-btn::after {
  content: '';
  position: absolute;
  bottom: 0; left: 12px; right: 12px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform .2s;
  border-radius: 2px 2px 0 0;
}
.hd-nav-item:hover .hd-nav-btn,
.hd-nav-item.open   .hd-nav-btn { color: var(--heading); background: var(--bg2); }
.hd-nav-item:hover .hd-nav-btn::after,
.hd-nav-item.open   .hd-nav-btn::after { transform: scaleX(1); }

.hd-chevron { transition: transform .2s; flex-shrink: 0; color: var(--muted); }
.hd-nav-item.open .hd-chevron { transform: rotate(180deg); }

/* Dropdown panel */
.hd-dropdown {
  position: absolute;
  top: calc(100% + 0px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  min-width: 280px;
  max-width: 380px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(8px);
  transition: opacity .18s, visibility .18s, transform .18s;
  z-index: 300;
  overflow: hidden;
}
.hd-nav-item:hover .hd-dropdown,
.hd-nav-item.open  .hd-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.hd-dropdown-inner { padding: 12px; }
.hd-dropdown-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.hd-dd-icon { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; font-size: 1.1rem; flex-shrink: 0; }
.hd-dd-title { font-size: .88rem; font-weight: 700; color: var(--heading); }
.hd-dd-count { font-size: .72rem; color: var(--muted); }
.hd-dropdown-grid { display: flex; flex-direction: column; gap: 2px; }
.hd-dd-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: var(--r-sm);
  text-decoration: none;
  color: var(--text);
  font-size: .82rem;
  font-weight: 500;
  transition: all .12s;
}
.hd-dd-link:hover { background: var(--bg3); color: var(--heading); }
.hd-dd-active     { background: var(--accent-lt); color: var(--accent) !important; }
.hd-dd-link-icon  { width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; font-size: .85rem; flex-shrink: 0; }
.hd-dd-link-name  { flex: 1; }

/* Header action buttons */
.hd-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; padding-left: 16px; flex-shrink: 0; }
.hd-home-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-lt);
  border: 1.5px solid var(--accent-mid);
  padding: 6px 14px;
  border-radius: var(--r-sm);
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
}
.hd-home-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Hamburger */
.hd-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px; height: 36px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  cursor: pointer;
  flex-shrink: 0;
}
.hd-hamburger span { display: block; width: 17px; height: 2px; background: var(--heading); border-radius: 2px; transition: all .2s; }
.hd-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hd-hamburger.open span:nth-child(2) { opacity: 0; }
.hd-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Ticker strip */
.hd-ticker {
  border-top: 1px solid var(--border);
  background: var(--bg2);
  height: var(--hd-ticker-h);
  overflow: hidden;
  position: relative;
}
.hd-ticker::before,
.hd-ticker::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 60px;
  z-index: 2;
  pointer-events: none;
}
.hd-ticker::before { left: 0; background: linear-gradient(to right, var(--bg2), transparent); }
.hd-ticker::after  { right: 0; background: linear-gradient(to left, var(--bg2), transparent); }
.hd-ticker-track {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 0;
  animation: tickerScroll 40s linear infinite;
  width: max-content;
}
.hd-ticker-track:hover { animation-play-state: paused; }
@keyframes tickerScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.hd-ticker-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 18px;
  font-size: .73rem;
  font-weight: 500;
  color: var(--text2);
  text-decoration: none;
  height: 100%;
  border-right: 1px solid var(--border);
  white-space: nowrap;
  transition: all .15s;
}
.hd-ticker-item:hover { color: var(--accent); background: var(--accent-lt); }

/* ============================================================
   MOBILE DRAWER
   ============================================================ */
.mobile-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(340px, 90vw);
  background: var(--bg);
  z-index: 400;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  box-shadow: var(--sh-lg);
}
.mobile-drawer.open { transform: translateX(0); }

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.45);
  z-index: 399;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
  backdrop-filter: blur(2px);
}
.drawer-overlay.open { opacity: 1; visibility: visible; }

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent-lt), var(--bg));
}
.drawer-close {
  width: 34px; height: 34px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border2);
  background: var(--bg);
  color: var(--text2);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all .15s;
}
.drawer-close:hover { background: var(--red-lt); color: var(--red); border-color: #fecaca; }

.drawer-body { flex: 1; overflow-y: auto; padding: 8px 0; }
.drawer-group { border-bottom: 1px solid var(--border); }
.drawer-group:last-child { border-bottom: none; }

.drawer-group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: .84rem;
  font-weight: 600;
  color: var(--heading);
  text-align: left;
  transition: background .15s;
}
.drawer-group-toggle:hover { background: var(--bg3); }
.drawer-group-icon  { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; font-size: .88rem; flex-shrink: 0; }
.drawer-group-label { flex: 1; }
.drawer-group-count { background: var(--bg3); color: var(--muted); font-size: .68rem; font-weight: 700; padding: 2px 7px; border-radius: 20px; border: 1px solid var(--border); }
.drawer-chevron     { color: var(--muted); transition: transform .2s; flex-shrink: 0; }
.drawer-group-toggle.open .drawer-chevron { transform: rotate(180deg); }

.drawer-group-items { display: none; padding: 4px 0 8px; background: var(--bg2); }
.drawer-group-items.open { display: block; }

.drawer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px 9px 24px;
  text-decoration: none;
  color: var(--text);
  font-size: .84rem;
  font-weight: 400;
  transition: all .12s;
}
.drawer-item:hover { background: var(--bg3); color: var(--heading); }
.drawer-item-active { color: var(--accent); font-weight: 600; }
.drawer-item-icon { width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; font-size: .82rem; flex-shrink: 0; }
.drawer-item-name { flex: 1; }
.drawer-item-active-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.drawer-footer { padding: 14px 18px; border-top: 1px solid var(--border); flex-shrink: 0; background: var(--bg2); }

/* ============================================================
   FLASH MESSAGES
   ============================================================ */
.flash { display: flex; align-items: center; justify-content: space-between; padding: 11px 24px; font-size: .875rem; font-weight: 500; }
.flash-success { background: var(--green-lt); border-bottom: 2px solid var(--green); color: var(--green); }
.flash-error   { background: var(--red-lt);   border-bottom: 2px solid var(--red);   color: var(--red); }
.flash button  { background: none; border: none; cursor: pointer; font-size: 1.2rem; color: inherit; opacity: .7; }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.tool-breadcrumb { display: flex; align-items: center; gap: 6px; font-size: .71rem; color: var(--muted); margin-top: 5px; flex-wrap: wrap; }
.tool-breadcrumb a { color: var(--muted); }
.tool-breadcrumb a:hover { color: var(--accent); }

/* ============================================================
   TOOL HERO
   ============================================================ */
.tool-hero { background: var(--bg); border-bottom: 1px solid var(--border); padding: 22px 0; }
.tool-hero .container { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.tool-hero-icon { width: 54px; height: 54px; flex-shrink: 0; display: grid; place-items: center; font-size: 1.5rem; border: 1.5px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-xs); }
.tool-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 3px; }
.tool-desc  { color: var(--text2); font-size: .875rem; }
.tool-uses  { margin-left: auto; text-align: right; flex-shrink: 0; }
.uses-num   { font-family: var(--mono); font-size: 1.5rem; font-weight: 700; color: var(--accent); display: block; }
.uses-label { font-size: .67rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }

/* ============================================================
   PAGE LAYOUT
   ============================================================ */
.page-main { flex: 1; }
.tool-body  { padding: 28px 0 44px; }

/* ============================================================
   CARDS
   ============================================================ */
.card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px; margin-bottom: 18px; box-shadow: var(--sh-xs); }
.card-title { font-size: .71rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--text2); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.card-title span { font-size: .88rem; width: 24px; height: 24px; display: grid; place-items: center; background: var(--accent-lt); border-radius: 5px; }

/* ============================================================
   FORMS
   ============================================================ */
.form-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.form-group  { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-group:last-child { margin-bottom: 0; }
.form-group label { font-size: .78rem; font-weight: 600; color: var(--heading); }
.form-group label .req { color: var(--red); margin-left: 2px; }

input[type=text], input[type=url], input[type=number], input[type=email], input[type=date], textarea, select {
  background: var(--bg); border: 1.5px solid var(--border2); border-radius: var(--r-sm);
  color: var(--heading); font-family: var(--font); font-size: .875rem;
  padding: 8px 12px; width: 100%; outline: none; line-height: 1.5;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
input::placeholder, textarea::placeholder { color: var(--muted); }
textarea { min-height: 130px; resize: vertical; line-height: 1.6; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239ca3af' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; padding-right: 34px; cursor: pointer; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }
input[type=range] { accent-color: var(--accent); cursor: pointer; }
.hint { font-size: .74rem; color: var(--muted); }
.char-counter { font-size: .73rem; color: var(--muted); text-align: right; }
.check-item { display: flex; align-items: center; gap: 7px; cursor: pointer; font-size: .875rem; color: var(--text); padding: 5px 8px; border-radius: var(--r-sm); transition: background .15s; }
.check-item:hover { background: var(--bg3); }
.check-group { display: flex; flex-wrap: wrap; gap: 8px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font); font-size: .84rem; font-weight: 600; padding: 9px 20px; border-radius: var(--r-sm); border: 1.5px solid transparent; cursor: pointer; transition: all .15s; text-decoration: none; white-space: nowrap; line-height: 1; }
.btn-primary  { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 1px 3px rgba(79,70,229,.2); }
.btn-primary:hover { background: var(--accent-dk); border-color: var(--accent-dk); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(79,70,229,.3); }
.btn-secondary { background: var(--bg); color: var(--text); border-color: var(--border2); box-shadow: var(--sh-xs); }
.btn-secondary:hover { background: var(--bg3); color: var(--heading); }
.btn-danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-sm    { padding: 5px 13px; font-size: .77rem; }
.btn-lg    { padding: 12px 28px; font-size: .95rem; }
.btn-block { width: 100%; justify-content: center; }
.btn-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* ============================================================
   CODE / OUTPUT BOX
   ============================================================ */
.output-box { background: #1e1e2e; border: 1px solid #2d2d44; border-radius: var(--r); padding: 16px 18px; font-family: var(--mono); font-size: .78rem; line-height: 1.8; color: #a6e3a1; white-space: pre-wrap; word-break: break-all; max-height: 420px; overflow-y: auto; }
.copy-wrap { position: relative; }
.copy-btn { position: absolute; top: 9px; right: 9px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); color: rgba(255,255,255,.55); font-size: .7rem; font-weight: 600; padding: 3px 9px; border-radius: 4px; cursor: pointer; font-family: var(--font); transition: all .15s; }
.copy-btn:hover  { background: rgba(255,255,255,.15); color: #fff; }
.copy-btn.copied { background: rgba(5,150,105,.2); color: #6ee7b7; }

/* ============================================================
   STAT PILLS
   ============================================================ */
.stat-row  { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.stat-pill { background: var(--bg); border: 1px solid var(--border); border-radius: 40px; padding: 5px 14px; display: flex; align-items: center; gap: 7px; font-size: .82rem; box-shadow: var(--sh-xs); }
.stat-pill .sval { font-family: var(--mono); font-weight: 600; color: var(--accent); font-size: .92rem; }
.stat-pill .slab { color: var(--text2); font-size: .74rem; }

/* ============================================================
   PROGRESS & SCORES
   ============================================================ */
.score-bar      { height: 7px; background: var(--bg3); border-radius: 4px; overflow: hidden; }
.score-bar-fill { height: 100%; border-radius: 4px; transition: width .6s ease; }
.score-good { background: var(--green); }
.score-ok   { background: var(--amber); }
.score-bad  { background: var(--red); }

.score-ring { position: relative; width: 120px; height: 120px; flex-shrink: 0; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring .score-num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-ring .score-num .n { font-size: 1.9rem; font-weight: 700; font-family: var(--mono); line-height: 1; }
.score-ring .score-num .l { font-size: .58rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-top: 2px; font-weight: 600; }

/* ============================================================
   BADGES
   ============================================================ */
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 20px; font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; line-height: 1.4; }
.badge-green  { background: var(--green-lt);  color: var(--green);  border: 1px solid #a7f3d0; }
.badge-yellow { background: var(--amber-lt);  color: var(--amber);  border: 1px solid #fde68a; }
.badge-red    { background: var(--red-lt);    color: var(--red);    border: 1px solid #fecaca; }
.badge-blue   { background: var(--blue-lt);   color: var(--blue);   border: 1px solid #bfdbfe; }
.badge-purple { background: var(--purple-lt); color: var(--purple); border: 1px solid #ddd6fe; }
.badge-accent { background: var(--accent-lt); color: var(--accent); border: 1px solid var(--accent-mid); }

/* ============================================================
   DATA TABLE
   ============================================================ */
.data-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.data-table th { text-align: left; padding: 9px 13px; background: var(--bg2); color: var(--text2); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; border-bottom: 1.5px solid var(--border); white-space: nowrap; }
.data-table td { padding: 9px 13px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg2); }
.data-table td:first-child { font-family: var(--mono); font-size: .78rem; color: var(--accent); }

/* ============================================================
   DASHBOARD HOMEPAGE HERO
   ============================================================ */
.dashboard-hero { background: var(--bg); border-bottom: 1px solid var(--border); padding: 60px 0 44px; text-align: center; position: relative; overflow: hidden; }
.dashboard-hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 70% 60% at 20% -20%, rgba(79,70,229,.06), transparent 60%), radial-gradient(ellipse 60% 50% at 80% 110%, rgba(124,58,237,.05), transparent 50%); pointer-events: none; }
.dashboard-hero::after  { content: ''; position: absolute; inset: 0; background-image: linear-gradient(var(--border) 1px,transparent 1px), linear-gradient(90deg,var(--border) 1px,transparent 1px); background-size: 40px 40px; opacity: .3; pointer-events: none; mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 0%, transparent 80%); }
.dashboard-hero .container { position: relative; z-index: 1; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-lt); color: var(--accent); border: 1px solid var(--accent-mid); border-radius: 20px; padding: 4px 14px; font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 18px; }
.dashboard-hero h1 { font-size: clamp(1.9rem, 5vw, 3.4rem); font-weight: 800; margin-bottom: 14px; letter-spacing: -.04em; line-height: 1.1; color: var(--heading); }
.dashboard-hero h1 em { font-style: normal; background: linear-gradient(135deg, var(--accent), #7c3aed); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.dashboard-hero p { font-size: 1rem; color: var(--text2); max-width: 500px; margin: 0 auto 28px; }
.stats-strip { display: inline-flex; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-sm); }
.strip-stat { text-align: center; padding: 16px 26px; border-right: 1px solid var(--border); }
.strip-stat:last-child { border-right: none; }
.strip-stat .n { font-family: var(--mono); font-size: 1.5rem; font-weight: 700; color: var(--accent); display: block; line-height: 1; margin-bottom: 3px; }
.strip-stat .l { font-size: .67rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 600; }

/* ============================================================
   TOOL CARDS GRID
   ============================================================ */
.tools-section { padding: 36px 0 56px; }
.tools-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.tools-section-header h2 { font-size: 1.1rem; letter-spacing: -.02em; }
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 14px; }
.tool-card { background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column; gap: 8px; transition: all .2s; text-decoration: none; position: relative; overflow: hidden; box-shadow: var(--sh-xs); }
.tool-card::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--c, var(--accent)); opacity: 0; transition: opacity .2s; }
.tool-card:hover { border-color: color-mix(in srgb, var(--c) 40%, var(--border)); transform: translateY(-3px); box-shadow: var(--sh); color: inherit; }
.tool-card:hover::after { opacity: 1; }
.tc-icon { width: 42px; height: 42px; display: grid; place-items: center; font-size: 1.2rem; background: color-mix(in srgb, var(--c) 10%, var(--bg2)); border-radius: var(--r); border: 1px solid color-mix(in srgb, var(--c) 20%, var(--border)); }
.tc-name { font-size: .9rem; font-weight: 700; color: var(--heading); }
.tc-desc { font-size: .8rem; color: var(--text2); line-height: 1.5; }
.tc-cta  { margin-top: auto; font-size: .74rem; font-weight: 600; color: var(--c, var(--accent)); display: flex; align-items: center; gap: 4px; }
.tc-cta::after { content: '→'; transition: transform .15s; }
.tool-card:hover .tc-cta::after { transform: translateX(3px); }

/* ============================================================
   SERP PREVIEW & PIXEL RULER
   ============================================================ */
.serp-preview { background: #fff; border: 1px solid #dadce0; border-radius: var(--r); padding: 16px; font-family: Arial,sans-serif; }
.serp-label { font-size: .67rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-family: var(--font); font-weight: 600; margin-bottom: 10px; }
.serp-url   { font-size: .78rem; color: #202124; margin-bottom: 3px; }
.serp-title { font-size: 1.05rem; color: #1a0dab; margin-bottom: 4px; max-width: 580px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 400; }
.serp-desc  { font-size: .82rem; color: #4d5156; max-width: 580px; line-height: 1.55; }
.pixel-ruler { height: 20px; background: var(--bg3); border-radius: 4px; position: relative; overflow: hidden; margin: 6px 0; border: 1px solid var(--border); }
.pixel-fill  { height: 100%; transition: width .4s ease; display: flex; align-items: center; padding-left: 9px; font-family: var(--mono); font-size: .66rem; font-weight: 600; color: #fff; min-width: 44px; }
.pixel-limit { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--amber); }

/* ============================================================
   TOOL-SPECIFIC LAYOUTS
   ============================================================ */
.read-grid, .hl-grid, .ns-grid, .faq-grid, .headline-grid { display: grid; grid-template-columns: 320px 1fr; gap: 24px; }
.yt-grid, .yd-grid, .thumb-layout { display: grid; grid-template-columns: 340px 1fr; gap: 24px; }
.blc-wrap, .tcc-wrap { max-width: 940px; margin: 0 auto; }
.enc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cc-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lang-row { display: grid; grid-template-columns: 1fr 2fr auto; gap: 10px; margin-bottom: 10px; align-items: end; }
.article-row { display: grid; grid-template-columns: 2fr 2fr 1.4fr 1.4fr 1.2fr 1.2fr auto; gap: 8px; margin-bottom: 8px; align-items: end; }
.ai-grid      { display: grid; grid-template-columns: 280px 1fr; gap: 24px; }
.analyzer-grid { display: grid; grid-template-columns: 310px 1fr; gap: 24px; }

/* Tool-specific components */
.density-bar      { height: 6px; background: var(--bg3); border-radius: 3px; min-width: 100px; overflow: hidden; }
.density-bar-fill { height: 100%; background: var(--accent); border-radius: 3px; }
.link-row { display: grid; grid-template-columns: 1fr 80px 70px 90px; gap: 10px; padding: 10px 13px; border-bottom: 1px solid var(--border); align-items: center; font-size: .82rem; }
.link-row:hover { background: var(--bg2); }
.link-url { font-family: var(--mono); font-size: .74rem; color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-broken .link-url { color: var(--red); }
.conv-card  { background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--sh-xs); }
.conv-out   { background: #1e1e2e; border-radius: var(--r-sm); padding: 12px; font-family: var(--mono); font-size: .77rem; color: #a6e3a1; min-height: 56px; word-break: break-all; white-space: pre-wrap; position: relative; line-height: 1.7; }
.cc-card    { background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--r-lg); padding: 15px; box-shadow: var(--sh-xs); position: relative; overflow: hidden; }
.cc-card::before { content: ''; position: absolute; top: 0; left: 0; width: 3px; bottom: 0; background: var(--c, var(--accent)); }
.cc-label   { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; margin-bottom: 7px; display: flex; align-items: center; gap: 6px; }
.cc-value   { font-size: .86rem; color: var(--heading); word-break: break-word; line-height: 1.55; padding-right: 54px; min-height: 22px; }
.qa-pair    { background: var(--bg2); border: 1.5px solid var(--border); border-radius: var(--r); padding: 16px; margin-bottom: 12px; position: relative; }
.qa-num     { position: absolute; top: -9px; left: 14px; background: var(--accent); color: #fff; font-size: .66rem; font-weight: 700; padding: 2px 9px; border-radius: 20px; font-family: var(--mono); }
.kw-tab, .audit-tab, .filter-tab { padding: 5px 13px; border-radius: 20px; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; cursor: pointer; border: 1.5px solid var(--border); background: var(--bg); color: var(--text2); transition: all .15s; }
.kw-tab:hover, .audit-tab:hover, .filter-tab:hover,
.kw-tab.active, .audit-tab.active, .filter-tab.active { border-color: var(--accent); color: var(--accent); background: var(--accent-lt); }
.audit-tabs, .filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.check-group-title { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); display: flex; align-items: center; gap: 8px; margin: 18px 0 9px; }
.check-group-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.check-row { display: flex; align-items: flex-start; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: .84rem; }
.check-row:last-child { border-bottom: none; }
.check-icon { width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center; font-size: .66rem; font-weight: 700; flex-shrink: 0; margin-top: 1px; }
.ci-pass { background: var(--green-lt); color: var(--green); border: 1px solid #a7f3d0; }
.ci-fail { background: var(--red-lt);   color: var(--red);   border: 1px solid #fecaca; }
.score-donut { position: relative; width: 128px; height: 128px; flex-shrink: 0; }
.score-donut svg { transform: rotate(-90deg); }
.score-donut .inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-donut .inner .n { font-family: var(--mono); font-size: 2.1rem; font-weight: 700; line-height: 1; }
.score-donut .inner .g { font-size: .62rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text2); font-weight: 700; margin-top: 2px; }
.word-chip { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 20px; font-size: .71rem; font-weight: 600; margin: 3px 3px 3px 0; }
.headline-compare-row { padding: 13px 0; border-bottom: 1px solid var(--border); }
.headline-compare-row:last-child { border-bottom: none; }
.grade-circle { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: .82rem; font-weight: 800; color: #fff; flex-shrink: 0; }
.fre-ring { position: relative; width: 138px; height: 138px; flex-shrink: 0; }
.fre-ring svg { transform: rotate(-90deg); }
.fre-ring .inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.fre-ring .inner .n { font-family: var(--mono); font-size: 2.2rem; font-weight: 700; line-height: 1; }
.fre-ring .inner .l { font-size: .6rem; text-transform: uppercase; letter-spacing: .09em; color: var(--text2); font-weight: 700; margin-top: 2px; text-align: center; max-width: 88px; }
.score-gauge-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.score-gauge-row:last-child { border-bottom: none; }
.gauge-label { min-width: 175px; font-size: .82rem; font-weight: 600; color: var(--heading); }
.gauge-sub   { font-size: .7rem; color: var(--muted); display: block; font-weight: 400; }
.gauge-bar   { flex: 1; height: 7px; background: var(--bg3); border-radius: 4px; overflow: hidden; }
.gauge-fill  { height: 100%; border-radius: 4px; transition: width .7s ease; }
.gauge-val   { font-family: var(--mono); font-size: .88rem; font-weight: 700; min-width: 42px; text-align: right; }
.type-btn { background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--r); padding: 10px 12px; cursor: pointer; text-align: left; transition: all .15s; width: 100%; }
.type-btn:hover,.type-btn.selected { border-color: var(--purple); background: var(--purple-lt); }
.type-btn .tb-icon { font-size: 1.1rem; display: block; margin-bottom: 3px; }
.type-btn .tb-name { font-size: .76rem; font-weight: 700; color: var(--heading); display: block; }
.type-btn .tb-desc { font-size: .67rem; color: var(--muted); display: block; margin-top: 2px; }
.ai-output { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r); padding: 22px; font-size: .875rem; line-height: 1.8; color: var(--text); min-height: 180px; white-space: pre-wrap; word-break: break-word; max-height: 680px; overflow-y: auto; }
.ai-output h1,.ai-output h2,.ai-output h3 { color: var(--heading); margin: 1em 0 .4em; }
.ai-output h1{font-size:1.25rem}.ai-output h2{font-size:1.05rem}.ai-output h3{font-size:.92rem}
.ai-output strong{color:var(--heading)}.ai-output ul,.ai-output ol{padding-left:20px;margin:.4em 0}.ai-output li{margin-bottom:.2em}.ai-output p{margin-bottom:.7em}
.dot-pulse{display:flex;gap:5px}.dot-pulse span{width:8px;height:8px;border-radius:50%;background:var(--purple);animation:dotpulse 1.2s ease-in-out infinite}.dot-pulse span:nth-child(2){animation-delay:.2s}.dot-pulse span:nth-child(3){animation-delay:.4s}
@keyframes dotpulse{0%,80%,100%{opacity:.2;transform:scale(.8)}40%{opacity:1;transform:scale(1)}}
.ai-spinner{display:none;align-items:center;justify-content:center;gap:10px;padding:56px;color:var(--muted);font-size:.88rem}.ai-spinner.active{display:flex}

/* ============================================================
   ADS
   ============================================================ */
.ad-slot { position: relative; overflow: hidden; }
.ad-label { font-size: .62rem; font-weight: 600; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); text-align: center; margin-bottom: 5px; }
.ad-placeholder { background: var(--bg3); border: 1.5px dashed var(--border2); border-radius: var(--r); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; margin: 0 auto; min-height: 60px; }
.ad-ph-icon { font-size: 1.1rem; opacity: .35; }
.ad-ph-text { font-size: .7rem; font-weight: 600; color: var(--muted); }
.ad-ph-size { font-size: .63rem; color: var(--muted); font-family: var(--mono); }
.ad-region { overflow: hidden; }
.ad-region-tool-top    { padding: 0 0 18px; }
.ad-region-tool-bottom { padding: 18px 0 0; }
.ad-region-incontent   { padding: 18px 0; }
.ad-region-sidebar     { padding: 14px 0; }
.ad-mobile { display: none; }

/* ============================================================
   TOOL DESCRIPTION SECTION
   ============================================================ */
.tool-description-section { margin-top: 36px; padding: 40px 0 52px; background: var(--bg2); border-top: 1px solid var(--border); }
.td-grid { display: grid; grid-template-columns: 1fr 290px; gap: 24px; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.td-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px; margin-bottom: 18px; box-shadow: var(--sh-xs); }
.td-card:last-child { margin-bottom: 0; }
.td-heading { font-size: 1rem; font-weight: 700; color: var(--heading); margin-bottom: 11px; display: flex; align-items: center; gap: 8px; }
.td-heading-icon { font-size: .9rem; width: 26px; height: 26px; display: grid; place-items: center; background: color-mix(in srgb, var(--c, var(--accent)) 12%, var(--bg2)); border-radius: 6px; flex-shrink: 0; }
.td-body { font-size: .86rem; color: var(--text); line-height: 1.75; }
.td-body code { font-size: .82em; }
.td-steps { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.td-step  { display: flex; align-items: flex-start; gap: 11px; font-size: .855rem; color: var(--text); line-height: 1.55; }
.td-step-num { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; font-weight: 700; flex-shrink: 0; font-family: var(--mono); }
.td-faq { display: flex; flex-direction: column; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-q { width: 100%; background: none; border: none; padding: 12px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: .855rem; font-weight: 600; color: var(--heading); text-align: left; cursor: pointer; transition: color .15s; font-family: var(--font); }
.faq-q:hover { color: var(--accent); }
.faq-chevron { font-size: 1.15rem; flex-shrink: 0; font-weight: 700; line-height: 1; }
.faq-a { padding: 0 0 12px; }
.faq-a p { font-size: .84rem; color: var(--text2); line-height: 1.7; }
.td-tips-card { background: color-mix(in srgb, var(--c, var(--accent)) 4%, var(--bg)); border-color: color-mix(in srgb, var(--c, var(--accent)) 18%, var(--border)); }
.td-tips-title { font-size: .8rem; font-weight: 700; color: var(--heading); margin-bottom: 11px; display: flex; align-items: center; gap: 6px; }
.td-tips-list  { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.td-tip-item   { display: flex; align-items: flex-start; gap: 8px; font-size: .82rem; color: var(--text); line-height: 1.55; }
.td-tip-dot    { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; margin-top: 6px; }
.related-tool-link { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text); font-size: .82rem; font-weight: 500; transition: all .15s; }
.related-tool-link:last-child { border-bottom: none; }
.related-tool-link:hover { color: var(--accent); }
.related-tool-link:hover .related-tool-arrow { transform: translateX(4px); }
.related-tool-icon  { width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; font-size: .88rem; flex-shrink: 0; }
.related-tool-name  { flex: 1; }
.related-tool-arrow { color: var(--muted); font-size: .78rem; transition: transform .15s; }

/* ============================================================
   MODERN FOOTER
   ============================================================ */
.site-footer { background: var(--bg); border-top: 1px solid var(--border); margin-top: auto; }

/* CTA band */
.footer-cta-band { background: linear-gradient(135deg, var(--accent), #6d28d9); padding: 28px 0; }
.footer-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-cta-title { font-size: 1.2rem; font-weight: 800; color: #fff; margin-bottom: 4px; }
.footer-cta-sub   { font-size: .875rem; color: rgba(255,255,255,.8); }
.footer-cta-band .btn-primary { background: #fff; color: var(--accent); border-color: #fff; box-shadow: none; }
.footer-cta-band .btn-primary:hover { background: var(--accent-lt); color: var(--accent-dk); }

/* Footer body */
.footer-body { padding: 44px 0 28px; }
.footer-body-inner { display: grid; grid-template-columns: 260px repeat(auto-fill, minmax(150px,1fr)); gap: 32px; }

.footer-brand-col {}
.footer-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; margin-bottom: 14px; }
.footer-tagline { font-size: .84rem; color: var(--text2); line-height: 1.65; max-width: 260px; margin-bottom: 16px; }
.footer-stats { display: flex; gap: 0; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; margin-bottom: 14px; }
.footer-stat { flex: 1; padding: 10px 0; text-align: center; border-right: 1px solid var(--border); }
.footer-stat:last-child { border-right: none; }
.footer-stat-n { display: block; font-family: var(--mono); font-size: 1.1rem; font-weight: 700; color: var(--accent); line-height: 1; }
.footer-stat-l { font-size: .65rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.footer-version-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--bg3); border: 1px solid var(--border); border-radius: 20px; padding: 3px 10px; font-family: var(--mono); font-size: .68rem; color: var(--muted); }

.footer-tool-col {}
.footer-col-title { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--text2); margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.footer-tool-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.footer-tool-list li a { font-size: .82rem; color: var(--text2); display: flex; align-items: center; gap: 7px; transition: color .15s; text-decoration: none; }
.footer-tool-list li a:hover { color: var(--accent); }

/* Footer bottom bar */
.footer-bottom { border-top: 1px solid var(--border); background: var(--bg2); padding: 13px 0; }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; font-size: .78rem; color: var(--muted); }
.footer-bottom-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-bottom-nav a { color: var(--muted); text-decoration: none; font-size: .77rem; transition: color .15s; }
.footer-bottom-nav a:hover { color: var(--accent); }

/* ============================================================
   RESPONSIVE  — single clean block, no duplicates
   ============================================================ */

/* Tablet ≤1024px */
@media (max-width: 1024px) {
  .hd-nav { display: none; }
  .hd-hamburger { display: flex; }
  .hd-home-btn { display: none; }
  .td-grid { grid-template-columns: 1fr; }
  .td-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  .td-card { margin-bottom: 14px; }
  .analyzer-grid,.ai-grid { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: repeat(3,1fr); }
  .article-row { grid-template-columns: 1fr 1fr; }
  .footer-body-inner { grid-template-columns: 1fr 1fr 1fr; }
}

/* Mobile ≤768px */
@media (max-width: 768px) {
  :root { --hd-ticker-h: 0px; }
  .hd-ticker { display: none; }
  .container { padding: 0 16px; }
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.2rem; }

  .tool-hero { padding: 14px 0; }
  .tool-hero .container { gap: 12px; }
  .tool-hero-icon { width: 46px; height: 46px; font-size: 1.2rem; }
  .tool-title { font-size: 1.15rem; }
  .tool-body  { padding: 16px 0 32px; }
  .card { padding: 15px; }

  .dashboard-hero { padding: 32px 0 24px; }
  .dashboard-hero h1 { font-size: 1.8rem; }
  .stats-strip { display: grid; grid-template-columns: 1fr 1fr; }
  .strip-stat { border-right: none; border-bottom: 1px solid var(--border); padding: 12px 18px; }
  .strip-stat:nth-child(odd) { border-right: 1px solid var(--border); }
  .strip-stat:nth-last-child(-n+2) { border-bottom: none; }
  .strip-stat .n { font-size: 1.25rem; }

  .tools-grid { grid-template-columns: repeat(2,1fr); gap: 10px; }
  .tool-card { padding: 15px 13px; }
  .tc-desc { display: none; }

  .form-grid,.form-grid-3 { grid-template-columns: 1fr; }
  .read-grid,.hl-grid,.ns-grid,.faq-grid,.headline-grid,
  .yt-grid,.yd-grid,.thumb-layout { grid-template-columns: 1fr; }
  .enc-grid,.cc-grid { grid-template-columns: 1fr; }
  .lang-row { grid-template-columns: 1fr; gap: 8px; }

  .tool-description-section { padding: 24px 0 32px; margin-top: 20px; }
  .td-grid { padding: 0 16px; gap: 16px; }
  .td-sidebar { grid-template-columns: 1fr; }
  .td-card { padding: 15px; }

  .link-row { grid-template-columns: 1fr 70px; }
  .link-row > div:nth-child(3),.link-row > div:nth-child(4) { display: none; }

  .btn-actions { flex-direction: column; }
  .btn-actions .btn { width: 100%; justify-content: center; }

  .footer-cta-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .footer-body { padding: 28px 0 20px; }
  .footer-body-inner { grid-template-columns: 1fr 1fr; gap: 20px; }
  .footer-brand-col { grid-column: 1/-1; }
  .footer-stats { max-width: 260px; }

  .ad-leaderboard { display: none !important; }
  .ad-mobile { display: block !important; }

  .score-ring { width: 90px; height: 90px; }
  .score-ring .score-num .n { font-size: 1.5rem; }
}

/* Small mobile ≤480px */
@media (max-width: 480px) {
  .tools-grid { grid-template-columns: 1fr; }
  .tool-uses { display: none; }
  .tool-breadcrumb { display: none; }
  .footer-body-inner { grid-template-columns: 1fr; }
  .score-donut { width: 100px; height: 100px; }
  .score-donut .inner .n { font-size: 1.8rem; }
  .ad-placeholder { max-width: 100% !important; }
}

@media print {
  .site-header,.site-footer,.ad-slot,.ad-region,.tool-description-section { display: none; }
  .card { box-shadow: none; border: 1px solid #ddd; }
  body { background: #fff; color: #000; }
}
