:root {
  --bg: #f6f7f4;
  --surface: #ffffff;
  --text: #1c211d;
  --muted: #5b645d;
  --line: #dde2dc;
  --brand: #2e5e3e;
  --brand-text: #ffffff;
  --ok: #1f7a3d;
  --ok-bg: #e5f4e9;
  --bad: #b3261e;
  --bad-bg: #fbe9e7;
  --warn: #8a5a00;
  --warn-bg: #fdf1d8;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121512;
    --surface: #1b1f1c;
    --text: #e6eae5;
    --muted: #a3ada5;
    --line: #2f3631;
    --brand: #7fbf8e;
    --brand-text: #0f2416;
    --ok: #7fd497;
    --ok-bg: #173322;
    --bad: #ffb4ab;
    --bad-bg: #3b1714;
    --warn: #f2c26b;
    --warn-bg: #352a12;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121512; --surface: #1b1f1c; --text: #e6eae5; --muted: #a3ada5; --line: #2f3631;
  --brand: #7fbf8e; --brand-text: #0f2416; --ok: #7fd497; --ok-bg: #173322; --bad: #ffb4ab;
  --bad-bg: #3b1714; --warn: #f2c26b; --warn-bg: #352a12; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
[hidden] { display: none !important; }
h1 { font-size: 1.75rem; line-height: 1.2; margin: 28px 0 8px; }
h2 { font-size: 1.25rem; margin: 0 0 8px; }
h3 { font-size: 1rem; margin: 16px 0 4px; }
p { margin: 0 0 12px; }
a { color: var(--brand); }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 10px; height: 56px; }
.logo { border-radius: 8px; }
.brand { font-weight: 700; }
.brand-sub { font-weight: 400; color: var(--muted); margin-left: 4px; }
.lead { color: var(--muted); font-size: 1.05rem; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 16px 0; }
.label { font-size: 0.8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.hint { font-size: 0.875rem; color: var(--muted); margin-top: 4px; }
.fingerprint-card .mono { font-size: 0.95rem; margin-top: 4px; }

.fingerprint-entry { margin: 16px 0; }
.fingerprint-entry summary { cursor: pointer; color: var(--brand); font-weight: 600; padding: 4px 0; }
.fingerprint-entry .label { display: block; margin: 8px 0 6px; text-transform: none; letter-spacing: 0; font-size: 0.875rem; font-weight: 400; }
input[type="text"] {
  width: 100%; padding: 12px; font-size: 1rem; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}

.drop {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  padding: 32px 16px; margin: 16px 0 8px; border: 2px dashed var(--line); border-radius: var(--radius);
  background: var(--surface); cursor: pointer;
}
.drop:focus-visible, .drop.over { border-color: var(--brand); outline: none; }
.drop-title { font-size: 1.15rem; font-weight: 700; }
.drop-hint { color: var(--muted); }
.button {
  display: inline-block; padding: 10px 20px; border-radius: 999px; border: 0;
  background: var(--brand); color: var(--brand-text); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.button.secondary { background: transparent; color: var(--brand); border: 1px solid var(--line); }
.privacy { font-size: 0.875rem; color: var(--muted); }

.busy { display: flex; align-items: center; gap: 12px; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.verdict { border-radius: var(--radius); padding: 18px 16px; margin: 24px 0 16px; display: flex; gap: 14px; align-items: flex-start; }
.verdict .mark { font-size: 1.6rem; line-height: 1; font-weight: 700; }
.verdict h2 { margin: 0 0 4px; font-size: 1.2rem; }
.verdict p { margin: 0; }
.verdict.ok { background: var(--ok-bg); color: var(--ok); }
.verdict.bad { background: var(--bad-bg); color: var(--bad); }
.verdict.warn { background: var(--warn-bg); color: var(--warn); }
.verdict .detail { color: var(--text); opacity: 0.85; }

.rows { display: grid; grid-template-columns: minmax(110px, 30%) 1fr; gap: 6px 12px; margin: 0; }
.rows dt { color: var(--muted); }
.rows dd { margin: 0; overflow-wrap: anywhere; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 6px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.st-ok { color: var(--ok); font-weight: 600; }
.st-bad { color: var(--bad); font-weight: 600; }
.st-warn { color: var(--warn); font-weight: 600; }

.area { margin-top: 16px; }
.area h3 { margin-top: 0; }
.checks { list-style: none; padding: 0; margin: 0 0 8px; font-size: 0.95rem; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 14px; }
.pair-title { grid-column: 1 / -1; font-weight: 600; margin-top: 4px; }
.photo { margin: 0; }
.photo .phase { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; background: var(--line); display: block; margin: 4px 0; }
.photo figcaption { font-size: 0.8rem; color: var(--muted); }
.photo .empty { aspect-ratio: 3 / 4; border-radius: 10px; border: 1px dashed var(--line); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 0.85rem; margin: 4px 0; }
.signature { max-width: 100%; background: #fff; border-radius: 10px; border: 1px solid var(--line); margin-top: 8px; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 32px; }
.about { margin: 40px 0 24px; color: var(--muted); }
.about h2, .about h3 { color: var(--text); }
.foot { color: var(--muted); font-size: 0.85rem; padding-top: 16px; padding-bottom: 32px; border-top: 1px solid var(--line); }

@media (max-width: 480px) {
  h1 { font-size: 1.5rem; }
  .rows { grid-template-columns: 1fr; gap: 0; }
  .rows dd { margin-bottom: 8px; }
}

.policy h2 { margin-top: 28px; }
.policy ul { padding-left: 20px; margin: 0 0 12px; }
.policy li { margin-bottom: 6px; }

.lang-switch { margin-left: auto; font-weight: 600; text-decoration: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); }
