:root {
  --bg: #f4efe3;
  --panel: #fbf8f1;
  --panel-strong: #f8f3e7;
  --ink: #1f1d19;
  --muted: #625b52;
  --line: #d9cfbc;
  --accent: #8c3b2a;
  --accent-soft: rgba(140, 59, 42, 0.12);
  --coverage: #36584f;
  --coverage-soft: rgba(54, 88, 79, 0.12);
  --shadow: 0 18px 40px rgba(47, 35, 18, 0.08);
  --ui-font: "Avenir Next", "Gill Sans", "Trebuchet MS", sans-serif;
  --serif-font: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "URW Palladio L", serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(140, 59, 42, 0.12), transparent 30%),
    linear-gradient(180deg, #f8f3e9 0%, var(--bg) 35%, #efe6d4 100%);
  color: var(--ink);
  font-family: var(--ui-font);
}

.page-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(244, 239, 227, 0.52);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: opacity 180ms ease, visibility 180ms ease;
}

.page-loading-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.page-loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 22px 28px;
  border: 1px solid rgba(93, 75, 49, 0.14);
  border-radius: 22px;
  background: rgba(251, 248, 241, 0.86);
  box-shadow: 0 18px 40px rgba(47, 35, 18, 0.08);
}

.page-loading-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(140, 59, 42, 0.14);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: ddp-spin 0.9s linear infinite;
}

.page-loading-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

@keyframes ddp-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

button,
input,
select {
  font: inherit;
}

button:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.page-shell {
  position: relative;
  width: min(1480px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.page-anchors {
  position: fixed;
  right: 18px;
  bottom: 18px;
  right: 18px;
  z-index: 20;
  display: grid;
  gap: 10px;
  transform: none;
}

.anchor-link {
  min-width: 124px;
  padding: 9px 12px;
  border: 1px solid rgba(93, 75, 49, 0.18);
  border-radius: 999px;
  background: rgba(251, 248, 241, 0.92);
  color: var(--muted);
  box-shadow: 0 10px 24px rgba(47, 35, 18, 0.08);
  font-size: 0.8rem;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  transition: transform 140ms ease, color 140ms ease, border-color 140ms ease, background 140ms ease;
}

.anchor-link:hover,
.anchor-link.is-active {
  transform: translateX(-2px);
  border-color: rgba(140, 59, 42, 0.35);
  background: rgba(140, 59, 42, 0.12);
  color: var(--ink);
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 302px;
  z-index: 22;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(93, 75, 49, 0.18);
  border-radius: 999px;
  background: rgba(251, 248, 241, 0.94);
  box-shadow: 0 12px 24px rgba(47, 35, 18, 0.12);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(140, 59, 42, 0.34);
  background: rgba(140, 59, 42, 0.1);
}

.back-nav-button {
  position: fixed;
  right: 22px;
  bottom: 238px;
  z-index: 22;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(93, 75, 49, 0.18);
  border-radius: 999px;
  background: rgba(251, 248, 241, 0.94);
  box-shadow: 0 12px 24px rgba(47, 35, 18, 0.12);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.back-nav-button:hover,
.back-nav-button:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(140, 59, 42, 0.34);
  background: rgba(140, 59, 42, 0.1);
  color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(460px, 1fr);
  gap: 20px;
  margin-bottom: 20px;
  align-items: stretch;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.panel h2,
.future-hooks h3 {
  margin: 0;
  font-family: var(--serif-font);
  font-weight: 700;
}

.hero h1 {
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 1.05;
}

.hero-copy {
  max-width: 54rem;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.eyebrow-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.eyebrow-row .eyebrow {
  margin-bottom: 0;
}

.hero-credit {
  max-width: 58rem;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.hero-credit a {
  color: var(--accent);
}

.hero-actions {
  margin-top: 14px;
}

.hero-stats {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
}

.hero-stats > * {
  width: min(100%, 760px);
  min-height: 100%;
}

.stat-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.stat-card,
.panel {
  border: 1px solid rgba(93, 75, 49, 0.14);
  border-radius: 20px;
  background: rgba(251, 248, 241, 0.88);
  box-shadow: var(--shadow);
}

.stat-card {
  padding: 16px;
  backdrop-filter: blur(8px);
}

.quick-jump-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 14px;
  min-height: 100%;
  padding: 16px;
  border: 1px solid rgba(93, 75, 49, 0.14);
  border-radius: 20px;
  background: rgba(251, 248, 241, 0.92);
  box-shadow: var(--shadow);
}

.quick-jump-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.quick-jump-title-row {
  align-items: center;
}

.ui-language-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ui-language-chip {
  padding: 4px 8px;
  border: 1px solid rgba(93, 75, 49, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 0.76rem;
  cursor: pointer;
}

.ui-language-chip.is-active {
  border-color: rgba(140, 59, 42, 0.34);
  background: rgba(140, 59, 42, 0.1);
  color: var(--ink);
}

.guide-button-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 0.94rem;
  font-style: normal;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.55;
  min-height: auto;
  align-self: baseline;
  text-decoration: underline;
  text-underline-offset: 0.14em;
  white-space: nowrap;
  vertical-align: baseline;
}

.guide-button-inline:hover,
.guide-button-inline:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.reading-result-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--coverage);
  cursor: pointer;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
}

.reading-result-link:hover,
.reading-result-link:focus-visible {
  color: var(--coverage);
  text-decoration: none;
  opacity: 0.86;
}

.occurrence-inline-link {
  display: block;
  justify-content: flex-start;
  color: var(--coverage);
  font-weight: 700;
  white-space: normal;
  text-align: left;
  line-height: 1.45;
}

.stat-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.workspace-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}

.coverage-panel {
  grid-column: auto;
}

.records-panel {
  grid-column: auto;
}

.scholar-panel {
  grid-column: auto;
}

.compare-panel {
  grid-column: auto;
}

.sample-browser-panel {
  margin-bottom: 20px;
  padding: 18px 18px 20px;
}

.sample-browser-head {
  align-items: center;
}

.browser-summary {
  max-width: 42rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.sample-legend,
.sample-browser {
  display: grid;
  gap: 10px;
}

.sample-legend {
  grid-template-columns: repeat(auto-fit, minmax(150px, max-content));
  margin: 12px 0 16px;
}

.legend-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(93, 75, 49, 0.14);
  background: rgba(248, 243, 231, 0.9);
  color: var(--muted);
  font-size: 0.84rem;
}

.sample-browser {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.cantica-column {
  min-width: 0;
  padding: 14px 14px 12px;
  border: 1px solid rgba(93, 75, 49, 0.16);
  border-radius: 0;
  background: rgba(252, 248, 239, 0.9);
}

.cantica-column:first-child {
  border-radius: 18px 0 0 18px;
}

.cantica-column:last-child {
  border-radius: 0 18px 18px 0;
}

.cantica-column:not(:last-child) {
  border-right-width: 0;
}

.cantica-column-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.cantica-column h3 {
  margin: 0;
  font-family: var(--serif-font);
  font-size: 1.16rem;
}

.cantica-column p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.cantica-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border: 1px solid transparent;
}

.sample-status-badge {
  justify-content: center;
}

.status-unknown {
  border-color: rgba(93, 75, 49, 0.18);
  background: rgba(93, 75, 49, 0.1);
  color: #5a4d3e;
}

.status-full-demo-ready {
  border-color: rgba(54, 88, 79, 0.26);
  background: rgba(54, 88, 79, 0.12);
  color: #29443e;
}

.status-semantic-fields-ready {
  border-color: rgba(140, 59, 42, 0.22);
  background: rgba(140, 59, 42, 0.11);
  color: #7a3224;
}

.status-coverage-only {
  border-color: rgba(151, 122, 50, 0.24);
  background: rgba(151, 122, 50, 0.12);
  color: #7b6529;
}

.status-shell-only,
.status-incomplete {
  border-color: rgba(93, 75, 49, 0.18);
  background: rgba(93, 75, 49, 0.1);
  color: #5a4d3e;
}

.status-not-mounted {
  border-color: rgba(93, 75, 49, 0.14);
  background: rgba(93, 75, 49, 0.06);
  color: #7a6d5e;
}

.canto-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 8px;
  border: 1px solid rgba(93, 75, 49, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  color: inherit;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.canto-chip:hover,
.canto-chip.is-active {
  transform: translateY(-1px);
  border-color: rgba(140, 59, 42, 0.32);
  box-shadow: 0 10px 20px rgba(47, 35, 18, 0.08);
}

.canto-chip.is-active {
  outline: 2px solid rgba(140, 59, 42, 0.22);
  outline-offset: 1px;
}

.canto-chip:disabled {
  cursor: default;
  opacity: 0.74;
  box-shadow: none;
  transform: none;
}

.canto-chip-number {
  font-family: var(--serif-font);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.quick-jump-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.quick-jump-input-row input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid rgba(93, 75, 49, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
}

.quick-jump-input-row input:focus {
  outline: 2px solid rgba(140, 59, 42, 0.18);
  outline-offset: 1px;
  border-color: rgba(140, 59, 42, 0.34);
}

.quick-jump-button {
  padding: 11px 14px;
  border: 1px solid rgba(140, 59, 42, 0.22);
  border-radius: 14px;
  background: rgba(140, 59, 42, 0.1);
  color: var(--ink);
  cursor: pointer;
}

.search-results-shell {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 12;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(93, 75, 49, 0.14);
  border-radius: 18px;
  background: rgba(251, 248, 241, 0.98);
  box-shadow: 0 20px 36px rgba(47, 35, 18, 0.14);
  max-height: min(58vh, 520px);
  overflow: auto;
}

.search-results-shell[hidden] {
  display: none !important;
}

.search-results-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.search-results-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.search-result-card,
.search-result-empty {
  padding: 11px 12px;
  border: 1px solid rgba(93, 75, 49, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.search-result-card {
  display: block;
  color: inherit;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
}

.search-result-card.source-line_text {
  background: linear-gradient(180deg, rgba(231, 241, 236, 0.92), rgba(255, 255, 255, 0.72));
}

.search-result-card.source-commentary {
  background: linear-gradient(180deg, rgba(243, 236, 227, 0.92), rgba(255, 255, 255, 0.74));
}

.search-layer-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.search-layer-badge.source-line_text {
  background: rgba(54, 88, 79, 0.12);
  color: var(--coverage);
}

.search-layer-badge.source-commentary {
  background: rgba(140, 59, 42, 0.12);
  color: var(--accent);
}

.search-result-top,
.search-result-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.search-result-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}

.search-result-meta,
.search-result-top span {
  color: var(--muted);
  font-size: 0.82rem;
}

.search-result-empty {
  color: var(--muted);
  line-height: 1.5;
}

.panel {
  padding: 18px;
}

.panel-head,
.compare-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.compare-head {
  justify-content: space-between;
}

.compare-head-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.panel-title-block {
  min-width: 0;
}

.title-with-help {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.section-title-with-help {
  margin-bottom: 4px;
}

.help-trigger {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid rgba(93, 75, 49, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.help-trigger:hover,
.help-trigger:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(140, 59, 42, 0.34);
  background: rgba(140, 59, 42, 0.1);
  color: var(--accent);
}

.panel-note,
.line-context,
.compare-summary,
.meta-row,
.record-preview,
.empty-state,
.future-hook p {
  color: var(--muted);
}

.panel-note {
  max-width: 18rem;
  margin: 4px 0 0;
  font-size: 0.92rem;
  line-height: 1.45;
}

.help-modal-lead {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.65;
}

.help-modal-body {
  display: grid;
  gap: 14px;
}

.help-section {
  padding: 14px 15px;
  border: 1px solid rgba(93, 75, 49, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
}

.help-section h3 {
  margin: 0 0 8px;
  font-family: var(--ui-font);
  font-size: 0.96rem;
}

.help-paragraph {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}

.help-paragraph + .help-paragraph {
  margin-top: 10px;
}

.help-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.65;
}

.help-popup-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(140, 59, 42, 0.1), transparent 28%),
    linear-gradient(180deg, #f8f3e9 0%, var(--bg) 38%, #efe6d4 100%);
}

.help-popup-shell {
  width: min(960px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.help-popup-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.help-popup-head h1 {
  margin: 0;
  font-family: var(--serif-font);
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.08;
}

.coverage-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.legend-gradient {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(54, 88, 79, 0.08), rgba(54, 88, 79, 0.9));
}

.coverage-list,
.records-list,
.compare-list,
.future-hook-grid,
.analysis-metrics,
.analysis-era-list,
.semantic-field-grid,
.semantic-refer-list {
  display: grid;
  gap: 10px;
}

.coverage-list {
  max-height: 70vh;
  overflow: auto;
  padding-right: 2px;
}

.coverage-row {
  width: 100%;
  padding: 12px 12px 12px 14px;
  border: 1px solid rgba(54, 88, 79, 0.14);
  border-radius: 16px;
  background: linear-gradient(
    90deg,
    rgba(54, 88, 79, calc(0.1 + var(--visual-ratio, var(--ratio)) * 0.34)) 0,
    rgba(54, 88, 79, calc(0.05 + var(--visual-ratio, var(--ratio)) * 0.16)) calc(10% + var(--visual-ratio, var(--ratio)) * 82%),
    rgba(255, 255, 255, 0.48) calc(10% + var(--visual-ratio, var(--ratio)) * 82%),
    rgba(255, 255, 255, 0.72) 100%
  );
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.coverage-row:hover,
.coverage-row.is-active {
  transform: translateY(-1px);
  border-color: rgba(54, 88, 79, 0.45);
  box-shadow: 0 12px 24px rgba(54, 88, 79, 0.12);
}

.coverage-row.is-jump-focus {
  border-color: rgba(140, 59, 42, 0.42);
  box-shadow: 0 0 0 2px rgba(140, 59, 42, 0.12), 0 12px 24px rgba(54, 88, 79, 0.14);
}

.coverage-panel.is-jump-focus {
  box-shadow: 0 0 0 2px rgba(140, 59, 42, 0.1), 0 18px 34px rgba(140, 59, 42, 0.08);
}

.coverage-row.is-shell {
  border-style: dashed;
}

.coverage-line-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.line-number {
  min-width: 54px;
  font-family: var(--serif-font);
  font-size: 1.08rem;
  font-weight: 700;
}

.coverage-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(140, 59, 42, 0.28);
}

.coverage-link:hover,
.coverage-link:focus-visible {
  color: var(--accent);
  border-bottom-color: rgba(140, 59, 42, 0.72);
}

.coverage-count {
  color: var(--coverage);
  font-size: 0.88rem;
  font-weight: 700;
}

.line-text {
  margin-top: 6px;
  color: var(--muted);
  font-family: var(--serif-font);
  font-size: 1.16rem;
  line-height: 1.45;
}

.coverage-line-locus-stream {
  display: block;
  margin: 6px 0 0;
}

.coverage-row .line-locus-token {
  min-height: 0;
  padding: 0;
  font-size: 1.14rem;
}

.coverage-row .line-locus-token.is-selectable {
  box-shadow: inset 0 -0.34em rgba(54, 88, 79, 0.14);
}

.records-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.records-toolbar select {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.line-context {
  margin: 14px 0 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--panel-strong);
  line-height: 1.55;
}

.locus-panel,
.vocabulary-panel,
.figure-panel,
.recurrence-panel {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid rgba(93, 75, 49, 0.14);
  border-radius: 18px;
  background: rgba(251, 248, 241, 0.9);
}

.scholar-panel-body.figure-panel {
  margin-bottom: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.locus-panel h3,
.vocabulary-panel h3,
.figure-panel h3,
.recurrence-panel h3 {
  margin: 0 0 8px;
  font-family: var(--serif-font);
  font-size: 1.12rem;
}

.locus-kicker {
  margin-bottom: 6px;
  color: var(--coverage);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.locus-chip-row,
.term-chip-row,
.related-field-row,
.figure-chip-row,
.locus-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lens-tab-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.lens-tab {
  padding: 8px 12px;
  border: 1px solid rgba(93, 75, 49, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  cursor: pointer;
}

.lens-tab.is-active {
  background: var(--accent-soft);
  border-color: rgba(140, 59, 42, 0.34);
}

.locus-chip,
.term-chip,
.related-field-chip,
.figure-chip {
  border: 1px solid rgba(93, 75, 49, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  cursor: pointer;
}

.locus-chip,
.figure-chip,
.related-field-chip {
  padding: 8px 12px;
}

.term-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
}

.term-chip small,
.related-field-chip small {
  color: var(--muted);
  font-size: 0.76rem;
}

.locus-chip.is-active,
.term-chip.is-active,
.figure-chip.is-active,
.related-field-chip:hover,
.phrase-expansion-card.is-local {
  background: var(--accent-soft);
  border-color: rgba(140, 59, 42, 0.34);
}

.vocabulary-section {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.vocabulary-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.contrastive-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.contrastive-grid > .empty-state {
  grid-column: 1 / -1;
}

.recurrence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.recurrence-grid > .empty-state {
  grid-column: 1 / -1;
}

.vocabulary-section h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.occurrence-list {
  display: grid;
  gap: 8px;
}

.phrase-occurrence-grid {
  grid-template-columns: 1fr;
}

.phrase-expansion-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.phrase-expansion-grid > .empty-state {
  grid-column: 1 / -1;
}

.occurrence-row {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(93, 75, 49, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.66);
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.occurrence-row.is-disabled {
  opacity: 0.58;
  cursor: default;
}

.occurrence-row strong {
  font-size: 0.92rem;
}

.occurrence-row span,
.occurrence-row small {
  color: var(--muted);
  line-height: 1.4;
}

.occurrence-context-lines {
  display: grid;
  gap: 4px;
}

.occurrence-context-line {
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 1100px) {
  .vocabulary-section-grid {
    grid-template-columns: 1fr;
  }

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

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

  .phrase-expansion-grid {
    grid-template-columns: 1fr;
  }
}

.line-locus-stream {
  display: block;
  margin: 8px 0 10px;
  line-height: 1.7;
}

.line-locus-token {
  display: inline;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--serif-font);
  font-size: inherit;
  line-height: inherit;
}

.line-locus-token.is-selectable {
  box-shadow: inset 0 -0.36em rgba(54, 88, 79, 0.18);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
}

.line-locus-token.is-stopword {
  color: inherit;
}

.line-locus-token.is-active {
  box-shadow: inset 0 -0.42em rgba(140, 59, 42, 0.2);
  color: var(--ink);
}

.line-locus-key {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.line-locus-key-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid rgba(93, 75, 49, 0.16);
  border-radius: 999px;
  font-size: 0.78rem;
}

.line-locus-key-chip.is-selectable {
  background: rgba(54, 88, 79, 0.1);
  border-color: rgba(54, 88, 79, 0.22);
  color: var(--coverage);
}

.line-locus-key-chip.is-stopword {
  background: rgba(93, 75, 49, 0.06);
  color: var(--muted);
}

.micro-context-card,
.phrase-expansion-card {
  padding: 12px;
  border: 1px solid rgba(93, 75, 49, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
}

.micro-context-card.is-active,
.locus-meta-row .pill.is-active {
  background: var(--accent-soft);
  border-color: rgba(140, 59, 42, 0.34);
}

.micro-context-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.title-with-inline-action {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.inline-filter-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
}

.inline-filter-link:hover,
.inline-filter-link:focus-visible {
  color: var(--accent-strong);
  text-decoration: underline;
}

.figure-summary {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.authority-path-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(93, 75, 49, 0.14);
  border-radius: 14px;
  background: rgba(248, 243, 231, 0.72);
  color: var(--muted);
  font-size: 0.88rem;
}

.authority-path-note strong {
  color: var(--ink);
}

.authority-view-row {
  margin-bottom: 0;
}

.authority-stage-shell {
  display: grid;
  gap: 12px;
}

.authority-stage-block {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(93, 75, 49, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.5);
}

.authority-stage-block h4 {
  margin: 0;
  font-size: 1rem;
}

.authority-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.authority-canto-card {
  align-items: start;
}

.authority-occurrence-row.is-active {
  border-color: rgba(140, 59, 42, 0.34);
  background: rgba(140, 59, 42, 0.08);
}

.authority-line-group-row.is-active,
.authority-canto-card.is-active {
  border-color: rgba(39, 92, 116, 0.28);
  background: rgba(39, 92, 116, 0.08);
}

.authority-abbr-row {
  gap: 6px;
}

.authority-commentary-name-row {
  gap: 8px;
  margin-bottom: 10px;
}

.authority-commentary-name-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(93, 75, 49, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  cursor: pointer;
  padding: 8px 12px;
  text-decoration: none;
}

.authority-commentary-name-chip.is-active,
.authority-commentary-name-chip:hover {
  background: var(--accent-soft);
  border-color: rgba(140, 59, 42, 0.34);
}

.authority-source-panel {
  display: grid;
  gap: 12px;
}

.authority-source-panel[data-authority-source-toggle="true"] {
  cursor: pointer;
}

.authority-source-panel.is-collapsed .locus-meta-row,
.authority-source-panel.is-collapsed .authority-source-body {
  display: none;
}

.authority-source-head {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  justify-content: space-between;
  gap: 10px 16px;
}

.authority-source-head h5 {
  margin: 0;
  font-size: 0.98rem;
}

.authority-source-body {
  padding: 12px;
  border: 1px solid rgba(93, 75, 49, 0.14);
  border-radius: 14px;
  background: rgba(248, 243, 231, 0.66);
}

.authority-source-body p {
  margin: 0 0 0.9em;
  white-space: pre-wrap;
  line-height: 1.65;
}

.authority-source-body p:last-child {
  margin-bottom: 0;
}

.authority-citation-highlight {
  background: rgba(225, 167, 63, 0.26);
  color: var(--ink);
  padding: 0 0.08em;
  border-radius: 0.15em;
}

.authority-special-case-panel {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(140, 59, 42, 0.18);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(140, 59, 42, 0.08), rgba(248, 243, 231, 0.78));
  margin-bottom: 14px;
}

.authority-special-case-panel h5 {
  margin: 0;
  font-size: 0.98rem;
}

.authority-caveat-banner {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(140, 59, 42, 0.18);
  background: rgba(140, 59, 42, 0.07);
  color: var(--muted);
  font-size: 0.93rem;
}

.authority-flat-banner {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(39, 92, 116, 0.18);
  background: rgba(39, 92, 116, 0.07);
  color: var(--muted);
  font-size: 0.93rem;
  margin-bottom: 12px;
}

.authority-scope-shell {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(112, 94, 58, 0.16);
  border-radius: 14px;
  background: rgba(247, 244, 236, 0.78);
  margin-bottom: 14px;
}

.authority-scope-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.authority-scope-chip {
  display: grid;
  gap: 4px;
  min-width: 148px;
  padding: 10px 12px;
  border: 1px solid rgba(112, 94, 58, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  text-align: left;
  cursor: pointer;
}

.authority-scope-chip strong {
  font-size: 0.9rem;
}

.authority-scope-chip span {
  color: var(--muted);
  font-size: 0.82rem;
}

.authority-scope-chip.is-active {
  border-color: rgba(112, 94, 58, 0.34);
  background: rgba(232, 223, 204, 0.82);
}

.authority-card-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
  justify-content: space-between;
}

.authority-line-snippets {
  display: grid;
  gap: 6px;
}

.authority-line-snippet {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(140, 59, 42, 0.06);
}

.authority-line-snippet strong {
  font-size: 0.8rem;
}

.authority-line-snippet span {
  color: var(--ink);
  font-family: var(--serif-font);
  line-height: 1.5;
}

.authority-work-card {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid rgba(93, 75, 49, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.66);
}

.authority-work-card span,
.authority-work-card small {
  color: var(--muted);
  line-height: 1.4;
}

.authority-work-button {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.authority-work-button.is-active {
  border-color: rgba(54, 88, 79, 0.28);
  background: rgba(240, 246, 242, 0.88);
}

.authority-stage-block-secondary {
  margin-top: 4px;
  background: rgba(248, 243, 231, 0.58);
}

.authority-bucket-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.authority-bucket-card {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(93, 75, 49, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  text-align: left;
  cursor: pointer;
}

.authority-bucket-card strong {
  color: var(--ink);
}

.authority-bucket-card span {
  color: var(--muted);
  font-size: 0.86rem;
}

.authority-bucket-card.is-active {
  border-color: rgba(54, 88, 79, 0.3);
  background: rgba(240, 246, 242, 0.92);
}

.authority-bucket-card.is-strong {
  background: rgba(233, 243, 240, 0.95);
}

.authority-bucket-card.is-soft {
  background: rgba(246, 242, 233, 0.95);
}

.authority-bucket-card.is-neutral {
  background: rgba(255, 255, 255, 0.8);
}

.authority-bucket-card.is-warning {
  background: rgba(140, 59, 42, 0.08);
}

.authority-bucket-card.is-muted {
  opacity: 0.75;
}

.authority-tree-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.authority-tree-panel {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(93, 75, 49, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.66);
}

.authority-tree-panel h5 {
  margin: 0;
  font-size: 0.9rem;
}

.authority-tree-list {
  display: grid;
  gap: 8px;
}

.authority-tree-node {
  display: grid;
  gap: 6px;
}

.authority-tree-parent,
.authority-tree-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid rgba(93, 75, 49, 0.14);
  border-radius: 12px;
  background: rgba(251, 248, 241, 0.92);
  text-align: left;
  cursor: pointer;
}

.authority-tree-parent strong,
.authority-tree-child strong {
  color: var(--ink);
}

.authority-tree-parent span,
.authority-tree-child span {
  color: var(--muted);
  font-size: 0.84rem;
}

.authority-tree-parent.is-active,
.authority-tree-child.is-active {
  border-color: rgba(54, 88, 79, 0.26);
  background: rgba(240, 246, 242, 0.94);
}

.authority-tree-children {
  display: grid;
  gap: 6px;
  padding-left: 14px;
}

.analysis-summary {
  grid-column: 1 / -1;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid rgba(54, 88, 79, 0.16);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(240, 246, 242, 0.88), rgba(251, 248, 241, 0.92));
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.analysis-summary:hover {
  transform: translateY(-1px);
  border-color: rgba(54, 88, 79, 0.3);
  box-shadow: 0 12px 24px rgba(54, 88, 79, 0.1);
}

.shell-status-card {
  padding: 16px;
  border: 1px solid rgba(140, 59, 42, 0.16);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(248, 243, 231, 0.95), rgba(251, 248, 241, 0.95));
}

.coverage-list .analysis-summary {
  margin: 2px 0 4px;
}

.semantic-panel {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid rgba(140, 59, 42, 0.14);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(252, 246, 239, 0.92), rgba(251, 248, 241, 0.92));
}

.semantic-panel.is-jump-focus {
  box-shadow: 0 0 0 2px rgba(140, 59, 42, 0.1), 0 18px 34px rgba(140, 59, 42, 0.08);
}

.semantic-panel h3 {
  margin: 0 0 8px;
  font-family: var(--serif-font);
  font-size: 1.12rem;
}

.semantic-title-inline {
  font: inherit;
  color: inherit;
}

.semantic-panel p {
  margin: 0;
}

.semantic-kicker {
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.semantic-intro {
  color: var(--muted);
  line-height: 1.58;
}

.semantic-field-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 14px;
}

.semantic-field {
  padding: 14px;
  border: 1px solid rgba(140, 59, 42, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
  text-align: left;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.semantic-field:hover,
.semantic-field.is-active {
  transform: translateY(-1px);
  border-color: rgba(140, 59, 42, 0.36);
  box-shadow: 0 12px 22px rgba(140, 59, 42, 0.1);
}

.semantic-field-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.semantic-field h4 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.semantic-count {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
}

.semantic-terms {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.semantic-aka-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
}

.semantic-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.semantic-filter-note {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.semantic-refer-title {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.semantic-refer-list {
  margin-top: 8px;
}

.semantic-refer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.semantic-result-link {
  line-height: 1.45;
}

.semantic-refer-score {
  color: var(--muted);
  font-size: 0.85rem;
}

.analysis-summary h3 {
  margin: 0 0 8px;
  font-family: var(--serif-font);
  font-size: 1.15rem;
}

.analysis-summary p {
  margin: 0;
}

.analysis-kicker {
  margin-bottom: 6px;
  color: var(--coverage);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.analysis-lead {
  color: var(--muted);
  line-height: 1.58;
}

.analysis-metrics {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin: 14px 0 12px;
}

.analysis-metric {
  padding: 12px;
  border: 1px solid rgba(54, 88, 79, 0.14);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.62);
}

.analysis-metric strong {
  display: block;
  margin-top: 6px;
  font-size: 1.1rem;
}

.analysis-label {
  color: var(--muted);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.analysis-era-list {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  margin-top: 12px;
}

.analysis-era {
  display: block;
  width: 100%;
  padding: 10px 12px;
  text-align: left;
  border-radius: 14px;
  border: 1px solid rgba(54, 88, 79, calc(0.14 + var(--era-strength, 0.2) * 0.22));
  background: rgba(54, 88, 79, calc(0.08 + var(--era-strength, 0.2) * 0.24));
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.analysis-era:hover,
.analysis-era:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(54, 88, 79, 0.34);
  box-shadow: 0 10px 18px rgba(54, 88, 79, 0.12);
}

.analysis-era strong {
  display: block;
  margin-top: 4px;
}

.line-context strong {
  color: var(--ink);
  font-family: var(--serif-font);
}

.current-line-text {
  display: inline-block;
  margin: 6px 0 4px;
  color: var(--ink);
  font-family: var(--serif-font);
  font-size: 1.16rem;
  line-height: 1.55;
}

.record-card,
.compare-card,
.future-hook {
  border: 1px solid rgba(93, 75, 49, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
}

.record-card {
  padding: 14px 14px 12px;
}

.record-card.is-search-target {
  border-color: rgba(140, 59, 42, 0.34);
  box-shadow: 0 0 0 2px rgba(140, 59, 42, 0.12);
  background: linear-gradient(180deg, rgba(252, 244, 238, 0.9), rgba(255, 255, 255, 0.72));
}

.record-top,
.compare-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.record-card h3,
.compare-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
}

.pill.coverage-pill {
  background: var(--coverage-soft);
  color: var(--coverage);
}

.pill.range-pill {
  background: rgba(31, 29, 25, 0.08);
  color: var(--ink);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.record-preview,
.compare-preview {
  margin: 0;
}

.reading-body {
  display: grid;
  gap: 10px;
}

.reading-body p {
  margin: 0;
  line-height: 1.65;
}

.semantic-highlight {
  padding: 0 0.14em;
  border-radius: 0.28em;
  background: rgba(217, 176, 64, 0.35);
  color: inherit;
}

.locus-target-highlight {
  padding: 0 0.14em;
  border-radius: 0.28em;
  background: rgba(217, 176, 64, 0.35);
  color: inherit;
}

.concurrence-highlight {
  padding: 0 0.14em;
  border-radius: 0.28em;
  background: rgba(140, 59, 42, 0.18);
  color: inherit;
}

.search-hit-highlight {
  padding: 0 0.14em;
  border-radius: 0.28em;
  background: rgba(83, 157, 214, 0.28);
  color: inherit;
}

.record-preview,
.compare-preview {
  color: var(--muted);
}

.record-preview.is-expanded {
  color: var(--ink);
}

.loading-copy {
  font-style: italic;
}

.record-actions,
.compare-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.pin-button,
.ghost-button,
.remove-button {
  border: 1px solid rgba(93, 75, 49, 0.2);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}

.pin-button,
.remove-button {
  padding: 7px 11px;
}

.ghost-button {
  padding: 8px 12px;
}

.inline-text-button {
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  font: inherit;
  font-size: 0.94rem;
  line-height: 1.35;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  transition: color 140ms ease;
}

.inline-text-button:hover,
.inline-text-button:focus-visible {
  color: var(--accent-strong);
}

.ghost-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid rgba(93, 75, 49, 0.2);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  transition: background 140ms ease, border-color 140ms ease;
}

.guide-button {
  padding-inline: 0;
}

.ghost-link-button:hover,
.ghost-link-button:focus-visible {
  background: var(--accent-soft);
  border-color: rgba(140, 59, 42, 0.4);
}

.pin-button:hover,
.pin-button.is-active,
.ghost-button:hover,
.remove-button:hover {
  background: var(--accent-soft);
  border-color: rgba(140, 59, 42, 0.4);
}

.compare-summary {
  margin: 12px 0 14px;
  line-height: 1.45;
}

.compare-summary-shell {
  display: grid;
  gap: 12px;
}

.compare-summary-title {
  display: block;
  font-family: var(--serif-font);
  font-size: 1.06rem;
  color: var(--ink);
  line-height: 1.4;
}

.compare-lead {
  margin: 0;
  color: var(--muted);
}

.compare-summary-section {
  display: grid;
  gap: 10px;
}

.compare-alignment-row {
  padding: 12px 13px;
  border: 1px solid rgba(93, 75, 49, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.56);
}

.compare-alignment-row strong {
  color: var(--ink);
}

.compare-alignment-row strong {
  display: block;
  margin-bottom: 6px;
}

.compare-alignment-row p,
.compare-origin,
.compare-card-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.compare-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compare-chip-row .term-chip,
.compare-chip-row .related-field-chip {
  cursor: default;
}

.compare-action-row {
  align-items: flex-start;
}

.compare-link-chip {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid rgba(93, 75, 49, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.compare-link-chip small {
  color: var(--muted);
  font-size: 0.76rem;
}

.compare-link-chip:hover,
.compare-link-chip:focus-visible {
  background: var(--accent-soft);
  border-color: rgba(140, 59, 42, 0.34);
}

.compare-list {
  min-height: 140px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: start;
}

.compare-card {
  padding: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(248, 243, 231, 0.88));
  display: grid;
  gap: 10px;
  align-content: start;
}

.compare-card h3 {
  font-size: 0.98rem;
}

.compare-origin {
  font-size: 0.9rem;
}

.compare-card-section {
  display: grid;
  gap: 7px;
}

.future-hooks {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(93, 75, 49, 0.16);
}

.future-hooks h3 {
  margin-bottom: 12px;
}

.future-hook-grid {
  grid-template-columns: 1fr;
}

.future-hook {
  padding: 14px;
  background: rgba(248, 243, 231, 0.72);
}

.future-hook strong {
  display: block;
  margin-bottom: 5px;
}

.future-status {
  color: var(--coverage);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.empty-state {
  padding: 18px;
  border: 1px dashed rgba(93, 75, 49, 0.3);
  border-radius: 16px;
  text-align: center;
  line-height: 1.55;
}

.records-panel .empty-state,
.locus-panel .empty-state,
.vocabulary-panel .empty-state,
.semantic-panel .empty-state,
.recurrence-panel .empty-state,
.figure-panel .empty-state,
.compare-list .empty-state,
.future-hook-grid .empty-state {
  border-style: solid;
  border-color: rgba(93, 75, 49, 0.14);
  background: rgba(255, 255, 255, 0.62);
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.records-panel .empty-state,
.locus-panel .empty-state,
.vocabulary-panel .empty-state,
.recurrence-panel .empty-state {
  padding: 16px 18px;
}

.semantic-panel .empty-state,
.figure-panel .empty-state {
  background: rgba(248, 243, 231, 0.72);
}

.compare-list .empty-state,
.future-hook-grid .empty-state {
  background: rgba(248, 243, 231, 0.58);
}

.shell-status-card + .empty-state {
  margin-top: 12px;
}

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

  .coverage-panel,
  .records-panel,
  .scholar-panel,
  .compare-panel {
    grid-column: auto;
  }

  .coverage-list {
    max-height: none;
  }

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

  .page-anchors {
    right: 14px;
    bottom: 14px;
    transform: none;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100vw - 18px, 100%);
    padding-top: 12px;
  }

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

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

  .sample-legend {
    grid-template-columns: 1fr;
  }

  .quick-jump-result-top,
  .quick-jump-result-meta,
  .search-results-head,
  .search-result-top,
  .search-result-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .quick-jump-input-row {
    grid-template-columns: 1fr;
  }

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

  .sample-browser {
    grid-template-columns: 1fr;
  }

  .cantica-column {
    border-right-width: 1px;
    border-radius: 18px;
  }

  .back-to-top {
    right: 14px;
    bottom: 196px;
  }

  .back-nav-button {
    right: 14px;
    bottom: 144px;
  }

  .panel-head,
  .compare-head {
    flex-direction: column;
    align-items: stretch;
  }

  .records-toolbar {
    justify-content: space-between;
  }

  .page-anchors {
    right: 10px;
    bottom: 10px;
  }

  .anchor-link {
    min-width: 106px;
    padding: 8px 10px;
    font-size: 0.74rem;
  }
}
