/* ==========================================================================
   NutriCounter — hand-written CSS (no frameworks, no build step)
   Clean, modern green & white theme. Mobile-first.
   CSS vars --primary / --secondary can be overridden inline from admin settings.
   ========================================================================== */

:root {
  --primary: #16a34a;
  --primary-dark: #15803d;
  --primary-darker: #14532d;
  --primary-deep: #052e16;
  --primary-light: #dcfce7;
  --primary-soft: #f0fdf4;
  --primary-tint: #f6fbf7;
  --secondary: #0ea5e9;
  --text: #1e293b;
  --text-strong: #0f172a;
  --text-muted: #64748b;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --border: #e6ebf1;
  --border-strong: #d7dee8;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --warning: #d97706;
  --info: #0284c7;
  --info-soft: #f0f9ff;
  --success-soft: #f0fdf4;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 3px rgba(15, 23, 42, .07), 0 8px 24px -12px rgba(15, 23, 42, .18);
  --shadow-lg: 0 18px 48px -16px rgba(15, 23, 42, .25);
  --shadow-green: 0 10px 28px -10px rgba(22, 163, 74, .5);
  --header-h: 68px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
           Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; }
a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  line-height: 1.2;
  margin: 0 0 .55em;
  color: var(--text-strong);
  letter-spacing: -0.02em;
  font-weight: 800;
}
p { margin: 0 0 1em; }
.lead { font-size: 1.12rem; color: var(--text-muted); max-width: 640px; }

/* ---------- Layout utilities ---------- */
.container { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: 20px; }
.container-sm { width: 100%; max-width: 780px; margin-inline: auto; padding-inline: 20px; }
.section { padding: 64px 0; }
.section-alt { background: var(--primary-tint); }
.text-center, .center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: .5rem !important; } .mt-2 { margin-top: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; } .mt-4 { margin-top: 2rem !important; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: .5rem !important; } .mb-2 { margin-bottom: 1rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; } .mb-4 { margin-bottom: 2rem !important; }

.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .09em;
  text-transform: uppercase; color: var(--primary-dark); background: var(--primary-light);
  border: 1px solid #bbf7d0; padding: .35rem .9rem; border-radius: 999px; margin-bottom: .9rem;
}
.section-title { font-size: clamp(1.6rem, 3.4vw, 2.3rem); text-align: center; margin-bottom: .5rem; }
.section-sub { text-align: center; color: var(--text-muted); font-size: 1.08rem; max-width: 660px; margin: 0 auto 2.6rem; }

/* ---------- Grid ---------- */
.grid-2, .grid-3, .grid-4, .card-grid, .cards-3, .tools-grid {
  display: grid; gap: 22px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .grid-2, .grid-3, .card-grid, .cards-3, .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-3, .card-grid, .cards-3 { grid-template-columns: repeat(3, 1fr); }
  .tools-grid { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1280px) {
  .tools-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 700; font-size: .96rem;
  padding: .78rem 1.7rem; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; text-align: center; transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
  line-height: 1.4; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--primary-light); outline-offset: 2px; }
.btn-primary {
  background: linear-gradient(135deg, #22c55e 0%, var(--primary) 55%, var(--primary-dark) 100%);
  color: #fff !important; border-color: transparent; box-shadow: var(--shadow-green);
}
.btn-primary:hover { box-shadow: 0 14px 32px -10px rgba(22, 163, 74, .6); }
.btn-secondary { background: #fff; color: var(--primary-darker) !important; border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { border-color: var(--primary); background: var(--primary-soft); box-shadow: var(--shadow); }
.btn-danger { background: var(--danger); color: #fff !important; border-color: var(--danger); }
.btn-danger:hover { background: #b91c1c; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-soft); border-color: var(--border-strong); }
.btn-sm { padding: .45rem 1rem; font-size: .86rem; }
.btn-block { display: flex; width: 100%; }
.btn-lg { padding: 1rem 2.2rem; font-size: 1.06rem; }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* ---------- Cards ---------- */
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #bbf7d0; text-decoration: none; }
.card h3 { margin-top: 0; font-size: 1.18rem; }
.card p:last-child { margin-bottom: 0; }
.card-icon {
  width: 56px; height: 56px; border-radius: 16px; background: var(--primary-soft);
  border: 1px solid var(--primary-light);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.7rem; margin-bottom: 1.1rem;
}
.tool-card { display: block; color: var(--text); position: relative; overflow: hidden; }
.tool-card:hover { color: var(--text); }
.tool-card::after {
  content: "→"; position: absolute; inset-inline-end: 20px; top: 22px;
  color: var(--primary); font-weight: 800; font-size: 1.2rem; opacity: 0; transform: translateX(-6px);
  transition: opacity .18s ease, transform .18s ease;
}
[dir="rtl"] .tool-card::after { content: "←"; transform: translateX(6px); }
.tool-card:hover::after { opacity: 1; transform: translateX(0); }
.tool-card .card-icon {
  background: linear-gradient(135deg, var(--primary-soft), var(--primary-light));
  border: 1px solid #bbf7d0;
}
.tool-card .card-link { color: var(--primary-dark); font-weight: 700; }
.tool-card p { color: var(--text-muted); font-size: .94rem; }

/* Result highlight card (calculators) */
.result-card {
  border: none; background: linear-gradient(180deg, #fff 0%, var(--primary-soft) 130%);
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.result-card::before {
  content: ""; position: absolute; inset-inline: 0; top: 0; height: 5px;
  background: linear-gradient(90deg, #22c55e, var(--primary-dark));
}

/* ---------- Forms ---------- */
.form-group { margin-bottom: 1.15rem; }
.form-group label { display: block; font-weight: 700; margin-bottom: .45rem; font-size: .93rem; color: var(--text-strong); }
.form-control, select.form-control, textarea.form-control {
  display: block; width: 100%; padding: .78rem 1rem; font-size: 1rem; font-family: inherit;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: #fff; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.form-control:hover { border-color: var(--border-strong); }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); }
textarea.form-control { min-height: 120px; resize: vertical; }
select.form-control { 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='%2364748b' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; padding-inline-end: 2.6rem;
}
[dir="rtl"] select.form-control { background-position: left 1rem center; }
.form-check { display: flex; align-items: flex-start; gap: .65rem; margin-bottom: 1rem; }
.form-check input { margin-top: .25rem; width: 1.15rem; height: 1.15rem; accent-color: var(--primary); flex-shrink: 0; }
.form-hint { font-size: .85rem; color: var(--text-muted); margin-top: .35rem; }
.form-error { color: var(--danger); font-size: .87rem; margin-top: .35rem; }
.form-row { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .form-row { grid-template-columns: repeat(2, 1fr); } .form-row.cols-3 { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th, .table td { padding: .8rem 1rem; text-align: start; border-bottom: 1px solid var(--border); }
.table th { background: var(--bg-soft); font-weight: 700; white-space: nowrap; color: var(--text-strong); }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--primary-soft); }

/* ---------- Alerts ---------- */
.alert { padding: .95rem 1.15rem; border-radius: var(--radius-sm); margin-bottom: 1.2rem; border: 1px solid; font-size: .95rem; box-shadow: var(--shadow-sm); }
.alert p:last-child { margin-bottom: 0; }
.alert-success { background: var(--success-soft); border-color: #86efac; color: #166534; }
.alert-error, .alert-danger { background: var(--danger-soft); border-color: #fca5a5; color: #991b1b; }
.alert-info { background: var(--info-soft); border-color: #7dd3fc; color: #0c4a6e; }
.alert-warning { background: #fffbeb; border-color: #fcd34d; color: #92400e; }
.alert ul { margin: .3rem 0 0; padding-inline-start: 1.2rem; }

/* ---------- Badges & progress ---------- */
.badge { display: inline-block; padding: .28rem .75rem; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--bg-soft); color: var(--text); border: 1px solid var(--border); }
.badge-green { background: var(--primary-soft); color: var(--primary-darker); border-color: #86efac; }
.badge-red { background: var(--danger-soft); color: #991b1b; border-color: #fca5a5; }
.badge-blue { background: var(--info-soft); color: #0c4a6e; border-color: #7dd3fc; }
.badge-amber { background: #fffbeb; color: #92400e; border-color: #fcd34d; }
.progress { height: 10px; background: #e8edf3; border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, #22c55e, var(--primary-dark)); border-radius: 999px; transition: width .5s ease; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(720px 360px at 85% -10%, rgba(74, 222, 128, .35), transparent 60%),
    radial-gradient(560px 320px at 8% 110%, rgba(14, 165, 233, .18), transparent 60%),
    linear-gradient(135deg, var(--primary-deep) 0%, #14532d 42%, var(--primary-dark) 78%, var(--primary) 130%);
  color: #fff; padding: 72px 0 80px; position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.14) 1.2px, transparent 1.2px);
  background-size: 26px 26px;
  mask-image: radial-gradient(70% 90% at 50% 20%, #000 30%, transparent 100%);
}
.hero-inner { position: relative; z-index: 1; text-align: center; max-width: 860px; margin: 0 auto; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28);
  backdrop-filter: blur(6px); color: #fff; font-size: .85rem; font-weight: 700;
  padding: .42rem 1.05rem; border-radius: 999px; margin-bottom: 1.3rem;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 10px #4ade80; }
.hero h1 { color: #fff; font-size: clamp(2.1rem, 5.4vw, 3.4rem); margin-bottom: .8rem; letter-spacing: -0.03em; }
.hero h1 .hl { color: #86efac; }
.hero-sub, .hero p.lead { font-size: clamp(1.05rem, 2.2vw, 1.28rem); color: rgba(255,255,255,.88); max-width: 680px; margin: 0 auto 2rem; }
.hero-cta { display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2.6rem; }
.hero .btn-primary { background: #fff; color: var(--primary-darker) !important; border-color: #fff; box-shadow: 0 12px 30px -8px rgba(0,0,0,.35); }
.hero .btn-primary:hover { box-shadow: 0 16px 36px -8px rgba(0,0,0,.4); }
.hero .btn-outline-light { background: transparent; color: #fff !important; border: 1.5px solid rgba(255,255,255,.55); }
.hero .btn-outline-light:hover { background: rgba(255,255,255,.14); border-color: #fff; }
.hero-stats { display: flex; justify-content: center; gap: 0; flex-wrap: wrap; }
.hero-stat { padding: .4rem 1.8rem; text-align: center; }
.hero-stat + .hero-stat { border-inline-start: 1px solid rgba(255,255,255,.25); }
.hero-stat strong { display: block; font-size: 1.65rem; font-weight: 800; color: #fff; letter-spacing: -0.02em; }
.hero-stat span { font-size: .86rem; color: rgba(255,255,255,.78); }
@media (min-width: 768px) { .hero { padding: 96px 0 104px; } }

/* ---------- AI panel (dark feature band) ---------- */
.ai-panel {
  background:
    radial-gradient(600px 300px at 12% 0%, rgba(74, 222, 128, .22), transparent 60%),
    linear-gradient(150deg, #0b2b1a 0%, var(--primary-deep) 60%, #0a1f14 100%);
  border-radius: var(--radius-lg); padding: clamp(2rem, 5vw, 3.6rem);
  color: #fff; position: relative; overflow: hidden; box-shadow: var(--shadow-lg);
}
.ai-panel::before {
  content: ""; position: absolute; inset: 0; opacity: .45; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.1) 1.2px, transparent 1.2px);
  background-size: 24px 24px;
  mask-image: radial-gradient(80% 100% at 50% 0%, #000 20%, transparent 100%);
}
.ai-panel > * { position: relative; z-index: 1; }
.ai-panel .eyebrow { background: rgba(74,222,128,.16); border-color: rgba(74,222,128,.4); color: #86efac; }
.ai-panel h2 { color: #fff; }
.ai-panel .section-sub { color: rgba(255,255,255,.75); }
.ai-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .ai-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .ai-grid { grid-template-columns: repeat(4, 1fr); } }
.ai-card {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--radius); padding: 1.5rem; color: #fff; display: block;
  backdrop-filter: blur(8px); transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.ai-card:hover { transform: translateY(-4px); background: rgba(255,255,255,.12); border-color: rgba(74,222,128,.55); text-decoration: none; color: #fff; }
.ai-card .ai-icon { font-size: 2rem; margin-bottom: .8rem; display: block; }
.ai-card h3 { color: #fff; font-size: 1.08rem; margin-bottom: .4rem; }
.ai-card p { color: rgba(255,255,255,.72); font-size: .9rem; margin: 0; }
.ai-card .ai-go { display: inline-block; margin-top: .9rem; color: #86efac; font-weight: 700; font-size: .9rem; }

/* ---------- Steps (how it works) ---------- */
.steps { display: grid; gap: 22px; grid-template-columns: 1fr; counter-reset: step; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2rem 1.6rem; text-align: center; box-shadow: var(--shadow-sm); position: relative;
}
.step-num {
  width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 1.1rem;
  background: linear-gradient(135deg, #22c55e, var(--primary-dark)); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; font-weight: 800; box-shadow: var(--shadow-green);
}
.step h3 { font-size: 1.12rem; }
.step p { color: var(--text-muted); font-size: .94rem; margin: 0; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background:
    radial-gradient(480px 240px at 90% 10%, rgba(255,255,255,.22), transparent 60%),
    linear-gradient(120deg, var(--primary-dark) 0%, var(--primary) 70%, #22c55e 130%);
  border-radius: var(--radius-lg); padding: clamp(2.2rem, 5vw, 3.4rem);
  text-align: center; color: #fff; box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.cta-banner h2 { color: #fff; font-size: clamp(1.5rem, 3.4vw, 2.2rem); margin-bottom: .6rem; }
.cta-banner p { color: rgba(255,255,255,.88); max-width: 560px; margin: 0 auto 1.8rem; font-size: 1.05rem; }
.cta-banner .btn-primary { background: #fff; color: var(--primary-darker) !important; border-color: #fff; box-shadow: 0 12px 30px -8px rgba(0,0,0,.35); }

/* ---------- Feature list ---------- */
.feature-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }
.feature { display: flex; gap: 1rem; align-items: flex-start; }
.feature .f-icon {
  width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0;
  background: var(--primary-soft); border: 1px solid var(--primary-light);
  display: flex; align-items: center; justify-content: center; font-size: 1.45rem;
}
.feature h3 { font-size: 1.05rem; margin-bottom: .25rem; }
.feature p { color: var(--text-muted); font-size: .92rem; margin: 0; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: .4rem; justify-content: center; margin: 2rem 0 0; list-style: none; padding: 0; flex-wrap: wrap; }
.pagination li a, .pagination li span {
  display: inline-block; min-width: 2.4rem; padding: .5rem .7rem; text-align: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; color: var(--text);
}
.pagination li a:hover { text-decoration: none; border-color: var(--primary); color: var(--primary-dark); }
.pagination li.active span { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.pagination li.disabled span { opacity: .45; }

/* ---------- Chat UI (AI coach / help) ---------- */
.chat-box { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; display: flex; flex-direction: column; height: 480px; max-height: 65vh; overflow: hidden; box-shadow: var(--shadow); }
.chat-messages { flex: 1; overflow-y: auto; padding: 1.1rem; display: flex; flex-direction: column; gap: .8rem; background: var(--primary-tint); }
.chat-msg { max-width: 85%; padding: .75rem 1.05rem; border-radius: 16px; font-size: .95rem; line-height: 1.6; box-shadow: var(--shadow-sm); }
.chat-msg p:last-child { margin-bottom: 0; }
.chat-user { align-self: flex-end; background: linear-gradient(135deg, #22c55e, var(--primary-dark)); color: #fff; border-end-end-radius: 5px; }
.chat-ai { align-self: flex-start; background: #fff; border: 1px solid var(--border); border-end-start-radius: 5px; }
.chat-ai.typing { color: var(--text-muted); font-style: italic; }
.chat-input { display: flex; gap: .6rem; padding: .85rem; border-top: 1px solid var(--border); background: #fff; }
.chat-input input { flex: 1; }

/* ---------- FAQ accordion ---------- */
.faq-list { max-width: 780px; margin: 0 auto; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: .8rem; background: #fff; overflow: hidden; transition: box-shadow .18s ease, border-color .18s ease; }
.faq-item.open { border-color: #bbf7d0; box-shadow: var(--shadow); }
.faq-q { width: 100%; text-align: start; background: none; border: none; padding: 1.05rem 1.25rem; font-size: 1rem; font-weight: 700; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; color: var(--text-strong); font-family: inherit; }
.faq-q:hover { color: var(--primary-dark); }
.faq-q .faq-toggle { font-size: 1.4rem; color: var(--primary); font-weight: 400; flex-shrink: 0; transition: transform .2s; }
.faq-item.open .faq-toggle { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a-inner { padding: 0 1.25rem 1.15rem; color: var(--text-muted); }
.faq-item.open .faq-a { max-height: 800px; }

/* ---------- Announcement bar ---------- */
.announcement-bar { background: var(--primary-deep); color: #fff; text-align: center; padding: .6rem 1rem; font-size: .9rem; }
.announcement-bar a { color: #fff; text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  background: rgba(255,255,255,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 12px rgba(15, 23, 42, .05);
}
.header-inner { display: flex; align-items: center; gap: 1rem; height: var(--header-h); }
.site-logo { display: flex; align-items: center; gap: .65rem; font-weight: 800; font-size: 1.28rem; color: var(--primary-darker); letter-spacing: -0.02em; }
.site-logo:hover { text-decoration: none; }
.site-logo img { height: 40px; width: auto; border-radius: 10px; }
.site-logo .logo-mark {
  width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #22c55e, var(--primary-dark)); font-size: 1.35rem; box-shadow: var(--shadow-green);
}
.main-nav { display: none; align-items: center; gap: .15rem; margin-inline-start: auto; }
.main-nav > a, .main-nav .nav-drop-btn {
  padding: .6rem .85rem; border-radius: var(--radius-sm); color: var(--text); font-weight: 600; font-size: .93rem;
  background: none; border: none; cursor: pointer; font-family: inherit; white-space: nowrap;
  transition: background .15s, color .15s;
}
.main-nav > a:hover, .main-nav .nav-drop-btn:hover { background: var(--primary-soft); color: var(--primary-darker); text-decoration: none; }
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  display: none; position: absolute; top: calc(100% + 8px); inset-inline-start: 0; min-width: 240px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); padding: .45rem; z-index: 120;
}
.nav-dropdown.open .nav-dropdown-menu, .nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a { display: flex; align-items: center; gap: .6rem; padding: .62rem .8rem; border-radius: 8px; font-weight: 500; color: var(--text); }
.nav-dropdown-menu a:hover { background: var(--primary-soft); color: var(--primary-darker); text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: .55rem; margin-inline-start: auto; }
.main-nav ~ .header-actions { margin-inline-start: 0; }
.lang-switcher { position: relative; }
.lang-btn { display: flex; align-items: center; gap: .4rem; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 999px; padding: .48rem .9rem; cursor: pointer; font-weight: 700; font-size: .87rem; font-family: inherit; color: var(--text); transition: border-color .15s; }
.lang-btn:hover { border-color: var(--primary); }
.lang-menu { display: none; position: absolute; top: calc(100% + 6px); inset-inline-end: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); min-width: 170px; padding: .4rem; z-index: 130; }
.lang-switcher.open .lang-menu { display: block; }
.lang-menu a { display: block; padding: .55rem .8rem; border-radius: 8px; color: var(--text); font-size: .9rem; }
.lang-menu a:hover, .lang-menu a.active { background: var(--primary-soft); color: var(--primary-darker); text-decoration: none; }
.mobile-menu-btn { display: inline-flex; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .55rem .65rem; cursor: pointer; flex-direction: column; gap: 4px; }
.mobile-menu-btn span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; }
@media (min-width: 1024px) {
  .mobile-menu-btn { display: none; }
  .main-nav { display: flex; }
  .header-actions .btn { display: inline-flex; }
}
.header-actions .btn { display: none; }
@media (min-width: 1024px) { .header-actions .btn { display: inline-flex; } }
.mobile-nav { display: none; border-top: 1px solid var(--border); background: #fff; padding: .6rem 1rem 1rem; max-height: 70vh; overflow-y: auto; }
.mobile-nav.open { display: block; }
.mobile-nav a, .mobile-nav .mobile-nav-link { display: block; padding: .7rem .4rem; border-bottom: 1px solid var(--border); color: var(--text); font-weight: 600; }
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav-group > span { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin: .7rem 0 .2rem; font-weight: 800; }
.mobile-nav-auth { display: flex; gap: .6rem; padding: .8rem 0 0; }
.mobile-nav-auth .btn { flex: 1; }

/* ---------- Footer ---------- */
.site-footer { background: #0b1f14; color: #b8c7bd; padding: 56px 0 0; margin-top: 72px; border-top: 4px solid var(--primary); }
.footer-grid { display: grid; gap: 2.2rem; grid-template-columns: 1fr; padding-bottom: 2.4rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; } }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 1.1rem; }
.site-footer a { color: #b8c7bd; }
.site-footer a:hover { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.2rem; color: #fff; margin-bottom: .8rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .6rem; }
.social-links { display: flex; gap: .7rem; margin-top: 1.1rem; }
.social-links a { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.08); display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; transition: background .16s, transform .16s; }
.social-links a:hover { background: var(--primary); text-decoration: none; transform: translateY(-2px); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 1.2rem 0; font-size: .87rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ---------- Ad slots ---------- */
.ad-slot { text-align: center; margin: 1.2rem auto; max-width: 1160px; padding-inline: 20px; }
.ad-slot .ad-label { font-size: .7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .3rem; }

/* ---------- Cookie banner ---------- */
.cookie-banner { position: fixed; bottom: 16px; inset-inline: 16px; background: #0f172a; color: #e2e8f0; padding: 1.1rem 1.2rem; z-index: 200; display: none; box-shadow: var(--shadow-lg); border-radius: var(--radius); border: 1px solid rgba(255,255,255,.12); }
.cookie-banner.show { display: block; }
.cookie-inner { max-width: 1160px; margin: 0 auto; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; font-size: .9rem; }
.cookie-inner p { margin: 0; flex: 1; min-width: 220px; }
.cookie-inner .btn { flex-shrink: 0; }

/* ---------- Flash / misc ---------- */
.flash-wrap { padding-top: 1.2rem; }
.page-head { padding: 2.6rem 0 1.2rem; }
.page-head h1 { font-size: clamp(1.7rem, 3.6vw, 2.3rem); }
.page-head .lead { margin-top: .4rem; }
.breadcrumb { font-size: .87rem; color: var(--text-muted); margin-bottom: .6rem; }
.stat-cards { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .stat-cards { grid-template-columns: repeat(4, 1fr); } }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow-sm); }
.stat-card .stat-num { font-size: 1.9rem; font-weight: 800; color: var(--primary-darker); letter-spacing: -0.02em; }
.stat-card .stat-label { font-size: .85rem; color: var(--text-muted); }
.list-clean { list-style: none; padding: 0; margin: 0; }
.divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.inline-form { display: inline; }
.search-bar { display: flex; gap: .6rem; margin-bottom: 1.2rem; }
.search-bar input { flex: 1; }
.guest-notice { background: var(--info-soft); border: 1px solid #7dd3fc; color: #0c4a6e; border-radius: var(--radius-sm); padding: .85rem 1.05rem; margin-bottom: 1.2rem; font-size: .92rem; }

/* ---------- Blog cards ---------- */
.post-card { overflow: hidden; padding: 0; display: flex; flex-direction: column; }
.post-card .post-img { aspect-ratio: 16/9; background: linear-gradient(135deg, var(--primary-soft), var(--primary-light)); overflow: hidden; }
.post-card .post-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.post-card:hover .post-img img { transform: scale(1.04); }
.post-card .post-body { padding: 1.4rem 1.5rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.post-card h3 { font-size: 1.08rem; }
.post-card .btn { margin-top: auto; align-self: flex-start; }
.post-meta { font-size: .83rem; color: var(--text-muted); margin-bottom: .55rem; }

/* ---------- Auth pages ---------- */
.auth-wrap { display: flex; justify-content: center; padding: 3rem 1rem; position: relative; }
.auth-wrap::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(560px 280px at 50% 0%, var(--primary-soft), transparent 70%);
}
.auth-card { max-width: 460px; width: 100%; padding: 2.4rem; position: relative; box-shadow: var(--shadow-lg); border-top: 4px solid var(--primary); }
.auth-card h1 { margin-top: 0; font-size: 1.6rem; text-align: center; }
.auth-card .auth-sub { text-align: center; color: var(--text-muted); font-size: .95rem; margin-bottom: 1.6rem; }
.auth-links { margin-top: 1.2rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; font-size: .9rem; }
.honeypot { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Admin ---------- */
.admin-layout { display: flex; min-height: 100vh; background: var(--bg-soft); }
.admin-sidebar { width: 248px; background: #0b1f14; color: #b8c7bd; flex-shrink: 0; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.admin-brand { padding: 1.25rem; font-weight: 800; color: #fff; font-size: 1.12rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.admin-brand a { color: #fff; }
.admin-brand a:hover { text-decoration: none; }
.admin-nav { flex: 1; overflow-y: auto; padding: .8rem; }
.admin-nav a { display: block; padding: .68rem .85rem; border-radius: var(--radius-sm); color: #b8c7bd; font-size: .92rem; font-weight: 500; margin-bottom: 2px; }
.admin-nav a:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.admin-nav a.active { background: var(--primary); color: #fff; box-shadow: var(--shadow-green); }
.admin-nav .nav-group { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #7d917f; margin: 1rem .4rem .4rem; font-weight: 700; }
.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-topbar { background: #fff; border-bottom: 1px solid var(--border); padding: .85rem 1.5rem; display: flex; align-items: center; gap: 1rem; position: sticky; top: 0; z-index: 50; box-shadow: var(--shadow-sm); }
.admin-topbar h1 { font-size: 1.25rem; margin: 0; }
.admin-topbar .spacer { flex: 1; }
.admin-content { padding: 1.5rem; }
.admin-toggle { display: none; }
@media (max-width: 900px) {
  .admin-sidebar { position: fixed; inset-inline-start: 0; top: 0; z-index: 300; transform: translateX(-110%); transition: transform .25s ease; }
  [dir="rtl"] .admin-sidebar { transform: translateX(110%); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-toggle { display: inline-flex; }
}
.kpi-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); margin-bottom: 1.5rem; }
@media (min-width: 900px) { .kpi-grid { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow-sm); }
.kpi .kpi-num, .kpi strong { font-size: 1.9rem; font-weight: 800; color: var(--primary-darker); letter-spacing: -0.02em; display: block; }
.kpi .kpi-label { font-size: .85rem; color: var(--text-muted); }
.settings-group { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.4rem; box-shadow: var(--shadow-sm); }
.settings-group h3 { margin-top: 0; padding-bottom: .6rem; border-bottom: 1px solid var(--border); }
.chart-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow-sm); }
.bar-row { display: flex; align-items: center; gap: .7rem; margin-bottom: .5rem; font-size: .85rem; }
.bar-row .bar-label { width: 90px; flex-shrink: 0; color: var(--text-muted); }
.bar-row .progress { flex: 1; }
.bar-row .bar-val { width: 50px; text-align: end; font-weight: 700; }
.media-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 768px) { .media-grid { grid-template-columns: repeat(4, 1fr); } }
.media-item { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: #fff; transition: box-shadow .16s ease, transform .16s ease; }
.media-item:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.media-item img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }
.media-item .media-meta { padding: .5rem .65rem; font-size: .78rem; color: var(--text-muted); }

/* ---------- Error pages ---------- */
.error-page { text-align: center; padding: 90px 0; }
.error-page .error-code { font-size: 5.5rem; font-weight: 800; color: var(--primary); line-height: 1; letter-spacing: -0.04em; }
.error-page h1 { font-size: 1.8rem; margin: 1rem 0 .5rem; }

/* ---------- Contact form / misc ---------- */
.contact-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1.2fr; } }

/* ---------- Responsive tweaks ---------- */
@media (max-width: 767px) {
  .section { padding: 48px 0; }
  .card { padding: 20px; }
  .hero h1 { font-size: 2rem; }
  .hero-stat { padding: .4rem 1.1rem; }
  .chat-box { height: 420px; }
  .admin-content { padding: 1rem; }
  .table { font-size: .85rem; }
  .ai-panel, .cta-banner { border-radius: 20px; }
}

/* ---------- Footer newsletter (RTL-safe: flex + gap, no physical left/right) ---------- */
.footer-newsletter { padding-bottom: 2.2rem; margin-bottom: 1.6rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.newsletter-card { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 16px; padding: 1.4rem 1.6rem; }
.newsletter-text { flex: 1; min-width: 0; }
.newsletter-text h4 { color: #fff; font-size: 1.1rem; margin: 0 0 .3rem; }
.newsletter-text p { margin: 0; font-size: .92rem; color: rgba(255,255,255,.75); }
.newsletter-form { display: flex !important; gap: .5rem; flex: 0 1 420px; min-width: 0; }
.newsletter-form .newsletter-input { flex: 1 1 auto !important; min-width: 0 !important; width: auto !important; border-radius: 10px; }
.newsletter-form .newsletter-btn { flex-shrink: 0; white-space: nowrap; border-radius: 10px; }
@media (max-width: 640px) {
  .newsletter-card { flex-direction: column; align-items: stretch; text-align: center; }
  .newsletter-form { flex: 1 1 auto; flex-direction: column; }
  .newsletter-form .newsletter-input { width: 100% !important; }
  .newsletter-form .newsletter-btn { width: 100%; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   MODERN UI REFRESH — Tool pages, Blog, AI tools (Oct 2026)
   ============================================================ */

/* --- Tool page hero header --- */
.tool-hero {
  text-align: center; padding: 2.5rem 1rem 1.5rem; margin-bottom: 1.5rem;
}
.tool-hero h1 {
  font-size: 2rem; font-weight: 800; color: var(--text);
  margin: 0 0 .5rem; letter-spacing: -0.02em;
}
.tool-hero .lead {
  font-size: 1.05rem; color: var(--text-muted); max-width: 640px;
  margin: 0 auto; line-height: 1.6;
}
.tool-hero-icon {
  width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 1rem;
  background: linear-gradient(135deg, #22c55e, #15803d);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.9rem; box-shadow: 0 10px 28px -8px rgba(22,163,74,.5);
}

/* --- Enhanced cards --- */
.card {
  border-radius: 18px; padding: 28px;
  box-shadow: 0 4px 24px -6px rgba(0,0,0,.08);
  border: 1px solid #e8f5ec;
}
.card:hover { border-color: #bbf7d0; }

/* --- Modern form controls --- */
.form-group { margin-bottom: 1.1rem; }
.form-group label {
  display: block; font-weight: 600; font-size: .92rem;
  color: var(--text); margin-bottom: .45rem;
}
.form-control, .form-select {
  width: 100%; padding: .75rem 1rem; font-size: 1rem;
  border: 1.5px solid #d1d5db; border-radius: 12px;
  background: #fff; color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control:focus, .form-select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(22,163,74,.12);
}
.form-control::placeholder { color: #9ca3af; }
.form-row { display: flex; gap: 1rem; }
.form-row .form-group { flex: 1; min-width: 0; }
@media (max-width: 560px) { .form-row { flex-direction: column; gap: 0; } }

/* --- Result display cards --- */
.result-card {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 1.5px solid #86efac; border-radius: 18px;
  padding: 1.8rem; text-align: center; margin-top: 1.5rem;
}
.result-value {
  font-size: 2.6rem; font-weight: 800; color: var(--primary-darker);
  line-height: 1.1; margin: .3rem 0;
}
.result-label {
  font-size: .88rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted); font-weight: 600;
}
.result-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem; margin-top: 1.2rem;
}
.result-item {
  background: #fff; border: 1px solid #bbf7d0; border-radius: 14px;
  padding: 1rem .8rem; text-align: center;
}
.result-item .result-value { font-size: 1.6rem; }
.result-item .result-label { font-size: .78rem; }

/* --- Blog cards --- */
.blog-card {
  background: #fff; border: 1px solid #e8f5ec; border-radius: 18px;
  overflow: hidden; transition: transform .2s ease, box-shadow .2s ease;
  display: flex; flex-direction: column; height: 100%;
}
.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px -12px rgba(22,163,74,.25);
  border-color: #bbf7d0;
}
.blog-card-img {
  width: 100%; height: 190px; object-fit: cover; background: #f0fdf4;
}
.blog-card-body { padding: 1.3rem; display: flex; flex-direction: column; flex: 1; }
.blog-card-cat {
  display: inline-block; font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--primary-dark); background: var(--primary-soft);
  padding: .28rem .7rem; border-radius: 20px; margin-bottom: .7rem;
  align-self: flex-start;
}
.blog-card-title {
  font-size: 1.12rem; font-weight: 700; line-height: 1.4;
  margin: 0 0 .6rem; color: var(--text);
}
.blog-card-title a { color: inherit; text-decoration: none; }
.blog-card-title a:hover { color: var(--primary-dark); }
.blog-card-excerpt {
  font-size: .92rem; color: var(--text-muted); line-height: 1.6;
  margin: 0 0 1rem; flex: 1;
}
.blog-card-meta {
  display: flex; align-items: center; gap: .8rem;
  font-size: .82rem; color: var(--text-muted);
  border-top: 1px solid #f0fdf4; padding-top: .9rem;
}

/* --- Article page --- */
.article-hero-img {
  width: 100%; max-height: 420px; object-fit: cover;
  border-radius: 20px; margin-bottom: 2rem;
  box-shadow: 0 12px 40px -12px rgba(0,0,0,.18);
}
.article-content {
  font-size: 1.06rem; line-height: 1.85; color: #1f2937;
}
.article-content h2 {
  font-size: 1.5rem; font-weight: 750; margin: 2rem 0 1rem;
  color: var(--text); letter-spacing: -0.01em;
}
.article-content h3 { font-size: 1.25rem; font-weight: 700; margin: 1.6rem 0 .8rem; }
.article-content p { margin: 0 0 1.2rem; }
.article-content ul, .article-content ol { margin: 0 0 1.2rem; padding-inline-start: 1.5rem; }
.article-content li { margin-bottom: .5rem; }
.article-content blockquote {
  border-inline-start: 4px solid var(--primary);
  background: #f0fdf4; padding: 1rem 1.3rem; border-radius: 0 12px 12px 0;
  margin: 1.5rem 0; font-style: italic; color: #374151;
}
.article-content img { border-radius: 14px; max-width: 100%; height: auto; }

/* --- AI tool pages --- */
.ai-hero {
  text-align: center; padding: 2.5rem 1rem 1.2rem;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-radius: 0 0 28px 28px; margin-bottom: 2rem;
}
.ai-hero h1 { font-size: 1.9rem; font-weight: 800; margin: 0 0 .5rem; }
.ai-hero p { color: var(--text-muted); max-width: 600px; margin: 0 auto; }
.ai-chat-box {
  background: #fff; border: 1.5px solid #bbf7d0; border-radius: 20px;
  box-shadow: 0 8px 32px -8px rgba(22,163,74,.15);
  overflow: hidden;
}
.ai-msg {
  max-width: 82%; padding: .85rem 1.15rem; border-radius: 16px;
  font-size: .95rem; line-height: 1.6; margin-bottom: .7rem;
}
.ai-msg-bot {
  background: #f0fdf4; border: 1px solid #dcfce7; color: #1f2937;
  border-start-start-radius: 5px; align-self: flex-start;
}
.ai-msg-user {
  background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff;
  border-end-end-radius: 5px; align-self: flex-end;
  box-shadow: 0 4px 14px -4px rgba(22,163,74,.4);
}

/* --- Buttons polish --- */
.btn {
  border-radius: 12px; font-weight: 700; padding: .8rem 1.8rem;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-primary {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 6px 20px -6px rgba(22,163,74,.5);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px -6px rgba(22,163,74,.6);
}

/* --- Page container spacing --- */
.container-sm { max-width: 720px; }
.page-section { padding: 2rem 0; }

/* ============================================================
   DRAMATIC UI — Bold, striking redesign (Oct 2026)
   ============================================================ */

/* --- Dramatic tool hero with gradient --- */
.tool-hero {
  background: linear-gradient(135deg, #052e16 0%, #14532d 40%, #15803d 75%, #16a34a 100%);
  border-radius: 24px;
  padding: 3rem 2rem;
  margin: 1.5rem 0 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px -15px rgba(22, 163, 74, .4);
}
.tool-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.12) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
  opacity: .6;
  pointer-events: none;
}
.tool-hero > * { position: relative; z-index: 1; }
.tool-hero h1 {
  color: #fff !important;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  margin: 0 0 .6rem;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.tool-hero .lead {
  color: rgba(255,255,255,.9) !important;
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}
.tool-hero-icon {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  margin: 0 auto 1.2rem;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255,255,255,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}

/* --- Dramatic cards --- */
.card {
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 12px 40px -12px rgba(0,0,0,.12);
  border: 1px solid #d1fae5;
  background: #fff;
}
.card:hover {
  box-shadow: 0 16px 48px -12px rgba(22,163,74,.2);
  border-color: #6ee7b7;
}

/* --- Dramatic buttons --- */
.btn-primary {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  padding: .9rem 2.2rem;
  font-size: 1.05rem;
  border-radius: 14px;
  box-shadow: 0 10px 28px -8px rgba(22,163,74,.55);
  letter-spacing: .01em;
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px -8px rgba(22,163,74,.65);
}

/* --- Dramatic form inputs --- */
.form-control, .form-select {
  border: 2px solid #d1d5db;
  border-radius: 14px;
  padding: .85rem 1.1rem;
  font-size: 1.02rem;
  background: #f9fafb;
}
.form-control:focus, .form-select:focus {
  background: #fff;
  border-color: #16a34a;
  box-shadow: 0 0 0 5px rgba(22,163,74,.15);
}
.form-group label {
  font-size: .95rem;
  font-weight: 700;
  color: #14532d;
  margin-bottom: .5rem;
}

/* --- Dramatic result cards --- */
.result-card {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 2px solid #6ee7b7;
  border-radius: 22px;
  padding: 2.2rem;
  box-shadow: 0 16px 48px -16px rgba(22,163,74,.3);
}
.result-value {
  font-size: 3.2rem;
  font-weight: 900;
  background: linear-gradient(135deg, #15803d, #16a34a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Dramatic AI hero --- */
.ai-hero {
  background: linear-gradient(135deg, #052e16 0%, #14532d 50%, #16a34a 100%);
  border-radius: 24px;
  padding: 3rem 2rem;
  margin: 1.5rem 0 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.ai-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.1) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
}
.ai-hero > * { position: relative; z-index: 1; }
.ai-hero h1 {
  color: #fff !important;
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 800;
}
.ai-hero p {
  color: rgba(255,255,255,.85) !important;
  font-size: 1.05rem;
}

/* ============================================================
   FORM POLISH — Inputs, buttons, spacing (Oct 2026)
   ============================================================ */

/* --- Form container --- */
.card form {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

/* --- Form rows with proper spacing --- */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin: 0;
}
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

/* --- Form groups --- */
.form-group {
  margin: 0;
  display: flex;
  flex-direction: column;
}
.form-group label {
  font-size: .92rem;
  font-weight: 700;
  color: #14532d;
  margin-bottom: .55rem;
  letter-spacing: .01em;
}

/* --- Input boxes --- */
.form-control, select.form-control, input.form-control, textarea.form-control {
  width: 100%;
  padding: .9rem 1.1rem;
  font-size: 1rem;
  font-family: inherit;
  color: #1f2937;
  background: #ffffff;
  border: 2px solid #e5e7eb;
  border-radius: 14px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.form-control:hover {
  border-color: #a7f3d0;
}
.form-control:focus {
  outline: none;
  border-color: #16a34a;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(22,163,74,.14);
}
.form-control::placeholder {
  color: #9ca3af;
}
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%2316a34a' stroke-width='2.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.1rem center;
  padding-right: 2.8rem;
  cursor: pointer;
}

/* --- Submit button --- */
.card .btn-primary, form .btn-primary {
  margin-top: .5rem;
  padding: 1rem 2.4rem;
  font-size: 1.08rem;
  font-weight: 800;
  border-radius: 14px;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 60%, #15803d 100%);
  border: none;
  color: #fff !important;
  cursor: pointer;
  box-shadow: 0 12px 30px -8px rgba(22,163,74,.55);
  transition: transform .18s ease, box-shadow .18s ease;
  align-self: flex-start;
  min-width: 200px;
  text-align: center;
}
.card .btn-primary:hover, form .btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -8px rgba(22,163,74,.65);
}
.card .btn-primary:active, form .btn-primary:active {
  transform: translateY(-1px);
}
@media (max-width: 600px) {
  .card .btn-primary, form .btn-primary {
    align-self: stretch;
    width: 100%;
  }
}

/* --- Card padding for forms --- */
.card {
  padding: 2.2rem;
}
@media (max-width: 600px) {
  .card { padding: 1.5rem; }
}

/* SEO content section (homepage) */
.seo-text p { color: #4b5563; line-height: 1.85; font-size: 1.05rem; margin: 0 0 1.1rem; }
.seo-text a { color: #15803d; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.seo-text a:hover { color: #16a34a; }
