/* ATHRTY Intake / X-CARD-02: canonical selection contract.
   Shared by the Problem Desk and the Guided Diagnostic.
   Selection has one meaning, one mark, one placement on every breakpoint.
   Pure presentation: form state and submission contracts are unchanged. */
:root{
 --xintake-check-surface:#ccfbf1;
 --xintake-check-ink:#15181a;
 --xintake-focus-color:#ccfbf1;
 --xintake-select-outline:rgba(204,251,241,.85);
}
body.intake-home .problem-grid>.choice,
body.diagnostic-page .problem-options>.problem-option{
 touch-action:manipulation;
 -webkit-tap-highlight-color:transparent;
}
body.intake-home .problem-grid>.choice:focus-visible,
body.diagnostic-page .problem-options>.problem-option:focus-visible{
 outline:2px solid var(--xintake-focus-color)!important;
 outline-offset:3px!important;
}
/* Problem Desk: replace the original top-right ring with a selection-only check.
   High specificity intentionally defeats historic mobile-first and stability rules. */
body.intake-home .problem-grid>.choice .choice-indicator{
 position:absolute!important;
 inset:auto 14px 14px auto!important;
 top:auto!important;
 right:14px!important;
 bottom:14px!important;
 box-sizing:border-box!important;
 display:grid!important;
 place-items:center!important;
 width:26px!important;
 height:26px!important;
 min-width:26px!important;
 min-height:26px!important;
 flex:0 0 26px!important;
 margin:0!important;
 padding:0!important;
 border:1px solid var(--xintake-select-outline)!important;
 border-radius:50%!important;
 background:var(--xintake-check-surface)!important;
 color:var(--xintake-check-ink)!important;
 opacity:0!important;
 transform:scale(.86)!important;
 pointer-events:none!important;
 z-index:2;
 box-shadow:0 2px 10px rgba(11,13,12,.12);
 transition:opacity .16s ease,transform .16s ease!important;
}
body.intake-home .problem-grid>.choice .choice-indicator::after{
 content:"✓";
 display:block;
 font:800 17px/1 ui-sans-serif,system-ui,-apple-system,sans-serif;
 color:inherit;
}
body.intake-home .problem-grid>.choice:is(.selected,[aria-pressed="true"]) .choice-indicator{
 opacity:1!important;
 transform:scale(1)!important;
 border-width:1px!important;
 background:var(--xintake-check-surface)!important;
}
body.intake-home .problem-grid>.choice>span:nth-child(2){
 box-sizing:border-box;
 max-width:calc(100% - 40px)!important;
 padding-right:0!important;
}
@media(max-width:640px){
 body.intake-home .problem-grid>.choice>span:nth-child(2){
  max-width:100%!important; /* reserved third grid track already protects the label */
 }
 body.intake-home .problem-grid>.choice .choice-indicator{
  top:auto!important;right:12px!important;bottom:12px!important;
  width:24px!important;height:24px!important;min-width:24px!important;
  min-height:24px!important;flex-basis:24px!important;
 }
 body.intake-home .problem-grid>.choice .choice-indicator::after{font-size:15px}
}
/* Guided Diagnostic: the functional category glyph remains in the top-right.
   The selection-only check lives bottom-right and appears only when chosen. */
body.diagnostic-page .problem-options>.problem-option{
 min-height:112px;
 border-radius:15px;
}
body.diagnostic-page .problem-options>.problem-option::after{
 content:"✓";
 position:absolute;
 top:auto;
 right:14px;
 bottom:14px;
 width:26px;
 height:26px;
 box-sizing:border-box;
 display:grid;
 place-items:center;
 border:1px solid var(--xintake-select-outline);
 border-radius:50%;
 background:var(--xintake-check-surface);
 color:var(--xintake-check-ink);
 font:800 17px/1 ui-sans-serif,system-ui,-apple-system,sans-serif;
 opacity:0;
 transform:scale(.86);
 pointer-events:none;
 box-shadow:0 2px 10px rgba(11,13,12,.12);
 transition:opacity .16s ease,transform .16s ease;
}
body.diagnostic-page .problem-options>.problem-option[aria-pressed="true"]::after{
 content:"✓";
 top:auto;
 right:14px;
 bottom:14px;
 border-width:1px;
 background:var(--xintake-check-surface);
 opacity:1;
 transform:scale(1);
}
body.diagnostic-page .problem-options>.problem-option strong{
 min-width:0;
 overflow-wrap:break-word;
 text-wrap:pretty;
}
@media(max-width:560px){
 body.diagnostic-page .problem-options>.problem-option{
  min-height:124px;
  padding:16px 48px 16px 14px;
 }
 body.diagnostic-page .problem-options>.problem-option::after,
 body.diagnostic-page .problem-options>.problem-option[aria-pressed="true"]::after{
  top:auto;right:12px;bottom:12px;
  width:24px;height:24px;font-size:15px;
 }
}
/* At compact 320-359px widths, 10 readable full-width choices beat two
   unusably narrow columns. Larger phones retain the two-column scan. */
@media(max-width:359px){
 body.diagnostic-page .problem-options{
  grid-template-columns:minmax(0,1fr);
  gap:9px;
 }
 body.diagnostic-page .problem-options>.problem-option{
  min-height:86px;
  gap:8px;
  padding:13px 50px 13px 14px;
 }
 body.diagnostic-page .problem-options>.problem-option strong{font-size:14px}
 body.diagnostic-page .problem-options>.problem-option::after,
 body.diagnostic-page .problem-options>.problem-option[aria-pressed="true"]::after{
  right:12px;bottom:12px;
 }
}
@media(max-width:560px){
 body.diagnostic-page .field :is(input,select,textarea){font-size:16px}
}
@media(prefers-reduced-motion:reduce){
 body.intake-home .problem-grid>.choice .choice-indicator,
 body.diagnostic-page .problem-options>.problem-option::after{
  transition:none!important;animation:none!important;
 }
}