/* year switching, change highlights, hover panels, condensed view */
.year {
  display: none;
}
.year.on {
  display: block;
}
[hidden] {
  display: none !important;
}

#yearbar {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px 12px 8px;
  font-family: Arial, sans-serif;
  font-size: 13px;
  border-bottom: 1px solid #e3e6ea;
}
#yearbar button {
  border: 1px solid #6993cd;
  background: #fff;
  color: #1f3a5f;
  border-radius: 14px;
  padding: 3px 12px;
  cursor: pointer;
  font-size: 13px;
}
#yearbar button.on {
  background: #1f3a5f;
  color: #fff;
  border-color: #1f3a5f;
}
#yearbar button:disabled {
  opacity: 0.4;
  cursor: default;
}
#yearbar #view-toggle {
  margin-left: auto;
}

/* the arrow box of an outline entry stretches with the entry when its text wraps */
.accordion a {
  top: 0;
  bottom: 0;
  height: auto;
  line-height: normal;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* search */
#search {
  flex-basis: 100%;
  margin-top: 6px;
  padding: 5px 8px;
  border: 1px solid #9fb0c8;
  border-radius: 4px;
  font-size: 13px;
  font-family: Arial, sans-serif;
}
#search-results {
  font-family: Arial, sans-serif;
  font-size: 12.5px;
  padding: 6px 10px 12px;
}
#search-results .n {
  color: #666;
  margin: 4px 2px 8px;
}
#search-results a {
  display: block;
  padding: 6px 8px;
  margin: 2px 0;
  border-left: 3px solid #6993cd;
  background: #f4f6f9;
  color: #222;
  text-decoration: none;
  border-radius: 0 3px 3px 0;
}
#search-results a:hover {
  background: #e6ebf2;
}
#search-results a .ch {
  display: block;
  font-size: 11px;
  color: #1f3a5f;
  font-weight: bold;
  margin-bottom: 2px;
}
#search-results mark {
  background: #ffe58a;
  padding: 0 1px;
}
.search-hit {
  outline: 3px solid #ffcf33;
  outline-offset: 2px;
  transition: outline-color 1.5s;
}
.search-hit.fade {
  outline-color: transparent;
}

/* overview in the changes view */
.chg-filterbar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  font-family: Arial, sans-serif;
  font-size: 13px;
  position: sticky;
  top: 0;
  z-index: 5;
}
.chg-filterbar span {
  margin-right: 4px;
  color: #444;
}
.chg-filterbar button {
  border: 1px solid #9fb0c8;
  background: #fff;
  border-radius: 12px;
  padding: 2px 10px;
  cursor: pointer;
  font-size: 12px;
}
.chg-filterbar button.on {
  background: #1f3a5f;
  color: #fff;
  border-color: #1f3a5f;
}
.chg-overview {
  font-family: Arial, sans-serif;
  font-size: 13px;
}
.chg-overview summary {
  cursor: pointer;
  font-weight: bold;
  color: #1f3a5f;
  padding: 4px 0;
}
.chg-overview table {
  border-collapse: collapse;
  width: 100%;
}
.chg-overview td {
  padding: 3px 6px;
  border-bottom: 1px solid #eef1f5;
  vertical-align: top;
}
.chg-overview td.c {
  text-align: right;
  white-space: nowrap;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
}
.chg-overview a {
  color: #1f3a5f;
  text-decoration: none;
}
.chg-overview .t {
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 4px;
}
.t.added {
  background: #d3f5d3;
  color: #0a5a0a;
}
.t.modified {
  background: #fde8b0;
  color: #7a4b00;
}
.t.deleted {
  background: #ffd6d6;
  color: #8b0000;
}
.t.replaced {
  background: #f9dfc7;
  color: #7a3a00;
}
.t.moved {
  background: #dbe7f7;
  color: #1f3a5f;
}
.t.title {
  background: #e5e7eb;
  color: #444;
}
body[data-filter] .chg-list li {
  display: none;
}
body[data-filter="added"] .chg-list li.added,
body[data-filter="modified"] .chg-list li.modified,
body[data-filter="deleted"] .chg-list li.deleted,
body[data-filter="replaced"] .chg-list li.replaced,
body[data-filter="moved"] .chg-list li.moved,
body[data-filter="title"] .chg-list li.title {
  display: block;
}

.page {
  position: relative;
}
.chg {
  cursor: help;
}
.chg-added,
.chg-modified {
  background: #deebc4;
}
h1.chg,
h2.chg,
h3.chg {
  background: #deebc4;
}
.chg-deleted {
  height: 0;
  border-top: 3px dashed #c0392b;
  margin: 6px 0;
  cursor: help;
}
/* several consecutive deleted paragraphs (dropped section or rewrite): one collapsed box */
.chg-run {
  border: 2px dashed #c0392b;
  border-radius: 3px;
  margin: 8px 0;
  padding: 2px 10px;
  font-family: Arial, sans-serif;
  font-size: 12px;
  color: #8b0000;
}
.chg-run summary {
  cursor: pointer;
  padding: 3px 0;
}
.chg-run[open] summary {
  border-bottom: 1px dashed #e0a5a0;
  margin-bottom: 6px;
}
.chg-run .old.heading {
  font-weight: bold;
  background: transparent;
  padding-left: 0;
}
.chg-run .old {
  color: #222;
  font-size: 13px;
  line-height: 1.45;
  background: #fff5f5;
  padding: 4px 8px;
  margin: 4px 0;
  border-radius: 3px;
}
table.chg-added,
ul.chg-added {
  outline: 6px solid #deebc4;
  background: #deebc4;
}
table.chg-modified,
ul.chg-modified {
  background: transparent;
}
tr.chg-row td,
tr.chg-row th,
li.chg-row {
  background: #deebc4;
}

.chg-panel {
  position: absolute;
  left: 28px;
  right: 28px;
  z-index: 20;
  background: #fff;
  border: 1px solid #9fb0c8;
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  padding: 10px 12px;
  font-family: Arial, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  color: #222;
}
.chg-panel.tip {
  left: auto;
  width: auto;
  padding: 4px 10px;
  font-size: 12px;
  color: #3d5a00;
}
.chg-panel .lbl {
  font-size: 11px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.chg-panel .old,
.chg-panel .new {
  background: #fafbfc;
  padding: 6px 8px;
  border-radius: 3px;
}
.chg-panel .ctx {
  color: #999;
  font-style: italic;
}
.sbs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
del {
  background: #ffd6d6;
  color: #8b0000;
  text-decoration: line-through;
}
ins {
  background: #c9f0c9;
  color: #0a5a0a;
  text-decoration: none;
}
.chg-panel .bfs {
  margin-top: 6px;
  font-size: 11px;
  color: #3d5a00;
}

.chg-removed h1,
.chg-removed h2,
.chg-removed h3 {
  background: #ffd6d6;
}
.chg-removed details {
  margin-left: 28px;
  font-family: Arial, sans-serif;
  font-size: 13px;
}
.chg-removed summary {
  cursor: pointer;
  color: #8b0000;
}

.view-changes .page {
  padding: 12px 28px 18px;
}
.view-changes h2.chg-chapter {
  font-size: 15px;
  margin: 6px 0 10px;
}
.view-changes h2.chg-chapter a {
  color: #1f3a5f;
  text-decoration: none;
}
.view-changes .summary {
  font-family: Arial, sans-serif;
  font-size: 13px;
  color: #444;
}
.chg-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: Arial, sans-serif;
  font-size: 13px;
}
.chg-list li {
  margin: 6px 0 12px;
  padding-left: 10px;
  border-left: 3px solid #c9d2df;
}
.chg-list li.added {
  border-left-color: #7fb06b;
}
.chg-list li.modified {
  border-left-color: #e0b34a;
}
.chg-list li.deleted {
  border-left-color: #c0392b;
}
.chg-list li.replaced {
  border-left-color: #d9822b;
}
.chg-list li a.anchor {
  font-size: 11px;
  color: #1f3a5f;
  text-decoration: none;
  margin-right: 8px;
}
.chg-list .old,
.chg-list .new {
  background: #fafbfc;
  padding: 6px 8px;
  border-radius: 3px;
  margin-top: 4px;
}
.chg-list .ctx {
  color: #999;
  font-style: italic;
}
#search-results .was {
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  color: #8b0000;
  margin-right: 6px;
}
.chg-list .tag {
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  color: #666;
  margin-right: 6px;
}
