/* Model Library (/models/ and /models/<id>/), generated by
   site/tools/build-models.py. Builds on landing-home.css (.hx-model cards,
   .gx-table) and design.css; only what those do not have lives here. */
.mx-mark { display: inline-grid; place-items: center; font: 650 15px/1 var(--display, Inter, system-ui, sans-serif); color: var(--text); }
.mx-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.mx-tabs[hidden] { display: none; }
.mx-tab { font: inherit; font-size: 14px; color: var(--text-dim); background: transparent; border: 1px solid var(--border); border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.mx-tab:hover { color: var(--text); border-color: var(--border-hi); }
.mx-tab[aria-pressed="true"] { color: var(--bg, #0a0b0a); background: var(--accent); border-color: var(--accent); }
.mx-table .mx-name { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.mx-table .mx-name:hover { color: var(--accent); }
.mx-table .mx-name .hx-model-logo { width: 36px; height: 36px; padding: 6px; }
.mx-table td small { display: block; margin-top: 2px; font-size: 13px; color: var(--text-dim); }
.mx-table .mx-gpu a { color: var(--text); font-weight: 600; text-decoration: none; }
.mx-table .mx-gpu a:hover { color: var(--accent); }
.mx-acts { display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
.mx-table .mx-gpu small { white-space: nowrap; }
.mx-view { font-size: 14px; color: var(--accent); text-decoration: none; font-weight: 600; white-space: nowrap; }
.mx-table tr[hidden] { display: none !important; }
.mx-hero .crumb { margin-bottom: 20px; }
.mx-maker { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; color: var(--text-dim); font-weight: 500; }
.mx-maker .hx-model-logo { width: 40px; height: 40px; }
.mx-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 12px; }
.mx-tags .hx-model-tag { margin-left: 0; }
.mx-on { margin: 18px 0 0; font-size: 14px; color: var(--text-dim); }
.mx-steps { margin: 8px 0 0; padding-left: 22px; max-width: 760px; color: var(--text-dim); line-height: 1.6; }
.mx-steps li + li { margin-top: 8px; }
.mx-code { margin: 24px 0 0; padding: 18px 20px; max-width: 900px; overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-soft); font-size: 13px; line-height: 1.55; }
@media (max-width: 760px) {
  .mx-table tbody th { grid-column: 1 / span 2; grid-row: 1; margin-bottom: 6px; }
  .mx-table td[data-label="Engine"] { grid-column: 1; grid-row: 2; font-size: 13px; }
  .mx-table td[data-label="Size"] { grid-column: 1; grid-row: 3; font-size: 13px; }
  .mx-table .mx-gpu { grid-column: 1; grid-row: 4; text-align: left !important; margin-top: 6px; }
  .mx-table .gx-action { grid-column: 2; grid-row: 2 / span 3; align-self: end; }
  .mx-acts { flex-direction: column; align-items: flex-end; gap: 8px; }
  .mx-table .mx-gpu small { white-space: normal; }
}
/* Configure picker on /models/<id>/ */
.mx-picker { display: flex; flex-wrap: wrap; gap: 16px; margin: 8px 0 28px; }
.mx-picker[hidden], .mx-variant[hidden], [data-mx-v][hidden] { display: none !important; }
.mx-picker label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-dim); min-width: 220px; flex: 1 1 220px; max-width: 420px; }
.mx-picker select { font: inherit; font-size: 15px; color: var(--text); background: var(--bg-soft); border: 1px solid var(--border-hi); border-radius: 8px; padding: 10px 12px; }
.mx-config-table { max-width: 760px; margin-bottom: 32px; }
.mx-config-table code, .mx-spec code { font-size: 12.5px; }
.mx-where .mx-nofit th, .mx-where .mx-nofit td { opacity: .62; }
.mx-where .mx-why { font-size: 13px; color: var(--text-dim); }
@media (max-width: 760px) {
  .mx-where .mx-nofit .mx-why { grid-column: 1 / span 2; grid-row: 4; }
}

/* Touch: every control on these pages is at least 44px tall on a coarse
   pointer (phones, tablets), without changing the desktop look. */
@media (pointer: coarse) {
  .mx-tab { min-height: 44px; padding: 10px 16px; }
  .hx-model-alt, .mx-view { display: inline-flex; align-items: center; min-height: 44px; }
  .mx-picker select { min-height: 48px; }
}
@media (max-width: 760px) {
  /* 16px keeps iOS from zooming the page when a select is focused. */
  .mx-picker select { font-size: 16px; }
  .mx-picker label { max-width: none; }
  /* Category tabs: one swipeable row instead of two wrapped lines. */
  .mx-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
             max-width: 100%; min-width: 0; scroll-snap-type: x proximity; }
  .mx-tabs::-webkit-scrollbar { display: none; }
  .mx-tab { flex: none; scroll-snap-align: start; }
  /* Featured and related model cards: a swipeable row of cards, the next
     one peeking in, instead of six full-height cards stacked. */
  .hx-models { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
               -webkit-overflow-scrolling: touch; max-width: 100%; min-width: 0; padding: 2px 0 6px;
               position: relative; } /* contains the absolutely placed sr-only text */
  /* Scrollers inside a grid or flex section must not widen it. */
  main .lx-band, main .lx-band > * { min-width: 0; max-width: 100%; }
  .hx-models::-webkit-scrollbar { display: none; }
  .hx-models > .hx-model { flex: 0 0 84%; scroll-snap-align: start; }
  .hx-model { padding: 20px; }
  /* Hero: the main actions full width, easy to hit with a thumb. */
  .mx-hero .lx-cta { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .mx-hero .lx-cta .btn, .mx-hero .lx-cta .mx-hero-btn .btn { width: 100%; justify-content: center; min-height: 48px; }
  .mx-hero .mx-hero-btn[hidden] { display: none; }
  .mx-code { font-size: 12px; padding: 14px; }
  .mx-steps { padding-left: 20px; }
}
/* Tablet: the full table minus the Engine column (each model page shows
   its engines), with View model above Deploy. */
@media (min-width: 761px) and (max-width: 1100px) {
  .mx-table th:nth-child(2), .mx-table td[data-label="Engine"] { display: none; }
  .mx-table tbody th, .mx-table td { padding: 14px 16px; }
  .mx-acts { flex-direction: column; align-items: flex-end; gap: 6px; }
}
