:root {
  --ink: #182433;
  --muted: #627083;
  --line: #c8d0da;
  --blue: #174a79;
  --blue-soft: #e6eff8;
  --paper: #f7f8fa;
  --white: #fff;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: #e9edf2;
  font:
    14px/1.45 Tahoma,
    Verdana,
    sans-serif;
}
.topbar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  color: #fff;
  background: #1c4c78;
  border-bottom: 2px solid #0b2c4a;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: bold;
  letter-spacing: 0.2px;
}
.workspace {
  display: grid;
  grid-template-columns: 285px minmax(0, 1fr);
  max-width: 1440px;
  min-height: calc(100vh - 56px);
  margin: 0 auto;
  background: var(--paper);
  border-right: 1px solid #c5cdd6;
  border-left: 1px solid #c5cdd6;
}
.sidebar {
  padding: 18px 12px;
  background: #edf1f5;
  border-right: 1px solid var(--line);
}
.panel-title {
  padding: 0 8px 10px;
  color: var(--blue);
  font-size: 13px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}
.panel-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}
.panel-heading .panel-title {
  padding-bottom: 10px;
}
#clear-selection {
  padding: 1px 0;
  color: var(--blue);
  background: transparent;
  border: 0;
  font:
    11px "Segoe UI",
    Tahoma,
    sans-serif;
  cursor: pointer;
}
#clear-selection:hover {
  text-decoration: underline;
}
.document-filter input,
.search-box input {
  width: 100%;
  padding: 9px 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #aeb9c5;
  border-radius: 2px;
  font: inherit;
}
.document-filter input:focus,
.search-box input:focus {
  outline: 2px solid #8fb6d8;
  border-color: var(--blue);
}
.document-list {
  margin-top: 12px;
}
.document-item {
  display: block;
  width: 100%;
  padding: 9px 10px;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 2px;
  text-align: left;
  cursor: pointer;
}
.document-item:hover {
  background: #e0e8f0;
  border-color: #c1cedb;
}
.document-item.selected {
  color: #0d3559;
  background: var(--blue-soft);
  border-color: #a9c4dc;
  box-shadow: inset 3px 0 var(--blue);
}
.doc-id {
  display: block;
  font-weight: bold;
}
.doc-type,
.doc-meta {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.doc-meta {
  margin-top: 2px;
}
.loading {
  padding: 12px 8px;
  color: var(--muted);
}
.content {
  min-width: 0;
  padding: 28px 34px 50px;
}
.toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  color: var(--blue);
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
}
h1 {
  margin: 3px 0 0;
  font:
    bold 26px "Iowan Old Style",
    "Palatino Linotype",
    "Book Antiqua",
    Georgia,
    serif;
}
.search-box {
  display: flex;
  width: min(430px, 48%);
}
.search-box input {
  border-radius: 2px 0 0 2px;
}
.search-box button {
  padding: 0 13px;
  color: #fff;
  background: #5d7185;
  border: 1px solid #43576b;
  border-left: 0;
  border-radius: 0 2px 2px 0;
  font:
    bold 12px Tahoma,
    sans-serif;
  cursor: pointer;
}
.search-box button:hover {
  background: #415970;
}
.document-info {
  min-height: 42px;
  padding: 12px 0 4px;
  color: var(--muted);
}
.document-info strong {
  color: var(--ink);
}
.results-bar {
  display: flex;
  justify-content: space-between;
  margin: 12px 0 8px;
  padding: 8px 10px;
  color: #536477;
  background: #e7ecf1;
  border: 1px solid #ccd5de;
  font-size: 12px;
}
.results {
  display: grid;
  gap: 9px;
}
.result {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 13px;
  background: var(--white);
  border: 1px solid #cbd3dc;
  border-radius: 2px;
  box-shadow: 0 1px 2px #dce1e6;
}
.thumb {
  width: 78px;
  height: 96px;
  object-fit: cover;
  background: #dfe4e9;
  border: 1px solid #aeb9c4;
}
.result-text {
  min-width: 0;
}
.result-context {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}
.result-context strong {
  color: var(--blue);
}
.result-copy {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.result-copy mark {
  padding: 0 2px;
  background: #ffe69b;
}
.result-actions {
  display: flex;
  flex-direction: column;
  align-items: end;
  gap: 7px;
  white-space: nowrap;
}
.page-label {
  color: var(--muted);
  font-size: 12px;
}
.external-link {
  padding: 5px 8px;
  color: #174a79;
  background: #edf4fb;
  border: 1px solid #a9c4dc;
  border-radius: 2px;
  font-size: 12px;
  text-decoration: none;
}
.external-link:hover {
  background: #dbeaf7;
}
.welcome,
.empty {
  padding: 42px 20px;
  color: var(--muted);
  background: #fff;
  border: 1px dashed #bdc8d3;
  text-align: center;
}
.welcome strong {
  color: var(--ink);
  font:
    bold 18px "Iowan Old Style",
    "Palatino Linotype",
    "Book Antiqua",
    Georgia,
    serif;
}
.welcome p {
  margin-bottom: 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
@media (max-width: 760px) {
  .topbar {
    padding: 0 14px;
  }
  .workspace {
    display: block;
  }
  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .document-list {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    margin-top: 10px;
    padding-bottom: 2px;
  }
  .document-item {
    min-width: 190px;
  }
  .content {
    padding: 22px 14px 38px;
  }
  .toolbar {
    display: block;
  }
  .search-box {
    width: 100%;
    margin-top: 16px;
  }
  .result {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
  }
  .thumb {
    width: 58px;
    height: 75px;
  }
  .result-actions {
    grid-column: 2;
    flex-direction: row;
    align-items: center;
  }
  .result-copy {
    font-size: 13px;
  }
}
