
:root {
  --main-orange:  #f7941e;
  --main-pink:    #b8005d;
  --main-blue:    #005eb8;
  --main-green:   #00b140;
  --gray-medium:  #777;
  --gray-light:   #ccc;
  --text-dark:    #222;
  --bg-light:     #f9f9f9;
  --rail-w: 180px;
}

.paragraph {
  font-family: 'Trebuchet MS', 'Liberation Sans', 'DejaVu Sans', sans-serif;
  font-size: 16px;
  line-height: 1.4;
  color: #333; 
}

html { zoom: 100%; }
body { margin: 0; font-family: Arial, sans-serif; background: #fff; }
img { max-width: 100%; height: auto; }

.hidden { display: none !important; }
.hl { background: #c3d8f3; border-radius: 3px; padding: 0 2px; }


#letter-search { scroll-margin-top: 165px; }


.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: #fff; border-bottom: 1px solid #eee; box-shadow: 0 1px 0 #eee;
  display: flex; flex-direction: row; align-items: center; gap: 12px; padding: 10px 20px;
}

.brand a {
  color: var(--main-pink); text-decoration: none; font-weight: 800;
  font-size: clamp(1.25rem, 2.6vw + 0.5rem, 2rem); line-height: 1.15; padding: 2px 4px;
}

.brand-rest{  color:#333; }

.site-header .brand::after {
  content: ""; display: inline-block; width: 1px; height: 1.6rem;
  background: rgb(131,130,130); margin: 0 8px;
}

.nav-links {
  display: flex; align-items: center; gap: 10px; justify-content: flex-start; overflow-x: auto; padding: 0;
}
.nav-btn {
  display: inline-block; white-space: nowrap;
  padding: 8px 15px; border: 1px solid #ddd; border-radius: 999px;
  background: var(--bg-light); text-decoration: none; color: inherit;
}
.nav-btn:hover { background: #dadbda; color: #363434; border-color: #575857; }
.nav-btn.active, .nav-btn[aria-current="page"] {
  background: rgb(146,201,146); color: #363434; border-color: green;
}

.reaction-counter {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: 1.3rem; color: #000; white-space: nowrap;
}
.reaction-counter .badge {
  min-width: 2ch; text-align: center; padding: 2px 8px; border-radius: 999px;
  border: 1px solid #ddd; background: #f6f6f6; color: var(--main-blue); font-weight: 700;
}
.reaction-counter::before {
  content: ""; display: inline-block; width: 1px; height: 1.6rem;
  background: rgb(131,130,130); margin: 0 8px;
}

.nav-links .nav-cta-outline {
  margin-left: 35px; 
}

@media (max-width: 720px) {
  .nav-links .nav-cta-outline { margin-left: 0; }
}



.btn {
  background: #f6f6f6;
  border: 1px solid #ddd;
  color: #222;
  padding: 6px 10px;
  border-radius: 8px;
  font: inherit;
  line-height: 1.1;
  cursor: pointer;
  font-size: 14px;
}
.btn:hover { background: #eaeaea; border-color: #bbb; }
.btn:focus-visible { outline: 2px solid #5b9dd9; outline-offset: 2px; }

.btn--danger { border-color: #c33; color: #c33; }
.btn--danger:hover { border-color: #a22; color: #a22; background: #f9eeee; }


.advanced-toolbar {
  position: sticky; top: var(--site-header-h, 56px);
  z-index: 950; background: #fff; border-bottom: 1px solid #eee; padding: 6px 0;
}
.advanced-toolbar > * { display: inline-block; vertical-align: middle; margin: 0 15px 6px 0; }

.page-header {
  display: inline-flex; align-items: center; margin: 0 12px 0 0; padding-right: 12px;
  border-right: 1px solid rgb(131,130,130);
}
.section-title { color: #000; white-space: nowrap; margin: 0 0 .5rem 0; font-size: 20px; }

#search-bar {
  position: relative; margin-bottom: 20px;
  display: grid;
  grid-template-columns: max-content max-content max-content max-content; 
  column-gap: 8px; row-gap: 6px; align-items: center;
}
#search-field, #search-input { padding: 5px; font-size: 14px; }


.advanced-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.advanced-toolbar .page-header {
  margin: 0 12px 0 0;
  padding-right: 12px;
  border-right: 1px solid rgb(131,130,130);
}
.advanced-toolbar #search-bar {
  display: inline-grid;   
  margin: 0;
  vertical-align: middle;
}

.advanced-toolbar .az-index,
.advanced-toolbar .expand-controls {
  width: 100%;
}



.az-index { margin: 8px 0; display: flex; flex-wrap: wrap; gap: 4px; }
.az-form { display: inline; }
.az-btn {
  margin: 0; padding: 6px 10px; background: var(--main-orange); color: #fff;
  border: none; border-radius: 4px; cursor: pointer;
}
.az-btn:hover { filter: brightness(0.95); }
.az-btn--active { background: var(--main-green); }


.input-wrap { position: relative; display: inline-block; }
#suggestions-container { position: absolute; left: 0; top: calc(100% + 4px); z-index: 1000; }
#suggestions {
  box-sizing: border-box; width: max-content; min-width: 260px; max-width: min(520px, 90vw);
  max-height: 70vh; overflow: auto; white-space: nowrap; background: #fff; border: 1px solid #ccc;
  list-style: none; margin: 0; padding: 0; resize: vertical;
}
#suggestions li { padding: 5px; cursor: pointer; }
#suggestions li:hover, #suggestions li:focus { background: #f0f0f0; }


#reaction-list { list-style: none; padding-left: 10px; }
#reaction-list li {
  cursor: pointer; color: #008000; margin: 5px 0; transition: background 0.2s;
}
#reaction-list li:hover { background-color: #e6ffe6; }


#hover-preview.hidden { display: none; }
#hover-preview img { border-radius: 8px; }


.inline-reaction > img {
  display: block; margin: 5px 0; padding: 15px; background: #fff;
  border: 2px solid #333; border-radius: 12px; box-shadow: 0 4px 8px rgba(0,0,0,0.4);
  max-width: 95%; height: auto;
}
.inline-reaction > button { margin-top: -2px; margin-bottom: 8px; }

.inline-reaction .inline-mechanism:not(.hidden) {
  display: block; width: fit-content; margin: 0 0 1em 0; padding: 15px;
  background: #f9f9f9; border: 2px dashed #666; border-radius: 12px;
}
.inline-reaction .inline-mechanism img { display: block; max-width: 100%; height: auto; }

.inline-header { display: flex; align-items: center; gap: 8px; }
.inline-header h3 { margin: 0.5em 0; }


.select-box {
  width: 8px; height: 8px; border: 2px solid #666; border-radius: 3px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-right: 8px; cursor: pointer; user-select: none;
}
.select-box svg { width: 12px; height: 12px; display: none; }
.select-box.checked { background: #2a7; border-color: #2a7; color: #fff; }
.select-box.checked svg { display: block; }

.year-block { font-size: 0.8em; color: var(--text-dark); margin: 4px 0; }
.ref-block  { font-size: 0.7em; color: var(--text-dark); margin: 0.25em 0 0.4em; }


.wiki-ref-link {
  display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
  margin-left: 6px; padding: 3px; border-radius: 6px;
  transition: background-color .15s ease, box-shadow .15s ease, transform .12s ease;
}
.wiki-ref-link:hover, .wiki-ref-link:focus-visible {
  background: rgba(0,177,64,0.16);
  box-shadow: 0 0 0 2px rgba(0,177,64,0.18) inset, 0 0 8px rgba(0,177,64,0.25);
  outline: none;
}
.wiki-ref-link:active { transform: translateY(0); }
.wiki-icon { width: 16px; height: 16px; vertical-align: middle; transition: transform .12s ease, filter .15s ease; }
.wiki-ref-link:hover .wiki-icon, .wiki-ref-link:focus-visible .wiki-icon { transform: scale(1.06); }


.expand-controls { margin: 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

#selection-bar {
  display: flex; align-items: center; gap: 8px;
  flex: 0 0 auto; white-space: nowrap;
}
#selection-bar .sel-left { flex: 0 0 auto; }
#selection-bar .sel-right { display: inline-flex; align-items: center; gap: 8px; margin-left: 10px; }
#show-selected-btn { margin-left: auto; }

.filter-chip { display: inline-block; background: #d0ebff; border-radius: 12px; padding: 2px 8px; margin-right: 6px;font-size: 0.85em; }
.chip-close { all: unset; cursor: pointer; margin-left: 4px; line-height: 1; color: inherit; }
.chip-close:hover { color: var(--text-dark); }


.about { margin: 8px 0 16px; }
.about-title { margin: 8px 0 10px; font-size: 1.25rem; }

.about-tabs {
  display: flex; gap: 0; border: 1px solid #ddd; border-radius: 10px; overflow: hidden;
  background: #f6f7fb; width: max-content; margin: 6px auto 14px; box-shadow: 0 0 0 1px #eee inset;
}
.about-tab {
  appearance: none; border: 0; border-right: 1px solid #ddd; padding: 10px 14px;
  font: inherit; font-weight: 600; background: transparent; color: #333; cursor: pointer; line-height: 1.1;
}
.about-tab:last-child { border-right: 0; }
.about-tab:hover { background: #fff; }
.about-tab.is-active { background: #fff; color: var(--main-blue); box-shadow: inset 0 -3px 0 var(--main-blue); }

.about-panels { position: relative; }
.about-panel { display: none; }
.about-panel.is-active { display: block; }

.bubble {
  position: relative; background: #fff; border: 1px solid #e5e5e5; border-radius: 14px; padding: 14px 16px;
  box-shadow: 0 6px 14px rgba(0,0,0,.06); max-width: 840px; margin: 0 auto;
  --beak-center: 28px;
}
.bubble::after, .bubble::before {
  content: ""; position: absolute; top: -10px; left: calc(var(--beak-center) - 10px);
  border-style: solid; border-width: 0 10px 10px 10px;
}
.bubble::after  { border-color: transparent transparent #e5e5e5 transparent; }
.bubble::before { top: -9px; border-color: transparent transparent #fff transparent; }

.bubble .color_use-img { max-width: 600px; width: 100%; height: auto; }

.bubble .mechanisms { max-width: 600px; width: 60%; height: auto; }



.contact-container {
  width: 500px; max-width: 90%; margin: 4rem auto; padding: 0 1rem;
  display: flex; flex-direction: column; align-items: center;
}
#contact-form { width: 100%; display: flex; flex-direction: column; gap: 1rem; }
#contact-form input, #contact-form textarea { width: 100%; box-sizing: border-box; }


main { display: flex; flex-direction: column; min-height: 100vh; padding: 10px 100px 100px; }

.count-badge {
  font-size: 0.6em; background: #eee; padding: 4px 8px; border-radius: 8px;
  box-shadow: 1px 1px 3px rgba(0,0,0,0.1); margin-left: 8px; color: var(--main-blue);
}

.site-footer { margin-top: auto; padding: 10px 0 0; border-top: 1px solid #e5e5e5; text-align: center; }
.site-footer .copyright { font-size: 1em; color: #999; margin: 6px 0 0; }


@media (max-width: 768px) {
  html { font-size: 16px; }
  body { line-height: 1.5; padding: 8px; }

  .container, .page, main, .content-wrap { width: auto; max-width: 100%; padding: 0 12px; }
  .grid-2, .grid-3, .columns, .two-col, .three-col { display: block !important; }

  #reaction-list { margin: 0; padding: 0; }
  #reaction-list li {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px; font-size: clamp(14px, 4vw, 18px); line-height: 1.3; overflow-wrap: anywhere;
  }

  .inline-reaction { margin: 12px 0; padding: 12px; border-radius: 12px; }
  .inline-reaction h3 { font-size: clamp(16px, 5vw, 22px); line-height: 1.25; }
  .inline-reaction img, .inline-eq, .inline-mech { max-width: 100% !important; height: auto !important; }
  .year-block { margin-top: 6px; }
  .ref-block { font-size: 0.95em; }
  .mech-toggle { width: 100%; padding: 10px; margin-top: 8px; touch-action: manipulation; }

  #suggestions-container { max-height: 40vh; overflow: auto; }
    
  table, .table { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  a, button { min-height: 44px; }

  .nav-links { gap: 8px; padding: 10px 6px 4px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .nav-btn {
    display: inline-flex !important; align-items: center; justify-content: center; box-sizing: border-box;
    font-size: 15px; line-height: 1.2; padding: 10px 14px; min-height: 40px; border-radius: 999px; text-align: center;
  }
  .nav-btn, .nav-btn:hover, .nav-btn[aria-current="page"] { border-width: 1.5px; }
}

@media (max-width: 700px) {
  .site-header { flex-wrap: wrap; row-gap: 8px; }
  .site-header .brand::after { display: none; }
  .nav-links { width: 100%; gap: 8px; order: 2; }
  .reaction-counter { order: 3; width: 100%; margin-left: 0; justify-content: flex-end; }

  .page-header { border-right: 0; padding-right: 0; margin: 0 0 .5rem 0; }
  #search-bar { display: block; }
}




.support-wrap {
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background: var(--bg-light);
}
.support-card {
  width: min(780px, 100%);
  background: #fff;
  border: 1px solid var(--gray-light);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 6px 18px rgba(0,0,0,.05);
}

.support-card h2 { margin: 0 0 8px; color: var(--text-dark); }
.support-card .lead { color: var(--gray-medium); margin: 0 0 16px; }


.support-wrap .tiers {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin: 12px 0 8px;
}


.support-wrap .btn {
  padding: .7rem 1.1rem;
  border-radius: 999px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .2s ease, color .2s ease;
  line-height: 1;
}
.support-wrap .btn,
.support-wrap .btn:link,
.support-wrap .btn:visited {
  text-decoration: none;          
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}
.support-wrap button.btn {
  -webkit-appearance: none;
  appearance: none;
  background: none;               
}
.support-wrap .btn:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,.12); }
.support-wrap .btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--main-blue) 40%, white); outline-offset: 2px; }
.support-wrap .btn:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }


.support-wrap .btn.tier       { background: var(--main-blue);  color: #fff; }
.support-wrap .btn.tier.alt   { background: var(--main-pink);  color: #fff; }
.support-wrap .btn.primary    { background: var(--main-green); color: #fff; }
.support-wrap .btn.outline    { background: transparent; border: 2px solid var(--main-blue); color: var(--main-blue); }
.support-wrap .btn.outline:hover { background: color-mix(in srgb, var(--main-blue) 8%, white); }
.support-wrap .btn.paypal     { background: #ffc439; color: #111; }
.support-wrap .btn.stripe     { background: var(--main-blue); color: #fff; }
.support-wrap .donate-btn     { font-size: 1rem; padding: .8rem 1.4rem; }


.support-wrap .custom { margin: 6px 0 12px; }
.support-wrap .custom label { display:block; font-weight: 600; color: var(--text-dark); margin-bottom: 6px; }
.support-wrap .input-row {
  display: flex; align-items: stretch; gap: .5rem;
}
.support-wrap .prefix {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 .7rem; border: 1px solid var(--gray-light);
  border-radius: 999px; background: #fff; color: var(--text-dark);
}
.support-wrap #donation-amount {
  width: 120px; padding: .65rem .8rem;
  border: 1px solid var(--gray-light); border-radius: 999px;
  font-weight: 600; color: var(--text-dark);
}
.support-wrap #donation-amount:focus {
  outline: 2px solid color-mix(in srgb, var(--main-orange) 40%, white);
  border-color: var(--main-orange);
}


.support-wrap .donation-buttons {
  display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px;
}
.support-wrap .donation-buttons > a,
.support-wrap .donation-buttons > form {
  flex: 1 1 260px;                
}
.support-wrap .donation-buttons > form {
  display: flex; margin: 0;       
}
.support-wrap .donation-buttons > form .btn { width: 100%; }


.support-wrap .cta { margin-top: 12px; }
.support-wrap .alt-method { margin-top: 10px; }

.support-wrap .thanks    { margin-top: 12px; color: var(--main-green); font-weight: 700; }
.support-wrap .fineprint { margin-top: 14px; color: var(--gray-medium); font-size: .9rem; }


.nav-cta-outline {
  background: transparent;
  color: var(--main-pink);
  border: 2px solid var(--main-pink);
  padding: .5rem .95rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background .2s ease, color .2s ease, transform .15s ease, box-shadow .15s ease;
}
.nav-cta-outline:hover {
  background: color-mix(in srgb, var(--main-pink) 10%, white);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,.12);
}
.nav-cta-outline:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--main-pink) 35%, white);
  outline-offset: 2px;
}
.nav-cta-outline:active { transform: translateY(0); box-shadow: none; }

@media (max-width: 600px) {
  .nav-cta-outline { padding: .45rem .85rem; }
}

.reaction-name { cursor: pointer; }

.group-section {margin-top: 1rem} 


