/* "Prehľad AI modelov" (#821, Homepage/aiModels.latte): the AI models overview of #817 in the colours
   and type of Landing V3. Tables stack into label/value rows on phones (`data-l` = the column label). */

.ai-models-summary { padding-bottom: 50px; }
.ai-models-asof { margin: 0 0 10px; font-size: 13px; font-weight: 650; color: #4a5366; }
.ai-models-lead { max-width: 760px; margin: 0 0 28px; font-size: var(--type-body); line-height: 1.75; }
.ai-note { margin-top: 14px; font-size: 13px; line-height: 1.65; color: #4a5366; }
.ai-intro { max-width: 860px; margin: 14px 0 26px; font-size: 15px; line-height: 1.75; }
.ai-notice { margin: 0 0 20px; padding: 14px 18px; border-radius: 12px; background: #fff3c9; font-size: 14px; line-height: 1.6; }

/* Templates per model of the first attempt: columns as wide as their share. */
.ai-share { display: flex; gap: 16px; align-items: stretch; margin: 0; padding: 0; list-style: none; }
/* A model with one or two templates would get a sliver; 170px keeps its name and chips readable. */
.ai-share-slice { flex-basis: 0; min-width: 170px; display: flex; flex-direction: column; }
.ai-share-bar { display: flex; align-items: baseline; gap: 8px; padding: 14px 16px; border-radius: 14px; }
.ai-share-0 .ai-share-bar { background: var(--yellow); }
.ai-share-1 .ai-share-bar { background: #dce6ff; }
.ai-share-2 .ai-share-bar { background: #c9f0e2; }
.ai-share-3 .ai-share-bar { background: #ffdff6; }
.ai-share-num { font-size: 40px; font-weight: 850; line-height: 1; letter-spacing: -.03em; }
.ai-share-of { font-size: 13px; white-space: nowrap; }
.ai-share-model { margin: 12px 0 8px; font-weight: 750; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ai-chips li { padding: 4px 9px; border-radius: 20px; background: var(--lavender); font-size: 12px; }

.ai-models-band h2 { font-size: var(--type-section); }
.ai-models-alt { background: #f4f5ff; }

/* Tables */
.ai-table { overflow-x: auto; }
.ai-stack { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.ai-stack thead th { text-align: left; font-size: 12px; font-weight: 750; color: #4a5366; padding: 10px; border-bottom: 2px solid #000; vertical-align: bottom; }
.ai-stack td, .ai-stack tbody th { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
.ai-stack tbody th { font-weight: 750; }
.ai-models-alt .ai-stack td, .ai-models-alt .ai-stack tbody th { border-bottom-color: #dfe2f2; }
.ai-stack tbody + tbody { border-top: 1px solid #9aa3b5; }
.ai-group-cont td { border-bottom-color: transparent; }
.ai-stack tbody tr:last-child td { border-bottom-color: var(--line); }
.ai-template { width: 20%; }
.ai-model-name { display: block; white-space: nowrap; font-weight: 650; }
.ai-code { display: block; font-size: 11px; color: #6d7586; overflow-wrap: anywhere; }
.ai-code-inline { display: inline; margin-left: 4px; overflow-wrap: normal; }
.ai-fallback { display: block; }
.ai-fallback + .ai-fallback { margin-top: 6px; }
.ai-muted { color: #6d7586; }
.ai-tag { display: inline-block; padding: 3px 10px; border-radius: 20px; border: 1px solid #d4dcea; background: #fff; font-size: 12px; font-weight: 650; white-space: nowrap; }
.ai-tag-strong { border-color: var(--yellow); background: var(--yellow); }
.ai-yes { font-weight: 750; color: #24714f; }
.ai-num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* History of model changes */
.ai-history { max-width: 860px; margin: 20px 0 0; padding: 0; list-style: none; }
.ai-history li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.65; }
.ai-history-date { font-weight: 650; font-variant-numeric: tabular-nums; color: #4a5366; white-space: nowrap; }

@media (max-width: 900px) {
	.ai-share { flex-direction: column; }
	.ai-share-slice { min-width: 0; }
}

@media (max-width: 760px) {
	.ai-models-summary { padding-bottom: 30px; }
	.ai-share-num { font-size: 32px; }
	.ai-table { overflow-x: visible; }
	.ai-stack { font-size: 13px; }
	.ai-stack thead { display: none; }
	.ai-stack tbody { display: block; }
	.ai-stack tr { display: grid; padding: 6px 0; border-bottom: 1px solid var(--line); }
	.ai-stack tbody + tbody { border-top: 2px solid #9aa3b5; }
	.ai-stack td, .ai-stack tbody th { display: flex; justify-content: space-between; gap: 14px; padding: 5px 0; border: 0; text-align: right; }
	.ai-stack td::before, .ai-stack tbody th::before { content: attr(data-l); flex: none; max-width: 45%; color: #6d7586; font-weight: 650; text-align: left; }
	.ai-cell { min-width: 0; }
	.ai-stack .ai-template { width: auto; font-size: 15px; }
	.ai-group-cont { border-bottom-color: transparent; }
	.ai-num { white-space: normal; }
	.ai-model-name { white-space: normal; }
	.ai-history li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
