.model-skip { position: fixed; top: -80px; left: 12px; z-index: 80; padding: 12px; background: var(--fg); color: var(--canvas); }
.model-skip:focus { top: 8px; }
.model-page { padding-bottom: clamp(42px, 6vw, 90px); }
.model-page :is(h1, h2, h3, p, figure, dl, dd) { margin: 0; }
.model-page :is(h1, h2, h3) { line-height: 1.04; text-wrap: balance; }
.model-topline { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0 24px; padding-block: 15px; }
.model-breadcrumb, .model-local-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--muted); }
.model-local-nav { gap: 18px; }
.model-topline a { color: inherit; text-decoration: none; padding-block: 9px; }
.model-topline a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.model-head { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); align-items: center; gap: clamp(28px, 5vw, 82px); padding-block: 20px clamp(42px, 6vw, 88px); }
.model-head > *, .model-section > * { min-width: 0; }
.model-provider, .model-kicker, .model-identity > span { font: 550 11px/1.35 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.model-provider { display: flex; align-items: center; gap: 8px; }
.model-provider i { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); }
.model-head h1 { margin-block: 18px; color: var(--fg); font-size: clamp(46px, 5.1vw, 82px); font-weight: 550; letter-spacing: -.068em; overflow-wrap: anywhere; }
.model-description { max-width: 53ch; color: var(--muted); font-size: clamp(16px, 1.3vw, 20px); line-height: 1.52; text-wrap: pretty; }
.model-identity { display: grid; gap: 6px; margin-top: 24px; }
.model-identity code { color: var(--fg); font: 500 13px/1.55 var(--mono); overflow-wrap: anywhere; }
.model-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.model-example { min-width: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.model-example img, .model-example video { display: block; width: 100%; height: auto; max-height: 56vh; aspect-ratio: 16 / 10; object-fit: contain; background: #141714; }
.model-example audio { display: block; width: calc(100% - 40px); margin: 28px auto; }
.model-example blockquote { margin: 0; padding: clamp(20px, 3vw, 40px); border-bottom: 1px solid var(--line); font: 500 clamp(16px, 1.45vw, 22px)/1.45 var(--ui); letter-spacing: -.02em; }
.model-example blockquote p + p { margin-top: 1em; }
.model-demo { display: block; color: inherit; text-decoration: none; border-radius: 12px; }
.model-demo .model-example img { aspect-ratio: auto; max-height: none; }
.model-example--code pre { margin: 0; padding: clamp(14px, 2vw, 30px); white-space: pre-wrap; overflow-wrap: anywhere; background: var(--paper-3); color: var(--fg); border-bottom: 1px solid var(--line); font: 500 clamp(12px, 1.15vw, 16px)/1.65 var(--mono); }
.model-example figcaption .model-demo-action { width: fit-content; margin-top: 6px; color: var(--fg); font-weight: 600; }
.model-demo:hover .model-demo-action, .model-demo:focus-visible .model-demo-action { text-decoration: underline; text-underline-offset: 3px; }
.model-example figcaption { display: grid; gap: 4px; padding: 14px 18px; }
.model-example figcaption strong { font: 600 15px/1.35 var(--ui); }
.model-example figcaption span { color: var(--muted); font: 400 13px/1.48 var(--ui); }
.model-interface { padding: clamp(22px, 3.4vw, 48px); border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.model-interface .model-kicker { display: inline-block; padding-bottom: 12px; border-bottom: 3px solid var(--lime); color: var(--fg); }
.model-interface .model-identity code { font-size: clamp(17px, 1.9vw, 28px); line-height: 1.32; letter-spacing: -.04em; }
.model-interface .model-facts { margin-top: 20px; }
.model-section, .model-gallery { padding-block: clamp(32px, 4.5vw, 68px); border-top: 1px solid var(--line); scroll-margin-top: var(--header-height); }
.model-section { display: grid; grid-template-columns: minmax(0, .65fr) minmax(0, 1.35fr); gap: clamp(24px, 5vw, 75px); }
.model-page h2 { font-size: clamp(29px, 3.2vw, 48px); font-weight: 550; letter-spacing: -.055em; }
.model-page h3 { font-size: 21px; letter-spacing: -.035em; font-weight: 550; }
.model-facts + h3 { margin-top: 28px; }
#parameters { scroll-margin-top: calc(var(--header-height) + 18px); }
.model-link { display: inline-block; margin-top: 16px; color: var(--fg); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; font-weight: 550; font-size: 14px; }
.model-link:hover { text-decoration-color: currentColor; }
.model-facts > div, .model-params > li { display: grid; grid-template-columns: minmax(110px, .65fr) minmax(0, 1.35fr); gap: min(18px, 3vw); padding-block: 12px; border-bottom: 1px solid var(--line); }
.model-facts dt { color: var(--muted); }
.model-facts dd, .model-params li > div, .model-rates th { overflow-wrap: anywhere; }
.model-facts, .model-params, .model-rates { font: 400 15px/1.5 var(--ui); }
.model-uses { margin: 0; padding: 0; list-style: none; }
.model-uses li { padding-block: 14px; border-bottom: 1px solid var(--line); font-size: clamp(17px, 1.4vw, 21px); line-height: 1.45; }
.model-uses li:first-child { padding-top: 0; }
.model-page .model-params { list-style: none; margin: 15px 0 0; padding: 0; }
.model-params li > :only-child { grid-column: 1 / -1; }
.model-params p + p { margin-top: 4px; }
.model-facts dd code { color: var(--fg); font: 500 13px/1.55 var(--mono); }
.model-local-nav a:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
.model-params code { color: var(--fg); font: 550 13px/1.55 var(--mono); }
.model-params small, .model-rates small { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }
.model-gallery > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 30px); margin-top: 26px; }
.model-rates { width: 100%; border-collapse: collapse; }
.model-rates th, .model-rates td { padding: 12px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-weight: 400; }
.model-rates thead th { padding-top: 0; font: 500 11px/1.3 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.model-rates th:first-child { padding-right: 16px; }
.model-rates th:last-child, .model-rates td:last-child { text-align: right; white-space: nowrap; }
.model-rates td:last-child { font-variant-numeric: tabular-nums; font-weight: 600; }
@media (max-width: 760px) {
  .model-topline { padding-block: 8px 15px; }
  .model-head, .model-section { grid-template-columns: minmax(0, 1fr); }
  .model-head { padding-top: 10px; }
  .model-gallery > div { grid-template-columns: minmax(0, 1fr); }
  .model-facts > div, .model-params > li { grid-template-columns: minmax(90px, .7fr) minmax(0, 1.3fr); }
  .model-example img, .model-example video { max-height: 60vh; }
}

.model-billing-notes { padding-left: 18px; font: 14px/1.5 var(--ui); color: var(--muted); }
.model-motion { display: none; margin: 10px 0 0 auto; padding: 7px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--fg); font: 550 13px/1.4 var(--ui); cursor: pointer; }
[data-motion] .model-motion { display: block; }
.model-page .model-updated { margin-top: 18px; font: 13px/1.45 var(--ui); color: var(--muted); }

.model-media-source { width: fit-content; font: 500 12px/1.4 var(--ui); color: var(--muted); text-underline-offset: 3px; }
.model-result { display: block; cursor: zoom-in; }
.model-lead { scroll-margin-top: calc(var(--header-height) + 14px); }
.model-example > img, .model-example > video, .model-result > img { background: var(--canvas); }
.model-references { margin-top: 9px; padding-top: 12px; border-top: 1px solid var(--line); }
.model-references > p, .model-media-spec { color: var(--muted); font: 500 11px/1.4 var(--mono); }
.model-references ul { display: flex; flex-wrap: wrap; align-items: start; gap: 8px; margin: 7px 0 0; padding: 0; list-style: none; }
.model-references ul + p { margin-top: 14px; }
.model-references blockquote { margin: 5px 0 0; color: var(--fg); font: 400 14px/1.5 var(--ui); }
.model-references a { display: grid; justify-items: start; gap: 3px; color: var(--fg); text-decoration: none; }
.model-references a:hover span, .model-references a:focus-visible span { text-decoration: underline; }
.model-example .model-references img, .model-example .reference-type {
  display: grid; place-items: center; width: 68px; height: 49px; border: 1px solid var(--line); border-radius: 5px;
  object-fit: cover; background: var(--canvas); font: 500 11px/1.25 var(--mono);
}
.model-example .model-references a > span { max-width: 12ch; color: var(--muted); font: 500 11px/1.3 var(--ui); }
.model-viewer { width: fit-content; max-width: min(1100px,95vw); max-height: 92dvh; margin: auto; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--fg); }
.model-viewer::backdrop { background: #09100ed9; }
.model-viewer header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 8px 14px; }
.model-viewer h2 { font: 600 16px/1.3 var(--ui); }
.model-viewer button { min-height: 38px; padding: 4px 11px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--fg); font: 500 14px/1.4 var(--ui); cursor: pointer; }
.model-viewer-media > :is(img,video) { display: block; max-height: 78dvh; max-width: min(1100px,94vw); object-fit: contain; }
.model-viewer-media audio { display: block; width: min(82vw,560px); margin: 14px; }

.model-fact-notes, .model-format-list { margin: 0; padding-left: 1.15em; }
.model-fact-notes li + li, .model-format-list li + li, .model-billing-notes li + li { margin-top: 4px; }
.model-params li > div > p { max-width: 65ch; }
.model-format-list { max-width: 64ch; margin-top: 4px; color: var(--muted); font-size: 13px; }
.model-rates sup { margin-left: 3px; font: 600 11px/1 var(--mono); }
.model-rates sup a { color: var(--muted); text-underline-offset: 2px; }
.model-billing-notes li { max-width: 70ch; scroll-margin-top: calc(var(--header-height) + 20px); }

@media (max-width: 600px) {
  .model-params > li { grid-template-columns: minmax(0, 1fr); gap: 5px; padding-block: 12px; }
  .model-params > li > div:first-child { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 9px; }
  .model-params small { margin-top: 0; font-size: 12px; }
}

.model-params > li { scroll-margin-top: calc(var(--header-height) + 12px); }
.model-page .model-param-group {
  margin: 30px 0 0; color: var(--muted);
  font: 550 13px/1.4 var(--ui);
}
.model-page .model-param-group + .model-params { margin-top: 5px; }
.model-params--names { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%, 21ch),1fr)); gap: 0 18px; }
.model-params--names > li { display: block; padding-block: 9px; }
.model-option-note, .model-value-heading { color: var(--muted); font: 500 13px/1.45 var(--ui); }
.model-page .model-option-note { margin-top: 5px; }
.model-values {
  display: flex; align-items: start; flex-wrap: wrap; gap: 4px 5px;
  list-style: none; margin: 6px 0 0; padding: 0;
}
.model-values > li {
  max-width: 100%; min-width: 0; padding: 2px 6px; border-radius: 4px;
  background: var(--paper-3); color: var(--fg);
  font: 400 12px/1.45 var(--mono); overflow-wrap: anywhere;
}
.model-values--dense {
  display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%, 16ch),1fr));
  gap: 0 12px; font: 12px/1.45 var(--mono);
}
.model-values--dense > li {
  padding: 5px 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent;
}
.model-size-group { margin-top: 10px; }
.model-size-group .model-values--dense { grid-template-columns: repeat(auto-fill,minmax(min(100%, 10ch),1fr)); }
.model-rates .model-rate-group th {
  padding: 15px 8px 6px; background: var(--paper-3); color: var(--fg);
  text-align: left; font-weight: 600; white-space: normal;
}
.model-rates sup a:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
.model-billing { margin-top: 22px; padding-top: 15px; border-top: 1px solid var(--line); }
.model-billing h3 { font: 600 15px/1.4 var(--ui); letter-spacing: 0; }
.model-billing .model-billing-notes { margin: 7px 0 0; }
