/* guide.css - policy and guide page styles */

.policy-page {
    flex: 1;
    overflow-x: clip;
}

.policy-shell {
    padding-bottom: 3rem;
    overflow-x: clip;
}

.policy-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

.policy-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0.35rem 0.8rem;
    border-radius: var(--radius-full);
    background: #e0f2fe;
    color: #0369a1;
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.policy-meta {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.policy-section + .policy-section {
    margin-top: 1.75rem;
    padding-top: 1.75rem;
    border-top: 1px solid #e2e8f0;
}

.policy-section h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1.1;
    margin-bottom: 0.9rem;
}

.policy-section h2 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.policy-section p {
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.75;
}

.policy-section p + p {
    margin-top: 0.9rem;
}

.policy-toc {
    margin-top: 1.25rem;
    padding: 1rem 1.1rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    background: #f8fafc;
}

.policy-toc h2 {
    font-size: 1rem;
    margin-bottom: 0.65rem;
}

.policy-toc ul,
.policy-link-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.policy-toc ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.55rem 0.85rem;
}

.policy-toc a {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    color: var(--accent-primary);
    font-weight: 700;
}

.policy-list {
    margin-top: 0.9rem;
    padding-left: 1.25rem;
    list-style: disc;
}

.policy-list li {
    color: var(--text-primary);
    line-height: 1.7;
}

.policy-list li + li {
    margin-top: 0.55rem;
}

.policy-subsection {
    margin-top: 1.1rem;
}

.policy-subsection h3 {
    font-size: 1.05rem;
    margin-bottom: 0.45rem;
}

.policy-link-list {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.policy-link-list li {
    padding: 0.95rem 1rem;
    border-radius: var(--radius-md);
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.policy-link-list span {
    display: block;
    margin-top: 0.3rem;
    color: var(--text-secondary);
    font-weight: 600;
    line-height: 1.55;
}

.policy-figure {
    margin-top: 1.1rem;
    margin-left: auto;
    margin-right: auto;
    max-width: 760px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.policy-figure-compact {
    max-width: 620px;
}

.policy-figure-tiny {
    max-width: 460px;
}

.policy-figure-wide-preview {
    max-width: 560px;
}

.policy-figure-step-pair {
    display: inline-block;
    width: calc(50% - 0.55rem);
    max-width: 280px;
    margin-left: 0;
    margin-right: 0.75rem;
    vertical-align: top;
}

.policy-figure-step-pair + .policy-figure-step-pair {
    margin-right: 0;
}

.policy-figure img {
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    object-fit: contain;
    background: linear-gradient(135deg, #e0f2fe, #f8fafc 45%, #dcfce7);
}

@media (max-width: 680px) {
    .policy-figure-step-pair {
        display: block;
        width: 100%;
        max-width: 360px;
        margin-left: auto;
        margin-right: auto;
    }

    .policy-figure-step-pair + .policy-figure-step-pair {
        margin-right: auto;
    }
}

.policy-figure picture {
    display: block;
}

.guide-image-trigger {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.guide-image-trigger picture,
.guide-image-trigger img {
    display: block;
    width: 100%;
}

.guide-image-hint {
    position: absolute;
    right: 0.7rem;
    bottom: 0.7rem;
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.82);
    color: #f8fafc;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.policy-figure figcaption {
    padding: 0.75rem 0.9rem;
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.5;
}

.policy-callout {
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    border-radius: var(--radius-md);
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.policy-callout strong,
.policy-section strong {
    color: var(--text-primary);
}

.policy-section a,
.policy-callout a {
    color: var(--accent-primary);
    font-weight: 700;
}

.policy-section a:hover,
.policy-callout a:hover {
    color: var(--accent-hover);
}

.guide-code-shell {
    position: relative;
    margin-top: 1rem;
}

.guide-copy-btn {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 36px;
    padding: 0.45rem 0.8rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.88);
    color: #f8fafc;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.guide-copy-btn:hover {
    background: rgba(30, 41, 59, 0.96);
}

.guide-copy-btn.is-copied {
    background: rgba(22, 163, 74, 0.92);
    border-color: rgba(34, 197, 94, 0.55);
}

.guide-code-block {
    margin: 0;
    padding: 4rem 1.1rem 1.15rem;
    overflow: auto;
    border-radius: var(--radius-md);
    background: #0f172a;
    color: #f8fafc;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    max-width: 100%;
    min-height: 280px;
}

.guide-code-block code {
    display: block;
}

.guide-code-line {
    display: block;
}

.guide-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.92);
}

.guide-lightbox[hidden] {
    display: none;
}

.guide-lightbox-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.guide-lightbox-inner img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0.75rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    background: #0f172a;
}

.guide-lightbox-close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    z-index: 1;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 1.9rem;
    line-height: 1;
    cursor: pointer;
}

body.guide-lightbox-open {
    overflow: hidden;
}

.guide-code-block-json-list {
    white-space: pre;
    word-break: normal;
    overflow-x: auto;
}
