/* HazaM Core Service entry point. Shared, local-only product-page stylesheet. */
.content-image { margin: 20px 0; }.content-image img { display: block; max-width: 100%; height: auto; border: 1px solid #85877e; }
.content-image figcaption { font-size: 12px; margin-top: 6px; }.preview-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; background: #fff1ba; border: 1px solid #85877e; }
.content-image { width: fit-content; max-width: 100%; }
.content-image.image-center { margin-inline: auto; text-align: center; }
.content-image.image-right { margin-left: auto; text-align: right; }

/* A dedicated image-only tab; no full-size images are prefetched. */
.product-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.gallery-item { margin: 0; min-width: 0; padding: 7px; border: 1px solid #a9ada5; background: #e8e9e0; }
.gallery-open { display: block; border: 1px solid #939b89; background: #f4f4ed; cursor: zoom-in; }
.gallery-open:focus-visible { outline: 2px solid #315747; outline-offset: 3px; }
.gallery-open img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }
.gallery-item figcaption { padding-top: 7px; font-size: 12px; white-space: pre-line; overflow-wrap: anywhere; }
.gallery-dialog { width: min(1080px, calc(100% - 28px)); max-height: calc(100dvh - 28px); padding: 0; border: 1px solid #707c62; border-radius: 0; background: #e8e9e0; color: var(--text); }
.gallery-dialog::backdrop { background: #20251ed0; }
.gallery-titlebar { display: flex; gap: 12px; justify-content: space-between; align-items: center; padding: 8px 12px; background: #3e5533; color: white; }
.gallery-titlebar h2 { margin: 0; font-size: 14px; }
.gallery-full-image { margin: 0; padding: 12px; }
.gallery-full-image img { display: block; max-width: 100%; max-height: calc(100dvh - 220px); width: auto; height: auto; margin: auto; object-fit: contain; }
.gallery-full-image figcaption { padding-top: 10px; text-align: center; white-space: pre-line; overflow-wrap: anywhere; }
.gallery-controls { display: flex; gap: 18px; justify-content: center; align-items: center; padding: 0 12px 12px; }
@media(max-width:650px) { .product-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media(max-width:400px) { .product-gallery { grid-template-columns: minmax(0, 1fr); } }

.attachment-table-wrap { max-width: 100%; overflow-x: auto; }
.attachment-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.attachment-table th, .attachment-table td { padding: 10px; border: 1px solid #a9ada5; text-align: left; vertical-align: top; }
.attachment-table th { background: #e3e7dd; }
.attachment-table td:first-child { min-width: 120px; overflow-wrap: anywhere; }
.attachment-table .attachment-sha { display: block; min-width: 125px; max-width: 180px; overflow-wrap: anywhere; font-size: 11px; }
.attachment-table small { color: #626c59; }
:root {
    color-scheme: light;
    --page-background: #eeeeea;
    --panel-background: #e3e7dd;
    --content-background: #fafaf5;
    --text: #242724;
    --muted: #626c59;
    --line: #a9ada5;
    --green: #27613d;
    --gold: #795b19;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--page-background);
    background-image: radial-gradient(#6e726e12 0.5px, transparent 0.5px);
    background-size: 3px 3px;
    color: var(--text);
    font: 14px/1.55 Tahoma, Arial, sans-serif;
}

button, a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: #315747;
    text-underline-offset: 3px;
}

.product-site {
    width: min(100%, 1380px);
    margin-inline: auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-bar, .site-footer {
    border-inline: 1px solid var(--line);
}

.site-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 24px;
    min-height: 68px;
    padding: 12px 22px;
    border-bottom: 1px solid var(--line);
    background: #dadbd5;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 1px;
}

.site-brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border: 1px dashed #727a6f;
    background: #e6e8e0;
    color: var(--muted);
    font: 9px/1 monospace;
    letter-spacing: normal;
}

.site-links {
    font-size: 12px;
}

.account-tools {
    margin-left: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.site-button {
    display: inline-block;
    min-height: 34px;
    padding: 6px 11px;
    border: 1px solid #8d9289;
    border-top-color: #ffffff;
    border-left-color: #ffffff;
    box-shadow: 0 0 0 1px #a8ada3;
    border-radius: 0;
    background: #dedfd9;
    color: var(--text);
    font: inherit;
    text-align: center;
    text-decoration: none;
    overflow-wrap: anywhere;
    cursor: pointer;
}

.site-button:hover:not(:disabled) {
    background: #ecece6;
}

.site-button:active:not(:disabled) {
    border-color: #8d9289 #ffffff #ffffff #8d9289;
}

.site-button:disabled {
    color: #737a6d;
    cursor: not-allowed;
}

.site-button.selected {
    background: #c5d3c4;
    border-color: #8b9a88;
    box-shadow: inset 1px 1px 0 #9ba798;
    font-weight: bold;
}

.site-button.primary {
    background: var(--green);
    color: #ffffff;
    border-color: #72947d #163d25 #163d25 #72947d;
    box-shadow: 0 0 0 1px #31513b;
    font-weight: bold;
}

.site-button.primary:hover:not(:disabled) {
    background: #33744b;
}

.site-button.primary:disabled {
    background: #657c61;
    color: #eef0e9;
}

.site-button.small {
    min-height: 28px;
    padding: 3px 9px;
    font-size: 12px;
}

.cart-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cart-count {
    min-width: 18px;
    border: 1px solid #aeb99f;
    background: #eef1e5;
    padding-inline: 4px;
    font-size: 11px;
}

.product-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 174px;
    align-items: start;
    gap: 24px;
    margin: 28px 22px;
}

.product-identity {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.product-logo {
    width: 128px;
    height: 128px;
    flex: 0 0 128px;
    margin-top: 2px;
    border: 1px dashed #727a6f;
    background: #e6e8e0;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font: 9px/1 monospace;
}
.product-logo-image { object-fit: contain; border-style: solid; }
.product-identity > div:last-child { min-width: 0; overflow-wrap: anywhere; }

h1, h2, p {
    margin: 0;
}

h1 {
    font-size: 24px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.product-badge {
    display: inline-block;
    padding: 1px 5px;
    border: 1px solid #aeb6a8;
    background: #e4e9df;
    color: #4d554a;
    font: 12px/1.4 "Courier New", monospace;
    vertical-align: middle;
}

.product-subtitle {
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.download-stack {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.versions-button {
    color: var(--gold);
    align-self: center;
    min-width: 110px;
}

.product-grid {
    display: grid;
    grid-template-columns: 146px minmax(0, 1fr) 185px;
    align-items: start;
    gap: 18px;
    padding: 0 22px 26px;
    flex: 1;
}

.left-sidebar, .right-sidebar {
    min-width: 0;
    padding: 6px 2px;
}

.sidebar-title {
    display: block;
    margin-bottom: 12px;
    color: #5d6659;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.product-navigation {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.product-navigation .site-button {
    text-align: left;
    padding-inline: 9px;
    font-size: 12px;
}

.product-main {
    min-width: 0;
    border: 1px solid #adb6a1;
    background: var(--content-background);
}

.context-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 9px;
    border-bottom: 1px solid var(--line);
    background: var(--panel-background);
}

.context-title {
    padding: 3px 9px;
    font-size: 12px;
}

.product-content {
    min-height: 360px;
    padding: 26px;
    overflow-wrap: anywhere;
}

.content-eyebrow {
    display: block;
    margin-bottom: 12px;
    color: #64715c;
    font-size: 11px;
    letter-spacing: 1px;
}

h2 {
    font-size: 21px;
    line-height: 1.3;
    margin-bottom: 14px;
}

.product-content p {
    color: #485140;
}

.product-content > * + * {
    margin-top: 16px;
}

.content-paragraph {
    white-space: pre-line;
}

.product-content pre {
    border: 1px solid #9da595;
    background: #e7e9e1;
    box-shadow: inset 1px 1px 0 #c1c5b9;
    padding: 12px;
    color: #26382a;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.product-content code {
    font: 13px/1.6 "Courier New", monospace;
}

.product-metadata {
    margin: 0;
}

.product-metadata dt {
    color: var(--muted);
    font-size: 11px;
    margin-top: 12px;
}

.product-metadata dd {
    margin: 2px 0 0;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.stage-alpha, .stage-pre-alpha {
    color: #9a3831;
}

.stage-beta {
    color: #965b1a;
}

.stage-release {
    color: var(--green);
}

.external-links {
    margin-top: 22px;
    padding-top: 15px;
    border-top: 1px solid #bbc1b2;
}

.external-links a {
    display: block;
    margin-top: 10px;
    font-size: 12px;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    border-top: 1px solid var(--line);
    background: #dedfd8;
    color: var(--muted);
    padding: 12px 22px;
    font-size: 11px;
}

.site-footer nav {
    display: flex;
    gap: 12px;
}

.site-footer [aria-current] {
    font-weight: bold;
}

.file-filters, .download-fields {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 12px;
    margin-block: 18px;
}

.file-filters label, .download-fields label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    min-width: 120px;
}

.file-filters select, .download-fields select {
    max-width: 100%;
    min-height: 34px;
    padding: 5px 9px;
    border: 1px solid #939b89;
    border-radius: 0;
    box-shadow: inset 1px 1px 0 #c8cbbb;
    background: #fdfdf8;
    color: var(--text);
    font: 13px "Courier New", monospace;
}

.file-list {
    border-top: 1px solid #bdc3b2;
}

.file-row {
    padding-block: 14px;
    border-bottom: 1px solid #d0d5c7;
}

.file-row-top {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 14px;
}

.file-identity {
    min-width: 0;
    overflow-wrap: anywhere;
}

.file-meta {
    font-size: 11px;
    color: var(--muted);
    margin-top: 5px;
}

.file-row details {
    margin-top: 10px;
    font-size: 12px;
}

.file-row summary {
    width: fit-content;
    color: var(--gold);
    cursor: pointer;
}

.file-changelog {
    font: 12px/1.6 Tahoma, Arial, sans-serif;
}

.file-status {
    font-size: 12px;
    color: #8f4c44;
}

.file-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 22px;
    font-size: 12px;
}

.download-dialog {
    width: min(460px, calc(100% - 28px));
    max-height: calc(100% - 40px);
    padding: 0;
    border: 1px solid #707c62;
    border-radius: 0;
    background: #e9ebe2;
    color: var(--text);
    box-shadow: 5px 5px 0 #25321c40;
    position: fixed;
    inset: 50% auto auto 50%;
    margin: 0;
    transform: translate(-50%, -50%);
}

.download-dialog::backdrop {
    background: #26312265;
}

.download-titlebar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: #3e5533;
    color: #ffffff;
    padding: 9px 12px;
}

.download-titlebar h2 {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.download-dialog-content {
    padding: 22px;
}

.download-fields label {
    flex: 1;
}

.download-hint {
    font-size: 12px;
    color: var(--muted);
}

.download-preview {
    display: block;
    margin-top: 12px;
    font: 12px/1.6 "Courier New", monospace;
    overflow-wrap: anywhere;
}

.download-submit {
    width: 100%;
    margin-top: 20px;
}

.download-error {
    color: #9a3831;
    margin-top: 14px;
}

@media (max-width: 800px) {
    .product-grid {
        grid-template-columns: 136px minmax(0, 1fr);
    }
    .right-sidebar {
        grid-column: 2;
    }
}

@media (max-width: 560px) {
    .site-bar {
        padding: 12px;
        gap: 12px;
    }
    .account-tools {
        width: 100%;
        margin-left: 0;
    }
    .product-header {
        grid-template-columns: 1fr;
        gap: 18px;
        margin: 22px 12px;
    }
    h1 {
        font-size: 21px;
    }
    .download-stack {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: stretch;
    }
    .versions-button {
        min-width: 0;
        align-self: stretch;
    }
    .product-grid {
        display: flex;
        flex-direction: column;
        padding: 0 12px 18px;
    }
    .left-sidebar, .right-sidebar, .product-main {
        width: 100%;
    }
    .product-navigation {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .product-content {
        min-height: 260px;
        padding: 20px;
    }
}

@media (pointer: coarse) {
    .site-button, .site-button.small {
        min-height: 44px;
    }
}

/* Deleted assets retain their place without a broken image or download link. */
.asset-placeholder { display: grid; place-items: center; min-height: 100px; padding: 16px; border: 1px dashed #88947d; background: #dce1d5; color: #526046; text-align: center; overflow-wrap: anywhere; }
