.tool-hero {
  color: rgba(255, 253, 248, .78);
  background:
    radial-gradient(circle at 80% 12%, rgba(242, 184, 75, .2), transparent 27%),
    linear-gradient(135deg, #241325, var(--deep-plum));
}

.tool-hero h1 {
  color: var(--warm-white);
}

.tool-hero .eyebrow {
  color: var(--gold-pale);
}

.tool-hero p {
  color: rgba(255, 253, 248, .74);
}

.tool-shell {
  max-width: 1120px;
}

.tool-controls {
  display: flex;
  align-items: end;
  gap: 14px;
  padding: 20px;
  margin: 24px 0 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--ivory);
}

.tool-controls label {
  flex: 1;
  color: var(--charcoal);
  font-size: .74rem;
  font-weight: 850;
}

.tool-controls input,
.tool-controls select,
.quiz-select select,
.glossary-actions select {
  display: block;
  width: 100%;
  min-height: 49px;
  padding: 0 13px;
  margin-top: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
}

.check-label {
  min-height: 49px;
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.check-label input {
  width: auto !important;
  margin: 0 !important;
}

.view-switch {
  display: flex;
}

.view-switch button,
.tab-list button,
.glossary-actions button {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--charcoal);
  font-size: .78rem;
  font-weight: 800;
}

.view-switch button:first-child,
.tab-list button:first-child {
  border-radius: 999px 0 0 999px;
}

.view-switch button:last-child,
.tab-list button:last-child {
  border-radius: 0 999px 999px 0;
}

.view-switch button.active,
.tab-list button[aria-selected="true"],
.glossary-actions button[aria-pressed="true"] {
  border-color: var(--plum);
  background: var(--plum);
  color: var(--white);
}

.builder-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
}

.builder-form fieldset {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 6px 22px rgba(46, 24, 43, .045);
}

.builder-form legend {
  color: var(--deep-plum);
  font-family: var(--serif);
  font-weight: 800;
}

.builder-form label {
  display: block;
  margin: 9px 0;
}

.builder-form select {
  width: 100%;
  min-height: 47px;
}

.builder-form .button {
  align-self: end;
}

.tool-result {
  position: relative;
  margin-top: 30px;
  padding: 34px;
  overflow: hidden;
  border: 1px solid var(--gold-pale);
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--saffron-wash), var(--warm-white));
}

.tool-result::after {
  position: absolute;
  right: -45px;
  bottom: -70px;
  width: 170px;
  height: 170px;
  border: 1px solid rgba(194, 154, 82, .32);
  border-radius: 50%;
  content: "";
}

.route-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 9px;
  padding: 0;
  list-style: none;
}

.route-list li {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 11px;
  align-items: center;
  padding: 13px;
  border: 1px solid rgba(194, 154, 82, .18);
  border-radius: 10px;
  background: rgba(255, 255, 255, .86);
}

.route-list button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--white);
}

.deity-explorer,
.festival-calendar,
.archive-grid,
.glossary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 17px;
}

.deity-card,
.festival-card,
.archive-card,
.term-card {
  position: relative;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 4px 18px rgba(46, 24, 43, .04);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}

.deity-card::before,
.festival-card::before,
.archive-card::before,
.term-card::before {
  display: block;
  width: 34px;
  height: 3px;
  margin-bottom: 20px;
  background: var(--antique-gold);
  content: "";
}

.deity-card:hover,
.festival-card:hover,
.archive-card:hover,
.term-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
}

.deity-card small,
.festival-card small,
.archive-card small,
.term-card small {
  color: var(--muted-text);
}

.symbol-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.symbol-pills span {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--ivory);
  color: var(--charcoal);
  font-size: .66rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

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

.data-table th {
  color: var(--deep-plum);
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 24px;
}

.scripture-map {
  min-height: 430px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(194, 154, 82, .045) 1px, transparent 1px),
    var(--white);
  background-size: 100% 34px;
  box-shadow: var(--shadow-sm);
}

.map-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.map-group {
  padding: 22px;
  border-top: 4px solid var(--plum);
  border-radius: 12px;
  background: rgba(251, 247, 238, .94);
}

.map-group a {
  display: block;
  margin: 9px 0;
  color: var(--charcoal);
  font-size: .86rem;
  font-weight: 750;
}

.map-group a:hover {
  color: var(--plum);
}

.map-alternative {
  margin-top: 26px;
  padding: 26px;
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.quiz-select {
  display: block;
  max-width: 520px;
  font-weight: 850;
}

.quiz-engine {
  margin-top: 27px;
}

.quiz-question {
  padding: 28px;
  margin: 15px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
}

.quiz-question label {
  display: block;
  padding: 11px;
  margin: 8px 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}

.quiz-question label:hover {
  border-color: var(--gold-pale);
  background: var(--ivory);
}

.answer-explanation {
  padding: 14px;
  border-radius: 10px;
  background: var(--teal-light);
}

.glossary-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}

.glossary-actions label {
  min-width: 250px;
  font-size: .75rem;
  font-weight: 850;
}

.alpha-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 24px 0;
}

.alpha-nav button {
  width: 43px;
  height: 43px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--white);
  color: var(--charcoal);
}

.alpha-nav button:hover {
  border-color: var(--plum);
  color: var(--plum);
}

.comparison-panel {
  padding: 32px;
  margin-bottom: 27px;
  border: 1px solid var(--gold-pale);
  border-radius: var(--radius);
  background: var(--saffron-wash);
}

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.term-card h2 {
  font-size: 1.42rem;
}

.term-card.saved {
  border-color: var(--antique-gold);
  box-shadow: inset 0 0 0 1px var(--antique-gold);
}

.term-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.term-actions button {
  min-height: 44px;
  padding: 0 5px;
  border: 0;
  background: transparent;
  color: var(--plum);
  font-weight: 850;
}

.daily-hero {
  position: relative;
  padding: 92px 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 15%, rgba(242, 184, 75, .21), transparent 27%),
    linear-gradient(135deg, #2b112c, var(--deep-plum));
  color: rgba(255, 253, 248, .78);
}

.daily-hero h1,
.daily-hero a {
  color: var(--warm-white);
}

.daily-stats {
  display: flex;
  gap: 18px;
}

.daily-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.daily-toolbar button {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  color: var(--charcoal);
  font-size: .78rem;
  font-weight: 800;
}

.daily-toolbar button:hover {
  border-color: var(--plum);
  color: var(--plum);
}

.daily-entry {
  position: relative;
  max-width: 860px;
  margin: auto;
  padding: 50px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-top: 5px solid var(--antique-gold);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.daily-entry::after {
  position: absolute;
  right: -80px;
  bottom: -140px;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(194, 154, 82, .17);
  border-radius: 50%;
  content: "";
}

.daily-entry .paraphrase {
  color: var(--plum);
  font: 1.52rem/1.55 var(--serif);
}

.daily-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.translation-policy {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 54px;
  padding: 32px;
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.translation-policy h2 {
  grid-column: 1 / -1;
}

.translation-policy p {
  font-size: .8rem;
}

.archive-card {
  color: var(--charcoal);
}

.search-box {
  position: relative;
  display: flex;
  max-width: 820px;
  gap: 8px;
}

.search-box input {
  width: 100%;
  min-height: 55px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--white);
}

.autocomplete {
  position: absolute;
  z-index: 5;
  top: 61px;
  right: 110px;
  left: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow-lg);
}

.autocomplete button {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: var(--white);
  text-align: left;
}

.popular-searches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.popular-searches a {
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--plum-soft);
  color: var(--deep-plum);
  font-size: .72rem;
  font-weight: 800;
}

.search-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 42px;
}

.search-filters {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--ivory);
}

.search-filters h2 {
  font-size: 1.3rem;
}

.search-filters label {
  display: block;
  margin: 15px 0;
  font-size: .75rem;
  font-weight: 850;
}

.search-filters select {
  display: block;
  width: 100%;
  min-height: 44px;
}

.search-results {
  display: grid;
  gap: 13px;
}

.search-result {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}

.search-result:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.search-result h2 {
  font-size: 1.4rem;
}

.search-result mark {
  background: var(--saffron-wash);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.dashboard-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 5px 20px rgba(46, 24, 43, .045);
}

.dashboard-card h2 {
  font-size: 1.45rem;
}

.dashboard-card ul {
  padding-left: 1.1em;
}

.dashboard-data {
  margin-top: 32px;
  padding: 30px;
  border-radius: var(--radius);
  background: var(--surface-muted);
}
