:root {
  --red: #d4242a;
  --red-dark: #be1f25;
  --red-50: #fdf3f3;
  --red-100: #fbe3e4;
  --red-200: #f5c4c6;
  --navy: #1e2a4a;
  --navy-dark: #161f36;
  --ink: #0f172a;
  --body: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg-gray: #f8fafc;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  color: var(--body);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { color: var(--ink); line-height: 1.25; }
img { max-width: 100%; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: .8rem; }
.center { text-align: center; }
.accent { color: var(--red); }

/* topbar */
.topbar {
  background: var(--red); color: #fff; text-align: center;
  font-size: .82rem; padding: 8px 16px;
}
.topbar a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 1.3rem; font-weight: 800; color: var(--red); letter-spacing: -.5px; }
.brand span { font-size: .7rem; color: #94a3b8; font-weight: 700; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { padding: 8px 14px; font-weight: 600; font-size: .92rem; color: var(--body); border-radius: 8px; }
.nav a:hover { color: var(--red); }
.nav .nav-cta { background: var(--navy); color: #fff; }
.nav .nav-cta:hover { background: var(--navy-dark); color: #fff; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 700; padding: 13px 26px; border-radius: 12px; cursor: pointer; border: 2px solid transparent; transition: background .15s, color .15s; font-size: 1rem; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-dark); color: #fff; }
.btn-outline { border-color: var(--navy); color: var(--navy); background: #fff; }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-text { color: var(--red); font-weight: 700; padding: 13px 8px; }
.btn-sm { padding: 9px 18px; font-size: .9rem; border-radius: 10px; }
.block { display: block; width: 100%; }

/* sections */
.section { padding: 64px 0; }
.section-gray { background: var(--bg-gray); }
.eyebrow { color: var(--red); font-size: .78rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; margin: 0 0 10px; }
.rule { width: 56px; height: 4px; background: var(--red); margin: 16px 0; border-radius: 2px; }
.center-rule { margin-left: auto; margin-right: auto; }
.lead { font-size: 1.12rem; color: var(--body); line-height: 1.8; }

/* hero */
.hero { background: #fff; border-bottom: 1px solid var(--line); padding: 64px 0; }
.hero-inner { text-align: center; max-width: 760px; margin: 0 auto; }
.hero h1 { font-size: 2.6rem; letter-spacing: -1px; margin: 18px 0; }
.badge { display: inline-block; background: var(--red-50); border: 1px solid var(--red-200); color: var(--red-dark); font-weight: 700; font-size: .8rem; border-radius: 999px; padding: 6px 16px; }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.center-row { justify-content: center; }

/* section headers with side link */
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.sec-head h2, .section h2 { font-size: 1.8rem; margin: 0; }
.see-all { color: var(--red); font-weight: 700; font-size: .9rem; white-space: nowrap; }

/* grids + cards */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; transition: border-color .15s, box-shadow .15s; height: 100%; }
.card:hover { border-color: var(--red-200); box-shadow: 0 8px 24px rgba(15,23,42,.06); }
.card-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.chip { font-size: .72rem; font-weight: 700; color: var(--red-dark); background: var(--red-50); border-radius: 999px; padding: 4px 12px; }
.card-title { font-size: 1.12rem; margin: 0 0 10px; }
.card-desc { font-size: .9rem; color: var(--muted); margin: 0 0 18px; flex: 1; }
.card-link { color: var(--red); font-weight: 700; font-size: .9rem; }

/* topics */
.topics { margin-top: 8px; }
.topic { display: flex; justify-content: space-between; gap: 16px; border: 1px solid var(--line); border-radius: 16px; padding: 24px; background: #fff; }
.topic:hover { border-color: var(--red-200); box-shadow: 0 8px 24px rgba(15,23,42,.06); }
.topic h3 { margin: 0 0 6px; }
.topic p { margin: 0; color: var(--muted); font-size: .9rem; }
.topic .arrow { color: var(--red-200); font-size: 1.3rem; }
.topic:hover .arrow { color: var(--red); }

.big-num { font-size: 4rem; font-weight: 900; color: var(--red-100); line-height: 1; }

/* page head */
.page-head { background: #fff; border-bottom: 1px solid var(--line); padding: 56px 0 40px; }
.page-head h1 { font-size: 2.2rem; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.chips a { font-size: .85rem; font-weight: 600; color: var(--body); background: #f1f5f9; border: 1px solid var(--line); border-radius: 999px; padding: 6px 16px; }
.chips a:hover { background: var(--navy); color: #fff; }
.cat-block { margin-bottom: 56px; scroll-margin-top: 90px; }
.cat-block h2 { font-size: 1.5rem; margin: 0 0 4px; }

/* article */
.article { padding: 48px 0; }
.crumbs { font-size: .8rem; color: var(--muted); margin-bottom: 24px; }
.crumbs a:hover { color: var(--red); }
.article-head h1 { font-size: 2.3rem; letter-spacing: -.5px; margin: 14px 0; }
.cover { width: 100%; border-radius: 16px; border: 1px solid var(--line); margin-bottom: 32px; }
.toc { border: 1px solid var(--line); background: var(--bg-gray); border-radius: 12px; padding: 20px 24px; margin: 32px 0; }
.toc-h { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.toc ol { margin: 0; padding-left: 18px; }
.toc li { margin: 6px 0; }
.toc a { font-size: .92rem; color: var(--body); }
.toc a:hover { color: var(--red); }

/* markdown body */
.md { color: var(--body); font-size: 1.05rem; line-height: 1.85; }
.md > * + * { margin-top: 1.25rem; }
.md h2 { font-size: 1.5rem; padding-top: 1.5rem; scroll-margin-top: 90px; }
.md h3 { font-size: 1.15rem; color: var(--red-dark); padding-top: .5rem; }
.md strong { color: var(--ink); font-weight: 600; }
.md a { color: var(--red-dark); text-decoration: underline; text-underline-offset: 2px; }
.md ul, .md ol { padding-left: 1.5rem; }
.md ul { list-style: disc; }
.md ol { list-style: decimal; }
.md li + li { margin-top: .5rem; }
.md blockquote { border-left: 4px solid var(--red); background: var(--red-50); padding: 16px 22px; border-radius: 0 8px 8px 0; margin: 0; }
.md code { background: #f1f5f9; padding: 1px 6px; border-radius: 4px; font-size: .9em; }
.table-wrap { overflow-x: auto; }
.md table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 420px; }
.md th, .md td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); }
.md th { font-weight: 700; color: var(--ink); border-bottom: 2px solid var(--red); }
.md td:first-child { color: var(--ink); font-weight: 500; }

/* faq */
.faq { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 20px 0; cursor: pointer; font-weight: 600; color: var(--ink); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--red); }
.faq .plus { color: var(--red); font-size: 1.5rem; font-weight: 300; transition: transform .2s; }
.faq details[open] .plus { transform: rotate(45deg); }
.faq p { padding: 0 40px 24px 0; font-size: .92rem; color: var(--muted); margin: 0; }

/* soft cta */
.soft-cta { margin-top: 56px; border: 1px solid var(--line); background: var(--bg-gray); border-radius: 16px; padding: 28px; text-align: center; }
.soft-cta .cta-title { font-weight: 700; font-size: 1.1rem; color: var(--ink); margin: 0 0 8px; }
.soft-cta p { color: var(--muted); font-size: .92rem; max-width: 460px; margin: 0 auto; }
.soft-cta .btn { margin-top: 18px; }
.related-h { font-size: 1.25rem; margin: 0 0 24px; }

/* about */
.about-grid { display: grid; grid-template-columns: 1fr 320px; gap: 60px; align-items: start; margin-top: 24px; }
.about-grid article p { line-height: 1.85; }
.about-grid .sub, .sub { font-size: 1.1rem; color: var(--red-dark); margin-top: 36px; }
.big-stat { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.big-stat .big-num { font-size: 7rem; }
.big-stat-title { font-size: 1.4rem; font-weight: 800; color: var(--ink); margin: 0; }
.cred { background: var(--bg-gray); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.cred-h { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 18px 24px; margin: 0; border-bottom: 1px solid var(--line); }
.cred ul { list-style: none; margin: 0; padding: 0; }
.cred li { padding: 16px 24px; border-bottom: 1px solid var(--line); }
.cred li:last-child { border-bottom: none; }
.cred li strong { display: block; color: var(--ink); font-size: .92rem; }
.cred li span { font-size: .8rem; color: var(--muted); }

/* testimonials */
.quote-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 26px; display: flex; flex-direction: column; gap: 18px; }
.quote-mark { font-size: 3rem; color: var(--red-100); line-height: 0; height: 24px; font-weight: 900; }
.quote-card blockquote { margin: 0; font-size: .9rem; color: var(--body); flex: 1; }
.quote-card footer { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.t-name { font-weight: 700; color: var(--ink); font-size: .9rem; margin: 0; }
.t-right { text-align: right; }
.t-result { color: var(--red); font-weight: 900; font-size: 1.05rem; margin: 0; }

/* contact */
.contact-card { background: var(--bg-gray); border: 1px solid var(--line); border-radius: 16px; padding: 36px; margin-top: 28px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.contact-emoji { font-size: 2.4rem; }
.contact-card h3 { margin: 0; }
.contact-card p { margin: 0; color: var(--muted); max-width: 420px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; align-items: stretch; }
.contact-grid .contact-card { margin-top: 0; padding: 32px 28px; }
.contact-qr { width: 180px; height: 180px; border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: #fff; }
@media (max-width: 680px) { .contact-grid { grid-template-columns: 1fr; } }

/* footer */
.site-footer { background: var(--navy-dark); border-top: 4px solid var(--red); padding: 56px 0 36px; color: #94a3b8; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-brand { font-size: 1.1rem; font-weight: 800; color: #fff; margin: 0 0 12px; }
.footer-text { font-size: .85rem; line-height: 1.7; max-width: 360px; }
.footer-text a { color: #fff; text-decoration: underline; }
.footer-h { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #64748b; margin: 0 0 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 10px 0; }
.site-footer li a { font-size: .88rem; color: #94a3b8; }
.site-footer li a:hover { color: var(--red-200); }
.footer-bottom { margin-top: 48px; padding-top: 32px; border-top: 1px solid rgba(255,255,255,.08); }
.footer-bottom p { font-size: .75rem; color: #64748b; line-height: 1.7; }

/* admin */
.admin { background: var(--bg-gray); }
.admin-wrap { padding: 40px 24px 80px; max-width: 880px; }
.login-box { max-width: 380px; margin: 60px auto; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 32px; text-align: center; }
.admin-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.admin-nav { margin-bottom: 24px; color: var(--muted); }
.admin-nav a { color: var(--red); font-weight: 600; }
.admin-sec { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 28px; margin-bottom: 28px; scroll-margin-top: 20px; }
.admin-sec h2 { margin-top: 0; }
.admin-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 24px; }
.admin-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.admin-row:last-child { border-bottom: none; }
.admin-row .muted { display: block; }
.admin-row-actions { display: flex; gap: 12px; align-items: center; }
.admin-row-actions a { color: var(--navy); font-weight: 600; font-size: .9rem; }
.editor { display: flex; flex-direction: column; }
.lbl { font-weight: 600; font-size: .9rem; color: var(--ink); margin: 16px 0 6px; }
.fld { width: 100%; border: 1px solid #cbd5e1; border-radius: 10px; padding: 10px 12px; font: inherit; color: var(--ink); }
.fld:focus { outline: none; border-color: var(--red); }
.fld.short { width: 120px; }
.fld.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
.editor .btn { margin-top: 22px; align-self: flex-start; }
.t-row { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; display: grid; gap: 8px; }
.link-btn { background: none; border: none; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
.link-btn:hover { color: var(--red); }
.link-btn.danger:hover { color: var(--red); }
.flash { background: var(--red-50); border: 1px solid var(--red-200); color: var(--ink); padding: 12px 16px; border-radius: 10px; font-size: .9rem; }
.error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; padding: 12px 16px; border-radius: 10px; font-size: .9rem; }
.notice { background: var(--bg-gray); border: 1px solid var(--line); padding: 16px; border-radius: 10px; font-size: .88rem; color: var(--body); }
.admin code, .flash code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-size: .85em; }

/* responsive */
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 600px) {
  .hero h1 { font-size: 2rem; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .sec-head { flex-direction: column; align-items: flex-start; }
  .article-head h1 { font-size: 1.7rem; }
  .big-stat .big-num { font-size: 5rem; }
  .nav a { padding: 8px 8px; font-size: .85rem; }
  .brand { font-size: 1.1rem; }
}
