/* 까먹지마 SEO 랜딩(정적 도구 페이지) 공통 스타일.
   Flutter 웹앱과 독립적으로 동작합니다. 외부 폰트/스크립트를 쓰지 않습니다. */

:root {
  --brand: #5b63d3;
  --brand-strong: #4650b8;
  --brand-soft: #eef0fd;
  --accent: #c084fc;
  --surface: #ffffff;
  --page: #faf8f4;
  --text: #1c1d21;
  --text-dim: #5c5d66;
  --line: #e5e3dd;
  --ok: #2f7d4f;
  --warn: #b4530e;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 8px 24px rgba(0, 0, 0, .05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #9aa8ff;
    --brand-strong: #b5bfff;
    --brand-soft: #262a44;
    --accent: #ff86c3;
    --surface: #1b1c20;
    --page: #16171a;
    --text: #f6f3f5;
    --text-dim: #b8b4b8;
    --line: #33343a;
    --ok: #7fd1a0;
    --warn: #f0a568;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo',
    'Noto Sans KR', 'Malgun Gothic', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* ---------- 헤더 / 푸터 ---------- */
.site-head {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; height: 56px;
}
.site-head a.logo {
  font-weight: 800; font-size: 17px; color: var(--text);
  text-decoration: none; letter-spacing: -.02em;
}
.site-head nav a {
  font-size: 14px; color: var(--text-dim); text-decoration: none; margin-left: 14px;
}
.site-head nav a:hover { color: var(--brand); }

.site-foot {
  margin-top: 56px; padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--text-dim); font-size: 13px;
}
.site-foot a { color: var(--text-dim); }

/* ---------- 본문 ---------- */
main { padding-top: 28px; }

.crumb { font-size: 13px; color: var(--text-dim); margin-bottom: 10px; }
.crumb a { color: var(--text-dim); text-decoration: none; }
.crumb a:hover { text-decoration: underline; }

h1 {
  font-size: 30px; line-height: 1.3; letter-spacing: -.03em;
  margin: 0 0 10px; font-weight: 800;
}
h2 {
  font-size: 21px; line-height: 1.4; letter-spacing: -.02em;
  margin: 44px 0 12px; font-weight: 700;
}
h3 { font-size: 17px; margin: 26px 0 8px; font-weight: 700; }
.lead { color: var(--text-dim); font-size: 16px; margin: 0 0 8px; }

p { margin: 12px 0; }
a { color: var(--brand); }
ul, ol { padding-left: 20px; }
li { margin: 6px 0; }

/* ---------- 도구 카드 ---------- */
.tool {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin: 22px 0;
}
.tool h2:first-child, .tool h3:first-child { margin-top: 0; }

.field { margin: 14px 0; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field .hint { font-size: 13px; color: var(--text-dim); font-weight: 400; }

input[type="date"], input[type="number"], input[type="text"], select {
  width: 100%; padding: 11px 12px; font-size: 16px;
  font-family: inherit; color: var(--text);
  background: var(--page);
  border: 1px solid var(--line); border-radius: 10px;
}
input:focus, select:focus { outline: 2px solid var(--brand); outline-offset: 1px; }

.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1 1 160px; min-width: 0; }

button {
  font: inherit; font-weight: 700; cursor: pointer;
  padding: 11px 18px; border-radius: 10px;
  border: 1px solid transparent;
  background: var(--brand); color: #fff;
}
button:hover { background: var(--brand-strong); }
button.ghost { background: transparent; color: var(--brand); border-color: var(--line); }
button.ghost:hover { background: var(--brand-soft); }

/* ---------- 결과 ---------- */
.result {
  margin-top: 16px; padding: 18px;
  background: var(--brand-soft);
  border-radius: 12px;
}
.result .big {
  font-size: 34px; font-weight: 800; letter-spacing: -.03em;
  color: var(--brand-strong); line-height: 1.2;
}
.result .sub { font-size: 14px; color: var(--text-dim); margin-top: 4px; }
.result.empty { background: var(--page); border: 1px dashed var(--line); color: var(--text-dim); }

/* ---------- 표 ---------- */
.table-scroll { overflow-x: auto; margin: 16px 0; }
table { border-collapse: collapse; width: 100%; font-size: 15px; min-width: 460px; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--brand-soft); font-weight: 700; white-space: nowrap; }
td.num { white-space: nowrap; }

.note {
  font-size: 14px; color: var(--text-dim);
  border-left: 3px solid var(--line); padding: 2px 0 2px 12px; margin: 16px 0;
}

/* ---------- FAQ ---------- */
details {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; margin: 10px 0; background: var(--surface);
}
details[open] { box-shadow: var(--shadow); }
summary { cursor: pointer; font-weight: 700; }
summary::-webkit-details-marker { display: none; }
details p { margin: 10px 0 0; color: var(--text-dim); }

/* ---------- 앱 설치 CTA ---------- */
.cta {
  margin: 44px 0 0; padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.cta h2 { margin-top: 0; }
.cta .links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.cta .links a {
  flex: 1 1 180px; text-align: center; text-decoration: none;
  padding: 13px 16px; border-radius: 10px; font-weight: 700;
  background: var(--brand); color: #fff;
}
.cta .links a.alt { background: transparent; color: var(--brand); border: 1px solid var(--line); }

/* ---------- 관련 도구 ---------- */
.related { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 16px; }
.related a {
  display: block; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px;
}
.related a:hover { border-color: var(--brand); }
.related strong { display: block; font-size: 16px; margin-bottom: 4px; }
.related span { font-size: 14px; color: var(--text-dim); }

@media (max-width: 480px) {
  h1 { font-size: 25px; }
  .result .big { font-size: 28px; }
}
