/* The Court of Sleaze. Deliberately not polished. */
:root {
  --paper: #f4e7c1;
  --paper-dark: #e7d49c;
  --ink: #1b1b1b;
  --red: #d7141a;
  --tape: #ffd400;
  --blue: #1d4ed8;
  --pink: #ff4fa3;
  --white: #fffdf6;
  --shadow: 5px 5px 0 var(--ink);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background:
    repeating-linear-gradient(0deg, transparent 0 27px, rgba(29, 78, 216, .12) 27px 28px),
    var(--paper);
  font: 18px/1.45 "Comic Neue", "Comic Sans MS", cursive;
  overflow-x: hidden;
}

a { color: var(--blue); }

/* ---------- crime scene tape ---------- */
.tape {
  background: repeating-linear-gradient(-45deg, var(--tape) 0 22px, var(--ink) 22px 44px);
  height: 16px;
}
.tape-text {
  background: var(--tape);
  border-block: 3px solid var(--ink);
  overflow: hidden;
  white-space: nowrap;
  font: 700 15px/1 "Anton", Impact, sans-serif;
  letter-spacing: .12em;
  padding: 7px 0;
}
.tape-text span {
  display: inline-block;
  padding-left: 100%;
  animation: crawl 28s linear infinite;
}
@keyframes crawl { to { transform: translateX(-100%); } }

/* ---------- header ---------- */
header.site {
  text-align: center;
  padding: 22px 16px 10px;
}
.logo {
  display: inline-block;
  font: 400 clamp(46px, 11vw, 104px)/.9 "Anton", Impact, sans-serif;
  text-transform: uppercase;
  color: var(--white);
  -webkit-text-stroke: 3px var(--ink);
  text-shadow: 6px 6px 0 var(--red);
  transform: rotate(-2deg);
  text-decoration: none;
  letter-spacing: .02em;
}
.logo .tld { color: var(--tape); }
.tagline {
  margin: 10px auto 0;
  font-family: "Special Elite", monospace;
  font-size: 17px;
}
.tagline mark { background: var(--pink); color: var(--white); padding: 0 6px; }

nav.site {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 16px 0 6px;
  padding: 0 16px;
}
nav.site a {
  font: 400 17px/1 "Anton", Impact, sans-serif;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  background: var(--white);
  border: 3px solid var(--ink);
  padding: 8px 12px;
  box-shadow: 3px 3px 0 var(--ink);
}
nav.site a:nth-child(odd) { transform: rotate(-1.5deg); }
nav.site a:nth-child(even) { transform: rotate(1.2deg); }
nav.site a:hover, nav.site a[aria-current] { background: var(--tape); }

main {
  max-width: 880px;
  margin: 0 auto;
  padding: 10px 16px 60px;
}

h1, h2 {
  font-family: "Anton", Impact, sans-serif;
  text-transform: uppercase;
  font-weight: 400;
  letter-spacing: .02em;
  line-height: 1;
}
h2.section {
  display: inline-block;
  font-size: clamp(28px, 6vw, 42px);
  background: var(--ink);
  color: var(--tape);
  padding: 6px 14px;
  margin: 38px 0 14px;
  transform: rotate(-1deg);
}

/* ---------- the case card ---------- */
.case {
  position: relative;
  background: var(--white);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow);
  padding: 18px 18px 16px;
  margin: 26px 0;
}
.case:nth-child(odd) { transform: rotate(-.6deg); }
.case:nth-child(even) { transform: rotate(.5deg); }

.case .docket {
  font: 13px/1 "Special Elite", monospace;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 2px dashed var(--ink);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.charge {
  font: 400 clamp(22px, 4.6vw, 32px)/1.05 "Anton", Impact, sans-serif;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 12px;
  padding-right: 110px;
}

.stamp {
  position: absolute;
  top: 52px;
  right: 12px;
  font: 400 20px/1 "Anton", Impact, sans-serif;
  letter-spacing: .08em;
  color: var(--red);
  border: 4px double var(--red);
  padding: 6px 8px;
  transform: rotate(12deg);
  opacity: .85;
  mix-blend-mode: multiply;
  background: rgba(215, 20, 26, .04);
}

/* fake tweets with the defendant blurred */
.tweet {
  border: 2px solid #cfd9de;
  border-radius: 14px;
  padding: 10px 12px;
  background: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.35;
}
.tweet + .tweet { margin-top: 6px; }
.tweet.context { background: #f7f9f9; color: #536471; font-size: 14px; }
.tweet .who {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 14px;
}
.tweet .avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: conic-gradient(#f59e0b, #ef4444, #8b5cf6, #06b6d4, #f59e0b);
  filter: blur(4px);
  flex: none;
}
.tweet .redacted {
  font-weight: 700;
  filter: blur(5px);
  user-select: none;
}
.tweet .label {
  margin-left: auto;
  font: 11px/1 "Special Elite", monospace;
  text-transform: uppercase;
  color: #536471;
}
.tweet .line { white-space: pre-wrap; word-wrap: break-word; }
.tweet.defendant { border-color: var(--red); border-width: 3px; }

.caption {
  font-size: 21px;
  font-weight: 700;
  margin: 14px 0 6px;
}
.sentence {
  font-family: "Special Elite", monospace;
  font-size: 15px;
  background: var(--paper);
  border-left: 5px solid var(--ink);
  padding: 8px 10px;
  margin: 10px 0;
}
.sentence b { text-transform: uppercase; }

.meter { margin: 12px 0 4px; font: 14px/1.2 "Special Elite", monospace; }
.meter .bar {
  height: 16px;
  border: 2px solid var(--ink);
  background: var(--white);
  margin-top: 4px;
}
.meter .fill {
  height: 100%;
  background: repeating-linear-gradient(-45deg, var(--pink) 0 8px, var(--red) 8px 16px);
}

.case .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; align-items: center; }
.demo-flag {
  font: 11px/1 "Special Elite", monospace;
  background: var(--ink);
  color: var(--tape);
  padding: 4px 6px;
}

/* hero: sleaze of the week */
.hero-case {
  border-width: 5px;
  box-shadow: 9px 9px 0 var(--red);
  transform: rotate(-1deg) !important;
}
.hero-case::before {
  content: "🏆 SLEAZE OF THE WEEK 🏆";
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  background: var(--tape);
  border: 3px solid var(--ink);
  font: 400 18px/1 "Anton", Impact, sans-serif;
  padding: 7px 12px;
  white-space: nowrap;
}

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-block;
  font: 400 19px/1 "Anton", Impact, sans-serif;
  text-transform: uppercase;
  letter-spacing: .03em;
  text-decoration: none;
  color: var(--ink);
  background: var(--tape);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 11px 16px;
  cursor: pointer;
}
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn.red { background: var(--red); color: var(--white); }
.btn.dark { background: var(--ink); color: var(--white); }
.btn.small { font-size: 15px; padding: 7px 11px; box-shadow: 3px 3px 0 var(--ink); }

form.paper {
  background: var(--white);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow);
  padding: 20px;
  transform: rotate(-.4deg);
}
label { display: block; font-weight: 700; margin: 14px 0 6px; }
label small { font-weight: 400; }
input[type="text"], input[type="url"], textarea {
  width: 100%;
  font: 18px "Special Elite", monospace;
  border: 3px solid var(--ink);
  background: var(--paper);
  padding: 10px;
}
textarea { min-height: 110px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.hp { position: absolute; left: -9999px; }

.notice {
  border: 3px dashed var(--ink);
  background: var(--white);
  padding: 14px 16px;
  margin: 18px 0;
}
.notice.ok { background: #d9f99d; }
.notice.err { background: #fecaca; }

/* ---------- misc blocks ---------- */
.blurb {
  font-family: "Special Elite", monospace;
  background: var(--white);
  border: 3px solid var(--ink);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.generator {
  text-align: center;
  background: var(--ink);
  color: var(--white);
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 var(--pink);
  padding: 22px 16px;
  transform: rotate(.6deg);
}
.generator .out {
  font: 400 clamp(24px, 5vw, 36px)/1.1 "Anton", Impact, sans-serif;
  color: var(--tape);
  text-transform: uppercase;
  margin: 12px 0 6px;
  min-height: 1.1em;
}
.generator .sub { font-family: "Special Elite", monospace; margin-bottom: 16px; }

.tabs { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0 4px; }
.tabs button { font: inherit; }
.tabs .btn[aria-pressed="true"] { background: var(--ink); color: var(--tape); }

table.board {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow);
  font-family: "Special Elite", monospace;
}
table.board th, table.board td { border: 2px solid var(--ink); padding: 8px 10px; text-align: left; }
table.board th { background: var(--tape); font-family: "Anton", Impact, sans-serif; font-weight: 400; text-transform: uppercase; }
table.board td.num { text-align: right; }

ol.rules li { margin: 10px 0; }
.big-status {
  font: 400 clamp(40px, 10vw, 80px)/1 "Anton", Impact, sans-serif;
  color: var(--red);
  border: 6px double var(--red);
  display: inline-block;
  padding: 8px 18px;
  transform: rotate(-6deg);
  margin: 20px 0;
}

footer.site {
  text-align: center;
  font: 14px/1.5 "Special Elite", monospace;
  padding: 26px 16px 40px;
}
footer.site p { max-width: 640px; margin: 6px auto; }

@media (max-width: 560px) {
  body { font-size: 17px; }
  .charge { padding-right: 0; margin-top: 32px; }
  .stamp { top: 44px; font-size: 16px; }
  .case { padding: 14px 12px; }
}
