:root {
  --bg: #f6f4ef;
  --card: #ffffff;
  --ink: #1d2a33;
  --muted: #5b6b75;
  --line: #e3dfd5;
  --accent: #1a63d8;
  --accent-soft: #e8f0fe;
  --good: #17723f;
  --warn: #9a5c00;
  --bad: #c0392b;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
a { color: var(--accent); }
header.site {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
header.site .logo { font-weight: 800; font-size: 20px; color: var(--ink); text-decoration: none; }
header.site nav a { margin-left: 16px; color: var(--muted); text-decoration: none; font-size: 15px; }
.wrap { max-width: 960px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
main { padding: 32px 0 64px; }
h1 { font-size: 30px; margin: 0 0 8px; }
h2 { font-size: 22px; margin: 40px 0 12px; }
h3 { font-size: 18px; margin: 24px 0 8px; }
.lead { color: var(--muted); margin: 0 0 24px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 20px;
}
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
input, textarea, select {
  width: 100%;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfb;
  color: var(--ink);
}
textarea { min-height: 140px; resize: vertical; font-family: ui-monospace, Consolas, monospace; font-size: 14px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
button {
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: 10px;
  padding: 12px 20px;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
}
button.secondary { background: var(--accent-soft); color: var(--accent); }
.error { color: var(--bad); font-weight: 600; margin-top: 12px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.stat { background: var(--bg); border-radius: 12px; padding: 14px; }
.stat .k { font-size: 13px; color: var(--muted); }
.stat .v { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat.main { background: var(--accent-soft); }
.verdict { margin-top: 16px; padding: 14px 16px; border-radius: 12px; font-weight: 700; }
.verdict.good { background: #e6f4ec; color: var(--good); }
.verdict.ok { background: #eef6e6; color: #3d7a16; }
.verdict.warn { background: #fdf3e2; color: var(--warn); }
.verdict.bad { background: #fbe9e7; color: var(--bad); }
canvas { width: 100%; height: auto; display: block; margin-top: 16px; border-radius: 10px; background: #fbfcfb; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; }
th { background: var(--bg); }
.formula { background: var(--bg); border-radius: 10px; padding: 12px 16px; font-family: ui-monospace, Consolas, monospace; font-size: 14px; overflow-x: auto; }
.ad-slot { border: 1px dashed var(--line); border-radius: 10px; padding: 18px; text-align: center; color: var(--muted); font-size: 13px; margin: 20px 0; }
.tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.tool { display: block; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.tool:hover { border-color: var(--accent); }
.tool .t { font-weight: 800; font-size: 18px; }
.tool .d { color: var(--muted); font-size: 14px; margin-top: 4px; }
.tool.soon { pointer-events: none; background: #f1f3f0; border-style: dashed; }
.tool.soon .t { color: var(--muted); }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); margin-left: 6px; }
details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
summary { font-weight: 700; cursor: pointer; }
footer.site { border-top: 1px solid var(--line); padding: 24px 0; color: var(--muted); font-size: 14px; }
footer.site a { color: var(--muted); margin-right: 14px; }

/* ---- shared: tables with inputs, CTA, print ---- */
.grid-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.grid-table th, .grid-table td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; vertical-align: middle; }
.grid-table input { padding: 8px 10px; }
.grid-table input[type=checkbox] { width: 20px; height: 20px; }
.grid-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-scroll { overflow-x: auto; }
.grid-table tfoot td { font-weight: 800; border-top: 2px solid var(--ink); }
button.small { padding: 6px 12px; font-size: 14px; }
button.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.cta { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--ink); color: #f6f7f4; border-radius: 14px; padding: 20px 24px; margin: 24px 0; }
.cta p { margin: 0; }
.cta a { background: #fff; color: var(--ink); text-decoration: none; font-weight: 800; padding: 10px 18px; border-radius: 10px; }
.source { font-size: 13px; color: var(--muted); }
.tag-ok { color: var(--good); font-weight: 700; }
.tag-no { color: var(--muted); }
.tag-warn { color: var(--warn); font-weight: 700; }
.download { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; font-weight: 800; padding: 12px 20px; border-radius: 10px; }
@media print {
  header.site, footer.site, .no-print, .ad-slot, .cta, details, h2.no-print { display: none !important; }
  body { background: #fff; }
  .card { border: 0; padding: 0; }
}
.grid-table th, button.small { white-space: nowrap; }

/* ---- checklist engine ---- */
.cl-progress { margin-bottom: 8px; }
.cl-bar { height: 10px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.cl-bar span { display: block; height: 100%; width: 0; background: var(--good); transition: width .2s; }
.cl-list { list-style: none; padding: 0; margin: 0 0 8px; }
.cl-list li { border-bottom: 1px solid var(--line); }
.cl-list label { display: flex; gap: 12px; align-items: flex-start; padding: 12px 4px; font-weight: 400; font-size: 16px; margin: 0; cursor: pointer; }
.cl-list input { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.cl-list input:checked + span b { text-decoration: line-through; color: var(--muted); }
.dday { display: inline-block; background: var(--accent-soft); color: var(--accent); font-weight: 800; border-radius: 99px; padding: 4px 12px; }

/* ---- paste & review ---- */
.paste-box { background: var(--bg); border: 1px dashed var(--line); }
.paste-box textarea { margin-top: 8px; min-height: 120px; }
.review-sum { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.review-sum span { border-radius: 99px; padding: 4px 12px; font-weight: 700; font-size: 14px; }
.rv-err { background: #fbe9e7; color: var(--bad); }
.rv-warn { background: #fdf3e2; color: var(--warn); }
.rv-info { background: var(--accent-soft); color: var(--accent); }
.rv-ok { background: #e6f4ec; color: var(--good); }
.review-list { list-style: none; padding: 0; margin: 0; }
.review-list li { display: flex; gap: 10px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.review-list li span:first-child { flex: none; border-radius: 6px; padding: 1px 8px; font-size: 13px; font-weight: 800; }
tr.row-err td { background: #fdf1ef; }
tr.row-warn td { background: #fffaf0; }
.cl-group { font-size: 18px; margin: 24px 0 8px; }

/* ---- print: show whole tables, compact inputs ---- */
@media print {
  .table-scroll { overflow: visible !important; }
  .grid-table { font-size: 11px; }
  .grid-table th, .grid-table td { padding: 4px 3px; }
  .grid-table input { padding: 2px 3px; border: 0; background: none; font-size: 11px; min-width: 0 !important; width: 100%; }
  input[type=time]::-webkit-calendar-picker-indicator { display: none; }
  .wrap { max-width: none !important; padding: 0; }
  canvas { break-inside: avoid; }
  .cl-list li { break-inside: avoid; }
}

/* ---- design v2: 노트 느낌 ---- */
:root { --shadow: 0 1px 2px rgba(30,35,45,.05); --shadow-up: 0 10px 28px rgba(26,60,120,.10); }
h1 { font-size: clamp(26px, 4.2vw, 34px); letter-spacing: -0.02em; line-height: 1.3; }
h2 { letter-spacing: -0.01em; }
header.site { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(8px); }
header.site .logo { display: inline-flex; align-items: center; gap: 9px; letter-spacing: -0.02em; }
header.site .logo::before { content: ""; width: 26px; height: 26px; flex: none; border-radius: 7px; box-shadow: inset 5px 0 0 #0f4bb0;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'%3E%3Cpath d='M10 9h10M10 13h10M10 17h6' stroke='%23fff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/26px no-repeat; }
header.site nav a:hover { color: var(--accent); }
.card, .tool, details { box-shadow: var(--shadow); }
.tool { position: relative; padding-right: 44px; transition: transform .15s, box-shadow .15s, border-color .15s; }
.tool::after { content: "→"; position: absolute; right: 18px; top: 19px; color: var(--line); font-weight: 800; transition: color .15s, transform .15s; }
.tool:hover { transform: translateY(-2px); box-shadow: var(--shadow-up); }
.tool:hover::after { color: var(--accent); transform: translateX(3px); }
.tool.soon::after { content: none; }
.tool .t { letter-spacing: -0.01em; }
input:focus, textarea:focus, select:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
button:hover { filter: brightness(.95); }
.badge[data-type="계산기"] { background: #e8f0fe; color: #1a56c4; }
.badge[data-type="체크리스트"] { background: #e4f3ea; color: #17663a; }
.badge[data-type="템플릿"] { background: #fdf0e1; color: #8a4b00; }
.badge[data-type="정리 노트"] { background: #f0eafb; color: #5b3aa6; }
.badge[data-type="도구"] { background: #e0f2f1; color: #0f5f59; }
.badge[data-type="실험 중"] { background: #fff4cc; color: #6f5200; }
footer.site { background: var(--card); }

/* home */
.hero { position: relative; display: grid; grid-template-columns: 1.25fr 1fr; gap: 28px; align-items: center; overflow: hidden;
  background: #fff repeating-linear-gradient(transparent 0 31px, #eef1f6 31px 32px); border: 1px solid var(--line); border-radius: 18px;
  padding: 40px 40px 36px 56px; box-shadow: var(--shadow); }
.hero::before { content: ""; position: absolute; left: 34px; top: 0; bottom: 0; width: 2px; background: #f3c4c0; }
.hero h1 { margin-bottom: 10px; }
.hero mark { background: linear-gradient(transparent 58%, #ffe58a 58%); color: inherit; padding: 0 2px; }
.eyebrow { margin: 0 0 10px; font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: .02em; }
.hero .lead { margin-bottom: 18px; }
.hero-search { display: flex; gap: 8px; max-width: 460px; }
.hero-search input { background: #fff; padding: 12px 14px; }
.hero-search button { flex: none; }
.chips { margin-top: 12px; font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chips a { text-decoration: none; background: var(--bg); border: 1px solid var(--line); color: var(--ink); border-radius: 99px; padding: 3px 11px; }
.chips a:hover { border-color: var(--accent); color: var(--accent); }
.hero-art { position: relative; height: 290px; }
.mini { position: absolute; width: 210px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: 0 12px 30px rgba(26,40,70,.12); font-size: 13px; color: var(--muted); }
.mini b { display: block; font-size: 22px; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.mini i { font-style: normal; font-weight: 700; font-size: 12px; border-radius: 99px; padding: 1px 8px; }
.mini.m1 { left: 0; top: 0; transform: rotate(-4deg); }
.mini.m2 { right: 0; top: 92px; transform: rotate(3deg); }
.mini.m3 { left: 8%; top: 196px; transform: rotate(-1.5deg); }
.hubs .tool { display: flex; gap: 14px; align-items: flex-start; }
.ic { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; }
.ic svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic.q { background: #e0f2f1; color: #0f6660; } .ic.m { background: #e8f0fe; color: #1a56c4; } .ic.s { background: #fdf0e1; color: #a2580a; }
.ic.l { background: #e4f3ea; color: #17663a; } .ic.y { background: #f0eafb; color: #5b3aa6; }
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0 0; padding: 0; list-style: none; }
.trust li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 14px; color: var(--muted); }
.trust b { display: block; color: var(--ink); font-size: 15px; }
.cta.highlight { background: linear-gradient(135deg, #1a63d8, #163f94); }
.cta.highlight a { color: #163f94; }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding: 28px 20px 24px 36px; }
  .hero::before { left: 20px; }
  .hero-art { display: none; }
  .trust { grid-template-columns: 1fr; }
}
@media print { .hero-art, .hero-search, .chips { display: none !important; } }
