:root {
    --navy: #14304a;
    --navy-light: #1e4d6e;
    --navy-muted: #2a6690;
    --slate: #475c6f;
    --slate-light: #3d4f5f;
    --muted: #7a8d9e;
    --border: #d8e1e8;
    --bg: #f0f3f6;
    --card: #ffffff;
    --accent: #2d8cc4;
    --accent-warm: #d4a94e;
    --text: #1f2e3c;
    --radius: 16px;
    --shadow: 0 1px 3px rgba(14,30,50,.06), 0 8px 24px rgba(14,30,50,.07);
    --shadow-lg: 0 2px 6px rgba(14,30,50,.06), 0 16px 40px rgba(14,30,50,.10);
    --max-w: 960px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 15px;
}

.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 28px;
}

/* ── Accent bar ── */
.accent-bar {
    height: 3px;
    background: linear-gradient(90deg, var(--navy) 0%, var(--accent) 50%, var(--accent-warm) 100%);
}

/* ── Header ── */
.site-header {
    background: var(--card);
    padding: 28px 0;
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-logo {
    width: clamp(120px, 16vw, 180px);
    height: auto;
    flex-shrink: 0;
}

.header-meta {
    min-width: 0;
}

.site-header h1 {
    font-size: clamp(20px, 2.8vw, 26px);
    font-weight: 800;
    color: var(--navy);
    letter-spacing: .02em;
    line-height: 1.2;
}

.header-sub {
    margin-top: 6px;
    font-size: 13px;
    color: var(--slate-light);
    letter-spacing: .04em;
}

/* ── Main ── */
.main {
    padding: 40px 28px 48px;
}

/* ── Month card ── */
.month-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.month-card + .month-card {
    margin-top: 24px;
}

.month-card.is-latest {
    box-shadow: var(--shadow-lg);
    border-color: rgba(20,48,74,.15);
}

.month-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, #fafbfc, #f5f7f9);
}

.month-date {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.month-year {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: .06em;
}

.month-num {
    font-size: 22px;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -.01em;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
}

.status-badge.is-published {
    background: rgba(20,48,74,.07);
    color: var(--navy-light);
}

.status-badge.is-published::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #3aaf6a;
    flex-shrink: 0;
}

.status-badge.is-pending {
    background: rgba(212,169,78,.10);
    color: #9a7a28;
}

.status-badge.is-pending::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-warm);
    flex-shrink: 0;
}

.month-card.is-upcoming {
    border-style: dashed;
    border-color: #d0d8e0;
    background: linear-gradient(180deg, rgba(255,255,255,.7), rgba(244,247,250,.8));
    box-shadow: none;
}

.month-card.is-upcoming .month-header {
    background: transparent;
    border-bottom-style: dashed;
}

.month-body {
    padding: 24px 28px 28px;
}

.month-body h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 18px;
}

/* ── Metrics ── */
.metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.metric {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 8px 14px;
    background: #f4f7fa;
    border: 1px solid #e8edf2;
    border-radius: 10px;
}

.metric-val {
    font-size: 18px;
    font-weight: 800;
    color: var(--navy);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.metric-label {
    font-size: 12px;
    color: var(--slate-light);
    white-space: nowrap;
}

/* ── Summary & Actions ── */
.month-summary {
    color: var(--slate);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 20px;
}

.month-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 20px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--navy);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all .15s ease;
    cursor: pointer;
}

.btn:hover {
    border-color: #c0cdd8;
    box-shadow: 0 2px 8px rgba(14,30,50,.08);
}

.btn-primary {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}

.btn-primary:hover {
    background: var(--navy-light);
    border-color: var(--navy-light);
    box-shadow: 0 4px 12px rgba(20,48,74,.20);
}

/* ── Reference ── */
.reference {
    background: var(--card);
    border-top: 1px solid var(--border);
    padding: 28px 0;
}

.reference-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.reference-text p {
    font-size: 13px;
    color: var(--slate);
    line-height: 1.6;
}

.reference-text p.reference-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 4px;
}

.reference-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* ── Footer ── */
.site-footer {
    border-top: 1px solid var(--border);
    background: #f8fafb;
    padding: 22px 0 28px;
}

.footer-inner {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
}

.footer-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--slate);
}

.footer-sub {
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
}

.footer-credit {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.credit-label {
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
}

.footer-credit strong {
    font-size: 13px;
    color: var(--navy);
}

/* ── Responsive ── */
@media (max-width: 720px) {
    .container { padding: 0 20px; }
    .main { padding: 28px 20px 36px; }

    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .site-logo { width: 140px; }

    .month-header,
    .month-body {
        padding-left: 20px;
        padding-right: 20px;
    }

    .metrics { gap: 8px; }

    .metric {
        padding: 6px 10px;
    }

    .metric-val { font-size: 16px; }

    .month-actions {
        flex-direction: column;
    }

    .month-actions .btn {
        width: 100%;
    }

    .reference-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .reference-actions {
        flex-direction: column;
        width: 100%;
    }

    .reference-actions .btn {
        width: 100%;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-credit {
        align-items: flex-start;
    }
}

/* ══════════════════════════════════════════════════
   Guide page
   ══════════════════════════════════════════════════ */

.guide {
    padding: 32px 28px 64px;
}

.breadcrumb {
    margin-bottom: 22px;
}

.breadcrumb a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--slate);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color .15s;
}

.breadcrumb a:hover {
    color: var(--navy);
}

.breadcrumb svg {
    display: block;
}

.guide-header {
    margin-bottom: 22px;
}

.guide-title {
    font-size: clamp(24px, 3.6vw, 30px);
    font-weight: 800;
    color: var(--navy);
    letter-spacing: .01em;
    line-height: 1.25;
}

.guide-subtitle {
    margin-top: 6px;
    font-size: 13px;
    color: var(--muted);
    letter-spacing: .04em;
}

.guide-intro {
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 12px;
    padding: 18px 22px;
    margin-bottom: 28px;
    color: var(--slate);
    font-size: 14.5px;
    line-height: 1.75;
}

.guide-intro strong {
    color: var(--navy);
}

/* ── TOC ── */
.guide-toc {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 28px;
}

.toc-title {
    font-size: 10px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 10px;
}

.guide-toc ol {
    list-style: none;
    counter-reset: toc;
    display: flex;
    flex-direction: column;
}

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

.guide-toc a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 0;
    color: var(--navy);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color .15s;
    border-bottom: 1px dashed transparent;
}

.guide-toc li + li a {
    border-top: 1px dashed #e8edf2;
}

.guide-toc a::before {
    content: counter(toc);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: #f0f3f6;
    color: var(--navy);
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
}

.guide-toc a:hover {
    color: var(--accent);
}

.guide-toc a:hover::before {
    background: rgba(45,140,196,.12);
}

/* ── Section ── */
.guide-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px 36px 36px;
    margin-bottom: 22px;
    scroll-margin-top: 20px;
}

.guide-section h2 {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 22px;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 18px;
    letter-spacing: .01em;
}

.section-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(180deg, var(--navy), var(--navy-light));
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    flex-shrink: 0;
}

.guide-section h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--navy);
    margin: 26px 0 12px;
}

.guide-section > p,
.guide-section > ol > li,
.guide-section > ul > li {
    color: var(--slate);
    font-size: 14.5px;
    line-height: 1.8;
}

.guide-section > p {
    margin-bottom: 12px;
}

.guide-section strong {
    color: var(--navy);
    font-weight: 700;
}

.guide-section code {
    background: #eef2f6;
    border: 1px solid #dde3ea;
    color: var(--navy-light);
    padding: 1px 6px;
    border-radius: 5px;
    font-family: "SF Mono", "Menlo", "Consolas", monospace;
    font-size: 13px;
}

/* ── Credential card ── */
.credential-card {
    background: linear-gradient(180deg, #fafcfe, #f3f7fa);
    border: 1px solid #dbe3ea;
    border-radius: 14px;
    padding: 8px 24px 20px;
    margin-bottom: 18px;
}

.cred-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px dashed #dde5ec;
}

.cred-row:last-of-type {
    border-bottom: none;
}

.cred-label {
    font-size: 10px;
    font-weight: 800;
    color: var(--muted);
    letter-spacing: .14em;
    text-transform: uppercase;
    width: 68px;
    flex-shrink: 0;
}

.cred-url {
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    word-break: break-all;
    flex: 1;
}

.cred-url:hover {
    text-decoration: underline;
}

.cred-url svg {
    flex-shrink: 0;
    opacity: .6;
}

.cred-value {
    flex: 1;
    font-family: "SF Mono", "Menlo", "Consolas", monospace;
    font-size: 15.5px;
    font-weight: 600;
    color: var(--navy);
    background: none;
    border: none;
    padding: 0;
    letter-spacing: .02em;
    word-break: break-all;
    user-select: all;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--navy);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    flex-shrink: 0;
    font-family: inherit;
}

.copy-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.copy-btn svg {
    display: block;
}

.copy-btn .icon-check { display: none; }
.copy-btn.is-copied { border-color: #3aaf6a; color: #3aaf6a; }
.copy-btn.is-copied .icon-copy { display: none; }
.copy-btn.is-copied .icon-check { display: block; }

.cred-updated {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    padding: 6px 12px;
    background: rgba(45,140,196,.08);
    border-radius: 999px;
    font-size: 12px;
    color: var(--navy-muted);
    font-weight: 600;
}

.cred-updated svg {
    opacity: .8;
}

/* ── Callouts ── */
.callout {
    display: flex;
    gap: 14px;
    padding: 16px 20px;
    border-radius: 12px;
    margin: 14px 0;
    border: 1px solid transparent;
}

.callout-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: flex-start;
    justify-content: center;
    width: 22px;
    padding-top: 1px;
}

.callout-icon svg { display: block; }

.callout-body {
    font-size: 14px;
    line-height: 1.75;
    color: var(--slate);
    flex: 1;
}

.callout-body > *:first-child { margin-top: 0; }
.callout-body > *:last-child { margin-bottom: 0; }

.callout-body strong {
    color: var(--navy);
}

.callout-body ul {
    margin: 6px 0 0;
    padding-left: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.callout-body ul li {
    position: relative;
    padding-left: 14px;
}

.callout-body ul li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 10px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    opacity: .5;
}

.callout-info {
    background: rgba(45,140,196,.08);
    border-color: rgba(45,140,196,.22);
}
.callout-info .callout-icon { color: var(--accent); }

.callout-intro {
    background: #f4f7fa;
    border-color: #e4ebf1;
}
.callout-intro .callout-icon { color: var(--slate); }

.callout-warn {
    background: rgba(212,169,78,.10);
    border-color: rgba(212,169,78,.28);
}
.callout-warn .callout-icon { color: #c08a1f; }
.callout-warn .callout-body strong { color: #8d6416; }

.callout-tip {
    background: rgba(58,175,106,.08);
    border-color: rgba(58,175,106,.24);
}
.callout-tip .callout-icon { color: #2a9b55; }

/* ── Steps ── */
.guide-steps {
    list-style: none;
    counter-reset: step;
    margin: 0 0 6px;
    padding: 0;
}

.guide-steps > li {
    counter-increment: step;
    position: relative;
    padding: 4px 0 18px 44px;
    color: var(--slate);
    font-size: 14.5px;
    line-height: 1.8;
}

.guide-steps > li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 2px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f0f3f6;
    border: 1px solid #e0e7ee;
    color: var(--navy);
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-variant-numeric: tabular-nums;
}

.guide-steps > li:last-child {
    padding-bottom: 0;
}

.guide-steps > li .guide-figure {
    margin-top: 12px;
}

/* ── List ── */
.guide-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 4px 0 14px;
}

.guide-list li {
    position: relative;
    padding-left: 18px;
    color: var(--slate);
    font-size: 14.5px;
    line-height: 1.75;
}

.guide-list li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 11px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
}

.guide-list a {
    color: var(--accent);
    text-decoration: none;
}

.guide-list a:hover {
    text-decoration: underline;
}

/* ── Table ── */
.guide-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0 18px;
    font-size: 14px;
    background: #fafbfc;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.guide-table th {
    text-align: left;
    padding: 12px 16px;
    background: #f0f3f6;
    color: var(--navy);
    font-weight: 700;
    font-size: 12.5px;
    letter-spacing: .02em;
    border-bottom: 1px solid var(--border);
}

.guide-table td {
    padding: 12px 16px;
    color: var(--slate);
    line-height: 1.7;
    border-bottom: 1px solid #e8edf2;
    vertical-align: top;
}

.guide-table tr:last-child td {
    border-bottom: none;
}

.guide-table td:first-child {
    width: 32%;
    color: var(--navy);
}

/* ── Figure ── */
.guide-figure {
    margin: 14px 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #f8fafb;
}

.guide-figure img {
    display: block;
    width: 100%;
    height: auto;
}

/* ── Copy toast ── */
.copy-toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--navy);
    color: #fff;
    padding: 10px 26px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 8px 28px rgba(14,30,50,.28);
    opacity: 0;
    transition: opacity .22s, transform .22s;
    z-index: 10000;
    pointer-events: none;
}

.copy-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── Guide responsive ── */
@media (max-width: 720px) {
    .guide {
        padding: 22px 20px 48px;
    }

    .guide-section {
        padding: 24px 20px 26px;
    }

    .guide-section h2 {
        font-size: 19px;
        gap: 10px;
    }

    .section-num {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .credential-card {
        padding: 4px 18px 16px;
    }

    .cred-row {
        flex-wrap: wrap;
        gap: 8px 12px;
    }

    .cred-label {
        width: 100%;
    }

    .cred-value {
        flex: 1;
        min-width: 0;
    }

    .guide-table td:first-child {
        width: auto;
    }

    .guide-table th,
    .guide-table td {
        padding: 10px 12px;
    }

    .guide-steps > li {
        padding-left: 38px;
    }

    .guide-steps > li::before {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }
}
