:root {
  --bg: #F6F7F9;
  --surface: #FFFFFF;
  --surface-subtle: #F1F4F8;
  --border: #E4E7EC;
  --border-strong: #CBD5E1;
  --text: #0F172A;
  --text-muted: #475569;
  --text-soft: #64748B;
  --navy: #0B1120;
  --navy-card: #11192E;
  --navy-border: #1E293B;
  --emerald: #10B981;
  --emerald-bright: #34D399;
  --emerald-bg: #ECFDF5;
  --emerald-text: #047857;
  --blue: #3B82F6;
  --amber: #F59E0B;
  --amber-bg: #FFFBEB;
  --amber-text: #B45309;
  --rose: #EF4444;
  --rose-bg: #FEF2F2;
  --rose-text: #B91C1C;
  --indigo: #6366F1;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.05);
  --shadow-navy: 0 12px 32px rgba(11, 17, 32, 0.16);
  --font-sans: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select {
  font-family: inherit;
}

input, select {
  font-size: 16px;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header: Dark Obsidian Glass Floating Bar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  padding: 10px 12px 0;
}

.header-bar {
  max-width: 1180px;
  margin: 0 auto;
  background: rgba(11, 17, 32, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(11, 17, 32, 0.14);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: block;
}

.brand-en {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--emerald-bright);
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  color: #CBD5E1;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 7px 11px;
  border-radius: 8px;
  transition: background-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.my-car-pill {
  display: inline-block;
  vertical-align: middle;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #A7F3D0;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  max-width: 175px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-car-pill.is-empty {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: #94A3B8;
}

.menu-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

/* Main Layout */
.main-content {
  padding: 22px 0 56px;
}

/* Compact Hero */
.hero-studio {
  background: var(--navy);
  color: #FFFFFF;
  border-radius: var(--radius-xl);
  padding: 26px 24px;
  box-shadow: var(--shadow-navy);
  border: 1px solid var(--navy-border);
  margin-bottom: 20px;
}

.hero-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.hero-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.hero-title-accent {
  color: var(--emerald-bright);
}

.hero-stat-chip {
  font-size: 0.8rem;
  font-weight: 600;
  color: #94A3B8;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 5px 11px;
  border-radius: 999px;
}

.search-box-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-input-lg {
  width: 100%;
  background: #FFFFFF;
  color: var(--text);
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 14px 48px 14px 16px;
  font-size: 16px;
  font-weight: 600;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-input-lg::placeholder {
  color: #94A3B8;
  font-weight: 500;
}

.search-input-lg:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.22);
}

.search-clear-btn {
  position: absolute;
  right: 12px;
  background: #E2E8F0;
  color: #334155;
  border: none;
  border-radius: 999px;
  width: 28px;
  height: 28px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}

.search-clear-btn.is-visible {
  display: inline-flex;
}

.chip-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.filter-chip {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.07);
  color: #E2E8F0;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-chip:hover {
  background: rgba(255, 255, 255, 0.15);
}

.filter-chip.is-active {
  background: var(--emerald);
  border-color: var(--emerald);
  color: #06281E;
}

/* Quick Bar & Bento Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-xs);
}

.section-gap {
  margin-top: 24px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.section-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-meta {
  font-size: 0.84rem;
  color: var(--text-soft);
  font-weight: 600;
}

.quick-compare-bar {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr auto;
  gap: 12px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-xs);
}

.quick-compare-result {
  background: var(--navy);
  color: #FFFFFF;
  border-radius: 10px;
  padding: 10px 14px;
  text-align: right;
}

.quick-compare-result .label {
  display: block;
  font-size: 0.72rem;
  color: #94A3B8;
}

.quick-compare-result .value {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--emerald-bright);
}

/* Car Grid */
.cars-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.car-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.car-card:hover {
  transform: translateY(-2px);
  border-color: var(--emerald);
  box-shadow: var(--shadow-sm);
}

.car-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.car-brand-code {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-soft);
}

.car-card-title {
  margin: 2px 0 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.fuel-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.fuel-gasoline { background: #EEF2FF; color: #3730A3; }
.fuel-diesel { background: #FEF3C7; color: #92400E; }
.fuel-lpg { background: #E0F2FE; color: #075985; }
.fuel-hev { background: var(--emerald-bg); color: var(--emerald-text); }
.fuel-ev { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }

.car-mini-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  background: var(--surface-subtle);
  border-radius: 9px;
  padding: 10px;
  font-size: 0.8rem;
}

.car-mini-specs div span {
  display: block;
  font-size: 0.7rem;
  color: var(--text-soft);
}

.car-mini-specs div strong {
  color: var(--text);
  font-weight: 700;
}

.car-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 4px;
}

.car-card-cta {
  color: var(--emerald-text);
  font-weight: 700;
}

/* Breadcrumb & Page Hero */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-soft);
  margin-bottom: 12px;
}

.breadcrumb a:hover {
  color: var(--text);
  text-decoration: underline;
}

.page-header-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.page-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.6vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.page-subtitle {
  margin: 6px 0 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  transition: all 0.14s ease;
}

.btn:hover {
  border-color: var(--text);
}

.btn-primary {
  background: var(--navy);
  border-color: var(--navy);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: #1E293B;
}

.btn-emerald {
  background: var(--emerald);
  border-color: var(--emerald);
  color: #052E21;
}

.btn-emerald.is-saved {
  background: var(--navy);
  border-color: var(--emerald);
  color: var(--emerald-bright);
}

.btn-copy {
  padding: 5px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.btn-copy:hover {
  border-color: var(--emerald);
  color: var(--emerald-text);
}

/* Bento Spec Grid (4 Core Consumables) */
.bento-specs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.spec-bento-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-xs);
}

.spec-bento-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.spec-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-soft);
}

.spec-big-value {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy);
  line-height: 1.25;
}

.spec-sub-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: auto;
}

/* Practical Caution Banner */
.notice-banner {
  background: var(--amber-bg);
  border: 1px solid #FDE68A;
  color: var(--amber-text);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 20px;
}

/* KPI Dark Navy + Emerald Card & Horizontal Split Bar */
.kpi-panel {
  background: var(--navy);
  color: #FFFFFF;
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-navy);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.kpi-box {
  background: var(--navy-card);
  border: 1px solid var(--navy-border);
  border-radius: 12px;
  padding: 14px;
}

.kpi-box-label {
  font-size: 0.76rem;
  color: #94A3B8;
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

.kpi-box-value {
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.02em;
}

.kpi-box.is-highlight .kpi-box-value {
  color: var(--emerald-bright);
}

.kpi-box-sub {
  display: block;
  font-size: 0.74rem;
  color: #94A3B8;
  margin-top: 3px;
}

.split-bar-wrap {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.split-bar-title {
  font-size: 0.8rem;
  color: #CBD5E1;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.split-bar {
  display: flex;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: #1E293B;
  gap: 2px;
}

.split-seg-fuel { background: #10B981; }
.split-seg-tax { background: #3B82F6; }
.split-seg-insurance { background: #F59E0B; }
.split-seg-maint { background: #8B5CF6; }
.split-seg-installment { background: #64748B; }

.split-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 10px;
  font-size: 0.8rem;
  color: #CBD5E1;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  display: inline-block;
}

/* Calculator Layout */
.calc-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field.is-full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.field input[type="number"],
.field input[type="text"],
.field select {
  width: 100%;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 9px 11px;
  font-size: 16px;
  font-weight: 600;
  outline: none;
}

.field input:focus,
.field select:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--emerald);
}

/* Tables */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 520px;
}

.spec-table th,
.spec-table td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.spec-table th {
  background: var(--surface-subtle);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.8rem;
}

.spec-table tr:last-child td {
  border-bottom: none;
}

/* Comparison Bar Chart */
.year-bars {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.year-bar-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 170px;
  gap: 10px;
  align-items: center;
  font-size: 0.8rem;
}

.dual-bar-track {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dual-bar-a,
.dual-bar-b {
  height: 8px;
  border-radius: 999px;
}

.dual-bar-a { background: #64748B; }
.dual-bar-b { background: var(--emerald); }

/* Status Badges */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.status-urgent, .status-warning { background: var(--rose-bg); color: var(--rose-text); }
.status-soon, .status-acceptable { background: var(--amber-bg); color: var(--amber-text); }
.status-good, .status-ideal { background: var(--emerald-bg); color: var(--emerald-text); }

/* SEO & FAQ Accordions (Below main interactive tools) */
.seo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.seo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}

.seo-card h3 {
  margin: 0 0 8px;
  font-size: 0.96rem;
  font-weight: 800;
}

.seo-card p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.faq-list {
  display: grid;
  gap: 8px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px 16px;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.92rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.1rem;
  color: var(--text-soft);
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin: 10px 0 0;
  font-size: 0.87rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Internal Link Mesh */
.link-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.link-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text);
  transition: border-color 0.14s ease, color 0.14s ease;
}

.link-pill:hover {
  border-color: var(--emerald);
  color: var(--emerald-text);
}

/* AdSense Slot: Hidden until an ad ins/iframe exists */
.ad-slot {
  display: none;
  margin: 28px auto;
  min-height: 100px;
  width: 100%;
  max-width: 728px;
}

.ad-slot:has(ins),
.ad-slot:has(iframe) {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 26px 0 36px;
  color: var(--text-muted);
  font-size: 0.83rem;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-links a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* Toast Notification */
.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(16px);
  background: var(--navy);
  color: #FFFFFF;
  border: 1px solid var(--emerald);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: var(--shadow-navy);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 90;
  white-space: nowrap;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .bento-specs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cars-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .calc-layout {
    grid-template-columns: 1fr;
  }
  .seo-grid {
    grid-template-columns: 1fr;
  }
  .quick-compare-bar {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 920px) {
  .menu-toggle {
    display: inline-flex;
  }
  .header-bar {
    flex-wrap: wrap;
  }
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  .nav-links.is-open {
    display: flex;
  }
}

@media (max-width: 760px) {
  .my-car-pill {
    max-width: 120px;
  }
  .bento-specs,
  .cars-grid,
  .quick-compare-bar,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .year-bar-row {
    grid-template-columns: 44px minmax(0, 1fr) 120px;
    font-size: 0.75rem;
  }
}
