:root {
  --paper: #f7f5f0;
  --ink: #1c1a16;
  --ink-muted: #55504a;
  --rule: #c9c2b4;
  --accent: #7a1f1f;
  --input-bg: #fffdf9;
  --star-off: #b8b1a3;
  --star-on: #7a1f1f;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17150f;
    --ink: #ece7dc;
    --ink-muted: #b3ab9c;
    --rule: #4a4438;
    --accent: #c96b6b;
    --input-bg: #201d16;
    --star-off: #55503f;
    --star-on: #c96b6b;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", Times, serif;
  line-height: 1.6;
  padding: 3rem 1.25rem 5rem;
}

main {
  max-width: 42rem;
  margin: 0 auto;
}

header.docket {
  text-align: center;
  margin-bottom: 2.5rem;
}

.docket .matter-no {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  margin: 0 0 0.75rem;
}

.docket h1 {
  font-size: 1.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}

.docket .subheading {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--ink-muted);
  margin: 0;
}

hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2rem 0;
}

.notice {
  font-size: 1.05rem;
}

.notice p {
  margin: 0 0 1rem;
}

.notice p:last-child {
  margin-bottom: 0;
}

fieldset {
  border: none;
  padding: 0;
  margin: 0 0 1.75rem;
}

.field {
  margin-bottom: 1.75rem;
}

label,
legend {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-bottom: 0.4rem;
  padding: 0;
}

input[type="text"],
textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--input-bg);
  border: none;
  border-bottom: 1px solid var(--rule);
  padding: 0.5rem 0.25rem;
}

input[type="text"]:focus,
textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

textarea {
  resize: vertical;
  min-height: 8rem;
  border: 1px solid var(--rule);
  padding: 0.65rem 0.75rem;
}

textarea:focus {
  border-color: var(--accent);
}

.fine-print {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.75rem;
  color: var(--ink-muted);
  margin-top: 0.4rem;
  font-style: italic;
}

.star-rating {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 0.15rem;
  font-size: 2rem;
  line-height: 1;
}

.star-rating input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.star-rating label {
  display: inline-block;
  margin: 0;
  padding: 0;
  cursor: pointer;
  color: var(--star-off);
  transition: color 0.15s ease;
  text-transform: none;
  letter-spacing: normal;
}

.star-rating input:disabled + label {
  cursor: not-allowed;
  opacity: 0.55;
}

.star-rating input:enabled + label:hover,
.star-rating input:enabled + label:hover ~ label {
  color: var(--star-on);
}

.star-rating input:checked + label {
  color: var(--star-on);
}

.star-rating input:focus-visible + label {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

button[type="submit"] {
  font: inherit;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  border: none;
  padding: 0.85rem 1.75rem;
  cursor: pointer;
}

button[type="submit"]:hover {
  background: var(--accent);
}

button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: wait;
}

#form-status {
  margin-top: 1rem;
  font-size: 0.9rem;
  min-height: 1.2rem;
}

#form-status[data-state="error"] {
  color: var(--accent);
}

.confirmation {
  text-align: center;
  padding: 2rem 0;
}

.confirmation h2 {
  margin-top: 0;
}

footer.seal {
  text-align: center;
  margin-top: 3rem;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.7rem;
  color: var(--ink-muted);
  letter-spacing: 0.08em;
}
