@import url("https://fonts.googleapis.com/css2?family=Bellefair&display=swap");

:root {
  color-scheme: light;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #0d2447;
  background: #f4f8ff;
  --brand-font: "Bellefair", Georgia, serif;
  --brand-blue: #1b5ebe;
  --brand-blue-deep: #11458f;
  --brand-blue-soft: #eaf2ff;
  --ink: #0d2447;
  --muted: #526b90;
  --line: #c9dcf7;
  --line-strong: #9fbfeb;
  --panel: #ffffff;
  --paper: #f8fbff;
  --mark: #dceaff;
  --danger: #9c341e;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #f4f8ff;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(27, 94, 190, 0.1) 0, rgba(27, 94, 190, 0.04) 210px, rgba(27, 94, 190, 0) 420px),
    #f4f8ff;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.appbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  padding: 0 32px;
  color: #ffffff;
  background: var(--brand-blue);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 14px 34px rgba(13, 36, 71, 0.07);
}

.appbar-brand {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.54);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  font-family: var(--brand-font);
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
}

.appbar-brand div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.appbar-brand strong {
  color: #ffffff;
  font-family: var(--brand-font);
  font-size: 28px;
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0.05em;
}

.appbar-brand span:not(.brand-mark) {
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.appbar-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.appbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.appbar-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  font-weight: 800;
}

.appbar-links a:hover {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.shell {
  width: min(1180px, calc(100vw - 48px));
  max-width: 1180px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 0 56px;
}

.detail-shell {
  max-width: 1120px;
}

.topbar {
  display: block;
  max-width: 940px;
  margin: 0 auto;
  padding: 10px 0 8px;
  text-align: center;
}

.topbar > div {
  min-width: 0;
}

.search-shell .topbar {
  max-width: 980px;
  padding: 18px 0 8px;
  text-align: left;
}

.search-shell h1 {
  font-size: clamp(2.25rem, 4vw, 3.35rem);
}

.search-shell .subhead {
  margin-inline: 0;
  max-width: 640px;
}

.eyebrow,
.section-kicker {
  display: block;
  margin: 0 0 8px;
  color: var(--brand-blue);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.jurasis-word {
  color: var(--brand-blue);
  font-family: var(--brand-font);
  font-weight: 400;
  letter-spacing: 0.05em;
}

.appbar .jurasis-word {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--ink);
  letter-spacing: 0;
}

h1 {
  max-width: min(980px, 100%);
  margin-bottom: 0;
  font-family: var(--brand-font);
  font-size: clamp(2.65rem, 6vw, 4.8rem);
  font-weight: 400;
  line-height: 0.98;
  overflow-wrap: break-word;
}

h2 {
  font-family: var(--brand-font);
  font-weight: 400;
}

.subhead {
  max-width: 760px;
  margin-inline: auto;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.mobile-title,
.mobile-title-break {
  display: none;
}

.desktop-title {
  display: inline;
}

.corpus-badge,
.rank {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  color: var(--brand-blue-deep);
  background: var(--brand-blue-soft);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.result-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.notice {
  margin: 18px 0;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  color: var(--brand-blue-deep);
  background: #eef5ff;
}

.notice-slot {
  max-width: 980px;
  margin: 0 auto;
}

.search-panel {
  display: grid;
  gap: 14px;
  max-width: 980px;
  margin: 14px auto 0;
  padding: 14px 0;
  border: solid var(--line);
  border-width: 1px 0;
  background: transparent;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #274366;
  font-size: 12px;
  font-weight: 900;
}

input,
select,
button,
.button {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  padding: 9px 10px;
  color: var(--ink);
  font: inherit;
  background: #ffffff;
}

input,
select {
  font-size: 14px;
  font-weight: 650;
}

input:focus,
select:focus {
  outline: 2px solid rgba(27, 94, 190, 0.18);
  border-color: var(--brand-blue);
  background: #ffffff;
}

.query-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 10px;
  min-width: 0;
}

.query input {
  min-height: 50px;
  padding: 12px 14px;
  border-color: #8ab0e6;
  font-size: 18px;
}

button,
.button {
  display: inline-grid;
  place-items: center;
  min-height: 50px;
  cursor: pointer;
  font-weight: 900;
}

button {
  border-color: var(--brand-blue);
  color: #ffffff;
  background: var(--brand-blue);
}

button:hover {
  background: var(--brand-blue-deep);
}

button:disabled,
.is-loading button {
  cursor: progress;
  opacity: 0.72;
}

.ghost-button {
  color: var(--brand-blue);
  background: #ffffff;
}

.ghost-button:hover {
  border-color: var(--brand-blue);
  text-decoration: none;
}

.filters {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.primary-filters {
  grid-template-columns: 1.55fr 1.25fr 0.95fr 0.95fr 1fr 1fr;
}

.filters-drawer {
  padding-top: 0;
}

.filters-drawer summary {
  width: fit-content;
  cursor: pointer;
  color: var(--brand-blue);
  font-size: 13px;
  font-weight: 900;
}

.filters-drawer summary::marker {
  color: var(--brand-blue);
}

.filters-drawer[open] summary {
  margin-bottom: 10px;
}

.secondary-filters {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 12px;
}

.workspace {
  margin-top: 18px;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 26px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
}

.section-entry {
  display: grid;
  gap: 16px;
  align-content: start;
  min-width: 0;
  padding: 22px 28px 22px 0;
  border: 0;
}

.section-entry + .section-entry {
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.section-entry h2 {
  margin-bottom: 8px;
  font-size: 2.1rem;
  line-height: 1.02;
}

.section-entry p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.section-entry form {
  display: grid;
  gap: 10px;
}

.section-entry input {
  min-height: 48px;
}

.inline-action {
  width: fit-content;
  padding: 8px 0;
  color: var(--brand-blue);
  font-weight: 900;
}

.legal-filters {
  grid-template-columns: 0.9fr 1.1fr 0.7fr 0.8fr 0.7fr 1.25fr 0.9fr;
}

.results-heading h2 {
  margin-bottom: 0;
  color: var(--ink);
  font-size: 1.8rem;
  line-height: 1.1;
}

.results-heading,
.result-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.muted {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.active-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 4px 0 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.active-strip > span {
  display: none;
}

.active-strip strong {
  color: var(--ink);
}

.active-chips {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 6px;
}

.active-chips a,
.clear-all {
  padding: 3px 0;
  border: 0;
  color: var(--brand-blue);
  background: transparent;
  font-weight: 850;
}

.active-chips a:hover,
.clear-all:hover {
  text-decoration: none;
}

.results-area {
  position: relative;
  min-width: 0;
  max-width: 100%;
  transition: opacity 140ms ease;
}

.is-searching .results-area {
  opacity: 0.58;
}

.results-heading {
  align-items: center;
  margin-top: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-strong);
}

.results {
  display: grid;
  counter-reset: result;
  min-width: 0;
  max-width: 100%;
  border-bottom: 1px solid var(--line);
}

.result {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  padding: 16px 0 16px 38px;
  border-bottom: 1px solid var(--line);
  transition: background 120ms ease;
}

.result::before {
  counter-increment: result;
  content: counter(result);
  position: absolute;
  top: 19px;
  left: 0;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--line-strong);
  color: var(--brand-blue-deep);
  background: var(--brand-blue-soft);
  font-size: 12px;
  font-weight: 900;
}

.result:hover {
  background: rgba(255, 255, 255, 0.72);
}

.result h3 {
  margin-bottom: 0;
  color: var(--brand-blue-deep);
  font-size: 18px;
  line-height: 1.32;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.result h3 a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.result-main {
  min-width: 0;
}

.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 9px 0 10px;
  min-width: 0;
}

.case-meta span,
.match-list span,
.result-side span {
  max-width: 100%;
  padding: 3px 7px;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  color: #385579;
  background: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 800;
}

.snippet {
  max-width: 880px;
  margin-bottom: 0;
  color: #233b5c;
  font-size: 15px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

mark {
  padding: 0 2px;
  color: var(--brand-blue-deep);
  background: var(--mark);
}

.match-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.result-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.result-side a {
  margin-top: auto;
  padding: 6px 0;
  border: 0;
  color: var(--brand-blue);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
}

.result-side a:hover {
  color: var(--brand-blue-deep);
  background: transparent;
  text-decoration: underline;
}

.empty {
  display: grid;
  gap: 5px;
  padding: 30px 0;
  color: var(--muted);
  border-bottom: 1px dashed var(--line-strong);
}

.empty strong {
  color: var(--ink);
  font-size: 18px;
}

.pagination {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.pagination a,
.back {
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  color: var(--brand-blue);
  background: #ffffff;
  font-weight: 900;
}

.pagination a:hover,
.back:hover {
  border-color: var(--brand-blue);
  text-decoration: none;
}

.back {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 34px;
  margin-bottom: 14px;
  font-size: 13px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 20px 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.detail-grid div {
  padding: 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.detail-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-grid strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.detail-grid-compact {
  margin: 0;
}

.document-section {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.lead-section {
  border-top: 2px solid var(--brand-blue);
}

.document-section h2 {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 2rem;
}

.document-section p,
.case-text {
  margin-bottom: 0;
  white-space: pre-line;
}

.document-section > p,
.case-text {
  max-width: 76ch;
  color: #1a3150;
  font-size: 17px;
  line-height: 1.74;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

.case-text {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.8;
  hyphens: auto;
}

.case-section {
  padding-block: 30px;
}

.case-section h2 {
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.article-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.article-list a {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.article-list a:hover {
  color: var(--brand-blue);
  text-decoration: none;
}

.article-list span {
  color: var(--muted);
}

@media (max-width: 1100px) {
  .appbar {
    position: static;
    width: auto;
    grid-template-rows: none;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 14px 18px;
  }

  .appbar-brand {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .appbar-links {
    display: flex;
    flex-wrap: wrap;
  }

  .appbar-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .appbar-links a {
    border-bottom: 0;
  }

  .shell {
    margin-left: 0;
  }

  .primary-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .section-grid {
    grid-template-columns: 1fr;
    border-top: 1px solid var(--line-strong);
  }

  .section-entry {
    padding: 22px 0;
    border-bottom: 1px solid var(--line);
  }

  .section-entry + .section-entry {
    padding-left: 0;
    border-left: 0;
  }

  .legal-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .shell {
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    margin: 0 auto;
    padding: 20px 0 44px;
  }

  .appbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    max-width: 100%;
    min-width: 0;
    padding: 14px;
    overflow: hidden;
  }

  .appbar-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    justify-content: stretch;
  }

  .appbar-actions {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: stretch;
    gap: 8px;
    width: 100%;
  }

  .appbar-links a {
    justify-content: center;
    min-width: 0;
    min-height: 34px;
    padding: 0 8px;
    overflow-wrap: anywhere;
    text-align: center;
  }

  .topbar,
  .query-row,
  .primary-filters,
  .secondary-filters,
  .legal-filters,
  .result,
  .result-title-row,
  .results-heading,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    max-width: 100%;
    font-size: 2.45rem;
    word-break: normal;
    overflow-wrap: break-word;
  }

  .desktop-title {
    display: none;
  }

  .mobile-title,
  .mobile-title-break {
    display: block;
  }

  .subhead {
    max-width: 30ch;
    font-size: 14px;
    overflow-wrap: break-word;
  }

  .topbar {
    gap: 12px;
    padding-bottom: 16px;
    width: 100%;
    text-align: left;
  }

  .search-shell .topbar {
    padding-top: 14px;
  }

  .search-shell h1 {
    font-size: 2.25rem;
  }

  .corpus-badge {
    display: none;
  }

  .query input,
  button,
  .button {
    min-height: 50px;
  }

  .query input {
    padding: 12px 14px;
    font-size: 17px;
  }

  .search-panel {
    width: 100%;
    max-width: 100%;
    margin-top: 14px;
    padding: 14px 0;
    box-shadow: none;
  }

  .result {
    width: 100%;
    padding-left: 0;
    padding-top: 42px;
    overflow: hidden;
  }

  .result::before {
    top: 12px;
  }

  .result-side {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .result-side a {
    margin-top: 0;
  }

  .article-list a {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .document-section > p,
  .case-text {
    max-width: 100%;
  }

  .active-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .corpus-badge,
  .result-count,
  .rank {
    width: fit-content;
  }
}

@media (min-width: 761px) {
  .case-text {
    text-align: justify;
    text-justify: inter-word;
  }
}

@media (max-width: 360px) {
  .shell {
    width: calc(100vw - 28px);
    max-width: calc(100vw - 28px);
  }

  h1 {
    font-size: 2.55rem;
  }

  .appbar {
    padding: 14px;
  }

  .appbar-brand strong {
    font-size: 25px;
  }

  .appbar-links {
    gap: 2px;
  }

  .appbar-links a {
    padding: 0 10px;
  }

  .search-panel {
    padding: 12px;
  }

  .query input {
    font-size: 16px;
  }
}
