/* ===== 전월세 가이드 — Toss 디자인 언어 적용 =====
   토스 블루 단일 강조색 + cool-grey 중성색 + 화이트 캔버스 + 공격적 라운드 + 평면 표면 + tabular 숫자.
   (출처: getdesign.kr/toss — 시각 언어만 차용, 토스 브랜드명/금융도메인 비사용) */

:root {
  /* base palette (Toss canonical) */
  --blue-500: #3182f6;  --blue-600: #2272eb;  --blue-50: #eaf2fe;
  --grey-900: #191f28;  --grey-800: #333d4b;  --grey-700: #4e5968;
  --grey-600: #6b7684;  --grey-500: #8b95a1;  --grey-400: #b0b8c1;
  --grey-300: #d1d6db;  --grey-200: #e5e8eb;  --grey-100: #f2f4f6;  --grey-50: #f9fafb;
  --red-500: #f04452;   --green-500: #15a06e;  --yellow: #ffc83b;  --orange: #ff8a00;

  /* semantic */
  --bg: #ffffff;
  --bg-soft: #f9fafb;
  --bg-soft-2: #f2f4f6;
  --ink: #191f28;
  --ink-soft: #4e5968;
  --ink-muted: #8b95a1;
  --border: #e5e8eb;
  --border-strong: #d1d6db;
  --accent: #3182f6;
  --accent-press: #2272eb;
  --accent-soft: #eaf2fe;
  --warn: #ff8a00; --warn-soft: #fff6e9; --danger: #f04452;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  --shadow-1: 0 1px 2px rgba(25,31,40,.04), 0 1px 1px rgba(25,31,40,.04);
  --shadow-2: 0 4px 12px rgba(25,31,40,.06), 0 1px 2px rgba(25,31,40,.04);
  --shadow-3: 0 12px 32px rgba(25,31,40,.10), 0 2px 6px rgba(25,31,40,.06);

  --maxw: 1100px;
  --font: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

.icon { vertical-align: middle; flex-shrink: 0; }
.badge .icon, .tag .icon, .more .icon, .go .icon { vertical-align: -2px; margin-right: 4px; }
.btn .icon { vertical-align: -3px; }
.search button .icon { display: block; }

body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  font-size: 16px; line-height: 1.6; letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: none; }
img { max-width: 100%; display: block; }
.tnum { font-variant-numeric: tabular-nums; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.section { padding: 52px 0; }
.section--warm { background: var(--bg-soft); }

/* ===== 헤더 (화이트 톱바) ===== */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.88); backdrop-filter: saturate(180%) blur(12px); }
.header-main { border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; gap: 18px; height: 66px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 20px; color: var(--grey-900); letter-spacing: -0.03em; white-space: nowrap; }
.brand .logo { width: 34px; height: 34px; border-radius: 11px; background: var(--accent); color: #fff; display: grid; place-items: center; }
.brand .logo .icon { width: 20px; height: 20px; }

.search { flex: 1; max-width: 440px; display: flex; align-items: center; background: var(--grey-100); border: 1px solid transparent; border-radius: var(--radius); overflow: hidden; transition: background .15s, border-color .15s; }
.search:focus-within { background: #fff; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search input { flex: 1; border: 0; outline: 0; padding: 11px 16px; font-size: 15px; font-family: var(--font); background: transparent; color: var(--ink); }
.search button { border: 0; background: transparent; color: var(--grey-500); padding: 0 14px 0 4px; cursor: pointer; display: grid; place-items: center; }
.search button:hover { color: var(--accent); }

.nav-cta { background: var(--accent); color: #fff; font-weight: 600; font-size: 14px; padding: 10px 18px; border-radius: var(--radius-pill); white-space: nowrap; }
.nav-cta:hover { background: var(--accent-press); color: #fff; }
.nav-toggle { display: none; background: none; border: 0; font-size: 24px; cursor: pointer; color: var(--grey-900); }

/* GNB (탭 행) */
.gnav { border-bottom: 1px solid var(--border); background: #fff; }
.gnav-inner { display: flex; gap: 6px; align-items: stretch; height: 50px; overflow-x: auto; }
.gnav-inner a { display: flex; align-items: center; color: var(--grey-700); font-weight: 600; font-size: 15px; padding: 0 14px; white-space: nowrap; border-bottom: 2.5px solid transparent; }
.gnav-inner a:hover { color: var(--grey-900); }
.gnav-inner a.strong { color: var(--grey-900); }
.gnav-inner a.active, .gnav-inner a.strong:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ===== 버튼 ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 15px; cursor: pointer; padding: 12px 20px; border-radius: var(--radius-lg); border: 0; transition: background .15s, transform .08s, color .15s; font-family: var(--font); }
.btn:active { transform: scale(.99); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-press); color: #fff; }
.btn-secondary { background: var(--grey-100); color: var(--grey-900); }
.btn-secondary:hover { background: var(--grey-200); color: var(--grey-900); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent); }
.btn-lg { padding: 15px 28px; font-size: 16px; border-radius: var(--radius-lg); }

/* ===== 배지/태그 ===== */
.badge { display: inline-flex; align-items: center; gap: 6px; background: var(--blue-50); color: var(--accent); font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: var(--radius-pill); }
.tag { font-size: 12px; font-weight: 600; color: var(--grey-700); background: var(--grey-100); padding: 4px 10px; border-radius: var(--radius-sm); display: inline-block; }

/* ===== 히어로 (화이트 캔버스 + 옐로 일러스트) ===== */
.toss-hero { padding: 16px 0 8px; }
.toss-hero .container { display: flex; align-items: center; justify-content: space-between; gap: 36px; padding-top: 40px; padding-bottom: 44px; }
.th-text { max-width: 560px; }
.th-text .badge { margin-bottom: 18px; }
.th-text h1 { font-size: clamp(30px, 5vw, 46px); font-weight: 700; line-height: 1.28; letter-spacing: -0.035em; color: var(--grey-900); margin: 0 0 16px; }
.th-text h1 .grad { color: var(--accent); }
.th-text p { font-size: clamp(15px, 2vw, 18px); color: var(--grey-700); line-height: 1.55; margin: 0 0 26px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.th-illust { flex-shrink: 0; width: 200px; height: 200px; border-radius: 36px; background: linear-gradient(150deg, #ffd45e, var(--yellow)); display: grid; place-items: center; box-shadow: var(--shadow-2); }
.th-illust .icon { width: 110px; height: 110px; color: var(--grey-900); opacity: .9; }

/* 서브 페이지 타이틀 */
.hero.sub { padding: 14px 0; }
.hero.sub .container { background: var(--bg-soft); border-radius: var(--radius-xl); padding: 38px 32px; }
.hero.sub .badge { margin-bottom: 12px; }
.hero.sub h1 { font-size: clamp(24px, 3.6vw, 34px); font-weight: 700; color: var(--grey-900); letter-spacing: -0.03em; margin: 0 0 6px; }
.hero.sub h1 .grad { color: var(--accent); }
.hero.sub p { color: var(--grey-700); margin: 0; }

/* ===== 빠른 메뉴 (grid-list: 흰 카드 + blue-50 아이콘 칩) ===== */
.quicklinks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.qtile { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px 16px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; transition: transform .12s, box-shadow .12s; color: var(--grey-900); }
.qtile:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.qtile .qi { width: 54px; height: 54px; border-radius: var(--radius); background: var(--blue-50); color: var(--accent); display: grid; place-items: center; }
.qtile .ql { font-weight: 600; font-size: 15px; letter-spacing: -0.02em; }
.qtile .qd { font-size: 12.5px; color: var(--ink-muted); }

/* ===== 섹션 헤더 ===== */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-head h2 { font-size: clamp(21px, 3vw, 27px); font-weight: 700; letter-spacing: -0.03em; margin: 0; color: var(--grey-900); }
.section-head p { color: var(--grey-600); margin: 6px 0 0; font-size: 14.5px; }
.section-head .more { font-weight: 600; white-space: nowrap; color: var(--accent); font-size: 14.5px; }

/* ===== 그리드 ===== */
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ===== 계산기 리스트 (행) ===== */
.calc-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.calc-row { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; color: var(--grey-900); transition: transform .12s, box-shadow .12s; }
.calc-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.calc-row .ci { width: 48px; height: 48px; border-radius: var(--radius); background: var(--blue-50); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.calc-row .cmain { flex: 1; min-width: 0; }
.calc-row .ct { font-weight: 700; font-size: 16px; letter-spacing: -0.02em; }
.calc-row .cd { font-size: 13px; color: var(--grey-600); margin-top: 2px; }
.calc-row .carrow { color: var(--grey-400); flex-shrink: 0; }
.calc-row:hover .carrow { color: var(--accent); }

/* ===== 리스트 로우 (가이드/인기글) ===== */
.list-rows { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.lt-row { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--border); color: var(--grey-900); }
.lt-row:last-child { border-bottom: 0; }
.lt-row:hover { background: var(--grey-50); }
.lt-num { font-size: 15px; font-weight: 700; color: var(--accent); width: 24px; text-align: center; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.lt-ico { width: 40px; height: 40px; border-radius: var(--radius); background: var(--blue-50); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.lt-main { flex: 1; min-width: 0; }
.lt-main .lt-t { font-weight: 600; font-size: 15.5px; color: var(--grey-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -0.01em; }
.lt-row:hover .lt-t { color: var(--accent); }
.lt-main .lt-s { font-size: 13px; color: var(--grey-600); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lt-meta { text-align: right; flex-shrink: 0; font-size: 12.5px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }

/* ===== 카드 (가이드/관련글: 흰 카드 + 아이콘 칩) ===== */
.card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; transition: transform .12s, box-shadow .12s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
a.card:hover { color: inherit; }
.post-card { display: flex; flex-direction: column; height: 100%; }
.post-card .thumb { width: 48px; height: 48px; border-radius: var(--radius); background: var(--blue-50); color: var(--accent); display: grid; place-items: center; margin-bottom: 14px; }
.post-card .tag { align-self: flex-start; margin-bottom: 8px; }
.post-card h3 { font-size: 16.5px; font-weight: 700; margin: 0 0 8px; color: var(--grey-900); line-height: 1.4; letter-spacing: -0.02em; }
.post-card:hover h3 { color: var(--accent); }
.post-card p { color: var(--grey-600); font-size: 13.5px; margin: 0 0 14px; flex: 1; line-height: 1.55; }
.post-meta { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }

/* 도구 카드 (tools_index) */
.tool-card { display: flex; flex-direction: column; height: 100%; }
.tool-card .emoji { width: 56px; height: 56px; border-radius: var(--radius); background: var(--blue-50); color: var(--accent); display: grid; place-items: center; margin-bottom: 14px; }
.tool-card h3 { font-size: 17px; font-weight: 700; margin: 0 0 6px; color: var(--grey-900); letter-spacing: -0.02em; }
.tool-card p { color: var(--grey-600); font-size: 13.5px; margin: 0 0 14px; flex: 1; line-height: 1.55; }
.tool-card .go { font-weight: 600; color: var(--accent); font-size: 13.5px; }

/* 칩 (필터 탭) */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.chip { padding: 9px 16px; border-radius: var(--radius-pill); font-weight: 600; font-size: 14px; background: #fff; color: var(--grey-700); border: 1px solid var(--border-strong); }
.chip:hover { border-color: var(--grey-400); color: var(--grey-900); }
.chip.active { background: var(--grey-900); color: #fff; border-color: var(--grey-900); }

/* ===== 안내 스트립 (면책) ===== */
.notice-strip { display: flex; align-items: flex-start; gap: 10px; background: var(--blue-50); border-radius: var(--radius); padding: 14px 16px; color: var(--grey-700); font-size: 13.5px; line-height: 1.6; }
.notice-strip .icon { color: var(--accent); flex-shrink: 0; margin-top: 1px; }

/* ===== FAQ 아코디언 ===== */
.faq { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: #fff; }
.faq details { border-bottom: 1px solid var(--border); }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; padding: 18px; font-weight: 600; font-size: 15.5px; color: var(--grey-900); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; color: var(--grey-400); font-weight: 300; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; color: var(--accent); }
.faq .faq-body { padding: 0 18px 18px; color: var(--grey-700); font-size: 14.5px; line-height: 1.7; }

/* ===== 계산기 UI ===== */
.tool-stage { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 28px; box-shadow: var(--shadow-1); }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; color: var(--grey-800); }
textarea, input[type="text"], input[type="number"], input[type="date"], select {
  width: 100%; font-family: var(--font); font-size: 16px; color: var(--ink);
  background: var(--grey-100); border: 1px solid transparent; border-radius: var(--radius); padding: 13px 14px; transition: border-color .15s, box-shadow .15s, background .15s; }
textarea:focus, input:focus, select:focus { outline: none; background: #fff; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { min-height: 120px; resize: vertical; }
.tool-stage .btn { width: 100%; }
.result-box { margin-top: 20px; background: var(--blue-50); border-radius: var(--radius-lg); padding: 24px; text-align: center; animation: result-pop .3s ease; }
@keyframes result-pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.result-big { font-size: 28px; font-weight: 700; color: var(--grey-900); letter-spacing: -0.02em; line-height: 1.3; font-variant-numeric: tabular-nums; }
.result-big b { color: var(--accent); }
.stat-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.stat { flex: 1; min-width: 100px; background: #fff; border-radius: var(--radius); padding: 14px 12px; text-align: center; }
.stat .n { font-size: 22px; font-weight: 700; color: var(--grey-900); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 12px; color: var(--grey-600); margin-top: 3px; font-weight: 500; }
.tool-note { margin: 16px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--grey-600); text-align: left; }

/* ===== 본문 (가이드 글) ===== */
.prose { font-size: 17px; line-height: 1.75; color: var(--grey-800); }
.prose h2 { font-size: 23px; font-weight: 700; margin: 38px 0 14px; letter-spacing: -0.02em; color: var(--grey-900); }
.prose h3 { font-size: 18.5px; font-weight: 700; margin: 26px 0 10px; color: var(--grey-900); }
.prose p { margin: 0 0 18px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin: 7px 0; }
.prose blockquote { margin: 22px 0; padding: 16px 18px; background: var(--grey-50); border-radius: var(--radius); color: var(--grey-700); }
.prose code { background: var(--grey-100); padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.prose a { color: var(--accent); }
.prose strong, .prose b { color: var(--grey-900); font-weight: 700; }
.prose img { width: 100%; max-height: 360px; object-fit: cover; border-radius: var(--radius-lg); margin: 20px 0 8px; border: 1px solid var(--border); }
.prose p:has(> img) { margin-bottom: 24px; color: var(--ink-muted); font-size: 13px; text-align: center; }
.prose p:has(> img) img { margin-bottom: 8px; }
.prose p:has(> em:only-child) { color: var(--ink-muted); font-size: 13px; text-align: center; margin: 0 0 24px; }

/* 글 상단 헤더 */
.article-head { padding: 8px 0 18px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.article-head .emoji { width: 56px; height: 56px; border-radius: var(--radius); background: var(--blue-50); color: var(--accent); display: inline-grid; place-items: center; }
.article-head h1 { font-size: clamp(25px, 4vw, 36px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.3; margin: 14px 0; color: var(--grey-900); }
.article-head .meta { color: var(--ink-muted); font-size: 13.5px; display: flex; gap: 12px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }

/* ===== 광고 슬롯 ===== */
.ad-slot { margin: 28px auto; text-align: center; min-height: 90px; display: flex; align-items: center; justify-content: center; }

/* ===== 푸터 ===== */
.site-footer { background: var(--grey-50); border-top: 1px solid var(--border); padding: 44px 0 30px; margin-top: 20px; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
.footer-brand { max-width: 300px; }
.footer-brand .brand { margin-bottom: 12px; }
.footer-brand p { color: var(--grey-600); font-size: 13.5px; line-height: 1.65; }
.footer-col h4 { font-size: 13px; font-weight: 700; color: var(--grey-900); margin: 0 0 12px; }
.footer-col a { display: block; color: var(--grey-600); font-size: 13.5px; padding: 5px 0; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--ink-muted); font-size: 12.5px; }

/* ===== 반응형 ===== */
@media (max-width: 900px) {
  .quicklinks { grid-template-columns: repeat(2, 1fr); }
  .calc-list { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .th-illust { width: 150px; height: 150px; border-radius: 28px; }
  .th-illust .icon { width: 84px; height: 84px; }
}
@media (max-width: 640px) {
  .nav { gap: 10px; height: 58px; }
  .nav-cta { display: none; }
  .search { max-width: none; }
  .nav-toggle { display: block; }
  .gnav { display: none; }
  .gnav.open { display: block; }
  .gnav.open .gnav-inner { flex-direction: column; height: auto; }
  .gnav.open .gnav-inner a { height: 46px; border-bottom: 1px solid var(--border); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .quicklinks { grid-template-columns: repeat(2, 1fr); }
  .toss-hero .container { flex-direction: column-reverse; text-align: center; padding-top: 28px; }
  .th-text .badge, .hero-actions { justify-content: center; }
  .hero-actions { display: flex; }
  .lt-meta { display: none; }
  .section { padding: 38px 0; }
}
