/*
Theme Name: FAHR Registry
Description: Foundation Appaloosa Horse Registry theme. Implements the three brand systems (FAHR 1/2/3) as switchable role-token CSS variables, selectable live in the Customizer.
Version: 1.0.0
Author: Foundation Appaloosa Horse Registry
Text Domain: fahr-theme
*/

/* ===========================================================
   Role tokens — FAHR Brand System Doc v1.
   Default (no data-brand attr, or data-brand="fahr1"): FAHR 1.
   =========================================================== */
:root,
[data-brand="fahr1"] {
  --anchor:#3B4A3F;
  --field:#2E3A46;
  --action:#A85A2B;
  --action-ink:#8A4620;
  --panel:#D8C7AC;
  --page:#EDE4D3;
  --body-ink:#25291F;
  --muted-ink:#4D5348; /* darkened from #565C50 — the original failed WCAG AA (4.17:1) against --panel; this passes at 4.79:1 while staying visually close */
  --on-field:#EDE4D3;

  --font-head:'Old Standard TT', 'Times New Roman', serif;
  --font-body:'Newsreader', Georgia, serif;
  --font-ui:'Asap', Arial, sans-serif;
}

[data-brand="fahr2"] {
  --anchor:#402010;
  --field:#A08050;
  --action:#703050;
  --action-ink:#703050;
  --panel:#EDE1CC;
  --page:#F7F1E7;
  --body-ink:#2A2521;
  --muted-ink:#6A6054;
  --on-field:#2A1508;

  --font-head:'Old Standard TT', serif;
  --font-body:'Newsreader', serif;
  --font-ui:'Asap', sans-serif;
}

[data-brand="fahr3"] {
  --anchor:#402010;
  --field:#A08050;
  --action:#703050;
  --action-ink:#703050;
  --panel:#EDE1CC;
  --page:#F7F1E7;
  --body-ink:#2A2521;
  --muted-ink:#6B6155;
  --on-field:#2A1508;

  --font-head:'Bree Serif', serif;
  --font-body:'Cardo', serif;
  --font-ui:'Archivo', sans-serif;
}

*,*::before,*::after{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  font-family:var(--font-body);
  background:var(--page);
  color:var(--body-ink);
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
img{max-width:100%;display:block;}
a{color:inherit;text-decoration:none;}
ul{list-style:none;margin:0;padding:0;}
h1,h2,h3,h4{margin:0;font-family:var(--font-head);font-weight:700;}
p{margin:0;}
.container{max-width:1180px;margin:0 auto;padding:0 5vw;}

/* ---------- utility type ---------- */
.eyebrow{
  font-family:var(--font-ui); font-size:0.8rem; letter-spacing:0.1em;
  text-transform:uppercase; color:var(--action-ink);
}
h2.section-title{
  font-size:clamp(1.7rem,3.6vw,2.5rem); line-height:1.15; margin-top:8px;
  text-transform:uppercase; letter-spacing:0.01em;
}
.lede{font-size:1rem; line-height:1.7; max-width:52ch;}
.reg-name{text-transform:uppercase;}
.on-field{color:var(--on-field);}
.muted{color:var(--muted-ink);}

/* ---------- buttons ---------- */
.btn{
  display:inline-flex; align-items:center; gap:8px;
  font-family:var(--font-ui); font-size:0.8rem; font-weight:600;
  letter-spacing:0.06em; text-transform:uppercase;
  padding:14px 24px; border-radius:3px; border:1.5px solid transparent;
  min-height:44px; cursor:pointer; white-space:nowrap;
}
.btn-primary{background:var(--action); color:#fff;}
.btn-primary:hover{filter:brightness(0.92); color:#fff;}
.btn-secondary{background:transparent; border-color:currentColor; color:inherit;}
.btn-secondary:hover{background:rgba(0,0,0,0.06);}

/* ---------- header / nav ---------- */
header.site{position:sticky; top:0; z-index:100; color:var(--page);}

/* -- main row: brand + search/social/account, on the anchor color -- */
.header-main{background:var(--anchor); border-bottom:1px solid rgba(0,0,0,0.15);}
/* Wider than the site's normal 1180px .container — the logo + divider +
   motto + search + Facebook + account genuinely need more room than that on
   one line, and a header is a reasonable place to break from the body
   content width. */
.header-main-inner{
  max-width:1440px;
  display:flex; align-items:center; justify-content:space-between; gap:24px;
  height:104px;
}
.brand-block{display:flex; align-items:center; gap:20px;}
.brand{display:flex; align-items:center; gap:14px; flex:none;}
.brand .mark{
  height:64px; width:64px; border-radius:50%; background:var(--page);
  display:flex; align-items:center; justify-content:center; padding:7px; flex:none;
}
.brand .mark img{height:100%; width:100%; object-fit:contain;}
.brand-text{line-height:1.15;}
.brand-text .name{
  font-family:var(--font-head); font-size:1.25rem; letter-spacing:0.02em;
  color:var(--page); display:block; text-transform:uppercase; white-space:nowrap;
}
.brand-text .tag{
  font-family:var(--font-ui); font-size:0.8rem; letter-spacing:0.16em;
  color:var(--page); opacity:0.75; text-transform:uppercase;
}
.brand-divider{width:1px; align-self:stretch; margin:16px 0; background:rgba(237,228,211,0.25); flex:none;}
/* flex:none + width:max-content — without an explicit size, this column's
   own box collapses to almost nothing while its nowrap text content (in the
   eyebrow/script rows below) renders at full width regardless, overflowing
   outside its own container instead of sizing it. */
.brand-motto{display:flex; flex-direction:column; align-items:center; gap:7px; flex:none; width:max-content;}
.brand-motto-eyebrow{
  display:flex; align-items:center; gap:10px; white-space:nowrap;
  font-family:var(--font-head); font-size:0.85rem; letter-spacing:0.26em; text-transform:uppercase;
  color:var(--page);
}
.brand-motto-eyebrow i{
  width:5px; height:5px; border-radius:50%; background:var(--action); flex:none;
}
.brand-motto-script{
  display:flex; align-items:center; gap:14px; white-space:nowrap;
  font-family:'Pinyon Script', cursive; font-size:1.9rem; line-height:1; color:var(--page);
}
.brand-motto-script em{
  width:44px; height:1px; background:var(--action); flex:none;
}
.brand-motto-rule{width:64px; height:1px; background:var(--action); position:relative; flex:none;}
.brand-motto-rule::before{
  content:''; position:absolute; left:50%; top:50%; width:6px; height:6px;
  background:var(--action); transform:translate(-50%,-50%) rotate(45deg);
}

/* header-actions itself can shrink (min-width:0), but only the search box
   gives up its width when space is tight (flex:1 with a floor) — Facebook
   and My Account keep flex:none so they're never the thing that gets pushed
   off-screen or clipped when the header is under width pressure. */
.header-actions{display:flex; align-items:center; gap:18px; min-width:0; justify-content:flex-end;}
.header-search{position:relative; display:flex; align-items:stretch; flex:1 1 auto; min-width:130px; max-width:260px;}
.header-search-icon{
  position:absolute; left:14px; top:50%; transform:translateY(-50%);
  width:16px; height:16px; color:var(--muted-ink); pointer-events:none;
}
.header-search input{
  width:100%; min-width:0; border:none; border-radius:3px 0 0 3px; padding:14px 14px 14px 38px;
  font-family:var(--font-body); font-size:0.88rem; background:#fff; color:var(--body-ink);
}
.header-search input:focus{outline:2px solid var(--action); outline-offset:-2px;}
.header-search .btn{border-radius:0 3px 3px 0; padding:14px 20px; flex:none;}

.header-account-link{
  display:flex; align-items:center; gap:7px; flex:none;
  font-family:var(--font-ui); font-size:0.8rem; font-weight:600; letter-spacing:0.04em; text-transform:uppercase;
  color:var(--page); opacity:0.9; white-space:nowrap;
}
.header-account-link:hover{opacity:1;}
.header-account-link svg{width:18px; height:18px; flex:none;}

.nav-social-link{
  display:flex; align-items:center; justify-content:center; flex:none;
  width:30px; height:30px; border-radius:50%; background:rgba(237,228,211,0.12);
  color:var(--page); opacity:0.85;
}
.nav-social-link:hover{opacity:1; background:var(--action);}
.nav-social-link svg{width:15px; height:15px;}

.nav-mobile-extra{display:none;}

/* -- nav row: links + Staff Dashboard, on the action (copper) color -- */
.nav-row{background:var(--action);}
.nav-row-inner{display:flex; align-items:center; justify-content:space-between; gap:20px; min-height:60px;}
nav.primary{display:flex; align-items:center; gap:26px; flex-wrap:nowrap;}
nav.primary a{
  font-family:var(--font-ui); font-size:0.8rem; letter-spacing:0.06em;
  text-transform:uppercase; color:#fff; opacity:0.9; position:relative;
  padding:16px 0; /* was 6px — clickable area is now ~44px tall (matches the .btn minimum) instead of ~24px */
  display:inline-flex; align-items:center;
}
nav.primary a:hover{opacity:1;}
.nav-toggle{display:none;}

.staff-dashboard-link{
  flex:none; font-family:var(--font-ui); font-size:0.8rem; font-weight:600; letter-spacing:0.06em; text-transform:uppercase;
  color:#fff; border:1.5px solid rgba(255,255,255,0.7); border-radius:3px; padding:9px 16px;
}
.staff-dashboard-link:hover{background:rgba(255,255,255,0.12); border-color:#fff;}

/* ---------- Stud Book / Membership submenus ---------- */
.nav-dropdown{position:relative; display:flex; align-items:center; gap:4px;}
.nav-dropdown-link{padding:16px 0; display:inline-flex; align-items:center;}
.nav-dropdown-caret{
  background:none; border:none; padding:8px 2px; cursor:pointer;
  color:#fff; opacity:0.75; display:flex; align-items:center;
}
.nav-dropdown-caret:hover, .nav-dropdown.open .nav-dropdown-caret{opacity:1;}
.nav-dropdown-caret::after{
  content:''; width:6px; height:6px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor;
  transform:rotate(45deg) translateY(-2px); transition:transform .15s ease; display:block;
}
.nav-dropdown.open .nav-dropdown-caret::after{transform:rotate(225deg) translateY(2px);}
.nav-dropdown-menu{
  position:absolute; top:100%; left:0;
  background:var(--anchor); border:1px solid rgba(255,255,255,0.15); border-top:2px solid var(--page);
  min-width:190px; padding:10px 0; margin-top:14px;
  display:flex; flex-direction:column; gap:2px;
  opacity:0; visibility:hidden; transition:opacity .15s ease;
  box-shadow:0 8px 20px rgba(0,0,0,0.25);
}
.nav-dropdown.open .nav-dropdown-menu{opacity:1; visibility:visible;}
.nav-dropdown-menu a{padding:10px 18px; opacity:0.85; color:var(--page);}
.nav-dropdown-menu a:hover{opacity:1; background:rgba(255,255,255,0.06);}
/* Needs the same specificity as the general `nav.primary a` rule (padding:16px 0) or the side padding is lost. */
nav.primary .nav-dropdown-menu a{padding:10px 20px;}

/* Below this, logo + divider + motto + search + Facebook + account no longer
   all fit on one line even with the widened header container above — drop
   the motto first since it's the purely decorative piece, rather than let it
   overlap its neighbors. Full mobile layout takes over lower down, at 820px. */
@media (max-width:1300px){
  .brand-divider, .brand-motto{display:none;}
}

@media (max-width:820px){
  .header-actions{display:none;}
  .header-main-inner{height:auto; padding:16px 5vw;}
  .brand-divider, .brand-motto{display:none;}
  /* The menu is a fixed slide-in panel on phones, so the orange nav bar would be an empty strip — collapse it. */
  /* (kept for staff, whose Staff Dashboard button lives in that bar) */
  .nav-row:not(:has(.staff-dashboard-link)){background:none;}
  .nav-row-inner{justify-content:flex-end;}
  .nav-row-inner:not(:has(.staff-dashboard-link)){min-height:0; height:0; padding:0;}

  /* --header-height is measured by JS (see header.php) rather than a second
     hardcoded guess — this exact "mobile nav drifts out of sync with the
     header's real height" bug has already happened twice on this site. */
  nav.primary{
    position:fixed; inset:var(--header-height, 104px) 0 0 0; height:calc(100vh - var(--header-height, 104px)); overflow-y:auto;
    background:var(--anchor); flex-direction:column; justify-content:flex-start; gap:26px; padding:36px 20px;
    transform:translateX(100%); transition:transform .3s ease; display:flex; z-index:99;
  }
  nav.primary.open{transform:translateX(0);}
  nav.primary a{font-size:1rem; color:var(--page);}
  .nav-toggle{
    display:flex; flex-direction:column; justify-content:center; gap:5px; width:26px; height:26px; z-index:101;
    background:none; border:none; cursor:pointer; padding:0;
  }
  .nav-toggle span{height:2px; width:100%; background:var(--page); display:block;}

  /* On the full-screen mobile menu there's no room to hunt for a hover
     dropdown — show each submenu item as a plain always-visible line under
     its parent instead of requiring a tap on the caret. */
  .nav-dropdown{flex-direction:column; gap:10px;}
  .nav-dropdown-link{font-size:1rem; padding:0; color:var(--page);}
  .nav-dropdown-caret{display:none;}
  .nav-dropdown-menu{
    position:static; opacity:1; visibility:visible; box-shadow:none;
    border:none; background:none; margin:0; padding:0; align-items:center; gap:10px;
  }
  .nav-dropdown-menu a{font-size:0.85rem; opacity:0.7; padding:0;}
  nav.primary .nav-dropdown-menu a{padding:16px 0;} /* phone menu: unchanged from before */

  .nav-mobile-extra{
    display:flex; flex-direction:column; align-items:center; gap:18px; margin-top:14px;
    padding-top:26px; border-top:1px solid rgba(237,228,211,0.2); width:100%;
  }
  .nav-mobile-extra a{font-size:0.9rem; color:var(--page); opacity:0.85;}
  .header-search--mobile{width:100%; max-width:320px;}
  .header-search--mobile input{width:100%;}

  .staff-dashboard-link{padding:7px 12px; font-size:0.8rem;}
}

/* ---------- hero ---------- */
.hero{background:var(--field); color:var(--on-field); padding:64px 0 56px;}
.hero h1{font-size:clamp(2rem,4.6vw,3.2rem); line-height:1.12; text-transform:uppercase;}
.hero .lede{margin-top:18px; opacity:0.92;}
.hero .btnrow{display:flex; gap:14px; flex-wrap:wrap; margin-top:30px;}
.grid-2{display:grid; grid-template-columns:1fr 1fr; gap:44px; align-items:center;}
@media (max-width:940px){.grid-2{grid-template-columns:1fr; gap:32px;}}

/* ---------- sections ---------- */
section{padding:72px 0;}
section.tight{padding:44px 0;}
.bg-anchor{background:var(--anchor); color:var(--page);}
.bg-panel{background:var(--panel);}
.bg-page{background:var(--page);}

/* ---------- placeholder photography ---------- */
.ph{
  position:relative; overflow:hidden; background:var(--panel);
  display:flex; align-items:center; justify-content:center; color:var(--anchor);
}
.ph svg{width:32%; height:32%; opacity:0.35;}

/* Blurred, darkened copy of the same photo filling the letterbox gaps an
   object-fit:contain image leaves when its aspect ratio doesn't match the
   box — instead of the flat --panel color showing through. */
.ph-blurfill{background-size:cover; background-position:center;}
.ph-blurfill::before{
  content:''; position:absolute; inset:-20px; z-index:0;
  background:inherit; background-size:cover; background-position:center;
  filter:blur(22px) brightness(0.82) saturate(1.15);
  transform:scale(1.1);
}
/* Same effect, scaled down for the small 78x78 gallery thumbnails — the
   340px box's blur radius would otherwise swallow the whole thumbnail. */
.ph-blurfill-sm::before{inset:-6px; filter:blur(6px) brightness(0.82) saturate(1.15);}
.horse-icon{fill:none; stroke:currentColor; stroke-width:6; stroke-linecap:round; stroke-linejoin:round;}

/* ---------- statistic block ---------- */
.grid-4{display:grid; grid-template-columns:repeat(4,1fr); gap:22px;}
@media (max-width:940px){.grid-4{grid-template-columns:1fr 1fr;}}
@media (max-width:560px){.grid-4{grid-template-columns:1fr;}}
.stat-block{
  border:1.5px solid var(--action); background:var(--page); color:var(--body-ink);
  padding:26px 20px; text-align:center;
}
.stat-block .n{font-family:var(--font-head); font-size:2.6rem; line-height:1;}
.stat-block .l{font-family:var(--font-ui); font-size:0.8rem; letter-spacing:0.08em; text-transform:uppercase; color:var(--muted-ink); margin-top:8px;}

/* ---------- horse cards ---------- */
.horse-card-grid{display:grid; grid-template-columns:repeat(3, 1fr); gap:24px;}
@media (max-width:940px){.horse-card-grid{grid-template-columns:repeat(2, 1fr);}}
@media (max-width:600px){.horse-card-grid{grid-template-columns:1fr;}}
.horse-card{
  background:#fff; border:1px solid var(--panel); border-radius:10px; overflow:hidden;
  display:flex; flex-direction:column; transition:box-shadow .2s ease;
}
.horse-card:hover{box-shadow:0 6px 20px rgba(0,0,0,0.08);}
.horse-card-photo{position:relative; display:block; aspect-ratio:4/3; background:var(--panel); overflow:hidden;}
.horse-card-photo img{position:relative; width:100%; height:100%; object-fit:contain;}
.hc-photo-bg{position:absolute; inset:-10px; background-size:cover; background-position:center; filter:blur(18px) brightness(0.9); transform:scale(1.1);}
.hc-badge{
  position:absolute; top:12px; left:12px; font-family:var(--font-ui); font-size:0.8rem;
  font-weight:600; letter-spacing:0.06em; text-transform:uppercase; padding:6px 12px; border-radius:20px;
  color:#fff; background:var(--action);
}
.hc-badge-deceased{background:var(--muted-ink);}
.hc-photo-count{
  position:absolute; bottom:10px; right:10px; display:flex; align-items:center; gap:5px;
  background:rgba(0,0,0,0.6); color:#fff; font-family:var(--font-ui); font-size:0.8rem;
  letter-spacing:0.04em; text-transform:uppercase; padding:5px 10px; border-radius:20px;
}
.hc-photo-count svg{width:13px; height:13px;}
.hc-body{padding:18px 20px 20px; display:flex; flex-direction:column; flex:1;}
.hc-header{display:flex; justify-content:space-between; align-items:flex-start; gap:10px;}
.hc-name{font-size:1.25rem; margin:0;}
.hc-name a{color:inherit;}
.hc-meta{font-family:var(--font-ui); font-size:0.8rem; letter-spacing:0.04em; color:var(--muted-ink); margin-top:4px;}
.hc-mark{width:38px; height:38px; border-radius:50%; overflow:hidden; flex:none; border:1px solid var(--panel);}
.hc-mark img{width:100%; height:100%; object-fit:contain;}
.hc-pct{font-family:var(--font-ui); font-size:0.8rem; color:var(--action-ink); margin-top:10px; padding-top:10px; border-top:1px solid var(--panel);}
.hc-desc{font-size:0.88rem; color:var(--muted-ink); margin-top:10px; line-height:1.55; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;}
.hc-parentage{
  display:grid; grid-template-columns:1fr; gap:12px; margin-top:14px; padding:12px 14px;
  background:var(--panel); border-radius:6px; position:relative;
}
.hc-parentage > div:first-child{border-bottom:1px solid rgba(0,0,0,0.12); padding-bottom:12px;}
.hc-sub-label{font-family:var(--font-ui); font-size:0.8rem; letter-spacing:0.06em; text-transform:uppercase; color:var(--muted-ink); display:block;}
.hc-parent-name{font-family:var(--font-head); font-size:0.95rem; margin-top:2px;}
.hc-sub{font-family:var(--font-ui); font-size:0.8rem; color:var(--muted-ink);}
.hc-stats{display:flex; flex-wrap:wrap; gap:12px 18px; margin-top:14px; padding-top:14px; border-top:1px solid var(--panel);}
.hc-stats > div{display:flex; align-items:center; gap:8px; font-size:0.82rem;}
.hc-stats svg{width:20px; height:20px; color:var(--action-ink); flex:none;}
.hc-actions{display:flex; gap:10px; margin-top:auto; padding-top:18px;}
.hc-actions .btn{padding:11px 14px; font-size:0.8rem;}
.hc-actions .btn-primary{flex:2;}
.hc-btn-outline{flex:1; border-color:var(--anchor); color:var(--anchor);}

@media (max-width:520px){
  .horse-card-grid{gap:20px;}
  .hc-body{padding:20px 18px 22px; gap:0;}
  .hc-name{font-size:1.4rem; line-height:1.25;}
  .hc-meta{font-size:0.8rem; margin-top:6px;}
  .hc-pct{font-size:0.8rem; margin-top:14px; padding-top:14px;}
  .hc-desc{font-size:0.92rem; margin-top:14px; line-height:1.65;}
  .hc-parentage{
    gap:14px; margin-top:18px; padding:16px;
  }
  .hc-parentage > div:first-child{padding-bottom:14px;}
  .hc-parent-name{font-size:1.05rem; margin-top:4px;}
  .hc-stats{gap:22px; margin-top:18px; padding-top:16px;}
  .hc-stats > div{gap:10px; font-size:0.86rem;}
  .hc-stats svg{width:22px; height:22px;}
  .hc-actions{flex-direction:column; gap:10px; padding-top:20px;}
  .hc-actions .btn{padding:14px; font-size:0.8rem;}
}

/* ---------- stud book table ---------- */
.tbl-wrap{overflow-x:auto;}
table.stud-book{width:100%; border-collapse:collapse; font-family:var(--font-body); font-size:1rem;}
table.stud-book th{
  background:var(--anchor); color:var(--page); font-family:var(--font-ui);
  font-size:0.8rem; letter-spacing:0.06em; text-transform:uppercase; font-weight:500;
  text-align:left; padding:10px 12px;
}
table.stud-book td{padding:10px 12px; border-bottom:1px solid var(--panel);}
table.stud-book tr:nth-child(even) td{background:rgba(216,199,172,0.35);}
table.stud-book td.reg{color:var(--action-ink); font-weight:600;}
table.stud-book tbody tr{cursor:pointer;}
table.stud-book tbody tr:hover td{background:rgba(168,90,43,0.08);}
table.stud-book th.photo-col{width:70px;}
table.stud-book td.photo-cell{padding:6px 12px;}
table.stud-book td.photo-cell img{display:block; width:58px; height:58px; object-fit:contain; background:var(--panel); border-radius:6px;}
table.stud-book td.photo-cell:empty{padding:0; border-bottom:1px solid var(--panel);}

/* ---------- horse tables as cards on mobile ---------- */
@media (max-width:700px){
  table.stud-book thead{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0);}
  table.stud-book, table.stud-book tbody{display:block; width:100%;}
  table.stud-book tr{
    display:block; background:#fff; border:1px solid var(--panel); border-radius:6px;
    margin-bottom:12px; overflow:hidden;
  }
  table.stud-book tr:nth-child(even) td{background:none;}
  table.stud-book td{
    display:flex; justify-content:space-between; align-items:center; gap:12px;
    padding:9px 14px; border-bottom:1px solid var(--panel); text-align:right;
  }
  table.stud-book td:last-child{border-bottom:none;}
  table.stud-book td::before{
    content:attr(data-label); font-family:var(--font-ui); font-size:0.8rem;
    text-transform:uppercase; letter-spacing:0.05em; color:var(--muted-ink); text-align:left; flex:none;
  }
  table.stud-book td.name-cell{font-family:var(--font-head); font-size:1.05rem;}
  table.stud-book td.photo-cell{justify-content:center; padding:14px; background:var(--panel);}
  table.stud-book td.photo-cell::before{content:none;}
  table.stud-book td.photo-cell img{width:84px; height:84px; object-fit:contain; background:var(--panel); border-radius:6px;}
  table.stud-book td.photo-cell:empty{display:none; padding:0; border-bottom:none;}
  table.stud-book td.action-cell{justify-content:center; padding:12px 14px;}
  table.stud-book td.action-cell::before{content:none;}
  table.stud-book td.action-cell a{width:100%; justify-content:center;}
}

/* ---------- footer ---------- */
footer.site{background:var(--anchor); color:var(--page); padding:56px 0 0;}
.footer-grid{
  display:grid; grid-template-columns:1.3fr 1fr 1fr 1.2fr; gap:36px;
  padding-bottom:40px; border-bottom:1px solid rgba(237,228,211,0.2);
}
.footer-brand .brand{margin-bottom:12px;}
.footer-brand .tagline{font-family:var(--font-body); font-style:italic; font-size:0.92rem; max-width:28ch; line-height:1.5; opacity:0.85;}
.social-links{display:flex; gap:10px; margin-top:16px;}
.social-links a{
  display:flex; align-items:center; justify-content:center;
  width:34px; height:34px; border-radius:50%; background:rgba(237,228,211,0.12);
  color:var(--page); opacity:0.85; flex:none;
}
.social-links a:hover{opacity:1; background:var(--action);}
.social-links svg{width:17px; height:17px;}
.footer-col h4{
  font-family:var(--font-ui); font-size:0.8rem; letter-spacing:0.1em; text-transform:uppercase;
  color:var(--page); opacity:0.7; margin-bottom:14px;
}
.footer-col li{margin-bottom:9px; font-size:0.86rem; opacity:0.9;}
.footer-col a:hover{opacity:1; text-decoration:underline;}
.footer-bottom{
  display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px;
  padding:18px 0; font-size:0.8rem; opacity:0.75;
}
.footer-legal-links a{text-decoration:underline; margin-left:14px;}
.footer-legal-links a:first-child{margin-left:0;}
@media (max-width:860px){.footer-grid{grid-template-columns:1fr 1fr; row-gap:30px;}}
@media (max-width:520px){.footer-grid{grid-template-columns:1fr;}}

/* ---------- lightbox ---------- */
.fahr-lightbox{
  position:fixed; inset:0; z-index:1000; background:rgba(20,18,14,0.92);
  display:none; align-items:center; justify-content:center; padding:40px;
}
.fahr-lightbox.open{display:flex;}
.fahr-lightbox figure{margin:0; max-width:min(1100px, 90vw); max-height:90vh; display:flex; flex-direction:column; align-items:center; gap:14px;}
.fahr-lightbox img{max-width:100%; max-height:80vh; object-fit:contain; box-shadow:0 12px 40px rgba(0,0,0,0.5);}
.fahr-lightbox figcaption{color:var(--page); font-family:var(--font-ui); font-size:0.82rem; opacity:0.85; text-align:center;}
.fahr-lightbox-close, .fahr-lightbox-prev, .fahr-lightbox-next{
  position:absolute; background:none; border:none; color:var(--page); cursor:pointer;
  display:flex; align-items:center; justify-content:center; opacity:0.8;
}
.fahr-lightbox-close:hover, .fahr-lightbox-prev:hover, .fahr-lightbox-next:hover{opacity:1; color:var(--action);}
.fahr-lightbox-close{top:18px; right:24px; font-size:2.2rem; line-height:1; width:44px; height:44px;}
.fahr-lightbox-prev, .fahr-lightbox-next{top:50%; transform:translateY(-50%); font-size:3rem; line-height:1; width:56px; height:80px;}
.fahr-lightbox-prev{left:6px;}
.fahr-lightbox-next{right:6px;}
@media (max-width:600px){
  .fahr-lightbox{padding:16px;}
  .fahr-lightbox-prev, .fahr-lightbox-next{width:40px; height:60px; font-size:2.2rem;}
}

/* ---------- section divider (fahr_section_divider() in functions.php) ---------- */
.section-divider{max-width:720px; padding:0 5vw;}
.section-divider img{width:100%; height:auto; display:block;}
@media (max-width:600px){.section-divider{max-width:420px;}}

/* ---------- drag-and-drop file uploader (assets/dropzone.js) ---------- */
.fahr-dropzone{
  position:relative; border:2px dashed var(--muted-ink); border-radius:4px; background:#fff;
  padding:22px 16px; text-align:center; cursor:pointer; transition:border-color 0.15s, background 0.15s;
}
.fahr-dropzone:hover{border-color:var(--action);}
.fahr-dropzone.is-dragover{border-color:var(--action); background:var(--page);}
.fahr-dropzone-text{margin:0; font-family:var(--font-body); font-size:0.9rem; color:var(--muted-ink); pointer-events:none;}
.fahr-dropzone-browse{color:var(--action-ink); text-decoration:underline; font-weight:600;}
.fahr-dropzone-filelist{list-style:none; margin:0; padding:0;}
.fahr-dropzone.has-files .fahr-dropzone-filelist{margin-top:14px; display:flex; flex-direction:column; gap:6px;}
.fahr-dropzone-file{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  background:var(--page); border-radius:3px; padding:8px 10px; text-align:left;
  font-family:var(--font-ui); font-size:0.8rem;
}
.fahr-dropzone-file-name{overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex:1;}
.fahr-dropzone-file-size{color:var(--muted-ink); font-size:0.85em; margin-left:4px;}
.fahr-dropzone-file-remove{
  flex:none; border:none; background:none; color:var(--muted-ink); font-size:1.1rem; line-height:1;
  cursor:pointer; padding:2px 4px; border-radius:3px;
}
.fahr-dropzone-file-remove:hover{color:var(--action-ink); background:rgba(0,0,0,0.06);}
/* display:none would also exempt this input from the browser's native
   "required" validation (a display:none control is barred from constraint
   validation entirely) — visually hidden but still present keeps required
   working while the styled dropzone above still does all the visible work. */
.fahr-dropzone input[type="file"]{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden;
  clip:rect(0,0,0,0); white-space:nowrap; border:0; opacity:0;
}

/* Draw-to-sign widget — see assets/signature-pad.js */
.fahr-sigpad{border:1.5px solid var(--muted-ink); border-radius:4px; background:#fff; padding:10px; transition:border-color 0.15s;}
.fahr-sigpad-canvas{display:block; width:100%; height:150px; touch-action:none; cursor:crosshair; background:var(--page) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='20'%3E%3Cline x1='0' y1='19' x2='100' y2='19' stroke='%23c9c2ae' stroke-width='1'/%3E%3C/svg%3E") repeat-x left calc(100% - 22px);}
.fahr-sigpad-row{display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:8px;}
.fahr-sigpad-hint{font-family:var(--font-ui); font-size:0.8rem; color:var(--muted-ink); pointer-events:none;}
.fahr-sigpad.fahr-sigpad-empty .fahr-sigpad-hint::before{content:"Sign above with your mouse, stylus, or finger";}
.fahr-sigpad:not(.fahr-sigpad-empty) .fahr-sigpad-hint::before{content:"Signature captured";}
.fahr-sigpad-clear{flex:none; border:none; background:none; color:var(--action-ink); font-family:var(--font-ui); font-size:0.8rem; text-decoration:underline; cursor:pointer; padding:2px 4px;}
.fahr-sigpad-error{border-color:var(--action-ink); box-shadow:0 0 0 2px rgba(168,90,43,0.25);}

/* ============================== My Account ============================== */
/* index.php wraps the_content() in .lede for short intro paragraphs — the
   My Account app needs the full container width instead. */
body.woocommerce-account .lede{max-width:none; font-size:1rem; line-height:1.6;}

body.woocommerce-account .woocommerce{
  display:grid; grid-template-columns:220px 1fr; grid-template-areas:"nav content"; gap:32px; align-items:start;
}

/* Beats woocommerce-layout.css's .woocommerce-account .woocommerce-MyAccount-navigation
   (float:left;width:30%) on specificity — that float/width fights the grid
   layout above otherwise. grid-area (rather than relying on auto-placement)
   pins each to its column explicitly so there's no ambiguity either way. */
body.woocommerce-account .woocommerce-MyAccount-navigation{
  grid-area:nav; float:none; width:auto;
  background:#fff; border:1px solid var(--panel); border-radius:6px; padding:10px; position:sticky; top:90px;
}
.woocommerce-MyAccount-navigation ul{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:2px;}
.woocommerce-MyAccount-navigation-link{list-style:none;}
.woocommerce-MyAccount-navigation-link a{
  display:block; padding:11px 14px; border-radius:4px; font-family:var(--font-ui); font-size:0.85rem;
  font-weight:600; color:var(--body-ink); text-decoration:none; transition:background 0.15s, color 0.15s;
}
.woocommerce-MyAccount-navigation-link a:hover{background:var(--page);}
.woocommerce-MyAccount-navigation-link.is-active a{background:var(--action); color:#fff;}
.woocommerce-MyAccount-navigation-link--customer-logout{margin-top:8px; padding-top:8px; border-top:1px solid var(--panel);}

body.woocommerce-account .woocommerce-MyAccount-content{grid-area:content; float:none; width:auto; min-width:0;}
.woocommerce-MyAccount-content h2{font-size:1.25rem; margin:0 0 14px;}

.fahr-account-card{
  background:#fff; border:1px solid var(--panel); border-radius:6px; padding:22px 24px; margin-bottom:20px;
}
.fahr-account-greeting{background:var(--page); border-color:var(--panel);}
.fahr-account-quicklinks{display:flex; gap:10px; flex-wrap:wrap; margin-top:16px;}
.fahr-account-quicklinks a{
  font-family:var(--font-ui); font-size:0.8rem; font-weight:600; letter-spacing:0.02em; text-transform:uppercase;
  color:var(--action-ink); background:#fff; border:1.5px solid var(--action-ink); border-radius:20px;
  padding:8px 16px; text-decoration:none; transition:background 0.15s, color 0.15s;
}
.fahr-account-quicklinks a:hover{background:var(--action-ink); color:#fff;}

/* Order status pill (Membership tab order history) */
.fahr-order-status{
  display:inline-block; font-family:var(--font-ui); font-size:0.8rem; font-weight:600; text-transform:uppercase;
  letter-spacing:0.02em; padding:3px 10px; border-radius:20px; background:var(--page); color:var(--muted-ink);
}
.fahr-order-status-completed,.fahr-order-status-processing{background:var(--anchor); color:#fff;}
.fahr-order-status-on-hold,.fahr-order-status-pending{background:var(--action); color:#fff;}
.fahr-order-status-failed,.fahr-order-status-cancelled{background:#a00; color:#fff;}

/* Tables, forms & buttons throughout the account area (Orders, Addresses,
   Account details, and our own My Horses/Membership content all share
   these) — WooCommerce ships almost no default styling for the classic
   My Account templates, so without this the page falls back to unstyled
   browser defaults. */
.woocommerce-MyAccount-content table.shop_table{
  width:100%; border-collapse:collapse; font-family:var(--font-ui); font-size:0.88rem;
  background:#fff; border:1px solid var(--panel); border-radius:6px; overflow:hidden;
}
.woocommerce-MyAccount-content table.shop_table th{
  text-align:left; background:var(--page); font-size:0.8rem; letter-spacing:0.05em; text-transform:uppercase;
  color:var(--muted-ink); padding:10px 14px; font-weight:600;
}
.woocommerce-MyAccount-content table.shop_table td{padding:12px 14px; border-top:1px solid var(--panel); vertical-align:middle;}
.woocommerce-MyAccount-content table.shop_table tr:first-child td{border-top:none;}

.woocommerce-MyAccount-content .button,
.woocommerce-MyAccount-content button:not(.fahr-em-lookup):not(.fahr-dropzone-file-remove){
  display:inline-flex; align-items:center; gap:6px; padding:10px 18px; border-radius:3px; border:1.5px solid transparent;
  font-family:var(--font-ui); font-size:0.8rem; font-weight:600; letter-spacing:0.03em; text-transform:uppercase;
  cursor:pointer; text-decoration:none; background:var(--action); color:#fff; line-height:1.2;
}
.woocommerce-MyAccount-content .button:hover,
.woocommerce-MyAccount-content button:not(.fahr-em-lookup):not(.fahr-dropzone-file-remove):hover{filter:brightness(0.92); color:#fff;}

.woocommerce-MyAccount-content input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.woocommerce-MyAccount-content select,
.woocommerce-MyAccount-content textarea{
  width:100%; box-sizing:border-box; border:1.5px solid var(--muted-ink); border-radius:2px; background:#fff;
  padding:10px 12px; font-family:var(--font-body); font-size:0.95rem; color:var(--body-ink);
}
.woocommerce-MyAccount-content form > p,
.woocommerce-MyAccount-content .woocommerce-Address{
  background:#fff; border:1px solid var(--panel); border-radius:6px; padding:14px 16px; margin-bottom:14px;
}
/* Each .woocommerce-Address also carries WC's own .col-1/.col-2 (from the
   .col2-set two-column layout, float:left/right;width:48% — 3 classes deep,
   so it beats a plain 2-class override on specificity) which fights the
   grid below the same way woocommerce-layout.css did for the nav/content
   split further up this file. */
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address{float:none; width:auto;}
.woocommerce-MyAccount-content .woocommerce-Addresses{display:grid; grid-template-columns:1fr; gap:18px; max-width:480px;}
.woocommerce-MyAccount-content .woocommerce-Address-title{display:flex; justify-content:space-between; align-items:center; gap:10px;}
.woocommerce-MyAccount-content .woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-MyAccount-content .woocommerce-notices-wrapper .woocommerce-error{
  background:#fff; border:1.5px solid var(--action); border-left-width:5px; border-radius:4px;
  padding:14px 18px; margin-bottom:18px; list-style:none; font-family:var(--font-body);
}
.woocommerce-MyAccount-content .woocommerce-notices-wrapper .woocommerce-error{border-color:var(--action-ink);}

/* Mobile — sidebar becomes a wrapping row of pill tabs above the content. */
@media (max-width:820px){
  body.woocommerce-account .woocommerce{grid-template-columns:1fr; grid-template-areas:"nav" "content"; gap:18px;}
  body.woocommerce-account .woocommerce-MyAccount-navigation{position:static; padding:8px;}
  .woocommerce-MyAccount-navigation ul{flex-direction:row; flex-wrap:wrap; gap:6px;}
  .woocommerce-MyAccount-navigation-link{flex:1 1 auto;}
  .woocommerce-MyAccount-navigation-link a{text-align:center; padding:10px 10px; font-size:0.8rem;}
  .fahr-account-card{padding:18px;}

  .woocommerce-MyAccount-content table.shop_table_responsive thead{display:none;}
  .woocommerce-MyAccount-content table.shop_table_responsive tr{display:block; border-top:1px solid var(--panel); padding:10px 0;}
  .woocommerce-MyAccount-content table.shop_table_responsive tr:first-child{border-top:none;}
  .woocommerce-MyAccount-content table.shop_table_responsive td{
    display:flex; justify-content:space-between; align-items:center; gap:10px; border:none; padding:5px 14px; text-align:right;
  }
  .woocommerce-MyAccount-content table.shop_table_responsive td::before{
    content:attr(data-title); font-family:var(--font-ui); font-size:0.8rem; text-transform:uppercase;
    letter-spacing:0.04em; color:var(--muted-ink); text-align:left;
  }
  .woocommerce-MyAccount-content .woocommerce-Addresses{grid-template-columns:1fr;}
}

/* Country/Street/City/State/Zip address group (see fahr_render_address_fields()
   in functions.php) — callers wrap it in display:grid;
   grid-template-columns:repeat(auto-fit, minmax(160px, 1fr)); this just
   forces the street address row onto its own line rather than sharing a
   row with City/State/Zip. */
.fahr-address-full-row{grid-column:1/-1;}

/* Pedigree chart (fahr_render_pedigree_chart() in functions.php). Scrolls
   sideways inside its own box on narrow screens rather than squeezing the
   names, so the page itself never scrolls horizontally. */
.fahr-pedigree-scroll{overflow-x:auto; -webkit-overflow-scrolling:touch;}
.fahr-pedigree{display:grid; gap:6px 10px; min-width:520px;}
.fahr-ped-cell{display:flex; flex-direction:column; justify-content:center; background:#fff; border:1px solid var(--panel); border-left:4px solid var(--anchor); padding:8px 12px; min-height:52px;}
.fahr-ped-dam{border-left-color:var(--action);}
.fahr-ped-unknown{background:transparent; border-style:dashed; border-left-style:solid; opacity:0.75;}
.fahr-ped-role{font-family:var(--font-ui); font-size:0.8rem; text-transform:uppercase; letter-spacing:0.05em; color:var(--muted-ink);}
.fahr-ped-name{font-family:var(--font-body); font-size:1rem; line-height:1.3;}
.fahr-ped-name a{color:var(--action-ink);}
.fahr-ped-meta{font-family:var(--font-ui); font-size:0.8rem; color:var(--muted-ink); margin-top:2px;}

/* Keyboard accessibility: a clearly visible focus ring for keyboard users
   (mouse clicks don't trigger :focus-visible), and a "Skip to main content"
   link that appears only when tabbed to. */
:focus-visible{outline:3px solid var(--action); outline-offset:2px;}
main:focus{outline:none;}
.skip-link{position:absolute; left:12px; top:-60px; z-index:10000; background:var(--anchor); color:var(--page); padding:10px 16px; font-family:var(--font-ui); font-size:0.9rem; text-decoration:none; border-radius:0 0 4px 4px;}
.skip-link:focus{top:0;}

.fahr-ped-em{border-style:dashed; border-left-style:solid;}
.fahr-ped-em-mark{color:var(--muted-ink); font-size:0.8rem;}
.fahr-ped-em-note{font-family:var(--font-ui); font-size:0.8rem; color:var(--muted-ink); margin-top:8px;}

/* Text for screen readers only (WordPress's standard class name). */
.screen-reader-text{position:absolute !important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;}

/* ---------- phones: stack side-by-side form fields (the forms set their grids inline) ---------- */
@media (max-width:600px){
  form div[style*="grid-template-columns:1fr 1fr"],
  form div[style*="grid-template-columns:repeat(2,1fr)"],
  form div[style*="grid-template-columns:repeat(3,1fr)"]{grid-template-columns:1fr !important;}
}

/* phones: the footer logo name is nowrap and ran past the screen edge */
@media (max-width:600px){
  .footer-brand .brand{max-width:100%;}
  .footer-brand .brand-text .name{white-space:normal; font-size:1.05rem;}
}

/* phones: an input sharing a row with Look up / Clear buttons got crushed — give it the full row, buttons wrap below */
@media (max-width:600px){
  form div[style*="display:flex; gap:8px"]{flex-wrap:wrap !important;}
  form div[style*="display:flex; gap:8px"] > input{flex:1 1 100%;}
}

/* FAHR % fields hold up to 7 digits (e.g. 87.5000) — wide enough to read them without scrolling the box. */
.fahr-input[name$="_fahr_pct"], .fahr-input[name="horse_fpd"]{min-width:12ch;}
form div[style*="display:flex; gap:8px"]{flex-wrap:wrap;}
form div[style*="display:flex; gap:8px"] > input[name$="_fahr_pct"]{flex:1 1 12ch;}

/* ---------- offspring cards coloured by sex (same colours as the pedigree chart: sire green, dam copper) ---------- */
.horse-card-sex-stallion{border-left:6px solid var(--anchor);}
.horse-card-sex-mare{border-left:6px solid var(--action);}
.horse-card-sex-gelding{border-left:6px solid #2f6690;}
.hc-sex{font-weight:700; letter-spacing:0.04em; text-transform:uppercase;}
.hc-sex-stallion{color:var(--anchor);}
.hc-sex-mare{color:var(--action-ink);}
.hc-sex-gelding{color:#2f6690;}
.hc-sex-key{display:flex; flex-wrap:wrap; gap:6px 18px; margin:6px 0 4px; font-family:var(--font-ui); font-size:0.8rem; color:var(--muted-ink);}
.hc-sex-key span{display:inline-flex; align-items:center; gap:6px;}
.hc-sex-key i{display:inline-block; width:12px; height:12px; border-radius:2px;}
.hc-sex-key .k-stallion{background:var(--anchor);} .hc-sex-key .k-mare{background:var(--action);} .hc-sex-key .k-gelding{background:#2f6690;}

/* ---------- admin-only "Missing: ..." line on registry cards (fahr-data-gaps.php) ---------- */
.hc-gaps{margin:8px 0 2px; padding:5px 9px; font-family:var(--font-ui); font-size:0.78rem; line-height:1.35; color:var(--action-ink); background:#fbf1e8; border:1px dashed var(--action); border-radius:4px;}

/* Long single-word registered names ("Chubslastchanceblues") could not wrap and ran off the edge of the card, clipped, in the narrower layouts (tablets, small or zoomed-in windows). Let them break instead. */
.hc-header > div:first-child{min-width:0;}
.hc-name, .hc-name a, .hc-parent-name, .hc-parent-name a, .hc-sub{overflow-wrap:anywhere; word-break:normal; hyphens:auto;}

/* One-line names: the logo mark moves onto the photo corner so the name has the whole row (assets/fit-names.js shrinks a long name to fit; the rare name too long for one readable line wraps — hc-name-wrap). */
.horse-card{position:relative;}
.hc-header{display:block;}
.hc-mark{position:absolute; top:10px; right:10px; z-index:3; background:var(--page); box-shadow:0 1px 5px rgba(0,0,0,0.35);}
.hc-name{white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.hc-name.hc-name-wrap{white-space:normal; overflow:visible; text-overflow:clip;}

/* ---------- Meet the Board (About Us page and the Tidings issue use the same markup: fahr-board.php) ---------- */
.fahr-board{display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:22px; margin:26px 0 8px;}
.fahr-board-card{display:flex; flex-direction:column; margin:0; background:#fff; border:1px solid var(--panel); border-radius:6px; overflow:hidden; box-shadow:0 1px 8px rgba(0,0,0,0.09);}
.fahr-board-photo{display:block; width:100%; height:auto; aspect-ratio:3/4; object-fit:cover; object-position:center 18%; margin:0;}
.fahr-board-photo-wrap{aspect-ratio:3/4; overflow:hidden; background:var(--panel);}
.fahr-board-photo-wrap img{display:block; height:auto; max-width:none;}
.fahr-board-mono{display:flex; align-items:center; justify-content:center; aspect-ratio:3/4; background:var(--anchor); color:var(--page); font-family:var(--font-head); font-size:3.4rem; letter-spacing:0.04em;}
.fahr-board-body{flex:1; padding:14px 18px 18px; border-top:4px solid var(--action);}
.fahr-board-name{margin:0; font-family:var(--font-head); font-size:1.3rem; line-height:1.2; color:var(--anchor);}
.fahr-board-role{margin:4px 0 0; font-family:var(--font-ui); font-size:0.78rem; font-weight:700; letter-spacing:0.07em; text-transform:uppercase; color:var(--action-ink);}
.fahr-board-also{margin:5px 0 0; font-family:var(--font-ui); font-size:0.85rem; line-height:1.4; color:var(--muted-ink);}
.fahr-board-years{margin:10px 0 0; padding-top:8px; border-top:1px solid var(--panel); font-family:var(--font-ui); font-size:0.82rem; font-weight:600; color:var(--body-ink);}
.fahr-board-past .fahr-board{grid-template-columns:repeat(auto-fill,minmax(170px,1fr)); gap:16px;}
.fahr-board-past .fahr-board-card{box-shadow:none; opacity:0.92;}
.fahr-board-past .fahr-board-photo,.fahr-board-past .fahr-board-photo-wrap,.fahr-board-past .fahr-board-mono{filter:grayscale(0.6);}
.fahr-board-past .fahr-board-name{font-size:1.05rem;}

/* Legal pages (Privacy Policy, Terms of Service, Refund Policy): a wide, readable column for long text and tables. */
.legal-doc{max-width:none; font-size:1rem; line-height:1.7;}
.legal-doc h2{font-size:1.3rem; margin:36px 0 10px; padding-top:6px;}
.legal-doc h3{font-size:1.05rem; margin:22px 0 8px;}
.legal-doc p, .legal-doc li{max-width:none;}
.legal-doc ul, .legal-doc ol{padding-left:1.4em; margin:0 0 16px;}
.legal-doc li{margin-bottom:6px;}
.legal-doc a{color:var(--action-ink); text-decoration:underline;}
.legal-doc table{width:100%; max-width:none; border-collapse:collapse; margin:16px 0 26px; font-size:0.95rem; line-height:1.55;}
.legal-doc th, .legal-doc td{text-align:left; vertical-align:top;}
.legal-doc mark{background:#fff1a8; color:inherit; padding:0 3px;}
@media (max-width:640px){.legal-doc table{display:block; overflow-x:auto;}}

/* Legal pages: tables that are not styled inline (the Refund Policy) get clear rows, borders and shading. */
.legal-doc table{border:1px solid #d9d2c3; background:#fff;}
.legal-doc th{background:#2d4a2b; color:#fff; padding:10px 14px; font-size:0.95rem;}
.legal-doc td{padding:12px 14px; border-top:1px solid #d9d2c3;}
.legal-doc tbody tr:nth-child(even){background:#faf7f0;}

/* Generic pages (cart, checkout, shop and any page without its own template) use the full content width, not the 52-character intro-text width. */
.page-body{max-width:none;}

/* Forms with a certification and signature: the text and the notice under the signature use the full form width, not the 52ch reading column. */
.fahr-sigpad-form p.lede, .fahr-sigpad-form .fahr-privacy-note { max-width: none !important; }
.fahr-sigpad-form .fahr-privacy-note { font-size: 0.9rem; }
