.legacy-page {
    display: grid;
    gap: 1.5rem;
    padding-block: 1.5rem 3rem;
}

.legacy-page__header {
    display: grid;
    gap: 0.9rem;
    padding: 1.5rem;
    border: 1px solid rgba(34, 90, 120, 0.14);
    border-radius: 1.5rem;
    background:
        radial-gradient(circle at top left, rgba(46, 167, 210, 0.16), transparent 38%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 250, 252, 0.96));
    box-shadow: 0 18px 40px rgba(24, 67, 90, 0.08);
}

.legacy-page__eyebrow {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(46, 167, 210, 0.12);
    color: #155e75;
    font-size: 0.85rem;
    font-weight: 700;
}

.legacy-page__title {
    margin: 0;
    color: #11394c;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    line-height: 1.2;
}

.legacy-page__lead {
    margin: 0;
    max-width: 62rem;
    color: #305368;
    font-size: 1.05rem;
    line-height: 1.8;
}

.legacy-page__actions,
.sentence-toolbar,
.sentence-detail__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.legacy-action-button,
.sentence-nav-link,
.sentence-card__open-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.7rem 1rem;
    border: 1px solid rgba(17, 57, 76, 0.14);
    border-radius: 999px;
    background: #fff;
    color: #11394c;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.legacy-action-button:hover,
.sentence-nav-link:hover,
.sentence-card__open-link:hover {
    transform: translateY(-1px);
    border-color: rgba(46, 167, 210, 0.55);
    box-shadow: 0 12px 24px rgba(17, 57, 76, 0.08);
    text-decoration: none;
}

.legacy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.legacy-panel,
.legacy-card,
.stats-card {
    padding: 1.25rem;
    border: 1px solid rgba(17, 57, 76, 0.1);
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 30px rgba(17, 57, 76, 0.06);
}

.legacy-card h2,
.legacy-panel h2,
.legacy-panel h3,
.stats-card h2,
.stats-card h3 {
    margin-top: 0;
    color: #11394c;
}

.legacy-panel p,
.legacy-panel li,
.legacy-card p,
.stats-card p {
    color: #305368;
    line-height: 1.8;
}

.guide-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.guide-nav a {
    display: inline-flex;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: rgba(17, 57, 76, 0.06);
    color: #11394c;
    text-decoration: none;
    font-weight: 600;
}

.guide-nav a:hover {
    background: rgba(46, 167, 210, 0.14);
    text-decoration: none;
}

.guide-table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 1rem;
    background: #fff;
}

.guide-table th,
.guide-table td {
    padding: 0.8rem 0.9rem;
    border: 1px solid rgba(17, 57, 76, 0.08);
    vertical-align: top;
    text-align: right;
}

.guide-table th {
    background: rgba(46, 167, 210, 0.12);
    color: #11394c;
    font-size: 0.92rem;
}

.guide-table td strong {
    color: #11394c;
}

.guide-table__arabic {
    font-size: 1.6rem;
    color: #0e7a55;
}

.guide-table__hebrew {
    font-size: 1.2rem;
    color: #1565c0;
}

.guide-table__latin {
    color: #b85c00;
    direction: ltr;
    text-align: left;
    font-weight: 700;
}

.guide-note,
.stats-note {
    padding: 1rem 1.15rem;
    border-right: 4px solid #2ea7d2;
    border-radius: 0.95rem;
    background: rgba(46, 167, 210, 0.08);
    color: #305368;
}

.guide-hero {
    position: relative;
    overflow: hidden;
}

.guide-page .legacy-page__header::after {
    content: "";
    position: absolute;
    inset-inline-start: auto;
    inset-inline-end: -6rem;
    inset-block-end: -6rem;
    width: 16rem;
    height: 16rem;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(14, 122, 85, 0.12), transparent 70%);
    pointer-events: none;
}

.guide-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.guide-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(14, 122, 85, 0.12);
    color: #0d6b4a;
    font-weight: 700;
}

.guide-intro-grid {
    align-items: stretch;
}

.guide-section-heading {
    display: grid;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.guide-section-heading p {
    margin: 0;
}

.guide-word-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.guide-word-card {
    display: grid;
    gap: 0.4rem;
    padding: 1rem;
    border: 1px solid rgba(17, 57, 76, 0.1);
    border-radius: 1.1rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 250, 252, 0.98)),
        linear-gradient(135deg, rgba(20, 128, 78, 0.06), rgba(46, 167, 210, 0.08));
    box-shadow: 0 14px 30px rgba(17, 57, 76, 0.06);
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.guide-word-card:hover {
    transform: translateY(-2px);
    border-color: rgba(20, 128, 78, 0.28);
    box-shadow: 0 18px 34px rgba(17, 57, 76, 0.1);
    text-decoration: none;
}

.guide-word-card__tag {
    width: fit-content;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: rgba(17, 57, 76, 0.08);
    color: #24536a;
    font-size: 0.82rem;
    font-weight: 700;
}

.guide-word-card__hebrew {
    color: #11394c;
    font-size: 1.1rem;
}

.guide-word-card__arabic {
    color: #0e7a55;
    font-size: 1.75rem;
    line-height: 1.2;
}

.guide-word-card__transliteration {
    color: #1565c0;
    font-weight: 700;
}

.guide-word-card__definition {
    color: #466679;
    line-height: 1.7;
}

.about-page .legacy-page__header {
    background:
        radial-gradient(circle at top right, rgba(14, 122, 85, 0.18), transparent 34%),
        radial-gradient(circle at bottom left, rgba(46, 167, 210, 0.12), transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 251, 249, 0.98));
}

.about-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.about-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(14, 122, 85, 0.12);
    color: #0d6b4a;
    font-weight: 700;
}

.about-overview-grid,
.about-detail-grid,
.about-rights-grid {
    align-items: stretch;
}

.about-card,
.about-rights-card,
.about-value-card {
    height: 100%;
}

.about-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.about-timeline__item {
    padding: 1.1rem;
    border: 1px solid rgba(17, 57, 76, 0.1);
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 26px rgba(17, 57, 76, 0.06);
}

.about-timeline__year {
    display: inline-flex;
    margin-bottom: 0.7rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(17, 57, 76, 0.08);
    color: #24536a;
    font-weight: 800;
}

.about-timeline__item h3,
.about-rights-card h3,
.about-value-card h3 {
    margin: 0 0 0.45rem;
    color: #11394c;
}

.about-timeline__item p,
.about-rights-card p,
.about-value-card p {
    margin: 0;
    color: #305368;
    line-height: 1.8;
}

.about-steps {
    display: grid;
    gap: 0.8rem;
    margin: 0;
    padding-inline-start: 1.2rem;
    color: #305368;
}

.about-steps li {
    line-height: 1.8;
}

.about-values {
    display: grid;
    gap: 0.85rem;
}

.about-value-card {
    padding: 1rem;
    border: 1px solid rgba(17, 57, 76, 0.09);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.94);
}

.about-entry-preview {
    display: grid;
    gap: 1rem;
}

.about-entry-preview__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.about-preview-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(17, 57, 76, 0.08);
    background: rgba(255, 255, 255, 0.98);
    color: #24536a;
    font-weight: 700;
}

.about-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.about-rights-panel .guide-note a {
    color: inherit;
    font-weight: 800;
}

.sentence-list {
    display: grid;
    gap: 1rem;
}

.sentence-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.8rem;
}

.sentence-card__id {
    color: #537286;
    font-size: 0.9rem;
}

.sentence-box__arabic--linked a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.7rem;
    min-height: 2rem;
    margin-inline: 0.05rem;
    padding: 0.16rem 0.2rem;
    border-radius: 0.45rem;
    color: #14804e;
    text-decoration: none;
    border-bottom: 1px solid rgba(20, 128, 78, 0.28);
    vertical-align: middle;
}

.sentence-box__arabic--linked a:hover {
    color: #a73737;
    border-bottom-color: rgba(167, 55, 55, 0.42);
    background: rgba(255, 225, 0, 0.22);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.stats-card__value {
    display: block;
    color: #11394c;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 800;
    line-height: 1.15;
}

.stats-card__label {
    display: block;
    margin-top: 0.45rem;
    color: #24536a;
    font-weight: 700;
}

.archive-table {
    width: 100%;
    border-collapse: collapse;
}

.archive-table th,
.archive-table td {
    padding: 0.8rem 0.9rem;
    border-bottom: 1px solid rgba(17, 57, 76, 0.08);
    text-align: right;
}

.archive-table th {
    color: #11394c;
    font-size: 0.92rem;
}

.transliteration-hidden [data-sentence-transliteration] {
    display: none;
}

@media (max-width: 720px) {
    .legacy-page {
        padding-block-start: 1rem;
    }

    .legacy-page__header,
    .legacy-panel,
    .legacy-card,
    .stats-card {
        padding: 1rem;
        border-radius: 1rem;
    }

    .guide-table {
        display: block;
        overflow-x: auto;
    }

    .sentence-detail__nav {
        justify-content: flex-start;
    }

    .guide-pill-row,
    .guide-nav,
    .about-hero__badges,
    .about-entry-preview__chips,
    .about-actions {
        gap: 0.5rem;
    }

    .guide-pill,
    .guide-nav a,
    .about-badge,
    .about-preview-chip {
        width: fit-content;
        max-width: 100%;
    }
}
