:root {
  color-scheme: light dark;
  --text: #131a2b; --muted: #556079; --line: #e1e5ef; --bg: #ffffff; --soft: #f5f7fc;
  --accent: #4163f0; --accent-2: #7b5cff; --accent-text: #ffffff;
  --hero-bg: #0b1122; --hero-text: #eef2ff; --hero-muted: #aeb9d6;
  --yes: #1d8a55; --no: #c2410c; --part: #9a6b00;
}
@media (prefers-color-scheme: dark) {
  :root { --text: #e8ecf7; --muted: #a2adc6; --line: #243049; --bg: #090d18; --soft: #0f1627; --accent: #6f8cff; --accent-2: #9a86ff; --accent-text: #0a0f1f; --yes: #4ade80; --no: #fb923c; --part: #facc15; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.7 "Pretendard", "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif; word-break: keep-all; overflow-x: hidden; }
a { color: var(--accent); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* 상단 */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--hero-bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255,255,255,.08); }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 9px; color: #fff; font-weight: 800; font-size: 18px; text-decoration: none; }
.nav nav { display: flex; gap: 20px; font-size: 14px; }
.nav nav a { color: var(--hero-muted); text-decoration: none; }
.nav nav a:hover { color: #fff; }

/* 첫 화면 */
.hero { position: relative; overflow: hidden; padding: 72px 0 84px; color: var(--hero-text);
  background: radial-gradient(900px 500px at 85% 10%, rgba(123,92,255,.35), transparent 60%), radial-gradient(700px 500px at 10% 90%, rgba(65,99,240,.35), transparent 60%), var(--hero-bg); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-block; margin: 0 0 18px; padding: 5px 12px; border: 1px solid rgba(143,166,255,.4); border-radius: 999px; color: #b9c7ff; font-size: 13px; font-weight: 700; }
.hero h1 { margin: 0 0 20px; font-size: clamp(32px, 4.6vw, 52px); line-height: 1.22; letter-spacing: -0.03em; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #8fa6ff, #c4a8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.answer { margin: -4px 0 16px; color: #fff; font-size: clamp(19px, 2.2vw, 24px); font-weight: 700; letter-spacing: -0.01em; }
.sub { margin: 0 0 30px; color: var(--hero-muted); font-size: 18px; }
.sub strong { color: #fff; font-weight: 700; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; }
.button { display: inline-block; padding: 14px 24px; border-radius: 12px; font-weight: 800; text-decoration: none; transition: transform .15s; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 10px 30px rgba(65,99,240,.35); }
.button.ghost { border: 1px solid rgba(255,255,255,.25); color: #fff; }
.note { margin: 16px 0 0; color: var(--hero-muted); font-size: 14px; }

/* 검색 화면 예시 */
.demo { border: 1px solid rgba(255,255,255,.12); border-radius: 16px; background: #0e1526; box-shadow: 0 30px 80px rgba(0,0,0,.5); overflow: hidden; transform: perspective(1400px) rotateY(-6deg); }
.demo-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #111a2e; border-bottom: 1px solid rgba(255,255,255,.06); }
.demo-bar span { width: 10px; height: 10px; border-radius: 50%; background: #2a3654; }
.demo-bar b { margin-left: 8px; color: #8e9bbb; font-size: 12px; }
.demo-body { padding: 16px; font-size: 13px; }
.demo-search { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border: 1px solid #5b7cfa; border-radius: 10px; color: #fff; font-size: 15px; background: #0b1120; }
.demo-search i { font-style: normal; color: #8fa6ff; }
.caret { width: 2px; height: 18px; background: #8fa6ff; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.demo-tabs { display: flex; gap: 6px; margin: 12px 0; }
.demo-tabs span { padding: 3px 10px; border: 1px solid #2c3854; border-radius: 7px; color: #9aa6c4; font-size: 12px; }
.demo-tabs .on { border-color: #5b7cfa; background: #25346a; color: #fff; }
.demo-hit { margin-top: 8px; padding: 10px 12px; border: 1px solid #1f2a44; border-radius: 10px; background: #121b31; }
.demo-head { display: flex; align-items: center; gap: 8px; }
.demo-head b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #eef2ff; }
.demo-head small { color: #6f7c9c; }
.ft { flex: none; padding: 1px 6px; border-radius: 5px; font-size: 10px; font-weight: 800; color: #fff; }
.ft.xls { background: #1d7a46; } .ft.hwp { background: #2f6fd6; } .ft.mail { background: #7b5cff; } .ft.img { background: #b4591b; }
.demo-hit p { margin: 6px 0 0; color: #aab4cf; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loc { margin-right: 8px; padding: 1px 6px; border-radius: 5px; background: #1f2d52; color: #a9bbff; font-size: 11px; }
.demo mark { background: #5b7cfa; color: #fff; border-radius: 3px; padding: 0 1px; }

/* 공통 구역 */
.section { padding: 80px 0; }
.section.alt { background: var(--soft); border-block: 1px solid var(--line); }
.section h2 { margin: 0 0 12px; font-size: clamp(26px, 3.4vw, 36px); line-height: 1.3; letter-spacing: -0.02em; }
.lead { max-width: 720px; margin: 0 0 28px; color: var(--muted); font-size: 17px; }

/* 비교표 */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
.compare { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; }
.compare th, .compare td { padding: 14px 18px; border-bottom: 1px solid var(--line); text-align: left; }
.compare tr:last-child td { border-bottom: 0; }
.compare thead th { background: var(--soft); font-size: 14px; color: var(--muted); }
.compare th.us { color: var(--accent); }
.compare td.us { background: color-mix(in srgb, var(--accent) 6%, transparent); font-weight: 700; }
.yes::before { content: "✓ "; color: var(--yes); font-weight: 800; }
.no { color: var(--no); } .no::before { content: "✕ "; font-weight: 800; }
.part { color: var(--part); } .part::before { content: "△ "; font-weight: 800; }

/* 사용 예 */
.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.cases article { position: relative; padding: 26px 22px 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.cases .q { position: absolute; top: 4px; left: 14px; font-size: 48px; line-height: 1; color: color-mix(in srgb, var(--accent) 45%, transparent); font-family: Georgia, serif; }
.cases p { margin: 10px 0 0; font-size: 16px; }
.cases b { color: var(--accent); }

/* 기능 */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.features article { padding: 24px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--soft); }
.ico { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 14px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.features h3 { margin: 0 0 8px; font-size: 18px; }
.features p { margin: 0; color: var(--muted); font-size: 15px; }

/* 단계 */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; padding: 24px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 12px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 800; }
.steps b { display: block; margin-bottom: 6px; font-size: 18px; }
.steps span { color: var(--muted); font-size: 15px; }

/* 보안 */
.privacy { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; align-items: start; }
.checks { margin: 0; padding: 0; list-style: none; }
.checks li { position: relative; padding: 12px 0 12px 34px; border-bottom: 1px solid var(--line); }
.checks li::before { content: "✓"; position: absolute; left: 4px; top: 12px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--yes) 18%, transparent); color: var(--yes); font-size: 12px; font-weight: 800; }

/* 가격 */
.pricing { text-align: center; }
.card { max-width: 440px; margin: 24px auto 0; padding: 32px 28px; border: 1px solid var(--line); border-radius: 20px; background: var(--bg); text-align: left; box-shadow: 0 20px 50px rgba(20,30,70,.08); }
.plan { margin: 0; color: var(--muted); font-weight: 700; }
.price { margin: 6px 0 2px; font-size: 40px; font-weight: 900; letter-spacing: -0.02em; }
.once { margin: 0 0 16px; color: var(--accent); font-weight: 700; font-size: 14px; }
.card ul { padding-left: 20px; margin: 0 0 22px; }
.card .button { display: block; text-align: center; }
.small { color: var(--muted); font-size: 13px; }

/* 질문 */
.faq details { padding: 16px 0; border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 700; font-size: 17px; }
.faq p { margin: 8px 0 0; color: var(--muted); }

.foot { padding: 32px 0 44px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; text-align: center; }
.foot p { margin: 4px 0; }

/* 좁은 화면 */
@media (max-width: 900px) {
  .hero { padding: 48px 0 56px; }
  .hero-grid, .privacy { grid-template-columns: 1fr; gap: 32px; }
  .demo { transform: none; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .cases, .steps { grid-template-columns: 1fr; }
  .nav nav { display: none; }
  .section { padding: 56px 0; }
}
@media (max-width: 520px) {
  .features { grid-template-columns: 1fr; }
  .sub { font-size: 16px; }
}

/* 사용 방법 */
#howto .wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px 48px; align-items: start; }
#howto h2, #howto .lead { grid-column: 1 / -1; }
.journey { margin: 0; padding: 0; list-style: none; counter-reset: j; }
.journey li { counter-increment: j; position: relative; padding: 0 0 22px 52px; }
.journey li::before { content: counter(j); position: absolute; left: 0; top: 0; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 800; }
.journey li:not(:last-child)::after { content: ""; position: absolute; left: 16px; top: 38px; bottom: 4px; width: 2px; background: var(--line); }
.journey b { display: block; font-size: 17px; margin-bottom: 2px; }
.journey span { color: var(--muted); font-size: 15px; }
.journey em { font-style: normal; font-weight: 700; color: var(--text); }
.keybox { position: sticky; top: 84px; margin: 0; padding: 22px; border-radius: 16px; background: #111827; color: #eef2ff; border: 1px solid #2c3854; box-shadow: 0 20px 50px rgba(20,30,70,.18); font-size: 14px; }
.kb-title { font-weight: 800; font-size: 16px; }
.kb-sub { margin: 4px 0 14px; color: #c3cdf0; }
.kb-label { color: #aeb8ce; font-size: 13px; margin-bottom: 4px; }
.kb-input { display: flex; align-items: center; gap: 2px; padding: 9px 10px; border: 1px solid #5b7cfa; border-radius: 7px; background: #0d1321; font-family: Consolas, monospace; font-size: 13px; overflow: hidden; white-space: nowrap; }
.kb-buttons { display: flex; justify-content: flex-end; gap: 6px; margin-top: 16px; }
.kb-btn { padding: 7px 12px; border-radius: 8px; background: #1a2235; color: #cdd6ea; font-size: 13px; }
.kb-btn.on { background: #5b7cfa; color: #fff; font-weight: 700; box-shadow: 0 0 0 3px rgba(91,124,250,.35); }
.keybox figcaption { margin-top: 14px; color: #8e9bbb; font-size: 12px; text-align: center; }
@media (max-width: 900px) { #howto .wrap { grid-template-columns: 1fr; } .keybox { position: static; } }

.alt-download { display: inline-block; margin-top: 8px; color: var(--hero-muted); font-size: 13px; }
.alt-download:hover { color: #fff; }

/* 검색 대상별 안내 페이지 (hwp-search.html 등) */
.hero.page { padding: 56px 0 64px; }
.hero.page .hero-copy { max-width: 760px; }
.hero.page h1 { font-size: clamp(30px, 4vw, 44px); }
.crumb { margin: 0 0 14px; font-size: 13px; color: var(--hero-muted); }
.crumb a { color: var(--hero-muted); }
.prose { max-width: 760px; }
.prose p, .prose li { color: var(--muted); }
.prose h3 { margin: 28px 0 6px; font-size: 19px; color: var(--text); }
.related { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 0; padding: 0; list-style: none; }
.related a { display: inline-block; padding: 10px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); font-weight: 700; text-decoration: none; }
.related a:hover { border-color: var(--accent); }
.related-title { margin: 40px 0 0; font-size: 18px; color: var(--text); }
