:root {
  --bg: #f7f9fc;
  --bg-alt: #eef4ff;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --text: #1f2937;
  --text-muted: #4b5563;
  --text-soft: #6b7280;
  --line: #e5e7eb;
  --line-strong: #cbd5e1;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #dbeafe;
  --accent: #0f172a;
  --success-bg: #eff6ff;
  --success-text: #1e3a8a;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 6px 20px rgba(15, 23, 42, 0.05);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --container: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  word-break: keep-all;
}

img {
  max-width: 100%;
  display: block;
}

iframe {
  max-width: 100%;
}

main {
  display: block;
}

ul,
ol {
  margin-top: 0;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

input,
textarea,
select {
  color: var(--text);
}

::selection {
  background: var(--primary-soft);
  color: var(--accent);
}

.container {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.narrow {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
}

.section,
.section-lg {
  padding: 64px 0;
}

.alt-bg {
  background: var(--bg-alt);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--primary-dark);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  z-index: 1000;
}

.skip-link:focus {
  top: 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
}

.logo,
.brand {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.logo:hover,
.logo:focus-visible,
.brand:hover,
.brand:focus-visible {
  color: var(--primary-dark);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 0.95rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.nav a {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.96rem;
  padding: 8px 0;
  transition: color 0.2s ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--primary-dark);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--accent);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.96rem;
  padding: 8px 0;
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.active {
  color: var(--primary-dark);
}

.hero {
  padding: 72px 0 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.85fr;
  gap: 28px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-weight: 800;
  font-size: 0.95rem;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: var(--accent);
}

.hero-text {
  margin: 0 0 14px;
  font-size: 1.05rem;
  color: var(--text-muted);
}

.hero-actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
}

.btn-primary,
.btn {
  background: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover,
.btn-primary:focus-visible,
.btn:hover,
.btn:focus-visible {
  background: var(--primary-dark);
}

.btn-secondary {
  background: #ffffff;
  color: var(--primary-dark);
  border-color: var(--line-strong);
  box-shadow: none;
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: var(--primary-soft);
  border-color: var(--primary-soft);
}

.card,
.hero-card,
.form-card,
.result-card,
.faq-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-soft);
}

.hero-card {
  background: linear-gradient(180deg, #ffffff 0%, var(--surface-soft) 100%);
}

.card h2,
.card h3 {
  margin-top: 0;
}

.card-grid,
.guide-grid,
.faq-grid,
.compare-grid,
.compare-layout,
.form-grid,
.result-grid,
.content-grid,
.faq-list {
  display: grid;
  gap: 24px;
}

.card-grid,
.guide-grid {
  grid-template-columns: repeat(3, 1fr);
}

.faq-grid {
  grid-template-columns: repeat(2, 1fr);
}

.content-grid {
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
}

.link-card {
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.link-card:hover,
.link-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: #bfdbfe;
}

.link-card h2,
.link-card h3 {
  margin-bottom: 10px;
  color: var(--accent);
}

.link-card p {
  margin: 0;
  color: var(--text-muted);
}

h1,
h2,
h3 {
  margin: 0 0 14px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h2 {
  font-size: clamp(1.45rem, 2vw, 2rem);
}

h3 {
  font-size: 1.08rem;
}

p {
  margin: 0 0 14px;
}

.page-lead {
  font-size: 1.04rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.feature-list,
.formula-list,
.list,
.check-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
}

.feature-list li,
.formula-list li,
.list li,
.check-list li {
  margin-bottom: 10px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 0.95rem;
  color: var(--text-soft);
}

.compare-layout,
.compare-grid {
  grid-template-columns: 1fr 1fr;
  align-items: start;
  margin-top: 28px;
}

.explanation-card {
  margin-top: 24px;
}

.form-grid {
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-grid label,
.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 700;
  color: var(--accent);
}

.full-width {
  grid-column: 1 / -1;
}

.form-grid input,
.form-grid textarea,
.form-grid select,
.input-group input,
.input-group textarea,
.input-group select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #ffffff;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.form-grid textarea,
.input-group textarea {
  min-height: 160px;
  resize: vertical;
}

.form-grid input::placeholder,
.form-grid textarea::placeholder,
.input-group input::placeholder,
.input-group textarea::placeholder {
  color: #94a3b8;
}

.form-grid input:focus,
.form-grid textarea:focus,
.form-grid select:focus,
.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.result-grid {
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.result-box,
.kpi {
  padding: 18px;
  border-radius: var(--radius-md);
  background: #f8fafc;
  border: 1px solid var(--line);
}

.result-box span,
.kpi-label {
  display: block;
  font-size: 0.94rem;
  color: var(--text-soft);
  margin-bottom: 8px;
}

.result-box strong,
.kpi-value {
  display: block;
  font-size: 1.2rem;
  line-height: 1.35;
  color: var(--accent);
  word-break: break-word;
  font-weight: 800;
}

.kpi-value.good {
  color: #166534;
}

.kpi-value.warn {
  color: #b45309;
}

.summary-box {
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: var(--success-bg);
  color: var(--success-text);
  font-weight: 800;
  border: 1px solid #bfdbfe;
}

.notice,
.small,
.muted {
  margin-top: 16px;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.faq-list {
  gap: 16px;
}

.faq-item h3 {
  margin-bottom: 8px;
}

.faq-item p {
  margin-bottom: 0;
  color: var(--text-muted);
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.related-links a,
.related-links .btn-secondary {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 999px;
}

.related-links a {
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 700;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.related-links a:hover,
.related-links a:focus-visible {
  background: #c7ddff;
  transform: translateY(-1px);
}

.article {
  max-width: 760px;
}

.article p,
.article li {
  color: var(--text-muted);
}

.article h1 {
  font-size: clamp(1.85rem, 3vw, 2.5rem);
  margin-bottom: 18px;
}

.article h2 {
  margin-top: 34px;
  margin-bottom: 12px;
}

.article ul,
.article ol {
  padding-left: 20px;
}

.table-like {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}

.table-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.table-row:last-child {
  border-bottom: 0;
}

.sticky-card {
  align-self: start;
  position: sticky;
  top: 96px;
}

.site-footer,
.footer {
  margin-top: 48px;
  padding: 38px 0;
  background: #111827;
  color: #ffffff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
  align-items: start;
}

.footer-grid p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding-left: 0;
  list-style: none;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.9);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-bottom {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.78);
}

.notice,
.page-lead,
.hero-text,
.link-card p {
  word-break: keep-all;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.25);
  outline-offset: 2px;
}

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .card-grid,
  .guide-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .faq-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .section,
  .section-lg {
    padding: 52px 0;
  }

  .compare-layout,
  .compare-grid,
  .footer-grid,
  .form-grid,
  .result-grid,
  .content-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .header-inner {
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    min-height: auto;
  }

  .nav {
    width: 100%;
    gap: 8px 14px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 12px 16px 20px;
    display: none;
  }

  .site-nav.open {
    display: block;
  }

  .site-nav ul {
    display: grid;
    gap: 8px;
  }

  .site-nav a {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
  }

  .site-nav a:hover,
  .site-nav a:focus-visible,
  .site-nav a.active {
    background: var(--primary-soft);
  }

  .sticky-card {
    position: static;
  }
}

@media (max-width: 640px) {
  .container,
  .narrow {
    width: min(100% - 24px, var(--container));
  }

  .hero {
    padding: 56px 0 48px;
  }

  .section,
  .section-lg {
    padding: 44px 0;
  }

  .card,
  .hero-card,
  .form-card,
  .result-card,
  .faq-card {
    padding: 20px;
    border-radius: 20px;
  }

  .card-grid,
  .guide-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .hero h1,
  h1 {
    font-size: 2rem;
  }

  .hero-text,
  .page-lead {
    font-size: 1rem;
  }

  .btn {
    width: 100%;
  }

  .hero-actions,
  .actions {
    flex-direction: column;
  }

  .nav a,
  .site-nav a {
    font-size: 0.94rem;
  }
}

@media (min-width: 861px) {
  .site-nav {
    display: block;
  }
}

@media (min-width: 1400px) {
  .container {
    width: min(1160px, calc(100% - 48px));
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
