:root {
  color-scheme: light;
  --bg: #f4f4f4;
  --ink: #002855;
  --muted: #4d4d4d;
  --panel: #ffffff;
  --line: #dedede;
  --accent: #000000;
  --accent-strong: #002855;
  --gold: #c8922b;
  --soft: #f8f8f8;
  --danger: #9a2f2f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 56px;
  padding: 0 76px;
  color: #fff;
  background: #000;
  display: flex;
  justify-content: space-between;
  gap: 34px;
  align-items: center;
}

.brand-mark {
  min-width: 0;
  flex: 1;
}

.brand-mark strong {
  display: block;
  color: var(--gold);
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0;
  text-transform: none;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.top-nav {
  min-height: 38px;
  border: 0;
  border-radius: 0;
  padding: 0 13px;
  background: transparent;
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
}

.top-nav.active {
  background: transparent;
  color: #fff;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.user-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}

.logout-button {
  min-width: 96px;
  min-height: 36px;
  border: 1px solid var(--gold);
  border-radius: 0;
  background: transparent;
  color: #fff;
  font-weight: 700;
}

.logout-button:hover {
  background: var(--accent-strong);
}

.avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: #203f59;
  font-weight: 700;
}

.panel h2,
.case-view h2,
dialog h2 {
  margin: 0;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 5px;
  color: inherit;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: uppercase;
  opacity: 0.74;
}

.workspace {
  flex: 1;
  display: grid;
  grid-template-columns: 266px minmax(0, 1fr);
  gap: 8px;
  padding: 10px 14px;
  min-height: 0;
}

body.search-mode .workspace {
  grid-template-columns: 266px minmax(0, 1fr);
}

body.search-mode.case-selected:not(.results-mode) .workspace {
  grid-template-columns: 220px minmax(0, 1fr) 330px;
}

body.results-mode .workspace {
  grid-template-columns: 266px minmax(0, 1fr);
}

.sidebar,
.panel,
.case-view {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  min-width: 0;
}

.sidebar {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 0;
  background: transparent;
}

.nav-button,
.quick-actions button,
.primary-button,
#closeHistoryButton {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--soft);
  color: var(--ink);
}

.nav-button {
  text-align: left;
  padding: 8px 10px;
}

.nav-button.active,
.primary-button {
  border-color: var(--accent-strong);
  background: var(--accent);
  color: #fff;
}

.panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body:not(.search-mode) .desktop-only {
  display: none;
}

body:not(.search-mode) .results-block,
body:not(.search-mode) .nav-shortcuts,
body:not(.search-mode) .date-box,
body.search-mode .court-alert,
body.search-mode .panel-header {
  display: none;
}

body.search-mode .court-title {
  display: grid;
}

body:not(.results-mode) .result-filter,
body.results-mode .court-tree,
body.results-mode .date-box,
body.results-mode .nav-shortcuts,
body.results-mode .search-form,
body.results-mode.case-selected .case-view {
  display: none;
}

body.results-mode .results-block {
  display: flex;
}

body:not(.section-act) .act-search-layout {
  display: none;
}

body:not(.section-word) .word-search-layout {
  display: none;
}

body:not(.section-citation) .citation-search-layout {
  display: none;
}

body.section-act .search-band,
body.section-act .topic-grid,
body.section-act .advanced-grid,
body.section-act .citation-grid,
body.section-word .search-band,
body.section-word .topic-grid,
body.section-word .advanced-grid,
body.section-word .citation-grid,
body.section-citation .search-band,
body.section-citation .topic-grid,
body.section-citation .advanced-grid,
body.section-citation .citation-grid {
  display: none;
}

.court-alert {
  min-height: 40px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: red;
  font-weight: 700;
}

.court-tree,
.subscription-box,
.nav-shortcuts,
.date-box,
.result-filter {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.court-tree {
  overflow: hidden;
}

.court-options label {
  min-height: 46px;
  border-bottom: 1px solid #edf0f4;
}

.court-title,
.search-band {
  min-height: 28px;
  display: grid;
  align-items: center;
  padding: 0 14px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.court-tree label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 14px;
  font-weight: 700;
  color: #102c52;
}

.court-tree input {
  width: 15px;
  min-height: 15px;
  accent-color: var(--accent);
}

.court-root span {
  margin-left: auto;
  font-size: 20px;
}

.court-list {
  margin-left: 28px;
  max-height: 252px;
  overflow: auto;
}

.court-list label {
  min-height: 39px;
  border-bottom: 1px solid #edf0f4;
  padding: 8px 12px 8px 0;
  font-size: 14px;
}

.muted-root input {
  accent-color: #c5ccdb;
}

.nav-shortcuts {
  display: grid;
  gap: 6px;
  padding: 8px;
}

.subscription-box {
  margin-top: auto;
  overflow: hidden;
}

.member-login-box {
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
}

.member-login-box h2 {
  margin: 0 0 10px;
  padding: 10px 18px;
  background: var(--accent);
  color: #fff;
  font-size: 18px;
}

.member-login-box label {
  display: block;
  padding: 0 10px 8px;
}

.member-login-box input {
  min-height: 36px;
}

.member-login-box button {
  width: calc(100% - 20px);
  min-height: 36px;
  margin: 2px 10px 8px;
  border: 0;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.member-login-box p {
  margin: 0;
  padding: 0 10px 10px;
  color: var(--muted);
  font-size: 13px;
}

body.search-mode .subscription-box {
  display: none;
}

.date-box {
  overflow: hidden;
  padding: 0 14px 8px;
}

.date-box h2 {
  margin: 0 -14px 12px;
  padding: 10px 18px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
}

.date-box label {
  position: relative;
  display: block;
  margin-bottom: 6px;
}

.date-box label span {
  position: absolute;
  left: 12px;
  top: 50%;
  margin: 0;
  transform: translateY(-50%);
  color: #7785a3;
  pointer-events: none;
}

.date-box input {
  padding-left: 12px;
  color: transparent;
}

.date-box input:focus,
.date-box input:valid {
  color: var(--ink);
}

.result-filter {
  min-height: calc(100vh - 184px);
  overflow: hidden;
}

.result-filter h2 {
  margin: 0;
  padding: 10px 28px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
}

.result-filter label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 45px;
  padding: 10px 14px;
  border-bottom: 1px solid #edf0f4;
  color: #00133b;
  font-weight: 700;
}

.result-filter input {
  width: 16px;
  min-height: 16px;
  accent-color: #c7cede;
}

.result-filter span {
  color: var(--gold);
  font-weight: 400;
}

.subscription-box h2 {
  margin: 0 0 8px;
  padding: 10px 18px;
  background: var(--accent);
  color: #fff;
  font-size: 18px;
}

.subscription-box p {
  margin: 0;
  padding: 0 10px 7px;
  color: #000;
  font-size: 14px;
}

.panel-header,
.results-toolbar,
.dialog-header,
.case-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.case-actions {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}

.case-actions button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--soft);
  padding: 6px 10px;
}

.quick-actions {
  display: flex;
  gap: 8px;
}

.quick-actions button,
#closeHistoryButton {
  padding: 0 12px;
}

.view {
  display: none;
  padding: 0;
}

.view.active {
  display: block;
}

.dashboard-tabs {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 60px;
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 3px;
  padding: 8px 10px 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.tab {
  min-height: 42px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  padding: 0 18px;
  background: #e9e9e9;
  color: #222;
  white-space: nowrap;
}

.tab.active {
  background: #fff;
  color: #0f3156;
  font-weight: 700;
}

.dashboard-actions {
  margin-left: auto;
  align-self: center;
  display: flex;
  gap: 5px;
}

.dashboard-actions button {
  min-height: 38px;
  border: 0;
  border-radius: 0;
  background: var(--gold);
  color: #fff;
  padding: 0 12px;
  font-weight: 700;
}

.dashboard-home {
  min-height: 270px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 26px 18px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.dashboard-home p,
.dashboard-home h2,
.dashboard-home h3 {
  margin: 0;
}

.dashboard-home h2 {
  font-size: 28px;
  line-height: 1.15;
}

.dashboard-home h3 {
  font-size: 25px;
  line-height: 1.2;
  font-weight: 400;
}

.dashboard-tagline {
  margin-top: 84px !important;
}

.dashboard-updated {
  margin-top: 80px !important;
}

.latest-heading {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.latest-heading h2 {
  margin: 0;
  font-size: 20px;
}

.latest-list {
  height: auto;
  min-height: 260px;
  overflow: auto;
  background: #fff;
}

.latest-case {
  width: 100%;
  border: 0;
  border-radius: 0;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 85px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: #0f3156;
  text-align: left;
}

.latest-case:hover,
.latest-case.selected {
  background: #f7fbff;
}

.date-card {
  display: grid;
  grid-template-columns: 36px 1fr;
  width: 88px;
  min-height: 58px;
  border: 1px solid #d4d4d4;
  box-shadow: 0 1px 4px rgba(0,0,0,0.14);
  background: #fff;
}

.date-card strong {
  display: grid;
  place-items: center;
  background: var(--gold);
  color: #fff;
  font-size: 24px;
}

.date-card span {
  display: grid;
  place-items: center;
  color: #0f3156;
  font-size: 13px;
  line-height: 1.15;
}

.case-line {
  margin: 0 0 5px;
  font-size: 14px;
  line-height: 1.35;
}

.case-line strong {
  font-weight: 800;
}

.case-line em {
  color: #111;
}

.case-court {
  font-style: italic;
}

.case-citation {
  margin: 0;
  color: #000;
  font-size: 14px;
  font-weight: 700;
}

.latest-empty {
  padding: 18px;
  color: var(--muted);
}

.welcome-stats {
  display: none;
}

.summary-number {
  display: block;
  color: var(--accent-strong);
  font-size: 30px;
  font-weight: 700;
}

.summary-label {
  color: var(--muted);
  font-size: 13px;
}

.floating-help {
  position: fixed;
  right: 0;
  top: 375px;
  z-index: 3;
  display: grid;
}

.floating-help button {
  width: 44px;
  height: 44px;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,0.25);
  background: var(--accent);
  color: #fff;
  font-size: 0;
}

.floating-help button::first-letter {
  font-size: 18px;
}

.search-form {
  padding: 0 20px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.act-search-layout {
  padding: 12px 0 0;
}

.act-search-tabs {
  display: flex;
  align-items: end;
  padding-left: 0;
  border-bottom: 1px solid var(--line);
}

.act-search-tab {
  min-width: 130px;
  min-height: 33px;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: var(--soft);
  color: var(--ink);
  font-weight: 700;
}

.act-search-tab.active {
  background: #fff;
  border-top: 2px solid var(--gold);
}

.act-search-body {
  display: grid;
  grid-template-columns: 204px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0 0;
}

.act-filter-panel h3 {
  margin: 10px 0 8px;
  color: var(--ink);
  font-size: 15px;
}

.radio-box {
  display: grid;
  gap: 7px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.radio-box label {
  display: flex;
  align-items: center;
  gap: 7px;
}

.radio-box input {
  width: 14px;
  min-height: 14px;
  accent-color: var(--gold);
}

.act-search-row {
  display: grid;
  grid-template-columns: 38px minmax(220px, 310px) 96px;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.act-search-row label {
  color: var(--ink);
  font-weight: 700;
  text-align: right;
}

#actSearchInput {
  background: #ffff88;
}

.act-search-row button,
.selected-acts button {
  min-height: 30px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--ink);
  font-weight: 700;
}

.acts-list {
  height: 212px;
  overflow: auto;
  border: 1px solid var(--line);
  background: #fff;
}

.acts-list button {
  width: 100%;
  min-height: 21px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 1px 10px;
  background: #fff;
  color: #000;
  text-align: left;
}

.acts-list button:hover,
.acts-list button.selected {
  background: #fffaf0;
}

.act-help {
  margin: 6px 0;
  color: var(--ink);
  font-weight: 700;
}

.selected-acts {
  display: grid;
  gap: 7px;
}

.selected-acts strong {
  color: var(--ink);
}

.selected-acts label {
  display: grid;
  grid-template-columns: 22px minmax(220px, 360px) 72px;
  gap: 12px;
  align-items: center;
  color: var(--ink);
  font-weight: 700;
}

.selected-acts input {
  background: #bfd7ef;
}

.act-search-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: -31px;
  padding-right: 102px;
}

.word-search-layout {
  padding: 12px 0 0;
}

.word-main {
  min-height: 383px;
  position: relative;
  border-bottom: 2px solid var(--accent);
}

.word-input-label {
  display: grid;
  gap: 6px;
  width: 204px;
}

.word-input-label span {
  color: var(--ink);
  font-weight: 700;
}

#wordSearchInput {
  background: #ffff88;
}

.word-options-grid {
  display: grid;
  grid-template-columns: 192px 168px;
  gap: 18px 12px;
  width: 384px;
  margin-top: 14px;
}

.word-options-grid h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 15px;
}

.combination-search {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 20px;
  padding: 5px 14px 5px 0;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.combination-search input {
  width: 14px;
  min-height: 14px;
  accent-color: var(--gold);
}

.word-search-actions {
  position: absolute;
  right: 84px;
  bottom: 8px;
}

.search-footer-title {
  min-height: 200px;
  display: grid;
  place-items: start center;
  padding-top: 24px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
}

.citation-search-layout {
  padding: 12px 0 0;
}

.citation-main {
  min-height: 383px;
  position: relative;
  display: grid;
  grid-template-columns: 540px minmax(360px, 1fr);
  gap: 36px;
  padding: 0 12px 0 0;
  border-bottom: 2px solid var(--accent);
}

.journal-panel {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0;
  align-content: start;
}

.journal-panel > strong {
  padding-top: 2px;
  color: var(--ink);
}

.journal-list {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #999;
  background: #fff;
}

.journal-list button {
  width: 100%;
  min-height: 21px;
  display: grid;
  grid-template-columns: 145px 1fr;
  gap: 2px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid #bdbdbd;
  border-radius: 0;
  background: #fff;
  color: #000;
  padding: 1px 4px;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.journal-list button:hover,
.journal-list button.selected {
  background: #ffff88;
}

.journal-list span {
  color: #000;
  font-weight: 400;
}

.citation-fields {
  display: grid;
  grid-template-columns: 72px 324px;
  gap: 12px 0;
  align-content: start;
  padding-top: 12px;
}

.citation-fields label {
  display: contents;
}

.citation-fields label span,
.searching-for span {
  color: var(--ink);
  font-weight: 700;
}

.citation-fields input,
.citation-fields select,
.searching-for input {
  min-height: 24px;
  border-radius: 0;
  padding: 2px 6px;
}

.citation-fields select {
  width: 132px;
}

.searching-for {
  grid-column: 2;
  display: grid;
  gap: 7px;
  margin-top: 34px;
}

.citation-search-actions {
  position: absolute;
  right: 84px;
  bottom: 8px;
}

.topic-grid,
.advanced-grid,
.citation-grid {
  display: grid;
  gap: 18px 30px;
  padding: 18px 14px 24px;
}

.topic-grid {
  grid-template-columns: minmax(280px, 1fr) 206px 100px;
  align-items: center;
}

.advanced-grid {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.citation-grid {
  grid-template-columns: 138px 138px 138px 138px 108px 98px;
  align-items: center;
  gap: 18px 30px;
  padding-bottom: 0;
}

.act-field {
  grid-column: span 1;
}

.free-text {
  grid-column: 1 / 2;
}

.search-default {
  min-width: 160px;
}

label span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 13px;
}

input,
select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
}

.topic-grid input,
.topic-grid select,
.advanced-grid input,
.citation-grid select,
.date-box input {
  min-height: 42px;
  border-color: #d8d8d8;
  border-radius: 4px;
}

.act-field span,
.search-default span {
  display: inline-block;
  width: auto;
  margin: -12px 0 0 8px;
  padding: 0 4px;
  background: #fff;
  color: #0073ff;
  font-size: 12px;
}

.act-field input {
  border-color: #1686ff;
}

.add-more-button,
.clear-button {
  min-height: 42px;
  border: 0;
  border-radius: 5px;
  padding: 0 18px;
  background: #3b6183;
  color: #fff;
  font-weight: 700;
}

.clear-button,
.citation-grid .primary-button {
  background: var(--gold);
  border: 0;
  color: #fff;
}

.check-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  color: #00133b;
  font-weight: 700;
}

.near-option {
  display: grid;
  grid-template-columns: auto 50px auto;
  align-items: center;
  gap: 10px;
  color: #00133b;
  font-weight: 700;
}

.near-option input {
  min-height: 42px;
  padding: 6px;
}

input:focus,
select:focus,
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.option-row {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.check-option input {
  width: 16px;
  min-height: 16px;
  accent-color: #c7cede;
}

.primary-button {
  margin-left: 0;
  padding: 0 18px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.utility-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(190px, 1fr));
  gap: 8px 16px;
}

.results-block {
  flex: 1;
  min-height: 0;
  display: none;
  flex-direction: column;
  background: #fff;
}

.results-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0 12px;
  border-bottom: 1px solid #e5e5e5;
}

.results-heading h2 {
  margin: 0;
  color: #001852;
  font-size: 22px;
  font-weight: 400;
}

.results-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-box {
  display: grid;
  grid-template-columns: 116px 36px;
  align-items: center;
}

.filter-box input {
  border-radius: 3px 0 0 3px;
  min-height: 38px;
}

.filter-box button {
  min-height: 38px;
  border: 0;
  border-radius: 0 3px 3px 0;
  background: #2e5c86;
  color: #fff;
  font-size: 0;
}

.filter-box button::first-letter {
  font-size: 16px;
}

.sort-box {
  position: relative;
  width: 264px;
}

.sort-box span {
  position: absolute;
  top: -10px;
  left: 12px;
  z-index: 1;
  padding: 0 4px;
  background: #fff;
  color: #0073ff;
  font-size: 12px;
}

.sort-box select {
  min-height: 38px;
}

.refine-button,
.icon-button {
  min-height: 39px;
  border: 0;
  border-radius: 4px;
  background: #3b6183;
  color: #fff;
  padding: 0 12px;
  font-weight: 700;
}

.icon-button {
  width: 48px;
  padding: 0;
  font-size: 0;
}

.icon-button::first-letter {
  font-size: 16px;
}

.results-meta {
  display: flex;
  gap: 24px;
  align-items: center;
  min-height: 31px;
  border-bottom: 1px solid #e5e5e5;
  color: #000;
  font-size: 14px;
}

.results-meta label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.results-meta input {
  width: 16px;
  min-height: 16px;
  accent-color: #c7cede;
}

.result-summary {
  padding: 17px 0 8px 44px;
  color: #1c2f43;
  font-size: 16px;
}

.result-summary::first-letter {
  color: inherit;
}

.result-list {
  height: calc(100vh - 312px);
  min-height: 360px;
  overflow: auto;
}

.result-item {
  width: 100%;
  border: 0;
  border-radius: 0;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 13px 0;
  border-bottom: 1px solid #e8e8e8;
  background: #fff;
  color: #12395b;
  text-align: left;
}

.result-item:hover,
.result-item.selected {
  background: #f8fbff;
}

.result-check {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  background: #c7cede;
}

.result-title {
  display: block;
  color: #12395b;
  font-size: 14px;
  line-height: 1.45;
}

.result-title strong {
  font-weight: 800;
}

.result-title em,
.result-title span {
  color: #0f3156;
  font-style: italic;
}

.result-citation {
  display: block;
  margin-top: 5px;
  color: #0a1c2d;
  font-size: 14px;
  font-weight: 700;
}

.result-empty {
  padding: 18px 0;
  color: var(--muted);
}

.case-view {
  display: none;
  flex-direction: column;
  min-height: 0;
}

body.search-mode.case-selected:not(.results-mode) .case-view {
  display: flex;
}

.case-details {
  overflow: auto;
  padding: 16px;
  line-height: 1.5;
}

.judgement-view {
  color: #111;
  background: #fff;
  font-family: "Times New Roman", Georgia, serif;
  font-size: 17px;
  line-height: 1.55;
}

.judgement-court {
  text-align: center;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.judgement-view h1 {
  margin: 0 0 12px;
  text-align: center;
  font-size: 22px;
  line-height: 1.35;
}

.judgement-view h1 span {
  display: block;
  margin: 5px 0;
  font-size: 15px;
  font-weight: 400;
  text-transform: uppercase;
}

.judgement-view .meta-line {
  text-align: center;
  margin-bottom: 8px;
}

.judgement-view section {
  margin-top: 16px;
}

.judgement-view h2 {
  margin: 0 0 6px;
  font-size: 18px;
  text-align: left;
}

.judgement-view p {
  margin: 0;
  text-align: justify;
}

.case-details dl {
  margin: 0;
}

.case-details dt {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.case-details dd {
  margin: 2px 0 0;
}

.badge {
  display: inline-block;
  border-radius: 4px;
  padding: 3px 7px;
  background: #efe4c7;
  color: #553f10;
}

dialog {
  width: min(760px, calc(100vw - 28px));
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0;
}

dialog::backdrop {
  background: rgba(16, 24, 32, 0.45);
}

#historyBody td:first-child {
  width: 130px;
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .main-nav {
    overflow-x: auto;
  }

  .form-grid,
  .welcome-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .topbar {
    min-height: auto;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
  }

  .main-nav {
    width: 100%;
  }

  .brand-mark {
    width: auto;
  }

  .panel-header,
  .results-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .workspace {
    grid-template-columns: 1fr;
    padding: 8px;
  }

  .sidebar {
    display: flex;
  }

  .form-grid,
  .welcome-grid,
  .summary-grid,
  .utility-grid {
    grid-template-columns: 1fr;
  }

  .primary-button {
    margin-left: 0;
    width: 100%;
  }

  .latest-list {
    height: auto;
    min-height: 360px;
  }

  .latest-case {
    grid-template-columns: 1fr;
  }

  .floating-help {
    display: none;
  }
}

@media print {
  body {
    background: #fff;
  }

  .topbar,
  .sidebar,
  .panel,
  .case-header,
  .case-actions {
    display: none !important;
  }

  .workspace {
    display: block;
    padding: 0;
  }

  .case-view {
    display: block;
    border: 0;
  }

  .case-details {
    padding: 0;
    overflow: visible;
  }

  .judgement-view {
    font-size: 13pt;
  }
}

/* Current Publications inspired theme */
.workspace {
  background: #f4f4f4;
}

.panel,
.court-tree,
.date-box,
.result-filter,
.subscription-box,
.nav-shortcuts,
.case-view,
dialog {
  border-color: #d9d9d9;
  border-radius: 0;
  box-shadow: none;
}

.avatar {
  background: #fff;
  color: #000;
}

.court-alert,
.court-title,
.search-band,
.date-box h2,
.result-filter h2,
.subscription-box h2,
.floating-help button,
.nav-button.active,
.primary-button,
.clear-button,
.citation-grid .primary-button,
.add-more-button,
.refine-button,
.icon-button,
.filter-box button,
.dashboard-actions button {
  background: #000;
  color: #fff;
  border-color: #000;
}

.court-alert {
  color: var(--gold);
}

.brand-mark span,
.eyebrow,
.summary-label,
label span,
.latest-empty,
.result-empty {
  color: var(--muted);
}

.court-tree label,
.result-filter label,
.case-line,
.case-line em,
.case-court,
.result-title,
.result-title em,
.result-title span,
.result-citation,
.case-citation,
.results-heading h2,
.summary-number,
.panel h2,
.case-view h2 {
  color: #002855;
}

.court-tree input,
.result-filter input,
.check-option input,
.results-meta input {
  accent-color: var(--gold);
}

.court-list label,
.results-heading,
.results-meta,
.result-item,
.latest-case,
th,
td {
  border-color: #e5e5e5;
}

.tab {
  background: #efefef;
  color: #000;
}

.tab.active {
  background: #fff;
  color: #002855;
  border-top: 2px solid var(--gold);
}

.date-card strong,
.result-filter span {
  background: var(--gold);
  color: #fff;
}

.result-filter span {
  display: inline-block;
  background: transparent;
  color: var(--gold);
}

.date-card span,
.latest-case,
.result-item {
  color: #002855;
}

.latest-case:hover,
.latest-case.selected,
.result-item:hover,
.result-item.selected,
tbody tr:hover,
tbody tr.selected {
  background: #fbf7ef;
}

input,
select {
  border-color: #d6d6d6;
  color: #000;
}

input:focus,
select:focus,
button:focus-visible,
.act-field input {
  outline: 2px solid var(--gold);
  border-color: var(--gold);
}

.act-field span,
.search-default span,
.sort-box span {
  color: var(--gold);
}

.check-option,
.near-option,
.results-meta,
.result-summary,
.subscription-box p {
  color: #000;
}

.result-check {
  background: #d7d1c6;
}

.badge {
  background: #f1e3c8;
  color: #6b4610;
}
