/* rules.html page styles (moved from an inline <style> block so the CSP needs no unsafe-inline) */
.gradient-bg {
    background: linear-gradient(135deg, #fff9f5 0%, #ffede0 50%, #fef3c7 100%);
}
.text-gradient {
    background: linear-gradient(135deg, #ea580c, #d97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
/* Legal-review marker: quietest element on the page */
.legal {
    display: inline-block;
    font-size: 0.9375rem;
    line-height: 1.3;
    font-weight: 500;
    padding: 0.05rem 0.5rem;
    margin: 0 0.1rem;
    border-radius: 9999px;
    background: transparent;
    color: #64748b;
    border: 1px solid #e2e8f0;
    vertical-align: middle;
}
.rule h3 { font-family: 'Outfit', system-ui, sans-serif; }
section[id], article[id], li[id] { scroll-margin-top: 6rem; }

/* D-code superscript links → quiet amber chips */
sup a[href^="#dec-"] {
    display: inline-block;
    font-size: 0.9375rem;
    line-height: 1;
    font-weight: 600;
    font-family: 'Outfit', system-ui, sans-serif;
    padding: 0.15rem 0.4rem;
    border-radius: 9999px;
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
    text-decoration: none;
    vertical-align: middle;
    position: relative;
    top: -0.15em;
}
sup a[href^="#dec-"]:hover {
    background: #fef3c7;
    border-color: #fcd34d;
    text-decoration: none;
}
/* Legend sample chip in hero */
.d-chip-sample {
    display: inline-block;
    font-size: 0.9375rem;
    line-height: 1;
    font-weight: 600;
    font-family: 'Outfit', system-ui, sans-serif;
    padding: 0.15rem 0.4rem;
    border-radius: 9999px;
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
    vertical-align: middle;
}

/* Tables: subtle chrome */
.rules-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
    text-align: left;
}
.rules-table thead th {
    background: #fff7ed;
    color: #0f172a;
    font-weight: 600;
    padding: 0.75rem 1rem 0.75rem 0;
    border-bottom: 2px solid #fed7aa;
    white-space: nowrap;
}
.rules-table thead th:last-child { padding-right: 0.5rem; }
.rules-table tbody td {
    padding: 0.75rem 1rem 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
}
.rules-table tbody td:last-child { padding-right: 0.5rem; }
.rules-table tbody tr:nth-child(even):not(.rules-table-group):not(.rules-table-total) {
    background: rgba(255, 249, 245, 0.55);
}
.rules-table .num,
.rules-table td.text-center,
.rules-table th.text-center,
.rules-table td.text-right,
.rules-table th.text-right {
    font-variant-numeric: tabular-nums;
}
.rules-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

/* Open decisions aside — quiet amber pattern */
.open-decisions {
    margin-top: 2.5rem;
    border-radius: 1rem;
    border: 1px solid #fcd34d;
    background: #fffbeb;
    padding: 1rem 1.25rem;
}
.open-decisions__label {
    font-size: 0.9375rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #92400e;
    margin-bottom: 0.75rem;
}
.open-decisions ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.open-decisions li {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    font-size: 1rem;
    line-height: 1.625;
    color: #475569;
}
.open-decisions .d-pill {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    padding: 0.15rem 0.45rem;
    border-radius: 9999px;
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
    font-size: 0.9375rem;
    font-weight: 700;
    font-family: 'Outfit', system-ui, sans-serif;
    line-height: 1.2;
}

/* Section jump chips */
.rules-toc {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}
.rules-toc a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.9rem;
    border-radius: 9999px;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.25;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #0f172a;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,.05);
    transition: background-color .15s, border-color .15s, color .15s;
    white-space: nowrap;
}
.rules-toc a:hover {
    background: #fff7ed;
    border-color: #fdba74;
    color: #c2410c;
}
.rules-toc a.rules-toc--primary {
    background: #0f172a;
    color: #fff;
    border-color: #0f172a;
}
.rules-toc a.rules-toc--primary:hover {
    background: #1e293b;
    border-color: #1e293b;
    color: #fff;
}
.rules-toc .toc-short { display: inline; }
.rules-toc .toc-full { display: none; }
@media (min-width: 640px) {
    .rules-toc a { font-size: 1rem; padding: 0.55rem 1.1rem; }
    .rules-toc .toc-short { display: none; }
    .rules-toc .toc-full { display: inline; }
}
