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

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { display: flex; flex-direction: column; min-height: 100vh; margin: 0; color: var(--text-primary); background: var(--bg-main); font-family: var(--font-ui); font-size: 16px; line-height: 1.55; }
#main { flex: 1; min-width: 0; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--color-link); text-underline-offset: .18em; }
a:hover { color: var(--color-link-hover); }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.skip-link { position: absolute; z-index: 100; top: 8px; left: 8px; padding: 8px 16px; color: #fff; background: var(--color-btn-primary-bg); border-radius: 8px; transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; clip-path: inset(50%); }
.mono { font-family: var(--font-mono); }

.site-header { position: sticky; z-index: 20; top: 0; background: var(--bg-surface); border-bottom: 1px solid var(--border); }
.site-header__grid { display: grid; grid-template-columns: minmax(240px, max-content) minmax(0, 1fr) auto; min-height: 64px; }
.brand-cell { display: flex; align-items: center; gap: 8px; min-width: 0; padding-right: 20px; overflow: hidden; border-right: 1px solid var(--border); }
.brand-cell .brand { flex: none; padding-right: 0; }
.brand { display: inline-flex; align-items: center; gap: 9px; min-width: 0; padding: 14px 24px; color: var(--text-primary); font-weight: 600; text-decoration: none; white-space: nowrap; }
.brand img { flex: none; width: 28px; height: 28px; }
.brand__by { color: var(--text-muted); font-size: 13px; font-weight: 400; text-decoration: none; white-space: nowrap; }
.product-nav { min-width: 0; }
.product-nav__list { display: flex; gap: 2px; height: 100%; margin: 0; padding: 0 14px; overflow-x: auto; list-style: none; scrollbar-width: none; }
.product-nav__list::-webkit-scrollbar { display: none; }
.product-nav__link { display: inline-flex; align-items: center; min-height: 64px; padding: 0 10px; color: var(--text-tertiary); font-size: 14px; white-space: nowrap; text-decoration: none; border-bottom: 2px solid transparent; }
.product-nav__link:focus-visible { outline-offset: -2px; }
.product-nav__link:hover { color: var(--text-primary); }
.product-nav__link[aria-current="page"] { color: var(--text-primary); font-weight: 600; border-bottom-color: var(--brand-accent); }
.site-header__actions { display: flex; align-items: center; gap: 12px; padding: 10px 24px; }
.lang-switch { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0; color: var(--text-tertiary); font: 500 12px var(--font-mono); text-decoration: none; white-space: nowrap; }
.lang-switch__visual { display: inline-flex; align-items: center; justify-content: center; padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; }
.only-narrow { display: none; }

.btn, .btn--primary, .btn--secondary { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; height: auto; padding: 10px 18px; border: 1px solid var(--border); border-radius: 10px; font: inherit; font-weight: 600; line-height: 1.3; text-align: center; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn--primary { color: var(--color-btn-primary-fg); background: var(--color-btn-primary-bg); border-color: var(--color-btn-primary-bg); }
.btn--primary:hover { color: #fff; background: var(--brand-accent-hover); border-color: var(--brand-accent-hover); }
.btn--secondary { color: var(--color-btn-secondary-fg); background: var(--color-btn-secondary-bg); border-color: var(--color-btn-secondary-border); }
.btn--secondary:hover { color: var(--text-primary); border-color: var(--brand-accent); }
.btn--small { min-height: 44px; padding: 10px 14px; font-size: 14px; }
.btn--donate { gap: 6px; color: var(--text-tertiary); background: transparent; border-color: transparent; font-weight: 500; }
.btn--donate:hover { color: var(--text-primary); background: var(--bg-surface2); text-decoration: none; }
.donate-heart { color: var(--donate-fg); font-size: 15px; line-height: 1; }
@media (max-width: 1279px) { .donate-label { display: none; } }
@media (max-width: 1099px) { .brand__by { display: none; } }
/* Ukrainian nav labels are long: tighten spacing so all five links fit without scrolling. */
@media (max-width: 1199px) {
  .product-nav__list { padding: 0 6px; }
  .product-nav__link { padding: 0 7px; }
  .site-header__actions { gap: 8px; padding-inline: 16px; }
}

.breadcrumbs { max-width: 1160px; margin: 0 auto; padding: 14px 24px 0; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; color: var(--text-muted); font: 500 12px var(--font-mono); }
.breadcrumbs li + li::before { padding-right: 8px; color: var(--text-muted); content: "/"; }

.ds-hero, .ds-row { display: grid; grid-template-columns: 240px minmax(0, 1fr); border-bottom: 1px solid var(--border); }
.ds-label { padding: 44px 24px; color: var(--text-muted); border-right: 1px solid var(--border); font: 500 12px var(--font-mono); letter-spacing: .06em; line-height: 1.7; text-transform: uppercase; }
/* Section labels may hold an h2 for the outline; it keeps the label's small mono style. */
.ds-label h2, .ds-label h3 { margin: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; }
.ds-label--facts { display: flex; flex-direction: column; gap: 0; padding-top: 28px; }
.ds-fact-primary { color: var(--text-primary); font-weight: 500; }
.ds-main { min-width: 0; padding: 44px 56px; }
.ds-hero__main { padding-top: 64px; padding-bottom: 56px; }
.ds-body { min-width: 0; padding: 44px 56px; }
.ds-h1 { max-width: 900px; margin: 0 0 22px; font-size: 64px; line-height: 1; letter-spacing: -.03em; font-weight: 600; text-wrap: balance; }
.ds-h1 em { padding: 0 .12em; color: #1d4ed8; background: var(--brand-accent-soft); border-radius: 6px; font-style: normal; }
.ds-lead { max-width: 640px; margin: 0 0 28px; color: var(--text-secondary); font-size: 18px; line-height: 1.55; text-wrap: pretty; }
.ds-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.ds-h2 { margin: 0 0 24px; font-size: 30px; line-height: 1.2; letter-spacing: -.02em; text-wrap: balance; }
.ds-sheet { margin-top: 44px; overflow: hidden; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 10px; }
.ds-sheet__kicker { margin: 0; padding: 12px 16px; color: var(--text-muted); background: var(--bg-surface2); border-bottom: 1px solid var(--border); font: 500 11px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.feature-sheet { width: 100%; border-collapse: collapse; font-size: 14px; }
.feature-sheet th, .feature-sheet td { padding: 14px 16px; border-bottom: 1px solid var(--border-subtle); text-align: left; vertical-align: top; }
.feature-sheet thead th { padding-block: 10px; color: var(--text-muted); background: var(--bg-surface2); border-bottom-color: var(--border); font: 500 11px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.feature-sheet tbody tr:last-child th, .feature-sheet tbody tr:last-child td { border-bottom: 0; }
.feature-sheet tbody th { color: var(--text-primary); font-weight: 600; }
.feature-sheet tbody td { color: var(--text-secondary); line-height: 1.5; }
.ds-row-number { width: 36px; color: #94a3b8 !important; font: 500 11px var(--font-mono) !important; }
.status-pill { display: inline-block; padding: 3px 8px; color: var(--brand-success); background: var(--brand-success-bg); border-radius: 999px; font: 500 11px var(--font-mono); white-space: nowrap; }
.status-pill--neutral { color: var(--text-tertiary); background: var(--brand-neutral-bg); }
.feature-records { display: none; }
.ds-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.ds-shot { margin: 0; overflow: hidden; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 10px; }
.ds-shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.ds-shot figcaption { padding: 12px 16px; color: var(--text-tertiary); border-top: 1px solid var(--border); font-size: 14px; }
.ds-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: hidden; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 10px; }
.ds-step { min-width: 0; padding: 24px; border-right: 1px solid var(--border); }
.ds-step:last-child { border-right: 0; }
.ds-step .mono { color: var(--brand-accent); font-size: 12px; }
.ds-step h3 { margin: 10px 0 6px; font-size: 18px; line-height: 1.3; }
.ds-step p { margin: 0; color: var(--text-tertiary); font-size: 15px; line-height: 1.5; }
.ds-cards { display: grid; gap: 16px; }
.ds-cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ds-card { display: block; min-width: 0; padding: 22px; color: var(--text-primary); background: var(--bg-surface); border: 1px solid var(--border); border-radius: 10px; text-decoration: none; }
.ds-card:hover { color: var(--text-primary); border-color: #93c5fd; text-decoration: none; }
.ds-card b, .ds-card span, .ds-card small { display: block; }
.ds-card b { margin-bottom: 6px; font-size: 17px; line-height: 1.3; }
.ds-card span { color: var(--text-tertiary); font-size: 14px; line-height: 1.5; }
.ds-card small { margin-top: 14px; color: var(--text-muted); font: 500 11px var(--font-mono); }
.ds-after { margin: 20px 0 0; }
.ds-after a { display: inline-flex; align-items: center; min-height: 44px; }
.ds-kv { display: grid; grid-template-columns: 220px minmax(0, 1fr); font-size: 15px; line-height: 1.55; }
.ds-kv__key, .ds-kv__value { padding: 14px 0; border-top: 1px solid var(--border-subtle); }
.ds-kv__key { padding-right: 24px; color: var(--text-primary); font-weight: 600; }
.ds-kv__value { color: var(--text-tertiary); }
.ds-faq__key { padding-right: 24px; font-weight: 600; }
.ds-actions--inline { margin-top: 24px; }
.ds-final { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 40px 56px; color: #fff; background: var(--brand-accent); }
.ds-final h2 { margin: 0 0 4px; font-size: 30px; line-height: 1.2; }
.ds-final p { margin: 0; color: #fff; }
.ds-final__link { display: inline-flex; align-items: center; min-height: 44px; color: #fff; }
.ds-final .btn { color: #1d4ed8; background: #fff; border-color: #fff; }
.ds-hero-shot { max-width: 720px; margin: 32px 0 0; }
.t-meta { display: flex; flex-direction: column; gap: 2px; text-transform: none; }
.t-meta b { color: var(--text-primary); font-weight: 500; }
.t-crumb { margin-bottom: 14px; color: var(--text-muted); font: 500 12px var(--font-mono); }
.t-h1 { max-width: 760px; font-size: 44px; }
.stack figcaption { padding: 10px 16px; color: var(--text-tertiary); border: 1px solid var(--border); border-top: 0; border-radius: 0 0 10px 10px; font-size: 13px; }
.try-cta b, .try-cta span { display: block; }
.try-cta b { margin-bottom: 4px; font-size: 17px; }
.try-cta span { color: var(--text-secondary); font-size: 15px; }
.tutorial-check h2 { margin: 0; font-size: 16px; }

.site-footer { color: var(--text-secondary); background: var(--bg-surface); border-top: 1px solid var(--border); }
.site-footer__grid { display: grid; grid-template-columns: 240px minmax(0, 1fr) 240px; }
.site-footer__grid > * { min-width: 0; padding: 28px 24px; }
.site-footer__brand { border-right: 1px solid var(--border); }
.site-footer__brand .brand { min-height: 44px; padding: 0; }
.site-footer__brand p { margin: 10px 0 0; color: var(--text-muted); font-size: 13px; }
.site-footer nav ul { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.site-footer a:not(.btn), .touch-link { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer h2 { margin: 0 0 14px; color: var(--text-muted); font: 500 11px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.site-footer__version { border-left: 1px solid var(--border); }
.site-footer__version p { margin: 0 0 10px; font-size: 13px; }
.site-footer small { color: var(--text-muted); font-size: 12px; }

/* Shared content primitives retained for the non-home pages. */
.container { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: 24px; }
.section { padding-block: 48px; border-bottom: 1px solid var(--border); }
.section--alt { background: var(--bg-surface2); }
.hero { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; align-items: center; padding: 48px; color: var(--text-primary); background: var(--bg-surface); border: 1px solid var(--border); border-radius: 12px; }
.hero__title { max-width: 18ch; margin: 0 0 16px; font-size: 48px; line-height: 1.05; letter-spacing: -.03em; }
.hero__lead { max-width: 62ch; margin: 0; color: var(--text-secondary); font-size: 18px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero__media { margin: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; }
.hero__media figcaption, .hero__media .note { padding: 12px 16px; margin: 0; }
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.prose { max-width: 760px; margin-inline: auto; }
.prose h1, .prose h2 { line-height: 1.2; letter-spacing: -.02em; }
.prose h1 { font-size: 44px; }
.prose h2 { margin-top: 0; font-size: 30px; }
.card { padding: 24px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-sm); }
.card__title { margin: 0 0 8px; font-size: 20px; line-height: 1.3; }
.card__meta { color: var(--text-muted); font-size: 14px; }
.card--link { display: block; color: var(--text-primary); text-decoration: none; }
.card--link:hover { color: var(--text-primary); border-color: var(--brand-accent); }
.badge { display: inline-flex; align-items: center; min-height: 28px; padding-inline: 8px; color: var(--text-secondary); background: var(--brand-neutral-bg); border-radius: 999px; font-size: 13px; font-weight: 600; }
.badge--level { color: var(--text-primary); border: 1px solid var(--border-strong); }
.steps { display: grid; gap: 16px; margin: 0; padding: 0; counter-reset: step; list-style: none; }
.steps li { position: relative; padding: 16px 16px 16px 52px; counter-increment: step; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 8px; }
.steps li::before { position: absolute; top: 16px; left: 16px; color: var(--brand-accent); content: counter(step, decimal-leading-zero); font: 500 12px var(--font-mono); }
.note, .warn { padding: 16px; border-left: 4px solid var(--border-strong); border-radius: 8px; }
.note { background: var(--brand-accent-soft); border-left-color: var(--brand-accent); }
.warn { background: var(--color-warn-bg); border-left-color: var(--color-warn-border); }
.table-wrap { max-width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; border: 1px solid var(--border); text-align: left; vertical-align: top; }
th { background: var(--bg-surface2); }
.compare tbody tr:nth-child(even) { background: var(--bg-surface2); }
.faq { padding: 12px 0; border-bottom: 1px solid var(--border); }
.faq summary { min-height: 44px; padding: 8px 0; color: var(--text-primary); font-weight: 600; cursor: pointer; }
.faq summary::marker { color: var(--brand-accent); }
.faq p { margin: 8px 0 0; color: var(--text-tertiary); }
.video-frame, .video-soon { width: 100%; overflow: hidden; background: var(--color-code-bg); border: 1px solid var(--border); border-radius: 10px; }
.video-frame { aspect-ratio: 16 / 9; }
.video-frame video { width: 100%; height: 100%; }
.video-soon { display: grid; min-height: 12rem; padding: 24px; place-items: center; text-align: center; }
.tutorial-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.tutorial-body ol { margin: 0; padding: 0; counter-reset: tutorial-step; list-style: none; }
.tutorial-body ol li { position: relative; display: block; padding: 16px 16px 16px 44px; counter-increment: tutorial-step; border-bottom: 1px solid var(--border-subtle); }
.tutorial-body ol li::before { position: absolute; top: 16px; left: 16px; color: var(--brand-accent); content: counter(tutorial-step); font: 500 12px var(--font-mono); }
.tutorial-body ol li:first-child { border-top: 1px solid var(--border-subtle); }
.try-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px; background: var(--brand-accent-soft); border: 1px solid #bfdbfe; border-radius: 10px; }
.try-cta > div { min-width: 0; }
.link-list { padding-left: 20px; }
.table-links { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0 8px; }
.lesson-records, .compare-records { display: none; }
.table-links > span[aria-hidden="true"] { display: none; }
.table-links > a:not(:first-of-type)::before { display: inline-block; margin-right: 0.4em; color: var(--text-muted); text-decoration: none; content: '·'; }
.page-for-teachers .ds-row > .ds-body > h2.ds-h2,
.page-access-alternative .ds-row > .ds-body > h2.ds-h2,
.page-tutorials .ds-row > .ds-body > h2.ds-h2,
.page-privacy .ds-row > .ds-body > h2.ds-h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; clip-path: inset(50%); }

@media (max-width: 900px) {
  .site-header__grid { grid-template-columns: 220px minmax(0, 1fr) auto; }
  .site-header__actions { padding-inline: 16px; }
  .brand__by { display: none; }
  .ds-main, .ds-body { padding-inline: 36px; }
  .ds-cards--3 { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 220px minmax(0, 1fr); }
  .site-footer__version { grid-column: 1 / -1; border-top: 1px solid var(--border); border-left: 0; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 112px; }
  .site-header__grid { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 56px 44px; min-height: 100px; }
  .brand-cell { padding-right: 0; border-right: 0; }
  .brand { padding: 8px 16px; }
  .brand__by, .only-wide { display: none; }
  .only-narrow { display: inline; }
  .site-header__actions { padding: 6px 16px 6px 8px; gap: 8px; }
  .site-header__actions { grid-column: 2; grid-row: 1; }
  .site-header__actions .btn-launch { min-width: 44px; padding: 10px; white-space: nowrap; }
  .product-nav { grid-column: 1 / -1; grid-row: 2; border-top: 1px solid var(--border); }
  .product-nav__list { height: 43px; min-height: 43px; padding-inline: 16px; }
  .product-nav__link { min-height: 44px; padding-inline: 0; margin-right: 18px; }
  .btn, .btn--primary, .btn--secondary { max-width: 100%; white-space: normal; text-align: center; }
  .breadcrumbs { padding-inline: 16px; }
  .breadcrumbs a { display: inline-flex; align-items: center; min-height: 44px; }
  .breadcrumbs ol { align-items: center; }
  .breadcrumbs li { display: inline-flex; align-items: center; min-height: 44px; }
  .ds-hero, .ds-row { display: block; }
  .ds-label { padding: 12px 16px 8px; border-right: 0; border-bottom: 0; }
  .ds-label--facts { display: flex; flex-flow: row wrap; gap: 4px 14px; padding-top: 16px; border-bottom: 1px solid var(--border); }
  .ds-label--facts span { line-height: 1.5; }
  .ds-main, .ds-body { padding: 24px 16px; }
  .ds-hero__main { padding-top: 28px; padding-bottom: 32px; }
  .ds-h1 { font-size: 38px; }
  .t-h1 { font-size: 38px; }
  .ds-lead { font-size: 16px; }
  .ds-actions { flex-direction: column; }
  .ds-actions .btn { width: 100%; }
  .ds-sheet { margin-top: 32px; }
  .feature-sheet { display: none; }
  .feature-records { display: block; }
  .feature-record { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border-bottom: 1px solid var(--border-subtle); font-size: 15px; }
  .feature-record:last-child { border-bottom: 0; }
  .ds-two, .ds-steps, .ds-kv { grid-template-columns: 1fr; }
  .ds-two { gap: 16px; }
  .ds-step { padding: 16px; border-right: 0; border-bottom: 1px solid var(--border); }
  .ds-step:last-child { border-bottom: 0; }
  .ds-h2 { font-size: 24px; }
  .ds-kv__row { grid-template-columns: 1fr; }
  .ds-kv__key, .ds-kv__value { padding: 12px 0; }
  .ds-kv__key { padding-bottom: 2px; }
  .ds-kv__value { border-top: 0; }
  .ds-kv__value { padding-top: 0; }
  .ds-faq__key { padding-right: 0; padding-bottom: 2px; }
  .ds-faq .ds-kv__value { padding-top: 0; }
  .ds-final { display: block; padding: 28px 16px; }
  .ds-final h2 { font-size: 24px; }
  .ds-final p { margin-bottom: 18px; }
  .ds-final .btn { width: 100%; }
  .site-footer__grid { display: block; }
  .site-footer__grid > * { padding: 24px 16px; }
  .site-footer__brand { border-right: 0; border-bottom: 1px solid var(--border); }
  .site-footer__version { border-top: 1px solid var(--border); }
  .try-cta { display: block; }
  .try-cta .btn { width: 100%; margin-top: 18px; }
  .ds-actions--inline { flex-direction: column; align-items: stretch; }
  .lesson-table-wrap, .compare-table-wrap { display: none; }
  .lesson-records, .compare-records { display: block; }
  .lesson-record, .compare-record { padding: 16px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 10px; }
  .lesson-record + .lesson-record, .compare-record + .compare-record { margin-top: 12px; }
  .lesson-record h3, .compare-record h3 { margin: 0 0 14px; font-size: 17px; line-height: 1.35; }
  .lesson-record dl, .compare-record dl { margin: 0; }
  .lesson-record dl > div, .compare-record dl > div { padding-top: 12px; border-top: 1px solid var(--border-subtle); }
  .lesson-record dt, .compare-record dt { color: var(--text-muted); font: 500 11px var(--font-mono); letter-spacing: .04em; text-transform: uppercase; }
  .lesson-record dd, .compare-record dd { margin: 4px 0 0; color: var(--text-tertiary); }
  .ds-body { overflow-wrap: anywhere; }
  .container { padding-inline: 16px; }
  .section { padding-block: 32px; }
  .hero { display: block; padding: 24px 16px; }
  .hero__title { font-size: 38px; }
  .hero__media { margin-top: 24px; }
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .prose h1 { font-size: 38px; }
}

/* Release notes (/releases/) */
.release[hidden], .release-filters[hidden], .subscribe-form[hidden], .subscribe-form__noscript[hidden] { display: none; }
.release-other { margin: 0 0 24px; }
.release-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.release-filter { min-height: 40px; padding: 8px 16px; color: var(--text-secondary); background: var(--bg-surface); border: 1px solid var(--border); border-radius: 999px; font: 500 14px var(--font-ui); cursor: pointer; }
.release-filter:hover { color: var(--text-primary); border-color: var(--brand-accent); }
.release-filter[aria-pressed="true"] { color: var(--text-inverse); background: var(--navy); border-color: var(--navy); }
.release-filter:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.release__meta { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.release__version { color: var(--text-primary); font: 600 20px var(--font-mono); letter-spacing: 0; text-transform: none; }
.release__meta time { color: var(--text-muted); text-transform: none; letter-spacing: 0; }
.release__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.release-badge { display: inline-block; padding: 3px 8px; border-radius: 999px; font: 500 11px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.release-badge--major { color: #9a3412; background: #ffedd5; }
.release-badge--minor { color: #1d4ed8; background: var(--brand-accent-soft); }
.release-badge--patch { color: var(--text-tertiary); background: var(--brand-neutral-bg); }
.release-badge--latest { color: var(--brand-success); background: var(--brand-success-bg); }
.release__items { max-width: 760px; margin: 0; padding-left: 20px; color: var(--text-secondary); font-size: 17px; line-height: 1.65; }
.release__items li + li { margin-top: 10px; }
.release__items li::marker { color: var(--brand-accent); }
.release-subscribe .ds-body > p { max-width: 640px; color: var(--text-secondary); }
.subscribe-form { max-width: 560px; margin: 8px 0 12px; }
.subscribe-form__row { display: flex; gap: 8px; }
.subscribe-form__row input { flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 10px 14px; color: var(--text-primary); background: var(--bg-main); border: 1px solid var(--border-strong); border-radius: 10px; font: inherit; }
.subscribe-form__row input:focus { outline: 2px solid var(--color-focus); outline-offset: 1px; border-color: var(--brand-accent); }
.subscribe-form__products { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 14px 0 0; padding: 0; border: 0; color: var(--text-secondary); font-size: 14px; }
.subscribe-form__products legend { width: 100%; margin-bottom: 6px; padding: 0; color: var(--text-muted); font: 500 11px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.subscribe-form__products label { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; }
.subscribe-form__note { font-size: 14px; }
.subscribe-form__msg { min-height: 1.5em; margin: 0; font-weight: 500; }
.subscribe-form__msg.ok { color: var(--brand-success); }
.subscribe-form__msg.err { color: #b91c1c; }
@media (max-width: 760px) {
  .release__meta { flex-flow: row wrap; align-items: center; gap: 4px 12px; }
  .release__badges { margin-top: 0; }
  .subscribe-form__row { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }
@media print { .site-header, .product-nav, .site-footer, .ds-final, .video-frame, .video-soon { display: none !important; } }

/* HTML Studio home and tutorials (design: specs/017-html-studio/design/Site-*.dc.html) */
@keyframes hs-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes hs-mark-in { from { opacity: 0; transform: translate(var(--fx), var(--fy)) rotate(calc(var(--rot) + 24deg)) scale(.6); } to { opacity: 1; transform: translate(0, 0) rotate(var(--rot)) scale(1); } }
@keyframes hs-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes hs-blink { 50% { opacity: 0; } }
@keyframes hs-pop { from { opacity: 0; transform: translateY(-4px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes hs-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.hs-rise { animation: hs-rise .7s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--d, 0s); }
.hs-hero { position: relative; }
.hs-hero .ds-h1 { max-width: 760px; }
.hs-marks { display: none; position: absolute; top: 48px; right: 56px; width: 340px; height: 300px; pointer-events: none; }
.hs-mark { position: absolute; display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 28px -12px rgb(15 23 42 / 25%); font: 600 15px var(--font-mono); transform: rotate(var(--rot)); animation: hs-mark-in 1s cubic-bezier(.2, .8, .2, 1) both, hs-bob 6s ease-in-out infinite; animation-delay: var(--d, 0s), calc(var(--d, 0s) + 1.2s); }
.hs-mark--js { background: #fef08a; border-color: #fde047; }
/* Per-card placement lives here, not in style attributes: the site CSP is style-src 'self'. */
.hs-mark--1 { top: 0; left: 40px; color: #1d4ed8; --rot: -8deg; --fx: 60px; --fy: 80px; --d: .15s; }
.hs-mark--2 { top: 20px; left: 210px; color: #b45309; --rot: 7deg; --fx: -50px; --fy: 70px; --d: .3s; }
.hs-mark--3 { top: 130px; left: 0; color: #047857; --rot: 5deg; --fx: 90px; --fy: -10px; --d: .45s; }
.hs-mark--4 { top: 140px; left: 280px; color: #0f172a; --rot: -6deg; --fx: -80px; --fy: 0px; --d: .6s; }
.hs-mark--5 { top: 230px; left: 110px; color: #7c3aed; --rot: -4deg; --fx: 40px; --fy: -70px; --d: .75s; }
.hs-mark--6 { top: 250px; left: 230px; color: #1d4ed8; --rot: 9deg; --fx: -40px; --fy: -80px; --d: .9s; }
.hs-d1 { --d: .05s; } .hs-d2 { --d: .2s; } .hs-d3 { --d: .35s; } .hs-d4 { --d: .5s; }
.hs-sheet { margin-top: 0; }
.hs-record-text { color: var(--text-tertiary); font-size: 14px; }
@media (min-width: 1360px) {
  .hs-marks { display: block; }
  .hs-hero .ds-h1, .hs-hero .ds-lead { max-width: min(640px, calc(100% - 380px)); }
}

.hs-mock { margin: 44px 0 0; overflow: hidden; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 24px 48px -28px rgb(15 23 42 / 28%); }
.hs-mock__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 12px; color: #fff; background: #0a0f1e; font-size: 13px; }
.hs-mock__logo { display: flex; flex: none; align-items: center; justify-content: center; width: 24px; height: 24px; background: var(--brand-accent); border-radius: 6px; font: 600 10px var(--font-mono); }
.hs-mock__saved { color: #cbd5e1; }
.hs-mock__run { display: inline-flex; align-items: center; gap: 6px; height: 30px; margin-left: auto; padding: 0 14px; background: var(--brand-accent); border-radius: 7px; font-weight: 600; }
.hs-mock__panes { display: flex; flex-wrap: wrap; }
.hs-mock__code { position: relative; flex: 1 1 380px; min-width: 0; border-right: 1px solid #e2e8f0; }
.hs-mock__tabs { display: flex; gap: 2px; padding: 0 8px; overflow: hidden; background: #f8fafc; border-bottom: 1px solid #e2e8f0; font: 12px var(--font-mono); }
.hs-mock__tabs span { padding: 10px 12px; color: var(--text-tertiary); white-space: nowrap; }
.hs-mock__tabs .is-on { color: var(--text-primary); font-weight: 600; border-bottom: 2px solid var(--brand-accent); }
.hs-code { display: flex; margin: 0; padding: 12px 0 16px; overflow-x: auto; font: 13px/22px var(--font-mono); }
.hs-code__ln { flex: none; width: 40px; padding-right: 14px; color: #94a3b8; text-align: right; white-space: pre; }
.hs-code code { flex: 1 1 auto; padding-right: 16px; color: var(--text-primary); font: inherit; white-space: pre; }
.tk-t { color: #1d4ed8; } .tk-a { color: #b45309; } .tk-s { color: #047857; } .tk-p { color: #64748b; }
.hs-caret { display: inline-block; width: 2px; height: 16px; vertical-align: -3px; background: var(--brand-accent); animation: hs-blink 1s steps(1) infinite; }
.hs-ac { position: absolute; top: 248px; left: 120px; width: 220px; padding: 4px; background: var(--bg-surface); border: 1px solid #e2e8f0; border-radius: 10px; box-shadow: 0 12px 32px rgb(15 23 42 / 18%); font-size: 13px; animation: hs-pop .35s ease-out 1.6s both; }
.hs-ac__row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 7px; }
.hs-ac__row.is-on { background: var(--brand-accent-soft); }
.hs-ac__row b { color: #b45309; font: 600 13px var(--font-mono); }
.hs-ac__row span { margin-left: auto; color: var(--text-tertiary); font-size: 11px; }
.hs-ac__hint { margin-top: 2px; padding: 6px 10px 4px; color: var(--text-tertiary); border-top: 1px solid #f1f5f9; font-size: 11px; }
.hs-mock__preview { display: flex; flex: 1 1 340px; flex-direction: column; min-width: 0; background: #f8fafc; }
.hs-mock__head { display: flex; justify-content: space-between; gap: 8px; padding: 10px 14px; color: var(--text-tertiary); border-bottom: 1px solid #e2e8f0; font: 12px var(--font-mono); }
.hs-page { flex: 1 1 auto; margin: 14px; padding: 18px 20px; color: #1f2937; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; font-family: Georgia, 'Times New Roman', serif; }
.hs-page__h { margin-bottom: 12px; font-size: 24px; font-weight: 700; }
.hs-page__img { display: flex; align-items: center; justify-content: center; height: 64px; margin-bottom: 12px; color: var(--text-tertiary); background: repeating-linear-gradient(135deg, #eef2f7 0 10px, #e6ebf2 10px 20px); border-radius: 6px; font: 11px var(--font-mono); }
.hs-page table { font-size: 14px; }
.hs-page th, .hs-page td { padding: 6px 8px; border: 1px solid #94a3b8; }
.hs-page th { background: #f1f5f9; }
.hs-page__link { color: #1d4ed8; text-decoration: underline; }
.hs-mock__console { display: flex; align-items: center; gap: 8px; padding: 10px 14px; color: var(--text-tertiary); background: #fff; border-top: 1px solid #e2e8f0; font: 12px var(--font-mono); }
.hs-dot { width: 8px; height: 8px; background: #16a34a; border-radius: 50%; }

.hs-ticker { overflow: hidden; padding: 14px 0; background: #0a0f1e; border-bottom: 1px solid var(--border); }
.hs-ticker__track { display: flex; gap: 40px; width: max-content; margin: 0; padding: 0; color: #cbd5e1; font: 14px var(--font-mono); white-space: nowrap; list-style: none; animation: hs-ticker 60s linear infinite; }
.hs-ticker:hover .hs-ticker__track { animation-play-state: paused; }
.hs-ticker__track li + li::before { margin-right: 40px; color: #64748b; content: "/"; }

.hs-see { display: flex; flex-wrap: wrap; align-items: center; gap: 32px 56px; }
.hs-see__text { flex: 1 1 320px; min-width: 0; }
.hs-see__text p { margin: 0 0 12px; color: var(--text-tertiary); font-size: 16px; line-height: 1.6; }
.hs-phone { flex: none; width: 230px; margin: 0 auto; overflow: hidden; background: #fff; border: 6px solid #0f172a; border-radius: 28px; }
.hs-phone__bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px; color: #fff; background: #0a0f1e; font-size: 12px; font-weight: 600; }
.hs-phone__bar span { width: 16px; height: 16px; background: var(--brand-accent); border-radius: 4px; }
.hs-phone__views { display: flex; margin: 8px; overflow: hidden; border: 1px solid #e2e8f0; border-radius: 7px; font-size: 11px; }
.hs-phone__views span { flex: 1; padding: 6px 0; color: var(--text-tertiary); text-align: center; }
.hs-phone__views .is-on { color: #fff; background: #0a0f1e; font-weight: 600; }
.hs-phone__page { min-height: 180px; margin: 0 8px 10px; padding: 10px; color: #1f2937; border: 1px solid #e2e8f0; border-radius: 6px; font: 12px Georgia, 'Times New Roman', serif; }
.hs-phone__page b { display: block; margin-bottom: 6px; font-size: 15px; }
.hs-phone__page div { padding: 4px 0; border-bottom: 1px solid #e2e8f0; }
.hs-phone__page .hs-page__link { margin-top: 8px; border: 0; }

.hs-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.hs-cards .ds-card small { margin: 0 0 8px; color: var(--brand-accent); font-size: 12px; }
.hs-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px; margin-bottom: 24px; }
.hs-head .ds-h2 { margin: 0; }

.hs-work { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px 56px; }
.hs-work__text { flex: 1 1 320px; min-width: 0; }
.hs-work__text p { margin: 0 0 12px; color: var(--text-tertiary); font-size: 16px; line-height: 1.6; }
.hs-note { display: flex; flex: 1 1 320px; gap: 14px; min-width: 0; padding: 24px; color: var(--text-secondary); background: #fffbeb; border: 1px solid #fde68a; border-radius: 14px; font-size: 15px; line-height: 1.6; }
.hs-note svg { flex: none; margin-top: 2px; }
.hs-note b { display: block; margin-bottom: 4px; color: var(--text-primary); }

.hs-faq { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 40px; }
.hs-faq > div { padding: 18px 0; border-top: 1px solid var(--border); }
.hs-faq h3 { margin: 0 0 6px; font-size: 16px; }
.hs-faq p { margin: 0; color: var(--text-tertiary); font-size: 15px; line-height: 1.55; }

.hs-lessons { margin: 0; padding: 0; list-style: none; }
.hs-lesson { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 40px; padding: 32px 56px; border-bottom: 1px solid var(--border); }
.hs-lesson__body { flex: 999 1 420px; min-width: 0; }
.hs-lesson__body .mono { color: var(--brand-accent); font-size: 12px; }
.hs-lesson__body h2 { margin: 6px 0 8px; font-size: 24px; line-height: 1.25; letter-spacing: -.02em; }
.hs-lesson__body h2 a { color: var(--text-primary); text-decoration: none; }
.hs-lesson__body h2 a:hover { color: var(--brand-accent); text-decoration: underline; }
.hs-lesson__body p { margin: 0 0 14px; color: var(--text-tertiary); font-size: 16px; line-height: 1.55; }
.hs-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.hs-chips li, .hs-chip { padding: 3px 8px; color: var(--text-secondary); background: var(--brand-neutral-bg); border-radius: 6px; font: 500 12px var(--font-mono); }
.hs-lesson__acts { display: flex; flex: 1 1 200px; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.hs-thumb { box-sizing: border-box; flex: 0 0 240px; height: 150px; padding: 14px; overflow: hidden; background: #fff; border: 1px solid var(--border); border-radius: 10px; }
.hs-thumb--first { display: flex; flex-direction: column; gap: 10px; }
.hs-thumb--first b { color: #7c3aed; font: 700 20px Georgia, serif; }
.hs-thumb__line--80 { width: 80%; } .hs-thumb__line--60 { width: 60%; }
.hs-thumb__line { height: 6px; background: #e2e8f0; border-radius: 3px; }
.hs-thumb__btn { align-self: flex-start; margin-top: auto; padding: 6px 12px; color: #fff; background: var(--brand-accent); border-radius: 6px; font-size: 12px; font-weight: 600; }
.hs-thumb--timetable b { display: block; margin-bottom: 8px; font: 700 15px Georgia, serif; }
.hs-thumb__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 20px; border-top: 1px solid #94a3b8; border-left: 1px solid #94a3b8; font-size: 10px; }
.hs-thumb__grid span { padding: 3px; border-right: 1px solid #94a3b8; border-bottom: 1px solid #94a3b8; }
.hs-thumb__grid .h { background: #f1f5f9; }
.hs-thumb__grid .l { color: #1d4ed8; text-decoration: underline; }
.hs-thumb__grid .w { grid-column: span 2; }
.hs-thumb__grid .t { grid-row: span 2; background: var(--brand-accent-soft); }
.hs-thumb--poster { display: flex; flex-direction: column; gap: 8px; background: #fff7ed; }
.hs-thumb--poster b { color: #9a3412; font: 700 16px Georgia, serif; }
.hs-thumb__cards { display: flex; flex: 1 1 auto; flex-wrap: wrap; gap: 6px; }
.hs-thumb__cards span { flex: 1 1 60px; background: #fff; border: 1px solid #fed7aa; border-radius: 6px; }
.hs-thumb--gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 12px; }
.hs-thumb--gallery span { border-radius: 6px; background: repeating-linear-gradient(135deg, #eef2f7 0 8px, #e6ebf2 8px 16px); }
.hs-thumb--gallery .wide { grid-column: span 2; }
.hs-thumb--gallery .gif { display: flex; align-items: center; justify-content: center; color: #1e40af; background: #dbeafe; font: 600 10px var(--font-mono); }
.hs-thumb--gallery .vid { display: flex; align-items: center; justify-content: center; background: #0f172a; }
.hs-help { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 40px; padding: 32px 56px; background: var(--bg-surface2); border-bottom: 1px solid var(--border); }
.hs-help > div { flex: 999 1 420px; min-width: 0; }
.hs-help h2 { margin: 0 0 6px; font-size: 20px; }
.hs-help p { margin: 0; color: var(--text-tertiary); font-size: 15px; line-height: 1.7; }

@media (max-width: 760px) {
  .hs-ac { display: none; }
  .hs-mock { margin-top: 28px; }
  .hs-lesson, .hs-help { padding: 24px 16px; }
  .hs-lesson__acts { justify-content: flex-start; }
  .hs-thumb { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .hs-rise, .hs-mark, .hs-ac, .hs-caret, .hs-ticker__track { opacity: 1 !important; animation: none !important; }
}

/* Release notes (/releases/), matching apps/db-studio-site */
.release-other { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; list-style: none; }
.release__meta { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.ds-label .release__version { color: var(--text-primary); font: 600 20px var(--font-mono); letter-spacing: 0; text-transform: none; }
.release__meta time { color: var(--text-muted); text-transform: none; letter-spacing: 0; }
.release__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.release-badge { display: inline-block; padding: 3px 8px; border-radius: 999px; font: 500 11px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.release-badge--major { color: #9a3412; background: #ffedd5; }
.release-badge--minor { color: #1d4ed8; background: var(--brand-accent-soft); }
.release-badge--patch { color: var(--text-tertiary); background: var(--brand-neutral-bg); }
.release-badge--latest { color: var(--brand-success); background: var(--brand-success-bg); }
.release__items { max-width: 760px; margin: 0; padding-left: 20px; color: var(--text-secondary); font-size: 17px; line-height: 1.65; }
.release__items li + li { margin-top: 10px; }
.release__items li::marker { color: var(--brand-accent); }

/* Tutorial videos (same player as the DB Studio site) */
.hs-video { margin: 0; }
.hs-video__frame { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #0f172a; border: 1px solid var(--border); border-radius: 10px; }
.hs-video__frame video { display: block; width: 100%; height: 100%; }
.hs-video figcaption { padding-top: 8px; color: var(--text-tertiary); font-size: 13px; }
.hs-videos { padding: 40px 56px; border-bottom: 1px solid var(--border); }
.hs-videos h2 { margin: 0 0 8px; font-size: 24px; }
.hs-videos > p { margin: 0 0 24px; color: var(--text-secondary); }
.hs-videos__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 32px 24px; margin: 0; padding: 0; list-style: none; }
.hs-videos__grid h3 { margin: 8px 0 0; font-size: 16px; line-height: 1.35; }
@media (max-width: 720px) { .hs-videos { padding: 24px 16px; } }
@media print { .hs-video, .hs-videos { display: none !important; } }
