/* ===================================================================
   Abel Tasman Technical Findings - Custom Stylesheet
   Fonts: Untitled Sans (headings) + Suisse Int'l (body)
   =================================================================== */

/* Font Face Declarations
   ================================================================= */

/* Untitled Sans - Light */
@font-face {
    font-family: 'Untitled Sans';
    src: url('fonts/test-untitled-sans-light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Untitled Sans';
    src: url('fonts/test-untitled-sans-light-italic.woff2') format('woff2');
    font-weight: 300;
    font-style: italic;
    font-display: swap;
}

/* Untitled Sans - Regular */
@font-face {
    font-family: 'Untitled Sans';
    src: url('fonts/test-untitled-sans-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Untitled Sans';
    src: url('fonts/test-untitled-sans-regular-italic.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

/* Untitled Sans - Medium */
@font-face {
    font-family: 'Untitled Sans';
    src: url('fonts/test-untitled-sans-medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Untitled Sans';
    src: url('fonts/test-untitled-sans-medium-italic.woff2') format('woff2');
    font-weight: 500;
    font-style: italic;
    font-display: swap;
}

/* Untitled Sans - Bold */
@font-face {
    font-family: 'Untitled Sans';
    src: url('fonts/test-untitled-sans-bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Untitled Sans';
    src: url('fonts/test-untitled-sans-bold-italic.woff2') format('woff2');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

/* Untitled Sans - Black */
@font-face {
    font-family: 'Untitled Sans';
    src: url('fonts/test-untitled-sans-black.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Untitled Sans';
    src: url('fonts/test-untitled-sans-black-italic.woff2') format('woff2');
    font-weight: 800;
    font-style: italic;
    font-display: swap;
}

/* Suisse Int'l - Regular */
@font-face {
    font-family: 'Suisse Intl';
    src: url('fonts/SuisseIntl-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Suisse Intl';
    src: url('fonts/SuisseIntl-RegularItalic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

/* Suisse Int'l - SemiBold (600) */
@font-face {
    font-family: 'Suisse Intl';
    src: url('fonts/SuisseIntl-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* SF Mono - Regular */
@font-face {
    font-family: 'SF Mono';
    src: url('fonts/SF-Mono-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Base Styles
   ================================================================= */

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    color: #000;
    font-family: 'Suisse Intl', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    font-style: normal;
    font-weight: 400;
    line-height: 1.7;
    letter-spacing: 0;
    background-color: #ffffff;
    padding: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

/* Typography - Headings
   ================================================================= */

h1 {
    color: #000;
    font-family: 'Suisse Intl', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 4rem;
    font-style: normal;
    font-weight: 700;
    line-height: 3.8rem;
    letter-spacing: -0.11025rem;
    margin-top: 6.5rem;
    margin-bottom: 2rem;
}

h1:first-child {
    margin-top: 0;
}

h2 {
    color: #000;
    font-family: 'Suisse Intl', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 2.4rem;
    font-style: normal;
    font-weight: 600;
    line-height: 2.5rem;
    letter-spacing: -0.68px;
    margin-top: 4rem;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.5rem;
    text-transform: uppercase;
}

/* Section backgrounds - alternating subtle colors */
section {
    padding: 2rem;
    margin-left: -2rem;
    margin-right: -2rem;
    margin-bottom: 1rem;
    border-radius: 8px;
}

section:nth-of-type(odd) {
    background-color: #6ebd9529;
}

section:nth-of-type(even) {
    background-color: #edf3f9;
}

section h2 {
    margin-top: 0;
}

h3 {
    color: #000;
    font-family: 'Suisse Intl', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.75rem;
    font-style: normal;
    font-weight: 700;
    line-height: 2rem;
    letter-spacing: -0.02rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
}

h4 {
    color: #000;
    font-family: 'Untitled Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.25rem;
    font-style: normal;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -0.0125rem;
    margin-top: 1.75rem;
    margin-bottom: 0.875rem;
}

h5 {
    color: #000;
    font-family: 'Untitled Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.125rem;
    font-style: normal;
    font-weight: 700;
    line-height: 1.4;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

h6 {
    color: #333;
    font-family: 'Untitled Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1rem;
    font-style: normal;
    font-weight: 700;
    line-height: 1.4;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
}

/* Typography - Body Text
   ================================================================= */

p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

strong, b {
    font-weight: 700;
}

em, i {
    font-style: italic;
}

/* Links
   ================================================================= */

a {
    color: #0066cc;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

a:hover {
    border-bottom-color: #0066cc;
}

a:active {
    color: #004499;
}

/* Code Blocks
   ================================================================= */

code,
code[class*="language-"] {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
    font-size: 0.96rem;
    background-color: #e6e6e687;
    padding: 6px 6px;
    border-radius: 6px;
    color: #5564c9;
    letter-spacing: 0;
}

pre {
    background-color: #f6f8fa;
    border: 1px solid #e9ecef;
    border-left: 4px solid #0066cc;
    border-radius: 4px;
    padding: 1.25rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    line-height: 1.5;
    position: relative;
}

pre.structure-diagram {
    background-color: #f6f8fa;
    border: none;
    border-left: 4px solid #d0d7de;
    color: #24292e;
}

pre.structure-diagram code {
    color: #24292e;
    background-color: transparent;
}

pre code {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    color: #24292e;
    font-size: 0.9375rem;
    letter-spacing: 0;
    text-shadow: none;
}

/* Blockquotes
   ================================================================= */

blockquote {
    border-left: 4px solid #0066cc;
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: #333;
    font-style: italic;
}

blockquote p {
    margin-bottom: 0.5rem;
}

blockquote p:last-child {
    margin-bottom: 0;
}

/* Lists
   ================================================================= */

ul, ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

ul {
    list-style-type: none;
}

ul li::before {
    content: "‣ ";
    margin-right: 0.5rem;
}

ol {
    list-style-type: decimal;
}

li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

li > ul,
li > ol {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Nested lists */
ul ul {
    list-style-type: circle;
}

ul ul ul {
    list-style-type: square;
}

/* Tables
   ================================================================= */

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

thead {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

th {
    font-family: 'Untitled Sans', sans-serif;
    font-weight: 700;
    text-align: left;
    padding: 0.875rem 1rem;
    border-bottom: 2px solid #dee2e6;
}

td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e9ecef;
}

tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background-color: #f8f9fa;
}

/* Horizontal Rules
   ================================================================= */

hr {
    border: none;
    border-top: 2px solid #e9ecef;
    margin: 2.5rem 0 5rem 0;
}

/* Special Sections
   ================================================================= */

.alert,
.note,
.warning,
.info {
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 4px;
    border-left: 4px solid;
}

.alert {
    background-color: #fff3cd;
    border-left-color: #ffc107;
    color: #856404;
}

.warning {
    background-color: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

.info {
    background-color: #d1ecf1;
    border-left-color: #17a2b8;
    color: #0c5460;
}

.note {
    background-color: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

.callout {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1rem;
    margin: 1.5rem 0;
}

.callout-critical {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
    padding: 1rem;
    margin: 1.5rem 0;
}

.evidence-section {
    background-color: #eaf4ff;
    border-left: 4px solid #82b1e0;
    padding: 1.25rem;
    margin: 1.5rem 0;
    border-radius: 4px;
}

.evidence-section strong:first-child {
    color: #0066cc;
    font-size: 1.05rem;
}

.proposed-solution {
    background-color: #ffffffb8;
    border-left: 4px solid #b7a8a8;
    padding: 1.25rem;
    margin: 1.5rem 0;
    border-radius: 4px;
}

.proposed-solution strong:first-child {
    color: #28a745;
    font-size: 1.05rem;
}

.highlight-stat {
    font-weight: 700;
    color: #000;
}

.layer-a {
    color: #b27f2b;
    font-weight: 600;
}

.layer-b {
    color: #015A87;
    font-weight: 600;
}

.layer-c {
    color: #FF4338;
    font-weight: 600;
}

.root-causes {
    background-color: #fff3cd;
    border: 2px solid #ffc107;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 6px;
}

.root-causes h3,
.root-causes h4,
.root-causes p:first-of-type {
    margin-top: 0;
}

.main-content {
    background: transparent;
    border: none;
    border-radius: 8px;
    padding: 3rem;
    box-shadow: none;
}

/* File References / Code References
   ================================================================= */

.file-ref,
.code-ref {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.875rem;
    color: #6c757d;
    background-color: #f8f9fa;
    padding: 0.125rem 0.375rem;
    border-radius: 2px;
}

/* Metadata / Document Info
   ================================================================= */

.meta {
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.meta strong {
    color: #495057;
}

/* Responsive Design
   ================================================================= */

@media screen and (max-width: 768px) {
    body {
        padding: 1rem;
        font-size: 1rem;
    }

    .main-content {
        padding: 3svw;
    }

    h1 {
        font-size: 2rem;
        line-height: 1.2;
        letter-spacing: -0.02rem;
    }

    h2 {
        font-size: 1.625rem;
        line-height: 1.3;
    }

    h3 {
        font-size: 1.25rem;
        line-height: 1.4;
    }

    pre {
        padding: 1rem;
        font-size: 0.8125rem;
    }

    table {
        font-size: 0.875rem;
    }

    th, td {
        padding: 0.5rem 0.75rem;
    }
}

@media screen and (max-width: 480px) {
    body {
        padding: 0.75rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.375rem;
    }

    h3 {
        font-size: 1.125rem;
    }

    pre {
        padding: 0.75rem;
        margin: 1rem -0.75rem;
        border-radius: 0;
    }

    table {
        font-size: 0.8125rem;
        display: block;
        overflow-x: auto;
    }
}

/* Print Styles
   ================================================================= */

@media print {
    body {
        padding: 0;
        font-size: 11pt;
        line-height: 1.5;
    }

    h1 {
        font-size: 24pt;
        page-break-after: avoid;
    }

    h2 {
        font-size: 18pt;
        page-break-after: avoid;
    }

    h3 {
        font-size: 14pt;
        page-break-after: avoid;
    }

    pre {
        page-break-inside: avoid;
        border: 1px solid #000;
    }

    table {
        page-break-inside: avoid;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    .alert, .note, .warning, .info {
        border: 1px solid #000;
    }
}
