/* ============================================================
   base.css — reset, typography, base layout, responsive
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.5;
}

a { color: inherit; }

img { max-width: 100%; }

/* --- App shell --- */
#app-root { display: block; }

.view-section {
    padding: 40px;
    max-width: var(--content-max);
    margin: 0 auto;
}

/* Two-column workspace (sidebar + main) used by Space Typicals,
   Building Systems and Standard Materials. */
.workspace-container {
    display: flex;
    min-height: calc(100vh - var(--header-height));
}

.workspace-main {
    flex: 1;
    padding: 40px;
    max-width: 1300px;
    min-width: 0;               /* allow flex child to shrink / images to scroll */
}

/* Generic scroll guard for wide content (tables, image rows). */
.scroll-x { overflow-x: auto; }

/* --- Section content headers --- */
.content-header {
    border-bottom: 2px solid var(--sl-silver);
    margin-bottom: 20px;
    padding-bottom: 15px;
}

.content-header .pre-title {
    color: var(--sl-slate);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.content-header h1 {
    font-size: 1.85rem;
    color: var(--sl-navy);
    font-weight: 700;
}

.section-header { margin-bottom: 25px; }
.section-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

/* --- Footer --- */
footer {
    padding: 30px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border);
    margin-top: 40px;
}

/* --- Responsive breakpoints --- */
@media (max-width: 1100px) {
    .workspace-grid,
    .doc-directory-container { grid-template-columns: 1fr !important; }

    .workspace-container { flex-direction: column; }

    aside.sidebar {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
}

@media (max-width: 768px) {
    .view-section,
    .workspace-main { padding: 24px 18px; }

    .hero-banner { padding: 30px 20px; }
    .hero-banner h1 { font-size: 1.85rem; }

    header { padding: 0 18px; }
    nav.top-nav { gap: 4px; }
    .top-nav a, .dropbtn { padding: 8px 10px; font-size: 0.8rem; }
    .brand-text { font-size: 0.95rem; }
}
