@import url("./tokens.css");

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 32px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }
button, a, input, select { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .4; }
button, select { color: inherit; }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, pre:focus-visible, .table-scroll:focus-visible, summary:focus-visible { outline: 3px solid var(--accent-dark); outline-offset: 5px; }
svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
button svg { width: 20px; height: 20px; display: block; }
code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
.wrap { width: min(1180px, calc(100% - 80px)); margin-inline: auto; }
.header { display: flex; align-items: center; justify-content: space-between; min-height: 100px; border-bottom: 1px solid var(--line); }
.wordmark { font-size: 1.75rem; letter-spacing: -1.4px; font-weight: 750; display: inline-flex; align-items: center; gap: 10px; line-height: 1; }
.wordmark > span { color: var(--accent-dark); margin-left: -9px; }
.wordmark svg { width: 31px; height: 31px; fill: var(--ink); stroke: var(--paper); stroke-width: .6; }
.wordmark svg .fold { fill: var(--accent); stroke: var(--ink); }
nav { display: flex; gap: 32px; align-items: center; font-size: .875rem; }
nav a { padding-block: 8px; }
nav a:hover, .inline-link:hover { color: var(--accent-dark); }
nav .nav-github { border: 1px solid var(--line); border-radius: 6px; padding: 8px 17px; }
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px 60px; align-items: center; padding-block: 68px 32px; }
.eyebrow { font: 600 .75rem/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing: 1.5px; margin: 0 0 22px; display: flex; align-items: center; gap: 12px; }
.rule { height: 1px; width: 27px; background: var(--ink); flex-shrink: 0; }
h1 { font: 400 clamp(3rem, 5.6vw, 5.4rem)/1.07 Georgia, "Times New Roman", serif; letter-spacing: -3px; margin: 0; }
h1 em { font-weight: 400; color: var(--accent-dark); }
.hero-actions { display: flex; align-items: center; gap: 24px; margin-top: 32px; }
.primary-link { display: inline-flex; justify-content: center; align-items: center; padding: 12px 22px; min-height: 46px; background: var(--ink); color: var(--white); border-radius: 6px; font-size: .875rem; font-weight: 500; transition: background .15s; }
.primary-link:hover { background: #2c5043; }
.inline-link { font-size: .875rem; text-decoration: underline; text-decoration-color: #a6b2a3; text-underline-offset: 5px; }
.hero-intro { padding-top: 15px; }
.hero-intro > p:first-child { font-size: 1.125rem; line-height: 1.75; max-width: 390px; margin: 0 0 26px; color: var(--subtle); }
.install { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px 10px 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); max-width: 390px; box-shadow: 0 3px 0 #173a3405; }
.install code { font-size: .875rem; }
.icon-button { background: transparent; border: 0; padding: 10px; border-radius: 4px; }
.icon-button:hover { background: var(--paper); }
.hero-note { display: flex; flex-wrap: wrap; gap: 7px 12px; font-size: .8125rem; color: var(--subtle); margin: 14px 0 0; }
.hero-note span + span:before { content: "·"; margin-right: 12px; }
.integration-strip { grid-column: 1/-1; display: flex; justify-content: space-between; align-items: center; gap: 22px; border-top: 1px solid var(--line); padding-block: 22px 0; font-size: .875rem; }
.integration-strip > span { color: var(--subtle); }
.integration-strip ul { list-style: none; display: flex; flex-wrap: wrap; gap: 25px; margin: 0; padding: 0; font-weight: 500; }
.integration-strip .typed-note { font-size: .8125rem; }

.playground { margin-top: 18px; }
.reader-bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 30px; border: 1px solid var(--line); border-bottom: 0; border-radius: 14px 14px 0 0; background: var(--white); }
.reader-bar .eyebrow { margin: 0 0 6px; }
.reader-bar h2 { font: 400 1.5rem/1.2 Georgia, serif; letter-spacing: -.5px; margin: 0; }
.source-tabs { padding: 4px; display: flex; flex-shrink: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.source-tabs button, .code-tabs button, .reference-nav button { border: 0; background: transparent; padding: 9px 16px; font-size: .875rem; border-radius: 5px; color: var(--subtle); }
.source-tabs button[aria-pressed=true] { background: var(--ink); color: var(--white); box-shadow: 0 2px 4px #173a3415; }
.source-tabs button:hover:not([aria-pressed=true]) { color: var(--ink); background: #e8ecdf; }
.book-stage { position: relative; padding-top: 12px; background: radial-gradient(ellipse at 50% 36%, #f5f6ef, #e5eadf); border-inline: 1px solid var(--line); overflow: hidden; }
.book-stage:before { content: ""; position: absolute; width: 760px; height: 760px; border-radius: 50%; border: 1px solid #d5ddce; top: -160px; left: calc(50% - 380px); pointer-events: none; }
.book-stage #book { position: relative; }
.stage-caption { position: relative; display: flex; justify-content: space-between; gap: 20px; padding: 12px 30px 18px; font-size: .8125rem; color: var(--subtle); }
.reader-controls { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 26px; border: 1px solid var(--line); border-top: 0; background: var(--white); border-radius: 0 0 14px 14px; }
.page-controls, .reader-options { display: flex; align-items: center; gap: 15px; }
.page-controls #page-counter { font-size: .875rem; min-width: 100px; text-align: center; font-variant-numeric: tabular-nums; }
.round-button { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: transparent; }
.round-button:hover:enabled { background: var(--paper); border-color: #b1bf9c; }
.text-button, .file-button { font-size: .875rem; border: 0; padding: 4px 0; background: transparent; font-weight: 500; text-decoration: underline; text-decoration-color: #a6b2a3; text-underline-offset: 4px; }
.text-button:hover:enabled, .file-button:hover { color: var(--accent-dark); }
.reader-options { font-size: .875rem; gap: 12px; }
.reader-options label[for] { color: var(--subtle); }
select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23173a34' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 9px center/15px; border: 1px solid var(--line); border-radius: 5px; padding: 7px 30px 7px 10px; font-size: .875rem; }
.separator { width: 1px; height: 20px; background: var(--line); margin-inline: 3px; }
.file-button { position: relative; cursor: pointer; }
.file-button:focus-within { outline: 3px solid var(--accent-dark); outline-offset: 5px; }
.file-button input, .sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.cover-options { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding: 16px 4px 0; font-size: .875rem; }
.cover-options > span { color: var(--subtle); }
.reader-message { display: flex; justify-content: space-between; gap: 20px; padding-inline: 4px; min-height: 42px; }
.reader-message p { font-size: .8125rem; color: var(--subtle); margin: 13px 0 0; }
.reader-message #retry { white-space: nowrap; }
.reader-message[data-error=true] p { color: #993e2d; }
.playground-tip { font-size: .875rem; color: var(--subtle); margin: 5px 4px 0; }
.details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px; padding-block: 54px 66px; border-bottom: 1px solid var(--line); }
.detail-icon { display: block; width: 30px; height: 32px; font: 500 1.4rem/32px monospace; color: var(--accent-dark); margin-bottom: 20px; white-space: nowrap; }
.details h3 { font-size: 1rem; font-weight: 600; letter-spacing: -.2px; margin: 0 0 10px; }
.details p { color: var(--subtle); margin: 0; }

.section { padding-block: 78px; border-bottom: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 45px; margin-bottom: 38px; }
.section-heading .eyebrow { margin-bottom: 17px; }
h2 { font: 400 clamp(2rem, 3.5vw, 3.25rem)/1.12 Georgia, serif; letter-spacing: -1.4px; margin: 0; }
.section-heading > p { max-width: 340px; margin: 0 0 3px; color: var(--subtle); }
.example-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; padding: 18px 0; border-block: 1px solid var(--line); margin-bottom: 34px; }
.example-picker > span:first-child { font-size: .875rem; font-weight: 500; }
.picker-note { font-size: .875rem; color: var(--subtle); margin-left: auto; }
.code-layout { display: grid; grid-template-columns: 1fr 1.7fr; gap: 46px; align-items: start; }
.setup { min-width: 0; }
.setup-steps { list-style: none; counter-reset: setup; margin: 0 0 26px; padding: 0; }
.setup-steps > li { position: relative; counter-increment: setup; padding: 0 0 26px 38px; }
.setup-steps > li:before { content: counter(setup); position: absolute; left: 0; top: 1px; display: grid; place-items: center; width: 25px; height: 25px; background: #e8eedb; border-radius: 50%; font-size: .8125rem; font-weight: 600; }
.setup-steps > li:last-child { padding-bottom: 0; }
.setup h3, .support-content h3 { font-size: 1.0625rem; margin: 0 0 9px; font-weight: 600; }
.setup p { font-size: 1rem; color: var(--subtle); margin: 0 0 14px; }
.setup p code, details code { overflow-wrap: anywhere; font-size: .875em; }
.command { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 5px; background: #fff9; padding: 9px 11px; gap: 10px; }
.command code { font-size: .8125rem; overflow-wrap: anywhere; }
.command .text-button { font-size: .8125rem; flex-shrink: 0; }
.setup-help { font-size: .875rem; margin: 12px 0 0; padding: 0; border: 0; }
.setup-help p { margin-top: 12px; }
.setup .setup-hint { background: #e8eedb; color: var(--ink); padding: 12px 14px; border-radius: 5px; margin-bottom: 0; }
.code-panel { border: 1px solid #24493e; border-radius: 10px; overflow: hidden; background: var(--ink); color: #edf2e5; min-width: 0; box-shadow: 0 10px 30px #173a340a; }
.code-tabs { display: flex; padding: 14px 18px; border-bottom: 1px solid #ffffff24; gap: 3px; overflow: auto; }
.code-tabs button { color: #c1d0c4; padding: 7px 12px; border-radius: 4px; white-space: nowrap; }
.code-tabs button[aria-pressed=true] { background: var(--accent); color: var(--ink); }
.code-tabs button:hover:not([aria-pressed=true]) { background: #ffffff0d; }
.code-meta { display: flex; justify-content: space-between; align-items: center; padding: 18px 26px 0; color: #c1d0c4; font: 400 .8125rem/1.5 monospace; }
.code-meta button { color: #d0dfcc; font-size: .875rem; }
pre { margin: 0; padding: 22px 26px; overflow: auto; tab-size: 2; min-height: 320px; max-height: 550px; line-height: 1.85; }
pre code { font-size: .875rem; }
.code-note { margin: 0; padding: 18px 26px 22px; border-top: 1px solid #ffffff1a; color: #c1d0c4; font-size: .875rem; }
.reference-nav { display: flex; gap: 9px; margin-bottom: 25px; flex-wrap: wrap; }
.reference-nav button { border: 1px solid var(--line); padding: 10px 18px; border-radius: 30px; }
.reference-nav button[aria-pressed=true] { background: var(--ink); color: var(--white); border-color: var(--ink); }
.table-scroll { overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: #ffffff60; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .875rem; }
th { font-weight: 500; color: var(--subtle); padding: 15px 20px; border-bottom: 1px solid var(--line); background: #eef1e9; }
td { padding: 17px 20px; border-bottom: 1px solid var(--line); vertical-align: top; }
td:first-child { font-family: "SFMono-Regular", Consolas, monospace; min-width: 170px; }
td:nth-child(2) { min-width: 170px; color: var(--subtle); }
td:last-child { min-width: 280px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #eaf0df70; }
.reference-note { font-size: .875rem; color: var(--subtle); margin: 22px 0 0; }
.support { display: grid; grid-template-columns: 1fr 1.3fr; gap: 90px; }
.support-intro h2 { margin-bottom: 24px; }
.support-intro > p:not(.eyebrow) { color: var(--subtle); max-width: 320px; }
.browser-list { margin: 0 0 20px; }
.browser-list > div { padding: 15px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; font-size: .875rem; }
.browser-list dd { margin: 0; text-align: right; color: var(--subtle); max-width: 190px; }
.muted { color: var(--subtle); font-size: .875rem; line-height: 1.8; }
details p { color: var(--subtle); font-size: 1rem; }
summary { cursor: pointer; }
.faq { display: grid; grid-template-columns: 1fr 1.3fr; gap: 90px; }
.faq-intro { color: var(--subtle); max-width: 290px; margin-top: 24px; }
.faq-list details { border-bottom: 1px solid var(--line); padding-block: 19px; }
.faq-list details:first-child { padding-top: 0; }
.faq-list summary { position: relative; list-style: none; font-size: 1rem; font-weight: 500; padding-right: 32px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary:after { content: "+"; position: absolute; right: 3px; top: -2px; color: var(--accent-dark); font-size: 1.35rem; font-weight: 400; }
.faq-list details[open] summary:after { content: "−"; }
.faq-list details p { margin: 14px 25px 0 0; }
.faq-list .inline-link { display: inline-block; margin-top: 12px; }
.closing { display: flex; justify-content: space-between; align-items: center; gap: 30px; padding: 44px; margin-block: 48px; background: #e8eedb; border: 1px solid #dce5c9; border-radius: 12px; }
.closing .eyebrow { margin-bottom: 14px; }
.closing h2 { font-size: clamp(1.9rem, 3vw, 2.75rem); }
.closing p:not(.eyebrow) { color: var(--subtle); margin: 14px 0 0; }
.closing-actions { display: flex; flex-direction: column; align-items: center; gap: 14px; flex-shrink: 0; }
.footer { border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 28px 40px; }
.footer .wordmark { font-size: 1.3rem; }
.footer p { font-size: .8125rem; color: var(--subtle); }
.footer p span { padding-left: 8px; }
.footer > div { display: flex; gap: 25px; font-size: .875rem; }
.skip-link:focus { position: fixed; z-index: 10; left: 16px; top: 16px; background: var(--accent); padding: 12px 20px; }
[hidden] { display: none !important; }

@media (max-width: 1100px) {
  .wrap { width: calc(100% - 48px); }
  .hero { gap: 38px 35px; }
  .hero h1 { font-size: 4rem; }
  .hero-intro > p:first-child { font-size: 1rem; }
  .integration-strip .typed-note { display: none; }
  .details { gap: 30px; }
  .reader-controls { flex-wrap: wrap; justify-content: center; }
  .reader-options { flex-wrap: wrap; justify-content: center; }
  .code-layout { gap: 30px; grid-template-columns: 1fr 1.5fr; }
  .picker-note { margin-left: 0; }
  .support, .faq { gap: 40px; }
  .browser-list > div { display: block; }
  .browser-list dd { text-align: left; max-width: none; margin-top: 3px; }
}
@media (max-width: 740px) {
  .wrap { width: calc(100% - 36px); }
  .header { min-height: 82px; }
  .wordmark { font-size: 1.5rem; }
  nav { gap: 18px; font-size: .875rem; }
  nav a:first-child, nav .nav-github { display: none !important; }
  .hero { grid-template-columns: 1fr; gap: 28px; padding-block: 42px 24px; }
  .hero h1 { font-size: clamp(2.8rem, 10vw, 4rem); letter-spacing: -2px; }
  .hero .eyebrow { letter-spacing: 1px; font-size: .75rem; }
  .hero-actions { margin-top: 25px; gap: 20px; flex-wrap: wrap; }
  .hero-intro { padding-top: 0; }
  .hero-intro > p:first-child { max-width: 100%; margin-bottom: 20px; }
  .install { max-width: none; }
  .integration-strip { display: block; padding-top: 20px; }
  .integration-strip ul { gap: 12px 22px; margin-top: 10px; }
  .reader-bar { padding: 20px 17px; align-items: start; flex-direction: column; gap: 16px; }
  .reader-bar h2 { font-size: 1.45rem; }
  .reader-bar .eyebrow { letter-spacing: 1px; }
  .source-tabs button { padding: 8px 12px; white-space: nowrap; }
  .book-stage { padding-top: 6px; }
  .stage-caption { padding: 10px 17px 14px; }
  .stage-caption > span:last-child { display: none; }
  .reader-controls { padding: 15px 14px; gap: 15px; }
  .reader-options { gap: 13px; font-size: .875rem; }
  .reader-options > label[for] { display: none; }
  .page-controls { gap: 12px; }
  .page-controls #page-counter { min-width: 80px; }
  .reader-message { gap: 10px; }
  .playground-tip { margin-top: 10px; }
  .details { grid-template-columns: 1fr; gap: 30px; padding-block: 40px 45px; }
  .details > div { display: grid; grid-template-columns: 35px 1fr; column-gap: 17px; }
  .details .detail-icon { grid-row: 1/3; margin: 0; }
  .details h3 { margin: 0 0 6px; }
  .section { padding-block: 48px; }
  .section-heading { display: block; margin-bottom: 28px; }
  .section-heading h2 { font-size: 2.5rem; }
  .section-heading > p { margin-top: 22px; max-width: none; }
  .example-picker { gap: 12px; margin-bottom: 28px; }
  .example-picker > span:first-child { width: 100%; }
  .code-layout { display: flex; flex-direction: column; gap: 30px; }
  .setup { width: 100%; }
  .command code { font-size: .875rem; }
  .code-panel { width: 100%; }
  .code-tabs { padding: 12px 10px; gap: 0; }
  .code-tabs button { padding: 7px 11px; font-size: .875rem; }
  .code-meta { padding-inline: 19px; }
  pre { padding: 22px 19px; min-height: 280px; }
  .code-note { padding-inline: 19px; }
  .reference-nav { gap: 6px; }
  .reference-nav button { padding: 8px 12px; }
  .support, .faq { grid-template-columns: 1fr; gap: 30px; }
  .support-intro > p:not(.eyebrow), .faq-intro { max-width: none; }
  .browser-list > div { display: flex; }
  .browser-list dd { max-width: 160px; text-align: right; }
  .closing { padding: 28px 24px; margin-block: 32px; align-items: start; flex-direction: column; gap: 24px; }
  .closing-actions { flex-direction: row; gap: 24px; }
  .footer { flex-wrap: wrap; gap: 14px; padding-block: 25px; }
  .footer p { margin: 0; }
  .footer > div { width: 100%; margin-top: 10px; }
  .cover-options { gap: 14px; font-size: .875rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .primary-link { transition: none; }
}
