.court-order-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

.court-order-page main { flex: 1; }
.court-order-page [hidden] { display: none; }
.court-order-page .reading-header { border-bottom: 1px solid var(--border); }
.court-order-page .reading-nav { min-height: 76px; }
.court-order-page .reading-nav nav a { display: inline-flex; align-items: center; min-height: 44px; }
.court-order-page .reading-nav .logo img { max-width: min(200px, 42vw); }
.court-order-page .court-hero { border-bottom: 3px solid var(--yellow); }
.court-order-page .court-hero .tool-breadcrumb { margin-bottom: 18px; }
.court-order-page .court-hero h1 { margin-bottom: 16px; overflow-wrap: anywhere; }
.court-order-page .court-hero p { margin-bottom: 0; }
.court-order-page .court-workspace { padding-block: clamp(24px, 4vw, 48px) clamp(40px, 6vw, 76px); }

.court-order-page .court-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(16px, 4vw, 40px);
}

.court-order-page .court-card {
  min-width: 0;
  padding: clamp(18px, 3vw, 32px);
  border: 1px solid #d9d6cc;
  background: #fffdf8;
}

.court-order-page .court-upload { border-top: 4px solid var(--yellow); }
.court-order-page .court-card + .court-card { margin-top: 16px; }
.court-order-page .court-upload h2,
.court-order-page .court-results h2 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -0.6px; margin-bottom: 18px; }
.court-order-page .court-card h3,
.court-order-page .court-notice h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.25px; margin-bottom: 12px; }
.court-order-page .court-upload label { display: block; margin-bottom: 7px; color: var(--ink); font-weight: 600; }
.court-order-page .court-disclosure { margin-bottom: 16px; color: var(--muted); font-size: 15px; }
.court-order-page .court-disclosure p { margin: 0; }
.court-order-page .court-disclosure p + p { margin-top: 8px; }
.court-order-page .court-disclosure strong { color: var(--ink); }

.court-order-page #court-order-pdf {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 1px solid #8a8b82;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
}

.court-order-page #court-order-pdf::file-selector-button {
  min-height: 46px;
  margin-right: 12px;
  padding-inline: 13px;
  border: 0;
  border-right: 1px solid #8a8b82;
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
}

.court-order-page #court-order-pdf[aria-invalid] { border-color: #9a3030; }
.court-order-page .court-help { color: var(--muted); font-size: 14px; margin: 7px 0 17px; }
.court-order-page .court-upload .button { min-height: 46px; padding: 10px 17px; font-size: 15px; }
.court-order-page .court-upload .button[aria-disabled="true"],
.court-order-page .court-upload .button:disabled {
  border-color: #9c9279;
  background: #efeadb;
  color: #585347;
  transform: none;
  cursor: not-allowed;
}

.court-order-page .court-status:empty { margin: 0; }
.court-order-page .court-status:not(:empty),
.court-order-page .court-alert { margin: 12px 0 0; font-size: 15px; overflow-wrap: anywhere; }
.court-order-page .court-alert { padding: 9px 12px; border-left: 3px solid #9a3030; background: #faece8; color: #762528; }
.court-order-page .court-notice { padding: 16px 0 0 22px; border-left: 1px solid #a9a59b; overflow-wrap: anywhere; }
.court-order-page .court-notice p { margin-bottom: 12px; color: var(--muted); font-size: 15px; }
.court-order-page .court-results { margin-top: clamp(32px, 5vw, 56px); padding-top: 24px; border-top: 1px solid #a9a59b; }
.court-order-page .court-limitations { margin: 0 0 16px; padding: 10px 15px 10px 30px; border-left: 3px solid #835500; background: #fff2cf; font-size: 15px; }
.court-order-page .court-muted { color: var(--muted); }
.court-order-page .court-fields { margin: 0; }

.court-order-page .court-fields > div {
  display: grid;
  grid-template-columns: minmax(7rem, 2fr) minmax(0, 3fr);
  gap: 6px 16px;
  padding-block: 9px;
  border-top: 1px solid #d9d6cc;
}

.court-order-page .court-fields dt { font-size: 14px; font-weight: 600; }
.court-order-page .court-fields dd,
.court-order-page .court-action,
.court-order-page blockquote { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.court-order-page .court-finding,
.court-order-page blockquote { white-space: pre-wrap; }
.court-order-page .court-action { margin-bottom: 6px; font-weight: 600; }
.court-order-page .court-directions { margin: 0; padding-inline-start: 21px; }
.court-order-page .court-directions > li + li { margin-top: 16px; }
.court-order-page .court-citations { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 5px; vertical-align: middle; }

.court-order-page .court-citations a {
  display: inline-flex;
  align-items: center;
  min-width: 24px;
  min-height: 24px;
  padding-inline: 5px;
  border: 1px solid #ad8732;
  background: #fff2cf;
  color: #6c4600;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.court-order-page .court-citations a:hover { background: var(--yellow); }
.court-order-page .court-sources { list-style: none; margin: 0; padding: 0; }
.court-order-page .court-sources li { border-top: 1px solid #d9d6cc; padding: 12px 4px; scroll-margin-top: 16px; }
.court-order-page .court-sources li:target { outline: 2px solid #835500; background: #fff2cf; }
.court-order-page .court-sources h4 { margin: 0 0 5px; font-size: 14px; font-weight: 400; }
.court-order-page .court-sources h4 span { margin-left: 7px; color: var(--muted); }
.court-order-page blockquote { padding-inline-start: 10px; border-left: 2px solid #ad8732; font-size: 15px; }
.court-order-page .court-workspace :focus-visible { outline: 3px solid #835500; outline-offset: 4px; }

@media (max-width: 720px) {
  .court-order-page .container { padding-inline: 18px; }
  .court-order-page .court-grid { grid-template-columns: minmax(0, 1fr); }
  .court-order-page .court-notice { padding-top: 5px; padding-left: 16px; }
}

@media (max-width: 400px) {
  .court-order-page .reading-nav { gap: 8px 12px; }
  .court-order-page .reading-nav nav { gap: 0 12px; }
  .court-order-page .court-fields > div { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html:has(.court-order-page) { scroll-behavior: auto; }
  .court-order-page .button { transition: none; }
}
