/* AI Models — A-Z directory / table-of-contents
   Prefix: am-
   Typeface-heavy, like an encyclopedia or catalogue. Minimal imagery.
*/
:root {
    --am-bg: #f8f5f0;
    --am-bg-soft: #ffffff;
    --am-rose: #c026d3;
    --am-rose-soft: #f3e8ff;
    --am-rose-deep: #7e22ce;
    --am-text: #18181b;
    --am-text-dim: #52525b;
    --am-border: #e4e4e7;
    --am-accent: #18181b;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--am-bg);
    color: var(--am-text);
    font-family: "Iowan Old Style", "Palatino", "Source Serif Pro", Georgia, serif;
    line-height: 1.55;
    min-height: 100vh;
}
.am-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    background: rgba(248,245,240,0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--am-border);
}
.am-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--am-text);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.am-logo img { width: 28px; height: 28px; }
.am-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.am-nav a {
    color: var(--am-text-dim);
    text-decoration: none;
    font-size: 0.88rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    transition: color 0.2s;
}
.am-nav a:hover { color: var(--am-rose-deep); }
.am-nav a.am-active { color: var(--am-rose-deep); font-weight: 600; }

.am-hero {
    text-align: center;
    padding: 56px 24px 28px;
    max-width: 820px;
    margin: 0 auto;
}
.am-hero h1 {
    font-size: clamp(2.6rem, 6vw, 3.8rem);
    margin: 0 0 14px;
    color: var(--am-text);
    font-weight: 800;
    letter-spacing: -0.03em;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1;
}
.am-hero h1 .am-accent {
    color: var(--am-rose-deep);
}
.am-hero p {
    color: var(--am-text-dim);
    font-size: 1.1rem;
    margin: 0 auto;
    max-width: 620px;
}

.am-alpha-strip {
    position: sticky;
    top: 64px;
    z-index: 90;
    background: rgba(248,245,240,0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--am-border);
    padding: 14px 24px;
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.am-alpha-strip a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    color: var(--am-text-dim);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.15s;
}
.am-alpha-strip a:hover {
    background: var(--am-rose-soft);
    color: var(--am-rose-deep);
}
.am-alpha-strip a.am-alpha-disabled {
    color: var(--am-border);
    pointer-events: none;
}

.am-directory {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 24px 60px;
}
.am-letter-block {
    margin-bottom: 36px;
}
.am-letter-heading {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--am-rose-deep);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    border-bottom: 2px solid var(--am-rose-deep);
    padding-bottom: 6px;
    margin: 0 0 18px;
    line-height: 1;
}
.am-row {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 18px;
    padding: 16px 0;
    border-bottom: 1px solid var(--am-border);
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}
.am-row:hover {
    background: rgba(192,38,211,0.04);
}
.am-row-thumb {
    width: 90px;
    height: 90px;
    border-radius: 10px;
    object-fit: cover;
    aspect-ratio: 1 / 1;
}
.am-row-meta { min-width: 0; }
.am-row-name {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 700;
    margin: 0 0 4px;
    font-size: 1.1rem;
    color: var(--am-text);
}
.am-row-arch {
    display: inline-block;
    padding: 2px 10px;
    background: var(--am-rose-soft);
    color: var(--am-rose-deep);
    border-radius: 999px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.74rem;
    font-weight: 600;
    margin-right: 8px;
    vertical-align: middle;
}
.am-row-topics {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.84rem;
    color: var(--am-text-dim);
    margin: 4px 0 0;
}

.am-cta-band {
    background: var(--am-text);
    color: white;
    text-align: center;
    padding: 40px 24px;
    margin-top: 40px;
}
.am-cta-band h2 {
    margin: 0 0 14px;
    font-size: 1.6rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.am-cta-band p {
    margin: 0 0 20px;
    color: #d4d4d8;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.am-cta-band a {
    display: inline-block;
    padding: 14px 32px;
    background: var(--am-rose-deep);
    color: white;
    border-radius: 999px;
    text-decoration: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 700;
    font-size: 1rem;
}

.am-footer {
    text-align: center;
    padding: 40px 22px;
    color: var(--am-text-dim);
    font-size: 0.85rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.am-footer a { color: var(--am-text-dim); text-decoration: none; margin: 0 8px; }
.am-footer a:hover { color: var(--am-rose-deep); }

@media (max-width: 600px) {
    .am-row { grid-template-columns: 60px 1fr; gap: 12px; }
    .am-row-thumb { width: 60px; height: 60px; }
}

/* === How-to-choose section === */
.am-choose {
    max-width: 1100px;
    margin: 40px auto 24px;
    padding: 0 24px;
}
.am-choose-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--am-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 0 0 14px;
    letter-spacing: -0.02em;
}
.am-choose-intro {
    color: var(--am-text-dim);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 28px;
    max-width: 760px;
}
.am-buckets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}
.am-bucket {
    background: var(--am-bg-soft);
    border: 1px solid var(--am-border);
    border-left: 4px solid var(--am-rose-deep);
    border-radius: 10px;
    padding: 20px 22px;
}
.am-bucket-label {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--am-rose-deep);
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.am-bucket-blurb {
    color: var(--am-text-dim);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.92rem;
    line-height: 1.5;
    margin: 0 0 14px;
}
.am-bucket-picks {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.am-pick {
    display: inline-block;
    padding: 5px 12px;
    background: var(--am-rose-soft);
    color: var(--am-rose-deep);
    border-radius: 999px;
    text-decoration: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.15s;
}
.am-pick:hover {
    background: var(--am-rose-deep);
    color: white;
}

/* === Browse-by-topic filter === */
.am-topic-filter {
    max-width: 1100px;
    margin: 28px auto 18px;
    padding: 0 24px;
}
.am-topic-label {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--am-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 12px;
}
.am-topic-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.am-topic-btn {
    padding: 7px 14px;
    background: var(--am-bg-soft);
    border: 1px solid var(--am-border);
    border-radius: 999px;
    color: var(--am-text-dim);
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.15s;
    user-select: none;
}
.am-topic-btn:hover {
    border-color: var(--am-rose-deep);
    color: var(--am-rose-deep);
}
.am-topic-btn.am-topic-active {
    background: var(--am-rose-deep);
    color: white;
    border-color: transparent;
}


.am-topbar .am-brand {
    color: var(--am-text);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    font-family: Arial, Helvetica, "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Liberation Sans", system-ui, sans-serif !important;
    letter-spacing: -0.01em;
}


/* === Universal responsive nav (single-row desktop, hamburger drawer <=1024px) === */

/* Hamburger button - hidden on desktop */
.am-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 8px;
    color: inherit;
    cursor: pointer;
    flex-shrink: 0;
    margin-left: auto;
    position: relative;
    transition: background 0.15s;
}
.am-menu-btn svg {
    width: 22px;
    height: 22px;
    display: block;
}
.am-menu-btn:hover {
    background: rgba(0,0,0,0.06);
}
.am-menu-btn-open {
    background: rgba(0,0,0,0.08);
}
.am-menu-btn-close {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s;
}
.am-menu-btn-open .am-menu-btn-close {
    opacity: 1;
}
.am-menu-btn-open > svg:not(.am-menu-btn-close) {
    opacity: 0;
}

/* Desktop (>=1025px): single-row nav, no wrap, hamburger hidden */
@media (min-width: 1025px) {
    .am-topbar {
        display: flex !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        gap: 16px !important;
    }
    .am-topbar > * {
        flex-shrink: 0;
    }
    .am-topbar .am-nav {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center;
        gap: 12px;
        margin-left: auto !important;
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
        margin-top: 0 !important;
        width: auto !important;
        flex-basis: auto !important;
    }
    .am-topbar .am-nav a {
        white-space: nowrap;
        padding: 0 !important;
        border: none !important;
        width: auto !important;
        display: inline-block !important;
        font-size: 0.85rem;
    }
    .am-menu-btn {
        display: none !important;
    }
}

/* Tablet + mobile (<=1024px): hamburger visible, nav drawer */
@media (max-width: 1024px) {
    .am-topbar {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center;
        gap: 10px;
    }
    .am-menu-btn {
        display: flex !important;
    }
    .am-topbar .am-nav {
        display: none !important;
        flex-direction: column !important;
        width: 100% !important;
        flex-basis: 100% !important;
        gap: 0 !important;
        margin: 12px 0 0 0 !important;
        padding: 12px 0 0 0 !important;
        border-top: 1px solid rgba(0,0,0,0.08);
    }
    .am-topbar .am-nav..am-nav-open {
        display: flex !important;
    }
    .am-topbar .am-nav a {
        padding: 12px 0 !important;
        white-space: normal;
        border-bottom: 1px solid rgba(0,0,0,0.05) !important;
        width: 100% !important;
        display: block !important;
    }
    .am-topbar .am-nav a:last-child {
        border-bottom: none !important;
    }
}
