:root {
  color-scheme: light;
  --ink: #152238;
  --muted: #5e6b7e;
  --line: #dbe3ed;
  --paper: #ffffff;
  --soft: #f4f7fb;
  --surface: #f4f7fb;
  --brand: #1859cf;
  --brand-dark: #0f397f;
  --accent: #08755b;
  --accent-soft: #e9f7f2;
  --warning-soft: #fff8df;
  --shadow: 0 18px 55px rgba(26, 46, 79, .09);
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
}
.analysis-section{border:1px solid #dce3e9;border-radius:12px;padding:24px;margin:24px 0}.analysis-dl{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:18px}.analysis-stat dd{margin:6px 0;font-weight:700}.analysis-note{line-height:1.7;color:#475569}.analysis-links{display:flex;flex-wrap:wrap;gap:16px}.home-analysis-summary{border-bottom:1px solid #dce3e9;padding-bottom:20px}

/* Home's immediate, local-only comparison path. */
.home-solver{margin:0 0 2rem;padding:clamp(1rem,3vw,1.6rem);background:var(--paper);border:1px solid var(--line);border-radius:18px;overflow-wrap:anywhere}
.home-solver h2{margin:0 0 1rem;font-size:1.4rem}
#money-start{display:grid;grid-template-columns:1fr 1fr 1fr auto;gap:.8rem;align-items:end}
#money-start label{display:grid;gap:.35rem;min-width:0;font-weight:700}
#money-start input,#money-start select{width:100%;min-width:0;min-height:46px;padding:.6rem;border:1px solid #8f9bae;border-radius:8px;font:inherit;background:#fff;color:var(--ink)}
#money-start button{min-height:46px;border:0;font:inherit;font-weight:750;cursor:pointer}
.solver-note{font-size:.85rem;color:var(--muted)}
.solver-result{margin-top:1rem;padding:1rem;background:var(--accent-soft);border-radius:12px}
.solver-result:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.solver-result h3{margin:.1rem 0 .6rem;font-size:1.2rem}
.solver-result p{margin:.55rem 0}
.solver-candidates{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.8rem;margin-top:1rem}
.solver-candidates article{background:#fff;border:1px solid var(--line);border-radius:10px;padding:1rem;min-width:0}
.solver-candidates h4{margin:0 0 .7rem;font-size:1.05rem}
.home-solver summary{cursor:pointer;min-height:44px;padding:.6rem 0;font-weight:700}
.solver-method{margin-top:.8rem}
.solver-takeaway{font-weight:800;font-size:1.08rem;color:var(--brand-dark)}
.solver-turning,.solver-record{margin-top:1rem;padding:.6rem .8rem;border:1px solid var(--line);border-radius:10px;background:#fff}
.solver-turning h4{margin:.6rem 0 .3rem}
.solver-record label{display:block;font-weight:700}
.solver-record textarea{display:block;width:100%;min-height:10rem;margin:.6rem 0;padding:.7rem;border:1px solid var(--line);border-radius:8px;font:inherit;font-size:.85rem;resize:vertical;box-sizing:border-box}
.solver-record button{min-height:44px;font:inherit;cursor:pointer}
.solver-record [role="status"]{display:block;margin-top:.5rem;font-size:.85rem}
.solver-candidates a{display:inline-flex;align-items:center;min-height:44px}
@media(max-width:760px){#money-start{grid-template-columns:1fr 1fr}#money-start label:first-child{grid-column:1/-1}#money-start button{grid-column:1/-1}.solver-candidates{grid-template-columns:1fr}.hero{padding:1rem;margin-bottom:.8rem}.hero h1{font-size:1.9rem}.home-solver{padding:1rem}.home-solver h2{font-size:1.15rem}}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--soft); line-height: 1.75; }
a { color: var(--brand); text-underline-offset: .2em; }
img { max-width: 100%; height: auto; }
button, input, select { font: inherit; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 100; background: #fff; padding: .65rem 1rem; border-radius: 8px; box-shadow: var(--shadow); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0 max(4vw, 1.25rem);
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid rgba(219, 227, 237, .9);
  backdrop-filter: blur(14px);
}
.brand { display: inline-flex; min-height: 44px; align-items: center; color: var(--ink); font-size: 1.4rem; font-weight: 900; letter-spacing: -.04em; text-decoration: none; }
nav { display: flex; flex-wrap: wrap; gap: .75rem 1.1rem; }
nav a { display: inline-flex; min-height: 44px; align-items: center; color: var(--ink); font-size: .92rem; font-weight: 700; text-decoration: none; }
nav a:hover { color: var(--brand); }

.content-shell { width: min(1160px, 92vw); min-height: 65vh; margin: 0 auto; padding: 3rem 0 5rem; }
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(1.2rem, 3vw, 2rem);
  border-radius: 30px;
  color: white;
  background: linear-gradient(135deg, #103a87 0%, #1559c5 48%, #08735b 100%);
  box-shadow: 0 28px 80px rgba(16, 58, 135, .25);
}
.hero::after { content: ""; position: absolute; width: 330px; height: 330px; right: -90px; top: -130px; border-radius: 50%; background: rgba(255, 255, 255, .09); }
.hero h1 { position: relative; margin: 0 0 .5rem; font-size: clamp(1.65rem, 3vw, 2.5rem); line-height: 1.3; letter-spacing: -.045em; }
.hero > p { position: relative; max-width: 66ch; font-size: clamp(1rem, 2vw, 1.13rem); }
.hero .eyebrow { color: #c2ffeb; }
.hero a { color: #fff; text-decoration-thickness: 2px; }
.hero::after { pointer-events: none; }
.hero-actions { position: relative; display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .8rem; }
.hero-date { margin: 1.4rem 0 0; color: rgba(255, 255, 255, .75); font-size: .84rem !important; }

.button, .tool-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .7rem 1rem;
  border-radius: 10px;
  font-weight: 800;
  text-decoration: none;
}
.button.primary, .tool-cta { color: white; background: var(--brand); }
.hero .button.primary { color: var(--brand-dark); background: white; }
.button.secondary { color: var(--brand-dark); border: 1px solid var(--brand); background: white; }
.hero .button.secondary { color: white; border-color: rgba(255,255,255,.65); background: transparent; }
.article-context { margin: 1.5rem 0; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 10px; font-size: .9rem; }
.article-context summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 700; }
.card-date { margin-top: auto !important; padding-top: .8rem; color: var(--muted); font-size: .8rem !important; }
.hero + .topic-section { margin-top: 1.5rem; }

.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; overflow: hidden; margin: 1.3rem 0 4rem; border: 1px solid var(--line); border-radius: 18px; background: var(--line); box-shadow: var(--shadow); }
.principles div { display: grid; gap: .3rem; padding: 1.35rem; background: var(--paper); }
.principles strong { color: var(--accent); }
.principles span { color: var(--muted); font-size: .9rem; }

.eyebrow { margin: 0; color: var(--accent); font-size: .78rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.topic-section { scroll-margin-top: 90px; margin-top: 4.5rem; }
.section-heading { margin-bottom: 1.2rem; }
.section-heading h2 { margin: .2rem 0 0; font-size: clamp(1.65rem, 3vw, 2.25rem); letter-spacing: -.035em; }
.post-grid, .tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.post-card, .tool-card {
  padding: 1.45rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 10px 32px rgba(31, 50, 86, .055);
}
.post-card { display: flex; flex-direction: column; }
.post-card h3, .tool-card h2, .tool-card h3 { margin: .45rem 0 .7rem; font-size: 1.08rem; line-height: 1.45; }
.post-card h3 a, .tool-card h2 a, .tool-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h3 a:hover, .tool-card a:hover { color: var(--brand); }
.post-card > p:last-child, .tool-card p { margin: 0; color: var(--muted); font-size: .91rem; }

.product-carousel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 38%); gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: .2rem .1rem 1rem; }
.product-carousel:focus-visible { outline: 3px solid var(--brand); outline-offset: 4px; }
.product-card { scroll-snap-align: start; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 1.15rem; box-shadow: var(--shadow); }
.product-card h2, .product-card h3 { margin: .45rem 0 .25rem; font-size: 1.08rem; line-height: 1.4; }
.product-card h2 a, .product-card h3 a { color: var(--ink); text-decoration: none; }
.product-bank, .product-checked { color: var(--muted); font-size: .88rem; }
.rate-pair, .product-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin: 1rem 0; }
.rate-pair div, .product-facts div { background: var(--surface); border-radius: 12px; padding: .7rem; }
.rate-pair dt, .product-facts dt { color: var(--muted); font-size: .8rem; }
.rate-pair dd, .product-facts dd { margin: .2rem 0 0; font-weight: 750; }
.product-view { font-size: .92rem; line-height: 1.65; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.editorial-view { margin: 2rem 0; padding: 1.2rem; border-left: 4px solid var(--brand); background: var(--surface); border-radius: 0 14px 14px 0; }

@media (max-width: 760px) {
  .product-carousel { grid-auto-columns: 86%; }
  .product-grid { grid-template-columns: 1fr; }
  .product-facts { grid-template-columns: 1fr; }
}
.card-label { color: var(--accent) !important; font-size: .75rem !important; font-weight: 800; }

.page-intro { max-width: 780px; margin: 0 auto 2rem; text-align: center; }
.page-intro h1 { margin: .35rem 0 .7rem; font-size: clamp(2.1rem, 5vw, 3.8rem); letter-spacing: -.05em; }
.page-intro p:last-child { color: var(--muted); }

.article, .trust-page {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(1.4rem, 5vw, 3.7rem);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.article-header { padding-bottom: 1.4rem; border-bottom: 1px solid var(--line); }
.article h1, .trust-page h1 { margin: .3rem 0 .7rem; font-size: clamp(2rem, 5vw, 3.35rem); line-height: 1.2; letter-spacing: -.045em; }
.article-summary { max-width: 66ch; margin: .7rem 0; color: #3c4c62; font-size: 1.05rem; }
.article-meta, .trust-page header > p { color: var(--muted); font-size: .84rem; }
.article-notice { margin: 1.5rem 0 2rem; padding: 1rem 1.1rem; border-left: 4px solid var(--accent); background: var(--accent-soft); }
.article-body, .trust-page { overflow-wrap: anywhere; }
.article-body > p, .article-body > ul, .article-body > ol, .article-body > table, .article-body > aside { margin-block: 1.25rem; }
.article-body h2, .trust-page h2 { margin: 2.7rem 0 .8rem; font-size: 1.55rem; line-height: 1.4; letter-spacing: -.025em; }
.article-body h3, .trust-page h3 { margin: 2rem 0 .65rem; line-height: 1.45; }
.article-body li + li, .trust-page li + li { margin-top: .45rem; }
.article-body table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.article-body th, .article-body td { padding: .82rem; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.article-body th { background: #edf3fb; }
.table-scroll { max-width: 100%; overflow-x: auto; margin: 1.25rem 0; }
.table-scroll:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.table-scroll table { min-width: 600px; overflow-wrap: normal; word-break: keep-all; }
.table-scroll .amount-cell { white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-scroll-hint { margin-bottom: .3rem; font-size: .85rem; color: var(--muted); }
.tool-fragment dd { white-space: nowrap; font-variant-numeric: tabular-nums; }
.article-body dl { margin: 1.3rem 0; }
.article-body dt { margin-top: 1rem; font-weight: 850; }
.article-body dd { margin: .25rem 0 0; color: #3f4d61; }
.content-status { display: inline-block; padding: .45rem .7rem; border-radius: 8px; color: #40516b; background: #eef2f7; font-size: .84rem; }
.source-box, .decision-box { padding: 1.15rem 1.25rem; border-radius: 14px; }
.source-box { border: 1px solid #cfdeef; background: #f1f6fc; }
.decision-box { border: 1px solid #eadc9c; background: var(--warning-soft); }
.source-box h2, .decision-box h2 { margin-top: 0; font-size: 1.15rem; }
.checklist { padding-left: 1.4rem; }
.checklist li::marker { color: var(--accent); }

.related { margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.related h2 { margin: 0 0 .7rem; font-size: 1.2rem; }
.related ul { margin: 0; padding-left: 1.2rem; }
.decision-card { margin: 2.5rem 0; padding: 1.5rem; border: 1px solid #b7c8be; border-radius: 18px; background: #f3f8f5; }
.decision-card h2 { margin-top: .25rem; }
.decision-card h3 { margin: 1.2rem 0 .35rem; font-size: 1rem; }
.decision-card ul { margin-top: .35rem; }
.decision-card-note { color: #4f6258; font-size: .92rem; }
.article-tools, .tool-decision { margin: 2.2rem 0; padding: 1.35rem; border: 1px solid #cbd8ea; border-radius: 18px; background: #f4f8fd; }
.article-tools h2, .tool-decision h2 { margin: .25rem 0 .8rem; font-size: 1.25rem; }
.article-tools ul { display: grid; gap: .7rem; margin: 0; padding: 0; list-style: none; }
.article-tools li { display: grid; gap: .15rem; }
.article-tools li a { font-weight: 850; }
.article-tools li span { color: var(--muted); font-size: .9rem; }
.tool-decision h3 { margin: 1.2rem 0 .35rem; font-size: 1rem; }
.tool-decision ul { margin: .35rem 0; padding-left: 1.3rem; }
.tool-decision textarea { width: 100%; min-height: 11rem; margin-top: .6rem; padding: .85rem; border: 1px solid #9fb0c7; border-radius: 10px; color: var(--ink); background: #fff; font: .9rem/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; resize: vertical; }
.tool-decision button { min-height: 42px; margin-top: .65rem; padding: .55rem .9rem; border: 0; border-radius: 9px; color: #fff; background: var(--brand); font-weight: 800; cursor: pointer; }
.tool-decision .copy-status { margin-left: .65rem; color: var(--accent); font-size: .88rem; }
.tool-article { max-width: 1120px; }
.tool-fragment { margin-top: 1.5rem; }
.tool-guide { text-align: center; }

footer { padding: 2.5rem max(4vw, 1.25rem) 3rem; border-top: 1px solid var(--line); color: var(--muted); background: var(--paper); }
.footer-grid { display: grid; grid-template-columns: minmax(220px, 1fr) 2fr; gap: 2rem; max-width: 1160px; margin: 0 auto; }
.footer-brand { color: var(--ink); font-size: 1.25rem; font-weight: 900; text-decoration: none; }
.footer-grid p { max-width: 46ch; }
.footer-grid nav { align-content: start; justify-content: end; }
.footer-grid nav a { color: var(--muted); }
.footer-note { max-width: 1160px; margin: 1.5rem auto 0; padding-top: 1.3rem; border-top: 1px solid var(--line); font-size: .82rem; }

@media (max-width: 760px) {
  .site-header { position: static; align-items: flex-start; flex-direction: column; gap: .65rem; padding-block: .9rem; }
  .site-header nav { gap: .35rem .85rem; }
  .content-shell { width: min(94vw, 880px); padding-top: 1.4rem; }
  .hero { border-radius: 20px; }
  .principles { grid-template-columns: 1fr; }
  .article, .trust-page { border-radius: 15px; }
  .article-body table { white-space: normal; }
  .tool-article { padding: 1rem; }
  .tool-decision { padding: .85rem; }
  .article h1, .trust-page h1 { font-size: clamp(1.65rem, 6vw, 2.2rem); line-height: 1.4; word-break: keep-all; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid nav { justify-content: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
