[hidden] {
  display: none !important;
}

@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;600;700&family=Unbounded:wght@500;700&display=swap");

:root {
  color-scheme: light;
  --bg: #f4efe8;
  --bg-accent: #e5f0ef;
  --card: rgba(255, 255, 255, 0.94);
  --card-strong: #ffffff;
  --ink: #1b2620;
  --muted: #55645c;
  --border: rgba(27, 38, 32, 0.12);
  --accent: #1d7b7a;
  --accent-strong: #145d5c;
  --accent-soft: rgba(29, 123, 122, 0.14);
  --accent-warm: #e07a3a;
  --warning-soft: rgba(224, 122, 58, 0.14);
  --danger: #c84a3a;
  --danger-soft: rgba(200, 74, 58, 0.12);
  --shadow: 0 18px 40px rgba(27, 38, 32, 0.12);
  --radius: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", sans-serif;
  line-height: 1.6;
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(29, 123, 122, 0.08), transparent 60%),
    radial-gradient(800px 500px at 85% 0%, rgba(224, 122, 58, 0.06), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-accent) 100%);
}

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

button,
input,
select,
textarea {
  font: inherit;
}

h1,
h2,
h3,
h4,
strong {
  margin: 0;
  font-family: "Unbounded", "Manrope", sans-serif;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(1.9rem, 1.25rem + 2.1vw, 3.3rem);
  line-height: 1.04;
}

h2 {
  font-size: clamp(1.05rem, 0.95rem + 0.6vw, 1.4rem);
  line-height: 1.2;
}

p {
  margin: 0;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.shell-document {
  width: min(1560px, calc(100% - 32px));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  background: rgba(255, 255, 255, 0.64);
  backdrop-filter: blur(12px);
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.topbar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-weight: 600;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.68);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.topbar-link:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.topbar-link.is-active {
  border-color: rgba(29, 123, 122, 0.28);
  background: rgba(29, 123, 122, 0.1);
  color: var(--accent-strong);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 1rem;
}

.panel,
.stat,
.result-card,
.empty-state,
.banner {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel {
  padding: clamp(20px, 3.5vw, 30px);
}

.search-hero {
  margin-bottom: 1.25rem;
}

.hero-copy {
  display: grid;
  gap: 0.85rem;
}

.lead {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 64ch;
}

.stats,
.grid,
.stack,
.results,
.document-matches {
  display: grid;
  gap: 1rem;
}

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

.stat {
  padding: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.stat-label,
.meta,
label span,
.results-query {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}

.stat strong {
  display: block;
  margin-top: 0.55rem;
  font-size: 2rem;
  color: var(--accent-strong);
}

.banner {
  margin-bottom: 1rem;
  padding: 14px 18px;
}

.banner.success {
  border-color: rgba(29, 123, 122, 0.24);
  background: rgba(29, 123, 122, 0.08);
}

.banner.error {
  border-color: rgba(200, 74, 58, 0.24);
  background: var(--danger-soft);
}

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

.admin-header {
  margin-bottom: 1rem;
  padding: 0.35rem 0 0.1rem;
}

.admin-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}

.admin-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.admin-card--stat {
  justify-content: center;
  min-height: 180px;
}

.admin-card--action,
.admin-card--info {
  min-height: 260px;
}

.admin-card--action .stack,
.admin-card--info .admin-info-copy {
  margin-top: auto;
}

.admin-card--info {
  justify-content: space-between;
}

.admin-info-copy {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.25rem;
  color: var(--muted);
}

.stack {
  margin-top: 1rem;
}

label {
  display: grid;
  gap: 0.45rem;
}

input[type="text"],
input[type="url"],
input[type="file"] {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="url"]:focus,
input[type="file"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-form {
  position: relative;
}

body.modal-open {
  overflow: hidden;
}

.search-documents-picker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.picker-button {
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  font-weight: 700;
}

.picker-summary {
  color: rgba(27, 38, 32, 0.72);
  font-size: 0.92rem;
  font-weight: 700;
}

.search-query-input {
  min-height: 58px;
  padding-top: 15px;
  padding-bottom: 15px;
  font-size: 1.05rem;
}

.modal-backdrop.documents-picker-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(2px);
  z-index: 9998;
}

.modal.documents-picker-modal {
  position: relative;
  width: min(620px, 100%);
  max-height: min(82vh, 860px);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 18px 20px;
  text-align: left;
}

.documents-picker-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.documents-picker-header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.documents-picker-body {
  color: var(--muted);
}

.documents-picker-lead {
  margin-bottom: 18px;
}

.documents-picker-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 18px;
}

.documents-picker-actions .topbar-link {
  flex: 1 1 0;
  min-width: 150px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 1);
  color: var(--accent-strong);
}

.documents-modal-list {
  display: grid;
  gap: 0.65rem;
  max-height: calc(82vh - 180px);
  overflow: auto;
  padding-right: 4px;
}

.documents-option {
  display: flex;
  align-items: start;
  gap: 0.9rem;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.documents-option input {
  flex: 0 0 20px;
  width: 20px;
  min-width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.documents-option-copy {
  display: grid;
  gap: 0.15rem;
}

.documents-option-title {
  font-weight: 700;
  color: var(--ink);
}

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 9997;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 24, 21, 0.26);
  backdrop-filter: blur(4px);
}

.search-overlay-card {
  display: grid;
  justify-items: center;
  gap: 1rem;
  width: min(500px, calc(100% - 32px));
  padding: 28px 26px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 40px rgba(27, 38, 32, 0.14);
  text-align: center;
}

.search-overlay-copy,
.search-loading-copy {
  display: inline-flex;
  flex-direction: column;
  gap: 0.2rem;
  align-items: center;
}

.search-loading-title {
  font-weight: 700;
  line-height: 1.2;
}

.search-stage-list {
  display: grid;
  gap: 0.55rem;
  width: 100%;
  margin-top: 0.35rem;
  text-align: left;
}

.search-stage {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 0.7rem;
  align-items: start;
  padding: 9px 10px;
  border: 1px solid rgba(27, 38, 32, 0.08);
  border-radius: 12px;
  background: rgba(244, 239, 232, 0.7);
  color: rgba(27, 38, 32, 0.72);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.search-stage.is-active {
  border-color: rgba(29, 123, 122, 0.24);
  background: rgba(29, 123, 122, 0.1);
  color: var(--ink);
}

.search-stage.is-complete {
  border-color: rgba(29, 123, 122, 0.18);
  background: rgba(29, 123, 122, 0.06);
  color: rgba(27, 38, 32, 0.82);
}

.search-stage-dot {
  width: 10px;
  height: 10px;
  margin-top: 0.32rem;
  border-radius: 999px;
  background: rgba(27, 38, 32, 0.22);
}

.search-stage.is-active .search-stage-dot {
  background: var(--accent);
}

.search-stage.is-complete .search-stage-dot {
  background: var(--accent-warm);
}

.search-stage-text {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
}

.search-loading-detail {
  color: rgba(27, 38, 32, 0.72);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  min-height: 2.4em;
}

.search-loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(29, 123, 122, 0.22);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: search-spin 0.8s linear infinite;
}

.search-form.is-loading button,
.search-form button:disabled {
  transform: none;
}

.search-form.is-loading input {
  opacity: 0.92;
}

.search-overlay-spinner {
  width: 28px;
  height: 28px;
  border-width: 3px;
}

.search-overlay-actions {
  display: flex;
  justify-content: center;
  width: 100%;
}

.search-stop-button {
  min-width: 132px;
  background: var(--danger);
}

.search-stop-button:hover {
  background: #ab3425;
}

.search-form.is-stoppable [data-search-submit] {
  background: var(--danger);
  cursor: pointer;
  opacity: 1;
}

@keyframes search-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.file-drop {
  padding: 18px;
  border: 1px dashed rgba(27, 38, 32, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 50px;
  padding: 12px 18px;
  border: none;
  border-radius: 12px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

button:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.documents-picker-actions .topbar-link:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.meta {
  margin-top: 1rem;
}

.search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.55rem;
  margin-top: 1.25rem;
  align-items: start;
}

.search-form-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 0.65rem;
  align-items: stretch;
}

.search-form-side {
  display: grid;
  gap: 0.55rem;
  justify-content: end;
  justify-items: end;
}

.search-form-actions {
  display: grid;
  gap: 0.65rem;
  align-content: start;
}

.search-form [data-search-submit] {
  width: 124px;
  min-width: 124px;
}

.search-form input[type="text"] {
  font-size: 1.02rem;
}

.search-toggle {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.55rem;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  font-weight: 600;
}

.search-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.search-toggle span {
  line-height: 1.2;
}

.results-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.answer-card {
  margin-bottom: 1rem;
  background:
    linear-gradient(180deg, rgba(29, 123, 122, 0.06) 0%, rgba(255, 255, 255, 0.96) 100%),
    var(--card);
}

.answer-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.answer-text {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.75;
}

.answer-text p {
  margin: 0;
}

.answer-text p + p,
.answer-text p + ul,
.answer-text p + ol,
.answer-text ul + p,
.answer-text ol + p,
.answer-text ul + ul,
.answer-text ol + ol,
.answer-text ul + ol,
.answer-text ol + ul {
  margin-top: 0.85rem;
}

.answer-text ul,
.answer-text ol {
  margin: 0;
  padding-left: 1.35rem;
}

.answer-text li + li {
  margin-top: 0.45rem;
}

.answer-sources {
  display: grid;
  gap: 0.5rem;
  margin-top: 1rem;
}

.answer-source-link {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
  line-height: 1.45;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.answer-source-link:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.result-card,
.empty-state {
  padding: 20px;
}

.document-card {
  gap: 0.9rem;
}

.result-top {
  display: grid;
  gap: 0.35rem;
}

.result-feedback {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.15rem;
}

.results-head-side {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.result-feedback--inline {
  margin-top: 0;
  flex-wrap: nowrap;
}

.result-feedback-button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 700;
}

.result-feedback-button--icon {
  min-width: 38px;
  width: 38px;
  padding: 0;
  font-size: 1rem;
}

.result-feedback-button:hover {
  background: rgba(29, 123, 122, 0.08);
  color: var(--accent-strong);
}

.result-feedback-button.is-selected[data-feedback-vote="up"] {
  border-color: rgba(29, 123, 122, 0.28);
  background: rgba(29, 123, 122, 0.12);
  color: var(--accent-strong);
}

.result-feedback-button.is-selected[data-feedback-vote="down"] {
  border-color: rgba(200, 74, 58, 0.28);
  background: rgba(200, 74, 58, 0.12);
  color: var(--danger);
}

.result-feedback-note {
  color: rgba(27, 38, 32, 0.68);
  font-size: 0.82rem;
  font-weight: 700;
}

.result-top strong {
  font-size: 1rem;
  line-height: 1.35;
  color: var(--ink);
}

.document-result-title {
  display: block;
  margin-bottom: 0.75rem;
}

.document-matches {
  gap: 0;
}

.match-item {
  padding: 0;
}

.match-divider {
  height: 1px;
  margin: 16px 0;
  background: linear-gradient(
    90deg,
    rgba(224, 122, 58, 0.06) 0%,
    rgba(224, 122, 58, 0.42) 18%,
    rgba(224, 122, 58, 0.14) 82%,
    rgba(224, 122, 58, 0.05) 100%
  );
}

.result-link {
  display: block;
  color: inherit;
}

.result-snippet {
  color: var(--ink);
  line-height: 1.7;
  transition: color 0.2s ease;
}

.result-link:hover .result-snippet {
  color: var(--accent-strong);
}

mark {
  background: rgba(224, 122, 58, 0.22);
  color: #8a4616;
  border-radius: 6px;
  padding: 0 0.18em;
  font-weight: 700;
}

.empty-state {
  color: var(--muted);
}

.document-view,
.document-body {
  margin-top: 1rem;
}

.document-header {
  display: grid;
  gap: 1rem;
}

.document-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  font-weight: 600;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.back-button:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.document-title {
  font-size: clamp(1.45rem, 1.15rem + 0.95vw, 2.15rem);
  line-height: 1.12;
  max-width: none;
}

.document-query-note {
  margin-top: 1rem;
  font-size: 0.98rem;
}

.document-body {
  background: rgba(255, 255, 255, 0.9);
  margin-bottom: 7rem;
}

.document-search-dock-wrap {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 20;
}

.document-search-dock {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 16px 36px rgba(27, 38, 32, 0.16);
  backdrop-filter: blur(12px);
}

.document-search-dock-center {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.document-search-dock-side {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.document-search-input {
  min-width: min(38vw, 420px);
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.document-search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(29, 123, 122, 0.12);
}

.document-search-submit {
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.document-search-submit:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.document-match-button {
  min-height: 42px;
  padding: 10px 14px;
}

.document-match-button--icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-width: 42px;
  padding: 0;
  font-size: 1.2rem;
  line-height: 1;
}

.document-match-button--top {
  text-decoration: none;
}

.document-match-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.document-match-counter {
  min-width: 58px;
  text-align: center;
  font-weight: 700;
  color: var(--accent-strong);
}

@media (max-width: 920px) {
  .document-search-dock-wrap {
    left: 16px;
    right: 16px;
    transform: none;
  }

  .document-search-dock {
    display: grid;
    grid-template-columns: auto 1fr auto;
    width: 100%;
  }

  .document-search-dock-center {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.6rem;
  }

  .document-search-input {
    min-width: 0;
    width: 100%;
  }

  .document-match-counter {
    min-width: 0;
    grid-column: 1 / -1;
  }

  .document-search-dock-side {
    align-self: stretch;
  }
}

.document-section {
  margin-top: 1.75rem;
  scroll-margin-top: 24px;
}

.document-section:first-child {
  margin-top: 0;
}

.document-anchor-alias {
  display: block;
  position: relative;
  top: -24px;
  visibility: hidden;
}

.document-inline-anchor {
  display: block;
  position: relative;
  top: -24px;
  visibility: hidden;
}

.document-inline-anchor:target + .document-line,
.document-inline-anchor:target + .document-table-wrap {
  margin-left: -10px;
  margin-right: -10px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(29, 123, 122, 0.08);
  box-shadow: inset 0 0 0 1px rgba(29, 123, 122, 0.1);
}

.document-section:target {
  margin-left: -10px;
  margin-right: -10px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(29, 123, 122, 0.08);
  box-shadow: inset 0 0 0 1px rgba(29, 123, 122, 0.1);
}

.document-section-path {
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 600;
}

.document-section-breadcrumb {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.document-section-segment {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.document-section-segment.is-current {
  background: transparent;
  color: inherit;
}

.document-section-separator {
  color: var(--muted);
  font-weight: 600;
}

.document-lines {
  display: grid;
  gap: 0.5rem;
}

.document-table-wrap {
  width: 100%;
  margin: 0.75rem 0 0.35rem;
  overflow-x: auto;
  border: 1px solid rgba(29, 123, 122, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
}

.document-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 0.96rem;
  line-height: 1.55;
}

.document-table th,
.document-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  text-align: left;
}

.document-table th {
  position: sticky;
  top: 0;
  background: rgba(29, 123, 122, 0.08);
  color: var(--accent-strong);
  font-weight: 700;
}

.document-table tbody tr:nth-child(even) td {
  background: rgba(29, 123, 122, 0.03);
}

.document-table td:first-child,
.document-table th:first-child {
  width: 76px;
  white-space: nowrap;
}

.document-line {
  white-space: pre-wrap;
  line-height: 1.82;
  font-size: 1rem;
}

.document-line--heading {
  margin-top: 0.25rem;
  font-family: "Unbounded", "Manrope", sans-serif;
  font-weight: 600;
  line-height: 1.45;
}

.document-line--roman-section {
  margin-top: 1.15rem;
  font-family: "Unbounded", "Manrope", sans-serif;
  font-size: 1.14rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
}

.document-line--list-item {
  position: relative;
}

.document-line--implicit-list-item {
  position: relative;
  padding-left: 1.2rem;
}

.document-line--implicit-list-item::before {
  content: "-";
  position: absolute;
  left: 0;
  color: var(--ink);
  font-weight: 700;
}

.document-line--paragraph {
  color: var(--ink);
}

.document-line--level-0 {
  margin-left: 0;
}

.document-line--level-1 {
  margin-left: 1rem;
}

.document-line--level-2 {
  margin-left: 2rem;
}

.document-line--level-3 {
  margin-left: 3rem;
}

.document-line--level-4 {
  margin-left: 4rem;
}

.document-line--level-5 {
  margin-left: 5rem;
}

.document-line--level-6 {
  margin-left: 6rem;
}

@media (max-width: 1100px) {
  .admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .hero,
  .grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .shell,
  .shell-document {
    width: min(100% - 20px, 1560px);
    padding-top: 20px;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .search-form,
  .results-head,
  .topbar {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-nav {
    width: 100%;
  }

  .topbar-link,
  button {
    width: 100%;
  }

  .search-form {
    grid-template-columns: 1fr;
  }

  .search-form-main {
    grid-template-columns: 1fr;
  }

  .search-form-side,
  .search-form-actions {
    justify-items: stretch;
    min-width: 0;
  }


  .search-form [data-search-submit] {
    width: 100%;
    min-width: 0;
  }

  .document-actions {
    width: 100%;
  }

  .document-actions .back-button {
    width: 100%;
  }

  .document-match-button {
    width: auto;
  }

  .document-match-button--icon {
    width: 42px;
  }

  .document-line--level-1 {
    margin-left: 0.5rem;
  }

  .document-line--level-2 {
    margin-left: 1rem;
  }

  .document-line--level-3 {
    margin-left: 1.5rem;
  }

  .document-line--level-4,
  .document-line--level-5,
  .document-line--level-6 {
    margin-left: 2rem;
  }
}
