/* Sagan Docs hub (/docs/, /docs/en/, /docs/data-platform/): plain HTML on the shared
   tokens (/docs/_sagan/brand.css, copied from shared/brand.css at build time). No
   inline styles or scripts in the pages, so they run under a strict
   Content-Security-Policy. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--g-bg); color: var(--g-fg); font-family: var(--g-font); font-size: .9375rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
svg.i { width: 1.0625rem; height: 1.0625rem; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--g-accent); outline-offset: 2px; }
.skip { position: absolute; left: -624.9375rem; top: .5rem; z-index: 50; padding: .5rem .75rem; border-radius: .5rem; background: var(--g-inv); color: var(--g-inv-fg); }
.skip:focus { left: .5rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.h-header { position: sticky; top: 0; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; min-height: 4rem; padding: .625rem 1.5rem; background: color-mix(in srgb, var(--g-raised) 90%, transparent); -webkit-backdrop-filter: saturate(1.6) blur(12px); backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid var(--g-divider); }
.h-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; margin-left: .5rem; }
.h-nav a { display: inline-flex; align-items: center; gap: .5rem; height: 2.25rem; padding: 0 .75rem; border-radius: .5625rem; color: var(--g-ink2); font-size: .875rem; font-weight: 500; transition: background-color var(--g-motion); }
.h-nav a:hover { background: var(--g-hover); }
.h-nav a[aria-current="page"] { background: var(--g-chip); color: var(--g-fg); font-weight: 600; }
.h-nav img { width: 1.125rem; height: 1.125rem; }
.h-spacer { flex: 1 1 0; min-width: 0; }
.h-slash { color: var(--g-slash); font-size: 1.375rem; font-weight: 300; line-height: 1; }
.h-product { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; }
.product-tile.is-mini { width: 1.5rem; height: 1.5rem; border-radius: .4375rem; border: 0; }
.product-tile.is-mini svg { width: .9375rem; height: .9375rem; }
/* The company site (sagan.vn), a quiet text link before search. */
.h-site { display: inline-flex; align-items: center; gap: .25rem; height: 2.25rem; padding: 0 .625rem; border-radius: .5625rem; color: var(--g-fg2); font-size: .875rem; font-weight: 500; white-space: nowrap; transition: background-color var(--g-motion), color var(--g-motion); }
.h-site:hover { background: var(--g-hover); color: var(--g-fg); }
.h-site svg { width: .875rem; height: .875rem; color: var(--g-fg3); }
.badge-soon { font-size: .6875rem; font-weight: 600; line-height: 1; padding: .25rem .4375rem; border-radius: var(--g-r-pill); background: var(--g-teal-soft); color: var(--g-teal); white-space: nowrap; }
.h-search { display: inline-flex; align-items: center; gap: .625rem; width: 16.25rem; max-width: 100%; height: 2.375rem; padding: 0 .5rem 0 .75rem; border-radius: .625rem; border: 1px solid var(--g-border); background: var(--g-sunk); color: var(--g-fg3); font-size: .875rem; cursor: pointer; }
.h-search:hover { border-color: var(--g-border-strong); }
.h-search span { flex: 1; text-align: left; }
kbd.k { font-family: var(--g-mono); font-size: .6875rem; padding: .1875rem .375rem; border-radius: .375rem; border: 1px solid var(--g-border); background: var(--g-raised); color: var(--g-fg2); }
.h-lang { display: inline-flex; align-items: center; gap: 2px; padding: .1875rem; border-radius: .625rem; background: var(--g-chip); }
.h-lang a { display: inline-flex; align-items: center; justify-content: center; min-width: 2.375rem; height: 1.875rem; border-radius: .4375rem; color: var(--g-fg2); font-size: .75rem; font-weight: 600; }
.h-lang a[aria-current="true"] { background: var(--g-seg-on); box-shadow: var(--g-shadow-seg); color: var(--g-fg); }
.h-icon { display: inline-flex; align-items: center; justify-content: center; width: 2.375rem; height: 2.375rem; padding: 0; border: 1px solid var(--g-border); border-radius: .625rem; background: var(--g-raised); color: var(--g-ink2); cursor: pointer; }
.h-icon:hover { background: var(--g-sunk); }
.h-icon .moon { display: none; }
html.dark .h-icon .sun { display: none; }
html.dark .h-icon .moon { display: block; }

/* Hero */
.hero { position: relative; overflow: hidden; background: var(--g-raised); border-bottom: 1px solid var(--g-divider); }
.dots { position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(var(--g-dot) 1px, transparent 1.2px); background-size: 1.375rem 1.375rem; -webkit-mask-image: radial-gradient(ellipse 60% 75% at 50% 0%, #000 25%, transparent 78%); mask-image: radial-gradient(ellipse 60% 75% at 50% 0%, #000 25%, transparent 78%); }
.hero-inner { position: relative; max-width: 70rem; margin: 0 auto; padding: 6.5rem 1.5rem 6rem; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.375rem; }
.eyebrow-pill { display: inline-flex; align-items: center; gap: .5rem; padding: .375rem .75rem .375rem .625rem; border-radius: var(--g-r-pill); border: 1px solid var(--g-border); background: var(--g-raised); font-size: .8125rem; font-weight: 500; color: var(--g-ink2); }
.eyebrow-pill::before { content: ''; width: .375rem; height: .375rem; border-radius: 6.1875rem; background: var(--g-accent); }
h1 { margin: 0; font-size: clamp(2.375rem, 5.2vw, 4rem); line-height: 1.06; font-weight: 600; letter-spacing: -0.035em; text-wrap: balance; max-width: 53.75rem; }
.lead { margin: 0; max-width: 37.5rem; font-size: 1.125rem; line-height: 1.6; color: var(--g-fg2); text-wrap: pretty; }
.search-box { margin-top: .875rem; display: flex; align-items: center; gap: .875rem; width: 40rem; max-width: 100%; height: 3.625rem; padding: 0 .75rem 0 1.25rem; border-radius: .875rem; border: 1px solid var(--g-border-strong); background: var(--g-raised); box-shadow: var(--g-shadow-lg); }
.search-box:focus-within { border-color: var(--g-accent-line); box-shadow: 0 0 0 4px var(--g-accent-soft), var(--g-shadow-lg); }
.search-box svg { width: 1.25rem; height: 1.25rem; color: var(--g-ink2); }
.search-box input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 1rem; color: var(--g-fg); }
.search-box input::placeholder { color: var(--g-fg3); }
.search-box button { display: inline-flex; align-items: center; height: 2.375rem; padding: 0 .875rem; border: 0; border-radius: .5625rem; background: var(--g-inv); color: var(--g-inv-fg); font-size: .875rem; font-weight: 600; cursor: pointer; }
.quick { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .5rem; font-size: .8125rem; }
.quick > span { color: var(--g-fg3); margin-right: 2px; }
.quick a { padding: .3125rem .6875rem; border-radius: var(--g-r-pill); border: 1px solid var(--g-border); background: var(--g-raised); color: var(--g-ink2); transition: border-color var(--g-motion); }
.quick a:hover { border-color: var(--g-accent-line); color: var(--g-fg); }

/* Sections */
.section { max-width: 70rem; margin: 0 auto; padding: 5rem 1.5rem 0; }
.section.is-last { padding-bottom: 6rem; }
.heading { display: flex; flex-direction: column; gap: .375rem; margin-bottom: 1.75rem; }
.heading > span { font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--g-fg3); }
h2 { margin: 0; font-size: 1.875rem; line-height: 1.2; font-weight: 600; letter-spacing: -0.025em; }
.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(27.5rem, 100%), 1fr)); gap: 1.25rem; }
.product { display: flex; flex-direction: column; gap: 1.375rem; padding: 1.75rem; border-radius: 1.125rem; border: 1px solid var(--g-border); background: var(--g-raised); box-shadow: var(--g-shadow-pop); }
.product.is-soon { border-style: dashed; border-color: var(--g-border-strong); background: var(--g-sunk); box-shadow: none; }
.product-top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.product-id { display: flex; align-items: center; gap: .875rem; }
.product-tile { width: 3rem; height: 3rem; border-radius: .8125rem; display: inline-flex; align-items: center; justify-content: center; }
.product-tile.is-genie { background: var(--g-accent-soft); border: 1px solid var(--g-accent-line); }
.product-tile.is-genie img { width: 1.875rem; height: 1.875rem; }
.product-tile.is-data { background: var(--g-teal-soft); border: 1px solid var(--g-teal-line); color: var(--g-teal); }
.product-tile.is-data svg { width: 1.5rem; height: 1.5rem; stroke-width: 1.6; }
.product h3 { margin: 0; font-size: 1.5rem; line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; }
.product h3.g-wordmark { font-weight: 500; }
.product-id span { font-size: .8125rem; color: var(--g-fg3); }
.version { font-family: var(--g-mono); font-size: .75rem; padding: .25rem .5625rem; border-radius: var(--g-r-pill); background: var(--g-chip); color: var(--g-ink2); }
.product p { margin: 0; color: var(--g-fg2); text-wrap: pretty; }
.rows { display: flex; flex-direction: column; border-top: 1px solid var(--g-divider); }
.rows a { display: flex; align-items: center; gap: .875rem; padding: .875rem 2px; border-bottom: 1px solid var(--g-divider); color: var(--g-fg); transition: color var(--g-motion); }
.rows a:hover { color: var(--g-accent-text); }
.rows a > svg:first-child { width: 1.25rem; height: 1.25rem; color: var(--g-accent); stroke-width: 1.6; }
.rows b { flex: 1; font-weight: 500; }
.rows span { font-size: .8125rem; color: var(--g-fg3); }
.rows a > svg:last-child { width: 1rem; height: 1rem; color: var(--g-icon); }
.btn { align-self: flex-start; display: inline-flex; align-items: center; gap: .5rem; height: 2.625rem; padding: 0 1rem; border-radius: .625rem; font-size: .875rem; font-weight: 600; transition: opacity var(--g-motion), background-color var(--g-motion); }
.btn svg { width: 1rem; height: 1rem; }
.btn.is-inverse { background: var(--g-inv); color: var(--g-inv-fg); }
.btn.is-inverse:hover { opacity: .9; }
.btn.is-outline { border: 1px solid var(--g-border-strong); background: var(--g-raised); color: var(--g-fg); }
.btn.is-outline:hover { background: var(--g-sunk); }
.address { display: flex; flex-direction: column; gap: .5rem; padding: 1rem; border-radius: .75rem; background: var(--g-raised); border: 1px solid var(--g-divider); }
.address span { font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--g-fg3); }
.address code { font-family: var(--g-mono); font-size: .875rem; color: var(--g-ink2); }
.roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(18.75rem, 100%), 1fr)); gap: 1rem; }
.role { display: flex; flex-direction: column; gap: .625rem; padding: 1.5rem; border-radius: 1rem; border: 1px solid var(--g-border); background: var(--g-raised); color: var(--g-fg); transition: border-color var(--g-motion); }
.role:hover { border-color: var(--g-accent-line); }
.role-who { display: inline-flex; align-items: center; gap: .5rem; font-size: .8125rem; font-weight: 600; color: var(--g-accent-text); }
.role-who svg { width: 1rem; height: 1rem; }
.role b { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; }
.role > span:not(.role-who):not(.role-go) { font-size: .875rem; color: var(--g-fg2); }
.role-go { margin-top: .375rem; display: inline-flex; align-items: center; gap: .375rem; font-size: .875rem; font-weight: 600; }
.role-go svg { width: .9375rem; height: .9375rem; }

/* Footer */
.f-footer { border-top: 1px solid var(--g-divider); background: var(--g-raised); }
.f-inner { max-width: 70rem; margin: 0 auto; padding: 3rem 1.5rem 2.5rem; display: flex; flex-wrap: wrap; gap: 2.5rem 4rem; justify-content: space-between; }
.f-brand { display: flex; flex-direction: column; gap: .875rem; min-width: 13.75rem; }
.f-brand small { font-size: .8125rem; color: var(--g-fg3); }
.f-cols { display: flex; flex-wrap: wrap; gap: 2.5rem 4.5rem; }
.f-col { display: flex; flex-direction: column; gap: .625rem; font-size: .875rem; }
.f-col > span, .f-col label { font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--g-fg3); }
.f-col a { color: var(--g-ink2); }
.f-col a:hover { color: var(--g-fg); }
.f-col select { height: 2.25rem; padding: 0 .625rem; border-radius: .5rem; border: 1px solid var(--g-border-strong); background: var(--g-raised); font-size: .875rem; color: var(--g-fg); }

/* Coming soon */
.soon { position: relative; overflow: hidden; background: var(--g-raised); border-bottom: 1px solid var(--g-divider); }
.soon .dots { -webkit-mask-image: radial-gradient(ellipse 50% 65% at 50% 45%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 50% 65% at 50% 45%, #000 20%, transparent 75%); }
.soon-inner { position: relative; max-width: 45rem; margin: 0 auto; padding: 8.75rem 1.5rem 9.375rem; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.375rem; }
.soon-tile { width: 4.5rem; height: 4.5rem; border-radius: 1.25rem; background: var(--g-teal-soft); border: 1px solid var(--g-teal-line); color: var(--g-teal); display: inline-flex; align-items: center; justify-content: center; }
.soon-tile svg { width: 2.125rem; height: 2.125rem; stroke-width: 1.5; }
.soon .badge-soon { font-size: .75rem; padding: .3125rem .75rem; }
.soon .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: .5rem; }
.soon .btn { align-self: auto; height: 2.875rem; padding: 0 1.25rem; font-size: .9375rem; border-radius: .6875rem; }
.soon small { font-size: .875rem; color: var(--g-fg3); }
.soon small a { color: var(--g-accent-text); font-weight: 500; }
.mini-footer { max-width: 70rem; margin: 0 auto; padding: 1.75rem 1.5rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; font-size: .8125rem; color: var(--g-fg3); }
.mini-footer span { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.mini-footer a { color: var(--g-fg2); }
.s-brand.is-small { gap: .5rem; }
.s-brand.is-small .s-mark { width: 1.375rem; height: 1.375rem; }
.s-brand.is-small b { font-family: var(--s-brand-font); font-weight: 700; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--g-fg); }

/* One header row: below 1180px the search becomes a button (the hero has the
   search field), below 860px the product links go, and below 640px the sagan.vn
   link too (the footer keeps it). */
@media (max-width: 1180px) {
  .h-search { width: 2.375rem; padding: 0; justify-content: center; }
  .h-search span, .h-search kbd { display: none; }
}
@media (max-width: 860px) {
  .h-nav { display: none; }
}
/* Below 960px the header slides away while the reader scrolls down (hub.js). */
@media (max-width: 959px) {
  .h-header { transition: transform 200ms ease; }
  .s-chrome-hidden .h-header { transform: translateY(-100%); }
}
@media (prefers-reduced-motion: reduce) {
  .h-header { transition: none; }
}
@media (max-width: 640px) {
  .h-site { display: none; }
  .h-header { min-height: 3.5rem; padding: .5rem 1rem; gap: .5rem; }
  .hero-inner { padding: 4rem 1rem 4rem; }
  .section { padding: 3.5rem 1rem 0; }
  .search-box button { display: none; }
  .soon-inner { padding: 5.5rem 1rem 6rem; }
  .h-lang a { min-width: 2rem; }
  /* Data Platform: the product name stands for the brand. */
  .h-header:has(.h-product) .s-brand-name { display: none; }
}
@media (max-width: 400px) {
  .h-header { padding: .5rem .75rem; }
}
/* Small phones: one row; the search field is in the hero. */
@media (max-width: 360px) {
  .h-header { gap: .375rem; }
  .h-slash, .h-search { display: none; }
}
