/* Classy blog styling with faint tan background and foresty green text */

:root {
  --bg-tan: #ffffff;        /* White background */
  --text-green: #1a4d2e;    /* Dark forest green */
  --link-green: #226b3a;    /* Slightly lighter for links */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-tan);
  color: #000;
  font-family: Arial, sans-serif;
  line-height: 1.7;
  margin: 0;
  padding: 2rem;
  font-size: 18px;
}

main, header:not(.site-header) {
  max-width: 700px;
  margin: 0 auto;
}

h1, h2, h3 {
  color: var(--text-green);
  margin-bottom: 1rem;
  font-weight: 600;
}

h1 {
  font-size: 2rem;
  margin-bottom: 0;
  line-height: 1.2;
}

main h1 {
  margin-top: 1rem;
}

main h1 + p {
  margin-top: 1rem;
}

h1 a {
  color: inherit;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--link-green);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-bottom-color 0.2s ease;
}

a:hover {
  border-bottom-color: var(--link-green);
}

/* Footer meter */
.footer-meter {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
}

.weirdness-meter {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.weirdness-meter label {
  font-size: 0.8rem;
  color: #888;
}

.slider-container {
  position: relative;
  width: 150px;
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  padding: 0 7px;
  margin-top: 4px;
}

.slider-ticks span {
  width: 6px;
  height: 6px;
  background: #bbb;
  border-radius: 50%;
}

.weirdness-value {
  font-size: 0.9rem;
  color: var(--text-green);
  font-weight: 600;
  min-width: 1.5rem;
  text-align: center;
}

.weirdness-slider {
  width: 150px;
  height: 8px;
  appearance: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.weirdness-slider::-webkit-slider-runnable-track {
  height: 8px;
  background: linear-gradient(to right, #e0e0e0, #e57373);
  border-radius: 4px;
}

.weirdness-slider::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  background: var(--text-green);
  border-radius: 50%;
  cursor: pointer;
  margin-top: -4px;
}

.weirdness-slider::-moz-range-track {
  height: 8px;
  background: linear-gradient(to right, #e0e0e0, #e57373);
  border-radius: 4px;
}

.weirdness-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: var(--text-green);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  width: 150px;
  font-size: 0.7rem;
  color: #aaa;
  margin-top: 0.5rem;
}

/* Site header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #ddd;
  position: relative;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-green);
}

.tagline {
  font-style: italic;
  color: #aaa;
  font-size: 0.9rem;
  font-weight: normal;
  position: absolute;
  left: 50%;
  top: calc(50% - 0.5rem);
  transform: translate(-50%, -50%);
}

.site-header nav a {
  margin-left: 1.5rem;
  color: var(--text-green);
}

/* Page header */
header {
  margin-bottom: 1rem;
}

.alt-titles {
  font-size: 0.9rem;
  color: #5a7464;
  margin-top: 0.5rem;
  font-style: italic;
}

.subtitle {
  font-style: italic;
  color: #555;
  margin-top: 0.4rem;
  margin-bottom: 0;
}

.subtitle-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.subtitle-row .post-meta {
  font-style: italic;
  font-size: inherit;
  color: #555;
  margin-top: 0;
}

.post-meta {
  font-size: 0.9rem;
  color: #666;
  margin-top: 0.4rem;
}

.muted {
  color: #aaa;
}

.tag {
  background: #e8f0eb;
  color: var(--text-green);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-size: 0.85rem;
  float: right;
}

.citation {
  font-size: 0.75em;
  vertical-align: baseline;
  position: relative;
  top: -0.4em;
  border-bottom: none;
  cursor: help;
}

.citation:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.9rem;
  white-space: nowrap;
  z-index: 10;
}

main img {
  max-width: 100%;
  height: auto;
  max-height: 255px;
  display: block;
  margin: 1rem auto;
}

.tooltip-img {
  position: relative;
  display: inline-block;
  cursor: help;
}

.tooltip-img:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.9rem;
  white-space: nowrap;
  margin-bottom: 0.5rem;
  z-index: 10;
}

.report-bug {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  background: #fff;
  border: 1px solid #ccc;
  color: #888;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 1000;
}

.report-bug:hover {
  border-color: #999;
  color: #666;
}

/* Email signup */
.email-signup {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
}

/* Inline email signup for article pages */
main .email-signup {
  position: static;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
  gap: 1rem;
}

.email-signup label {
  font-size: 0.8rem;
  color: #888;
}

.email-signup form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.email-signup input[type="email"] {
  width: 180px;
  padding: 0.4rem 0.6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.75rem;
}

.email-signup input[type="email"]:focus {
  outline: none;
  border-color: var(--link-green);
}

.email-signup button {
  background: #fff;
  border: 1px solid #ccc;
  color: #888;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.email-signup button:hover {
  border-color: #999;
  color: #666;
}

.email-signup input[type="email"]:valid + button {
  background-color: var(--text-green);
  border-color: var(--text-green);
  color: #fff;
}

/* Article navigation */
.article-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #ddd;
  font-size: 0.95rem;
}

.article-nav a {
  color: var(--link-green);
}

.article-nav span {
  flex: 1;
}

