/* ==========================================================================
   MINSJOHNFRANCIS TOOLS — shared stylesheet
   Dark-first theme with light mode override via [data-theme="light"]
   ========================================================================== */
:root {
  /* ---- DARK (default) ---- */
  --bg:        #050505;
  --surface:   #101014;
  --surface-2: #16171C;
  --ink:       #FFFFFF;
  --ink-soft:  #A6A9B4;
  --line:      rgba(255,255,255,0.09);
  --line-soft: rgba(255,255,255,0.05);
  --header-bg: rgba(5,5,5,0.82);

  --red:       #E31E24;
  --red-dark:  #A8151A;
  --red-soft:  rgba(227,30,36,0.14);
  --gold:      #D9A441;
  --gold-soft: rgba(217,164,65,0.14);
  --charcoal-soft: rgba(255,255,255,0.06);

  /* legacy aliases so existing tool pages keep working */
  --blue: var(--red); --blue-soft: var(--red-soft);
  --violet: var(--ink-soft); --violet-soft: var(--charcoal-soft);
  --teal: var(--gold); --teal-soft: var(--gold-soft);

  --panel-dark: #0B0C10;   /* constant dark panel, same in both themes */
  --amber:      #E8B94B;

  --radius: 14px; --radius-lg: 20px;
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}
[data-theme="light"] {
  --bg:        #F6F6F8;
  --surface:   #FFFFFF;
  --surface-2: #FFFFFF;
  --ink:       #14171F;
  --ink-soft:  #5B6472;
  --line:      #E3E6EC;
  --line-soft: #ECEEF2;
  --header-bg: rgba(255,255,255,0.9);
  --red-soft:  #FCE9EA;
  --gold-soft: #FBF2E2;
  --charcoal-soft: #ECEDEF;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; margin: 0; }
p { margin: 0; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* ==========================================================================
   HEADER
   ========================================================================== */
.app-header { position: sticky; top: 0; z-index: 100; background: var(--header-bg); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.app-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 10px; }
.app-header-left { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 auto; }
.icon-btn { width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; flex-shrink: 0; }
.icon-btn svg { width: 18px; height: 18px; stroke: var(--ink); }
.icon-btn .dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--bg); }
.wordmark { display: flex; flex-direction: column; line-height: 1.05; text-decoration: none; min-width: 0; }
.wordmark b { font-family: var(--font-display); font-size: clamp(13px, 3.8vw, 16.5px); font-weight: 700; color: var(--ink); letter-spacing: -0.01em; white-space: nowrap; }
.wordmark b span { color: var(--red); }
.wordmark small { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.14em; color: var(--ink-soft); text-transform: uppercase; }
.app-header-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.theme-toggle svg { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }

.main-nav { position: fixed; inset: 64px 0 auto 0; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; gap: 0; padding: 8px 20px 18px 20px; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: transform .2s ease, opacity .2s ease; z-index: 99; display: flex; }
.main-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.main-nav a { text-decoration: none; padding: 13px 0; border-bottom: 1px solid var(--line-soft); font-size: 16.5px; font-weight: 600; color: var(--ink-soft); }
.main-nav a:hover, .main-nav a.active { color: var(--ink); }
.main-nav a.disabled-link { color: #6B6E76; pointer-events: none; }
.main-nav a.disabled-link small { font-family: var(--font-mono); font-size: 16px; margin-left: 4px; }
@media (min-width: 900px) {
  .main-nav { position: static; inset: auto; background: none; border: none; flex-direction: row; gap: 26px; padding: 0; transform: none; opacity: 1; pointer-events: auto; }
  .main-nav a { padding: 0; border: none; }
  #menuToggle { display: none; }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hub-hero { padding: 34px 0 30px 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 15.5px; color: var(--red); background: var(--red-soft); border: none; padding: 6px 12px; border-radius: 999px; margin-bottom: 18px; max-width: 100%; flex-wrap: wrap; word-break: break-word; row-gap: 4px; }
.eyebrow .pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--red); animation: pulseDot 1.6s ease-in-out infinite; }
@keyframes pulseDot { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

.hero-flex { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 30px; align-items: center; }
.hub-hero h1 { font-size: clamp(28px, 6vw, 44px); line-height: 1.1; margin-bottom: 14px; }
.hub-hero h1 .accent { color: var(--red); }
.hub-hero p.lead { color: var(--ink-soft); max-width: 460px; margin-bottom: 22px; font-size: 15.5px; }
.hero-img-wrap { position: relative; }
.hero-img-wrap img { width: 100%; filter: drop-shadow(0 20px 40px rgba(227,30,36,0.15)); animation: floatY 5s ease-in-out infinite; }
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.search-bar { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 6px 6px 6px 18px; max-width: 520px; width: 100%; box-shadow: 0 10px 26px rgba(0,0,0,0.25); }
.search-bar svg { width: 18px; height: 18px; stroke: var(--ink-soft); flex-shrink: 0; }
.search-bar input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-size: 16px; padding: 10px 0; color: var(--ink); }
.search-bar input::placeholder { color: var(--ink-soft); }
.search-bar button { flex-shrink: 0; border: none; background: var(--red); color: #fff; font-weight: 600; font-size: 16.5px; padding: 12px 18px; border-radius: 10px; cursor: pointer; transition: transform .15s ease; }
.search-bar button:hover { transform: translateY(-1px); }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 11px; font-weight: 600; font-size: 15.5px; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { box-shadow: 0 12px 26px rgba(227,30,36,0.35); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
@media (max-width: 860px) { .hero-flex { grid-template-columns: 1fr; } .hero-img-wrap { order: -1; max-width: 260px; margin: 0 auto; } }

/* ==========================================================================
   STAT STRIP
   ========================================================================== */
.stat-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 30px 0 46px 0; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 10px; text-align: center; }
.stat-card.live { border-color: var(--red-soft); background: linear-gradient(180deg, var(--red-soft), var(--surface) 70%); }
.stat-num { font-family: var(--font-display); font-weight: 700; font-size: 21px; color: var(--ink); }
.stat-card.live .stat-num { color: var(--red); }
.stat-label { font-size: 16px; color: var(--ink-soft); margin-top: 3px; }
.stat-card.soon { opacity: 0.5; }
.stat-card.soon .stat-num { font-size: 16.5px; font-family: var(--font-mono); }
@media (max-width: 760px) { .stat-strip { grid-template-columns: repeat(3, 1fr); } }

/* ==========================================================================
   SECTION HEAD + CATEGORY FILTER CHIPS
   ========================================================================== */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }
.section-head h2 { font-size: 21px; display: flex; align-items: center; gap: 8px; }
.section-head .view-all { font-size: 16.5px; font-weight: 600; color: var(--red); text-decoration: none; display: flex; align-items: center; gap: 4px; }

.filter-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 18px; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip { flex: 0 0 auto; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); font-size: 16.5px; font-weight: 600; padding: 8px 16px; border-radius: 999px; cursor: pointer; transition: all .15s ease; }
.filter-chip.active { background: var(--red); border-color: var(--red); color: #fff; }

/* ==========================================================================
   EXPLORE GRID (category cards)
   ========================================================================== */
.explore-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 50px; }
.explore-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; text-align: left; text-decoration: none; color: var(--ink); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
a.explore-card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(227,30,36,0.12); border-color: var(--red-soft); }
.explore-card.disabled { cursor: default; opacity: 0.55; }
.explore-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 19px; margin-bottom: 12px; }
.explore-card h3 { font-size: 16.5px; margin-bottom: 4px; }
.explore-card p { font-size: 15.5px; color: var(--ink-soft); }
.badge-soon { position: absolute; top: 16px; right: 16px; font-family: var(--font-mono); font-size: 9px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-soft); background: var(--bg); border: 1px solid var(--line); padding: 3px 7px; border-radius: 999px; }
.badge-live { position: absolute; top: 16px; right: 16px; font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #fff; background: var(--red); padding: 3px 8px; border-radius: 999px; display: flex; align-items: center; gap: 4px; }
.badge-live::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #fff; animation: pulseDot 1.6s ease-in-out infinite; }
@media (max-width: 900px) { .explore-grid { grid-template-columns: repeat(2, 1fr); } }

/* ==========================================================================
   BUILD FASTER CTA BANNER
   ========================================================================== */
.cta-banner { background: linear-gradient(135deg, var(--red-dark), var(--red)); border-radius: var(--radius-lg); padding: 30px 26px; margin-bottom: 50px; position: relative; overflow: hidden; }
.cta-banner::before { content: ""; position: absolute; top: -40px; right: -40px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255,255,255,0.12); filter: blur(10px); }
.cta-banner h3 { color: #fff; font-size: 19px; margin-bottom: 8px; }
.cta-banner p { color: rgba(255,255,255,0.85); font-size: 15.5px; margin-bottom: 18px; max-width: 420px; }
.cta-banner .btn-primary { background: #fff; color: var(--red-dark); }

/* ==========================================================================
   LIST-STYLE CARDS — Popular Tools / What's New / Test Lab
   ========================================================================== */
.list-card { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; text-decoration: none; color: var(--ink); transition: border-color .15s ease, transform .15s ease; }
a.list-card:hover { border-color: var(--red-soft); transform: translateX(2px); }
.list-icon { width: 40px; height: 40px; border-radius: 11px; background: var(--red-soft); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.list-body { flex: 1; min-width: 0; }
.list-body h4 { font-size: 16px; margin-bottom: 2px; }
.list-body p { font-size: 16px; color: var(--ink-soft); }
.list-badge-new { font-family: var(--font-mono); font-size: 9px; font-weight: 700; color: var(--red); background: var(--red-soft); padding: 2px 6px; border-radius: 5px; margin-right: 6px; }
.list-time { font-size: 16.5px; color: var(--ink-soft); white-space: nowrap; }
.list-cta { flex-shrink: 0; font-size: 15.5px; font-weight: 700; color: var(--red); background: var(--red-soft); padding: 8px 14px; border-radius: 8px; }

/* ==========================================================================
   TRENDING CHIPS
   ========================================================================== */
.trend-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 46px; scrollbar-width: none; }
.trend-row::-webkit-scrollbar { display: none; }
.trend-chip { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 9px 15px 9px 9px; text-decoration: none; color: var(--ink); white-space: nowrap; font-size: 16.5px; font-weight: 600; transition: border-color .15s ease, transform .15s ease; }
.trend-chip:hover { border-color: var(--red); transform: translateY(-2px); }
.trend-chip .tico { width: 24px; height: 24px; border-radius: 7px; background: var(--red-soft); display: flex; align-items: center; justify-content: center; font-size: 16px; }

/* ==========================================================================
   NEWSLETTER / SAVE BOX
   ========================================================================== */
.newsletter-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; margin-bottom: 50px; }
.newsletter-box h3 { font-size: 17px; margin-bottom: 6px; }
.newsletter-box p { font-size: 16.5px; color: var(--ink-soft); margin-bottom: 16px; max-width: 420px; }
.newsletter-form { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter-form input { flex: 1 1 220px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 15.5px; color: var(--ink); outline: none; }
.newsletter-form input:focus { border-color: var(--red); }
.newsletter-note { font-size: 16.5px; color: var(--ink-soft); margin-top: 10px; }

/* ==========================================================================
   EMPTY STATE
   ========================================================================== */
.empty-state { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius-lg); padding: 36px 22px; text-align: center; margin-bottom: 50px; }
.empty-state .empty-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 19px; margin: 0 auto 12px auto; }
.empty-state h3 { font-size: 16.5px; margin-bottom: 6px; }
.empty-state p { font-size: 16.5px; color: var(--ink-soft); max-width: 320px; margin: 0 auto; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer-feature-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; padding: 30px 0; border-top: 1px solid var(--line); }
.feat-item { display: flex; align-items: center; gap: 10px; }
.feat-icon { width: 34px; height: 34px; border-radius: 9px; background: var(--red-soft); display: flex; align-items: center; justify-content: center; font-size: 16.5px; flex-shrink: 0; }
.feat-item b { display: block; font-size: 15.5px; }
.feat-item span { display: block; font-size: 16px; color: var(--ink-soft); }
@media (max-width: 900px) { .footer-feature-strip { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .footer-feature-strip { grid-template-columns: repeat(2, 1fr); } }

.site-footer { margin-top: 20px; border-top: 1px solid var(--line); background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; padding: 40px 0 30px 0; }
.footer-grid h4 { font-size: 15.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); margin-bottom: 12px; font-weight: 600; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-grid a { text-decoration: none; font-size: 16.5px; color: var(--ink-soft); }
.footer-grid a:hover { color: var(--ink); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; border-top: 1px solid var(--line-soft); font-size: 16px; color: var(--ink-soft); flex-wrap: wrap; gap: 10px; }
.footer-tagline { background: var(--panel-dark); color: rgba(255,255,255,0.6); text-align: center; padding: 12px; font-family: var(--font-mono); font-size: 16.5px; letter-spacing: 0.06em; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ==========================================================================
   BOTTOM MOBILE NAV
   ========================================================================== */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 200; background: var(--header-bg); backdrop-filter: blur(12px); border-top: 1px solid var(--line); display: none; padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px)) 6px; }
.bottom-nav-inner { display: flex; justify-content: space-around; }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; text-decoration: none; color: var(--ink-soft); font-size: 16px; font-weight: 600; padding: 4px 8px; }
.bottom-nav a svg { width: 20px; height: 20px; stroke: currentColor; }
.bottom-nav a.active { color: var(--red); }
@media (max-width: 780px) { .bottom-nav { display: block; } body { padding-bottom: 64px; } }

.reveal { opacity: 1; transform: none; }

.save-tool-btn { margin-left: auto; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); font-size: 16px; font-weight: 600; padding: 8px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; flex-shrink: 0; transition: border-color .15s ease, color .15s ease; }
.save-tool-btn:hover { border-color: var(--red); color: var(--red); }
.save-tool-btn.is-saved { border-color: var(--red); color: var(--red); background: var(--red-soft); }

/* ==========================================================================
   TOOL PAGE LAYOUT (calculators / generators / developer-tools / saved)
   ========================================================================== */
.page-hero { padding: 36px 0 10px 0; }
.breadcrumb { font-family: var(--font-mono); font-size: 16px; color: var(--ink-soft); margin-bottom: 12px; }
.breadcrumb a { text-decoration: none; color: var(--ink-soft); }
.breadcrumb a:hover { color: var(--ink); }
.page-hero h1 { font-size: clamp(24px, 4vw, 32px); margin-bottom: 10px; }
.page-hero p { color: var(--ink-soft); font-size: 16px; max-width: 540px; margin-bottom: 18px; }

.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.toc a { text-decoration: none; font-size: 16.5px; font-weight: 600; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); }
.toc a:hover { color: var(--ink); border-color: var(--red); }

.tool-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; margin-bottom: 24px; scroll-margin-top: 84px; }
.tool-block-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.tool-block-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }
.tool-block-head h2 { font-size: 17.5px; }
.tool-block-head p { font-size: 16.5px; color: var(--ink-soft); margin-top: 2px; }

.field-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.field { flex: 1 1 180px; display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 16px; font-weight: 600; color: var(--ink-soft); }
.field input[type="text"], .field input[type="number"], .field input[type="date"], .field select, .field textarea {
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; background: var(--bg); font-size: 16px; color: var(--ink); outline: none; transition: border-color .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--red); }
.field textarea { resize: vertical; min-height: 96px; font-family: var(--font-mono); font-size: 16.5px; }

.tool-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.tbtn { border: none; cursor: pointer; padding: 12px 20px; border-radius: 10px; font-weight: 600; font-size: 16.5px; transition: transform .15s ease; }
.tbtn:hover { transform: translateY(-2px); }
.tbtn-primary { background: var(--red); color: #fff; }
.tbtn-secondary { background: var(--bg); color: var(--ink); border: 1px solid var(--line); }

.result-panel { background: var(--panel-dark); border-radius: var(--radius); padding: 18px 20px; margin-top: 16px; color: #fff; }
.result-label { font-family: var(--font-mono); font-size: 16.5px; text-transform: uppercase; letter-spacing: 0.07em; color: rgba(255,255,255,0.5); margin-bottom: 6px; }
.result-value { font-family: var(--font-mono); font-size: clamp(20px, 3vw, 27px); font-weight: 600; color: var(--amber); word-break: break-word; }
.result-value.small { font-size: 16.5px; color: #fff; line-height: 1.6; }
.result-note { font-size: 16px; color: rgba(255,255,255,0.55); margin-top: 8px; }
.copy-row { display: flex; align-items: center; gap: 10px; }
.copy-row .tbtn { padding: 8px 14px; font-size: 16px; }

.ad-slot { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 16px; margin: 28px 0; overflow: hidden; }
.ad-slot.leaderboard { min-height: 84px; }
.ad-slot.in-content { min-height: 96px; }
.ad-slot ins.adsbygoogle { display: block !important; width: 100% !important; }

.tool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 56px; }
.tool-chip { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px; text-decoration: none; color: var(--ink); display: flex; align-items: center; gap: 12px; transition: transform .15s ease, border-color .15s ease; }
.tool-chip:hover { transform: translateY(-3px); border-color: var(--red); }
.tool-chip-icon { width: 32px; height: 32px; flex-shrink: 0; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 16.5px; background: var(--red-soft); }
.tool-chip span { font-size: 16.5px; font-weight: 600; }
@media (max-width: 860px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } }

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

/* ==========================================================================
   RESPONSIVE SAFETY NET — prevents any element from overflowing the
   viewport width on small phones, regardless of content length
   ========================================================================== */
html, body { max-width: 100%; overflow-x: hidden; }
* { min-width: 0; }
img, svg, video { max-width: 100%; height: auto; }
.wrap { width: 100%; }

.field input, .field select, .field textarea { width: 100%; }
.search-bar { width: 100%; }
.search-bar input { min-width: 0; }

@media (max-width: 480px) {
  .wrap { padding: 0 14px; }
  .app-header .wrap { gap: 8px; }
  .wordmark b { font-size: 15.5px; }
  .wordmark small { font-size: 8px; }
  .icon-btn { width: 36px; height: 36px; }
  .icon-btn svg { width: 16px; height: 16px; }
  .app-header-right { gap: 6px; }
  .hub-hero h1 { font-size: 24px; }
  .eyebrow { font-size: 16px; padding: 5px 10px; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-num { font-size: 18px; }
  .search-bar { padding-left: 12px; }
  .search-bar input { font-size: 16.5px; }
  .search-bar button { padding: 10px 14px; font-size: 16px; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .cta-banner { padding: 22px 18px; }
  .footer-feature-strip { grid-template-columns: 1fr 1fr; }
  .tool-block { padding: 18px; }
  .field-row { gap: 10px; }
}

/* ==========================================================================
   FOOTER EXTRAS — legal links + social icons
   ========================================================================== */
.footer-extra { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding-top: 16px; margin-top: 4px; border-top: 1px solid var(--line-soft); }
.footer-legal { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-legal a { font-size: 13px; color: var(--ink-soft); text-decoration: none; }
.footer-legal a:hover { color: var(--ink); }
.footer-social { display: flex; gap: 8px; }
.footer-social a { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); display: flex; align-items: center; justify-content: center; color: var(--ink-soft); transition: border-color .15s ease, color .15s ease; }
.footer-social a:hover { border-color: var(--red); color: var(--red); }
.footer-social svg { width: 16px; height: 16px; }

/* Social icons inside the main nav dropdown (mobile + desktop) */
.nav-social { display: flex; gap: 8px; padding-top: 14px; margin-top: 10px; border-top: 1px solid var(--line-soft); }
.nav-social a { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); display: flex; align-items: center; justify-content: center; color: var(--ink-soft); transition: border-color .15s ease, color .15s ease; }
.nav-social a:hover { border-color: var(--red); color: var(--red); }
.nav-social svg { width: 15px; height: 15px; }
@media (min-width: 900px) {
  .nav-social { border-top: none; padding-top: 0; margin-top: 0; margin-left: 8px; padding-left: 14px; border-left: 1px solid var(--line-soft); }
}

@media (max-width: 560px) {
  .footer-extra { flex-direction: column; align-items: flex-start; }
}

/* ===========================================================================
   PROFESSIONAL DESKTOP POLISH — September 2026
   ======================================================================== */
@media (min-width: 900px) and (max-width: 1099px) {
  #menuToggle { display: flex; }
  .main-nav { position: fixed; inset: 64px 0 auto 0; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; gap: 0; padding: 8px 20px 18px; transform: translateY(-8px); opacity: 0; pointer-events: none; }
  .main-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .main-nav a { padding: 13px 0; border-bottom: 1px solid var(--line-soft); font-size: 16px; }
  .nav-social { border-top: 1px solid var(--line-soft); border-left: 0; padding: 14px 0 0; margin: 10px 0 0; }
}

@media (min-width: 1100px) {
  .app-header .wrap { max-width: 1360px; height: 72px; gap: 18px; }
  .app-header-left { flex: 0 0 205px; }
  .main-nav { flex: 1 1 auto; min-width: 0; justify-content: flex-end; gap: clamp(8px, 1.05vw, 16px); }
  .main-nav a { font-size: 13px; line-height: 1.2; white-space: nowrap; }
  .nav-social { display: none; }
  .app-header-right { gap: 6px; }
}

@media (min-width: 901px) {
  .footer-feature-strip { grid-template-columns: repeat(3, 1fr); gap: 16px 28px; padding: 26px 0; }
  .footer-grid { grid-template-columns: 1.35fr 1fr 1fr; gap: 32px; padding: 28px 0 22px; }
  .footer-grid ul { gap: 5px; }
  .footer-grid a, .footer-grid li { font-size: 14px; }
  .footer-tagline { font-size: 12px; padding: 11px 16px; }
}

.newsletter-status { min-height: 24px; margin: 10px 0 0; font-size: 14px; color: var(--ink-soft); }
.newsletter-status.is-success { color: #4dbb72; }
.newsletter-status.is-error { color: var(--red); }
