/* ASIKATEC projects — public pages.
   Colours derive from the site's accent (--primary) and from currentColor,
   so the pages follow light and dark site themes without their own palette. */

.asp-page {
    --asp-accent: var(--primary, #E87A1E);
    --asp-muted: color-mix(in srgb, currentColor 62%, transparent);
    --asp-border: color-mix(in srgb, currentColor 14%, transparent);
    --asp-soft: color-mix(in srgb, currentColor 4%, transparent);
}

.asp-container { max-width: 1120px; }

.asp-page a:not(.asp-btn):not(.asp-card-link) { color: var(--asp-accent); }

.asp-preview-banner {
    border: 1px solid color-mix(in srgb, #d4a106 55%, transparent);
    background: color-mix(in srgb, #ffd54f 18%, transparent);
    border-radius: 8px;
    padding: .65rem .9rem;
    margin-bottom: 1.5rem;
    font-size: .9rem;
}

.asp-head { margin-bottom: 2rem; }
.asp-title { font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.4rem); font-weight: 700; margin: 0 0 .4rem; }
.asp-lead { font-size: 1.15rem; color: var(--asp-muted); margin: 0; }
.asp-breadcrumb { margin-bottom: 1.25rem; }
.asp-breadcrumb span[aria-hidden] { margin: 0 .35rem; color: var(--asp-muted); }

.asp-flag {
    display: inline-block;
    font-size: .72rem;
    font-weight: 600;
    line-height: 1.5;
    padding: .05rem .55rem;
    border-radius: 999px;
    background: var(--asp-soft);
    border: 1px solid var(--asp-border);
    color: var(--asp-muted);
    vertical-align: middle;
    white-space: nowrap;
}
.asp-flag-probe {
    background: color-mix(in srgb, #ffd54f 25%, transparent);
    border-color: color-mix(in srgb, #d4a106 50%, transparent);
    color: inherit;
}
.asp-flag-new {
    background: color-mix(in srgb, var(--asp-accent) 12%, transparent);
    border-color: color-mix(in srgb, var(--asp-accent) 40%, transparent);
    color: var(--asp-accent);
}

/* ── Overview ── */
.asp-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}
.asp-card {
    border: 1px solid var(--asp-border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
}
.asp-card:hover,
.asp-card:focus-within {
    border-color: color-mix(in srgb, var(--asp-accent) 45%, transparent);
    box-shadow: 0 6px 24px rgba(0, 0, 0, .07);
}
.asp-card-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.asp-card-link:hover { color: inherit; }
.asp-card-media img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: var(--asp-soft);
}
.asp-card-body { display: flex; flex-direction: column; gap: .35rem; flex: 1; padding: 1.25rem 1.25rem 1.1rem; }
.asp-card-title { font-size: 1.25rem; font-weight: 700; margin: 0; }
.asp-card-subtitle { margin: 0; }
.asp-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: .25rem 0 0; font-size: .875rem; color: var(--asp-muted); }
.asp-card-more { margin-top: auto; padding-top: .5rem; color: var(--asp-accent); font-weight: 600; }
.asp-empty { color: var(--asp-muted); }

/* ── Project ── */
.asp-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    grid-template-areas: "main side";
    gap: 2.5rem;
    align-items: start;
}
.asp-main { grid-area: main; min-width: 0; }
.asp-side { grid-area: side; position: sticky; top: 96px; }

.asp-download {
    border: 1px solid var(--asp-border);
    border-radius: 12px;
    padding: 1.25rem;
    background: var(--asp-soft);
}
.asp-download p { margin: .65rem 0 0; font-size: .9rem; line-height: 1.5; }
.asp-download .asp-btn + p { margin-top: .75rem; }
.asp-btn,
.asp-btn:visited {
    display: block;
    width: 100%;
    padding: .7rem 1rem;
    border: 1px solid var(--asp-accent);
    border-radius: 8px;
    background: var(--asp-accent);
    color: #fff;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}
.asp-btn:hover,
.asp-btn:focus { color: #fff; filter: brightness(.94); }
.asp-download-free { font-weight: 600; }
.asp-dl-status { font-size: .85rem; font-weight: 600; margin: .5rem 0 0; }
.asp-btn[aria-busy="true"] { opacity: .75; cursor: progress; }
.asp-download-meta,
.asp-download-id,
.asp-latest { color: var(--asp-muted); }
.asp-latest a { word-break: break-all; }

.asp-sha { font-size: .8rem; color: var(--asp-muted); margin: .5rem 0 0; }
.asp-sha span { font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-right: .3rem; }
.asp-sha code,
.asp-download-id code {
    padding: 0;
    background: none;
    color: inherit;
    font-size: .8rem;
    word-break: break-all;
}

.asp-block { margin-top: 2.5rem; }
.asp-main > .asp-prose:first-child + .asp-block,
.asp-main > .asp-block:first-child { margin-top: 0; }
.asp-block > h2 { font-size: 1.35rem; font-weight: 700; margin: 0 0 .9rem; }
.asp-req-min { font-weight: 600; }

.asp-prose { line-height: 1.7; }
.asp-prose > :first-child { margin-top: 0; }
.asp-prose h2, .asp-prose h3, .asp-prose h4, .asp-prose h5 { font-weight: 700; margin: 1.5rem 0 .5rem; line-height: 1.3; }
.asp-prose h2 { font-size: 1.35rem; }
.asp-prose h3 { font-size: 1.12rem; }
.asp-prose h4, .asp-prose h5 { font-size: 1rem; }
.asp-prose ul, .asp-prose ol { padding-left: 1.4rem; }
.asp-prose li + li { margin-top: .25rem; }
.asp-prose pre {
    padding: .9rem 1rem;
    border-radius: 8px;
    background: var(--asp-soft);
    border: 1px solid var(--asp-border);
    overflow-x: auto;
}
.asp-prose code { font-size: .875em; }
.asp-prose blockquote { margin: 1rem 0; padding-left: 1rem; border-left: 3px solid var(--asp-border); color: var(--asp-muted); }
.asp-prose hr { border: 0; border-top: 1px solid var(--asp-border); margin: 1.5rem 0; }
.asp-md-table { overflow-x: auto; margin: 1rem 0; }
.asp-md-table table { border-collapse: collapse; min-width: 50%; }
.asp-md-table th, .asp-md-table td { border: 1px solid var(--asp-border); padding: .4rem .65rem; vertical-align: top; }
.asp-md-table th { background: var(--asp-soft); }

.asp-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.asp-figure { margin: 0; }
.asp-figure img { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--asp-border); }
.asp-figure figcaption { margin-top: .35rem; font-size: .85rem; color: var(--asp-muted); }

.asp-versions { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.asp-version { border: 1px solid var(--asp-border); border-radius: 10px; padding: 1rem 1.1rem; }
.asp-version-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; }
.asp-version-meta { color: var(--asp-muted); font-size: .9rem; }
.asp-changes { margin: .6rem 0 0; padding-left: 1.2rem; }
.asp-changes li + li { margin-top: .2rem; }
.asp-version-links { margin: .55rem 0 0; font-size: .9rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: baseline; }
.asp-version-links span[aria-hidden] { color: var(--asp-muted); }

.asp-terms .asp-prose { font-size: .93rem; }

.asp-foot {
    margin-top: 3rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--asp-border);
    font-size: .85rem;
    color: var(--asp-muted);
}
.asp-foot p { margin: .2rem 0; }

@media (max-width: 991.98px) {
    .asp-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "side" "main"; gap: 2rem; }
    .asp-side { position: static; }
}
