/* ===========================================================================
 * Kabir Family Law - office, contact and people design layer
 * File   : wp-content/themes/kabir-child/css/kfl-office-design.css
 * Loaded : by inc/kfl-office-design.php, and ONLY on the surfaces whose markup
 *          it styles - the ten /offices/ pages, the contact page template, and
 *          the people roster page. It is NOT loaded site-wide.
 *
 * The site-wide footer rules were moved out of this file on 3 September 2026
 * into css/kfl-footer-design.css, because they were the only reason ~30 KB of
 * page-specific CSS was being matched against every page on the site.
 *
 *  - No typeface is loaded here. No script. No third-party request.
 *  - Every transition is switched OFF, not down, by prefers-reduced-motion.
 *  - Nothing here reserves its box after paint, so nothing shifts layout.
 * ======================================================================== */
/* --- tokens. Colours are the firm's existing navy, gold and paper. -------
 * Measured contrast against white: navy 11.86:1, muted 6.68:1,
 * gold-text 4.90:1, hairline gold 3.09:1 (used only as a rule and an icon,
 * never as body text).
 */
:root {
  --kflNavy:      #35354E;
  --kflNavyDeep:  #262639;
  --kflMuted:     #54546B;
  --kflGold:      #B28E2E;
  --kflGoldText:  #8A6D1F;
  --kflPaper:     #FAF9F7;
  --kflLine:      #E4E1DB;
  --kflLineSoft:  #EFEDE8;
  --kflWhite:     #FFFFFF;
  --kflStep:      4px;
  --kflRadius:    6px;
  --kflEase:      cubic-bezier(.22,.61,.36,1);
}

/* =========================================================================
 * 1 · THE PEOPLE ROSTER  (.kflp)
 * ====================================================================== */

.kflp {
  margin: 48px 0 44px;
  padding: 0;
  clear: both;
}

.kflp__head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 0 0 4px;
}

/* The section heading. Sized down from the page's own h2 on purpose: this is
 * a component title inside the article, not a rival to the page's structure. */
.kflp .kflp__head .kflp__title {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: clamp(20px, 1.4vw + 15px, 25px);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--kflNavy);
}

.kflp__rule {
  flex: 1 1 auto;
  height: 2px;
  min-width: 24px;
  background: var(--kflGold);
  opacity: .55;
}

.kflp__note {
  margin: 6px 0 22px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--kflMuted);
}

.kflp__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.kflp__list > li {
  margin: 0;
  padding: 0;
}

.kflp__list > li::before { content: none; }   /* the theme adds bullets to li */

/* --- the card ---------------------------------------------------------- */

.kflp-card {
  position: relative;
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 0 18px;
  align-items: start;
  padding: 14px 16px 14px 14px;
  background: var(--kflWhite);
  border: 1px solid var(--kflLine);
  border-left: 3px solid var(--kflLineSoft);
  border-radius: var(--kflRadius);
  transition:
    border-left-color .28s var(--kflEase),
    border-color      .28s var(--kflEase),
    box-shadow        .28s var(--kflEase),
    transform         .28s var(--kflEase);
}

.kflp-card:hover,
.kflp-card:focus-within {
  border-color: #D6D2CA;
  border-left-color: var(--kflGold);
  box-shadow: 0 6px 18px -8px rgba(38,38,57,.28);
  transform: translateY(-2px);
}

/* --- portrait. aspect-ratio holds the box before the picture lands, so the
 * card's height is decided by CSS and never by the image. --------------- */

.kflp-card__photo {
  position: relative;
  display: block;
  width: 116px;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 4px;
  background: var(--kflLineSoft);
}

.kflp-card__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;      /* faces sit in the upper third */
  transition: transform .5s var(--kflEase);
}

.kflp-card:hover .kflp-card__photo img { transform: scale(1.035); }

/* Stand-in when a profile carries no photograph. Deliberately plain: an
 * initial, not an illustration of a person who does not exist. */
.kflp-card__photo--none {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--kflPaper);
  border: 1px dashed var(--kflLine);
}

.kflp-card__initial {
  font-size: 30px;
  font-weight: 700;
  color: var(--kflMuted);
  opacity: .55;
}

/* --- text ------------------------------------------------------------- */

.kflp-card__text { min-width: 0; padding-top: 2px; }

.kflp .kflp-card .kflp-card__name {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--kflNavy);
}

.kflp-card__name a {
  position: relative;
  display: inline-block;
  color: inherit;
  text-decoration: none;
}

/* the signature: a gold hairline that draws under the name */
.kflp-card__name a::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 2px;
  background: var(--kflGold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .38s var(--kflEase);
}

.kflp-card:hover .kflp-card__name a::before,
.kflp-card__name a:focus-visible::before { transform: scaleX(1); }

/* the whole card is clickable, but there is still only one link to the profile */
.kflp-card__name a::after {
  content: "";
  position: absolute;
  inset: -14px -16px -14px -14px;
  border-radius: var(--kflRadius);
}

.kflp-card__name a:focus-visible {
  outline: none;
}

.kflp-card__name a:focus-visible::after {
  outline: 3px solid var(--kflNavy);
  outline-offset: 2px;
}

.kflp .kflp-card .kflp-card__role {
  margin: 7px 0 0;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: .01em;
  color: var(--kflMuted);
}

.kflp .kflp-card .kflp-card__go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--kflGoldText);
}

.kflp-card__go svg {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  transition: transform .28s var(--kflEase);
}

.kflp-card:hover .kflp-card__go svg { transform: translateX(3px); }

/* --- the direct routes. Real controls, above the card overlay. --------- */

.kflp-card__actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
}

.kflp-act {
  position: relative;
  z-index: 2;                       /* sits above the card-wide link overlay */
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;                 /* touch target, above the 24px minimum */
  padding: 8px 14px;
  border: 1px solid var(--kflLine);
  border-radius: 4px;
  background: var(--kflPaper);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--kflNavy);
  text-decoration: none;
  transition:
    background-color .22s var(--kflEase),
    border-color     .22s var(--kflEase),
    color            .22s var(--kflEase);
}

.kflp-act svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  fill: currentColor;
  opacity: .8;
}

.kflp-act:hover,
.kflp-act:focus-visible {
  background: var(--kflNavy);
  border-color: var(--kflNavy);
  color: var(--kflWhite);
  text-decoration: none;
}

.kflp-act:focus-visible {
  outline: 3px solid var(--kflNavy);
  outline-offset: 2px;
}

.kflp-act__label { white-space: nowrap; }

/* --- once there is room, the card becomes a full roster row: portrait,
 * then the person, then the ways to reach them. One per line, like entries
 * in a register — never a three-across gallery of faces. ---------------- */

@media (min-width: 640px) {
  .kflp__list { gap: 14px; }

  .kflp-card {
    grid-template-columns: 132px minmax(0, 1fr) auto;
    gap: 0 22px;
    align-items: center;
    padding: 16px 18px 16px 16px;
  }

  .kflp-card__photo { width: 132px; }

  .kflp .kflp-card .kflp-card__name { font-size: 20px; }

  .kflp .kflp-card .kflp-card__role { margin-top: 8px; font-size: 15px; }

  .kflp-card__actions {
    grid-column: auto;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    margin: 0;
    min-width: 190px;
  }

  .kflp-act { justify-content: flex-start; }
}

@media (min-width: 1100px) {
  .kflp-card { grid-template-columns: 148px minmax(0, 1fr) auto; }
  .kflp-card__photo { width: 148px; }
  .kflp-card__actions { min-width: 210px; }
}

/* --- motion off ------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .kflp-card,
  .kflp-card__photo img,
  .kflp-card__name a::before,
  .kflp-card__go svg,
  .kflp-act { transition: none; }
  .kflp-card:hover { transform: none; }
  .kflp-card:hover .kflp-card__photo img { transform: none; }
  .kflp-card:hover .kflp-card__go svg { transform: none; }
  .kflp-card:hover .kflp-card__name a::before,
  .kflp-card__name a:focus-visible::before { transform: scaleX(1); }
}

/* --- forced colours (Windows high contrast) --------------------------- */

@media (forced-colors: active) {
  .kflp-card { border: 1px solid CanvasText; }
  .kflp-act { border: 1px solid CanvasText; }
}

/* visually hidden, still read aloud — defined here so the roster never depends
 * on another stylesheet having a class of the same name */
.kflp-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* =========================================================================
 * 2 · THE OFFICE PAGES  (.kflo)
 *
 * The problem this solves, measured on the York page 3 Sept 2026: the street
 * address and the local telephone number sit at the very BOTTOM of roughly
 * 2,000 words. A reader who has come to find where the office is, or to call
 * it, has to read the whole page first. The strip below puts each office's own
 * details directly under the heading, where someone in trouble looks first.
 * Every value in it is read from the office's own record. Nothing is invented.
 * ====================================================================== */

.kflo-local {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 0 0 30px;
  padding: 18px 20px;
  background: var(--kflPaper);
  border: 1px solid var(--kflLine);
  border-left: 3px solid var(--kflGold);
  border-radius: var(--kflRadius);
}

.kflo-local__where {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
}

.kflo-local__pin {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  fill: var(--kflGold);
}

.kflo-local__addr {
  margin: 0;
  font-style: normal;
  font-size: 16px;
  line-height: 1.55;
  color: var(--kflNavy);
}

.kflo-local__addr p { margin: 0; }

.kflo-local__do {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.kflo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 10px 20px;
  border-radius: 4px;
  border: 1px solid transparent;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition:
    background-color .22s var(--kflEase),
    border-color     .22s var(--kflEase),
    color            .22s var(--kflEase),
    box-shadow       .22s var(--kflEase);
}

.kflo-btn svg { width: 17px; height: 17px; flex: 0 0 17px; fill: currentColor; }

.kflo-btn--call {
  background: var(--kflNavy);
  border-color: var(--kflNavy);
  color: var(--kflWhite);
}

.kflo-btn--call:hover,
.kflo-btn--call:focus-visible {
  background: var(--kflNavyDeep);
  border-color: var(--kflNavyDeep);
  color: var(--kflWhite);
  box-shadow: 0 4px 14px -6px rgba(38,38,57,.55);
  text-decoration: none;
}

.kflo-btn--mail {
  background: var(--kflWhite);
  border-color: #C8C4BC;
  color: var(--kflNavy);
}

.kflo-btn--mail:hover,
.kflo-btn--mail:focus-visible {
  background: var(--kflNavy);
  border-color: var(--kflNavy);
  color: var(--kflWhite);
  text-decoration: none;
}

.kflo-btn:focus-visible { outline: 3px solid var(--kflNavy); outline-offset: 3px; }

@media (min-width: 720px) {
  .kflo-local {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    padding: 20px 24px;
  }
  .kflo-local__do { justify-content: flex-end; }
}

/* --- reading rhythm on the office pages ------------------------------- */

.single-offices .article-area { font-size: 17px; line-height: 1.68; }
.single-offices .article-area > p { max-width: 68ch; margin: 0 0 20px; }
.single-offices .article-area > ul,
.single-offices .article-area > ol { max-width: 68ch; }
.single-offices .article-area h2 { margin-top: 40px; }
.single-offices .article-area h3 { margin-top: 30px; }

/* an embedded map must never push the page sideways on a phone */
.single-offices .article-area iframe,
.page-template-page-contact .article-area iframe {
  max-width: 100%;
  border: 0;
  border-radius: var(--kflRadius);
}

/* --- the office details block the template already prints at the foot --- */

.single-offices .office-adres { margin-top: 8px; }

.single-offices .office-container,
.page-template-page-contact .office-container {
  padding: 20px 22px;
  margin-bottom: 12px;
  background: var(--kflWhite);
  border: 1px solid var(--kflLine);
  border-left: 3px solid var(--kflLineSoft);
  border-radius: var(--kflRadius);
  transition: border-left-color .28s var(--kflEase), box-shadow .28s var(--kflEase);
}

.single-offices .office-container:hover,
.page-template-page-contact .office-container:hover {
  border-left-color: var(--kflGold);
  box-shadow: 0 6px 18px -10px rgba(38,38,57,.3);
}

.single-offices .office-container h4,
.page-template-page-contact .office-container h4 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--kflNavy);
}

.single-offices .office-container p,
.page-template-page-contact .office-container p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--kflMuted);
}

.single-offices .office-container strong,
.page-template-page-contact .office-container strong {
  display: inline-block;
  min-width: 106px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--kflMuted);
}

.single-offices .office-container a[href^="tel:"],
.single-offices .office-container a[href^="mailto:"],
.page-template-page-contact .office-container a[href^="tel:"],
.page-template-page-contact .office-container a[href^="mailto:"] {
  font-weight: 700;
  color: var(--kflGoldText);
  text-decoration: none;
  border-bottom: 1px solid rgba(178,142,46,.4);
  transition: border-color .22s var(--kflEase), color .22s var(--kflEase);
}

.single-offices .office-container a[href^="tel:"]:hover,
.single-offices .office-container a[href^="mailto:"]:hover,
.page-template-page-contact .office-container a[href^="tel:"]:hover,
.page-template-page-contact .office-container a[href^="mailto:"]:hover {
  color: var(--kflNavy);
  border-bottom-color: var(--kflNavy);
}

/* --- the "Our Offices" list in the sidebar ---------------------------- */

.single-offices .widget_nav_menu .menu{
  margin: 0;
  padding: 0;
  list-style: none;
}

.single-offices .widget_nav_menu .menu > li{
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--kflLineSoft);
}

.single-offices .widget_nav_menu .menu > li:last-child{ border-bottom: 0; }

.single-offices .widget_nav_menu .menu > li > a{
  position: relative;
  display: block;
  padding: 12px 14px 12px 16px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--kflNavy);
  text-decoration: none;
  /* padding-left changes on hover but is deliberately NOT transitioned: it is a
   * layout property, and this file's promise is that nothing which reflows is
   * ever animated. The indent still happens; it simply snaps. */
  transition: background-color .2s var(--kflEase);
}

.single-offices .widget_nav_menu .menu > li > a::before{
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--kflGold);
  transform: scaleY(0);
  transform-origin: center top;
  transition: transform .26s var(--kflEase);
}

.single-offices .widget_nav_menu .menu > li > a:hover{
  background: var(--kflPaper);
  padding-left: 20px;
  text-decoration: none;
}

.single-offices .widget_nav_menu .menu > li > a:hover::before,
.single-offices .widget_nav_menu .current-menu-item > a::before{ transform: scaleY(1); }

.single-offices .widget_nav_menu .current-menu-item > a{
  padding-left: 20px;
  font-weight: 700;
  background: var(--kflPaper);
}

.single-offices .widget_nav_menu .menu > li > a:focus-visible{
  outline: 3px solid var(--kflNavy);
  outline-offset: -3px;
}

@media (prefers-reduced-motion: reduce) {
  .kflo-btn,
  .single-offices .office-container,
  .page-template-page-contact .office-container,
  .single-offices .widget_nav_menu .menu > li > a,
  .single-offices .widget_nav_menu .menu > li > a::before,
  /* Added 3 Sept 2026 after an independent reviewer found these four selectors
   * transitioning colour with nothing switching them off. Colour only, never
   * layout — but this file's promise is that reduced motion turns every
   * transition off rather than down, so the gap was real. */
  .single-offices .office-container a[href^="tel:"],
  .single-offices .office-container a[href^="mailto:"],
  .page-template-page-contact .office-container a[href^="tel:"],
  .page-template-page-contact .office-container a[href^="mailto:"] { transition: none; }
}

@media (forced-colors: active) {
  .kflo-local,
  .single-offices .office-container,
  .page-template-page-contact .office-container { border: 1px solid CanvasText; }
  .kflo-btn { border: 1px solid CanvasText; }
}

/* =========================================================================
 * 3 · THE CONTACT PAGE
 *
 * MEASURED 3 Sept 2026: the page prints all ten offices as full-width rows,
 * one under another, and not one of them links to its own office page. So the
 * page is very long, and it is a dead end — a reader who picks their city has
 * nowhere to go. The grid below halves the length; the office names are turned
 * into links by the module, which is the part CSS cannot do.
 * ====================================================================== */

.page-template-page-contact .adresses-area h3 {
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--kflGold);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--kflNavy);
}

.page-template-page-contact .office-container h4 a {
  position: relative;
  display: inline-block;
  color: var(--kflNavy);
  text-decoration: none;
}

.page-template-page-contact .office-container h4 a::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 2px;
  background: var(--kflGold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .38s var(--kflEase);
}

.page-template-page-contact .office-container:hover h4 a::before,
.page-template-page-contact .office-container h4 a:focus-visible::before { transform: scaleX(1); }

.page-template-page-contact .office-container h4 a::after {
  content: "";
  position: absolute;
  inset: -20px -22px -20px -22px;
  border-radius: var(--kflRadius);
}

.page-template-page-contact .office-container h4 a:focus-visible { outline: none; }

.page-template-page-contact .office-container h4 a:focus-visible::after {
  outline: 3px solid var(--kflNavy);
  outline-offset: 2px;
}

/* the telephone and email links sit above the card-wide overlay so they
 * stay independently clickable */
.page-template-page-contact .office-container a[href^="tel:"],
.page-template-page-contact .office-container a[href^="mailto:"] {
  position: relative;
  z-index: 2;
}

@media (min-width: 720px) {

  .page-template-page-contact .adresses-area > .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-left: 0;
    margin-right: 0;
  }

  .page-template-page-contact .adresses-area > .row > .col-md-12 {
    grid-column: 1 / -1;
    width: auto;
    padding: 0;
    float: none;
  }

  .page-template-page-contact .adresses-area > .row > .col-sm-12 {
    width: auto;
    padding: 0;
    float: none;
  }

  .page-template-page-contact .office-container {
    height: 100%;
    margin-bottom: 0;
  }

  /* inside a narrower card the address and the contact routes stack rather
   * than fighting over a half column */
  .page-template-page-contact .office-container > .row {
    margin-left: 0;
    margin-right: 0;
  }

  .page-template-page-contact .office-container > .row > .col-sm-6 {
    width: 100%;
    padding: 0;
    float: none;
  }

  .page-template-page-contact .office-container > .row > .col-sm-6:first-child {
    margin-bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-template-page-contact .office-container h4 a::before { transition: none; }
}


/* =========================================================================
 * 4 SEPTEMBER 2026 - THE CARD IS NOW GENUINELY CLICKABLE.
 *
 * A comment further up this file said "the whole card is clickable". It was
 * not. MEASURED on staging on 4 September, at 390px and 1440px, by putting
 * document.elementFromPoint() on six places inside the first card and then
 * by actually clicking:
 *
 *   "Full profile" label   NOT A LINK      real click -> nothing happened
 *   the arrow icon         NOT A LINK
 *   the portrait           NOT A LINK
 *   card top-right         NOT A LINK
 *   card bottom-right      NOT A LINK
 *   card top-centre        LINK at 390px, NOT A LINK at 1440px
 *
 * This is what Ehsan reported as the profile links seeming broken: an element
 * that reads as a control - uppercase, gold, with an arrow - and does nothing
 * when you press it.
 *
 * WHY THE EXISTING OVERLAY MISSED. The overlay is `.kflp-card__name a::after`,
 * and the anchor carried `position: relative` so that its ::before could draw
 * the gold hairline. An absolutely positioned pseudo-element resolves against
 * its nearest POSITIONED ancestor, so the overlay was sized against the name
 * link itself, not against the card. The negative insets (-14/-16/-14/-14)
 * only ever reached the card's padding around the name - never the portrait
 * column to its left, and never the role or the arrow below it.
 *
 * THE FIX. Take `position: relative` off the anchor so the overlay resolves
 * against `.kflp-card`, which already carries `position: relative`, and set
 * `inset: 0`. The trade is the gold hairline: it was drawn by an absolutely
 * positioned ::before that depended on the anchor being positioned, so it is
 * retired and the same gold line is drawn with text-decoration instead. It
 * fades in rather than wiping in from the left. That is a smaller flourish
 * traded for an interaction that actually works, and it is stated rather than
 * quietly dropped.
 *
 * The phone and email buttons are lifted above the overlay so they still do
 * their own job - they are the direct routes and must not be swallowed.
 *
 * Only `text-decoration-color` and `transform` are transitioned here. No
 * layout property is animated.
 * ====================================================================== */

.kflp-card__name a {
  position: static;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: text-decoration-color .28s var(--kflEase);
}

/* the old hairline depended on the anchor being positioned - retired above */
.kflp-card__name a::before { content: none; }

.kflp-card:hover .kflp-card__name a,
.kflp-card:focus-within .kflp-card__name a,
.kflp-card__name a:focus-visible { text-decoration-color: var(--kflGold); }

/* the overlay now resolves against .kflp-card, so it covers the whole card */
.kflp-card__name a::after {
  inset: 0;
  border-radius: var(--kflRadius);
}

/* the direct routes stay above the overlay and keep working */
.kflp-card__actions { position: relative; z-index: 2; }
.kflp-act { z-index: 2; }

/* the decorative label now describes something true, so it may as well move
   with the card. transform only. */
.kflp-card:hover .kflp-card__go svg,
.kflp-card:focus-within .kflp-card__go svg { transform: translateX(3px); }

@media (prefers-reduced-motion: reduce) {
  .kflp-card__name a { transition: none; }
  .kflp-card:hover .kflp-card__go svg,
  .kflp-card:focus-within .kflp-card__go svg { transform: none; }
}

@media (forced-colors: active) {
  .kflp-card__name a { text-decoration-color: LinkText; }
}


/* ============================================================================
   KFL TEAM CARDS — accessibility fixes, 4 September 2026
   Applied by the lead session from the kfl-a11y-auditor report:
     041.../\_evidence/12-a11y-team-card-4sept/
   Appended last so these win the cascade.
   ========================================================================== */

/* FIX 1 (HIGH) — the arrow icon captured the pointer and there was no anchor
   under it, so clicking the arrow did nothing. Proven by controlled A/B:
   with transforms on the click failed, with prefers-reduced-motion it worked.
   The arrow is decorative and must never take a pointer. */
#main .kflp-card .kflp-card__go,
#main .kflp-card .kflp-card__go svg,
.kflp-card .kflp-card__go,
.kflp-card .kflp-card__go svg,
.kflp-card [aria-hidden="true"]{
  pointer-events:none !important;
}

/* FIX 2 (MEDIUM) — .kflp-card__actions lifted the whole CONTAINER above the
   stretched link overlay, so its padding and 8px gap swallowed clicks:
   13.7% of the card was dead at 320px. Lift only the buttons themselves. */
.kflp-card .kflp-card__actions{
  position:static !important;
  z-index:auto !important;
}
.kflp-card .kflp-act{
  position:relative !important;
  z-index:2 !important;
  pointer-events:auto !important;
}

/* FIX 3 (MEDIUM) — the fixed sticky footer covered the bottom of the keyboard
   focus ring at 320 and 390 (WCAG 2.4.12). Scroll the whole ring clear. */
.kflp-card{ scroll-margin-bottom:88px !important; }

/* FIX 5 (LOW) — the gold underline measured 3.09:1, only 0.09 above the 1.4.11
   floor. --kflGoldText is already a token in this system and measures 4.90:1. */
.kflp-card .kflp-card__name a{
  text-decoration-color:#8A6D1F !important;
}

/* FIX 6 (LOW) — :focus-within made the NAME look focused when the PHONE button
   was focused, so two things appeared focused at once. :focus-visible on the
   anchor already covers the keyboard case. */
.kflp-card:focus-within .kflp-card__name a{
  text-decoration-color:transparent !important;
}
.kflp-card .kflp-card__name a:hover,
.kflp-card .kflp-card__name a:focus-visible,
.kflp-card:hover .kflp-card__name a{
  text-decoration-color:#8A6D1F !important;
}

/* FIX 4 (LOW) — the forced-colors rule was specificity (0,1,1) and the hover
   rule (0,3,1) beat it, so the underline reverted to author gold against a
   forced black card. Repeat the hover and focus selectors inside the block. */
@media (forced-colors: active){
  .kflp-card .kflp-card__name a,
  .kflp-card .kflp-card__name a:hover,
  .kflp-card .kflp-card__name a:focus-visible,
  .kflp-card:hover .kflp-card__name a,
  .kflp-card:focus-within .kflp-card__name a{
    text-decoration-color:LinkText !important;
    color:LinkText !important;
  }
}
