/* mlxradar components, built on tokens.css (the design's own token file). */

body { min-height: 100vh; }
.wrap { max-width: var(--page-max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.muted { color: var(--color-text-3); }
.muted-2 { color: var(--color-text-2); }
.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; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 50; background: var(--color-raised); padding: 8px 14px; border-radius: 10px; box-shadow: var(--shadow-md); }
.skip:focus { top: 8px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; width: 100%; background: color-mix(in srgb, var(--color-bg) 78%, transparent); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--color-hairline); }
.site-header .bar { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--color-text); flex: none; }
.brand:hover { color: var(--color-text); text-decoration: none; }
.brand span { font-size: 17px; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.radar { display: inline-flex; line-height: 0; flex: none; color: var(--color-text); }
.radar svg { display: block; overflow: visible; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { font-size: 13px; white-space: nowrap; color: var(--color-text-2); }
.nav a:hover { color: var(--color-text); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--color-text); font-weight: 600; }
.spacer { flex: 1; }
.header-search { position: relative; display: flex; align-items: center; width: min(240px, 24vw); }
.header-search svg { position: absolute; left: 11px; color: var(--color-text-3); pointer-events: none; }
.header-search .input { padding-left: 32px; font-size: 13px; min-height: 32px; border-radius: 999px; }
.menu-btn { display: none; background: transparent; color: var(--color-text); width: 44px; min-height: 44px; margin-right: -10px; }
.menu-btn:hover { background: var(--color-fill); }
.mobile-panel { display: none; padding: 8px 0 24px; flex-direction: column; gap: 12px; background: var(--color-bg); }
.mobile-panel .search { position: relative; display: flex; align-items: center; }
.mobile-panel .search svg { position: absolute; left: 14px; color: var(--color-text-3); }
.mobile-panel .input { padding-left: 40px; min-height: 44px; font-size: 16px; border-radius: 12px; }
.mobile-panel nav { display: flex; flex-direction: column; }
.mobile-panel nav a { display: flex; align-items: center; min-height: 52px; border-bottom: 1px solid var(--color-hairline); font-weight: 600; font-size: 22px; letter-spacing: -.02em; color: var(--color-text); }
.site-header.open .mobile-panel { display: flex; }
.menu-btn .i-close { display: none; }
.site-header.open .menu-btn .i-open { display: none; }
.site-header.open .menu-btn .i-close { display: inline; }
@media (max-width: 899px) {
  .site-header .nav, .site-header .header-search { display: none; }
  .menu-btn { display: inline-flex; }
}

/* Small pills and badges */
.pill { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--color-fill); color: var(--color-text-2); font-size: 12px; font-weight: 500; white-space: nowrap; flex: none; }
.pill-accent { background: var(--accent-tint); color: var(--accent); font-weight: 600; }
.badges { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }

/* Hero */
.hero { padding-top: clamp(40px, 6vw, 72px); display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.updated { font-size: 13px; color: var(--color-text-3); display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok-fill); }
.hero h1 { font-size: clamp(34px, 4.6vw, 52px); line-height: 1.06; letter-spacing: -.03em; margin: 0; text-wrap: balance; }
.hero .lead { max-width: 46ch; text-wrap: balance; }
.lead { margin: 0; font-size: var(--fs-lead); color: var(--color-text-2); }
.hero-search { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 580px; margin-top: 10px; padding: 6px 6px 6px 20px; border-radius: 999px; background: var(--color-surface); }
.hero-search input { flex: 1; min-width: 0; height: 44px; border: 0; outline: none; background: transparent; color: var(--color-text); font: inherit; font-size: 17px; }
.hero-search input::placeholder { color: var(--color-text-3); }
.hero-search .btn { min-height: 44px; padding: 0 22px; font-size: 15px; flex: none; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.quick a { font-size: 13px; padding: 6px 13px; border-radius: 999px; color: var(--accent); border: 1px solid var(--color-hairline); }
.quick a:hover { background: var(--accent-tint); border-color: transparent; text-decoration: none; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 28px 0 0; width: 100%; max-width: 620px; }
.stats dd { margin: 0; font-size: clamp(28px, 4vw, 40px); font-weight: 600; letter-spacing: -.03em; line-height: 1.15; }
.stats dt { font-size: 13px; color: var(--color-text-3); }
.stats > div { display: flex; flex-direction: column-reverse; }

/* Sections */
.section { padding-top: clamp(64px, 9vw, 112px); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.section-head h2, .section-head h1 { margin: 0; }
.count { font-size: 14px; color: var(--color-text-3); }

/* Filters */
.controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.controls label, .fit-select { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--color-text-2); }
select.input { width: auto; min-height: 32px; padding: 4px 10px; font-size: 13px; }
.seg { display: flex; gap: 2px; padding: 2px; border-radius: 10px; background: var(--color-fill); }
.seg a, .seg button { display: flex; align-items: center; justify-content: center; font: inherit; font-size: 13px; font-weight: 500; padding: 5px 14px; border: 0; border-radius: 8px; cursor: pointer; background: transparent; color: var(--color-text); min-height: 28px; }
.seg a:hover { text-decoration: none; background: var(--color-fill); }
.seg [aria-pressed="true"], .seg [aria-current="true"], .seg [aria-checked="true"] { background: var(--color-raised); box-shadow: var(--shadow-sm); }
.seg.icons a { width: 34px; padding: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; padding: 20px 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 13px; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--color-divider); background: transparent; color: var(--color-text); cursor: pointer; font-family: inherit; }
.chip:hover { text-decoration: none; color: var(--color-text); background: var(--color-fill); }
.chip[aria-pressed="true"] { background: var(--color-text); color: var(--color-bg); border-color: var(--color-text); }
.chip[aria-pressed="true"]:hover { color: var(--color-bg); }
.fit-select { margin-left: auto; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 0; }
.pills a.remove { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; padding: 5px 8px 5px 12px; border-radius: 999px; background: var(--accent-tint); color: var(--accent); }
.pills a.remove:hover { text-decoration: none; background: var(--color-fill-2); }
.pills .btn-ghost { font-size: 13px; min-height: 30px; padding: 0 12px; }

/* Model card */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; margin-top: 16px; }
.card { display: flex; flex-direction: column; gap: 16px; padding: 22px; border-radius: var(--radius); background: var(--color-surface); color: var(--color-text); height: 100%; min-width: 0; transition: background-color .2s, box-shadow .2s; }
.card:hover, .card:focus-visible { background: var(--color-raised); box-shadow: var(--shadow-md), 0 0 0 1px var(--color-hairline); color: var(--color-text); text-decoration: none; }
.card-top { display: flex; flex-direction: column; gap: 6px; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; }
.card-meta > span:first-child { font-size: 13px; color: var(--color-text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-name { font-weight: 600; font-size: 21px; line-height: 1.15; letter-spacing: -.02em; text-wrap: pretty; overflow-wrap: anywhere; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 13px; color: var(--color-text-2); }
.card-stats { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 16px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--color-hairline); }
.k { font-size: 12px; color: var(--color-text-3); }
.v-big { font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 1.3; }
.v-big small, .unit { font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--color-text-2); }
.v { font-size: 14px; line-height: 1.5; }
.devices { display: flex; gap: 8px; align-items: center; height: 21px; }
.devices svg.off { opacity: .2; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--color-text-3); }

/* Rows (list view) */
.rows { margin-top: 12px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; padding: 14px 12px; border-radius: 12px; color: var(--color-text); box-shadow: 0 1px 0 var(--color-hairline); min-width: 0; transition: background-color .15s; }
.row:hover { background: var(--color-surface); color: var(--color-text); text-decoration: none; }
.row-main { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; font-size: 16px; line-height: 1.25; letter-spacing: -.01em; overflow-wrap: anywhere; }
.row-sub { font-size: 13px; color: var(--color-text-3); }
.row-stats { flex: 0 0 auto; display: flex; gap: 24px; font-size: 14px; }
.row-stats > span { display: flex; flex-direction: column; white-space: nowrap; min-width: 64px; }
.tag-sm { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--accent-tint); color: var(--accent); }
.tag-sm.plain { font-weight: 500; background: var(--color-fill); color: var(--color-text-2); }

/* Fit meter */
.fit { display: flex; flex-direction: column; gap: 8px; width: 100%; min-width: 0; }
.fit-cells { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.fit-cell { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fit-bar { height: 5px; border-radius: 999px; background: var(--color-fill); }
.fit.full .fit-bar { height: 10px; }
.fit-cell.fits .fit-bar { background: var(--ok-fill); }
.fit-cell.tight .fit-bar { background: var(--warn-fill); }
.fit-label { display: flex; justify-content: space-between; gap: 2px; font-size: 11px; line-height: 1.2; color: var(--color-text-2); }
.fit-cell.no .fit-label { color: var(--color-text-3); }
.fit.fit-none .fit-cells { visibility: hidden; }
.fit-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--color-text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--color-fill-2); }
.legend i.ok { background: var(--ok-fill); }
.legend i.warn { background: var(--warn-fill); }

/* Empty state, more */
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 72px 0; color: var(--color-text-3); }
.empty h3 { margin: 12px 0 0; color: var(--color-text); }
.empty p { margin: 0; color: var(--color-text-2); max-width: 40ch; }
.more { display: flex; flex-direction: column; gap: 12px; align-items: center; padding: 36px 0 0; }
.more .btn { min-height: 44px; padding: 0 24px; font-size: 15px; }

/* Changelog */
.news { display: flex; flex-wrap: wrap; gap: 24px 48px; }
.news-intro { flex: 1 1 240px; display: flex; flex-direction: column; gap: 10px; }
.news-intro p { margin: 0; color: var(--color-text-2); max-width: 30ch; }
.news ol, .log { list-style: none; margin: 0; padding: 0; flex: 3 1 520px; min-width: 0; }
.news li { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 4px 16px; padding: 16px 0; border-bottom: 1px solid var(--color-hairline); }
.news time { font-size: 13px; color: var(--color-text-3); padding-top: 2px; }
.news-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.news-title { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.news-title a { font-weight: 600; font-size: 16px; color: var(--color-text); overflow-wrap: anywhere; }
.news-note { font-size: 14px; color: var(--color-text-2); }

/* Detail page */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--color-text-3); padding-top: 24px; }
.detail-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 32px; padding: clamp(32px, 5vw, 56px) 0 40px; }
.detail-title { display: flex; flex-direction: column; gap: 14px; flex: 1 1 480px; min-width: 0; }
.detail-title h1 { margin: 0; font-size: clamp(40px, 6.4vw, 72px); line-height: 1.02; letter-spacing: -.035em; overflow-wrap: anywhere; }
.detail-title .lead { margin: 6px 0 0; line-height: 1.4; max-width: 56ch; text-wrap: pretty; }
.detail-actions { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; flex: 0 1 auto; }
.detail-actions .seg { padding: 3px; border-radius: 12px; }
.detail-actions .seg button { min-height: 38px; padding: 0 22px; font-size: 15px; border-radius: 9px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions .btn { min-height: 40px; }
.specs { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.spec { background: var(--color-surface); border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.spec dt { font-size: 13px; color: var(--color-text-3); }
.spec dd { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -.025em; line-height: 1.25; overflow-wrap: anywhere; }
.spec dd .unit { font-size: 14px; }
.spec .note { font-size: 13px; color: var(--color-text-3); }
.detail-main { padding-top: clamp(48px, 7vw, 80px); padding-bottom: clamp(48px, 7vw, 80px); display: flex; flex-wrap: wrap; gap: 56px 48px; align-items: flex-start; }
.col-a { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 56px; }
.col-b { flex: 1.4 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.block { display: flex; flex-direction: column; gap: 16px; }
.block h2 { margin: 0; font-size: 24px; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.note-sm { margin: 0; font-size: 13px; color: var(--color-text-3); }
.note-md { margin: 0; font-size: 14px; color: var(--color-text-2); }
pre.code { margin: 0; background: var(--code-bg); color: var(--code-text); padding: 20px 22px; border-radius: 16px; font-size: 13px; line-height: 1.7; overflow-x: auto; white-space: pre; }
.code .p { color: var(--code-dim); }
.code .c { color: var(--syn-cmd); }
.code .f { color: var(--syn-flag); }
.code .s { color: var(--syn-str); }
.table-wrap { overflow: auto; max-height: 520px; }
.table { min-width: 540px; font-size: 14px; }
.table caption { text-align: left; font-size: 13px; color: var(--color-text-3); padding: 0 0 8px; }
.table th[scope="col"] { position: sticky; top: 0; background: var(--color-bg); z-index: 1; padding: 0; text-align: right; border-bottom: 1px solid var(--color-divider); }
.table th[scope="col"]:first-child { text-align: left; }
.table th[scope="col"] button { display: flex; width: 100%; align-items: center; gap: 4px; justify-content: flex-end; padding: 10px 8px; font: inherit; font-size: 13px; background: none; border: 0; color: var(--color-text-3); cursor: pointer; }
.table th[scope="col"]:first-child button { justify-content: flex-start; }
.table th[aria-sort="ascending"] button, .table th[aria-sort="descending"] button { color: var(--color-text); font-weight: 600; }
.table th[scope="row"] { text-align: left; padding: 13px 8px; border-bottom: 1px solid var(--color-hairline); font-weight: 500; }
.table th[scope="row"] a { color: var(--color-text); overflow-wrap: anywhere; }
.table td { text-align: right; padding: 13px 8px; white-space: nowrap; border-bottom: 1px solid var(--color-hairline); }
.table td.best { color: var(--ok); font-weight: 600; }
.table tr.selected th, .table tr.selected td { background: var(--accent-tint); }
.quant-opts { display: flex; gap: 6px; flex-wrap: wrap; }
.related { padding-bottom: clamp(64px, 9vw, 112px); display: flex; flex-wrap: wrap; gap: 56px 48px; }
.related > div { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.related .rows { margin: 0 -12px; }
.log li { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--color-hairline); font-size: 14px; }
.log time { font-size: 13px; color: var(--color-text-3); }
[data-panel][hidden] { display: none !important; }

/* Prose pages */
.prose { max-width: 68ch; padding-top: clamp(48px, 7vw, 80px); padding-bottom: clamp(64px, 9vw, 112px); }
.prose h1 { font-size: var(--fs-h1); margin: 0 0 16px; }
.prose h2 { font-size: var(--fs-h4); margin: 40px 0 8px; }
.prose p, .prose li { font-size: var(--fs-body); color: var(--color-text-2); line-height: 1.55; }
.prose code { font-size: .9em; background: var(--inline-code-bg); padding: 1px 6px; border-radius: 6px; }

/* Footer */
.site-footer { background: var(--color-surface); width: 100%; }
.footer-grid { padding-top: 56px; padding-bottom: 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 40px 24px; }
.footer-brand { display: flex; flex-direction: column; gap: 12px; grid-column: 1 / -1; min-width: 0; }
.footer-brand .brand span { font-size: 19px; }
.footer-brand p { margin: 0; color: var(--color-text-2); font-size: 14px; max-width: 46ch; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col > span { font-size: 12px; font-weight: 600; color: var(--color-text); }
.footer-col a { color: var(--color-text-2); font-size: 13px; }
.footer-col a:hover { color: var(--color-text); }
.footer-col a.ext { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); }
.footer-base { border-top: 1px solid var(--color-hairline); padding: 18px 0 28px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: 12px; color: var(--color-text-3); }

/* "Designed by bzwrd" credit, from the bzwrd brand pack (components/embed.html).
   Light variant by default; the dark variant follows the site's theme. */
.footer-credit { display: inline-flex; align-items: center; gap: 16px; }
.bzwrd-credit { display: inline-flex; align-items: center; gap: .5em; text-decoration: none;
  font: 400 13px/1 "Geist Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; color: #787F8A; }
.bzwrd-credit:hover { text-decoration: none; color: #787F8A; }
.bzwrd-credit__wm { display: inline-flex; align-items: center; gap: .32em; font-weight: 500; letter-spacing: -.03em; color: #121419; }
.bzwrd-credit__caret { display: inline-block; width: .42em; height: .95em; border-radius: 1px; background: #A3CC00; animation: bzwrd-blink 1.1s step-end infinite; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .bzwrd-credit__wm { color: #F4F5F7; }
  :root:not([data-theme="light"]) .bzwrd-credit__caret { background: #CCFF00; }
}
[data-theme="dark"] .bzwrd-credit__wm { color: #F4F5F7; }
[data-theme="dark"] .bzwrd-credit__caret { background: #CCFF00; }
@keyframes bzwrd-blink { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .bzwrd-credit__caret { animation: none; } }
