:root {
  color-scheme: dark;
  --page: #10121d;
  --deep: #0b0d17;
  --surface: #161718;
  --accent: #5ee3d3;
  --coral: #ff4d45;
  --light: #e0f2f1;
  --white: #ffffff;
  --body: #d1d5db;
  --muted: #9ca3af;
  --dim: #6b7280;
  --border: #2a2b2c;
  --container: 1280px;
  --reading: 748px;
  --gutter: clamp(1rem, 4vw, 3rem);
  /* Site container is `max-w-7xl mx-auto px-4 sm:px-6 lg:px-8` — a 1280px box with
     padding INSIDE it, so its content stops 32px short of 1280 on desktop. The blog
     used `1280px - gutter` instead, which put every page edge 32px further out than
     the React pages. --pad restores the Tailwind step scale. */
  --pad: 1rem;
  --header-height: 80px;
}

@media (min-width: 640px) {
  :root {
    --pad: 1.5rem;
  }
}

@media (min-width: 1024px) {
  :root {
    --pad: 2rem;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--page);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 16% 8%, rgba(94, 227, 211, 0.035), transparent 30rem),
    radial-gradient(circle at 86% 28%, rgba(59, 130, 246, 0.025), transparent 34rem),
    var(--page);
  color: var(--body);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

body,
button,
input,
textarea,
select {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--white);
  font-family: Montserrat, Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

p {
  margin: 0;
}

::selection {
  background: rgba(94, 227, 211, 0.28);
  color: var(--white);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: var(--accent);
  color: var(--deep);
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.blog-container {
  width: min(var(--container), 100%);
  padding-inline: var(--pad);
  margin-inline: auto;
}

/* Header mirrors src/components/Navbar.jsx in its scrolled state: `.glass-effect`
   (rgba(16,18,29,0.8) + blur(10px)) plus shadow-lg. The blog cannot swap to a
   transparent bar on scroll without JS, and glass is the state a reader sees for
   all but the first 50px anyway. */
.site-header {
  position: fixed;
  z-index: 50;
  inset: 0 0 auto;
  height: var(--header-height);
  background: rgba(16, 18, 29, 0.8);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(var(--container), 100%);
  height: 100%;
  padding-inline: var(--pad);
  margin-inline: auto;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

/* h-10, same as the Navbar logo. */
.site-logo img {
  width: auto;
  height: 40px;
}

.site-nav,
.site-nav__links,
.site-nav__auth {
  display: flex;
  align-items: center;
}

/* Three space-between children — logo, links, auth — exactly like the flex row in
   Navbar.jsx, so the link cluster lands in the same place on both. */
.site-nav {
  gap: 1rem;
}

/* Navbar.jsx: gap-3 lg:gap-4 xl:gap-6 (12 / 16 / 24px). */
.site-nav__links {
  gap: 1.5rem;
}

/* Navbar.jsx link: text-white hover:text-kstudio-accent transition-colors duration-200,
   font-medium, text-base. Active link is accent with a 2px accent underline. */
.site-nav__links > a,
.site-nav__products-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--white);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
  transition: color 200ms ease;
}

.site-nav__links > a:hover,
.site-nav__products-trigger:hover,
.site-nav__products:focus-within .site-nav__products-trigger {
  color: var(--accent);
}

.site-nav__links > a.is-active {
  color: var(--accent);
}

.site-nav__links > a.is-active::after {
  position: absolute;
  right: 0;
  bottom: -0.25rem;
  left: 0;
  height: 2px;
  background: var(--accent);
  content: "";
}

/* Products dropdown — hover parity with the Navbar mega-dropdown, plus
   focus-within so it also opens for keyboard users. */
.site-nav__products {
  position: relative;
}

.site-nav__products-trigger {
  gap: 0.125rem;
  cursor: pointer;
  font-family: inherit;
}

.site-nav__chevron {
  transition: transform 300ms ease;
}

.site-nav__products:hover .site-nav__chevron,
.site-nav__products:focus-within .site-nav__chevron {
  transform: rotate(180deg);
}

/* Offset is padding on the positioned wrapper, never margin: margin is not
   hit-tested, so it would leave a gap the pointer cannot cross without dropping
   :hover and closing the menu. Navbar.jsx solves it the same way with `pt-2`. */
.site-nav__dropdown {
  position: absolute;
  top: 100%;
  left: -0.75rem;
  display: none;
  padding-top: 0.5rem;
}

.site-nav__dropdown-panel {
  position: relative;
  min-width: 210px;
  padding: 0.375rem 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
  background: rgba(13, 15, 26, 0.95);
  box-shadow: 0 8px 30px -8px rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.site-nav__dropdown-panel::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(94, 227, 211, 0.3), transparent);
  content: "";
}

.site-nav__products:hover .site-nav__dropdown,
.site-nav__products:focus-within .site-nav__dropdown {
  display: block;
}

.site-nav__dropdown a {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.875rem;
  color: #d1d5db;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: color 150ms ease, background-color 150ms ease;
}

.site-nav__dropdown a svg {
  flex: 0 0 auto;
  color: rgba(94, 227, 211, 0.7);
  transition: color 150ms ease;
}

.site-nav__dropdown a:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--accent);
}

.site-nav__dropdown a:hover svg {
  color: var(--accent);
}

/* Auth pair — the logged-out Navbar state, which is also what every prerendered
   page bakes, since the snapshot has no session either. */
.site-nav__auth {
  gap: 0.5rem;
}

.site-nav__auth .button {
  min-height: 40px;
  padding: 0 1rem;
  font-size: 14px;
}

.site-nav__mobile {
  display: none;
}

/* Buttons follow the three canonical variants in src/index.css:
   .button--outline = .btn-secondary, .button--accent = .btn-primary,
   .button--coral = .button-order. Shared geometry: rounded-[20px] pill,
   py-3 px-6, text-base, transition-all duration-300. */
.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 0.75rem 1.5rem;
  border: 2px solid transparent;
  border-radius: 20px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  transition: border-color 300ms ease, background-color 300ms ease, box-shadow 300ms ease, color 300ms ease, transform 300ms ease;
}

.button svg {
  flex: 0 0 auto;
  transition: transform 300ms ease;
}

.button:hover svg {
  transform: translateX(3px);
}

/* .btn-secondary */
.button--outline {
  border-color: var(--accent);
  background: transparent;
  color: var(--accent);
}

.button--outline:hover {
  background: rgba(94, 227, 211, 0.1);
  color: var(--white);
}

/* .btn-primary */
.button--accent {
  background: var(--accent);
  color: var(--deep);
  font-weight: 600;
}

.button--accent:hover {
  background: rgba(94, 227, 211, 0.9);
  box-shadow: 0 0 20px rgba(94, 227, 211, 0.4), 0 0 40px rgba(94, 227, 211, 0.2);
}

/* .button-order */
.button--coral {
  background: linear-gradient(90deg, #cc344e, #e8553a);
  color: var(--white);
  font-weight: 600;
}

.button--coral:hover {
  box-shadow: 0 0 25px rgba(204, 52, 78, 0.6), 0 0 50px rgba(204, 52, 78, 0.4), 0 0 80px rgba(204, 52, 78, 0.15);
  transform: scale(1.05);
}

.button--coral:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--page), 0 0 0 4px #cc344e;
}

.blog-index,
.blog-article,
.blog-error {
  padding-top: var(--header-height);
}

.index-hero {
  display: grid;
  grid-template-columns: minmax(360px, 400px) minmax(620px, 1fr);
  gap: 0;
  align-items: center;
  min-height: 0;
  padding-block: 2rem 1.5rem;
}

.index-hero__intro h1 {
  max-width: 390px;
  font-size: clamp(2.35rem, 2.55vw, 2.375rem);
}

.index-hero__intro > p {
  max-width: 420px;
  margin-top: 1.4rem;
  color: #bdc0ca;
  font-size: 17px;
  line-height: 1.65;
}

/* Brand card: bg-kstudio-dark/50, rounded-lg, border-gray-800,
   hover:border-kstudio-accent hover:bg-kstudio-dark, duration-300. */
.featured-story {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(250px, 0.95fr);
  height: 300px;
  overflow: hidden;
  border: 1px solid #1f2937;
  border-radius: 0.5rem;
  background: rgba(11, 13, 23, 0.5);
  transition: border-color 300ms ease, background-color 300ms ease;
}

.featured-story:hover {
  border-color: var(--accent);
  background: var(--deep);
}

.featured-story__media {
  height: 300px;
  overflow: hidden;
  background: var(--deep);
}

.featured-story__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.featured-story:hover .featured-story__image {
  transform: scale(1.018);
}

.featured-story__content {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.4rem, 2vw, 1.6rem);
}

.story-category {
  margin-bottom: 0.65rem;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.featured-story h2 {
  font-size: clamp(1.35rem, 1.55vw, 1.48rem);
}

.featured-story h2 a,
.insight-row h3 a {
  text-decoration: none;
}

.featured-story h2 a:hover,
.insight-row h3 a:hover {
  color: var(--accent);
}

.featured-story__content > p:not(.story-category) {
  margin-top: 1rem;
  color: #bbc0ca;
  line-height: 1.55;
}

.featured-story .button {
  margin-top: 1rem;
}

.featured-story--empty {
  display: grid;
  min-height: 260px;
  height: auto;
  grid-template-columns: 1fr;
  place-items: center;
  padding: 2rem;
  color: var(--muted);
  text-align: center;
}

.latest-section {
  padding-block: 1.3rem 1rem;
}

.latest-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

.latest-section__header h2 {
  flex: 0 0 auto;
  padding-bottom: 1rem;
  font-size: clamp(1.65rem, 2vw, 1.9rem);
}

.category-filters {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2.35rem);
  overflow-x: auto;
  padding: 0.4rem 0 0.75rem;
  scrollbar-width: thin;
}

.category-filters a {
  flex: 0 0 auto;
  padding: 0.4rem 0.85rem;
  border: 1px solid transparent;
  border-radius: 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: color 200ms ease, border-color 200ms ease, background-color 200ms ease;
}

.category-filters a:hover {
  color: var(--accent);
}

.category-filters a.is-active {
  border-color: rgba(94, 227, 211, 0.65);
  background: rgba(94, 227, 211, 0.035);
  color: var(--accent);
}

.insight-row {
  display: grid;
  grid-template-columns: minmax(230px, 370px) minmax(0, 1fr) 42px;
  height: 100px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

.insight-row__media {
  height: 100px;
  overflow: hidden;
  background: var(--deep);
}

.insight-row__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}

.insight-row:hover .insight-row__image {
  transform: scale(1.025);
}

.insight-row__content {
  align-self: center;
  padding: 0.8rem 1.65rem;
}

.insight-row__content .story-category {
  margin-bottom: 0.25rem;
  font-size: 10px;
}

.insight-row h3 {
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  letter-spacing: -0.015em;
}

.insight-row__content > p:not(.story-category) {
  margin-top: 0.28rem;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.story-meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.4rem;
  color: var(--dim);
  font-size: 11px;
}

.insight-row__arrow {
  display: grid;
  align-self: stretch;
  color: var(--accent);
  place-items: center;
  transition: background 180ms ease, color 180ms ease;
}

.insight-row__arrow:hover {
  background: rgba(94, 227, 211, 0.1);
  color: var(--accent);
}

.insight-list__empty {
  padding: 3rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  color: var(--muted);
  text-align: center;
}

.blog-cta {
  position: relative;
  display: flex;
  overflow: hidden;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-block: 3.25rem;
  padding: clamp(1.7rem, 3.6vw, 2.75rem);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  background:
    radial-gradient(circle at 6% 100%, rgba(94, 227, 211, 0.14), transparent 15rem),
    radial-gradient(circle at 94% 0, rgba(255, 77, 69, 0.1), transparent 14rem),
    rgba(11, 13, 23, 0.55);
}

.blog-cta::before {
  position: absolute;
  top: 0;
  right: 20%;
  left: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(94, 227, 211, 0.4), transparent);
  content: "";
}

.blog-cta h2 {
  max-width: 700px;
  font-size: clamp(1.7rem, 2.7vw, 2.25rem);
}

/* Canonical Final CTA button pair: gap-6, px-8 py-3 text-lg. */
.blog-cta__actions {
  display: flex;
  flex: 0 0 auto;
  gap: 1.5rem;
}

.blog-cta__actions .button {
  padding: 0.75rem 2rem;
  font-size: 18px;
}

.article-header {
  max-width: 1100px;
  padding-top: clamp(3rem, 7vw, 5.5rem);
  padding-bottom: 2.4rem;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.4rem;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumbs a {
  color: var(--accent);
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-header h1 {
  max-width: 900px;
  font-size: clamp(2.45rem, 5.4vw, 4.1rem);
}

.article-excerpt {
  max-width: 880px;
  margin-top: 1.35rem;
  color: #b8bdc8;
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.55;
}

.article-byline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.45rem;
  color: #bdc1ca;
  font-size: 13px;
}

.article-byline__avatar {
  display: grid;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(94, 227, 211, 0.45);
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(94, 227, 211, 0.28), rgba(255, 77, 69, 0.22));
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  place-items: center;
}

.article-cover {
  max-width: 1120px;
  margin-bottom: 2.9rem;
}

.article-cover__image {
  width: 100%;
  max-height: 570px;
  aspect-ratio: 16 / 8.5;
  border-radius: 10px;
  object-fit: cover;
}

.article-cover figcaption,
.blog-figure figcaption {
  margin-top: 0.65rem;
  color: var(--dim);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.article-body {
  width: min(var(--reading), calc(100% - (var(--gutter) * 2)));
  margin-inline: auto;
  color: #d1d5dc;
  font-size: 18px;
  line-height: 1.76;
}

.article-body::after {
  display: table;
  clear: both;
  content: "";
}

.article-body > :first-child {
  margin-top: 0;
}

.article-body p {
  margin: 0 0 1.35rem;
}

.article-body h2,
.article-body h3,
.article-body h4 {
  clear: both;
  scroll-margin-top: calc(var(--header-height) + 1.5rem);
}

.article-body h2 {
  margin: 2.2rem 0 0.8rem;
  font-size: clamp(1.55rem, 3vw, 2rem);
}

.article-body h3 {
  margin: 1.9rem 0 0.7rem;
  font-size: clamp(1.3rem, 2.4vw, 1.58rem);
}

.article-body h4 {
  margin: 1.65rem 0 0.6rem;
  font-size: 1.2rem;
}

.article-body a {
  color: var(--accent);
  text-decoration-color: rgba(94, 227, 211, 0.45);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.article-body a:hover,
.article-body a:focus-visible {
  text-decoration-color: var(--accent);
}

.article-body strong {
  color: var(--white);
  font-weight: 700;
}

.article-body code {
  padding: 0.12em 0.35em;
  border: 1px solid rgba(94, 227, 211, 0.18);
  border-radius: 5px;
  background: rgba(11, 13, 23, 0.7);
  color: var(--light);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.45rem;
  padding-left: 1.4rem;
}

.article-body li {
  margin: 0.28rem 0;
  padding-left: 0.25rem;
}

.article-body li::marker {
  color: var(--accent);
  font-weight: 700;
}

.article-body blockquote {
  margin: 1.8rem 0;
  padding: 0.15rem 0 0.15rem 1.45rem;
  border-left: 3px solid var(--accent);
  color: var(--light);
  font-size: 1.13em;
  font-style: italic;
}

.article-body blockquote p:last-child {
  margin-bottom: 0;
}

.article-body hr {
  clear: both;
  margin: 2.4rem 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
}

.blog-figure {
  margin: 2rem 0;
}

.blog-figure img {
  width: 100%;
  max-height: 680px;
  border-radius: 9px;
  object-fit: cover;
}

.blog-figure--wide {
  width: min(1060px, calc(100vw - (var(--gutter) * 2)));
  margin-left: 50%;
  transform: translateX(-50%);
}

.blog-figure--float-right {
  width: min(48%, 360px);
  margin: 0.4rem 0 1rem 1.75rem;
  float: right;
}

.article-tags {
  display: flex;
  width: min(var(--reading), calc(100% - (var(--gutter) * 2)));
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 2.5rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
}

.article-tags span {
  padding: 0.38rem 0.72rem;
  border: 1px solid rgba(94, 227, 211, 0.68);
  border-radius: 999px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
}

.preview-banner {
  position: sticky;
  z-index: 40;
  top: var(--header-height);
  padding: 0.55rem var(--gutter);
  border-bottom: 1px solid rgba(94, 227, 211, 0.35);
  background: #17242a;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.blog-error {
  display: flex;
  min-height: 620px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  padding-block: 5rem;
  text-align: center;
}

.blog-error__code {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.blog-error h1 {
  margin-top: 0.7rem;
  font-size: clamp(2.2rem, 5vw, 3.75rem);
}

.blog-error > p:not(.blog-error__code) {
  max-width: 520px;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 17px;
}

.blog-error .button {
  margin-top: 1.8rem;
}

/* Footer mirrors src/components/Footer.jsx: bg-kstudio-dark, border-t border-gray-800,
   section-padding (py-10 lg:py-16), 5-column grid, gray-400 links going accent on hover. */
/* section-padding = py-10 lg:py-16. */
.site-footer {
  margin-top: 0;
  padding: 4rem 0;
  border-top: 1px solid #1f2937;
  background: var(--deep);
}

.site-footer__inner,
.site-footer__badges,
.site-footer__legal {
  width: min(var(--container), 100%);
  padding-inline: var(--pad);
  margin-inline: auto;
}

/* Footer.jsx: lg:grid-cols-5 gap-8 lg:gap-12 lg:justify-items-center, with the
   brand block pinned left via lg:justify-self-start. */
.site-footer__inner {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  justify-items: center;
  gap: 3rem;
  margin-bottom: 3rem;
}

.site-footer__brand {
  justify-self: start;
}

.site-footer__brand .site-logo {
  margin-bottom: 1rem;
}

.site-footer__brand > p {
  max-width: 300px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.site-footer__social {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.site-footer__social a {
  display: inline-flex;
  color: var(--muted);
  transition: color 300ms ease;
}

.site-footer__title {
  margin: 0 0 1rem;
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
}

.site-footer__column ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a,
.site-footer span {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  transition: color 200ms ease;
}

.site-footer a:hover {
  color: var(--accent);
}

.site-footer__meeting {
  font-weight: 600;
}

.site-footer__badges {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid #1f2937;
}

.site-footer__badges p {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 14px;
}

.site-footer__flag {
  flex: 0 0 auto;
}

.site-footer__badge-icon {
  flex: 0 0 auto;
  color: var(--accent);
}

.site-footer__legal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid #1f2937;
}

.site-footer__legal > span {
  color: var(--dim);
}

.site-footer__legal > div {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer__legal a {
  color: var(--dim);
}

/* lg step. */
@media (max-width: 1279px) {
  .site-nav__links {
    gap: 1rem;
  }
}

@media (max-width: 1023px) {
  /* md step. Nine nav items plus the auth pair stop fitting before the mobile
     breakpoint, so the row also tightens its type rather than overflowing the bar. */
  .site-nav__links {
    gap: 0.75rem;
  }

  .site-nav__links > a,
  .site-nav__products-trigger {
    font-size: 15px;
  }

  .index-hero {
    grid-template-columns: 1fr;
    gap: 2rem;
    min-height: auto;
    padding-top: 4rem;
  }

  .index-hero__intro h1,
  .index-hero__intro > p {
    max-width: 720px;
  }

  .latest-section__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }

  .category-filters {
    width: 100%;
  }

  .insight-row {
    grid-template-columns: minmax(210px, 32vw) minmax(0, 1fr) 42px;
  }

  .blog-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  /* Footer.jsx: md:grid-cols-2 with the brand block spanning both, gap-8,
     and no justify-items-center below lg. */
  .site-footer {
    padding-block: 2.5rem;
  }

  .site-footer__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-items: start;
    gap: 2rem;
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }

  .site-footer__badges {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
  }
}

@media (max-width: 767px) {
  :root {
    /* Navbar.jsx is h-20 at every breakpoint — the blog no longer shrinks it. */
    --gutter: 1rem;
  }

  body {
    font-size: 15px;
  }

  .site-nav {
    gap: 0.75rem;
  }

  /* Navbar.jsx hides both the link row and the auth pair below md and moves
     everything into the hamburger panel. */
  .site-nav__links,
  .site-nav__auth {
    display: none;
  }

  .site-nav__mobile {
    position: relative;
    display: block;
  }

  /* Direct child only — a descendant selector here also captured the nested
     Products summary and squashed it to a 40x40 hamburger box. */
  .site-nav__mobile > summary {
    display: flex;
    width: 40px;
    height: 40px;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    border-radius: 7px;
    cursor: pointer;
    list-style: none;
  }

  .site-nav__mobile > summary::-webkit-details-marker {
    display: none;
  }

  .site-nav__mobile > summary span {
    display: block;
    width: 19px;
    height: 1px;
    background: var(--light);
  }

  .site-nav__mobile-panel {
    position: absolute;
    top: calc(100% + 0.7rem);
    right: 0;
    display: flex;
    width: min(260px, calc(100vw - 2rem));
    /* The full Navbar menu is a lot taller than the four links this panel used to
       carry: cap it to the viewport and scroll, otherwise the lower entries are
       unreachable on a short phone. Opaque for the same reason the site's menu is —
       at 0.98 the page ghosted through a now much larger surface. */
    max-height: calc(100vh - var(--header-height) - 1.5rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    flex-direction: column;
    padding: 0.6rem;
    border: 1px solid rgba(94, 227, 211, 0.2);
    border-radius: 10px;
    background: var(--deep);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.42);
  }

  /* `:not(.button)` is load-bearing. At (0,1,1) this rule outweighs `.button--accent`
     (0,1,0) and was repainting the Sign Up CTA white-on-mint (~1.5:1) with a 6px
     radius, while the :hover variant stripped its fill entirely. */
  .site-nav__mobile-panel a:not(.button) {
    padding: 0.7rem 0.85rem;
    border-radius: 6px;
    color: var(--white);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: color 200ms ease, background-color 200ms ease;
  }

  /* Accent tint rather than the site's bg-kstudio-dark: the panel itself is now
     kstudio-dark, so that highlight would be invisible here. */
  .site-nav__mobile-panel a:not(.button):hover,
  .site-nav__mobile-panel a:not(.button).is-active {
    background: rgba(94, 227, 211, 0.08);
    color: var(--accent);
  }

  /* Collapsible Products group, same as the mobile Navbar accordion. */
  .site-nav__mobile-products > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 0.85rem;
    border-radius: 6px;
    color: var(--white);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    list-style: none;
  }

  .site-nav__mobile-products > summary::-webkit-details-marker {
    display: none;
  }

  .site-nav__mobile-products[open] > summary .site-nav__chevron {
    transform: rotate(180deg);
  }

  .site-nav__mobile-products > div {
    display: flex;
    flex-direction: column;
    padding-left: 1rem;
  }

  .site-nav__mobile-products a {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 14px;
  }

  .site-nav__mobile-products a svg {
    flex: 0 0 auto;
    color: rgba(94, 227, 211, 0.7);
  }

  /* Navbar.jsx: pt-4 border-t border-white/20 mt-4 above the auth buttons. */
  .site-nav__mobile-auth {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
  }

  .site-nav__mobile-auth .button {
    width: 100%;
    min-height: 40px;
    font-size: 16px;
  }

  .index-hero {
    gap: 2rem;
    padding-block: 3rem 1.3rem;
  }

  .index-hero__intro h1 {
    font-size: 2.25rem;
  }

  .index-hero__intro > p {
    margin-top: 1rem;
    font-size: 16px;
  }

  .featured-story {
    grid-template-columns: 1fr;
    height: auto;
  }

  .featured-story__media {
    height: auto;
    min-height: 220px;
    aspect-ratio: 16 / 9;
  }

  .featured-story__content {
    padding: 1.45rem;
  }

  .latest-section {
    padding-top: 1rem;
  }

  .category-filters {
    margin-right: calc(var(--gutter) * -1);
    padding-right: var(--gutter);
  }

  .insight-row {
    grid-template-columns: 116px minmax(0, 1fr) 32px;
    height: 128px;
  }

  .insight-row__media {
    height: 128px;
  }

  .insight-row__content {
    padding: 0.7rem 0.8rem;
  }

  .insight-row h3 {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.95rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .insight-row__content > p:not(.story-category) {
    display: none;
  }

  .story-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }

  .story-meta [aria-hidden="true"] {
    display: none;
  }

  .blog-cta {
    margin-block: 2.4rem;
    padding: 1.5rem;
  }

  .blog-cta__actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .blog-cta__actions .button {
    width: 100%;
  }

  .article-header {
    padding-top: 2.7rem;
    padding-bottom: 1.7rem;
  }

  .article-header h1 {
    font-size: 2.25rem;
  }

  .article-cover {
    width: calc(100% - 2rem);
    margin-bottom: 2rem;
  }

  .article-cover__image {
    aspect-ratio: 16 / 10;
  }

  .article-body {
    width: calc(100% - 2rem);
    font-size: 16.5px;
    line-height: 1.68;
  }

  .blog-figure--wide {
    width: calc(100vw - 2rem);
  }

  .blog-figure--float-right {
    width: 100%;
    margin: 1.6rem 0;
    float: none;
  }

  .article-tags {
    width: calc(100% - 2rem);
  }

  .site-footer {
    padding-top: 2.8rem;
  }

  .site-footer__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }

  .site-footer__legal {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 430px) {
  .insight-row {
    grid-template-columns: 96px minmax(0, 1fr) 28px;
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
  }

  .site-footer__brand {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .blog-cta,
  .preview-banner {
    display: none;
  }

  body {
    background: #fff;
    color: #111;
  }

  .blog-article {
    padding-top: 0;
  }

  .article-body,
  h1,
  h2,
  h3,
  h4,
  .article-header h1 {
    color: #111;
  }
}
