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

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background-color: #ffffff;
            color: #000;
            line-height: 1.6;
        }

        /* Mobile Menu Toggle - HAMBURGER */
        .mobile-menu-toggle {
            position: fixed;
            top: 20px;
            right: 40px;
            z-index: 99999;
            background: transparent;
            border: none;
            padding: 12px 20px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            font-family: inherit;
            font-size: 14px;
            font-weight: 400;
            letter-spacing: 0.5px;
            color: #1a1a1a;
            transition: all 0.3s ease;
        }

        .mobile-menu-toggle:hover {
            opacity: 0.7;
        }

        .mobile-menu-toggle.hidden {
            opacity: 0;
            pointer-events: none;
        }

        .mobile-menu-toggle span.menu-label {
            display: inline;
        }

        .mobile-menu-toggle svg {
            width: 24px;
            height: 24px;
        }
            transition: all 0.3s ease;
            transform-origin: center;
        }

        .mobile-menu-toggle.active {
            background: #000;
        }

        .mobile-menu-toggle.active span:nth-child(1) {
            transform: rotate(45deg) translate(5px, 5px);
        }

        .mobile-menu-toggle.active span:nth-child(2) {
            opacity: 0;
            transform: scaleX(0);
        }

        .mobile-menu-toggle.active span:nth-child(3) {
            transform: rotate(-45deg) translate(5px, -5px);
        }

        /* Sidebar - BLACK OVERLAY FULLSCREEN */
        .sidebar {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            width: 100%;
            height: 100vh;
            background: rgba(0, 0, 0, 0.95);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            overflow-y: auto;
            z-index: 100000;
            padding: 100px 60px 2rem;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s ease, visibility 0.3s ease;
        }

        .sidebar.open {
            opacity: 1;
            visibility: visible;
        }

        /* Mobile overlay */
        .sidebar-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.4);
            z-index: 999;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .sidebar-overlay.visible {
            opacity: 1;
        }

        .sidebar-header {
            display: none;
        }

        .nav-menu {
            list-style: none;
            padding: 0;
            display: flex;
            flex-direction: column;
            align-items: flex-end;
        }

        .nav-menu li {
            margin-bottom: 2px;
            text-align: right;
            width: 100%;
        }

        .nav-section {
            font-size: 1rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: rgba(255, 255, 255, 0.9);
            padding: 0.75rem 0 0.3rem;
            margin-top: 0.5rem;
            display: flex;
            flex-direction: row-reverse;
            justify-content: flex-start;
            align-items: center;
            cursor: pointer;
            gap: 10px;
        }

        .nav-section:hover {
            color: #fff;
        }

        .nav-link {
            display: inline-block;
            padding: 0.2rem 0;
            color: #ffffff;
            text-decoration: none;
            font-size: 16px;
            font-weight: 500;
            transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.3s ease;
        }

        .nav-link:hover {
            transform: translateX(-8px);
            opacity: 0.7;
        }

        .nav-link.active {
            opacity: 1;
        }

        .nav-number {
            font-size: 13px;
            font-weight: 600;
            margin-right: 0.5rem;
            opacity: 0.5;
        }

        .nav-link-intro {
            font-weight: 600;
        }

        /* Main Content - FULL WIDTH */
        .content {
            margin-right: 0;
            margin-left: 0;
            padding: 2.5rem 5rem;
            max-width: 100%;
            width: 100%;
        }

        /* Hero Header */
        .hero {
            margin-bottom: 3rem;
            padding-bottom: 2rem;
            border-bottom: 3px solid #000;
        }

        .hero h1 {
            font-size: 2.5rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: -0.03em;
            line-height: 1.1;
            margin-bottom: 0.75rem;
        }

        .hero .subtitle {
            font-size: 1.1rem;
            color: #000;
            font-weight: 400;
        }

        /* Preface Boxes */
        .preface-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1.25rem;
            margin: 2rem 0;
        }

        .preface-box {
            padding: 1.5rem;
            border: 1px solid #ddd;
            background: #fff;
            border-radius: 0;
        }

        .preface-box--dark {
            background: #1a1a1a;
            color: #fff;
            border-color: #1a1a1a;
        }

        .preface-box--warning {
            background: #fff;
            border-color: #ddd;
        }

        .preface-box h3, .preface-box h4 {
            font-size: 0.75rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            margin-bottom: 0.75rem;
        }

        .preface-box--dark h3 {
            color: #fff;
        }

        .preface-box--warning h3 {
            color: #000;
        }

        .preface-box p {
            font-size: 0.85rem;
            line-height: 1.55;
        }

        /* Identity Statement */
        .identity-statement {
            background: #000;
            color: #fff;
            padding: 1.25rem 1.5rem;
            margin: 2rem 0;
            font-size: 0.95rem;
            font-weight: 500;
            line-height: 1.6;
            border-left: 4px solid #fff;
        }

        /* Sections */
        .section {
            margin-bottom: 1rem;
            scroll-margin-top: 2rem;
        }

        /* Collapsible Section */
        .collapsible-section {
            border: 1px solid #ddd;
            margin-bottom: 0.5rem;
        }

        .collapsible-section summary {
            display: flex;
            align-items: center;
            gap: 1rem;
            padding: 1rem 1.25rem;
            cursor: pointer;
            background: #fff;
            list-style: none;
            transition: background 0.15s;
        }

        .collapsible-section summary::-webkit-details-marker {
            display: none;
        }

        .collapsible-section summary:hover {
            background: #f5f5f5;
        }

        .collapsible-section[open] summary {
            border-bottom: 1px solid #ddd;
            background: #000;
            color: #fff;
        }

        .collapsible-section[open] summary .section-number {
            background: #fff;
            color: #000;
        }

        .collapsible-section[open] summary .month-badge {
            background: #000;
            color: #fff;
            border-color: #fff;
        }

        .collapsible-section summary .expand-icon {
            margin-left: auto;
            font-size: 1.25rem;
            font-weight: 300;
            transition: transform 0.2s;
        }

        .collapsible-section[open] summary .expand-icon {
            transform: rotate(45deg);
        }

        .collapsible-section .section-content {
            padding: 1.5rem;
            background: #fafafa;
        }

        /* Appendix Styling */
        .appendix-content {
            padding: 1rem 1.5rem;
        }

        .appendix-item {
            margin-bottom: 2rem;
            padding-bottom: 2rem;
            border-bottom: 1px solid #ddd;
        }

        .appendix-item:last-child {
            margin-bottom: 0;
            padding-bottom: 0;
            border-bottom: none;
        }

        .appendix-item-title {
            font-size: 1.1rem;
            font-weight: 700;
            color: #1a1a1a;
            margin: 0 0 1rem;
            padding-bottom: 0.5rem;
            border-bottom: 2px solid #1a1a1a;
        }

        .section-header {
            display: flex;
            align-items: baseline;
            gap: 1rem;
            margin-bottom: 0;
            padding-bottom: 0;
            border-bottom: none;
        }

        .section-number {
            font-size: 1rem;
            font-weight: 900;
            background: #000;
            color: #fff;
            padding: 0.25rem 0.6rem;
        }

        .section-header h2 {
            font-size: 1.5rem;
            font-weight: 800;
        }

        .section-intro {
            font-size: 1.1rem;
            color: #000;
            margin-bottom: 1rem;
            font-weight: 600;
        }

        .phase-description {
            font-size: 1rem;
            color: #444;
            line-height: 1.75;
            margin-bottom: 2rem;
            max-width: 900px;
        }

        /* Phase Activities Collapsible */
        .phase-activities {
            margin-bottom: 2rem;
            border: 1px solid #e0e0e0;
            background: #fff;
        }

        .phase-activities-toggle {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem 1.5rem;
            cursor: pointer;
            background: #f8f8f8;
            font-size: 0.9rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: #333;
            list-style: none;
            transition: background 0.2s;
        }

        .phase-activities-toggle::-webkit-details-marker {
            display: none;
        }

        .phase-activities-toggle:hover {
            background: #f0f0f0;
        }

        .phase-activities[open] .phase-activities-toggle {
            background: #000;
            color: #fff;
            border-bottom: 1px solid #000;
        }

        .phase-activities-toggle .toggle-icon {
            font-size: 1.25rem;
            font-weight: 300;
            transition: transform 0.2s;
        }

        .phase-activities[open] .phase-activities-toggle .toggle-icon {
            transform: rotate(45deg);
        }

        .phase-activities-content {
            padding: 1.5rem;
        }

        /* Month Badge - HIDDEN */
        .month-badge {
            display: none !important;
        }

        /* Steps */
        .step {
            display: flex;
            gap: 1.25rem;
            margin-bottom: 2rem;
            padding: 1.5rem;
            background: #fff;
            border: 1px solid #ddd;
            border-left: 3px solid #000;
        }

        .step--economic {
            border-left-color: #000;
        }

        .step--risk {
            border-left-color: #000;
        }

        .step--telemetry {
            border-left-color: #000;
        }

        .step-number {
            flex-shrink: 0;
            width: 2.25rem;
            height: 2.25rem;
            background: #000;
            color: #fff;
            font-size: 0.8rem;
            font-weight: 800;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .step-number--economic {
            background: #000;
        }

        .step-number--risk {
            background: #000;
        }

        .step-number--telemetry {
            background: #000;
        }

        .step-content {
            flex: 1;
        }

        .step-content h3 {
            font-size: 1rem;
            font-weight: 700;
            margin-bottom: 0.4rem;
        }

        .step-content > p {
            font-size: 0.85rem;
            color: #000;
            margin-bottom: 0.6rem;
        }

        /* Badges */
        .badge {
            display: inline-block;
            font-size: 0.6rem;
            font-weight: 800;
            padding: 0.15rem 0.4rem;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            vertical-align: middle;
            margin-left: 0.4rem;
        }

        .badge--hjg {
            background: #000;
            color: #fff;
        }

        .badge--critical {
            background: #000;
            color: #fff;
        }

        .badge--economic {
            background: #000;
            color: #fff;
        }

        .badge--llm {
            background: #000;
            color: #fff;
        }

        /* Artifacts */
        .artifacts-list {
            margin-top: 0.75rem;
        }

        .artifact-item {
            display: flex;
            gap: 0.75rem;
            padding: 0.5rem 0;
            border-bottom: 1px solid #000;
        }

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

        .artifact-id {
            flex-shrink: 0;
            font-size: 0.65rem;
            font-weight: 700;
            background: #fff;
            border: 1px solid #000;
            padding: 0.15rem 0.4rem;
            font-family: 'SF Mono', Monaco, monospace;
        }

        .artifact-info h4 {
            font-size: 0.85rem;
            font-weight: 600;
            margin-bottom: 0.15rem;
        }

        .artifact-info p {
            font-size: 0.75rem;
            color: #000;
            margin: 0;
        }

        /* Risk Flag */
        .risk-flag {
            background: #fff;
            border-left: 4px solid #000;
            padding: 0.75rem 1rem;
            margin: 0.75rem 0;
        }

        .risk-flag h4 {
            font-size: 0.7rem;
            font-weight: 800;
            text-transform: uppercase;
            color: #000;
            margin-bottom: 0.35rem;
        }

        .risk-flag p {
            font-size: 0.8rem;
            color: #000;
            margin: 0;
        }

        /* Economic Flag */
        .economic-flag {
            background: #fff;
            border-left: 4px solid #000;
            padding: 0.75rem 1rem;
            margin: 0.75rem 0;
        }

        .economic-flag h4 {
            font-size: 0.7rem;
            font-weight: 800;
            text-transform: uppercase;
            color: #000;
            margin-bottom: 0.35rem;
        }

        .economic-flag p {
            font-size: 0.8rem;
            color: #000;
            margin: 0;
        }

        /* LLM Control Flag */
        .llm-control-flag {
            background: #fff;
            border-left: 4px solid #000;
            padding: 0.75rem 1rem;
            margin: 0.75rem 0;
        }

        .llm-control-flag h4 {
            font-size: 0.7rem;
            font-weight: 800;
            text-transform: uppercase;
            color: #000;
            margin-bottom: 0.35rem;
        }

        .llm-control-flag p {
            font-size: 0.8rem;
            color: #000;
            margin: 0;
        }

        /* Alert Boxes */
        .alert {
            padding: 1rem 1.25rem;
            margin: 1.25rem 0;
            border-left: 4px solid;
            font-size: 0.85rem;
        }

        .alert-info {
            background: #fff;
            border-color: #000;
        }

        .alert-warning {
            background: #fff;
            border-color: #000;
        }

        .alert-danger {
            background: #fff;
            border-color: #000;
        }

        .alert-success {
            background: #fff;
            border-color: #000;
        }

        .alert-purple {
            background: #fff;
            border-color: #000;
        }

        .alert strong {
            display: block;
            font-size: 0.75rem;
            font-weight: 700;
            margin-bottom: 0.2rem;
        }

        /* Checklist */
        .checklist {
            margin: 1.25rem 0;
        }

        .check-item {
            display: flex;
            gap: 1rem;
            padding: 1.25rem 1.5rem;
            background: #fff;
            margin-bottom: 0.75rem;
            border: 1px solid #ddd;
        }

        .check-item--danger {
            background: #fff;
        }

        .check-item--success {
            background: #fff;
        }

        .check-item--purple {
            background: #fff;
        }

        .check-icon {
            flex-shrink: 0;
            width: 1.5rem;
            height: 1.5rem;
            background: #000;
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.7rem;
            font-weight: 700;
        }

        .check-icon--danger {
            background: #000;
        }

        .check-icon--success {
            background: #000;
        }

        .check-icon--purple {
            background: #000;
        }

        /* Quarterly Grid */
        .quarterly-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 1.5rem;
            margin: 2rem 0;
        }

        .quarter-block {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }

        .quarter-header {
            font-size: 0.7rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: #000;
            padding-bottom: 0.5rem;
            border-bottom: 2px solid #000;
            margin-bottom: 0.25rem;
        }

        /* Roadmap Visual */
        .roadmap-visual {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 0.75rem;
            margin: 2rem 0;
        }

        .roadmap-item {
            padding: 0.75rem;
            background: #fff;
            border: 1px solid #ddd;
            text-decoration: none;
            color: inherit;
            transition: all 0.15s;
        }

        .roadmap-item:hover {
            background: #000;
            border-color: #000;
            color: #fff;
        }

        .roadmap-item .month {
            font-size: 0.6rem;
            font-weight: 700;
            text-transform: uppercase;
            color: #999;
            margin-bottom: 0.2rem;
        }

        .roadmap-item:hover .month {
            color: #fff;
        }

        .roadmap-item h4 {
            font-size: 0.75rem;
            font-weight: 600;
            line-height: 1.3;
        }

        /* Control Surface Grid */
        .control-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1rem;
            margin: 1.5rem 0;
        }

        .control-card {
            padding: 1.25rem;
            background: #fff;
            border: 1px solid #000;
        }

        .control-card h4 {
            font-size: 0.7rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: #000;
            margin-bottom: 0.5rem;
        }

        .control-card .metric {
            font-size: 1.5rem;
            font-weight: 900;
            margin-bottom: 0.25rem;
        }

        .control-card .label {
            font-size: 0.8rem;
            color: #000;
        }

        .control-card--alert {
            border-color: #000;
            background: #fff;
        }

        .control-card--alert h4 {
            color: #000;
        }

        /* Signal List */
        .signal-list {
            margin: 1.5rem 0;
        }

        .signal-item {
            display: flex;
            align-items: flex-start;
            gap: 1rem;
            padding: 1rem;
            border-bottom: 1px solid #000;
        }

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

        .signal-indicator {
            flex-shrink: 0;
            width: 0.75rem;
            height: 0.75rem;
            border-radius: 50%;
            margin-top: 0.3rem;
            background: #000;
        }

        .signal-indicator--green {
            background: #000;
        }

        .signal-indicator--yellow {
            background: #000;
        }

        .signal-indicator--red {
            background: #000;
        }

        .signal-content h4 {
            font-size: 0.9rem;
            font-weight: 600;
            margin-bottom: 0.2rem;
        }

        .signal-content p {
            font-size: 0.8rem;
            color: #000;
            margin: 0;
        }

        .signal-threshold {
            font-size: 0.7rem;
            font-weight: 700;
            color: #000;
            margin-top: 0.25rem;
        }

        /* Table */
        .data-table {
            width: 100%;
            border-collapse: collapse;
            margin: 2rem 0;
            font-size: 0.85rem;
            border: 1px solid #ddd;
        }

        .data-table th,
        .data-table td {
            padding: 1rem 1.25rem;
            text-align: left;
            border: 1px solid #ddd;
        }

        .data-table th {
            font-size: 0.7rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: #000;
            background: #f5f5f5;
        }

        .data-table td {
            color: #000;
        }

        .data-table tr:hover td {
            background: #fff;
        }

        /* Telemetry Table */
        .telemetry-table {
            width: 100%;
            border-collapse: collapse;
            margin: 1rem 0;
            font-size: 0.8rem;
        }

        .telemetry-table th,
        .telemetry-table td {
            padding: 0.6rem 0.75rem;
            text-align: left;
            border: 1px solid #000;
        }

        .telemetry-table th {
            font-size: 0.65rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: #fff;
            background: #000;
        }

        .telemetry-table td {
            color: #000;
            background: #fff;
        }

        .telemetry-table tr:nth-child(even) td {
            background: #fff;
        }

        /* LLM Control Table */
        .llm-control-table {
            width: 100%;
            border-collapse: collapse;
            margin: 1rem 0;
            font-size: 0.8rem;
        }

        .llm-control-table th,
        .llm-control-table td {
            padding: 0.6rem 0.75rem;
            text-align: left;
            border: 1px solid #000;
        }

        .llm-control-table th {
            font-size: 0.65rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: #fff;
            background: #000;
        }

        .llm-control-table td {
            color: #000;
            background: #fff;
        }

        .llm-control-table tr:nth-child(even) td {
            background: #fff;
        }

        /* Regulatory Table */
        .regulatory-table {
            width: 100%;
            border-collapse: collapse;
            margin: 1rem 0;
            font-size: 0.75rem;
        }

        .regulatory-table th,
        .regulatory-table td {
            padding: 0.5rem 0.6rem;
            text-align: left;
            border: 1px solid #000;
        }

        .regulatory-table th {
            font-size: 0.6rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: #fff;
            background: #000;
        }

        .regulatory-table td {
            color: #000;
            background: #fff;
        }

        .regulatory-table tr:nth-child(even) td {
            background: #fff;
        }

        /* References */
        .references {
            margin-top: 2rem;
            padding-top: 1.5rem;
            border-top: 1px solid #000;
        }

        .references h3 {
            font-size: 0.9rem;
            font-weight: 700;
            margin-bottom: 0.75rem;
        }

        .references ol {
            font-size: 0.75rem;
            color: #000;
            padding-left: 1.25rem;
            line-height: 1.7;
            columns: 2;
            column-gap: 2rem;
        }

        .std-ref {
            font-size: 0.6em;
            vertical-align: super;
            color: #000;
        }

        /* Footer */
        .footer {
            margin-top: 3rem;
            padding: 1.5rem 0;
            border-top: 1px solid #000;
            text-align: center;
            color: #000;
            font-size: 0.8rem;
        }

        /* Responsive - BLACK OVERLAY */
        @media (max-width: 900px) {
            .sidebar {
                padding: 80px 40px 2rem;
            }

            .mobile-menu-toggle {
                right: 20px;
            }

            .content {
                margin-right: 0;
                margin-left: 0;
                padding: 2rem 1.5rem 6rem;
            }

            .preface-grid {
                grid-template-columns: 1fr;
            }

            .quarterly-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            .roadmap-visual {
                grid-template-columns: repeat(2, 1fr);
            }

            .control-grid {
                grid-template-columns: 1fr;
            }

            .references ol {
                columns: 1;
            }
        }

        @media (max-width: 600px) {
            .step {
                flex-direction: column;
                gap: 0.75rem;
            }

            .quarterly-grid {
                grid-template-columns: 1fr;
            }

            .roadmap-visual {
                grid-template-columns: 1fr;
            }

            .hero h1 {
                font-size: 1.75rem;
            }
        }
    
        /* Senior-only sections (hidden by default; toggled via sidebar button) */
        .senior-only { display: none; }
        body.show-senior .senior-only { display: block; }
        .badge--senior { background: #fff; border: 1px solid #000; color: #000; }
        .senior-toggle {
            width: 100%;
            margin-top: 10px;
            padding: 10px 12px;
            border-radius: 0;
            border: 1px solid #000;
            background: #fff;
            color: inherit;
            cursor: pointer;
            font-weight: 600;
        }
        .senior-toggle:hover { background: #000; color: #fff; }
        .senior-note { margin-top: 8px; font-size: 12px; opacity: 0.8; line-height: 1.3; }


        .preface-box ul {
            margin-top: 0.75rem;
            padding-left: 1.1rem;
            font-size: 0.85rem;
            line-height: 1.55;
        }
        .preface-box li { margin: 0.25rem 0; }

/* --- Additions (v7.1) --- */
.grid-2{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:16px;
}
.card{
  border:1px solid #ddd;
  border-radius:0;
  padding:1.5rem;
  background: #fff;
}
.callout{
  margin-top:12px;
  padding:1rem 1.25rem;
  border-left:3px solid #000;
  background: #fff;
  border-radius:0;
}
@media (max-width: 880px){
  .grid-2{ grid-template-columns: 1fr; }
}

/* --- v7.2 Essentials --- */
.skip-link{
  position:absolute;
  left:-9999px;
  top:auto;
  width:1px;
  height:1px;
  overflow:hidden;
}
.skip-link:focus{
  left:16px;
  top:16px;
  width:auto;
  height:auto;
  padding:10px 12px;
  border-radius:0;
  background: #fff;
  border:1px solid #000;
  z-index:1000;
}

.sidebar-search{ padding: 10px 14px 14px 14px; }
#navSearch{
  width:100%;
  padding:10px 12px;
  border-radius:0;
  border:1px solid #000;
  background: #fff;
  color: inherit;
  outline: none;
}
#navSearch:focus{
  border-color: #000;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.1);
}

:focus-visible{
  outline: 3px solid #000;
  outline-offset: 3px;
  border-radius: 0;
}

.contract{
  margin-top: 18px;
  padding: 16px;
  border-radius: 0;
  border: 1px dashed #000;
  background: #fff;
}
.contract-intro{ margin-top: 6px; opacity: 0.88; }
.checklist{ list-style:none; padding-left:0; }
.checklist li{ display:flex; gap:12px; align-items:flex-start; padding:8px 0; padding-left:0 !important; }
.checklist li::before{ display:none !important; content:none !important; }
.checklist input[type="checkbox"]{ margin-top:3px; }

.section-link{
  float:right;
  font-size: 14px;
  opacity: 0.75;
  border: 1px solid #000;
  background: #fff;
  border-radius: 0;
  padding: 6px 10px;
  cursor: pointer;
}
.section-link:hover{ opacity: 1; }
.section-link:active{ transform: translateY(1px); }

@media print{
  .sidebar, .skip-link, .section-link{ display:none !important; }
  body{ background:#fff !important; color:#000 !important; }
  a{ color:#000 !important; text-decoration: underline; }
  .main-content{ margin:0 !important; padding:0 !important; }
  .section{ break-inside: avoid; }
}

/* ============================================
   PATCH STYLES - v7.4 Additions
   ============================================ */

/* --- Implementation Templates (Patch 01) --- */
.template-block {
  background: #fff;
  border: 1px solid #000;
  border-radius: 0;
  margin: 1.5rem 0;
  overflow: hidden;
}

.template-block--code {
  background: #000;
}

.template-block--document {
  background: #fff;
  border: 2px solid #000;
}

.template-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #fff;
  border-bottom: 1px solid #000;
}

.template-label {
  font-weight: 600;
  font-size: 0.9rem;
}

.copy-template-btn {
  background: #000;
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: background 0.2s;
}

.copy-template-btn:hover {
  background: #000;
}

.raci-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.raci-table th,
.raci-table td {
  padding: 0.5rem;
  border: 1px solid #000;
  text-align: center;
}

.raci-table th {
  background: #fff;
  font-weight: 600;
}

.raci-table td:first-child {
  text-align: left;
  font-weight: 500;
}

.raci-section-header td {
  background: #fff;
  font-weight: 600;
  text-align: left !important;
}

.template-legend {
  display: flex;
  gap: 1.5rem;
  padding: 0.75rem 1rem;
  background: #fff;
  font-size: 0.8rem;
  flex-wrap: wrap;
}

.code-block {
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #fff;
}

.code-inline {
  background: #000;
  color: #fff;
  padding: 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  overflow-x: auto;
  display: block;
  margin: 0.5rem 0;
}

.customization-flag {
  background: #fff;
  border: 1px solid #000;
  border-radius: 6px;
  padding: 1rem;
  margin-top: 1rem;
}

.customization-flag h4 {
  margin: 0 0 0.5rem 0;
  color: #000;
}

.customization-flag ul {
  margin: 0;
  padding-left: 1.25rem;
}

.checklist-template {
  padding: 1.5rem;
}

.checklist-section {
  margin-bottom: 1.5rem;
}

.checklist-section h5 {
  margin: 0 0 0.75rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #000;
}

.checklist-section label {
  display: block;
  padding: 0.4rem 0;
  cursor: pointer;
}

.checklist-section input[type="checkbox"],
.checklist-section input[type="radio"] {
  margin-right: 0.5rem;
}

.signature-block {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 2px solid #000;
}

/* --- Case Studies / Failure Autopsies (Patch 02) --- */
.case-study {
  background: #fff;
  border: 1px solid #000;
  border-radius: 0;
  margin: 2rem 0;
  overflow: hidden;
  box-shadow: none;
}

.case-study-header {
  background: #000;
  color: white;
  padding: 1.25rem 1.5rem;
}

.case-study-number {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.case-study-header h3 {
  margin: 0.5rem 0 0.25rem 0;
  font-size: 1.25rem;
}

.case-study-domain {
  font-size: 0.85rem;
  opacity: 0.9;
}

.case-study-body {
  padding: 1.5rem;
}

.case-study-section {
  margin-bottom: 1.5rem;
}

.case-study-section h4 {
  margin: 0 0 0.75rem 0;
  color: #000;
  font-size: 1rem;
}

.cause-chain {
  background: #fff;
  padding: 1rem;
  border-radius: 6px;
  border: 1px solid #000;
}

.cause-item {
  padding: 0.75rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.cause-item--primary { background: #fff; border-left: 4px solid #000; }
.cause-item--secondary { background: #fff; border-left: 4px solid #000; }
.cause-item--tertiary { background: #fff; border-left: 4px solid #000; }
.cause-item--root { background: #fff; border-left: 4px solid #000; }

.cause-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
  color: #000;
}

.cause-arrow {
  text-align: center;
  font-size: 1.25rem;
  color: #000;
  padding: 0.25rem 0;
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.impact-item {
  background: #fff;
  padding: 1rem;
  border-radius: 6px;
  text-align: center;
  border: 1px solid #000;
}

.impact-item--severe {
  background: #fff;
  border: 2px solid #000;
}

.impact-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: #000;
  margin-bottom: 0.25rem;
}

.impact-label {
  font-size: 0.8rem;
  color: #000;
}

.controls-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.controls-table th,
.controls-table td {
  padding: 0.75rem;
  border: 1px solid #000;
  text-align: left;
}

.controls-table th {
  background: #fff;
  font-weight: 600;
}

.case-study-lesson {
  background: #fff;
  border: 1px solid #000;
  border-radius: 6px;
  padding: 1rem;
  margin-top: 1rem;
}

.case-study-lesson h4 {
  margin: 0 0 0.5rem 0;
  color: #000;
}

.pattern-summary {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid #000;
}

.pattern-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.pattern-item {
  background: #fff;
  padding: 1.25rem;
  border-radius: 0;
  border-left: 4px solid #000;
}

.pattern-number {
  display: inline-block;
  background: #000;
  color: white;
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.pattern-item h4 {
  margin: 0.5rem 0;
}

.pattern-item p {
  margin: 0;
  font-size: 0.9rem;
  color: #000;
}

/* --- Model Cards & Datasheets (Patch 03) --- */
.model-card-template,
.datasheet-template {
  padding: 1.5rem;
}

.mc-section,
.ds-section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #000;
}

.mc-section:last-child,
.ds-section:last-child {
  border-bottom: none;
}

.mc-section h4,
.ds-section h4 {
  margin: 0 0 1rem 0;
  color: #000;
}

.mc-subsection {
  margin: 1rem 0;
}

.mc-subsection h5 {
  margin: 0 0 0.5rem 0;
  font-size: 0.95rem;
}

.mc-table,
.mc-table-small,
.mc-table-metrics,
.mc-table-fairness,
.mc-table-approvals {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0;
}

.mc-table td,
.mc-table-small td,
.mc-table-small th,
.mc-table-metrics td,
.mc-table-metrics th,
.mc-table-fairness td,
.mc-table-fairness th {
  padding: 0.5rem 0.75rem;
  border: 1px solid #000;
}

.mc-table td:first-child {
  width: 200px;
  background: #fff;
  font-weight: 500;
}

.mc-table-metrics th,
.mc-table-fairness th,
.mc-table-small th {
  background: #fff;
  font-weight: 600;
  text-align: left;
}

.mc-warning {
  background: #fff;
  padding: 0.75rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  border: 1px solid #000;
}

.mc-section--approval {
  background: #fff;
  padding: 1rem;
  border-radius: 6px;
  border: 1px solid #000;
}

.ds-qa {
  margin-bottom: 1rem;
}

.ds-q {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.ds-a {
  color: #000;
  padding-left: 1rem;
  border-left: 3px solid #000;
  margin-left: 0;
}

.references-block {
  background: #fff;
  padding: 1.25rem;
  border-radius: 6px;
  border: 1px solid #000;
}

.references-block ol {
  margin: 0.5rem 0 0 0;
  padding-left: 1.25rem;
}

.references-block li {
  margin-bottom: 0.75rem;
}

/* --- Agentic AI (Patch 04) --- */
.pattern-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.pattern-card {
  background: #fff;
  border: 1px solid #000;
  border-radius: 0;
  padding: 1.25rem;
}

.pattern-card h4 {
  margin: 0 0 0.75rem 0;
  color: #000;
}

.pattern-card--warning {
  border-color: #000;
  background: #fff;
  border-width: 2px;
}

.pattern-card--warning h4 {
  color: #000;
}

.pattern-diagram {
  background: #000;
  color: #fff;
  padding: 0.75rem;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  text-align: center;
}

.risk-matrix {
  overflow-x: auto;
}

.risk-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.risk-table th,
.risk-table td {
  padding: 0.75rem;
  border: 1px solid #000;
  text-align: left;
  vertical-align: top;
}

.risk-table th {
  background: #fff;
  font-weight: 600;
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.control-card {
  background: #fff;
  border: 1px solid #000;
  border-radius: 0;
  padding: 1.25rem;
}

.control-card--critical {
  border-color: #000;
  border-width: 2px;
}

.control-card--critical h4::before {
  content: "⚠ ";
}

.control-card h4 {
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
}

.control-impl {
  background: #fff;
  padding: 0.75rem;
  border-radius: 4px;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  border: 1px solid #000;
}

.control-impl ul {
  margin: 0.5rem 0 0 0;
  padding-left: 1.25rem;
}

.tool-spec-template {
  padding: 1rem;
}

.tool-spec-table {
  width: 100%;
  border-collapse: collapse;
}

.tool-spec-table td {
  padding: 0.5rem 0.75rem;
  border: 1px solid #000;
  vertical-align: top;
}

.tool-spec-table td:first-child {
  width: 180px;
  background: #fff;
  font-weight: 500;
}

.tool-classification {
  margin-top: 1.5rem;
}

.classification-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.classification-table th,
.classification-table td {
  padding: 0.75rem;
  border: 1px solid #000;
  text-align: left;
}

.classification-table th {
  background: #fff;
}

.risk-low td:first-child { background: #fff; }
.risk-medium td:first-child { background: #fff; }
.risk-high td:first-child { background: #fff; }
.risk-critical td:first-child { background: #fff; }

.eval-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.eval-category {
  background: #fff;
  padding: 1rem;
  border-radius: 6px;
  border: 1px solid #000;
}

.eval-category h4 {
  margin: 0 0 0.75rem 0;
  font-size: 0.95rem;
}

.eval-category ul {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.85rem;
}

.eval-scenarios {
  margin-top: 1.5rem;
}

.scenario-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.scenario-table th,
.scenario-table td {
  padding: 0.5rem 0.75rem;
  border: 1px solid #000;
  text-align: left;
}

.scenario-table th {
  background: #fff;
}

.monitoring-dashboard {
  background: #fff;
  padding: 1.25rem;
  border-radius: 0;
  border: 1px solid #000;
}

.monitoring-dashboard h4 {
  margin: 0 0 0.75rem 0;
}

.alert-list {
  margin: 0 0 1.5rem 0;
  padding-left: 1.25rem;
}

.alert-list--critical li {
  color: #000;
}

.alert-list--warning li {
  color: #000;
}

.dashboard-list {
  margin: 0;
  padding-left: 1.25rem;
}

/* --- Incident Response (Patch 05) --- */
.severity-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.severity-table th,
.severity-table td {
  padding: 0.75rem;
  border: 1px solid #000;
  vertical-align: top;
}

.severity-table th {
  background: #fff;
  font-weight: 600;
}

.severity-critical td:first-child { background: #fff; font-weight: 600; }
.severity-high td:first-child { background: #fff; font-weight: 600; }
.severity-medium td:first-child { background: #fff; font-weight: 600; }
.severity-low td:first-child { background: #fff; font-weight: 600; }

.workflow-diagram {
  max-width: 600px;
  margin: 1.5rem auto;
}

.workflow-phase {
  background: #fff;
  border: 1px solid #000;
  border-radius: 0;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.phase-header {
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: white;
  background: #000;
}

.phase-header--detect { background: #000; }
.phase-header--triage { background: #000; }
.phase-header--contain { background: #000; }
.phase-header--investigate { background: #000; }
.phase-header--remediate { background: #000; }
.phase-header--review { background: #000; }

.phase-content {
  padding: 1rem;
}

.phase-content ul {
  margin: 0;
  padding-left: 1.25rem;
}

.phase-output {
  background: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  border: 1px solid #000;
}

.phase-time {
  font-size: 0.8rem;
  color: #000;
  margin-top: 0.5rem;
}

.workflow-arrow {
  text-align: center;
  font-size: 1.5rem;
  color: #000;
  padding: 0.25rem 0;
}

.runbook {
  background: #fff;
  border: 1px solid #000;
  border-radius: 0;
  margin: 1.5rem 0;
  overflow: hidden;
}

.runbook-header {
  background: #fff;
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid #000;
}

.runbook-id {
  background: #000;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.runbook-header h4 {
  margin: 0;
  flex: 1;
}

.runbook-severity {
  font-size: 0.8rem;
  color: #000;
}

.runbook-body {
  padding: 1.25rem;
}

.runbook-section {
  margin-bottom: 1.25rem;
}

.runbook-section h5 {
  margin: 0 0 0.5rem 0;
  color: #000;
}

.runbook-section ol,
.runbook-section ul {
  margin: 0;
  padding-left: 1.25rem;
}

.postmortem-template {
  padding: 1.5rem;
}

.pm-section {
  margin-bottom: 1.5rem;
}

.pm-section h4 {
  margin: 0 0 0.75rem 0;
  color: #000;
  border-bottom: 2px solid #000;
  padding-bottom: 0.5rem;
}

.pm-subsection {
  margin: 1rem 0;
}

.pm-subsection h5 {
  margin: 0 0 0.5rem 0;
}

.pm-table {
  width: 100%;
  border-collapse: collapse;
}

.pm-table td {
  padding: 0.5rem 0.75rem;
  border: 1px solid #000;
}

.pm-table td:first-child {
  width: 180px;
  background: #fff;
  font-weight: 500;
}

.timeline-table,
.action-items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.timeline-table th,
.timeline-table td,
.action-items-table th,
.action-items-table td {
  padding: 0.5rem 0.75rem;
  border: 1px solid #000;
  text-align: left;
}

.timeline-table th,
.action-items-table th {
  background: #fff;
  font-weight: 600;
}

.pm-note {
  font-size: 0.85rem;
  color: #000;
  margin-top: 0.5rem;
}

.pm-section--approval {
  background: #fff;
  padding: 1rem;
  border-radius: 6px;
  border: 1px solid #000;
}

.roles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.role-card {
  background: #fff;
  border: 1px solid #000;
  border-radius: 0;
  padding: 1.25rem;
}

.role-card h4 {
  margin: 0 0 0.5rem 0;
  color: #000;
}

.role-card ul {
  margin: 0.75rem 0;
  padding-left: 1.25rem;
  font-size: 0.9rem;
}

/* --- Glossary (Patch 06) --- */
.glossary-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding: 1rem;
  background: #fff;
  border-radius: 0;
  border: 1px solid #000;
}

.glossary-nav a {
  display: inline-block;
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  background: #fff;
  border: 1px solid #000;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
}

.glossary-nav a:hover {
  background: #000;
  color: white;
  border-color: #000;
}

.glossary-section {
  margin-bottom: 2rem;
}

.glossary-section h3 {
  margin: 0 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #000;
  color: #000;
}

.glossary-term {
  margin-bottom: 1rem;
  padding-left: 1rem;
  border-left: 3px solid #000;
}

.glossary-term dt {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.glossary-term dd {
  margin: 0;
  color: #000;
  font-size: 0.95rem;
}

.glossary-term dd em {
  color: #000;
  font-style: normal;
  font-size: 0.85rem;
}

.standards-quickref {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid #000;
}

.standards-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.standards-table th,
.standards-table td {
  padding: 0.75rem;
  border: 1px solid #000;
  text-align: left;
}

.standards-table th {
  background: #fff;
  font-weight: 600;
}

.standards-table td:first-child {
  font-weight: 500;
  white-space: nowrap;
}

/* --- Alerts (shared) --- */
.alert-purple {
  background: #fff;
  border: 1px solid #000;
  color: #000;
}

/* Print styles for new sections */
@media print {
  .case-study,
  .runbook,
  .pattern-card,
  .control-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  
  .copy-template-btn {
    display: none;
  }
}

/* ============================================
   GLOBAL BULLET & BOX CONSISTENCY (v7.5)
   ============================================ */

/* Consistent box corners - all sharp */
.preface-box,
.card,
.callout,
.artifact-block,
.gate-block,
.template-block,
.check-item,
.signal-item,
.step {
    border-radius: 0 !important;
}

/* Better bullet styling */
ul {
    list-style: none;
    padding-left: 0;
}

ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.6rem;
    line-height: 1.6;
}

ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    font-weight: 900;
    font-size: 1.1em;
    color: #000;
}

/* Nested lists */
ul ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

ul ul li::before {
    content: "–";
    font-weight: 400;
}

/* Reset for nav menu */
.nav-menu,
.nav-menu ul {
    list-style: none;
}

.nav-menu li {
    padding-left: 0;
    margin-bottom: 0;
}

.nav-menu li::before {
    content: none;
    display: none;
}

/* Table cells shouldn't have bullet styling */
td ul li {
    padding-left: 1.25rem;
    margin-bottom: 0.4rem;
}

/* Preface box bullets */
.preface-box ul li {
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

/* Grid boxes - 2 column layout improvements */
.preface-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .preface-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   CHECKBOX STYLING FIX (v7.5.1)
   ============================================ */

/* Lists with checkboxes - remove bullet */
ul li:has(input[type="checkbox"]) {
    padding-left: 0;
}

ul li:has(input[type="checkbox"])::before {
    content: none;
    display: none;
}

/* Style the checkbox itself */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #000;
    background: #fff;
    margin-right: 0.75rem;
    cursor: pointer;
    vertical-align: middle;
    position: relative;
    flex-shrink: 0;
}

input[type="checkbox"]:checked {
    background: #000;
}

input[type="checkbox"]:checked::after {
    content: "✓";
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Checkbox list items layout */
li:has(input[type="checkbox"]) {
    display: flex;
    align-items: flex-start;
    padding-left: 0 !important;
}

li:has(input[type="checkbox"])::before {
    display: none !important;
}

/* Checklist with checkboxes - class-based fallback */
.checklist li {
    display: flex;
    align-items: flex-start;
    padding-left: 0 !important;
}

.checklist li::before {
    display: none !important;
    content: none !important;
}

.checklist input[type="checkbox"] {
    margin-top: 2px;
}


/* ============================================
   CHART REFERENCE BOXES (v7.6)
   Links to TSX source files for React migration
   ============================================ */

.chart-references {
    margin: 2rem 0;
    padding: 1.25rem;
    border: 1px solid #000;
    background: #fafafa;
}

.chart-references-header {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    color: #000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-references-header::before {
    content: "◈";
    font-size: 0.875rem;
}

.chart-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.chart-list li {
    padding: 0 !important;
    margin: 0 !important;
}

.chart-list li::before {
    display: none !important;
}

.chart-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    background: #fff;
    border: 1px solid #ccc;
    font-size: 0.75rem;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    color: #000;
    text-decoration: none;
    transition: all 0.15s ease;
}

.chart-link:hover {
    background: #000;
    color: #fff;
    border-color: #000;
}

.chart-link-category {
    font-size: 0.65rem;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Chart gallery section */
.chart-gallery {
    margin: 3rem 0;
    padding: 2rem;
    border: 2px solid #000;
    background: #fff;
}

.chart-gallery h3 {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #ddd;
}

.chart-category {
    margin-bottom: 1.5rem;
}

.chart-category-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
    margin-bottom: 0.5rem;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   LIVE CHART CONTAINERS
   ═══════════════════════════════════════════════════════════════════════════════ */

.chart-container {
    background: #fff;
    border: 1px solid #ddd;
    margin: 1.5rem 0;
    min-height: 280px;
    position: relative;
    overflow: hidden;
}

.chart-container:empty::before {
    content: "Loading chart...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    font-size: 0.875rem;
    font-style: italic;
}

.chart-container > div {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Ensure charts are responsive */
.chart-container table {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

/* Print styles for charts */
@media print {
    .chart-container {
        page-break-inside: avoid;
        border: 1px solid #000;
    }
}


/* ═══════════════════════════════════════════════════════════
   HOME PAGE STYLES
═══════════════════════════════════════════════════════════ */

.home-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 4rem 3.5rem;
    background: #fff;
}

.home-hero {
    text-align: left;
    margin-bottom: 4rem;
    max-width: 900px;
    width: 100%;
}

.home-title {
    font-size: 3.5rem;
    font-weight: 300;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: #000;
    margin-bottom: 1rem;
}

.home-version {
    font-size: 0.875rem;
    font-weight: 500;
    color: #999;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.home-tagline {
    font-size: 1rem;
    font-weight: 400;
    color: #555;
    line-height: 1.7;
    max-width: 700px;
    margin-top: 1.5rem;
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 900px;
    width: 100%;
    margin-bottom: 4rem;
}

.home-card {
    display: block;
    padding: 2rem;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.home-card:hover {
    border-color: #000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.home-card-icon {
    font-size: 1.5rem;
    color: #999;
    margin-bottom: 1rem;
}

.home-card-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    background: #000;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
    letter-spacing: 0.05em;
}

.home-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #000;
    margin-bottom: 0.5rem;
}

.home-card p {
    font-size: 0.875rem;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.home-card p .month {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    color: #999;
    margin-right: 0.15rem;
}

.home-footer {
    text-align: left;
    max-width: 600px;
}

.home-principle {
    font-size: 1rem;
    font-style: italic;
    color: #666;
    line-height: 1.8;
}

/* ═══════════════════════════════════════════════════════════
   COLLAPSIBLE NAVIGATION - BLACK OVERLAY
═══════════════════════════════════════════════════════════ */

.nav-collapsible {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    user-select: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 0.4rem 0;
    width: 100%;
}

.nav-collapsible:hover {
    color: rgba(255, 255, 255, 1);
}

.nav-toggle {
    font-size: 0.75rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.5);
    transition: transform 0.2s ease;
}

.nav-collapsible.expanded .nav-toggle {
    transform: rotate(45deg);
}

.nav-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding-right: 0.75rem;
}

.nav-submenu.open {
    max-height: 500px;
    padding: 0.25rem 0.75rem 0.5rem 0;
}

.nav-submenu li {
    padding: 0;
    width: 100%;
    text-align: right;
}

.nav-submenu .nav-link {
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
    padding: 0.15rem 0;
}

.nav-submenu .nav-link:hover {
    color: #ffffff;
    transform: translateX(-4px);
}

.nav-submenu .nav-number {
    font-size: 11px;
    opacity: 0.5;
}

/* Close button in overlay */
.close-btn {
    position: fixed;
    top: 20px;
    right: 40px;
    z-index: 100001;
    background: transparent;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.5px;
    color: #ffffff;
    transition: opacity 0.3s ease;
}

.close-btn:hover {
    opacity: 0.7;
}

@media (max-width: 768px) {
    .close-btn {
        right: 20px;
    }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE HOME PAGE
═══════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
    .home-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .home-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 600px) {
    .home-grid {
        grid-template-columns: 1fr;
    }
    
    .home-title {
        font-size: 2rem;
    }
    
    .home-section {
        padding: 2rem 1rem;
    }
}

/* ═══════════════════════════════════════════════════════════
   MOBILE FIXES - NAV SPACING & MONTH BADGES
═══════════════════════════════════════════════════════════ */

/* Tighter nav spacing on mobile */
@media (max-width: 768px) {
    .nav-collapsible {
        padding: 0.2rem 0;
        gap: 4px;
    }
    
    .nav-section {
        padding: 0.4rem 0 0.2rem;
        font-size: 0.65rem;
    }
    
    .nav-submenu.open {
        padding: 0.15rem 0 0.3rem;
    }
    
    .nav-submenu .nav-link {
        font-size: 13px;
        padding: 0.1rem 0;
    }
    
    /* Hide month badges on mobile section headers */
    .month-badge {
        display: none !important;
    }
    
    /* Tighter section header spacing */
    .section-header h2 {
        font-size: 1.4rem;
    }
    
    .section-number {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

/* ═══════════════════════════════════════════════════════════
   NESTED NAVIGATION - 12 PHASES HIERARCHY
═══════════════════════════════════════════════════════════ */

/* Parent submenu container */
.nav-submenu-parent {
    padding-left: 0.75rem !important;
}

.nav-submenu-parent.open {
    max-height: 1200px;
}

/* Subsection headers (Q1, Q2, etc.) */
.nav-subsection {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.7);
    padding: 0.5rem 0 0.3rem;
    cursor: pointer;
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
}

.nav-subsection:hover {
    color: rgba(255, 255, 255, 1);
}

/* Nested submenu (phases within quarters) */
.nav-submenu-nested {
    list-style: none;
    padding: 0 0.75rem 0.5rem 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.nav-submenu-nested.open {
    max-height: 600px;
}

/* Phase item with description */
.nav-phase-item {
    margin-bottom: 0.75rem;
    width: 100%;
    text-align: right;
}

.nav-phase-item .nav-link {
    font-size: 14px;
    font-weight: 600;
    padding: 0.15rem 0;
    display: block;
}

.nav-phase-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    margin: 0.15rem 0 0 0;
    line-height: 1.4;
    padding-right: 1.5rem;
    padding-left: 0;
}

.nav-submenu-nested .nav-link {
    font-size: 14px;
    padding: 0.15rem 0;
}

.nav-submenu-nested .nav-link:hover {
    transform: translateX(-4px);
}

/* Submenu left-align */
.nav-submenu {
    align-items: flex-start !important;
    padding-left: 0.5rem;
}

.nav-submenu .nav-link {
    text-align: left;
}


/* ===========================================
   SIMPLIFIED NAVIGATION - 12 PHASES ONLY
   =========================================== */

/* Section title */
.nav-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.4);
    padding: 2rem 0 0.75rem 0;
    margin: 0;
    text-align: right;
}

/* Phase links */
.nav-phase {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 0.6rem 0 !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: rgba(255, 255, 255, 0.7) !important;
    transition: all 0.2s ease !important;
}

.nav-phase:hover {
    color: #fff !important;
    transform: translateX(-6px) !important;
}

/* Phase numbers */
.nav-num {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.35);
    font-variant-numeric: tabular-nums;
    min-width: 22px;
    text-align: right;
}

.nav-phase:hover .nav-num {
    color: rgba(255, 255, 255, 0.6);
}

/* Portfolio link styling */
.nav-link-intro {
    font-weight: 600 !important;
    font-size: 14px !important;
    color: rgba(255, 255, 255, 0.5) !important;
    padding: 0.5rem 0 !important;
}

.nav-link-intro:hover {
    color: #fff !important;
}
