:root {
  --c-primary: #1B4965;
  --c-primary-light: #2D6A8F;
  --c-accent: #3A8FB7;
  --c-accent-light: #62B6CB;
  --c-bg: #FAFBFC;
  --c-surface: #FFFFFF;
  --c-text: #1A1A2E;
  --c-text-secondary: #4A5568;
  --c-text-muted: #8896A6;
  --c-border: #E2E8F0;
  --c-border-light: #F0F4F8;
  --c-legal-bg: #F8F9FA;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(27,73,101,0.06);
  --shadow-md: 0 4px 16px rgba(27,73,101,0.08);
  --shadow-lg: 0 8px 32px rgba(27,73,101,0.10);
  --shadow-xl: 0 16px 48px rgba(27,73,101,0.12);
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;
  --space-5xl: 128px;
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --max-content: 780px;
  --max-wide: 1200px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

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

html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Noto Sans KR', sans-serif;
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.75;
  letter-spacing: -0.01em;
  overflow-x: hidden;
}

/* ── HIDE PARENT THEME DEFAULTS ── */
.wp-site-blocks > header,
.wp-site-blocks > footer,
body > .wp-site-blocks > .wp-block-template-part,
.has-global-padding > .wp-block-template-part,
.wp-block-post-content .wp-block-spacer { display: none !important; }

/* ── SITE HEADER ── */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border-light);
  padding: 0 var(--space-lg);
  transition: box-shadow var(--transition-base);
}
.site-header.scrolled { box-shadow: var(--shadow-md); }
.header-inner {
  max-width: var(--max-wide); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.site-logo { display: flex; align-items: center; gap: var(--space-sm); text-decoration: none; }
.site-logo img { width: 36px; height: 36px; border-radius: var(--radius-sm); }
.site-logo-text {
  font-size: 1.05rem; font-weight: 700; color: var(--c-primary);
  letter-spacing: -0.02em;
}

/* ── NAV ── */
.site-nav { display: flex; align-items: center; gap: var(--space-xs); }
.site-nav a {
  padding: var(--space-sm) var(--space-md);
  color: var(--c-text-secondary); text-decoration: none;
  font-size: 0.9rem; font-weight: 500;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}
.site-nav a:hover, .site-nav a:focus-visible {
  color: var(--c-primary); background: var(--c-border-light);
}

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle svg { width: 24px; height: 24px; stroke: var(--c-text); }

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed; top: 64px; left: 0; right: 0; bottom: 0;
    flex-direction: column; background: var(--c-surface);
    padding: var(--space-lg); gap: var(--space-xs);
    transform: translateX(100%); transition: transform var(--transition-base);
    z-index: 999; overflow-y: auto;
  }
  .site-nav.open { transform: translateX(0); }
  .site-nav a { font-size: 1.1rem; padding: var(--space-md); width: 100%; }
}

/* ── FOOTER ── */
.site-footer {
  background: var(--c-primary); color: rgba(255,255,255,0.85);
  padding: var(--space-4xl) var(--space-lg) var(--space-2xl);
}
.footer-inner {
  max-width: var(--max-wide); margin: 0 auto;
}
.footer-brand { font-size: 1.1rem; font-weight: 700; color: #fff; margin-bottom: var(--space-sm); }
.footer-desc { font-size: 0.88rem; color: rgba(255,255,255,0.65); line-height: 1.7; margin-bottom: var(--space-xl); max-width: 560px; }
.footer-links { display: flex; gap: var(--space-lg); flex-wrap: wrap; margin-bottom: var(--space-2xl); }
.footer-links a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.85rem; transition: color var(--transition-fast); }
.footer-links a:hover { color: #fff; }
.footer-legal {
  font-size: 0.78rem; color: rgba(255,255,255,0.45); line-height: 1.8;
  border-top: 1px solid rgba(255,255,255,0.1); padding-top: var(--space-lg);
}
.footer-legal p { margin: 4px 0; }
.footer-copyright { margin-top: var(--space-md); font-size: 0.78rem; color: rgba(255,255,255,0.35); }

/* ── SINGLE POST ── */
.entry-wrap {
  max-width: var(--max-content); margin: 0 auto;
  padding: var(--space-3xl) var(--space-lg) var(--space-5xl);
}
.entry-wrap .entry-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800; line-height: 1.3;
  color: var(--c-primary);
  margin-bottom: var(--space-lg);
  letter-spacing: -0.03em;
}
.entry-meta {
  font-size: 0.82rem; color: var(--c-text-muted);
  margin-bottom: var(--space-2xl); padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--c-border-light);
}
.entry-featured {
  width: 100%; border-radius: var(--radius-lg);
  margin-bottom: var(--space-2xl);
  aspect-ratio: 16/9; object-fit: cover;
}
.entry-content { font-size: 1.05rem; line-height: 1.8; color: var(--c-text); }
.entry-content h2 {
  font-size: 1.35rem; font-weight: 700; color: var(--c-primary);
  margin: var(--space-3xl) 0 var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--c-accent-light);
  letter-spacing: -0.02em;
}
.entry-content h3 {
  font-size: 1.15rem; font-weight: 600; color: var(--c-primary-light);
  margin: var(--space-2xl) 0 var(--space-md);
}
.entry-content p { margin-bottom: var(--space-lg); }
.entry-content img {
  max-width: 100%; height: auto; border-radius: var(--radius-md);
  margin: var(--space-lg) 0; box-shadow: var(--shadow-sm);
}
.entry-content ul, .entry-content ol {
  margin: var(--space-md) 0 var(--space-lg) var(--space-lg);
  padding-left: var(--space-md);
}
.entry-content li { margin-bottom: var(--space-sm); }
.entry-content blockquote {
  border-left: 4px solid var(--c-accent);
  background: var(--c-border-light);
  padding: var(--space-lg) var(--space-xl);
  margin: var(--space-xl) 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 0.98rem; color: var(--c-text-secondary);
}
.entry-content table {
  width: 100%; border-collapse: collapse;
  margin: var(--space-xl) 0;
  font-size: 0.92rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.entry-content thead th {
  background: var(--c-primary); color: #fff;
  padding: var(--space-md) var(--space-lg);
  font-weight: 600; text-align: left;
  font-size: 0.88rem;
}
.entry-content tbody td {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--c-border-light);
  vertical-align: top;
}
.entry-content tbody tr:nth-child(even) { background: var(--c-border-light); }
.entry-content tbody tr:hover { background: rgba(58,143,183,0.04); }

.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-responsive table { min-width: 480px; }

.callout-box {
  background: linear-gradient(135deg, rgba(58,143,183,0.06), rgba(27,73,101,0.04));
  border: 1px solid rgba(58,143,183,0.15);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  margin: var(--space-xl) 0;
}
.callout-box strong { color: var(--c-primary); }

.info-bar {
  display: flex; gap: var(--space-md); flex-wrap: wrap;
  background: var(--c-primary); color: #fff;
  padding: var(--space-lg) var(--space-xl);
  border-radius: var(--radius-md);
  margin: var(--space-xl) 0;
}
.info-bar-item { flex: 1; min-width: 120px; text-align: center; }
.info-bar-label { font-size: 0.75rem; opacity: 0.7; margin-bottom: 4px; }
.info-bar-value { font-size: 1.1rem; font-weight: 700; }

.progress-bar-wrap { margin: var(--space-md) 0; }
.progress-label { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 6px; }
.progress-track { height: 8px; background: var(--c-border); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--c-accent), var(--c-primary)); transition: width 1s ease; }

.step-timeline { position: relative; padding-left: var(--space-2xl); margin: var(--space-xl) 0; }
.step-timeline::before {
  content: ''; position: absolute; left: 11px; top: 8px; bottom: 8px;
  width: 2px; background: var(--c-accent-light);
}
.step-item { position: relative; margin-bottom: var(--space-xl); }
.step-item::before {
  content: ''; position: absolute; left: calc(-1 * var(--space-2xl) + 4px); top: 6px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--c-accent); border: 3px solid var(--c-surface);
  box-shadow: 0 0 0 2px var(--c-accent-light);
}
.step-title { font-weight: 600; color: var(--c-primary); margin-bottom: 4px; font-size: 0.98rem; }
.step-desc { font-size: 0.9rem; color: var(--c-text-secondary); }

.related-posts { margin-top: var(--space-4xl); padding-top: var(--space-2xl); border-top: 1px solid var(--c-border); }
.related-posts h3 { font-size: 1.2rem; font-weight: 700; color: var(--c-primary); margin-bottom: var(--space-xl); }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-lg); }
.related-card {
  background: var(--c-surface); border-radius: var(--radius-md);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  text-decoration: none; color: inherit;
}
.related-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.related-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.related-card-body { padding: var(--space-md); }
.related-card-title { font-size: 0.9rem; font-weight: 600; color: var(--c-text); line-height: 1.4; }

/* ── PAGE TEMPLATE ── */
.page-wrap {
  max-width: var(--max-content); margin: 0 auto;
  padding: var(--space-3xl) var(--space-lg) var(--space-5xl);
}
.page-wrap h1 {
  font-size: 1.8rem; font-weight: 800; color: var(--c-primary);
  margin-bottom: var(--space-2xl); letter-spacing: -0.02em;
}
.page-wrap h2 { font-size: 1.2rem; font-weight: 700; color: var(--c-primary); margin: var(--space-2xl) 0 var(--space-md); }
.page-wrap p, .page-wrap li { font-size: 0.95rem; line-height: 1.8; color: var(--c-text-secondary); }

/* ── ANIMATIONS ── */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { opacity: 0; animation: fadeInUp 0.6s ease forwards; }
.fade-in.visible { opacity: 1; }

/* ── AI / LEGAL NOTICES IN POSTS ── */
.ai-notice { font-size: 0.85em !important; color: #888 !important; margin-top: 2em !important; }
.legal-notice {
  font-size: 0.85em !important; color: #777 !important;
  background: #f8f9fa !important; border-left: 3px solid #cbd5e1 !important;
  padding: 10px 14px !important; margin-top: 2em !important;
  border-radius: 0 6px 6px 0 !important;
}

/* ── MOBILE ── */
@media (max-width: 768px) {
  .entry-wrap { padding: var(--space-xl) var(--space-md) var(--space-3xl); }
  .entry-wrap .entry-title { font-size: 1.5rem; }
  .entry-content { font-size: 1rem; }
  .entry-content h2 { font-size: 1.2rem; }
  .info-bar { flex-direction: column; }
  .related-grid { grid-template-columns: 1fr; }
}

/* ── FOCUS RING for A11y ── */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

/* ── HIDE WP DEFAULT STUFF ── */
.wp-block-post-title, .wp-block-post-date, .wp-block-post-terms,
.wp-block-post-author, .taxonomy-category { display: none !important; }
