:root {
  --desk: #5a3021;
  --desk-dark: #2e1712;
  --paper: #f1ddb0;
  --paper-light: #fff8e7;
  --ink: #211a15;
  --muted: #695b4b;
  --red: #a02b22;
  --orange: #f27616;
  --orange-light: #ffad28;
  --blue: #1c3157;
  --line: rgba(52, 35, 24, 0.32);
  --shadow: 0 18px 45px rgba(25, 10, 4, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 201, 98, 0.12), transparent 24rem),
    linear-gradient(135deg, var(--desk), var(--desk-dark));
  font-family: "Courier New", Courier, monospace;
  line-height: 1.45;
}

button,
a {
  font: inherit;
}

button,
a,
.folder-tab {
  -webkit-tap-highlight-color: transparent;
}

.desk-noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.24;
  background-image:
    repeating-linear-gradient(91deg, transparent 0 58px, rgba(255,255,255,0.025) 59px, transparent 61px),
    repeating-linear-gradient(4deg, transparent 0 13px, rgba(0,0,0,0.035) 14px, transparent 16px);
}

.agency-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 10px clamp(16px, 4vw, 58px);
  color: #f7eacb;
  background: rgba(38, 20, 15, 0.94);
  border-bottom: 2px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
}

.agency-mark {
  display: flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  letter-spacing: 0.06em;
}

.agency-mark small {
  display: block;
  margin-top: 1px;
  color: #bda98a;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
}

.agency-seal {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #2d1912;
  background: #edc66f;
  border: 2px solid #edc66f;
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px #2d1912, inset 0 0 0 5px #edc66f;
  font-family: Georgia, serif;
  font-size: 1.35rem;
  font-weight: 800;
}

.case-status {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 700;
}

.status-dot {
  width: 9px;
  height: 9px;
  background: #eb563f;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(235,86,63,0.13);
}

.folder-tabs {
  position: relative;
  z-index: 5;
  display: flex;
  width: min(1180px, calc(100% - 32px));
  margin: 30px auto -1px;
  padding-left: 22px;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.folder-tabs::-webkit-scrollbar {
  display: none;
}

.folder-tab {
  flex: 0 0 auto;
  padding: 12px 20px 10px;
  color: #39271d;
  background: #c5a76d;
  border: 1px solid rgba(29,19,12,0.38);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.folder-tab.is-active,
.folder-tab:hover {
  background: var(--paper);
  transform: translateY(-2px);
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.case-folder,
.market-sheet,
.transmission-sheet {
  position: relative;
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(80,56,30,0.05) 1px, transparent 1px),
    radial-gradient(circle at 17% 22%, rgba(255,255,255,0.7), transparent 20rem);
  background-size: 100% 28px, auto;
  border: 1px solid rgba(28,18,12,0.44);
  box-shadow: var(--shadow);
}

.case-folder {
  min-height: 720px;
  padding: clamp(24px, 5vw, 62px);
}

.case-folder::before,
.market-sheet::before,
.transmission-sheet::before {
  content: "";
  position: absolute;
  inset: 7px;
  pointer-events: none;
  border: 1px solid rgba(61,40,23,0.11);
}

.paperclip {
  position: absolute;
  top: 32px;
  right: 70px;
  width: 18px;
  height: 72px;
  border: 3px solid #81786d;
  border-radius: 11px;
  transform: rotate(12deg);
  opacity: 0.75;
}

.paperclip::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 4px;
  width: 8px;
  height: 50px;
  border: 2px solid #81786d;
  border-radius: 9px;
}

.classification-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-right: 95px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.case-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin: 42px 0 48px;
  padding-bottom: 24px;
  border-bottom: 3px double var(--ink);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 8vw, 6.8rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.84;
}

h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 4vw, 3rem);
  line-height: 1;
}

.ticker-line {
  display: flex;
  gap: 18px;
  align-items: center;
  color: var(--red);
  font-size: clamp(1rem, 3vw, 1.55rem);
  font-weight: 800;
}

.case-number {
  flex: 0 0 auto;
  width: 108px;
  padding: 10px;
  text-align: center;
  border: 3px solid var(--ink);
  transform: rotate(1.5deg);
}

.case-number small,
.case-number strong {
  display: block;
}

.case-number small {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
}

.case-number strong {
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 3.7rem;
  line-height: 1;
}

.stamp {
  display: inline-block;
  color: var(--red);
  border: 3px solid currentColor;
  border-radius: 3px;
  font-family: Impact, "Arial Black", sans-serif;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  transform: rotate(-3deg);
  opacity: 0.8;
  mix-blend-mode: multiply;
}

.stamp-small {
  padding: 5px 8px 4px;
  font-size: 0.72rem;
}

.stamp-large {
  margin: 5px 0 28px;
  padding: 9px 12px 7px;
  font-size: 1.15rem;
  transform: rotate(3deg);
}

.evidence-grid {
  display: grid;
  grid-template-columns: minmax(300px, 1.04fr) minmax(300px, 0.96fr);
  gap: clamp(30px, 6vw, 80px);
  align-items: start;
}

.evidence-photo {
  position: relative;
  margin: 0;
  padding: 13px 13px 42px;
  background: #fffdf7;
  border: 1px solid #a7957a;
  box-shadow: 7px 9px 0 rgba(82,54,26,0.15), 0 14px 35px rgba(58,36,16,0.18);
  transform: rotate(-1.3deg);
}

.evidence-photo.is-shaking {
  animation: folder-shake 0.34s ease both;
}

.photo-stage {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  background: #f6ecd6;
  border: 1px solid #c5b69f;
}

.photo-stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.evidence-photo figcaption {
  position: absolute;
  right: 13px;
  bottom: 12px;
  left: 13px;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
}

.photo-tape {
  position: absolute;
  z-index: 3;
  top: -20px;
  width: 94px;
  height: 37px;
  background: rgba(218,196,142,0.72);
  border: 1px solid rgba(126,103,61,0.22);
}

.tape-left {
  left: -24px;
  transform: rotate(-28deg);
}

.tape-right {
  right: -24px;
  transform: rotate(24deg);
}

.field-notes {
  padding-top: 8px;
}

.field-notes > p {
  max-width: 52ch;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.04rem;
}

.facts {
  margin: 30px 0;
  border-top: 1px solid var(--line);
}

.facts div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.facts dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.facts dd {
  margin: 0;
  font-weight: 700;
}

.hair-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.cheeto-button,
.crumb-button,
.paper-button {
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.cheeto-button {
  padding: 15px 18px;
  color: #29140a;
  background: var(--orange-light);
  border: 3px solid var(--ink);
  border-radius: 2px;
  box-shadow: 5px 5px 0 var(--ink);
  font-weight: 900;
}

.cheeto-button:hover,
.cheeto-button:focus-visible {
  transform: translate(-2px, -2px) rotate(-1deg);
  box-shadow: 7px 7px 0 var(--ink);
}

.cheeto-button:active {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--ink);
}

.crumb-button {
  color: var(--muted);
  background: none;
  border: 0;
  border-bottom: 1px dotted currentColor;
  font-size: 0.72rem;
}

.evidence-counter {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.72rem !important;
}

.extra-cheetos,
.crumb-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cheeto-piece {
  position: absolute;
  top: var(--piece-y);
  left: var(--piece-x);
  width: clamp(44px, 10vw, 88px);
  height: clamp(13px, 3vw, 23px);
  background:
    radial-gradient(circle at 25% 35%, #ffbd2f 0 3%, transparent 4%),
    radial-gradient(circle at 65% 60%, #a93a0b 0 3%, transparent 4%),
    linear-gradient(#ff9b15, #dc4d08);
  border: 2px solid #481d09;
  border-radius: 45% 55% 48% 52%;
  box-shadow: inset 0 0 0 2px rgba(255,184,35,0.32), 2px 3px 0 rgba(58,20,5,0.28);
  transform: rotate(var(--piece-r));
  animation: cheeto-drop 0.42s cubic-bezier(.2,.9,.25,1.25) var(--piece-delay) both;
}

.crumb {
  position: absolute;
  top: 28%;
  left: var(--crumb-x);
  width: 7px;
  height: 7px;
  background: var(--orange);
  border: 1px solid #6b2406;
  border-radius: 48% 52% 35% 65%;
  animation: crumb-fall 1.2s ease-in var(--crumb-delay) both;
}

.contract-strip {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-top: 58px;
  padding: 20px;
  color: #f9eed5;
  background: #2d2722;
  border: 3px solid #15110e;
  transform: rotate(0.2deg);
}

.contract-strip .label {
  display: block;
  margin-bottom: 8px;
  color: #c1ad8a;
  font-size: 0.67rem;
  letter-spacing: 0.12em;
}

.redaction {
  position: relative;
  max-width: min(620px, 65vw);
  padding: 8px 14px;
  overflow: hidden;
  color: #fff;
  background: #050505;
  border: 0;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.redaction::after {
  content: "";
  position: absolute;
  inset: 6px 2px;
  background: repeating-linear-gradient(-4deg, transparent 0 2px, rgba(255,255,255,0.08) 3px 4px);
}

.redaction.is-revealed {
  color: var(--ink);
  background: var(--paper-light);
}

.redaction.is-revealed::after {
  display: none;
}

.contract-action {
  color: #b7a58a;
  font-size: 0.67rem;
}

.market-sheet,
.transmission-sheet {
  margin-top: 44px;
  padding: clamp(24px, 5vw, 54px);
}

.market-sheet {
  transform: rotate(0.25deg);
}

.transmission-sheet {
  margin-bottom: 52px;
  background-color: #ead09a;
  transform: rotate(-0.22deg);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--ink);
}

.section-header h2 {
  margin-bottom: 0;
}

.hand-note {
  font-family: "Comic Sans MS", "Bradley Hand", cursive;
  font-size: 1.1rem;
  transform: rotate(3deg);
}

.chart-shell {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  background: #141a1d;
  border: 4px solid var(--ink);
  box-shadow: inset 0 0 0 1px #6f786e;
}

#dexFrame {
  width: 100%;
  min-height: 510px;
  border: 0;
}

.chart-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  padding: 24px;
  color: #bdc9bb;
  text-align: center;
  background:
    linear-gradient(rgba(106,137,124,.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(106,137,124,.14) 1px, transparent 1px),
    #141a1d;
  background-size: 38px 38px;
}

.chart-placeholder[hidden] {
  display: none;
}

.chart-placeholder strong {
  margin-top: 24px;
  color: #f3deac;
}

.chart-placeholder p {
  margin: 8px 0 0;
  font-size: 0.78rem;
}

.fake-chart {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 11px;
  height: 100px;
}

.fake-chart span {
  width: 18px;
  height: 30%;
  background: var(--orange);
  border: 1px solid #ffb44e;
}

.fake-chart span:nth-child(2) { height: 58%; }
.fake-chart span:nth-child(3) { height: 42%; }
.fake-chart span:nth-child(4) { height: 76%; }
.fake-chart span:nth-child(5) { height: 51%; }
.fake-chart span:nth-child(6) { height: 91%; }

.paper-button {
  display: inline-block;
  margin-top: 18px;
  padding: 13px 17px;
  color: #f8e7c4;
  background: #24201c;
  border: 2px solid #0c0a08;
  box-shadow: 4px 4px 0 #8a7252;
  font-weight: 800;
  text-decoration: none;
}

.paper-button:hover,
.paper-button:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #8a7252;
}

.transmission-copy {
  max-width: 70ch;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
}

.x-evidence {
  margin-top: 46px;
  padding-top: 30px;
  border-top: 3px double var(--ink);
}

.x-evidence-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.x-evidence-heading h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  line-height: 1;
}

.x-posts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.x-post-entry {
  position: relative;
  min-width: 0;
  min-height: 190px;
  padding: 34px 18px 18px;
  overflow: hidden;
  background: rgba(255, 248, 231, 0.72);
  border: 2px solid var(--ink);
  box-shadow: 6px 7px 0 rgba(50, 32, 18, 0.28);
}

.x-post-entry:nth-child(even) {
  transform: rotate(0.7deg);
}

.exhibit-label {
  position: absolute;
  top: 10px;
  left: 12px;
  color: var(--red);
  font-size: 0.69rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.x-post-entry .twitter-tweet,
.x-post-entry .twitter-tweet-rendered {
  width: 100% !important;
  max-width: 550px !important;
  margin: 0 auto !important;
}

.x-post-entry blockquote {
  margin: 20px 0 0;
}

.x-post-entry blockquote a {
  display: block;
  padding: 26px 18px;
  color: var(--ink);
  background: var(--paper-light);
  border: 1px dashed var(--muted);
  font-weight: 800;
  text-align: center;
}

.x-posts.embed-failed .x-post-entry {
  min-height: 130px;
}

.x-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 26px;
  color: var(--muted);
  border: 1px dashed currentColor;
  text-align: center;
}

.link-files {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 30px;
}

.link-file {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  min-height: 98px;
  padding: 16px;
  color: var(--ink);
  background: var(--paper-light);
  border: 2px solid var(--ink);
  box-shadow: 5px 6px 0 rgba(50,32,18,0.38);
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.link-file:nth-child(2) {
  transform: rotate(0.8deg);
}

.link-file:nth-child(3) {
  transform: rotate(-0.7deg);
}

.link-file:hover,
.link-file:focus-visible {
  transform: translateY(-5px) rotate(-1deg);
  box-shadow: 8px 11px 0 rgba(50,32,18,0.32);
}

.link-file small,
.link-file b {
  display: block;
}

.link-file small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.66rem;
}

.link-file i {
  font-style: normal;
  font-size: 1.5rem;
}

.file-code {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: #fff;
  background: var(--blue);
  border-radius: 50%;
  font-weight: 900;
}

.twitter .file-code { background: #171717; }
.pump .file-code { background: var(--orange); color: #2a1608; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 4px 38px;
  color: #cbbba1;
  font-size: 0.72rem;
}

footer a {
  color: #f4d48e;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  max-width: calc(100% - 36px);
  padding: 12px 16px;
  color: #f8e9c8;
  background: #251712;
  border: 2px solid #f4c866;
  box-shadow: 6px 7px 0 rgba(0,0,0,0.3);
  font-size: 0.78rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0) rotate(-1deg);
}

@keyframes cheeto-drop {
  from { opacity: 0; transform: translateY(-60px) rotate(calc(var(--piece-r) - 35deg)) scale(.6); }
  to { opacity: 1; transform: translateY(0) rotate(var(--piece-r)) scale(1); }
}

@keyframes crumb-fall {
  0% { opacity: 0; transform: translate(0, -5px) rotate(0); }
  12% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--crumb-drift), 320px) rotate(420deg); }
}

@keyframes folder-shake {
  0%, 100% { transform: rotate(-1.3deg) translateX(0); }
  25% { transform: rotate(-2deg) translateX(-5px); }
  55% { transform: rotate(.2deg) translateX(5px); }
  78% { transform: rotate(-1.8deg) translateX(-2px); }
}

@media (max-width: 820px) {
  .evidence-grid {
    grid-template-columns: 1fr;
  }

  .evidence-photo {
    width: min(580px, 100%);
    margin-inline: auto;
  }

  .link-files {
    grid-template-columns: 1fr;
  }

  .x-posts {
    grid-template-columns: 1fr;
  }

  .case-heading {
    align-items: center;
  }

  .contract-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .redaction {
    max-width: calc(100vw - 104px);
  }
}

@media (max-width: 560px) {
  .agency-bar {
    min-height: 60px;
  }

  .agency-mark b {
    display: block;
    max-width: 210px;
    font-size: 0.75rem;
  }

  .agency-mark small,
  .case-status {
    display: none;
  }

  .agency-seal {
    width: 36px;
    height: 36px;
  }

  .folder-tabs,
  main,
  footer {
    width: calc(100% - 18px);
  }

  .folder-tabs {
    margin-top: 18px;
    padding-left: 8px;
  }

  .folder-tab {
    padding: 10px 13px 9px;
    font-size: 0.65rem;
  }

  .case-folder,
  .market-sheet,
  .transmission-sheet {
    padding: 22px 16px;
  }

  .classification-row {
    display: block;
    padding-right: 48px;
  }

  .classification-row span {
    display: block;
    margin-bottom: 4px;
  }

  .paperclip {
    top: 24px;
    right: 28px;
    height: 54px;
  }

  .paperclip::after {
    height: 36px;
  }

  .case-heading {
    align-items: flex-start;
    margin: 32px 0 38px;
  }

  h1 {
    font-size: clamp(2.8rem, 16vw, 4.6rem);
  }

  .case-number {
    width: 70px;
  }

  .case-number strong {
    font-size: 2.4rem;
  }

  .ticker-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .facts div {
    grid-template-columns: 96px 1fr;
  }

  .cheeto-button {
    width: 100%;
  }

  .chart-shell {
    min-height: 310px;
  }

  .section-header {
    align-items: flex-start;
  }

  .hand-note {
    display: none;
  }

  .x-evidence-heading {
    align-items: flex-start;
  }

  .x-post-entry {
    padding-inline: 8px;
  }

  footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
