/* ==========================================================================
   RoyJobs — Privacy Policy page
   Builds on the module design tokens (assets/css/styles.css)
   ========================================================================== */

/* --- Policy hero ----------------------------------------------------------- */
.policy-hero {
    border-radius: var(--radius-xl);
    padding: clamp(1.6rem, 4vw, 3rem);
    background: linear-gradient(135deg, #2f3d2a 0%, #22301f 45%, #16221a 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
    margin-bottom: 1.2rem;
}

.policy-hero::after {
    content: "";
    position: absolute;
    inset: auto -60px -80px auto;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.35), transparent 65%);
    pointer-events: none;
}

.policy-hero .kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.75);
}

.policy-hero .kicker-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.25);
}

.policy-hero h1 {
    color: #fff;
    font-size: clamp(1.7rem, 3.4vw, 2.5rem);
    line-height: 1.1;
    margin: 0.8rem 0 0.9rem;
    max-width: 720px;
}

.policy-hero p {
    color: rgba(255, 255, 255, 0.84);
    max-width: 640px;
    line-height: 1.65;
    margin: 0 0 1.1rem;
}

.policy-hero strong {
    color: #fff;
}

.policy-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.policy-meta .pill {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.9);
}

/* --- Layout ---------------------------------------------------------------- */
.policy-layout {
    display: grid;
    grid-template-columns: 268px minmax(0, 1fr);
    gap: 1.2rem;
    align-items: start;
    min-width: 0;
}

.policy-toc {
    position: sticky;
    top: 84px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.1rem 1rem;
    box-shadow: var(--shadow-sm);
}

.policy-toc h2 {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin: 0 0 0.7rem;
}

.policy-toc ol {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: toc;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.policy-toc li {
    counter-increment: toc;
}

.policy-toc a {
    display: block;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm);
    color: var(--text);
    text-decoration: none;
    font-size: 0.85rem;
    line-height: 1.35;
    transition: 0.15s ease;
}

.policy-toc a::before {
    content: counter(toc) ". ";
    color: var(--muted);
    font-weight: 700;
}

.policy-toc a:hover {
    background: var(--lime-soft);
    color: var(--lime-strong);
}

/* --- Content --------------------------------------------------------------- */
.policy-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.policy-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.4rem;
    box-shadow: var(--shadow-sm);
    scroll-margin-top: 84px;
}

.policy-card>h2 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.2rem;
    margin: 0 0 0.9rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--line);
}

.policy-card>h2 .num {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--primary), var(--lime));
    color: #fff;
    font-size: 0.86rem;
}

.policy-card h3 {
    font-size: 0.95rem;
    margin: 1.1rem 0 0.4rem;
}

.policy-card h3:first-of-type {
    margin-top: 0;
}

.policy-card p,
.policy-card li {
    color: var(--text);
    line-height: 1.7;
    font-size: 0.92rem;
}

.policy-card p {
    margin: 0 0 0.8rem;
}

.policy-card ul,
.policy-card ol {
    margin: 0 0 0.8rem;
    padding-left: 1.2rem;
}

.policy-card li {
    margin-bottom: 0.35rem;
}

.policy-card li::marker {
    color: var(--lime-strong);
    font-weight: 700;
}

.policy-card a {
    color: var(--teal);
    font-weight: 600;
}

/* Summary strip at the top of the page */
.policy-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.8rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.policy-summary li {
    margin: 0;
    padding: 0.9rem 1rem;
    border-radius: var(--radius);
    background: var(--bg-soft);
    border: 1px solid var(--line);
    font-size: 0.88rem;
    line-height: 1.55;
}

.policy-summary .ico {
    display: block;
    font-size: 1.3rem;
    margin-bottom: 0.35rem;
}

.policy-summary strong {
    color: var(--ink);
}

/* Callouts */
.policy-note {
    display: flex;
    gap: 0.75rem;
    padding: 0.95rem 1.05rem;
    border-radius: var(--radius);
    background: var(--primary-soft);
    border: 1px solid #fcd34d;
    font-size: 0.88rem;
    line-height: 1.6;
    margin: 0 0 0.9rem;
}

.policy-note.tip {
    background: var(--lime-soft);
    border-color: #bef264;
}

.policy-note .ico {
    font-size: 1.15rem;
    line-height: 1.3;
}

.policy-note p {
    margin: 0;
    font-size: 0.88rem;
}

/* Data table */
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin: 0 0 0.9rem;
}

.policy-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 520px;
    font-size: 0.86rem;
}

.policy-table th,
.policy-table td {
    text-align: left;
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    line-height: 1.55;
}

.policy-table th {
    background: var(--bg-soft);
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
}

.policy-table tr:last-child td {
    border-bottom: 0;
}

.policy-table td:first-child {
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
}

/* Contact block */
.policy-contact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.8rem;
    margin-top: 0.4rem;
}

.policy-contact .item {
    padding: 0.9rem 1rem;
    border-radius: var(--radius);
    background: var(--lime-soft);
    border: 1px solid #bef264;
    font-size: 0.88rem;
    line-height: 1.5;
}

.policy-contact .item span {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 800;
    color: var(--lime-strong);
    margin-bottom: 0.25rem;
}

.policy-contact a {
    color: var(--ink);
    text-decoration: none;
    font-weight: 700;
    word-break: break-word;
}

.policy-contact a:hover {
    text-decoration: underline;
}

/* Related links footer */
.policy-links {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 0.3rem;
}

/* Back-to-top */
.policy-top {
    position: fixed;
    right: 1.1rem;
    bottom: 1.1rem;
    z-index: 60;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--ink);
    font-size: 1.05rem;
    cursor: pointer;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transition: 0.2s ease;
}

.policy-top.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.policy-top:hover {
    background: var(--lime-soft);
    color: var(--lime-strong);
}

/* --- Responsive ------------------------------------------------------------ */
@media (max-width: 980px) {
    .policy-layout {
        grid-template-columns: 1fr;
    }

    .policy-toc {
        position: static;
    }

    .policy-toc ol {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    }
}

@media (max-width: 720px) {
    .policy-card {
        padding: 1.1rem;
    }

    .policy-card>h2 {
        font-size: 1.08rem;
    }
}

/* --- Dark mode ------------------------------------------------------------- */
html[data-bs-theme="dark"] .policy-note {
    background: #2f2708;
    border-color: #4d3d0b;
}

html[data-bs-theme="dark"] .policy-note.tip {
    background: #1e2b09;
    border-color: #33460f;
}

html[data-bs-theme="dark"] .policy-contact .item {
    background: #1e2b09;
    border-color: #33460f;
}

html[data-bs-theme="dark"] .policy-contact a {
    color: var(--ink);
}

html[data-bs-theme="dark"] .policy-toc a:hover {
    background: #24320a;
    color: #bef264;
}