/* =========================================================
   Vintage Slot Machine Manual & Schematic Archive — visual system
   Direction: coin-op parlor / casino-floor antique, not SaaS-card,
   and not generic industrial blueprint (this isn't a CAD archive --
   it's Mills, Jennings, Watling, Bally-era machines). Aged manual
   paper, cast-iron cabinet green, brass fittings, oxblood carpet
   red. Title-block metadata is treated as real content, the way
   a machine's data plate is, not a decorative label.
   ========================================================= */

:root {
    --ink-900:      #1B4332; /* cast-iron cabinet / felt green, headers/nav */
    --ink-700:      #2D5940; /* secondary panels */
    --ink-500:      #6B4A2F; /* links, active state -- worn walnut, not a cool blue */
    --paper:        #EAE0C6; /* aged manual paper, page bg */
    --paper-card:   #F5EFDD; /* card surface, slightly lighter than page */
    --line:         #C9B892; /* hairline borders, aged-paper rule lines */
    --line-strong:  #A8946A;
    --text:         #241C10; /* warm near-black, like old ink */
    --text-muted:   #6B5D45;
    --brass:        #B8862B; /* coin / bell-hardware accent */
    --brass-dark:   #8F6A20;
    --oxblood:      #7B1E3A; /* carpet-red accent, used sparingly */

    --font-display: "Oswald", "Segoe UI", sans-serif;
    --font-body:    "Source Serif 4", Georgia, serif;
    --font-mono:    "IBM Plex Mono", "Consolas", monospace;
}

html, body {
    background: var(--paper);
    color: var(--text);
    font-family: var(--font-body);
}

h1, h2, h3, h4, .brand, .display-heading {
    font-family: var(--font-display);
    letter-spacing: -0.01em;
}

a { color: var(--ink-500); }
a:hover { color: var(--ink-900); }

/* ---------- top chrome: nav + persistent search bar ---------- */

.sa-navbar {
    background: var(--ink-900);
}

.sa-navbar .navbar-brand {
    font-family: var(--font-display);
    font-weight: 600;
    color: #fff;
    font-size: 1.25rem;
}

.sa-navbar .navbar-brand small {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: #9FC2D9;
    font-weight: 400;
    letter-spacing: 0.04em;
}

.sa-navbar .nav-link {
    color: #DCE7EC;
}

.sa-navbar .nav-link:hover,
.sa-navbar .nav-link.active {
    color: #fff;
}

.sa-searchbar {
    background: var(--ink-700);
    border-bottom: 1px solid var(--ink-900);
}

.sa-searchbar .form-control {
    background: #F4F7F8;
    border: 1px solid transparent;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.sa-searchbar .form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(184, 134, 43, 0.35);
    border-color: var(--brass);
}

.sa-searchbar .btn-search {
    background: var(--brass);
    border-color: var(--brass);
    color: #1B1F22;
    font-weight: 600;
}

.sa-searchbar .btn-search:hover {
    background: var(--brass-dark);
    border-color: var(--brass-dark);
    color: #fff;
}

/* ---------- grid-paper texture, used behind hero + empty thumbnails ---------- */

.sa-gridpaper {
    background-color: var(--paper-card);
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 16px 16px;
}

/* ---------- section headers: small caps label is NOT used here on purpose;
   instead a rule + mono index number, since these are literal drawing sheets ---------- */

.sa-section-head {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    border-bottom: 2px solid var(--ink-900);
    padding-bottom: 0.4rem;
    margin-bottom: 1.25rem;
}

.sa-section-head h2 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--ink-900);
}

.sa-section-head .sa-section-tag {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ---------- schematic card ---------- */

.sa-card {
    background: var(--paper-card);
    border: 1px solid var(--line);
    border-radius: 2px;              /* deliberately near-flat, not the rounded SaaS default */
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.sa-card:hover {
    border-color: var(--ink-500);
    box-shadow: 0 2px 10px rgba(22, 50, 74, 0.12);
}

.sa-card-thumb {
    position: relative;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.sa-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sa-card-thumb .sa-filetype-icon {
    font-size: 2.25rem;
    color: var(--ink-700);
    opacity: 0.55;
}

.sa-card-thumb .sa-doc-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--ink-900);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 2px;
    letter-spacing: 0.03em;
}

.sa-card-body {
    padding: 0.9rem 1rem 0.6rem;
    flex: 1;
}

.sa-card-body .sa-card-title {
    font-family: var(--font-display);
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.15rem;
    display: block;
    text-decoration: none;
}

.sa-card-body .sa-card-title:hover {
    color: var(--ink-500);
}

.sa-card-body .sa-card-meta {
    font-size: 0.83rem;
    color: var(--text-muted);
}

/* Title-block strip along the bottom of the card, echoing a real
   drawing's title block: model no. / revision / category tag. */

.sa-titleblock {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    background: var(--ink-900);
    color: #DCE7EC;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    padding: 0.4rem 0.75rem;
}

.sa-titleblock .sa-model {
    color: #fff;
    font-weight: 600;
}

.sa-titleblock .sa-category-chip {
    background: rgba(255,255,255,0.12);
    padding: 1px 6px;
    border-radius: 2px;
    white-space: nowrap;
}

/* ---------- category browse: index tabs, not a generic list-group ---------- */

.sa-index-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--line);
}

.sa-index-list li {
    border-bottom: 1px solid var(--line);
}

.sa-index-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.25rem;
    text-decoration: none;
    color: var(--text);
    font-family: var(--font-display);
    font-size: 0.98rem;
}

.sa-index-list a:hover {
    color: var(--ink-500);
    padding-left: 0.5rem;
}

.sa-index-list .sa-index-count {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ---------- details page title block ---------- */

.sa-detail-panel {
    border: 1px solid var(--line);
    background: var(--paper-card);
}

.sa-detail-panel dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.35rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    margin: 0;
}

.sa-detail-panel dt {
    color: var(--text-muted);
}

.sa-detail-panel dd {
    margin: 0;
    color: var(--text);
}

.sa-preview-stage {
    background: var(--paper-card);
    border: 1px solid var(--line);
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sa-preview-stage img,
.sa-preview-stage embed {
    max-width: 100%;
}

/* ---------- footer ---------- */

.sa-footer {
    background: var(--ink-900);
    color: #9FC2D9;
    font-size: 0.85rem;
}

.sa-footer a { color: #DCE7EC; }

/* ---------- print: only the drawing, none of the chrome ---------- */

@media print {
    .sa-navbar, .sa-searchbar, .sa-footer, .no-print {
        display: none !important;
    }
    body { background: #fff; }
}
