/*
 * NewbieFinder 소개 페이지 스타일.
 * 확장 본체와 같은 팔레트(검정 / 흰색 / #00FFA3)를 쓴다.
 * 외부 폰트나 CDN을 불러오지 않는다.
 */

:root {
  --bg: #000000;
  --surface: #0a0a0a;
  --surface-2: #131313;
  --border: #262626;
  --border-strong: #666666;
  --text: #ffffff;
  --text-2: #a6a6a6;
  --text-3: #8a8a8a;
  --accent: #00ffa3;
  --radius: 10px;
  --radius-sm: 6px;
  --max: 900px;
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR",
    sans-serif;
  font-size: 16px;
  line-height: 1.7;
  /* 한글은 어절 단위로 줄을 바꾼다. */
  word-break: keep-all;
  overflow-wrap: break-word;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 40px);
}

/* ---------------- 헤더 ---------------- */

.site-header {
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  padding-block: 22px;
  color: inherit;
  text-decoration: none;
}

.brand svg {
  flex: none;
  width: 34px;
  height: 34px;
}

.brand strong {
  font-size: 22px;
  letter-spacing: -0.01em;
}

.brand span {
  color: var(--text-2);
  font-size: 15px;
}

/* ---------------- 히어로 ---------------- */

.hero {
  /* 위쪽은 헤더 바로 아래라 넉넉히 둘 이유가 없다. 제목이 빨리 눈에 들어와야 한다. */
  padding-block: clamp(26px, 3.2vw, 48px) clamp(32px, 6vw, 56px);
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(27px, 4.6vw, 42px);
  line-height: 1.32;
  letter-spacing: -0.02em;
  /* 줄 길이를 고르게 나눈다. 지원하지 않는 브라우저는 기존과 같이 동작한다. */
  text-wrap: balance;
}

.hero p {
  margin: 0 0 16px;
  max-width: 62ch;
  color: var(--text-2);
  font-size: clamp(16px, 2vw, 18px);
}

.accent {
  color: var(--accent);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 20px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.btn:hover {
  background: var(--surface-2);
}

.btn--primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #000;
}

.btn--primary:hover {
  background: #5cffc4;
  border-color: #5cffc4;
}

/*
 * 히어로의 일러스트 두 장.
 * 배경이 투명한 PNG 라서 테두리나 배경 없이 검정 위에 그대로 얹는다.
 */
.cast {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  /* 본문 폭을 다 채우면 일러스트가 제목보다 커 보인다. 조금 줄여 둔다. */
  max-inline-size: 700px;
  margin: 28px 0 0;
  align-items: center;
}

.cast__art {
  inline-size: 100%;
  block-size: auto;
}

.cast__note {
  margin: 8px 0 0;
  color: var(--text-3);
  font-size: 14px;
}

@media (max-width: 480px) {
  .cta {
    gap: 10px;
  }

  .cta .btn {
    inline-size: 100%;
    justify-content: center;
  }

  .brand {
    padding-block: 18px;
  }

  .brand strong {
    font-size: 20px;
  }
}

/* 태블릿 세로 이하에서는 두 장을 나란히 두면 너무 작아진다. */
@media (max-width: 680px) {
  .cast {
    grid-template-columns: 1fr;
    gap: 0;
    max-inline-size: 460px;
  }
}

/* 제품 화면 캡처 */
.shot {
  margin: 40px 0 0;
}

.shot img {
  display: block;
  inline-size: 100%;
  block-size: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.shot figcaption {
  margin-top: 12px;
  color: var(--text-3);
  font-size: 14px;
}

/* ---------------- 본문 공통 ---------------- */

section {
  padding-block: clamp(36px, 6vw, 60px);
  border-top: 1px solid var(--border);
}

h2 {
  margin: 0 0 8px;
  font-size: clamp(20px, 3vw, 26px);
  letter-spacing: -0.01em;
  scroll-margin-top: 24px;
  text-wrap: balance;
}

h3 {
  margin: 28px 0 8px;
  font-size: 17px;
}

.lede {
  margin: 0 0 28px;
  max-width: 62ch;
  color: var(--text-2);
}

p {
  max-width: 74ch;
  /* 마지막 줄에 한 어절만 떨어져 남는 것을 줄인다. */
  text-wrap: pretty;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 16px;
}

.card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  min-inline-size: 0;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.card p {
  margin: 0;
  color: var(--text-2);
  font-size: 15px;
}

ol.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 14px;
}

ol.steps li {
  counter-increment: step;
  display: grid;
  /* minmax(0, 1fr) 이 아니면 넓은 코드 블록이 칸을 밀어내 가로 스크롤이 생긴다. */
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-inline-size: 0;
}

ol.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

ol.steps p {
  margin: 0;
  color: var(--text-2);
}

ol.steps strong {
  display: block;
  color: var(--text);
}

ul.plain {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  color: var(--text-2);
}

ul.plain li {
  position: relative;
  padding-left: 20px;
  max-width: 74ch;
  /* 그리드 아이템의 기본 min-width 는 auto 라서 내용이 넓으면 줄어들지 않는다. */
  min-inline-size: 0;
}

ul.plain li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 12px;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent);
}

code {
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.9em;
  word-break: break-all;
}

pre {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  /* 긴 줄은 블록 안에서만 가로로 스크롤한다. 페이지 전체가 밀려서는 안 된다. */
  max-inline-size: 100%;
  overflow-x: auto;
}

pre code {
  padding: 0;
  border: 0;
  background: none;
  word-break: normal;
}

.note {
  padding: 18px 20px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-2);
}

.note strong {
  color: var(--text);
}

.summary {
  padding: 20px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: rgb(0 255 163 / 6%);
}

.summary p {
  margin: 0;
  color: var(--text);
}

/* ---------------- 표 ---------------- */

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

th,
td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

tbody tr:last-child td {
  border-bottom: 0;
}

th {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}

td {
  color: var(--text-2);
}

td:first-child {
  color: var(--text);
}

/* ---------------- 목차 ---------------- */

.toc {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.toc ol {
  margin: 0;
  padding-left: 20px;
  color: var(--text-2);
}

.toc li {
  margin-block: 4px;
}

/* ---------------- 푸터 ---------------- */

.site-footer {
  padding-block: 40px 56px;
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 14px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 20px;
}

.site-footer p {
  margin: 0 0 8px;
  max-width: 68ch;
}

.meta {
  color: var(--text-3);
  font-size: 15px;
}

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