/* ===================================
   CSS Template - Shared Theme
   Computer Insights, Inc.
   
   Used by: /faqs/, /featurePresentations/, /sourceCode/
   =================================== */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
    background-color: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* ===================================
   TOP BAR WITH CONTACT INFO
   =================================== */

.top-bar {
    background-color: #1a365d;
    color: white;
    padding: 10px 30px;
}

.contact-info {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    font-size: 0.9em;
    align-items: center;
}

.contact-left {
    display: flex;
    align-items: center;
    gap: 5px;
    justify-content: flex-start;
}

.contact-center {
    display: flex;
    align-items: center;
    gap: 5px;
    justify-content: center;
    text-align: center;
}

.contact-center address {
    display: inline;
    font-style: normal;
}

.contact-right {
    display: flex;
    align-items: center;
    gap: 5px;
    justify-content: flex-end;
}

.contact-left .fa,
.contact-center .fa,
.contact-right .fa {
    margin-right: 5px;
    font-size: 1.1em;
}

.contact-left a,
.contact-center a,
.contact-right a {
    color: white;
    text-decoration: none;
}

.contact-left a:hover,
.contact-center a:hover,
.contact-right a:hover {
    text-decoration: underline;
}

/* ===================================
   HEADER STYLES with Logo
   =================================== */

.page-header {
    padding: 30px 20px 40px 20px;
    border-bottom: 3px solid #2c5282;
    margin-bottom: 40px;
    background: linear-gradient(to bottom, #ffffff 0%, #f7fafc 100%);
}

.header-top {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 30px;
    padding-left: 30px;
}

.logo-and-company {
    display: flex;
    align-items: center;
    gap: 25px;
}

.logo-container {
    flex-shrink: 0;
}

.company-logo {
    max-width: 200px;
    height: auto;
    display: block;
}

.company-info {
    text-align: left;
}

.company-name {
    font-size: 1.8em;
    font-weight: 700;
    color: #1a365d;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.company-tagline {
    font-size: 1em;
    color: #4a5568;
    margin: 0;
    font-style: italic;
    line-height: 1.4;
}

.header-title {
    text-align: center;
}

.page-title {
    font-size: 2em;
    font-weight: 700;
    color: #2c5282;
    margin: 0;
    letter-spacing: -0.5px;
}

/* ===================================
   PAGE CONTENT WRAPPER
   =================================== */

.page-content {
    padding-left: 30px;
    padding-right: 30px;
}

.page-header ~ * {
    padding-left: 30px;
    padding-right: 30px;
}

/* ===================================
   SECTION HEADINGS
   =================================== */

.section-heading {
    font-size: 1.8em;
    font-weight: 700;
    color: #2c5282;
    margin: 40px 0 25px 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.faq-section:first-of-type .section-heading {
    margin-top: 20px;
}

.faq-section {
    margin-bottom: 20px;
}

/* ===================================
   CALLOUT BOXES
   =================================== */

.callout {
    border-left: 4px solid;
    padding: 15px 20px;
    margin: 25px 0;
    border-radius: 4px;
    background-color: #f7fafc;
}

.callout-label {
    font-weight: 700;
    font-size: 1.1em;
    margin-bottom: 8px;
    text-transform: capitalize;
}

.callout-content p {
    margin-bottom: 10px;
}

.callout-content p:last-child {
    margin-bottom: 0;
}

.callout ul,
.callout ol {
    margin: 15px 0 15px 40px;
    padding-left: 0;
}

.callout li {
    margin-bottom: 8px;
}

/* Warning Callout (Red) */
.callout-warning {
    border-left-color: #e53e3e;
    background-color: #fff5f5;
}

.callout-warning .callout-label {
    color: #c53030;
}

.callout-warning .callout-content {
    color: #742a2a;
}

/* Important Callout (Yellow) */
.callout-important {
    border-left-color: #f59e0b;
    background-color: #fef3c7;
}

.callout-important .callout-label {
    color: #92400e;
}

.callout-important .callout-content {
    color: #78350f;
}

/* Key Principle Callout (Blue) */
.callout-principle {
    border-left-color: #3182ce;
    background-color: #ebf8ff;
}

.callout-principle .callout-label {
    color: #2c5282;
}

.callout-principle .callout-content {
    color: #1a365d;
}

/* Attention Callout (Green) */
.callout-attention {
    border-left-color: #38a169;
    background-color: #f0fff4;
}

.callout-attention .callout-label {
    color: #2f855a;
}

.callout-attention .callout-content {
    color: #22543d;
}

/* Ensure callout content colors apply to paragraphs inside */
.callout-warning .callout-content p { color: #742a2a; }
.callout-important .callout-content p { color: #78350f; }
.callout-principle .callout-content p { color: #1a365d; }
.callout-attention .callout-content p { color: #22543d; }

/* ===================================
   TRAINING BANNER
   =================================== */

.training-banner {
    display: flex;
    align-items: center;
    padding: 20px 25px;
    border-radius: 8px;
    margin: 30px 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.training-banner.training-included {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    color: white;
}

.training-icon {
    font-size: 2em;
    margin-right: 20px;
    background-color: rgba(255,255,255,0.2);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.training-text {
    font-size: 1.05em;
    line-height: 1.5;
}

.training-text strong {
    display: block;
    font-size: 1.15em;
    margin-bottom: 5px;
}

/* ===================================
   FAQ ITEMS with Q Marker
   =================================== */

.faq-item {
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e2e8f0;
}

.faq-item:last-child {
    border-bottom: none;
}

.question {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.q-marker {
    font-size: 1.3em;
    font-weight: 700;
    color: #3182ce;
    background-color: #ebf8ff;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    flex-shrink: 0;
    margin-right: 15px;
    margin-left: 10px;
}

.question-text {
    font-size: 1.25em;
    font-weight: 600;
    color: #2d3748;
    line-height: 1.4;
    padding-top: 4px;
}

.answer {
    margin-left: 60px;
    color: #4a5568;
}

.answer p {
    margin-bottom: 15px;
}

.answer p:last-child {
    margin-bottom: 0;
}

.answer ul {
    margin: 15px 0 15px 20px;
}

.answer li {
    margin-bottom: 8px;
}

/* ===================================
   TRAINING PHASE SECTIONS
   =================================== */

.training-phase {
    background-color: #f7fafc;
    padding: 20px;
    margin: 20px 0;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.phase-title {
    font-size: 1.15em;
    font-weight: 600;
    color: #2c5282;
    margin-bottom: 12px;
}

.training-phase ul {
    margin-left: 20px;
}

.training-phase li {
    margin-bottom: 8px;
}

/* ===================================
   ROLE GROUPS
   =================================== */

.role-group {
    margin: 15px 0;
    padding: 12px 15px;
    background-color: #f7fafc;
    border-left: 3px solid #cbd5e0;
    border-radius: 3px;
}

.role-group h4 {
    font-size: 1.05em;
    font-weight: 600;
    color: #2c5282;
    margin-bottom: 5px;
}

.role-group p {
    color: #4a5568;
    margin-bottom: 0;
}

/* ===================================
   CONFIGURATION OPTIONS
   =================================== */

.config-option {
    margin: 15px 0;
    padding: 15px;
    background-color: #f7fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.config-option h4 {
    font-size: 1.1em;
    font-weight: 600;
    color: #2c5282;
    margin-bottom: 8px;
}

.config-option p {
    color: #4a5568;
    margin-bottom: 0;
}

/* ===================================
   FEATURE PRESENTATION CARDS
   =================================== */

.presentation-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    margin-bottom: 2rem;
    border: 1px solid #e5e8e8;
    transition: box-shadow 0.3s ease;
    position: relative;
}

.presentation-card:hover {
    box-shadow: 0 8px 25px rgba(26, 82, 118, 0.15);
}

.card-banner {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 8px;
    height: 100%;
    background: linear-gradient(180deg, #1a5276 0%, #2874a6 50%, #3498db 100%);
}

.card-content {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 0;
    margin-left: 8px;
}

.card-image {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f7fc;
    border-right: 1px solid #e5e8e8;
}

.card-image img {
    max-width: 100%;
    width: 100%;
    height: auto;
    max-height: 360px;
    object-fit: contain;
    border-radius: 6px;
}

.card-details {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: #1a5276;
    margin: 0 0 0.25rem 0;
}

.card-date {
    font-size: 0.9rem;
    color: #5d6d7e;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-date svg {
    width: 16px;
    height: 16px;
    stroke: #3498db;
}

/* Resource Links */
.resource-list {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
}

.resource-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.resource-item:last-child {
    border-bottom: none;
}

.resource-icon {
    width: 40px;
    height: 40px;
    background: #f0f7fc;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.resource-icon svg {
    width: 20px;
    height: 20px;
    stroke: #2874a6;
}

.resource-icon.video {
    background: linear-gradient(135deg, #e8f4fc 0%, #d6eaf8 100%);
}

.resource-icon.video svg {
    stroke: #1a5276;
}

.resource-icon.article {
    background: linear-gradient(135deg, #e8f8f5 0%, #d1f2eb 100%);
}

.resource-icon.article svg {
    stroke: #1e8449;
}

.resource-info {
    flex: 1;
    min-width: 0;
}

.resource-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #5d6d7e;
    margin-bottom: 2px;
}

.resource-link {
    color: #2874a6;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    display: block;
    transition: color 0.2s ease;
}

.resource-link:hover {
    color: #3498db;
    text-decoration: underline;
}

.resource-link-title {
    display: block;
    font-weight: 600;
    color: #1a5276;
}

.resource-link-subtitle {
    display: block;
    font-weight: 400;
    font-size: 0.9rem;
    color: #5d6d7e;
}

.resource-size {
    font-size: 0.8rem;
    color: #5d6d7e;
    white-space: nowrap;
    margin-left: 1rem;
}

/* ===================================
   FOOTER STYLES
   =================================== */

.page-footer {
    background-color: #2d3748;
    color: #e2e8f0;
    margin-top: 60px;
    padding: 40px 30px 20px 30px;
    border-top: 4px solid #2c5282;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    font-size: 1.1em;
    font-weight: 600;
    color: #fff;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #4a5568;
}

.footer-section p {
    margin-bottom: 8px;
    font-size: 0.95em;
}

.footer-section a {
    color: #90cdf4;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: #63b3ed;
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #4a5568;
    font-size: 0.9em;
    color: #cbd5e0;
}

.footer-bottom p {
    margin-bottom: 5px;
}

.footer-logo-section {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.footer-logo {
    max-width: 120px;
    height: auto;
    flex-shrink: 0;
}

.footer-company-info {
    flex: 1;
}

.footer-company-info h3 {
    margin-top: 0;
}

.footer-company-info em {
    color: #90cdf4;
    font-weight: 500;
}

/* ===================================
   SOURCE CODE DOCUMENTATION STYLES
   (Shared by index.html and individual pages)
   =================================== */

/* Title header block */
.title-block {
    background: linear-gradient(135deg, #1a365d 0%, #2d4a7c 100%);
    color: white;
    padding: 2.5rem;
    border-radius: 8px;
    text-align: center;
    margin: 1.5rem 0 2rem 0;
}
.title-block h1 {
    color: white;
    margin: 0 0 0.5rem 0;
    font-size: 1.6rem;
    border: none;
}
.title-block .subtitle {
    color: #e2e8f0;
    margin: 0;
    font-size: 0.95rem;
}
.title-block .meta {
    color: #cbd5e0;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}
.stats-grid.stats-4col {
    grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 768px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
.stat-box {
    background: #e6f3fa;
    border: 2px solid #b8d4e8;
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.stat-number {
    font-size: 1.75rem;
    font-weight: bold;
    color: #2b6cb0;
}
.stat-label {
    font-size: 0.8rem;
    color: #4a5568;
    margin-top: 0.25rem;
}

/* Stat cards (gradient style) */
.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}
.stat-card .value {
    font-size: 2rem;
    font-weight: bold;
}
.stat-card .label {
    opacity: 0.9;
    margin-top: 5px;
}

/* Table of contents */
.toc {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
}
.toc h3, .toc h4 {
    color: #1a365d;
    margin-top: 0;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.toc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem 2rem;
}
@media (max-width: 600px) {
    .toc-grid { grid-template-columns: 1fr; }
}
.toc a {
    color: #2b6cb0;
    text-decoration: none;
    display: block;
    padding: 0.25rem 0;
}
.toc a:hover {
    text-decoration: underline;
}
.toc ul {
    margin: 0;
    padding-left: 20px;
}
.toc li {
    margin: 8px 0;
}

/* Content sections */
.content-item-body h2 {
    color: #1a365d;
    border-bottom: 3px solid #4299e1;
    padding-bottom: 0.5rem;
    margin-top: 2.5rem;
}
.content-item-body h3 {
    color: #2d4a7c;
    margin-top: 1.5rem;
}
.content-item-body h4 {
    color: #4a5568;
}

/* Lists - align with text edge */
.content-item-body ul,
.content-item-body ol {
    padding-left: 1.25rem;
    margin: 1rem 0;
    margin-left: 1.5rem;
}
.content-item-body li {
    margin: 0.4rem 0;
    padding-left: 0.25rem;
}

/* Tables */
.content-item-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}
.content-item-body th {
    background: #1a365d;
    color: white;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
}
.content-item-body td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}
.content-item-body tr:nth-child(even) {
    background: #f8fafc;
}

/* Inline code - soft background */
.content-item-body code {
    background: #edf2f7;
    color: #1a202c;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
}

/* Code blocks */
.content-item-body pre {
    background: #1a202c;
    color: #e2e8f0;
    padding: 1.25rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}
.content-item-body pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Callout boxes for content-item-body */
.content-item-body .callout,
.content-item-body blockquote {
    background: #fef3cd;
    border-left: 4px solid #f0ad4e;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
    color: #856404;
}
.content-item-body .callout-critical {
    background: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}
.content-item-body .callout-info {
    background: #d1ecf1;
    border-left-color: #17a2b8;
    color: #0c5460;
}
.content-item-body .callout h4,
.content-item-body blockquote strong:first-child {
    margin-top: 0;
    display: block;
    margin-bottom: 0.5rem;
}

/* Hide ALL navigation links */
.content-item-body nav,
.content-item-body .nav-links,
.content-item-body .page-nav,
.content-item-body p:has(a[href$=".html"]):has(a:nth-of-type(2)) {
    display: none !important;
}

/* Deep dive cards */
.deep-dive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.deep-dive-card {
    background: linear-gradient(135deg, #1a365d 0%, #2d4a7c 100%);
    border-radius: 8px;
    padding: 1.5rem;
    color: white;
}
.deep-dive-card h4 {
    color: #ffd700;
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}
.deep-dive-card p {
    color: #e2e8f0;
    font-size: 0.9rem;
    margin: 0 0 1rem 0;
}
.deep-dive-card a {
    color: #ffd700;
    text-decoration: none;
    font-weight: 500;
}
.deep-dive-card a:hover {
    text-decoration: underline;
}

/* Section headers */
.section-title {
    color: #1a365d;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}
.section-title i {
    color: #4299e1;
}

/* Loading */
.loading {
    text-align: center;
    padding: 2rem;
    color: #718096;
}

/* Issue cards (critical-issues.html) */
.content-item-body .issue-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.content-item-body .issue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.content-item-body .issue-title {
    font-weight: 700;
    color: #2d3748;
    font-size: 1.1em;
}
.content-item-body .severity-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
}
.content-item-body .severity-critical { background: #c53030; color: white; }
.content-item-body .severity-high { background: #dd6b20; color: white; }
.content-item-body .severity-medium { background: #d69e2e; color: white; }
.content-item-body .issue-card p { margin: 0.5rem 0; color: #4a5568; }
.content-item-body .issue-card strong { color: #2d3748; }

/* Recommendation boxes (recommendations.html) */
.content-item-body .recommendation-box {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}
.content-item-body .recommendation-box h4 {
    color: #2c5282;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}
.content-item-body .recommendation-box ol {
    margin: 0 0 0 20px;
    color: #4a5568;
}
.content-item-body .recommendation-box li {
    margin: 8px 0;
}

/* Callout with inline icon (core-type-definitions.html) */
.content-item-body .callout-important { border-radius: 8px; }
.content-item-body .callout-important .callout-content {
    color: #78350f;
}
.content-item-body .callout-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 5px;
}
.content-item-body .callout-icon {
    font-size: 1.1em;
    color: #d97706;
}

/* Risk indicators for type definitions table */
.content-item-body .risk-safe { color: #22863a; font-weight: 600; }
.content-item-body .risk-critical { color: #c53030; font-weight: 700; }

/* Green callout (callout-attention) */
.content-item-body .callout-attention {
    background-color: #f0fff4;
    border-left-color: #38a169;
    border-radius: 8px;
    color: #276749;
}
.content-item-body .callout-attention .callout-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #276749;
    margin-bottom: 5px;
}
.content-item-body .callout-attention .callout-icon {
    font-size: 1.1em;
    color: #38a169;
}
.content-item-body .callout-attention .callout-content {
    color: #22543d;
}

/* Blue callout (callout-principle) */
.content-item-body .callout-principle {
    background-color: #ebf8ff;
    border-left-color: #3182ce;
    border-radius: 8px;
}
.content-item-body .callout-principle .callout-label {
    color: #2c5282;
}
.content-item-body .callout-principle .callout-content {
    color: #1a365d;
}

/* Red callout (callout-warning) */
.content-item-body .callout-warning {
    background-color: #fff5f5;
    border-left-color: #e53e3e;
    border-radius: 8px;
}
.content-item-body .callout-warning .callout-label {
    color: #c53030;
}
.content-item-body .callout-warning .callout-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #c53030;
    margin-bottom: 5px;
}
.content-item-body .callout-warning .callout-icon {
    font-size: 1.1em;
    color: #e53e3e;
}
.content-item-body .callout-warning .callout-content {
    color: #742a2a;
}

/* Ensure callout content colors apply to paragraphs inside (content-item-body) */
.content-item-body .callout-warning .callout-content p { color: #742a2a; }
.content-item-body .callout-important .callout-content p { color: #78350f; }
.content-item-body .callout-principle .callout-content p { color: #1a365d; }
.content-item-body .callout-attention .callout-content p { color: #22543d; }

/* Architecture Diagram Styles */
.content-item-body .arch-diagram {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
}
.content-item-body .arch-layer { margin: 0 auto; max-width: 700px; }
.content-item-body .arch-connector { text-align: center; padding: 10px 0; color: #1a365d; font-size: 1.5em; }
.content-item-body .interpreter-box { background: #e8f4fc; border: 2px solid #b8d4e8; border-radius: 12px; overflow: hidden; }
.content-item-body .interpreter-header { background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%); color: white; padding: 12px 20px; display: flex; align-items: center; gap: 10px; font-weight: 600; }
.content-item-body .interpreter-body { padding: 20px; display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.content-item-body .interpreter-component { background: #d1e7f5; border: 2px solid #a8d1eb; border-radius: 8px; padding: 12px 20px; text-align: center; min-width: 130px; }
.content-item-body .interpreter-component .name { font-weight: 600; color: #1a365d; }
.content-item-body .interpreter-component .detail { font-size: 0.85em; color: #4a5568; }
.content-item-body .processor-box { background: white; border: 2px solid #e2e8f0; border-radius: 12px; padding: 15px 20px; text-align: center; }
.content-item-body .processor-box .title { font-weight: 600; color: #1a365d; display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 8px; }
.content-item-body .processor-box .modules { color: #718096; font-size: 0.9em; }
.content-item-body .storage-box { background: #f0fff4; border: 2px solid #38a169; border-radius: 12px; overflow: hidden; }
.content-item-body .storage-header { padding: 12px 20px; border-bottom: 1px solid #c6f6d5; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; color: #276749; }
.content-item-body .storage-body { padding: 20px; display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.content-item-body .storage-component { background: #c6f6d5; border: 2px solid #9ae6b4; border-radius: 8px; padding: 12px 20px; text-align: center; min-width: 120px; }
.content-item-body .storage-component .name { font-weight: 600; color: #276749; }
.content-item-body .storage-component .detail { font-size: 0.85em; color: #2f855a; }
.content-item-body .isam-box { background: #faf5ff; border: 2px solid #9f7aea; border-radius: 12px; overflow: hidden; }
.content-item-body .isam-header { padding: 12px 20px; border-bottom: 1px solid #e9d8fd; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; color: #553c9a; }
.content-item-body .isam-body { padding: 20px; display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.content-item-body .isam-component { background: #e9d8fd; border: 2px solid #d6bcfa; border-radius: 8px; padding: 12px 20px; text-align: center; min-width: 120px; }
.content-item-body .isam-component .name { font-weight: 600; color: #553c9a; }
.content-item-body .isam-component .detail { font-size: 0.85em; color: #6b46c1; }

/* Shared Memory Diagram Styles */
.content-item-body .shm-diagram {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
}
.content-item-body .shm-region {
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
    border-radius: 10px;
    padding: 20px;
}
.content-item-body .shm-region-title {
    color: white;
    text-align: center;
    font-weight: 600;
    font-size: 0.9em;
    letter-spacing: 1px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}
.content-item-body .shm-components {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}
.content-item-body .shm-component {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    padding: 12px 20px;
    text-align: center;
    width: 140px;
    box-sizing: border-box;
}
.content-item-body .shm-component .name { color: white; font-weight: 600; font-size: 0.9em; }
.content-item-body .shm-component .detail { color: #cbd5e0; font-size: 0.8em; margin-top: 2px; }
.content-item-body .shm-connectors {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 0;
}
.content-item-body .shm-connector-wrapper {
    width: 140px;
    display: flex;
    justify-content: center;
}
.content-item-body .shm-connector { width: 2px; height: 50px; background-color: #1a365d; }
.content-item-body .shm-processes {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}
.content-item-body .shm-process {
    background: white;
    border: 2px solid #1a365d;
    border-radius: 8px;
    padding: 15px 25px;
    text-align: center;
    min-width: 120px;
    width: 140px;
    box-sizing: border-box;
}
.content-item-body .shm-process .name { color: #1a365d; font-weight: 600; }
.content-item-body .shm-process .label { color: #718096; font-size: 0.8em; margin-top: 4px; }

/* Struct boxes (Key Components) */
.content-item-body .struct-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px 20px;
    margin: 15px 0;
}
.content-item-body .struct-title {
    font-weight: 700;
    color: #1a365d;
    margin-bottom: 10px;
}

/* Developer Tools Documentation Styles */
.info-box,
.content-item-body .info-box { 
    background: #f8fafc; 
    border: 1px solid #e2e8f0; 
    border-radius: 8px; 
    padding: 20px; 
    margin: 20px 0; 
}
.info-box h4,
.content-item-body .info-box h4 { 
    color: #1a365d; 
    margin-top: 0; 
    margin-bottom: 10px; 
}

.warning-box,
.content-item-body .warning-box { 
    background: #fffaf0; 
    border: 1px solid #ed8936; 
    border-left: 4px solid #dd6b20; 
    border-radius: 0 8px 8px 0; 
    padding: 15px 20px; 
    margin: 20px 0; 
}
.warning-box h4,
.content-item-body .warning-box h4 { 
    color: #c05621; 
    margin-top: 0; 
}

.tech-note,
.content-item-body .tech-note { 
    background: #ebf8ff; 
    border: 1px solid #90cdf4; 
    border-left: 4px solid #3182ce; 
    padding: 15px 20px; 
    margin: 20px 0; 
    border-radius: 0 8px 8px 0; 
}
.tech-note h4,
.content-item-body .tech-note h4 { 
    color: #2c5282; 
    margin-top: 0; 
}

.improvement-box,
.content-item-body .improvement-box { 
    background: #f0fff4; 
    border: 1px solid #68d391; 
    border-left: 4px solid #38a169; 
    padding: 15px 20px; 
    margin: 20px 0; 
    border-radius: 0 8px 8px 0; 
}
.improvement-box h4,
.content-item-body .improvement-box h4 { 
    color: #276749; 
    margin-top: 0; 
}

.content-item-body .menu-screen { background: #c0c0c0; color: #000080; padding: 20px 30px; border-radius: 8px; font-family: 'Consolas', monospace; margin: 20px 0; border: 3px outset #dfdfdf; }
.content-item-body .menu-screen .title { background: #000080; color: white; padding: 5px 15px; display: inline-block; margin-bottom: 15px; }
.content-item-body .menu-item { margin: 12px 0; padding-left: 20px; }
.content-item-body .menu-item.highlight { background: #000080; color: white; margin-left: 0; padding-left: 20px; }
.content-item-body .menu-item.dimmed { color: #808080; }
.content-item-body .menu-prompt { margin-top: 20px; }

.option-detail,
.content-item-body .option-detail { 
    background: #f8fafc; 
    border: 1px solid #e2e8f0; 
    border-radius: 8px; 
    padding: 25px; 
    margin: 25px 0; 
}
.option-detail h4,
.content-item-body .option-detail h4 { 
    color: #1a365d; 
    margin-top: 0; 
    border-bottom: 2px solid #4299e1; 
    padding-bottom: 10px; 
}
.option-detail h5,
.content-item-body .option-detail h5 { 
    color: #2d4a7c; 
    margin-top: 20px; 
}

.step-list,
.content-item-body .step-list { 
    counter-reset: step; 
    list-style: none; 
    padding-left: 0; 
    margin-left: 0; 
}
.step-list li,
.content-item-body .step-list li { 
    counter-increment: step; 
    margin: 15px 0; 
    padding-left: 45px; 
    position: relative; 
}
.step-list li::before,
.content-item-body .step-list li::before { 
    content: counter(step); 
    position: absolute; 
    left: 0; 
    top: 0; 
    background: #2b6cb0; 
    color: white; 
    width: 28px; 
    height: 28px; 
    border-radius: 50%; 
    text-align: center; 
    line-height: 28px; 
    font-weight: bold; 
    font-size: 0.9rem; 
}

.cmd-syntax,
.content-item-body .cmd-syntax { 
    background: #1a202c; 
    color: #68d391; 
    padding: 15px 20px; 
    border-radius: 8px; 
    font-family: 'Consolas', monospace; 
    margin: 15px 0; 
    overflow-x: auto; 
}
.cmd-syntax code,
.content-item-body .cmd-syntax code { 
    color: #68d391; 
    background: none; 
}

.option-table,
.content-item-body .option-table { 
    width: 100%; 
    border-collapse: collapse; 
    margin: 20px 0; 
}
.option-table th,
.content-item-body .option-table th { 
    background: #1a365d; 
    color: white; 
    padding: 12px 15px; 
    text-align: left; 
}
.option-table td,
.content-item-body .option-table td { 
    padding: 10px 15px; 
    border-bottom: 1px solid #e2e8f0; 
}
.option-table tr:nth-child(even),
.content-item-body .option-table tr:nth-child(even) { 
    background: #f8fafc; 
}

.example-box,
.content-item-body .example-box { 
    background: #1a202c; 
    color: #e2e8f0; 
    padding: 20px; 
    border-radius: 8px; 
    font-family: 'Consolas', monospace; 
    margin: 20px 0; 
    white-space: pre; 
    overflow-x: auto; 
    font-size: 0.9rem; 
    line-height: 1.6; 
}

.code-block,
.content-item-body .code-block { 
    background: #1a202c; 
    color: #e2e8f0; 
    padding: 20px; 
    border-radius: 8px; 
    font-family: 'Consolas', monospace; 
    margin: 20px 0; 
    white-space: pre; 
    overflow-x: auto; 
    font-size: 0.85rem; 
    line-height: 1.7; 
}
.code-block .comment,
.content-item-body .code-block .comment { 
    color: #68d391; 
}
.code-block .highlight,
.content-item-body .code-block .highlight { 
    color: #f6ad55; 
}
.code-block .string,
.content-item-body .code-block .string { 
    color: #fc8181; 
}
.code-block .keyword,
.content-item-body .code-block .keyword { 
    color: #63b3ed; 
}

.ctrl-table,
.content-item-body .ctrl-table { 
    width: 100%; 
    border-collapse: collapse; 
    margin: 20px 0; 
    font-size: 0.9rem; 
}
.ctrl-table th,
.content-item-body .ctrl-table th { 
    background: #1a365d; 
    color: white; 
    padding: 10px 12px; 
    text-align: left; 
}
.ctrl-table td,
.content-item-body .ctrl-table td { 
    padding: 8px 12px; 
    border-bottom: 1px solid #e2e8f0; 
    vertical-align: top; 
}
.ctrl-table tr:nth-child(even),
.content-item-body .ctrl-table tr:nth-child(even) { 
    background: #f8fafc; 
}
.ctrl-char,
.content-item-body .ctrl-char { 
    font-family: 'Consolas', monospace; 
    background: #2d3748; 
    color: #68d391; 
    padding: 3px 8px; 
    border-radius: 4px; 
}

.diagram-box,
.content-item-body .diagram-box { 
    background: linear-gradient(135deg, #1a365d 0%, #2d4a7c 100%); 
    border-radius: 8px; 
    padding: 25px; 
    margin: 25px 0; 
    color: #e2e8f0; 
    font-family: 'Consolas', monospace; 
    font-size: 0.85rem; 
    line-height: 1.6; 
    overflow-x: auto; 
    white-space: pre; 
}

.section-box,
.content-item-body .section-box { 
    background: #f8fafc; 
    border: 2px solid #e2e8f0; 
    border-radius: 8px; 
    padding: 20px; 
    margin: 20px 0; 
}
.section-box h4,
.content-item-body .section-box h4 { 
    color: #1a365d; 
    margin-top: 0; 
    border-bottom: 2px solid #4299e1; 
    padding-bottom: 8px; 
}

.abbrev-table,
.content-item-body .abbrev-table { 
    width: 100%; 
    border-collapse: collapse; 
    margin: 15px 0; 
    font-size: 0.85rem; 
}
.abbrev-table th,
.content-item-body .abbrev-table th { 
    background: #2d4a7c; 
    color: white; 
    padding: 8px 10px; 
    text-align: left; 
}
.abbrev-table td,
.content-item-body .abbrev-table td { 
    padding: 6px 10px; 
    border-bottom: 1px solid #e2e8f0; 
}

/* Request/Signal tables */
.request-table,
.content-item-body .request-table { 
    width: 100%; 
    border-collapse: collapse; 
    margin: 20px 0; 
    font-size: 0.9rem; 
}
.request-table th,
.content-item-body .request-table th { 
    background: #1a365d; 
    color: white; 
    padding: 12px 15px; 
    text-align: left; 
}
.request-table td,
.content-item-body .request-table td { 
    padding: 10px 15px; 
    border-bottom: 1px solid #e2e8f0; 
    vertical-align: top; 
}
.request-table tr:hover,
.content-item-body .request-table tr:hover { 
    background: #f7fafc; 
}
.request-table code,
.content-item-body .request-table code { 
    background: #edf2f7; 
    padding: 2px 6px; 
    border-radius: 3px; 
    font-size: 0.85rem; 
}

.signal-table,
.content-item-body .signal-table { 
    width: 100%; 
    border-collapse: collapse; 
    margin: 20px 0; 
}
.signal-table th,
.content-item-body .signal-table th { 
    background: #553c9a; 
    color: white; 
    padding: 10px 12px; 
    text-align: left; 
}
.signal-table td,
.content-item-body .signal-table td { 
    padding: 8px 12px; 
    border-bottom: 1px solid #e2e8f0; 
}
.signal-table code,
.content-item-body .signal-table code { 
    background: #faf5ff; 
    color: #553c9a; 
    padding: 2px 6px; 
    border-radius: 3px; 
}

/* Line references */
.line-ref,
.content-item-body .line-ref { 
    color: #805ad5; 
    font-weight: 600; 
}

/* Flowchart steps */
.flowchart,
.content-item-body .flowchart { 
    margin: 20px 0; 
}
.flowchart-step,
.content-item-body .flowchart-step { 
    display: flex; 
    align-items: flex-start; 
    margin: 15px 0; 
}
.flowchart-num,
.content-item-body .flowchart-num { 
    background: #2b6cb0; 
    color: white; 
    width: 32px; 
    height: 32px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-weight: bold; 
    flex-shrink: 0; 
    margin-right: 15px; 
}
.flowchart-content,
.content-item-body .flowchart-content { 
    flex: 1; 
}
.flowchart-content h5,
.content-item-body .flowchart-content h5 { 
    margin: 0 0 5px 0; 
    color: #2c5282; 
}
.flowchart-content p,
.content-item-body .flowchart-content p { 
    margin: 0; 
    color: #4a5568; 
}

/* Navigation buttons (hide in index.html context) */
.nav-buttons,
.content-item-body .nav-buttons { 
    display: flex; 
    gap: 15px; 
    margin-top: 30px; 
    flex-wrap: wrap; 
}
.nav-btn,
.content-item-body .nav-btn { 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    padding: 10px 20px; 
    background: #2b6cb0; 
    color: white; 
    text-decoration: none; 
    border-radius: 6px; 
    font-weight: 500; 
}
.nav-btn:hover,
.content-item-body .nav-btn:hover { 
    background: #2c5282; 
}

/* Hide nav buttons when inside index.html content container */
.content-item-body .nav-buttons { 
    display: none; 
}

/* ===================================
   PAGE-CONTENT RULES (for standalone HTML files)
   Mirror .content-item-body rules for consistent rendering
   =================================== */

/* Headings */
.page-content h2 {
    color: #1a365d;
    border-bottom: 3px solid #4299e1;
    padding-bottom: 0.5rem;
    margin-top: 2.5rem;
}
.page-content h3 {
    color: #2d4a7c;
    margin-top: 1.5rem;
}
.page-content h4 {
    color: #4a5568;
}

/* Lists */
.page-content ul,
.page-content ol {
    padding-left: 1.25rem;
    margin: 1rem 0;
    margin-left: 1.5rem;
}
.page-content li {
    margin: 0.4rem 0;
    padding-left: 0.25rem;
}

/* Tables */
.page-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}
.page-content th {
    background: #1a365d;
    color: white;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
}
.page-content td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}
.page-content tr:nth-child(even) {
    background: #f8fafc;
}

/* Inline code */
.page-content code {
    background: #edf2f7;
    color: #1a202c;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
}

/* Code blocks */
.page-content pre {
    background: #1a202c;
    color: #e2e8f0;
    padding: 1.25rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}
.page-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Callouts */
.page-content .callout,
.page-content blockquote {
    background: #fef3cd;
    border-left: 4px solid #f0ad4e;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
    color: #856404;
}
.page-content .callout-critical {
    background: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}
.page-content .callout-info {
    background: #d1ecf1;
    border-left-color: #17a2b8;
    color: #0c5460;
}
.page-content .callout h4,
.page-content blockquote strong:first-child {
    margin-top: 0;
    display: block;
    margin-bottom: 0.5rem;
}
.page-content .callout-important { border-radius: 8px; }
.page-content .callout-important .callout-content {
    color: #78350f;
}
.page-content .callout-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 5px;
}
.page-content .callout-icon {
    font-size: 1.1em;
    color: #d97706;
}
.page-content .risk-safe { color: #22863a; font-weight: 600; }
.page-content .risk-critical { color: #c53030; font-weight: 700; }
.page-content .callout-attention {
    background-color: #f0fff4;
    border-left-color: #38a169;
    border-radius: 8px;
}
.page-content .callout-attention .callout-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #276749;
    margin-bottom: 5px;
}
.page-content .callout-attention .callout-icon {
    font-size: 1.1em;
    color: #38a169;
}
.page-content .callout-attention .callout-content {
    color: #22543d;
}

/* Blue callout (callout-principle) */
.page-content .callout-principle {
    background-color: #ebf8ff;
    border-left-color: #3182ce;
    border-radius: 8px;
}
.page-content .callout-principle .callout-label {
    color: #2c5282;
}
.page-content .callout-principle .callout-content {
    color: #1a365d;
}

/* Red callout (callout-warning) */
.page-content .callout-warning {
    background-color: #fff5f5;
    border-left-color: #e53e3e;
    border-radius: 8px;
}
.page-content .callout-warning .callout-label {
    color: #c53030;
}
.page-content .callout-warning .callout-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #c53030;
    margin-bottom: 5px;
}
.page-content .callout-warning .callout-icon {
    font-size: 1.1em;
    color: #e53e3e;
}
.page-content .callout-warning .callout-content {
    color: #742a2a;
}

/* Ensure callout content colors apply to paragraphs inside (page-content) */
.page-content .callout-warning .callout-content p { color: #742a2a; }
.page-content .callout-important .callout-content p { color: #78350f; }
.page-content .callout-principle .callout-content p { color: #1a365d; }
.page-content .callout-attention .callout-content p { color: #22543d; }

/* Issue cards */
.page-content .issue-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.page-content .issue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.page-content .issue-title {
    font-weight: 700;
    color: #2d3748;
    font-size: 1.1em;
}
.page-content .severity-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
}
.page-content .severity-critical { background: #c53030; color: white; }
.page-content .severity-high { background: #dd6b20; color: white; }
.page-content .severity-medium { background: #d69e2e; color: white; }
.page-content .issue-card p { margin: 0.5rem 0; color: #4a5568; }
.page-content .issue-card strong { color: #2d3748; }

/* Recommendation boxes */
.page-content .recommendation-box {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}
.page-content .recommendation-box h4 {
    color: #2c5282;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}
.page-content .recommendation-box ol {
    margin: 0 0 0 20px;
    color: #4a5568;
}
.page-content .recommendation-box li {
    margin: 8px 0;
}

/* Architecture diagram */
.page-content .arch-diagram {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
}
.page-content .arch-layer { margin: 0 auto; max-width: 700px; }
.page-content .arch-connector { text-align: center; padding: 10px 0; color: #1a365d; font-size: 1.5em; }
.page-content .interpreter-box { background: #e8f4fc; border: 2px solid #b8d4e8; border-radius: 12px; overflow: hidden; }
.page-content .interpreter-header { background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%); color: white; padding: 12px 20px; display: flex; align-items: center; gap: 10px; font-weight: 600; }
.page-content .interpreter-body { padding: 20px; display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.page-content .interpreter-component { background: #d1e7f5; border: 2px solid #a8d1eb; border-radius: 8px; padding: 12px 20px; text-align: center; min-width: 130px; }
.page-content .interpreter-component .name { font-weight: 600; color: #1a365d; }
.page-content .interpreter-component .detail { font-size: 0.85em; color: #4a5568; }
.page-content .processor-box { background: white; border: 2px solid #e2e8f0; border-radius: 12px; padding: 15px 20px; text-align: center; }
.page-content .processor-box .title { font-weight: 600; color: #1a365d; display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 8px; }
.page-content .processor-box .modules { color: #718096; font-size: 0.9em; }
.page-content .storage-box { background: #f0fff4; border: 2px solid #38a169; border-radius: 12px; overflow: hidden; }
.page-content .storage-header { padding: 12px 20px; border-bottom: 1px solid #c6f6d5; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; color: #276749; }
.page-content .storage-body { padding: 20px; display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.page-content .storage-component { background: #c6f6d5; border: 2px solid #9ae6b4; border-radius: 8px; padding: 12px 20px; text-align: center; min-width: 120px; }
.page-content .storage-component .name { font-weight: 600; color: #276749; }
.page-content .storage-component .detail { font-size: 0.85em; color: #2f855a; }
.page-content .isam-box { background: #faf5ff; border: 2px solid #9f7aea; border-radius: 12px; overflow: hidden; }
.page-content .isam-header { padding: 12px 20px; border-bottom: 1px solid #e9d8fd; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; color: #553c9a; }
.page-content .isam-body { padding: 20px; display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.page-content .isam-component { background: #e9d8fd; border: 2px solid #d6bcfa; border-radius: 8px; padding: 12px 20px; text-align: center; min-width: 120px; }
.page-content .isam-component .name { font-weight: 600; color: #553c9a; }
.page-content .isam-component .detail { font-size: 0.85em; color: #6b46c1; }

/* Module cards */
.page-content .module-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #3182ce;
    border-radius: 0 8px 8px 0;
    padding: 15px 20px;
    margin: 15px 0;
}
.page-content .module-card h4 {
    color: #1a365d;
    margin: 0 0 8px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.page-content .module-card .lines {
    font-size: 0.8em;
    color: #718096;
    font-weight: normal;
}
.page-content .module-card p {
    margin: 0 0 10px 0;
    color: #4a5568;
}
.page-content .module-card ul {
    margin: 0;
    padding-left: 20px;
    color: #4a5568;
}
.page-content .module-card li { margin: 4px 0; }
.page-content .module-card code { font-size: 0.9em; }
.page-content .category-header {
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    margin: 25px 0 15px 0;
    font-weight: 600;
}
.page-content .category-header i { margin-right: 8px; }

/* Byte/struct tables */
.page-content .byte-table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.9em; }
.page-content .byte-table th { background: #1a365d; color: white; padding: 8px; text-align: left; }
.page-content .byte-table td { padding: 8px; border: 1px solid #e2e8f0; }
.page-content .byte-table tr:nth-child(even) { background: #f8fafc; }
.page-content .offset { font-family: monospace; color: #2c5282; }
.page-content .size { font-family: monospace; color: #276749; }
.page-content .struct-box { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 15px 20px; margin: 15px 0; }
.page-content .struct-title { font-weight: 700; color: #1a365d; margin-bottom: 10px; }
.page-content .total-size { background: #e6fffa; border: 1px solid #38b2ac; padding: 8px 12px; border-radius: 4px; display: inline-block; margin: 10px 0; }

/* Diagram boxes */
.page-content .diagram-box { 
    background: linear-gradient(135deg, #1a365d 0%, #2d4a7c 100%); 
    border-radius: 8px; 
    padding: 25px; 
    margin: 25px 0; 
    color: #e2e8f0; 
    font-family: 'Consolas', monospace; 
    font-size: 0.85rem; 
    line-height: 1.6; 
    overflow-x: auto; 
    white-space: pre; 
}
.page-content .diagram-box pre {
    margin: 0;
    color: #e2e8f0;
    background: transparent;
    font-size: 0.85rem;
    padding: 0;
}

/* Section boxes */
.page-content .section-box { 
    background: #f8fafc; 
    border: 2px solid #e2e8f0; 
    border-radius: 8px; 
    padding: 20px; 
    margin: 20px 0; 
}
.page-content .section-box h4 { 
    color: #1a365d; 
    margin-top: 0; 
    border-bottom: 2px solid #4299e1; 
    padding-bottom: 8px; 
}

/* Info boxes */
.page-content .info-box { 
    background: #f8fafc; 
    border: 1px solid #e2e8f0; 
    border-radius: 8px; 
    padding: 20px; 
    margin: 20px 0; 
}
.page-content .info-box h4 { 
    color: #1a365d; 
    margin-top: 0; 
    margin-bottom: 10px; 
}

/* Tech notes */
.page-content .tech-note { 
    background: #ebf8ff; 
    border: 1px solid #90cdf4; 
    border-left: 4px solid #3182ce; 
    padding: 15px 20px; 
    margin: 20px 0; 
    border-radius: 0 8px 8px 0; 
}
.page-content .tech-note h4 { 
    color: #2c5282; 
    margin-top: 0; 
}

/* Code block styling */
.page-content .code-block { 
    background: #1a202c; 
    color: #e2e8f0; 
    padding: 20px; 
    border-radius: 8px; 
    font-family: 'Consolas', monospace; 
    margin: 20px 0; 
    white-space: pre; 
    overflow-x: auto; 
    font-size: 0.85rem; 
    line-height: 1.7; 
}
.page-content .code-block .comment { color: #68d391; }
.page-content .code-block .highlight { color: #f6ad55; }
.page-content .code-block .string { color: #fc8181; }
.page-content .code-block .keyword { color: #63b3ed; font-weight: bold; }

/* Menu screen (terminal style) */
.page-content .menu-screen { background: #c0c0c0; color: #000080; padding: 20px 30px; border-radius: 8px; font-family: 'Consolas', monospace; margin: 20px 0; border: 3px outset #dfdfdf; }
.page-content .menu-screen .title { background: #000080; color: white; padding: 5px 15px; display: inline-block; margin-bottom: 15px; }
.page-content .menu-item { margin: 12px 0; padding-left: 20px; }
.page-content .menu-item.highlight { background: #000080; color: white; margin-left: 0; padding-left: 20px; }
.page-content .menu-item.dimmed { color: #808080; }
.page-content .menu-prompt { margin-top: 20px; }

/* Option detail boxes */
.page-content .option-detail { 
    background: #f8fafc; 
    border: 1px solid #e2e8f0; 
    border-radius: 8px; 
    padding: 25px; 
    margin: 25px 0; 
}
.page-content .option-detail h4 { 
    color: #1a365d; 
    margin-top: 0; 
    border-bottom: 2px solid #4299e1; 
    padding-bottom: 10px; 
}

/* Step lists */
.page-content .step-list { 
    counter-reset: step; 
    list-style: none; 
    padding-left: 0; 
}
.page-content .step-list li { 
    counter-increment: step; 
    margin: 15px 0; 
    padding-left: 45px; 
    position: relative; 
}
.page-content .step-list li::before { 
    content: counter(step); 
    position: absolute; 
    left: 0; 
    top: 0; 
    background: #2b6cb0; 
    color: white; 
    width: 28px; 
    height: 28px; 
    border-radius: 50%; 
    text-align: center; 
    line-height: 28px; 
    font-weight: bold; 
    font-size: 0.9rem; 
}

/* Message tables */
.page-content .message-table { 
    width: 100%; 
    border-collapse: collapse; 
    margin: 20px 0; 
}
.page-content .message-table th { 
    background: #2b6cb0; 
    color: white; 
    padding: 12px 15px; 
    text-align: left; 
}
.page-content .message-table td { 
    padding: 12px 15px; 
    border-bottom: 1px solid #e2e8f0; 
    vertical-align: top; 
}
.page-content .message-table tr:hover { 
    background: #f7fafc; 
}
.page-content .message-table code { 
    background: #edf2f7; 
    padding: 2px 6px; 
    border-radius: 4px; 
    font-size: 0.9em; 
}
.page-content .message-category { 
    background: #edf2f7; 
    font-weight: 600; 
    color: #2c5282; 
}

/* Control tables */
.page-content .ctrl-table { 
    width: 100%; 
    border-collapse: collapse; 
    margin: 20px 0; 
    font-size: 0.9rem; 
}
.page-content .ctrl-table th { 
    background: #1a365d; 
    color: white; 
    padding: 10px 12px; 
    text-align: left; 
}
.page-content .ctrl-table td { 
    padding: 8px 12px; 
    border-bottom: 1px solid #e2e8f0; 
    vertical-align: top; 
}
.page-content .ctrl-table tr:nth-child(even) { 
    background: #f8fafc; 
}
.page-content .ctrl-char { 
    font-family: 'Consolas', monospace; 
    background: #2d3748; 
    color: #68d391; 
    padding: 3px 8px; 
    border-radius: 4px; 
}

/* Abbreviation tables */
.page-content .abbrev-table { 
    width: 100%; 
    border-collapse: collapse; 
    margin: 15px 0; 
    font-size: 0.85rem; 
}
.page-content .abbrev-table th { 
    background: #2d4a7c; 
    color: white; 
    padding: 8px 10px; 
    text-align: left; 
}
.page-content .abbrev-table td { 
    padding: 6px 10px; 
    border-bottom: 1px solid #e2e8f0; 
}
.page-content .abbrev-table code { 
    background: #edf2f7; 
    padding: 1px 4px; 
    border-radius: 2px; 
}

/* Navigation buttons */
.page-content .nav-buttons { 
    display: flex; 
    gap: 15px; 
    margin-top: 30px; 
    flex-wrap: wrap; 
}
.page-content .nav-btn { 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    padding: 10px 20px; 
    background: #2b6cb0; 
    color: white; 
    text-decoration: none; 
    border-radius: 6px; 
    font-weight: 500; 
}
.page-content .nav-btn:hover { 
    background: #2c5282; 
}

/* Command syntax boxes */
.page-content .cmd-syntax { 
    background: #1a202c; 
    color: #68d391; 
    padding: 15px 20px; 
    border-radius: 8px; 
    font-family: 'Consolas', monospace; 
    margin: 15px 0; 
    overflow-x: auto; 
}
.page-content .cmd-syntax code { 
    color: #68d391; 
    background: none; 
}

/* Option tables */
.page-content .option-table { 
    width: 100%; 
    border-collapse: collapse; 
    margin: 20px 0; 
}
.page-content .option-table th { 
    background: #1a365d; 
    color: white; 
    padding: 12px 15px; 
    text-align: left; 
}
.page-content .option-table td { 
    padding: 10px 15px; 
    border-bottom: 1px solid #e2e8f0; 
}
.page-content .option-table tr:nth-child(even) { 
    background: #f8fafc; 
}
.page-content .option-table code { 
    background: #edf2f7; 
    padding: 2px 6px; 
    border-radius: 3px; 
}

/* Example boxes */
.page-content .example-box { 
    background: #1a202c; 
    color: #e2e8f0; 
    padding: 20px; 
    border-radius: 8px; 
    font-family: 'Consolas', monospace; 
    margin: 20px 0; 
    white-space: pre; 
    overflow-x: auto; 
    font-size: 0.9rem; 
    line-height: 1.6; 
}

/* Stats grid */
.page-content .stats-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); 
    gap: 1rem; 
    margin: 1.5rem 0; 
}
.page-content .stats-4col { 
    grid-template-columns: repeat(4, 1fr); 
}
.page-content .stat-box { 
    background: #f8fafc; 
    border: 1px solid #e2e8f0; 
    border-radius: 8px; 
    padding: 1.25rem; 
    text-align: center; 
}
.page-content .stat-number { 
    font-size: 2rem; 
    font-weight: 700; 
    color: #1a365d; 
    line-height: 1.2; 
}
.page-content .stat-label { 
    font-size: 0.85rem; 
    color: #718096; 
    margin-top: 0.25rem; 
}

/* TOC boxes */
.page-content .toc { 
    background: #f8fafc; 
    border: 1px solid #e2e8f0; 
    border-radius: 8px; 
    padding: 1.5rem; 
    margin: 1.5rem 0; 
}
.page-content .toc h4 { 
    color: #2c5282; 
    margin: 0 0 1rem 0; 
    font-size: 1rem; 
}
.page-content .toc ul { 
    margin: 0; 
    padding-left: 1.5rem; 
}
.page-content .toc li { 
    margin: 0.5rem 0; 
}
.page-content .toc a { 
    color: #3182ce; 
    text-decoration: none; 
}
.page-content .toc a:hover { 
    text-decoration: underline; 
}

/* Request/Signal tables */
.page-content .request-table { 
    width: 100%; 
    border-collapse: collapse; 
    margin: 20px 0; 
    font-size: 0.9rem; 
}
.page-content .request-table th { 
    background: #1a365d; 
    color: white; 
    padding: 12px 15px; 
    text-align: left; 
}
.page-content .request-table td { 
    padding: 10px 15px; 
    border-bottom: 1px solid #e2e8f0; 
    vertical-align: top; 
}
.page-content .request-table tr:hover { 
    background: #f7fafc; 
}
.page-content .request-table code { 
    background: #edf2f7; 
    padding: 2px 6px; 
    border-radius: 3px; 
    font-size: 0.85rem; 
}

.page-content .signal-table { 
    width: 100%; 
    border-collapse: collapse; 
    margin: 20px 0; 
}
.page-content .signal-table th { 
    background: #553c9a; 
    color: white; 
    padding: 10px 12px; 
    text-align: left; 
}
.page-content .signal-table td { 
    padding: 8px 12px; 
    border-bottom: 1px solid #e2e8f0; 
}
.page-content .signal-table code { 
    background: #faf5ff; 
    color: #553c9a; 
    padding: 2px 6px; 
    border-radius: 3px; 
}

/* Line references */
.page-content .line-ref { 
    color: #805ad5; 
    font-weight: 600; 
}

/* Flowchart steps */
.page-content .flowchart { 
    margin: 20px 0; 
}
.page-content .flowchart-step { 
    display: flex; 
    align-items: flex-start; 
    margin: 15px 0; 
}
.page-content .flowchart-num { 
    background: #2b6cb0; 
    color: white; 
    width: 32px; 
    height: 32px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-weight: bold; 
    flex-shrink: 0; 
    margin-right: 15px; 
}
.page-content .flowchart-content { 
    flex: 1; 
}
.page-content .flowchart-content h5 { 
    margin: 0 0 5px 0; 
    color: #2c5282; 
}
.page-content .flowchart-content p { 
    margin: 0; 
    color: #4a5568; 
}

/* Improvement boxes */
.page-content .improvement-box { 
    background: #f8fafc; 
    border: 1px solid #e2e8f0; 
    border-radius: 8px; 
    padding: 20px; 
    margin: 20px 0; 
}
.page-content .improvement-box h4 { 
    color: #1a365d; 
    margin: 0 0 15px 0; 
    border-bottom: 2px solid #4299e1; 
    padding-bottom: 10px; 
}
.page-content .improvement-box p { 
    margin: 10px 0; 
    color: #4a5568; 
}

/* Shared memory diagram */
.page-content .shm-diagram {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
}
.page-content .shm-region {
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
    border-radius: 10px;
    padding: 20px;
}
.page-content .shm-region-title {
    color: white;
    text-align: center;
    font-weight: 600;
    font-size: 0.9em;
    letter-spacing: 1px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}
.page-content .shm-components {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}
.page-content .shm-component {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    padding: 12px 20px;
    text-align: center;
    width: 140px;
    box-sizing: border-box;
}
.page-content .shm-component .name { color: white; font-weight: 600; font-size: 0.9em; }
.page-content .shm-component .detail { color: #cbd5e0; font-size: 0.8em; margin-top: 2px; }
.page-content .shm-connectors {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 0;
}
.page-content .shm-connector-wrapper {
    width: 140px;
    display: flex;
    justify-content: center;
}
.page-content .shm-connector { width: 2px; height: 50px; background-color: #1a365d; }
.page-content .shm-processes {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}
.page-content .shm-process {
    background: white;
    border: 2px solid #1a365d;
    border-radius: 8px;
    padding: 15px 25px;
    text-align: center;
    min-width: 120px;
    width: 140px;
    box-sizing: border-box;
}
.page-content .shm-process .name { color: #1a365d; font-weight: 600; }
.page-content .shm-process .label { color: #718096; font-size: 0.8em; margin-top: 4px; }

/* Uniform sizing for architecture diagram component boxes */
.interpreter-component,
.storage-component,
.isam-component {
    width: 190px;
    min-width: 190px;
    max-width: 190px;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 900px) {
    .card-content {
        grid-template-columns: 1fr;
    }
    
    .card-image {
        border-right: none;
        border-bottom: 1px solid #e5e8e8;
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .top-bar {
        padding: 10px 15px;
    }

    .contact-info {
        grid-template-columns: 1fr;
        gap: 8px;
        font-size: 0.85em;
    }

    .contact-left,
    .contact-center,
    .contact-right {
        justify-content: center;
        text-align: center;
    }

    .page-header ~ *,
    .page-content {
        padding-left: 20px;
        padding-right: 20px;
    }

    .company-logo {
        max-width: 150px;
    }

    .header-top {
        justify-content: center;
        padding-left: 0;
    }

    .logo-and-company {
        flex-direction: column;
        text-align: center;
    }

    .company-info {
        text-align: center;
    }

    .company-name {
        font-size: 1.5em;
    }

    .company-tagline {
        font-size: 0.95em;
    }

    .page-title {
        font-size: 1.6em;
    }

    .section-heading {
        font-size: 1.5em;
    }

    .question-text {
        font-size: 1.1em;
    }

    .answer {
        margin-left: 0;
    }

    .training-banner {
        flex-direction: column;
        text-align: center;
    }

    .training-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .footer-logo-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-logo {
        max-width: 100px;
    }

    .q-marker {
        width: 30px;
        height: 30px;
        font-size: 1.1em;
    }
    
    .stats-grid { 
        grid-template-columns: repeat(2, 1fr); 
    }
}

@media (max-width: 600px) {
    .card-image img {
        max-height: none;
    }
    
    .toc-grid { 
        grid-template-columns: 1fr; 
    }
}

@media (max-width: 480px) {
    .top-bar {
        padding: 8px 12px;
    }

    .contact-info {
        font-size: 0.8em;
    }

    .page-header ~ *,
    .page-content {
        padding-left: 15px;
        padding-right: 15px;
    }

    .company-logo {
        max-width: 120px;
    }

    .company-name {
        font-size: 1.3em;
    }

    .company-tagline {
        font-size: 0.9em;
    }

    .page-title {
        font-size: 1.4em;
    }

    .page-header {
        padding: 20px 15px 30px 15px;
    }

    .callout {
        padding: 12px 15px;
    }

    .training-banner {
        padding: 15px;
    }

    .page-footer {
        padding: 30px 20px 15px 20px;
    }
}

/* ===================================
   PRINT STYLES
   =================================== */

@media print {
    body {
        background-color: white;
    }

    .container {
        box-shadow: none;
        max-width: 100%;
    }

    .top-bar {
        background-color: white;
        color: black;
        border-bottom: 1px solid #ccc;
    }

    .page-footer {
        background-color: white;
        color: black;
        border-top: 2px solid black;
    }

    .footer-section a {
        color: black;
    }

    .callout {
        border: 1px solid #ccc;
    }

    .training-banner {
        background: white;
        color: black;
        border: 2px solid #2f855a;
    }

    .page-header {
        background: white;
    }
    
    .presentation-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
