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

        body {
            /* Greek-optimized sans-serif stack */
            font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
            line-height: 1.6;
            background-color: #F7F7F5;
            color: #2D3748;
        }

        .navbar {
            /* Catalog-site depth: vertical wash + inset rim (AGS recipe) */
            background:
                linear-gradient(180deg,
                    #556170 0%,
                    #3d4852 38%,
                    #2c343c 100%);
            color: #E2E8F0;
            padding: 20px 0;
            border-bottom: 1px solid rgba(154, 133, 85, 0.55);
            box-shadow:
                0 8px 24px rgba(0, 0, 0, 0.28),
                inset 0 1px 0 rgba(255, 255, 255, 0.14),
                inset 0 -2px 0 rgba(0, 0, 0, 0.35);
            position: relative;
            z-index: 100;
        }

        .navbar-content {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
            display: flex;
            flex-direction: column;
            align-items: center;
            position: relative;
        }

        .nav-center {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }

        .home-link {
            color: #f7f4ec;
            text-decoration: none;
            font-weight: 300;
            font-size: 3.75em;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            transition: color 0.2s ease, text-shadow 0.2s ease;
            line-height: 1;
            /* Emboss: bright rim + short cast (subtitle sits flush below) */
            text-shadow:
                0 1px 0 rgba(255, 255, 255, 0.28),
                0 -1px 0 rgba(0, 0, 0, 0.55),
                0 2px 2px rgba(0, 0, 0, 0.4),
                0 4px 8px rgba(0, 0, 0, 0.32);
        }

        .logo-phi {
            font-family: 'Source Sans Pro', sans-serif;
            font-size: 1em;
            font-weight: 400;
            display: inline-block;
        }

        .home-link:hover {
            color: #fff;
            text-decoration: none;
            /* Soft lift only — no underline under the wordmark */
            text-shadow:
                0 1px 0 rgba(255, 255, 255, 0.32),
                0 -1px 0 rgba(0, 0, 0, 0.5),
                0 2px 3px rgba(0, 0, 0, 0.45),
                0 5px 10px rgba(0, 0, 0, 0.35);
        }

        .navbar-subtitle {
            color: #CBD5E0;
            font-size: 0.9em;
            margin-top: 0px;
            font-weight: 400;
            letter-spacing: 0.5px;
            text-align: center;
            line-height: 1.4;
            text-shadow:
                0 1px 0 rgba(255, 255, 255, 0.08),
                0 1px 3px rgba(0, 0, 0, 0.45);
        }

        /* Utility classes for responsive visibility */
        .desktop-only {
            display: block;
        }

        .mobile-only {
            display: none;
        }

        /* Hamburger menu button (hidden on desktop) */
        .hamburger-menu-toggle {
            display: none;
            flex-direction: column;
            justify-content: space-around;
            width: 44px;
            height: 44px;
            background: transparent;
            border: none;
            cursor: pointer;
            padding: 10px;
            z-index: 350;
            position: absolute;
            left: 20px;
            top: 50%;
        }

        .hamburger-line {
            width: 24px;
            height: 3px;
            background-color: #E2E8F0;
            border-radius: 2px;
            transition: all 0.3s ease;
            transform-origin: center;
        }

        .hamburger-menu-toggle:hover .hamburger-line {
            background-color: white;
        }

        /* Hamburger active state (X shape) */
        .hamburger-menu-toggle.active .hamburger-line:nth-child(1) {
            transform: translateY(8px) rotate(45deg);
        }

        .hamburger-menu-toggle.active .hamburger-line:nth-child(2) {
            opacity: 0;
        }

        .hamburger-menu-toggle.active .hamburger-line:nth-child(3) {
            transform: translateY(-8px) rotate(-45deg);
        }

        /* Mobile menu overlay */
        .hamburger-menu-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 250;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .hamburger-menu-overlay.visible {
            display: block;
            opacity: 1;
        }

        /* Mobile menu panel */
        .hamburger-menu-panel {
            position: fixed;
            top: 0;
            left: 0;
            width: 280px;
            height: 100vh;
            background: #3D4852;
            box-shadow: 2px 0 12px rgba(0, 0, 0, 0.3);
            z-index: 300;
            transform: translateX(-100%);
            transition: transform 0.3s ease;
            overflow-y: auto;
            padding: 20px;
        }

        .hamburger-menu-panel.open {
            transform: translateX(0);
        }

        /* Menu sections */
        .menu-section {
            margin-bottom: 30px;
        }

        .menu-section:last-child {
            margin-bottom: 0;
        }

        .menu-section-title {
            color: #E2E8F0;
            font-size: 0.75em;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .menu-link {
            display: block;
            color: #E2E8F0;
            text-decoration: none;
            padding: 12px 0;
            font-size: 1em;
            transition: color 0.3s;
        }

        .menu-link:hover {
            color: white;
        }

        .menu-download-buttons {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .menu-download-buttons .download-btn {
            width: 100%;
            justify-content: flex-start;
        }

        .downloads {
            position: absolute;
            right: 20px;
            top: 20px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            align-items: flex-end;
            max-width: 500px;
        }

        .nav-tabs {
            display: flex;
            gap: 0;
            align-items: center;
            margin-top: 8px;
        }

        .nav-tab {
            color: #CBD5E0;
            text-decoration: none;
            font-size: 1em;
            font-weight: 400;
            padding: 8px 18px;
            border-bottom: 2px solid transparent;
            transition: color 0.2s, border-color 0.2s;
            font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
        }

        .nav-tab:hover {
            color: white;
            border-bottom-color: #9A8555;
        }

        /* Legacy — kept for print stylesheet reference */
        .nav-links {
            display: none;
        }

        .download-label {
            display: none;
        }

        .download-buttons {
            display: flex;
            flex-direction: row;
            flex-wrap: nowrap;
            gap: 8px;
            align-items: center;
            justify-content: center;
        }

        .download-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
            padding: 10px 14px;
            background: #4A5568;
            color: #E2E8F0;
            text-decoration: none;
            border-radius: 6px;
            font-size: 0.85em;
            font-weight: 500;
            transition: all 0.3s;
            border: 1px solid rgba(255, 255, 255, 0.15);
            position: relative;
            text-align: center;
            flex-shrink: 0;
            box-sizing: border-box;
            white-space: nowrap;
        }

        .download-btn span:last-child {
            white-space: nowrap;
        }

        .download-btn:hover {
            background: #5A6A78;
            border-color: rgba(255, 255, 255, 0.4);
            transform: translateY(-1px);
        }

        .download-btn.coming-soon {
            cursor: not-allowed;
            opacity: 0.7;
        }

        .download-btn.coming-soon:hover::after {
            content: "Coming Soon";
            position: absolute;
            bottom: -25px;
            left: 50%;
            transform: translateX(-50%);
            background: #4A5568;
            color: #E2E8F0;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 0.75em;
            white-space: nowrap;
            border: 1px solid rgba(255, 255, 255, 0.15);
        }

        .download-icon {
            font-size: 1.1em;
        }

        .pdf-download-link {
            transition: border-bottom 0.2s ease, color 0.2s ease;
            border-bottom: 1px solid transparent;
        }

        .pdf-download-link:hover {
            color: #9A8555 !important;
            border-bottom: 1px solid currentColor;
        }

        .mobile-download-toggle {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
            padding: 10px 14px;
            background: #4A5568;
            color: #E2E8F0;
            border: 1px solid rgba(255, 255, 255, 0.15);
            border-radius: 6px;
            font-size: 0.85em;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s;
            width: 100%;
            box-sizing: border-box;
        }

        .mobile-download-toggle:hover {
            background: #5A6A78;
            border-color: rgba(255, 255, 255, 0.4);
        }

        .mobile-download-toggle.active {
            background: #5A6A78;
        }

        .mobile-download-text {
            display: inline;
        }

        .desktop-download-toggle {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
            padding: 10px 14px;
            background: #4A5568;
            color: #E2E8F0;
            border: 1px solid rgba(255, 255, 255, 0.15);
            border-radius: 6px;
            font-size: 0.85em;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s;
            white-space: nowrap;
        }

        .desktop-download-toggle:hover {
            background: #5A6A78;
            border-color: rgba(255, 255, 255, 0.4);
            transform: translateY(-1px);
        }

        .desktop-download-toggle.active {
            background: #5A6A78;
        }

        .downloads-content {
            display: none;
            position: fixed;
            left: 50%;
            transform: translateX(-50%);
            width: 1200px;
            background: #3D4852;
            border: 1px solid rgba(255, 255, 255, 0.15);
            border-radius: 6px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
            padding: 12px;
            z-index: 200;
            white-space: nowrap;
            box-sizing: border-box;
        }

        .downloads-content.show {
            display: block;
        }

        .breadcrumbs {
            max-width: 1200px;
            margin: 0 auto 8px auto;
            padding: 12px 20px 4px 20px;
            text-align: center;
            font-size: 0.9em;
            color: #2D3748;
        }

        .breadcrumbs a {
            color: #2D3748;
            text-decoration: none;
            transition: color 0.2s ease, opacity 0.2s ease;
        }

        .breadcrumbs a:hover {
            color: #9A8555;
            opacity: 1;
            text-decoration: underline;
        }

        .breadcrumb-separator {
            margin: 0 8px;
            color: #718096;
            opacity: 0.7;
        }

        .breadcrumb-current {
            color: #2D3748;
            font-weight: 500;
        }

        .container {
            max-width: 1200px;
            margin: 30px auto;
            padding: 0 20px;
            display: flex;
            justify-content: center;
        }

        .content-wrapper {
            background-color: #FFFFFF;
            padding: 40px;
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            min-width: 800px;
        }

        .work-header {
            margin-bottom: 16px;
            margin-top: -15px;
            position: relative;
        }

        .eul-wid-top-left {
            position: absolute;
            top: 0;
            left: 0;
            font-size: 0.75em;
            color: #718096;
            font-family: 'Courier New', monospace;
            font-weight: 400;
        }

        .eul-wid-top-left .eul-wid-value {
            color: #4A5568;
            font-weight: 400;
        }

        /* Zenodo concept-DOI badge — sits just below the eul_wid badge in the
           identity area. Restrained: small, top-left, clear of the centred
           title. The .work-header is position:relative so this anchors to it. */
        .doi-badge.doi-badge-identity {
            position: absolute;
            top: 18px;
            left: 0;
            line-height: 0;
        }

        .doi-badge.doi-badge-identity img {
            height: 20px;
            width: auto;
        }

        .author-name {
            color: #718096;
            font-size: 1.1em;
            font-weight: 400;
            margin-bottom: 8px;
            letter-spacing: 0.5px;
            font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
        }
        
        .author-name a {
            text-decoration: none;
            color: inherit;
            transition: opacity 0.2s;
        }
        
        .author-name a:hover {
            opacity: 0.7;
        }

        h1 {
            color: #2D3748;
            border-bottom: 3px solid #9A8555;
            padding-bottom: 15px;
            margin-top: 5px;
            font-size: 2em;
            font-weight: 400;
            font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
        }

        .work-metadata {
            text-align: center;
            margin-top: 16px;
            margin-bottom: 16px;
            font-size: 0.9em;
            color: #718096;
            line-height: 1.4;
        }

        .work-metadata .metadata-line {
            margin: 0;
        }

        .work-metadata .metadata-label {
            font-weight: 600;
            color: #4A5568;
            margin-right: 4px;
        }

        .work-metadata .metadata-greek {
            font-weight: 400;
            color: #2D3748;
        }

        .work-metadata .metadata-english {
            color: #718096;
            font-style: italic;
        }

        .work-metadata .metadata-link {
            color: #9A8555;
            text-decoration: none;
            font-weight: 500;
        }

        .work-metadata .metadata-link:hover {
            color: #7A6A45;
            text-decoration: underline;
        }

        table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 20px;
        }

        /* Remove table header ("Ref", "Text") entirely */
        thead {
            display: none !important;
        }

        th, td {
            border: none;
            padding: 3px 12px;
            text-align: left;
        }

        th {
            background-color: #4A5568;
            color: #E2E8F0;
            font-weight: 600;
            font-size: 0.95em;
            font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
        }

        td:first-child {
            font-weight: 400;
            font-size: 0.85em;
            width: 60px;
            text-align: center;
            color: #2D3748;
            font-family: 'Courier New', monospace;
            vertical-align: top;
            opacity: 0;
            transition: opacity 0.2s ease-in-out;
        }

        /* Show ref on row hover (desktop) */
        tr:hover td:first-child {
            opacity: 1;
        }

        .speaker-label {
            font-weight: 600;
            color: #4A5568;
            margin-right: 0.5em;
        }

        /* Print-edition page/line marginalia (e.g. "[15]"): a small, muted
           citation marker set after the passage text. */
        .marginalia {
            font-size: 0.7em;
            color: #A0AEC0;
            font-family: 'Courier New', monospace;
            vertical-align: super;
            margin-left: 0.4em;
            user-select: none;
        }

        td:last-child {
            font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
            font-size: 1.2em;
            line-height: 1.7;
            font-weight: 400;
        }

        /* Subtle separation between consecutive passages so distinct scholia /
           sub-entries do not run together as one wall of text. Body rows only —
           title and speaker rows belong to the text and stay borderless. */
        tbody tr td {
            border-bottom: 1px solid #EDF2F7;
        }

        tbody tr.title-row td,
        tbody tr.testimonium-row td {
            border-bottom: none;
        }

        .title-row {
            background-color: transparent;
        }

        .title-row td:first-child {
            display: none;
        }

        .title-row td:last-child {
            text-align: center;
            font-weight: 600;
            font-style: italic;
            padding: 12px;
        }

        .also-published {
            margin-top: 0;
            margin-bottom: 24px;
            text-align: center;
            font-size: 0.85em;
            color: #888;
            font-style: italic;
        }

        .also-published p {
            margin: 0 0 6px 0;
        }

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

        .also-published a {
            color: #9A8555;
            text-decoration: none;
        }

        .also-published a:hover {
            text-decoration: underline;
        }

        .footer {
            background:
                linear-gradient(180deg,
                    #556170 0%,
                    #3d4852 38%,
                    #2c343c 100%);
            border-top: 1px solid rgba(154, 133, 85, 0.55);
            box-shadow:
                0 -8px 24px rgba(0, 0, 0, 0.28),
                inset 0 1px 0 rgba(255, 255, 255, 0.14),
                inset 0 -2px 0 rgba(0, 0, 0, 0.35);
            color: #E2E8F0;
            text-align: center;
            padding: 30px 20px;
            margin-top: 40px;
            font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
        }

        .footer a {
            color: #E2E8F0;
            text-decoration: underline;
        }

        /* Tablet styles */
        @media (max-width: 1024px) {
            .navbar-content {
                padding: 0 15px;
            }

            .home-link {
                font-size: 3em;
                gap: 6px;
            }

            .content-wrapper {
                padding: 30px;
            }
        }

        /* Mobile styles */
        @media (max-width: 768px) {
            .navbar {
                padding: 15px 0;
            }

            .navbar-content {
                padding: 0 15px;
            }

            /* Show hamburger button on mobile */
            .hamburger-menu-toggle {
                display: flex;
            }

            /* Hide desktop navigation and downloads on mobile */
            .desktop-only {
                display: none !important;
            }

            /* Show mobile menu content */
            .mobile-only {
                display: block;
            }

            .nav-center {
                width: 100%;
            }

            .home-link {
                font-size: 2.5em;
                gap: 6px;
            }

            .navbar-subtitle {
                font-size: 0.8em;
                padding-left: 0;
            }

            .menu-download-buttons {
                display: flex;
                flex-direction: column;
                gap: 10px;
            }

            .menu-download-buttons .download-btn {
                font-size: 0.85em;
                padding: 10px 12px;
                min-height: 44px;
                width: 100%;
                justify-content: flex-start;
            }

            .menu-download-buttons .download-btn span:last-child {
                white-space: nowrap;
            }

            .container {
                margin: 15px auto;
                padding: 0 10px;
            }

            .breadcrumbs {
                padding: 10px 15px;
                font-size: 0.85em;
            }

            .breadcrumb-separator {
                margin: 0 6px;
            }

            .content-wrapper {
                padding: 20px;
                border-radius: 6px;
                min-width: 0;
            }

            .work-header {
                margin-bottom: 25px;
                margin-top: -15px;
                position: relative;
            }

            .eul-wid-top-left {
                position: static;
                font-size: 0.7em;
                margin-bottom: 6px;
            }

            .doi-badge.doi-badge-identity {
                position: static;
                display: block;
                margin-bottom: 10px;
                line-height: normal;
            }

            .author-name {
                font-size: 1.15em;
                margin-bottom: 10px;
            }

            h1 {
                font-size: 1.75em;
                padding-bottom: 12px;
                line-height: 1.3;
            }

            .work-metadata {
                font-size: 0.9em;
                margin-top: 14px;
                margin-bottom: 14px;
            }

            table {
                font-size: 1em;
                display: block;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                margin-top: 15px;
            }

            table thead,
            table tbody,
            table tr {
                display: table;
                width: 100%;
                table-layout: fixed;
            }

            /* Keep header hidden on mobile too (override display: table) */
            table thead {
                display: none !important;
            }

            th, td {
                padding: 6px 8px;
                word-wrap: break-word;
                overflow-wrap: break-word;
                hyphens: auto;
            }

            th {
                font-size: 1em;
                padding: 8px;
            }

            th:first-child {
                width: 45px;
                min-width: 45px;
            }

            td:first-child {
                width: 45px;
                min-width: 45px;
                font-size: 0.8em;
                padding: 6px 4px;
                opacity: 1 !important;
            }

            td:last-child {
                font-size: 1.3em;
                line-height: 1.8;
            }

            .title-row td:last-child {
                font-size: 1.4em;
                line-height: 1.6;
            }

            .footer {
                padding: 20px 15px;
                font-size: 0.85em;
            }

            .footer div {
                display: flex;
                flex-direction: column;
                gap: 10px;
                margin-bottom: 15px;
            }

            .footer a {
                margin: 0;
            }
        }

        /* Small mobile styles */
        @media (max-width: 480px) {
            .navbar {
                padding: 12px 0;
            }

            .navbar-content {
                padding: 0 10px;
                gap: 12px;
            }

            .home-link {
                font-size: 2em;
                gap: 8px;
            }

            .navbar-subtitle {
                font-size: 0.75em;
                padding-left: 0;
            }

            .hamburger-menu-toggle {
                width: 40px;
                height: 40px;
                padding: 8px;
            }

            .menu-download-buttons .download-btn {
                font-size: 0.8em;
                padding: 10px 12px;
            }

            .container {
                margin: 10px auto;
                padding: 0 5px;
            }

            .content-wrapper {
                padding: 16px;
                min-width: 0;
            }

            .eul-wid-top-left {
                font-size: 0.65em;
            }

            .author-name {
                font-size: 1.1em;
            }

            h1 {
                font-size: 1.5em;
                line-height: 1.3;
            }

            .work-metadata {
                font-size: 0.85em;
                margin-top: 12px;
                margin-bottom: 12px;
            }

            table {
                font-size: 0.95em;
            }

            th:first-child {
                width: 40px;
                min-width: 40px;
            }

            td:first-child {
                width: 40px;
                min-width: 40px;
                font-size: 0.75em;
                padding: 5px 3px;
                opacity: 1 !important;
            }

            td:last-child {
                font-size: 1.25em;
                line-height: 1.8;
            }

            .title-row td:last-child {
                font-size: 1.35em;
                line-height: 1.6;
            }

            .footer {
                padding: 15px 10px;
                font-size: 0.8em;
            }
        }

        /* ==========================================
           PRINT STYLES (PDF export)
           ========================================== */
        @media print {
            /* Hide UI elements */
            nav, .navbar, .navbar-content, .hamburger-menu-toggle, .hamburger-menu-overlay, 
            .hamburger-menu-panel, .download-btn, .downloads, .download-buttons, 
            .mobile-download-toggle, .desktop-download-toggle, .downloads-content,
            .nav-links, .nav-tabs, footer, .footer, .export-notice, .breadcrumbs, .also-published {
                display: none !important;
            }

            /* Reset body for PDF */
            body {
                max-width: 100%;
                margin: 0;
                padding: 0;
                font-size: 11pt;
                line-height: 1.6;
                color: #000;
                background: #fff;
            }

            /* Container adjustments */
            .container {
                max-width: 100%;
                margin: 0;
                padding: 0;
            }

            .content-wrapper {
                max-width: 100%;
                padding: 0.5in;
                box-shadow: none;
                border-radius: 0;
                background: #fff;
            }

            /* Work header styling for print */
            .work-header {
                margin-bottom: 0.3in;
                page-break-after: avoid;
            }

            .eul-wid-top-left {
                position: static;
                font-size: 9pt;
                color: #666;
                margin-bottom: 0.1in;
            }

            /* In print the eul_wid badge flows statically; the DOI badge
               follows it in normal flow rather than overlapping the title. */
            .doi-badge.doi-badge-identity {
                position: static;
                display: block;
                margin-bottom: 0.1in;
            }

            .author-name {
                font-size: 11pt;
                color: #333;
                margin-bottom: 0.1in;
            }

            h1 {
                font-size: 16pt;
                color: #000;
                border-bottom: 2px solid #000;
                padding-bottom: 0.1in;
                margin-top: 0;
                page-break-after: avoid;
            }

            .work-metadata {
                font-size: 9pt;
                color: #666;
                margin-top: 0.1in;
                margin-bottom: 0.2in;
                text-align: left;
            }

            /* Table styling for print */
            table {
                width: 100%;
                margin-top: 0.2in;
                font-size: 11pt;
            }

            thead {
                display: none !important;
            }

            tr {
                page-break-inside: avoid;
            }

            td:first-child {
                width: 0.5in;
                font-size: 9pt;
                opacity: 1 !important;
                color: #666;
                padding: 3px 8px;
            }

            td:last-child {
                font-size: 11pt;
                line-height: 1.6;
                padding: 3px 12px;
                color: #000;
            }

            .title-row td:last-child {
                font-weight: 600;
                font-style: italic;
                text-align: center;
                padding: 8px;
            }

            /* Page setup */
            @page {
                size: letter;
                margin: 0.75in 0.5in;
            }

            /* Prevent orphans and widows */
            p, td {
                orphans: 3;
                widows: 3;
            }

            h1, h2, h3, h4, h5, h6 {
                page-break-after: avoid;
            }
        }
/* Utility-page extras — site chrome lives in work_page.css (utility-page bundle). */

/* Utility main column: undo work-page flex centre (single-column pages only). */
main > .container:not(:has(.content-wrapper)),
main > .utility-container-wide {
    display: block;
    min-width: 0;
}

main > .container:not(:has(.content-wrapper)) {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 20px;
}

main > .utility-container-wide,
main > .container.utility-container-wide {
    max-width: 820px;
    margin: 0 auto;
    padding: 40px 20px;
}


/* Contact + shared utility layout */
        .container {
            max-width: 700px;
            margin: 0 auto;
            padding: 40px 20px;
        }

        h1 {
            font-size: 1.8em;
            font-weight: 300;
            color: #2D3748;
            margin-bottom: 8px;
        }

        .page-intro {
            color: #718096;
            font-size: 1.05em;
            margin-bottom: 32px;
            line-height: 1.7;
        }

        .contact-form {
            background: #FFFFFF;
            border: 1px solid #e8e0d4;
            border-radius: 4px;
            padding: 32px;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-group label {
            display: block;
            font-weight: 600;
            font-size: 0.9em;
            color: #4A5568;
            margin-bottom: 6px;
        }

        .form-group label .required {
            color: #C53030;
        }

        .form-group input,
        .form-group textarea {
            width: 100%;
            padding: 10px 14px;
            font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
            font-size: 1em;
            border: 1px solid #CBD5E0;
            border-radius: 3px;
            background: #FAFAF8;
            color: #2D3748;
            transition: border-color 0.2s;
        }

        .form-group input:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: #3D4852;
            background: #FFFFFF;
        }

        .form-group textarea {
            min-height: 160px;
            resize: vertical;
        }

        /* Honeypot - invisible to humans */
        .form-hp { position: absolute; left: -9999px; }

        .submit-btn {
            display: inline-block;
            background: #3D4852;
            color: #FFFFFF;
            border: none;
            padding: 12px 32px;
            font-family: 'Source Sans Pro', -apple-system, sans-serif;
            font-size: 1em;
            font-weight: 600;
            border-radius: 3px;
            cursor: pointer;
            transition: background 0.2s;
        }

        .submit-btn:hover { background: #2D3748; }
        .submit-btn:disabled {
            background: #A0AEC0;
            cursor: not-allowed;
        }

        .form-status {
            margin-top: 16px;
            padding: 12px 16px;
            border-radius: 3px;
            display: none;
            font-size: 0.95em;
        }

        .form-status.success {
            display: block;
            background: #F0FFF4;
            border: 1px solid #C6F6D5;
            color: #276749;
        }

        .form-status.error {
            display: block;
            background: #FFF5F5;
            border: 1px solid #FED7D7;
            color: #C53030;
        }

        .footer {
            background:
                linear-gradient(180deg,
                    #556170 0%,
                    #3d4852 38%,
                    #2c343c 100%);
            border-top: 1px solid rgba(154, 133, 85, 0.55);
            box-shadow:
                0 -8px 24px rgba(0, 0, 0, 0.28),
                inset 0 1px 0 rgba(255, 255, 255, 0.14),
                inset 0 -2px 0 rgba(0, 0, 0, 0.35);
            color: #E2E8F0;
            text-align: center;
            padding: 30px 20px;
            margin-top: 60px;
            font-size: 0.9em;
        }
        .footer a { color: #E2E8F0; text-decoration: none; }
        .footer a:hover { text-decoration: underline; }

        @media (max-width: 768px) {
            .desktop-only { display: none !important; }
            .hamburger-menu-toggle { display: flex; }
            .container { padding: 24px 16px; }
            .contact-form { padding: 20px; }
            h1 { font-size: 1.5em; }
        }

/* Sources page content */
        .container {
            max-width: 1200px;
            margin: 10px auto;
            padding: 0 20px;
        }
        
        .content-wrapper {
            padding: 20px 35px;
            position: relative;
        }
        
        h1 {
            color: #2D3748;
            border-bottom: 3px solid #9A8555;
            padding-bottom: 10px;
            margin-bottom: 15px;
            margin-top: 30px;
            font-size: 2em;
            font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
        }
        
        .greek-title {
            font-size: 1.3rem;
            color: #718096;
            font-style: italic;
            margin-top: -10px;
            margin-bottom: 20px;
            font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
        }
        
        h2 {
            color: #2D3748;
            border-bottom: 3px solid #9A8555;
            padding-bottom: 10px;
            margin-top: 2.5rem;
            margin-bottom: 1rem;
            font-size: 1.6em;
            font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
        }
        
        p {
            margin-bottom: 1rem;
            font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
        }
        
        .section-intro {
            font-size: 1rem;
            color: #718096;
            margin-bottom: 1.5rem;
        }
        
        .source-entry {
            margin-bottom: 2rem;
            padding: 15px 20px;
            background: #FFFFFF;
            border-radius: 6px;
            border: 1px solid #E2E8F0;
            border-left: 4px solid #9A8555;
            transition: all 0.3s;
        }
        
        .source-entry:hover {
            background: #F0F0EC;
            border-color: #E2E8F0;
            border-left-color: #9A8555;
            box-shadow: 0 2px 4px rgba(0,0,0,0.06);
        }
        
        .source-name {
            font-weight: 700;
            font-size: 1.15rem;
            margin-bottom: 0.5rem;
            font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
            color: #2D3748;
        }
        
        .source-name a {
            color: #9A8555;
            text-decoration: none;
        }
        
        .source-name a:hover {
            text-decoration: underline;
        }
        
        .source-institution {
            font-size: 0.95rem;
            color: #718096;
            margin-bottom: 0.5rem;
        }
        
        .source-description {
            font-size: 0.95rem;
            color: #2D3748;
            margin-bottom: 0.5rem;
            line-height: 1.6;
        }
        
        .provenance-note {
            margin: 1.5rem 0 2rem 0;
            padding: 18px 22px;
            background: #FFFDF7;
            border: 1px solid #E2D8C0;
            border-left: 4px solid #9A8555;
            border-radius: 6px;
        }

        .provenance-note-heading {
            font-size: 0.8rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: #9A8555;
            margin-bottom: 0.6rem;
        }

        .provenance-note p {
            font-size: 0.97rem;
            color: #4A5568;
            margin-bottom: 0.6rem;
            line-height: 1.65;
        }

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

        .source-license {
            font-size: 0.85rem;
            color: #718096;
            font-style: italic;
        }
        
        .license-badge {
            display: inline-block;
            background: #F7F7F5;
            padding: 0.2rem 0.6rem;
            border-radius: 4px;
            font-size: 0.8rem;
            font-style: normal;
            color: #4A5568;
            font-weight: 600;
            margin-right: 0.5rem;
            border: 1px solid #E2E8F0;
        }

        .example-stage-title {
            font-size: 1rem;
            font-weight: 700;
            color: #2D3748;
            margin: 1.25rem 0 0.5rem 0;
        }

        .ocr-intermediate {
            font-size: 1.05rem;
            line-height: 1.55;
            color: #2D3748;
            background: #FFFFFF;
            border: 1px solid #E2E8F0;
            border-left: 4px solid #9A8555;
            border-radius: 6px;
            padding: 14px 16px;
        }

        .flow-frame {
            margin: 0.6rem 0 1.8rem 0;
            padding: 14px 14px 12px 14px;
            background: #FFFFFF;
            border: 1px solid #E2E8F0;
            border-left: 4px solid #9A8555;
            border-radius: 6px;
        }

        .flow-controls {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
            margin-bottom: 12px;
            color: #4A5568;
            font-size: 0.95rem;
        }

        .flow-controls input[type="range"] {
            width: 180px;
        }

        .flow-controls output {
            min-width: 44px;
            font-family: 'Courier New', monospace;
            font-size: 0.85rem;
            color: #2D3748;
        }

        .flow-viewport {
            width: 100%;
            max-width: 100%;
            min-width: 320px;
            resize: horizontal;
            overflow: auto;
            margin: 0 auto;
            padding: 8px 4px;
            border: 1px dashed #E2E8F0;
            border-radius: 4px;
            background: #FCFCFA;
        }

        .flow-row {
            display: grid;
            grid-template-columns: 72px 1fr;
            column-gap: 8px;
            margin-bottom: 10px;
        }

        .flow-row:last-child {
            margin-bottom: 0;
        }

        .flow-ref {
            text-align: center;
            color: #2D3748;
            font-size: 0.85rem;
            font-family: 'Courier New', monospace;
            opacity: 0.35;
            transition: opacity 0.2s ease-in-out;
        }

        .flow-row:hover .flow-ref {
            opacity: 1;
        }

        .flow-text {
            font-size: 1.2rem;
            line-height: 1.7;
            color: #2D3748;
        }

        .flow-hint {
            margin: 10px 0 0 0;
            font-size: 0.9rem;
            color: #718096;
        }

/* 404 — scoped (body.page-404) */
/* Source: public/404.html */
        body.page-404 {
            font-family: 'Gentium Plus', 'Source Sans Pro', Georgia, serif;
            max-width: 800px;
            margin: 100px auto;
            padding: 20px;
            text-align: center;
            color: #333;
        }
        h1 {
            font-size: 3em;
            color: #1a365d;
            margin-bottom: 0.5em;
        }
        p {
            font-size: 1.2em;
            line-height: 1.6;
            margin-bottom: 2em;
        }
        a {
            color: #2b6cb0;
            text-decoration: none;
            font-weight: bold;
        }
        a:hover {
            text-decoration: underline;
        }
        .greek {
            font-size: 2em;
            color: #4a5568;
            margin: 1em 0;
        }

/* For Agents */
        .container {
            max-width: 760px;
            margin: 0 auto;
            padding: 40px 20px;
        }

        h1 {
            font-size: 1.9em;
            font-weight: 300;
            color: #2D3748;
            margin-bottom: 8px;
        }

        .page-intro {
            color: #718096;
            font-size: 1.05em;
            margin-bottom: 24px;
            line-height: 1.7;
        }

        h2 {
            font-size: 1.25em;
            font-weight: 600;
            color: #2D3748;
            margin-top: 36px;
            margin-bottom: 12px;
        }

        h3 {
            font-size: 1em;
            font-weight: 600;
            color: #4A5568;
            margin-top: 18px;
            margin-bottom: 6px;
        }

        p { margin-bottom: 12px; }

        ul {
            margin: 0 0 16px 24px;
        }
        ul li { margin-bottom: 6px; }

        a { color: #3D4852; }
        a:hover { color: #D4A574; }

        code {
            font-family: 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
            font-size: 0.92em;
            background: #EDE8DE;
            padding: 1px 6px;
            border-radius: 3px;
            color: #2D3748;
        }

        pre {
            background: #2D3748;
            color: #E2E8F0;
            font-family: 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
            font-size: 0.88em;
            line-height: 1.55;
            padding: 16px 20px;
            border-radius: 4px;
            overflow-x: auto;
            margin: 0 0 18px 0;
        }
        pre code {
            background: transparent;
            padding: 0;
            color: inherit;
            font-size: inherit;
        }
        pre .comment { color: #A0AEC0; }
        pre .out { color: #D4A574; }

        .install-block {
            background: #2D3748;
            color: #E2E8F0;
            padding: 18px 20px;
            border-radius: 4px;
            font-family: 'SF Mono', Menlo, Consolas, monospace;
            font-size: 1.05em;
            margin: 8px 0 20px 0;
            display: flex;
            align-items: center;
            gap: 12px;
        }
        .install-block::before {
            content: '$';
            color: #D4A574;
            user-select: none;
        }

        .notice {
            background: #FFF8E7;
            border: 1px solid #E8D9B5;
            border-left: 4px solid #D4A574;
            padding: 16px 20px;
            border-radius: 3px;
            margin: 0 0 32px 0;
            font-size: 0.97em;
            color: #4A5568;
        }
        .notice strong {
            color: #2D3748;
        }

        .url-list {
            background: #FFFFFF;
            border: 1px solid #E8E0D4;
            border-radius: 4px;
            padding: 4px 0;
            margin-bottom: 20px;
        }
        .url-list-item {
            padding: 10px 18px;
            border-bottom: 1px solid #F0EBE0;
        }
        .url-list-item:last-child { border-bottom: none; }
        .url-list-item code {
            font-size: 0.92em;
            background: transparent;
            padding: 0;
            color: #2D3748;
        }
        .url-list-item .desc {
            display: block;
            margin-top: 3px;
            color: #718096;
            font-size: 0.92em;
        }

        .footer {
            background:
                linear-gradient(180deg,
                    #556170 0%,
                    #3d4852 38%,
                    #2c343c 100%);
            border-top: 1px solid rgba(154, 133, 85, 0.55);
            box-shadow:
                0 -8px 24px rgba(0, 0, 0, 0.28),
                inset 0 1px 0 rgba(255, 255, 255, 0.14),
                inset 0 -2px 0 rgba(0, 0, 0, 0.35);
            color: #E2E8F0;
            text-align: center;
            padding: 30px 20px;
            margin-top: 60px;
            font-size: 0.9em;
        }
        .footer a { color: #E2E8F0; text-decoration: none; }
        .footer a:hover { text-decoration: underline; }

        @media (max-width: 768px) {
            .desktop-only { display: none !important; }
            .hamburger-menu-toggle { display: flex; }
            .container { padding: 24px 16px; }
            h1 { font-size: 1.55em; }
            pre { font-size: 0.82em; padding: 12px 14px; }
            .install-block { font-size: 0.95em; }
        }

/* Dataset */
        .container {
            max-width: 820px;
            margin: 0 auto;
            padding: 40px 20px;
        }

        h1 {
            font-size: 1.8em;
            font-weight: 300;
            color: #2D3748;
            margin-bottom: 8px;
        }

        h2 {
            font-size: 1.3em;
            font-weight: 600;
            color: #2D3748;
            margin: 36px 0 14px;
        }

        .page-intro {
            color: #718096;
            font-size: 1.05em;
            margin-bottom: 8px;
            line-height: 1.7;
        }

        .download-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            gap: 16px;
            margin-top: 8px;
        }
        .download-card {
            background: #FFFFFF;
            border: 1px solid #e8e0d4;
            border-radius: 4px;
            padding: 20px;
            display: flex;
            flex-direction: column;
        }
        .download-card h3 {
            font-size: 1.05em;
            font-weight: 600;
            margin-bottom: 6px;
        }
        .download-card p {
            color: #718096;
            font-size: 0.92em;
            margin-bottom: 16px;
            flex-grow: 1;
        }
        .btn {
            display: inline-block;
            background: #3D4852;
            color: #FFFFFF;
            text-decoration: none;
            padding: 9px 18px;
            font-size: 0.95em;
            font-weight: 600;
            border-radius: 3px;
            text-align: center;
            transition: background 0.2s;
        }
        .btn:hover { background: #2D3748; }

        .info-table {
            width: 100%;
            border-collapse: collapse;
            background: #FFFFFF;
            border: 1px solid #e8e0d4;
            border-radius: 4px;
            overflow: hidden;
        }
        .info-table th, .info-table td {
            text-align: left;
            padding: 10px 14px;
            border-bottom: 1px solid #EDF2F7;
            font-size: 0.95em;
        }
        .info-table th { background: #FAFAF8; font-weight: 600; }
        .info-table tr:last-child td { border-bottom: none; }

        .citation-block {
            background: #FFFFFF;
            border: 1px solid #e8e0d4;
            border-radius: 4px;
            padding: 18px;
            font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
            font-size: 0.88em;
            white-space: pre-wrap;
            word-break: break-word;
            color: #2D3748;
        }

        .note {
            color: #718096;
            font-size: 0.95em;
            margin-top: 12px;
        }
        .note a { color: #3D4852; }

/* llms.html — scoped (body.page-llms) */
/* Source: public/llms.html */
        body.page-llms {
            font-family: Georgia, 'Times New Roman', serif;
            max-width: 720px;
            margin: 3rem auto;
            padding: 0 1.5rem;
            color: #222;
            line-height: 1.7;
        }
        h1 { font-size: 1.8rem; margin-bottom: 0.25rem; }
        blockquote {
            border-left: 3px solid #bbb;
            margin: 1.2rem 0;
            padding: 0.5rem 1.2rem;
            color: #444;
            font-style: italic;
        }
        h2 { font-size: 1.2rem; margin-top: 2rem; }
        ul { padding-left: 1.5rem; }
        li { margin-bottom: 0.4rem; }
        code { font-family: monospace; background: #f4f4f4; padding: 0.1em 0.3em; border-radius: 3px; }
        .meta { font-size: 0.9rem; color: #666; margin-top: 3rem; border-top: 1px solid #ddd; padding-top: 1rem; }
        a { color: #1a5276; }

/* Reference grammars shelf (/grammars) */
.grammar-shelf-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 22px 24px;
    margin: 18px 0;
    background: #fff;
}

.grammar-shelf-card-title {
    font-size: 1.4em;
    margin-bottom: 2px;
    color: #3D4852;
}

.grammar-shelf-meta {
    color: #667;
    margin-bottom: 10px;
}

.grammar-shelf-blurb {
    line-height: 1.55;
}

.grammar-shelf-downloads {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 6px;
    align-items: center;
    justify-content: center;
}

/* Equal footprint — house .download-btn colour/padding; width locked to the
   longest label so PDF / EPUB / Markdown read as one row of twins. */
.grammar-shelf-downloads .download-btn {
    min-width: 8rem;
    justify-content: center;
}
