:root {
    --brand: #2563eb;
    --education: #7c3aed;
    --fuel: #f97316;
    --living: #10b981;
    --apartment: #0ea5e9;
    --telecom: #6366f1;
    --shopping: #ec4899;
    --transport: #14b8a6;
    --travel: #f59e0b;
    --ink: #171a21;
    --muted: #667085;
    --line: #e4e7ec;
    --surface: #ffffff;
    --background: #f7f8fc;
    --radius: 16px;
    --shadow: 0 8px 24px rgba(23, 26, 33, .07);
    --shadow-hover: 0 16px 36px rgba(23, 26, 33, .12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    min-width: 0;
    margin: 0;
    overflow-x: hidden;
    color: var(--ink);
    background: var(--background);
    font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.62;
    word-break: keep-all;
}

a { color: inherit; }

a:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .35);
    outline-offset: 3px;
}

.container {
    width: min(calc(100% - 32px), 1120px);
    margin-inline: auto;
}

.site-header {
    position: relative;
    z-index: 10;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .96);
    color: var(--ink);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    color: #1849a9;
    font-size: 1.25rem;
    font-weight: 850;
    letter-spacing: -.035em;
    text-decoration: none;
}

.brand-note {
    color: var(--muted);
    font-size: .875rem;
    font-weight: 600;
}

.hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #e8ecf5;
    background:
        radial-gradient(circle at 88% 20%, rgba(236, 72, 153, .11), transparent 23rem),
        radial-gradient(circle at 68% 90%, rgba(124, 58, 237, .10), transparent 25rem),
        linear-gradient(135deg, #fff 0%, #f2f7ff 100%);
}

.hero::before {
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--brand), var(--education), var(--shopping), var(--fuel));
    content: "";
}

.hero-inner { position: relative; padding-block: 68px 76px; }

.eyebrow {
    margin: 0 0 10px;
    color: var(--brand);
    font-size: .8125rem;
    font-weight: 800;
    letter-spacing: .08em;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
    max-width: 760px;
    margin-bottom: 18px;
    font-size: clamp(2.25rem, 8vw, 4.25rem);
    line-height: 1.12;
    letter-spacing: -.055em;
}

.hero-copy {
    max-width: 650px;
    margin-bottom: 30px;
    color: #475467;
    font-size: clamp(1rem, 2.4vw, 1.125rem);
}

.btn,
.button {
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 13px;
    padding: 13px 22px;
    color: #fff;
    font: inherit;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.btn-primary,
.button { background: var(--brand); box-shadow: 0 8px 18px rgba(37, 99, 235, .22); }
.btn-compare { background: #6d28d9; box-shadow: 0 8px 18px rgba(109, 40, 217, .20); }
.btn-calc { background: #047857; box-shadow: 0 8px 18px rgba(4, 120, 87, .20); }
.btn-apply { background: #c2410c; box-shadow: 0 8px 18px rgba(194, 65, 12, .20); }

.btn:hover,
.button:hover { transform: translateY(-2px); filter: brightness(.94); }
.btn:active,
.button:active { transform: translateY(0); box-shadow: none; }

.category-section { padding-block: 64px 76px; scroll-margin-top: 20px; }
.section-heading { margin-bottom: 28px; }

.section-heading h2,
.trust-inner h2,
.error-inner h1 {
    margin-bottom: 10px;
    font-size: clamp(1.65rem, 5vw, 2.5rem);
    line-height: 1.25;
    letter-spacing: -.04em;
}

.section-heading > p,
.trust-inner > p:last-child,
.error-inner > p { color: var(--muted); }

.category-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

.category-card {
    --accent: var(--brand);
    --accent-soft: #eff6ff;
    position: relative;
    min-width: 0;
    min-height: 178px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-top: 4px solid var(--accent);
    border-radius: var(--radius);
    padding: 26px 24px;
    background: var(--surface);
    box-shadow: var(--shadow);
    color: var(--ink);
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.category-card--education { --accent: var(--education); --accent-soft: #f3e8ff; }
.category-card--fuel { --accent: var(--fuel); --accent-soft: #fff1e8; }
.category-card--living { --accent: var(--living); --accent-soft: #e8f8f2; }
.category-card--apartment { --accent: var(--apartment); --accent-soft: #e7f7fd; }
.category-card--telecom { --accent: var(--telecom); --accent-soft: #eef0ff; }
.category-card--shopping { --accent: var(--shopping); --accent-soft: #fcebf4; }

.category-card h3 {
    margin: 0 0 9px;
    font-size: 1.3rem;
    line-height: 1.35;
    letter-spacing: -.025em;
}

.category-card p { margin: 0; color: var(--muted); font-size: 1rem; }

.category-link-text {
    position: absolute;
    right: 20px;
    bottom: 20px;
    color: var(--accent);
    font-size: 1rem;
    font-weight: 750;
}

.category-card:focus-visible { outline-color: var(--accent); }

.stat,
.benefit-value {
    color: var(--brand);
    font-size: clamp(1.35rem, 5vw, 1.75rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.035em;
}

.trust-section { padding-block: 68px; background: #fff; }
.trust-inner { max-width: 720px; text-align: center; }

.site-footer { padding-block: 36px; color: #d0d5dd; background: #171a21; }
.footer-inner p { margin: 4px 0 12px; color: #98a2b3; font-size: .9375rem; }
.footer-inner small { color: #98a2b3; }

.error-page {
    min-height: calc(100vh - 220px);
    display: grid;
    place-items: center;
    padding-block: 80px;
}

.error-inner { text-align: center; }
.error-code { margin-bottom: 2px; color: var(--brand); font-weight: 900; letter-spacing: .14em; }
.error-inner .button { margin-top: 12px; }

@media (max-width: 639px) {
    .btn,
    .button { width: 100%; }
    .brand-note { display: none; }
}

@media (min-width: 640px) {
    .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .section-heading { display: flex; align-items: end; justify-content: space-between; gap: 32px; }
    .section-heading > p { margin-bottom: 10px; }
}

@media (min-width: 960px) {
    .hero-inner { padding-block: 94px 102px; }
    .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
    .category-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 45%, white); box-shadow: var(--shadow-hover); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .btn,
    .button,
    .category-card { transition: none; }
}

/* Card detail */
.card-page { padding-top: 1px; }

.breadcrumb { margin-block: 24px; color: var(--muted); font-size: .875rem; }
.breadcrumb ol { display: flex; min-width: 0; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.breadcrumb li { display: flex; min-width: 0; align-items: center; gap: 7px; }
.breadcrumb li:not(:last-child)::after { color: #98a2b3; content: ">"; }
.breadcrumb li:last-child { overflow: hidden; color: #344054; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.breadcrumb a { min-height: 44px; display: inline-flex; align-items: center; }

.card-hero {
    display: grid;
    gap: 28px;
    margin-bottom: 64px;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 24px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.card-visual {
    min-height: 240px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(145deg, #eef4ff, #f8f5ff);
}

.card-visual img { width: min(100%, 380px); height: auto; display: block; object-fit: contain; }
.card-image-placeholder { width: min(82%, 330px); aspect-ratio: 1.58; display: grid; place-items: center; border-radius: 16px; color: #667085; background: linear-gradient(135deg, #fff, #e8eef9); box-shadow: 0 18px 35px rgba(37, 99, 235, .12); font-weight: 800; }
.issuer-label { margin-bottom: 8px; color: var(--brand); font-weight: 800; }
.card-summary h1 { margin-bottom: 12px; font-size: clamp(2rem, 7vw, 3.25rem); }
.card-intro { margin-bottom: 24px; color: var(--muted); font-size: 1.0625rem; }

.card-facts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 0 0 24px; }
.fact-box { min-width: 0; border: 1px solid #e8ecf3; border-radius: 14px; padding: 16px; background: #f9fafb; }
.fact-box dt { margin-bottom: 4px; color: var(--muted); font-size: .8125rem; font-weight: 650; }
.fact-box dd { margin: 0; overflow-wrap: anywhere; font-size: 1.16rem; }
.card-main-cta { width: 100%; min-height: 54px; font-size: 1.0625rem; }

.benefits-section { margin-bottom: 36px; }
.detail-heading { margin-bottom: 22px; }
.detail-heading h2 { margin-bottom: 0; font-size: clamp(1.65rem, 5vw, 2.35rem); letter-spacing: -.04em; }
.benefit-list { display: grid; gap: 18px; }
.benefit-card {
    --accent: var(--brand);
    --accent-soft: #eff6ff;
    min-width: 0;
    border: 1px solid var(--line);
    border-top: 4px solid var(--accent);
    border-radius: 16px;
    padding: 22px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(23, 26, 33, .05);
}

.benefit-card--education { --accent: var(--education); --accent-soft: #f3e8ff; }
.benefit-card--fuel { --accent: var(--fuel); --accent-soft: #fff1e8; }
.benefit-card--telecom { --accent: var(--telecom); --accent-soft: #eef0ff; }
.benefit-card--shopping,
.benefit-card--online-shopping { --accent: var(--shopping); --accent-soft: #fcebf4; }
.benefit-card--transport { --accent: var(--transport); --accent-soft: #e7f8f6; }
.benefit-card--apartment { --accent: var(--apartment); --accent-soft: #e7f7fd; }
.benefit-card--travel,
.benefit-card--airport { --accent: var(--travel); --accent-soft: #fff7dc; }

.benefit-badge { display: inline-flex; border-radius: 999px; padding: 5px 10px; color: var(--accent); background: var(--accent-soft); font-size: .78rem; font-weight: 800; }
.benefit-title-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 20px; margin: 15px 0 8px; }
.benefit-title-row h3 { margin: 0; font-size: 1.25rem; }
.benefit-title-row .benefit-value { color: var(--accent); }
.benefit-description { margin-bottom: 18px; color: #344054; white-space: pre-line; }
.benefit-metrics { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 0 0 18px; }
.benefit-metrics div { border-radius: 12px; padding: 12px 14px; background: var(--accent-soft); }
.benefit-metrics dt { color: var(--muted); font-size: .78rem; }
.benefit-metrics dd { margin: 1px 0 0; color: var(--accent); font-weight: 800; }
.benefit-note { border-top: 1px solid #eaecf0; padding-top: 14px; }
.benefit-note + .benefit-note { margin-top: 12px; }
.benefit-note strong { font-size: .875rem; }
.benefit-note p { margin: 4px 0 0; color: #475467; white-space: pre-line; }
.benefit-note--muted p { color: var(--muted); }

.source-panel { margin-bottom: 68px; border: 1px solid #dce6f5; border-radius: 14px; padding: 18px; background: #f2f7ff; color: #475467; }
.source-panel > p { margin-bottom: 8px; }
.source-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .875rem; }
.source-meta a { color: #1849a9; font-weight: 750; }

.related-section { padding-block: 60px 76px; border-top: 1px solid var(--line); background: #fff; }
.related-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.related-card { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; padding: 20px; background: #fff; box-shadow: var(--shadow); }
.related-image { height: 150px; display: grid; place-items: center; margin-bottom: 18px; overflow: hidden; border-radius: 12px; background: #f7f8fc; }
.related-image img { width: 100%; height: 100%; display: block; object-fit: contain; }
.related-issuer { margin-bottom: 4px; color: var(--muted); font-size: .875rem; }
.related-card h3 { margin-bottom: 16px; font-size: 1.2rem; }
.related-facts { display: grid; gap: 6px; margin: 0 0 20px; }
.related-facts div { display: flex; justify-content: space-between; gap: 14px; }
.related-facts dt { color: var(--muted); font-size: .875rem; }
.related-facts dd { margin: 0; font-weight: 750; }
.related-card .btn { width: 100%; margin-top: auto; }

@media (min-width: 640px) {
    .card-facts,
    .benefit-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
    .card-hero { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 48px; padding: 42px; }
    .card-summary { align-self: center; }
    .benefit-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .related-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .related-card { transition: transform .2s ease, box-shadow .2s ease; }
    .related-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
}

@media (prefers-reduced-motion: reduce) {
    .related-card { transition: none; }
}

/* Recommendation landing */
.recommend-page {
    --accent: var(--brand);
    --accent-soft: #eff6ff;
    padding-bottom: 78px;
}

.recommend-page--education { --accent: var(--education); --accent-soft: #f3e8ff; }
.recommend-page--fuel { --accent: var(--fuel); --accent-soft: #fff1e8; }
.recommend-page--living { --accent: var(--living); --accent-soft: #e8f8f2; }
.recommend-page--apartment { --accent: var(--apartment); --accent-soft: #e7f7fd; }
.recommend-page--telecom { --accent: var(--telecom); --accent-soft: #eef0ff; }
.recommend-page--shopping { --accent: var(--shopping); --accent-soft: #fcebf4; }
.recommend-page--transport { --accent: var(--transport); --accent-soft: #e7f8f6; }
.recommend-page--travel,
.recommend-page--airport { --accent: var(--travel); --accent-soft: #fff7dc; }

.recommend-header { max-width: 800px; padding: 14px 0 52px; }
.recommend-header h1 { margin: 13px 0 18px; }
.recommend-badge { display: inline-flex; border-radius: 999px; padding: 6px 11px; color: var(--accent); background: var(--accent-soft); font-size: .8rem; font-weight: 800; }
.direct-answer { border-left: 4px solid var(--accent); border-radius: 0 14px 14px 0; padding: 17px 20px; background: #fff; box-shadow: 0 6px 18px rgba(23, 26, 33, .05); }
.direct-answer p { margin: 0; color: #344054; font-size: 1.0625rem; }

.quick-section,
.recommend-list-section,
.selection-guide { margin-bottom: 68px; }

.quick-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.quick-card { min-width: 0; border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 14px; padding: 18px; background: #fff; box-shadow: 0 4px 14px rgba(23, 26, 33, .04); text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; }
.quick-card > strong { display: block; margin-bottom: 2px; font-size: 1.0625rem; }
.quick-card > span { color: var(--muted); font-size: .875rem; }
.quick-card dl { display: grid; gap: 5px; margin: 14px 0 0; }
.quick-card dl div { display: flex; justify-content: space-between; gap: 12px; }
.quick-card dt { color: var(--muted); font-size: .8rem; }
.quick-card dd { margin: 0; font-size: .875rem; font-weight: 750; }

.recommend-list { display: grid; gap: 20px; }
.recommend-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.recommend-card-image { min-height: 220px; display: grid; place-items: center; padding: 24px; background: linear-gradient(145deg, #f8fafc, var(--accent-soft)); }
.recommend-card-image img { width: min(100%, 340px); height: auto; max-height: 210px; display: block; object-fit: contain; }
.recommend-card-image--empty { color: var(--muted); font-size: .875rem; font-weight: 650; }
.recommend-card-content { padding: 24px; }
.recommend-card-content .related-issuer { margin: 16px 0 3px; }
.recommend-card-content h3 { margin-bottom: 18px; font-size: clamp(1.35rem, 5vw, 1.65rem); }
.recommend-card-content > .btn { width: 100%; }

.recommend-facts { display: grid; gap: 8px; margin: 0 0 18px; }
.recommend-facts div { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid #f0f2f5; padding-bottom: 8px; }
.recommend-facts dt { color: var(--muted); font-size: .875rem; }
.recommend-facts dd { margin: 0; font-weight: 750; text-align: right; }

.featured-benefit { margin-bottom: 22px; border-radius: 14px; padding: 17px; background: var(--accent-soft); }
.featured-benefit-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.featured-benefit-title .benefit-value { color: var(--accent); }
.featured-benefit p { margin: 8px 0; color: #475467; white-space: pre-line; }
.benefit-limit { display: inline-flex; color: var(--accent); font-size: .875rem; font-weight: 800; }

.selection-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.selection-grid article { border: 1px solid var(--line); border-radius: 14px; padding: 20px; background: #fff; }
.selection-grid strong { color: var(--accent); font-size: 1.0625rem; }
.selection-grid p { margin: 7px 0 0; color: var(--muted); }

.other-categories { border-top: 1px solid var(--line); padding-top: 56px; }
.other-category-links { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.other-category-links a { min-height: 52px; display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 13px; padding: 13px 16px; background: #fff; font-weight: 750; text-decoration: none; }
.other-category-links a::after { color: var(--brand); content: "→"; }

.empty-recommendation { margin-bottom: 80px; border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: 16px; padding: 34px 24px; background: #fff; text-align: center; box-shadow: var(--shadow); }
.empty-recommendation h2 { margin-bottom: 7px; font-size: 1.35rem; }
.empty-recommendation p { margin: 0; color: var(--muted); }

@media (min-width: 640px) {
    .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .selection-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .other-category-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
    .recommend-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .quick-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
}

@media (prefers-reduced-motion: reduce) {
    .quick-card { transition: none; }
}
