/* stylelint-disable declaration-property-value-disallowed-list */
/* stylelint-disable comment-empty-line-before */
/* stylelint-disable custom-property-pattern */
/*
 * base.css
 *
 * Responsibility:
 * Global base styles — resets, root typography,
 * layout primitives, and foundational component geometry.
 *
 * No colour, theme, or category styling belongs here.
 */


/* =========================================================
   GLOBAL DEFAULTS
   ========================================================= */


[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.5;
  min-height: 100dvh;
  padding-bottom: 60px; /* space for fixed footer on landing pages */
}

section {
  display: block;  
  width: 100%;
}

.intro {
  width: 100%;            /* Force it to fill the structural frame container */
  max-width: 800px;       /* Keep the reading length comfortable for prose */
  margin: 0 auto 1.5rem auto; /* Clean shorthand centering margin */
  padding: 1.0rem;
}

/* Images behave responsively by default */
img {
  max-width: 100%;
  height: auto;
}

/* leave here to detect missing variable in styles */
/* html {
  background: var(--page-bg, hotpink);
} */

/* =========================================================
   GENERIC UTILITIES
   ========================================================= */

/*
 * .centered
 * Text-level utility.
 * Centres inline content only.
 */
.centered {
  text-align: center;
}

/*
 * .mid
 * Layout-level centring utility.
 * Centres the element itself in flex layouts.
 * Does NOT control text alignment.
 */
.mid {
  align-self: center;
}

/* =========================================================
   LAYOUT PRIMITIVES
   ========================================================= */

/*
 * .wrap
 * Constrains readable line length and centres content.
 */
.wrap {
  margin: 0 auto;
  position: relative;
  padding: 1rem 1.5rem;
}

.app-surface {
  /* border-radius: 18px; */
  padding: 1.5rem;
  /* overflow: hidden; */
  /* outline: 2px dashed orange; TEMP: debug frame boundaries   */
}

/* =========================================================
   HEADER / FOOTER
   ========================================================= */

header{
  margin-bottom: 0.6rem;
}


.header-wrapper {
  margin: 0 auto;
  position: relative;
  padding-inline: 1.5rem;
}

/* =========================================================
   BLOCK — PRIMARY LAYOUT UNIT
   ========================================================= */

/*
 * .block
 * Structural container for vertical layout.
 * Flex column by default; children stretch horizontally
 * unless they explicitly opt out (e.g. via .mid).
 */
.block {
}

/*
 * Block variants
 * These modify alignment or intent, not geometry.
 */
.block.header {
  margin-inline: auto;
}

.block.lg {

  text-align: center;
  font-weight: 700;
}

/* Paragraph rhythm inside blocks */
.block p {
  line-height: 1.6;
  margin-bottom: 0.8rem;
}

.block p:last-child {
  margin-bottom: 0;
}

/* Smaller blocks centre their text by default */
.block.sm p,
.block.sm .details p {
  text-align: center;
}

/* Headings inside blocks */
.block h2,
.block h3 {
  font-weight: 700;
}

.block h3 {
  padding-block: 0.25rem;
}

/* =========================================================
   DEV‑ONLY STRUCTURAL LABELS
   ========================================================= */

.label {
  display: none;         /* default: hidden */
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  opacity: 0.65;
}

/* =========================================================
   HELPER LAYOUTS
   ========================================================= */

/*
 * .stack
 * Vertical grouping with consistent spacing.
 */
.stack {
  padding-top:5px;
  gap: 0.75rem;
  width: 100%;  
}

/*
 * .row
 * Horizontal grouping with wrapping support.
 */
.row {

  gap: 1rem;

}


/* =========================================================
   DETAILS / SUMMARY
   ========================================================= */

/*
 * <details>
 * Used for optional depth.
 * Must remain skimmable and non‑authoritative.
 */
details {
  display: grid; /* Forces the browser to calculate internal tracks cleanly */
  width: 100%;
  border: 1px solid var(--surface-border, #eeeeee);
  border-radius: var(--radius, 8px);
  overflow: hidden;
}

/* Remove default marker */
details summary::-webkit-details-marker {
  display: none;
}

/* Summaries often use block geometry */
details summary.block {
  padding: 1rem 0.5rem;
}

/* Force the summary container to stack its contents vertically and center them */
details summary {
    display: grid;
    grid-template-columns: 1fr; /* One single, full-width column */
    justify-items: center;      /* Centers elements horizontally */
    text-align: center;         /* Centers the text inside its box */
    cursor: pointer;
    list-style: none;           /* Wipes out native browser disclosure arrows */
}

/* Hide WebKit/Blink specific default summary markers */
details summary::-webkit-details-marker {
    display: none;
}

/* Disclosure affordance - Naturally falls onto line 2 below the text */
details summary::after {
    content: "+";
    margin-top: 0.5rem;         /* Clean vertical breathing room below the text */
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 1;             /* Prevents layout shifting when changing characters */
}

details[open] summary::after {
    content: "−";               /* Keeps the typography uniform */
}


/* =========================================================
   BUTTON — STRUCTURE ONLY
   ========================================================= */

/*
 * .button
 * Layout container for call‑to‑action links.
 * Visual styling belongs in category / theme CSS.
 */
.button {


  padding: 0.75rem 1.25rem;
  border-radius: 0.375rem;

  font: inherit;
  cursor: pointer;
  text-decoration: none;
  border: none;
}

button.button {
  border: none;
}

.cta-stack .button {
  margin: 1rem auto;
  min-height: 3.5rem;
}


/* ==========================================================================
   Dedicated CTA Section Style
   ========================================================================== */

/* The Parent Track: Ensures a clean row container that cannot be crushed */
.engine-cta-track {
    display: block !important; /* Overrides any inherited flex/inline-flex properties */
    width: 100% !important;
    clear: both;
    margin: 2rem 0 !important;
    padding: 0 !important;
}

/* The Core Button: Forces identical width across all instances */
.button-cta {
    display: block !important;
    width: 80% !important;      /* Firmly standardises the layout width */
    max-width: 450px;           /* Prevents it from getting too wide on tablets */
    min-height: 3.5rem;
    margin: 0 auto !important;  /* Perfect horizontal centering */
    margin-bottom: 1.5rem !important;
  }


/* =========================================================================
   CLEAN COMPONENT LAYOUT (No overrides needed)
   ========================================================================= */

/* The outer details wrapper automatically takes up the full pillar width */
section details {
  width: 100%;
  border-radius: var(--radius, 8px);
  overflow: hidden;
  margin-bottom: 1rem;
}

/* The summary bar natively spans 100% edge-to-edge */
section details summary {
  cursor: pointer;
  user-select: none;
  padding: 1.25rem;
  background-color: var(--surface-secondary, #f0f4f7);
}

/* The inner body contents also span 100% edge-to-edge */
section details div.block {
  padding: 1.5rem;
  background-color: var(--surface-primary, #ffffff);
  border-top: 1px solid var(--surface-border, #eeeeee);
}

/* Create a distinct, separate utility class for narrow text readability */
.text-prose {

  text-align: center;
  width: 95%;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.5rem;
}

.text-prose p {
  width: 100%;       /* Allow it to use up to the maximum character limit */
  max-width: 75ch;   /* The golden typographic constraint */
  margin-left: auto; /* Safety fallback centering */
  margin-right: auto;
}