/* ============================================================================
   AGENCY KIT — COMPONENT STYLESHEET
   ----------------------------------------------------------------------------
   🔴 WHY THIS FILE EXISTS (added 2026-08-28, found on processserverfortworth):
   The kit shipped Tabs/Accordion/ReadMore/Disclosure/ReviewWall COMPONENTS but
   NO CSS for the classes they emit. A site using <Tabs> therefore rendered as
   bare radio inputs with every panel stacked and visible - a vertical list plus
   stray radio buttons, not a tab widget. Nothing errored. The build gate passed
   100%. It surfaced ONLY on a screenshot.

   This is the "measured value discarded at draw" trap: correct markup, correct
   classes, clean build, wrong pixels. Every site built before this date that
   uses these components needs its rendering checked.

   CONTRACT: every class any component in src/components/ emits gets a rule here.
   If you add a component, add its classes here IN THE SAME COMMIT.

   DESIGN DOCTRINE (owner, non-negotiable):
     - hard 90-degree edges; border-radius 2px MAX, never rounded
     - offset ZERO-BLUR shadows (4px 4px 0 0 buttons / 7px 7px 0 0 cards)
     - 5px solid accent left edge on cards
     - >=24px padding to INK, and line-height NEVER below 1 (it leaks)
   Link this AFTER site.css so a site can override any single rule.
   ========================================================================== */

/* ---- TABS (radio hack, zero JS) -----------------------------------------
   All panels ship in the initial HTML; CSS reveals the checked one. The
   :has() selector needs no JS and no sibling-order gymnastics. */
.tabs { margin: 2rem 0; }
.tab-radio { position: absolute; opacity: 0; pointer-events: none; }
.tab-label {
  display: inline-block; padding: 12px 20px; margin: 0 6px 0 0;
  border: 2px solid var(--rule, #d8d2c4); border-bottom: none;
  background: var(--bg, #f2efe6); color: var(--fg, #14161a);
  font-weight: 600; cursor: pointer; border-radius: 2px 2px 0 0;
  line-height: 1.2;
}
.tab-label:hover { background: #fff; }
/* keyboard focus must be visible: the radio is off-screen, so ring the label */
.tab-radio:focus-visible + .tab-label { outline: 3px solid var(--accent, #c8a02a); outline-offset: 2px; }
.tab-radio:checked + .tab-label {
  background: #fff; border-bottom: 2px solid #fff; margin-bottom: -2px;
  box-shadow: 0 -4px 0 0 var(--accent, #c8a02a) inset;
}
.tab-panel { display: none; border: 2px solid var(--rule, #d8d2c4); background: #fff; padding: 26px; }
.tab-panel > :first-child { margin-top: 0; }
.tab-panel > :last-child  { margin-bottom: 0; }
/* Nth panel shown when the Nth radio is checked. 8 tabs supported; add more if needed. */
.tabs:has(.tab-radio:nth-of-type(1):checked) .tab-panel:nth-of-type(1),
.tabs:has(.tab-radio:nth-of-type(2):checked) .tab-panel:nth-of-type(2),
.tabs:has(.tab-radio:nth-of-type(3):checked) .tab-panel:nth-of-type(3),
.tabs:has(.tab-radio:nth-of-type(4):checked) .tab-panel:nth-of-type(4),
.tabs:has(.tab-radio:nth-of-type(5):checked) .tab-panel:nth-of-type(5),
.tabs:has(.tab-radio:nth-of-type(6):checked) .tab-panel:nth-of-type(6),
.tabs:has(.tab-radio:nth-of-type(7):checked) .tab-panel:nth-of-type(7),
.tabs:has(.tab-radio:nth-of-type(8):checked) .tab-panel:nth-of-type(8) { display: block; }
/* 🔴 NO-:has() FALLBACK. Without this, a browser lacking :has() shows NOTHING,
   which is strictly worse than the unstyled stack. Show every panel instead. */
@supports not selector(:has(*)) {
  .tab-panel { display: block; border-top-width: 2px; margin-top: 12px; }
  .tab-label { border-bottom: 2px solid var(--rule, #d8d2c4); }
}

/* ---- ACCORDION (native <details>, zero JS) ------------------------------- */
.accordion { margin: 2rem 0; }
.accordion details {
  border: 2px solid var(--rule, #d8d2c4); border-left: 5px solid var(--accent, #c8a02a);
  background: #fff; margin: 0 0 12px; border-radius: 2px;
}
.accordion summary {
  padding: 20px 26px; cursor: pointer; list-style: none;
  display: flex; align-items: center; gap: 12px;   /* marker INLINE with the heading */
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: "\25B8"; margin-left: auto; font-size: 1.1em;   /* triangle on the RIGHT */
  color: var(--accent, #c8a02a); transition: transform .15s;
}
.accordion details[open] summary::after { transform: rotate(90deg); }
.accordion summary:focus-visible { outline: 3px solid var(--accent, #c8a02a); outline-offset: -3px; }
/* the heading inside <summary> must not add block margins or it breaks the flex row */
.accordion summary > :is(h2,h3,h4,h5,h6) { margin: 0; font-size: 1.05rem; line-height: 1.3; }
.acc-body { padding: 0 26px 24px; }
.acc-body > :first-child { margin-top: 0; }
.acc-body > :last-child  { margin-bottom: 0; }

/* ---- DISCLOSURE / READ-MORE (both native <details>) ---------------------- */
.disclosure, .read-more { margin: 1.5rem 0; }
.disclosure summary, .read-more summary {
  cursor: pointer; font-weight: 600; color: var(--link, #1a4fa0);
  padding: 10px 0; list-style: none;
}
.disclosure summary::-webkit-details-marker,
.read-more summary::-webkit-details-marker { display: none; }
.disclosure summary::before, .read-more summary::before { content: "\25B8 "; color: var(--accent, #c8a02a); }
.disclosure[open] summary::before, .read-more[open] summary::before { content: "\25BE "; }
.disc-body, .rm-body { padding: 4px 0 8px 20px; border-left: 2px solid var(--rule, #d8d2c4); }

/* ---- CARDS -------------------------------------------------------------- */
.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin: 2rem 0; }
.card {
  border: 2px solid var(--rule, #d8d2c4); border-left: 5px solid var(--accent, #c8a02a);
  background: #fff; padding: 26px; border-radius: 2px;
  box-shadow: 7px 7px 0 0 var(--rule, #d8d2c4);     /* offset, ZERO blur */
}
.card > :first-child { margin-top: 0; }
.card > :last-child  { margin-bottom: 0; }

/* ---- BUTTONS ------------------------------------------------------------ */
.btn {
  display: inline-block; padding: 14px 28px; border: 2px solid var(--fg, #14161a);
  background: var(--accent, #c8a02a); color: var(--fg, #14161a);
  font-weight: 700; text-decoration: none; border-radius: 2px;
  box-shadow: 4px 4px 0 0 var(--fg, #14161a);       /* offset, ZERO blur */
  line-height: 1.2;
}
.btn:hover  { transform: translate(2px, 2px); box-shadow: 2px 2px 0 0 var(--fg, #14161a); }
.btn:active { transform: translate(4px, 4px); box-shadow: none; }

/* ---- FORM --------------------------------------------------------------- */
.form { display: grid; gap: 18px; max-width: 40rem; margin: 2rem 0; }
.form label { display: block; font-weight: 600; margin-bottom: 6px; }
.form input, .form textarea, .form select {
  width: 100%; padding: 12px 14px; border: 2px solid var(--rule, #d8d2c4);
  background: #fff; color: var(--fg, #14161a); font: inherit; border-radius: 2px;
}
.form input:focus-visible, .form textarea:focus-visible, .form select:focus-visible {
  outline: 3px solid var(--accent, #c8a02a); outline-offset: 1px; border-color: var(--fg, #14161a);
}
.form textarea { min-height: 8rem; resize: vertical; }
.form-note { font-size: .9rem; color: var(--muted, #5a5850); }

/* ---- REVIEW WALL -------------------------------------------------------- */
.reviewwall { margin: 2rem 0; }
.revcols { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.revcard {
  border: 2px solid var(--rule, #d8d2c4); border-left: 5px solid var(--accent, #c8a02a);
  background: #fff; padding: 26px; border-radius: 2px;
}
.revbox { margin: 0 0 16px; }
.rc-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.rc-name { font-weight: 700; }
.rc-stars { color: var(--accent, #c8a02a); letter-spacing: 2px; }
.rc-meta { font-size: .85rem; color: var(--muted, #5a5850); }
.rc-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
.rc-text { margin: 0; }

/* ---- MISC --------------------------------------------------------------- */
.empty-state {
  border: 2px dashed var(--rule, #d8d2c4); padding: 26px;
  color: var(--muted, #5a5850); text-align: center; border-radius: 2px;
}
.sitemap-list { list-style: none; padding-left: 0; }
.sitemap-list li { padding: 8px 0; border-bottom: 1px solid var(--rule, #d8d2c4); }
.sm-desc { display: block; color: var(--muted, #5a5850); font-size: .9rem; }

/* ---- SITE HEADER / NAV --------------------------------------------------
   🔴 Emitted by Layout.astro, not by a component - so gate 7c's component-class
   list did NOT cover these, and the raw checkbox rendered visibly as "■ Menu"
   on every page. Same root cause as 7c (markup shipped, CSS never written),
   different origin file. Added 2026-08-28 along with the nav classes in the
   7c contract list. */
.site-header { border-bottom: 6px solid var(--accent, #c8a02a); background: var(--fg, #14161a); }
.nav-bar { display: flex; align-items: center; gap: 20px; padding: 14px 26px; flex-wrap: wrap; }
.nav-check { position: absolute; opacity: 0; pointer-events: none; }  /* NEVER visible */
.nav-list { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav-list a { color: #fff; text-decoration: none; font-weight: 600; padding: 6px 0; }
.nav-list a:hover { text-decoration: underline; }
.nav-list .is-active > a { color: var(--accent, #c8a02a); }
/* The hamburger is a MOBILE affordance. On desktop the list is always shown, so the
   toggle is hidden - never merely transparent, or it still takes a tab stop. */
.nav-toggle { display: none; }
@media (max-width: 640px) {
  .nav-toggle {
    display: flex; align-items: center; gap: 10px; cursor: pointer;
    color: #fff; font-weight: 700; padding: 6px 0;
  }
  .nav-toggle-bars {
    display: block; width: 22px; height: 2px; background: #fff;
    box-shadow: 0 6px 0 0 #fff, 0 -6px 0 0 #fff;   /* 3 bars, zero blur */
  }
  .nav-check:focus-visible + .nav-toggle { outline: 3px solid var(--accent, #c8a02a); outline-offset: 3px; }
  .nav-list { display: none; width: 100%; flex-direction: column; gap: 0; }
  .nav-check:checked ~ .nav-list { display: flex; }
  .nav-list li { border-top: 1px solid rgba(255,255,255,.2); }
  .nav-list a { display: block; padding: 12px 0; }
}
