/* 공용 레이아웃/히어로/간격 유틸 - Tailwind 대체 최소 구성 */

.hero-title{font-weight:800;font-size:28px;line-height:1.15;margin:0 0 8px}
.hero-sub{color:#4b5563;margin:0 0 12px}
.muted{color:#6b7280}
.hero-visual{display:flex;align-items:center;justify-content:center}
.hero-visual .hero-img{width:100%;display:block;object-fit:cover;border-radius:12px;border:1px solid #e5e7eb;box-shadow:0 4px 16px rgba(0,0,0,.08)}
@media (max-width: 899px){ .hero-visual .hero-img{ aspect-ratio: 16 / 9; } }
@media (min-width: 900px){ .hero-visual .hero-img{ width:440px; height:246.625px; aspect-ratio:auto; } }
.grid{display:grid;gap:16px}
.hero-grid{grid-template-columns:1fr;align-items:center}
@media (min-width: 900px){
  .hero-title{font-size:34px}
  .hero-grid{grid-template-columns:1fr 1fr; gap:24px}
}

.features{display:grid;grid-template-columns:1fr;gap:16px}
@media (min-width: 800px){.features{grid-template-columns:repeat(3,1fr);gap:20px}}
.feature{border:1px solid #e5e7eb;border-radius:10px;padding:12px;background:#fff;transition:box-shadow .15s ease, transform .15s ease}
.feature:hover{box-shadow:0 1px 2px rgba(0,0,0,0.05),0 6px 16px rgba(0,0,0,0.06);transform:translateY(-2px)}
.testimonials{display:grid;gap:8px}

/* 유틸 간격 (Tailwind 유사) */
.space-y-3 > * + *{margin-top:12px}
@media (min-width: 900px){.md\:space-y-4 > * + *{margin-top:16px}}

/* 버튼 공통 (보조) */
.btn{transition:background-color .12s ease, color .12s ease, box-shadow .12s ease, transform .08s ease}
.btn:hover{box-shadow:0 1px 3px rgba(0,0,0,.06)}
.btn:active{transform:translateY(1px)}
.btn.primary{box-shadow:0 1px 0 rgba(0,0,0,.03);background:linear-gradient(0deg, rgba(255,255,255,.04), rgba(255,255,255,0)) var(--accent);}
.btn.primary:hover{filter:brightness(1.05)}

/* 탭 상태 보강 */
.tabs{transition:box-shadow .12s ease}
.tab{transition:background-color .12s ease, color .12s ease}
.tab:hover{background:#f3f4ff}
.tab.is-active{font-weight:600;box-shadow:inset 0 0 0 1px rgba(30,64,175,.15)}

/* 섹션 타이틀 라인(얕게) */
.site-main h2{position:relative}
.site-main h2::after{content:"";display:block;width:36px;height:2px;margin-top:6px;background:linear-gradient(90deg, var(--accent), rgba(30,64,175,.2));border-radius:999px}

/* 모션 선호 존중 */
@media (prefers-reduced-motion: reduce){
  .feature{transition:none}
  .feature:hover{transform:none}
  .btn{transition:none}
  .tabs,.tab{transition:none}
}

/* Hero quick links (auto-rendered, scalable) */
.quick-links{ display:flex; gap:8px; flex-wrap:wrap; }
.quick-links a{ display:inline-block; padding:6px 10px; border:1px solid #e5e7eb; border-radius:999px; text-decoration:none; color:inherit; background:#fff }
.quick-links a:hover{ background:#f9fafb }

/* 광고 영역 최소 높이로 레이아웃 튐 방지 (CLS) */
.ad-slot.ad-minh { min-height: 280px; margin: 16px 0; }
@media (min-width: 768px) {
  .ad-slot.ad-minh { min-height: 250px; }
}

/* 광고 간격 유틸 (주요 CTA/업로더 등과 100px 이상 간격 확보) */
.ad-gap-top-24 { margin-top: 24px; }
.ad-gap-top-100 { margin-top: 100px; }
.ad-gap-bottom-100 { margin-bottom: 100px; }
.ad-gap-b-24 { margin-bottom: 24px; }
.ad-gap-y-32 { margin: 32px 0; }

/* Inline x-padding utility for text lines (safe, non-global) */
.ix, .box-ix { padding-left: 12px; padding-right: 12px; }
@media (min-width: 480px){ .ix, .box-ix { padding-left: 16px; padding-right: 16px; } }
@media (min-width: 768px){ .ix, .box-ix { padding-left: 20px; padding-right: 20px; } }
@media (min-width: 1024px){ .ix, .box-ix { padding-left: 24px; padding-right: 24px; } }

/* Horizontal margin utility (stable 20px) */
.mx-20{ margin-left:20px; margin-right:20px; }

/* (롤백) 라인/섹션 여백 유틸 및 에지-세이프 제거 */

/* Hero panel: very subtle gradient card */
.hero-panel{
  background: linear-gradient(180deg, rgba(30,64,175,.04), rgba(30,64,175,.02));
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
@media (min-width: 768px){ .hero-panel{ padding: 16px; } }
@media (min-width: 1024px){ .hero-panel{ padding: 20px; } }

/* Tools list (compact, scalable) */
.tool-search{ display:flex; gap:8px; align-items:center; padding:8px 0; }
.tool-search input{ flex:1 1 auto; padding:8px 10px; border:1px solid var(--border); border-radius:8px; }
.tool-list{ list-style:none; padding:0; margin:8px 0 0; }
.tool-item{ border-bottom:1px solid #eef2f7; }
.tool-link{ display:flex; align-items:center; gap:12px; padding:10px 4px; text-decoration:none; color:inherit }
.tool-name{ font-weight:700; min-width:220px }
.tool-desc{ color:#4b5563; flex:1 1 auto }
.tool-badges{ display:inline-flex; gap:6px }
.badge{ display:inline-block; padding:2px 6px; border:1px solid #e5e7eb; border-radius:999px; font-size:12px; color:#1f2937; background:#fff }
.tool-empty{ color:#6b7280; padding:6px 4px }
@media (max-width: 600px){ .tool-link{ flex-direction:column; align-items:flex-start } .tool-name{ min-width:0 } }

/* Inline hero image inside hero panel */
.hero-inline{ width:350px; height:196px; display:block; object-fit:cover; border-radius:10px; border:1px solid #e5e7eb; box-shadow:0 2px 12px rgba(0,0,0,.06); margin:12px 0 0 auto }
@media (max-width: 640px){ .hero-inline{ margin-left:0; margin-right:0; } }

/* Footer disclaimer color */
.site-footer .disclaimer{ color:#666666; }

/* Form layout helpers */
.form-vertical{ display:grid; gap:16px; }
.form-vertical label{ display:flex; flex-direction:column; align-items:flex-start; gap:6px; }
.form-vertical input[type="number"],
.form-vertical input[type="text"],
.form-vertical input[type="date"],
.form-vertical select{ flex:1 1 auto; width:100%; padding:8px 10px; border:1px solid var(--border); border-radius:8px; background:#fff; }
.form-vertical input[type="number"]:focus-visible,
.form-vertical input[type="text"]:focus-visible,
.form-vertical input[type="date"]:focus-visible,
.form-vertical select:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
.form-vertical .btn-row{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; justify-content:flex-start; }
.form-vertical label + .tabs{ margin-top:8px; }
.form-vertical .tabs + label{ margin-top:8px; }


.error-text{ color:#b91c1c; font-size:13px; min-height:18px; }
.field-error{ font-size:12px; color:#b91c1c; margin-top:4px; }
input.is-error,
select.is-error{ border-color:#b91c1c; box-shadow:0 0 0 1px rgba(185,28,28,.22); }
.btn-row .error-text{ flex:1 1 100%; }
.text-right{ text-align:right; }

/* ============================= */
/* Detail tool page enhancements */
/* ============================= */

.tool-hero{
  position:relative;
  display:grid;
  gap:18px;
  padding:20px;
  border-radius:18px;
  border:1px solid rgba(148,163,184,.35);
  background:linear-gradient(140deg, rgba(30,64,175,.12), rgba(30,64,175,0));
  box-shadow:0 18px 42px rgba(15,23,42,.1);
  overflow:hidden;
}
.tool-hero::after{
  content:"";
  position:absolute;
  inset:0;
  background:radial-gradient(120% 160% at 50% 100%, rgba(37,99,235,.16), rgba(37,99,235,0) 70%);
  pointer-events:none;
}
.tool-hero > *{ position:relative; z-index:1; }
.tool-hero h1{ margin:0; font-size:28px; line-height:1.2; }
@media (min-width: 900px){ .tool-hero h1{ font-size:34px; } }
.tool-hero .lead{ color:#1f2937; font-size:18px; margin:0; max-width:640px; }
.tool-hero .hero-actions{ display:flex; gap:10px; flex-wrap:wrap; }
.pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,.35);
  background:rgba(255,255,255,.9);
  font-size:13px;
  color:#1e3a8a;
  font-weight:600;
}
.pill::before{ content:""; width:6px; height:6px; border-radius:50%; background:#2563eb; box-shadow:0 0 0 4px rgba(37,99,235,.15); }
.tool-hero .note{ color:#475569; font-size:14px; }

.tool-stats{
  display:grid;
  gap:12px;
  grid-template-columns:repeat(auto-fit, minmax(200px, 1fr));
}
.tool-stat{
  border-radius:14px;
  border:1px solid rgba(148,163,184,.3);
  background:#fff;
  padding:14px 20px;
  box-shadow:0 1px 3px rgba(15,23,42,.08);
}
.tool-stat .label{ display:block; font-size:13px; color:#475569; margin-bottom:6px; text-transform:uppercase; letter-spacing:.08em; }
.tool-stat .value{ font-size:20px; font-weight:700; color:#0f172a; display:block; overflow-wrap:anywhere; }
.tool-stat .hint{ font-size:13px; color:#64748b; margin-top:4px; }

.tool-section{ margin:32px auto; width:100%; max-width:1080px; padding:0 16px; }
.tool-section:first-of-type{ margin-top:24px; }
.tool-section:last-of-type{ margin-bottom:0; }
.tool-section h2{ margin-bottom:12px; }

@media (max-width: 640px){
  .tool-section{ max-width:100%; padding:0 12px; }
  .tool-grid{ width:100%; margin:0; display:grid; grid-template-columns:1fr; gap:16px; }
  .tool-grid > *{ width:100%; min-width:0; }
  .card-stack{ margin:0; display:grid; gap:16px; width:100%; }
  .tool-card, .callout{ width:100%; min-width:0; }
  .table-wrapper{ overflow-x:auto; -webkit-overflow-scrolling:touch; min-width:0; }
  .table-wrapper table{ width:100%; min-width:540px; table-layout:auto; }
  .table-wrapper th,
  .table-wrapper td{ white-space:nowrap; }
}

.tool-section h2,
.tool-section .badge-row{ width:auto; }

.tool-grid{ display:grid; gap:24px; align-items:start; width:100%; justify-items:stretch; grid-template-columns:minmax(0,1fr); }
.tool-grid > *{ min-width:0; }
@media (min-width: 900px){ .tool-grid.two-col{ grid-template-columns:repeat(2, minmax(320px,1fr)); } }
@media (min-width: 1200px){ .tool-grid.two-col{ gap:28px; } }

.tool-card{
  border:1px solid rgba(148,163,184,.35);
  border-radius:16px;
  background:#fff;
  box-shadow:0 10px 28px rgba(15,23,42,.08);
  padding:18px;
  width:100%;
}
@media (min-width: 768px){ .tool-card{ padding:22px; } }
.tool-card h3{ margin-top:0; }
.tool-card .card-sub{ margin:4px 0 16px; color:#64748b; }

.card-stack{ display:grid; gap:16px; width:100%; }

.list-check{ list-style:none; padding:0; margin:0; display:grid; gap:8px; color:#1f2937; }
.list-check li{ display:flex; align-items:flex-start; gap:10px; }
.list-check li::before{ content:"✓"; color:#2563eb; font-weight:700; margin-top:1px; }

.callout{
  border-radius:12px;
  padding:14px 16px;
  background:linear-gradient(160deg, rgba(30,64,175,.08), rgba(30,64,175,.02));
  border:1px solid rgba(148,163,184,.3);
  color:#1f2937;
}
.callout strong{ color:#1e3a8a; }

.table-wrapper{ overflow:auto; border:1px solid var(--border); border-radius:12px; margin-bottom:16px; width:100%; }
.table-wrapper table{ width:100%; border-collapse:collapse; }
.table-wrapper th,
.table-wrapper td{ padding:10px; text-align:left; white-space:nowrap; }
.table-wrapper thead tr{ background:#f8fafc; }

.badge-row{ display:flex; gap:8px; flex-wrap:wrap; }

.steps{ list-style:none; padding:0; margin:0; display:grid; gap:12px; }
.steps li{ display:flex; gap:12px; align-items:flex-start; }
.steps .idx{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:28px;
  height:28px;
  border-radius:50%;
  background:#1e3a8a;
  color:#fff;
  font-weight:600;
  flex:0 0 28px;
}
.steps p{ margin:0; color:#475569; }

.accent-link{ color:#1e3a8a; font-weight:600; text-decoration:none; }
.accent-link:hover{ text-decoration:underline; }

@media (prefers-reduced-motion: reduce){
  .tool-hero,
  .tool-card{ box-shadow:none; }
}
