/* Public model pages (main/model_page.html, main/models_index.html). */
.mdl-page { max-width: 58rem; margin: 0 auto; display: grid; gap: 2rem; color: var(--color-text-main); }
.mdl-crumbs { display: flex; flex-wrap: wrap; gap: 0.4rem; font-size: 0.75rem; color: var(--color-text-muted); }
.mdl-crumbs a:hover { color: var(--color-text-main); }
.mdl-hero { display: grid; gap: 0.8rem; }
.mdl-kicker { font-size: 0.78rem; font-weight: 700; color: rgb(var(--primary-rgb)); }
.mdl-hero h1 { font-size: clamp(1.5rem, 4vw, 2.3rem); font-weight: 800; line-height: 1.5; }
.mdl-lede { font-size: 0.95rem; line-height: 2; color: var(--color-text-muted); max-width: 46rem; }
.mdl-facts { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.mdl-fact {
    display: inline-flex; gap: 0.4rem; align-items: center;
    font-size: 0.75rem; padding: 0.35rem 0.7rem; border-radius: 999px;
    border: 1px solid var(--border-subtle); background: var(--color-surface);
}
.mdl-fact b { font-weight: 700; color: var(--color-text-muted); }
.mdl-fact--ok { color: rgb(52 211 153); border-color: rgb(52 211 153 / 0.35); }
.mdl-cta { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.4rem; }
.mdl-lock {
    font-size: 0.85rem; line-height: 1.95; padding: 0.7rem 0.95rem; border-radius: 12px; max-width: 46rem;
    border: 1px solid rgb(var(--primary-rgb) / 0.3); background: rgb(var(--primary-rgb) / 0.07);
}
.mdl-lock a { color: rgb(var(--primary-rgb)); font-weight: 700; }
.mdl-section { display: grid; gap: 0.75rem; }
.mdl-section h2 { font-size: 1.2rem; font-weight: 800; }
.mdl-section p { font-size: 0.92rem; line-height: 2.05; color: var(--color-text-muted); }
.mdl-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
.mdl-list { display: grid; gap: 0.5rem; font-size: 0.9rem; line-height: 1.9; color: var(--color-text-muted); }
.mdl-list li { position: relative; padding-inline-start: 1.1rem; }
.mdl-list li::before {
    content: ''; position: absolute; inset-inline-start: 0; top: 0.75em;
    width: 0.4rem; height: 0.4rem; border-radius: 50%; background: rgb(var(--primary-rgb));
}
.mdl-steps { display: grid; gap: 0.5rem; padding-inline-start: 1.2rem; list-style: decimal; font-size: 0.9rem; line-height: 1.9; color: var(--color-text-muted); }
.mdl-samples { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem; }
.mdl-sample { display: grid; gap: 0.35rem; font-size: 0.72rem; color: var(--color-text-muted); }
.mdl-sample img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: var(--color-surface); }
.mdl-more a { font-size: 0.8rem; color: rgb(var(--primary-rgb)); }
.mdl-faq { display: grid; gap: 0.5rem; }
.mdl-faq details {
    border: 1px solid var(--border-subtle); border-radius: 12px; background: var(--color-surface);
    padding: 0.8rem 1rem;
}
.mdl-faq summary { cursor: pointer; font-weight: 700; font-size: 0.9rem; }
.mdl-faq details p { margin-top: 0.5rem; }
.mdl-related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
.mdl-related a {
    display: grid; gap: 0.2rem; padding: 0.85rem 1rem; border-radius: 12px;
    border: 1px solid var(--border-subtle); background: var(--color-surface);
    transition: border-color .2s;
}
.mdl-related a:hover { border-color: rgb(var(--primary-rgb) / 0.5); }
.mdl-related b { font-size: 0.9rem; }
.mdl-related span { font-size: 0.72rem; color: var(--color-text-muted); }
.mdl-related small { font-size: 0.72rem; line-height: 1.8; color: var(--color-text-muted); }
.mdl-final {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1.2rem 1.4rem; border-radius: 16px;
    background: rgb(var(--primary-rgb) / 0.08); border: 1px solid rgb(var(--primary-rgb) / 0.25);
    font-size: 0.9rem;
}
@media (max-width: 720px) {
    .mdl-two, .mdl-related { grid-template-columns: 1fr; }
    .mdl-samples { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Free-trial page (main/free_trial.html) on the same page shell. */
.ft-note { font-size: 0.82rem; line-height: 1.9; color: var(--color-text-muted); }
.mdl-section p a, .mdl-steps a, .mdl-lede a { color: rgb(var(--primary-rgb)); }
.ft-gifts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.ft-gift {
    display: grid; gap: 0.45rem; align-content: start; padding: 1.1rem 1.2rem; border-radius: 16px;
    border: 1px solid var(--border-subtle); background: var(--color-surface); transition: border-color .2s;
}
.ft-gift:hover { border-color: rgb(var(--primary-rgb) / 0.5); }
.ft-num { display: flex; align-items: baseline; gap: 0.35rem; font-size: 1.6rem; font-weight: 800; color: rgb(var(--primary-rgb)); }
.ft-num small { font-size: 0.75rem; font-weight: 700; color: var(--color-text-muted); }
.ft-gift h3 { font-size: 1rem; font-weight: 800; }
.ft-gift p { font-size: 0.85rem; line-height: 1.95; }
.ft-amounts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.ft-amounts div {
    display: grid; gap: 0.15rem; min-width: 9rem; padding: 0.9rem 1.1rem; border-radius: 14px;
    border: 1px solid var(--border-subtle); background: var(--color-surface);
}
.ft-amounts b { font-size: 1.4rem; font-weight: 800; }
.ft-amounts span { font-size: 0.78rem; color: var(--color-text-muted); }
.ft-amounts i { font-style: normal; font-size: 0.8rem; color: var(--color-text-muted); }
@media (max-width: 720px) {
    .ft-gifts { grid-template-columns: 1fr; }
}

/* ---- Model index (main/models_index.html): search, tabs, live cards ---- */
.mdx { gap: 1.6rem; }
.mdx-hero { display: grid; gap: 0.8rem; }
.mdx-search {
    position: relative; display: flex; align-items: center; gap: 0.6rem;
    max-width: 34rem; margin-top: 0.4rem; padding: 0 0.95rem; height: 3rem;
    border: 1px solid var(--border-subtle); border-radius: 14px; background: var(--color-surface);
    transition: border-color .2s, box-shadow .2s;
}
.mdx-search:focus-within { border-color: rgb(var(--primary-rgb) / 0.6); box-shadow: 0 0 0 4px rgb(var(--primary-rgb) / 0.12); }
.mdx-search svg { width: 1.1rem; height: 1.1rem; flex: none; color: var(--color-text-muted); }
.mdx-search input {
    flex: 1; min-width: 0; height: 100%; background: transparent; border: 0; outline: 0;
    font: inherit; font-size: 0.9rem; color: var(--color-text-main);
}
.mdx-search input::placeholder { color: var(--color-text-muted); opacity: .8; }
.mdx-search input::-webkit-search-cancel-button { cursor: pointer; }
.mdx-search kbd {
    flex: none; font: inherit; font-size: 0.7rem; line-height: 1; padding: 0.3rem 0.45rem;
    border-radius: 6px; border: 1px solid var(--border-subtle); color: var(--color-text-muted);
}
@media (hover: none) { .mdx-search kbd { display: none; } }

.mdx-tabs {
    position: sticky; top: var(--nav-bar, 68px); z-index: 5;
    transition: top .35s var(--ease, ease);
    display: flex; gap: 0.4rem; overflow-x: auto; scrollbar-width: none;
    margin: 0 -1.25rem; padding: 0.6rem 1.25rem;
    background: rgb(var(--color-bg-rgb) / 0.92); backdrop-filter: blur(10px); scroll-padding-inline: 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
}
.mdx-tabs::-webkit-scrollbar { display: none; }
/* The site header slides away on scroll-down; the tab bar takes its place. */
body:has(.shell-header.hide) .mdx-tabs { top: 0; }
.mdx-tab {
    flex: none; display: inline-flex; align-items: center; gap: 0.4rem;
    height: 2.3rem; padding: 0 0.85rem; border-radius: 999px;
    border: 1px solid var(--border-subtle); background: var(--color-surface);
    font-size: 0.8rem; font-weight: 700; color: var(--color-text-muted); cursor: pointer;
    transition: color .15s, border-color .15s, background .15s;
}
.mdx-tab:hover { color: var(--color-text-main); }
.mdx-tab:focus-visible { outline: 2px solid rgb(var(--primary-rgb) / .7); outline-offset: 2px; }
.mdx-tab span {
    font-size: 0.68rem; font-weight: 700; min-width: 1.3rem; padding: 0.1rem 0.35rem; border-radius: 999px;
    text-align: center; background: var(--sunken, rgb(127 127 127 / .12));
}
.mdx-tab.is-on { color: rgb(var(--primary-ink-rgb)); border-color: rgb(var(--primary-rgb) / 0.5); background: rgb(var(--primary-rgb) / 0.1); }
.mdx-tab.is-empty:not(.is-on) { opacity: .45; }
.mdx-tab.is-on span { background: rgb(var(--primary-rgb) / 0.18); }
.mdx-ico { width: 1rem; height: 1rem; flex: none; }

.mdx-group { display: grid; gap: 0.9rem; scroll-margin-top: calc(var(--nav-bar, 68px) + 3.5rem); }
.mdx-group[hidden], .mdx-card[hidden], .mdx-empty[hidden] { display: none; }
.mdx-group-head { display: flex; align-items: center; gap: 0.8rem; }
.mdx-group-head > div { flex: 1; min-width: 0; }
.mdx-group-icon {
    display: grid; place-items: center; width: 2.5rem; height: 2.5rem; flex: none; border-radius: 12px;
    color: rgb(var(--primary-ink-rgb)); background: rgb(var(--primary-rgb) / 0.1);
}
.mdx-group-icon .mdx-ico { width: 1.25rem; height: 1.25rem; }
.mdx-group-head h2 { display: flex; align-items: center; gap: 0.5rem; font-size: 1.15rem; font-weight: 800; }
.mdx-group-head p { font-size: 0.8rem; line-height: 1.8; color: var(--color-text-muted); }
.mdx-count {
    font-size: 0.7rem; font-weight: 700; padding: 0.1rem 0.45rem; border-radius: 999px;
    color: var(--color-text-muted); border: 1px solid var(--border-subtle);
}
.mdx-try { flex: none; font-size: 0.8rem; font-weight: 700; color: rgb(var(--primary-ink-rgb)); white-space: nowrap; }
.mdx-try:hover { text-decoration: underline; text-underline-offset: 4px; }

.mdx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: 0.7rem; }
.mdx-card {
    display: flex; flex-direction: column; gap: 0.6rem; padding: 1rem; border-radius: 16px;
    border: 1px solid var(--border-subtle); background: var(--color-surface);
    transition: border-color .2s, transform .2s, box-shadow .2s;
}
.mdx-card:hover { border-color: rgb(var(--primary-rgb) / 0.5); transform: translateY(-2px); box-shadow: 0 10px 24px -14px rgb(0 0 0 / .45); }
.mdx-card:focus-visible { outline: 2px solid rgb(var(--primary-rgb) / .7); outline-offset: 2px; }
.mdx-card-top { display: flex; align-items: center; gap: 0.65rem; }
.mdx-logo {
    width: 2.25rem; height: 2.25rem; flex: none; border-radius: 10px; object-fit: cover;
    background: #fff; border: 1px solid var(--border-subtle);
}
.mdx-logo--letter {
    display: grid; place-items: center; font-weight: 800; font-size: 0.95rem;
    color: rgb(var(--primary-ink-rgb)); background: rgb(var(--primary-rgb) / 0.12); border-color: transparent;
}
.mdx-name { display: grid; flex: 1; min-width: 0; line-height: 1.45; }
.mdx-name b { font-size: 0.95rem; font-weight: 800; text-align: start; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mdx-name span { font-size: 0.72rem; color: var(--color-text-muted); }
.mdx-badge {
    flex: none; align-self: flex-start; font-size: 0.66rem; font-weight: 800;
    padding: 0.2rem 0.5rem; border-radius: 999px;
}
.mdx-badge--free { color: rgb(16 185 129); background: rgb(16 185 129 / 0.12); }
.mdx-summary {
    font-size: 0.78rem; line-height: 1.85; color: var(--color-text-muted);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mdx-card-foot {
    display: flex; align-items: center; gap: 0.5rem; margin-top: auto;
    padding-top: 0.6rem; border-top: 1px dashed var(--border-subtle);
    font-size: 0.72rem; color: var(--color-text-muted);
}
.mdx-price { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--color-text-main); font-weight: 700; }
.mdx-usage { flex: none; padding: 0.12rem 0.45rem; border-radius: 999px; border: 1px solid var(--border-subtle); }
.mdx-usage--low { color: rgb(16 185 129); border-color: rgb(16 185 129 / 0.35); }
.mdx-usage--high { color: rgb(245 158 11); border-color: rgb(245 158 11 / 0.35); }
.mdx-go { flex: none; color: rgb(var(--primary-ink-rgb)); transition: transform .2s; }
.mdx-card:hover .mdx-go { transform: translateX(-3px); }

.mdx-empty {
    display: grid; justify-items: center; gap: 0.8rem; padding: 2.5rem 1rem; text-align: center;
    border: 1px dashed var(--border-subtle); border-radius: 16px; color: var(--color-text-muted); font-size: 0.9rem;
}
.mdx-empty b { color: var(--color-text-main); }
.mdx .mdl-final b { font-size: 0.95rem; }
.mdx .mdl-final .ft-note { margin-top: 0.25rem; }

@media (max-width: 720px) {
    .mdx-grid { grid-template-columns: 1fr; }
    .mdx-group-head p { display: none; }
    .mdx-search { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
    .mdx-card, .mdx-go { transition: none; }
    .mdx-card:hover { transform: none; }
}

/* Guides and comparisons (main/guide_page.html). */
.gd-score { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; font-size: 0.85rem; font-weight: 700; }
.gd-score span { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.4rem 0.85rem; border-radius: 999px; border: 1px solid var(--border-subtle); background: var(--color-surface); }
.gd-score b { font-size: 1.15rem; color: rgb(var(--primary-rgb)); }
.gd-score i { font-style: normal; color: var(--color-text-muted); }
.gd-rounds { display: grid; gap: 0.6rem; }
.gd-rounds li {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.3rem 0.8rem;
    padding: 0.85rem 1rem; border-radius: 14px; border: 1px solid var(--border-subtle); background: var(--color-surface);
}
.gd-rounds b { font-size: 0.92rem; }
.gd-rounds p { grid-column: 1 / -1; font-size: 0.85rem; line-height: 1.9; }
.gd-round-n { font-size: 0.72rem; font-weight: 700; color: var(--color-text-muted); }
.gd-win { font-size: 0.75rem; font-weight: 700; color: rgb(52 211 153); white-space: nowrap; }
.mdl-section .gd-note { font-size: 0.78rem; line-height: 1.9; }
.gd-table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--border-subtle); }
.gd-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; background: var(--color-surface); }
.gd-table th, .gd-table td { padding: 0.7rem 0.9rem; text-align: start; border-bottom: 1px solid var(--border-subtle); line-height: 1.8; vertical-align: top; }
.gd-table tbody tr:last-child th, .gd-table tbody tr:last-child td { border-bottom: 0; }
.gd-table thead th { font-weight: 800; white-space: nowrap; }
.gd-table thead a { color: rgb(var(--primary-rgb)); }
.gd-table tbody th { font-weight: 700; color: var(--color-text-muted); white-space: nowrap; }
.gd-models { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.gd-model { display: grid; gap: 0.55rem; align-content: start; padding: 1rem 1.1rem; border-radius: 16px; border: 1px solid var(--border-subtle); background: var(--color-surface); }
.gd-model-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.gd-model-head b { font-size: 0.95rem; }
.gd-model-head a:hover { color: rgb(var(--primary-rgb)); }
.gd-model-head span { font-size: 0.72rem; color: var(--color-text-muted); }
.mdl-section .gd-model p { font-size: 0.85rem; line-height: 1.9; }
.gd-model-try { font-size: 0.8rem; font-weight: 700; color: rgb(var(--primary-rgb)); }
.gd-verdict { padding: 1.1rem 1.3rem; border-radius: 16px; border: 1px solid rgb(var(--primary-rgb) / 0.25); background: rgb(var(--primary-rgb) / 0.06); }
@media (max-width: 720px) {
    .gd-models { grid-template-columns: 1fr; }
    .gd-rounds li { grid-template-columns: 1fr; }
}
