/* Mosquito Almanac field-guide detail styling.
   Layered on top of Twenty Twenty-Five + theme.json (which handles the palette and fonts).
   These rules add the finer naturalist-reference touches. */

:root {
  --ma-paper: #F7F4EC;
  --ma-paper-2: #EFEADC;
  --ma-ink: #1C1E1A;
  --ma-ink-soft: #4A4E45;
  --ma-pine: #1F4A3D;
  --ma-amber: #C8862B;
  --ma-teal: #2C6E71;
  --ma-rule: #D8D1BE;
  --ma-danger: #B23A2E;
  --ma-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --ma-mono: "SFMono-Regular", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;
}

/* Comfortable reading measure and rhythm for article body */
.wp-block-post-content p,
.entry-content p {
  max-width: 68ch;
}
.wp-block-post-content,
.entry-content {
  line-height: 1.72;
}

/* Headings: editorial serif, balanced */
h1, h2, h3, h4, .wp-block-heading {
  font-family: var(--ma-serif);
  text-wrap: balance;
}
h2.wp-block-heading {
  border-top: 1px solid var(--ma-rule);
  padding-top: 1.1em;
  margin-top: 1.6em;
}

/* Links: subtle underline offset */
.entry-content a,
.wp-block-post-content a {
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

/* Post title */
.wp-block-post-title {
  font-family: var(--ma-serif);
  letter-spacing: -0.01em;
}

/* Tables as printed-reference tables with hairline rules */
.wp-block-table table,
.entry-content table {
  border-collapse: collapse;
  font-size: 0.96rem;
}
.wp-block-table th,
.wp-block-table td,
.entry-content th,
.entry-content td {
  border: 1px solid var(--ma-rule);
  padding: 0.55em 0.8em;
  text-align: left;
  vertical-align: top;
}
.wp-block-table thead th,
.entry-content thead th {
  background: var(--ma-paper-2);
  font-family: var(--ma-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Figures and images: thin field-guide plate frame + mono caption */
.wp-block-image img {
  border: 1px solid var(--ma-rule);
  border-radius: 3px;
}
.wp-block-image figcaption,
figcaption {
  font-family: var(--ma-mono);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  color: var(--ma-ink-soft);
}

/* Blockquotes and the closing disclaimer line: amber rule, like a note in the margin */
.entry-content blockquote,
.wp-block-quote {
  border-left: 3px solid var(--ma-amber);
  background: var(--ma-paper-2);
  padding: 0.8em 1.1em;
  font-style: normal;
  color: var(--ma-ink-soft);
  font-size: 0.95rem;
}

/* The Sources list: numbered reference list with a printed feel */
.entry-content ol,
.wp-block-post-content ol {
  padding-left: 1.4em;
}
.entry-content h2 + ol li,
.wp-block-post-content h2 + ol li {
  margin-bottom: 0.5em;
}

/* Bulleted lists: amber tick markers */
.entry-content ul,
.wp-block-post-content ul {
  list-style: none;
  padding-left: 1.4em;
}
.entry-content ul li,
.wp-block-post-content ul li {
  position: relative;
}
.entry-content ul li::before,
.wp-block-post-content ul li::before {
  content: "";
  position: absolute;
  left: -1.1em;
  top: 0.7em;
  width: 8px;
  height: 2px;
  background: var(--ma-amber);
}

/* Homepage cluster columns: card-like hubs */
.home .wp-block-columns .wp-block-column {
  background: var(--ma-paper-2);
  border: 1px solid var(--ma-rule);
  border-radius: 5px;
  padding: 1.1em 1.2em;
}
.home .wp-block-columns .wp-block-column h3 {
  margin-top: 0;
}
.home .wp-block-columns .wp-block-column h3 a {
  text-decoration: none;
  color: var(--ma-pine);
}

/* Focus visibility for accessibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ma-amber);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
