/*
 * Design tokens: the whole page is styled from this block. A new look = new values here (same names as the
 * app's ui/theme/Theme.kt; palette "Midnight & champagne" from the design canvas).
 */
:root {
  --ground: #f7f7f5;
  --surface: #ffffff;
  --tint: #f3efe7;
  --line: #e5e7eb;
  --divider: #f0f1f3;
  --ink: #111827;
  --ink-muted: #4b5563;
  --primary: #16181d;
  --on-primary: #f5f1e8;
  --accent: #c9a86a;
  --accent-text: #7a5c2e;
  --verified: #0f6b4f;
  --verified-soft: #e3f1ea;
  --on-verified-soft: #0b5a41;
  --verified-line: #c9ddd2;
  --warning-soft: #fef3c7;
  --on-warning-soft: #92400e;
  --danger: #b91c1c;
  --danger-soft: #fef2f2;
  --danger-line: #fca5a5;
  --radius-s: 10px;
  --radius-m: 14px;
  --radius-l: 16px;
  --radius-xl: 20px;
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', Menlo, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0f1013;
    --surface: #17191e;
    --tint: #23211c;
    --line: #2b2e35;
    --divider: #23252b;
    --ink: #f3f4f6;
    --ink-muted: #a3a8b3;
    --primary: #f5f1e8;
    --on-primary: #16181d;
    --accent-text: #d9bf8a;
    --verified: #34a37f;
    --verified-soft: #12291f;
    --on-verified-soft: #8fd8b9;
    --verified-line: #1f4a3a;
    --warning-soft: #2d2410;
    --on-warning-soft: #f3c977;
    --danger: #f87171;
    --danger-soft: #2a1414;
    --danger-line: #7f1d1d;
  }
}

@font-face {
  font-family: 'Manrope';
  src: url('/fonts/manrope.ttf') format('truetype');
  font-weight: 200 800;
  font-display: swap;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 16px/1.55 var(--font); }
a { color: var(--accent-text); }
a:hover { color: var(--ink); }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.01em; }
.muted { color: var(--ink-muted); }
.small { font-size: 0.85rem; line-height: 1.5; }
.grow { flex: 1 1 auto; min-width: 0; }

/* header */
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.bar { max-width: 1120px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mark { width: 32px; height: 32px; border-radius: 9px; background: #16181d; display: inline-flex; align-items: center; justify-content: center; }
.mark svg { width: 18px; height: 18px; fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.brand { font-weight: 700; font-size: 1.1rem; }
select, button, input { font: inherit; min-height: 40px; padding: 6px 12px; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
button { cursor: pointer; font-weight: 700; }

/* layout */
main { max-width: 1120px; margin: 0 auto; padding: 28px 24px 56px; display: flex; flex-direction: column; gap: 22px; }
.stack { display: flex; flex-direction: column; gap: 22px; }
.row { display: flex; gap: 22px; flex-wrap: wrap; }
.grow2 { flex: 2 1 420px; min-width: 0; }
.grow1 { flex: 1 1 300px; min-width: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 22px; }
.card h2 { margin: 4px 0 0; font-size: 1.35rem; }
.card .h3, h2.h3 { margin: 0; font-size: 1.05rem; }
.card ul { margin: 12px 0 0; padding-left: 20px; color: var(--ink-muted); line-height: 1.7; }
section > h2 { margin: 0 0 12px; font-size: 1.35rem; }

/* verdict */
.verdict { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-start; background: var(--surface); border-radius: var(--radius-xl); padding: 28px; border: 1px solid var(--verified-line); }
.verdict.fail { border: 2px solid var(--danger-line); }
.seal { width: 64px; height: 64px; flex: none; border-radius: 50%; background: var(--verified); display: inline-flex; align-items: center; justify-content: center; }
.verdict.fail .seal { background: var(--danger); }
.seal svg { width: 34px; height: 34px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.overline { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-verified-soft); }
.verdict.fail .overline { color: var(--danger); }
.verdict h1 { margin: 4px 0 0; font-size: clamp(1.6rem, 4vw, 2rem); }
.lead { margin: 8px 0 0; font-size: 1.06rem; color: var(--ink-muted); }
.facts { margin-top: 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.fact { background: var(--ground); border-radius: 12px; padding: 12px 14px; }
.fact-title { font-weight: 700; font-size: 0.92rem; }
.fact.warn { background: var(--warning-soft); }
.fact.warn .fact-title { color: var(--on-warning-soft); }
.banner { margin: 0; padding: 10px 14px; border-radius: var(--radius-m); font-size: 0.9rem; background: var(--warning-soft); color: var(--on-warning-soft); }
.banner.development { background: var(--danger-soft); color: var(--danger); font-weight: 700; }

/* sender, checklist */
dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 14px 0 0; }
dt { color: var(--ink-muted); }
dd { margin: 0; overflow-wrap: anywhere; }
ul.answers { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 10px; color: var(--ink); }
ul.answers li { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.pill { font-weight: 700; font-size: 0.8rem; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.pill.ok { background: var(--verified-soft); color: var(--on-verified-soft); }
.pill.warn { background: var(--warning-soft); color: var(--on-warning-soft); }
.pill.na { background: var(--line); color: var(--ink-muted); }

/* photos */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
figure { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
figure img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--tint); }
figcaption { padding: 10px 12px; font-size: 0.9rem; }

/* technical checks */
details.card > summary { cursor: pointer; font-weight: 700; }
ul.checks { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; }
.check { display: grid; grid-template-columns: 7.5rem 1fr; gap: 2px 12px; padding: 8px 12px; border-radius: var(--radius-s); background: var(--ground); color: var(--ink); }
.check details { grid-column: 1 / -1; font-size: 0.85rem; color: var(--ink-muted); }
.check summary { cursor: pointer; font-family: var(--mono); }
.status { font-weight: 700; }
.check.pass .status { color: var(--verified); }
.check.warn .status { color: var(--on-warning-soft); }
.check.fail .status { color: var(--danger); }
.check.na .status { color: var(--ink-muted); }

/* notices (loading, gone, password) */
.notice { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 28px; display: grid; gap: 10px; }
.notice p { margin: 0; }
.notice button { justify-self: start; background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.error { color: var(--danger); }
footer { margin-top: 8px; overflow-wrap: anywhere; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; }

@media (max-width: 560px) {
  main { padding: 16px; gap: 14px; }
  .verdict, .card { padding: 18px; }
  .verdict { gap: 14px; }
  .seal { width: 44px; height: 44px; }
  .seal svg { width: 24px; height: 24px; }
  .photos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .check { grid-template-columns: 6rem 1fr; }
}

/* Print / "Save as PDF": a clean evidence report on paper. */
@media print {
  :root { --ground: #fff; --surface: #fff; }
  .top select, .actions, .banner.beta { display: none; }
  main { padding: 0; max-width: none; }
  .card, .verdict, figure { break-inside: avoid; box-shadow: none; }
  details.card { display: block; }
  details.card > *:not(summary) { display: block; }
  .photos { grid-template-columns: repeat(3, 1fr); }
  a { color: inherit; text-decoration: none; }
}
