/*
    Styles for the owners' notice on the home page and the maintenance page.
    Kept global (CSS isolation is off in this project, see the .csproj), so every class is sp- prefixed.
    Palette: the site's black on white, one neutral grey surface, and the Spectron red from the mobile menu.
*/
:root {
    --sp-ink: #111;
    --sp-muted: #555;
    --sp-rule: #dcdcdc;
    --sp-surface: #f4f4f4;
    --sp-red: rgb(231, 25, 26);      /* accent for bars and borders */
    --sp-red-text: #b3121b;          /* the same hue, darkened to pass 4.5:1 for small text */
    --sp-part-font: 'Helvetica Neue', Helvetica, Arial, sans-serif;   /* same as the site body */
}

/* ------------------------------------------------------------ shared pieces */
.sp-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sp-red-text);
    margin-bottom: 0.4rem;
}

.sp-part {
    font-family: var(--sp-part-font);
    font-size: 0.9em;
    white-space: nowrap;
}

.sp-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--sp-ink);
    background: var(--sp-ink);
    color: #fff;
    font: inherit;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease;
}

    .sp-button:hover,
    .sp-button:focus-visible {
        background: #fff;
        color: var(--sp-ink);
    }

.sp-button:focus-visible,
.sp-jump button:focus-visible,
.sp-inline-link:focus-visible {
    outline: 3px solid var(--sp-red);
    outline-offset: 2px;
}

/* ------------------------------------------------------------ home page notice */
.owner-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem 3rem;
    flex-wrap: wrap;
    margin: 0 20px 2.5rem;
    padding: 1.5rem 2rem;
    background: var(--sp-surface);
    border-left: 6px solid var(--sp-red);
}

    .owner-notice p {
        margin: 0;
        font-size: 1.5rem;
        font-weight: 700;
        line-height: 1.3;
    }

/* ------------------------------------------------------------ maintenance page */
.sp-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 4rem;
    color: var(--sp-ink);
    line-height: 1.6;
}

.sp-page-header h1 {
    margin: 0 0 3rem;
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
}

.sp-page h2 {
    margin: 0 0 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--sp-ink);
    font-size: 2.2rem;
    font-weight: 800;
}

.sp-page h3 {
    margin: 2.5rem 0 1rem;
    font-size: 1.4rem;
    font-weight: 700;
}

.sp-page p {
    font-size: 1.15rem;
}

.sp-page a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.sp-prose {
    max-width: 72ch;
}

.sp-muted {
    color: var(--sp-muted);
}

/* authorized-repairs notice */
.sp-notice {
    padding: 1.75rem 2rem;
    border: 1px solid var(--sp-rule);
    border-top: 6px solid var(--sp-ink);
    margin-bottom: 2rem;
}

    .sp-notice p:last-child {
        margin-bottom: 0;
    }

/* a scroll link inside running text (no href, so the Blazor router leaves it alone) */
.sp-inline-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

/* obsolescence alert */
.sp-alert {
    padding: 1.75rem 2rem;
    background: var(--sp-surface);
    border-left: 6px solid var(--sp-red);
    margin-bottom: 5rem;
}

.sp-page .sp-alert-lead {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.75rem;
}

.sp-jump {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

    .sp-jump button {
        padding: 0.5rem 1rem;
        border: 2px solid var(--sp-ink);
        background: #fff;
        color: var(--sp-ink);
        font: inherit;
        font-weight: 700;
        cursor: pointer;
        transition: background-color 0.15s ease, color 0.15s ease;
    }

        .sp-jump button:hover {
            background: var(--sp-ink);
            color: #fff;
        }

/* sections */
/* collapsible section headings: open by default, click the heading to fold the section */
.sp-collapse > summary {
    display: block;
    list-style: none;
    cursor: pointer;
}

    .sp-collapse > summary::-webkit-details-marker {
        display: none;
    }

    .sp-collapse > summary h2 {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
    }

        .sp-collapse > summary h2::after {
            content: "";
            flex: none;
            width: 0.6em;
            height: 0.6em;
            margin-right: 0.3em;
            border-right: 3px solid currentColor;
            border-bottom: 3px solid currentColor;
            transform: translateY(-25%) rotate(45deg);
            transition: transform 0.15s ease;
        }

.sp-collapse:not([open]) > summary h2::after {
    transform: rotate(-45deg);
}

.sp-collapse:not([open]) > summary h2 {
    margin-bottom: 0;
}

/* closed sections sit closer together */
.sp-section:has(> .sp-collapse:not([open])) {
    margin-bottom: 2.5rem;
}

.sp-collapse > summary:hover h2 {
    color: #444;
}

.sp-collapse > summary:focus-visible {
    outline: 3px solid var(--sp-red);
    outline-offset: 4px;
}

.sp-section {
    margin-bottom: 6rem;
    scroll-margin-top: 1.5rem;
}

.sp-split {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 2.5rem;
    align-items: start;
    margin-bottom: 2.5rem;
}

    .sp-split h3 {
        margin-top: 0;
    }

/* part list */
.sp-parts {
    margin: 0 0 1rem;
    border-top: 1px solid var(--sp-rule);
}

.sp-parts-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1.5rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--sp-rule);
}

    .sp-parts-row dt {
        font-size: 1.1rem;
        font-weight: 400;
    }

    .sp-parts-row dd {
        margin: 0;
        font-weight: 700;
    }

/* key fact */
.sp-fact {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.75rem;
    background: var(--sp-ink);
    color: #fff;
}

.sp-fact-label {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ff8a8a;
}

.sp-fact-value {
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1.2;
}

.sp-fact-note {
    color: #d6d6d6;
}

/* next steps */
.sp-steps {
    margin: 2.5rem 0 3rem;
    padding: 1.75rem 2rem;
    border: 2px solid var(--sp-ink);
}

    .sp-steps h3 {
        margin-top: 0;
    }

.sp-steps-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--sp-rule);
}

    .sp-steps-footer + .sp-steps-footer {
        margin-top: 0.75rem;
        border-top: none;
        padding-top: 0;
    }

.sp-steps-footer > span {
    font-size: 1.15rem;
}

    .sp-interval strong {
        color: var(--sp-red-text);
    }

.sp-reminder {
    margin-top: 2.5rem;
    font-style: italic;
}

/* DASH component cards */
.sp-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    margin: 0 0 1rem;
}

.sp-card {
    margin: 0;
    border: 1px solid var(--sp-rule);
}

    .sp-card img {
        display: block;
        width: 100%;
        aspect-ratio: 4 / 3;
        object-fit: contain;
        background: #fff;
        padding: 1rem;
    }

    .sp-card figcaption {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: 1rem;
        padding: 0.9rem 1rem;
        border-top: 1px solid var(--sp-rule);
    }

.sp-card-name {
    font-size: 1.15rem;
    font-weight: 700;
}

/* DASH 2 */
.sp-dash2 {
    margin-top: 2.5rem;
    padding: 2rem;
    background: var(--sp-surface);
}

.sp-dash2-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    margin-bottom: 1rem;
}

    .sp-dash2-head h3 {
        margin: 0;
        font-size: 1.8rem;
    }

.sp-timeline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

    .sp-timeline li {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        padding: 0.4rem 0.9rem 0.4rem 0.4rem;
        background: #fff;
        border: 1px solid var(--sp-rule);
        font-size: 0.95rem;
    }

.sp-timeline-platform {
    padding: 0.15rem 0.5rem;
    background: var(--sp-ink);
    color: #fff;
    font-family: var(--sp-part-font);
    font-weight: 700;
}

/* repair paths */
.sp-paths {
    display: grid;
    grid-template-columns: 1fr 1fr 1.6fr;
    gap: 1.5rem;
    align-items: stretch;
}

.sp-path {
    display: flex;
    flex-direction: column;
    padding: 1.75rem;
    border: 1px solid var(--sp-rule);
    border-top: 6px solid var(--sp-ink);
}

    .sp-path p {
        margin-bottom: 0.75rem;
    }

.sp-path-who {
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
}

.sp-path-primary {
    border-top-color: var(--sp-red);
}

.sp-page .sp-path-agent {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.sp-contact {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-top: auto;
    padding: 1.25rem;
    background: var(--sp-surface);
    font-size: 1.1rem;
}

.sp-contact-label {
    margin-bottom: 0.35rem;
    color: var(--sp-muted);
    font-size: 0.95rem;
}

.sp-contact a {
    font-weight: 700;
    word-break: break-all;
}

.sp-footnote {
    margin: 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--sp-rule);
    color: var(--sp-muted);
    font-size: 0.95rem !important;
}

/* ------------------------------------------------------------ narrow screens */
@media (max-width: 900px) {
    .sp-split,
    .sp-paths {
        grid-template-columns: 1fr;
    }

    .sp-cards {
        grid-template-columns: 1fr;
    }

    .sp-card img {
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 600px) {
    .sp-page-header h1 {
        font-size: 2.4rem;
    }

    .sp-page h2 {
        font-size: 1.8rem;
    }

    .owner-notice,
    .sp-notice,
    .sp-alert,
    .sp-steps,
    .sp-dash2,
    .sp-path {
        padding: 1.25rem;
    }

    .owner-notice p,
    .sp-page .sp-alert-lead {
        font-size: 1.25rem;
    }

    .sp-parts-row {
        flex-direction: column;
        gap: 0.2rem;
    }

    .sp-button {
        white-space: normal;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sp-button,
    .sp-jump button,
    .sp-collapse > summary h2::after {
        transition: none;
    }
}
