/* Page-specific extension of the established Law 544 guide visual system. */
.petition-page{max-width:72rem}.petition-page h1{max-width:24ch;font-size:clamp(2.2rem,4.6vw,3.9rem)}.petition-page h2{font-size:clamp(1.65rem,3vw,2.35rem);max-width:38ch}.petition-page h3{font-size:1.5rem}.petition-page h4{font:600 1.2rem/1.4 var(--sans)}.petition-page p,.petition-page li{max-width:75ch}.petition-step{margin-block:2.5rem;padding-top:1.5rem;border-top:1px solid var(--line)}.petition-step>summary,#static-models>summary,#routing-static>summary{font-weight:600;font-size:1.2rem;min-height:2.75rem;cursor:pointer}.petition-page details[open]>summary{margin-bottom:1rem}.petition-page label{display:block;margin-top:1.1rem;font-weight:600}.petition-page input:not([type=checkbox]):not([type=radio]),.petition-page textarea,.petition-page select{display:block;width:100%;min-width:0;max-width:100%;padding:.75rem;border:1px solid var(--muted);border-radius:.2rem;background:#fff;color:var(--text);min-height:2.75rem;margin-block:.4rem 1rem}.petition-page fieldset{border:0;padding:0;margin:0;min-width:0}.petition-page legend{font-weight:600;margin-bottom:1rem}.petition-page button,.petition-page .button{min-height:2.75rem;white-space:normal}.petition-page input:is([type=checkbox],[type=radio]){width:1.2rem;height:1.2rem;vertical-align:middle;accent-color:var(--forest);margin-right:.5rem}.petition-page label:has(input:is([type=checkbox],[type=radio])){min-height:2.75rem;padding-block:.6rem}.petition-page pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;border-left:2px solid var(--line);padding-left:1rem}.petition-sources{display:flex;flex-direction:column;gap:.1rem;font-size:.95rem;margin-block:.5rem 1.2rem}.petition-channel{padding:1rem 0;border-top:1px solid var(--line);overflow-wrap:anywhere}.petition-channel p{margin-top:.5rem;margin-bottom:.5rem}.petition-medical{border-left:.35rem solid #912f26;padding:1.25rem;background:#fff5f3}.petition-medical h2{font-size:1.6rem}.triage-answers{display:flex;flex-direction:column;align-items:stretch;gap:.75rem;max-width:40rem;margin-block:1.5rem}.triage-answers .button{text-align:left;justify-content:flex-start}.triage-question{padding:1.25rem;background:var(--mist);border-left:.3rem solid var(--forest)}.triage-question h3{line-height:1.4}.petition-page .error-notice{font-weight:600}.petition-page [aria-invalid=true]{border:2px solid #912f26}.petition-page #context-form{max-width:45rem}.petition-page #letter-output{line-height:1.5;resize:vertical}.petition-page .generator-layout{gap:2rem}.petition-page .notice{white-space:pre-line}.petition-page dt{font-weight:600;margin-top:1rem}.petition-page dd{margin:.3rem 0 1rem}.petition-page #letter-form>button{margin-top:1rem}.petition-page #letter-actions{gap:.6rem}.petition-page #letter-actions .button{font-size:1rem;padding:.65rem 1rem}.petition-page #variant-choice{font-size:.95rem}.petition-page #routing-live>article{margin-block:1.5rem;padding:1rem 0;border-top:2px solid var(--forest)}
@media(min-width:768px){.triage-question{padding:2rem}.petition-page .generator-layout{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.petition-page #letter-output{min-height:38rem}.petition-page .triage-answers{align-items:flex-start}.triage-answers .button{min-width:12rem}}
@media print{.petition-page form,#triage-live,#draft-tools,#geo-tools,#generator-live{display:none}.petition-page details>*{display:block}.petition-page{max-width:none}}

/* County controls and long institutional addresses share the existing fluid form styles. */
.petition-page #local-place,.petition-page #local-original{max-width:45rem}.petition-page #recipient-choice label,.petition-local{overflow-wrap:anywhere}.petition-local>details{margin-block:1rem}.petition-local summary{min-height:2.75rem;cursor:pointer}.petition-local .button{margin-top:.75rem}

/* Stand-alone links (sources, contact channels, next steps) get a 44 px touch target on phones. */
.petition-sources a,.petition-channel a,.petition-page #triage-static>a,.petition-page :is(#triage-live,#decision-live) a,.petition-page :is(#next,#privacy)>a,.petition-medical>a{display:inline-flex;align-items:center;min-height:2.75rem}
.petition-page #letter-status.notice{margin-top:1rem}

/* Memory-only guides: persistent safety access and narrow-screen controls. */
.quick-safety{position:sticky;top:0;z-index:20;display:flex;gap:1rem;align-items:center;padding:.65rem;background:var(--paper,#fff);border:2px solid currentColor}
.quick-safety a{font-weight:700;min-height:44px;display:flex;align-items:center}
#guide-deadlines article{margin-block:1.5rem;padding-block:1rem;border-top:1px solid #bbb}
#guide-deadlines form{max-width:40rem}
.petition-page label{overflow-wrap:anywhere}
.petition-page input[type=date]{min-width:0;max-width:100%}
.petition-page button{white-space:normal}
#safety-first>a{display:inline-flex;min-height:44px;align-items:center;font-weight:700}

.petition-directory>a{display:block;min-height:2.75rem;padding:.4rem 0;overflow-wrap:anywhere}
#safety-first>a,.quick-safety>a{min-width:2.75rem}

/* FEW: armonizarea ghidurilor cu masura de lectura editoriala.
   Se adauga dupa toate regulile existente din drepturi.css. */

@media screen {
  /* Lead review (8 Oct 2026): the guides keep their tuned 75ch measure; 66ch left single words
     on their own line (e.g. „numele tău.”). Titles get balanced lines instead of orphans. */
  @supports (text-wrap: balance) {
    .petition-page > h1,
    .petition-page .petition-step > h2 {
      text-wrap: balance;
    }
  }

  /* Aceste niveluri folosesc fontul serif in foaia existenta.
     h4, care foloseste sans-serif, ramane in afara regulii. */
  .petition-page h1,
  .petition-page h2,
  .petition-page h3 {
    font-optical-sizing: auto;
  }

  /* Relaxare numai pentru titlul paginii si titlurile directe de pas.
     .triage-question h3 isi pastreaza line-height: 1.4. */
  .petition-page > h1,
  .petition-page .petition-step > h2 {
    line-height: 1.22;
    letter-spacing: -0.015em;
  }

  /* O intrebare simpla nu necesita o banda cat intregul instrument. */
  .petition-page .triage-question {
    max-width: 44rem;
  }

  /* WebKit must wrap long native choices instead of expanding page scroll bounds. */
  .petition-page select {
    white-space: normal;
  }
}

/* Lead review (9 Oct 2026): with the relaxed letter-spacing and optical sizing, 38ch made one-line step titles wrap
   on desktop ("Verifică siguranța și / alege procedura potrivită"); 48ch keeps them on one line where they fit. */
@media screen {
  .petition-page .petition-step > h2 { max-width: 48ch; }
}

/* The retained draft remains readable while answers close the generator. */
.petition-page .kept-text{max-width:45rem;min-width:0;margin-block:1.5rem;padding:1rem;border:2px solid #8b7100;border-radius:.3rem;background:#fffbed}
.petition-page .kept-text .notice{margin-top:0}
.petition-page #kept-body{line-height:1.5;resize:vertical;overflow-wrap:anywhere}

/* Keep the recipient heading in the outline and in its native group legend. */
.petition-page #recipient-choice legend h3{font:inherit;line-height:inherit;margin:0}
/* WCAG 2.4.11 (audit 12 Oct 2026): the sticky safety banner (.quick-safety, about 4.75rem high) must not hide a focused control;
   reserve its height plus the usual 1.5rem gap when the browser scrolls a focused or targeted element into view. */
html:has(.quick-safety){scroll-padding-top:6.5rem}
