:root {
  --ink: #171715;
  --paper: #e9e3d5;
  --red: #df331f;
  --muted: #736f66;
  --line: rgba(23, 23, 21, .28);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Mono", monospace;
  overflow-x: hidden;
}

button, input, select { font: inherit; }
button { color: inherit; }

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .12;
  z-index: 10;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.25'/%3E%3C/svg%3E");
}

.site-header {
  min-height: 76px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 12px 28px;
  border-bottom: 2px solid var(--ink);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font: 14px/1 "Archivo Black", sans-serif;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--paper);
  background: var(--ink);
  border-radius: 50%;
  letter-spacing: -2px;
}

.bureau, .status { font-size: 12px; font-weight: 500; letter-spacing: .08em; }
.status { justify-self: end; }
.status i { display: inline-block; width: 8px; height: 8px; margin-right: 7px; background: var(--red); border-radius: 50%; animation: blink 1.8s steps(2) infinite; }

main { min-height: calc(100vh - 76px); }

.intake {
  width: min(900px, calc(100% - 40px));
  min-height: calc(100vh - 76px);
  margin: 0 auto;
  padding: 82px 0 60px;
  position: relative;
}

.case-tab {
  position: absolute;
  top: 0;
  right: 0;
  padding: 9px 14px;
  color: var(--paper);
  background: var(--ink);
  font-size: 12px;
}

.mode-switch {
  display: inline-flex;
  margin-bottom: 34px;
  border: 1.5px solid var(--ink);
}

.mode-button {
  min-height: 42px;
  padding: 0 15px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-right: 1.5px solid var(--ink);
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .06em;
}

.mode-button:last-child { border-right: 0; }
.mode-button.active { color: var(--paper); background: var(--ink); }
.mode-button:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.mode-panel[hidden] { display: none; }

.greet-shortcut {
  width: 100%;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: -14px 0 24px;
  padding: 14px 18px;
  color: white;
  background: var(--red);
  border: 2px solid var(--ink);
  cursor: pointer;
  text-align: left;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform .15s, box-shadow .15s;
}

.greet-shortcut span { font-size: 11px; letter-spacing: .08em; }
.greet-shortcut strong { font: 15px "Archivo Black", sans-serif; }
.greet-shortcut:hover, .greet-shortcut:focus-visible { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }

.eyebrow, .section-label {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
}

h1 {
  max-width: 900px;
  margin: 0;
  font: clamp(3.4rem, 9.2vw, 7.8rem)/.82 "Archivo Black", sans-serif;
  letter-spacing: -.075em;
}

h1 em { color: var(--red); font-style: normal; }

.lede {
  width: min(620px, 100%);
  margin: 34px 0 42px;
  font-size: 17px;
  line-height: 1.55;
}

form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 2px solid var(--ink);
  border-left: 2px solid var(--ink);
}

label {
  display: flex;
  flex-direction: column;
  min-height: 112px;
  padding: 17px 18px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

label span { margin-bottom: 16px; color: var(--muted); font-size: 11px; letter-spacing: .1em; }

input, select {
  width: 100%;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 21px;
  font-weight: 500;
  border-radius: 0;
}

input:focus, select:focus { box-shadow: 0 3px 0 var(--red); }
input[type="date"] { min-height: 28px; }
select { min-height: 30px; border-radius: 0; cursor: pointer; }

form button {
  grid-column: 1 / -1;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  color: var(--paper);
  background: var(--ink);
  border: 0;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  cursor: pointer;
  font: 17px "Archivo Black", sans-serif;
  letter-spacing: .03em;
  transition: background .2s, color .2s;
}

form button:hover, form button:focus-visible { color: white; background: var(--red); }
form button b { font-size: 34px; transition: transform .2s; }
form button:hover b { transform: translateX(6px); }
.fineprint { color: var(--muted); font-size: 10px; letter-spacing: .08em; }

.report-shell {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 64px;
}

.report-shell[hidden] { display: none; }
.report-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 16px; }
.report-actions > div { display: flex; gap: 10px; }
.text-button, .share-button { min-height: 44px; border: 1.5px solid var(--ink); padding: 0 15px; background: transparent; font-size: 12px; font-weight: 500; cursor: pointer; }
.text-button:hover { background: rgba(23,23,21,.08); }
.share-button { color: var(--paper); background: var(--red); border-color: var(--red); }
.share-button:hover { background: var(--ink); border-color: var(--ink); }
.copy-status { margin: -7px 0 14px; color: var(--red); font-size: 11px; font-weight: 500; text-align: right; letter-spacing: .05em; }
.copy-status[hidden] { display: none; }

.report-card {
  position: relative;
  padding: 30px;
  background: #f2eddf;
  border: 2px solid var(--ink);
  box-shadow: 10px 10px 0 var(--ink);
  overflow: hidden;
}

.report-card::before {
  content: "CASE FILE";
  position: absolute;
  top: 45%;
  left: -92px;
  transform: rotate(-90deg);
  color: rgba(223,51,31,.08);
  font: 86px "Archivo Black", sans-serif;
  white-space: nowrap;
}

.paper-topline { display: flex; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid var(--ink); font-size: 10px; letter-spacing: .08em; }
.report-title-row { display: flex; justify-content: space-between; align-items: stretch; padding: 25px 0; }
.report-title-row p { margin: 0 0 5px; color: var(--red); font-size: 11px; font-weight: 500; letter-spacing: .12em; }
h2 { margin: 0; font: clamp(2.6rem, 7vw, 5.7rem)/.83 "Archivo Black", sans-serif; letter-spacing: -.065em; }

.mugshot { position: relative; width: 190px; min-height: 155px; display: grid; place-items: center; border: 1.5px solid var(--ink); overflow: hidden; }
.mugshot span { position: relative; z-index: 2; font: 64px "Archivo Black", sans-serif; letter-spacing: -.08em; }
.height-lines { position: absolute; inset: 12px; background: repeating-linear-gradient(to bottom, transparent 0, transparent 25px, rgba(23,23,21,.25) 26px, transparent 27px); }

.identity-grid { display: grid; grid-template-columns: 2fr 1.4fr 1.2fr 1fr; margin: 0; border-top: 1.5px solid var(--ink); border-left: 1.5px solid var(--ink); }
.identity-grid div { min-width: 0; padding: 12px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
dt { color: var(--muted); font-size: 9px; letter-spacing: .1em; }
dd { margin: 8px 0 0; overflow-wrap: anywhere; font-size: 14px; font-weight: 500; text-transform: uppercase; }

.charge-block { padding: 31px 0 27px; border-bottom: 1.5px solid var(--ink); }
.charge-block h3 { max-width: 900px; margin: 0 0 13px; font: clamp(1.65rem, 4vw, 3.4rem)/1 "Archivo Black", sans-serif; letter-spacing: -.045em; text-transform: uppercase; }
.charge-block > p:last-child { max-width: 760px; margin: 0; color: #4c4943; font-size: 14px; line-height: 1.55; }

.threat-row { display: grid; grid-template-columns: 1fr 2fr; align-items: end; gap: 40px; padding: 28px 0; border-bottom: 1.5px solid var(--ink); }
.threat-copy strong { font: 76px/1 "Archivo Black", sans-serif; letter-spacing: -.06em; }
.threat-copy small { font-size: 23px; }
.meter { height: 28px; border: 1.5px solid var(--ink); padding: 4px; }
.meter span { display: block; height: 100%; width: 0; background: var(--red); transition: width 900ms cubic-bezier(.2,.8,.2,1); }
.meter-labels { display: flex; justify-content: space-between; margin-top: 8px; font-size: 9px; }

.facts-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; border-bottom: 1.5px solid var(--ink); }
.facts-grid > div { padding: 22px 18px 22px 0; border-right: 1.5px solid var(--ink); }
.facts-grid > div:not(:first-child) { padding-left: 18px; }
.facts-grid > div:last-child { border-right: 0; }
.facts-grid strong { font: 17px/1.25 "Archivo Black", sans-serif; text-transform: uppercase; }

.sentence-block { padding: 27px 0; border-bottom: 1.5px solid var(--ink); }
.sentence-block p:last-child { margin: 0; font-size: 16px; font-weight: 500; line-height: 1.5; }
.report-footer { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 25px; padding-top: 24px; }
.report-footer p { margin: 0; font-size: 9px; line-height: 1.6; }
.barcode { width: 190px; height: 42px; background: repeating-linear-gradient(90deg, var(--ink) 0, var(--ink) 2px, transparent 2px, transparent 5px, var(--ink) 5px, var(--ink) 9px, transparent 9px, transparent 12px); }
.stamp { transform: rotate(-8deg); padding: 9px 13px; color: var(--red); border: 5px double var(--red); font: 20px/1 "Archivo Black", sans-serif; text-align: center; }
.footer-note { margin-top: 24px; color: var(--muted); font-size: 11px; text-align: center; }

.greeting-card {
  color: var(--paper);
  background: var(--ink);
  box-shadow: 10px 10px 0 var(--red);
}

.greeting-card::before { content: "DELIVER TODAY"; color: rgba(233, 227, 213, .035); }
.greeting-card .paper-topline { border-color: rgba(233, 227, 213, .55); }

.greeting-heading {
  position: relative;
  padding: 31px 170px 30px 0;
}

.greeting-heading > p { margin: 0 0 8px; color: var(--red); font-size: 11px; font-weight: 500; letter-spacing: .13em; }
.greeting-heading h2 { max-width: 760px; }
.greeting-heading h2 span { color: var(--red); overflow-wrap: anywhere; }
.birthday-seal { position: absolute; top: 28px; right: 12px; width: 120px; height: 120px; display: grid; place-items: center; border: 3px solid var(--paper); border-radius: 50%; font: 42px "Archivo Black", sans-serif; transform: rotate(7deg); }
.birthday-seal::before, .birthday-seal::after { content: ""; position: absolute; width: 136px; border-top: 1px solid var(--paper); transform: rotate(45deg); opacity: .55; }
.birthday-seal::after { transform: rotate(-45deg); }

.greeting-opening { max-width: 800px; padding: 0 0 28px; color: #d6d0c3; font-size: clamp(1.15rem, 2.2vw, 1.55rem); line-height: 1.55; }
.greeting-card .identity-grid, .greeting-card .identity-grid div { border-color: rgba(233, 227, 213, .55); }
.greeting-card dt { color: #999489; }
.greeting-card .charge-block { border-color: rgba(233, 227, 213, .55); }
.greeting-card .charge-block > p:last-child { color: #bbb5a9; }
.greeting-charge h3 { color: var(--red); }

.birthday-order { padding: 28px 0; border-bottom: 1.5px solid rgba(233, 227, 213, .55); }
.birthday-order p:last-child { max-width: 820px; margin: 0; font: clamp(1.35rem, 3vw, 2.15rem)/1.25 "Archivo Black", sans-serif; text-transform: uppercase; }
.signature-row { display: flex; justify-content: space-between; align-items: end; gap: 30px; padding-top: 26px; }
.signature-row > div:first-child { display: flex; flex-direction: column; gap: 8px; }
.signature-row span { color: #999489; font-size: 9px; letter-spacing: .1em; }
.signature-row strong { font-size: 20px; text-transform: uppercase; }
.birthday-stamp { color: var(--red); border-color: var(--red); font-size: 16px; }

.pop { animation: pop .45s cubic-bezier(.2,.8,.2,1); }
.shake { animation: shake .35s linear; }

@keyframes blink { 50% { opacity: .35; } }
@keyframes pop { from { opacity: 0; transform: translateY(22px) rotate(.3deg); } to { opacity: 1; transform: none; } }
@keyframes shake { 25% { transform: rotate(-1deg); } 75% { transform: rotate(1deg); } }

@media (max-width: 700px) {
  .site-header { grid-template-columns: 1fr auto; padding: 10px 16px; }
  .bureau { display: none; }
  .status { font-size: 9px; }
  .intake { width: min(100% - 30px, 900px); padding-top: 58px; }
  .mode-switch { display: flex; width: 100%; margin-bottom: 28px; }
  .mode-button { flex: 1; padding: 0 9px; font-size: 10px; }
  .greet-shortcut { align-items: flex-start; flex-direction: column; gap: 5px; margin-top: -8px; }
  .greet-shortcut strong { font-size: 14px; }
  h1 { font-size: clamp(3.15rem, 16.5vw, 5.5rem); }
  .lede { margin: 25px 0 30px; font-size: 15px; }
  form { grid-template-columns: 1fr; }
  form button { grid-column: 1; }
  .report-actions { align-items: stretch; }
  .report-actions > div { flex: 1; }
  .report-actions > .text-button { display: none; }
  .report-actions > div { display: grid; grid-template-columns: 1fr 1.35fr; }
  .report-actions > div .text-button { width: 100%; }
  .share-button { width: 100%; }
  .copy-status { text-align: center; }
  .report-card { padding: 18px; box-shadow: 6px 6px 0 var(--ink); }
  .greeting-card { box-shadow: 6px 6px 0 var(--red); }
  .paper-topline span:last-child { display: none; }
  .report-title-row { gap: 12px; }
  h2 { font-size: clamp(2.25rem, 11vw, 4rem); }
  .mugshot { width: 92px; min-height: 105px; }
  .mugshot span { font-size: 35px; }
  .identity-grid { grid-template-columns: 1fr 1fr; }
  .charge-block h3 { font-size: clamp(1.55rem, 7.5vw, 2.5rem); }
  .threat-row { grid-template-columns: 1fr; gap: 18px; }
  .threat-copy { display: flex; justify-content: space-between; align-items: end; }
  .threat-copy strong { font-size: 58px; }
  .facts-grid { grid-template-columns: 1fr 1fr; }
  .facts-grid > div:first-child { grid-column: 1 / -1; border-bottom: 1.5px solid var(--ink); border-right: 0; }
  .facts-grid > div:nth-child(2) { padding-left: 0; }
  .report-footer { grid-template-columns: 1fr auto; }
  .report-footer p { display: none; }
  .barcode { width: 140px; }
  .stamp { font-size: 16px; }
  .greeting-heading { padding: 25px 75px 24px 0; }
  .greeting-heading h2 { font-size: clamp(2.05rem, 10.5vw, 3.5rem); }
  .birthday-seal { top: 24px; right: 2px; width: 62px; height: 62px; font-size: 22px; border-width: 2px; }
  .birthday-seal::before, .birthday-seal::after { width: 72px; }
  .greeting-opening { font-size: 16px; }
  .greeting-identity { grid-template-columns: 1fr 1fr; }
  .signature-row { align-items: center; }
  .signature-row strong { font-size: 16px; }
  .birthday-stamp { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
