/* SourceBento site styles. Light and dark themes follow the visitor's system setting.
   Bump ASSET_VERSION in src/layout.js after editing this file. */

:root {
  /* Brand: primary sky oklch(68.5% 0.169 237.323), secondary purple oklch(55.8% 0.288 302.321).
     The primary is too light for text on white (2.7:1), so text uses --primary-text; fills use --primary with dark text. */
  --primary: oklch(68.5% 0.169 237.323);
  --primary-hover: oklch(74.6% 0.16 232.661);
  --primary-text: oklch(50% 0.134 242.749);
  --primary-soft: oklch(95.1% 0.026 236.824);
  --secondary: oklch(55.8% 0.288 302.321);
  --secondary-hover: oklch(49.6% 0.265 301.924);
  --secondary-text: oklch(55.8% 0.288 302.321);
  --secondary-soft: oklch(94.6% 0.033 307.174);
  --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  --on-primary: #0f172b;
  --on-secondary: #ffffff;
  --focus: oklch(58.8% 0.158 241.966);

  --bg: #f8fafc;
  --bg-soft: #f1f5f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --ink: #0f172b;
  --text: #314158;
  --muted: #45556c;
  --line: #e2e8f0;
  --line-strong: #cad5e2;
  --panel: #0f172b;
  --brand: var(--primary-text);
  --brand-strong: var(--secondary-text);
  --brand-soft: var(--primary-soft);
  --on-ink: #ffffff;
  --header-bg: rgb(248 250 252 / 86%);
  --shadow: 0 1px 2px rgb(15 23 43 / 5%), 0 10px 30px rgb(15 23 43 / 7%);
  --shadow-lg: 0 2px 4px rgb(15 23 43 / 5%), 0 24px 60px rgb(15 23 43 / 12%);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --font: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --accent: var(--primary-text);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary-text: oklch(68.5% 0.169 237.323);
    --primary-soft: rgb(0 166 244 / 14%);
    --secondary-text: oklch(71.4% 0.203 305.504);
    --secondary-soft: rgb(152 16 250 / 20%);
    --focus: oklch(74.6% 0.16 232.661);
    --bg: #020618;
    --bg-soft: #0a1122;
    --surface: #0f172b;
    --surface-2: #111c31;
    --ink: #f1f5f9;
    --text: #cad5e2;
    --muted: #90a1b9;
    --line: #1d293d;
    --line-strong: #314158;
    --panel: #0f172b;
    --on-ink: #020618;
    --header-bg: rgb(2 6 24 / 86%);
    --shadow: 0 1px 2px rgb(0 0 0 / 35%), 0 10px 30px rgb(0 0 0 / 35%);
    --shadow-lg: 0 2px 4px rgb(0 0 0 / 35%), 0 24px 60px rgb(0 0 0 / 50%);
    color-scheme: dark;
  }
}

/* Product accents (products.accent in D1) */
[data-accent="blue"] { --accent: #3157d5; }
[data-accent="violet"] { --accent: #7c3aed; }
[data-accent="cyan"] { --accent: #0782b0; }
[data-accent="green"] { --accent: #0f8a63; }
[data-accent="amber"] { --accent: #b86e04; }
[data-accent="forest"] { --accent: #3f7d20; }
[data-accent="indigo"] { --accent: #4f46e5; }
[data-accent="teal"] { --accent: #0f766e; }
[data-accent="emerald"] { --accent: #047857; }
@media (prefers-color-scheme: dark) {
  [data-accent="blue"] { --accent: #8ea8ff; }
  [data-accent="violet"] { --accent: #b99bff; }
  [data-accent="cyan"] { --accent: #6fcff0; }
  [data-accent="green"] { --accent: #6fdcb0; }
  [data-accent="amber"] { --accent: #f2b75a; }
  [data-accent="forest"] { --accent: #a3d97f; }
  [data-accent="indigo"] { --accent: #a5a1ff; }
  [data-accent="teal"] { --accent: #6fd6cb; }
  [data-accent="emerald"] { --accent: #6ee0b5; }
}
[data-accent] { --accent-soft: color-mix(in srgb, var(--accent) 13%, transparent); }

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-strong); }
h1, h2, h3, h4 { color: var(--ink); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: clamp(34px, 5vw, 54px); letter-spacing: -0.03em; line-height: 1.08; }
h2 { font-size: clamp(25px, 3vw, 34px); }
h3 { font-size: 19px; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
code { font-family: var(--mono); font-size: 0.88em; background: var(--bg-soft); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--primary-soft); color: var(--ink); }
.icon { flex: none; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--on-ink); padding: 10px 16px; border-radius: 10px; font-weight: 700; }
.skip-link:focus { top: 12px; color: var(--on-ink); }
.eyebrow { display: inline-block; font: 500 12px/1.4 var(--mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--secondary-text); }
[data-accent] .eyebrow { color: var(--accent); }
.lead { font-size: clamp(18px, 1.6vw, 20px); line-height: 1.6; color: var(--text); max-width: 64ch; }
.stretched::after { content: ''; position: absolute; inset: 0; z-index: 1; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 11px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font: 700 15px/1.2 var(--font); text-decoration: none; cursor: pointer;
  transition: border-color .15s, background-color .15s, transform .15s;
}
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--on-primary); }
.btn-secondary, .btn-accent { background: var(--secondary); border-color: var(--secondary); color: var(--on-secondary); }
.btn-secondary:hover, .btn-accent:hover { background: var(--secondary-hover); border-color: var(--secondary-hover); color: var(--on-secondary); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--secondary-text); }
.btn-ghost:hover { background: var(--secondary-soft); border-color: transparent; color: var(--secondary-text); }
.btn-sm { min-height: 38px; padding: 7px 14px; font-size: 14px; border-radius: 10px; }
.btn-lg { min-height: 52px; padding: 13px 22px; font-size: 16px; border-radius: 12px; }
.btn-block { width: 100%; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.link-arrow:hover .icon { transform: translateX(2px); }
.link-arrow .icon { transition: transform .15s; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: -0.02em; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--gradient); color: #fff; font: 600 12px var(--mono); box-shadow: 0 4px 14px rgb(152 16 250 / 22%); }
.main-nav { display: flex; gap: 4px; }
.main-nav a, .header-link { color: var(--text); text-decoration: none; font-weight: 700; font-size: 15px; padding: 8px 12px; border-radius: 9px; }
.main-nav a:hover, .header-link:hover { background: var(--bg-soft); color: var(--ink); }
.main-nav a[aria-current="page"] { color: var(--ink); background: var(--bg-soft); box-shadow: inset 0 -2px 0 var(--primary); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.mobile-nav { display: none; margin-left: auto; position: relative; }
.mobile-nav summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); color: var(--ink); background: var(--surface); }
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav .when-open { display: none; }
.mobile-nav[open] .when-open { display: inline; }
.mobile-nav[open] .when-closed { display: none; }
.mobile-panel { position: absolute; right: 0; top: 54px; width: min(300px, calc(100vw - 32px)); display: grid; gap: 4px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.mobile-panel a:not(.btn) { padding: 12px 14px; border-radius: 10px; color: var(--ink); font-weight: 700; text-decoration: none; }
.mobile-panel a:not(.btn):hover, .mobile-panel a[aria-current="page"] { background: var(--bg-soft); }
.mobile-panel .btn { margin-top: 6px; }

/* Sections */
.section { padding: clamp(48px, 7vw, 88px) 0 0; }
.section:last-child { padding-bottom: clamp(56px, 8vw, 96px); }
.section-soft { background: var(--bg-soft); border-block: 1px solid var(--line); padding-bottom: clamp(48px, 7vw, 88px); margin-top: clamp(48px, 7vw, 88px); }
.section-soft + .section { padding-top: clamp(48px, 7vw, 88px); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-head h2 { margin: 6px 0 0; }
.section-head p { color: var(--muted); margin: 10px 0 0; max-width: 60ch; }
.section-title-sm { font-size: 22px; margin-bottom: 18px; }

/* Hero */
.hero { padding: clamp(44px, 7vw, 88px) 0 clamp(24px, 4vw, 40px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero h1 { margin: 14px 0 20px; font-size: clamp(38px, 5.6vw, 62px); }
.hero h1 em { font-style: normal; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .04em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 22px; }
.hero-actions.center { justify-content: center; }
.proof { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; padding: 0; margin: 0; color: var(--muted); font-size: 15px; font-weight: 600; }
.proof li { display: inline-flex; align-items: center; gap: 6px; }
.proof .icon { color: var(--brand); }

.bento { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.bento-tile {
  position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 150px; padding: 20px;
  border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  text-decoration: none; box-shadow: var(--shadow); transition: transform .18s, border-color .18s;
}
.bento-tile:hover { transform: translateY(-3px); border-color: var(--line-strong); color: var(--ink); }
.bento-tile { gap: 6px; }
.bento-tile strong { font-size: 22px; line-height: 1.2; letter-spacing: -0.02em; }
.bento-names { color: var(--muted); font-size: 14.5px; line-height: 1.5; font-weight: 600; max-width: 34ch; }
.bento-foot { margin-top: auto; display: flex; justify-content: flex-end; color: var(--muted); padding-top: 8px; }
.bento-tile:hover .bento-foot { color: var(--ink); }
.bento-1 { grid-column: span 2; color: #f1f5f9; border-color: transparent;
  background: radial-gradient(120% 140% at 100% 0%, rgb(152 16 250 / 45%), transparent 55%),
              radial-gradient(100% 120% at 0% 100%, rgb(0 166 244 / 38%), transparent 60%), #0f172b; }
.bento-1:hover { color: #f1f5f9; border-color: transparent; }
.bento-1 .eyebrow { color: #7dd3fc; }
.bento-1 strong { font-size: 26px; }
.bento-1 .bento-names, .bento-1 .bento-foot, .bento-1:hover .bento-foot { color: #cad5e2; }
.bento-2 { background: var(--primary-soft); border-color: transparent; }
.bento-demo { grid-column: span 2; min-height: 0; background: var(--secondary); border-color: var(--secondary); color: #fff; display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 18px; }
.bento-demo:hover { color: #fff; background: var(--secondary-hover); }
.bento-demo .eyebrow { color: #f3e8ff; grid-column: 1 / -1; }
.bento-demo strong { font-size: 22px; }
.bento-demo .bento-names { color: #f3e8ff; }
.bento-demo .bento-foot, .bento-demo:hover .bento-foot { color: #fff; padding: 0; margin: 0; }

/* Chips and filters */
.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.chips li { font: 500 12.5px/1 var(--mono); color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); padding: 6px 9px; border-radius: 99px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.filter-chips a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-weight: 700; font-size: 14.5px; text-decoration: none; }
.filter-chips a span { font: 500 12px var(--mono); color: var(--muted); }
.filter-chips a:hover { border-color: var(--ink); }
.filter-chips a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.filter-chips a[aria-current="page"] span { color: inherit; opacity: .75; }
.badge { font: 600 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; padding: 5px 8px; border-radius: 99px; background: var(--accent-soft, var(--brand-soft)); color: var(--accent, var(--brand)); }

/* Product cards */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.product-grid.single { grid-template-columns: minmax(0, 560px); }
.product-grid.two { grid-template-columns: repeat(2, 1fr); }
.product-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s, border-color .18s; }
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.product-card-media { display: block; aspect-ratio: 2 / 1; background: var(--bg-soft); border-bottom: 1px solid var(--line); overflow: hidden; }
.product-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.product-card:hover .product-card-media img { transform: scale(1.02); }
.product-card-body { padding: 20px 20px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.product-card-top { display: flex; align-items: center; gap: 10px; }
.product-card-top .badge { margin-left: auto; }
.product-card-title { margin: 4px 0 0; font-size: 21px; }
.product-card-title a { color: var(--ink); text-decoration: none; }
.product-card-title a:hover { color: var(--accent); }
.product-card-body > p { color: var(--muted); margin: 0; flex: 1; }
.product-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); }
.price { font: 500 20px/1 var(--mono); color: var(--ink); }
.price-muted { font: 700 13px/1 var(--font); text-transform: uppercase; letter-spacing: .06em; color: var(--secondary-text); }
.buy-status h2 { font-size: 22px; margin: 12px 0 0; }
.card-actions { display: flex; align-items: center; gap: 16px; }
.card-actions a { display: inline-flex; align-items: center; gap: 5px; font-size: 14.5px; font-weight: 700; text-decoration: none; color: var(--muted); }
.card-actions a:hover { color: var(--ink); }
.card-actions a.strong { color: var(--accent); }
.product-icon { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 11px; background: var(--accent-soft, var(--brand-soft)); color: var(--accent); flex: none; }

.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.product-tile { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .18s, border-color .18s, box-shadow .18s; }
.product-tile:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.product-tile-head { display: flex; align-items: center; justify-content: space-between; }
.product-tile-head .price { font-size: 16px; }
.product-tile h3 { font-size: 17px; margin: 6px 0 0; }
.product-tile h3 a { color: var(--ink); text-decoration: none; }
.product-tile p { font-size: 14.5px; line-height: 1.5; color: var(--muted); margin: 0; flex: 1; }
.tile-demo { position: relative; z-index: 2; align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 700; color: var(--accent); text-decoration: none; }
.tile-demo:hover { color: var(--ink); text-decoration: underline; }

.product-group { margin-top: 40px; }
.group-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.group-head h2 { font-size: 24px; margin: 0; }
.group-head p { color: var(--muted); margin: 0; }
.bundle-note { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 20px; border-radius: var(--radius); border: 1px dashed var(--line-strong); background: var(--surface-2); }
.bundle-note strong { color: var(--ink); }

.demo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.demo-link { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.demo-link:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-1px); }
.demo-link > span:not(.product-icon) { flex: 1; display: grid; gap: 2px; min-width: 0; }
.demo-link small { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.demo-link > .icon:last-child { color: var(--muted); }

/* Page headers and breadcrumbs */
.page-head { padding: clamp(36px, 6vw, 64px) 0 8px; }
.page-head h1 { margin: 12px 0 14px; }
.page-head.narrow { max-width: 760px; }
.breadcrumbs { padding-top: 22px; font-size: 14px; }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); }
.breadcrumbs li:not(:last-child)::after { content: '/'; margin-left: 6px; color: var(--line-strong); }
.breadcrumbs a { color: var(--muted); text-decoration: none; font-weight: 600; }
.breadcrumbs a:hover { color: var(--ink); text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--ink); font-weight: 600; display: inline-block; max-width: 36ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }

/* Product page */
.product-hero { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(28px, 5vw, 56px); align-items: start; padding: 28px 0 8px; }
.product-title { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.product-title .product-icon { width: 56px; height: 56px; border-radius: 15px; }
.product-title h1 { margin: 4px 0 0; }
.product-hero-copy > p:not(.lead) { color: var(--muted); max-width: 64ch; }
.product-hero-copy .lead { margin-bottom: 12px; font-weight: 600; color: var(--ink); }
.meta-row { display: flex; align-items: baseline; gap: 12px; margin-top: 14px; }
.meta-label { flex: none; width: 84px; font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.buy-card { position: sticky; top: 88px; padding: 26px 22px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.buy-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 4px; background: var(--gradient); }
.buy-price { display: flex; align-items: baseline; gap: 10px; }
.buy-price span:last-child { color: var(--muted); font-size: 14px; font-weight: 600; }
.price-lg { font: 500 44px/1 var(--mono); color: var(--ink); letter-spacing: -0.03em; }
.buy-note { margin: 10px 0 0; color: var(--muted); font-size: 14.5px; }
.buy-actions { display: grid; gap: 8px; margin: 18px 0; }
.checklist { list-style: none; padding: 16px 0 0; margin: 0; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: 14.5px; }
.checklist li { display: flex; gap: 8px; align-items: flex-start; }
.checklist .icon { color: var(--brand); margin-top: 3px; }
.product-cover { margin: 32px 0 0; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--bg-soft); }
.product-cover img { width: 100%; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature-grid.two-up { grid-template-columns: repeat(2, 1fr); }
.feature { padding: 20px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); }
.feature h3 { font-size: 17px; margin-bottom: 6px; }
.feature p { color: var(--muted); margin: 0; font-size: 15.5px; }
.product-body .prose { margin: 0 auto 0 0; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.gallery-phone { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.gallery figure { margin: 0; }
.gallery a { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--bg-soft); box-shadow: var(--shadow); }
.gallery img { width: 100%; transition: transform .3s; }
.gallery a:hover img { transform: scale(1.015); }
.gallery figcaption { margin-top: 10px; font-size: 14.5px; color: var(--muted); font-weight: 600; }
.demo-band { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; padding: clamp(24px, 4vw, 40px); border-radius: var(--radius-lg); background: var(--accent-soft, var(--brand-soft)); border: 1px solid var(--line); }
.demo-band h2 { margin: 8px 0 8px; }
.demo-band p { color: var(--muted); margin: 0; }
.demo-band-links { display: grid; gap: 10px; }
.demo-band .demo-link > .icon:first-child { color: var(--accent); }
.buy-bar { display: none; }

/* FAQ */
.faq-layout { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; font-weight: 700; font-size: 17px; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 400 24px/1 var(--font); color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: -4px 0 18px; color: var(--muted); max-width: 68ch; }

/* Promise grid, CTA band */
.promise-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.promise { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.promise .icon { color: var(--brand); margin-bottom: 14px; }
.promise h3 { font-size: 17px; }
.promise p { color: var(--muted); margin: 0; font-size: 15.5px; }
.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: clamp(28px, 5vw, 48px); border-radius: var(--radius-lg); color: #cad5e2;
  background: radial-gradient(90% 160% at 100% 0%, rgb(152 16 250 / 50%), transparent 60%), radial-gradient(80% 140% at 0% 100%, rgb(0 166 244 / 40%), transparent 60%), #0f172b; }
.cta-band h2 { color: #fff; margin-bottom: 6px; }
.cta-band p { margin: 0; }

/* News */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.post-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s, box-shadow .15s; }
.post-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.post-card h3 { font-size: 18.5px; line-height: 1.3; margin: 0; }
.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card p { margin: 0; color: var(--muted); font-size: 15.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.post-row-top { display: flex; }
.topic-tag { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 7px; font: 500 12px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); text-decoration: none; }
.topic-tag::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--topic, var(--brand)); }
.topic-tag:hover { color: var(--ink); }
[data-topic="self-hosting"] { --topic: #1d6339; }
[data-topic="devops"] { --topic: #3157d5; }
[data-topic="security"] { --topic: #c2410c; }
[data-topic="data"] { --topic: #0f8a63; }
[data-topic="hr-tech"] { --topic: #a16207; }
[data-topic="document-ai"] { --topic: #4f46e5; }
[data-topic="ai"] { --topic: #9333ea; }
[data-topic="mobile"] { --topic: #0f766e; }
[data-topic="wearables"] { --topic: #db2777; }
.filter-chips a[data-topic]::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--topic); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 14px; color: var(--muted); }
.news-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(28px, 5vw, 56px); align-items: start; margin-top: 12px; padding-bottom: 72px; }
.post-list { display: grid; }
.post-row { padding: 26px 0; border-bottom: 1px solid var(--line); }
.post-row:first-child { padding-top: 12px; }
.post-row-title { font-size: clamp(21px, 2.2vw, 25px); line-height: 1.25; margin: 10px 0 8px; }
.post-row-title a { color: var(--ink); text-decoration: none; }
.post-row-title a:hover { color: var(--brand); text-decoration: underline; text-decoration-thickness: 2px; }
.post-row p { color: var(--text); margin: 0 0 10px; max-width: 72ch; }
.post-list.compact .post-row { padding: 20px 0; }
.post-list.compact .post-row-title { font-size: 19px; }
.news-aside { position: sticky; top: 88px; display: grid; gap: 16px; }
.aside-card { padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.aside-card h2 { font-size: 17px; margin-bottom: 10px; }
.aside-card p { color: var(--muted); font-size: 15px; }
.mini-products { list-style: none; margin: 0; padding: 0; display: grid; }
.mini-products li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.mini-products li:last-child { border-bottom: 0; }
.mini-products a { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 700; text-decoration: none; }
.mini-products a:hover { color: var(--accent); }
.mini-products .dot { width: 9px; height: 9px; border-radius: 3px; background: var(--accent); }
.mini-products li > span { font: 500 13.5px var(--mono); color: var(--muted); }
.search-form { display: flex; align-items: center; gap: 10px; max-width: 520px; margin-top: 22px; padding: 6px 6px 6px 14px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--surface); }
.search-form:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.search-form .icon { color: var(--muted); }
.search-form input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 500 16px var(--font); padding: 8px 0; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; }
.empty-state { text-align: center; padding: 56px 24px; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); background: var(--surface-2); color: var(--muted); }
.empty-state .icon { color: var(--brand); }
.empty-state h2 { margin: 12px 0 8px; font-size: 22px; }
.empty-state.big { margin: clamp(40px, 8vw, 96px) auto; max-width: 720px; }
.empty-state.big h1 { margin: 10px 0 12px; }

/* Article */
.article { max-width: 740px; margin: 0 auto; padding: 28px 0 0; }
.article-head { padding-bottom: 22px; margin-bottom: 30px; border-bottom: 1px solid var(--line); }
.article-head h1 { font-size: clamp(32px, 4.4vw, 46px); margin: 14px 0 16px; }
.dek { font-size: clamp(19px, 2vw, 21px); line-height: 1.55; color: var(--text); margin-bottom: 18px; }
.source-box { margin: 40px 0 0; padding: 22px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--primary); }
.source-box h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; margin-bottom: 8px; }
.source-box p { color: var(--muted); }
.related-products, .article ~ .section { max-width: 740px; margin-left: auto; margin-right: auto; }
.article ~ .section:last-child { padding-bottom: 72px; }

/* Long-form text */
.prose { max-width: 70ch; font-size: 17.5px; line-height: 1.75; color: var(--text); }
.prose-article { font-size: 18.5px; line-height: 1.78; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: clamp(22px, 2.4vw, 27px); margin: 1.9em 0 0.6em; }
.prose h3 { font-size: 20px; margin: 1.6em 0 0.5em; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre, .prose .table-wrap { margin: 0 0 1.15em; }
.prose li { margin: 0.35em 0; padding-left: 0.2em; }
.prose li::marker { color: var(--brand); }
.prose strong { color: var(--ink); }
.prose a { font-weight: 600; }
.prose blockquote { padding: 4px 0 4px 20px; border-left: 3px solid var(--line-strong); color: var(--muted); font-style: italic; }
.prose pre { overflow-x: auto; padding: 16px 18px; border-radius: var(--radius-sm); background: #0f172b; color: #e2e8f0; font: 14px/1.6 var(--mono); }
.prose pre code { background: none; border: 0; padding: 0; color: inherit; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 700; color: var(--ink); background: var(--surface-2); white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }

/* About and legal pages */
.page-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px 56px; padding-bottom: 80px; }
.page-layout .prose { margin-top: 18px; }
.page-about { grid-template-columns: minmax(0, 1fr) 320px; }
.page-about .page-head, .page-about .stat-row { grid-column: 1 / -1; }
.page-about .about-products { position: sticky; top: 88px; margin-top: 18px; }
.about-products .btn { margin-top: 14px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px; }
.stat-row div { padding: 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.stat-row strong { display: block; font: 500 32px/1.1 var(--mono); color: var(--ink); letter-spacing: -0.02em; }
.stat-row span { color: var(--muted); font-size: 14.5px; font-weight: 600; }

/* Footer */
.site-footer { margin-top: 24px; border-top: 1px solid var(--line); background: var(--surface-2); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; padding-top: 48px; padding-bottom: 36px; }
.footer-brand p { color: var(--muted); max-width: 36ch; margin: 14px 0; }
.footer-mail { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; }
.site-footer h2 { font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 8px 0 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.site-footer ul a { color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; }
.site-footer ul a:hover { color: var(--brand); text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; padding-top: 18px; padding-bottom: 28px; border-top: 1px solid var(--line); color: var(--muted); }

/* Language switcher */
.lang-switch { position: relative; }
.lang-switch summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 9px; font: 600 13px var(--mono); color: var(--text); }
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary:hover, .lang-switch[open] summary { background: var(--bg-soft); color: var(--ink); }
.lang-menu { position: absolute; right: 0; top: 44px; z-index: 60; min-width: 180px; display: grid; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.lang-menu a { padding: 9px 12px; border-radius: 8px; color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none; }
.lang-menu a:hover { background: var(--bg-soft); }
.lang-menu a[aria-current] { background: var(--primary-soft); color: var(--primary-text); }
.mobile-langs { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 6px 4px; border-top: 1px solid var(--line); margin-top: 4px; }
.mobile-langs a { padding: 6px 10px !important; border-radius: 99px !important; border: 1px solid var(--line); font-size: 13.5px; }
.mobile-langs a[aria-current] { background: var(--primary-soft); border-color: transparent; color: var(--primary-text); }
.footer-langs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding-bottom: 18px; color: var(--muted); font-size: 14px; }
.footer-langs a { color: var(--text); text-decoration: none; font-weight: 600; }
.footer-langs a:hover { color: var(--primary-text); text-decoration: underline; }
.footer-langs a[aria-current] { color: var(--primary-text); }

/* Article images and the product box at the end of each article */
.article-hero { margin: 0 0 30px; }
.article-hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--bg-soft); }
.article-hero figcaption { margin-top: 8px; font-size: 13.5px; color: var(--muted); }
.translation-note { display: flex; align-items: center; gap: 8px; margin: -8px 0 26px; padding: 10px 14px; border-radius: 10px; background: var(--primary-soft); color: var(--text); font-size: 14.5px; }
.post-cta { position: relative; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; margin: 44px 0 0; padding: 22px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.post-cta::before { content: ''; position: absolute; inset: 0 0 auto; height: 4px; background: var(--gradient); }
.post-cta-media { align-self: start; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--bg-soft); }
.post-cta-media img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.post-cta-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.post-cta-text h2 { font-size: 21px; margin: 4px 0 8px; }
.post-cta-text p { color: var(--text); font-size: 16.5px; line-height: 1.65; margin: 0 0 10px; }
.post-cta-text a { font-weight: 700; }
.post-cta-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.post-row.has-thumb { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 22px; align-items: start; }
.post-thumb { display: block; margin-top: 12px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-soft); }
.post-thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .3s; }
.post-row:hover .post-thumb img { transform: scale(1.03); }
.post-list.compact .post-row.has-thumb { grid-template-columns: minmax(0, 1fr) 160px; }
.post-card { padding: 0; gap: 0; overflow: hidden; }
.post-card-media { aspect-ratio: 16 / 9; background: var(--bg-soft); border-bottom: 1px solid var(--line); overflow: hidden; }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.post-card:hover .post-card-media img { transform: scale(1.03); }
.post-card-body { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 22px; flex: 1; }

/* DM Mono has no Vietnamese glyphs: Vietnamese labels use the text font. */
html:lang(vi) .eyebrow, html:lang(vi) .topic-tag, html:lang(vi) .meta-label, html:lang(vi) .badge,
html:lang(vi) .site-footer h2, html:lang(vi) .filter-chips a span { font-family: var(--font); letter-spacing: 0.06em; }

/* Responsive */
@media (max-width: 1080px) {
  .product-grid, .post-grid { grid-template-columns: repeat(2, 1fr); }
  .promise-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .news-layout, .page-about { grid-template-columns: minmax(0, 1fr); }
  .news-aside, .page-about .about-products { position: static; }
}
@media (max-width: 900px) {
  .main-nav, .header-actions { display: none; }
  .mobile-nav { display: block; }
  .hero-grid, .product-hero, .faq-layout, .demo-band { grid-template-columns: minmax(0, 1fr); }
  .buy-card { position: static; box-shadow: var(--shadow); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .buy-bar { display: block; position: sticky; bottom: 0; z-index: 40; background: var(--header-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
  .buy-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
  .buy-bar strong { color: var(--ink); }
  .buy-bar span { font-size: 15px; color: var(--muted); }
}
@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .post-row.has-thumb, .post-list.compact .post-row.has-thumb { grid-template-columns: minmax(0, 1fr) 96px; gap: 14px; }
  .post-row.has-thumb .post-thumb { margin-top: 34px; }
  .post-cta { grid-template-columns: minmax(0, 1fr); }
  .product-grid, .product-grid.two, .post-grid, .promise-grid, .feature-grid, .feature-grid.two-up, .gallery { grid-template-columns: minmax(0, 1fr); }
  .gallery-phone { grid-template-columns: repeat(2, 1fr); }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .bento-1, .bento-demo { grid-column: auto; }
  .bento-tile { min-height: 0; }
  .bento-demo { grid-template-columns: 1fr auto; }
  .bento-demo .bento-names { grid-column: 1; }
  .hero-actions .btn { flex: 1 1 100%; }
  .meta-row { flex-direction: column; gap: 8px; }
  .prose-article { font-size: 17.5px; }
  .card-actions { gap: 12px; }
  .breadcrumbs [aria-current] { max-width: 22ch; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
