/* Blog pages: shares the homepage's tokens and visual language */
:root {
  --bg: #03060f;
  --bg-2: #060c1a;
  --surface: rgba(12, 22, 42, 0.62);
  --ink: #eef6ff;
  --body: #c7d3e6;
  --muted: #93a6c2;
  --faint: #5d6f8c;
  --line: rgba(120, 170, 255, 0.14);
  --line-strong: rgba(120, 200, 255, 0.32);
  --cyan: #41e9ff;
  --violet: #9d6cff;
  --grad: linear-gradient(110deg, #41e9ff 0%, #5b7cff 50%, #9d6cff 100%);
  --font-display: "Space Grotesk", "PingFang SC", "Hiragino Sans", "Microsoft YaHei", sans-serif;
  --font-body: "Inter", "PingFang SC", "PingFang TC", "Hiragino Sans", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --gutter: clamp(16px, 5vw, 72px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font-family: var(--font-body); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden;
  background: radial-gradient(900px 500px at 85% -10%, rgba(91,124,255,.16), transparent 70%), radial-gradient(700px 400px at 0% 0%, rgba(65,233,255,.08), transparent 70%), var(--bg);
  background-repeat: no-repeat;
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--cyan); color: var(--bg); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; border-radius: 6px; }
.container { width: min(1200px, 100% - 2 * var(--gutter)); margin: 0 auto; }
.container.narrow { width: min(760px, 100% - 2 * var(--gutter)); }

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; padding: 12px 0; background: rgba(3, 6, 15, 0.8); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 17px; white-space: nowrap; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; flex: none; border-radius: 10px; background: linear-gradient(145deg, #0d1b38, #160f33); border: 1px solid rgba(65,233,255,.4); box-shadow: 0 0 20px rgba(65,233,255,.18); }
.brand-mark svg { width: 18px; height: 18px; }
.nav-links { display: flex; gap: 28px; font-size: 14px; color: var(--muted); }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch { display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 13px; color: var(--ink); }
.lang-switch:hover { border-color: var(--cyan); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 600; font-size: 15px; white-space: nowrap; border: 1px solid transparent; transition: transform .2s, box-shadow .2s, border-color .2s; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--grad); color: #041021; box-shadow: 0 10px 40px rgba(65,233,255,.22); }
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--cyan); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 13px; }

/* Headers */
.kicker { display: inline-block; margin-bottom: 14px; font: 500 12px var(--font-mono); letter-spacing: .16em; color: var(--cyan); text-transform: uppercase; }
.page-head { padding: clamp(56px, 9vw, 110px) 0 clamp(32px, 5vw, 56px); }
h1 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(36px, 6vw, 64px); line-height: 1.08; letter-spacing: -.025em; text-wrap: balance; }
html:lang(zh-CN) h1 { letter-spacing: 0; line-height: 1.25; }
.lead { margin: 18px 0 0; max-width: 680px; color: var(--muted); font-size: clamp(17px, 1.6vw, 20px); line-height: 1.7; }

/* Cards */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 18px; }
.post-card { display: flex; flex-direction: column; overflow: hidden; padding: 26px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(14,24,46,.7), rgba(8,14,28,.7)); transition: transform .25s, border-color .25s; }
.post-card:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.post-card h3 { margin: 12px 0 8px; font-family: var(--font-display); font-size: 21px; line-height: 1.3; }
.post-card p { margin: 0 0 18px; color: var(--muted); font-size: 15px; line-height: 1.65; }
.post-card .tags { margin-top: auto; }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px; font: 500 12px var(--font-mono); color: var(--faint); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; color: var(--muted); }

/* Article */
.article-head { padding: clamp(40px, 7vw, 88px) 0 32px; }
.article-head .post-meta { margin: 22px 0 14px; }
.article-head .tags { margin-top: 22px; }
.back { font-size: 14px; color: var(--muted); }
.back:hover { color: var(--cyan); }
.toc { margin: 0 0 40px; padding: 20px 24px; line-height: 1.5; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.toc ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--muted); font-size: 15px; }
.toc a:hover { color: var(--cyan); }
.prose { color: var(--body); font-size: 17px; line-height: 1.85; border-top: 1px solid var(--line); padding-top: 8px; }
html:lang(zh-CN) .prose { font-size: 16.5px; line-height: 1.95; }
.prose h2 { margin: 52px 0 14px; color: var(--ink); font-family: var(--font-display); font-size: clamp(24px, 3vw, 30px); line-height: 1.3; letter-spacing: -.01em; }
.prose h3 { margin: 34px 0 10px; color: var(--ink); font-family: var(--font-display); font-size: 21px; line-height: 1.35; }
.prose p { margin: 0 0 20px; }
.prose ul, .prose ol { margin: 0 0 22px; padding-left: 22px; display: grid; gap: 8px; }
.prose li::marker { color: var(--cyan); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(65,233,255,.4); }
.prose code { padding: 2px 6px; border-radius: 6px; background: rgba(65,233,255,.08); font: 500 .88em var(--font-mono); color: #bdf5ff; }
.prose blockquote { margin: 28px 0; padding: 18px 22px; border-left: 3px solid var(--violet); border-radius: 0 12px 12px 0; background: rgba(157,108,255,.08); color: var(--ink); }
.prose blockquote p { margin: 0; }

/* Case studies */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1px; margin: 28px 0 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--line); }
.facts div { padding: 14px 18px; background: #070d1c; }
.facts dt { font: 500 11px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.facts dd { margin: 6px 0 0; color: var(--ink); font-size: 15px; line-height: 1.45; }
.facts a { color: var(--cyan); }
.prose figure { margin: 32px 0; }
.prose figure img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line-strong); }
.prose figcaption { margin-top: 10px; color: var(--faint); font-size: 14px; text-align: center; }
.post-cover { display: block; width: calc(100% + 52px); max-width: none; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; object-position: top; margin: -26px -26px 18px; border-bottom: 1px solid var(--line); transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.post-card:hover .post-cover { transform: scale(1.03); }
.post-cat { display: inline-flex; align-self: flex-start; padding: 4px 10px; border-radius: 999px; background: rgba(65,233,255,.08); border: 1px solid rgba(65,233,255,.22); color: var(--cyan); font: 500 11px var(--font-mono); letter-spacing: .06em; }
.post-card .post-cat { margin-bottom: 10px; }
.post-card[data-cat="web"] .post-cat, .post-cat[data-cat="web"] { color: #c9a8ff; background: rgba(157,108,255,.1); border-color: rgba(157,108,255,.3); }
.post-card[data-cat="strategy"] .post-cat, .post-cat[data-cat="strategy"] { color: #ffc98a; background: rgba(255,178,95,.08); border-color: rgba(255,178,95,.28); }
.post-card[data-cat="industry"] .post-cat, .post-cat[data-cat="industry"] { color: #86efac; background: rgba(74,222,128,.08); border-color: rgba(74,222,128,.25); }

/* Featured post + filters */
.post-grid.has-featured .featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.15fr 1fr; column-gap: 36px; align-content: center; padding: 0; }
.featured .post-cover { grid-row: 1 / span 6; width: 100%; height: 100%; margin: 0; aspect-ratio: auto; min-height: 320px; border-bottom: 0; border-right: 1px solid var(--line); }
.featured .post-cat { justify-self: start; margin: 32px 32px 12px 0; }
.featured .post-meta, .featured h3, .featured p, .featured .tags { margin-right: 32px; }
.featured h3 { font-size: clamp(24px, 2.4vw, 32px); line-height: 1.25; }
.featured p { font-size: 16px; }
.featured .tags { margin-top: 0; margin-bottom: 32px; }
.post-grid.filtered .featured { grid-column: auto; display: flex; padding: 26px; }
.post-grid.filtered .featured .post-cover { width: calc(100% + 52px); height: auto; margin: -26px -26px 18px; aspect-ratio: 1200 / 630; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
.post-grid.filtered .featured > * { margin-right: 0; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.chip-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(10,18,36,.5); color: var(--muted); font: 500 14px var(--font-body); cursor: pointer; transition: border-color .2s, color .2s, background .2s; }
.chip-btn span { font: 500 11px var(--font-mono); color: var(--faint); }
.chip-btn:hover { color: var(--ink); border-color: var(--cyan); }
.chip-btn[aria-pressed="true"] { color: #041021; background: var(--grad); border-color: transparent; }
.chip-btn[aria-pressed="true"] span { color: rgba(4,16,33,.7); }
[hidden] { display: none !important; }

/* Article layout */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--grad); transform-origin: left; transform: scaleX(0); }
.back { display: table; }
.article-head .post-cat { margin-top: 26px; }
.article-head .post-cat + .post-meta { margin-top: 14px; }
.article-cover { margin: 0 auto 48px; width: min(1000px, 100% - 2 * var(--gutter)); }
.article-cover img { display: block; width: 100%; height: auto; border-radius: 22px; border: 1px solid var(--line-strong); box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.article-body { display: grid; grid-template-columns: minmax(0, 1fr); width: min(760px, 100% - 2 * var(--gutter)); }
.toc-title { margin: 0 0 10px; font: 500 11px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.toc a.active { color: var(--cyan); }
@media (min-width: 1240px) {
  .article-body { width: min(1280px, 100% - 2 * var(--gutter)); grid-template-columns: 220px minmax(0, 760px) 220px; column-gap: 40px; }
  .toc-wrap { grid-column: 1; }
  .article-main { grid-column: 2; }
  .toc-wrap .toc { position: sticky; top: 96px; margin: 0; padding: 0 0 0 16px; border: 0; border-left: 1px solid var(--line); border-radius: 0; background: none; }
  .toc-wrap .toc ol { padding-left: 0; list-style: none; gap: 10px; font-size: 14px; }
  .toc-wrap .toc a { display: block; line-height: 1.45; transition: color .2s; }
}

/* CTA + related */
.cta { margin: 56px 0 24px; padding: clamp(28px, 5vw, 44px); border-radius: 24px; border: 1px solid var(--line-strong); background: radial-gradient(500px 240px at 90% 0%, rgba(157,108,255,.26), transparent 70%), radial-gradient(400px 240px at 0% 100%, rgba(65,233,255,.16), transparent 70%), linear-gradient(140deg, #0b1630, #0a0f22); }
.cta h2 { margin: 0 0 10px; font-family: var(--font-display); font-size: clamp(24px, 3vw, 32px); line-height: 1.25; }
.cta p { margin: 0 0 24px; max-width: 560px; color: #b5c4dc; line-height: 1.7; }
.related { padding: 40px 0 80px; }
.related h2 { margin: 0 0 22px; font-family: var(--font-display); font-size: 26px; }
.page-head + .post-grid { padding-bottom: 24px; }

footer { margin-top: 40px; padding: 32px 0 40px; border-top: 1px solid var(--line); color: var(--faint); font-size: 14px; }
footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
footer a:hover { color: var(--ink); }

@media (max-width: 860px) {
  .post-grid.has-featured .featured { display: flex; padding: 26px; }
  .featured .post-cover { width: calc(100% + 52px); height: auto; margin: -26px -26px 18px; aspect-ratio: 1200 / 630; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .featured > * { margin-right: 0 !important; }
  .featured .post-cat { margin-top: 0; }
}
@media (max-width: 760px) {
  .nav-links, .nav-cta { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* Topic links (blog index, topic pages) */
.topic-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-bottom: 18px; font-size: 14px; }
.topic-links-label { font: 500 11px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.topic-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.topic-links a span { font: 500 11px var(--font-mono); color: var(--faint); }
.topic-links a:hover, .topic-links a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--cyan); }
.topic-links .feed-link { margin-left: auto; color: var(--faint); }
.topic-links .feed-link::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #ffb25f; }
.topic-section { padding-bottom: 28px; }
.topic-section h2 { margin: 12px 0 18px; font: 600 clamp(20px, 2vw, 24px) var(--font-display); }
.page-head .back + .kicker { margin-top: 22px; }
a.post-cat:hover { filter: brightness(1.25); }
@media (max-width: 640px) { .topic-links .feed-link { margin-left: 0; } }
.filter-bar { align-items: center; }
.filter-bar .topic-jump { font-size: 14px; color: var(--cyan); padding: 0 4px; }
.filter-bar .topic-jump:hover { text-decoration: underline; }
.filter-bar .feed-link, .topic-links .feed-link { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; font-size: 13px; color: var(--faint); }
.filter-bar .feed-link:hover, .topic-links .feed-link:hover { color: var(--ink); }
.filter-bar .feed-link::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #ffb25f; }
@media (max-width: 640px) { .filter-bar .feed-link { margin-left: 0; } }

/* Article search (blog index) */
.search-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.search-bar input { flex: 1 1 auto; max-width: 460px; height: 44px; padding: 0 16px 0 42px; border-radius: 12px; border: 1px solid var(--line-strong); color: var(--ink); font: 400 15px var(--font-body); background: rgba(10,18,36,.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2393a6c2' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") no-repeat 14px 50% / 18px; transition: border-color .2s, box-shadow .2s; }
.search-bar input::placeholder { color: var(--faint); }
.search-bar input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(65,233,255,.15); }
#search-count { font: 500 12px var(--font-mono); color: var(--faint); }
.no-results { padding: 8px 0 40px; color: var(--muted); }
.no-results a { color: var(--cyan); }

/* "Start here" guide */
.guide-links { margin: -8px auto 18px; font-size: 15px; color: var(--muted); }
.guide-links a, .guide-desc a { color: var(--cyan); }
.guide-links a:hover, .guide-desc a:hover { text-decoration: underline; }
.guide-step { padding-bottom: 36px; }
.guide-desc { max-width: 720px; margin: -6px 0 20px; color: var(--muted); line-height: 1.75; }
.tool-cta { margin-top: 8px; }

/* ROI calculator */
.roi { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: start; padding-bottom: 28px; }
.roi-form { display: grid; gap: 18px; padding: 26px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.field { display: grid; gap: 6px; }
.field > span { color: var(--ink); font-size: 15px; font-weight: 500; }
.field small { color: var(--faint); font-size: 13px; }
.field input, .field select { height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: rgba(3,6,15,.6); color: var(--ink); font: 500 16px var(--font-body); }
.field input:focus, .field select:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(65,233,255,.15); }
.roi-out { position: sticky; top: 90px; display: grid; gap: 4px; padding: 26px; border: 1px solid var(--line-strong); border-radius: 20px; background: linear-gradient(160deg, rgba(65,233,255,.07), rgba(157,108,255,.07)), var(--surface); }
.roi-out > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.roi-out span { color: var(--muted); font-size: 14px; }
.roi-out strong { color: var(--ink); font: 600 20px var(--font-display); text-align: right; }
.roi-out .roi-key strong { font-size: 26px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.roi-out strong.neg { color: #ff8a8a; background: none; -webkit-background-clip: initial; }
.roi-out button { margin-top: 16px; justify-self: start; cursor: pointer; }
.narrow-note { max-width: 860px; margin-left: auto; margin-right: auto; padding-bottom: 40px; }
@media (max-width: 860px) { .roi { grid-template-columns: 1fr; } .roi-out { position: static; } }

/* Footer links */
.footer-links { display: inline-flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a:hover { color: var(--ink); }

/* Print or save as PDF (checklist articles) */
.print-btn { margin-top: 18px; cursor: pointer; }
@media print {
  @page { margin: 18mm 16mm; }
  body { background: #fff !important; color: #111 !important; }
  .nav, footer, .progress, .toc-wrap, .related, .cta, .article-cover, .print-btn, .back, .post-cat { display: none !important; }
  .article-body { display: block; width: auto; }
  .article-head h1, .prose h2, .prose h3, .prose strong { color: #000 !important; }
  .prose, .lead, .post-meta, .tags span { color: #222 !important; border-color: #ccc !important; background: none !important; }
  .prose a { color: #000 !important; text-decoration: underline; }
  .prose h2, .prose h3 { break-after: avoid; }
  .prose li, .prose p { break-inside: avoid; }
}
button.btn { background: transparent; color: var(--ink); font-family: var(--font-body); }
button.btn-primary { background: var(--grad); color: #041021; }
@media print {
  .article-head::before { content: "Storm Nova Labs · stormnovalabs.com"; display: block; margin-bottom: 14px; font: 600 12px var(--font-body); letter-spacing: .04em; color: #555; }
}
