/* ============================================================
   Nocalhostmore — 웹사이트 전용 (랜딩 · 생성기 · 가이드)
   components.css 뒤에 로드된다.
   ============================================================ */
html {
  scroll-behavior: smooth;
}
body {
  width: auto;
  min-height: 100vh;
}
a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 2px;
}
a:hover {
  text-decoration-color: currentColor;
}
.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- 상단 네비 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 58px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
}
.nav-brand:hover {
  text-decoration: none;
  color: var(--accent-ink);
}
.nav-brand img {
  width: 22px;
  height: 22px;
  border-radius: 5px;
}
.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13.5px;
  white-space: nowrap;
}
.nav-links .nav-secondary {
  display: none;
}
@media (min-width: 480px) {
  .nav-links .nav-secondary {
    display: inline;
  }
}
@media (max-width: 479px) {
  .nav-links {
    gap: 11px;
    font-size: 12.5px;
  }
}
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
}
.nav-links a:hover {
  color: var(--text);
}
.nav-cta {
  border: 1px solid var(--text);
  color: var(--text) !important;
  padding: 6px 13px;
  border-radius: 6px;
  font-weight: 500;
}
.nav-cta:hover {
  background: var(--text);
  color: var(--bg) !important;
}

/* ---------- 히어로 ---------- */
.hero {
  padding: 72px 20px 56px;
  border-bottom: 1px solid var(--border);
}
.hero .wrap {
  max-width: 1040px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 44px;
  align-items: center;
}
@media (min-width: 880px) {
  .hero-grid {
    grid-template-columns: 1.08fr 0.92fr;
  }
}
.hero-copy {
  max-width: 560px;
}

/* 히어로 데모 카드 — 체크리스트가 프롬프트가 되는 과정을 터미널 창 톤으로 보여준다 */
.hero-demo {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 13px;
}
.demo-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.demo-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border);
}
.demo-bar em {
  margin-left: 8px;
  font-style: normal;
  font-size: 11.5px;
  color: var(--text-faint);
}
.demo-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.demo-line {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
.demo-q {
  color: var(--text-dim);
}
.demo-q::before {
  content: "✓ ";
  color: var(--good);
}
.demo-a {
  color: var(--text);
  font-weight: 500;
  text-align: right;
}
.demo-result {
  margin-top: 7px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  color: var(--accent-ink);
  font-weight: 600;
}
.hero .eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 18px;
}
.hero .eyebrow::before {
  content: "# ";
  color: var(--accent);
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 5.5vw, 44px);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}
.hero h1 .accent {
  color: var(--accent-ink);
}
.hero p.lead {
  font-size: clamp(15px, 2.2vw, 17px);
  color: var(--text-dim);
  max-width: 560px;
  line-height: 1.65;
  margin-bottom: 28px;
}
.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.btn-hero {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  padding: 13px 24px;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}
.btn-hero:active {
  transform: scale(0.98);
}
.btn-hero:hover {
  background: var(--accent-ink);
  text-decoration: none;
}
.btn-hero.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-hero.ghost:hover {
  border-color: var(--text);
  background: transparent;
}

/* ---------- 섹션 공통 ---------- */
.section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}
.section:last-of-type {
  border-bottom: none;
}
.section .kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-ink);
  margin-bottom: 12px;
}
.section .kicker::before {
  content: "# ";
  color: var(--accent);
}
.section h2 {
  font-family: var(--font-serif);
  font-size: clamp(21px, 3.6vw, 29px);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.section .sub {
  color: var(--text-dim);
  max-width: 560px;
  margin-bottom: 32px;
  line-height: 1.65;
}

/* 기능 카드 */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.feature {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.feature:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.feature .ico {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-ink);
  margin-bottom: 10px;
}
.feature h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}
.feature p {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.55;
}

/* 단계 */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  counter-reset: step;
}
.step {
  border-left: 2px solid var(--border);
  padding-left: 16px;
}
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-ink);
  margin-bottom: 8px;
}
.step h3 {
  font-size: 14.5px;
  font-weight: 600;
  margin-bottom: 6px;
}
.step p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.55;
}

/* 가격 */
.pricing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  max-width: 640px;
}
.price-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.price-card.hl {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.price-card .pname {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 6px;
}
.price-card .pprice {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 14px;
}
.price-card .pprice small {
  font-size: 12px;
  color: var(--text-faint);
  font-weight: 400;
}
.price-card ul {
  list-style: none;
  font-size: 13.5px;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

/* ---------- 생성기 페이지 ---------- */
.gen-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  align-items: start;
  padding: 28px 0 60px;
}
.gen-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.gen-card #app {
  min-height: 520px;
}
.gen-card .screen {
  padding: 24px;
}
.gen-card .q-title {
  font-size: 20px;
}
.gen-card .prompt-box {
  max-height: 340px;
  font-size: 12px;
}
.aside {
  position: sticky;
  top: 70px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.aside h4 {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-faint);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
#history {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hist-empty {
  font-size: 13px;
  color: var(--text-faint);
  line-height: 1.6;
}
.hist-item {
  text-align: left;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.hist-item:hover {
  background: var(--card-hover);
}
.hist-idea {
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hist-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
}
.hist-clear {
  align-self: flex-end;
  background: transparent;
  border: none;
  color: var(--text-faint);
  font-size: 11.5px;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  padding: 0 0 2px;
}
.hist-clear:hover {
  color: var(--text-dim);
}
.hist-row {
  display: flex;
  align-items: stretch;
  gap: 6px;
}
.hist-row .hist-item {
  flex: 1;
  min-width: 0;
}
.hist-del {
  flex: none;
  width: 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-faint);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.hist-del:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

/* ---------- 광고 슬롯 ---------- */
.ad-slot {
  margin: 26px auto;
  min-height: 100px;
  max-width: 728px;
}
.ad-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--bg-soft);
}

/* ---------- Pro 배지 / 태그 ---------- */
.pro-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  vertical-align: middle;
}
.repo-btn {
  flex: 1;
  min-width: 130px;
}

/* ---------- 페이월 모달 ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 10, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}
.modal {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow);
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
}
.modal h3 {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 8px;
}
.modal-sub {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.55;
  margin-bottom: 18px;
}
.plan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-bottom: 18px;
}
.plan {
  background: var(--bg);
  padding: 14px;
}
.plan.pro {
  background: var(--accent-soft);
}
.plan-name {
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 13.5px;
}
.plan ul {
  list-style: none;
  font-size: 12.5px;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.modal-cta {
  width: 100%;
  margin-top: 0;
}
.modal-foot {
  font-size: 11.5px;
  color: var(--text-faint);
  text-align: center;
  margin-top: 12px;
  line-height: 1.5;
}

/* ---------- 후원 / 추천 인프라 (결과 화면) ---------- */
.donate-line {
  font-size: 12.5px;
  color: var(--text-faint);
  line-height: 1.6;
  margin-top: 14px;
}
.donate-line a {
  color: var(--text-dim);
}
.infra-reco {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.infra-reco-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.infra-reco ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--text-dim);
}

/* ---------- 토스트 ---------- */
#toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: var(--bg);
  font-weight: 500;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 200;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- 가이드(콘텐츠) ---------- */
.article {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 20px 70px;
}
.article .kicker {
  font-family: var(--font-mono);
  color: var(--accent-ink);
  font-weight: 500;
  font-size: 12.5px;
}
.article h1 {
  font-family: var(--font-serif);
  font-size: clamp(24px, 4.5vw, 32px);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -0.01em;
  margin: 10px 0 14px;
}
.article .meta {
  font-family: var(--font-mono);
  color: var(--text-faint);
  font-size: 12.5px;
  margin-bottom: 30px;
}
.article h2 {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
  margin: 34px 0 12px;
}
.article h3 {
  font-size: 16.5px;
  font-weight: 600;
  margin: 24px 0 10px;
}
.article p,
.article li {
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.8;
  margin-bottom: 14px;
}
.article ul,
.article ol {
  padding-left: 22px;
  margin-bottom: 14px;
}
.article code {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 13px;
  font-family: var(--font-mono);
}
.article pre {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  overflow-x: auto;
  margin-bottom: 16px;
}
.article pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-dim);
}
.article blockquote {
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 16px;
  margin: 20px 0;
  color: var(--text-dim);
  font-size: 14.5px;
}
.cta-inline {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin: 32px 0;
}
.cta-inline h3 {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 8px;
}
.cta-inline p {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 14px;
}

/* 가이드 목록 */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.guide-card {
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  color: var(--text);
  text-decoration: none;
}
.guide-card {
  transition: border-color 0.15s, background 0.15s;
}
.guide-card:hover {
  background: var(--card-hover);
  border-color: var(--accent);
  text-decoration: none;
}
.guide-card .kicker {
  font-family: var(--font-mono);
  color: var(--accent-ink);
  font-size: 11.5px;
  font-weight: 500;
}
.guide-card h3 {
  font-size: 15.5px;
  font-weight: 600;
  margin: 8px 0;
  line-height: 1.4;
}
.guide-card p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.55;
}

/* ---------- 푸터 ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 26px 20px;
  color: var(--text-faint);
  font-size: 12.5px;
}
.site-footer a {
  color: var(--text-dim);
}

/* ---------- 반응형 ---------- */
@media (max-width: 860px) {
  .gen-layout {
    grid-template-columns: 1fr;
  }
  .aside {
    position: static;
    order: 2;
  }
}

/* ============================================================
   ---------- 코드 진단 도구 (diagnose.html 전용, 새 섹션) ----------
   이 구획 아래로는 diagnose.html/js/diagnose.js 전용 클래스만 추가한다.
   위쪽 기존 규칙은 건드리지 않는다.
   ============================================================ */
.diag-page {
  max-width: 780px;
}
.diag-layout {
  margin-top: 8px;
}
.diag-textarea {
  min-height: 260px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
}
.diag-btn {
  width: auto;
  margin-top: 12px;
  padding: 12px 26px;
}
.diag-result {
  margin-top: 30px;
}
.diag-disclaimer {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text);
  background: var(--warn-soft);
  border: 1px solid var(--warn);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 20px;
}
.diag-score {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 22px;
}
.diag-score-num {
  font-family: var(--font-mono);
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
}
.diag-score-num span {
  font-size: 16px;
  color: var(--text-faint);
  font-weight: 400;
}
.diag-score-desc {
  font-size: 13.5px;
  color: var(--text-dim);
}
.diag-score-good .diag-score-num {
  color: var(--good);
}
.diag-score-warn .diag-score-num {
  color: var(--warn);
}
.diag-score-danger .diag-score-num {
  color: var(--danger);
}
.diag-findings {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.diag-finding {
  border: 1px solid var(--border);
  border-left: 3px solid var(--text-faint);
  border-radius: var(--radius);
  padding: 16px 18px;
  background: var(--bg);
}
.diag-finding-high {
  border-left-color: var(--danger);
}
.diag-finding-medium {
  border-left-color: var(--warn);
}
.diag-finding-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.diag-finding-title {
  font-weight: 600;
  font-size: 14.5px;
}
.diag-finding-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-faint);
}
.diag-finding-why,
.diag-finding-fix {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.diag-finding-why:last-child,
.diag-finding-fix:last-child {
  margin-bottom: 0;
}
.diag-cta {
  margin-top: 24px;
}
