/* ========================================================================== */
/* CitReg — Cross-surface stylesheet (A1 single authority)                    */
/* Scope: LS6 + DpX. Owns typography, clamp scales, and control sizing.       */
/* Avoids LS6 internals except neutral component classes shared across pages.  */
/* ========================================================================== */

/* === p301: tokens & base ================================================== */
:root{
  /* Type scale */
  --c-font: clamp(14px, 1.6vw, 16px);
  --c-line: 1.45;

  /* Radii / paddings / gaps */
  --c-radius: 4px;
  --c-pad-y: 6px;
  --c-pad-x: 10px;

  --c-gap-1: 6px;
  --c-gap-2: 10px;
  --c-gap-3: 14px;

  /* Colors */
  --c-text:  #222;
  --c-muted: #5a6772;
  --c-border:#d0d5db;
  --c-brand: #0d6efd;  /* adjust brand as needed */

  /* CitReg patch P520: unify tokens into single :root — start */
  /* Moved here from p480 to avoid multiple :root declarations */
  --c-option-font: clamp(13px, 0.94rem, 15px);  /* ImageSelect captions */
  --c-chip-font:   clamp(12px, 0.92rem, 14px);  /* list radio “chips” */
  /* CitReg patch P520: unify tokens into single :root — end */

  /* CitReg patch P510: 2C tokens — start */
  --rcw: clamp(220px, 26vw, 320px); /* right column width */
  --cgap: 28px;                     /* column gap */
  --rgap: 16px;                     /* RC vertical gap */
  --sticky-top: 96px;               /* sticky offset under header */
  --bp-2c: 992px;                   /* 2C activation breakpoint */
  /* CitReg patch P510: 2C tokens — end */
}

html{ font-size: var(--c-font); }

body{
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: var(--c-line);
  color: var(--c-text);
  font-weight: 400;
  font-size: var(--c-font);   /* ensure descendants inherit clamp explicitly */
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

/* === p308: normalize form elements to inherit base font =================== */
input, textarea, select, button { font: inherit; }
/* === p308 END === */

/* Headings (neutral clamp) */
h1{ font-size: clamp(24px, 2.2vw, 36px); line-height: 1.20; font-weight: 700; margin: 0 0 .5rem; }
h2{ font-size: clamp(20px, 1.9vw, 30px); line-height: 1.25; font-weight: 700; margin: 0 0 .5rem; }
h3{ font-size: clamp(18px, 1.6vw, 24px); line-height: 1.30; font-weight: 600; margin: 0 0 .5rem; }

/* Paragraph rhythm (light touch) */
p{ margin: 0 0 .75rem; }

/* Muted text */
.small, .text-muted{ color: var(--c-muted); }

/* === p302: header text used by both LS6 and DpX ========================== */
.citreg-header-title h2{
  margin: 0 !important;
  font-weight: 700;
  font-size: clamp(30px, 2.2vw, 40px);
  line-height: 1.2;
  color: #152536;
}
.citreg-header-title .text-muted.small{
  font-size: clamp(16px, 1.1vw, 18px);
  color: var(--c-muted);
  margin-top: 2px;
}

/* === p303: form controls — compact, non-puffy (single authority) ========= */
.form-control,
select.form-select,
textarea.form-control{
  font-size: 1rem;               /* binds to clamp via body/html */
  padding: 4px var(--c-pad-x);
  line-height: 1.25;
  border-radius: var(--c-radius);
  height: auto;
  min-height: 0;
  box-shadow: none;
}
.form-control:focus,
select.form-select:focus,
textarea.form-control:focus{
  box-shadow: 0 0 0 2px rgba(13,110,253,.12);
  border-color: var(--c-brand);
  outline: 0;
}
/* keep buttons compact */
.btn{ line-height: 1.25; }
/* === p303 END === */

/* Radios / checkboxes */
.form-check-input{
  width: 1.05em;
  height: 1.05em;
  border-radius: .2em;
}

/* Buttons */
.btn{
  padding: 6px 12px;
  border-radius: var(--c-radius);
  font-weight: 600;
  box-shadow: none;
}
.btn-lg{
  padding: 8px 14px;
  border-radius: calc(var(--c-radius) + 2px);
}
.btn-sm{
  padding: 4px 10px;
  border-radius: var(--c-radius);
}
/* Prev/Next wrappers (LS6 inherits .btn) */
.ls-move-btn .btn{ padding: 6px 12px; }

/* === p304: inline question typography (shared) =========================== */
.question-container.citreg-inline .ls-label-question{
  font-size: clamp(.88rem, .84rem + .20vw, 1rem);
  line-height: 1.3;      /* label only */
  font-weight: 500;
  margin: 0 !important;
}
.question-container.citreg-inline .answer-container .form-control{
  /* no font-size or line-height here; p303/body govern */
}
.question-container.citreg-inline .answer-container .form-control::placeholder{
  font-size: inherit;
  opacity: .85;
}
/* === p304 END === */

/* === p305: utility trims ================================================= */
hr{ margin: .75rem 0; border: 0; border-top: 1px solid var(--c-border); }
img{ max-width: 100%; height: auto; }
/* guard against incidental horizontal scrolling on survey pages */
body.cr_fruit{ overflow-x: hidden; }

/* === p431: LS6 question spacing override (beats theme_apple.css) ========= */
body.cr_fruit .question-container{ margin-bottom: 3px; }
body.cr_fruit .group-container .question-container:last-child{ margin-bottom: 12px; }
/* === p431 END ============================================================ */

/* === p453: header layout — 3-dot + Home ================================== */
.citreg-nav-right{ display:flex; align-items:center; gap:12px; }
.citreg-nav-right .citreg-home-link{ margin-left:auto; }
.citreg-nav-right .navbar-toggler{ padding:4px 8px; line-height:1; }
/* === p453 END ============================================================ */

/* === p456: header dropdown control (3-dot) =============================== */
.citreg-header-nav { position: relative; }
.citreg-header-nav .dropdown-menu{
  /* closed by default regardless of theme defaults */
  display: block;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  z-index: 1050;
  transition: opacity .12s ease;
}
.citreg-header-nav .dropdown.show .dropdown-menu,
.citreg-header-nav .dropdown-menu.show{
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
/* === p456 END ============================================================ */

/* === p480: Option/choice label font — Start ============================== */
/* CitReg patch P521: removed duplicate :root; tokens now live in p301 :root */

body.cr_fruit .imageselect-container .imageselect-radiobutton{
  font-size: var(--c-option-font);
}

/* Standard list radios (e.g., years) */
body.cr_fruit .answers-list .radio-item label.radio-label{
  font-size: var(--c-chip-font);
}

/* === p480: END =========================================================== */

/* === p483: subtle link (match header subtitle) =========================== */
.citreg-subtle-link{
  color: var(--bs-secondary-color, #6c757d);
  font-size: .95rem;        /* match subtitle size */
  font-weight: 400;         /* match subtitle weight */
  text-decoration: none;
}
.citreg-subtle-link:hover,
.citreg-subtle-link:focus{
  color: var(--bs-secondary-color, #6c757d);
  text-decoration: underline;
}
/* === p483: end =========================================================== */

/* === p499: footer copyright — stats parity & no underline =============== */
body.cr_fruit .citreg-copy,
body.cr_fruit .citreg-copy a{
  font-size: .875rem;      /* stats parity */
  line-height: 1.25;
  font-weight: 400;
  font-family: inherit;
  color: var(--bs-secondary-color, #6c757d);
  padding-top: 0;
  padding-bottom: .5;
}
body.cr_fruit .citreg-copy a,
body.cr_fruit .citreg-copy a:hover,
body.cr_fruit .citreg-copy a:focus{
  text-decoration: none;
}
/* === p499: end =========================================================== */

/* === p563: header util links — compact stack ============================= */
body.cr_fruit .citreg-util-links{
  gap: 0;               /* was 2px in earlier p561 */
  line-height: 1.05;    /* tighten Home/Contact line spacing */
}
body.cr_fruit .citreg-util-links .nav-link{
  padding-top: 0;       /* override Bootstrap nav-link vertical padding */
  padding-bottom: .5;
}
body.cr_fruit .citreg-nav-right{
  row-gap: 4px;         /* shrink space above the Navigator (gap-2 = 8px) */
}
/* === p563: end =========================================================== */

/* === p574: footer copyright (dedicated) ================================== */
body.cr_fruit footer.citreg-wrap .citreg-footer-copy{
  display: inline-block;      /* left inline flow (bottom-left of footer) */
  font-size: .78rem;          /* match stats tile */
  line-height: 1;
  font-weight: 400;
  font-family: inherit;
  color: rgba(0,0,0,.6);      /* match stats tile */
  margin-left: 6px;           /* slight left offset (responsive-friendly) */
}
/* === p574: end =========================================================== */


/* END A1 authority */
