/* Augmax shared site layer: navigation, mobile menu, consent, modals,
   search, newsletter, loading states and page chrome.
   Loaded last so it can refine the existing visual language. */

:root {
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #eaf1ff;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --radius: 7px;
  --shell: 1280px;
}

/* ---------------------------------------------------------------- Skip link */

.visually-hidden {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translate(-50%, -140%);
  z-index: 200;
  background: var(--brand);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 8px 8px;
  font-size: 14px;
  font-weight: 600;
  transition: transform .25s var(--ease);
}

.skip-link:focus-visible {
  transform: translate(-50%, 0);
  outline-offset: 3px;
}

/* ------------------------------------------------------------ Page progress */

.route-progress {
  position: fixed;
  inset: 0 auto auto 0;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, #2563eb, #6366f1 60%, #92afff);
  z-index: 120;
  opacity: 0;
  pointer-events: none;
}

.route-progress.is-active {
  opacity: 1;
  animation: route-progress 1.4s var(--ease) forwards;
}

.route-progress.is-done {
  opacity: 0;
  transform: scaleX(1);
  transition: opacity .4s ease .1s;
  animation: none;
}

@keyframes route-progress {
  0% { transform: scaleX(0); }
  55% { transform: scaleX(.65); }
  100% { transform: scaleX(.92); }
}

/* ------------------------------------------------------------ Header layout */

.nav {
  gap: 22px;
  transition: box-shadow .3s var(--ease), background .3s var(--ease);
}

.nav.is-stuck {
  box-shadow: 0 1px 0 #dfe5ef, 0 10px 30px #12192b0a;
  background: #ffffffec;
}

.nav .logo {
  position: relative;
  flex-shrink: 0;
}

.nav-primary {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-primary a {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: #2b3448;
  white-space: nowrap;
  transition: color .25s var(--ease), background .25s var(--ease);
}

.nav-primary a::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 0 50%;
  opacity: .55;
  transition: transform .35s var(--ease);
}

.nav-primary a:hover,
.nav-primary a:focus-visible {
  color: var(--brand-dark);
  background: #f2f6ff;
}

.nav-primary a:hover::after,
.nav-primary a:focus-visible::after {
  transform: scaleX(1);
}

.nav-primary a[aria-current='page'] {
  color: var(--brand-dark);
}

.nav-primary a[aria-current='page']::after {
  transform: scaleX(1);
  opacity: 1;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Icon buttons (search + menu) */

.icon-button {
  display: inline-grid;
  place-items: center;
  height: 40px;
  width: 40px;
  border: 1px solid #dfe5ef;
  border-radius: var(--radius);
  background: #fff;
  color: #2b3448;
  padding: 0;
  transition: border-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease), background .25s var(--ease);
}

.icon-button:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
  background: var(--brand-soft);
  transform: translateY(-2px);
}

.icon-button svg {
  height: 19px;
  width: 19px;
}

.nav-toggle {
  display: none;
}

.nav-toggle .bars {
  position: relative;
  display: block;
  height: 10px;
  width: 19px;
}

.nav-toggle .bars::before,
.nav-toggle .bars::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 1.6px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .34s var(--ease), top .2s var(--ease);
}

.nav-toggle .bars::before { top: 0; }
.nav-toggle .bars::after { top: 8px; }

.nav-toggle[aria-expanded='true'] .bars::before {
  top: 4px;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded='true'] .bars::after {
  top: 4px;
  transform: rotate(-45deg);
}

/* --------------------------------------------------------------- Mobile nav */

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: #fff;
  visibility: hidden;
  opacity: 0;
  transition: opacity .3s var(--ease), visibility .3s var(--ease);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: env(safe-area-inset-bottom);
}

.mobile-nav.is-open {
  visibility: visible;
  opacity: 1;
}

.mobile-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 6%;
  border-bottom: 1px solid #edf0f7;
  min-height: 74px;
}

.mobile-nav-body {
  padding: 26px 6% 10px;
}

.mobile-nav-body h2 {
  font-size: 11px;
  letter-spacing: .14em;
  font-weight: 600;
  color: #7c869b;
  margin: 0 0 14px;
}

.mobile-nav-body h2 + .mobile-links {
  margin-bottom: 32px;
}

.mobile-links {
  display: grid;
  gap: 2px;
}

.mobile-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 4px;
  border-bottom: 1px solid #f0f3f9;
  font-family: Manrope, sans-serif;
  font-size: 25px;
  letter-spacing: -.04em;
  color: #12192b;
  opacity: 0;
  transform: translateY(14px);
}

.mobile-links a span {
  font-size: 15px;
  color: #93a0b8;
  transition: transform .3s var(--ease), color .3s var(--ease);
}

.mobile-links a:active span,
.mobile-links a:hover span {
  color: var(--brand);
  transform: translateX(4px);
}

.mobile-links a small {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  letter-spacing: 0;
  color: #68738a;
  margin-top: 3px;
}

.mobile-nav.is-open .mobile-links a {
  animation: menu-in .45s var(--ease) forwards;
}

.mobile-nav.is-open .mobile-links a:nth-child(2) { animation-delay: .04s; }
.mobile-nav.is-open .mobile-links a:nth-child(3) { animation-delay: .08s; }
.mobile-nav.is-open .mobile-links a:nth-child(4) { animation-delay: .12s; }
.mobile-nav.is-open .mobile-links a:nth-child(5) { animation-delay: .16s; }
.mobile-nav.is-open .mobile-links a:nth-child(6) { animation-delay: .2s; }

@keyframes menu-in {
  to { opacity: 1; transform: none; }
}

.mobile-nav-foot {
  padding: 22px 6% 30px;
  border-top: 1px solid #edf0f7;
  background: #f7f9fd;
  display: grid;
  gap: 14px;
}

.mobile-nav-foot .button {
  width: 100%;
  justify-content: space-between;
}

.mobile-nav-foot p {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
}

/* ------------------------------------------------------------- Page headers */

.page-hero {
  margin: 16px 20px 0;
  padding: 92px 6.5% 76px;
  border-radius: 18px;
  background: #070d20 radial-gradient(ellipse at 88% 15%, #182365 0%, #0b1433 42%, #070d20 76%);
  border: 1px solid #213563;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  inset: auto -10% -60% 40%;
  height: 360px;
  background: radial-gradient(ellipse at center, #2563eb33, transparent 65%);
  pointer-events: none;
}

.page-hero > * {
  position: relative;
  z-index: 1;
}

.page-hero .eyebrow {
  display: block;
  color: #9db9fa;
  letter-spacing: .18em;
  font-size: 11px;
  margin-bottom: 26px;
}

.page-hero h1 {
  font-family: Manrope, sans-serif;
  font-size: clamp(40px, 5vw, 74px);
  line-height: 1.05;
  letter-spacing: -.06em;
  font-weight: 500;
  color: #fff;
  margin: 0 0 24px;
  max-width: 17ch;
}

.page-hero h1 span {
  color: #92afff;
}

.page-hero > p {
  font-size: 19px;
  line-height: 1.65;
  color: #b8c6e3;
  max-width: 62ch;
  margin: 0;
}

.page-hero .hero-actions {
  margin-top: 34px;
}

.page-hero .hero-actions .primary {
  background: #356ef3;
  border: 1px solid #6894ff;
  color: #fff;
  border-radius: var(--radius);
}

.page-hero .hero-actions .primary:hover {
  background: #4b7ff5;
}

.page-hero .hero-actions .hero-secondary {
  background: #ffffff0f;
  border-color: #7285b74d;
  color: #e0e9ff;
  border-radius: var(--radius);
}

/* Breadcrumbs */

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  font-size: 12px;
  letter-spacing: .04em;
  color: #8ea3c9;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumbs li + li::before {
  content: '/';
  color: #46567c;
}

.breadcrumbs a:hover {
  color: #cddcff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.breadcrumbs [aria-current='page'] {
  color: #dce7ff;
}

/* ----------------------------------------------------- Shared content prose */

.prose {
  max-width: 76ch;
}

.prose.wide {
  max-width: none;
}

.prose h2 {
  font-size: clamp(28px, 2.6vw, 38px);
  margin: 54px 0 18px;
}

.prose h3 {
  font-size: 23px;
  margin: 34px 0 12px;
}

.prose > :first-child {
  margin-top: 0;
}

.prose p,
.prose li {
  font-size: 17px;
  line-height: 1.8;
  color: #4c566e;
}

.prose ul,
.prose ol {
  padding-left: 22px;
  margin: 0 0 22px;
}

.prose li {
  margin-bottom: 10px;
}

.prose a:not(.button) {
  color: var(--brand-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.prose a:not(.button):hover {
  color: #12192b;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 26px;
  font-size: 15px;
}

.prose th,
.prose td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid #e4eaf6;
  vertical-align: top;
}

.prose th {
  font-weight: 600;
  background: #f5f8fe;
  color: #12192b;
}

.prose td {
  color: #4c566e;
}

.prose th[scope='row'] {
  white-space: nowrap;
}

/* Wide tables stay readable on small screens without losing table semantics. */
.table-scroll {
  overflow-x: auto;
  margin: 0 0 26px;
  -webkit-overflow-scrolling: touch;
}

.table-scroll table {
  margin-bottom: 0;
  min-width: 620px;
}

.last-updated {
  font-size: 13px;
  color: #68738a;
  margin: 0 0 34px;
}

/* ------------------------------------------------------------- Article page */

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 28px;
  font-size: 13.5px;
  color: #a4b6d8;
}

.article-meta .dot {
  color: #46567c;
}

.article-body {
  padding: 70px 6% 20px;
  max-width: calc(76ch + 12%);
  margin: 0 auto;
}

.article-body .prose > p:first-of-type {
  font-size: 20px;
  line-height: 1.7;
  color: #2b3448;
}

.article-body blockquote {
  margin: 32px 0;
  padding: 4px 0 4px 24px;
  border-left: 3px solid var(--brand);
  font-family: Manrope, sans-serif;
  font-size: 22px;
  line-height: 1.45;
  letter-spacing: -.035em;
  color: #12192b;
}

.article-body blockquote p {
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  margin: 0;
}

.article-foot {
  max-width: 76ch;
  margin: 50px auto 0;
  padding-top: 30px;
  border-top: 1px solid #e8edf8;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.article-foot p {
  margin: 0;
  font-size: 15px;
}

.article-foot .button {
  margin-left: auto;
}

@media (max-width: 700px) {
  .article-body {
    padding: 44px 7% 10px;
  }

  .article-body .prose > p:first-of-type {
    font-size: 18px;
  }

  .article-foot .button {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
  }
}

/* --------------------------------------------------------------- Card grids */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.blog-category {
  padding: 34px 0 0;
  margin-top: 38px;
  border-top: 1px solid #e4eaf4;
}

.blog-category:first-child {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
}

.blog-category-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.blog-category-head h2 {
  margin: 0;
  font-size: 25px;
}

.blog-category-head p {
  max-width: 48ch;
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

.article-evidence-line {
  display: block;
  color: #8792a5;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  margin-top: 5px;
}

.article-section {
  margin-top: 42px;
}

.article-section h2 {
  margin-top: 0;
  margin-bottom: 16px;
}

.article-diagram {
  margin: 38px 0 44px;
  border: 1px solid #dce4f2;
  border-radius: 12px;
  background: #f7f9fd;
  padding: 24px;
}

.diagram-heading {
  margin-bottom: 22px;
}

.diagram-kicker {
  display: block;
  margin-bottom: 8px;
  color: #5271a3;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .13em;
}

.diagram-heading h2 {
  margin: 0;
  color: #172341;
  font-family: Manrope, sans-serif;
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -.035em;
  line-height: 1.3;
}

.diagram-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.diagram-node {
  position: relative;
  min-width: 0;
  min-height: 120px;
  padding: 15px 16px;
  border: 1px solid #dce4f2;
  border-radius: 8px;
  background: #fff;
}

.diagram-node-no {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  margin-bottom: 14px;
  border-radius: 7px;
  background: #eaf1ff;
  color: #2458bd;
  font-size: 10px;
  font-weight: 700;
}

.diagram-node strong {
  display: block;
  margin-bottom: 5px;
  color: #172341;
  font-size: 14px;
  font-weight: 600;
}

.diagram-node > span:last-child {
  display: block;
  color: #68738a;
  font-size: 12.5px;
  line-height: 1.5;
}

.article-diagram figcaption {
  margin-top: 14px;
  color: #68738a;
  font-size: 12px;
  line-height: 1.6;
}

.source-note {
  margin: 42px 0 0;
  padding: 22px 24px;
  border-left: 3px solid #2563eb;
  background: #f4f7fc;
}

.source-note-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.source-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #eaf1ff;
  color: #2563eb;
}

.source-mark svg {
  width: 16px;
  height: 16px;
}

.source-note h2 {
  margin: 0;
  color: #172341;
  font-family: Manrope, sans-serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.02em;
}

.source-note > p {
  margin: 0 0 12px;
  color: #56627a;
  font-size: 13px;
  line-height: 1.7;
}

.source-note ul {
  list-style: none;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.source-note li {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: baseline;
  font-size: 13px;
}

.source-note li a {
  color: #1d4ed8;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.source-note li span {
  color: #78849a;
  font-size: 11px;
}

.related-reading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 30px;
  border-top: 1px solid #e4eaf4;
}

.related-reading .section-intro {
  margin: 0;
}

.related-reading .section-intro h2 {
  font-size: 31px;
}

.related-reading > .button {
  flex: 0 0 auto;
}

.card {
  display: flex;
  flex-direction: column;
  border: 1px solid #dce4f2;
  border-radius: 12px;
  background: #fbfcff;
  padding: 30px 28px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}

a.card:hover,
.card:hover {
  transform: translateY(-4px);
  border-color: #c3d4f5;
  box-shadow: 0 18px 45px #142d650f;
}

.card .card-label {
  display: block;
  font-size: 11px;
  letter-spacing: .13em;
  font-weight: 600;
  color: #5271a3;
  margin-bottom: 20px;
}

.card h3 {
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -.035em;
  margin-bottom: 12px;
}

.card p {
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 0;
}

.card .card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e8edf8;
  font-size: 12px;
  color: #68738a;
}

.card .card-more {
  margin-top: auto;
  padding-top: 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-dark);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.card .card-more svg {
  height: 14px;
  width: 14px;
  transition: transform .3s var(--ease);
}

.card:hover .card-more svg {
  transform: translate(3px, -3px);
}

/* --------------------------------------------------------------- Newsletter */

.newsletter {
  margin: 0 20px;
  border-radius: 18px;
  background: radial-gradient(ellipse at 0% 0%, #e3eaff, transparent 60%), #f1f5fc;
  border: 1px solid #e4eaf6;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6%;
  align-items: center;
}

.newsletter-copy h2 {
  font-size: clamp(32px, 3.2vw, 46px);
  margin-bottom: 16px;
}

.newsletter-copy p {
  font-size: 17px;
  line-height: 1.7;
  max-width: 46ch;
  margin-bottom: 0;
}

.newsletter-form {
  display: grid;
  gap: 14px;
  background: #fff;
  border: 1px solid #e4eaf6;
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 18px 50px #142d650a;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  color: #2b3448;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #d5dded;
  border-radius: var(--radius);
  background: #fff;
  padding: 13px 15px;
  font-size: 15px;
  color: #12192b;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}

.field input::placeholder,
.field textarea::placeholder {
  color: #9aa5ba;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px #2563eb26;
}

.field input[aria-invalid='true'],
.field textarea[aria-invalid='true'] {
  border-color: #d3413f;
  box-shadow: 0 0 0 3px #d3413f1f;
}

.field-error {
  font-size: 12.5px;
  color: #b3312f;
  min-height: 0;
}

.field-error:empty {
  display: none;
}

.consent-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  line-height: 1.6;
  color: #68738a;
}

.consent-line input {
  margin-top: 3px;
  height: 16px;
  width: 16px;
  accent-color: var(--brand);
  flex-shrink: 0;
}

.consent-line a {
  color: var(--brand-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.newsletter-form .button {
  width: 100%;
  justify-content: center;
  gap: 12px;
}

/* Button loading state */

.button[data-loading='true'] {
  pointer-events: none;
  opacity: .82;
}

.button[data-loading='true'] .button-label {
  opacity: .75;
}

.spinner {
  display: none;
  height: 15px;
  width: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}

.button[data-loading='true'] .spinner {
  display: block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------- Site footer */

.site-footer {
  border-top: 1px solid #e4eaf6;
  padding: 64px 6% 40px;
  display: block;
  background: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
  max-width: var(--shell);
  margin: 0 auto;
}

.footer-brand .logo {
  display: inline-block;
  font-size: 33px;
  color: #17264b;
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 15px;
  line-height: 1.7;
  max-width: 34ch;
  margin-bottom: 18px;
}

.footer-brand .contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: #4c566e;
}

.footer-brand .contact-list a:hover {
  color: var(--brand-dark);
}

.footer-col h2 {
  font-size: 11px;
  letter-spacing: .14em;
  font-weight: 600;
  color: #7c869b;
  margin: 6px 0 16px;
  font-family: 'DM Sans', sans-serif;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 11px;
  font-size: 14.5px;
}

.footer-col a,
.footer-col .link-button {
  color: #4c566e;
  transition: color .2s var(--ease), padding-left .25s var(--ease);
}

.footer-col a:hover,
.footer-col .link-button:hover {
  color: var(--brand-dark);
  padding-left: 4px;
}

.link-button {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.footer-base {
  max-width: var(--shell);
  margin: 46px auto 0;
  padding-top: 26px;
  border-top: 1px solid #eef1f8;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 26px;
  font-size: 12.5px;
  color: #77808f;
}

.footer-base p {
  margin: 0;
  font-size: inherit;
}

.footer-base nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-left: auto;
}

.footer-base a:hover,
.footer-base .link-button:hover {
  color: var(--brand-dark);
}

/* --------------------------------------------------------- Scroll reveal */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  will-change: opacity, transform;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

[data-reveal-group] > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .65s var(--ease), transform .65s var(--ease);
}

[data-reveal-group].is-visible > * {
  opacity: 1;
  transform: none;
}

[data-reveal-group].is-visible > :nth-child(2) { transition-delay: .09s; }
[data-reveal-group].is-visible > :nth-child(3) { transition-delay: .18s; }
[data-reveal-group].is-visible > :nth-child(4) { transition-delay: .27s; }
[data-reveal-group].is-visible > :nth-child(5) { transition-delay: .36s; }

/* Skeleton shimmer for async content */

.skeleton {
  position: relative;
  overflow: hidden;
  background: #e8edf7;
  border-radius: 6px;
  min-height: 12px;
}

.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, #ffffffc4, transparent);
  animation: shimmer 1.3s infinite;
}

@keyframes shimmer {
  to { transform: translateX(100%); }
}

/* ------------------------------------------------------------ Cookie banner */

.cookie-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 130;
  max-width: 560px;
  background: #fff;
  border: 1px solid #dce4f2;
  border-radius: 14px;
  box-shadow: 0 24px 70px #0b143026;
  padding: 26px 28px;
  transform: translateY(140%);
  opacity: 0;
  visibility: hidden;
  transition: transform .5s var(--ease), opacity .4s var(--ease), visibility .4s var(--ease);
  padding-bottom: max(26px, env(safe-area-inset-bottom));
}

.cookie-banner.is-open {
  transform: none;
  opacity: 1;
  visibility: visible;
}

.cookie-banner h2 {
  font-family: Manrope, sans-serif;
  font-size: 21px;
  letter-spacing: -.035em;
  margin: 0 0 10px;
}

.cookie-banner p {
  font-size: 14px;
  line-height: 1.65;
  margin: 0 0 20px;
}

.cookie-banner p a {
  color: var(--brand-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cookie-actions .button {
  flex: 1 1 150px;
  justify-content: center;
  gap: 0;
  padding: 13px 18px;
  font-size: 14px;
}

.cookie-actions .button.ghost {
  flex: 1 1 100%;
  border-color: transparent;
  background: transparent;
  color: #4c566e;
  text-decoration: underline;
  text-underline-offset: 4px;
  padding: 6px;
  font-weight: 500;
  font-size: 13px;
}

.cookie-actions .button.ghost:hover {
  color: var(--brand-dark);
  transform: none;
}

.cookie-actions .button.secondary {
  background: #fff;
  border-color: #cbd5e8;
  color: #12192b;
}

.cookie-actions .button.secondary:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

/* Consent preference groups (inside dialog) */

.consent-groups {
  display: grid;
  gap: 12px;
  margin: 22px 0 26px;
}

.consent-group {
  border: 1px solid #e0e6f3;
  border-radius: 10px;
  padding: 18px 20px;
  background: #fbfcff;
}

.consent-group-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.consent-group-top strong {
  font-size: 15.5px;
  font-weight: 600;
}

.consent-group p {
  font-size: 13.5px;
  line-height: 1.65;
  margin: 8px 0 0;
}

.switch {
  position: relative;
  flex-shrink: 0;
  height: 26px;
  width: 46px;
}

.switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}

.switch .track {
  position: absolute;
  inset: 0;
  border-radius: 30px;
  background: #cdd5e6;
  transition: background .25s var(--ease);
  pointer-events: none;
}

.switch .track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px #0b143038;
  transition: transform .25s var(--ease);
}

.switch input:checked + .track {
  background: var(--brand);
}

.switch input:checked + .track::after {
  transform: translateX(20px);
}

.switch input:disabled + .track {
  background: #9fb6e6;
  opacity: .65;
  cursor: default;
}

.switch input:focus-visible + .track {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}

/* ---------------------------------------------------------------- Dialogs */

.modal {
  width: min(560px, calc(100vw - 32px));
  max-height: min(88dvh, 780px);
  padding: 0;
  border: 1px solid #dce4f2;
  border-radius: 16px;
  background: #fff;
  color: #12192b;
  box-shadow: 0 40px 100px #0b143033;
  overflow: hidden;
}

.modal::backdrop {
  background: #0b1430b0;
  backdrop-filter: blur(10px);
  animation: fade-in .3s var(--ease);
}

.modal[open] {
  animation: modal-in .34s var(--ease);
  display: flex;
  flex-direction: column;
}

.modal form {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to { opacity: 1; transform: none; }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 28px 0;
}

.modal-head h2 {
  font-family: Manrope, sans-serif;
  font-size: 25px;
  letter-spacing: -.04em;
  margin: 0;
}

.modal-close {
  border: 1px solid #e0e6f3;
  background: #fff;
  border-radius: 8px;
  height: 34px;
  width: 34px;
  display: grid;
  place-items: center;
  font-size: 15px;
  color: #68738a;
  flex-shrink: 0;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}

.modal-close:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
}

.modal-body {
  padding: 16px 28px 0;
  overflow-y: auto;
  min-height: 0;
  flex: 1 1 auto;
}

.modal-body .field {
  margin-top: 16px;
}

.modal-body textarea {
  min-height: 84px;
}

.modal-body p {
  font-size: 15px;
  line-height: 1.7;
}

.modal-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 22px 28px 26px;
}

.modal-foot .button {
  flex: 1 1 140px;
  justify-content: center;
  gap: 0;
  font-size: 14px;
  padding: 13px 18px;
}

.modal-foot .button.secondary {
  background: #fff;
  border-color: #cbd5e8;
  color: #12192b;
}

.modal-foot .button.secondary:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

/* Success state inside modals */

.modal-status {
  display: grid;
  place-items: center;
  gap: 4px;
  text-align: center;
  padding: 10px 0 4px;
}

.status-mark {
  height: 56px;
  width: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand-dark);
  margin-bottom: 12px;
}

.status-mark svg {
  height: 26px;
  width: 26px;
}

.status-mark svg path {
  stroke-dasharray: 32;
  stroke-dashoffset: 32;
  animation: draw-check .5s var(--ease) .12s forwards;
}

@keyframes draw-check {
  to { stroke-dashoffset: 0; }
}

/* ----------------------------------------------------------------- Search */

.search-dialog {
  width: min(660px, calc(100vw - 24px));
  max-height: 82dvh;
  margin-top: 9vh;
  padding: 0;
  border: 1px solid #dce4f2;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 40px 110px #0b143033;
  overflow: hidden;
}

.search-dialog::backdrop {
  background: #0b1430ab;
  backdrop-filter: blur(10px);
}

.search-dialog[open] {
  animation: modal-in .3s var(--ease);
}

.search-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #eaeef7;
}

.search-input-row svg {
  height: 19px;
  width: 19px;
  color: #8792a8;
  flex-shrink: 0;
}

.search-input-row input {
  flex: 1;
  border: 0;
  outline: none;
  font-size: 17px;
  background: transparent;
  color: #12192b;
  min-width: 0;
}

.search-input-row kbd {
  font-family: inherit;
  font-size: 11px;
  border: 1px solid #dfe5ef;
  border-radius: 5px;
  padding: 4px 7px;
  color: #77808f;
  background: #f7f9fd;
}

.search-results {
  overflow-y: auto;
  max-height: 58dvh;
  padding: 8px;
  overscroll-behavior: contain;
}

.search-hit {
  display: block;
  padding: 13px 14px;
  border-radius: 9px;
  transition: background .18s var(--ease);
}

.search-hit:hover,
.search-hit.is-active {
  background: #f2f6ff;
}

.search-hit .hit-kind {
  display: block;
  font-size: 10.5px;
  letter-spacing: .12em;
  font-weight: 600;
  color: #5271a3;
  margin-bottom: 5px;
}

.search-hit h3 {
  font-size: 16.5px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  letter-spacing: -.01em;
  margin: 0 0 4px;
}

.search-hit p {
  font-size: 13.5px;
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-hit mark {
  background: #dbeafe;
  color: inherit;
  border-radius: 3px;
  padding: 0 2px;
}

.search-empty {
  padding: 40px 20px;
  text-align: center;
  font-size: 14.5px;
  color: #68738a;
}

.search-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  border-top: 1px solid #eaeef7;
  background: #fafbfe;
  font-size: 12px;
  color: #77808f;
}

.search-foot span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.search-foot .search-all {
  margin-left: auto;
  color: var(--brand-dark);
  font-weight: 600;
}

/* Full search page */

.search-page-form {
  display: flex;
  gap: 10px;
  max-width: 620px;
  margin-bottom: 14px;
}

.search-page-form input {
  flex: 1;
  border: 1px solid #d5dded;
  border-radius: var(--radius);
  padding: 15px 17px;
  font-size: 16px;
  min-width: 0;
}

.search-page-form input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px #2563eb26;
}

.search-page-form .button {
  flex-shrink: 0;
  gap: 10px;
}

.search-summary {
  font-size: 14px;
  color: #68738a;
  margin: 0 0 30px;
}

.search-list {
  display: grid;
  gap: 4px;
  max-width: 820px;
}

.search-list .search-hit {
  border-bottom: 1px solid #eef1f8;
  border-radius: 0;
  padding: 22px 14px 22px 0;
}

.search-list .search-hit h3 {
  font-family: Manrope, sans-serif;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -.035em;
  margin-bottom: 7px;
}

.search-list .search-hit p {
  font-size: 15px;
  -webkit-line-clamp: 3;
}

.search-list .search-hit .hit-url {
  display: block;
  font-size: 12.5px;
  color: #5a8ae0;
  margin-top: 8px;
}

/* ------------------------------------------------------------- 404 page */

.error-page {
  min-height: calc(100dvh - 300px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 90px 6%;
}

.error-inner {
  max-width: 620px;
}

.error-code {
  font-family: Manrope, sans-serif;
  font-size: clamp(88px, 16vw, 168px);
  font-weight: 500;
  letter-spacing: -.08em;
  line-height: 1;
  margin: 0 0 6px;
  background: linear-gradient(100deg, #2563eb, #6366f1 55%, #92afff);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.error-page h1 {
  font-family: Manrope, sans-serif;
  font-size: clamp(30px, 3.4vw, 44px);
  letter-spacing: -.05em;
  font-weight: 500;
  margin: 0 0 16px;
}

.error-page > .error-inner > p {
  font-size: 17.5px;
  line-height: 1.7;
  margin: 0 auto 30px;
  max-width: 48ch;
}

.error-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 46px;
}

.error-links {
  border-top: 1px solid #e8edf8;
  padding-top: 26px;
}

.error-links h2 {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  letter-spacing: .14em;
  font-weight: 600;
  color: #7c869b;
  margin: 0 0 16px;
}

.error-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.error-links a {
  display: inline-block;
  border: 1px solid #dfe5ef;
  border-radius: 30px;
  padding: 9px 17px;
  font-size: 14px;
  transition: border-color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease);
}

.error-links a:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-dark);
  transform: translateY(-2px);
}

/* --------------------------------------------------------- Section helpers */

.section-intro {
  max-width: 62ch;
  margin-bottom: 44px;
}

.section-intro h2 {
  margin-bottom: 16px;
}

.section-intro p {
  font-size: 18px;
  line-height: 1.7;
  margin: 0;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
}

.tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid #dfe5ef;
  border-radius: 30px;
  padding: 7px 14px;
  font-size: 13px;
  color: #4c566e;
  background: #fff;
  transition: border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}

.tag:hover,
.tag[aria-pressed='true'],
.tag.is-active {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.callout {
  border: 1px solid #cbdaf2;
  border-left: 3px solid var(--brand);
  border-radius: 10px;
  background: #f4f8ff;
  padding: 22px 24px;
  margin: 30px 0;
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout strong {
  color: #12192b;
}

/* --------------------------------------------------------------- Responsive */

@media (min-width: 1500px) {
  .page-hero {
    padding-left: max(6.5%, calc((100vw - 1280px) / 2));
    padding-right: max(6.5%, calc((100vw - 1280px) / 2));
  }
}

@media (max-width: 1100px) {
  .nav-primary a {
    padding: 9px 10px;
    font-size: 13px;
  }
}

@media (max-width: 940px) {
  .nav-primary {
    display: none;
  }

  .nav-toggle {
    display: inline-grid;
  }

  .nav-actions .button {
    display: none;
  }

  .newsletter {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .page-hero {
    margin: 9px 9px 0;
    border-radius: 13px;
    padding: 58px 7% 52px;
  }

  .page-hero h1 {
    font-size: clamp(34px, 9vw, 52px);
  }

  .page-hero > p {
    font-size: 17px;
  }

  .newsletter {
    margin: 0 9px;
    border-radius: 13px;
  }

  .newsletter-form {
    padding: 22px;
  }

  .cookie-banner {
    left: 9px;
    right: 9px;
    bottom: 9px;
    padding: 22px 20px;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }

  .cookie-actions .button {
    flex: 1 1 100%;
  }

  .modal-foot .button {
    flex: 1 1 100%;
  }

  .search-dialog {
    margin-top: 0;
    width: 100vw;
    max-width: 100vw;
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
    border: 0;
  }

  .search-results {
    max-height: calc(100dvh - 130px);
  }

  .search-foot span {
    display: none;
  }

  .search-foot .search-all {
    margin: 0 auto;
  }

  .search-page-form {
    flex-wrap: wrap;
  }

  .search-page-form .button {
    width: 100%;
    justify-content: center;
  }

  .site-footer {
    padding: 46px 6% 34px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-base nav {
    margin-left: 0;
    gap: 14px;
  }

  .prose p,
  .prose li {
    font-size: 16px;
  }

  .card {
    padding: 26px 24px;
  }

  .blog-category-head {
    display: block;
  }

  .blog-category-head p {
    margin-top: 7px;
  }

  .article-diagram {
    padding: 18px;
  }

  .diagram-steps {
    grid-template-columns: 1fr;
  }

  .diagram-node {
    min-height: 0;
  }

  .related-reading {
    display: block;
  }

  .related-reading > .button {
    margin-top: 22px;
  }
}

/* Larger tap targets on touch devices */

@media (hover: none) and (pointer: coarse) {
  .mobile-links a,
  .icon-button,
  .button {
    min-height: 44px;
  }

  .card:hover,
  a.card:hover,
  .button:hover,
  .icon-button:hover {
    transform: none;
  }
}

/* Installed PWA display tweaks */

@media (display-mode: standalone) {
  .nav {
    padding-top: env(safe-area-inset-top);
    height: calc(82px + env(safe-area-inset-top));
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  [data-reveal-group] > * {
    opacity: 1 !important;
    transform: none !important;
  }

  .route-progress {
    display: none;
  }
}

/* Private AI product view */

.private-ai-scene {
  scroll-margin-top: 98px;
  margin: 0;
  padding: 76px 6.5% 42px;
  color: #12192b;
  background: #fff;
}

.private-ai-scene-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  max-width: 1160px;
  margin: 0 auto 40px;
}

.private-ai-scene-head .section-label {
  color: #5271a3;
  margin-bottom: 18px;
}

.private-ai-scene-head h2 {
  color: #172341;
  font-family: Manrope, sans-serif;
  font-size: clamp(31px, 3.2vw, 46px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.05em;
  margin: 0;
}

.private-ai-scene-head h2 span {
  color: #2563eb;
}

.private-ai-scene-head > p {
  max-width: 39ch;
  color: #68738a;
  font-size: 14px;
  line-height: 1.7;
  margin: 0 0 3px;
}

.private-ai-flow {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) 38px minmax(0, 690px) 38px minmax(110px, 1fr);
  align-items: center;
  max-width: 1220px;
  margin: 0 auto;
}

.flow-endpoint {
  min-width: 0;
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 8px 6px;
}

.flow-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
  color: #2563eb;
  background: #eff5ff;
  border: 1px solid #d7e3f8;
  border-radius: 13px;
}

.flow-icon svg {
  width: 23px;
  height: 23px;
}

.flow-kicker {
  color: #5271a3;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .14em;
  margin-bottom: 7px;
}

.flow-endpoint strong {
  max-width: 16ch;
  color: #172341;
  font-family: Manrope, sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
}

.flow-detail {
  color: #68738a;
  font-size: 10px;
  line-height: 1.5;
  margin-top: 6px;
}

.flow-connector {
  --flow-distance: 33px;
  position: relative;
  height: 1px;
  background: linear-gradient(90deg, #d7dfed, #6d91e2);
}

.flow-connector::after {
  content: '';
  position: absolute;
  right: -1px;
  top: -3px;
  width: 6px;
  height: 6px;
  border-top: 1px solid #2563eb;
  border-right: 1px solid #2563eb;
  transform: rotate(45deg);
}

.flow-connector span {
  position: absolute;
  top: -2px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 10px #2563eb70;
  animation: flow-pulse 2.8s ease-in-out infinite;
}

.flow-connector-reverse span {
  animation-direction: reverse;
  animation-delay: .8s;
}

@keyframes flow-pulse {
  0% { transform: translateX(0); opacity: 0; }
  14% { opacity: 1; }
  82% { opacity: 1; }
  100% { transform: translateX(var(--flow-distance)); opacity: 0; }
}

.workspace-window {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d9e1ed;
  border-radius: 12px;
  background: #fff;
  color: #17213a;
  box-shadow: 0 18px 46px #172b4d14;
}

.workspace-window-top {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 14px;
  border-bottom: 1px solid #e5eaf2;
  background: #fbfcfe;
}

.window-controls {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.window-controls i {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #cbd3e0;
}

.window-title {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #273653;
  font-size: 11px;
  font-weight: 600;
}

.window-lock {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  color: #2563eb;
  border-radius: 5px;
  background: #eaf1ff;
}

.window-lock svg {
  width: 12px;
  height: 12px;
}

.window-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: #77849b;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .1em;
  white-space: nowrap;
}

.window-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #43a77c;
}

.workspace-window-body {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  min-height: 280px;
}

.workspace-rail {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 15px 10px;
  background: #f7f9fc;
  border-right: 1px solid #e8edf4;
}

.rail-brand {
  color: #17213a;
  font-family: Manrope, sans-serif;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.07em;
  margin: 0 0 12px 6px;
}

.rail-brand span {
  color: #77849b;
  font-size: 7px;
  vertical-align: top;
  letter-spacing: 0;
}

.rail-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0 7px;
  border-radius: 5px;
  color: #6e7a90;
  font-size: 9px;
}

.rail-item i {
  width: 9px;
  height: 9px;
  border: 1px solid #9da9bb;
  border-radius: 3px;
}

.rail-item.is-current {
  color: #214eaa;
  background: #eaf1ff;
}

.rail-item.is-current i {
  border-color: #5280dd;
  background: #5280dd;
}

.rail-org {
  margin: auto 0 0 6px;
  color: #98a3b5;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .11em;
}

.workspace-conversation {
  min-width: 0;
  padding: 17px 22px 14px;
}

.conversation-topline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #8a95a8;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .12em;
}

.conversation-topline span:last-child {
  font-weight: 500;
  letter-spacing: 0;
}

.workspace-conversation h3 {
  margin: 13px 0 4px;
  color: #18243e;
  font-family: Manrope, sans-serif;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -.035em;
}

.conversation-subtitle {
  margin: 0 0 13px;
  color: #7c8799;
  font-size: 10px;
}

.conversation-message {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 9px;
}

.message-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: #eaf1ff;
  color: #315fae;
  font-size: 9px;
  font-weight: 700;
}

.conversation-message p {
  margin: 2px 0 0;
  color: #45516a;
  font-size: 10px;
  line-height: 1.55;
}

.ai-avatar {
  background: #172748;
  color: #bfd1ff;
}

.ai-avatar svg {
  width: 13px;
  height: 13px;
}

.answer-source {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #6f7e98;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .1em;
}

.answer-source i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #d8a345;
}

.answer-lines {
  display: grid;
  gap: 4px;
  margin-top: 7px;
}

.answer-lines i {
  width: 88%;
  height: 3px;
  border-radius: 4px;
  background: #e8edf4;
}

.answer-lines i:nth-child(2) { width: 73%; }
.answer-lines i:nth-child(3) { width: 81%; }

.workspace-composer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  min-height: 31px;
  padding: 0 8px 0 10px;
  border: 1px solid #dce3ed;
  border-radius: 6px;
  color: #a1aab9;
  font-size: 9px;
}

.composer-arrow {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: #2563eb;
  color: #fff;
  font-size: 13px;
}

.workspace-model-note {
  margin-top: 7px;
  color: #8b96a8;
  font-size: 8px;
  line-height: 1.4;
}

.private-ai-scene-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px 24px;
  max-width: 1220px;
  margin: 17px auto 0;
  padding-top: 13px;
  border-top: 1px solid #e5eaf1;
  color: #68738a;
  font-size: 10px;
  line-height: 1.5;
}

.private-ai-scene-foot > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.scene-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2563eb;
}

@media (max-width: 1050px) {
  .private-ai-flow {
    grid-template-columns: minmax(85px, 1fr) 24px minmax(0, 600px) 24px minmax(85px, 1fr);
  }

  .flow-connector {
    --flow-distance: 19px;
  }

  .workspace-window-body {
    grid-template-columns: 108px minmax(0, 1fr);
  }

  .workspace-conversation {
    padding-right: 15px;
    padding-left: 15px;
  }
}

@media (max-width: 760px) {
  .private-ai-scene {
    margin: 0 9px;
    padding: 48px 6% 23px;
    border-radius: 13px;
  }

  .private-ai-scene-head {
    display: block;
    margin-bottom: 28px;
  }

  .private-ai-scene-head h2 {
    font-size: 33px;
  }

  .private-ai-scene-head > p {
    margin-top: 15px;
  }

  .private-ai-flow {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .flow-endpoint {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 11px;
    text-align: left;
    padding: 4px 6px;
  }

  .flow-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    margin: 0;
  }

  .flow-icon svg {
    width: 20px;
    height: 20px;
  }

  .flow-kicker,
  .flow-endpoint strong,
  .flow-detail {
    margin: 0;
  }

  .flow-endpoint strong {
    max-width: none;
    font-size: 12px;
  }

  .flow-detail {
    margin-left: auto;
    max-width: 18ch;
    text-align: right;
  }

  .flow-connector {
    --flow-distance: 15px;
    width: 1px;
    height: 20px;
    margin-left: 24px;
    background: linear-gradient(180deg, #344a7a, #597cc4);
  }

  .flow-connector::after {
    top: auto;
    right: -3px;
    bottom: -1px;
    transform: rotate(135deg);
  }

  .flow-connector span {
    top: 0;
    left: -2px;
    animation-name: flow-pulse-vertical;
  }

  .flow-connector-reverse span {
    animation-direction: reverse;
  }

  .workspace-window-body {
    grid-template-columns: 1fr;
  }

  .workspace-rail {
    display: none;
  }

  .workspace-window-top {
    padding: 0 10px;
  }

  .window-status {
    font-size: 7px;
  }

  .workspace-conversation {
    padding: 15px 13px 12px;
  }

  .private-ai-scene-foot {
    display: grid;
    gap: 7px;
  }
}

@keyframes flow-pulse-vertical {
  0% { transform: translateY(0); opacity: 0; }
  14% { opacity: 1; }
  82% { opacity: 1; }
  100% { transform: translateY(15px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .flow-connector span {
    animation: none;
    opacity: 1;
  }
}
