:root {
    --bg-color: #f2f2f2; /* Light grey backdrop to make the "paper" pop */
    --paper-color: #fafafa;
    --text-color: #111111; /* Deep black ink */
    --border-color: #111111;
    --font-mono: 'Courier Prime', 'Courier New', monospace;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-mono);
    line-height: 1.5;
    text-transform: uppercase;
    padding: 2vw;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

/* The outer framing mimicking a technical drawing or spec document */
.document-container {
    max-width: 1000px;
    width: 100%;
    border: 5px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: var(--paper-color);
    box-shadow: 0px 4px 15px rgba(0,0,0,0.15);
}

.main-content {
    padding: 3rem 4rem;
    flex-grow: 1;
}

.doc-header {
    text-align: center;
    margin-bottom: 3rem;
    border-bottom: 3px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.doc-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.doc-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.spec-part {
    margin-bottom: 2.5rem;
}

.spec-part > h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.spec-article {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.spec-article h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.spec-paragraph {
    display: flex;
    margin-bottom: 0.8rem;
    padding-left: 2rem;
}

.spec-paragraph .letter {
    min-width: 2.5rem;
    font-weight: 700;
}

.spec-paragraph p {
    flex-grow: 1;
    margin-bottom: 0.5rem;
}

.end-of-section {
    text-align: center;
    margin-top: 4rem;
    margin-bottom: 2rem;
    font-weight: 700;
}

a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 700;
    border-bottom: 1px solid var(--text-color);
    transition: all 0.2s ease;
}

a:hover {
    background-color: var(--text-color);
    color: var(--paper-color);
}

/* Title Block styling (kept as is, unused but safe) */
.title-block {
    display: flex;
    border-top: 5px solid var(--border-color);
    background-color: var(--paper-color);
}

.tb-section {
    flex: 1;
    border-right: 3px solid var(--border-color);
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
}

.tb-section:last-child {
    border-right: none;
    flex: 0.5;
    align-items: center;
    justify-content: center;
}

.tb-label {
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.tb-value {
    font-size: 1.1rem;
    font-weight: 700;
}

.sheet-no {
    font-size: 1.5rem;
}

/* Accordion Styling */
.project-content {
    flex-grow: 1;
    margin-bottom: 0.5rem;
}

.spec-details {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.spec-details summary {
    cursor: pointer;
    font-weight: 700;
    list-style: none; /* Hide default arrow */
    display: inline-block;
    border-bottom: 1px dashed var(--text-color);
    padding-bottom: 2px;
}

.spec-details summary::-webkit-details-marker {
    display: none; /* Hide default arrow in WebKit */
}

.spec-details[open] summary {
    border-bottom-style: solid;
    margin-bottom: 0.8rem;
}

/* Custom [+]/[-] toggle */
.spec-details summary .toggle-text::before {
    content: "[+] ";
}
.spec-details[open] summary .toggle-text::before {
    content: "[-] ";
}

.spec-description {
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .main-content {
        padding: 1.5rem;
    }
    
    .title-block {
        flex-direction: column;
    }
    
    .tb-section {
        border-right: none;
        border-bottom: 3px solid var(--border-color);
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .tb-section:last-child {
        border-bottom: none;
    }
}
