/* Models hub + detail — extends home.css palette */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.m-hero {
  padding-bottom: 28px;
}
.m-hero .lead {
  max-width: 640px;
}
.m-hero-detail {
  padding-top: 40px;
  text-align: start;
}
.m-hero-detail .hero-actions { justify-content: flex-start; }

/* Light GapGPT-style models banner */
.m-banner-wrap {
  padding: 28px 0 8px;
}
.m-banner {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 28px 36px;
  align-items: center;
  padding: 36px 36px 28px;
  border: 1px solid var(--stroke);
  border-radius: 28px;
  background:
    radial-gradient(ellipse 55% 70% at 12% 20%, rgba(2, 133, 255, .10), transparent 55%),
    radial-gradient(ellipse 45% 55% at 92% 80%, rgba(13, 13, 13, .04), transparent 50%),
    linear-gradient(180deg, #ffffff 0%, #f7f8fa 100%);
  overflow: hidden;
}
.m-banner-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}
.m-banner-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid #d7e8ff;
  background: #eef6ff;
  color: #0264c2;
  font-size: 12px;
  font-weight: 700;
}
.m-banner-badge svg { flex-shrink: 0; }
.m-banner h1 {
  margin: 0 0 14px;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.3;
  letter-spacing: -.03em;
  color: var(--ink);
}
.m-banner-lead {
  margin: 0 0 22px;
  max-width: 520px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--muted);
}
.m-banner-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
}
.m-banner-stat {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.m-banner-cta {
  background: var(--ink);
  color: #fafafa;
  border-radius: 999px;
  gap: 8px;
}
.m-banner-cta:hover { background: #222; color: #fafafa; }
.m-banner-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}
.m-banner-note {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(13, 13, 13, .06);
  font-size: 11px;
  line-height: 1.7;
  color: #9a9a9a;
}

.m-orbit {
  --orbit-size: min(300px, 72vw);
  position: relative;
  width: var(--orbit-size);
  height: var(--orbit-size);
}
.m-orbit-ring {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 1.5px dashed rgba(13, 13, 13, .14);
  animation: m-orbit-spin 48s linear infinite;
}
.m-orbit-core {
  position: absolute;
  inset: 50%;
  width: 72px;
  height: 72px;
  margin: -36px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--stroke);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .08);
  z-index: 2;
}
.m-orbit-core img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 10px;
}
.m-orbit-core svg { width: 36px; height: 36px; color: var(--ink); }
.m-orbit-node {
  --n: 6;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  margin: -26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--stroke);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
  transform:
    rotate(calc(var(--i) * 360deg / var(--n)))
    translateY(calc(var(--orbit-size) * -0.38))
    rotate(calc(var(--i) * -360deg / var(--n)));
  z-index: 1;
}
.m-orbit-node img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  border-radius: 8px;
}
.m-orbit-node span {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}
@keyframes m-orbit-spin {
  to { transform: rotate(360deg); }
}

.m-card-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.m-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: contain;
  background: #f3f4f6;
  border: 1px solid var(--stroke);
  flex-shrink: 0;
}
.m-card-icon-fallback {
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}
.m-detail-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--stroke);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .06);
}

@media (max-width: 900px) {
  .m-banner {
    grid-template-columns: 1fr;
    padding: 28px 22px 22px;
  }
  .m-banner-visual { order: -1; min-height: 240px; }
  .m-orbit { --orbit-size: min(260px, 78vw); }
}
@media (max-width: 560px) {
  .m-banner { border-radius: 22px; padding: 22px 16px 18px; }
  .m-banner-actions { flex-direction: column; align-items: stretch; }
  .m-banner-cta { width: 100%; }
}

.m-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--muted);
}
.m-crumb a:hover { color: var(--ink); }

.m-toolbar {
  display: grid;
  gap: 14px;
  margin-bottom: 8px;
  padding-bottom: 8px;
}
.m-search-wrap { display: block; }
.m-search {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: #fff;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.m-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(2, 133, 255, .15);
}
.m-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.m-chip {
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.m-chip:hover { color: var(--ink); background: var(--hover); }
.m-chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fafafa;
}

.m-grid-section { padding: 12px 0 40px; }
.m-count {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.m-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.m-grid-related { margin-top: 8px; }
.m-empty {
  margin: 24px 0;
  text-align: center;
  color: var(--muted);
}

.m-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  background: #fff;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
  min-height: 168px;
}
.m-card:hover {
  border-color: #c9c9c9;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .06);
}
.m-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.m-provider {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .02em;
}
.m-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.m-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f3f4f6;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.m-badge-new {
  background: #e8f3ff;
  color: #0264c2;
}
.m-badge-plan {
  background: #0d0d0d;
  color: #fafafa;
}
.m-card-title {
  margin: 4px 0 0;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -.02em;
}
.m-card-desc {
  margin: 0;
  flex: 1;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
.m-card-cta {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.m-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.m-detail-body {
  display: grid;
  grid-template-columns: 1.4fr .6fr;
  gap: 28px;
  align-items: start;
  padding: 8px 0 36px;
}
.m-prose h2 {
  margin: 0 0 12px;
  font-size: 22px;
  letter-spacing: -.02em;
}
.m-prose h2 + p,
.m-prose p {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--muted);
}
.m-prose h2:not(:first-child) { margin-top: 28px; }
.m-uses {
  margin: 0;
  padding: 0 18px 0 0;
  color: var(--muted);
  line-height: 1.9;
}
.m-aside-box {
  position: sticky;
  top: 80px;
  padding: 18px;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  background: #fff;
}
.m-aside-box h3 {
  margin: 0 0 14px;
  font-size: 15px;
}
.m-specs {
  margin: 0 0 16px;
  display: grid;
  gap: 12px;
}
.m-specs > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--stroke);
}
.m-specs > div:last-child { border-bottom: 0; padding-bottom: 0; }
.m-specs dt { color: var(--muted); font-weight: 500; }
.m-specs dd { margin: 0; font-weight: 700; text-align: left; }
.m-specs code {
  font-size: 11px;
  font-weight: 600;
  direction: ltr;
  unicode-bidi: embed;
}
.m-aside-cta { width: 100%; }
.m-more {
  margin: 18px 0 0;
  font-size: 14px;
  font-weight: 700;
}
.m-more a:hover { color: var(--accent); }

@media (max-width: 900px) {
  .m-grid { grid-template-columns: repeat(2, 1fr); }
  .m-detail-body { grid-template-columns: 1fr; }
  .m-aside-box { position: static; }
}
@media (max-width: 560px) {
  .m-grid { grid-template-columns: 1fr; }
  .m-card { min-height: 0; }
}

/* Theme toggle */
.m-theme-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  flex-shrink: 0;
  font-size: 16px;
  line-height: 1;
  transition: background .15s ease, border-color .15s ease;
}
.m-theme-btn:hover { background: var(--hover); }
.m-theme-icon-sun { display: none; }
html[data-theme="dark"] .m-theme-icon-moon { display: none; }
html[data-theme="dark"] .m-theme-icon-sun { display: inline; }

/* Dark theme (matches chat/pricing GiminoTheme) */
html[data-theme="dark"] {
  --bg: #0d0d0d;
  --ink: #f5f5f5;
  --muted: #9ca3af;
  --stroke: #2d2d2d;
  --card: #161616;
  --hover: rgba(250, 250, 250, 0.06);
  color-scheme: dark;
}
html[data-theme="dark"] body.models-page {
  background: var(--bg);
  color: var(--ink);
}
html[data-theme="dark"] .nav {
  background: rgba(13, 13, 13, .92);
  border-bottom-color: var(--stroke);
}
html[data-theme="dark"] .btn-primary {
  background: #fafafa;
  color: #0d0d0d;
}
html[data-theme="dark"] .btn-primary:hover { background: #e8e8e8; }
html[data-theme="dark"] .btn-ghost {
  background: #161616;
  border-color: var(--stroke);
  color: var(--ink);
}
html[data-theme="dark"] .btn-accent { background: var(--accent); color: #fff; }
html[data-theme="dark"] .m-theme-btn {
  background: #161616;
  border-color: var(--stroke);
  color: var(--ink);
}
html[data-theme="dark"] .m-search {
  background: #161616;
  border-color: var(--stroke);
  color: var(--ink);
}
html[data-theme="dark"] .m-chip {
  background: #161616;
  border-color: var(--stroke);
  color: var(--muted);
}
html[data-theme="dark"] .m-chip.is-active {
  background: #fafafa;
  border-color: #fafafa;
  color: #0d0d0d;
}
html[data-theme="dark"] .m-card {
  background: #161616;
  border-color: var(--stroke);
}
html[data-theme="dark"] .m-card:hover {
  border-color: #3a3a3a;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35);
}
html[data-theme="dark"] .m-card-icon,
html[data-theme="dark"] .m-detail-icon {
  background: #1c1c1c;
  border-color: var(--stroke);
}
html[data-theme="dark"] .m-badge { background: #222; color: var(--muted); }
html[data-theme="dark"] .m-badge-new { background: #0b2a4a; color: #7db7ff; }
html[data-theme="dark"] .m-badge-plan { background: #fafafa; color: #0d0d0d; }
html[data-theme="dark"] .m-aside-box {
  background: #161616;
  border-color: var(--stroke);
}
html[data-theme="dark"] .faq details {
  background: #161616;
  border-color: var(--stroke);
}
html[data-theme="dark"] .cta-band {
  background: linear-gradient(135deg, #1a1a1a 0%, #222 100%);
  border: 1px solid var(--stroke);
}
html[data-theme="dark"] .cta-band .btn-primary {
  background: #fafafa;
  color: #0d0d0d;
}
html[data-theme="dark"] .foot {
  background: #0d0d0d;
  border-top-color: var(--stroke);
}

/* Dark banner — GapGPT-style charcoal panel */
html[data-theme="dark"] .m-banner {
  border-color: #2a2a2a;
  background:
    radial-gradient(ellipse 50% 60% at 85% 20%, rgba(2, 133, 255, .12), transparent 55%),
    radial-gradient(ellipse 40% 50% at 10% 80%, rgba(255, 255, 255, .03), transparent 50%),
    linear-gradient(180deg, #1a1a1a 0%, #141414 100%);
}
html[data-theme="dark"] .m-banner h1 { color: #f5f5f5; }
html[data-theme="dark"] .m-banner-lead { color: #a3a3a3; }
html[data-theme="dark"] .m-banner-badge {
  background: #222;
  border-color: #333;
  color: #d4d4d4;
}
html[data-theme="dark"] .m-banner-stat { color: #8a8a8a; }
html[data-theme="dark"] .m-banner-cta {
  background: #fafafa;
  color: #0d0d0d;
}
html[data-theme="dark"] .m-banner-cta:hover {
  background: #e8e8e8;
  color: #0d0d0d;
}
html[data-theme="dark"] .m-banner-note {
  border-top-color: rgba(255, 255, 255, .08);
  color: #6b6b6b;
}
html[data-theme="dark"] .m-orbit-ring {
  border-color: rgba(255, 255, 255, .16);
}
html[data-theme="dark"] .m-orbit-core {
  background: #1c1c1c;
  border-color: #333;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .45);
  color: #f5f5f5;
}
html[data-theme="dark"] .m-orbit-node {
  background: #1c1c1c;
  border-color: #333;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .4);
}
html[data-theme="dark"] .m-orbit-node span { color: #f5f5f5; }
html[data-theme="dark"] .kicker {
  background: #0b2a4a;
  color: #7db7ff;
}
