/* ==========================================================================
   계산랩 (Gyesan Lab — https://z-layoutai.shop)
   Master Engineering & 4-Pillar AdSense Stylesheet
   ========================================================================== */

:root {
  --bg-page: #fcfaf7;
  --bg-card: #ffffff;
  --bg-subtle: #f5f5f4;
  --bg-amber-soft: #fffbeb;
  --text-main: #1c1917;
  --text-body: #3f3f46;
  --text-muted: #78716c;
  --border-light: #e7e5e4;
  --border-amber: #fde68a;
  --brand-amber: #92400e;
  --brand-amber-dark: #78350f;
  --brand-stone: #1c1917;
  --emerald-ok: #065f46;
  --red-warn: #991b1b;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: 'Inter', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  line-height: 1.72;
}

::selection {
  background-color: #1c1917;
  color: #ffffff;
}

.card-shadow {
  box-shadow: 0 4px 20px -2px rgba(28, 25, 23, 0.05), 0 2px 6px -1px rgba(28, 25, 23, 0.03);
}

.card-hover {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card-hover:hover {
  box-shadow: 0 12px 30px -4px rgba(28, 25, 23, 0.08), 0 4px 10px -2px rgba(28, 25, 23, 0.04);
  transform: translateY(-2px);
}

.formula-box {
  background-color: #f5f5f4;
  border-left: 4px solid #78350f;
  padding: 1.1rem 1.35rem;
  border-radius: 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875rem;
  color: #1c1917;
  overflow-x: auto;
  line-height: 1.7;
  margin: 1rem 0;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* 1. E-E-A-T Verification Bar */
.eeat-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.15rem;
  border-radius: 1rem;
  background-color: #ffffff;
  border: 1px solid #e7e5e4;
  font-size: 0.78rem;
  color: #44403c;
  margin-top: 0.85rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.eeat-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  background-color: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  font-weight: 700;
  font-size: 0.72rem;
}

/* 2. Search-Intent Quick Answer Box */
.intent-answer-box {
  background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
  border: 2px solid #f59e0b;
  border-radius: 1.25rem;
  padding: 1.5rem 1.75rem;
  margin: 1.25rem 0;
  box-shadow: 0 6px 24px -4px rgba(180, 83, 9, 0.08);
}

.intent-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px dashed #fcd34d;
}

.intent-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background-color: #78350f;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  letter-spacing: -0.01em;
}

.intent-question {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1c1917;
  margin: 0 0 0.5rem 0;
  line-height: 1.45;
}

.intent-summary {
  font-size: 0.92rem;
  color: #292524;
  line-height: 1.7;
  margin: 0 0 1rem 0;
}

.intent-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.intent-metric-card {
  background-color: #ffffff;
  border: 1px solid #fde68a;
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
}

.intent-metric-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #92400e;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 0.25rem;
}

.intent-metric-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: #1c1917;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.intent-metric-sub {
  font-size: 0.75rem;
  color: #57534e;
  margin-top: 0.2rem;
}

/* 3. Quick TOC Bar */
.quick-toc-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.15rem;
  border-radius: 0.9rem;
  background-color: #f5f5f4;
  border: 1px solid #e7e5e4;
  font-size: 0.78rem;
}

.quick-toc-link {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.7rem;
  border-radius: 0.5rem;
  background-color: #ffffff;
  border: 1px solid #d6d3d1;
  color: #292524;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}

.quick-toc-link:hover {
  background-color: #1c1917;
  color: #ffffff;
  border-color: #1c1917;
}

/* 4. Case Study, Checklist, FAQ, References, Author, Safety */
.case-study-box {
  background-color: #fafaf9;
  border: 1px solid #d6d3d1;
  border-left: 5px solid #1c1917;
  border-radius: 1rem;
  padding: 1.5rem;
}

.checklist-panel {
  background-color: #1c1917;
  color: #f5f5f4;
  border-radius: 1.25rem;
  padding: 1.5rem 1.75rem;
}

.faq-list-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.faq-item-card {
  background-color: #fafaf9;
  border: 1px solid #e7e5e4;
  border-radius: 1rem;
  padding: 1.25rem 1.4rem;
}

.ref-sources-box {
  background-color: #f5f5f4;
  border: 1px solid #e7e5e4;
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  font-size: 0.82rem;
  color: #44403c;
}

.author-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background-color: #ffffff;
  border: 1px solid #d6d3d1;
  border-radius: 1.25rem;
  padding: 1.5rem 1.75rem;
  margin-top: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

@media (min-width: 640px) {
  .author-card {
    flex-direction: row;
    align-items: flex-start;
  }
}

.author-avatar {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  background-color: #fef3c7;
  border: 1px solid #fde68a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  flex-shrink: 0;
}

.safety-disclaimer-box {
  background-color: #fff1f2;
  border: 1px solid #fecdd3;
  border-left: 4px solid #e11d48;
  border-radius: 1rem;
  padding: 1.15rem 1.35rem;
  font-size: 0.82rem;
  color: #881337;
  line-height: 1.65;
}

.site-footer {
  border-top: 1px solid #e7e5e4;
  background-color: #ffffff;
  margin-top: 4rem;
  color: #57534e;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-thumb {
  background: #d6d3d1;
  border-radius: 9999px;
}

@media print {
  header, footer, .no-print, .quick-toc-bar {
    display: none !important;
  }
  body {
    background: #ffffff;
  }
}
