/* Skill Tester. MPiFY brand: dark surfaces, lime for actions and focus, verdict colours for status only. */
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("fonts/barlow-condensed-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("fonts/barlow-condensed-700.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 400 700; font-display: swap; src: url("fonts/manrope.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400 500; font-display: swap; src: url("fonts/jetbrains-mono.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --bg: #111111;
  --surface: #1a1a1a;
  --surface-2: #222222;
  --sunken: #0b0b0b;
  --border: #2e2e2e;
  --text: #e8e8e8;
  --muted: #a3a3a3;
  --faint: #777777;
  --lime: #ecff0c;
  --lime-h: #d4e60a;
  --purple: #7535ed;
  --red: #ef4444;
  --red-soft: rgba(239, 68, 68, 0.14);
  --red-text: #ff9b9b;
  --amber: #eab308;
  --amber-soft: rgba(234, 179, 8, 0.14);
  --amber-text: #f6d35c;
  --green: #22c55e;
  --green-soft: rgba(34, 197, 94, 0.13);
  --green-text: #6ee79a;
  --font-head: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 12px;
  --radius-s: 8px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--text); text-decoration-color: var(--faint); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--lime); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; border-radius: 4px; }
code, pre, .mono { font-family: var(--font-mono); font-size: 0.86em; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1; margin: 0; text-wrap: balance; }
p { margin: 0; }

.page { max-width: 1040px; margin: 0 auto; padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { height: 20px; width: auto; display: block; }
.brand .product { font-family: var(--font-head); font-weight: 700; font-size: 1.35rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--lime); padding-left: 14px; border-left: 1px solid var(--border); line-height: 1; }
.top nav { display: flex; gap: 20px; font-size: 0.92rem; }
.top nav a { text-decoration: none; color: var(--muted); }
.top nav a:hover { color: var(--text); }

/* hero and form */
.hero { padding-block: 56px 28px; display: grid; gap: 20px; }
.eyebrow { font-weight: 600; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.hero h1 { font-size: clamp(2.7rem, 8vw, 5.4rem); text-transform: uppercase; letter-spacing: 0.005em; max-width: 13ch; }
.hero h1 .mark { background: var(--lime); color: #000; padding: 0 0.12em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 60ch; }
.lede strong { color: var(--text); font-weight: 600; }

.checker { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; display: grid; gap: 14px; }
.checker label.field { font-weight: 600; font-size: 0.9rem; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row input[type="text"] { flex: 1 1 320px; min-width: 0; height: 56px; padding: 0 16px; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-s); font: 400 1rem var(--font-mono); }
.row input[type="text"]::placeholder { color: var(--faint); }
.row input[type="text"]:focus { outline: none; border-color: var(--lime); box-shadow: 0 0 0 1px var(--lime); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 56px; padding: 0 26px; border-radius: var(--radius-s); border: 0; font: 700 1rem var(--font-body); cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--lime); color: #000; }
.btn-primary:hover { background: var(--lime-h); }
.btn-primary[disabled] { opacity: 0.6; cursor: progress; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); height: 42px; padding: 0 16px; font-weight: 600; font-size: 0.92rem; }
.btn-ghost:hover { color: var(--text); border-color: var(--faint); }
.alt { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 0.92rem; }
.alt input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.alt .chosen { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text); }
.examples { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--faint); font-size: 0.85rem; }
.chip { font: 400 0.8rem var(--font-mono); color: var(--muted); background: transparent; border: 1px solid var(--border); border-radius: 6px; padding: 4px 9px; cursor: pointer; }
.chip:hover { color: var(--text); border-color: var(--faint); }
.error { background: var(--red-soft); color: var(--red-text); border: 1px solid rgba(239, 68, 68, 0.35); border-radius: var(--radius-s); padding: 12px 14px; font-weight: 500; }
.fine { color: var(--faint); font-size: 0.85rem; }

/* what we look for */
.look { padding-block: 40px 16px; display: grid; gap: 20px; }
.look h2, .section-title { font-size: 1.9rem; text-transform: uppercase; letter-spacing: 0.01em; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: grid; gap: 6px; align-content: start; }
.tile h3 { font-family: var(--font-body); font-weight: 700; font-size: 1rem; line-height: 1.3; display: flex; gap: 10px; align-items: baseline; }
.tile h3::before { content: ""; width: 8px; height: 8px; background: var(--lime); flex: none; transform: translateY(-1px); }
.tile p { color: var(--muted); font-size: 0.93rem; }

/* report */
.report-head { padding-block: 40px 20px; display: grid; gap: 12px; }
.report-head h1 { font-size: clamp(2rem, 5.5vw, 3.4rem); text-transform: none; word-break: break-word; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 0.9rem; align-items: center; }
.meta .mono { color: var(--text); }
.summary { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.count { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.count i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.count.red i { background: var(--red); } .count.amber i { background: var(--amber); } .count.clear i { background: var(--green); }

.status-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; display: grid; gap: 14px; margin-block: 8px 40px; }
.status-box h2 { font-size: 1.7rem; text-transform: uppercase; }
.bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--lime); width: 6%; transition: width 0.4s ease; }

.skills { display: grid; gap: 16px; padding-bottom: 40px; }
.skill { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: var(--radius); padding: 20px 22px; display: grid; gap: 14px; min-width: 0; }
.skill.red { border-left-color: var(--red); } .skill.amber { border-left-color: var(--amber); } .skill.clear { border-left-color: var(--green); }
.skill-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px 16px; }
.skill-head h2 { font-size: 1.75rem; letter-spacing: 0.01em; word-break: break-word; }
.skill-head .path { font-family: var(--font-mono); font-size: 0.8rem; color: var(--faint); margin-top: 6px; word-break: break-all; }
.pill { display: inline-flex; align-items: center; gap: 8px; border-radius: 6px; padding: 6px 10px; font-weight: 700; font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.pill.red { background: var(--red-soft); color: var(--red-text); }
.pill.amber { background: var(--amber-soft); color: var(--amber-text); }
.pill.clear { background: var(--green-soft); color: var(--green-text); }
.desc { color: var(--muted); font-size: 0.95rem; max-width: 80ch; }

.findings { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.finding { display: grid; gap: 4px; padding: 12px 14px; background: var(--sunken); border: 1px solid var(--border); border-radius: var(--radius-s); min-width: 0; }
.finding .title { font-weight: 700; display: flex; gap: 10px; align-items: baseline; }
.finding .title::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; transform: translateY(-1px); }
.finding.red .title::before { background: var(--red); }
.finding.amber .title::before { background: var(--amber); }
.finding .why { color: var(--muted); font-size: 0.92rem; }
.finding .where { font-family: var(--font-mono); font-size: 0.78rem; color: var(--faint); }
.finding pre { margin: 4px 0 0; padding: 8px 10px; background: #000; border-radius: 6px; color: #d9d9d9; white-space: pre-wrap; word-break: break-word; overflow-x: auto; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 10px 18px; margin: 0; }
.facts div { min-width: 0; }
.facts dt { color: var(--faint); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }
.facts dd { margin: 2px 0 0; font-size: 0.9rem; word-break: break-word; }
.facts dd .mono { font-size: 0.8rem; }

details.scanner { border-top: 1px solid var(--border); padding-top: 12px; }
details.scanner summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: 0.92rem; }
details.scanner[open] summary { margin-bottom: 12px; }
.scanner-note { color: var(--faint); font-size: 0.88rem; margin-bottom: 10px; max-width: 80ch; }
.cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.cat { font-size: 0.78rem; border: 1px solid var(--border); border-radius: 6px; padding: 3px 8px; color: var(--muted); }
.cat.harmless { color: var(--faint); border-style: dashed; }
.spector { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.spector li { display: grid; gap: 3px; font-size: 0.88rem; min-width: 0; }
.spector .tag { font-size: 0.72rem; color: var(--faint); border: 1px dashed var(--border); border-radius: 4px; padding: 0 6px; margin-left: 6px; }
.spector pre { margin: 0; padding: 6px 8px; background: #000; border-radius: 6px; white-space: pre-wrap; word-break: break-word; color: #cfcfcf; }

.folder { display: grid; gap: 8px; padding-top: 6px; }
.folder-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.folder-head .mono { font-weight: 500; color: var(--text); word-break: break-all; }
.many form, .folder-head form { margin: 0; }
.which { color: var(--muted); font-size: 0.92rem; }
.which summary { cursor: pointer; font-weight: 600; color: var(--text); width: fit-content; }
.which[open] summary { margin-bottom: 10px; }
.which ol { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 4px; }
.which p { margin-top: 8px; }
.which code { color: var(--text); word-break: break-all; }
.many { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.many li { display: flex; justify-content: space-between; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-s); padding: 10px 14px; min-width: 0; }
.many li span { min-width: 0; word-break: break-all; }

/* prose pages */
.prose { padding-block: 48px; display: grid; gap: 18px; max-width: 72ch; }
.prose h1 { font-size: clamp(2.4rem, 6vw, 3.8rem); text-transform: uppercase; }
.prose h2 { font-size: 1.6rem; text-transform: uppercase; margin-top: 18px; }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--text); }
.prose ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }

/* footer */
.foot { border-top: 1px solid var(--border); margin-top: 32px; padding-block: 24px 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--faint); font-size: 0.85rem; }
.foot p { max-width: 70ch; }

@media (max-width: 560px) {
  .hero { padding-top: 32px; }
  .btn-primary { flex: 1 1 100%; }
  .top nav { gap: 14px; }
  .brand .product { font-size: 1.15rem; }
  .row input[type="text"] { font-size: 0.92rem; }
}
@media (prefers-reduced-motion: reduce) { .bar span { transition: none; } }
