:root {
  --bs-primary: #355e3b;
  --bs-primary-rgb: 53, 94, 59;
  --bs-link-color: #355e3b;
  --bs-link-hover-color: #2d4f32;
  --surface-card: #ffffff;
  --surface-muted: #f2f6f3;
  --text-muted: #5d6b60;
}

body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #1f2a22;
}

.app-body {
  background: radial-gradient(circle at top, #f7faf7, #eef3ef 55%, #e6eee7 100%);
  min-height: 100vh;
}

.navbar-glass {
  background: linear-gradient(120deg, rgba(53, 94, 59, 0.16), rgba(255, 255, 255, 0.92));
  border-bottom: 1px solid rgba(53, 94, 59, 0.12);
  backdrop-filter: blur(12px);
}

.brand-mark {
  letter-spacing: 0.5px;
}

.card {
  border: 0;
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(31, 42, 34, 0.08);
}

.app-hero {
  background: linear-gradient(135deg, rgba(53, 94, 59, 0.12), rgba(255, 255, 255, 0.9));
  border: 1px solid rgba(53, 94, 59, 0.08);
}

.form-control,
.form-select {
  border-radius: 14px;
  border-color: rgba(53, 94, 59, 0.15);
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(53, 94, 59, 0.5);
  box-shadow: 0 0 0 0.2rem rgba(53, 94, 59, 0.15);
}

.btn-primary {
  background-color: #355e3b;
  border-color: #355e3b;
  box-shadow: 0 10px 20px rgba(53, 94, 59, 0.2);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.btn-primary:focus-visible,
.btn-check:checked + .btn-primary,
.btn-check:focus + .btn-primary,
.btn-primary:active:focus {
  background-color: #2d4f32;
  border-color: #2d4f32;
}

.btn-primary:active,
.btn-primary:focus-visible,
.btn-primary:focus,
.btn-check:focus + .btn-primary,
.btn-primary:active:focus {
  background-color: #2d4f32;
  border-color: #2d4f32;
  box-shadow: 0 0 0 0.2rem rgba(53, 94, 59, 0.25);
}

.btn-outline-primary {
  border-color: rgba(53, 94, 59, 0.5);
  color: #355e3b;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-outline-primary.active,
.btn-outline-primary:focus-visible,
.btn-check:checked + .btn-outline-primary,
.btn-check:focus + .btn-outline-primary,
.btn-outline-primary:active:focus {
  background-color: rgba(53, 94, 59, 0.12);
  border-color: #355e3b;
  color: #355e3b;
  box-shadow: 0 0 0 0.2rem rgba(53, 94, 59, 0.2);
}

.badge-soft {
  background: var(--surface-muted);
  color: #2d4f32;
  border: 1px solid rgba(53, 94, 59, 0.15);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-weight: 500;
}

.section-card {
  background: var(--surface-muted);
  border-radius: 16px;
  padding: 1.25rem;
  border: 1px solid rgba(53, 94, 59, 0.08);
}

.accordion-item {
  border: 0;
  background: transparent;
}

.accordion-button {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid rgba(53, 94, 59, 0.12);
  box-shadow: none;
  color: #1f2a22;
  font-weight: 600;
}

.accordion-button:not(.collapsed) {
  color: #1f2a22;
  background: rgba(53, 94, 59, 0.08);
  box-shadow: none;
}

.accordion-body {
  background: #ffffff;
  border-radius: 0 0 12px 12px;
  border: 1px solid rgba(53, 94, 59, 0.12);
  border-top: 0;
}

.section-title {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.archive-link {
  text-decoration: none;
  color: inherit;
}

.archive-link:hover {
  border-color: rgba(53, 94, 59, 0.35);
  box-shadow: 0 16px 30px rgba(31, 42, 34, 0.08);
}

.archive-accordion .accordion-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.archive-accordion .accordion-button::after {
  margin-left: 0;
}

.archive-count {
  font-size: 0.8rem;
  margin-left: auto;
  white-space: nowrap;
}

.archive-entries .section-card {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.exegesis-link {
  color: inherit;
  text-decoration: none;
}

.exegesis-link:hover,
.exegesis-link:focus {
  color: inherit;
  text-decoration: none;
}

.study-output {
  white-space: normal;
  line-height: 1.6;
}

.original-output {
  overflow-x: auto;
  background: #ffffff;
}

.original-output table {
  width: 100%;
}

.original-output th,
.original-output td {
  vertical-align: top;
  padding: 0.35rem 0.5rem;
}

.original-raw {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.85rem;
  background: #ffffff;
}

.passage-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.passage-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 1.05rem;
}

.passage-token {
  padding: 0.1rem 0.2rem;
  border-radius: 6px;
  transition: background-color 0.15s ease;
}

.passage-token.is-active {
  background: rgba(53, 94, 59, 0.18);
}

.passage-divider {
  border-top: 1px solid rgba(53, 94, 59, 0.2);
  margin: 0.5rem 0;
}

.interlinear-row.is-active td {
  background: rgba(53, 94, 59, 0.12);
}

.interlinear-table th {
  font-weight: 600;
}

.strongs-entry {
  font-size: 0.85rem;
}

.usage-text {
  font-size: 0.8rem;
}

.interlinear-usage-row {
  display: none;
}

.interlinear-usage-row.is-active {
  display: table-row;
}

.interlinear-usage-content {
  font-size: 0.85rem;
  color: #2d4f32;
  background: rgba(53, 94, 59, 0.08);
  border-radius: 12px;
  padding: 0.65rem 0.8rem;
}

.parse-code {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.75rem;
  margin-right: 0.4rem;
  background: rgba(53, 94, 59, 0.1);
  color: #2d4f32;
  cursor: inherit;
}

.parse-n {
  background: rgba(76, 175, 80, 0.18);
}

.parse-v {
  background: rgba(33, 150, 243, 0.18);
}

.parse-a {
  background: rgba(255, 193, 7, 0.2);
}

.parse-p {
  background: rgba(156, 39, 176, 0.18);
}

.parse-prep {
  background: rgba(255, 87, 34, 0.18);
}

.parse-r {
  background: rgba(156, 39, 176, 0.18);
}

.parse-adv,
.parse-d {
  background: rgba(0, 150, 136, 0.18);
}

.parse-conj {
  background: rgba(96, 125, 139, 0.18);
}

.parse-art {
  background: rgba(121, 85, 72, 0.18);
}

.parse-part {
  background: rgba(3, 169, 244, 0.18);
}

.pos-tag {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(31, 42, 34, 0.08);
  color: #1f2a22;
}

.pos-noun {
  background: rgba(76, 175, 80, 0.12);
}

.pos-verb {
  background: rgba(33, 150, 243, 0.12);
}

.pos-adjective {
  background: rgba(255, 193, 7, 0.18);
}

.pos-pronoun {
  background: rgba(156, 39, 176, 0.15);
}

.pos-preposition {
  background: rgba(244, 67, 54, 0.12);
}

.pos-adverb {
  background: rgba(255, 152, 0, 0.18);
}

.print-only {
  display: none;
}

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

  .container,
  .container-xl {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }

  .navbar,
  .app-hero,
  form,
  .btn,
  .badge,
  .text-muted {
    display: none !important;
  }

  .card {
    box-shadow: none;
    border-radius: 0;
  }

  .section-card {
    background: #ffffff;
    border: 0;
    padding: 0;
  }

  .section-title {
    color: #000000;
  }

  .print-only {
    display: block;
  }
}
