/* ScaledOn brand, restrained: one gradient moment (hero), calm neutrals
   everywhere else. Quicksand. Tokens from client-presentation skill. */
:root {
  --so-pink: #ed4691;
  --so-orange: #f79253;
  --so-blue: #3f56cd;
  --so-grad: linear-gradient(135deg, #f79253 0%, #ed4691 100%);
  --positive: #1f9d55;
  --negative: #dc3545;
  --ink: #23263a;
  --ink-soft: #7a8093;
  --bg: #f7f7fa;
  --card: #ffffff;
  --line: #ebecf2;
  --shadow: 0 10px 40px rgba(35, 38, 58, .10), 0 2px 8px rgba(35, 38, 58, .05);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Quicksand", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
main { width: 100%; max-width: 720px; margin: 0 auto; padding: 0 24px 72px; flex: 1; }

/* ---- hero: the single gradient moment ---- */
.hero {
  text-align: center; margin: 0 calc(50% - 50vw); padding: 64px 24px 128px;
  background: var(--so-grad); color: #fff;
}
.wordmark {
  font-size: 17px; font-weight: 700; letter-spacing: .02em; margin-bottom: 40px;
  color: #fff; opacity: .95;
}
.badge {
  display: inline-block; background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .28); color: #fff;
  font-size: 11px; font-weight: 700; padding: 6px 14px; border-radius: 999px;
  margin-bottom: 22px; letter-spacing: .08em; text-transform: uppercase;
}
h1 {
  font-size: 36px; line-height: 1.18; margin: 0 auto 16px; font-weight: 700;
  max-width: 620px; letter-spacing: -.01em;
}
h1 span { white-space: nowrap; }
.sub {
  color: rgba(255, 255, 255, .9); font-size: 16px; margin: 0 auto; max-width: 520px;
  font-weight: 500;
}

/* ---- cards: docked into the hero ---- */
.card {
  background: var(--card); border-radius: 20px;
  padding: 36px; margin-top: 24px; box-shadow: var(--shadow);
}
main > .card:first-of-type,
main > #uploader, main > #results { margin-top: -64px; }
#results.hidden + #uploader { margin-top: -64px; }

.field { margin-bottom: 24px; }
.field-label { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.field-label span { color: var(--ink-soft); font-weight: 500; }

/* drop zones replace the native file input */
input[type=file] { display: none; }
.drop {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px; background: var(--bg);
  border: 1.5px dashed #d4d7e3; border-radius: 14px;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.drop:hover, .drop.dragover { border-color: var(--so-pink); background: #fdf3f8; }
.drop.has-file { border-style: solid; border-color: var(--positive); background: #f2faf5; }
.drop-icon {
  flex: none; width: 40px; height: 40px; border-radius: 10px;
  background: #fff; box-shadow: 0 1px 4px rgba(35, 38, 58, .10);
  display: flex; align-items: center; justify-content: center;
}
.drop-icon svg { width: 20px; height: 20px; stroke: var(--so-pink); }
.drop.has-file .drop-icon svg { stroke: var(--positive); }
.drop-text { font-size: 13.5px; color: var(--ink-soft); font-weight: 500; }
.drop-text b { color: var(--ink); font-weight: 700; }
.drop-file { display: none; font-size: 13.5px; font-weight: 700; color: var(--positive); }
.drop.has-file .drop-text { display: none; }
.drop.has-file .drop-file { display: block; overflow-wrap: anywhere; }

input[type=email] {
  flex: 1; padding: 13px 16px; background: #fff; border: 1.5px solid #d4d7e3;
  border-radius: 12px; color: var(--ink); font-size: 15px; font-family: inherit;
  transition: border-color .15s;
}
input[type=email]:focus { outline: none; border-color: var(--so-pink); }

button {
  width: 100%; padding: 16px; background: var(--so-grad); color: #fff; border: 0;
  border-radius: 12px; font-size: 15px; font-weight: 700; cursor: pointer; margin-top: 4px;
  font-family: inherit; letter-spacing: .01em;
  box-shadow: 0 6px 20px rgba(237, 70, 145, .30);
  transition: transform .12s, box-shadow .12s;
}
button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(237, 70, 145, .36); }
button:disabled { opacity: .55; cursor: default; box-shadow: none; }
.privacy { color: var(--ink-soft); font-size: 12px; text-align: center; margin: 16px 0 0; }
.err { color: var(--negative); font-size: 13px; margin: 10px 0 0; min-height: 1px; font-weight: 600; }
.hidden { display: none; }

/* helper accordions */
details.help { margin-top: 10px; font-size: 13px; }
details.help summary {
  cursor: pointer; color: var(--so-pink); font-size: 12.5px; font-weight: 700;
  list-style: none; display: inline-block;
}
details.help summary::before { content: "? "; opacity: .75; }
details.help summary::-webkit-details-marker { display: none; }
details.help[open] summary { margin-bottom: 8px; }
details.help ol {
  margin: 0; padding: 14px 16px 14px 32px; background: var(--bg);
  border-radius: 12px; color: #565c70;
}
details.help li { margin-bottom: 6px; }
details.help li:last-child { margin-bottom: 0; }
details.help b { color: var(--ink); font-weight: 700; }

/* ---- results ---- */
.stats { display: flex; gap: 14px; margin-bottom: 26px; }
.stats div {
  flex: 1; background: var(--bg); border-radius: 14px; padding: 18px 14px; text-align: center;
}
.stats b { display: block; font-size: 26px; font-weight: 700; color: var(--so-pink); letter-spacing: -.01em; }
.stats span { font-size: 11px; color: var(--ink-soft); font-weight: 600; letter-spacing: .02em; }

.teaser { border-top: 1px solid var(--line); padding-top: 22px; }
.teaser-label { font-size: 13px; color: var(--positive); font-weight: 700; margin-bottom: 12px; }
.rw { border-top: 1px solid var(--line); padding: 16px 0; }
.rw:first-child { border-top: 0; padding-top: 0; }
.rw-meta { font-size: 11px; color: var(--ink-soft); margin-bottom: 6px; letter-spacing: .05em; font-weight: 600; }
.rw-evidence { color: var(--positive); }
.old { color: #b9536a; text-decoration: line-through; font-size: 13px; margin-bottom: 8px; opacity: .8; }
.new { font-size: 16px; font-weight: 700; color: var(--ink); }
.new .ok { color: var(--positive); font-size: 12px; font-weight: 700; }
.ih { font-size: 13px; color: #565c70; margin-top: 6px; }
.ih .dim { color: var(--ink-soft); }

/* full audit table */
.tbl-h { font-size: 19px; margin: 34px 0 12px; font-weight: 700; letter-spacing: -.01em; }
.tblwrap {
  position: relative; overflow-x: auto; background: var(--card);
  border-radius: 20px; box-shadow: var(--shadow);
}
table.audit { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.audit th {
  text-align: left; padding: 14px 14px; color: var(--ink-soft); font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em; white-space: nowrap;
  border-bottom: 2px solid var(--line);
}
table.audit td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.audit tr:last-child td { border-bottom: 0; }
table.audit .ttl { max-width: 340px; }
table.audit .mono { font-family: ui-monospace, Menlo, monospace; font-size: 12px; white-space: nowrap; }
.bad { color: var(--negative); font-weight: 700; font-size: 11px; letter-spacing: .03em; }
.good { color: var(--positive); font-weight: 700; font-size: 11px; letter-spacing: .03em; }
tr.blur td { filter: blur(5px); user-select: none; pointer-events: none; }
.tbl-lock {
  position: sticky; bottom: 0; text-align: center; font-size: 13px; color: var(--ink);
  font-weight: 700; padding: 18px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #ffffff 50%);
}

/* email gate */
.gate { margin-top: 28px; background: var(--bg); border-radius: 16px; padding: 24px; }
.gate-h { font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.gate-row { display: flex; gap: 10px; }
.gate-row button { width: auto; margin-top: 0; white-space: nowrap; padding: 13px 22px; }
.done { color: var(--positive); font-size: 14px; font-weight: 700; }

/* ---- footer: quiet, pinned, thin brand accent ---- */
footer {
  margin-top: auto; text-align: center; color: var(--ink-soft);
  font-size: 12.5px; font-weight: 600; padding: 26px 20px 30px;
  border-top: 3px solid transparent;
  border-image: var(--so-grad) 1;
  background: #fff;
}
footer a { color: var(--so-pink); text-decoration: none; font-weight: 700; }
footer a:hover { text-decoration: underline; }

@media (max-width: 520px) {
  h1 { font-size: 27px; }
  .hero { padding: 44px 20px 108px; }
  .card { padding: 26px 22px; }
  .stats, .gate-row { flex-direction: column; }
}
