/* rc-link-blue.css: site-wide content-link blue + readable placeholders (operator ruling
   2026-09-26: "links globally ... a nice colored blue"). Loaded right after rc-custom.css
   (post 20) by mu-plugins/rc-link-blue.php, so equal-specificity rules here win. Rollback:
   delete rc-link-blue.php. Source and contrast measurements: genus/_data/cites-trade/link-blue.css.
   The "REPLACES served lines" notes below mean "overrides"; post 20 itself is unchanged. */

/* ---- P. Placeholders: the theme renders them at 1.14:1 on white; #736A5D is 5.2:1 on
   parchment and 5.4:1 on white. */
input::placeholder, textarea::placeholder { color: #736A5D; opacity: 1; }

/* ---- A. Tokens + global link colour -------------------------------------
   Add the three tokens to the existing :root block (served lines 6-16, next
   to --rc-green). Then REPLACE served lines 121-122:
       a { color: var(--rc-green); }
       a:hover { color: var(--rc-green-dark); }
   with the four rules below.
   Why a:hover stays green-dark for classed anchors: many designed components
   (.rc-rg-pill, .enc-genus-card, .hp-data-card ...) set colour with a single
   class (0,1,0) and have no hover colour of their own, so today they inherit
   this a:hover (0,1,1) on hover. Keeping it unchanged means their hover does
   not move. Only class-less anchors (content links) get the blue hover. */
:root {
  --rc-link: #1159AF;
  --rc-link-hover: #0B4A8F;
  --rc-link-underline: #88ABD2;                  /* fallback: 50% link on parchment */
  --rc-link-underline: color-mix(in srgb, var(--rc-link) 55%, transparent);
}
a { color: var(--rc-link); }
a:hover { color: var(--rc-green-dark); }         /* unchanged behaviour for classed UI */
/* :focus and :active are listed because Kadence's own
   "a:hover,a:focus,a:active { color: var(--global-palette-highlight-alt) }"
   resolves to #F9D548 yellow (1.3:1) and the old post-20 rule only covered :hover.
   Measured bug on every page today: a keyboard-focused text link turns yellow. */
a:not([class]):hover,
a:not([class]):focus,
a:not([class]):active { color: var(--rc-link-hover); }
a:not([class]):focus-visible { outline: 2px solid var(--rc-link); outline-offset: 2px; }

/* ---- B. Underline style for running-text links ---------------------------
   Only colour, thickness and offset are set, never text-decoration-line, so
   components that turn the underline off keep it off (.rc-fdb-ssr-list,
   .rc-fdb-cell-species, cards). House look matches the article template:
   thin tinted underline that goes solid on hover. */
.entry-content :is(p, li, td, th, dd, figcaption, blockquote) a:not([class]) {
  text-decoration-color: var(--rc-link-underline);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
.entry-content :is(p, li, td, th, dd, figcaption, blockquote) a:not([class]):hover {
  text-decoration-color: currentColor;
}

/* ---- C. Rules in post 20 that paint content links green ------------------ */
/* REPLACES served lines 1064-1065:
     .about-contact a { color: #3A7A3A; text-decoration: none; border-bottom: 1px solid #C9DCC9; }
     .about-contact a:hover { border-bottom-color: #3A7A3A; }            */
.about-contact a { color: var(--rc-link); text-decoration: none; border-bottom: 1px solid var(--rc-link-underline); }
.about-contact a:hover { color: var(--rc-link-hover); border-bottom-color: currentColor; }

/* REPLACES served line 464 (colour only; keeps the !important because the
   existing rule has it and Kadence TOC sets its own link colour):
     .kadence-table-of-contents a { color: var(--rc-green) !important; font-size: 14px !important; }
   Not rendered on any of the 8 sampled pages today; kept consistent. */
.kadence-table-of-contents a { color: var(--rc-link) !important; font-size: 14px !important; }

/* ---- D. Inline-styled green text links in stored post_content ------------
   These anchors carry style="color:#3A7A3A..." in post_content, and an inline
   style beats every normal stylesheet rule, so !important is the measured
   minimum. Attribute-matched, so pills/buttons with other inline styles are
   not touched.
   D1: citation/licence/DOI links (field-numbers page, 7 on /field-numbers/)
       and species synonyms-box authority links (POWO, IPNI, GBIF, Wikidata;
       4 per species page, on #EAF3DE, 5.98:1). */
a[style*="color:#3A7A3A;text-decoration:underline" i] {
  color: var(--rc-link) !important;
  text-decoration-color: var(--rc-link-underline) !important;
  text-underline-offset: 0.18em;
}
a[style*="color:#3A7A3A;text-decoration:underline" i]:hover {
  color: var(--rc-link-hover) !important;
  text-decoration-color: currentColor !important;
}
/* D2: species "Contents" list (8 per species page): plain text links in an
   ordered list with a decorative arrow. JUDGEMENT CALL, ruled as content
   links (text, not pills). Delete D2 to keep them green. */
a[href^="#"][style*="justify-content:space-between"][style*="color:#3A7A3A" i] { color: var(--rc-link) !important; }
a[href^="#"][style*="justify-content:space-between"][style*="color:#3A7A3A" i]:hover { color: var(--rc-link-hover) !important; }
a[href^="#"][style*="justify-content:space-between"][style*="color:#3A7A3A" i] > span[style*="#B5D48A" i] {
  color: color-mix(in srgb, var(--rc-link) 45%, #FFFDF5) !important;   /* arrow, decorative */
}

/* ---- E. Unify the three existing content blues onto the token -------------
   Already blue, but three different blues. These live in mu-plugin inline
   CSS, not post 20; overriding here is a stop-gap. Better fix at source:
   swap the hex for var(--rc-link) in each mu-plugin next time it ships.
     rc-article-template-css  body.single-article .entry-content a  #2C5478  (0,2,2)
     rc-article-template-css  .rc-art-sources a                     #2C5478  (0,1,1)
     rc-fieldnum-ssr-css      .rc-fdb-ssr-list a / .rc-fdb-ssr-table a  #2B63A6  (0,1,1)
   Each override is one step more specific, so load order does not matter. */
body.single-article .entry-content a:not([class]) { color: var(--rc-link); text-decoration-color: var(--rc-link-underline); }
body.single-article .entry-content a:not([class]):hover { color: var(--rc-link-hover); text-decoration-color: currentColor; }
body .rc-art-sources a { color: var(--rc-link); text-decoration-color: var(--rc-link-underline); }
body .rc-art-sources a:hover { color: var(--rc-link-hover); text-decoration-color: currentColor; }
body .rc-fdb-ssr-list a, body .rc-fdb-ssr-table a { color: var(--rc-link); }
body .rc-fdb-ssr-list a:hover, body .rc-fdb-ssr-table a:hover { color: var(--rc-link-hover); }

