:root {
  --bg: #111214;
  --surface: #18191c;
  --surface-2: #1f2125;
  --surface-3: #272a2f;
  --line: #2a2d32;
  --line-2: #3a3d44;
  --text: #f3f4f6;
  --muted: #a6abb3;
  --faint: #757a83;
  --blue: #0394fc;
  --blue-deep: #0065b3;
  --orange: #fb5628;
  --m-chatgpt: #34d3a6;
  --m-claude: #f0915f;
  --m-qwen: #a493ff;
  --m-gptimage: #34d3a6;
  --m-krea: #e9c46a;
  --m-gemini: #7aa7ff;
  --m-minimax: #ff7aa2;
  --radius: 12px;
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1440px;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
html.has-modal { overflow: hidden; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
.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; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- benchmark nav ---------- */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(17, 18, 20, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; flex-wrap: wrap; align-items: center; column-gap: 16px; min-height: 58px; }
/* All items stay visible: the row wraps instead of hiding items off to the side. */
.chips { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; min-width: 0; padding: 9px 0; }
.chip { flex: none; text-decoration: none; font-size: 14px; font-weight: 500; color: var(--muted); padding: 7px 11px; border-radius: 8px; white-space: nowrap; transition: color .15s, background .15s; }
.chip b { font: 500 12px/1 var(--mono); color: var(--faint); margin-right: 6px; }
.chip-home { display: inline-flex; align-items: center; gap: 7px; margin-right: 6px; }
.chip-home svg { width: 15px; height: 15px; }
.chip:hover { color: var(--text); background: var(--surface-2); }
.chip[aria-current="page"] { color: var(--text); background: var(--surface-3); }
.chip[aria-current="page"] b { color: var(--blue); }
/* Phones: one button opens the whole list. app.js adds it; without JS the items just wrap. */
.nav-toggle { display: none; flex: 1; min-width: 0; align-items: center; gap: 10px; min-height: 54px; padding: 0; border: 0; background: none; color: var(--text); font: 500 15px/1.2 var(--font); text-align: left; cursor: pointer; }
.nav-toggle svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.nav-toggle b { font: 500 12.5px/1 var(--mono); color: var(--blue); margin-right: 7px; }
.nav-toggle .nav-cur { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-toggle .nav-more { margin-left: auto; font-size: 13px; color: var(--muted); }
.nav-toggle .chev { width: 16px; height: 16px; transition: transform .2s; }
.nav.open .nav-toggle .chev { transform: rotate(180deg); }

.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 3px; flex: none; }
.seg button { border: 0; background: transparent; padding: 6px 11px; border-radius: 7px; font-size: 13.5px; font-weight: 500; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg svg { width: 16px; height: 16px; flex: none; }
.seg button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); }
.seg-label { font-size: 13px; color: var(--faint); flex: none; }

/* ---------- overview ---------- */
.overview { padding-top: clamp(28px, 4vw, 48px); padding-bottom: 64px; }
.bench-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.bcard { display: flex; flex-direction: column; height: 100%; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .15s, background .15s; }
.bcard:hover { border-color: #4a4e56; background: #1b1c20; }
.bcard-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 16px; align-items: baseline; padding: 18px 20px 16px; }
.bcard-num { font: 600 30px/1 var(--mono); color: var(--blue); letter-spacing: -.03em; grid-row: span 2; align-self: start; }
.bcard-kind { font: 500 12px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.bcard h2 { grid-column: 2; margin: 0; font-size: 21px; line-height: 1.2; letter-spacing: -.015em; font-weight: 700; }
.bcard h2 span { color: var(--muted); font-weight: 500; }
.bcard-go { grid-row: 1 / span 2; grid-column: 3; align-self: center; color: var(--faint); transition: color .15s, transform .15s; }
.bcard:hover .bcard-go { color: var(--text); transform: translateX(3px); }
.bcard-go svg { width: 20px; height: 20px; display: block; }
.thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; background: var(--line); margin-top: auto; }
.thumbs figure { margin: 0; position: relative; background: #0b0c0d; aspect-ratio: 16 / 10; overflow: hidden; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.thumbs figcaption { position: absolute; left: 8px; bottom: 8px; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; background: rgba(10, 11, 12, .8); padding: 4px 8px; border-radius: 6px; }

/* ---------- benchmark page ---------- */
.page { padding-top: clamp(28px, 4vw, 48px); padding-bottom: 24px; }
.bench-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 22px; align-items: start; margin-bottom: 28px; }
.bench-num { font: 600 clamp(40px, 5vw, 60px)/.9 var(--mono); color: var(--blue); letter-spacing: -.04em; }
.bench-kind { margin: 2px 0 6px; font: 500 12.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.bench-head h1 { margin: 0; font-size: clamp(26px, 3vw, 38px); line-height: 1.1; letter-spacing: -.02em; font-weight: 700; }
.bench-head h1 span { color: var(--muted); font-weight: 500; }
.bench-desc { margin: 8px 0 0; color: var(--muted); }
.btn-prompt { align-self: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); font-size: 14.5px; font-weight: 550; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--surface-3); border-color: #4a4e56; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: #2aa5ff; border-color: #2aa5ff; }
.btn.ghost { background: transparent; }
.btn.icon { padding: 8px; width: 40px; }
.btn.small { min-height: 34px; padding: 6px 10px; font-size: 13.5px; }
.btn.small.icon { width: 34px; }
.btn.is-disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.thumbs.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* generated images and videos */
.media-set { padding-top: 8px; }
.media-set + .media-set { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--line); }
.media-set .section-head { margin-top: 0; }
.media-set .section-head p { flex: 1 1 320px; }
.media.photo { aspect-ratio: 4 / 3; }
.media.photo img { object-fit: contain; }
.card video.clip { aspect-ratio: 16 / 9; object-fit: contain; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0; padding: 14px 16px 16px; font-size: 13.5px; border-top: 1px solid var(--line); }
.facts dt { color: var(--faint); }
.facts dd { margin: 0; color: var(--text); font-variant-numeric: tabular-nums; }
.facts dd small { color: var(--muted); }
.facts a { color: var(--text); text-underline-offset: 3px; }
.section-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: 36px 0 12px; }
.section-head:first-child { margin-top: 0; }
.section-head h2 { margin: 0; font-size: 19px; font-weight: 650; letter-spacing: -.01em; }
.section-head p { margin: 0; color: var(--faint); font-size: 14px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card-top { display: flex; align-items: baseline; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.mdot { width: 8px; height: 8px; border-radius: 50%; background: var(--mc); flex: none; align-self: center; }
.card-top strong { font-weight: 650; font-size: 15.5px; }
.card-top small { font: 400 12.5px/1 var(--mono); color: var(--faint); }

.shot { display: block; width: 100%; padding: 0; border: 0; border-bottom: 1px solid var(--line); background: #0b0c0d; cursor: zoom-in; position: relative; overflow: hidden; }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.shot[data-mode="desktop"] { aspect-ratio: 16 / 10; }
.shot[data-mode="mobile"] { aspect-ratio: 4 / 5; }
.shot[data-mode="mobile"] img { width: auto; height: 100%; margin: 0 auto; object-fit: contain; padding: 14px 0; }
.card-actions { display: flex; gap: 8px; padding: 14px 16px 16px; flex-wrap: wrap; margin-top: auto; }
.card-actions .btn.primary { flex: 1 1 auto; }

.media { display: block; width: 100%; padding: 0; border: 0; background: #0b0c0d; cursor: zoom-in; aspect-ratio: 16 / 9; overflow: hidden; }
.media img { width: 100%; height: 100%; object-fit: contain; }
.card video { width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; }
.card .cap { padding: 10px 16px 14px; font-size: 13.5px; color: var(--muted); }
.card .cap a { color: var(--text); text-underline-offset: 3px; }

.mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 12px 16px 16px; }
.mini figure { margin: 0; }
.mini .media { aspect-ratio: 4 / 3; border-radius: 8px; }
.mini .media img { object-fit: cover; }
.mini figcaption { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

.dl { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 16px 16px; }
.dl .btn small { color: var(--muted); font-weight: 400; font-size: 12.5px; }

/* 3D viewer */
.v3d { position: relative; aspect-ratio: 4 / 3; background: radial-gradient(ellipse at 50% 40%, #3b3f46 0%, #24262b 55%, #18191c 100%); overflow: hidden; touch-action: none; }
.v3d-canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; cursor: grab; }
.v3d-canvas:active { cursor: grabbing; }
.v3d-status { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 14px; pointer-events: none; }
.v3d-status .bar { width: 140px; height: 3px; background: var(--line-2); border-radius: 3px; overflow: hidden; margin: 10px auto 0; }
.v3d-status .bar i { display: block; height: 100%; width: 0; background: var(--text); transition: width .2s; }
.v3d-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.v3d-bar input[type="range"] { flex: 1; min-width: 60px; accent-color: var(--text); }
.v3d-frame { font: 500 12.5px/1 var(--mono); color: var(--muted); min-width: 30px; text-align: right; white-space: nowrap; }
.stage-3d { width: 100%; height: 100%; display: flex; flex-direction: column; }
.stage-3d .v3d { flex: 1; aspect-ratio: auto; }
.stage-3d .v3d-bar { background: var(--surface); }

/* slides */
.slide-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
.slide-tab { flex: none; border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 10px; padding: 8px 12px; cursor: pointer; font-size: 13.5px; font-weight: 500; text-align: left; }
@media (min-width: 1100px) {
  .slide-tabs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); overflow: visible; }
  .slide-tab { min-width: 0; }
}
.slide-tab b { display: block; font: 600 12px/1.2 var(--mono); color: var(--faint); margin-bottom: 2px; }
.slide-tab:hover { color: var(--text); border-color: var(--line-2); }
.slide-tab[aria-selected="true"] { background: var(--surface-3); color: var(--text); border-color: var(--blue); }
.slide-tab[aria-selected="true"] b { color: var(--blue); }
.slide-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0 0; flex-wrap: wrap; }
.slide-nav .now { font-weight: 600; }
.slide-nav .now span { color: var(--muted); font-weight: 400; }
.slide-all { display: none; }
.slides-allmode .slide-all { display: block; }
.slides-allmode .slide-single { display: none; }
.slide-row-label { margin: 22px 0 10px; font-size: 16px; font-weight: 650; }
.cell-tag { display: flex; align-items: center; gap: 7px; padding: 9px 14px; font-size: 13.5px; font-weight: 600; border-bottom: 1px solid var(--line); }

/* pager */
.pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; margin-top: 56px; padding: 24px 0 56px; border-top: 1px solid var(--line); }
.pager a { text-decoration: none; display: inline-flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 10px; }
.pager a:hover { background: var(--surface-2); }
.pager small { font: 500 12px/1.2 var(--mono); color: var(--faint); letter-spacing: .06em; text-transform: uppercase; }
.pager span { font-weight: 600; }
.pager .next { justify-self: end; text-align: right; align-items: flex-end; }
.pager .home { justify-self: center; flex-direction: row; align-items: center; gap: 8px; color: var(--muted); font-weight: 500; }
.pager .home svg { width: 16px; height: 16px; }

/* ---------- dialogs ---------- */
dialog { border: 0; padding: 0; color: var(--text); background: var(--surface); }
dialog::backdrop { background: rgba(5, 6, 7, .78); backdrop-filter: blur(4px); }
.viewer { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; background: #08090a; }
.viewer[open] { display: flex; flex-direction: column; }
.v-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface); flex-wrap: wrap; }
.v-title { font-weight: 650; margin-right: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v-title span { color: var(--muted); font-weight: 400; }
.v-tabs { display: inline-flex; gap: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.v-tab { border: 0; background: transparent; color: var(--muted); padding: 7px 12px; border-radius: 9px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 550; }
.v-tab kbd { font-size: 11px; padding: 1px 5px; }
.v-tab:hover { color: var(--text); }
.v-tab[aria-selected="true"] { background: var(--surface-3); color: var(--text); }
.v-tab[disabled] { opacity: .35; cursor: not-allowed; }
.v-tools { display: inline-flex; gap: 8px; align-items: center; }
.v-stage { flex: 1; min-height: 0; position: relative; display: grid; place-items: center; overflow: auto; }
.v-stage iframe { border: 0; width: 100%; height: 100%; background: #fff; display: block; }
.v-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.v-stage video { max-width: 100%; max-height: 100%; }
.v-stage.is-frame, .v-stage.is-3d { display: block; overflow: hidden; }
.v-stage.is-mobile { display: grid; place-items: center; padding: 16px; background: radial-gradient(ellipse at center, #1a1c20, #08090a 70%); }
.device { width: 390px; height: min(844px, 100%); max-width: 100%; border-radius: 28px; overflow: hidden; border: 10px solid #222429; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); background: #fff; }
.device iframe { width: 100%; height: 100%; border: 0; display: block; }
.v-foot { padding: 8px 14px; font-size: 12.5px; color: var(--faint); border-top: 1px solid var(--line); background: var(--surface); display: flex; gap: 14px; flex-wrap: wrap; }
kbd { font: 500 12px/1 var(--mono); background: var(--surface-3); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 2px 6px; color: var(--text); }

.sheet { width: min(980px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); border-radius: 16px; border: 1px solid var(--line-2); box-shadow: 0 30px 90px rgba(0, 0, 0, .55); }
.sheet[open] { display: flex; flex-direction: column; }
.sheet-head { display: flex; align-items: flex-start; gap: 14px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 0; font-size: 20px; line-height: 1.25; }
.sheet-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.sheet-head .close { margin-left: auto; }
.sheet-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 12px 20px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.sheet-meta code { font-family: var(--mono); font-size: 12px; color: var(--text); word-break: break-all; }
.sheet-body { overflow: auto; padding: 18px 20px 22px; overscroll-behavior: contain; }
.sheet-foot { display: flex; gap: 10px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.sheet-foot .hint { color: var(--faint); font-size: 13px; margin-right: auto; }
.prompt-text { margin: 0; font: 400 13.5px/1.65 var(--mono); white-space: pre-wrap; word-wrap: break-word; color: #dfe2e7; }


.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--surface-3); border: 1px solid var(--line-2); padding: 10px 16px; border-radius: 10px; font-size: 14px; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; z-index: 100; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .bench-list { grid-template-columns: minmax(0, 1fr); }
}
.swipe-hint { display: none; font-size: 13px; color: var(--faint); margin: 0 0 10px; }
@media (max-width: 760px) {
  .bench-head { grid-template-columns: minmax(0, 1fr); }
  .bench-num { font-size: 34px; }
  .btn-prompt { justify-self: start; }
  .bcard-head { padding: 16px; }
  .bcard h2 { font-size: 18px; }
  .thumbs figcaption { font-size: 11px; padding: 3px 6px; left: 5px; bottom: 5px; gap: 5px; }
  .thumbs figcaption .mdot { width: 6px; height: 6px; }
  .grid3 {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 86%;
    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 10px; scroll-padding: 0 var(--gutter);
    scrollbar-width: none;
  }
  .grid3::-webkit-scrollbar { display: none; }
  .grid3 > * { scroll-snap-align: start; }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .swipe-hint { display: block; }
  .nav.has-toggle .nav-toggle { display: flex; }
  .nav.has-toggle .chips { display: none; }
  .nav.has-toggle.open .chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); flex-basis: 100%; padding: 0 0 12px; }
  .nav.has-toggle .chip { overflow: hidden; text-overflow: ellipsis; padding: 9px 11px; }
  .nav.has-toggle .chip-home { margin-right: 0; }
  .seg button { padding: 6px 9px; }
  .seg .seg-txt { display: none; }
  .v-bar { gap: 8px; }
  .v-title { flex-basis: 100%; order: -1; }
  .v-tab { padding: 6px 9px; font-size: 13px; }
  .v-tab kbd, .v-foot .keys { display: none; }
  .v-tools .btn-txt { display: none; }
  .pager { grid-template-columns: 1fr 1fr; }
  .v3d-frame .lbl { display: none; }
  .pager .home { grid-column: 1 / -1; grid-row: 2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
