/* Zodiac compatibility hub and sign pages; base layout and form styles come from natalna-karta.css. */

/* Score categories: every element with one of these classes takes its colors from the variables. */
.s5 { --level: #e8c99a; --level-text: #1a120c; }
.s4 { --level: #b89868; --level-text: #1a120c; }
.s3 { --level: #7a6448; --level-text: #fff3df; }
.s2 { --level: #4a3d33; --level-text: #f3e6d3; }
.s1 { --level: #5e3036; --level-text: #f6dcd6; }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* The navbar is sticky, so anchored headings stop below it. */
.tool-info h2[id] {
    scroll-margin-top: 76px;
}

.compatibility-intro {
    max-width: 560px;
    margin: 0;
    font-size: 17px;
    line-height: 1.5;
    color: #f3e6d0;
}

/* One line is always reserved, so a status message does not move the content below it. */
.compatibility-status {
    min-height: 1.5em;
    margin: 0;
    font-size: 18px;
    line-height: 1.5;
    color: #e8c99a;
}

.compatibility-result {
    width: 100%;
    max-width: 560px;
    box-sizing: border-box;
    padding: 22px 20px;
    border: 1px solid rgba(232, 201, 154, 0.35);
    border-radius: 18px;
    background: rgba(255, 248, 238, 0.05);
    text-align: center;
}

.pair-images {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.pair-images img {
    display: block;
    width: 110px;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
}

.pair-and {
    font-family: Georgia, serif;
    font-size: 30px;
    color: #e8c99a;
}

.compatibility-result .pair-title {
    margin: 12px 0 10px;
    font-family: Georgia, serif;
    font-size: 34px;
    color: #e8c99a;
}

.score-meter {
    display: block;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 248, 238, 0.12);
    overflow: hidden;
}

.score-meter > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--level);
}

.compatibility-result .score-meter {
    max-width: 320px;
    margin: 0 auto;
}

.pair-verdict {
    margin: 10px 0 12px;
    font-size: 18px;
    color: #f3e6d0;
}

.pair-verdict strong {
    font-size: 26px;
    color: #f0d7ae;
}

.pair-relation {
    margin: 8px 0;
    font-size: 16px;
    line-height: 1.55;
    color: #f3e6d0;
}

.compatibility-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}

.compatibility-actions a {
    display: inline-block;
    padding: 10px 18px;
    border: 1px solid rgba(232, 201, 154, 0.7);
    border-radius: 12px;
    color: #f6e7c8;
    font-size: 16px;
    text-decoration: none;
}

.compatibility-actions a:hover {
    background: rgba(232, 201, 154, 0.12);
}

/* 12 x 12 table; on narrow screens it scrolls sideways and the sign names stay in view. */
.compat-table-wrap {
    margin: 14px 0 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.compat-table-wrap:focus-visible {
    outline: 2px solid #e8c99a;
    outline-offset: 2px;
}

.compat-table {
    margin: 0 auto;
    border-collapse: separate;
    border-spacing: 2px;
    font-size: 15px;
}

.compat-table thead th {
    height: 78px;
    padding: 0 0 6px;
    vertical-align: bottom;
    font-size: 13px;
    font-weight: normal;
    color: #f0d7ae;
}

.compat-table thead th > span {
    display: inline-block;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    white-space: nowrap;
}

.compat-table thead th:first-child,
.compat-table tbody th {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #1a120c;
}

.compat-table tbody th {
    padding: 0 10px 0 4px;
    font-size: 14px;
    font-weight: normal;
    color: #f0d7ae;
    text-align: right;
    white-space: nowrap;
}

.compat-table td {
    width: 42px;
    min-width: 42px;
    padding: 0;
    border-radius: 6px;
    background: var(--level);
    color: var(--level-text);
    text-align: center;
}

.compat-table td a,
.compat-table td span {
    display: block;
    line-height: 36px;
    border-radius: 6px;
    color: inherit;
    text-decoration: none;
}

.compat-table td a:hover,
.compat-table td a:focus-visible {
    outline: 2px solid #fff3df;
    outline-offset: -2px;
}

.compat-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 16px;
    margin: 10px 0 4px;
    padding: 0;
    list-style: none;
    font-size: 14px;
    color: #e9dcc6;
}

.compat-legend li {
    display: flex;
    align-items: center;
    gap: 6px;
}

.compat-legend .swatch {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    background: var(--level);
}

.method-table {
    width: 100%;
    margin: 12px 0 14px;
    border-collapse: collapse;
    font-size: 16px;
}

.method-table caption {
    caption-side: bottom;
    padding-top: 8px;
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
    color: #cdbb9b;
}

.method-table th,
.method-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(232, 201, 154, 0.2);
    text-align: left;
}

.method-table th {
    font-weight: normal;
    color: #f0d7ae;
}

.method-table td:last-child,
.method-table th:last-child {
    text-align: right;
    white-space: nowrap;
}

.sign-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 14px 0 6px;
    padding: 0;
    list-style: none;
}

.sign-list li {
    padding: 12px 14px;
    border: 1px solid rgba(232, 201, 154, 0.35);
    border-radius: 14px;
    background: rgba(255, 248, 238, 0.04);
    font-size: 16px;
    line-height: 1.5;
}

.sign-list a,
.sign-list strong {
    display: block;
    margin-bottom: 4px;
    font-family: Georgia, serif;
    font-size: 18px;
    font-weight: normal;
    color: #f0d7ae;
}

.sign-hero {
    max-width: 760px;
    margin: 0 auto;
    gap: 16px;
}

.sign-hero img {
    display: block;
    width: 220px;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
}

.sign-hero .lead {
    margin: 0;
    font-size: 18px;
    line-height: 1.6;
    color: #f3e6d0;
}

.pair-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    max-width: 640px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pair-overview a {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px;
    border-radius: 12px;
    background: var(--level);
    color: var(--level-text);
    line-height: 1.3;
    text-decoration: none;
}

.pair-overview span {
    font-size: 15px;
}

.pair-overview strong {
    font-size: 18px;
}

.tool-info .pair-score {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 12px;
    margin: -4px 0 14px;
    font-size: 15px;
    color: #e9dcc6;
    text-align: center;
}

.pair-score .score-meter {
    width: 140px;
}

.pair-score strong {
    font-size: 17px;
    color: #f0d7ae;
}

.tool-info .pair-tip {
    margin: 4px 0 8px;
    padding: 10px 14px;
    border-left: 3px solid #e8c99a;
    border-radius: 0 10px 10px 0;
    background: rgba(232, 201, 154, 0.08);
}

.pair-tip strong {
    color: #f0d7ae;
}

.cta-box {
    margin: 32px 0 10px;
    padding: 20px;
    border: 1px solid rgba(232, 201, 154, 0.45);
    border-radius: 18px;
    background: rgba(255, 248, 238, 0.05);
    text-align: center;
}

.tool-info .cta-box p {
    margin-bottom: 16px;
}

.cta-link {
    display: inline-block;
    padding: 12px 24px;
    border: 1px solid #e8c99a;
    border-radius: 14px;
    color: #f6e7c8;
    font-size: 18px;
    text-decoration: none;
}

.tool-info .cta-link {
    text-decoration: none;
}

.cta-link:hover {
    background: rgba(232, 201, 154, 0.12);
}

.sign-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 12px 0;
    padding: 0;
    list-style: none;
}

.sign-links a,
.sign-links span {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid rgba(232, 201, 154, 0.35);
    border-radius: 999px;
    font-size: 16px;
    text-decoration: none;
}

.sign-links span {
    color: #a99a82;
}

.sign-links [aria-current] {
    border-color: #e8c99a;
    background: #e8c99a;
    color: #1a120c;
}

@media (max-width: 767px) {
    .sign-list {
        grid-template-columns: 1fr;
    }

    .sign-hero img {
        width: 180px;
    }

    .sign-hero .lead {
        font-size: 17px;
    }

    .pair-overview {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .compatibility-result .pair-title {
        font-size: 30px;
    }

    .pair-images img {
        width: 92px;
    }

    .compat-table td {
        width: 38px;
        min-width: 38px;
    }

    .compat-table td a,
    .compat-table td span {
        line-height: 34px;
    }
}
