/* Guts AI v2 inner pages: Models, Rankings and Docs. Load after theme.css and v2.css. */
:root{
  --series-1:#3F8F86;--series-2:#5B6BD6;--series-3:#B8941F;--series-4:#C95C78;--series-5:#3A8CC2;
  --series-6:#8C62C4;--series-7:#6E9440;--series-8:#C25FB0;--series-9:#5F7590;
  --warn:#8F6000;--fade-soft:#F5F6F4CC;--fade-strong:#F5F6F4F5;
}
[data-theme=dark]{
  --series-1:#6CC3B8;--series-2:#8D9BF0;--series-3:#E0C25A;--series-4:#EC8FA5;--series-5:#74BDE8;
  --series-6:#B793E6;--series-7:#A8C96E;--series-8:#DE8ACD;--series-9:#9AACC2;
  --warn:#F0C445;--fade-soft:#0F1416D9;--fade-strong:#0F1416F2;
}
[hidden]{display:none!important}
.mono{font-family:var(--font-code)}
.kbd{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 5px;border-radius:5px;box-shadow:inset 0 0 0 1px var(--line-strong);font-family:var(--font-code);font-size:11px;line-height:1;color:var(--text-3)}

/* Page head: title, lead and headline figures over the dot field */
.page-hero{position:relative;overflow:hidden;border-bottom:1px solid var(--line)}
.page-hero::before{content:"";position:absolute;inset:0;pointer-events:none;background-image:radial-gradient(circle,var(--dots) 1px,transparent 1.4px);background-size:22px 22px;background-position:11px 11px;-webkit-mask-image:linear-gradient(90deg,transparent,#000 35%,#000 70%,transparent);mask-image:linear-gradient(90deg,transparent,#000 35%,#000 70%,transparent);opacity:.55}
.page-hero .shell{position:relative;display:flex;align-items:flex-end;justify-content:space-between;gap:40px;padding-top:72px;padding-bottom:40px}
.page-hero-copy{display:flex;flex-direction:column;gap:24px;max-width:640px}
.page-title{font-size:60px;font-weight:500;letter-spacing:-2.4px;line-height:64px}
.page-lead{font-size:18px;line-height:27px;color:var(--text-2)}
/* A note under the lead: 16px below it (the copy's gap is 24px), icon on the first line */
.page-note{display:flex;align-items:flex-start;gap:8px;margin-top:-8px;font-size:13px;line-height:20px;color:var(--text-3)}
.page-note .i{font-size:14px;margin-top:3px}
.hero-stats{display:flex;gap:40px;flex-shrink:0}
.hero-stat{display:flex;flex-direction:column;gap:6px}
.hero-stat b{font-size:32px;font-weight:500;letter-spacing:-1px;line-height:36px;color:var(--text)}
.hero-stat:has(b:empty){display:none}
.hero-stat span{font-family:var(--font-code);font-size:11px;letter-spacing:.6px;line-height:14px;text-transform:uppercase;color:var(--text-3)}

/* Catalog tools: search, dropdown filters */
.catalog{padding-top:28px;padding-bottom:96px}
.catalog-tools{display:flex;align-items:center;gap:12px}
/* The search takes the free width, so the currency toggle ends at the right edge. */
.catalog-tools #currency-toggle{margin-left:auto}
.search-box{display:flex;align-items:center;gap:10px;flex:1 1 536px;height:44px;padding:0 12px 0 16px;border-radius:10px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line-strong);color:var(--text-3);transition:box-shadow .15s ease}
.search-box .i{font-size:16px}
.search-box:focus-within{box-shadow:inset 0 0 0 1px var(--accent-line),0 0 0 3px var(--accent-soft)}
.search-box input{flex:1;min-width:0;height:100%;border:0;background:none;font:inherit;font-size:15px;color:var(--text);outline:none}
.search-box input::placeholder{color:var(--text-3)}
.search-box input::-webkit-search-cancel-button{display:none}
.custom-dropdown-wrap{position:relative}
.custom-dropdown-trigger{display:inline-flex;align-items:center;gap:10px;height:44px;padding:0 14px;border-radius:10px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line-strong);font-size:14px;line-height:18px;color:var(--text-2);white-space:nowrap;overflow:hidden}
.custom-dropdown-trigger:hover,.custom-dropdown-wrap.open .custom-dropdown-trigger{color:var(--text);box-shadow:inset 0 0 0 1px var(--tint-4)}
.custom-dropdown-chevron{display:inline-flex;margin-left:auto;transition:color .2s ease}
.custom-dropdown-wrap.open .custom-dropdown-chevron{color:var(--accent)}
.custom-dropdown-chevron svg{display:block;width:14px;height:14px}
.custom-dropdown-menu{position:absolute;top:calc(100% + 6px);left:0;z-index:40;display:none;min-width:100%;padding:5px;border-radius:10px;background:var(--surface);border:1px solid var(--line-strong);box-shadow:0 12px 30px var(--card-shadow)}
.custom-dropdown-wrap.open .custom-dropdown-menu{display:block}
.custom-dropdown-menu-inner{display:flex;flex-direction:column;gap:2px;max-height:340px;overflow-y:auto}
.custom-dropdown-item{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:8px 10px;border-radius:6px;font-size:14px;line-height:18px;color:var(--text-2);white-space:nowrap;cursor:pointer}
.custom-dropdown-item:hover,.custom-dropdown-item:focus-visible{background:var(--tint-2);color:var(--text)}
.custom-dropdown-item.selected{background:var(--accent-soft);color:var(--accent)}
.check-mark{font-size:12px;opacity:0}
.custom-dropdown-item.selected .check-mark{opacity:1}

/* Segmented toggle (currency on Models, range on Rankings) */
/* Every option is as wide as the widest one, so the sliding highlight (v2.css) moves without growing or shrinking. */
.seg-toggle{display:inline-grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:2px;padding:4px;border-radius:10px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line-strong)}
.seg-toggle button{height:36px;padding:0 12px;border-radius:7px;font-family:var(--font-code);font-size:12px;font-weight:500;line-height:16px;color:var(--text-3);white-space:nowrap;transition:color .15s ease,background-color .15s ease}
.seg-toggle button:hover{color:var(--text)}
.seg-toggle button[aria-pressed=true]{background:var(--surface-2);color:var(--text)}

/* Provider jump bar */
.prov-jump{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0 40px}
.prov-jump a{display:inline-flex;align-items:center;gap:6px;padding:6px 10px 6px 8px;border-radius:100px;box-shadow:inset 0 0 0 1px var(--line);font-size:12px;line-height:16px;color:var(--text-2);transition:color .15s ease,box-shadow .15s ease}
.prov-jump a:hover{color:var(--text);box-shadow:inset 0 0 0 1px var(--line-strong)}
.prov-jump img{width:14px;height:14px;object-fit:contain}

/* Provider cards: art banner beside the model table */
.prov-list{display:flex;flex-direction:column;gap:20px}
.prov-card{display:flex;border:1px solid var(--line);border-radius:18px;background:var(--surface);box-shadow:0 6px 24px var(--card-shadow);overflow:hidden;scroll-margin-top:24px}
.prov-banner{position:relative;flex:0 0 300px;display:flex;flex-direction:column;justify-content:space-between;gap:24px;min-height:200px;padding:24px;background:var(--bg-alt);overflow:hidden;isolation:isolate}
.prov-art{position:absolute;inset:0;z-index:-2;width:100%;height:100%;max-width:none;object-fit:cover;object-position:top center;image-rendering:pixelated}
.prov-banner::after{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(180deg,transparent 40%,var(--fade-soft) 65%,var(--fade-strong) 100%)}
.prov-logo{display:flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:11px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line-strong)}
.prov-logo img{width:24px;height:24px;object-fit:contain}
.prov-name{display:flex;flex-direction:column;gap:8px}
.prov-name h2{font-size:28px;font-weight:500;letter-spacing:-.8px;line-height:32px}
.prov-name p{font-family:var(--font-code);font-size:12px;letter-spacing:.4px;line-height:16px;text-transform:uppercase;color:var(--text-2)}
.prov-table{flex:1;min-width:0;width:100%;border-collapse:collapse;table-layout:fixed;font-size:14px}
.prov-table th{padding:14px 16px 14px 0;border-bottom:1px solid var(--line);font-family:var(--font-code);font-size:11px;font-weight:400;letter-spacing:.6px;line-height:14px;text-align:left;text-transform:uppercase;white-space:nowrap;color:var(--text-3)}
.prov-table td{padding:13px 16px 13px 0;border-bottom:1px solid var(--line);vertical-align:middle}
.prov-table th:first-child,.prov-table td:first-child{padding-left:24px}
.prov-table th:last-child,.prov-table td:last-child{padding-right:24px}
.prov-table tbody tr:last-child td{border-bottom:0}
.prov-table tbody tr{cursor:pointer;transition:background-color .15s ease}
.prov-table tbody tr:hover{background:var(--tint-1)}
/* Fixed column widths sized for the longer rupiah strings ("Rp 180.950 / Rp 904.750", "≈ Rp 125.000 / image"), so
   switching USD / IDR never moves a column; the model column takes the rest. */
.ctx-th{width:112px}.caps-th{width:140px}.status-th{width:84px}.official-th{width:156px;text-align:right!important}.price-th{width:160px;text-align:right!important}
.model-name-cell{display:flex;align-items:center;gap:6px;min-width:0}
.model-name-link{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--font-code);font-size:14px;line-height:18px;color:var(--text)}
.model-name-link:hover{color:var(--accent)}
.model-copy-btn{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:24px;height:24px;border-radius:6px;color:var(--text-3);opacity:0;transition:opacity .15s ease,color .15s ease,background-color .15s ease}
.model-copy-btn svg{width:13px;height:13px}
.prov-table tr:hover .model-copy-btn,.model-copy-btn:focus-visible,.model-copy-btn.copied{opacity:1}
.model-copy-btn:hover{color:var(--accent);background:var(--tint-2)}
.model-copy-btn.copied{color:var(--ok)}
.model-copy-btn.copied svg{stroke:var(--ok)!important;color:var(--ok)!important}
@media (hover:none){.model-copy-btn{opacity:1}}
.ctx-in,.ctx-out{display:block;font-family:var(--font-code);white-space:nowrap}
.ctx-in{font-size:13px;line-height:17px;color:var(--text)}
.ctx-out{font-size:11px;line-height:15px;color:var(--text-3)}
.ctx-in i,.ctx-out i{font-style:normal;font-size:11px;color:var(--text-3)}
.caps-cell{display:flex;align-items:center;gap:6px}
.caps-cell .cap-icon-wrap{position:relative;display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:6px;background:var(--tint-2);cursor:default}
.caps-cell .cap-icon{width:13px;height:13px;color:var(--text-3)!important;stroke:var(--text-3)!important}
/* Drawn like the console's hover hint (console.css .ttip): a surface card with a border and shadow. */
.cap-tooltip{position:absolute;bottom:calc(100% + 8px);left:50%;z-index:30;transform:translateX(-50%);padding:6px 9px;border-radius:8px;background:var(--surface);border:1px solid var(--line-strong);box-shadow:0 12px 32px var(--card-shadow);color:var(--text);font-size:12px;font-weight:500;line-height:16px;white-space:nowrap;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .12s ease,visibility .12s ease}
.cap-icon-wrap:hover .cap-tooltip,.cap-icon-wrap:focus-visible .cap-tooltip{opacity:1;visibility:visible}
.cap-tag{font-family:var(--font-code);font-size:11px;color:var(--text-3)}
.status-badge{display:inline-flex;align-items:center;gap:7px;font-size:13px;line-height:17px;white-space:nowrap;color:var(--text)}
.status-badge::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--ok)}
.status-badge.status-offline{color:var(--text-3)}
.status-badge.status-offline::before{background:var(--tint-4)}
.price-cell-td{text-align:right}
.price-cell{display:block;font-family:var(--font-code);font-size:14px;line-height:18px;white-space:nowrap;color:var(--text)}
.price-unit{display:block;font-family:var(--font-code);font-size:11px;line-height:15px;white-space:nowrap;color:var(--text-3)}
/* Official list price (USD in both currency modes): struck through, with the saving under it, when Guts is cheaper */
.official-cell{text-align:right}
.official-price,.official-none{display:block;font-family:var(--font-code);font-size:13px;line-height:17px;color:var(--text-3)}
s.official-price{text-decoration:line-through;text-decoration-thickness:1px}
/* A price never breaks inside itself; one too wide for its cell gets a smaller font (op-fit, set by landing.js), same line height. */
.op-in,.op-out{white-space:nowrap}
.official-price.op-fit{font-size:11px}
.official-save{display:block;margin-top:2px;font-family:var(--font-code);font-size:11px;line-height:16px;white-space:nowrap;color:var(--accent)}
/* A price list (in / out / cache): label left, price right, one row each. The Guts price cell and the
   Official cell share it, so their rows line up across the table. */
.pr-rows{display:grid;grid-template-columns:auto auto;justify-content:end;align-items:baseline;column-gap:10px;margin:0;font-family:var(--font-code);font-size:13px;line-height:18px}
.pr-row{display:contents}
.pr-rows dt{font-size:11px;color:var(--text-3)}
.pr-rows dd{margin:0;text-align:right;white-space:nowrap;color:var(--text)}
.pr-rows .price-cell{display:block;font-size:inherit;line-height:inherit}
.prov-table .pr-rows .pr-v{white-space:nowrap}
.official-price.pr-rows dd{color:var(--text-3)}
.official-price.is-struck dd{text-decoration:line-through;text-decoration-thickness:1px}
.official-price.pr-rows.op-fit{font-size:11px}.empty-state{padding:48px 16px;text-align:center;font-size:15px;color:var(--text-3)}

/* Rankings */
.seg-toggle .range-tab-btn{font-family:var(--font-sans);font-size:14px;line-height:18px;padding:0 14px;height:34px}
.seg-toggle .range-tab-btn.active{background:var(--surface-2);color:var(--text)}
.rankings-body{display:flex;flex-direction:column;gap:48px;padding-top:48px;padding-bottom:96px}
.podium{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.podium:empty{display:none}
.podium-card{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:18px;background:var(--surface);box-shadow:0 6px 24px var(--card-shadow);overflow:hidden}
.podium-card.is-first{border-color:var(--accent-line)}
.podium-banner{position:relative;isolation:isolate;display:flex;flex-direction:column;justify-content:space-between;height:180px;padding:22px;background:var(--bg-alt);overflow:hidden}
.podium-art{position:absolute;inset:0;z-index:-2;width:100%;height:100%;max-width:none;object-fit:cover;object-position:center 30%;image-rendering:pixelated}
.podium-banner::after{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(180deg,transparent 20%,var(--fade-soft) 60%,var(--fade-strong) 100%)}
.podium-top{display:flex;align-items:center;justify-content:space-between}
.podium-rank{padding:3px 9px;border-radius:100px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line-strong);font-family:var(--font-code);font-size:12px;line-height:16px;color:var(--text)}
.is-first .podium-rank{color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent-line)}
.podium-logo{display:flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:10px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line-strong)}
.podium-logo img{width:22px;height:22px;object-fit:contain}
.podium-name{display:flex;flex-direction:column;gap:4px;min-width:0}
.podium-name h3{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--font-code);font-size:20px;font-weight:500;line-height:26px;color:var(--text)}
.podium-name p{font-size:13px;line-height:17px;color:var(--text-2)}
.podium-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0;padding:18px 22px}
.podium-stats div{display:flex;flex-direction:column;gap:6px;min-width:0}
.podium-stats dt{font-family:var(--font-code);font-size:10px;letter-spacing:.6px;line-height:13px;text-transform:uppercase;color:var(--text-3)}
.podium-stats dd{margin:0;font-size:20px;font-weight:500;letter-spacing:-.4px;line-height:24px;white-space:nowrap;color:var(--text)}
.card-head{display:flex;align-items:flex-end;justify-content:space-between;gap:24px}
.card-head h2{font-size:24px;font-weight:500;letter-spacing:-.6px;line-height:30px}
.card-head p{margin-top:6px;font-size:14px;line-height:20px;color:var(--text-2)}
.share-card{position:relative;display:flex;flex-direction:column;gap:24px;padding:28px;border:1px solid var(--line);border-radius:18px;background:var(--surface)}
.share-total{display:flex;flex-direction:column;align-items:flex-end;gap:6px;text-align:right}
.share-total b{font-size:28px;font-weight:500;letter-spacing:-.8px;line-height:32px}
.share-total span{font-family:var(--font-code);font-size:11px;letter-spacing:.6px;line-height:14px;text-transform:uppercase;color:var(--text-3)}
.share-bar{display:flex;gap:3px;height:40px}
.share-bar:empty{display:none}
.share-seg{flex:1 1 0;min-width:4px;border-radius:3px}
.activity-legend{columns:2;column-gap:48px}
.activity-legend-item{break-inside:avoid;display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--line);font-family:var(--font-code);font-size:13px;line-height:17px}
.legend-dot{width:8px;height:8px;flex-shrink:0;border-radius:2px}
.legend-dot.other-dot{background:var(--tint-4)}
.legend-model-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text)}
.legend-count{color:var(--text-2)}
.legend-pct{width:52px;text-align:right;color:var(--text-3)}
.volume-head{display:flex;align-items:baseline;justify-content:space-between;gap:16px;padding-top:8px}
.volume-head h3{font-size:16px;font-weight:500;line-height:22px}
.volume-head p{font-size:13px;line-height:18px;color:var(--text-3)}
.activity-chart-box{position:relative;display:flex;align-items:flex-end;gap:12px;height:220px}
.activity-bar-col{position:relative;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;cursor:pointer}
.activity-bar-stack{display:flex;flex-direction:column;justify-content:flex-end;width:100%;max-width:44px;min-height:4px;overflow:hidden;border-radius:4px 4px 0 0}
.activity-bar-segment{width:100%}
.activity-bar-col:hover .activity-bar-segment{filter:brightness(1.06)}
.activity-bar-label{margin-top:10px;font-family:var(--font-code);font-size:11px;line-height:14px;white-space:nowrap;color:var(--text-3)}
/* Chart tooltip, as the console's chart tip (console.css .tip): a head line, label | value rows, the total under a rule. */
.activity-floating-tooltip{position:absolute;z-index:50;min-width:150px;padding:9px 11px;border-radius:8px;background:var(--surface);border:1px solid var(--line-strong);box-shadow:0 12px 32px var(--card-shadow);font-size:12px;white-space:nowrap;color:var(--text);pointer-events:none;opacity:0;visibility:hidden;transition:opacity .12s ease,visibility .12s ease}
.activity-floating-tooltip.show{opacity:1;visibility:visible}
.activity-floating-tooltip .th{font-weight:500;margin-bottom:6px;color:var(--text)}
.activity-floating-tooltip .tr{display:flex;justify-content:space-between;gap:16px;color:var(--text-2);line-height:20px}
.activity-floating-tooltip .tr b{font-family:var(--font-code);font-weight:400;color:var(--text)}
.activity-floating-tooltip .tr i{display:inline-block;width:7px;height:7px;border-radius:2px;margin-right:6px;vertical-align:1px}
.activity-floating-tooltip .tr.is-total{margin-top:4px;padding-top:4px;border-top:1px solid var(--line);color:var(--text)}
@media (prefers-reduced-motion:reduce){.activity-floating-tooltip{transition:none}}
.leaderboard-card{display:flex;flex-direction:column;gap:24px}
.leaderboard-wrap{border:1px solid var(--line);border-radius:18px;background:var(--surface);overflow:hidden;overflow-x:auto}
.leaderboard-table{width:100%;border-collapse:collapse}
.leaderboard-table th{padding:14px 24px 14px 0;background:var(--bg-alt);border-bottom:1px solid var(--line);font-family:var(--font-code);font-size:11px;font-weight:400;letter-spacing:.6px;line-height:14px;text-align:left;text-transform:uppercase;white-space:nowrap;color:var(--text-3)}
.leaderboard-table td{height:66px;padding:0 24px 0 0;border-bottom:1px solid var(--line);font-family:var(--font-code);font-size:14px;white-space:nowrap;color:var(--text)}
.leaderboard-table th:first-child,.leaderboard-table td:first-child{padding-left:24px}
.leaderboard-table tbody tr:last-child td{border-bottom:0}
.leaderboard-table .lb-num{text-align:right}
.lb-rank{width:48px;font-size:15px;color:var(--text-2)}
td.lb-rank.is-top{color:var(--accent)}
.lb-model,.lb-model > *{vertical-align:middle}
.lb-logo{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;margin-right:12px;border-radius:8px;background:var(--surface-2)}
.lb-logo img{width:20px;height:20px;object-fit:contain}
.lb-id{display:inline-flex;flex-direction:column;gap:3px;min-width:0}
.lb-prov{font-family:var(--font-sans);font-size:12px;line-height:16px;color:var(--text-3)}
/* The numeric columns share the width with the model, so no column is left as dead space. */
.lb-tokens{width:24%}
.lb-share{width:8%}
.lb-io{width:14%}
.lb-lat{width:11%}
td.lb-share{color:var(--text-2)}
.lb-io i{font-style:normal;color:var(--text-3)}
.lb-name{display:block;max-width:280px;overflow:hidden;text-overflow:ellipsis}
/* A leaderboard row links to its model page: the name's link covers the row, the name turns
   accent on hover (as the Apps list rows), and the input / output cell keeps its share title. */
.leaderboard-table tbody tr{position:relative;transition:background-color .15s ease}
.leaderboard-table tbody tr:has(.lb-link):hover{background:var(--tint-1)}
a.lb-link{color:var(--text);transition:color .15s ease}
a.lb-link::after{content:"";position:absolute;inset:0}
.leaderboard-table tbody tr:hover a.lb-link{color:var(--accent)}
a.lb-link:focus-visible{outline:none}
a.lb-link:focus-visible::after{outline:2px solid var(--accent);outline-offset:-2px}
td.lb-io[title]{position:relative;z-index:1}
.lb-track{display:inline-block;width:calc(100% - 72px);max-width:200px;height:4px;margin-right:12px;border-radius:2px;background:var(--tint-3);vertical-align:middle;overflow:hidden}
.lb-track > span{display:block;height:100%;border-radius:2px;background:var(--tint-4)}
tr:first-child .lb-track > span{background:var(--accent)}
.lb-empty td{height:auto;padding:40px 24px;text-align:center;font-family:var(--font-sans);color:var(--text-3)}

/* Below 1400px the official column narrows to 136px (a per-image price stacks, a too-wide list gets op-fit); capabilities,
   the least needed column, give way below 1340px until the rows turn into cards. */
@media (max-width:1399px){
  .official-th{width:136px}.prov-table th.official-th{white-space:normal}
  .op-in,.op-out{display:block}
  .op-sep{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
}
@media (max-width:1339px) and (min-width:901px){.caps-th,.caps-cell-td{display:none}}

@media (max-width:1279px){
  .page-hero .shell{flex-direction:column;align-items:flex-start}
  .podium{grid-template-columns:1fr;gap:12px}
  .lb-tokens{width:auto}
  .lb-track{width:110px}
  .catalog-tools{flex-wrap:wrap}
  .search-box{flex-basis:100%;max-width:none}
  .prov-banner{flex-basis:240px}
  .ctx-th{width:96px}
}

@media (max-width:1100px) and (min-width:901px){.lb-io{display:none}.lb-name{max-width:200px}}

@media (max-width:1100px){
  .prov-card{flex-direction:column}
  .prov-banner{flex-basis:auto;min-height:168px}
}

/* The catalog rows turn into cards at 900px and below; the price keeps one width in both currencies. */
@media (max-width:900px){
  .prov-table,.prov-table tbody{display:block}
  .prov-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
  .prov-table tr{display:grid;grid-template-columns:minmax(0,1fr) 136px;grid-template-areas:"m p" "c p" "k s";align-items:center;gap:8px 12px;padding:14px 18px;border-bottom:1px solid var(--line)}
  .prov-table tbody tr:last-child{border-bottom:0}
  .prov-table td,.prov-table td:first-child,.prov-table td:last-child{padding:0;border:0}
  .model-cell{grid-area:m;min-width:0}
  .price-cell-td{grid-area:p;align-self:start}
  .price-cell,.price-unit{white-space:normal}
  .ctx-cell{grid-area:c}
  .caps-cell-td{grid-area:k}
  .status-cell{grid-area:s;justify-self:end}
  .official-cell{display:none}
  .ctx-in,.ctx-out{display:inline;margin-right:8px}
}

/* On a phone the model name keeps the whole row; the price sits beside the context. */
@media (max-width:480px){.prov-table tr{grid-template-areas:"m m" "c p" "k s"}}

/* The leaderboard turns into cards at 900px and below: its columns no longer fit a row there. */
@media (max-width:900px){
  .leaderboard-wrap{border-radius:14px}
  .leaderboard-table,.leaderboard-table tbody{display:block}
  .leaderboard-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
  .leaderboard-table tr{display:grid;grid-template-columns:28px minmax(0,1fr) auto auto;grid-template-areas:"r m m m" ". q l l" ". t t s" ". i i i";gap:8px 10px;align-items:center;padding:14px 16px;border-bottom:1px solid var(--line)}
  .leaderboard-table tbody tr:last-child{border-bottom:0}
  .leaderboard-table td,.leaderboard-table td:first-child{height:auto;padding:0;border:0}
  .lb-rank{grid-area:r;width:auto}
  .lb-model{grid-area:m;width:auto;display:flex;align-items:center;min-width:0}
  .lb-model .lb-name{max-width:none}
  .leaderboard-table td.lb-io{grid-area:i;text-align:left;font-size:12px;color:var(--text-2)}
  .lb-logo{width:28px;height:28px;margin-right:10px;flex-shrink:0}
  .leaderboard-table td[data-label=Requests]{grid-area:q;text-align:left}
  .leaderboard-table td[data-label="Avg latency"]{grid-area:l}
  .lb-tokens{grid-area:t;display:flex;align-items:center}
  .lb-track{flex:1;width:auto;max-width:none}
  .lb-share{grid-area:s}
  .lb-id{flex:1}
  .leaderboard-table td[data-label]::before{content:attr(data-label) " ";margin-right:6px;font-size:10px;letter-spacing:.6px;text-transform:uppercase;color:var(--text-3)}
  .lb-tokens::before{order:-1}
}

@media (max-width:640px){
  .page-hero .shell{gap:32px;padding-top:40px;padding-bottom:32px}
  .page-hero-copy{gap:16px}
  .page-title{font-size:40px;letter-spacing:-1.4px;line-height:44px}
  .page-lead{font-size:16px;line-height:24px}
  .page-note{margin-top:0}
  .hero-stats{gap:24px;flex-wrap:wrap}
  .hero-stat b{font-size:24px;line-height:28px}
  .catalog{padding-top:20px;padding-bottom:64px}
  .catalog-tools{gap:8px}
  .catalog-tools .custom-dropdown-wrap{flex:1 1 calc(50% - 4px)}
  .custom-dropdown-trigger{width:100%;padding:0 12px}
  .catalog-tools .custom-dropdown-wrap:nth-of-type(even) .custom-dropdown-menu{left:auto;right:0}
  .prov-jump{flex-wrap:nowrap;overflow-x:auto;margin:12px -20px 28px;padding:0 20px;scrollbar-width:none}
  .prov-jump::-webkit-scrollbar{display:none}
  .prov-jump a{flex-shrink:0}
  .prov-list{gap:16px}
  .prov-card{border-radius:14px}
  .prov-banner{min-height:144px;padding:18px}
  .prov-logo{width:40px;height:40px;border-radius:10px}
  .prov-name h2{font-size:24px;line-height:28px}
  .rankings-range-tabs{align-self:stretch;overflow-x:auto;grid-auto-columns:minmax(0,1fr)}
  .seg-toggle .range-tab-btn{padding:0 4px;font-size:13px}
  .rankings-body{gap:32px;padding-top:28px;padding-bottom:64px}
  .podium-banner{height:150px;padding:18px}
  .podium-stats{padding:14px 18px}
  .podium-stats dd{font-size:17px}
  .card-head{flex-direction:column;align-items:flex-start;gap:12px}
  .share-total{align-items:flex-start;text-align:left}
  .share-card{gap:20px;padding:20px 18px;border-radius:14px}
  .share-bar{height:28px;gap:2px}
  .activity-legend{columns:1}
  .volume-head{flex-direction:column;gap:2px}
  .activity-chart-box{height:180px;gap:8px;overflow-x:auto}
  .activity-bar-col{flex:0 0 40px}
}

/* Docs: sidebar topics, article column and "On this page" rail */
.docs-shell{max-width:1440px;margin:0 auto;padding:0 80px}
.docs-grid{display:grid;grid-template-columns:272px minmax(0,1fr) 224px;align-items:start}
.docs-mobile-nav-bar{display:none}
.docs-sidebar-left{position:sticky;top:var(--hdr-h);align-self:start;max-height:calc(100vh - var(--hdr-h));overflow-y:auto;padding:32px 24px 48px 0;border-right:1px solid var(--line);scrollbar-width:none}
.docs-sidebar-left::-webkit-scrollbar{display:none}
.docs-search-box{display:flex;align-items:center;gap:10px;height:40px;margin-bottom:8px;padding:0 8px 0 12px;border-radius:10px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line-strong);color:var(--text-3);transition:box-shadow .15s ease}
.docs-search-box .i{font-size:15px}
.docs-search-box:focus-within{box-shadow:inset 0 0 0 1px var(--accent-line),0 0 0 3px var(--accent-soft)}
.docs-search-input{flex:1;min-width:0;height:100%;border:0;background:none;font:inherit;font-size:14px;color:var(--text);outline:none}
.docs-search-input::placeholder{color:var(--text-3)}
.docs-search-input::-webkit-search-cancel-button{display:none}
.docs-group{margin-top:26px}
.docs-group-title{margin-bottom:10px;font-family:var(--font-code);font-size:11px;font-weight:400;letter-spacing:.9px;line-height:14px;text-transform:uppercase;color:var(--text-3)}
.docs-nav-list{display:flex;flex-direction:column;gap:2px}
.docs-nav-list a{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 10px;border-radius:6px;font-size:14px;line-height:20px;color:var(--text-2);transition:background-color .15s ease,color .15s ease}
.docs-nav-list a:hover{background:var(--tint-2);color:var(--text)}
.docs-nav-list a.active,.docs-nav-list a[aria-current=page]{background:var(--accent-soft);color:var(--accent);font-weight:500}
.nav-badge-pill{padding:1px 6px;border-radius:4px;background:var(--tint-2);font-family:var(--font-code);font-size:10px;font-weight:400;line-height:14px;color:var(--text-3)}

.docs-main-col{min-width:0;padding:32px 72px 96px 64px}
.docs-main-col article{display:none;max-width:648px}
.docs-main-col article.active,.docs-main-col article.legal-doc{display:block}
.docs-breadcrumb{display:flex;align-items:center;gap:8px;max-width:648px;margin-bottom:18px;font-family:var(--font-code);font-size:12px;line-height:16px;color:var(--text-2)}
.docs-breadcrumb .i{font-size:12px;color:var(--text-3)}
.docs-breadcrumb [aria-current]{color:var(--text)}
.doc-banner{position:relative;height:200px;margin-bottom:28px;border-radius:12px;overflow:hidden;background:var(--surface-2)}
.doc-art{width:100%;height:100%;object-fit:cover;image-rendering:pixelated}
.doc-chip{position:absolute;left:20px;bottom:18px;display:inline-flex;align-items:center;gap:8px;max-width:calc(100% - 40px);padding:5px 12px 5px 10px;border-radius:999px;background:var(--surface);font-family:var(--font-code);font-size:11px;letter-spacing:.6px;line-height:14px;text-transform:uppercase;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.doc-chip .i,.doc-chip img{font-size:13px;width:13px;height:13px;color:var(--accent)}

.docs-main-col h1{margin-bottom:24px;font-size:44px;font-weight:500;letter-spacing:-1.4px;line-height:50px;color:var(--text)}
.docs-main-col article h2{margin:56px 0 18px;font-size:26px;font-weight:500;letter-spacing:-.6px;line-height:32px;color:var(--text);scroll-margin-top:24px}
.docs-main-col article h3{margin:28px 0 10px;font-size:17px;font-weight:500;line-height:24px;color:var(--text);scroll-margin-top:24px}
.docs-main-col article p{margin:0 0 16px;font-size:15px;line-height:26px;color:var(--text-2)}
.docs-main-col article h1 + p{margin-bottom:28px;font-size:18px;line-height:30px}
.docs-main-col article ul:not([class]),.docs-main-col article ol:not([class]){margin:0 0 18px;padding-left:22px;font-size:15px;line-height:26px;color:var(--text-2)}
.docs-main-col article ul:not([class]){list-style:disc}
.docs-main-col article ol:not([class]){list-style:decimal}
.docs-main-col article li + li{margin-top:6px}
.docs-main-col article strong{font-weight:500;color:var(--text)}
.docs-main-col article p a,.docs-main-col article li a,.docs-main-col article td a,.callout a{color:var(--accent);font-weight:500;text-decoration:underline;text-decoration-color:var(--accent-line);text-underline-offset:3px}
.docs-main-col article p a:hover,.docs-main-col article li a:hover,.callout a:hover{text-decoration-color:currentColor}
.docs-main-col article :not(pre):not(.line-content) > code{padding:1px 6px;border-radius:5px;background:var(--tint-2);font-size:.86em;color:var(--text);overflow-wrap:anywhere}
.docs-main-col article .base-urls li > code,.docs-main-col article .parity-table td > code{padding:0;border-radius:0;background:none;font-size:14px}

/* Base URL rows and single endpoint boxes */
.base-urls,.api-endpoint-box{margin:0 0 16px;border-radius:12px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line)}
.base-urls li{display:flex;align-items:center;gap:12px;min-height:46px;padding:0 12px 0 16px;border-bottom:1px solid var(--line)}
.base-urls li:last-child{border-bottom:0}
.compat-pill{flex-shrink:0;width:92px;padding:2px 0;border-radius:4px;background:var(--accent-soft);font-family:var(--font-code);font-size:10px;letter-spacing:.6px;line-height:16px;text-align:center;text-transform:uppercase;color:var(--accent)}
.compat-pill.is-alt{background:var(--tint-2);color:var(--text-2)}
.base-urls .method{font-family:var(--font-code);font-size:12px;color:var(--accent)}
.base-urls code,.api-endpoint-url{flex:1;min-width:0;font-family:var(--font-code);font-size:14px;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.api-endpoint-box{display:flex;align-items:center;gap:12px;min-height:46px;padding:0 12px 0 16px}
.api-endpoint-left{flex:1;min-width:0;display:flex;align-items:center;gap:10px}

/* Tables */
.param-table{width:100%;margin:0 0 18px;border-collapse:separate;border-spacing:0;border-radius:12px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line);font-size:14px;line-height:21px;overflow:hidden}
.param-table th{padding:12px 16px;background:var(--tint-1);border-bottom:1px solid var(--line);font-family:var(--font-code);font-size:11px;font-weight:400;letter-spacing:.6px;line-height:14px;text-align:left;text-transform:uppercase;color:var(--text-3)}
.param-table td{padding:14px 16px;border-bottom:1px solid var(--line);vertical-align:top;color:var(--text-2)}
.param-table tr:last-child td{border-bottom:0}
.param-table td code{white-space:nowrap}
/* Codes in the description column may wrap, so a long value never pushes a table past the column. */
.param-table td:last-child:not(:first-child) code{white-space:normal;overflow-wrap:anywhere}
.status-table td:first-child code{white-space:normal}
.param-table .req{margin-left:6px;font-family:var(--font-code);font-size:11px;color:var(--accent)}
.parity-table td > code{display:block}
.parity-table th:nth-child(1){width:30%}.parity-table th:nth-child(2){width:36%}
.parity-table .compat{display:block;margin-top:4px;font-size:12px;color:var(--text-3)}
.check-list{display:flex;flex-direction:column;gap:4px;font-size:13px;line-height:19px}
.check-list li{position:relative;padding-left:20px}
.check-list li::before{content:"";position:absolute;left:2px;top:5px;width:9px;height:5px;border-left:1.5px solid var(--accent);border-bottom:1.5px solid var(--accent);transform:rotate(-45deg)}

/* Principles grid */
.principles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:30px 36px;margin-bottom:8px}
.docs-main-col .principle-title{display:flex;align-items:center;gap:10px;margin:0 0 8px;font-size:15px;line-height:20px}
.principle-title .i{font-size:16px;color:var(--accent)}
.docs-main-col .principles p{margin:0 0 0 26px;font-size:14px;line-height:22px}

/* Code blocks */
.code-container{margin:0 0 18px;border-radius:12px;background:var(--code-bg);box-shadow:inset 0 0 0 1px var(--line-strong);overflow:hidden}
.code-tab-header{display:flex;align-items:stretch;justify-content:space-between;gap:12px;min-height:40px;padding:0 10px 0 14px;background:var(--code-bg-2);border-bottom:1px solid var(--code-line)}
.code-tabs{display:flex;gap:4px;min-width:0;overflow-x:auto;scrollbar-width:none}
.code-tabs::-webkit-scrollbar{display:none}
.code-tab{position:relative;padding:0 12px;font-family:var(--font-code);font-size:13px;color:var(--text-3);white-space:nowrap}
.code-tab:hover{color:var(--text)}
.code-tab.active{color:var(--text)}
.code-tab.active::after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;background:var(--accent)}
.code-tabs.has-ink{position:relative}
.code-tabs.has-ink .code-tab.active::after{display:none}
.code-tabs .code-tab-ink{position:absolute;left:0;bottom:0;height:2px;width:0;background:var(--accent);pointer-events:none}
.code-tabs.ink-ready .code-tab-ink{transition:transform .28s cubic-bezier(.4,0,.2,1),width .28s cubic-bezier(.4,0,.2,1)}
@media (prefers-reduced-motion:reduce){.code-tabs.ink-ready .code-tab-ink{transition:none}}
.code-actions{display:flex;align-items:center}
.code-copy-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:28px;height:28px;padding:0 6px;border-radius:6px;font-family:var(--font-code);font-size:12px;color:var(--text-3);transition:color .15s ease,background-color .15s ease}
.code-copy-btn .i,.code-copy-btn svg{width:14px;height:14px;font-size:14px}
.code-copy-btn:hover{background:var(--tint-2);color:var(--text)}
.code-copy-btn.copied{color:var(--ok)}
.code-pane{display:none;padding:14px 0;overflow-x:auto;font-family:var(--font-code);font-size:13px;line-height:22px;color:var(--code-text)}
.code-pane.active{display:block}
.code-line{display:flex;min-width:max-content;padding-right:20px}
.line-num{flex-shrink:0;width:44px;padding-right:16px;text-align:right;color:var(--code-dim);user-select:none}
.line-content{white-space:pre}
.tok-str{color:var(--code-str)}
.tok-key{color:var(--code-key)}
.tok-num{color:var(--code-accent)}
.tok-var{color:var(--code-fn)}
.tok-fn{color:var(--code-fn)}
.tok-comment{color:var(--code-comment);font-style:italic}

/* Callouts */
.callout{display:flex;gap:14px;margin:0 0 18px;padding:18px 20px;border-radius:12px;background:var(--accent-soft);box-shadow:inset 0 0 0 1px var(--accent-line);font-size:14px;line-height:22px;color:var(--text-2)}
.callout > svg{flex-shrink:0;width:16px;height:16px;margin-top:3px;color:var(--accent)}
.callout strong{font-weight:500;color:var(--text)}
/* A leading strong is the callout title; later ones are inline labels. */
.callout > div > strong:first-child{display:block;margin-bottom:2px}
.callout > div > strong:first-child + br{display:none}
.callout-tip{background:var(--tint-1);box-shadow:inset 0 0 0 1px var(--line-strong)}

/* FAQ inside articles */
.docs-main-col .faq-wrap{margin:0 0 24px;border-radius:12px;box-shadow:inset 0 0 0 1px var(--line);overflow:hidden}
.docs-main-col .faq-item{border-bottom:1px solid var(--line)}
.docs-main-col .faq-item:last-child{border-bottom:0}
.docs-main-col .faq-trigger{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;padding:16px 18px;text-align:left}
.docs-main-col .faq-trigger h3{margin:0;font-size:15px;line-height:22px}
.docs-main-col .faq-icon svg{display:block;width:16px;height:16px;color:var(--text-3);transition:transform .2s ease,color .2s ease}
.docs-main-col .faq-item.open .faq-icon svg{transform:rotate(180deg);color:var(--accent)}
.docs-main-col .faq-body{display:none;padding:0 18px 16px}
.docs-main-col .faq-item.open .faq-body{display:block}
.docs-main-col .faq-body p{margin:0;font-size:14px;line-height:22px}

/* Previous / next */
.doc-pagination{display:flex;justify-content:space-between;gap:24px;margin-top:56px;padding-top:24px;border-top:1px solid var(--line)}
.page-btn{display:flex;flex-direction:column;gap:6px;max-width:50%}
.page-btn.text-right{margin-left:auto;align-items:flex-end;text-align:right}
.page-label{display:inline-flex;align-items:center;gap:6px;font-family:var(--font-code);font-size:11px;letter-spacing:.6px;line-height:14px;text-transform:uppercase;color:var(--text-3)}
.page-label .arrow-icon{display:none}
.doc-pagination .page-title{display:inline-flex;align-items:center;gap:8px;font-size:16px;font-weight:500;letter-spacing:0;line-height:22px;color:var(--text)}
.page-btn.text-right .page-title::after,.page-btn.text-left .page-title::before{content:"";width:14px;height:14px;background:var(--accent);-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E") center/contain no-repeat}
.page-btn.text-left .page-title::before{transform:scaleX(-1)}
.page-btn:hover .page-title{color:var(--accent)}

/* Right rail */
.docs-sidebar-right{position:sticky;top:var(--hdr-h);align-self:start;display:flex;flex-direction:column;gap:24px;padding:40px 0 48px}
.toc-title{margin-bottom:14px;font-family:var(--font-code);font-size:11px;font-weight:400;letter-spacing:.9px;line-height:14px;text-transform:uppercase;color:var(--text-3)}
.toc-list{display:flex;flex-direction:column;border-left:1px solid var(--line)}
.toc-link{margin-left:-1px;padding:6px 12px;border-left:2px solid transparent;font-size:13px;line-height:19px;color:var(--text-2);transition:color .15s ease}
.toc-link:hover{color:var(--text)}
.toc-link.active{border-left-color:var(--accent);color:var(--text)}
.toc-link.toc-sub{padding-left:24px;font-size:12px}
.help-card{display:flex;flex-direction:column;gap:6px;padding:16px;border-radius:12px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line)}
.help-card h2{font-size:15px;font-weight:500;line-height:20px;color:var(--text)}
.help-card p{font-size:13px;line-height:20px;color:var(--text-2)}
.help-card a{display:inline-flex;align-items:center;gap:6px;margin-top:4px;font-size:13px;font-weight:500;color:var(--accent)}
.help-card a:hover{text-decoration:underline;text-underline-offset:3px}
.help-card .i{font-size:14px}

@media (max-width:1279px){
  .docs-shell{padding:0 48px}
  .docs-grid{grid-template-columns:240px minmax(0,1fr)}
  .docs-sidebar-right{display:none!important}
  .docs-main-col{padding:32px 0 80px 48px}
}

@media (max-width:900px){
  .docs-grid{display:block}
  .docs-sidebar-left{display:none}
  .docs-main-col{padding:20px 0 72px}
  .docs-main-col article{max-width:none}
  .docs-mobile-nav-bar{display:block;position:sticky;top:var(--hdr-h);z-index:30;margin:0 -48px;padding:12px 48px;background:var(--fade-strong);border-bottom:1px solid var(--line);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
  .docs-mob-nav-btn{width:100%}
  .docs-mob-nav-btn .custom-dropdown-label{display:inline-flex;align-items:center;gap:8px;min-width:0;overflow:hidden;text-overflow:ellipsis}
  .docs-mobile-dropdown-menu{left:48px;right:48px;min-width:0}
  .docs-mobile-menu-inner{max-height:min(60vh,480px)}
  .docs-dropdown-header{padding:12px 10px 4px;font-family:var(--font-code);font-size:10px;letter-spacing:.9px;text-transform:uppercase;color:var(--text-3)}
  .docs-topic-item.active,.docs-topic-item[aria-current=page]{background:var(--accent-soft);color:var(--accent)}
}

@media (max-width:640px){
  .docs-shell{padding:0 20px}
  .docs-mobile-nav-bar{margin:0 -20px;padding:10px 20px}
  .docs-mobile-dropdown-menu{left:20px;right:20px}
  .doc-banner{height:auto;aspect-ratio:648/200;margin-bottom:22px;border-radius:10px}
  .doc-chip{left:12px;bottom:10px;max-width:calc(100% - 24px);font-size:10px}
  .docs-main-col h1{margin-bottom:16px;font-size:32px;letter-spacing:-1px;line-height:38px}
  .docs-main-col article h1 + p{font-size:16px;line-height:26px}
  .docs-main-col article h2{margin-top:44px;font-size:22px;line-height:28px}
  .base-urls li{flex-wrap:wrap;gap:6px 10px;padding:10px 12px}
  .base-urls code{flex-basis:100%;order:3;white-space:normal;overflow-wrap:anywhere;font-size:13px}
  .base-urls .code-copy-btn{margin-left:auto}
  .param-table,.param-table tbody{display:block}
  .param-table thead{display:none}
  .param-table tr{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px 12px;align-items:baseline;padding:14px 16px;border-bottom:1px solid var(--line)}
  .param-table tr:last-child{border-bottom:0}
  .param-table td{padding:0;border:0}
  .param-table td:nth-child(n+3){grid-column:1/-1}
  .param-table td code{white-space:normal}
  .parity-table tr{grid-template-columns:minmax(0,1fr)}
  .parity-table td{grid-column:1/-1}
  .api-endpoint-url{white-space:normal;overflow-wrap:anywhere;font-size:13px}
  .principles{grid-template-columns:1fr;gap:22px}
  .code-tab{padding:0 9px;font-size:12px}
  .code-copy-btn span{display:none}
  .code-pane{font-size:12px;line-height:20px}
  .line-num{width:34px;padding-right:12px}
  .callout{padding:14px 16px}
  .page-btn{max-width:100%}
}

/* Apps page: the apps that use Guts AI (/apps) and one app's page (/apps/{key}), apps.html.
   The body's data-apps-mode picks the view, so the other one never flashes. */
body[data-apps-mode=list] [data-view=detail],body[data-apps-mode=detail] [data-view=list]{display:none!important}
.apps-body{display:flex;flex-direction:column;gap:40px;padding-top:48px;padding-bottom:96px}
.apps-cats{display:flex;flex-wrap:wrap;gap:8px}
.apps-cats:empty{display:none}
.apps-cat{display:inline-flex;align-items:center;gap:8px;height:34px;padding:0 13px;border-radius:100px;box-shadow:inset 0 0 0 1px var(--line);font-size:13px;line-height:16px;color:var(--text-2);white-space:nowrap;transition:color .15s ease,box-shadow .15s ease,background-color .15s ease}
.apps-cat:hover{color:var(--text);box-shadow:inset 0 0 0 1px var(--line-strong)}
.apps-cat[aria-pressed=true]{background:var(--accent-soft);color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent-line)}
.apps-cat-n{font-family:var(--font-code);font-size:11px;line-height:14px;color:var(--text-3)}
.apps-cat[aria-pressed=true] .apps-cat-n{color:inherit}
.apps-table{width:100%;border-collapse:collapse;table-layout:fixed}
.apps-table th{padding:14px 24px 14px 0;background:var(--bg-alt);border-bottom:1px solid var(--line);font-family:var(--font-code);font-size:11px;font-weight:400;letter-spacing:.6px;line-height:14px;text-align:left;text-transform:uppercase;white-space:nowrap;color:var(--text-3)}
.apps-table td{padding:18px 24px 18px 0;border-bottom:1px solid var(--line);vertical-align:middle;color:var(--text)}
.apps-table th:first-child,.apps-table td:first-child{padding-left:24px}
.apps-table tbody tr:last-child td{border-bottom:0}
.apps-table .num{text-align:right}
.apps-table .c-rank{width:72px}
.apps-table .c-models{width:30%}
.apps-table .c-tokens{width:220px}
.apps-table .c-growth{width:116px}
.apps-table .c-req{width:140px}
.apps-table .c-share{width:112px}
.apps-row{cursor:pointer;transition:background-color .15s ease}
.apps-row:hover{background:var(--tint-1)}
.apps-row.is-sk{cursor:default}
.apps-row.is-sk:hover{background:none}
.apps-rank{font-family:var(--font-code);font-size:15px;line-height:20px;color:var(--text-2)}
.apps-rank.is-top{color:var(--accent)}
.app-cell{display:flex;align-items:center;gap:14px;min-width:0}
.app-icon{--mono:var(--series-1);display:flex;align-items:center;justify-content:center;flex-shrink:0;width:40px;height:40px;border-radius:10px;background:var(--surface-2);box-shadow:inset 0 0 0 1px var(--line);overflow:hidden}
.app-icon img{width:26px;height:26px;object-fit:contain}
.app-icon.app-mono{background:color-mix(in srgb,var(--mono) 14%,var(--surface));box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--mono) 26%,transparent);font-size:17px;font-weight:600;line-height:1;color:var(--mono)}
.app-main{display:flex;flex-direction:column;gap:4px;min-width:0}
.app-name{align-self:flex-start;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px;font-weight:500;line-height:20px;color:var(--text);transition:color .15s ease}
.app-name:hover,.apps-row:hover .app-name{color:var(--accent)}
.app-desc{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;line-height:18px;color:var(--text-2)}
.app-tags{display:flex;flex-wrap:wrap;gap:4px;margin-top:2px}
.app-tag{padding:1px 6px;border-radius:4px;background:var(--tint-2);font-family:var(--font-code);font-size:10px;letter-spacing:.5px;line-height:16px;text-transform:uppercase;white-space:nowrap;color:var(--text-3)}
.app-models{display:flex;flex-wrap:wrap;gap:6px;min-width:0}
.model-chip{display:inline-flex;align-items:center;gap:6px;max-width:100%;padding:3px 8px 3px 6px;border-radius:6px;box-shadow:inset 0 0 0 1px var(--line);font-family:var(--font-code);font-size:11px;line-height:16px;color:var(--text-2)}
.model-chip img{width:12px;height:12px;object-fit:contain}
.model-chip .model-chip-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.app-tok{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:8px;font-family:var(--font-code);white-space:nowrap}
.app-tok-val{font-size:15px;line-height:20px;color:var(--text)}
.app-tok-share{font-size:12px;line-height:16px;color:var(--text-3)}
.app-track{display:block;height:4px;border-radius:2px;background:var(--tint-3);overflow:hidden}
.app-track > span{display:block;height:100%;border-radius:2px;background:var(--tint-4)}
tbody tr:first-child .app-track > span{background:var(--accent)}
.growth{display:inline-flex;align-items:center;gap:4px;font-family:var(--font-code);font-size:13px;line-height:18px;white-space:nowrap;color:var(--text-3)}
.growth .i{font-size:13px;stroke-width:2.4}
.growth.up{color:var(--ok)}
.growth.down{color:var(--err)}
.sk{display:block;height:10px;max-width:100%;border-radius:4px;background:var(--tint-3);animation:skPulse 1.4s ease-in-out infinite}
.sk + .sk{margin-top:8px}
.sk-title{width:280px;height:40px;border-radius:8px}
@keyframes skPulse{0%,100%{opacity:.5}50%{opacity:1}}
.apps-state{display:flex;flex-direction:column;align-items:center;gap:6px;padding:56px 24px;text-align:center}
.apps-state-title{font-size:16px;font-weight:500;line-height:22px;color:var(--text)}
.apps-state p{font-size:14px;line-height:20px;color:var(--text-3)}
.apps-state .btn{margin-top:14px}
.apps-listing{display:flex;align-items:center;justify-content:space-between;gap:32px;padding:24px 28px;border-radius:18px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line)}
.apps-listing h2{font-size:17px;font-weight:500;line-height:24px}
.apps-listing p{margin-top:6px;max-width:780px;font-size:14px;line-height:24px;color:var(--text-2)}
.apps-listing code{padding:1px 6px;border-radius:5px;background:var(--tint-2);font-size:12.5px;color:var(--text);white-space:nowrap}
.apps-listing .arrow-link{flex-shrink:0;font-size:14px}
.app-hero-copy{gap:20px;max-width:780px;min-width:0}
.app-back{display:inline-flex;align-items:center;gap:8px;align-self:flex-start;font-family:var(--font-code);font-size:12px;letter-spacing:.6px;line-height:16px;text-transform:uppercase;color:var(--text-3);transition:color .15s ease}
.app-back:hover{color:var(--accent)}
.app-back .i{font-size:14px}
.app-head{display:flex;align-items:center;gap:20px;min-width:0}
.app-head-text{display:flex;flex-direction:column;gap:10px;min-width:0}
.app-title{font-size:48px;letter-spacing:-1.8px;line-height:54px;overflow-wrap:anywhere}
.app-meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;font-size:13px;line-height:18px;color:var(--text-3)}
.app-meta:empty{display:none}
.app-meta .app-tags{margin-top:0}
.app-link{display:inline-flex;align-items:center;gap:6px;max-width:100%;min-width:0;font-family:var(--font-code);font-size:13px;line-height:18px;color:var(--accent)}
.app-link span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.app-link:hover span{text-decoration:underline;text-underline-offset:3px}
.app-link .i{font-size:13px}
.app-icon.is-lg{width:64px;height:64px;border-radius:16px}
.app-icon.is-lg img{width:40px;height:40px}
.app-icon.is-lg.app-mono{font-size:28px}
.app-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:0}
.app-stat{display:flex;flex-direction:column;gap:10px;min-width:0;padding:22px 24px;border:1px solid var(--line);border-radius:18px;background:var(--surface)}
.app-stat dt{font-family:var(--font-code);font-size:11px;letter-spacing:.6px;line-height:14px;text-transform:uppercase;color:var(--text-3)}
.app-stat dd{margin:0;overflow:hidden;text-overflow:ellipsis;font-size:32px;font-weight:500;letter-spacing:-1px;line-height:36px;white-space:nowrap;color:var(--text)}
.app-stat dd.up{color:var(--ok)}
.app-stat dd.down{color:var(--err)}
.app-stat .app-stat-note{font-size:13px;font-weight:400;letter-spacing:0;line-height:18px;white-space:normal;color:var(--text-3)}
.app-stat .sk{height:28px;width:60%}
.app-chart-card .activity-bar-col{min-width:0}
.app-chart-card .activity-chart-box.is-dense{gap:6px}
.app-chart-card .activity-bar-label.is-skip{visibility:hidden;max-width:0}
.app-chart-card .activity-bar-stack{background:var(--series-1)}
.app-chart-card .activity-bar-col:hover .activity-bar-stack{filter:brightness(1.08)}
.app-chart-card .is-zero .activity-bar-stack{min-height:2px;background:var(--tint-3)}
.app-models-table .lb-logo{width:30px;height:30px}
.app-models-table .lb-logo img{width:18px;height:18px}
.app-model{display:flex;align-items:center;min-width:0;font-family:var(--font-code);font-size:14px}
.app-model .lb-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.app-models-table td.num{font-family:var(--font-code);font-size:14px}

@media (max-width:1100px) and (min-width:641px){
  .apps-table .c-models{display:none}
}

@media (max-width:900px){
  .app-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media (max-width:640px){
  .apps-body{gap:32px;padding-top:28px;padding-bottom:64px}
  .apps-cats{flex-wrap:nowrap;overflow-x:auto;margin:0 -20px;padding:0 20px;scrollbar-width:none}
  .apps-cats::-webkit-scrollbar{display:none}
  .apps-cat{flex-shrink:0}
  .apps-table,.apps-table tbody{display:block}
  .apps-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
  .apps-table tr{display:grid;gap:12px;padding:16px;border-bottom:1px solid var(--line)}
  .apps-table tbody tr:last-child{border-bottom:0}
  .apps-table td,.apps-table td:first-child,.apps-table td[class]{width:auto;padding:0;border:0}
  .apps-row .app-cell{align-items:flex-start}
  .apps-row{grid-template-columns:22px minmax(0,1fr) auto;grid-template-areas:"r a a" ". t g" ". m m";align-items:center}
  .apps-row .c-rank{grid-area:r;align-self:start;padding-top:10px}
  .apps-row .c-app{grid-area:a;min-width:0}
  .apps-row .c-tokens{grid-area:t;min-width:0}
  .apps-row .c-growth{grid-area:g;align-self:end}
  .apps-row .c-models{grid-area:m;min-width:0}
  .apps-row .c-models:empty{display:none}
  .app-desc{display:-webkit-box;white-space:normal;-webkit-line-clamp:2;-webkit-box-orient:vertical}
  .app-tok{margin-bottom:6px}
  .app-models-table tr{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"m m" "t t" "q s"}
  .app-models-table .c-model{grid-area:m;min-width:0}
  .app-models-table .c-mtokens{grid-area:t}
  .app-models-table .c-req{grid-area:q;text-align:left}
  .app-models-table .c-share{grid-area:s}
  .app-models-table td[data-label]::before{content:attr(data-label) " ";margin-right:6px;font-size:10px;letter-spacing:.6px;text-transform:uppercase;color:var(--text-3)}
  .apps-listing{flex-direction:column;align-items:flex-start;gap:16px;padding:20px 18px;border-radius:14px}
  .app-hero-copy{gap:16px}
  .app-head{gap:14px}
  .app-icon.is-lg{width:52px;height:52px;border-radius:13px}
  .app-icon.is-lg img{width:32px;height:32px}
  .app-icon.is-lg.app-mono{font-size:23px}
  .app-title{font-size:32px;letter-spacing:-1px;line-height:38px}
  .sk-title{width:200px;height:30px}
  .app-stats{gap:12px}
  .app-stat{gap:8px;padding:16px 18px;border-radius:14px}
  .app-stat dd{font-size:24px;letter-spacing:-.6px;line-height:28px}
}
/* The narrowest phones: the longest range label still fits its equal share. */
@media (max-width:360px){.seg-toggle .range-tab-btn{font-size:12px}}
/* Hover hints (from a title), drawn like the console's (console.css .ttip): landing.js moves the title
   to data-tip and shows it in one .ttip above the element. */
.ttip{position:fixed;z-index:95;pointer-events:none;background:var(--surface);border:1px solid var(--line-strong);border-radius:8px;box-shadow:0 12px 32px var(--card-shadow);padding:6px 9px;font-size:12px;font-weight:500;line-height:16px;color:var(--text);white-space:nowrap;max-width:280px;opacity:0;transition:opacity .12s ease}
.ttip.show{opacity:1}
@media (prefers-reduced-motion:reduce){.ttip{transition:none}}

/* Docs changelog (/docs/changelog): filter tabs, months and dated entries */
.cl-filter{display:flex;gap:24px;margin:8px 0 8px;border-bottom:1px solid var(--line);overflow-x:auto;scrollbar-width:none}
.cl-filter::-webkit-scrollbar{display:none}
.cl-filter-btn{position:relative;padding:0 0 12px;font-size:14px;line-height:18px;color:var(--text-2);white-space:nowrap;transition:color .15s ease}
.cl-filter-btn:hover{color:var(--text)}
.cl-filter-btn.active{color:var(--text);font-weight:500}
.cl-filter-btn.active::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:2px;background:var(--text)}
.docs-main-col article h2.cl-month-title{margin:40px 0 0;padding-bottom:10px;font-family:var(--font-code);font-size:12px;font-weight:400;letter-spacing:1.2px;line-height:16px;text-transform:uppercase;color:var(--text-3)}
.cl-month[hidden],.cl-entry[hidden]{display:none}
.cl-entry{display:flex;flex-direction:column;align-items:flex-start;padding:28px 0;border-top:1px solid var(--line);scroll-margin-top:calc(var(--hdr-h) + 16px)}
.cl-date{margin-bottom:10px;font-family:var(--font-code);font-size:12px;line-height:16px;color:var(--text-2)}
.cl-date:hover{color:var(--accent)}
.cl-tags{display:flex;gap:6px;margin-bottom:12px}
.cl-tag{display:inline-flex;align-items:center;height:20px;padding:0 7px;border-radius:5px;background:var(--tint-2);font-family:var(--font-code);font-size:11px;line-height:14px;color:var(--text-2)}
.cl-tag.is-breaking{background:#F4EAD2;box-shadow:inset 0 0 0 1px #C9A24B99;color:#7A5410}
[data-theme=dark] .cl-tag.is-breaking{background:#E2B95E14;box-shadow:inset 0 0 0 1px #E2B95E55;color:#E2B95E}
.docs-main-col article h3.cl-title{margin:0 0 10px;font-size:22px;letter-spacing:-.4px;line-height:28px}
.docs-main-col article .cl-entry p{margin-bottom:14px}
.cl-snippet{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;margin-bottom:14px;padding:8px 8px 8px 14px;border-radius:10px;background:var(--code-bg);box-shadow:inset 0 0 0 1px var(--line-strong)}
.docs-main-col article div.cl-snippet > code{padding:0;background:none;font-size:13px;color:var(--code-text)}
.cl-more{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:500;line-height:18px;color:var(--accent)}
.cl-more:hover{text-decoration:underline;text-underline-offset:3px}
.cl-more .i{font-size:13px}