:root {
  --ink: #15232a;
  --ink-soft: #4b5f66;
  --line: #d5e0e3;
  --bg: #f4f8f9;
  --card: #ffffff;
  --brand: #0f5e63;
  --brand-soft: #e6f1f2;
  --warn: #8a4b00;
  --warn-bg: #fff4e0;
  --danger: #a4262c;
  --danger-bg: #fdecec;
  --ok: #1d6b3f;
  --ok-bg: #e9f6ee;
  color-scheme: light;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  overflow-wrap: anywhere;
}

a { color: var(--brand); }
a:hover { text-decoration-thickness: 2px; }

.chrome { background: var(--brand); color: #fff; }
.chrome a { color: #fff; text-decoration: none; }
.chrome .in { max-width: 960px; margin: 0 auto; padding: 10px 16px; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.chrome .brand { font-weight: 700; margin-right: auto; }
.chrome nav a { padding: 4px 0; border-bottom: 2px solid transparent; font-size: 15px; }
.chrome nav a[aria-current="page"] { border-bottom-color: #fff; }

main { max-width: 960px; margin: 0 auto; padding: 18px 16px 40px; }

h1 { font-size: clamp(1.35rem, 4vw, 1.9rem); line-height: 1.35; margin: 8px 0 6px; }
h2 { font-size: 1.15rem; margin: 26px 0 10px; }
h3 { font-size: 1rem; margin: 18px 0 8px; }
.updated { color: var(--ink-soft); font-size: 0.85rem; margin: 0 0 14px; }
.lead { font-size: 1.02rem; color: var(--ink-soft); }

.onboard { display: grid; gap: 6px; background: var(--brand-soft); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 16px 0; }
.onboard p { margin: 0; font-size: 0.95rem; }

.tool-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 16px 0; }
.tool-card h2 { margin-top: 0; }

label { display: block; font-size: 0.86rem; color: var(--ink-soft); margin: 10px 0 4px; }
input, select, button, textarea { font: inherit; }
input[type="date"], input[type="text"], input[type="number"], input[type="email"], select {
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid #79b3b8; outline-offset: 2px; }

.field-grid { display: grid; gap: 10px; grid-template-columns: 1fr; margin: 8px 0; }
@media (min-width: 640px) { .field-grid { grid-template-columns: 1fr 1fr; } }

fieldset.toggles { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 12px 0 0; }
fieldset.toggles legend { font-size: 0.9rem; color: var(--ink-soft); padding: 0 4px; }
fieldset.toggles label { display: flex; gap: 8px; align-items: flex-start; font-size: 0.92rem; color: var(--ink); margin: 6px 0; }
fieldset.toggles label:has(input[type="radio"]) { margin: 4px 0; }
fieldset.toggles input[type="radio"] { margin-top: 4px; width: auto; }

.form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
button, .cta {
  border: 1px solid var(--brand);
  background: #fff;
  color: var(--brand);
  border-radius: 8px;
  padding: 9px 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-size: 0.95rem;
}
button.primary, .cta.primary { background: var(--brand); color: #fff; }
button.secondary, .cta.secondary { background: var(--brand-soft); border-color: var(--brand-soft); }
button.ghost, .cta.ghost { border-color: var(--line); color: var(--ink-soft); }

.tool-err { color: var(--danger); font-size: 0.88rem; margin: 6px 0; min-height: 1px; }

.tool-card .result { margin-top: 14px; }
.verdict { border-top: 1px solid var(--line); padding-top: 12px; }
.verdict-summary { margin: 8px 0 12px; }
.badge { display: inline-block; font-weight: 700; border-radius: 999px; padding: 4px 12px; font-size: 0.95rem; }
.badge-target { background: var(--brand-soft); color: var(--brand); border: 1px solid #bcd9db; }
.badge-out { background: #eef1f4; color: #394b52; border: 1px solid #d3dbe0; }
.badge-warn { background: var(--warn-bg); color: var(--warn); border: 1px solid #f0d9b0; }
.badge-ok { background: var(--ok-bg); color: var(--ok); border: 1px solid #bfe0cb; }
.badge-fail { background: var(--danger-bg); color: var(--danger); border: 1px solid #f0c2c2; }
.badge-info { background: #eef2fb; color: #2b3f7a; border: 1px solid #ccd6ee; }

.cards { display: grid; gap: 10px; grid-template-columns: 1fr; margin: 12px 0; }
@media (min-width: 720px) { .cards { grid-template-columns: 1fr 1fr; } }
.card { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fbfdfd; }
.card h3 { margin: 0 0 4px; font-size: 0.95rem; }
.card p { margin: 4px 0; font-size: 0.9rem; }
.card .big { font-size: 1.15rem; font-weight: 700; color: var(--brand); }

ul.checks { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
ul.checks li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; font-size: 0.92rem; background: #fbfcfe; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
ul.checks .ic { font-weight: 700; }
ul.checks li.ok .ic { color: var(--ok); }
ul.checks li.no .ic { color: var(--danger); }
ul.checks li.unknown .ic { color: var(--warn); }
ul.needs { color: var(--warn); }

ul.deadlines { padding-left: 18px; }
ul.deadlines li { margin: 6px 0; font-size: 0.92rem; }
ul.deadlines .date { font-weight: 700; background: var(--brand-soft); border-radius: 6px; padding: 1px 8px; }
ul.deadlines .note { display: block; color: var(--ink-soft); font-size: 0.82rem; }

ol.steps { padding-left: 22px; }
ol.steps li { margin: 5px 0; font-size: 0.92rem; }

.refs { font-size: 0.82rem; color: var(--ink-soft); margin: 12px 0 4px; }

.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 16px 0; }
.tile { display: grid; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-decoration: none; color: var(--ink); }
.tile strong { color: var(--brand); }
.tile span { font-size: 0.88rem; color: var(--ink-soft); }

.tw { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 10px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
caption { text-align: left; padding: 8px 10px; color: var(--ink-soft); font-size: 0.8rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--brand-soft); font-size: 0.82rem; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }

.notice { background: var(--brand-soft); border-radius: 10px; padding: 10px 12px; font-size: 0.85rem; color: var(--ink-soft); margin: 16px 0; }
.warn { background: var(--warn-bg); border: 1px solid #f0d9b0; border-radius: 10px; padding: 10px 12px; font-size: 0.9rem; color: var(--warn); }

.small { font-size: 0.8rem; }
.muted { color: var(--ink-soft); }
ul.check { padding-left: 20px; }
ul.check li { margin: 5px 0; }
ul.links { padding-left: 20px; }
ul.links li { margin: 5px 0; }

.item-group { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.item-group h3 { margin: 0 0 6px; font-size: 0.95rem; }
.item-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 8px 0; border-top: 1px dashed var(--line); }
.item-row:first-of-type { border-top: 0; }
.item-row .q { font-size: 0.9rem; }
.item-row .marks { display: flex; gap: 14px; }
.item-row .marks label { display: inline-flex; gap: 6px; align-items: center; margin: 0; color: var(--ink); font-size: 0.9rem; }
.item-row .marks input { width: auto; }

.record-list { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.record-list li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 0.9rem; background: #fbfdfd; }
.record-list .kind { font-weight: 700; color: var(--brand); }
.record-list .note { color: var(--ink-soft); flex: 1 1 160px; }
.record-list button { padding: 4px 10px; font-size: 0.8rem; }

.retention { display: grid; gap: 8px; }
.month-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; margin: 6px 0 2px; }
.month-grid span { height: 14px; border-radius: 3px; background: #e6ebee; }
.month-grid span.done { background: var(--brand); }
.month-grid span.miss { background: #f3c9cc; }

.verdict-summary strong { color: var(--brand); }

.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 8px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 8px 0 0; color: var(--ink-soft); }

.sources ul, footer ul { padding-left: 18px; }
footer .in { max-width: 960px; margin: 0 auto; padding: 18px 16px 28px; display: grid; gap: 12px; }
footer h2 { font-size: 0.85rem; margin: 0 0 4px; opacity: 0.85; }
footer ul { margin: 0; columns: 2; column-gap: 18px; font-size: 0.85rem; }
footer li { margin: 3px 0; break-inside: avoid; }
footer .disc { font-size: 0.8rem; margin: 0; opacity: 0.92; }
footer a { text-decoration: underline; }

.print-only { display: none; }

.sheet { color: #111; }
.sheet h1 { font-size: 16pt; margin: 0 0 4pt; }
.sheet-head .small { font-size: 8pt; margin: 2pt 0; color: #444; }
.sheet .blank { display: inline-block; min-width: 90pt; border-bottom: 0.6pt solid #333; }
table.check-table { width: 100%; font-size: 8.6pt; border-collapse: collapse; }
table.check-table th, table.check-table td { border: 0.5pt solid #666; padding: 3pt 4pt; vertical-align: top; }
table.check-table thead th { background: #eef2f7; }
table.check-table td.ref { font-size: 7.4pt; color: #444; width: 16%; }
table.check-table td.box { width: 9%; text-align: center; }
table.check-table tr { break-inside: avoid; }
.sheet .sign { margin-top: 8pt; font-size: 9pt; }
.sheet .notice-text { font-size: 11pt; line-height: 1.9; }
.sheet .notice-text p { margin: 10pt 0; }

@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; font-size: 9pt; }
  .chrome, main > *:not(#print-area), footer { display: none !important; }
  main { max-width: none; padding: 0; margin: 0; }
  .print-only { display: block !important; }
  .sheet { break-inside: avoid; }
  table.check-table { font-size: 8.4pt; }
}
