.rp-root {
  --rp-stroke: #d8ddd3;
  padding-block: clamp(30px, 4vw, 58px) clamp(42px, 6vw, 84px);
}
.rp-root :is(h1,h2,h3,p,ul,ol,fieldset) { margin: 0; }
.rp-head, .rp-case-lead, .rp-step-head, .rp-actions, .rp-chooser {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.rp-head { flex-wrap: wrap; margin-bottom: 28px; }
.rp-head h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 680;
  line-height: 1.15;
  letter-spacing: -.045em;
}
.rp-root h2 { font-size: 1.28rem; line-height: 1.45; margin-bottom: 12px; }
.rp-switch {
  display: inline-flex;
  align-items: stretch;
  gap: 3px;
  flex-wrap: wrap;
  padding: 3px;
  background: #ecf0e7;
  border-radius: 7px;
  width: fit-content;
}
.rp-switch-btn {
  min-height: 37px;
  padding: 6px 16px;
  font-size: .9rem;
  font-weight: 550;
  border-radius: 5px;
}
.rp-switch-btn[aria-pressed=true] { background: var(--forest,#263e33); color: white; }
.rp-work { display:grid; grid-template-columns:minmax(200px,.55fr) minmax(0,1.65fr); gap: clamp(18px,2.4vw,34px); align-items:start; }
.rp-aside, .rp-panel {
  border: 1px solid var(--rp-stroke);
  border-radius: 10px;
  padding: clamp(18px,2.3vw,32px);
  background: #fdfdf9;
  min-width: 0;
}
.rp-aside { background:#eef1e9; }
.rp-case-list { display: grid; gap: 5px; margin: 12px 0 18px; }
.rp-case-option {
  width:100%;
  padding:10px 12px;
  text-align:left;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size:.95rem;
  font-weight:550;
  overflow-wrap:anywhere;
}
.rp-case-option:hover, .rp-case-option:focus-visible { background: #e4eade; }
.rp-case-option[aria-current=true] { background: #fff; border-color: #adbc9e; color: #274431; }
.rp-case-option :is(strong,small){ display:block; }
.rp-case-option small { font-weight:450; font-size:.8rem; color:var(--muted,#58645a); }
.rp-submit,.rp-secondary,.rp-small {
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 9px 16px;
  min-height: 42px;
  font-size: .93rem;
  font-weight: 590;
  line-height: 1.3;
}
.rp-submit { background: var(--forest,#263e33); color: #fff; }
.rp-secondary,.rp-small { border-color: #bfc9b9; background: #fafcf6; }
.rp-small { padding: 4px 10px; min-height: 34px; font-size: .85rem; }
.rp-danger { color: #8b3828; }
.rp-link { text-decoration: underline; text-underline-offset: 4px; color:var(--forest,#263e33); white-space:nowrap; font-size:.92rem; }
.rp-case-lead { padding-bottom:16px; margin-bottom:14px; border-bottom: 1px solid var(--rp-stroke); }
.rp-case-lead strong { font-size: 1.14rem; overflow-wrap:anywhere; }
.rp-case-lead, .rp-case-links { flex-wrap:wrap; }
.rp-case-links { display:flex; gap:8px 18px; }
.rp-display-group { margin-top:24px; padding-top:18px; border-top:1px solid var(--rp-stroke); }
.rp-display-group .rp-case-list { margin-bottom:0; }
.rp-display-cover { display:block; width:100%; max-height:300px; object-fit:cover; border-radius:7px; margin:18px 0; }
.rp-field-note { color:var(--muted,#58645a); font-size:.85rem; line-height:1.5; font-weight:400; }
.rp-panel>.rp-switch { margin-bottom: 22px; }
.rp-root .rp-hint,.rp-root .rp-empty,.rp-root .rp-identity { font-size:.91rem; line-height:1.6; color:var(--muted,#58645a); margin-bottom: 12px; }
.rp-root .rp-identity { font-weight: 580; border-bottom: 1px solid var(--rp-stroke); padding-bottom: 14px; margin-bottom: 18px; }
.rp-form { display:grid; gap:16px; margin-top:10px; }
.rp-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.rp-wide { grid-column: 1/-1; }
.rp-field { min-width:0; display:flex; flex-direction:column; gap:5px; font-size:.88rem; font-weight:570; }
.rp-root :is(input:not([type=checkbox]),select,textarea) {
  box-sizing:border-box; width:100%; min-width:0; border:1px solid #bfc9b9;
  background:#fff; color:var(--ink,#202e27); padding:10px 12px; border-radius:5px;
  min-height:42px; font:400 1rem/1.45 var(--font,sans-serif);
}
.rp-root select { appearance:none; padding-right:32px; background-image:linear-gradient(45deg,transparent 50%,#61715f 50%),linear-gradient(135deg,#61715f 50%,transparent 50%);background-position:calc(100% - 17px) center,calc(100% - 12px) center;background-repeat:no-repeat;background-size:5px 5px; }
.rp-root textarea { display:block; resize:vertical; }
.rp-root :is(input,select,textarea):focus-visible { outline:2px solid #52724f; outline-offset:2px; }
.rp-root :is(input[readonly],select:disabled) { background-color:#f2f4ee; color:var(--muted); }
.rp-root input[type=file] { padding: 6px; }
.rp-root input::file-selector-button { padding:5px 9px; margin-right:9px; border:0; border-radius:4px; color:var(--ink); background:#e9eee3; }
.rp-root .rp-actions { margin-top:5px; justify-content:flex-start; flex-wrap:wrap; }
.rp-root .rp-message { color:#38583a; font-size:.92rem; }
.rp-root>.rp-message { margin-bottom:16px; border-left:3px solid #97ae7e; padding:8px 12px; background:#eef4e4; }
.rp-root .rp-error { color:#9e3829; }
.rp-root .rp-form>.rp-hint { margin: -8px 0 0; }
.rp-fieldset { border:1px solid var(--rp-stroke); padding:9px 14px; border-radius:6px; }
.rp-fieldset legend { padding:0 5px; font-size:.92rem; font-weight:600; }
.rp-check { display:flex; align-items:center; gap:9px; min-height:34px; font-size:.95rem; }
.rp-check input { width:16px; height:16px; accent-color:#35553c; flex-shrink:0; }
.rp-personal { max-width:760px; }
.rp-chooser { align-items:flex-end; flex-wrap:wrap; justify-content:flex-start; }
.rp-chooser .rp-field { flex:1 1 220px; }
.rp-steps { list-style:none; padding:0; display:grid; gap:12px; }
.rp-step { background:#f6f8f1; border:1px solid var(--rp-stroke); padding:14px; border-radius:7px; }
.rp-step-head { margin-bottom:10px; flex-wrap:wrap; }
.rp-step-actions { display:flex; flex-wrap:wrap; gap:5px; }
.rp-inventory { margin-top:24px; padding-top:14px; border-top:1px solid var(--rp-stroke); }
.rp-inventory summary { cursor:pointer; font-weight:550; }
.rp-inventory-list { padding:8px 0 0; list-style:none; }
.rp-inventory-list li { display:flex; justify-content:space-between; gap:10px; padding:6px 0; border-bottom:1px solid #e9ede4; }
.rp-inventory-list small { color:var(--muted); }
@media(max-width:760px){
  .rp-work{ grid-template-columns:1fr; }
  .rp-head{margin-bottom:17px;}
  .rp-case-list{display:flex;overflow-x:auto;gap:6px;padding-bottom:4px;}
  .rp-case-option{width:auto;flex:0 0 auto;}
  .rp-aside{padding:14px;}
}
@media(max-width:500px){
  .rp-grid{grid-template-columns:minmax(0,1fr);}
  .rp-head h1{font-size:2rem;}
  .rp-switch-btn{padding:6px 10px;}
  .rp-step{padding:10px;}
  .rp-chooser{align-items:stretch;}
}
