:root {
  --ink: #11110f;
  --muted: #686762;
  --muted-light: #9c9b93;
  --paper: #f5f5f1;
  --white: #ffffff;
  --line: #deddd6;
  --blue: #1769ff;
  --blue-deep: #075beb;
  --blue-soft: #e8efff;
  --shadow: 0 22px 58px rgba(17, 17, 15, .14);
  --font: "SF Pro Display", "SF Pro Text", Inter, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--white); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-underline-offset: 3px; }
::selection { background: var(--blue); color: var(--white); }
:focus-visible { outline: 3px solid rgba(23, 105, 255, .35); outline-offset: 4px; }
.shell { width: min(1240px, calc(100% - 80px)); margin: 0 auto; }
.skip-link { position: fixed; z-index: 20; top: 12px; left: 12px; padding: 10px 13px; border-radius: 8px; background: var(--ink); color: var(--white); transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }

.site-header { position: sticky; z-index: 10; top: 0; border-bottom: 1px solid rgba(222, 221, 214, .78); background: rgba(245, 245, 241, .89); backdrop-filter: blur(18px); transition: background-color 180ms ease, border-color 180ms ease, backdrop-filter 180ms ease; }
.site-header.is-top { border-bottom-color: transparent; background: transparent; backdrop-filter: none; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 32px; }
.brand-lockup { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--ink); text-decoration: none; }
.sourcebook-mark { flex: 0 0 auto; width: 31px; height: 31px; }
.sourcebook-wordmark { color: var(--ink); font-family: "SF Pro Rounded", "SF Pro Display", system-ui, sans-serif; font-size: 20px; font-weight: 760; letter-spacing: -.025em; line-height: 1; white-space: nowrap; }
.sourcebook-wordmark span { margin-left: 5px; color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; vertical-align: middle; }
.desktop-nav { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.desktop-nav a { color: #53524d; font-size: 14px; font-weight: 630; text-decoration: none; transition: color .18s ease; }
.desktop-nav a:hover { color: var(--ink); }
.github-nav-link, .github-button { display: inline-flex; align-items: center; gap: 7px; }
.github-nav-link svg { width: 16px; height: 16px; fill: currentColor; }
.header-actions { display: flex; align-items: center; gap: 9px; }
.language-toggle { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid rgba(194, 193, 186, .78); border-radius: 8px; background: rgba(255, 255, 255, .54); }
.language-option { min-width: 29px; min-height: 29px; padding: 0 7px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font: inherit; font-size: 11px; font-weight: 730; letter-spacing: .02em; cursor: pointer; transition: background .18s ease, color .18s ease; }
.language-option:hover { color: var(--ink); }
.language-option.is-active { background: var(--white); color: var(--ink); box-shadow: 0 1px 3px rgba(17, 17, 15, .1); }
.header-download { flex: 0 0 auto; padding: 11px 15px; border-radius: 8px; background: var(--ink); color: var(--white); font-size: 13px; font-weight: 730; text-decoration: none; transition: background .18s ease, transform .18s ease; }
.header-download:hover { background: #32312d; transform: translateY(-1px); }

.hero { overflow: hidden; padding: clamp(72px, 8vw, 112px) 0 88px; background: var(--white); }
.hero-grid { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-copy { position: relative; z-index: 2; display: grid; justify-items: center; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 1200px; margin-bottom: 24px; font-size: clamp(50px, 5.4vw, 78px); font-weight: 760; letter-spacing: -.05em; line-height: .96; }
.hero-lede { max-width: 680px; margin-bottom: 30px; color: #4f4e49; font-size: 18px; line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; border-radius: 9px; font-size: 14px; font-weight: 700; text-decoration: none; transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { padding: 8px 19px 8px 15px; background: var(--blue); box-shadow: 0 11px 24px rgba(23, 105, 255, .24); color: var(--white); }
.button-primary:hover { background: var(--blue-deep); }
.button-primary svg { width: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.button-primary span { display: grid; gap: 1px; }
.button-primary strong { font-size: 14px; }
.button-primary small { color: rgba(255, 255, 255, .77); font-size: 11px; font-weight: 560; }
.button-secondary { padding: 0 17px; border: 1px solid #cbc9c2; color: var(--ink); }
.button-secondary:hover { border-color: #898780; background: var(--white); }
.github-button svg { width: 19px; height: 19px; fill: currentColor; }
.hero-visual { position: relative; width: 100%; max-width: 1020px; min-width: 0; aspect-ratio: 1.9 / 1; margin-top: 28px; overflow: hidden; isolation: isolate; }
.hero-visual img { position: relative; z-index: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-visual::after { position: absolute; z-index: 1; inset: 0; content: ""; pointer-events: none; background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0) 11%, rgba(255, 255, 255, 0) 89%, #fff 100%), linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0) 9%, rgba(255, 255, 255, 0) 91%, #fff 100%); }

.section { padding: 136px 0; }
h2 { margin-bottom: 0; font-size: clamp(38px, 4vw, 58px); font-weight: 740; letter-spacing: -.04em; line-height: 1.02; }
.pick-section { background: var(--paper); }
.pick-layout { display: grid; grid-template-columns: .75fr 1.25fr; align-items: center; gap: clamp(48px, 8vw, 128px); }
.pick-intro p:not(.formats-label) { max-width: 402px; margin: 23px 0 28px; color: var(--muted); font-size: 16px; line-height: 1.6; }
.title-accent { display: inline-block; }
.title-accent-pick, .title-accent-pack { font-family: "Iowan Old Style", "Baskerville", Georgia, serif; font-weight: 700; letter-spacing: -.055em; line-height: .98; }
.picker-capture { aspect-ratio: 2.25 / 1; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--white); box-shadow: var(--shadow); }
.picker-capture img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center bottom; }
.supported-formats { display: grid; justify-items: start; padding-top: 4px; }
.formats-label { margin: 0 0 17px; color: var(--muted); font-size: 13px; font-weight: 680; }
.supported-types { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 11px 18px; max-width: 1030px; padding: 0; margin: 0; list-style: none; }
.supported-types li { display: inline-flex; align-items: center; gap: 7px; color: #4f4e49; font-size: 13px; font-weight: 680; white-space: nowrap; }
.format-icon { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: var(--blue); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.75; }

.feature-section { background: var(--white); }
.feature-layout { display: grid; grid-template-columns: 1.25fr .75fr; align-items: center; gap: clamp(48px, 8vw, 128px); }
.feature-intro { grid-column: 2; }
.feature-intro p:not(.section-label), .download-copy > p:not(.section-label) { max-width: 402px; margin: 23px 0 28px; color: var(--muted); font-size: 16px; line-height: 1.6; }
.text-link { color: var(--blue); font-size: 15px; font-weight: 720; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.product-shot { grid-column: 1; grid-row: 1; min-width: 0; margin: 0; }
.product-shot img { display: block; width: 100%; border-radius: 14px; box-shadow: var(--shadow); }
.desktop-shot { aspect-ratio: 2.2 / 1; overflow: hidden; border-radius: 14px; }
.desktop-shot img { width: 100%; height: 100%; object-fit: cover; object-position: center bottom; }
.agent-flow { margin-top: 82px; }
.agent-flow > p { margin: 0 0 17px; color: var(--muted); font-size: 13px; font-weight: 680; text-align: center; }
.agent-viewport { position: relative; overflow: hidden; padding-block: 4px; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.agent-track { display: flex; width: max-content; animation: agent-flow 32s linear infinite; }
.agent-list { display: flex; flex: 0 0 auto; gap: 12px; padding: 0 6px; margin: 0; list-style: none; }
.agent-list li { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px 0 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: #373631; font-size: 14px; font-weight: 700; white-space: nowrap; }
.agent-icon { display: block; flex: 0 0 auto; width: 25px; height: 25px; object-fit: contain; }
.grok-icon { color: #11110f; }
@keyframes agent-flow { to { transform: translateX(-50%); } }

.principle-section { padding: 102px 0; background: #d9e5ff; }
.principle-inner { display: grid; grid-template-columns: 1fr .58fr; gap: 48px; align-items: end; }
.principle-inner p:last-child { max-width: 455px; margin: 0 0 4px auto; color: #31507e; font-size: 18px; line-height: 1.55; }

.download-section { padding: 140px 0; background: var(--white); }
.download-panel { display: grid; grid-template-columns: .84fr 1.16fr; gap: 84px; padding: 58px; border-radius: 19px; background: var(--ink); color: var(--white); }
.download-copy > p:not(.section-label) { color: #b9b8b2; }
.download-options { display: grid; gap: 10px; }
.download-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border: 1px solid #343430; border-radius: 11px; background: #171716; }
.download-tab { min-height: 38px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: #8f8e88; font: inherit; font-size: 13px; font-weight: 720; cursor: pointer; transition: background .18s ease, color .18s ease; }
.download-tab:hover { color: var(--white); }
.download-tab.is-active { background: #30302d; color: var(--white); }
.download-tab-panel { display: grid; gap: 10px; }
.download-tab-panel[hidden] { display: none; }
.download-option { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px; min-height: 76px; padding: 14px 17px; border: 1px solid var(--white); border-radius: 10px; background: var(--white); color: var(--ink); text-decoration: none; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.download-option:hover, .download-option.recommended:hover { border-color: #9ebdff; background: #f4f7ff; transform: translateX(3px); }
.download-option.recommended { border-color: var(--white); background: var(--white); }
.download-option span:first-child { display: grid; gap: 4px; }
.download-option strong { font-size: 15px; }
.download-option small { color: #64635e; font-size: 12px; }
.option-action { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 0 13px; border-radius: 7px; background: var(--blue); color: var(--white); font-size: 12px; font-weight: 720; }
.download-option:hover .option-action { background: #2050b5; }
.release-note { grid-column: 2; margin: -33px 0 0; color: #96958e; font-size: 12px; }
.release-note a { color: #e1e0db; }

.site-footer { padding: 28px 0; border-top: 1px solid var(--line); background: var(--white); }
.footer-inner { display: flex; align-items: center; gap: 22px; }
.footer-brand .sourcebook-mark { width: 28px; height: 28px; }
.footer-brand .sourcebook-wordmark { font-size: 18px; }
.footer-inner > div { display: flex; gap: 18px; margin-left: auto; }
.footer-inner a { color: var(--muted); font-size: 13px; font-weight: 630; text-decoration: none; }
.footer-inner a:hover { color: var(--ink); }

@media (max-width: 960px) {
  .shell { width: min(100% - 48px, 760px); }
  .desktop-nav { display: none; }
  .hero { padding-top: 82px; }
  .pick-layout, .feature-layout, .download-panel { grid-template-columns: 1fr; }
  .feature-intro, .product-shot { grid-column: auto; grid-row: auto; }
  .principle-inner { grid-template-columns: 1fr; gap: 22px; }
  .principle-inner p:last-child { margin-left: 0; }
  .feature-section { padding-bottom: 88px; }
  .agent-flow { margin-top: 62px; }
  .download-panel { gap: 46px; padding: 40px; }
  .release-note { grid-column: auto; margin: -24px 0 0; }
}

@media (max-width: 560px) {
  .shell { width: calc(100% - 36px); }
  .header-inner { height: 64px; gap: 12px; }
  .sourcebook-mark { width: 28px; height: 28px; }
  .sourcebook-wordmark { font-size: 18px; }
  .sourcebook-wordmark span { display: none; }
  .header-download { padding: 9px 11px; font-size: 12px; }
  .header-actions { gap: 6px; }
  .language-toggle { padding: 2px; }
  .language-option { min-width: 27px; min-height: 27px; padding-inline: 5px; }
  .header-download .download-platform { display: none; }
  .hero { padding: 60px 0 62px; }
  h1 { font-size: clamp(43px, 13.2vw, 59px); }
  .hero-lede { font-size: 16px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .button { width: 100%; }
  .hero-visual { aspect-ratio: 16 / 9; margin-top: 30px; }
  .section { padding: 80px 0; }
  h2 { font-size: 38px; }
  .product-shot img, .desktop-shot img { border-radius: 9px; transform: none; }
  .picker-capture { aspect-ratio: 2.25 / 1; }
  .supported-formats { padding-top: 20px; }
  .formats-label { margin-bottom: 10px; font-size: 12px; }
  .supported-types { gap: 9px 14px; }
  .supported-types li { font-size: 12px; }
  .format-icon { width: 15px; height: 15px; }
  .agent-flow { margin-top: 52px; }
  .agent-list li { min-height: 44px; padding-right: 13px; font-size: 13px; }
  .agent-icon { width: 24px; height: 24px; }
  .principle-section { padding: 74px 0; }
  .principle-inner p:last-child { font-size: 16px; }
  .download-section { padding: 80px 0; }
  .download-panel { padding: 28px 20px; border-radius: 13px; }
  .download-option { gap: 10px; min-height: 71px; padding-inline: 12px; }
  .footer-inner { flex-wrap: wrap; gap: 12px 16px; }
  .footer-inner > div { width: 100%; margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .site-header { transition: none; }
  .agent-track { animation: none; }
}
