@layer reset, base, components, responsive;
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  body, h1, h2, h3, p { margin: 0; }
  button, input, select, textarea { font: inherit; }
  button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
  button { cursor: pointer; }
  button:disabled { cursor: not-allowed; opacity: .48; }
  img, svg { max-width: 100%; }
  [hidden] { display: none !important; }
}
@layer base {
  :root { --ink: #252436; --muted: #727182; --purple: #6554c8; --purple-dark: #5140ac; --lavender: #f0edf9; --border: #e5e4eb; --page: #fcfcfe; --radius: 12px; }
  html { scroll-behavior: smooth; scroll-padding-top: 100px; }
  body { background: var(--page); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
  a { color: var(--purple); text-decoration: none; text-underline-offset: 3px; }
  a:hover { text-decoration: underline; }
  button, input, textarea, select { color: inherit; }
  button { background: transparent; }
  :focus-visible { outline: 3px solid #9788e1; outline-offset: 4px; }
  h1, h2, h3 { line-height: 1.15; font-weight: 600; letter-spacing: -.045em; }
  h1 { font-size: clamp(36px, 4.6vw, 60px); }
  h2 { font-size: 32px; }
  h3 { font-size: 21px; }
  p + p { margin-top: 14px; }
  code, pre { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 12px; }
  p code, td code { padding: 2px 5px; background: #f0eff5; border-radius: 4px; overflow-wrap: anywhere; }
  input:not([type="range"]), textarea, select { display: block; width: 100%; min-width: 0; border: 1px solid var(--border); border-radius: 7px; background: #fff; padding: 10px 12px; outline-offset: 1px; font-size: 13px; }
  input::placeholder, textarea::placeholder { color: #96939f; }
  textarea { resize: vertical; line-height: 1.6; }
  input[type="range"] { width: 100%; accent-color: var(--purple); }
  label { display: block; font-size: 12px; font-weight: 500; }
  label + input, label + textarea, label + select { margin-top: 7px; }
  fieldset { min-width: 0; margin: 0; border: 0; }
  legend { padding: 0; font-weight: 600; }
}
@layer components {
  .container { width: min(1184px, calc(100% - 96px)); margin-inline: auto; }
  .site-header { height: 82px; background: #fcfcfef5; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(12px); }
  .header-inner { width: min(1320px, calc(100% - 96px)); height: 100%; margin: auto; display: flex; align-items: center; gap: 64px; }
  .brand { color: var(--ink); font-size: 20px; font-weight: 600; white-space: nowrap; }
  .brand:hover { text-decoration: none; }
  .site-header nav { display: flex; gap: 30px; align-items: center; height: 100%; }
  .site-header nav a { font-size: 13px; color: var(--muted); height: 100%; display: flex; align-items: center; border-bottom: 2px solid transparent; padding-top: 2px; }
  .site-header nav a:hover, .site-header nav [aria-current] { color: var(--purple); text-decoration: none; border-bottom-color: var(--purple); }
  .header-cta { margin-left: auto; }
  .button { display: inline-flex; justify-content: center; align-items: center; gap: 16px; border: 1px solid var(--border); background: white; border-radius: 7px; font-size: 13px; font-weight: 500; padding: 11px 19px; line-height: 1.5; color: var(--ink); transition: background .15s, transform .15s; }
  .button:hover { background: #f5f3fb; text-decoration: none; }
  .button:active { transform: translateY(1px); }
  .button.primary { color: white; background: var(--purple); border-color: var(--purple); box-shadow: 0 3px 5px #5140ac12; }
  .button.primary:hover { background: var(--purple-dark); }
  .button.small { padding: 8px 14px; font-size: 12px; }
  .full-width { width: 100%; }
  .text-link { font-size: 13px; font-weight: 500; display: inline-flex; gap: 14px; align-items: center; }
  .eyebrow { color: var(--muted); font-size: 10px; letter-spacing: .14em; font-weight: 600; margin-bottom: 20px; }
  .home-hero { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; padding-block: 56px 24px; align-items: center; }
  .hero-copy h1 { font-size: clamp(36px, 3.6vw, 46px); line-height: 1.15; }
  .hero-copy { min-width: 0; }
  .hero-description { color: var(--muted); max-width: 430px; margin-top: 25px; font-size: 16px; line-height: 1.85; }
  .hero-actions { display: flex; align-items: center; gap: 25px; margin-top: 30px; }
  .hero-note { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; margin-top: 26px; }
  .dot-divider { color: #b8b5c7; }
  .section { padding-block: 65px; }
  .section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 30px; }
  .section-heading .eyebrow { margin-bottom: 12px; }
  .section-heading h2 { font-size: 29px; }
  .model-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .model-card { padding: 23px; border: 1px solid var(--border); border-radius: var(--radius); background: white; min-width: 0; display: flex; flex-direction: column; transition: box-shadow .18s, border-color .18s; }
  .model-card:hover { box-shadow: 0 5px 22px #25243607; border-color: #cfc6e7; }
  .model-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 20px; }
  .badge { font-size: 9px; line-height: 1.4; color: #8b7438; background: #fbf7e8; border: 1px solid #efe7cb; border-radius: 4px; padding: 4px 7px; white-space: nowrap; }
  .badge.listed { color: #487966; background: #eff6f2; border-color: #d9e9df; }
  .model-card h2, .model-card h3 { font-size: 20px; letter-spacing: -.035em; }
  .model-card h2 a, .model-card h3 a { color: var(--ink); }
  .model-author { font-size: 11px; color: var(--muted); margin-top: 4px; }
  .model-description { font-size: 12px; color: var(--muted); line-height: 1.8; margin-top: 16px; min-height: 65px; }
  .tags { display: flex; gap: 6px; margin-block: 17px 21px; }
  .tags span { font-size: 9px; color: #7b768b; padding: 2px 7px; background: #f7f6fa; border-radius: 4px; }
  .model-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border-top: 1px solid #f0eef4; padding-top: 17px; margin-top: auto; }
  .model-stats div { display: flex; flex-direction: column; gap: 4px; }
  .model-stats span { font-size: 9px; color: var(--muted); }
  .model-stats strong { font-size: 12px; font-weight: 500; }
  .model-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 21px; font-size: 10px; }
  .try-model { font-weight: 600; }
  .source-note { color: var(--muted); font-size: 10px; margin-top: 21px; line-height: 1.8; }
  .code-block { border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: #f8f8fb; min-width: 0; }
  .code-header { display: flex; align-items: center; justify-content: space-between; padding: 9px 17px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 10px; }
  .copy-button { padding: 4px 0; border: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
  .copy-button:hover { color: var(--purple); }
  .copy-button span { padding-left: 7px; }
  pre { margin: 0; padding: 21px; overflow: auto; line-height: 1.9; color: #63578b; tab-size: 2; }
  .site-footer { border-top: 1px solid var(--border); padding: 27px max(48px, calc((100% - 1184px) / 2)); display: flex; align-items: center; justify-content: space-between; font-size: 10px; color: var(--muted); gap: 25px; }
  .site-footer > div, .site-footer nav { display: flex; align-items: center; gap: 25px; }
  .footer-brand { font-size: 14px; letter-spacing: -.5px; font-weight: 600; color: var(--ink); }
  .site-footer nav a { color: var(--muted); }
  .page-top { padding-top: 60px; }
  .page-top h1 { font-size: 48px; }
  .page-description { color: var(--muted); max-width: 585px; margin-top: 22px; }
  .catalog-toolbar { display: flex; gap: 12px; margin-top: 40px; }
  .search-field { display: flex; align-items: center; flex: 1; position: relative; }
  .search-field > span:first-child { position: absolute; left: 14px; font-size: 25px; color: #9993a9; }
  .search-field input { padding-left: 40px; }
  .catalog-toolbar select { height: 44px; }
  .catalog-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-block: 22px 16px; }
  .catalog-meta p + p { margin: 0; }
  .catalog-note { display: flex; align-items: flex-start; gap: 18px; margin-top: 40px; background: #f6f5fa; border: 1px solid #e9e6f2; border-radius: 10px; padding: 25px; color: var(--muted); font-size: 12px; }
  .catalog-note h2 { color: var(--ink); font-size: 16px; margin-bottom: 10px; }
  .note-icon { flex-shrink: 0; border: 1px solid #b9afce; width: 19px; height: 19px; border-radius: 50%; text-align: center; font-size: 11px; color: var(--purple); }
  .empty-state { text-align: center; padding: 70px 20px; }
  .empty-state h2 { font-size: 23px; }
  .empty-state p { margin-block: 15px 22px; color: var(--muted); }
  .docs-layout { display: grid; grid-template-columns: 200px minmax(0, 740px); gap: 65px; padding-block: 48px 75px; }
  .docs-sidebar { align-self: start; position: sticky; top: 122px; }
  .docs-sidebar .eyebrow { margin-bottom: 16px; }
  .docs-sidebar nav { display: flex; flex-direction: column; gap: 3px; }
  .docs-sidebar nav a { font-size: 12px; color: var(--muted); padding: 7px 0; }
  .sidebar-playground { display: block; margin-top: 30px; border: 1px solid var(--border); border-radius: 8px; padding: 16px; font-size: 12px; background: #f8f7fc; }
  .sidebar-playground > span { float: right; }
  .sidebar-playground p { font-size: 10px; color: var(--muted); margin-top: 8px; }
  .docs-content { min-width: 0; }
  .docs-content h1 { font-size: 44px; }
  .docs-content .lead { color: var(--muted); font-size: 16px; margin-top: 20px; }
  .docs-content section { margin-bottom: 48px; }
  .docs-content section + section { border-top: 1px solid var(--border); padding-top: 35px; }
  .docs-content h2 { font-size: 25px; margin-bottom: 20px; }
  .docs-content h2 > span { margin-left: 14px; }
  .docs-content p { font-size: 13px; }
  .docs-content .code-block { margin-block: 20px; }
  .endpoint-bar { margin-top: 27px; border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
  .endpoint-bar > span { color: var(--muted); font-size: 9px; letter-spacing: .07em; }
  .endpoint-bar .copy-button { margin-left: auto; }
  .code-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--border); margin-top: 25px; }
  .code-tabs button { padding: 10px 18px; font-size: 12px; border: 0; border-bottom: 2px solid transparent; color: var(--muted); }
  .code-tabs [aria-selected="true"] { border-color: var(--purple); color: var(--purple); }
  .callout { border-left: 3px solid #a897db; background: #f5f2fc; padding: 17px 20px; border-radius: 0 7px 7px 0; margin-block: 22px; font-size: 12px; }
  .callout p { margin-top: 7px; }
  .endpoint-label { font-family: monospace; font-size: 12px; color: var(--muted); margin-bottom: 20px; }
  .endpoint-label span { color: #367b60; background: #edf5ee; padding: 4px 8px; border-radius: 4px; font-size: 10px; }
  .table-wrap { overflow-x: auto; margin-block: 24px; }
  table { border-collapse: collapse; text-align: left; font-size: 12px; width: 100%; }
  th { font-size: 10px; letter-spacing: .02em; color: var(--muted); background: #f6f5fa; }
  th, td { border-bottom: 1px solid var(--border); padding: 12px; vertical-align: top; }
  td:first-child { white-space: nowrap; }
  .docs-next { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 30px; gap: 20px; }
  .subtle { color: var(--muted); }
  .playground-page { padding-block: 32px 50px; }
  .playground-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
  .playground-title h1 { font-size: 35px; }
  .playground-title .eyebrow { margin-bottom: 9px; }
  .playground-grid { display: grid; grid-template-columns: 274px minmax(0, 1fr); gap: 22px; align-items: start; }
  .playground-settings { border: 1px solid var(--border); border-radius: 10px; background: #fff; }
  .settings-section { padding: 20px; }
  .settings-section h2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; letter-spacing: -.01em; margin-bottom: 20px; }
  .connection-badge { font-size: 9px; padding: 3px 6px; background: #f6f5f8; border-radius: 4px; color: var(--muted); font-weight: 400; white-space: nowrap; }
  .connection-badge.connected { color: #367655; background: #edf6ef; }
  .field-note { font-size: 10px; color: var(--muted); line-height: 1.65; margin-top: 9px; }
  .token-field { position: relative; margin-top: 7px; }
  .token-field input { padding-right: 46px; }
  .token-field .icon-button { position: absolute; right: 5px; top: 5px; }
  .icon-button { border: 0; padding: 7px; border-radius: 4px; font-size: 10px; color: var(--muted); }
  #connect-button { margin-top: 14px; font-size: 11px; }
  .settings-section + .settings-section { border-top: 1px solid var(--border); }
  .settings-section legend { font-size: 13px; padding-top: 16px; }
  .settings-section select, .settings-section textarea, .settings-section input { font-size: 11px; }
  #generation-settings label:not(:first-of-type) { margin-top: 19px; }
  #generation-settings > label { font-size: 11px; }
  #generation-settings { padding-top: 12px; }
  #model-note { overflow-wrap: anywhere; }
  .optional { float: right; font-size: 9px; font-weight: 400; color: var(--muted); }
  .parameter-row { margin-top: 18px; }
  .parameter-row label { font-size: 11px; }
  .parameter-row output { float: right; font-family: monospace; color: var(--purple); }
  .settings-privacy { font-size: 10px; color: var(--muted); padding: 16px 20px; border-top: 1px solid var(--border); background: #f9f9fb; border-radius: 0 0 10px 10px; }
  .chat-panel { border: 1px solid var(--border); border-radius: 10px; background: #fff; display: flex; flex-direction: column; min-width: 0; height: max(680px, calc(100dvh - 242px)); max-height: 950px; overflow: hidden; }
  .chat-toolbar { border-bottom: 1px solid var(--border); padding: 13px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 11px; }
  .chat-toolbar > div { min-width: 0; }
  .mini-dot { display: inline-block; width: 6px; height: 6px; background: #ada4c2; border-radius: 50%; margin-right: 7px; }
  .chat-scroll { flex: 1; overflow-y: auto; padding: 24px; scroll-behavior: smooth; }
  .chat-empty { display: flex; align-items: center; flex-direction: column; text-align: center; justify-content: center; min-height: 100%; padding: 25px 0; }
  .chat-empty h2 { font-size: 25px; }
  .chat-empty p { font-size: 12px; color: var(--muted); line-height: 1.85; margin-top: 13px; }
  .prompt-suggestions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 25px; }
  .prompt-suggestions button { border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; font-size: 10px; color: #716b82; }
  .prompt-suggestions button:hover { background: var(--lavender); }
  .chat-bottom { padding: 0 20px 12px; }
  .request-status { font-size: 10px; color: var(--muted); padding-bottom: 8px; min-height: 24px; }
  #chat-form { border: 1px solid #dcd8e8; border-radius: 9px; padding: 13px; box-shadow: 0 2px 7px #25243605; }
  #chat-form textarea { border: 0; padding: 0; font-size: 12px; resize: none; min-height: 57px; max-height: 200px; }
  .composer-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
  .composer-footer > span { font-size: 9px; color: #908a9b; }
  .composer-footer .button { font-size: 11px; padding: 7px 14px; }
  .under-composer { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 9px; }
  .under-composer > span { font-size: 9px; color: var(--muted); }
  .under-composer .copy-button { font-size: 10px; }
  .request-error { padding: 11px 13px; background: #fff2f2; border: 1px solid #edd4d4; border-radius: 6px; color: #943c46; font-size: 11px; margin-bottom: 12px; overflow-wrap: anywhere; }
  .message { margin-bottom: 27px; }
  .message-heading { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
  .message-heading strong { font-size: 11px; font-weight: 600; }
  .message-text { font-size: 13px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
  .message details { margin: 10px 0; padding: 9px 12px; border: 1px solid var(--border); border-radius: 5px; color: var(--muted); }
  .message summary { font-size: 11px; cursor: pointer; }
  .message details pre { white-space: pre-wrap; overflow-wrap: anywhere; padding: 10px 0 0; font-size: 11px; color: var(--muted); }
  .message-meta { font-size: 10px; color: var(--muted); margin: 8px 0 0; }
  .message .copy-button { margin-left: auto; font-size: 10px; }
  dialog { width: min(750px, calc(100% - 40px)); max-height: 85dvh; border: 1px solid var(--border); border-radius: 12px; padding: 28px; background: var(--page); color: var(--ink); box-shadow: 0 20px 90px #25243630; }
  dialog::backdrop { background: #28213960; backdrop-filter: blur(3px); }
  .dialog-heading { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
  .dialog-heading h2 { font-size: 25px; }
  .dialog-heading .eyebrow { margin-bottom: 10px; }
  dialog > p { font-size: 12px; margin-block: 18px; color: var(--muted); }
  .toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); padding: 10px 18px; background: var(--ink); color: white; border-radius: 7px; box-shadow: 0 4px 18px #0002; font-size: 12px; z-index: 100; }
  .skip-link { position: fixed; left: 16px; top: -100px; padding: 10px; background: white; z-index: 100; }
  .skip-link:focus { top: 10px; }
  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
}
@layer responsive {
  @media (max-width: 1000px) {
    .container, .header-inner { width: calc(100% - 48px); }
    .header-inner { gap: 35px; }
    .model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-hero { gap: 10px; }
    .hero-copy h1 { font-size: 38px; }
    .hero-description { font-size: 14px; }
    .home-hero .hero-actions { gap: 15px; }
    .section .model-grid .model-card:last-child:nth-child(3) { display: none; }
    .docs-layout { gap: 30px; grid-template-columns: 160px minmax(0, 1fr); }
    .playground-grid { grid-template-columns: 245px minmax(0, 1fr); gap: 15px; }
    .settings-section { padding-inline: 15px; }
    .prompt-suggestions { flex-direction: column; }
    .chat-toolbar .subtle { display: none; }
    .site-footer { padding-inline: 24px; }
  }
  @media (max-width: 720px) {
    .container, .header-inner { width: calc(100% - 36px); }
    .site-header { height: 68px; }
    .header-inner { gap: 20px; justify-content: space-between; }
    .brand { font-size: 18px; }
    .header-cta { display: none; }
    .site-header nav { gap: 21px; }
    .site-header nav a { font-size: 12px; }
    .home-hero { grid-template-columns: 1fr; gap: 30px; padding-block: 36px 10px; }
    .hero-copy h1 { font-size: 36px; }
    .hero-description { font-size: 15px; max-width: 430px; }
    .section { padding-block: 42px; }
    .section-heading { display: block; }
    .section-heading .text-link { margin-top: 15px; }
    .section-heading h2 { font-size: 27px; }
    .model-grid { grid-template-columns: 1fr; }
    .model-card { padding: 23px; }
    .model-description { min-height: auto; font-size: 13px; }
    .section .model-grid .model-card:last-child:nth-child(3) { display: flex; }
    .site-footer { flex-direction: column; align-items: flex-start; padding: 24px 18px; gap: 18px; }
    .site-footer > div { justify-content: space-between; width: 100%; gap: 15px; }
    .page-top h1 { font-size: 37px; }
    .page-description { font-size: 13px; }
    .catalog-toolbar { flex-wrap: wrap; gap: 9px; margin-top: 30px; }
    .catalog-toolbar .search-field { flex: 1 0 100%; }
    .catalog-toolbar > label:not(.search-field) { flex: 1; min-width: 0; }
    .catalog-toolbar select { font-size: 11px; padding-inline: 8px; }
    .catalog-meta { font-size: 10px; }
    .catalog-note { padding: 20px 16px; gap: 10px; }
    .docs-layout { grid-template-columns: 1fr; gap: 30px; padding-top: 25px; }
    .docs-sidebar { position: static; }
    .docs-sidebar nav { flex-direction: row; flex-wrap: wrap; gap: 4px 15px; }
    .docs-sidebar nav a { font-size: 11px; padding: 0; }
    .sidebar-playground { display: none; }
    .docs-content h1 { font-size: 36px; }
    .docs-content .lead { font-size: 14px; }
    .endpoint-bar { gap: 8px; padding: 12px; }
    .endpoint-bar > span { width: 100%; }
    .endpoint-bar code { font-size: 11px; }
    pre { padding: 15px; font-size: 11px; }
    .docs-next { font-size: 12px; }
    .playground-title { gap: 15px; }
    .playground-title h1 { font-size: 31px; }
    .playground-title .text-link { font-size: 10px; }
    .playground-title .eyebrow { font-size: 8px; }
    .playground-grid { grid-template-columns: 1fr; }
    .playground-settings { display: grid; grid-template-columns: 1fr 1fr; }
    .settings-section { padding: 16px; }
    .settings-section + .settings-section { border-top: 0; border-left: 1px solid var(--border); }
    .settings-section h2 { display: block; margin-bottom: 12px; }
    .connection-badge { display: table; margin-top: 7px; }
    .settings-privacy { grid-column: 1 / -1; padding: 12px 16px; }
    .chat-panel { height: 680px; max-height: none; }
    .chat-empty h2 { font-size: 25px; }
    .chat-scroll { padding: 20px 15px; }
    .chat-bottom { padding-inline: 12px; }
    .prompt-suggestions { flex-direction: column; }
    .composer-footer > span { font-size: 8px; max-width: 160px; }
    .under-composer > span { font-size: 8px; max-width: 180px; }
    dialog { padding: 20px; }
  }
  @media (max-width: 380px) {
    .header-inner { gap: 10px; }
    .site-header nav { gap: 14px; }
    .hero-actions .button { font-size: 12px; padding-inline: 13px; }
    .hero-actions .text-link { font-size: 12px; gap: 7px; }
    .playground-settings { grid-template-columns: 1fr; }
    .settings-section + .settings-section { border-top: 1px solid var(--border); border-left: 0; }
    .connection-badge { display: inline; margin-left: 8px; }
    .chat-toolbar { padding-inline: 12px; }
  }
  @media (prefers-reduced-motion: reduce) { html, .chat-scroll { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
}
