/*
 * policy-page.css
 * AI Usage Policy / Editorial Guidelines ページ専用スタイル。
 * about-page.css の補完として使用。Replace 表 (NG/OK) と、
 * 禁止フレーミング・原則注記のビジュアル区別を提供する。
 */

.policy-replace-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
    color: var(--text-muted);
    overflow-x: auto;
    display: block;
}

.policy-replace-table thead {
    display: table-header-group;
}

.policy-replace-table tbody {
    display: table-row-group;
}

.policy-replace-table th,
.policy-replace-table td {
    padding: 12px;
    border: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
    line-height: 1.7;
}

.policy-replace-table th {
    background: var(--surface-2);
    font-weight: 700;
    color: var(--text-primary);
    font-size: 13px;
}

.policy-replace-table td:nth-child(2) {
    color: #fda4a4;
}

.policy-replace-table td:nth-child(3) {
    color: #86efac;
}

@media (max-width: 640px) {
    .policy-replace-table {
        font-size: 13px;
    }
    .policy-replace-table th,
    .policy-replace-table td {
        padding: 8px;
    }
}

.policy-section-note {
    background: var(--surface-2);
    border-left: 3px solid var(--accent-light);
    padding: 12px 16px;
    margin: 16px 0;
    font-size: 14px;
    color: var(--text-muted);
    border-radius: 0 4px 4px 0;
    line-height: 1.75;
}

.policy-banned-block {
    background: rgba(239, 68, 68, 0.06);
    border-left: 3px solid #ef4444;
    padding: 12px 16px;
    margin: 12px 0;
    border-radius: 0 4px 4px 0;
    color: var(--text-muted);
    line-height: 1.85;
    font-size: 14px;
}

.policy-section-highlight {
    color: var(--accent-light);
    font-weight: 700;
}

.policy-guideline-list {
    background: rgba(124, 58, 237, 0.06);
    border-left: 3px solid var(--primary);
    padding: 12px 20px 12px 32px;
    margin: 12px 0;
    border-radius: 0 4px 4px 0;
}

.policy-guideline-list li {
    color: var(--text-muted);
    margin-bottom: 6px;
    line-height: 1.75;
}

.policy-toc {
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: 16px 20px;
    margin: 24px 0;
    border-radius: 8px;
}

.policy-toc h3 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-hint);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.policy-toc ul {
    list-style: none;
    padding-left: 0;
    margin-top: 0;
}

.policy-toc li {
    margin-bottom: 8px;
    padding-left: 0;
}

.policy-toc a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.policy-toc a:hover,
.policy-toc a:focus-visible {
    color: var(--accent-light);
    border-bottom-color: var(--accent-light);
    outline: none;
}

.policy-subsection {
    margin-top: 24px;
}

.policy-subsection h3 {
    font-size: clamp(16px, 2.4vw, 19px);
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

/* Reading time hint inside eyebrow */
.policy-reading-time {
    color: var(--text-hint);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.05em;
    margin-left: 8px;
    text-transform: none;
}

/* CTA-style internal link (used in ai-policy §2.2 to highlight the "full guidelines" route) */
.policy-cta-link {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 20px;
    background: var(--primary);
    color: #fff !important;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    border: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.policy-cta-link:hover,
.policy-cta-link:focus-visible {
    opacity: 0.85;
    outline: none;
    border-bottom: none;
    transform: translateY(-1px);
}

/* Mobile (<= 600px): convert Replace table to vertical card list so NG/OK are side-by-side legible */
@media (max-width: 600px) {
    .policy-replace-table {
        display: block;
        border: none;
        overflow: visible;
    }
    .policy-replace-table thead {
        display: none;
    }
    .policy-replace-table tbody {
        display: block;
    }
    .policy-replace-table tr {
        display: block;
        margin-bottom: 16px;
        padding: 12px 14px;
        background: var(--surface-2);
        border-radius: 8px;
        border: 1px solid var(--border);
    }
    .policy-replace-table td {
        display: block;
        padding: 4px 0;
        border: none;
        line-height: 1.7;
    }
    .policy-replace-table td:nth-child(1) {
        font-weight: 700;
        color: var(--text-primary);
        font-size: 13px;
        margin-bottom: 6px;
    }
    .policy-replace-table td:nth-child(2)::before {
        content: "✗ NG: ";
        color: #fda4a4;
        font-weight: 600;
    }
    .policy-replace-table td:nth-child(3)::before {
        content: "✓ OK: ";
        color: #86efac;
        font-weight: 600;
    }
}
