/* WS9 — hyperlink visibility.
   loanatik.css:76 sets `a{color:inherit;text-decoration:none}`, which strips the
   affordance from every link on the site; underlines were then added back
   piecemeal (legal prose, gate notes, a few :hover rules). This makes
   in-content links visible by convention instead: colour AND underline, so the
   cue never depends on colour alone.

   Scoped to body copy on purpose. Navigation, buttons, cards and the footer
   chrome carry their own affordances, and underlining a nav bar or a button
   reads as broken rather than as a link.

   Colour choice is contrast-driven, not brand-driven: --lime-700 (#6fa524) on
   white measures ~2.96:1, which fails WCAG AA for body text (4.5:1) — and this
   site publishes an accessibility statement. Navy-700 on white is ~12.2:1, and
   brand lime on the dark surface is ~8.5:1, so each theme gets the token that
   actually passes. */

:root{
  --link:#22355a;
  --link-hover:#192741;
}
@media (prefers-color-scheme:dark){
  :root{ --link:#8FC631; --link-hover:#a8d75a; }
}
:root[data-theme="dark"]{ --link:#8FC631; --link-hover:#a8d75a; }
:root[data-theme="light"]{ --link:#22355a; --link-hover:#192741; }

/* In-content links. :where() keeps specificity at zero so component styles and
   utility classes can still override without an !important arms race. */
:where(.prose,.entry-content,.post-body,.lk-article,.legal-page,.article-body,.lk-related-list)
  :is(p,li,dd,dt,td,th,blockquote,figcaption,.step-why,.gate-note)
  a:not([class*="btn"]):not([class*="card"]):not([class*="button"]){
    color:var(--link);
    text-decoration:underline;
    text-underline-offset:2px;
    text-decoration-thickness:from-font;
}

:where(.prose,.entry-content,.post-body,.lk-article,.legal-page,.article-body,.lk-related-list)
  :is(p,li,dd,dt,td,th,blockquote,figcaption,.step-why,.gate-note)
  a:not([class*="btn"]):not([class*="card"]):not([class*="button"]):hover{
    color:var(--link-hover);
    text-decoration-thickness:2px;
}

/* Standalone helper paragraphs that sit outside .prose but are still body copy. */
:where(.step-why,.gate-note,.foot-local,.legal-fine,.disclosure) a:not([class*="btn"]){
  color:inherit;
  text-decoration:underline;
  text-underline-offset:2px;
}

/* The legal pages previously hard-coded the failing lime; route them through the
   accessible token. Specificity matches the original rule in ws7.css. */
.legal-page .prose a{
  color:var(--link);
  text-decoration:underline;
  text-underline-offset:2px;
}
.legal-page .prose a:hover{ color:var(--link-hover); text-decoration-thickness:2px; }

/* Links that are not in prose still need a visible cue on interaction, so
   nav, footer and card links underline on hover and focus. */
:where(nav,.footer,.foot-bottom,.site-header,.crumbs) a:hover,
:where(nav,.footer,.foot-bottom,.site-header,.crumbs) a:focus-visible{
  text-decoration:underline;
  text-underline-offset:3px;
}

/* Keyboard focus must never be weaker than hover. loanatik.css:108 already sets
   a global lime focus ring; this just guarantees the underline comes with it. */
a:focus-visible{ text-decoration:underline; text-underline-offset:3px; }
