:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --text: #0f172a;
  --muted: #475569;
  --accent: #4f46e5;
  --accent-strong: #4338ca;
  --accent-soft: #eef2ff;
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
  --blog-copy-max: 74ch;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

img {
  max-width: 100%;
}

.container {
  width: min(76rem, calc(100% - 2rem));
  margin-inline: auto;
}

.blog-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(203, 213, 225, 0.75);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}

.topbar-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  text-decoration: none;
  font-family: "Sora", "Inter", ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #0f172a;
}

.topbar-nav {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
}

.topbar-link,
.topbar-cta {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  text-decoration: none;
  border-radius: 12px;
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--line-strong);
  font-weight: 600;
  font-size: 0.92rem;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.topbar-link {
  color: #334155;
  background: #ffffff;
}

.topbar-cta {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
}

.topbar-link:hover,
.topbar-cta:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.topbar-link:hover {
  background: #f8fafc;
}

.topbar-cta:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.floating-home,
.floating-chat {
  position: fixed;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.96);
  color: #1e293b;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  z-index: 35;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 200ms ease;
}

.floating-home {
  top: 1rem;
  left: 1rem;
  width: 48px;
  height: 48px;
  border-radius: 14px;
}

.floating-home:hover,
.floating-chat:hover {
  transform: translateY(-1px);
}

.floating-home.is-hidden {
  opacity: 0;
  transform: translateY(-6px) scale(0.97);
  pointer-events: none;
}

.floating-chat {
  right: 1rem;
  bottom: 1rem;
  min-height: 46px;
  border-radius: 999px;
  padding: 0.42rem 0.78rem;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.88rem;
}

.floating-chat svg {
  width: 17px;
  height: 17px;
}

.blog-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2.3rem, 7vw, 4.2rem) 0 1.8rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 55%, #f8fafc 100%);
}

.blog-hero::before,
.blog-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(64px);
  pointer-events: none;
}

.blog-hero::before {
  width: 22rem;
  height: 22rem;
  background: rgba(79, 70, 229, 0.12);
  top: -9rem;
  left: -6rem;
}

.blog-hero::after {
  width: 18rem;
  height: 18rem;
  background: rgba(14, 165, 233, 0.1);
  top: 1rem;
  right: -5rem;
}

.blog-hero .container {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent-strong);
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  padding: 0.34rem 0.7rem;
  background: var(--accent-soft);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Sora", "Inter", ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.02em;
  color: #020617;
}

.blog-hero h1 {
  margin-top: 0.92rem;
  font-size: clamp(1.9rem, 5vw, 3.35rem);
  line-height: 1.08;
  max-width: 22ch;
}

.subtitle {
  margin-top: 0.95rem;
  max-width: var(--blog-copy-max);
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 1.6;
}

.blog-meta {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.55rem;
  justify-items: start;
  max-width: var(--blog-copy-max);
}

.blog-meta p {
  margin: 0;
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: var(--blog-copy-max);
}

.read-time {
  display: inline-flex;
  align-items: center;
  padding: 0.24rem 0.62rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  font-weight: 700;
  font-size: 0.79rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.blog-scene-photo {
  margin: 1.2rem auto 0;
  width: min(100%, 1020px);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.blog-scene-photo img {
  display: block;
  width: 100%;
  height: clamp(220px, 36vw, 360px);
  object-fit: cover;
}

.blog-scene-photo figcaption {
  margin: 0;
  padding: 0.6rem 0.82rem;
  color: #64748b;
  font-size: 0.82rem;
  border-top: 1px solid var(--line);
}

.diagram-card {
  position: relative;
  margin: 1.25rem auto 0;
  width: min(100%, 1020px);
  border-radius: 18px;
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background: #0f172a;
}

.blog-article > .diagram-card {
  width: 100%;
  margin: 1.2rem 0 0;
}

.diagram-card svg {
  display: block;
  width: 100%;
  height: auto;
}

.blog-article {
  padding: 1.25rem 0 4.6rem;
}

.blog-article section {
  position: relative;
  margin-top: 1rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  padding: clamp(1rem, 2.2vw, 1.55rem);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.blog-article section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
  background: linear-gradient(90deg, #4f46e5, #06b6d4);
}

.blog-article section:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
}

.blog-article h2 {
  font-size: clamp(1.25rem, 2.6vw, 1.88rem);
  margin-bottom: 0.62rem;
}

.blog-article h3 {
  margin-top: 0.95rem;
  font-size: clamp(1.02rem, 2vw, 1.2rem);
}

.blog-article p {
  margin-top: 0.52rem;
  color: var(--muted);
  line-height: 1.68;
}

.blog-article ul,
.blog-article ol {
  margin: 0.7rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.62;
}

.blog-article li + li {
  margin-top: 0.34rem;
}

.table-wrap {
  margin-top: 0.9rem;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  background: #ffffff;
}

th,
td {
  padding: 0.72rem 0.8rem;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
}

th {
  color: #0f172a;
  font-weight: 700;
  background: #f8fafc;
}

td {
  color: #334155;
}

pre {
  margin-top: 0.82rem;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 0.84rem;
  overflow-x: auto;
}

code {
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9rem;
}

.checklist {
  list-style: none;
  padding-left: 0;
}

.checklist li {
  position: relative;
  padding-left: 1.5rem;
}

.checklist li::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(145deg, #4f46e5, #06b6d4);
  position: absolute;
  left: 0;
  top: 0.5rem;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.note {
  font-size: 0.92rem;
  color: #64748b;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.82rem;
}

.faq-item {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #f8fafc;
  padding: 0.95rem;
  transition: transform 210ms ease, box-shadow 210ms ease;
}

.faq-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.faq-item h3 {
  margin-top: 0;
  font-size: 1rem;
}

.faq-item p {
  margin-top: 0.45rem;
  min-height: 3.2rem;
}

.bottom-cta {
  margin-top: 1rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 12px;
  padding: 0.64rem 1rem;
  background: var(--accent);
  color: #ffffff;
  border: 1px solid var(--accent);
  text-decoration: none;
  font-weight: 700;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.btn-primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  transform: translateY(-1px);
}

body.reveal-ready .diagram-card,
body.reveal-ready .blog-article section,
body.reveal-ready .faq-item {
  opacity: 0;
  transform: translateY(18px);
}

body.reveal-ready .diagram-card.in-view,
body.reveal-ready .blog-article section.in-view,
body.reveal-ready .faq-item.in-view {
  opacity: 1;
  transform: none;
}

.diagram-card,
.blog-article section,
.faq-item {
  transition: opacity 520ms ease, transform 520ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

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

  .faq-item p {
    min-height: 0;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(76rem, calc(100% - 1.4rem));
  }

  .floating-home {
    top: 0.7rem;
    left: 0.7rem;
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .floating-home img {
    width: 24px;
    height: 24px;
  }

  .floating-chat {
    right: 0.7rem;
    bottom: 0.7rem;
    min-height: 44px;
    padding: 0.35rem 0.65rem;
    font-size: 0.82rem;
  }

  .topbar-inner {
    min-height: 62px;
  }

  .topbar-link {
    display: none;
  }

  .blog-article {
    padding-bottom: 3.3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .floating-home,
  .floating-chat,
  .topbar-link,
  .topbar-cta,
  .diagram-card,
  .blog-article section,
  .faq-item,
  .btn-primary {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
}

.article-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.2rem;
  margin: 1.2rem 0 0.8rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.article-byline strong {
  color: var(--text);
}
