@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,560;9..144,650&family=Outfit:wght@400;500;600;700&display=swap");

:root {
  color-scheme: light;
  --ink: #17232d;
  --muted: #5d6b78;
  --line: #e5d9c8;
  --paper: #f4efe6;
  --card: #fffdf9;
  --tide: #0e6b62;
  --tide-deep: #0b534c;
  --sand: #f3e6cf;
  --gold: #8a6840;
  --shadow: 0 18px 50px rgba(23, 35, 45, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Outfit, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(920px 420px at -8% -12%, rgba(14, 107, 98, .18), transparent 58%),
    radial-gradient(760px 380px at 110% -8%, rgba(184, 142, 74, .2), transparent 52%),
    var(--paper);
  min-height: 100vh;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--tide); outline-offset: 3px; }
button, input, select, textarea { font: inherit; }
button:disabled, input:disabled, select:disabled { opacity: .55; cursor: not-allowed; }

.top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 5vw;
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(244, 239, 230, .86);
  border-bottom: 1px solid rgba(229, 217, 200, .9);
  backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; letter-spacing: -.02em; }
.mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--ink);
  color: #f7f1e6;
  font-size: 12px;
  letter-spacing: .04em;
}
nav { display: flex; gap: 8px; align-items: center; }
nav a { text-decoration: none; padding: 8px 12px; border-radius: 999px; color: var(--muted); font-weight: 600; }
nav a:hover { color: var(--ink); background: rgba(255, 255, 255, .7); }
nav a.btn { color: white; }
nav a.btn:hover { color: white; background: var(--tide-deep); }

.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 36px 0 72px; }
.narrow { width: min(720px, calc(100% - 32px)); }
.eyebrow { letter-spacing: .16em; text-transform: uppercase; color: var(--tide); font-size: 12px; font-weight: 700; margin: 0 0 8px; }
h1, h2, .stat strong { font-family: Fraunces, Georgia, serif; font-weight: 560; letter-spacing: -.03em; }
h1 { font-size: clamp(40px, 6vw, 68px); line-height: .98; margin: 0 0 14px; }
h2 { font-size: 28px; line-height: 1.15; margin: 0 0 8px; }
.lead { font-size: 18px; line-height: 1.55; max-width: 640px; color: #31414c; margin: 0 0 18px; }

.hero { display: grid; grid-template-columns: 1.3fr .9fr; gap: 22px; align-items: stretch; }
.panel, .card, .sheet, .table-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.panel { padding: 22px; }
.card { padding: 20px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { padding: 14px; border-radius: 18px; background: #f7f3ec; }
.stat p, .muted { color: var(--muted); font-size: 14px; line-height: 1.5; }
.stat strong { display: block; font-size: 34px; line-height: 1; margin-top: 6px; }
.points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 22px; }
.point { padding: 18px; }
.point span { display: block; color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 8px; }

.actions, .toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 16px 0; }
.btn, button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--tide);
  color: white;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(14, 107, 98, .18);
}
.btn:hover { background: var(--tide-deep); }
.ghost, a.ghost, button.ghost { background: white; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.ghost:hover { background: #f7f3ec; }
.stack { display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
label.checkline { display: flex; align-items: center; gap: 8px; font-weight: 500; }
label.checkline input { width: auto; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 14px;
  background: #fff;
  color: var(--ink);
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #9ecdc7; box-shadow: 0 0 0 4px rgba(14, 107, 98, .12); outline: none; }
fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 12px; }
legend { font-family: Fraunces, Georgia, serif; font-size: 24px; padding: 8px 0 0; }

.bad, .ok { padding: 12px 14px; border-radius: 16px; }
.bad { background: #fdecec; color: #7d2222; }
.ok { background: #e7f4f1; color: #0b4f47; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.pill, .badge, .status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 700;
  background: var(--sand);
  color: var(--gold);
}
.pill.live, .badge.good, .status-success { background: #e5f4ef; color: #0d5c50; }
.badge.wait, .status-pending_review { background: #f8efd8; color: #6d5424; }
.status-rejected, .check.miss strong { color: #8a2a2a; }
.status-rejected { background: #fdecec; }

.page-head { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 8px; }
.channel-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.channel { min-height: 100%; }
.steps { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; }
.steps button {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: white;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 650;
}
.steps .on { background: var(--ink); color: white; border-color: var(--ink); }
.locked { opacity: .45; pointer-events: none; }

.captures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
.docs { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin: 12px 0 18px; }
.docs figure { margin: 0; }
.docshot { width: 100%; max-height: 420px; object-fit: contain; background: #f7f3ec; border-radius: 16px; border: 1px solid var(--line); }
input[type="file"] { padding: 10px; background: #fff; }
.frame {
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  border: 1px dashed #d9cbb6;
  background:
    linear-gradient(180deg, rgba(255,255,255,.4), rgba(243, 230, 207, .55)),
    repeating-linear-gradient(135deg, transparent, transparent 10px, rgba(255,255,255,.35) 10px, rgba(255,255,255,.35) 12px);
  display: grid;
  place-items: end start;
  padding: 12px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
}
.score { font-size: 16px; color: #31414c; }

.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; background: transparent; min-width: 680px; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top; }
th { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
tbody tr:hover { background: #fbf7f1; }
td a { font-weight: 700; text-decoration: none; }
.pager { display: flex; gap: 12px; align-items: center; }
.pager a { font-weight: 700; }
.check { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.check small { color: var(--muted); }
.check.pass strong { color: var(--tide-deep); }
.check.skip strong { color: var(--muted); font-weight: 600; }
pre { white-space: pre-wrap; background: #f7f3ec; border-radius: 16px; padding: 12px; font-size: 13px; }
.empty { padding: 28px; text-align: center; }
.gate { max-width: 460px; margin: 8vh auto; }
code { font-size: .92em; }

.sheet { position: relative; overflow: hidden; padding: 32px; }
.sheet::after {
  content: "MUSTER";
  position: absolute;
  right: -18px;
  bottom: 28px;
  font-family: Fraunces, Georgia, serif;
  font-size: 84px;
  letter-spacing: .08em;
  color: rgba(23, 35, 45, .05);
  transform: rotate(-8deg);
  pointer-events: none;
}
.sheet-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; margin: 18px 0; }
.facts div { padding-top: 8px; border-top: 1px solid var(--line); }
.facts span { display: block; color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; }

@media (max-width: 860px) {
  .hero, .points, .captures, .facts { grid-template-columns: 1fr; }
  .top { flex-wrap: wrap; }
  h1 { font-size: 40px; }
}
@media print {
  body { background: white; }
  .top, .btn, nav, .actions { display: none !important; }
  .sheet { box-shadow: none; }
  .sheet::after { color: rgba(23, 35, 45, .12); }
}
