:root {
  --paper: #f3efe6;
  --ink: #1d1914;
  --muted: #6d645a;
  --line: #ddd4c6;
  --card: #fffdf8;
  --stamp: #8e2f2a;
  --stamp-soft: #f6e6e2;
  --ok: #1d6b45;
  --ok-soft: #e5f3eb;
  --warn: #8a5a12;
  --shadow: 0 10px 30px rgba(60, 42, 24, 0.06);
  color: var(--ink);
  background: var(--paper);
  font-family: "Segoe UI", sans-serif;
  line-height: 1.45;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button, .button, input, textarea, select { font: inherit; }

.top {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.92);
  position: sticky;
  top: 0;
}
.brand { text-decoration: none; font-family: Georgia, "Palatino Linotype", serif; font-size: 22px; }
.brand span { color: var(--stamp); }
nav { display: flex; gap: 18px; align-items: center; }
nav a { text-decoration: none; color: var(--muted); }
nav a:hover { color: var(--ink); }
.count {
  display: inline-block;
  min-width: 1.3em;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--stamp);
  color: white;
  font-size: 12px;
  text-align: center;
}

main { width: min(1100px, calc(100% - 32px)); margin: 28px auto 64px; }
h1, h2 { font-family: Georgia, "Palatino Linotype", serif; font-weight: 500; letter-spacing: -0.02em; }
h1 { font-size: 40px; margin: 0 0 8px; }
h2 { font-size: 26px; margin: 0 0 12px; }
.lead { font-size: 18px; max-width: 68ch; color: var(--muted); margin-top: 0; }
.muted { color: var(--muted); }
.error {
  background: var(--stamp-soft);
  color: var(--stamp);
  padding: 10px 12px;
  border-radius: 10px;
}

.steps, .grid, .refs { display: grid; gap: 14px; }
.steps { grid-template-columns: repeat(4, 1fr); margin: 22px 0 28px; }
.grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.refs { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.card, .panel, .finding {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.card, .panel { padding: 16px; }
.step { padding: 14px; border: 1px dashed var(--line); border-radius: 14px; background: rgba(255,253,248,.6); }
.step b { display: block; font-family: Georgia, serif; font-size: 18px; margin-bottom: 4px; }
.card h2, .panel h2 { font-size: 22px; }

label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; }
input[type="text"], input[type="password"], textarea, input[type="file"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}
.checks { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.checks label, .checkline { margin: 12px 0 0; color: var(--ink); font-size: 15px; }
.checkline input { margin-right: 8px; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.button, button {
  display: inline-block;
  border: 0;
  background: var(--ink);
  color: white;
  text-decoration: none;
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
}
.button.secondary, button.secondary { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.button.danger, button.danger { background: var(--stamp); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pair figure { margin: 0; }
.pair img, .refs img, .thumb { width: 100%; height: 220px; object-fit: contain; background: #f7f3ec; border-radius: 12px; }
.refs img, .thumb { height: 140px; }
figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }
.finding { padding: 14px; margin-bottom: 14px; }
.badge { display: inline-block; padding: 3px 8px; border-radius: 999px; background: var(--stamp-soft); color: var(--stamp); font-size: 12px; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: #f8efdc; color: var(--warn); }
.split { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; align-items: start; }
.note {
  padding: 12px 14px;
  border-left: 3px solid var(--stamp);
  background: var(--stamp-soft);
  border-radius: 0 12px 12px 0;
}
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; }
.report-head { display: flex; justify-content: space-between; gap: 16px; align-items: end; }
.site-footer { width: min(1100px, calc(100% - 32px)); margin: 0 auto 28px; color: var(--muted); font-size: 13px; }

@media print {
  .top, .site-footer, .no-print { display: none !important; }
  body { background: white; }
  main { width: 100%; margin: 0; }
  .finding { break-inside: avoid; box-shadow: none; }
}

@media (max-width: 800px) {
  .steps, .split, .pair { grid-template-columns: 1fr; }
  .top { flex-direction: column; align-items: flex-start; }
  h1 { font-size: 32px; }
}
