/* ============================================================
   Calculate All — dark futuristic system theme
   Neon glass over deep-space navy. Light theme via
   [data-theme="light"] overrides. Default: dark.
   ============================================================ */

/* ---------- tokens ---------- */
:root, [data-theme="dark"] {
  --bg0: #020617;
  --bg1: #0f172a;
  --ink: #f1f5f9;
  --ink-soft: #cbd5e1;
  --muted: #94a3b8;
  --faint: #64748b;
  --line: rgba(148, 163, 184, .16);
  --line-soft: rgba(148, 163, 184, .09);
  --glass: rgba(15, 23, 42, .62);
  --glass-2: rgba(30, 41, 59, .45);
  --card: rgba(13, 20, 38, .72);
  --field: rgba(2, 6, 23, .65);
  --accent: #3b82f6;
  --accent-2: #8b5cf6;
  --accent-3: #22d3ee;
  --accent-soft: rgba(59, 130, 246, .14);
  --ok: #10b981;
  --danger: #f43f5e;
  --gold: #fbbf24;
  --grad: linear-gradient(135deg, #3b82f6, #8b5cf6 55%, #d946ef);
  --grad-text: linear-gradient(92deg, #60a5fa, #a78bfa 55%, #f0abfc);
  --shadow-lg: 0 24px 60px rgba(2, 6, 23, .55);
  --shadow-card: 0 10px 30px rgba(2, 6, 23, .45);
  --glow: 0 0 24px rgba(59, 130, 246, .35);
  --radius: 20px;
  --header-h: 72px;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg0: #f4f7fd;
  --bg1: #e8eefb;
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #5b6b82;
  --faint: #8fa0b8;
  --line: rgba(15, 23, 42, .12);
  --line-soft: rgba(15, 23, 42, .06);
  --glass: rgba(255, 255, 255, .72);
  --glass-2: rgba(255, 255, 255, .55);
  --card: rgba(255, 255, 255, .82);
  --field: rgba(255, 255, 255, .9);
  --accent-soft: rgba(59, 130, 246, .1);
  --shadow-lg: 0 24px 60px rgba(30, 58, 138, .14);
  --shadow-card: 0 10px 30px rgba(30, 58, 138, .1);
  --glow: 0 0 24px rgba(59, 130, 246, .25);
  color-scheme: light;
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg0);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent-3); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
::selection { background: rgba(139, 92, 246, .4); }
:focus-visible { outline: 2px solid var(--accent-3); outline-offset: 2px; border-radius: 6px; }

.container { width: min(1200px, 100% - 40px); margin-inline: auto; }
main { position: relative; z-index: 1; }

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -.02em; color: var(--ink); }

/* ---------- ambient background ---------- */
.bg-fx { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
[data-theme="light"] .bg-fx { opacity: .45; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; }
.orb-a { width: 560px; height: 560px; left: -140px; top: -120px; background: #1e3a8a; animation: drift 26s ease-in-out infinite alternate; }
.orb-b { width: 620px; height: 620px; right: -180px; top: 8%; background: #7c3aed; opacity: .34; animation: drift 32s ease-in-out infinite alternate-reverse; }
.orb-c { width: 480px; height: 480px; left: 38%; bottom: -200px; background: #0ea5e9; opacity: .26; animation: drift 38s ease-in-out infinite alternate; }
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(60px, 40px) scale(1.12); }
}
.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%);
}
.particles { position: absolute; inset: 0; }
.particles i {
  position: absolute; width: 3px; height: 3px; border-radius: 50%;
  background: #93c5fd; opacity: .5;
  animation: float-p 14s ease-in-out infinite;
}
.particles i:nth-child(1)  { left: 8%;  top: 22%; animation-delay: 0s; }
.particles i:nth-child(2)  { left: 18%; top: 64%; animation-delay: -2s; background: #c4b5fd; }
.particles i:nth-child(3)  { left: 32%; top: 12%; animation-delay: -5s; }
.particles i:nth-child(4)  { left: 47%; top: 38%; animation-delay: -8s; background: #67e8f9; }
.particles i:nth-child(5)  { left: 58%; top: 72%; animation-delay: -3s; }
.particles i:nth-child(6)  { left: 66%; top: 18%; animation-delay: -6s; background: #c4b5fd; }
.particles i:nth-child(7)  { left: 74%; top: 52%; animation-delay: -9s; }
.particles i:nth-child(8)  { left: 84%; top: 28%; animation-delay: -1s; background: #67e8f9; }
.particles i:nth-child(9)  { left: 91%; top: 66%; animation-delay: -4s; }
.particles i:nth-child(10) { left: 12%; top: 84%; animation-delay: -7s; background: #c4b5fd; }
.particles i:nth-child(11) { left: 40%; top: 88%; animation-delay: -10s; }
.particles i:nth-child(12) { left: 70%; top: 86%; animation-delay: -12s; background: #93c5fd; }
.particles i:nth-child(13) { left: 26%; top: 44%; animation-delay: -11s; }
.particles i:nth-child(14) { left: 52%; top: 8%;  animation-delay: -13s; background: #67e8f9; }
@keyframes float-p {
  0%, 100% { transform: translateY(0); opacity: .15; }
  50% { transform: translateY(-26px); opacity: .6; }
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 12px; z-index: 50;
  width: min(1400px, 100% - 28px);
  margin: 12px auto 0;
  height: var(--header-h);
  border-radius: 22px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.header-inner {
  height: 100%; display: flex; align-items: center; gap: 18px;
  padding: 0 20px; max-width: 100%;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.22rem; color: var(--ink); flex: 0 0 auto; }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: var(--grad);
  box-shadow: 0 4px 18px rgba(124, 58, 237, .5), inset 0 1px 0 rgba(255,255,255,.35);
  position: relative; overflow: hidden;
}
.logo-mark::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.5) 48%, transparent 62%);
  transform: translateX(-120%); animation: shine 4.5s ease-in-out infinite;
}
@keyframes shine { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.logo-mark svg { width: 22px; height: 22px; }

.main-nav {
  display: flex; align-items: center; gap: 2px; flex: 1 1 auto; min-width: 0;
  overflow-x: auto; scrollbar-width: none; position: relative;
  padding: 6px 12px 6px 6px;
}
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a {
  position: relative; flex: 0 0 auto;
  padding: 9px 13px; border-radius: 12px;
  font-size: .82rem; font-weight: 600; color: var(--muted);
  white-space: nowrap; letter-spacing: .01em;
  transition: color .2s ease, background .2s ease, transform .2s ease, box-shadow .2s ease;
  opacity: 0;
}
.main-nav a:hover { color: var(--ink); background: rgba(148, 163, 184, .1); text-decoration: none; transform: translateY(-1px); }
.main-nav a.active { color: var(--ink); background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgba(59,130,246,.35); }
.nav-ind {
  position: absolute; bottom: 2px; height: 3px; border-radius: 3px;
  background: var(--grad); box-shadow: var(--glow);
  transition: left .35s cubic-bezier(.4,0,.2,1), width .35s cubic-bezier(.4,0,.2,1), opacity .25s;
  opacity: 0; pointer-events: none;
}
.nav-ind.on { opacity: 1; }
/* edge fade = scroll affordance when tabs overflow (kept narrow so it never washes out a label) */
.main-nav.nav-scrollable {
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 14px), transparent 100%);
  mask-image: linear-gradient(90deg, #000 calc(100% - 14px), transparent 100%);
}
/* right-to-left tab entrance */
.site-header.nav-boot .main-nav a { opacity: 0; transform: translateX(26px); }
.site-header.nav-in .main-nav a {
  opacity: 1; transform: none;
  transition: opacity .5s ease, transform .5s cubic-bezier(.22,1,.36,1),
    color .2s ease, background .2s ease, box-shadow .2s ease;
  transition-delay: calc(var(--ti, 0) * 45ms), calc(var(--ti, 0) * 45ms), 0s, 0s, 0s;
}

.header-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; margin-left: auto; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(148, 163, 184, .08); border: 1px solid var(--line-soft);
  color: var(--ink-soft); cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.icon-btn:hover { transform: translateY(-1px); background: rgba(148,163,184,.16); color: var(--ink); box-shadow: var(--glow); }
.icon-btn svg { width: 20px; height: 20px; }
#themeToggle .icon-moon { display: none; }
[data-theme="dark"] #themeToggle .icon-moon { display: block; }
[data-theme="dark"] #themeToggle .icon-sun { display: none; }
.fav-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: 999px; font-size: .82rem; font-weight: 700;
  color: var(--ink); background: rgba(148,163,184,.08); border: 1px solid var(--line);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.fav-pill:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--glow); background: rgba(148,163,184,.16); }
.fav-pill svg { width: 16px; height: 16px; }
.profile-wrap { position: relative; }
.profile-popover {
  position: absolute; right: 0; top: calc(100% + 10px); width: 250px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px; box-shadow: var(--shadow-lg);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); z-index: 60;
}
.profile-title { font-weight: 700; font-size: .9rem; margin-bottom: 8px; }
.profile-hello { font-size: .85rem; color: var(--muted); margin-top: 8px; }
.profile-note { font-size: .75rem; color: var(--faint); margin-top: 6px; }
.nav-menu { display: none; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 40px 0 8px; }
.hero-home .hero-inner {
  width: min(1400px, 100% - 28px); margin-inline: auto;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 32px; align-items: center;
  padding: 48px 40px 40px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 28px;
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  backdrop-filter: blur(20px) saturate(1.3);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,.07);
  position: relative; overflow: hidden;
}
.hero-home .hero-inner::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 300px at 15% 10%, rgba(59,130,246,.16), transparent 70%),
    radial-gradient(500px 320px at 85% 90%, rgba(139,92,246,.14), transparent 70%);
}
.eyebrow {
  font-size: .72rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 14px;
}
.hero-home h1 {
  font-size: clamp(2.6rem, 5.2vw, 4.6rem); font-weight: 800; line-height: 1.04;
  margin-bottom: 18px;
}
.h-grad {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-desc { color: var(--muted); font-size: 1.06rem; max-width: 34rem; margin-bottom: 26px; }

.hero-search {
  position: relative; display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 8px 8px 20px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 8px 30px rgba(2,6,23,.35);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: box-shadow .25s ease, border-color .25s ease;
  max-width: 36rem;
}
[data-theme="light"] .hero-search { background: rgba(255,255,255,.75); }
.hero-search:focus-within { border-color: rgba(59,130,246,.6); box-shadow: var(--glow), inset 0 1px 0 rgba(255,255,255,.08); }
.search-glyph { width: 22px; height: 22px; color: var(--muted); flex: 0 0 auto; }
.hero-search-fields { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
#heroSearchInput {
  background: transparent; border: 0; outline: 0; color: var(--ink);
  font-size: 1rem; font-weight: 600; width: 100%; padding: 4px 0 0;
}
#heroSearchInput::placeholder { color: var(--muted); font-weight: 500; }
.hero-search-hint { font-size: .72rem; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-search-btn {
  flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--grad); color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 22px rgba(99, 102, 241, .55);
  transition: transform .2s ease, box-shadow .2s ease;
}
.hero-search-btn:hover { transform: scale(1.06); box-shadow: 0 8px 28px rgba(99,102,241,.7); }
.hero-search-btn svg { width: 22px; height: 22px; }
.suggest {
  position: absolute; top: calc(100% + 10px); left: 0; right: 0; z-index: 40;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-lg); overflow: hidden;
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.suggest-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 16px; background: none; border: 0; cursor: pointer; text-align: left;
  transition: background .15s ease;
}
.suggest-item:hover, .suggest-item.active { background: rgba(148,163,184,.1); text-decoration: none; }
.s-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--s-cat, #2563eb); flex: 0 0 auto; box-shadow: 0 0 10px var(--s-cat, #2563eb); }
.s-name { display: block; font-weight: 700; font-size: .92rem; color: var(--ink); }
.s-tag { display: block; font-size: .78rem; color: var(--muted); }

.popular-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.popular-label { font-size: .8rem; color: var(--muted); font-weight: 600; }
.pop-chip {
  font-size: .78rem; font-weight: 600; color: var(--ink-soft);
  background: rgba(148,163,184,.09); border: 1px solid var(--line-soft);
  padding: 7px 14px; border-radius: 999px; cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, color .2s ease;
}
.pop-chip:hover { transform: translateY(-2px); color: var(--ink); border-color: rgba(59,130,246,.6); box-shadow: var(--glow); }

.trust-row {
  list-style: none; display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px; margin-top: 26px; padding-top: 22px;
  border-top: 1px solid var(--line-soft);
}
.trust-row li { display: flex; gap: 10px; align-items: flex-start; }
.trust-ic {
  width: 36px; height: 36px; flex: 0 0 auto; border-radius: 11px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-3); border: 1px solid rgba(34,211,238,.25);
}
.trust-ic svg { width: 19px; height: 19px; }
.trust-row strong { display: block; font-size: .82rem; }
.trust-row small { display: block; font-size: .72rem; color: var(--muted); }

/* hero visual: CSS calculator + floating chips */
.hero-visual { position: relative; min-height: 520px; display: grid; place-items: center; }
.hero-calc {
  width: 250px; border-radius: 30px; padding: 22px 18px 26px; position: relative; z-index: 2;
  background: linear-gradient(160deg, #1b2547, #0b1128 70%);
  border: 1px solid rgba(148,163,184,.28);
  box-shadow: 0 40px 90px rgba(2,6,23,.7), 0 0 60px rgba(59,130,246,.25), inset 0 1px 0 rgba(255,255,255,.14);
  transform: perspective(900px) rotateY(-12deg) rotateX(4deg);
  animation: calc-float 7s ease-in-out infinite;
}
@keyframes calc-float { 0%,100% { transform: perspective(900px) rotateY(-12deg) rotateX(4deg) translateY(0); } 50% { transform: perspective(900px) rotateY(-12deg) rotateX(4deg) translateY(-14px); } }
.hc-screen {
  background: linear-gradient(180deg, #0a1030, #060a20);
  border: 1px solid rgba(34,211,238,.25); border-radius: 14px;
  padding: 12px 14px; margin-bottom: 16px; text-align: right;
  box-shadow: inset 0 2px 12px rgba(0,0,0,.6);
}
.hc-expr { display: block; font-size: .68rem; color: #67e8f9; opacity: .8; }
.hc-value { display: block; font-size: 1.7rem; font-weight: 800; color: #fff; text-shadow: 0 0 18px rgba(34,211,238,.8); font-variant-numeric: tabular-nums; }
.hc-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.k {
  aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center;
  font-weight: 700; font-size: .95rem; color: #e2e8f0;
  background: linear-gradient(180deg, rgba(148,163,184,.22), rgba(148,163,184,.08));
  border: 1px solid rgba(148,163,184,.2);
  box-shadow: 0 3px 0 rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.12);
}
.k-fn { color: #67e8f9; }
.k-op { color: #f0abfc; background: linear-gradient(180deg, rgba(139,92,246,.4), rgba(139,92,246,.16)); }
.k-eq { background: var(--grad); color: #fff; box-shadow: 0 3px 14px rgba(139,92,246,.6); }
.k-zero { grid-column: span 2; aspect-ratio: auto; }
.hc-base {
  position: absolute; left: 8%; right: 8%; bottom: -26px; height: 30px; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(59,130,246,.5), transparent 70%);
  filter: blur(10px); z-index: -1;
}
.f-chip {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 16px;
  background: rgba(15, 23, 42, .66);
  border: 1px solid color-mix(in srgb, var(--fc) 45%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 10px 28px rgba(2,6,23,.5), 0 0 18px color-mix(in srgb, var(--fc) 30%, transparent);
  font-size: .78rem; font-weight: 700; color: var(--ink);
  animation: chip-float 6s ease-in-out infinite;
}
.f-chip svg { width: 20px; height: 20px; color: var(--fc); }
@keyframes chip-float { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-12px) rotate(1.5deg); } }
.fc-math    { left: 2%;  top: 6%;  animation-delay: 0s; }
.fc-health  { left: 12%; top: 0%;  animation-delay: -1.5s; }
.fc-finance { left: 0%;  top: 34%; animation-delay: -3s; }
.fc-edu     { left: 8%;  top: 58%; animation-delay: -4.5s; }
.fc-conv    { left: 4%;  bottom: 8%; animation-delay: -2s; }
.fc-home    { right: 0%; top: 12%; animation-delay: -1s; }
.fc-tech    { right: 4%; top: 44%; animation-delay: -3.5s; }
.fc-travel  { right: 2%; bottom: 10%; animation-delay: -5s; }
.partner-note {
  position: absolute; right: 6%; top: 2%; z-index: 3;
  font-style: italic; font-weight: 700; font-size: .95rem; line-height: 1.3;
  color: var(--ink-soft); transform: rotate(8deg); text-align: right;
  text-shadow: 0 2px 12px rgba(2,6,23,.8);
}

/* ---------- sections ---------- */
.section { padding: 56px 0 8px; width: min(1400px, 100% - 28px); margin-inline: auto; position: relative; z-index: 1; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 18px;
  margin-bottom: 26px; flex-wrap: wrap;
}
.section-title h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 800; margin-bottom: 6px; }
.section-title p { color: var(--muted); font-size: .95rem; }
.section-side { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.count-pill {
  font-size: .78rem; font-weight: 700; color: var(--ink-soft);
  background: rgba(148,163,184,.1); border: 1px solid var(--line);
  padding: 7px 14px; border-radius: 999px;
}
.view-all { font-size: .88rem; font-weight: 700; color: var(--accent-3); white-space: nowrap; }
.view-all:hover { text-shadow: 0 0 14px rgba(34,211,238,.6); }

.tiles-empty {
  padding: 40px; text-align: center; color: var(--muted);
  border: 1px dashed var(--line); border-radius: var(--radius);
}

/* explore tiles */
.cat-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 14px; }
.cat-tile {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 20px 16px; border-radius: var(--radius); overflow: hidden;
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--tile) 26%, transparent), transparent 65%),
    var(--card);
  border: 1px solid color-mix(in srgb, var(--tile) 38%, transparent);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255,255,255,.07);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.cat-tile:hover {
  text-decoration: none; transform: translateY(-6px);
  box-shadow: var(--shadow-card), 0 0 30px color-mix(in srgb, var(--tile) 45%, transparent);
  border-color: color-mix(in srgb, var(--tile) 65%, transparent);
}
.cat-icon {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--tile) 85%, #fff 15%), var(--tile));
  color: #fff; box-shadow: 0 6px 20px color-mix(in srgb, var(--tile) 55%, transparent), inset 0 1px 0 rgba(255,255,255,.4);
}
.cat-icon svg { width: 26px; height: 26px; }
.cat-tile h3 { font-size: 1rem; font-weight: 800; }
.cat-count { font-size: .78rem; font-weight: 700; color: var(--ink-soft); }
.cat-tag { font-size: .76rem; color: var(--muted); line-height: 1.45; }
.cat-arrow { margin-top: auto; font-size: .8rem; font-weight: 700; color: var(--accent-3); padding-top: 6px; }

/* featured */
.feat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.feat-card {
  display: flex; flex-direction: column; gap: 10px; padding: 22px 18px;
  border-radius: var(--radius); background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255,255,255,.06);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  position: relative; overflow: hidden;
}
.feat-card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(320px 160px at 50% -20%, color-mix(in srgb, var(--tile) 22%, transparent), transparent 70%);
  pointer-events: none;
}
.feat-card:hover {
  text-decoration: none; transform: translateY(-8px);
  border-color: color-mix(in srgb, var(--tile) 60%, transparent);
  box-shadow: var(--shadow-card), 0 0 34px color-mix(in srgb, var(--tile) 40%, transparent);
}
.feat-art {
  width: 76px; height: 76px; border-radius: 18px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--tile) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--tile) 35%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.feat-art svg { width: 52px; height: 52px; }
.feat-card h3 { font-size: .98rem; font-weight: 800; }
.feat-card p { font-size: .8rem; color: var(--muted); flex: 1 1 auto; }
.feat-cta {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  font-size: .8rem; font-weight: 700; color: #fff;
  background: color-mix(in srgb, var(--tile) 80%, #000 10%);
  padding: 8px 16px; border-radius: 999px;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--tile) 45%, transparent);
  transition: transform .2s ease, box-shadow .2s ease;
}
.feat-card:hover .feat-cta { transform: translateX(3px); }

/* directory */
.dir-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.dir-card {
  padding: 22px 20px; border-radius: var(--radius); background: var(--card);
  border: 1px solid color-mix(in srgb, var(--tile) 30%, transparent);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255,255,255,.06);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: transform .25s ease, box-shadow .25s ease;
  display: flex; flex-direction: column; gap: 12px;
  position: relative; overflow: hidden;
}
.dir-card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(300px 150px at 50% -30%, color-mix(in srgb, var(--tile) 20%, transparent), transparent 70%);
  pointer-events: none;
}
.dir-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-card), 0 0 28px color-mix(in srgb, var(--tile) 35%, transparent); }
.dir-head { display: flex; align-items: center; gap: 12px; }
.dir-head .cat-icon { width: 44px; height: 44px; }
.dir-head .cat-icon svg { width: 22px; height: 22px; }
.dir-head h3 { font-size: 1.02rem; font-weight: 800; flex: 1 1 auto; }
.dir-count {
  font-size: .72rem; font-weight: 800; color: #fff;
  background: var(--tile); border-radius: 999px; padding: 3px 11px;
  box-shadow: 0 2px 10px color-mix(in srgb, var(--tile) 50%, transparent);
}
.dir-links { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.dir-links a {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .86rem; color: var(--ink-soft); padding: 2px 0;
  transition: color .15s ease, transform .15s ease;
}
.dir-links a:hover { color: var(--ink); text-decoration: none; transform: translateX(3px); }
.dir-links a span { color: var(--faint); font-size: .78rem; }
.dir-all { margin-top: auto; font-size: .84rem; font-weight: 700; color: var(--accent-3); padding-top: 6px; border-top: 1px solid var(--line-soft); }

/* ---------- footer ---------- */
.site-footer {
  margin-top: 72px; position: relative; z-index: 1;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, .7));
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
[data-theme="light"] .site-footer { background: linear-gradient(180deg, transparent, rgba(232, 238, 251, .8)); }
.footer-grid {
  width: min(1400px, 100% - 28px); margin-inline: auto;
  display: grid; grid-template-columns: 1.2fr 1.3fr .7fr .7fr; gap: 36px;
  padding: 52px 0 36px;
}
.footer-brand p { color: var(--muted); font-size: .88rem; margin-top: 12px; max-width: 22rem; }
.footer-tagline { font-weight: 700; color: var(--ink) !important; font-size: .95rem !important; }
.social-row { display: flex; gap: 10px; margin-top: 18px; }
.social-row a {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(148,163,184,.09); border: 1px solid var(--line-soft); color: var(--ink-soft);
  transition: transform .2s ease, box-shadow .2s ease, color .2s ease, border-color .2s ease;
}
.social-row a:hover { transform: translateY(-2px); color: #fff; border-color: rgba(59,130,246,.6); box-shadow: var(--glow); }
.social-row svg { width: 17px; height: 17px; }
.footer-news h3 { font-size: 1.08rem; font-weight: 800; margin-bottom: 14px; max-width: 24rem; }
.newsletter-form { display: flex; gap: 8px; max-width: 26rem; }
.newsletter-form input {
  flex: 1 1 auto; min-width: 0;
  background: var(--field); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 16px; color: var(--ink); font-size: .9rem; outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.newsletter-form input::placeholder { color: var(--faint); }
.newsletter-form input:focus { border-color: rgba(59,130,246,.6); box-shadow: var(--glow); }
.newsletter-note { font-size: .78rem; color: var(--faint); margin-top: 10px; }
.footer-col h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); margin-bottom: 14px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-col a { color: var(--muted); font-size: .9rem; transition: color .15s ease; }
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  width: min(1400px, 100% - 28px); margin-inline: auto;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 20px 0 28px; border-top: 1px solid var(--line-soft);
  font-size: .8rem; color: var(--faint);
}

/* ---------- search overlay ---------- */
.search-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(2, 6, 23, .7);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  display: grid; place-items: start center; padding: 12vh 20px 20px;
}
.search-overlay[hidden] { display: none; }
.search-panel {
  width: min(620px, 100%);
  background: var(--card); border: 1px solid var(--line); border-radius: 22px;
  padding: 22px; box-shadow: var(--shadow-lg);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
#overlaySearchInput {
  width: 100%; background: var(--field); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 18px; color: var(--ink); font-size: 1rem; outline: none;
}
#overlaySearchInput:focus { border-color: rgba(59,130,246,.6); box-shadow: var(--glow); }
.search-results { margin-top: 12px; display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; }
.search-results .suggest-item { border-radius: 10px; }
.search-hint { padding: 18px 6px; color: var(--muted); font-size: .9rem; text-align: center; }

/* ---------- buttons / forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(148,163,184,.1); color: var(--ink); font-weight: 700; font-size: .9rem;
  cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--glow); }
.btn-primary { background: var(--grad); border: 0; color: #fff; box-shadow: 0 6px 20px rgba(124,58,237,.45); }
.btn-sm { padding: 8px 16px; font-size: .82rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; }
.calc-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 28px; border-radius: 14px; border: 0; cursor: pointer;
  background: var(--grad); color: #fff; font-weight: 800; font-size: 1rem;
  box-shadow: 0 8px 26px rgba(124,58,237,.5);
  transition: transform .2s ease, box-shadow .2s ease;
}
.calc-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(124,58,237,.6); }
.fav-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 999px; cursor: pointer;
  background: rgba(148,163,184,.09); border: 1px solid var(--line); color: var(--ink);
  font-weight: 700; font-size: .88rem;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.fav-btn:hover { transform: translateY(-1px); border-color: rgba(244,63,94,.5); box-shadow: 0 0 20px rgba(244,63,94,.3); }
.fav-btn svg { width: 18px; height: 18px; }
.calc-input, .calc-select {
  width: 100%; background: var(--field); border: 1px solid var(--line);
  border-radius: 12px; padding: 13px 16px; color: var(--ink); font-size: 1rem; outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.calc-input:focus, .calc-select:focus { border-color: rgba(59,130,246,.6); box-shadow: var(--glow); }
.calc-select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
  padding-right: 40px;
}
.calc-select option { background: var(--bg1); color: var(--ink); }
.calc-input.invalid { border-color: var(--danger); }

/* ---------- toast ---------- */
.toast-stack { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: var(--card); border: 1px solid var(--line); color: var(--ink);
  padding: 12px 22px; border-radius: 999px; font-size: .88rem; font-weight: 600;
  box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  max-width: min(92vw, 480px); text-align: center;
}
.toast.show { opacity: 1; transform: none; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.22,1,.36,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- calculator / category pages ---------- */
.breadcrumbs { padding: 26px 0 6px; font-size: .84rem; color: var(--muted); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--ink); }
.calc-hero { padding: 26px 0 30px; max-width: 46rem; }
.eyebrow-chip {
  display: inline-block; font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-3); background: var(--accent-soft);
  border: 1px solid rgba(34,211,238,.3); border-radius: 999px; padding: 6px 16px; margin-bottom: 14px;
}
.calc-hero h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); font-weight: 800; margin-bottom: 10px; }
.lede { font-size: 1.1rem; color: var(--ink-soft); font-weight: 600; margin-bottom: 8px; }
.calc-hero > p { color: var(--muted); }
.calc-hero .fav-btn { margin-top: 16px; }

.calc-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; margin-bottom: 34px; }
.calc-device {
  background: var(--card); border: 1px solid var(--line); border-radius: 24px;
  padding: 28px; box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255,255,255,.06);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.calc-field { margin-bottom: 18px; }
.calc-field label { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9rem; margin-bottom: 8px; }
.unit-chip {
  font-size: .7rem; font-weight: 800; color: var(--accent-3);
  background: var(--accent-soft); border: 1px solid rgba(34,211,238,.3);
  padding: 2px 10px; border-radius: 999px;
}
.field-help { display: block; font-size: .78rem; color: var(--faint); margin-top: 6px; }
.calc-device .calc-btn { width: 100%; margin-top: 6px; }

.calc-results {
  background: linear-gradient(160deg, rgba(59,130,246,.14), rgba(139,92,246,.1)), var(--card);
  border: 1px solid rgba(59,130,246,.35); border-radius: 24px;
  padding: 28px; box-shadow: var(--shadow-card), 0 0 34px rgba(59,130,246,.18);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.calc-results[hidden] { display: none; }
.result-display { text-align: center; padding: 10px 0 18px; border-bottom: 1px solid var(--line-soft); margin-bottom: 16px; }
.result-label { display: block; font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.result-hero-num {
  display: block; font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 800;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums;
}
.result-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 2px; border-bottom: 1px solid var(--line-soft); font-size: .92rem;
}
.result-row:last-child { border-bottom: 0; }
.result-row span { color: var(--muted); }
.result-row strong { font-variant-numeric: tabular-nums; }
.result-actions { display: flex; gap: 10px; margin-top: 18px; }
.copy-btn, .print-btn {
  flex: 1 1 auto; padding: 11px; border-radius: 12px; cursor: pointer;
  background: rgba(148,163,184,.1); border: 1px solid var(--line); color: var(--ink);
  font-weight: 700; font-size: .86rem; transition: transform .2s ease, box-shadow .2s ease;
}
.copy-btn:hover, .print-btn:hover { transform: translateY(-1px); box-shadow: var(--glow); }

.formula-box {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 28px; margin-bottom: 30px;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.formula-box h2 { font-size: 1.2rem; margin-bottom: 10px; }
.formula-box p { color: var(--ink-soft); }

/* premium frosted-glass FAQ accordions (calculator pages) */
.faq-item {
  border: 1px solid var(--line); border-radius: 18px;
  background: linear-gradient(180deg, rgba(148,163,184,.1), rgba(148,163,184,.04));
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
  margin-bottom: 14px; overflow: hidden;
  transition: box-shadow .25s ease, border-color .25s ease, transform .25s ease;
}
.faq-item:hover { border-color: rgba(59,130,246,.45); box-shadow: var(--shadow-card), 0 0 24px rgba(59,130,246,.18); transform: translateY(-1px); }
.faq-item summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 18px 22px; min-height: 60px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .faq-q { font-weight: 700; font-size: 1.02rem; color: var(--ink); letter-spacing: -.01em; }
.faq-icon {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-3);
  border: 1px solid rgba(34,211,238,.3);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), background .25s ease, color .25s ease;
}
.faq-icon svg { width: 18px; height: 18px; }
.faq-item[open] { border-color: rgba(59,130,246,.5); }
.faq-item[open] .faq-icon { transform: rotate(45deg); background: var(--grad); color: #fff; border-color: transparent; }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s cubic-bezier(.4,0,.2,1); }
.faq-item[open] .faq-a { grid-template-rows: 1fr; }
.faq-a > p { overflow: hidden; margin: 0; padding: 0 22px; color: var(--ink-soft); }
.faq-item[open] .faq-a > p { padding-bottom: 20px; }

/* legacy button-driven FAQ (affiliate posts) */
.faq-list { max-width: 860px; margin: 0 auto 30px; }
div.faq-item .faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: none; border: 0; cursor: pointer; padding: 18px 22px; text-align: left;
  font-weight: 700; font-size: 1rem; color: var(--ink);
}
div.faq-item .faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
div.faq-item .faq-a-inner { padding: 0 22px 20px; color: var(--ink-soft); }
.chev { flex: 0 0 auto; width: 22px; height: 22px; color: var(--accent-3); transition: transform .3s ease; }
div.faq-item.open .chev { transform: rotate(180deg); }

/* tool / related cards */
.tool-grid, .related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 8px 0 40px; }
.tool-card {
  display: flex; align-items: center; gap: 14px; padding: 18px;
  border-radius: 18px; background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.tool-card:hover {
  text-decoration: none; transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--tile, #3b82f6) 55%, transparent);
  box-shadow: var(--shadow-card), 0 0 26px color-mix(in srgb, var(--tile, #3b82f6) 35%, transparent);
}
.tool-ic {
  width: 48px; height: 48px; flex: 0 0 auto; border-radius: 14px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--tile, #3b82f6) 16%, transparent); color: var(--tile, #3b82f6);
  border: 1px solid color-mix(in srgb, var(--tile, #3b82f6) 35%, transparent);
}
.tool-ic svg { width: 24px; height: 24px; }
.tool-tx { flex: 1 1 auto; min-width: 0; }
.tool-tx h3 { font-size: .95rem; font-weight: 800; margin-bottom: 2px; }
.tool-tx p { font-size: .8rem; color: var(--muted); }
.tool-go { flex: 0 0 auto; font-size: .82rem; font-weight: 700; color: var(--accent-3); }

/* ---------- articles / posts ---------- */
.article-hero { padding: 40px 0 8px; }
.article-hero h1 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 800; max-width: 44rem; margin: 12px 0; }
.crumbs { font-size: .82rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.article-body { max-width: 46rem; color: var(--ink-soft); }
.article-body p { margin-bottom: 1.1em; }
.article-body h2 { font-size: 1.35rem; margin: 1.8em 0 .6em; }
.article-body h3 { font-size: 1.1rem; margin: 1.5em 0 .5em; }
.article-body ul, .article-body ol { margin: 0 0 1.1em 1.4em; }
.article-body li { margin-bottom: .45em; }
.article-body table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: .9rem; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.article-body th { background: rgba(148,163,184,.08); font-weight: 700; }
.author-line { display: flex; align-items: center; gap: 12px; margin: 18px 0; font-size: .86rem; color: var(--muted); }
.avatar-fallback {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-weight: 800;
}
.callout {
  border-left: 3px solid var(--accent-3); background: var(--accent-soft);
  border-radius: 0 14px 14px 0; padding: 16px 20px; margin: 1.4em 0; font-size: .92rem;
}
.disclaimer {
  font-size: .8rem; color: var(--muted); border: 1px dashed var(--line);
  border-radius: 14px; padding: 14px 18px; margin: 1.6em 0;
}
.video-cap { font-size: .8rem; color: var(--faint); text-align: center; margin-top: 8px; }
.related-card {
  border-radius: 18px; overflow: hidden; background: var(--card); border: 1px solid var(--line);
  transition: transform .25s ease, box-shadow .25s ease;
}
.related-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card), var(--glow); text-decoration: none; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--grad); color: #fff;
}
.brand-mark svg { width: 20px; height: 20px; }

/* ---------- guides ---------- */
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-card);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
a.card:hover { text-decoration: none; transform: translateY(-5px); border-color: rgba(59,130,246,.45); box-shadow: var(--shadow-card), var(--glow); }
.post-card h2 { font-size: 1.08rem; margin: 10px 0 8px; }
.post-card p { font-size: .88rem; color: var(--muted); }
.tag {
  display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-3); background: var(--accent-soft); border: 1px solid rgba(34,211,238,.3);
  padding: 4px 12px; border-radius: 999px;
}
.read-time { display: inline-block; margin-top: 12px; font-size: .78rem; color: var(--faint); }

/* ---------- favorites ---------- */
.fav-card {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow-card); margin-bottom: 12px;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.fav-info { flex: 1 1 auto; min-width: 0; }
.fav-info a { font-weight: 800; color: var(--ink); font-size: 1rem; }
.empty-state { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty-state svg { width: 64px; height: 64px; margin: 0 auto 18px; color: var(--faint); }
.empty-state h2 { margin-bottom: 8px; }
.empty-state .btn { margin-top: 18px; }

/* ---------- misc ---------- */
.mt-1 { margin-top: 8px; }
.small { font-size: .85rem; color: var(--muted); }
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-card);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: 7px; }
.field-error { font-size: .78rem; color: var(--danger); margin-top: 6px; min-height: 1.1em; }
.pill {
  padding: 8px 18px; border-radius: 999px; cursor: pointer; font-size: .84rem; font-weight: 700;
  background: rgba(148,163,184,.09); border: 1px solid var(--line); color: var(--ink-soft);
  transition: all .2s ease;
}
.pill.active, .pill[aria-pressed="true"] { background: var(--grad); color: #fff; border-color: transparent; }
[data-tabs] { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tab {
  padding: 9px 20px; border-radius: 12px; cursor: pointer; font-weight: 700; font-size: .88rem;
  background: rgba(148,163,184,.09); border: 1px solid var(--line); color: var(--ink-soft);
}
.tab.active { background: var(--accent-soft); color: var(--ink); border-color: rgba(59,130,246,.5); }

/* ---------- responsive ---------- */
@media (max-width: 1200px) {
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .feat-grid { grid-template-columns: repeat(3, 1fr); }
  .dir-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1020px) {
  .main-nav {
    position: fixed; top: calc(var(--header-h) + 20px); left: 14px; right: 14px;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--card); border: 1px solid var(--line); border-radius: 20px;
    padding: 12px; box-shadow: var(--shadow-lg);
    -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
    max-height: 0; overflow: hidden; opacity: 0; padding: 0 12px;
    transition: max-height .35s ease, opacity .3s ease, padding .3s ease;
    z-index: 55;
  }
  .main-nav.open { max-height: 70vh; overflow-y: auto; opacity: 1; padding: 12px; }
  .main-nav a { opacity: 1; font-size: .95rem; padding: 12px 16px; }
  .site-header.nav-boot .main-nav a, .site-header.nav-in .main-nav a { opacity: 1; transform: none; transition-delay: 0s; }
  .nav-ind { display: none; }
  .nav-menu { display: grid; }
  .hero-home .hero-inner { grid-template-columns: 1fr; padding: 40px 28px; }
  .hero-visual { min-height: 440px; }
  .calc-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .tool-grid, .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .header-inner { gap: 10px; padding: 0 14px; }
  .logo span:last-child { font-size: 1.05rem; }
  .fav-pill span { display: none; }
  .fav-pill { padding: 9px 12px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .feat-grid { grid-template-columns: 1fr 1fr; }
  .dir-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .tool-grid, .related-grid { grid-template-columns: 1fr; }
  .trust-row { grid-template-columns: repeat(2, 1fr); }
  .hero-home .hero-inner { padding: 32px 20px; border-radius: 22px; }
  .hero-visual { min-height: 400px; }
  .hero-calc { width: 210px; }
  .f-chip { padding: 8px 11px; font-size: .7rem; }
  .fc-home { display: none; }
  .partner-note { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .two-col { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .site-header.nav-boot .main-nav a, .site-header.nav-in .main-nav a { opacity: 1; transform: none; }
}

/* ---------- print ---------- */
@media print {
  .bg-fx, .site-header, .site-footer, .hero-search, .popular-row, .trust-row,
  .hero-visual, .suggest, .profile-popover, .related-grid, .faq-item, .toast-stack,
  .search-overlay, .result-actions, .fav-btn { display: none !important; }
  body { background: #fff; color: #000; }
  .calc-device, .calc-results { box-shadow: none; border: 1px solid #ccc; }
}

/* ---------- topic hubs ---------- */
.hub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.hub-card { display: flex; align-items: center; gap: .9rem; padding: 1.1rem 1.2rem; border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--tile) 14%, transparent), transparent);
  border: 1px solid color-mix(in srgb, var(--tile) 35%, transparent); text-decoration: none; color: inherit; }
.hub-card:hover { border-color: var(--tile); transform: translateY(-2px); }
.hub-card .hub-tx h3 { margin: 0 0 .3rem; font-size: 1.05rem; color: var(--tile); }
.hub-card .hub-tx p { margin: 0; font-size: .9rem; opacity: .85; }

/* ---------- byline ---------- */
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; font-size: .88rem;
  color: var(--muted, #9fb0c7); margin: .9rem 0 0; }
.byline a { color: var(--accent-3); font-weight: 600; text-decoration: none; }
.byline a:hover { text-decoration: underline; }
.byline .byline-sep { opacity: .5; }
.byline time { font-variant-numeric: tabular-nums; }

/* ---------- article cards (hubs / blog) ---------- */
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.1rem; }
.article-card { display: block; padding: 1.15rem 1.25rem; border-radius: 14px; text-decoration: none; color: inherit;
  background: var(--card, rgba(255,255,255,.03)); border: 1px solid rgba(255,255,255,.08); }
.article-card:hover { border-color: var(--tile, #2563eb); transform: translateY(-2px); }
.article-card h3 { margin: 0 0 .4rem; font-size: 1.02rem; }
.article-card p { margin: 0 0 .6rem; font-size: .9rem; opacity: .8; }
.article-card .card-meta { font-size: .78rem; opacity: .6; }

/* ---------- trust pages ---------- */
.prose { max-width: 760px; line-height: 1.75; font-size: 1rem; }
.prose h2 { margin-top: 2.2rem; font-size: 1.35rem; }
.prose h3 { margin-top: 1.6rem; font-size: 1.1rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin: .4rem 0; }
.prose a { color: var(--accent-3); }
.prose table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.prose th, .prose td { border: 1px solid rgba(255,255,255,.12); padding: .55rem .7rem; text-align: left; font-size: .92rem; }
.prose th { background: rgba(255,255,255,.05); }

/* ---------- search page ---------- */
.search-page-form { display: flex; gap: .6rem; max-width: 640px; margin: 1.2rem 0 2rem; }
.search-page-form input { flex: 1; }
.search-results { display: grid; gap: .9rem; }

/* ---------- Phase 2a: content sections (calculator pages) ---------- */
/* Shared section rhythm for Introduction / Worked examples / Popular tools / References */
.content-sec { margin: 0 0 36px; }
.content-sec > h2 {
  font-size: 1.35rem; letter-spacing: -.01em; margin: 0 0 16px;
  display: flex; align-items: center; gap: 10px;
}
.content-sec > h2::before {
  content: ""; flex: 0 0 auto; width: 8px; height: 26px; border-radius: 4px;
  background: var(--grad, linear-gradient(135deg, #2563eb, #7c3aed));
  box-shadow: 0 2px 10px rgba(37, 99, 235, .45);
}
/* Glass card shared by Introduction and References */
.content-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 28px; box-shadow: var(--shadow-card);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.content-card > p { color: var(--ink-soft); line-height: 1.75; margin: 0 0 1em; }
.content-card > p:last-child { margin-bottom: 0; }
/* Worked-example cards */
.example-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.example-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--shadow-card);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.example-card:hover { transform: translateY(-2px); border-color: rgba(59,130,246,.45); box-shadow: var(--shadow-card), 0 0 24px rgba(59,130,246,.16); }
.example-card h3 { font-size: 1.02rem; margin: 0 0 10px; letter-spacing: -.01em; }
.example-card p { color: var(--ink-soft); line-height: 1.7; margin: 0; font-variant-numeric: tabular-nums; }
/* Reference link list */
.ref-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ref-list li { display: flex; align-items: baseline; gap: 10px; }
.ref-list li::before { content: "↗"; flex: 0 0 auto; color: var(--accent-3); font-weight: 700; }
.ref-list a { color: var(--ink); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line); }
.ref-list a:hover { color: var(--accent-3); border-color: var(--accent-3); }

/* ---------- Phase 5: AdSense manual-unit placeholders ---------- */
.ad-slot-wrap { margin: 28px auto; max-width: 970px; padding: 0 4px; text-align: center; }
.ad-slot-wrap .ad-label {
  display: block; font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); opacity: .8; margin-bottom: 8px;
}
/* Empty state (no ad served yet / placeholder slot ID): subtle dashed box. */
.ad-slot-wrap .ad-slot:empty {
  display: block; min-height: 96px; border: 1px dashed rgba(148,163,184,.5);
  border-radius: 10px; background: rgba(148,163,184,.06);
}
/* Filled state: let the creative size itself, collapse any leftover height. */
.ad-slot-wrap .ad-slot { max-width: 100%; margin: 0 auto; }
@media (max-width: 640px) { .ad-slot-wrap { margin: 20px auto; } }
@media print { .ad-slot-wrap { display: none; } }

/* ---------- Phase 5: natural-language search hints ---------- */
.nl-hint { font-size: .82rem; color: var(--muted); margin-top: 10px; }
.nl-hint code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .78rem; background: rgba(148,163,184,.12); border: 1px solid var(--line);
  border-radius: 6px; padding: 1px 7px; margin: 0 2px; white-space: nowrap;
}
