/* ---------- Design tokens ---------- */
:root {
  --ink: #16233F;
  --ink-soft: #3D4A63;
  --paper: #FAF6EC;
  --paper-raised: #FFFFFF;
  --line: #DCD4C0;
  --gold: #D9A441;
  --gold-deep: #A9781F;
  --teal: #2F6F5E;
  --radius: 10px;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", -apple-system, Segoe UI, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
}

a { color: inherit; }

/* ---------- Accessibility Helper (CLS & SEO Friendly) ---------- */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header & CLS Reserve Placeholder ---------- */
#site-header {
  background: var(--paper-raised);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 64px; /* Reserve height before JS injects header */
  contain: layout intrinsic-size 64px;
}

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.brand {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--ink);
  color: var(--gold);
  border-radius: 8px;
  font-weight: 700;
}

.nav-search {
  flex: 1;
  max-width: 420px;
  position: relative;
}

.nav-search input {
  width: 100%;
  padding: 9px 14px 9px 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 0.92rem;
  background: var(--paper);
}

.nav-search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  opacity: 0.55;
  pointer-events: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.nav-link {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.78rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  padding: 6px 10px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.nav-link .nav-icon { font-size: 1.05rem; }

.nav-link:hover {
  color: var(--gold-deep);
  background: #F3ECD8;
}

.nav-link.active {
  color: var(--teal);
  background: #E4F1EB;
  font-weight: 600;
}

.nav-link.active:active,
.nav-link:active {
  transform: scale(0.96);
}

.nav-dropdown { position: relative; }

.nav-dropdown-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 220px;
  padding: 8px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.16);
  z-index: 20;
}

.nav-dropdown.open .nav-dropdown-panel { display: block; }

.nav-dropdown-panel a {
  display: flex;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
}

.nav-dropdown-panel a:hover { background: #F3ECD8; color: var(--gold-deep); }

.nav-dropdown-panel .cat-count {
  color: var(--ink-soft);
  font-size: 0.8rem;
}

@media (max-width: 820px) {
  .nav-search { order: 3; max-width: none; flex-basis: 100%; }
  .nav-link span:not(.nav-icon) { display: none; }
}

/* ---------- Page shell (sidebar layout) ---------- */
.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 24px 60px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
}

.sidebar {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  position: sticky;
  top: 78px;
  min-width: 220px;
  min-height: 380px; /* Layout shift Prevention */
}

.sidebar-title {
  font-family: var(--serif);
  font-size: 0.95rem;
  padding: 10px 12px 6px;
  color: var(--ink-soft);
}

.sidebar a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.92rem;
  margin-bottom: 2px;
  border-left: 3px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.sidebar a:hover {
  background: #F3ECD8;
  color: var(--gold-deep);
}

.sidebar a.active {
  background: #E4F1EB;
  color: var(--teal);
  border-left-color: var(--teal);
  font-weight: 600;
}

.sidebar .cat-count {
  color: var(--ink-soft);
  font-size: 0.78rem;
  background: var(--paper);
  padding: 1px 8px;
  border-radius: 10px;
}

.sidebar a.active .cat-count { color: var(--teal); background: #FFFFFF; }

/* ---------- Category icon colors ---------- */
.icon-percentage { background: #E4F1EB; color: #2F6F5E; }
.icon-finance-money { background: #FBF0DC; color: #A9781F; }
.icon-converters { background: #E7EDF9; color: #33518F; }
.icon-utility { background: #FBE9E7; color: #B24A2E; }
.icon-date-time { background: #F0E7FA; color: #6B3FA0; }
.icon-health { background: #FCE7EF; color: #B23A6E; }

/* ---------- Numbered all-tools list ---------- */
.tools-list-title {
  font-family: var(--serif);
  font-size: 1.15rem;
  margin: 36px 0 12px;
}

.tools-numbered {
  list-style: none;
  counter-reset: toolnum;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 4px 20px;
}

.tools-numbered li {
  counter-increment: toolnum;
  border-bottom: 1px solid var(--line);
}

.tools-numbered li a {
  display: block;
  padding: 9px 0;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
}

.tools-numbered li a::before {
  content: counter(toolnum) ". ";
  color: var(--gold-deep);
  font-weight: 600;
}

.tools-numbered li a:hover { color: var(--gold-deep); }

/* ---------- Hero / page heading ---------- */
.page-head {
  padding: 48px 0 8px;
}

.page-head h1 {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin: 0 0 8px;
}

.page-head p {
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0;
}

/* ---------- Calculator card ---------- */
.calc-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  margin: 28px 0 12px;
}

.calc-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 1.05rem;
}

.calc-row label {
  color: var(--ink-soft);
}

.calc-row input {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 1rem;
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
  width: 130px;
}

.calc-result {
  margin-top: 18px;
  padding: 16px 18px;
  background: #F3ECD8;
  border-left: 4px solid var(--gold);
  border-radius: 6px;
  font-size: 1.15rem;
}

.calc-result strong {
  font-variant-numeric: tabular-nums;
  color: var(--gold-deep);
}

/* ---------- Formula box ---------- */
.formula-box {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 20px 0 32px;
}

.formula-box .formula-label {
  color: var(--gold);
  font-size: 0.85rem;
  text-transform: none;
  margin: 0 0 8px;
}

.formula-box .formula-line {
  font-family: "Courier New", monospace;
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  margin: 0 0 14px;
  color: var(--paper);
  white-space: pre-line;
  line-height: 1.6;
}

.formula-box .formula-example {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 12px;
  font-size: 0.95rem;
  color: #CBD2E1;
}

.formula-box .formula-example strong {
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

/* ---------- How to use steps ---------- */
.howto-list {
  counter-reset: howto;
  list-style: none;
  padding: 0;
  margin: 20px 0 32px;
}

.howto-list li {
  counter-increment: howto;
  position: relative;
  padding: 14px 0 14px 46px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}

.howto-list li:last-child { border-bottom: none; }

.howto-list li::before {
  content: counter(howto);
  position: absolute;
  left: 0;
  top: 12px;
  width: 28px;
  height: 28px;
  background: var(--gold);
  color: var(--ink);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

/* ---------- FAQ accordion ---------- */
.faq-list {
  margin: 20px 0 40px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 10px;
  background: var(--paper-raised);
  overflow: hidden;
}

.faq-item summary {
  padding: 16px 18px;
  cursor: pointer;
  font-weight: 600;
  font-family: var(--serif);
  font-size: 1.02rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  color: var(--gold-deep);
  font-size: 1.3rem;
  font-weight: 400;
  flex-shrink: 0;
}

.faq-item[open] summary::after { content: "−"; }

.faq-item .faq-answer {
  padding: 0 18px 16px;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- Article ---------- */
.article {
  max-width: 70ch;
  margin: 36px 0 56px;
}

.article h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
  margin-top: 2em;
}

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

/* ---------- All tools grid ---------- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: 32px 0 56px;
  min-height: 300px; /* Reserve height for dynamically loaded tools */
}

.tool-card {
  display: block;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.tool-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.06);
}

.tool-card.active {
  border-color: var(--teal);
  border-width: 2px;
  background: #F3FAF7;
}

.tool-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--ink);
  color: var(--gold);
  border-radius: 8px;
  font-family: var(--serif);
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.tool-card-icon.icon-percentage { background: #E4F1EB; color: #2F6F5E; }
.tool-card-icon.icon-finance-money { background: #FBF0DC; color: #A9781F; }
.tool-card-icon.icon-converters { background: #E7EDF9; color: #33518F; }
.tool-card-icon.icon-utility { background: #FBE9E7; color: #B24A2E; }
.tool-card-icon.icon-date-time { background: #F0E7FA; color: #6B3FA0; }
.tool-card-icon.icon-health { background: #FCE7EF; color: #B23A6E; }

.tool-card-name {
  display: block;
  font-family: var(--serif);
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.tool-card-desc {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin: 0;
}

/* ---------- Footer ---------- */
#site-footer {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  min-height: 80px;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-inner a { text-decoration: underline; }

/* =========================================================
   Mobile Floating Icon & Off-Canvas Category Sidebar
   ========================================================= */

/* Floating Button Default: Hidden on Desktop */
.mobile-cat-btn {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 20px;
  z-index: 1001;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--ink);
  color: var(--gold);
  border: 1px solid var(--line);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease;
}

.mobile-cat-btn:active {
  transform: scale(0.92);
}

/* Dark Background Dimmer Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(22, 35, 63, 0.4);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* Mobile Responsive Breakpoint (820px and lower) */
@media (max-width: 820px) {
  .mobile-cat-btn {
    display: flex;
  }

  .sidebar#site-sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 260px;
    height: 100vh;
    border-radius: 0;
    border: none;
    border-right: 1px solid var(--line);
    z-index: 1000;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  }

  .sidebar#site-sidebar.active {
    left: 0;
  }
}
/* Print Button Styling */
.global-print-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 20px;
  background: #16233f;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}
.global-print-btn:hover {
  background: #0f172a;
}

/* Print Rules - Dikhane aur Chhupane ke liye */
@media print {
  #site-header, #site-sidebar, #site-footer, .article, .calc-row, .global-print-btn {
    display: none !important;
  }
  body, main {
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .calc-card-container, .calc-card {
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
  }
}
/* Language Switcher Styling */
.lang-switcher {
  display: inline-block;
  margin-left: 15px;
}

.lang-select {
  padding: 6px 12px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  color: #16233f;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
}

.lang-select:hover {
  border-color: #94a3b8;
  background-color: #f8fafc;
}

.lang-select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}
/* Sidebar Panel Up/Down Scroll Fix */
#site-sidebar, 
.categories-sidebar, 
.sidebar-nav {
  max-height: calc(100vh - 120px); /* Screen height ke hisab se limit */
  overflow-y: auto;               /* Jab item zyada hon toh andar scrollbar aa jaye */
  position: sticky;
  top: 90px;                       /* Header ke neeche fixed rahega */
  padding-right: 8px;
}

/* Scrollbar ko clean aur modern dikhane ke liye (Optional) */
#site-sidebar::-webkit-scrollbar {
  width: 5px;
}

#site-sidebar::-webkit-scrollbar-thumb {
  background: var(--border-color, #ccc);
  border-radius: 4px;
}

/* Breadcrumb navigation */
.breadcrumb-nav {
  font-size: 0.9rem;
  color: #64748b;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.breadcrumb-nav a {
  color: #1a73e8;
  text-decoration: none;
  font-weight: 500;
}
.breadcrumb-nav a:hover {
  text-decoration: underline;
}
.breadcrumb-nav .separator {
  color: #94a3b8;
}

/* ---- Static tool links (crawlable list shown before/without JS) ---- */
.static-tool-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0;
}
.static-tool-links a {
  display: inline-block;
  padding: 7px 14px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color .15s, color .15s, transform .15s, box-shadow .15s;
}
.static-tool-links a:hover,
.static-tool-links a:focus-visible {
  border-color: var(--gold);
  color: var(--gold-deep);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(22, 35, 63, .08);
  outline: none;
}

/* =====================================================
   PREMIUM THEME LAYER (navy + gold, fintech look)
   Sirf ye block hata do to purana look wapas aa jayega
   ===================================================== */
:root {
  --navy-900: #0E1A33;
  --navy-800: #16233F;
  --navy-700: #22345C;
  --shadow-sm: 0 1px 2px rgba(14,26,51,.06), 0 2px 8px rgba(14,26,51,.05);
  --shadow-md: 0 4px 12px rgba(14,26,51,.08), 0 12px 32px rgba(14,26,51,.08);
  --shadow-lg: 0 8px 20px rgba(14,26,51,.10), 0 24px 56px rgba(14,26,51,.14);
  --radius: 14px;
}
html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(1100px 500px at 85% -120px, rgba(217,164,65,.14), transparent 60%),
    radial-gradient(900px 420px at -10% 0, rgba(47,111,94,.08), transparent 55%),
    var(--paper);
  -webkit-font-smoothing: antialiased;
  letter-spacing: .005em;
}
h1, h2, h3 { font-family: var(--serif); letter-spacing: -.01em; }
::selection { background: var(--gold); color: var(--navy-900); }

/* Header */
#site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(220,212,192,.7);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 6px 24px rgba(14,26,51,.05);
}
.nav-search input {
  border-radius: 999px; border: 1px solid var(--line); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.nav-search input:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(217,164,65,.18);
}
.nav-link { border-radius: 999px; transition: background .15s, color .15s; }
.nav-link:hover { background: rgba(217,164,65,.14); color: var(--navy-800); }
.nav-link.active { background: var(--navy-800); color: #fff; }

/* Page heading (all pages) */
.page-head h1 {
  font-size: clamp(1.7rem, 3.2vw, 2.5rem); line-height: 1.15; color: var(--navy-800);
  position: relative; padding-bottom: 14px;
}
.page-head h1::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 64px; height: 4px;
  border-radius: 4px; background: linear-gradient(90deg, var(--gold), #F0CB7A);
}
.page-head p { color: var(--ink-soft); font-size: 1.05rem; max-width: 62ch; }

/* Home hero */
body[data-page="home"] .page-head {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700) 70%, #2F4A7D);
  border-radius: 22px; padding: 38px 34px; margin-bottom: 26px;
  box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
body[data-page="home"] .page-head::before {
  content: "%"; position: absolute; right: 22px; top: -34px;
  font: 700 12rem/1 var(--serif); color: rgba(217,164,65,.16); pointer-events: none;
}
body[data-page="home"] .page-head h1 { color: #fff; }
body[data-page="home"] .page-head p { color: #D9E1F2; position: relative; }

/* Calculator card */
.calc-card {
  background: #fff; border: 1px solid rgba(220,212,192,.8); border-top: 4px solid var(--gold);
  border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 24px;
}
.calc-row input {
  border: 1.5px solid var(--line); border-radius: 10px; background: #FFFEFB;
  transition: border-color .15s, box-shadow .15s;
}
.calc-row input:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(217,164,65,.18);
}
.calc-result {
  background: linear-gradient(135deg, #FFF8E6, #FDF0CC); border: 1px solid #EBD49A;
  border-radius: 12px; color: var(--navy-800);
}
.calc-result strong { color: var(--gold-deep); font-family: var(--serif); }

/* Popular + tool cards */
body .popular-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
body .popular-card {
  background: #fff; border: 1px solid rgba(220,212,192,.8); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s, border-color .2s;
}
body .popular-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--gold); }
body .popular-card h3 { color: var(--navy-800); }
body .popular-card a { color: var(--gold-deep); font-weight: 600; text-decoration: none; }
body .popular-card a:hover { color: var(--navy-800); }
body .highlight-badge {
  background: linear-gradient(90deg, var(--gold), #F0CB7A); color: var(--navy-900);
  border-radius: 999px; font-weight: 700; letter-spacing: .04em;
}
.tool-card {
  border-radius: var(--radius); border: 1px solid rgba(220,212,192,.8); background: #fff;
  box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s, border-color .2s;
}
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--gold); }
.tool-card-icon { border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(14,26,51,.05); }
.tool-card-name { color: var(--navy-800); font-weight: 600; }

/* Sidebar, FAQ, article */
.sidebar a { border-radius: 10px; transition: background .15s, color .15s; }
.sidebar a:hover { background: rgba(217,164,65,.14); }
.sidebar a.active { background: var(--navy-800); color: #fff; }
.faq-item { border-radius: 12px; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow-sm); }
.article h2 { color: var(--navy-800); }
.formula-box { border-radius: 12px; border-left: 4px solid var(--gold); box-shadow: var(--shadow-sm); }

/* Footer */
#site-footer {
  background: linear-gradient(180deg, var(--navy-800), var(--navy-900)); color: #C9D3EA;
  margin-top: 56px; border-top: 3px solid var(--gold);
}
#site-footer a, .footer-inner a { color: #F0CB7A; text-decoration: none; }
#site-footer a:hover { color: #fff; text-decoration: underline; }

/* Motion */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
main > * { animation: fadeUp .5s ease both; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  main > *, .tool-card, .popular-card { animation: none; transition: none; }
}
@media (max-width: 640px) {
  body[data-page="home"] .page-head { padding: 26px 20px; border-radius: 16px; }
  body[data-page="home"] .page-head::before { font-size: 8rem; }
}
