@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700;9..144,800&display=swap');

:root {
  --bg: #FAFAF7;
  --text: #1a1a1a;
  --text-secondary: #555;
  --text-muted: #888;
  --accent: #E8590C;
  --accent-hover: #d14d0a;
  --accent-soft: #FFF4EC;
  --border: #e5e5e0;
  --card-bg: #fff;
  --green: #2B8A3E;
  --blue: #1971C2;
  --red: #c92a2a;

  --font-heading: 'Fraunces', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --max-width: 1200px;
  --article-width: 720px;
  --space: 8px;
  --nav-height: 64px;
  --radius: 12px;
  --radius-sm: 8px;
}

/* Accessibility */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: -100%; left: 16px; z-index: 9999; padding: 12px 24px; background: var(--accent); color: #fff; border-radius: var(--radius-sm); font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 8px; }

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* Base */
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); line-height: 1.2; color: var(--text); }
h1 { font-size: 2.5rem; font-weight: 800; }
h2 { font-size: 1.75rem; font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }

/* Layout */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: var(--article-width); margin: 0 auto; padding: 0 24px; }
main { flex: 1; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 250, 247, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
}
.nav-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.nav-logo {
  font-family: var(--font-heading); font-size: 20px; font-weight: 700;
  color: var(--text); text-decoration: none;
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  color: var(--text-secondary); font-size: 15px; font-weight: 500;
  text-decoration: none; transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  background: var(--accent); color: #fff !important; padding: 8px 20px;
  border-radius: var(--radius-sm); font-weight: 600; font-size: 14px;
  transition: background 0.15s;
}
.nav-cta:hover { background: var(--accent-hover); color: #fff !important; }

/* Mobile nav toggle */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle svg { width: 24px; height: 24px; }

/* Footer */
.footer {
  background: var(--text); color: #ccc; padding: 64px 0 32px;
  margin-top: 80px;
}
.footer-grid {
  max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
}
.footer-brand .footer-logo {
  font-family: var(--font-heading); font-size: 20px; font-weight: 700;
  color: #fff; margin-bottom: 12px;
}
.footer-brand .footer-logo span { color: var(--accent); }
.footer-brand p { font-size: 14px; line-height: 1.6; max-width: 280px; }
.footer-col h4 {
  font-family: var(--font-body); font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; color: #fff; margin-bottom: 16px;
}
.footer-col a { display: block; color: #aaa; font-size: 14px; margin-bottom: 10px; text-decoration: none; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  max-width: var(--max-width); margin: 0 auto; padding: 24px 24px 0;
  border-top: 1px solid #333; margin-top: 48px;
  display: flex; justify-content: space-between; font-size: 13px; color: #888;
}

/* Cards */
.card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.06); transform: translateY(-2px); }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* Article Card */
.article-card { text-decoration: none; color: inherit; display: block; }
.article-card .card-category {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--accent); margin-bottom: 8px;
}
.article-card h3 { margin-bottom: 8px; transition: color 0.15s; }
.article-card:hover h3 { color: var(--accent); }
.article-card .card-meta { font-size: 13px; color: var(--text-muted); }

/* Product Card */
.product-card { text-decoration: none; color: inherit; display: block; }
.product-card .card-badge {
  display: inline-block; background: var(--accent-soft); color: var(--accent);
  font-size: 11px; font-weight: 700; padding: 3px 10px;
  border-radius: 4px; text-transform: uppercase; margin-bottom: 12px;
}
.product-card h3 { margin-bottom: 6px; }
.product-card .card-desc { font-size: 14px; color: var(--text-secondary); margin-bottom: 12px; }
.product-card .card-price { font-size: 20px; font-weight: 700; color: var(--green); }

/* Buttons */
.btn {
  display: inline-block; padding: 12px 24px;
  border-radius: var(--radius-sm); font-size: 15px; font-weight: 700;
  font-family: var(--font-body); text-decoration: none;
  border: none; cursor: pointer; transition: background 0.15s, opacity 0.15s;
  text-align: center;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-secondary { background: var(--card-bg); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: #f5f5f0; color: var(--text); }
.btn-lg { padding: 16px 32px; font-size: 17px; }

/* Hero */
.hero {
  padding: 80px 0 64px;
  text-align: center;
}
.hero h1 { font-size: 3rem; max-width: 700px; margin: 0 auto 16px; }
.hero p {
  font-size: 1.2rem; color: var(--text-secondary);
  max-width: 560px; margin: 0 auto 32px;
}

/* Newsletter CTA */
.newsletter-cta {
  background: var(--text); color: #fff;
  border-radius: var(--radius); padding: 48px;
  text-align: center;
}
.newsletter-cta h2 { color: #fff; margin-bottom: 8px; }
.newsletter-cta p { color: #ccc; margin-bottom: 24px; }
.newsletter-form {
  display: flex; gap: 12px; max-width: 460px; margin: 0 auto;
}
.newsletter-form input {
  flex: 1; padding: 14px 16px;
  border: 1px solid #444; background: #2a2a2a; color: #fff;
  border-radius: var(--radius-sm); font-size: 15px; font-family: var(--font-body);
}
.newsletter-form input::placeholder { color: #888; }
.newsletter-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(232,89,12,0.3); }
.newsletter-form button {
  padding: 14px 28px; background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-sm); font-weight: 700;
  font-size: 15px; font-family: var(--font-body); cursor: pointer;
  white-space: nowrap; transition: background 0.15s;
}
.newsletter-form button:hover { background: var(--accent-hover); }
.newsletter-form button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Section */
.section { padding: 64px 0; }
.section-header {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 32px;
}
.section-header h2 { font-size: 1.75rem; }
.section-header a { font-size: 15px; font-weight: 600; }

/* Article page */
.article-header { padding: 48px 0 32px; }
.article-header .category-tag {
  display: inline-block; font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px; color: var(--accent);
  margin-bottom: 12px;
}
.article-header h1 { font-size: 2.5rem; margin-bottom: 16px; }
.article-meta { font-size: 14px; color: var(--text-muted); display: flex; gap: 16px; }

.article-body {
  max-width: var(--article-width); margin: 0 auto; padding: 0 24px;
  font-size: 17px; line-height: 1.8;
  overflow-wrap: break-word; word-wrap: break-word;
  overflow-x: hidden;
}
.article-body > * { max-width: 100%; }
.article-body h2 { margin: 48px 0 16px; font-size: 1.5rem; }
.article-body h3 { margin: 32px 0 12px; }
.article-body p { margin-bottom: 20px; }
.article-body ul, .article-body ol { margin-bottom: 20px; padding-left: 24px; }
.article-body li { margin-bottom: 8px; }
.article-body blockquote {
  border-left: 3px solid var(--accent); margin: 24px 0;
  padding: 16px 24px; background: var(--accent-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.article-body pre {
  background: #1a1a2e; color: #e0e0e0; padding: 20px 24px;
  border-radius: var(--radius-sm); overflow-x: auto; margin-bottom: 20px;
  font-size: 14px; line-height: 1.5;
  white-space: pre-wrap; word-wrap: break-word;
  max-width: 100%; box-sizing: border-box;
}
.article-body code {
  background: #f0f0ec; padding: 2px 6px; border-radius: 4px;
  font-size: 0.9em;
}
.article-body pre code { background: none; padding: 0; }
.article-body img { border-radius: var(--radius-sm); margin: 24px 0; }
.article-body .tool-card { max-width: 100%; box-sizing: border-box; }
.article-body .step-card { max-width: 100%; box-sizing: border-box; }
.article-body .result-box { max-width: 100%; box-sizing: border-box; }
.article-body table { display: block; overflow-x: auto; max-width: 100%; }

/* Tool recommendation card */
.tool-card {
  display: flex; gap: 16px; align-items: center;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  margin: 24px 0;
}
.tool-card-icon { width: 48px; height: 48px; background: var(--accent-soft); border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.tool-card-info { flex: 1; }
.tool-card-info h4 { font-family: var(--font-body); font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.tool-card-info p { font-size: 13px; color: var(--text-secondary); margin: 0; }
.tool-card .badge-free { background: #d3f9d8; color: var(--green); font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 4px; }
.tool-card .badge-paid { background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 4px; }

/* Result box */
.result-box {
  border-left: 4px solid var(--green);
  background: #f0faf0; padding: 20px 24px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 24px 0;
}

/* Internal link cards */
.internal-link-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 20px; margin: 20px 0;
}
.internal-link-card .internal-link {
  color: var(--accent); font-weight: 600; font-size: 15px;
  text-decoration: none;
}
.internal-link-card .internal-link:hover { text-decoration: underline; }

/* Step cards */
.step-card {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-top: 32px; margin-bottom: 16px;
  position: relative;
}
.step-number {
  width: 36px; height: 36px; background: var(--accent);
  color: #fff; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: 15px; flex-shrink: 0;
}

/* Share buttons */
.share-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.share-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 13px; color: var(--text-secondary);
  text-decoration: none; background: transparent; cursor: pointer;
  font-family: var(--font-body); transition: border-color 0.15s, color 0.15s;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Author box */
.author-box {
  display: flex; gap: 16px; align-items: center;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin: 48px 0;
}
.author-avatar {
  width: 56px; height: 56px; background: var(--accent-soft);
  border-radius: 50%; flex-shrink: 0; display: flex; align-items: center;
  justify-content: center; font-size: 24px; font-weight: 700; color: var(--accent);
}
.author-info h4 { font-family: var(--font-body); font-weight: 700; margin-bottom: 4px; }
.author-info p { font-size: 14px; color: var(--text-secondary); margin: 0; }

/* TOC */
/* Article layout: content centered, TOC floats on left */
.article-layout {
  position: relative;
  max-width: var(--article-width);
  margin: 0 auto;
  padding: 0 24px;
}
.toc-sidebar {
  position: fixed;
  left: calc((100vw - var(--article-width)) / 2 - 240px);
  top: calc(var(--nav-height) + 24px);
  width: 200px;
}
.article-main { width: 100%; }
.article-main .article-body { max-width: 100%; padding: 0; margin: 0; }
.article-main .container-narrow { max-width: 100%; padding: 0; margin: 0; }
@media (max-width: 1200px) {
  .toc-sidebar {
    position: static;
    width: 100%;
    margin-bottom: 24px;
  }
  .toc-sidebar .toc {
    margin-bottom: 0;
  }
  .toc-sidebar .toc ul {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .toc-sidebar .toc.toc-open ul {
    max-height: 500px;
  }
  .toc-sidebar .toc .toc-title {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .toc-sidebar .toc .toc-title::after {
    content: "\25BC";
    font-size: 10px;
    color: var(--text-muted);
    transition: transform 0.3s;
  }
  .toc-sidebar .toc.toc-open .toc-title::after {
    transform: rotate(180deg);
  }
}

.toc {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 32px;
}
.toc-sticky {
  /* sticky handled by .toc-sidebar fixed position */
}
.toc h4 { font-family: var(--font-body); font-weight: 700; margin-bottom: 12px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }
.toc ul { list-style: none; }
.toc li { margin-bottom: 6px; }
.toc a { color: var(--text-secondary); font-size: 14px; transition: color 0.15s; }
.toc a:hover { color: var(--accent); }
.toc a.toc-active { color: var(--accent); font-weight: 600; }

/* Badge */
.badge {
  display: inline-block; padding: 3px 10px;
  border-radius: 4px; font-size: 11px; font-weight: 700;
  text-transform: uppercase;
}
.badge-accent { background: var(--accent-soft); color: var(--accent); }
.badge-green { background: #d3f9d8; color: var(--green); }
.badge-blue { background: #d0ebff; color: var(--blue); }

/* Pagination */
.pagination {
  display: flex; justify-content: center; gap: 8px;
  padding: 32px 0;
}
.pagination a, .pagination span {
  display: inline-block; padding: 8px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; text-decoration: none;
  color: var(--text-secondary);
}
.pagination a:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Filter bar */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.filter-btn {
  padding: 6px 16px; border: 1px solid var(--border); border-radius: 20px;
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  text-decoration: none; transition: all 0.15s;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.filter-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Subscribed / Confirmation Page */
.subscribed-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.subscribed-content {
  text-align: center;
  max-width: 540px;
  padding: 48px 24px;
}
.subscribed-icon {
  width: 80px;
  height: 80px;
  background: var(--accent-soft);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  color: var(--accent);
}
.subscribed-headline {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 16px;
}
.subscribed-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 36px;
}
.subscribed-subtitle strong {
  color: var(--text);
}
.subscribed-perks {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  text-align: left;
  margin-bottom: 36px;
}
.subscribed-perks-title {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.subscribed-perks-list {
  list-style: none;
  padding: 0;
}
.subscribed-perks-list li {
  font-size: 15px;
  color: var(--text-secondary);
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.subscribed-perks-list li + li {
  border-top: 1px solid var(--border);
}
.perk-emoji {
  font-size: 20px;
  flex-shrink: 0;
}
.subscribed-latest {
  padding-top: 4px;
}
.subscribed-latest-label {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.subscribed-latest-link {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.subscribed-latest-link:hover {
  color: var(--accent-hover);
}
.subscribed-latest-arrow {
  margin-right: 4px;
}

/* Animations: bounceIn */
@keyframes bounceIn {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.15); }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); opacity: 1; }
}
.bounce-in {
  animation: bounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Animations: fadeUp */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up {
  opacity: 0;
  animation: fadeUp 0.5s ease-out both;
}

/* Animations: confettiFall */
@keyframes confettiFall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
  overflow: hidden;
}
.confetti-dot {
  position: absolute;
  top: -10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: confettiFall 3.5s ease-in forwards;
}
.confetti-dot-0  { left: 5%;  background: rgba(232,89,12,0.8);  animation-delay: 0s;    animation-duration: 3s;   }
.confetti-dot-1  { left: 12%; background: rgba(43,138,62,0.7);  animation-delay: 0.1s;  animation-duration: 3.2s; }
.confetti-dot-2  { left: 20%; background: rgba(25,113,194,0.7); animation-delay: 0.2s;  animation-duration: 3.5s; }
.confetti-dot-3  { left: 28%; background: rgba(232,89,12,0.6);  animation-delay: 0.15s; animation-duration: 3.1s; }
.confetti-dot-4  { left: 35%; background: rgba(43,138,62,0.8);  animation-delay: 0.3s;  animation-duration: 3.4s; }
.confetti-dot-5  { left: 42%; background: rgba(25,113,194,0.6); animation-delay: 0.05s; animation-duration: 3.3s; }
.confetti-dot-6  { left: 50%; background: rgba(232,89,12,0.7);  animation-delay: 0.25s; animation-duration: 3s;   }
.confetti-dot-7  { left: 57%; background: rgba(43,138,62,0.6);  animation-delay: 0.35s; animation-duration: 3.6s; }
.confetti-dot-8  { left: 64%; background: rgba(25,113,194,0.8); animation-delay: 0.1s;  animation-duration: 3.2s; }
.confetti-dot-9  { left: 72%; background: rgba(232,89,12,0.6);  animation-delay: 0.2s;  animation-duration: 3.5s; }
.confetti-dot-10 { left: 78%; background: rgba(43,138,62,0.7);  animation-delay: 0.3s;  animation-duration: 3.1s; }
.confetti-dot-11 { left: 85%; background: rgba(25,113,194,0.7); animation-delay: 0.15s; animation-duration: 3.4s; }
.confetti-dot-12 { left: 90%; background: rgba(232,89,12,0.8);  animation-delay: 0.25s; animation-duration: 3s;   }
.confetti-dot-13 { left: 95%; background: rgba(43,138,62,0.6);  animation-delay: 0.05s; animation-duration: 3.3s; }
.confetti-dot-14 { left: 8%;  background: rgba(25,113,194,0.6); animation-delay: 0.35s; animation-duration: 3.6s; }

/* Nav Search Button */
.nav-search-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 6px 12px;
  cursor: pointer; font-family: var(--font-body);
  color: var(--text-muted); font-size: 14px;
  transition: border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.nav-search-btn:hover {
  border-color: var(--accent); color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.nav-search-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav-search-btn svg { flex-shrink: 0; }
.nav-search-kbd {
  font-family: var(--font-body); font-size: 11px; font-weight: 600;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 4px; padding: 1px 6px; color: var(--text-muted);
  line-height: 1.4;
}

/* Search Overlay */
.search-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 12vh;
  animation: searchFadeIn 0.15s ease-out;
}
.search-card {
  background: var(--card-bg); border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.05);
  width: 100%; max-width: 640px;
  overflow: hidden;
  animation: searchSlideIn 0.2s ease-out;
}
.search-input-wrapper {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.search-input-icon { flex-shrink: 0; color: var(--text-muted); }
.search-input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 18px; font-family: var(--font-body); color: var(--text);
  line-height: 1.4;
}
.search-input::placeholder { color: var(--text-muted); }
.search-esc-badge {
  flex-shrink: 0; font-family: var(--font-body); font-size: 11px;
  font-weight: 600; background: var(--bg); border: 1px solid var(--border);
  border-radius: 4px; padding: 2px 8px; color: var(--text-muted);
  cursor: pointer; line-height: 1.4;
}
.search-esc-badge:hover { border-color: var(--accent); color: var(--text-secondary); }

.search-results {
  max-height: 50vh; overflow-y: auto;
  padding: 8px;
}
.search-result {
  display: block; padding: 12px 16px; border-radius: var(--radius-sm);
  text-decoration: none; color: inherit; transition: background 0.1s;
  cursor: pointer;
}
.search-result:hover, .search-result.active {
  background: var(--accent-soft);
}
.search-result:hover .search-result-title, .search-result.active .search-result-title {
  color: var(--accent);
}
.search-result-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 4px;
}
.search-result-badge {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--accent);
}
.search-result-time {
  font-size: 12px; color: var(--text-muted); font-weight: 500;
}
.search-result-title {
  font-size: 15px; font-weight: 600; color: var(--text);
  margin-bottom: 2px; transition: color 0.1s;
}
.search-result-desc {
  font-size: 13px; color: var(--text-secondary); line-height: 1.5;
}
.search-empty {
  text-align: center; padding: 32px 16px;
  color: var(--text-muted); font-size: 14px;
}

@keyframes searchFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes searchSlideIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Responsive */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  .hero h1 { font-size: 2.2rem; }
  .hero { padding: 48px 0; }
  .card-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .newsletter-form { flex-direction: column; }
  .article-header h1 { font-size: 1.8rem; overflow-wrap: break-word; word-wrap: break-word; }
  .article-header .container-narrow { padding: 0 16px; }
  .article-meta { flex-wrap: wrap; }
  .share-buttons { flex-wrap: wrap; }
  .share-btn { font-size: 12px; padding: 5px 10px; }
  .tool-card { flex-direction: column; align-items: flex-start; }
  .author-box { flex-direction: column; text-align: center; }
  .step-card { flex-direction: column; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: var(--nav-height); left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 24px; gap: 16px;
  }
  .nav-toggle { display: block; }
  .section-header { flex-direction: column; gap: 8px; }
  .nav-search-kbd { display: none; }
  .nav-search-btn { padding: 6px 8px; }
  .search-overlay { padding-top: 5vh; }
  .search-card { max-width: calc(100% - 32px); margin: 0 16px; }
  .subscribed-headline { font-size: 2rem; }
  .subscribed-perks { padding: 20px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.8rem; }
  .container { padding: 0 16px; }
  .container-narrow { padding: 0 16px; }
  .article-header h1 { font-size: 1.5rem; }
  .article-layout { padding: 0 16px; }
  .article-body { font-size: 16px; }
  .newsletter-cta { padding: 32px 20px; }
  .card { padding: 16px; }
  .result-box { padding: 16px 20px; }
}

@media (max-width: 375px) {
  .hero h1 { font-size: 1.5rem; }
  .hero p { font-size: 15px; }
  .article-header h1 { font-size: 1.3rem; }
  .container { padding: 0 12px; }
  .container-narrow { padding: 0 12px; }
  .article-layout { padding: 0 12px; }
  .newsletter-cta { padding: 24px 16px; }
  .newsletter-form button { padding: 12px 20px; font-size: 14px; }
  .share-btn { font-size: 11px; padding: 4px 8px; }
  .comparison-table { font-size: 13px; }
  .nav-logo { font-size: 16px; }
}
