:root {
  --page-width: 900px;
  --text-color: #111;
  --border-color: #222;
  --muted-color: #444;
  --paper-bg: #fff;
  --page-padding: 56px;
  --font-body: "Times New Roman", Times, serif;
}

* { box-sizing: border-box; }

html { background: #e9e9e9; }

body {
  margin: 0;
  color: var(--text-color);
  background: #e9e9e9;
  font-family: var(--font-body);
  line-height: 1.45;
}

.page {
  width: min(100%, var(--page-width));
  margin: 24px auto;
  padding: var(--page-padding);
  background: var(--paper-bg);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.10);
}

.court-name {
  text-align: center;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 32px;
}

.case-caption {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 20px 0;
  margin-bottom: 32px;
}

.case-caption .left p,
.case-caption .right p {
  margin: 0 0 12px 0;
}

.case-caption .left { padding-right: 20px; }
.case-caption .right {
  border-left: 1px solid var(--border-color);
  padding-left: 20px;
}

.document-title {
  text-align: center;
  margin-bottom: 28px;
}

.document-title h1 {
  margin: 0;
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.body-section {
  margin-bottom: 18px;
}

.body-section.compact {
  margin-bottom: 6px;
}

.body-section h2 {
  text-align: center;
  margin: 12px 0 18px 0;
  font-size: 1rem;
  text-transform: uppercase;
}

.subhead-section h3 {
  text-align: left;
  margin: 6px 0 12px 0;
  font-size: 1rem;
  font-weight: bold;
}

.count-section h2 span {
  display: inline-block;
  margin-top: 6px;
  font-size: 1rem;
  text-transform: none;
  font-weight: normal;
}

p {
  margin: 0 0 14px 0;
  text-align: justify;
}

.numbered {
  position: relative;
  padding-left: 44px;
}

.num {
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  text-align: right;
}

.wherefore {
  margin-left: 0;
}

.legal-quote {
  margin: 14px 80px 18px 80px;
  line-height: 1.5;
}

.signature-block {
  margin-top: 28px;
}

.signature-block p {
  text-align: left;
  margin-bottom: 8px;
}

@media (max-width: 700px) {
  .page {
    margin: 0;
    padding: 24px 18px;
    box-shadow: none;
  }

  .case-caption {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .case-caption .right {
    border-left: none;
    border-top: 1px solid var(--border-color);
    padding-left: 0;
    padding-top: 16px;
  }

  .legal-quote {
    margin-left: 44px;
    margin-right: 20px;
  }
}

@media print {
  html, body { background: #fff; }
  .page {
    width: auto;
    margin: 0;
    padding: 0;
    box-shadow: none;
  }
}
