/* ===========================================================
   ToolsMaza — Design System
   Dark navy theme, orange accent. Hand-written, no framework.
   =========================================================== */

:root {
  /* surfaces */
  --bg:        #0a0f1d;
  --bg-2:      #0d1424;
  --surface:   #131b2e;
  --surface-2: #18213a;
  --border:    #1f2a44;
  --border-2:  #2a3859;

  /* text */
  --text:      #e8edf7;
  --text-dim:  #9aa6bf;
  --text-mute: #6b7793;

  /* brand */
  --orange:     #f97316;
  --orange-2:   #fb8c3a;
  --orange-soft:rgba(249,115,22,.12);

  /* category colors */
  --c-pdf:       #ef4444;
  --c-image:     #a855f7;
  --c-calculator:#f97316;
  --c-developer: #22c55e;
  --c-social:    #3b82f6;
  --c-educational:#eab308;

  --radius:   14px;
  --radius-sm:10px;
  --maxw:     1200px;
  --shadow:   0 10px 30px rgba(0,0,0,.35);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.text-orange { color: var(--orange); }
.muted { color: var(--text-dim); }
.center { text-align: center; }
.hidden { display: none !important; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,15,29,.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 18px; flex-wrap: nowrap;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; letter-spacing: -.02em; }
.brand .logo-mark {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: conic-gradient(from 200deg, #ef4444, #f97316, #3b82f6, #22c55e, #ef4444);
  position: relative;
}
.brand .logo-mark::after {
  content: ""; position: absolute; inset: 8px; border-radius: 50%;
  background: var(--bg); box-shadow: inset 0 0 0 2px rgba(255,255,255,.15);
}
.brand b { color: var(--orange); font-weight: 800; }
.brand span.w { color: #fff; }

.nav-center { display: flex; align-items: center; gap: 14px; flex-wrap: nowrap; }
.nav-center a, .nav-dd > button {
  color: var(--text-dim); font-size: 14px; font-weight: 500; white-space: nowrap;
  background: none; border: none; display: inline-flex; align-items: center; gap: 5px;
}
.nav-center a:hover, .nav-dd > button:hover { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 14px; flex: none; }
.nav-right .btn { white-space: nowrap; }
.brand { flex: none; }
.nav-right .signin { color: var(--text-dim); font-size: 15px; font-weight: 500; }
.nav-right .signin:hover { color: var(--text); }

.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  border: 1px solid transparent; border-radius: 10px;
  padding: 10px 18px; font-size: 15px; font-weight: 600; color: #fff;
  background: var(--surface-2); transition: .15s ease;
}
.btn:hover { border-color: var(--border-2); }
.btn-primary { background: linear-gradient(135deg, var(--orange), var(--orange-2)); color: #fff; box-shadow: 0 6px 18px rgba(249,115,22,.3); }
.btn-primary:hover { filter: brightness(1.06); border-color: transparent; }
.btn-ghost { background: var(--surface); border: 1px solid var(--border); color: var(--text-dim); }
.btn-ghost:hover { color: var(--text); border-color: var(--border-2); }
.btn-block { width: 100%; }
.btn-lg { padding: 13px 22px; font-size: 16px; }

/* ---------- Mega-menu dropdowns (TinyWow style) ---------- */
.site-header .container { position: relative; }
.nav-dd { position: static; }
.nav-dd > button .dd-chev { transition: transform .2s ease; opacity: .7; }
.nav-dd.open > button { color: var(--text); }
.nav-dd.open > button .dd-chev { transform: rotate(180deg); }

.mega {
  position: absolute; top: calc(100% + 10px);
  left: 0; right: 0; margin-left: auto; margin-right: auto;
  width: min(720px, calc(100vw - 48px));
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow); padding: 18px; z-index: 60;
  opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(8px); transition: opacity .16s ease, transform .16s ease;
}
.nav-dd.open .mega { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
/* hover bridge so the menu doesn't close in the gap */
.mega::before { content: ""; position: absolute; top: -12px; left: 0; right: 0; height: 12px; }

.mega-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.mega-title { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; color: var(--text); }
.mega-title .mh-ic { display: inline-flex; }
.mega-all { font-size: 13px; font-weight: 600; color: var(--orange); }
.mega-all:hover { filter: brightness(1.15); }

.mega-featured { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mega-card { display: flex; gap: 12px; align-items: flex-start; padding: 11px 12px; border-radius: 11px; border: 1px solid transparent; min-width: 0; }
.mega-card:hover { background: var(--surface-2); border-color: var(--border-2); }
.mega-card .mc-ic { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.mega-card .mc-ic svg { width: 18px; height: 18px; }
.mega-card .mc-tx { display: flex; flex-direction: column; min-width: 0; }
.mega-card .mc-name { font-size: 14px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.mega-card .mc-badge { font-size: 10px; font-weight: 700; letter-spacing: .02em; padding: 2px 7px; border-radius: 999px; color: var(--orange); background: var(--orange-soft); border: 1px solid rgba(249,115,22,.25); white-space: nowrap; }
.mega-card .mc-desc { font-size: 12px; color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mega-card .mc-uses { display: inline-flex; align-items: center; gap: 5px; margin-top: 5px; font-size: 11px; font-weight: 600; color: var(--cat, var(--orange)); }
.mega-card .mc-uses svg { opacity: .9; }

.mega-sub.mega-sub-featured { display: flex; align-items: center; gap: 6px; color: var(--orange); margin-bottom: 10px; }
.mega-sub.mega-sub-featured svg { width: 13px; height: 13px; }

.mega-other { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.mega-sub { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-mute); margin-bottom: 10px; }
.mega-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 10px; }
.mega-links a { font-size: 13px; color: var(--text-dim); padding: 6px 8px; border-radius: 7px; position: relative; }
.mega-links a::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--cat, var(--orange)); display: inline-block; margin-right: 8px; vertical-align: middle; opacity: .6; }
.mega-links a:hover { background: var(--surface-2); color: var(--text); }

/* mobile nav toggle */
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 24px; }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 28px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--orange-soft); color: var(--orange-2);
  border: 1px solid rgba(249,115,22,.25);
  font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 999px;
}
.hero h1 { font-size: 60px; line-height: 1.02; margin: 22px 0 18px; letter-spacing: -.03em; font-weight: 800; }
.hero h1 .accent { color: var(--orange); display: block; }
.hero p.lead { font-size: 18px; color: var(--text-dim); max-width: 460px; margin: 0 0 26px; }

.search-box { position: relative; max-width: 560px; }
.search-box input {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-size: 16px; padding: 16px 18px 16px 48px; border-radius: 12px; outline: none;
}
.search-box input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
.search-box .s-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-mute); }
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 30;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); max-height: 340px; overflow: auto; display: none;
}
.search-results.show { display: block; }
.search-results a { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--border); }
.search-results a:last-child { border-bottom: none; }
.search-results a:hover { background: var(--surface-2); }
.search-results .t { font-weight: 600; font-size: 14px; }
.search-results .d { font-size: 12px; color: var(--text-mute); }

.pill-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.pill {
  background: var(--surface); border: 1px solid var(--border); color: var(--text-dim);
  padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 500;
}
.pill:hover { color: var(--text); border-color: var(--border-2); }

/* hero side */
.stat-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px; text-align: center;
}
.stat .n { font-size: 26px; font-weight: 800; color: var(--orange); }
.stat .l { font-size: 12px; color: var(--text-mute); margin-top: 2px; }

.pop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.pop-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px;
}
.pop-card:hover { border-color: var(--border-2); }
.pop-card .ic { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.pop-card .t { font-size: 14px; font-weight: 600; }
.pop-card .u { font-size: 12px; color: var(--text-mute); }

.rating-bar {
  display: flex; align-items: center; gap: 10px; margin-top: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px;
  font-size: 14px; color: var(--text-dim);
}
.rating-bar .stars { color: #f5b301; letter-spacing: 2px; }

/* ---------- Feature strip ---------- */
.feature-strip { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-2); }
.feature-strip .row { display: flex; justify-content: center; gap: 60px; padding: 22px 0; flex-wrap: wrap; }
.feat { display: flex; align-items: center; gap: 12px; }
.feat .ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--orange); }
.feat .t { font-weight: 600; font-size: 14px; }
.feat .s { font-size: 12px; color: var(--text-mute); }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 32px; gap: 20px; }
.section-head h2 { font-size: 32px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 6px; }
.section-head p { color: var(--text-dim); margin: 0; }
.link-more { color: var(--orange); font-weight: 600; font-size: 15px; white-space: nowrap; }
.link-more:hover { filter: brightness(1.15); }

/* category cards */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; position: relative; overflow: hidden; transition: .15s ease;
}
.cat-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--cat, var(--orange)); }
.cat-card:hover { border-color: var(--border-2); transform: translateY(-3px); }
.cat-card .top { display: flex; align-items: flex-start; justify-content: space-between; }
.cat-card .ic { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; color: var(--cat); background: color-mix(in srgb, var(--cat) 14%, transparent); }
.cat-card .count { font-size: 12px; color: var(--text-mute); background: var(--surface-2); border-radius: 999px; padding: 4px 10px; }
.cat-card h3 { font-size: 19px; margin: 16px 0 6px; font-weight: 700; }
.cat-card .desc { font-size: 13px; color: var(--text-dim); min-height: 38px; }
.cat-card ul { list-style: none; padding: 0; margin: 14px 0; }
.cat-card ul li { font-size: 13px; color: var(--text-dim); padding: 3px 0 3px 16px; position: relative; }
.cat-card ul li::before { content: ""; position: absolute; left: 0; top: 11px; width: 5px; height: 5px; border-radius: 50%; background: var(--cat); }
.cat-card .explore { color: var(--cat); font-weight: 600; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }

/* tool cards */
.tool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tool-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; display: flex; flex-direction: column; transition: .15s ease; position: relative;
}
.tool-card:hover { border-color: var(--border-2); transform: translateY(-3px); }
.tool-card .tc-badge {
  position: absolute; top: 14px; right: 14px;
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  color: var(--orange); background: var(--orange-soft); border: 1px solid rgba(249,115,22,.25);
}
.tool-card .ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: var(--cat, var(--orange)); background: color-mix(in srgb, var(--cat, var(--orange)) 14%, transparent); margin-bottom: 16px; }
.tool-card h3 { font-size: 17px; margin: 0 0 6px; font-weight: 700; }
.tool-card .desc { font-size: 13px; color: var(--text-dim); flex: 1; }
.tool-card .use { margin-top: 16px; color: var(--orange); font-weight: 600; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }

/* ---------- Page header (category / tool / legal) ---------- */
.page-head { border-bottom: 1px solid var(--border); background: var(--bg-2); padding: 30px 0 34px; }
.breadcrumb { font-size: 14px; color: var(--text-mute); margin-bottom: 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .sep { color: var(--border-2); }
.breadcrumb .cur { color: var(--text); }
.page-head .ph-row { display: flex; align-items: center; gap: 18px; }
.page-head .ph-ic { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; color: var(--cat, var(--orange)); background: color-mix(in srgb, var(--cat, var(--orange)) 14%, transparent); flex: none; }
.page-head h1 { font-size: 36px; margin: 0; font-weight: 800; letter-spacing: -.02em; }
.page-head .sub { color: var(--text-dim); margin: 4px 0 0; }
.back-link { color: var(--text-mute); font-size: 14px; display: inline-flex; gap: 6px; align-items: center; margin-bottom: 14px; }
.back-link:hover { color: var(--text); }

/* ---------- Tool workspace ---------- */
.tool-wrap { padding: 48px 0; }
.tool-card-lg {
  max-width: 760px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  position: relative; overflow: hidden;
}
.tool-card-lg::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--orange), var(--c-pdf)); }
.tool-card-lg .inner { padding: 28px; }
.tool-desc { color: var(--text-dim); margin: 0 0 22px; }

.dropzone {
  border: 2px dashed var(--border-2); border-radius: var(--radius); padding: 44px 20px;
  text-align: center; cursor: pointer; transition: .15s ease; background: var(--bg-2);
}
.dropzone:hover, .dropzone.drag { border-color: var(--orange); background: var(--orange-soft); }
.dropzone .dz-ic { color: var(--text-mute); margin-bottom: 12px; }
.dropzone .dz-t { font-weight: 700; }
.dropzone .dz-s { font-size: 13px; color: var(--text-mute); margin-top: 4px; }

.chip-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-top: 22px; }
.chip { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; text-align: center; font-size: 14px; color: var(--text-dim); }

/* form controls */
label.field { display: block; margin-bottom: 16px; }
label.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--text-dim); margin-bottom: 7px; }
.input, textarea.input, select.input {
  width: 100%; background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 12px 14px; font-size: 15px; outline: none; font-family: inherit;
}
.input:focus, textarea.input:focus, select.input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
textarea.input { resize: vertical; min-height: 140px; }
textarea.mono, .mono { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

.result-box {
  margin-top: 20px; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px; white-space: pre-wrap; word-break: break-word;
}
.result-box.mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 14px; }
.result-big { font-size: 40px; font-weight: 800; color: var(--orange); text-align: center; }
.result-sub { text-align: center; color: var(--text-dim); margin-top: 4px; }
.alert { border-radius: 10px; padding: 12px 14px; font-size: 14px; margin-top: 14px; }
.alert.err { background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.3); color: #fca5a5; }
.alert.ok  { background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.3); color: #86efac; }

.file-list { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.file-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; font-size: 14px; }
.file-item .x { background: none; border: none; color: var(--text-mute); font-size: 18px; }
.file-item .x:hover { color: var(--c-pdf); }
.thumb-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(120px,1fr)); gap: 12px; margin-top: 16px; }
.thumb-grid figure { margin: 0; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px; }
.thumb-grid img { border-radius: 6px; }
.thumb-grid figcaption { font-size: 12px; color: var(--text-mute); text-align: center; margin-top: 6px; }

/* ---------- Sign PDF ---------- */
.sig-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.sig-tabs button { flex: 1; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text-dim); font-weight: 600; font-size: 14px; cursor: pointer; font-family: inherit; }
.sig-tabs button.active { background: var(--orange-soft); border-color: var(--orange); color: var(--orange); }
.sig-pad-wrap canvas.sig-pad { width: 100%; height: 180px; display: block; background: #fff; border: 1px solid var(--border); border-radius: 10px; touch-action: none; cursor: crosshair; }
.sig-preview-page { position: relative; display: inline-block; margin-top: 10px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; line-height: 0; }
.sig-preview-page canvas { display: block; max-width: 100%; height: auto; }
.sig-box { position: absolute; border: 1px dashed var(--orange); cursor: move; touch-action: none; background: rgba(255,138,61,.06); }
.sig-box img { width: 100%; height: 100%; display: block; pointer-events: none; }

.swatch { width: 100%; height: 120px; border-radius: 12px; border: 1px solid var(--border); }
.kv { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.kv:last-child { border: none; }
.kv span:first-child { color: var(--text-dim); }
.kv .copy { cursor: pointer; color: var(--orange); }

mark { background: var(--orange); color: #1a1205; border-radius: 3px; padding: 0 2px; }

/* legal */
.legal { padding: 48px 0; max-width: 760px; margin: 0 auto; }
.legal .lcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 26px; margin-bottom: 18px; }
.legal .lcard h3 { margin: 0 0 10px; font-size: 18px; }
.legal .lcard p, .legal .lcard li { color: var(--text-dim); font-size: 15px; }
.legal a { color: var(--orange); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); padding: 56px 0 28px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { color: var(--text-dim); font-size: 14px; margin: 0 0 12px; }
.footer-brand .fast { color: var(--orange); font-size: 14px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.footer-col h4 { font-size: 14px; font-weight: 700; margin: 0 0 16px; }
.footer-col a { display: block; color: var(--text-dim); font-size: 14px; padding: 5px 0; }
.footer-col a:hover { color: var(--orange); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); margin-top: 40px; padding-top: 22px; color: var(--text-mute); font-size: 14px; }
.footer-bottom .links { display: flex; gap: 24px; }
.footer-bottom .links a:hover { color: var(--text); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero h1 { font-size: 46px; }
  .cat-grid, .tool-grid { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
}
/* narrow desktop: tighten nav spacing further so everything fits */
@media (max-width: 1199px) and (min-width: 1081px) {
  .nav-center { gap: 11px; }
  .nav-center > a, .nav-dd > button { font-size: 13px; }
  .nav-right { gap: 8px; }
  .nav-right .btn-primary { padding: 9px 13px; font-size: 14px; }
  .brand { font-size: 20px; }
}

@media (max-width: 1080px) {
  .nav-center { display: none; }
  .nav-toggle { display: block; }
  .nav.mobile-open .nav-center { display: flex; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 8px 24px 16px; max-height: calc(100vh - 68px); overflow: auto; z-index: 60; }
  .nav.mobile-open .nav-center > a { padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
  .nav-dd { width: 100%; }
  .nav-dd > button { width: 100%; justify-content: space-between; padding: 12px 0; font-size: 15px; border-bottom: 1px solid var(--border); }
  .mega { position: static; transform: none !important; width: 100%; box-shadow: none; border: none; background: transparent; padding: 6px 0 12px 8px; display: none; opacity: 1; visibility: visible; }
  .nav-dd.open .mega { display: block; }
  .mega-head { display: none; }
  .mega-featured { grid-template-columns: 1fr; }
  .mega-links { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .hero h1 { font-size: 38px; overflow-wrap: break-word; }
  .cat-grid, .tool-grid, .pop-grid, .stat-row { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(3,1fr); }
  .section-head { flex-direction: column; align-items: flex-start; }
  .row2, .row3, .chip-row { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 16px; }
  .feature-strip .row { gap: 28px; }
  .content-grid { grid-template-columns: 1fr !important; }
}

/* phones: keep the header to just the logo + menu so it never overflows */
@media (max-width: 600px) {
  .nav-right .btn-primary { display: none; }
  .brand { font-size: 19px; }
  .hero h1 { font-size: 34px; }
  .stat-row { gap: 10px; }
  .stat { padding: 14px 8px; }
  .stat .n { font-size: 22px; }
  .stat .l { font-size: 11px; }
}

/* ---------- Tool content (SEO sections) ---------- */
.tool-content { max-width: 860px; margin: 8px auto 0; padding: 0 24px; }
.content-section { margin-top: 44px; }
.content-section > h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 18px; }
.content-section > p { color: var(--text-dim); margin: 0 0 12px; }

/* how-to steps */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { counter-increment: step; position: relative; padding: 16px 18px 16px 60px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.steps li::before { content: counter(step); position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--orange), var(--orange-2)); }
.steps li b { display: block; margin-bottom: 2px; }
.steps li span { color: var(--text-dim); font-size: 14px; }

/* features grid */
.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.feature-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 18px; }
.feature-item .fi-ic { color: var(--orange); margin-bottom: 8px; }
.feature-item b { display: block; margin-bottom: 4px; }
.feature-item span { color: var(--text-dim); font-size: 14px; }

/* FAQ accordion */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; background: var(--surface); overflow: hidden; }
.faq-q { width: 100%; text-align: left; background: none; border: none; color: var(--text); font-size: 16px; font-weight: 600; padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-q .chev { transition: transform .2s ease; color: var(--text-mute); flex: none; }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-a p { color: var(--text-dim); padding: 0 18px 16px; margin: 0; }
.faq-item.open .faq-a { max-height: 320px; }

/* ---------- Landing: how it works ---------- */
.how-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.how-step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 24px; position: relative; }
.how-step .num { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--orange), var(--orange-2)); margin-bottom: 16px; }
.how-step h3 { margin: 0 0 8px; font-size: 18px; }
.how-step p { margin: 0; color: var(--text-dim); font-size: 14px; }

/* ---------- Testimonials ---------- */
.testi-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.testi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.testi .stars { color: #f5b301; letter-spacing: 2px; margin-bottom: 12px; }
.testi p { margin: 0 0 16px; color: var(--text); font-size: 15px; }
.testi .who { display: flex; align-items: center; gap: 12px; }
.testi .av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; flex: none; }
.testi .who .nm { font-weight: 600; font-size: 14px; }
.testi .who .rl { font-size: 12px; color: var(--text-mute); }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(135deg, rgba(249,115,22,.14), rgba(59,130,246,.10)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cta-band .inner { text-align: center; padding: 64px 0; }
.cta-band h2 { font-size: 34px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 12px; }
.cta-band p { color: var(--text-dim); margin: 0 0 26px; font-size: 17px; }

/* ---------- SEO intro / prose ---------- */
.prose { max-width: 820px; }
.prose h2 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 14px; }
.prose p { color: var(--text-dim); margin: 0 0 14px; }
.prose a { color: var(--orange); }

/* ---------- Blog ---------- */
.blog-wrap { display: grid; gap: 28px; }
.blog-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.blog-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: .15s ease; }
.blog-card:hover { border-color: var(--border-2); transform: translateY(-3px); }
.bp-cover { display: grid; place-items: center; height: 150px; background: color-mix(in srgb, var(--cat, var(--orange)) 16%, var(--surface-2)); position: relative; }
.bp-cover.big { height: 260px; border-radius: var(--radius); }
.bp-cover::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, color-mix(in srgb, var(--cat) 22%, transparent), transparent 70%); }
.bp-emoji { font-size: 52px; position: relative; }
.bp-cover.big .bp-emoji { font-size: 84px; }
.bc-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.bc-tag { align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; color: var(--cat, var(--orange)); background: color-mix(in srgb, var(--cat, var(--orange)) 14%, transparent); margin-bottom: 12px; }
.blog-card h3 { font-size: 17px; margin: 0 0 8px; font-weight: 700; line-height: 1.3; }
.blog-card p { font-size: 13px; color: var(--text-dim); margin: 0 0 14px; flex: 1; }
.bc-meta { font-size: 12px; color: var(--text-mute); }

/* featured post */
.blog-feature { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; transition: .15s ease; }
.blog-feature:hover { border-color: var(--border-2); }
.bf-body h2 { font-size: 30px; line-height: 1.15; margin: 6px 0 12px; letter-spacing: -.02em; }
.bf-body p { color: var(--text-dim); margin: 0 0 16px; }
.bf-cta { color: var(--orange); font-weight: 600; }

/* blog detail */
.blog-detail { padding: 40px 0 0; }
.blog-article { max-width: 760px; margin: 0 auto; }
.blog-article > .breadcrumb { margin-bottom: 18px; }
.blog-article > .bc-tag { display: inline-block; }
.blog-article h1 { font-size: 40px; line-height: 1.1; letter-spacing: -.02em; margin: 10px 0 12px; font-weight: 800; }
.bp-byline { color: var(--text-mute); font-size: 14px; margin-bottom: 22px; }
.blog-article .bp-cover.big { margin-bottom: 28px; }
.bp-content { font-size: 17px; line-height: 1.75; color: var(--text); }
.bp-content h2 { font-size: 25px; font-weight: 800; letter-spacing: -.02em; margin: 34px 0 14px; }
.bp-content p { color: var(--text-dim); margin: 0 0 18px; }
.bp-content ul, .bp-content ol { color: var(--text-dim); margin: 0 0 18px; padding-left: 22px; }
.bp-content li { margin-bottom: 8px; }
.bp-content a { color: var(--orange); font-weight: 500; }
.bp-content a:hover { text-decoration: underline; }
.bp-content strong { color: var(--text); }
.bp-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 8px; }
.bp-tag { font-size: 12px; color: var(--text-dim); background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; }
.bp-share { margin: 18px 0 10px; }

/* ---------- Rich blog content (guides: screenshots, prompts, video) ---------- */
.bp-content h3 { font-size: 19px; font-weight: 700; letter-spacing: -.01em; margin: 26px 0 10px; color: var(--text); }
.bp-content h2 + p, .bp-content h3 + p { margin-top: 0; }

/* numbered step badges */
.bp-content .bp-step { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--orange); text-transform: uppercase; letter-spacing: .05em; margin: 30px 0 6px; }
.bp-content .bp-step span { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: var(--orange-soft); color: var(--orange); font-size: 13px; }

/* screenshot figures */
.bp-content figure.bp-shot { margin: 18px 0 22px; }
.bp-content figure.bp-shot img { width: 100%; display: block; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); }
.bp-content figure.bp-shot figcaption { font-size: 13px; color: var(--text-mute); margin-top: 9px; text-align: center; }

/* responsive video embed */
.bp-content .bp-video { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 18px 0 8px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.bp-content .bp-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* "Watch on YouTube" CTA card */
.bp-content .bp-yt { display: flex; align-items: center; gap: 14px; margin: 18px 0 22px; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.bp-content .bp-yt:hover { border-color: var(--border-2); }
.bp-content .bp-yt .yt-ic { width: 46px; height: 46px; border-radius: 11px; flex: none; display: grid; place-items: center; background: #ff0000; color: #fff; font-size: 22px; }
.bp-content .bp-yt .yt-tx { display: flex; flex-direction: column; }
.bp-content .bp-yt .yt-tx b { color: var(--text); font-size: 15px; }
.bp-content .bp-yt .yt-tx span { color: var(--text-mute); font-size: 13px; }

/* copy-ready prompt blocks */
.bp-content .bp-prompt { margin: 14px 0 22px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.bp-content .bp-prompt .pp-head { display: flex; align-items: center; gap: 8px; padding: 9px 14px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-dim); background: var(--surface); border-bottom: 1px solid var(--border); }
.bp-content .bp-prompt pre { margin: 0; padding: 14px 16px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 13.5px; line-height: 1.7; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.bp-content code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: .9em; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; color: var(--text); }
.bp-content .bp-prompt pre code { background: none; border: 0; padding: 0; }

/* callout / note box */
.bp-content .bp-note { display: flex; gap: 12px; margin: 18px 0 22px; padding: 14px 16px; border-radius: 12px; background: var(--orange-soft); border: 1px solid rgba(249,115,22,.25); }
.bp-content .bp-note .nt-ic { flex: none; font-size: 18px; }
.bp-content .bp-note p { margin: 0; color: var(--text-dim); font-size: 15px; }
.bp-content .bp-note b { color: var(--text); }
.blog-detail .section { max-width: 1200px; margin: 56px auto 0; padding-left: 24px; padding-right: 24px; }

@media (max-width: 860px) {
  .how-grid, .testi-grid, .blog-grid { grid-template-columns: 1fr; }
  .blog-feature { grid-template-columns: 1fr; }
  .blog-article h1 { font-size: 32px; }
}

/* related tools */
.related-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.related-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; transition: .15s ease; }
.related-card:hover { border-color: var(--border-2); transform: translateY(-2px); }
.related-card .rc-t { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.related-card .rc-d { color: var(--text-mute); font-size: 13px; margin-top: 4px; }
@media (max-width: 720px) { .related-grid { grid-template-columns: 1fr; } }
