:root {
    --color-primary: #1e3a8a;
    --color-accent: #2563eb;
    --color-cta: #dc2626;
    --color-cta-hover: #b91c1c;
    --color-text: #1f2937;
    --color-text-muted: #6b7280;
    --color-bg: #f9fafb;
    --color-card-bg: #ffffff;
    --color-border: #e5e7eb;
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

.site-container {
    max-width: 680px;
    margin: 0 auto;
    padding: var(--spacing-md);
    background-color: #ffffff;
    min-height: 100vh;
}

/* Typography */
h1 {
    font-size: 22px;
    line-height: 1.35;
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

h2 {
    font-size: 18px;
    line-height: 1.4;
    color: var(--color-text);
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
    border-bottom: 2px solid var(--color-accent);
    padding-bottom: 6px;
}

p {
    margin-bottom: var(--spacing-md);
    word-break: keep-all;
}

/* Zone 1: Hero Block */
.blk-hero {
    margin-bottom: var(--spacing-lg);
}

.hero-summary-box {
    background-color: #eff6ff;
    border-left: 4px solid var(--color-accent);
    padding: var(--spacing-md);
    border-radius: 4px;
    margin-top: var(--spacing-sm);
}

.hero-summary {
    list-style: none;
}

.hero-summary li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-weight: 500;
    line-height: 1.5;
}

.hero-summary li:last-child {
    margin-bottom: 0;
}

.hero-summary li::before {
    content: "•";
    color: var(--color-accent);
    font-weight: bold;
    font-size: 18px;
    position: absolute;
    left: 4px;
    top: -2px;
}

/* Zone 2: Table & Checklist */
.blk-table {
    margin-bottom: var(--spacing-lg);
}

.table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--color-border);
    border-radius: 6px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

caption {
    font-weight: bold;
    padding: var(--spacing-xs);
    caption-side: top;
    text-align: left;
    color: var(--color-primary);
}

th, td {
    padding: var(--spacing-sm);
    border: 1px solid var(--color-border);
    text-align: left;
}

th {
    background-color: #f3f4f6;
    font-weight: 600;
}

.blk-check {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.checklist-items {
    list-style: none;
    margin-top: var(--spacing-xs);
}

.checklist-items li {
    display: flex;
    align-items: flex-start;
    margin-bottom: var(--spacing-xs);
}

.check-icon {
    color: #16a34a;
    font-weight: bold;
    margin-right: 8px;
}

/* Zone 3: Text Block */
.blk-text {
    margin-bottom: var(--spacing-lg);
}

/* Zone 4: FAQ Accordion */
.blk-faq {
    margin-bottom: var(--spacing-lg);
}

.faq-list {
    margin-top: var(--spacing-sm);
}

.faq-item {
    border: 1px solid var(--color-border);
    border-radius: 6px;
    margin-bottom: var(--spacing-xs);
    background-color: #ffffff;
}

.faq-question {
    padding: var(--spacing-sm) var(--spacing-md);
    font-weight: 600;
    cursor: pointer;
    background-color: #f9fafb;
    outline: none;
    min-height: 48px;
    display: flex;
    align-items: center;
}

.faq-answer {
    padding: var(--spacing-md);
    border-top: 1px solid var(--color-border);
    font-size: 15px;
    color: #374151;
    background-color: #ffffff;
}

/* CTA Buttons */
.cta-main-wrapper, .cta-bottom-wrapper {
    margin: var(--spacing-xl) 0;
    text-align: center;
}

.cta-main, .cta-bottom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 92%;
    min-height: 56px;
    padding: 12px 20px;
    background-color: var(--color-cta);
    color: #ffffff;
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.cta-main:hover, .cta-bottom:hover {
    background-color: var(--color-cta-hover);
    transform: translateY(-1px);
}

.cta-arrow {
    margin-left: 8px;
    font-size: 20px;
}

/* Related Cards */
.blk-cards {
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
}

.card-grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.card-item {
    display: block;
    padding: var(--spacing-md);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background-color: var(--color-card-bg);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease;
}

.card-item:hover {
    border-color: var(--color-accent);
}

.card-title {
    font-weight: 700;
    color: var(--color-primary);
    font-size: 16px;
    margin-bottom: 4px;
}

.card-desc {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.card-link-text {
    font-size: 13px;
    color: var(--color-accent);
    font-weight: 600;
}

/* Ad Containers (CLS Prevention) */
/* AdSense in-article slots: plain full-width block spacing only. Never constrain the
   <ins> width (no flex/centering/fixed height) or responsive ads fail to fill. */
.zone-ad-inarticle-a,
.zone-ad-inarticle-b {
    margin: var(--spacing-lg) 0;
}

/* Top Step Navigation CTA Bar */
.zone-top-nav {
    margin-bottom: var(--spacing-md);
}

.top-step-nav {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: var(--spacing-sm) var(--spacing-md);
}

.top-step-nav-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 10px;
    letter-spacing: -0.2px;
}

.top-step-nav-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.step-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 6px;
    padding: 10px 14px;
    min-height: 48px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid #bfdbfe;
    background-color: #eff6ff;
    color: var(--color-primary);
    opacity: 0;
    animation: stepNavFadeIn 0.4s ease forwards;
}

.top-step-nav-list .step-nav-item:nth-child(1) { animation-delay: 0.05s; }
.top-step-nav-list .step-nav-item:nth-child(2) { animation-delay: 0.15s; }
.top-step-nav-list .step-nav-item:nth-child(3) { animation-delay: 0.25s; }
.top-step-nav-list .step-nav-item:nth-child(4) { animation-delay: 0.35s; }
.top-step-nav-list .step-nav-item:nth-child(n+5) { animation-delay: 0.35s; }

.step-nav-item::after {
    content: '\2192';
    flex-shrink: 0;
    font-weight: 700;
    color: var(--color-accent);
    animation: stepNavArrowNudge 1.8s ease-in-out 0.6s infinite;
}

.step-nav-item.active::after {
    animation: none;
}

@keyframes stepNavFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes stepNavArrowNudge {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(3px); }
}

@media (prefers-reduced-motion: reduce) {
    .step-nav-item {
        opacity: 1;
        animation: none;
    }
    .step-nav-item::after {
        animation: none;
    }
}

.step-nav-item:hover {
    border-color: var(--color-accent);
    background-color: #dbeafe;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12);
}

.step-nav-item.active {
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    color: #ffffff;
    border-color: #1e3a8a;
    box-shadow: 0 2px 8px rgba(30, 58, 138, 0.25);
}

.step-nav-item.active::after {
    content: '\2713';
    color: #ffffff;
}

.step-badge {
    font-size: 11px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: #f1f5f9;
    color: #475569;
}

.step-nav-item.active .step-badge {
    background-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.step-label {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Affiliate Product Banner (Coupang Partners / Naver Shopping Connect) —
   sits directly under the top step-nav header, styled to draw the eye. */
.zone-affiliate {
    margin: var(--spacing-sm) 0 var(--spacing-lg);
}

.affiliate-banner-wrapper {
    width: 100%;
}

.affiliate-disclosure {
    margin: 0 0 6px;
    padding: 2px 2px;
    background: none;
    border: none;
    font-size: 10px;
    line-height: 1.4;
    color: #b6bcc6;
    font-weight: 400;
    letter-spacing: -0.2px;
}

.affiliate-banner {
    /* Theme tokens (default = generic amber); overridden per provider below.
       Children inherit these vars, so accent/glow follow the provider automatically. */
    --aff-bg-from: #fff7ed;
    --aff-bg-to: #ffedd5;
    --aff-border: #f59e0b;
    --aff-accent: #f59e0b;
    --aff-accent-dark: #d97706;
    --aff-accent-darker: #b45309;
    --aff-glow-rgb: 217, 119, 6;

    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 18px 16px 16px;
    background: linear-gradient(135deg, var(--aff-bg-from) 0%, var(--aff-bg-to) 100%);
    border: 2px solid var(--aff-border);
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 6px 18px rgba(var(--aff-glow-rgb), 0.22);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    box-sizing: border-box;
    animation: affiliate-glow 2.6s ease-in-out infinite;
}

/* Naver Shopping — brand green (#03c75a) */
.affiliate-banner[data-provider="naver_shopping"] {
    --aff-bg-from: #f0fdf4;
    --aff-bg-to: #dcfce7;
    --aff-border: #03c75a;
    --aff-accent: #03c75a;
    --aff-accent-dark: #02a349;
    --aff-accent-darker: #018a3d;
    --aff-glow-rgb: 3, 199, 90;
}

/* Coupang Partners — brand red (#e4002b) */
.affiliate-banner[data-provider="coupang_partners"] {
    --aff-bg-from: #fff1f2;
    --aff-bg-to: #ffe4e6;
    --aff-border: #e4002b;
    --aff-accent: #e4002b;
    --aff-accent-dark: #c00020;
    --aff-accent-darker: #9f001a;
    --aff-glow-rgb: 228, 0, 43;
}

@keyframes affiliate-glow {
    0%, 100% { box-shadow: 0 6px 18px rgba(var(--aff-glow-rgb), 0.20); }
    50%      { box-shadow: 0 8px 26px rgba(var(--aff-glow-rgb), 0.42); }
}

.affiliate-banner:hover {
    box-shadow: 0 10px 30px rgba(var(--aff-glow-rgb), 0.48);
    transform: translateY(-2px);
}

.affiliate-provider-badge {
    position: absolute;
    top: -11px;
    left: 14px;
    font-size: 11px;
    font-weight: 800;
    color: #ffffff;
    background: linear-gradient(135deg, var(--aff-accent), var(--aff-accent-dark));
    padding: 4px 12px;
    border-radius: 12px;
    letter-spacing: -0.2px;
    box-shadow: 0 2px 6px rgba(var(--aff-glow-rgb), 0.4);
}

.affiliate-image-wrap {
    flex-shrink: 0;
    width: 88px;
    height: 88px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #ffffff;
    border: 1px solid #f1e4c8;
}

.affiliate-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.affiliate-content {
    flex: 1;
    min-width: 0;
}

.affiliate-name {
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 6px;
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.affiliate-price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.affiliate-original-price {
    font-size: 12px;
    color: #9ca3af;
    text-decoration: line-through;
}

.affiliate-discount-percent {
    font-size: 15px;
    font-weight: 700;
    color: var(--aff-accent-dark);
}

.affiliate-discount-price {
    font-size: 17px;
    font-weight: 700;
    color: #1f2937;
}

.affiliate-cta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
    background: linear-gradient(135deg, var(--aff-accent), var(--aff-accent-dark));
    padding: 9px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(var(--aff-glow-rgb), 0.4);
}

.affiliate-banner:hover .affiliate-cta {
    background: linear-gradient(135deg, var(--aff-accent-dark), var(--aff-accent-darker));
    box-shadow: 0 4px 12px rgba(var(--aff-glow-rgb), 0.5);
}

@media (max-width: 380px) {
    .affiliate-image-wrap {
        width: 72px;
        height: 72px;
    }

    .affiliate-name {
        font-size: 13px;
    }

    .affiliate-discount-price {
        font-size: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .affiliate-banner {
        transition: box-shadow 0.2s ease;
        animation: none;
    }

    .affiliate-banner:hover {
        transform: none;
    }
}

/* Outbound Reference Link Button (general, non-shopping — e.g. gov service pages) */
.outbound-link-box {
    margin: var(--spacing-lg) 0;
    padding: 16px;
    background-color: #f0fdfa;
    border: 1px solid #ccfbf1;
    border-left: 4px solid #0d9488;
    border-radius: 8px;
}

.outbound-link-desc {
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.6;
    color: #115e59;
}

.outbound-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 50px;
    padding: 12px 18px;
    background-color: #0d9488;
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(13, 148, 136, 0.25);
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-sizing: border-box;
}

.outbound-link-btn:hover {
    background-color: #0f766e;
    transform: translateY(-1px);
}

.outbound-link-arrow {
    font-size: 18px;
}

@media (prefers-reduced-motion: reduce) {
    .outbound-link-btn {
        transition: background-color 0.2s ease;
    }

    .outbound-link-btn:hover {
        transform: none;
    }
}

/* Per-page body image (1 per page, top of article) */
.page-image {
    margin: var(--spacing-md) 0 var(--spacing-lg);
}

.page-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
}

/* Site Footer */
.site-footer {
    margin-top: var(--spacing-xl);
    padding: var(--spacing-lg) 0 var(--spacing-md);
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.footer-links {
    margin-bottom: 8px;
}

.footer-links a {
    font-size: 13px;
    color: var(--color-text-muted);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

.footer-copy {
    font-size: 12px;
    color: #9ca3af;
}

/* Legal / policy pages (privacy policy, etc.) */
.legal-page {
    padding: var(--spacing-md) 0 var(--spacing-lg);
}

.legal-page h1 {
    margin-bottom: 6px;
}

.legal-page h2 {
    font-size: 17px;
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-xs);
    color: var(--color-primary);
}

.legal-page p {
    font-size: 15px;
    color: #374151;
    margin-bottom: var(--spacing-sm);
}

.legal-updated {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-md);
}

.legal-list {
    margin: 0 0 var(--spacing-sm) var(--spacing-md);
    padding-left: var(--spacing-md);
}

.legal-list li {
    font-size: 15px;
    color: #374151;
    margin-bottom: 6px;
    list-style: disc;
}

.legal-page a {
    color: var(--color-accent);
}

/* ── Phase 2-C: header / home / hub / static pages ──
   Neutral greys+blues only. CTA red, step-nav blue, affiliate amber and
   outbound teal stay reserved for conversion elements, so these navigation
   surfaces must not compete with them. */

.site-header { background: #fff; border-bottom: 1px solid var(--color-border); height: 44px; display: flex; align-items: center; }
.site-brand {
    display: block; width: 100%; max-width: 680px; margin: 0 auto;
    padding: 0 var(--spacing-md); font-size: 15px; font-weight: 700;
    color: var(--color-primary); text-decoration: none;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.site-brand:hover { color: var(--color-accent); }
.footer-links a + a { margin-left: 10px; }

/* Home */
.home-hero { padding: var(--spacing-lg) 0 var(--spacing-md); border-bottom: 1px solid var(--color-border); }
.home-hero h1 { margin-bottom: var(--spacing-xs); }
.home-tagline { font-size: 15px; font-weight: 600; color: var(--color-accent); margin-bottom: var(--spacing-xs); }
.home-intro { font-size: 15px; }
.home-section { margin-top: var(--spacing-xl); }
.home-section-title { font-size: 17px; font-weight: 700; color: var(--color-primary); margin-bottom: var(--spacing-md); }

.topic-grid { display: grid; grid-template-columns: 1fr; gap: var(--spacing-sm); }
.topic-card {
    display: flex; flex-direction: column; gap: 4px; padding: var(--spacing-md);
    background: var(--color-bg); border: 1px solid var(--color-border);
    border-radius: 10px; text-decoration: none;
}
.topic-card-title { font-size: 16px; font-weight: 700; color: var(--color-primary); }
.topic-card-desc { font-size: 13px; color: var(--color-text-muted); line-height: 1.6; }
.topic-card-meta { font-size: 12px; color: #9ca3af; font-weight: 600; }

.recent-list { list-style: none; padding: 0; margin: 0; }
.recent-item + .recent-item { margin-top: var(--spacing-sm); }
.recent-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.recent-topic { font-size: 11px; font-weight: 700; color: var(--color-accent); }
.recent-title { font-size: 15px; font-weight: 600; color: var(--color-text); line-height: 1.45; }
.recent-desc {
    font-size: 12px; color: var(--color-text-muted); line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Hub */
.hub-head { padding: var(--spacing-lg) 0 var(--spacing-md); border-bottom: 1px solid var(--color-border); }
.hub-desc { font-size: 15px; margin-top: var(--spacing-xs); }
.hub-count { font-size: 12px; color: var(--color-text-muted); font-weight: 600; margin-top: var(--spacing-xs); }
.hub-list { list-style: none; padding: 0; margin: var(--spacing-lg) 0 0; }
.hub-item + .hub-item { margin-top: var(--spacing-xs); }
.hub-step {
    flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%;
    background: var(--color-primary); color: #fff; font-size: 12px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.hub-title { font-size: 15px; font-weight: 600; color: var(--color-text); line-height: 1.45; }
.hub-summary { font-size: 12px; color: var(--color-text-muted); line-height: 1.5; }

/* Shared card shell for recent + hub rows */
.recent-card, .hub-link {
    display: flex; gap: var(--spacing-sm); align-items: flex-start;
    padding: var(--spacing-sm); border: 1px solid var(--color-border);
    border-radius: 10px; text-decoration: none; background: #fff;
}
.hub-link { padding: var(--spacing-sm) var(--spacing-md); background: var(--color-bg); }
.recent-card:hover, .hub-link:hover, .topic-card:hover { border-color: var(--color-accent); }
.recent-body, .hub-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.static-page h2 { margin-top: var(--spacing-lg); }
.static-page .contact-email { font-size: 17px; font-weight: 700; }

@media (min-width: 640px) { .topic-grid { grid-template-columns: 1fr 1fr; } }
