/* Model cards inherit the active HUMAN / AI palette and shared tablet. */
body[data-section=models] .models-page{padding:30px 4.2% 26px}
.models-heading{margin:0 0 24px;max-width:650px}
.models-heading h1{font-size:clamp(30px,3.2vw,48px);line-height:1.2;letter-spacing:-.035em;margin:0 0 12px;color:#f4f6f8}
.models-heading p{font-size:14px;line-height:1.7;color:#c0cad4;margin:0;max-width:420px}
.models-page .models-card-grid{grid-template-columns:repeat(4,minmax(0,1fr));align-items:stretch;gap:20px}
/* The English catalog has three models (no RuBERT): fill the row instead of leaving an empty fourth column. */
@media(min-width:1101px){.models-page .models-card-grid[data-model-count="3"]{grid-template-columns:repeat(3,minmax(0,1fr))}}
.models-page .model-display-card{display:flex;flex-direction:column;gap:0;grid-template-columns:none;min-width:0;padding:21px 19px 19px;min-height:350px;border-radius:12px;border:1px solid color-mix(in srgb,var(--accent) 40%,transparent);background:radial-gradient(ellipse at 50% 0%,var(--halo),transparent 75%),#050c13d9;box-shadow:inset 0 1px 0 #ffffff08}
html[data-theme=human] .models-page .model-display-card{background:radial-gradient(ellipse at 50% 0%,var(--halo),transparent 75%),#100e09d9}
.model-display-card h2{margin:0;min-height:42px;display:flex;align-items:center;font-size:clamp(14px,1.25vw,19px);line-height:1.4;font-weight:600;letter-spacing:-.02em;overflow-wrap:anywhere;color:var(--light)}
.model-visual{height:110px;margin:6px 0 14px;display:grid;place-items:center;color:var(--accent)}
.models-page .model-display-card>*{min-width:0}
.models-page .model-visual{flex-shrink:0}
.model-schema{width:100%;height:100%;max-width:245px;overflow:visible;filter:drop-shadow(0 0 5px var(--halo))}
.model-grid{opacity:.15;stroke-width:1}
.model-card-meta{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:10px;color:#b7c2ce;min-height:23px;margin-bottom:12px}
.model-card-meta>span:first-child{color:var(--light);letter-spacing:.06em}
.model-card-metrics{display:grid;gap:9px;margin:0 0 20px;padding:0;font-size:13px;line-height:1.5}
.model-card-metrics>div{display:flex;justify-content:space-between;align-items:baseline;gap:12px;min-width:0}
.model-card-metrics dt{color:#c0cad4}
.model-card-metrics dd{margin:0;color:var(--text);font-variant-numeric:tabular-nums;white-space:nowrap;font-weight:600}
.model-detail-button{margin-top:auto;display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:44px;width:100%;padding:10px 14px;border:1px solid color-mix(in srgb,var(--accent) 55%,transparent);border-radius:24px;color:var(--light);background:#03090f80;font-size:12px;cursor:pointer;box-shadow:inset 0 0 15px var(--halo)}
.model-detail-button>span{font-size:18px}
.model-detail-button:hover{background:var(--halo);border-color:var(--accent)}
.models-comparison-button{display:inline-flex;justify-content:space-between;gap:24px;align-items:center;min-height:48px;max-width:100%;margin:16px 0 0;padding:13px 20px;background:#070d14b8;border:1px solid color-mix(in srgb,var(--accent) 58%,#978674);border-radius:8px;color:#edf4fa;font-size:11px;letter-spacing:.06em;text-transform:uppercase;cursor:pointer;text-align:left;box-shadow:inset 0 0 18px var(--halo)}
.models-comparison-button>span{font-size:22px;line-height:1;flex-shrink:0}
.models-comparison-button:hover{background:var(--halo);border-color:var(--accent);box-shadow:inset 0 0 18px var(--halo),0 0 22px var(--halo)}
.models-comparison-button:focus-visible{outline:2px solid var(--light);outline-offset:4px}
.model-info-dialog{--model-dialog-bg:color-mix(in srgb,var(--bg),var(--accent) 9%);position:fixed;inset:0;margin:auto;width:min(650px,94vw);max-width:94vw;max-height:88svh;border:1px solid var(--edge);border-radius:18px;padding:28px;background:radial-gradient(ellipse at 50% 0%,var(--halo),transparent 70%),var(--model-dialog-bg);color:var(--text);overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--accent) transparent}
.model-info-dialog::backdrop{background:#02060bcc;backdrop-filter:blur(8px)}
.model-dialog-close{position:sticky;top:0;z-index:3;display:flex;justify-content:flex-end;height:24px}
.model-dialog-close button{width:44px;height:44px;border:1px solid var(--edge);border-radius:50%;background:var(--model-dialog-bg,var(--bg));color:var(--text);font-size:24px;cursor:pointer;flex-shrink:0}
.model-info-dialog>h2{font-size:26px;line-height:1.4;margin:0 55px 14px 0;overflow-wrap:anywhere}
.model-info-dialog>p{font-size:13px;line-height:1.8;overflow-wrap:anywhere;margin:14px 0}
.model-info-dialog .model-card-metrics{margin:24px 0;padding:18px 0;border-top:1px solid var(--edge);border-bottom:1px solid var(--edge)}
.model-checkpoint{display:block;white-space:normal;overflow-wrap:anywhere;font-size:12px;line-height:1.8;color:var(--muted)}
.model-comparison-dialog{width:min(1100px,94vw)}
.model-comparison-dialog .bar-row{grid-template-columns:minmax(0,1.2fr) minmax(0,2fr) 65px;gap:14px}
.model-comparison-dialog .model-overview{margin-top:22px}
@media(max-width:1100px){.models-page .models-card-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.model-display-card h2{font-size:19px}.model-visual{height:105px}.models-heading{margin-bottom:22px}.models-page .model-display-card{min-height:350px}}
@media(max-width:650px){body[data-section=models] .models-page{padding:24px 20px}.models-page .models-card-grid{grid-template-columns:minmax(0,1fr);gap:18px}.models-heading h1{font-size:32px}.models-heading p{font-size:13px}.models-page .model-display-card{padding:20px;min-height:340px}.model-display-card h2{min-height:30px;font-size:21px}.model-visual{height:110px;margin:8px 0 12px}.model-card-meta{font-size:11px}.model-card-metrics{font-size:14px;gap:10px}.model-detail-button{min-height:48px;font-size:13px}.model-info-dialog{padding:18px;max-height:92svh}.model-info-dialog>h2{font-size:22px}.model-comparison-dialog .enrichment-grid{grid-template-columns:1fr}.model-comparison-dialog .bar-row{grid-template-columns:minmax(0,1fr) 65px;gap:8px}.model-comparison-dialog .bar-track{grid-column:1/-1;grid-row:2}.model-comparison-dialog .bar-value{grid-column:2;grid-row:1}.model-comparison-dialog .panel-title{flex-wrap:wrap}.model-comparison-dialog .chart-panel{padding:16px}}
@media(prefers-reduced-motion:no-preference){.model-detail-button,.models-comparison-button{transition:background .2s,border-color .2s,box-shadow .2s}}
@media(max-width:420px){
 body[data-section=models] .models-page{padding:20px 16px}
 .models-page .model-display-card{padding:18px;min-height:0}
 .model-display-card h2{font-size:19px}
 .model-card-meta{flex-wrap:wrap;row-gap:4px}
 .models-comparison-button{max-width:100%;font-size:12px;line-height:1.6}
 .model-info-dialog{width:calc(100vw - 16px);max-width:calc(100vw - 16px);padding:16px}
 .model-info-dialog>h2{font-size:20px}
}
@media(min-width:1101px) and (max-height:900px){
 body[data-section=models] .models-page{padding-top:20px;padding-bottom:20px}
 .models-heading{margin-bottom:18px}
 .models-heading h1{font-size:36px;margin-bottom:8px}
 .models-heading p{max-width:650px;font-size:13px}
 .models-page .model-display-card{padding:17px;min-height:350px}
 .model-display-card h2{min-height:36px}
 .model-visual{height:80px;margin-bottom:12px}
 .model-card-metrics{gap:8px;margin-bottom:16px;font-size:12px}
 .models-comparison-button{margin-top:8px;min-height:48px}
}

/* Fit the whole desktop screen; narrow layouts grow with the document. */
body[data-section=models] .tablet #main{overflow:visible;overscroll-behavior:auto}
body[data-section=models] .models-page{height:100%;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:clamp(10px,1.8vh,18px);padding-top:clamp(14px,2.4vh,24px);padding-bottom:clamp(14px,2.4vh,24px);min-width:0}
.models-page .models-heading{margin:0}
.models-page .models-heading h1{font-size:clamp(30px,2.7vw,42px);margin-bottom:8px}
.models-page .models-heading p{max-width:650px;font-size:13px}
.models-page .models-card-grid{min-height:0}
.models-page .model-display-card{min-height:0;display:grid;grid-template-rows:42px minmax(0,1fr) 24px auto 44px;gap:clamp(4px,.8vh,8px);padding:clamp(12px,1.8vh,18px)}
.models-page .model-display-card h2{min-height:0;margin:0;font-size:clamp(14px,1.2vw,19px)}
.models-page .model-visual{position:relative;display:block;height:100%;min-height:0;min-width:0;max-height:130px;margin:0;align-self:center}
/* The drawing takes its size from its grid row, without an intrinsic SVG minimum. */
.models-page .model-visual .model-schema{position:absolute;inset:0;margin:auto;display:block;width:100%;height:100%;min-width:0;min-height:0;max-width:245px;max-height:100%;overflow:hidden}
.models-page .model-card-meta{margin:0;min-height:0}
.models-page .model-card-metrics{margin:4px 0 8px;font-size:12px;gap:6px}
.models-page .model-detail-button{margin:0;min-height:44px;height:44px;padding:9px 12px}
.models-page .models-comparison-button{justify-self:start;margin:0;min-height:48px;font-size:11px}
@media(max-width:1100px){
 body[data-section=models] .tablet{height:auto;min-height:calc(var(--tablet-header-height) + var(--tablet-scene-height) + 18px)}
 body[data-section=models] .tablet #main{height:auto;overflow:visible}
 body[data-section=models] .models-page{height:auto;grid-template-rows:auto auto auto;gap:22px;padding:24px 4.2%}
 .models-page .models-card-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
 .models-page .model-display-card{grid-template-rows:42px 100px 24px auto 48px;min-height:0;padding:18px}
 .models-page .model-display-card h2{font-size:18px}
 .models-page .model-detail-button{height:48px;min-height:48px}
 .models-page .model-card-metrics{font-size:13px;gap:8px}
}
@media(max-width:650px){
 body[data-section=models] .models-page{padding:24px 18px}
 .models-page .models-card-grid{grid-template-columns:minmax(0,1fr)}
 .models-page .model-display-card{grid-template-rows:auto 105px auto auto 48px;gap:12px;padding:20px}
 .models-page .model-display-card h2{font-size:21px;min-height:30px}
 .models-page .model-card-metrics{font-size:14px}
 .models-page .models-comparison-button{font-size:11px;line-height:1.6;gap:14px;padding:12px 15px;width:100%;max-width:100%}
 .models-page .model-card-meta{min-height:22px}
}

/* Shared SVG illustration treatment; card geometry is unchanged. */
.model-schema-premium{font-family:inherit}
.model-schema-premium .illustration-focus,.model-schema-premium .illustration-margin,.model-schema-premium .illustration-support,.model-schema-premium .illustration-orbits{transition:opacity .3s,filter .3s}
.model-display-card:hover .illustration-focus{filter:drop-shadow(0 0 2px #ffb52e80)}
.model-display-card:hover .illustration-margin,.model-display-card:hover .illustration-orbits{opacity:.9}
@media(prefers-reduced-motion:no-preference){
 .model-display-card:hover .illustration-points,.model-display-card:hover .illustration-language,.model-display-card:hover .illustration-pulse{animation:model-illustration-breathe 2.6s ease-in-out infinite}
 @keyframes model-illustration-breathe{0%,100%{opacity:.8}50%{opacity:1}}
}

.models-page .model-visual .model-render-image{object-fit:contain;filter:none}

/* Size illustrations from card width, never from leftover viewport height. */
body[data-section=models] .tablet{height:auto;min-height:calc(var(--tablet-header-height) + var(--tablet-scene-height) + 18px)}
body[data-section=models] .tablet #main{height:auto;overflow:visible}
body[data-section=models] .models-page{height:auto;grid-template-rows:auto auto auto}
.models-page .model-display-card{grid-template-rows:minmax(30px,auto) auto 24px auto 44px;gap:10px;padding:18px}
.models-page .model-display-card h2{font-size:clamp(17px,1.2vw,20px);line-height:1.4}
.models-page .model-visual{width:min(100%,240px);height:auto;aspect-ratio:1.2;max-height:none;justify-self:center;align-self:center;margin:4px 0}
.models-page .model-visual .model-render-image{max-width:100%;object-fit:contain;object-position:center;filter:none;transform:scale(1.25)}
.models-page .model-card-metrics{font-size:14px;line-height:1.5;gap:8px;margin:4px 0 8px}
@media(max-width:1100px){
 .models-page .model-display-card{grid-template-rows:minmax(30px,auto) auto 24px auto 48px}
 .models-page .model-display-card h2{font-size:19px}
}
/* From 1101px the Models page uses the same fixed frame as the other pages: the comparison button sits
   beside the heading and the drawings take the height that is left (at most their width-based size).
   Where even that does not fit, the page scrolls inside the frame, as Analytics and Contacts do. */
@media(min-width:768px){
 /* !important as in unified-tablet.css: site-consistency.css sets #main to height:auto with a heavier selector.
    On tablets the two-column cards scroll inside the frame, as Analytics and Contacts do there. */
 body[data-section=models] .tablet{height:calc(var(--tablet-header-height) + var(--tablet-scene-height) + 18px)!important;min-height:0!important}
 body[data-section=models] .tablet #main{height:var(--tablet-scene-height)!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain!important}
}
@media(min-width:1101px){
 /* .page-content.models-page outranks the later height:auto in site-consistency.css. */
 body[data-section=models] .page-content.models-page{height:100%;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto minmax(0,1fr);column-gap:24px}
 .models-page .models-heading{grid-column:1;grid-row:1}
 .models-page .models-comparison-button{grid-column:2;grid-row:1;align-self:end}
 .models-page .models-card-grid{grid-column:1/-1;grid-row:2}
 .models-page .model-display-card{grid-template-rows:minmax(30px,auto) minmax(0,1fr) 24px auto 44px}
 .models-page .model-visual{height:100%;max-height:200px;aspect-ratio:auto}
}
@media(max-width:650px){
 .models-page .model-display-card{grid-template-rows:auto auto 24px auto 48px;gap:12px;padding:20px}
 .models-page .model-display-card h2{font-size:19px}
 .models-page .model-card-metrics{font-size:15px}
}

.models-page .model-visual .model-image-blue{display:none}
html[data-theme=ai] .models-page .model-visual .model-image-gold{display:none}
html[data-theme=ai] .models-page .model-visual .model-image-blue{display:block}

html[data-theme=ai] .models-page .model-visual .model-image-blue{filter:url(#model-blue-tint) brightness(1.55)}
html[data-theme=ai] .models-page [data-model=mbert] .model-visual .model-image-blue{filter:url(#model-blue-tint) brightness(1.2)}
