:root {
    --std-green: #004d3d;
    --std-green-mid: #0a5c4a;
    --std-gold: #c5a059;
    --std-gold-soft: #f1d497;
    --std-bg: #eef5f2;
    --std-ink: #1a2e28;
    --std-muted: #5b6f68;
}

.standards-page {
    direction: rtl;
    text-align: right;
    background:
        radial-gradient(ellipse 80% 50% at 100% 0%, rgba(197, 160, 89, 0.14), transparent 55%),
        radial-gradient(ellipse 60% 40% at 0% 30%, rgba(0, 77, 61, 0.08), transparent 50%),
        linear-gradient(180deg, #f7faf8 0%, var(--std-bg) 45%, #f4f8f6 100%);
    color: var(--std-ink);
    min-height: 60vh;
}

.standards-page .media-title {
    margin-bottom: 0.75rem;
}

.std-lead {
    max-width: 42rem;
    margin: 0 0 2rem;
    color: var(--std-muted);
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.7;
}

.std-stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.std-dossier {
    position: relative;
    background: #fff;
    border: 1px solid rgba(0, 77, 61, 0.1);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(0, 77, 61, 0.06);
    animation: stdRise 0.55s ease both;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.std-dossier:nth-child(2) { animation-delay: 0.06s; }
.std-dossier:nth-child(3) { animation-delay: 0.12s; }
.std-dossier:nth-child(4) { animation-delay: 0.18s; }
.std-dossier:nth-child(5) { animation-delay: 0.24s; }

.std-dossier:hover {
    border-color: rgba(197, 160, 89, 0.45);
    box-shadow: 0 18px 40px rgba(0, 77, 61, 0.1);
}

.std-dossier::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 5px;
    background: linear-gradient(180deg, var(--std-gold), var(--std-green));
}

.std-dossier-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.35rem 1.5rem 1.1rem;
    background:
        linear-gradient(135deg, rgba(0, 77, 61, 0.04) 0%, transparent 55%),
        #fff;
}

.std-dossier-meta {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    min-width: 0;
    flex: 1;
}

.std-dossier-icon {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, var(--std-green), var(--std-green-mid));
    color: var(--std-gold-soft);
    box-shadow: 0 8px 18px rgba(0, 77, 61, 0.22);
}

.std-dossier-icon svg {
    width: 1.35rem;
    height: 1.35rem;
}

.std-dossier-kicker {
    margin: 0 0 0.25rem;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--std-gold);
}

.std-dossier-title {
    margin: 0;
    font-size: clamp(1.1rem, 2.2vw, 1.45rem);
    font-weight: 900;
    color: var(--std-green);
    line-height: 1.35;
}

.std-count-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--std-green);
    background: rgba(0, 77, 61, 0.07);
    border: 1px solid rgba(0, 77, 61, 0.1);
    white-space: nowrap;
}

.std-main-action,
.std-add-action {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    outline: none;
}

.std-main-action {
    margin: 0 1.25rem 1.25rem;
    padding: 1rem 1.15rem;
    border-radius: 16px;
    background: linear-gradient(120deg, rgba(0, 77, 61, 0.94), rgba(10, 92, 74, 0.92));
    border: 1px solid rgba(197, 160, 89, 0.35);
    box-shadow: 0 12px 28px rgba(0, 77, 61, 0.18);
    transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.std-main-action:hover,
.std-main-action:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(0, 77, 61, 0.28);
    filter: brightness(1.03);
}

.std-main-action:focus-visible {
    outline: 2px solid var(--std-gold);
    outline-offset: 3px;
}

.std-main-action.is-disabled {
    pointer-events: none;
    opacity: 0.55;
    filter: grayscale(0.25);
}

.std-file-mark {
    flex-shrink: 0;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(241, 212, 151, 0.35);
    color: var(--std-gold-soft);
    font-weight: 900;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}

.std-main-copy {
    flex: 1;
    min-width: 0;
}

.std-main-label {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.75rem;
    font-weight: 800;
    color: rgba(241, 212, 151, 0.9);
}

.std-main-name {
    display: block;
    margin: 0;
    color: #fff;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.4;
}

.std-open-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    background: var(--std-gold);
    color: var(--std-green);
    font-size: 0.85rem;
    font-weight: 900;
    transition: transform 0.2s ease, background 0.2s ease;
}

.std-main-action:hover .std-open-btn {
    transform: translateX(-3px);
    background: var(--std-gold-soft);
}

.std-additions {
    margin: 0 1.25rem 1.35rem;
    padding: 1rem 1rem 0.35rem;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(238, 245, 242, 0.95), #fff);
    border: 1px dashed rgba(0, 77, 61, 0.18);
}

.std-additions-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0 0 0.85rem;
    padding: 0 0.25rem;
    font-size: 0.95rem;
    font-weight: 900;
    color: var(--std-green);
}

.std-additions-title::before {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: var(--std-gold);
    box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.2);
}

.std-add-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding-bottom: 0.65rem;
}

.std-add-action {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: #fff;
    border: 1px solid rgba(0, 77, 61, 0.08);
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.std-add-action:hover,
.std-add-action:focus-visible {
    border-color: rgba(197, 160, 89, 0.55);
    background: rgba(197, 160, 89, 0.06);
    transform: translateX(-4px);
}

.std-add-action:focus-visible {
    outline: 2px solid var(--std-gold);
    outline-offset: 2px;
}

.std-add-action.is-disabled {
    pointer-events: none;
    opacity: 0.5;
}

.std-add-index {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-size: 0.85rem;
    font-weight: 900;
    color: var(--std-gold);
    background: rgba(0, 77, 61, 0.06);
}

.std-add-copy {
    flex: 1;
    min-width: 0;
}

.std-add-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--std-muted);
    margin-bottom: 0.15rem;
}

.std-add-name {
    display: block;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--std-ink);
    line-height: 1.4;
}

.std-add-cta {
    flex-shrink: 0;
    font-size: 0.8rem;
    font-weight: 900;
    color: var(--std-green);
    opacity: 0.85;
}

.std-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    border-radius: 20px;
    border: 1px dashed rgba(0, 77, 61, 0.2);
    background: rgba(255, 255, 255, 0.7);
}

.std-empty p {
    margin: 0;
    color: var(--std-green);
    font-weight: 900;
    font-size: 1.1rem;
}

@keyframes stdRise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 640px) {
    .std-main-action,
    .std-add-action {
        flex-wrap: wrap;
    }

    .std-open-btn,
    .std-add-cta {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .std-dossier-head {
        padding: 1.15rem 1.15rem 0.9rem;
    }

    .std-main-action,
    .std-additions {
        margin-inline: 0.9rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .std-dossier,
    .std-main-action,
    .std-add-action,
    .std-open-btn {
        animation: none !important;
        transition: none !important;
    }

    .std-main-action:hover,
    .std-add-action:hover {
        transform: none;
    }
}
