/* WackyStuff — flat, hard-edged, high-contrast layout. No gradients, no blur,
   no soft shadows, no rounded corners: borders and offset drop-shadows do all
   the work. Two accent colors (yellow/blue), used flatly, plus black on
   off-white paper. Headings are a bold uppercase grotesque; anything
   technical/live (status lines, progress, frame counters) is monospace. */

:root {
  --paper: #f2efe6;
  --ink: #111111;
  --panel: #ffffff;
  --yellow: #ffd400;
  --blue: #2b59ff;
  --red: #e8422f;
  --green: #1f9e56;
  --muted: #55524a;
  --border: 3px;
  --shadow: 6px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
}

/* ---------- nav ---------- */
#wacky-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: var(--border) solid var(--ink);
}

.wacky-nav-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.wacky-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

.wacky-brand .mark {
  display: inline-block;
  width: 16px;
  height: 16px;
  background: var(--yellow);
  border: 2px solid var(--ink);
}

.wacky-links {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.wacky-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 6px 10px;
  border: var(--border) solid transparent;
}

.wacky-links a:hover {
  border-color: var(--ink);
  background: var(--yellow);
}

/* ---------- layout ---------- */
main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px 72px;
}

h1 {
  font-size: 2.1rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 0 0 10px;
  line-height: 1.05;
}

.subtitle {
  color: var(--muted);
  margin-top: 0;
  max-width: 62ch;
  line-height: 1.5;
}

/* ---------- dashboard cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.card {
  display: block;
  position: relative;
  background: var(--panel);
  border: var(--border) solid var(--ink);
  box-shadow: var(--shadow) var(--shadow) 0 0 var(--ink);
  padding: 20px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0 0 var(--ink);
}

.card:active {
  transform: translate(1px, 1px);
  box-shadow: 3px 3px 0 0 var(--ink);
}

.card .card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.card .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  font-size: 0.85rem;
}

.card .tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 7px;
  border: 2px solid var(--ink);
  color: var(--ink);
}

.card h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.card p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  margin: 0;
}

/* ---------- tool pages ---------- */
.panel {
  background: var(--panel);
  border: var(--border) solid var(--ink);
  box-shadow: var(--shadow) var(--shadow) 0 0 var(--ink);
  padding: 24px;
  margin-bottom: 28px;
}

.panel h2 {
  margin-top: 0;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 1.15rem;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 10px;
}

.row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink);
  display: block;
  margin-bottom: 6px;
}

textarea, input[type="text"], select {
  width: 100%;
  background: var(--panel);
  border: 2px solid var(--ink);
  border-radius: 0;
  color: var(--ink);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.95rem;
}

textarea {
  min-height: 90px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

select {
  font-weight: 700;
}

button {
  background: var(--ink);
  color: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 0;
  padding: 10px 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
  font-size: 0.85rem;
  box-shadow: 4px 4px 0 0 var(--ink);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

button:hover:not(:disabled) {
  background: var(--yellow);
  color: var(--ink);
}

button:active:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 0 var(--ink);
}

button.secondary {
  background: var(--panel);
  color: var(--ink);
}

button.secondary:hover:not(:disabled) {
  background: var(--blue);
  color: var(--paper);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.dropzone {
  border: 2px dashed var(--ink);
  padding: 26px;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.dropzone.drag {
  border-style: solid;
  background: var(--yellow);
  color: var(--ink);
}

.qr-stage {
  display: flex;
  justify-content: center;
  padding: 18px;
  background: #fff;
  border: var(--border) solid var(--ink);
}

.qr-stage canvas {
  image-rendering: pixelated;
  max-width: 100%;
}

.video-wrap {
  position: relative;
  max-width: 420px;
}

video.scan-preview {
  display: block;
  width: 100%;
  max-width: 420px;
  background: #000;
  border: var(--border) solid var(--ink);
}

.scan-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--ink);
  color: var(--paper);
  border: 2px solid var(--yellow);
  padding: 4px 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 700;
}

.progress-track {
  width: 100%;
  height: 16px;
  background: var(--panel);
  border: 2px solid var(--ink);
  overflow: hidden;
  margin: 12px 0;
}

.progress-fill {
  height: 100%;
  background: var(--yellow);
  width: 0%;
  transition: width 0.2s ease;
}

.status-line {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  color: var(--muted);
}

.status-line.good { color: var(--green); font-weight: 700; }
.status-line.bad { color: var(--red); font-weight: 700; }

.note {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 8px;
}

.pill {
  display: inline-block;
  background: var(--panel);
  border: 2px solid var(--ink);
  padding: 3px 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink);
  margin-right: 6px;
}
