/* Small, reusable experience improvements: readable chips, roomy controls, clear state. */
:root{--ux-primary:#1e5bc4;--ux-text:#14304f;--ux-muted:#485e75;--ux-focus:#1f6feb}
:where(.pill,.badge,.status,.px-status,.nav-badge){font-weight:700;line-height:1.4;letter-spacing:normal;white-space:normal;overflow-wrap:anywhere}
.pill{background:#e5efff;color:#163d76;border:1px solid #b9d2f4;padding:5px 11px;border-radius:99px;display:inline-flex;align-items:center;gap:5px}
.pill.ok{background:#e6f6ee;color:#09613d;border-color:#9bd5b7}
.pill.warn{background:#fff0db;color:#8c3a09;border-color:#e9c09c}
.card.hero .pill,.wizard-hero .pill{background:#fff;color:#163b63;border-color:#c4d8eb}
.card.hero .metric-label,.wizard-hero .metric-label{color:#e1eaf8!important}
.guided-step,.wizard-step{min-width:0;min-height:76px;align-items:center;gap:12px}
.guided-step>div,.wizard-step>div{min-width:0;flex:1}
.guided-step strong,.wizard-step b,.guided-step small,.wizard-step small{display:block;white-space:normal;overflow-wrap:anywhere;line-height:1.35}
.guided-step strong,.wizard-step b{font-weight:750;color:inherit;margin:0 0 3px}
.guided-step small,.wizard-step small{font-weight:450;font-size:.77rem;opacity:.85;margin:0}
.guided-footer,.wizard-actions{scroll-margin-bottom:100px}
.guided-footer{padding:12px 16px;bottom:8px;flex-wrap:wrap;box-shadow:0 8px 30px #142d4e17}
.guided-footer .actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.guided-footer .actions .btn{min-height:44px}
.guided-status{line-height:1.5;max-width:72ch}
.rating-choice-grid{grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr))}
.rating-choice-body{padding:16px 18px;min-height:126px}
.rating-choice-description{font-size:.9rem;line-height:1.58}
.rating-choice-title strong{font-size:1rem}
.rating-choice-card input:checked+.rating-choice-body{background:#ecf5ff;border-color:#1e5bc4}
:where(input,select,textarea,button,.btn,a):focus-visible{outline:3px solid var(--ux-focus)!important;outline-offset:3px}
.input-error,[aria-invalid="true"]{border-color:#b42318!important;box-shadow:0 0 0 2px #b4231820}
.px-workspace .px-card{background:#fff!important;color:var(--ux-text)!important}
.px-workspace .px-card h2,.px-workspace .px-card h3{color:var(--ux-text)!important}
.px-workspace .px-help{color:var(--ux-muted)!important}
@media(max-width:760px){.guided-steps,.wizard-steps{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;gap:10px}.guided-step,.wizard-step{flex:0 0 min(250px,78vw);scroll-snap-align:start}.guided-footer{position:static}.guided-footer .actions,.wizard-actions-right{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.guided-footer .actions .btn{min-width:0}.rating-choice-grid{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

.p-shell .p-panel{background:#fff;color:#14304f;border:1px solid #d7e3f0;box-shadow:0 4px 15px #1736550b}
.p-shell .p-panel :is(h2,h3){color:#14304f}
.p-shell .p-panel .p-muted{color:#495f76}
.p-shell .p-panel a:not(.btn){color:#1652b7;text-decoration:underline;text-underline-offset:3px}
.p-shell .p-panel details{border:1px solid #d7e3f0;border-radius:12px;padding:12px;margin:9px 0}
.p-shell .p-panel summary{color:#204f83;font-weight:650;cursor:pointer}
.p-shell .p-panel details[open]{background:#f8fbff}
.p-shell .p-panel .p-form>label{color:#14304f}
.p-shell .p-panel .p-form>label input,.p-shell .p-panel .p-form>label select{margin-top:8px}
:where(.guided-step,.wizard-step)[aria-current="step"]{box-shadow:0 0 0 2px #2563eb33}
#page-content .alert{line-height:1.55;overflow-wrap:anywhere}
#page-content .metric-label{line-height:1.5}

/* Respect HTML hidden state even on styled action buttons. */
[hidden] { display: none !important; }
.guided-panel { scroll-margin-top: 110px; }
.wizard-status-error { color: #a42d1c; font-weight: 700; }
.response-wizard .guided-footer { gap: 14px; }
@media (max-width: 760px) { .response-wizard .guided-footer { flex-wrap: wrap; bottom: 0; } .response-wizard .guided-footer .actions { width: 100%; justify-content: flex-end; flex-wrap: wrap; } .response-wizard .guided-footer .btn { min-height: 44px; } }

/* Roster forms: don't crush labels or status chips on tablet/mobile. */
.rater-edit-form { display:grid; gap:10px; min-width:min(100%,280px); max-width:520px; }
.rater-edit-form :is(input,select,textarea) { box-sizing:border-box; max-width:100%; min-width:0; width:100%; color:#173451; background:#fff; border:1px solid #a9bfd8; border-radius:10px; padding:10px 12px; line-height:1.5; }
.rater-edit-form label { font-weight:700; color:#173451; }
.rater-edit-form .checkline input { width:auto; }
.rater-edit-form .exception-control { padding:12px; border:1px solid #cad9e9; border-radius:10px; background:#f6f9fd; }
.rater-edit-form .exception-control summary { color:#135ab0; }
.server-response-wizard .response-step-summary {display:flex;flex-wrap:wrap;gap:8px;}
.server-response-wizard .response-step-label {padding:9px 12px;border-radius:12px;border:1px solid #d1deed;background:#fff;color:#36526f;display:flex;align-items:center;gap:8px;font-size:13px;min-width:0;}
.server-response-wizard .response-step-label b {background:#e7eef8;color:#1b4065;border-radius:999px;width:24px;height:24px;display:grid;place-items:center;}
.server-response-wizard .response-step-label.active {background:#e9f3ff;color:#123e73;border-color:#3179d5;font-weight:800;}
.server-response-wizard .response-step-label.done b {background:#d9efe5;color:#086038;}
.server-response-wizard .response-footer-info {display:flex;gap:12px;align-items:center;flex-wrap:wrap;}
.server-response-wizard .rating-choice-card:has(input:checked) {border-color:#1765cd;background:#edf5ff;box-shadow:0 0 0 2px #1765cd33;}
.server-response-wizard .question-card h3 {font-size:clamp(16px,2.2vw,21px);line-height:1.6;overflow-wrap:anywhere;}
@media(max-width:720px){.server-response-wizard .response-step-summary{flex-wrap:nowrap;overflow:auto;scroll-snap-type:x mandatory}.server-response-wizard .response-step-label{flex:0 0 auto;scroll-snap-align:start}.server-response-wizard .guided-footer{position:sticky;bottom:0;flex-direction:column;align-items:stretch}.server-response-wizard .guided-footer .actions{display:flex;justify-content:stretch}.server-response-wizard .guided-footer .actions button{flex:1}}
