@import url('https://fonts.googleapis.com/css2?family=Noto+Nastaliq+Urdu:wght@400;700&family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

/* ---- CSS VARIABLES (THEME SYSTEM) ---- */
:root {
  /* Light Mode Palette (Default) */
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-nav: rgba(255, 255, 255, 0.85);
  --bg-input: #ffffff;
  --bg-input-urdu: #f9fafb;
  --bg-hover: #f1f5f9;
  --bg-accent-light: #eff6ff;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-accent: #2563eb;
  
  --border-color: #e2e8f0;
  --border-input: #cbd5e1;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 0 15px rgba(37, 99, 235, 0.15);
  
  --btn-primary-bg: #2563eb;
  --btn-primary-hover: #1d4ed8;
  --btn-primary-text: #ffffff;
  
  --btn-secondary-bg: #ffffff;
  --btn-secondary-hover: #f1f5f9;
  --btn-secondary-text: #334155;
  
  --ad-bg: #f1f5f9;
  --ad-border: #cbd5e1;
}

html.dark {
  /* Dark Mode Palette */
  --bg-body: #020617; /* Very dark blue/black */
  --bg-card: #0f172a; /* Slate 900 */
  --bg-nav: rgba(15, 23, 42, 0.85);
  --bg-input: #1e293b; /* Slate 800 */
  --bg-input-urdu: #172033;
  --bg-hover: #1e293b;
  --bg-accent-light: rgba(56, 189, 248, 0.1); /* Sky blue tint */
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-accent: #38bdf8; /* Vibrant Sky Blue */
  
  --border-color: #334155;
  --border-input: #475569;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(56, 189, 248, 0.2);
  
  --btn-primary-bg: #0ea5e9;
  --btn-primary-hover: #0284c7;
  --btn-primary-text: #ffffff;
  
  --btn-secondary-bg: #1e293b;
  --btn-secondary-hover: #334155;
  --btn-secondary-text: #e2e8f0;
  
  --ad-bg: #0f172a;
  --ad-border: #334155;
}

/* ---- RESET & BASE ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { 
  font-family: 'Inter', system-ui, sans-serif; 
  background-color: var(--bg-body); 
  color: var(--text-main); 
  -webkit-font-smoothing: antialiased; 
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Typography Overrides for Premium Look */
h1, h2, h3, h4, h5, h6, .navbar-brand {
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -0.02em;
}

/* ---- NAVBAR (Glassmorphism) ---- */
.navbar { 
  position: sticky; 
  top: 0; 
  z-index: 100; 
  background-color: var(--bg-nav);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color); 
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.navbar-inner { max-width: 1152px; margin: 0 auto; padding: 0 1rem; height: 72px; display: flex; align-items: center; justify-content: space-between; }
.navbar-brand { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; font-size: 1.35rem; font-weight: 800; color: var(--text-main); transition: color 0.3s ease; }
.navbar-brand span.accent { color: var(--text-accent); }
.nav-right { display: flex; align-items: center; gap: 1rem; }
.nav-links { display: flex; align-items: center; gap: 0.25rem; }
.nav-links a { padding: 0.6rem 0.85rem; font-size: 0.9rem; font-weight: 600; color: var(--text-muted); border-radius: 0.5rem; text-decoration: none; transition: background 0.2s, color 0.2s; }
.nav-links a:hover, .nav-links a.active { background: var(--bg-accent-light); color: var(--text-accent); }

/* Theme Toggle Button */
.theme-toggle {
  background: none; border: none; cursor: pointer; padding: 0.6rem; border-radius: 0.5rem;
  color: var(--text-muted); transition: background 0.2s, color 0.2s; display: flex; align-items: center; justify-content: center;
}
.theme-toggle:hover { background: var(--bg-hover); color: var(--text-main); }
.theme-toggle svg { width: 20px; height: 20px; }
html.dark .icon-moon { display: none; }
html:not(.dark) .icon-sun { display: none; }

.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; border-radius: 0.5rem; color: var(--text-main); }
.hamburger:hover { background: var(--bg-hover); }
.mobile-menu { display: none; border-top: 1px solid var(--border-color); background: var(--bg-card); padding: 0.75rem 1rem; flex-direction: column; gap: 0.25rem; }
.mobile-menu.open { display: flex; }
.mobile-menu a { display: block; padding: 0.75rem 1rem; font-size: 0.95rem; font-weight: 600; color: var(--text-muted); border-radius: 0.5rem; text-decoration: none; transition: background 0.2s, color 0.2s; }
.mobile-menu a:hover, .mobile-menu a.active { background: var(--bg-accent-light); color: var(--text-accent); }

/* ---- LAYOUT ---- */
.container { max-width: 1152px; margin: 0 auto; padding: 0 1.5rem; }
.page-content { padding: 3rem 0 5rem; }
.text-center { text-align: center; }

/* ---- HERO SECTION ---- */
.hero { text-align: center; margin-bottom: 3rem; position: relative; }
/* Subtle glow effect behind hero */
.hero::before {
  content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 600px; height: 600px; background: radial-gradient(circle, var(--bg-accent-light) 0%, transparent 70%);
  z-index: -1; pointer-events: none; opacity: 0.7; transition: opacity 0.3s;
}
.hero-badge { display: inline-flex; align-items: center; gap: 0.4rem; background: var(--bg-accent-light); color: var(--text-accent); font-size: 0.8rem; font-weight: 700; padding: 0.4rem 1rem; border-radius: 9999px; margin-bottom: 1.25rem; box-shadow: var(--shadow-glow); border: 1px solid rgba(56,189,248,0.2); }
.hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; color: var(--text-main); line-height: 1.15; margin-bottom: 1rem; }
.hero p { font-size: 1.1rem; color: var(--text-muted); max-width: 650px; margin: 0 auto; }

/* ---- CARDS ---- */
.card { 
  background-color: var(--bg-card); 
  border: 1px solid var(--border-color); 
  border-radius: 1rem; 
  box-shadow: var(--shadow-sm); 
  transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease, background-color 0.3s ease; 
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
/* Specific card that shouldn't lift on hover (like the main converter) */
.card.no-hover:hover { transform: none; box-shadow: var(--shadow-md); }
.card-p { padding: 1.5rem; }
.card-p-lg { padding: 2rem 2.5rem; }

/* ---- BUTTONS ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; border: none; border-radius: 0.5rem; padding: 0.65rem 1.25rem; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.2s ease; text-decoration: none; font-family: 'Inter', sans-serif; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--btn-primary-bg); color: var(--btn-primary-text); box-shadow: 0 2px 4px rgba(37,99,235,0.2); }
.btn-primary:hover:not(:disabled) { background: var(--btn-primary-hover); transform: translateY(-1px); box-shadow: 0 4px 6px rgba(37,99,235,0.3); }
.btn-secondary { background: var(--btn-secondary-bg); color: var(--btn-secondary-text); border: 1px solid var(--border-color); }
.btn-secondary:hover:not(:disabled) { background: var(--btn-secondary-hover); }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; }

/* ---- FORM ELEMENTS ---- */
.textarea, .input {
  width: 100%; border: 1.5px solid var(--border-input); border-radius: 0.75rem; background: var(--bg-input); color: var(--text-main); font-size: 1rem; outline: none; transition: all 0.2s ease; box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
}
.textarea { padding: 1rem 1.25rem; font-family: 'Inter', sans-serif; resize: vertical; min-height: 200px; }
.input { padding: 0.85rem 1.25rem; }
.textarea:focus, .input:focus { border-color: var(--text-accent); box-shadow: 0 0 0 4px var(--bg-accent-light); }
.textarea-urdu, .input-urdu { font-family: 'Noto Nastaliq Urdu', serif; direction: rtl; text-align: right; }
.textarea-urdu { background: var(--bg-input-urdu); line-height: 2.5; font-size: 1.1rem; }

/* ---- BADGES ---- */
.badge { display: inline-flex; align-items: center; gap: 0.25rem; background: var(--bg-accent-light); color: var(--text-accent); border-radius: 9999px; padding: 0.25rem 0.75rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em; }

/* ---- AD SLOT ---- */
.ad-slot { background: var(--ad-bg); border: 1px dashed var(--ad-border); border-radius: 0.75rem; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; width: 100%; transition: all 0.3s ease; }

/* ---- CONVERTER GRID ---- */
.converter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.converter-label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.converter-label { font-size: 0.95rem; font-weight: 700; color: var(--text-main); }
.char-count { font-size: 0.75rem; font-weight: 500; color: var(--text-muted); }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; padding-top: 1.5rem; margin-top: 1.5rem; border-top: 1px solid var(--border-color); transition: border-color 0.3s; }
.btn-row-right { margin-left: auto; display: flex; gap: 0.5rem; }

/* ---- SUGGESTIONS ---- */
.suggestions-box { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 0.75rem; box-shadow: var(--shadow-lg); padding: 0.75rem; margin-top: 0.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.suggestions-box.hidden { display: none; }
.sug-label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); width: 100%; margin-bottom: 0.25rem; }
.sug-btn { padding: 0.3rem 0.8rem; font-size: 0.85rem; background: var(--bg-accent-light); color: var(--text-accent); border: none; border-radius: 9999px; cursor: pointer; font-weight: 600; transition: all 0.2s; }
.sug-btn:hover { background: var(--text-accent); color: var(--btn-primary-text); }

/* ---- STEPS (How it works) ---- */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2.5rem; }
.step-card { text-align: center; padding: 2rem 1.5rem; }
.step-num { width: 3rem; height: 3rem; background: var(--btn-primary-bg); color: var(--btn-primary-text); border-radius: 9999px; display: flex; align-items: center; justify-content: center; font-size: 1rem; font-weight: 800; margin: 0 auto 1rem; box-shadow: 0 4px 10px rgba(37,99,235,0.3); }
.step-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.step-title { font-size: 1.05rem; font-weight: 700; color: var(--text-main); margin-bottom: 0.5rem; }
.step-desc { font-size: 1rem; color: var(--text-muted); font-family: 'Noto Nastaliq Urdu', serif; direction: rtl; line-height: 2.2; }

/* ---- TOOLS GRID ---- */
.tools-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin-top: 2rem; }
.tool-link { display: flex; flex-direction: column; gap: 0.75rem; padding: 1.5rem; text-decoration: none; color: inherit; }
.tool-link-icon { font-size: 2rem; }
.tool-link-title { font-size: 1rem; font-weight: 700; color: var(--text-main); }
.tool-link-desc { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }
.tool-link-cta { font-size: 0.8rem; font-weight: 700; color: var(--text-accent); margin-top: auto; display: flex; align-items: center; gap: 0.25rem; transition: transform 0.2s; }
.tool-link:hover .tool-link-cta { transform: translateX(3px); }

/* ---- FAQ ---- */
.faq-layout { display: grid; grid-template-columns: 1fr 300px; gap: 2.5rem; margin-top: 2rem; }
.faq-list { display: flex; flex-direction: column; gap: 1rem; }
.faq-item { padding: 1.5rem; }
.faq-q { font-size: 1.05rem; font-weight: 700; color: var(--text-main); margin-bottom: 0.75rem; font-family: 'Plus Jakarta Sans', sans-serif; }
.faq-a { font-size: 1rem; color: var(--text-muted); font-family: 'Noto Nastaliq Urdu', serif; direction: rtl; text-align: right; line-height: 2.4; }
.sidebar-ad { position: sticky; top: 6rem; }

/* ---- SEO BLOCK ---- */
.seo-block { margin-top: 4rem; }
.seo-block h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 1.25rem; }
.seo-block p { font-size: 1.05rem; color: var(--text-muted); font-family: 'Noto Nastaliq Urdu', serif; direction: rtl; text-align: right; line-height: 2.4; margin-bottom: 1rem; }

/* ---- SECTION HEADERS ---- */
.section-wrap { margin-top: 5rem; }
.section-title { font-size: 2rem; font-weight: 800; color: var(--text-main); line-height: 1.2; }
.section-sub { font-size: 1.1rem; color: var(--text-muted); margin-top: 0.5rem; }

/* ---- KEYBOARD ---- */
.keyboard-wrap { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 1rem; box-shadow: var(--shadow-sm); padding: 1.5rem; transition: all 0.3s; }
.kb-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.kb-key { background: var(--bg-input); border: 1px solid var(--border-input); border-bottom-width: 3px; border-radius: 0.5rem; padding: 0.5rem 0.6rem; font-family: 'Noto Nastaliq Urdu', serif; font-size: 1.2rem; cursor: pointer; min-width: 3rem; text-align: center; color: var(--text-main); user-select: none; transition: all 0.1s; line-height: 1.5; }
.kb-key:hover { background: var(--bg-hover); border-color: var(--text-accent); color: var(--text-accent); }
.kb-key:active { transform: translateY(2px); border-bottom-width: 1px; margin-bottom: 2px; }
.kb-diacritic { font-size: 1rem; min-width: 2.5rem; }
.kb-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; padding-top: 1.5rem; margin-top: 1rem; border-top: 1px solid var(--border-color); }

/* ---- FONT GENERATOR ---- */
.font-styles { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 2rem; }
.font-style-item { padding: 1.25rem 1.5rem; }
.font-style-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.font-style-name { font-size: 0.8rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.font-style-preview { font-family: 'Noto Nastaliq Urdu', serif; font-size: 1.35rem; direction: rtl; text-align: right; background: var(--bg-input-urdu); padding: 1rem 1.25rem; border-radius: 0.75rem; white-space: pre-wrap; line-height: 2.4; color: var(--text-main); border: 1px solid var(--border-color); }
.empty-state { padding: 4rem 2rem; text-align: center; background: transparent; border-style: dashed; }
.empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-text { font-size: 1.05rem; font-weight: 500; color: var(--text-muted); }

/* ---- CAPTIONS ---- */
.cat-tabs { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-bottom: 2rem; }
.cat-tab { padding: 0.6rem 1.25rem; border-radius: 9999px; font-size: 0.9rem; font-weight: 700; border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-muted); cursor: pointer; transition: all 0.2s; box-shadow: var(--shadow-sm); }
.cat-tab.active { background: var(--text-accent); color: var(--btn-primary-text); border-color: var(--text-accent); box-shadow: 0 4px 10px rgba(56, 189, 248, 0.3); }
.cat-tab:hover:not(.active) { border-color: var(--text-accent); color: var(--text-accent); }
.captions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.caption-card { padding: 1.5rem; display: flex; flex-direction: column; }
.caption-text { font-family: 'Noto Nastaliq Urdu', serif; font-size: 1.2rem; direction: rtl; text-align: right; line-height: 2.4; color: var(--text-main); margin-bottom: 1.25rem; flex-grow: 1; }
.caption-footer { display: flex; justify-content: flex-end; padding-top: 1rem; border-top: 1px solid var(--border-color); }

/* ---- POETRY ---- */
.poetry-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 1.5rem; }
.poetry-preview { font-family: 'Noto Nastaliq Urdu', serif; background: var(--bg-input-urdu); border: 1px solid var(--border-color); border-radius: 1rem; padding: 1.5rem; min-height: 220px; white-space: pre-wrap; line-height: 2.5; direction: rtl; text-align: right; font-size: 1.1rem; color: var(--text-main); transition: all 0.2s; }
.style-controls { display: flex; flex-wrap: wrap; gap: 2rem; align-items: flex-start; padding: 1.5rem; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 1rem; margin-bottom: 1.5rem; box-shadow: var(--shadow-sm); }
.ctrl-group-label { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.75rem; }
.ctrl-btns { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ctrl-btn { padding: 0.4rem 1rem; font-size: 0.85rem; border-radius: 0.5rem; border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-muted); cursor: pointer; font-weight: 600; transition: all 0.2s; }
.ctrl-btn.active { background: var(--bg-accent-light); color: var(--text-accent); border-color: var(--text-accent); }
.ctrl-btn:hover:not(.active) { border-color: var(--text-accent); color: var(--text-accent); }
.poetry-actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.example-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.ex-pill { padding: 0.35rem 1rem; font-size: 0.85rem; font-weight: 600; border-radius: 9999px; border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-muted); cursor: pointer; transition: all 0.2s; }
.ex-pill:hover { border-color: var(--text-accent); color: var(--text-accent); }

/* ---- FOOTER ---- */
.footer { background: var(--bg-card); border-top: 1px solid var(--border-color); margin-top: 5rem; transition: background-color 0.3s, border-color 0.3s; }
.footer-inner { max-width: 1152px; margin: 0 auto; padding: 4rem 1.5rem 2rem; display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 3rem; }
.footer-brand-name { display: flex; align-items: center; gap: 0.5rem; font-size: 1.35rem; font-weight: 800; color: var(--text-main); margin-bottom: 1rem; font-family: 'Plus Jakarta Sans', sans-serif;}
.footer-brand-desc { font-size: 0.95rem; color: var(--text-muted); line-height: 1.7; max-width: 300px; }
.footer-col-title { font-size: 0.85rem; font-weight: 700; color: var(--text-main); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1.25rem; font-family: 'Plus Jakarta Sans', sans-serif;}
.footer-links { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-links a { font-size: 0.95rem; font-weight: 500; color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--text-accent); }
.footer-bottom { max-width: 1152px; margin: 0 auto; padding: 1.5rem; border-top: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; transition: border-color 0.3s; }
.footer-bottom p { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.mobile-footer-ad { position: fixed; bottom: 0; left: 0; right: 0; height: 60px; z-index: 99; display: none; border-top: 1px solid var(--border-color); box-shadow: 0 -4px 10px rgba(0,0,0,0.05); }

/* ---- TOAST ---- */
.toast { position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%); background: var(--text-main); color: var(--bg-body); padding: 0.75rem 2rem; border-radius: 9999px; font-size: 0.95rem; font-weight: 600; z-index: 9999; animation: fadeUp 0.3s cubic-bezier(0.16, 1, 0.3, 1); white-space: nowrap; box-shadow: var(--shadow-lg); }
@keyframes fadeUp { from { opacity: 0; transform: translateX(-50%) translateY(16px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ---- UTILITY ---- */
.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.mb-6{margin-bottom:1.5rem}
.hidden { display: none !important; }

/* ---- RESPONSIVE ---- */
@media(max-width:1024px){
  .faq-layout{grid-template-columns:1fr}.sidebar-ad{display:none}.tools-grid{grid-template-columns:repeat(2,1fr)}
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media(max-width:768px){
  .nav-right .nav-links{display:none}.hamburger{display:block}
  .converter-grid{grid-template-columns:1fr; gap: 1.5rem;}
  .steps-grid{grid-template-columns:1fr; gap: 1rem;}
  .captions-grid{grid-template-columns:1fr}
  .poetry-layout{grid-template-columns:1fr}
  .footer-inner{grid-template-columns:1fr}
  .mobile-footer-ad{display:flex;align-items:center;justify-content:center}
  .footer{padding-bottom:60px; margin-top: 3rem;}
  .page-content { padding-top: 1.5rem; }
  .hero h1 { font-size: 2.2rem; }
  .card-p-lg { padding: 1.5rem; }
}
@media(max-width:640px){
  .tools-grid{grid-template-columns:1fr}
  .btn-row { justify-content: center; }
  .btn-row-right { margin-left: 0; width: 100%; justify-content: center; margin-top: 0.5rem; }
}
