/*
Theme Name: Kava Kats
Template: ekg-base
Theme URI: https://kavakats.com/
Author: EKG Marketing
Author URI: https://ekgmarketing.com/
Description: Kava Kats child theme (parent: EKG Base). Kat Presnell's student portfolio and a plainly-sourced kava/kratom answer library in Boone, North Carolina. Warm paper and bark ink with a deep Appalachian green and a kava-root amber — handmade rather than clinical, because the site's own artwork is a hand drawing and the copy is meant to sound like a person, not a pharmacy leaflet. Health and legal pages stay quiet and readable; the personality lives in the portfolio and community pages.
Version: 0.1.6
Requires at least: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kavakats
*/

/* Structural + brand CSS lives in theme.json where it can. Anything here is chrome the
   block layer cannot express. Keep it small — Playbook #8, reuse the house style first. */

/* =========================================================================
   Reading rhythm                                     v0.1.3 · 2026-08-13
   -------------------------------------------------------------------------
   ekg-base sets blockGap 0 and root padding 0 ON PURPOSE: every other fleet
   site authors its pages as explicit section groups that carry their own
   padding and gaps, so the parent must not impose any. Kava Kats is a
   READING site — its pages are plain prose blocks with no section wrappers —
   so the child has to supply the rhythm the parent deliberately withholds.
   Without this the pages render as one unbroken 1265px-wide wall of text
   with zero space between paragraphs and headings.

   blockGap lives in theme.json (it feeds the layout var). Heading top-margin
   has to be CSS: core emits its flow-layout margins as `:where(.is-layout-flow)
   > *`, and theme.json element styles are also zero-specificity, so a
   theme.json margin would never win. These rules are 0,1,1 and do.
   ========================================================================= */

/* The page H1 comes from the template (wp:post-title), not from page content,
   so it sits OUTSIDE .entry-content and the rules below never reach it. It
   needs its own breathing room, and a little more of it than a mid-page h2.

   It also needs its own width. post-title is a direct child of the 68rem
   <main>, while prose is constrained to the 44rem contentSize INSIDE
   post-content — so left alone the title renders a full 384px wider than the
   text beneath it and starts 192px further left, which reads as a mistake.
   Pinning it to the same content measure is what makes the column look like
   one column. */
.wp-block-post-title {
  max-width: var(--wp--style--global--content-size);
  margin-inline: auto;
  margin-block-end: 2rem;
}

/* The first in-content h2 usually restates the title, so it must not also
   carry a full section gap — that reads as a hole under the H1. */
.entry-content > h2:first-child { margin-block-start: 0; }

.entry-content > h2 { margin-block-start: 2.75rem; }
.entry-content > h3 { margin-block-start: 2rem; }
.entry-content > :first-child { margin-block-start: 0; }

.entry-content ul,
.entry-content ol { padding-left: 1.3rem; }
.entry-content li + li { margin-top: .4rem; }

/* =========================================================================
   House-baseline token overrides                     v0.1.3 · 2026-08-13
   -------------------------------------------------------------------------
   ekg-base's Fluent Forms and FAQ baselines are written against the fleet
   slugs (ink/sub/line/on-dark). A child theme.json palette REPLACES the
   parent's array rather than merging into it, so those slugs do not exist
   here and every one of them was falling through to ekg-base's blue-grey
   fallbacks on a warm-paper site.

   Per the Standard, a child retunes its forms by overriding the --ekg-*
   vars in ONE place and never by rewriting the rules. That is all this is.
   `on-dark` itself is restored in theme.json, because the parent's BUTTON
   style resolves its text colour through that slug — without it, buttons
   rendered bark-on-green at 2.20:1, which fails AA. White on Appalachian
   green is 7.49:1.
   ========================================================================= */

.fluentform {
  --ekg-form-text:         var(--wp--preset--color--contrast);
  --ekg-form-label:        var(--wp--preset--color--contrast);
  --ekg-form-muted:        var(--wp--preset--color--muted);
  --ekg-form-control-bg:   #FFFFFF;
  --ekg-form-border:       var(--wp--preset--color--rule);
  --ekg-form-accent:       var(--wp--preset--color--accent);
  --ekg-form-btn-bg:       var(--wp--preset--color--accent);
  --ekg-form-btn-bg-hover: var(--wp--preset--color--amber);
  --ekg-form-btn-text:     var(--wp--preset--color--on-dark);
}

.ekg-faq {
  --ekg-faq-text:   var(--wp--preset--color--contrast);
  --ekg-faq-muted:  var(--wp--preset--color--muted);
  --ekg-faq-line:   var(--wp--preset--color--rule);
  --ekg-faq-accent: var(--wp--preset--color--accent);
}

/* Source notes at the foot of health pages — quiet, not shouty. */
.kk-sources {
  font-size: var(--wp--preset--font-size--small);
  color: var(--wp--preset--color--muted);
  border-top: 1px solid var(--wp--preset--color--rule);
  padding-top: 1rem;
}

/* The "last reviewed" line that every health and legal page carries. */
.kk-reviewed {
  font-size: var(--wp--preset--font-size--small);
  color: var(--wp--preset--color--muted);
  font-style: italic;
}

/* Independent-project notice — load-bearing since the Noble name ships in the origin story.
   Plain and unhedged on purpose: a disclaimer that sounds nervous reads as an admission. */
.kk-independent {
  font-size: var(--wp--preset--font-size--small);
  color: var(--wp--preset--color--muted);
  border-top: 1px solid var(--wp--preset--color--rule);
  padding-top: 1rem;
  margin-top: 2rem;
}
