/* findingrehab.io provider portal (/providers/*) and review queue (/admin/).
   Tokens, buttons, inputs, callouts, prose and breadcrumbs come from site.css. Inputs are 16px
   (1rem) and every control is at least 44px tall. One column at 640px and below; nothing is
   wider than the screen from 320px up. Error red #8E2A1D: 8.4 on white, 7.6 on #FBF1EE. */

.p-body{padding:36px var(--gut) 72px}
.p-app{position:relative;display:flex;flex-direction:column;gap:20px;max-width:50rem}
.p-app--wide{max-width:76rem}
.p-app>noscript{display:block}

/* Live regions stay in the accessibility tree but take no room while empty. */
.p-alert:empty,.p-status:empty,.p-ts-msg:empty{position:absolute!important;width:1px;height:1px;margin:0!important;padding:0!important;overflow:hidden;clip:rect(0 0 0 0);border:0!important}
.p-alert:not(:empty){padding:12px 16px;border-left:3px solid #8E2A1D;background:#F8E9E4;color:#3B1510;border-radius:0 10px 10px 0;font-size:.9375rem;line-height:1.55}
.p-alert a{color:#3B1510;font-weight:600;text-decoration:underline;text-underline-offset:.18em}
.p-status{font-size:.9375rem;line-height:1.55;color:var(--text)}
.p-loading{font-size:.9375rem;color:var(--text-2)}

/* ---------- cards and forms ---------- */
.p-card{position:relative;display:flex;flex-direction:column;gap:14px;min-width:0;padding:24px 26px;background:var(--white);border:1px solid var(--rule);border-radius:14px;box-shadow:0 18px 40px -32px rgba(14,26,22,.45)}
.p-card h2{font-size:clamp(1.5rem,2.4vw,1.875rem);line-height:1.15}
.p-card h2:focus,.p-panel h2:focus,.a-detail h2:focus,.a-queue h2:focus{outline:none}
.p-card h2:focus-visible,.p-panel h2:focus-visible,.a-detail h2:focus-visible,.a-queue h2:focus-visible{outline:3px solid var(--focus);outline-offset:4px}
.p-card p{line-height:1.6}
.p-form{position:relative;display:flex;flex-direction:column;gap:20px;min-width:0}
.p-sec{position:relative;display:flex;flex-direction:column;gap:16px;min-width:0;padding-top:22px;border-top:1px solid var(--rule)}
.p-sec h2{font-size:clamp(1.375rem,2.2vw,1.625rem)}
.p-field{display:flex;flex-direction:column;gap:6px;min-width:0}
.p-field>label,.p-group>legend,.p-ts-label{font-size:1rem;font-weight:600;line-height:1.35;color:var(--text)}
.p-opt{font-weight:400;color:var(--text-2)}
.p-field .hint,.p-group>.hint{margin:0;font-size:.875rem;line-height:1.5}
.p-group .hint a{text-decoration:underline;text-underline-offset:.18em}
.p-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.p-row--phone{grid-template-columns:minmax(0,2fr) minmax(0,1fr)}
.p-group{display:flex;flex-direction:column;gap:6px;min-width:0}
.p-group>legend{float:left;width:100%;margin-bottom:6px;padding:0}
.p-group>legend+*{clear:left}
.p-checks{display:grid;grid-template-columns:repeat(auto-fill,minmax(13.5rem,1fr));gap:2px 12px}
.p-check{display:flex;align-items:flex-start;gap:10px;min-height:44px;padding:10px;border-radius:9px;cursor:pointer;line-height:1.4;font-size:1rem}
.p-check input{flex:none;margin:1px 0 0;width:20px;height:20px;cursor:pointer}
.p-check:hover,.p-check:has(input:checked){background:#E9EDE8}
.p-attest .p-check{border:1px solid var(--line-strong);background:var(--paper)}
.p-attest .p-check:has(input:checked){background:#E9EDE8}
.p-static{padding:12px 14px;border-radius:10px;background:var(--band);font-size:.9375rem;line-height:1.55}
.p-static a{text-decoration:underline;text-underline-offset:.18em}
.p-count{text-align:right}
.p-count.is-over{color:#8E2A1D;font-weight:600}
.p-app textarea{min-height:140px;line-height:1.5}
.p-app input,.p-app select,.p-app textarea{font-size:1rem}
/* site.css styles text, search, email, tel and number inputs; url inputs look the same here. */
.p-app input[type="url"]{min-height:46px;width:100%;padding:10px 14px;border:1px solid var(--line-strong);border-radius:var(--radius);background:var(--white);color:var(--text);line-height:1.3}
.p-app input[type="url"]:hover{border-color:var(--text-2)}
/* Fields, groups and the error summary land below the sticky header when scrolled to. */
.p-summary,.p-field,.p-group,.p-card,.p-who{scroll-margin-top:calc(var(--nav-h) + 16px)}
.p-app .btn--sm{min-height:44px}
.p-app .link-btn{display:inline-flex;align-items:center;min-height:44px;padding:6px 4px;font-size:.9375rem}

/* ---------- errors ---------- */
.p-err{margin:0;color:#8E2A1D;font-weight:600;font-size:.9375rem;line-height:1.45}
.has-err>input,.has-err>select,.has-err>textarea{border:2px solid #8E2A1D}
.p-group.has-err{padding-left:14px;border-left:4px solid #8E2A1D}
.p-summary{padding:16px 20px;border:2px solid #8E2A1D;border-radius:12px;background:#FBF1EE}
.p-summary:focus{outline:3px solid var(--focus);outline-offset:3px}
.p-summary h2{font-family:var(--sans);font-size:1.0625rem;font-weight:700;letter-spacing:0;line-height:1.3;color:#5E1A10}
.p-summary ul{margin-top:8px;padding-left:1.2em;list-style:disc}
.p-summary li{margin-top:2px;color:#8E2A1D}
.p-summary a{display:inline-block;padding:5px 0;color:#8E2A1D;font-weight:600;text-decoration:underline;text-underline-offset:.18em}

/* ---------- files ---------- */
.p-app input[type="file"]{width:100%;min-height:54px;padding:8px 10px;border:1px dashed var(--line-strong);border-radius:12px;background:var(--paper);color:var(--text);cursor:pointer}
.p-app input[type="file"]::file-selector-button{min-height:38px;margin-right:12px;padding:0 14px;border:1px solid var(--line-strong);border-radius:9px;background:var(--white);color:var(--text);font:inherit;font-weight:600;cursor:pointer}
.p-files{display:flex;flex-direction:column}
.p-files:empty{display:none}
.p-files li{display:flex;align-items:center;flex-wrap:wrap;gap:2px 12px;padding:4px 0;border-bottom:1px solid var(--hair);font-size:.9375rem}
.p-file-name{flex:1 1 12rem;min-width:0;font-weight:600;overflow-wrap:anywhere}
.p-file-size{color:var(--text-2);font-variant-numeric:tabular-nums}

/* ---------- Turnstile ---------- */
.p-ts{display:flex;flex-direction:column;gap:8px;min-width:0}
.p-ts-box{min-height:65px;max-width:100%}

/* ---------- landing and dashboard ---------- */
.p-dash{display:flex;flex-direction:column;gap:20px}
.p-dash>.p-actions{margin:0}
.p-cta{margin:0}
.p-info{max-width:44rem;margin-top:8px}
.p-who{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px 16px;padding:10px 16px;border:1px solid var(--rule);border-radius:12px;background:var(--paper)}
.p-who-text{font-size:.9375rem;min-width:0}
.p-who-links{display:flex;align-items:center;flex-wrap:wrap;gap:4px 16px;font-size:.9375rem}
.p-who-links a{display:inline-flex;align-items:center;min-height:44px;text-decoration:underline;text-underline-offset:.18em}
.p-email{overflow-wrap:anywhere}
.p-actions{display:flex;flex-wrap:wrap;gap:10px}
.p-list{display:flex;flex-direction:column}
.p-item{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:10px 20px;padding:16px 0;border-top:1px solid var(--hair)}
.p-item:first-child{border-top:0;padding-top:4px}
.p-item-main{flex:1 1 18rem;min-width:0}
.p-item-title{font-family:var(--sans);font-size:1.0625rem;font-weight:600;letter-spacing:-.005em;line-height:1.35}
.p-item-title a{color:var(--text);text-decoration:underline;text-decoration-color:var(--line-strong);text-underline-offset:.2em}
.p-item-title a:hover{color:var(--link-hover)}
.p-item-meta{margin-top:4px;font-size:.875rem;color:var(--text-2)}
.p-item-side{display:flex;flex-direction:column;align-items:flex-end;gap:8px}
.p-item-acts{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.p-note{margin-top:8px;padding:8px 12px;border-left:3px solid var(--brass);background:var(--band);border-radius:0 8px 8px 0;font-size:.9375rem;white-space:pre-wrap}
.p-note-k{font-weight:600}
.p-empty{color:var(--text-2)}
.p-confirm{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:10px 12px;border-radius:10px;background:#F3E7CF}
.p-confirm-q{flex-basis:100%;font-weight:600;font-size:.9375rem}
.p-confirm-q:focus{outline:none}
.p-badge{display:inline-flex;align-items:center;padding:4px 10px;border:1px solid var(--rule);border-radius:999px;font-size:.8125rem;font-weight:600;line-height:1.3;white-space:normal}
.p-badge--pending{background:#F3E7CF;border-color:#E1CDA4;color:#3A2A10}
.p-badge--approved{background:#EAF1EC;border-color:#BFD3C6;color:var(--green)}
.p-badge--rejected{background:#F8E9E4;border-color:#E6C2B8;color:#6B2115}
.p-badge--withdrawn{background:var(--band);border-color:var(--rule);color:var(--text-2)}

/* ---------- login ---------- */
.p-login{gap:0}
.p-panel{display:flex;flex-direction:column;gap:14px}
.p-alt{display:flex;flex-wrap:wrap;gap:0 18px}
.p-aside{max-width:44rem;font-size:.875rem;line-height:1.6;color:var(--text-2)}
.p-aside p+p{margin-top:8px}
.p-aside a{text-decoration:underline;text-underline-offset:.18em}

/* ---------- claim search ---------- */
.p-results{display:flex;flex-direction:column}
.p-results:empty{display:none}
.p-res{display:flex;align-items:center;justify-content:space-between;gap:8px 16px;flex-wrap:wrap;padding:10px 0;border-top:1px solid var(--hair)}
.p-res-main{display:flex;flex-direction:column;gap:2px;flex:1 1 14rem;min-width:0}
.p-res-name{font-weight:600;overflow-wrap:anywhere}
.p-res-place{font-size:.875rem;color:var(--text-2)}
.p-listing{padding:14px 16px;border-radius:12px;background:var(--band)}
.p-listing-name{font-family:var(--serif);font-size:1.5rem;line-height:1.15;overflow-wrap:anywhere}
.p-listing-place{margin-top:4px;color:var(--text-2)}
.p-listing a{display:inline-flex;align-items:center;min-height:44px;text-decoration:underline;text-underline-offset:.18em}
.p-notices:empty{display:none}
.p-notices .callout a{font-weight:600}
.p-next{padding:16px 18px;border-radius:12px;background:var(--band);font-size:.9375rem}
.p-next h3{font-family:var(--sans);font-size:1rem;font-weight:600;letter-spacing:0}
.p-next ol{margin-top:8px;padding-left:1.3em;list-style:decimal}
.p-next li+li{margin-top:4px}
.p-done{border-color:#BFD3C6}

/* ---------- admin ---------- */
.a-queue,.a-detail,.a-body{display:flex;flex-direction:column;gap:14px;min-width:0}
.a-detail>h2{font-size:clamp(1.625rem,2.6vw,2rem);line-height:1.15;overflow-wrap:anywhere}
.a-body:empty{display:none}
.a-top{display:flex;align-items:flex-end;justify-content:space-between;flex-wrap:wrap;gap:10px 20px}
.a-top h2{font-size:clamp(1.625rem,2.6vw,2rem)}
.a-tools{display:flex;align-items:center;flex-wrap:wrap;gap:8px 10px}
.a-tools label{font-weight:600;font-size:.9375rem}
.a-tools select{width:auto;min-width:12rem}
.a-tabs{display:flex;flex-wrap:wrap;gap:4px;border-bottom:1px solid var(--rule)}
.a-tab{display:inline-flex;align-items:center;gap:6px;min-height:46px;margin-bottom:-1px;padding:0 16px;border:1px solid transparent;border-bottom:0;border-radius:10px 10px 0 0;background:transparent;color:var(--text-2);font-size:.9375rem;font-weight:600}
.a-tab:hover{color:var(--text)}
.a-tab[aria-selected="true"]{background:var(--white);border-color:var(--rule);color:var(--text)}
.a-n{font-variant-numeric:tabular-nums;font-weight:500}
.a-panel{padding:14px 20px 18px;margin-top:-14px;background:var(--white);border:1px solid var(--rule);border-top:0;border-radius:0 0 14px 14px}
.a-list{display:flex;flex-direction:column}
.a-item{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:8px 20px;padding:14px 0;border-top:1px solid var(--hair)}
.a-item:first-child{border-top:0}
.a-item-main{flex:1 1 20rem;min-width:0}
.a-item-title{font-family:var(--sans);font-size:1.0625rem;font-weight:600;letter-spacing:0;line-height:1.35}
.a-item-title a{display:inline-block;padding:4px 0;color:var(--link);text-decoration:underline;text-underline-offset:.18em;overflow-wrap:anywhere}
.a-item-meta{margin-top:2px;font-size:.875rem;color:var(--text-2)}
.a-flags{display:flex;flex-wrap:wrap;gap:6px}
.a-maint{padding:4px 16px 12px;border:1px solid var(--rule);border-radius:12px;background:var(--paper);font-size:.9375rem}
.a-maint summary{display:flex;align-items:center;min-height:44px;font-weight:600;cursor:pointer}
.a-maint p+p{margin-top:8px}
.a-back a{display:inline-flex;align-items:center;min-height:44px;font-weight:600;text-decoration:underline;text-underline-offset:.18em}
.a-sec{gap:12px}
.a-sec-h{font-family:var(--sans);font-size:1.125rem;font-weight:600;letter-spacing:0}
.a-sub-h{font-family:var(--sans);font-size:1rem;font-weight:600;letter-spacing:0}
.a-dl{display:flex;flex-direction:column;margin:0}
.a-dl-row{display:grid;grid-template-columns:minmax(0,11rem) minmax(0,1fr);gap:4px 20px;padding:8px 0;border-top:1px solid var(--hair)}
.a-dl-row:first-child{border-top:0}
.a-dl dt{font-weight:600;font-size:.9375rem}
.a-dl dd{margin:0;min-width:0;font-size:.9375rem;overflow-wrap:anywhere}
.a-dl dd a{text-decoration:underline;text-underline-offset:.18em}
.a-docs{display:flex;flex-direction:column;gap:2px}
.a-docs a{display:inline-flex;align-items:center;min-height:44px;font-weight:600;text-decoration:underline;text-underline-offset:.18em;overflow-wrap:anywhere}
.a-doc-meta{font-size:.875rem;color:var(--text-2)}
.a-table-wrap{border:1px solid var(--rule);border-radius:12px;overflow:hidden}
.a-diff{width:100%;border-collapse:collapse;table-layout:fixed;font-size:.9375rem;line-height:1.5}
.a-diff th,.a-diff td{padding:10px 12px;text-align:left;vertical-align:top;border-bottom:1px solid var(--hair);overflow-wrap:anywhere}
.a-diff thead th{background:var(--band);font-weight:600}
.a-diff tbody th{width:22%;font-weight:600}
.a-diff tr:last-child>*{border-bottom:0}
.a-none{color:var(--text-2)}
.a-pre{white-space:pre-wrap}
.a-btns{display:flex;flex-wrap:wrap;gap:10px}
.a-confirm{display:flex;flex-direction:column;gap:10px;padding:12px 14px;border-radius:10px;background:#F3E7CF}
.a-confirm-q{font-weight:600}
.a-confirm-q:focus{outline:none}
.btn--danger{background:#8E2A1D;color:var(--white)}
.btn--danger:hover{background:#74200F;color:var(--white)}

/* ---------- small screens ---------- */
@media (max-width:640px){
  .p-body{padding:22px var(--gut) 56px}
  .p-card{padding:18px 16px;border-radius:12px}
  .p-row,.p-row--phone{grid-template-columns:minmax(0,1fr)}
  .p-checks{grid-template-columns:minmax(0,1fr)}
  .p-item-side{align-items:flex-start}
  .p-app .btn--lg{width:100%}
  .a-panel{padding:10px 14px 14px}
  .a-tab{padding:0 12px}
  .a-dl-row{grid-template-columns:minmax(0,1fr);gap:2px}
  .a-diff thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .a-diff,.a-diff tbody,.a-diff tr,.a-diff th,.a-diff td{display:block;width:auto}
  .a-diff tbody th{width:auto;padding-bottom:2px;border-bottom:0;background:var(--band)}
  .a-diff td{padding-top:6px}
  .a-diff td::before{content:attr(data-label) ": ";font-weight:600;color:var(--text-2)}
  .a-diff tr{border-bottom:1px solid var(--rule)}
  .a-diff tr:last-child{border-bottom:0}
}

/* ---------- forced colors ---------- */
@media (forced-colors:active){
  .p-card,.p-who,.p-summary,.p-badge,.a-tab,.a-panel,.p-confirm,.a-confirm,.p-listing,.p-next,.p-static{border:1px solid CanvasText}
  .a-tab[aria-selected="true"]{forced-color-adjust:none;background:Highlight;color:HighlightText}
  .p-err,.p-summary a{color:CanvasText}
  .has-err>input,.has-err>select,.has-err>textarea,.p-group.has-err{border-color:Highlight}
}

/* ---------- print ---------- */
@media print{
  .p-form,.p-who,.a-tools,.a-tabs,.a-maint,.a-decide,.a-back{display:none!important}
  .p-card{box-shadow:none;border:1px solid #000}
}
