/* =========================================
   1. COMPACT TOKEN SYSTEM & MATERIALS
   ========================================= */
:root {
    /* Color: 5 Named Hex Values defining the Field Notebook */
    --bg-paper: #fdfcf9;
    /* Main notebook page */
    --bg-paper-alt: #f4f0ec;
    /* Slightly darker, used for contrast panels */
    --ink-primary: #2a3135;
    /* Heavy charcoal ink for primary text */
    --ink-secondary: #666666;
    /* Faded ink for metadata and captions */
    --accent-red: #a83c32;
    /* The "Red Pen" for alerts and corrections */
    --moss-green: #2e7d32;
    /* Environmental status */
    --border-worn: #d3cfc5;
    /* Soft edge wear for containers */

    /* Type: 3 Deliberate Roles */
    --font-display: 'Lora', Georgia, serif;
    /* Characterful display face for narrative */
    --font-body: 'Courier Prime', monospace;
    /* Complementary body face for field data */
    --font-utility: system-ui, sans-serif;
    /* UI utility font for tight data constraints */

    /* Spacing & Shadow Structure */
    --space-sm: 0.75rem;
    --space-md: 1.5rem;
    --space-lg: 3rem;
    --shadow-quiet: 1px 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-lifted: 2px 6px 12px rgba(0, 0, 0, 0.08);
}

/* =========================================
   2. TYPOGRAPHY & INK FOUNDATIONS
   ========================================= */
body {
    font-family: var(--font-body);
    color: var(--ink-primary);
    background-color: var(--bg-paper);
    line-height: 1.6;
}

/* Heading hierarchy acting as structural information */
h1,
h2,
h3 {
    font-family: var(--font-display);
    color: var(--ink-primary);
    margin-top: var(--space-lg);
    margin-bottom: var(--space-md);
}

h2 {
    font-size: 1.75rem;
    border-bottom: 1px solid var(--ink-primary);
    padding-bottom: 0.25rem;
}

h3 {
    font-size: 1.25rem;
    margin-top: 2rem;
}

h4 {
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    color: var(--ink-secondary);
    text-transform: uppercase;
}

/* Simulate heavy ink pressure/bleed */
strong,
b {
    font-weight: 600;
    color: #111;
    text-shadow: 0.5px 0.5px 0px rgba(42, 49, 53, 0.2);
}

.ink-red {
    color: var(--accent-red);
    font-style: italic;
}

.highlight-marker {
    background: linear-gradient(104deg,
            rgba(224, 219, 137, 0) 0.9%,
            rgba(224, 219, 137, 1) 2.4%,
            rgba(224, 219, 137, 0.9) 98%,
            rgba(224, 219, 137, 0) 100%);
    padding: 0 0.2em;
    border-radius: 2px;
    color: #111;
}

/* Weather-Damaged / Smudged Ink */
.ink-smudged {
    color: transparent;
    text-shadow: 0 0 6px rgba(42, 49, 53, 0.8), 0 0 2px rgba(42, 49, 53, 0.5);
    user-select: none;
    cursor: help;
}

/* Signature Element: The Rubber Stamp */
.heading-stamp {
    font-family: var(--font-body);
    color: var(--accent-red);
    border: 3px double var(--accent-red);
    padding: 0.4rem 0.8rem;
    display: inline-block;
    transform: rotate(-2deg);
    border-radius: 2px;
    opacity: 0.85;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* Dymo Plastic Label */
.label-dymo {
    background-color: #1a1a1a;
    color: #f4f4f4;
    font-family: var(--font-utility);
    font-size: 0.85rem;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 1px;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.2);
    letter-spacing: 0.1em;
    display: inline-block;
    transform: rotate(0.5deg);
}

/* =========================================
   3. LISTS, QUOTES & TABLES
   ========================================= */
.field-quote {
    border-left: 3px solid var(--ink-primary);
    padding-left: var(--space-md);
    margin: 2rem 0 2rem 1rem;
    font-style: italic;
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: #333;
    position: relative;
}

.field-quote::before {
    content: '"';
    font-family: var(--font-body);
    font-size: 3rem;
    color: var(--border-worn);
    position: absolute;
    left: -0.5rem;
    top: -1rem;
}

.field-quote cite {
    display: block;
    margin-top: 1rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-style: normal;
    color: var(--accent-red);
}

.specimen-list {
    list-style: none;
    padding-left: 0;
}

.specimen-list li {
    position: relative;
    padding-left: 1.8rem;
    margin-bottom: 0.5rem;
}

.specimen-list li::before {
    content: '☐';
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--ink-primary);
    font-size: 1.2rem;
}

.specimen-list li.checked::before {
    content: '☑';
    color: var(--accent-red);
}

table.field-log {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-body);
    font-size: 0.9rem;
    margin: 2rem 0;
    background: rgba(255, 255, 255, 0.3);
}

table.field-log th {
    border-bottom: 2px solid var(--ink-primary);
    text-align: left;
    padding: var(--space-sm);
    color: var(--ink-primary);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

table.field-log td {
    border-bottom: 1px dashed var(--border-worn);
    padding: var(--space-sm);
    color: var(--ink-primary);
}

table.field-log tr:hover {
    background-color: rgba(224, 219, 137, 0.15);
}

/* =========================================
   4. CONTAINERS, CARDS & ARTIFACTS
   ========================================= */

/* Base container styling with restraint */
.field-card,
.metric-card,
.artifact-card {
    background: var(--bg-paper);
    border: 1px solid var(--border-worn);
    padding: var(--space-md);
    box-shadow: var(--shadow-quiet);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Deliberate Motion: Hover micro-interactions */
.field-card:hover,
.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lifted);
}

.split-field-card {
        display: flex;
        background: var(--bg-paper);
        border: 1px solid var(--border-worn);
        box-shadow: var(--shadow-quiet);
        font-family: var(--font-display);
        font-size: 0.9rem;
    }

.split-pane-left,
.split-pane-right {
    flex: 1;
    padding: var(--space-md);
}

.split-pane-left {
    border-right: 1px dashed var(--border-worn);
}

.split-pane-right {
    background: var(--bg-paper-alt);
}

/* The primary signature element - spending boldness here */
.coffee-ring {
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 5px solid rgba(111, 78, 55, 0.25);
    box-shadow: inset 0 0 12px rgba(111, 78, 55, 0.15);
    transform: scaleY(0.85) rotate(-15deg);
    pointer-events: none;
    z-index: 10;
    mask-image: radial-gradient(circle, transparent 35%, black 100%);
    -webkit-mask-image: radial-gradient(circle, transparent 35%, black 100%);
}

.polaroid-box {
    background: var(--bg-paper);
    padding: 1rem 1rem 3rem 1rem;
    box-shadow: var(--shadow-lifted);
    transform: rotate(-1deg);
    max-width: max-content;
    position: relative;
}

.tape-strip {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%) rotate(2deg);
    width: 80px;
    height: 24px;
    background-color: rgba(230, 225, 210, 0.85);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.kraft-box {
    background-color: #c2a78a;
    background-image: url('/path/to/your/kraft-paper.jpg');
    background-size: cover;
    border: 2px solid #8b7355;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.15), var(--shadow-lifted);
    padding: var(--space-md);
    color: #2c231c;
    position: relative;
    margin: 2rem 0;
}

.glassine-overlay {
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    padding: 1rem;
    margin-top: 1rem;
    box-shadow: var(--shadow-quiet);
}

/* Measuring Tape / Ruler <hr> */
hr.measuring-tape {
    border: none;
    height: 14px;
    background-color: #e2c044;
    background-image: repeating-linear-gradient(to right,
            #333 0, #333 1px,
            transparent 1px, transparent 10px,
            #333 10px, #333 11px,
            transparent 11px, transparent 50px);
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
    margin: var(--space-lg) 0;
    box-shadow: var(--shadow-quiet);
}

pre.telex-block {
    background-color: #f4f0d8;
    border-left: 12px solid #d4cca1;
    padding: 1rem 1.5rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    overflow-x: auto;
    box-shadow: var(--shadow-quiet);
    color: var(--ink-primary);
    margin: 2rem 0;
}

/* =========================================
   5. DATA LOGGING, FILTERS & METRICS
   ========================================= */
.metric-card {
    display: flex;
    flex-direction: column;
}

.metric-label {
        font-size: 0.75rem;
        text-transform: uppercase;
        color: var(--ink-secondary);
        letter-spacing: 0.05em;
        font-family: var(--font-body);
    }

.metric-value {
        font-family: var(--font-body);
        font-size: 2.2rem;
        font-weight: bold;
        color: var(--ink-primary);
        margin: 0.25rem 0;
    }

.metric-sub {
        font-size: 0.75rem;
        color: var(--ink-secondary);
        font-family: var(--font-body);
    }

.filter-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.filter-pill {
    background: var(--bg-paper);
    border: 1px solid var(--border-worn);
    padding: 6px 16px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--ink-secondary);
    cursor: pointer;
    border-radius: 16px;
    transition: all 0.2s ease;
}

.filter-pill:hover,
.filter-pill.active {
    background: var(--ink-primary);
    color: var(--bg-paper);
    border-color: var(--ink-primary);
}

/* =========================================
   6. FORMS & INTERACTIVITY
   ========================================= */
details.folder-tab {
    border: 1px solid var(--ink-primary);
    background: var(--bg-paper);
    margin: 1.5rem 0;
    box-shadow: 2px 2px 0 var(--ink-primary);
}

details.folder-tab summary {
    background: var(--ink-primary);
    color: var(--bg-paper);
    padding: var(--space-sm) 1rem;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 0.05em;
    list-style: none;
}

details.folder-tab summary::-webkit-details-marker {
    display: none;
}

details.folder-tab summary::before {
    content: '+ ';
    color: var(--accent-red);
}

details.folder-tab[open] summary::before {
    content: '- ';
}

details.folder-tab .tab-content {
    padding: var(--space-md);
}

.field-form {
    margin: 2rem 0;
}

.field-form label {
    font-weight: bold;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 0.5rem;
    color: var(--ink-primary);
}

.field-form input[type="text"],
.field-form textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px dotted var(--ink-primary);
    font-family: var(--font-body);
    color: var(--ink-primary);
    padding: 0.5rem 0;
    outline: none;
    resize: vertical;
    margin-bottom: 1.5rem;
    transition: border-color 0.2s;
}

.field-form input[type="text"]:focus,
.field-form textarea:focus {
    border-bottom: 2px solid var(--accent-red);
}

/* Flat Specificity: The Typewriter Key Button */
.btn-typewriter {
    -webkit-appearance: none;
    appearance: none;
    background-color: var(--bg-paper-alt);
    color: var(--ink-primary);
    font-family: var(--font-body);
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    padding: 0.6rem 1.2rem;
    margin: 0.5rem 0;
    border: 2px solid var(--border-worn);
    border-radius: 50% / 10%;
    box-shadow: 0 4px 0 var(--border-worn), 0 5px 5px rgba(0, 0, 0, 0.2), inset 0 2px 3px rgba(255, 255, 255, 0.8);
    cursor: pointer;
    position: relative;
    transition: all 0.1s ease;
}

.btn-typewriter:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 var(--border-worn), 0 1px 1px rgba(0, 0, 0, 0.2), inset 0 2px 3px rgba(255, 255, 255, 0.8);
}

/* =========================================
   7. SPECIALIZED GEOLOGICAL ARTIFACTS 
   ========================================= */
.wentworth-scale {
        display: flex;
        gap: 4px;
        background: var(--bg-paper);
        border: 1px solid var(--border-worn);
        padding: 1rem;
        box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.05);
    }

.grain-tier {
        background: var(--bg-paper-alt);
        border: 1px solid var(--border-worn);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 8px 4px;
        font-family: var(--font-body);
        font-size: 0.8rem;
        color: var(--ink-primary);
        text-align: center;
    }

.mohs-scale-bar {
        display: flex;
        flex-direction: column;
        gap: 4px;
        background: var(--bg-paper);
        border: 1px solid var(--border-worn);
        padding: 1rem;
        box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.05);
    }

.mohs-item {
        display: flex;
        align-items: center;
        padding: 6px 12px;
        background: var(--bg-paper-alt);
        border-left: 6px solid var(--ink-secondary);
        font-family: var(--font-body);
        font-size: 0.85rem;
    }

.mohs-item .num {
    font-weight: bold;
    width: 28px;
    color: var(--accent-red);
}

.stereonet-box {
        background: var(--bg-paper);
        border: 1px solid var(--border-worn);
        padding: var(--space-md);
        text-align: center;
        box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.05);
    }

.net-circle {
        width: 140px;
        height: 140px;
        border-radius: 50%;
        border: 2px solid var(--ink-primary);
        margin: 0 auto;
        position: relative;
        background: var(--bg-paper-alt);
        box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
    }

.net-grid-line {
    position: absolute;
    background: rgba(0, 0, 0, 0.15);
}

.net-grid-line.h {
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
}

.net-grid-line.v {
    top: 0;
    left: 50%;
    width: 1px;
    height: 100%;
}

.pole-marker {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--accent-red);
    border-radius: 50%;
    box-shadow: 0 0 3px var(--accent-red);
}

.net-label {
        display: block;
        font-family: var(--font-body);
        font-size: 0.75rem;
        font-weight: bold;
        margin-top: 1rem;
        color: var(--ink-primary);
    }

.fizz-test-card,
.crystal-system-card,
.radioactivity-badge,
.thin-section-optic,
.isopach-legend-box,
.sieve-chart-container {
    background: var(--bg-paper);
    border: 1px solid var(--border-worn);
    padding: var(--space-md);
    box-shadow: var(--shadow-quiet);
}

.fizz-header {
        font-family: var(--font-body);
        font-size: 0.8rem;
        font-weight: bold;
        border-bottom: 1px solid var(--border-worn);
        padding-bottom: 0.4rem;
        margin-bottom: 0.75rem;
        color: var(--ink-secondary);
    }

.fizz-status {
        font-family: var(--font-body);
        font-size: 0.85rem;
        font-weight: bold;
        margin: 0 0 0.5rem 0;
    }

.active-fizz {
    color: var(--moss-green);
}

.fizz-desc {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--ink-primary);
    margin: 0;
}

.crystal-system-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.crystal-wireframe {
    width: 60px;
    height: 70px;
    background: var(--bg-paper-alt);
    border: 1px solid var(--ink-secondary);
    position: relative;
    box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.05);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.crystal-info {
        display: flex;
        flex-direction: column;
        font-family: var(--font-body);
        font-size: 0.8rem;
    }

.crystal-info strong {
    font-size: 0.9rem;
    color: var(--ink-primary);
    margin-bottom: 4px;
}

.crystal-info span {
    color: var(--ink-secondary);
    font-size: 0.75rem;
}

.color-index-wrapper {
        background: var(--bg-paper);
        border: 1px solid var(--border-worn);
        padding: var(--space-md);
        box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.05);
    }

.ci-track {
    width: 100%;
    height: 16px;
    background: linear-gradient(to right, var(--bg-paper-alt), #333);
    border: 1px solid var(--ink-secondary);
    border-radius: 2px;
    position: relative;
    margin-bottom: 0.75rem;
}

.ci-fill {
    position: absolute;
    top: -3px;
    bottom: -3px;
    left: 35%;
    width: 4px;
    background: var(--accent-red);
    box-shadow: 0 0 4px var(--accent-red);
}

.ci-meta {
        display: flex;
        justify-content: space-between;
        font-family: var(--font-body);
        font-size: 0.75rem;
        color: var(--ink-secondary);
    }

.radioactivity-badge {
    display: flex;
    align-items: center;
    gap: 1rem;
    border-left: 4px solid #fbc02d;
}

.rad-icon {
    font-size: 1.8rem;
    color: #fbc02d;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
}

.rad-data {
        display: flex;
        flex-direction: column;
        font-family: var(--font-body);
    }

.cps-value {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--ink-primary);
}

.rad-status {
    font-size: 0.75rem;
    color: var(--ink-secondary);
    margin-top: 2px;
}

.thin-section-optic {
    text-align: center;
}

.optic-lens-view {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid var(--ink-primary);
    margin: 0 auto 0.75rem auto;
    background: radial-gradient(circle, #e040fb, #3f51b5, #000);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8), var(--shadow-quiet);
}

.optic-caption {
        font-family: var(--font-body);
        font-size: 0.8rem;
        color: var(--ink-primary);
    }

.legend-row {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 0.75rem;
    }

.symbol-line {
    width: 40px;
    height: 4px;
    background: #333;
}

.symbol-line.contour {
    background: var(--ink-secondary);
    border-bottom: 1px dashed #333;
    height: 2px;
}

.symbol-line.fault-normal {
    background: var(--accent-red);
    height: 3px;
}

.symbol-line.fault-thrust {
    background: var(--ink-primary);
    height: 3px;
    border-top: 2px dotted #fff;
}

.sieve-grid-bg {
    width: 100%;
    height: 120px;
    background-color: var(--bg-paper-alt);
    border: 1px solid var(--border-worn);
    background-image: linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    position: relative;
    overflow: hidden;
}

.sieve-curve-line {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    height: 80px;
    border-bottom: 3px solid var(--accent-red);
    border-left: 3px solid transparent;
    border-radius: 0 0 100% 20%;
}

.sieve-axis-labels {
        display: flex;
        justify-content: space-between;
        font-family: var(--font-body);
        font-size: 0.75rem;
        color: var(--ink-secondary);
        margin-top: 0.5rem;
    }


/* =========================================
   8. NICHE SKEUOMORPHIC ARTIFACTS
   ========================================= */

.specimen-tag {
    display: inline-flex;
    align-items: center;
    background-color: #dcb897;
    color: #3e2f24;
    font-family: "Courier Prime", monospace;
    font-size: 0.9rem;
    font-weight: bold;
    letter-spacing: -0.5px;
    padding: 0.2rem 0.6rem 0.2rem 1.5rem;
    margin: 0.25rem;
    border: 1px solid #a38d75;
    border-radius: 2px 8px 8px 2px;
    position: relative;
    box-shadow: var(--shadow-quiet);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.specimen-tag:nth-child(even) {
    transform: rotate(1deg);
}

.specimen-tag:hover {
    transform: rotate(0deg) scale(1.02);
    box-shadow: 3px 3px 2px rgba(0, 0, 0, 0.15), inset 0 0 15px rgba(139, 115, 85, 0.15);
}

.specimen-tag::before {
    content: '';
    position: absolute;
    left: 0.4rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0.45rem;
    height: 0.45rem;
    background-color: #f7f5ef;
    border: 1px solid #a38d75;
    border-radius: 50%;
}

.hazard-box {
    background-color: #fffaf0;
    border: 4px solid transparent;
    border-image: repeating-linear-gradient(-45deg, #e2c044, #e2c044 10px, var(--ink-primary) 10px, var(--ink-primary) 20px) 4;
    padding: var(--space-md);
    margin: 2.5rem 0;
    box-shadow: var(--shadow-lifted);
}

.hazard-box h3 {
    margin-top: 0;
    color: var(--accent-red);
    font-size: 1.1rem;
}

figure.slide-mount {
    background-color: #f0f0f0;
    padding: 1.5rem 1.5rem 3rem 1.5rem;
    border-radius: 4px;
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.9), var(--shadow-lifted);
    margin: 2rem auto;
    max-width: max-content;
    position: relative;
}

figure.slide-mount .slide-film {
    background-color: #111;
    padding: 4px;
    border-radius: 2px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
}

figure.slide-mount img,
figure.slide-mount svg {
    display: block;
    max-width: 100%;
    opacity: 0.95;
}

figure.slide-mount figcaption {
    position: absolute;
    bottom: 0.8rem;
    left: 1.5rem;
    font-size: 0.75rem;
    color: var(--ink-secondary);
    text-transform: uppercase;
}

.strat-column {
    width: 140px;
    border: 2px solid var(--ink-primary);
    display: flex;
    flex-direction: column;
    margin: 2.5rem 0;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.1);
    background-color: var(--bg-paper);
}

.strat-layer {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    border-bottom: 2px solid var(--ink-primary);
    color: var(--ink-primary);
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.8);
}

.strat-layer:last-child {
    border-bottom: none;
}

.layer-sandstone {
    background-image: radial-gradient(rgba(62, 50, 42, 0.4) 1px, transparent 1px);
    background-size: 6px 6px;
    background-color: #dfcd9f;
}

.layer-shale {
    background-image: repeating-linear-gradient(0deg, transparent, transparent 4px, rgba(0, 0, 0, 0.15) 4px, rgba(0, 0, 0, 0.15) 5px);
    background-color: #8c928e;
}

.layer-limestone {
    background-image: repeating-linear-gradient(90deg, transparent, transparent 15px, rgba(0, 0, 0, 0.2) 15px, rgba(0, 0, 0, 0.2) 16px), repeating-linear-gradient(0deg, transparent, transparent 10px, rgba(0, 0, 0, 0.2) 10px, rgba(0, 0, 0, 0.2) 11px);
    background-color: #c4cacd;
}

.thin-section {
    display: inline-flex;
    width: 320px;
    height: 90px;
    background: rgba(230, 245, 245, 0.3);
    border: 1px solid rgba(180, 200, 200, 0.6);
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.7), var(--shadow-quiet);
    margin: 2rem 0;
    position: relative;
}

.thin-section-label {
    width: 90px;
    background: var(--bg-paper);
    border-right: 1px solid rgba(180, 200, 200, 0.6);
    padding: 0.5rem;
    font-size: 0.65rem;
    color: var(--ink-primary);
    text-transform: uppercase;
    line-height: 1.3;
}

.thin-section-glass {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.4) 40%, rgba(255, 255, 255, 0) 100%);
}

.thin-section-glass img,
.thin-section-glass svg {
    max-height: 70px;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.6);
}

.munsell-card {
    display: inline-block;
    background: #fcfcfc;
    padding: 8px;
    border: 1px solid #dcdcdc;
    box-shadow: var(--shadow-quiet);
    margin: 1rem 1rem 1rem 0;
    text-align: center;
}

.munsell-swatch {
    width: 50px;
    height: 50px;
    margin-bottom: 6px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.munsell-code {
    font-size: 0.65rem;
    color: var(--ink-primary);
    font-weight: bold;
}

.core-box {
    background-color: #5c4033;
    border: 4px solid #3e2723;
    padding: 8px;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.8), var(--shadow-lifted);
    margin: 3rem 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.core-channel {
    background-color: #1a1a1a;
    box-shadow: inset 0 5px 10px rgba(0, 0, 0, 0.9);
    padding: 4px;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    min-height: 80px;
}

.photo-with-scale {
    position: relative;
    display: inline-block;
    padding-bottom: 20px;
    margin: 1.5rem 0;
}

.photo-with-scale img {
    display: block;
    max-width: 100%;
    border: 1px solid var(--ink-primary);
}

.photo-scale {
    position: absolute;
    bottom: 0;
    right: 0;
    height: 12px;
    width: 150px;
    background-color: var(--bg-paper);
    border: 1px solid var(--ink-primary);
    background-image: repeating-linear-gradient(to right, #111 0, #111 15px, var(--bg-paper) 15px, var(--bg-paper) 30px);
    box-shadow: var(--shadow-quiet);
}

.photo-scale::after {
    content: '15 CM';
    position: absolute;
    top: -16px;
    right: 2px;
    font-size: 0.65rem;
    font-weight: bold;
    color: var(--ink-primary);
}

.strike-dip-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--ink-primary);
    padding: 0.2rem 0.5rem;
    border-radius: 2px;
    font-size: 0.8rem;
    font-weight: bold;
    margin: 0.5rem;
    box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.1);
}

.sd-symbol {
    width: 16px;
    height: 16px;
    position: relative;
    border-bottom: 2px solid var(--accent-red);
}

.sd-symbol::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 8px;
    background-color: var(--accent-red);
    left: 50%;
    bottom: -8px;
    transform: translateX(-50%);
}

.tracing-paper {
    background-color: rgba(250, 250, 245, 0.65);
    backdrop-filter: blur(1px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: var(--space-md);
    position: relative;
    background-image: linear-gradient(rgba(100, 150, 200, 0.2) 1px, transparent 1px), linear-gradient(90deg, rgba(100, 150, 200, 0.2) 1px, transparent 1px);
    background-size: 10px 10px;
    box-shadow: var(--shadow-quiet), inset 0 0 20px rgba(255, 255, 255, 0.5);
    margin-top: -3rem;
    margin-left: 2rem;
    transform: rotate(0.5deg);
    z-index: 5;
}

.tracing-paper::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 10px;
    width: 40px;
    height: 15px;
    background-color: rgba(230, 225, 210, 0.85);
    transform: rotate(-5deg);
    opacity: 0.8;
    clip-path: polygon(4% 0, 96% 2%, 100% 98%, 0 95%);
}

/* =========================================
   9. GENERAL PURPOSE UI ELEMENTS
   ========================================= */

.notebook-breadcrumb {
    font-size: 0.85rem;
    color: var(--ink-primary);
    padding: 0.5rem 0;
    border-bottom: 1px dashed rgba(179, 194, 200, 0.8);
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.notebook-breadcrumb a {
    color: var(--accent-red);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.notebook-breadcrumb a:hover {
    border-bottom: 1px solid var(--accent-red);
}

.notebook-breadcrumb .separator {
    color: var(--ink-secondary);
    font-weight: bold;
}

.ink-progress-container {
    width: 100%;
    height: 18px;
    background-color: rgba(255, 255, 255, 0.4);
    border: 1px solid var(--ink-primary);
    border-radius: 9px;
    padding: 2px;
    box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.2);
    margin: 1rem 0;
    position: relative;
}

.ink-progress-fill {
    height: 100%;
    background-color: var(--accent-red);
    border-radius: 6px;
    box-shadow: 0 0 4px rgba(168, 60, 50, 0.6);
    transition: width 0.4s ease;
}

.badge-status {
    display: inline-block;
    padding: 2px 6px;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: bold;
    border-radius: 2px;
    margin: 0 4px;
    vertical-align: middle;
}

.badge-status.new {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.badge-status.update {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.sticky-note {
    background-color: #feff9c;
    color: var(--ink-primary);
    font-family: var(--font-display);
    font-size: 0.85rem;
    padding: 1rem;
    box-shadow: var(--shadow-lifted);
    position: relative;
    display: inline-block;
    transform: rotate(1deg);
    border-bottom-right-radius: 20px 4px;
}

.pinned-alert {
    background-color: var(--bg-paper);
    border: 1px solid var(--border-worn);
    padding: 1.2rem 1.5rem 1.2rem 2.5rem;
    margin: 1.5rem 0;
    position: relative;
    box-shadow: var(--shadow-quiet);
    font-family: var(--font-display);
}

.pinned-alert::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 12px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ff6b6b, #c0392b);
    box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.3), inset -1px -1px 2px rgba(0, 0, 0, 0.2);
}

.pinned-alert.success::before {
    background: radial-gradient(circle at 30% 30%, #5cb85c, #4cae4c);
}

.pinned-alert.info::before {
    background: radial-gradient(circle at 30% 30%, #5bc0de, #46b8da);
}

/* =========================================
   2b. HEADING VARIANTS
   ========================================= */

/* The Title Page: For primary report covers */
.heading-title-page {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-primary);
    border-bottom: 4px double var(--ink-primary);
    padding-bottom: var(--space-md);
    margin-bottom: var(--space-lg);
}

/* Section Divider: Flanked by topographic-style lines */
.heading-section-divider {
    display: flex;
    align-items: center;
    font-family: var(--font-utility);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--ink-secondary);
    margin: var(--space-lg) 0;
}

.heading-section-divider::before,
.heading-section-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-worn);
    margin: 0 var(--space-md);
}

/* Marginalia: For quick side-notes or timestamps */
.heading-marginalia {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--accent-red);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transform: rotate(-1deg);
    display: inline-block;
}

/* =========================================
   2c. TEXT VARIANTS & INK EFFECTS
   ========================================= */

/* Lead Paragraph: Sets the tone for a new field entry */
.text-lead {
    font-family: var(--font-display);
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--ink-primary);
    margin-bottom: var(--space-md);
}

.text-lead::first-letter {
    font-size: 3.5rem;
    font-weight: bold;
    float: left;
    line-height: 0.8;
    padding-right: 0.5rem;
    color: var(--ink-primary);
}

/* Field Sribble: Hasty notes, slightly lighter and italicized */
.text-field-notes {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.05rem;
    color: var(--ink-secondary);
    line-height: 1.5;
}

/* Coordinates/Telemetry: Strict, highly legible data points */
.text-coordinates {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.9rem;
    background-color: var(--bg-paper-alt);
    padding: 0.1rem 0.4rem;
    border: 1px dotted var(--ink-secondary);
    color: var(--ink-primary);
    letter-spacing: 0.05em;
}

/* Figure Caption: Small caps, tight grouping for diagrams */
.text-caption {
    font-family: var(--font-utility);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-secondary);
    margin-top: 0.5rem;
    display: block;
    text-align: center;
}

/* Redacted/Classified: For sensitive site locations */
.text-redacted {
    background-color: var(--ink-primary);
    color: var(--ink-primary);
    /* Hides the text by matching background */
    padding: 0 0.2rem;
    user-select: none;
    border-radius: 1px;
}

.text-redacted:hover {
    /* Optional: reveal on hover, or leave completely hidden */
    color: var(--bg-paper);
}

/* =========================================
   2D. 10 SPECIALIZED FIELD NOTEBOOK HEADINGS
   ========================================= */

/* 1. Field Camp Header: Boxed, heavy border with a strict surveyor feel */
.heading-field-camp {
    font-family: var(--font-utility);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    background-color: var(--bg-paper-alt);
    color: var(--ink-primary);
    border: 2px solid var(--ink-primary);
    padding: 0.75rem 1rem;
    margin: var(--space-lg) 0 var(--space-md) 0;
    box-shadow: 2px 2px 0 var(--ink-primary);
}

/* 2. Stratigraphic Section Header: Split dual-line rule system */
.heading-strat-section {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--ink-primary);
    border-top: 1px solid var(--ink-primary);
    border-bottom: 1px solid var(--ink-primary);
    padding: 0.4rem 0;
    margin: var(--space-lg) 0 var(--space-md) 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* 3. Specimen Tag Header: Styled like an attached physical paper card */
.heading-specimen-tag {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: bold;
    background-color: #dfcd9f;
    color: var(--ink-primary);
    padding: 0.5rem 1rem 0.5rem 2rem;
    border: 1px solid #c2b186;
    border-radius: 2px 6px 6px 2px;
    display: inline-block;
    box-shadow: var(--shadow-quiet);
    position: relative;
    margin: var(--space-md) 0;
}

.heading-specimen-tag::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background-color: var(--bg-paper);
    border: 1px solid #c2b186;
    border-radius: 50%;
}

/* 4. Topographic Map Title: Centered with technical coordinate framing */
.heading-topo-map {
    font-family: var(--font-utility);
    font-size: 1.2rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--ink-primary);
    margin: var(--space-lg) 0;
    position: relative;
}

.heading-topo-map::before,
.heading-topo-map::after {
    content: '+';
    color: var(--accent-red);
    font-weight: bold;
    margin: 0 1rem;
}

/* 5. Seismograph Trace Header: Underlined with a simulated reading baseline */
.heading-seismic {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--ink-primary);
    margin: var(--space-lg) 0 var(--space-md) 0;
    padding-bottom: 0.5rem;
    position: relative;
}

.heading-seismic::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: repeating-linear-gradient(90deg,
            var(--ink-primary) 0, var(--ink-primary) 4px,
            transparent 4px, transparent 8px,
            var(--accent-red) 8px, var(--accent-red) 12px,
            transparent 12px, transparent 16px);
}

/* 6. Teletype / Telex Header: Retro typewriter block print */
.heading-telex {
    font-family: var(--font-body);
    font-size: 1rem;
    background-color: #f4f0d8;
    color: var(--ink-primary);
    border-left: 6px solid var(--accent-red);
    padding: 0.5rem 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: var(--space-md) 0;
    box-shadow: var(--shadow-quiet);
}

/* 7. Weathered Ink Header: Distressed, water-damaged blur effect */
.heading-weathered {
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: rgba(42, 49, 53, 0.7);
    text-shadow: 0 0 8px rgba(42, 49, 53, 0.5), 2px 2px 0 rgba(211, 207, 197, 0.8);
    margin: var(--space-lg) 0 var(--space-md) 0;
    letter-spacing: -0.02em;
}

/* 8. Taxonomic Classification Header: Dual-tier scientific name layout */
.heading-taxonomic {
    display: flex;
    flex-direction: column;
    margin: var(--space-lg) 0 var(--space-md) 0;
}

.heading-taxonomic .taxon-rank {
    font-family: var(--font-utility);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-red);
}

.heading-taxonomic .taxon-name {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.5rem;
    color: var(--ink-primary);
}

/* 9. Administrative Stamp Header: Angled red ink government/agency mark */
.heading-admin-stamp {
    font-family: var(--font-utility);
    font-size: 0.9rem;
    color: var(--accent-red);
    border: 2px dashed var(--accent-red);
    padding: 0.4rem 0.8rem;
    display: inline-block;
    transform: rotate(-1.5deg);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.1em;
    background: rgba(168, 60, 50, 0.03);
    margin: var(--space-md) 0;
}

/* 10. Core Tray Header: Embedded dark-strip layout resembling core sample cases */
.heading-core-tray {
    font-family: var(--font-body);
    font-size: 1rem;
    background-color: #3e2723;
    color: #fdfcf9;
    padding: 0.6rem 1rem;
    border-left: 12px solid #5c4033;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: var(--space-lg) 0 var(--space-md) 0;
    box-shadow: var(--shadow-lifted);
}

.kraft-tag {
    background-color: #dcb897;
    color: #3e2f24;
    font-family: "Courier Prime", monospace;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem 0.2rem 1.4rem;
    margin: 0.25rem;
    border: 1px dashed #a38d75;
    border-radius: 2px 8px 8px 2px;
    position: relative;
    box-shadow: var(--shadow-quiet);
    transition: transform 0.2s ease;
}

.kraft-tag::before {
    content: '';
    position: absolute;
    left: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0.35rem;
    height: 0.35rem;
    background-color: #f7f5ef;
    border: 2px solid #b59b7f;
    border-radius: 50%;
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.25);
}

.kraft-tag:nth-child(even) {
    transform: rotate(1deg);
}

.kraft-tag:hover {
    transform: rotate(0deg) scale(1.03);
}

.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 0;
}
/* =========================================
   Mechanical Inputs & Controls
   ========================================= */

/* 1. The Field Slider (Range Input) */
.field-slider {
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
  margin: 1.5rem 0;
}

.field-slider:focus {
  outline: none;
}

/* The engraved track */
.field-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 8px;
  cursor: pointer;
  background: #d4cca1;
  border: 1px solid var(--leather-dark);
  border-radius: 4px;
  box-shadow: inset 1px 2px 4px rgba(0,0,0,0.3);
}

/* The brass/metal sliding knob */
.field-slider::-webkit-slider-thumb {
  border: 2px solid #5c4033;
  height: 24px;
  width: 16px;
  border-radius: 2px;
  background: #e2c044; /* Brass color */
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -9px; /* Centers the thumb on the track */
  box-shadow: 
    -2px 0 0 rgba(255,255,255,0.4) inset,
    2px 2px 5px rgba(0,0,0,0.4);
}

/* 2. Machinery Status Lights */
.status-panel {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  background-color: #2a3135;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  border: 2px solid #111;
  box-shadow: 
    inset 0 1px 1px rgba(255,255,255,0.2),
    2px 2px 4px rgba(0,0,0,0.2);
}

.status-panel span {
  font-family: 'Courier Prime', monospace;
  font-size: 0.75rem;
  color: #ccc;
  text-transform: uppercase;
}

.status-light {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #333; /* Off state */
  box-shadow: 
    inset 0 2px 4px rgba(0,0,0,0.6),
    0 1px 1px rgba(255,255,255,0.1);
  border: 1px solid #111;
}

/* Active states for the lights */
.status-light.active-green {
  background-color: #4cd137;
  box-shadow: 
    inset 0 2px 4px rgba(255,255,255,0.4),
    0 0 8px #4cd137,
    0 1px 1px rgba(255,255,255,0.1);
}

.status-light.active-red {
  background-color: #e84118;
  box-shadow: 
    inset 0 2px 4px rgba(255,255,255,0.4),
    0 0 8px #e84118,
    0 1px 1px rgba(255,255,255,0.1);
}

/* 3. The Heavy Toggle Switch */
.mech-toggle-container {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  font-family: 'Courier Prime', monospace;
  font-weight: bold;
  font-size: 0.85rem;
  color: var(--leather-dark);
}

.mech-toggle {
  position: relative;
  width: 50px;
  height: 24px;
}

.mech-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.mech-toggle label {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #8c928e;
  border: 2px solid var(--leather-dark);
  transition: .3s;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.4);
}

.mech-toggle label:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 20px;
  left: 2px;
  bottom: 2px;
  background-color: #fdfcf9;
  border: 1px solid var(--leather-dark);
  transition: .3s;
  box-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.mech-toggle input:checked + label {
  background-color: #b0a595;
}

.mech-toggle input:checked + label:before {
  transform: translateX(22px);
}

/* 4. Library Card Pagination */
.library-pagination {
        display: flex;
        justify-content: center;
        gap: 0;
        margin: 3rem 0;
        border: 1px solid var(--border-worn);
        width: fit-content;
        background: var(--bg-paper);
    }

.library-pagination a, 
.library-pagination span {
        padding: 0.75rem 1.25rem;
        font-family: var(--font-body);
        font-size: 0.9rem;
        color: var(--ink-primary);
        text-decoration: none;
        border-right: 1px solid var(--border-worn);
    }

.library-pagination a:last-child,
.library-pagination span:last-child {
  border-right: none;
}

.library-pagination a:hover {
        background-color: rgba(0, 0, 0, 0.03);
    }

.library-pagination .active {
        color: var(--accent-red);
        font-weight: bold;
        transform: rotate(-1deg);
    }

/* =========================================
   10. BASE HTML ELEMENTS
   Bare-tag defaults, so raw content (markdown,
   pasted-in copy) inherits the notebook identity
   without needing utility classes applied.
   ========================================= */

/* --- Text & Links --- */

p {
    margin: 0 0 1rem;
    max-width: 68ch;
}

a {
    color: var(--accent-red);
    text-decoration: underline;
    text-decoration-color: rgba(168, 60, 50, 0.4);
    text-underline-offset: 2px;
    transition: text-decoration-color 0.2s ease, color 0.2s ease;
}

a:hover {
    text-decoration-color: var(--accent-red);
}

a:focus-visible {
    outline: 2px dashed var(--accent-red);
    outline-offset: 2px;
}

small {
    font-size: 0.82em;
    color: var(--ink-secondary);
}

mark {
    background: linear-gradient(104deg,
            rgba(224, 219, 137, 0) 0.9%,
            rgba(224, 219, 137, 1) 2.4%,
            rgba(224, 219, 137, 0.9) 98%,
            rgba(224, 219, 137, 0) 100%);
    color: #111;
    padding: 0 0.2em;
    border-radius: 2px;
}

/* --- Lists --- */

ul,
ol {
    margin: 0 0 1.25rem;
    padding-left: 1.4rem;
    color: var(--ink-primary);
}

li {
    margin-bottom: 0.4rem;
    line-height: 1.5;
}

ul li::marker {
    color: var(--accent-red);
}

ol li::marker {
    color: var(--ink-secondary);
    font-family: var(--font-body);
}

li ul,
li ol {
    margin-top: 0.4rem;
}

/* --- Blockquote --- */

blockquote {
    border-left: 3px solid var(--ink-primary);
    padding-left: var(--space-md);
    margin: 1.5rem 0 1.5rem 1rem;
    font-style: italic;
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: #333;
}

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

blockquote cite {
    display: block;
    margin-top: 0.75rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-style: normal;
    color: var(--accent-red);
}

/* --- Code --- */

code {
    font-family: var(--font-body);
    background: var(--bg-paper-alt);
    border: 1px solid var(--border-worn);
    padding: 0.1em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
    color: var(--ink-primary);
}

pre {
    font-family: var(--font-body);
    background: var(--bg-paper-alt);
    border: 1px solid var(--border-worn);
    border-radius: 4px;
    padding: var(--space-sm) var(--space-md);
    margin: 1.5rem 0;
    overflow-x: auto;
    box-shadow: var(--shadow-quiet);
}

pre code {
    background: none;
    border: none;
    padding: 0;
}

/* --- Media --- */

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 3px;
}

figure {
    margin: 1.5rem 0;
}

figcaption {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--ink-secondary);
    text-align: center;
    margin-top: 0.5rem;
}

/* --- Rule --- */

hr {
    border: none;
    border-top: 1px dashed var(--border-worn);
    margin: 2rem 0;
}

/* --- Table (bare, unclassed) --- */

table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-body);
    font-size: 0.9rem;
    margin: 2rem 0;
}

th {
    border-bottom: 2px solid var(--ink-primary);
    text-align: left;
    padding: var(--space-sm);
    color: var(--ink-primary);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

td {
    border-bottom: 1px dashed var(--border-worn);
    padding: var(--space-sm);
    color: var(--ink-primary);
}

tr:hover td {
    background-color: rgba(224, 219, 137, 0.12);
}

/* --- Forms --- */

label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--ink-primary);
    margin-bottom: 0.4rem;
}

input,
textarea,
select {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--ink-primary);
    background: var(--bg-paper);
    border: 1px solid var(--border-worn);
    border-radius: 3px;
    padding: 0.5rem 0.7rem;
    outline: none;
    transition: border-color 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent-red);
}

textarea {
    resize: vertical;
    min-height: 6rem;
}

button {
    font-family: var(--font-utility);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bg-paper);
    background: var(--ink-primary);
    border: none;
    border-radius: 3px;
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    box-shadow: var(--shadow-quiet);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button:hover {
    box-shadow: var(--shadow-lifted);
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
    box-shadow: none;
}

::selection {
    background: rgba(168, 60, 50, 0.2);
    color: var(--ink-primary);
}

/* =========================================
   11. LAYOUT UTILITIES
   Small spacing/flex helpers used to arrange
   demo blocks and page sections.
   ========================================= */

.relative-container { position: relative; }

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mt-4 { margin-top: 4rem; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.mb-4 { margin-bottom: 4rem; }
.ml-4 { margin-left: 2rem; }
.text-center { text-align: center; }

.gap-3 { gap: 3rem; }
.gap-4 { gap: 4rem; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.min-w-250 { min-width: 250px; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }

.layout-flex-row {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.layout-flex-wrap {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
}

/* --- Archival Stamp --- */

.archival-stamp {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border: 3px solid var(--accent-red);
    border-radius: 50%;
    color: var(--accent-red);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.85rem;
    line-height: 1.1;
    text-align: center;
    transform: rotate(12deg);
    opacity: 0.7;
    box-shadow: inset 0 0 0 1px var(--accent-red);
    padding: 4px;
    user-select: none;
}

.archival-stamp span {
    font-size: 0.65rem;
    font-weight: 400;
    border-top: 1px solid var(--accent-red);
    margin-top: 4px;
    padding-top: 2px;
}

/* --- Split Pane --- */

.split-pane-left h4,
.split-pane-right h4 {
    font-family: var(--font-body);
    margin-top: 0;
    font-size: 0.95rem;
    color: var(--ink-primary);
    border-bottom: 1px solid var(--border-worn);
    padding-bottom: 0.5rem;
}

/* --- Polaroid --- */

.polaroid-placeholder {
    width: 220px;
    height: 180px;
    background-color: var(--ink-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: var(--font-body);
}

.polaroid-title {
    margin-top: 1rem;
    margin-bottom: 0;
    font-family: var(--font-body);
}

.polaroid-caption {
    font-size: 0.85rem;
    margin-top: 0.5rem;
    font-family: var(--font-body);
    color: var(--ink-secondary);
}

/* --- Loose-leaf Box (ring-binder holes) --- */

.loose-leaf-box {
    background-color: var(--bg-paper);
    padding: 1.5rem 1.5rem 1.5rem 3rem;
    position: relative;
    border: 1px solid var(--border-worn);
    border-left: 2px solid #e8a2a2;
    box-shadow: var(--shadow-quiet);
    background-image: linear-gradient(transparent 95%, #b4c7d0 100%);
    background-size: 100% 1.5rem;
}

.loose-leaf-box::before,
.loose-leaf-box::after {
    content: "";
    position: absolute;
    left: 10px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--bg-paper-alt);
    box-shadow: inset 1px 2px 4px rgba(0, 0, 0, 0.2);
}

.loose-leaf-box::before { top: 20px; }
.loose-leaf-box::after { bottom: 20px; }

/* --- Folded Map Corner --- */

.folded-map-corner {
    background: var(--bg-paper);
    padding: 1.5rem;
    position: relative;
    border: 1px solid var(--border-worn);
    box-shadow: var(--shadow-quiet);
}

.folded-map-corner::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    border-width: 0 30px 30px 0;
    border-style: solid;
    border-color: var(--bg-paper-alt) var(--bg-paper-alt) #e2decb #e2decb;
    box-shadow: -2px 2px 3px rgba(0, 0, 0, 0.1);
}

/* --- Misc component additions --- */

.grain-tier span { font-weight: bold; }

.grain-tier small {
    font-size: 0.65rem;
    color: var(--ink-secondary);
    margin-top: 2px;
}

.mohs-item .min-name {
    flex: 1;
    color: var(--ink-primary);
}

.isopach-legend-box {
    font-family: var(--font-body);
    font-size: 0.8rem;
}

.sieve-chart-container {
    margin-top: 1rem;
}