:root {
  --header-expanded-height: 98px;
  --header-min-height: 44px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-min-height) + 16px); }
body { margin: 0; background: var(--surface); color: var(--ink); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); text-underline-offset: .22em; }
.site-header a, .site-footer a, .why a { color: inherit; }
a:hover { text-decoration-thickness: 2px; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 5px; }
[hidden] { display: none !important; }
/* Center capped content with inner gutters, as in Swift's feature sections. */
.container { width: 100%; max-width: 980px; margin-inline: auto; padding-inline: 1em; }
/* The outer spacing scrolls away; the inner row stays pinned at its minimum height. */
.site-header { --header-shrink: 1; position: sticky; top: calc(var(--header-min-height) - var(--header-expanded-height)); z-index: 20; min-height: var(--header-expanded-height); display: flex; align-items: center; background: var(--brand); color: var(--on-brand); }
.header-inner { position: sticky; top: 0; width: 100%; min-height: var(--header-min-height); padding-inline: clamp(16px, 2vw, 32px); display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.home-link { display: inline-flex; align-items: center; gap: calc(13px - 3px * var(--header-shrink)); padding-block: 5px; flex: 0 0 auto; text-decoration: none; }
.brand-name { font-size: calc(24px - 4px * var(--header-shrink)); font-weight: 700; letter-spacing: -.025em; }
.brand-mark { display: inline-block; width: 54px; height: 54px; background: currentColor; mask: url("./logo.svg") center / contain no-repeat; -webkit-mask: url("./logo.svg") center / contain no-repeat; }
.home-link .brand-mark { width: calc(54px - 24px * var(--header-shrink)); height: calc(54px - 24px * var(--header-shrink)); }
.primary-nav { display: flex; flex: 0 1 auto; align-items: center; justify-content: flex-end; gap: 30px; flex-wrap: wrap; min-width: 0; margin-left: auto; }
.primary-nav > a, .nav-upcoming { font-size: 16px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.primary-nav > a { padding-block: calc(15px - 5px * var(--header-shrink)); text-decoration: none; }
.primary-nav > a:hover { text-decoration: underline; }
.nav-upcoming { display: inline-flex; align-items: baseline; gap: 9px; }
.coming-soon { font-size: 10px; font-weight: 400; letter-spacing: .02em; }
.site-header :focus-visible { outline-color: var(--on-brand); }
.github-link { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: 0 0 44px; border-radius: 4px; }
.primary-nav > .github-link { padding: 0; }
.github-link svg { display: block; }
.github-link:hover { background: var(--on-brand-hover); }
.menu-toggle { display: none; }
.hero { padding-block: 64px 76px; }
h1, h2, h3, h4, h5, h6 { color: var(--heading); }
h1 { margin: 0 0 18px; font-size: clamp(64px, 7.5vw, 96px); line-height: 1.08; letter-spacing: -.055em; font-weight: 750; }
.hero h1 { letter-spacing: -.02em; }
.tagline { max-width: 1000px; margin: 0; font-size: clamp(25px, 2.8vw, 36px); line-height: 1.35; letter-spacing: -.026em; }
.tagline strong { font-weight: 600; }
.development-note { margin: 24px 0 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
h2 { margin: 0 0 25px; font-size: clamp(30px, 3vw, 40px); line-height: 1.18; font-weight: 680; letter-spacing: -.036em; text-wrap: balance; }
p { margin: 0 0 20px; }
p:last-child { margin-bottom: 0; }
.why { background: var(--brand-deep); color: var(--on-brand); padding-block: 54px 60px; }
.why h2 { color: inherit; font-size: 40px; margin-bottom: 25px; }
.why-copy { font-size: 20px; line-height: 1.65; }
strong { font-weight: 650; }
.feature { padding-block: 92px; }
.feature-tinted { background: var(--light); }
.feature-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); grid-template-areas: "copy example"; align-items: start; gap: 40px; }
.feature-reversed .feature-grid { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); grid-template-areas: "example copy"; }
.feature-grid > .feature-copy { grid-area: copy; }
.feature-grid > figure, .feature-grid > .example-tabs { grid-area: example; }
.feature-copy { font-size: 18px; line-height: 1.65; color: var(--muted); }
.feature-copy h2 { color: var(--heading); }
.feature-copy strong { color: var(--ink); }
.feature-copy .lead { color: var(--ink); font-size: 21px; line-height: 1.55; }
.home-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 24px; margin-top: 28px; font-size: 16px; font-weight: 600; }
.home-button { display: inline-flex; align-items: center; gap: 18px; padding: 12px 18px; border-radius: 4px; background: var(--accent); color: var(--surface); text-decoration: none; }
.home-button:hover { text-decoration: underline; }
#get-started .feature-copy > pre { margin-bottom: 24px; padding: 16px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
#get-started .feature-copy > pre code { padding: 0; background: none; color: var(--code-ink); font-size: 12px; }
.workflow-explanation { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.workflow-steps { margin: 0; padding-left: 1.4em; }
.workflow-steps li { margin-bottom: 20px; padding-left: .2em; }
.workflow-steps li:last-child { margin-bottom: 0; }
.workflow-steps li::marker { color: var(--accent); font-weight: 400; }
.workflow-steps h3 { margin: 0 0 6px; color: var(--heading); font-size: 18px; line-height: 1.45; font-weight: 400; }
.feature-copy code { font-size: .85em; color: var(--inline-code); padding: .1em .22em; background: var(--inline-background); border-radius: 3px; overflow-wrap: anywhere; }
.feature-list { margin: 0; padding-left: 1.1em; }
.feature-list li { padding-left: .2em; margin-bottom: 16px; }
.feature-list li:last-child { margin-bottom: 0; }
figure { margin: 0; min-width: 0; }
.code-panel { background: var(--code-background); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.feature-tinted .code-panel, .feature-tinted .example-tablist { background: var(--surface); }
.code-panel figcaption { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 49px; padding: 10px 22px; border-bottom: 1px solid var(--line); color: var(--code-caption); font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.copy-button { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: 0 0 auto; padding: 8px; margin: -4px -7px -4px 0; color: var(--muted); border: 1px solid transparent; border-radius: 3px; background: transparent; }
.copy-button:hover { color: var(--ink); border-color: var(--line); background: var(--hover-background); }
.copy-button svg { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.copy-button.is-copied { color: var(--accent); }
.example-tabs { min-width: 0; }
.example-tablist { display: flex; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-bottom: 0; border-radius: 6px 6px 0 0; background: var(--code-background); }
.example-tab { padding: 12px 14px; min-height: 48px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font-size: 14px; font-weight: 600; }
.example-tab:hover { color: var(--ink); background: var(--hover-background); }
.example-tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.example-tab:focus-visible { outline-offset: -4px; }
.example-tabpanel { min-width: 0; }
.casai-examples .example-tablist { gap: 0; padding-inline: 4px; }
.casai-examples .example-tab { flex: 1; min-width: 0; padding-inline: 6px; font-size: 12px; }
.casai-examples pre { max-height: 640px; }
.example-tabpanel .code-panel { border-top-left-radius: 0; border-top-right-radius: 0; }
pre, code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
pre { margin: 0; padding: 25px 23px 28px; overflow-x: auto; font-size: 13px; line-height: 1.8; tab-size: 2; scrollbar-width: thin; }
pre:focus-visible { outline-offset: -3px; }
pre code { color: var(--code-ink); }
.token-keyword { color: var(--token-keyword); }
.token-string { color: var(--token-string); }
.token-comment { color: var(--token-comment); font-style: italic; }
.token-function { color: var(--token-function); }
.token-number { color: var(--token-number); }
.token-delimiter { color: var(--token-delimiter); }
.animation-panel iframe { display: block; width: 100%; border: 0; background: var(--surface); color-scheme: inherit; }
.site-footer { background: var(--brand-deep); color: var(--on-brand); padding-block: 36px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.footer-brand { display: inline-flex; align-items: center; gap: 13px; color: inherit; font-size: 20px; font-weight: 700; text-decoration: none; }
.footer-brand .brand-mark { width: 30px; height: 30px; }
.footer-actions { display: flex; align-items: center; gap: 28px; }
.site-footer nav { display: flex; align-items: center; gap: 28px; color: inherit; font-size: 14px; }
.site-footer nav a { padding-block: 8px; text-decoration: none; white-space: nowrap; }
.site-footer nav a:hover { text-decoration: underline; }
.site-footer a:focus-visible { outline-color: var(--on-brand); }
.footer-appearance { display: flex; flex-shrink: 0; }
.theme-switch { display: inline-flex; gap: 2px; min-width: 0; margin: 0; padding: 2px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.theme-switch label { position: relative; cursor: pointer; }
.theme-switch span { display: flex; align-items: center; justify-content: center; min-width: 48px; min-height: 26px; padding: 3px 10px; border-radius: 4px; color: var(--muted); font-size: 13px; line-height: 20px; font-weight: 600; }
.theme-switch label:hover span { background: var(--hover-background); color: var(--ink); }
.theme-switch input:checked + span { background: var(--accent); color: var(--surface); }
.theme-switch input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.skip-link { position: fixed; top: 12px; left: 12px; transform: translateY(-200%); z-index: 30; padding: 12px 18px; color: var(--ink); background: var(--surface); }
.skip-link:focus { transform: translateY(0); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 1100px) {
  .header-inner { gap: 28px; }
  .primary-nav { gap: 22px; }
  .primary-nav > a, .nav-upcoming { font-size: 14px; }
  .coming-soon { display: none; }
  .nav-upcoming { opacity: 1; }
  pre { font-size: 12px; padding-inline: 18px; }
}
@media (max-width: 820px) {
  .hero { padding-block: 52px 60px; }
  .why { padding-block: 42px 48px; }
  .why-copy { font-size: 19px; }
  .feature { padding-block: 60px; }
  .feature-grid, .feature-reversed .feature-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "example"; gap: 30px; }
  .feature-copy { max-width: 660px; }
  .feature-copy h2 br { display: none; }
  pre { font-size: 14px; padding: 23px; }
  .animation-panel { max-width: 660px; }
}
@media (max-width: 960px) {
  :root { --header-expanded-height: 78px; }
  .site-header { position: static; }
  .site-header.has-menu-toggle { position: sticky; }
  .header-inner { position: static; flex-wrap: wrap; gap: 0; }
  .has-menu-toggle .header-inner { position: sticky; }
  .home-link { padding-block: 6px; }
  .home-link .brand-mark { width: calc(44px - 16px * var(--header-shrink)); height: calc(44px - 16px * var(--header-shrink)); }
  .brand-name { font-size: calc(22px - 4px * var(--header-shrink)); }
  .menu-toggle:not([hidden]) { display: flex; align-items: center; gap: 12px; min-height: 44px; margin-left: auto; padding: 8px 0 8px 16px; color: var(--on-brand); background: none; border: 0; font-size: 15px; }
  .menu-toggle span { font-size: 20px; }
  .primary-nav { position: relative; order: 1; flex: 0 0 100%; width: 100%; flex-direction: column; flex-wrap: nowrap; align-items: stretch; justify-content: flex-start; gap: 0; margin-left: 0; padding-bottom: 18px; }
  .has-menu-toggle .primary-nav { position: absolute; top: 100%; left: 0; padding-inline: clamp(16px, 2vw, 32px); max-height: calc(100dvh - var(--header-expanded-height)); overflow-y: auto; overscroll-behavior: contain; background: var(--brand); }
  .primary-nav > .github-link { position: absolute; top: 2px; right: 0; margin: 0; }
  .has-menu-toggle .primary-nav > .github-link { right: clamp(16px, 2vw, 32px); }
  .primary-nav > a:not(.github-link), .nav-upcoming { padding-right: 60px; }
  .primary-nav > a, .nav-upcoming { padding-block: 12px; font-size: 16px; }
  .coming-soon { display: inline; font-size: 11px; }
  .nav-upcoming { opacity: 1; }
}
@media (max-width: 620px) {
  .hero { padding-block: 44px 52px; }
  h1 { margin-bottom: 20px; font-size: 64px; }
  .tagline { font-size: 26px; line-height: 1.4; }
  .desktop-break { display: none; }
  .why h2 { font-size: 34px; }
  .why-copy { font-size: 18px; }
  .feature { padding-block: 48px; }
  h2 { font-size: 32px; margin-bottom: 20px; }
  .feature-copy { font-size: 17px; }
  .feature-copy .lead { font-size: 19px; }
  .code-panel figcaption { padding-inline: 16px; }
  pre { padding: 20px 16px; font-size: 12px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 20px; }
  .footer-actions { width: 100%; align-items: flex-start; justify-content: flex-end; gap: 24px; }
  .site-footer nav { flex-direction: column; align-items: flex-end; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
