/* Knox Nits Reporter — dark + warm gold, phone-first */
:root {
  --bg: #0B0D10;
  --panel: #14171C;
  --panel2: #1A1E25;
  --gold: #C9A227;
  --gold-lt: #E3C565;
  --white: #F2F2F2;
  --muted: #9AA0A8;
  --green: #3FB97F;
  --red: #E5484D;
  --line: #343A42;
  --radius: 16px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--white);
  font-family: -apple-system, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: var(--gold-lt); }

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center;
  padding: calc(env(safe-area-inset-top) + 10px) 12px 10px;
  background: rgba(11, 13, 16, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .back {
  font-size: 30px; line-height: 1; color: var(--gold-lt);
  text-decoration: none; padding: 2px 14px 2px 6px;
}
.topbar-title { flex: 1; text-align: center; font-weight: 700; font-size: 17px; }
.topbar-right { width: 44px; }
.home-top .topbar-title { text-align: left; }
.crest-mini {
  width: 38px; height: 38px; border: 2px solid var(--gold); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-size: 18px; margin-left: 4px;
}

.view { max-width: 640px; margin: 0 auto; padding: 14px 14px 40px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}
.card h2 { margin: 0 0 8px; font-size: 18px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.err { color: var(--red); min-height: 1.2em; }
.foot { text-align: center; color: var(--muted); font-size: 13px; margin-top: 18px; }
.hint { border-color: var(--gold); }
.sysicon { border: 1px solid var(--muted); border-radius: 4px; padding: 0 5px; font-size: 13px; }

.menu { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.menu-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px;
  color: var(--white); text-decoration: none;
}
.menu-item.primary { border-color: var(--gold); background: linear-gradient(180deg, #1c1a10, var(--panel)); }
.mi-icon { font-size: 26px; }
.mi-text { flex: 1; display: flex; flex-direction: column; }
.mi-text small { color: var(--muted); }
.mi-go { color: var(--gold-lt); font-size: 24px; }

.btn {
  display: inline-block; border: 1px solid var(--line);
  background: var(--panel2); color: var(--white);
  border-radius: 12px; padding: 12px 18px;
  font-size: 16px; font-weight: 600; text-decoration: none;
  cursor: pointer; text-align: center;
}
.btn.primary { background: var(--gold); border-color: var(--gold); color: #141414; }
.btn.ghost { background: transparent; }
.btn.big { display: block; width: 100%; margin: 14px 0; padding: 15px; font-size: 17px; }
.btn.small { padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.btn:disabled { opacity: 0.5; }
.row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }

input, textarea, select {
  width: 100%; background: var(--bg); color: var(--white);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 12px; font-size: 16px; margin: 6px 0;
  font-family: inherit;
}
textarea { resize: vertical; }
.filebtn {
  display: block; text-align: center; cursor: pointer;
  border: 2px dashed var(--gold); border-radius: var(--radius);
  padding: 22px; margin: 10px 0; font-weight: 700; color: var(--gold-lt);
}
.vh {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.drop {
  border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 14px; text-align: center; color: var(--muted); margin-bottom: 10px;
}
.drop.over { border-color: var(--gold); color: var(--gold-lt); }

.sect { font-size: 14px; letter-spacing: 0.08em; color: var(--gold-lt); margin: 18px 4px 8px; text-transform: uppercase; }
.meta-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); }
.meta-row:last-child { border-bottom: none; }
.meta-row span { color: var(--muted); }

.review .rev-title { font-weight: 700; margin-bottom: 6px; }

.hero { text-align: center; padding: 22px 16px; }
.hero-label { font-size: 13px; letter-spacing: 0.12em; color: var(--gold-lt); font-weight: 700; }
.hero-value { font-size: 46px; font-weight: 800; margin: 6px 0; }
.hero.pos .hero-value { color: var(--green); }
.hero.neg .hero-value { color: var(--red); }
.card.ok { border-color: var(--green); }
.card.bad { border-color: var(--red); }

.check { display: flex; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.check:last-child { border-bottom: none; }
.pill { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; border-radius: 6px; padding: 3px 8px; flex-shrink: 0; margin-top: 2px; }
.check.pass .pill { background: rgba(63, 185, 127, 0.15); color: var(--green); }
.check.fail .pill { background: rgba(229, 72, 77, 0.15); color: var(--red); }

.art { display: flex; gap: 12px; align-items: center; }
.thumb { width: 64px; height: 80px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); flex-shrink: 0; background: #000; }
.thumb.pdf { display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--gold-lt); font-size: 14px; }
.art-info { flex: 1; min-width: 0; }
.art-info b { word-break: break-all; font-size: 14px; }

a.card.hist { display: flex; justify-content: space-between; align-items: center; color: var(--white); text-decoration: none; }
.hist-total { font-size: 22px; font-weight: 800; }
.hist-total.pos { color: var(--green); }
.hist-total.neg { color: var(--red); }

.ident { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ident:last-child { border-bottom: none; }

.rb-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rb-row:last-child { border-bottom: none; }
.rb-rate {
  background: var(--bg); border: 1px solid var(--gold); color: var(--gold-lt);
  border-radius: 10px; padding: 8px 14px; font-size: 15px; font-weight: 700; min-width: 64px;
}
