/* Aesthetic: 1950s typewritten court document — IBM Selectric / stamped-and-pressed paper. Off-white stock, ink-black body in IBM Plex Mono, condensed Playfair Display Black masthead, Special Elite for fills, one accent stamp-red, cartouche seal with rotated rim text, perforated bottom edge. */

:root {
  --paper: #f2ecde;
  --paper-shadow: #ddd4bd;
  --ink: #181714;
  --ink-soft: #3a372f;
  --ink-faint: #6a6456;
  --stamp-red: #b1271b;
  --rule: #1a1a1a;
  --chip-idle: #ede5d0;
  --chip-active: #181714;
  --chip-active-ink: #f2ecde;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: #cfc6ae;
  color: var(--ink);
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100%;
}

body {
  background-image:
    radial-gradient(circle at 12% 20%, rgba(0,0,0,0.04) 0, transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(0,0,0,0.05) 0, transparent 45%);
  padding: 24px 14px 80px;
}

#app {
  max-width: 640px;
  margin: 0 auto;
}

.screen {
  background: var(--paper);
  box-shadow: 0 2px 0 var(--paper-shadow), 0 20px 40px rgba(0,0,0,0.18);
  padding: 28px 22px 32px;
  position: relative;
}

.screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(24,23,20,0.02) 0 1px, transparent 1px 3px),
    radial-gradient(circle at 30% 10%, rgba(0,0,0,0.04) 0, transparent 60%);
}

.hidden {
  display: none !important;
}

/* ---------- Masthead ---------- */

.masthead {
  text-align: center;
  margin: 0 0 22px;
}

.masthead-rule {
  border-top: 3px double var(--ink);
  height: 0;
  margin: 0 auto;
}

.masthead-title {
  font-family: 'Playfair Display', 'Times New Roman', serif;
  font-weight: 900;
  font-size: clamp(32px, 8vw, 48px);
  letter-spacing: 0.06em;
  margin: 8px 0 4px;
  color: var(--ink);
  line-height: 1.05;
}

.masthead-sub {
  font-family: 'Special Elite', 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 2px 0 8px;
}

/* ---------- Form ---------- */

#case-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row label,
.chip-label {
  font-family: 'Special Elite', 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

input[type="text"],
textarea {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 15px;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1.5px solid var(--ink);
  padding: 8px 2px;
  min-height: 44px;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  resize: vertical;
}

textarea {
  min-height: 72px;
  line-height: 1.45;
}

input[type="text"]:focus,
textarea:focus {
  background: rgba(255,255,255,0.35);
  border-bottom-color: var(--stamp-red);
}

input::placeholder,
textarea::placeholder {
  color: var(--ink-faint);
  font-style: italic;
}

/* ---------- Progressive disclosure steps ---------- */

.step {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.step-hidden {
  display: none;
}

.step-active {
  animation: step-fade 0.22s ease-out;
}

@keyframes step-fade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.step-caption {
  font-family: 'Special Elite', monospace;
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--ink);
  margin: 0 0 4px;
  text-align: center;
}

.step-caption-sub {
  color: var(--ink-faint);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.continue-btn {
  margin-top: 6px;
  font-family: 'Playfair Display', 'Times New Roman', serif;
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 0.14em;
  background: var(--ink);
  color: var(--paper);
  border: none;
  padding: 16px 18px;
  min-height: 54px;
  cursor: pointer;
  border-radius: 0;
  box-shadow: 4px 4px 0 var(--stamp-red);
  transition: transform 0.08s, box-shadow 0.08s, opacity 0.15s;
}

.continue-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--stamp-red);
}

.continue-btn[disabled] {
  opacity: 0.35;
  cursor: default;
  box-shadow: 4px 4px 0 rgba(177, 39, 27, 0.25);
}

.back-btn {
  font-family: 'Special Elite', monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: transparent;
  color: var(--ink-soft);
  border: none;
  padding: 4px 0;
  cursor: pointer;
  align-self: center;
}

.share-preamble {
  font-family: 'Special Elite', monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  text-align: center;
  margin: 0 0 4px;
}

/* ---------- Chips ---------- */

/* Step-2 option rows are laid out as a hand-written checkbox list — one
   item per row, ticked with a pen rather than filled pills. */
.chips {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 5px 4px 5px 2px;
  min-height: 36px;
  background: transparent;
  border: none;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  line-height: 1.25;
  /* Slight per-chip tilt (set in JS) sells the hand-drawn feel. */
  transform: rotate(var(--chip-tilt, 0deg));
  transform-origin: left center;
  /* Row slides in from the left as the clerk draws it onto the page. */
  opacity: 0;
  animation: chip-row-appear 200ms ease-out forwards;
  animation-delay: var(--chip-delay, 0ms);
  border-radius: 0;
}

.chip:hover {
  background: rgba(24, 23, 20, 0.04);
}

.chip:focus-visible {
  outline: 2px dashed var(--ink-soft);
  outline-offset: 2px;
}

.chip-box {
  position: relative;
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 1.6px solid var(--ink);
  background: rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
  /* Tiny rotation so the box looks drawn, not printed. */
  transform: rotate(-1.5deg);
}

.chip-check {
  position: absolute;
  inset: -4px -3px -3px -4px;
  width: calc(100% + 7px);
  height: calc(100% + 7px);
  pointer-events: none;
  overflow: visible;
}

.chip-check path {
  stroke: var(--stamp-red);
  stroke-width: 2.8;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 260ms ease-out;
}

.chip[aria-checked="true"] .chip-check path {
  stroke-dashoffset: 0;
}

.chip-text {
  font-family: 'Special Elite', 'Courier New', monospace;
  font-size: 16px;
  letter-spacing: 0.01em;
  color: var(--ink);
  /* Reserve a line of height even before typing starts, so the row
     doesn't collapse and the checkbox stays vertically centered. */
  min-height: 1.25em;
  display: inline-block;
}

/* Blinking typewriter cursor at the end of the text while a chip is being
   typed. Removed once the chip's label is fully drawn. */
.chip.chip-typing .chip-text::after {
  content: '▋';
  display: inline-block;
  margin-left: 1px;
  color: var(--ink-soft);
  animation: chip-cursor-blink 540ms steps(2, end) infinite;
}

@keyframes chip-row-appear {
  from { opacity: 0; transform: translateX(-8px) rotate(var(--chip-tilt, 0deg)); }
  to   { opacity: 1; transform: translateX(0)    rotate(var(--chip-tilt, 0deg)); }
}

@keyframes chip-cursor-blink {
  50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .chip {
    animation: none;
    opacity: 1;
  }
  .chip.chip-typing .chip-text::after { animation: none; }
  .chip-check path { transition: none; }
}

/* ---------- Buttons ---------- */

.file-btn {
  margin-top: 6px;
  font-family: 'Playfair Display', 'Times New Roman', serif;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.15em;
  background: var(--ink);
  color: var(--paper);
  border: none;
  padding: 18px 20px;
  min-height: 56px;
  cursor: pointer;
  border-radius: 0;
  box-shadow: 4px 4px 0 var(--stamp-red);
  transition: transform 0.08s, box-shadow 0.08s;
}

.file-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--stamp-red);
}

.file-btn.file-btn-waiting,
.file-btn:disabled {
  background: var(--ink-faint);
  color: var(--paper);
  box-shadow: 4px 4px 0 rgba(177, 39, 27, 0.35);
  cursor: not-allowed;
  font-family: 'Special Elite', 'Courier New', monospace;
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.08em;
}

.file-btn.file-btn-waiting:active,
.file-btn:disabled:active {
  transform: none;
  box-shadow: 4px 4px 0 rgba(177, 39, 27, 0.35);
}

.disclaimer {
  text-align: center;
  font-family: 'Special Elite', monospace;
  font-size: 11px;
  color: var(--ink-faint);
  margin: 2px 0 0;
  letter-spacing: 0.04em;
}

.form-error {
  color: var(--stamp-red);
  font-family: 'Special Elite', monospace;
  font-size: 13px;
  min-height: 18px;
  text-align: center;
}

/* ---------- Loading ---------- */

#loading {
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#loading.hidden {
  display: none !important;
}

.loader-stack {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.stamp-spin {
  animation: stamp-thump 1.6s ease-in-out infinite;
}

@keyframes stamp-thump {
  0%, 80%, 100% { transform: scale(1) rotate(-6deg); }
  40% { transform: scale(1.08) rotate(-10deg); }
}

.typewriter {
  font-family: 'Special Elite', monospace;
  font-size: 16px;
  letter-spacing: 0.06em;
  color: var(--ink);
  border-right: 2px solid var(--ink);
  white-space: nowrap;
  overflow: hidden;
  animation: typecursor 0.7s step-end infinite;
  max-width: 100%;
}

@keyframes typecursor {
  50% { border-right-color: transparent; }
}

/* ---------- Judgment Document ---------- */

.judgment-doc {
  background: var(--paper);
  position: relative;
  padding: 28px 20px 44px;
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  color: var(--ink);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(24,23,20,0.15);
}

.judgment-doc::after {
  /* perforated bottom edge */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 16px;
  background:
    radial-gradient(circle at 8px 16px, #cfc6ae 7px, transparent 7.5px) repeat-x;
  background-size: 16px 16px;
}

.doc-banner {
  text-align: center;
  border-top: 3px double var(--ink);
  border-bottom: 3px double var(--ink);
  padding: 10px 4px;
  margin-bottom: 10px;
}

.doc-banner-1 {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: clamp(18px, 5vw, 24px);
  letter-spacing: 0.06em;
  line-height: 1.1;
}

.doc-banner-2 {
  font-family: 'Special Elite', monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  margin-top: 4px;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.docket-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  font-family: 'Special Elite', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 10px 0 16px;
  flex-wrap: wrap;
}

/* Small role label prepended to the judgment doc on load so a recipient
   knows they're looking at a case served to them (vs. one they filed
   themselves). Subtle by design — a carbon-copy stamp, not a heading. */
.role-tag {
  font-family: 'Special Elite', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 2px 0 10px;
  border-bottom: 1px dashed var(--ink-faint);
  margin: 0 0 14px;
}

/* Dead-link banner shown when a shared `?c=<id>` URL couldn't be resolved
   (expired TTL, mistyped id, or case-store unreachable). */
.dead-link-banner {
  font-family: 'Special Elite', monospace;
  font-size: 13px;
  letter-spacing: 0.02em;
  line-height: 1.4;
  color: var(--stamp-red);
  background: rgba(177, 39, 27, 0.08);
  border: 1.5px dashed var(--stamp-red);
  padding: 10px 14px;
  margin: 0 0 18px;
}

.case-stamp {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 700;
  font-size: clamp(18px, 5vw, 24px);
  color: var(--stamp-red);
  border: 2px solid var(--stamp-red);
  padding: 6px 12px;
  transform: rotate(-8deg);
  letter-spacing: 0.06em;
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  white-space: nowrap;
}

.parties {
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: clamp(20px, 5.2vw, 26px);
  line-height: 1.2;
  margin: 10px 0 18px;
}

.parties .v {
  font-family: 'Special Elite', monospace;
  font-weight: 400;
  font-size: 0.7em;
  letter-spacing: 0.2em;
  display: block;
  margin: 4px 0;
  color: var(--ink-soft);
}

.section-hd {
  font-family: 'Special Elite', monospace;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 2px;
  margin: 18px 0 8px;
}

.grievance-quote {
  font-family: 'Special Elite', monospace;
  font-size: 15px;
  line-height: 1.55;
  padding: 6px 2px 6px 14px;
  border-left: 2px solid var(--ink);
  color: var(--ink);
  word-wrap: break-word;
  white-space: pre-wrap;
}

.agg-line {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  padding: 6px 0;
  color: var(--ink);
}

.agg-line .mult {
  color: var(--stamp-red);
  font-weight: 700;
}

.findings {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.findings li {
  position: relative;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.55;
}

.findings li::before {
  content: "§";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--ink-soft);
  font-weight: 700;
}

.damages-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  margin-top: 4px;
}

.damages-table td {
  padding: 6px 0;
  border-bottom: 1px dotted var(--ink-soft);
  vertical-align: top;
}

.damages-table td.amt {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  padding-left: 10px;
}

.damages-table tr.total td {
  border-bottom: none;
  border-top: 2px solid var(--ink);
  font-weight: 700;
  padding-top: 8px;
  font-size: 16px;
}

/* ---------- Dramatic reveal for awarded total ---------- */

.damages-table tr.total td.amt {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: clamp(22px, 6vw, 30px);
  color: var(--stamp-red);
  letter-spacing: 0.02em;
}

.damages-table tr.total td.amt .reveal-amt {
  display: inline-block;
  animation: total-thump 0.55s cubic-bezier(.16, 1.2, .3, 1) both;
  transform-origin: right center;
}

@keyframes total-thump {
  /* Opacity is explicit at every keyframe because the sibling line-item
     rule declares opacity:0 on .reveal-amt as its pre-animation state; if
     this keyframe omitted opacity at the tail, the browser would synthesize
     an implicit 100% keyframe at opacity:0 and the total would fade back
     out right after landing. */
  0%   { transform: scale(0.4); opacity: 0; filter: blur(4px); }
  55%  { transform: scale(1.18); opacity: 1; filter: blur(0); }
  80%  { transform: scale(0.96); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* Line-item amounts fade in one after the other so the column "fills in"
   before the total slams down. */
.damages-table tbody tr td.amt .reveal-amt {
  display: inline-block;
  opacity: 0;
  animation: amt-fade 0.32s ease-out forwards;
}

@keyframes amt-fade {
  from { opacity: 0; transform: translateY(-3px); }
  to   { opacity: 1; transform: translateY(0); }
}

.foot-math {
  font-family: 'Special Elite', monospace;
  font-size: 11px;
  color: var(--ink-faint);
  margin-top: 6px;
  letter-spacing: 0.04em;
}

.verdict-block {
  margin: 24px 0 8px;
  text-align: center;
}

.verdict-label {
  font-family: 'Special Elite', monospace;
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.verdict-name {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: clamp(28px, 7.2vw, 42px);
  line-height: 1.05;
  margin-top: 6px;
  letter-spacing: 0.02em;
}

.signature-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 26px;
  gap: 14px;
  flex-wrap: wrap;
}

.sig-line {
  flex: 1 1 180px;
  min-width: 160px;
  border-top: 1.5px solid var(--ink);
  padding-top: 4px;
  font-family: 'Special Elite', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.clerk-seal {
  flex: 0 0 100px;
  width: 100px;
  height: 100px;
  transform: rotate(-8deg);
}

/* ---------- Share ---------- */

.share-row {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}

.share-btn {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  letter-spacing: 0.15em;
  font-size: 18px;
  background: var(--stamp-red);
  color: #f7efdc;
  border: none;
  padding: 16px 20px;
  min-height: 52px;
  cursor: pointer;
  border-radius: 0;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.08s, box-shadow 0.08s;
}

.share-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.reset-btn {
  font-family: 'Special Elite', monospace;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  padding: 12px 18px;
  min-height: 48px;
  cursor: pointer;
  border-radius: 0;
}

/* ---------- AI Suggest controls ---------- */

.label-hint {
  font-family: 'Special Elite', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  text-transform: none;
  margin-left: 4px;
}

/* Persistent notice shown when the clerk was unreachable and step-2 fell
   back to generic defaults — replaces the transient status text, which
   rotates back to "pick any that apply" and wipes the failure signal. */
.suggest-fallback {
  font-family: 'Special Elite', monospace;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--stamp-red);
  background: rgba(177, 39, 27, 0.06);
  border-left: 2px solid var(--stamp-red);
  padding: 6px 10px;
  margin: 8px 0 2px;
  line-height: 1.35;
}

.suggest-status {
  font-family: 'Special Elite', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  min-height: 14px;
  margin: 4px 0 0;
}

.agg-summary {
  font-family: 'Special Elite', monospace;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  min-height: 16px;
  margin: 6px 0 0;
}

/* ---------- Paid stamp + actions ---------- */

.paid-stamp {
  position: absolute;
  top: 60px;
  right: 18px;
  transform: rotate(-14deg);
  text-align: center;
  pointer-events: none;
  z-index: 2;
  animation: paid-slam 0.35s ease-out;
}

@keyframes paid-slam {
  0%   { transform: rotate(-14deg) scale(1.8); opacity: 0; }
  60%  { transform: rotate(-14deg) scale(0.92); opacity: 1; }
  100% { transform: rotate(-14deg) scale(1); opacity: 1; }
}

.paid-stamp-inner {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 42px;
  letter-spacing: 0.08em;
  color: var(--stamp-red);
  border: 4px double var(--stamp-red);
  padding: 4px 16px 6px;
  background: rgba(242, 236, 222, 0.35);
  text-shadow: 0 0 1px rgba(177, 39, 27, 0.45);
}

.paid-stamp-sub {
  font-family: 'Special Elite', monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stamp-red);
  margin-top: 4px;
  opacity: 0.8;
}

.paid-actions {
  margin-top: 14px;
}

.paid-strip {
  font-family: 'Special Elite', monospace;
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 12px 14px;
  border: 2px solid var(--ink);
  background: var(--paper);
}

.paid-strip-ok {
  border-color: var(--stamp-red);
  background: rgba(177, 39, 27, 0.06);
  color: var(--ink);
}

.paid-strip-bad {
  border-style: dashed;
  border-color: var(--ink);
  background: rgba(0, 0, 0, 0.03);
  color: var(--ink-soft);
}

.paid-note {
  font-family: 'Special Elite', monospace;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  padding: 10px 12px;
  border-top: 1.5px dotted var(--ink-soft);
  border-bottom: 1.5px dotted var(--ink-soft);
  line-height: 1.5;
}

.paid-receiver {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.served-banner {
  font-family: 'Special Elite', monospace;
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 12px 14px;
  border: 2px solid var(--stamp-red);
  background: rgba(177, 39, 27, 0.06);
  color: var(--ink);
  line-height: 1.5;
}

.mark-paid-btn {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.14em;
  background: var(--ink);
  color: var(--paper);
  border: none;
  padding: 16px 18px;
  min-height: 52px;
  cursor: pointer;
  border-radius: 0;
  box-shadow: 4px 4px 0 var(--stamp-red);
}

.mark-paid-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--stamp-red);
}

.paid-hint {
  font-family: 'Special Elite', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  margin: 0;
  line-height: 1.5;
}

/* Inline confirm row shown after the first tap of TENDER PAYMENT — forces
   a second deliberate click before the stamp lands. */
.confirm-remit-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border: 2px dashed var(--stamp-red);
  background: rgba(177, 39, 27, 0.05);
}

.confirm-remit-q {
  font-family: 'Special Elite', monospace;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink);
  line-height: 1.4;
}

.confirm-remit-yes {
  /* inherits .mark-paid-btn styling; override box-shadow to a softer thud
     so the two ink-colored buttons aren't visually identical. */
  box-shadow: 3px 3px 0 var(--stamp-red);
}

.confirm-remit-yes:disabled {
  opacity: 0.7;
  cursor: progress;
}

.confirm-remit-no {
  align-self: flex-start;
  font-family: 'Special Elite', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: transparent;
  border: none;
  padding: 6px 8px;
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}

/* Shown after a successful PATCH — no receipt URL needed, sender will see
   PAID next time they reopen the link they already sent. */
.paid-done-note {
  font-family: 'Special Elite', monospace;
  font-size: 13px;
  letter-spacing: 0.03em;
  line-height: 1.5;
  padding: 12px 14px;
  border: 2px solid var(--stamp-red);
  background: rgba(177, 39, 27, 0.06);
  color: var(--ink);
}

.receipt-box {
  border: 1.5px dashed var(--ink);
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.4);
}

.receipt-box.hidden {
  display: none;
}

.receipt-label {
  font-family: 'Special Elite', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 6px;
}

.receipt-url {
  width: 100%;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  padding: 8px 8px;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  box-sizing: border-box;
}

.receipt-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.receipt-copy,
.receipt-share {
  font-family: 'Special Elite', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--paper);
  border: none;
  padding: 9px 12px;
  min-height: 40px;
  cursor: pointer;
}

.receipt-share {
  background: var(--stamp-red);
}

/* ---------- Mobile tighten ---------- */

@media (max-width: 420px) {
  body { padding: 14px 8px 60px; }
  .screen { padding: 22px 16px 28px; }
  .judgment-doc { padding: 22px 14px 44px; }
  .clerk-seal { flex-basis: 80px; width: 80px; height: 80px; }
  .file-btn { font-size: 18px; letter-spacing: 0.1em; }
}
