/* One request, decision first (assets/panel-request.js, design study D4). Tokens only. */
.drawer:has(> #detail > .req) { width: min(1120px, 100vw); }
#detail > .req {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; grid-template-areas: "head rail" "main rail";
  gap: 16px 24px; align-items: start; padding: 6px 28px 28px;
}
.req-head { grid-area: head; padding-right: 44px; min-width: 0; }
.req-meta { gap: 8px; flex-wrap: wrap; font-size: 13px; }
.req .req-title { margin: 10px 0 6px; font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; overflow-wrap: anywhere; }
.req-sub { font-size: 13px; }
.req-main { grid-area: main; min-width: 0; }
.req > .rail { grid-area: rail; position: sticky; top: 8px; }
.req h4 { margin: 20px 0 9px; font-size: 14px; }
.req-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); font-weight: 700; }

/* the decision: the one "hot" card, with Approve as the drawer's one gradient button */
.req-decision { position: relative; border-radius: var(--radius); padding: 18px 20px; background: var(--glass-2); box-shadow: var(--lift); isolation: isolate; }
.req-decision::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; background: var(--edge-hot);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.req-cause { margin: 4px 0 14px; font-size: 15.5px; font-weight: 600; }
.req-fix { gap: 12px; align-items: flex-start; }
.req-key { font-size: 12px; margin-top: 3px; overflow-wrap: anywhere; }
.req-why { margin-top: 8px; font-size: 13.5px; }
.req-wrong { margin-top: 8px; font-size: 13px; }
.req-actions { margin-top: 16px; gap: 10px; flex-wrap: wrap; align-items: center; }
button.primary.req-approve { min-height: 48px; padding: 0 26px; font-size: 15px; }
.req-who { font-size: 13.5px; }
.req-nodecision { justify-content: space-between; gap: 10px; padding: 12px 16px; border-radius: var(--radius-md); background: var(--glass); border: 1px solid var(--line); }

/* the ⋯ menu */
.req-more { position: relative; }
.req-more > summary { list-style: none; cursor: pointer; display: inline-grid; place-items: center; min-width: 40px; min-height: 40px; padding: 0 12px;
  border-radius: var(--pill); border: 1px solid var(--line); background: var(--glass-2); font-weight: 800; font-size: 18px; line-height: 1; }
.req-more > summary::-webkit-details-marker { display: none; }
.req-more .req-menu { top: calc(100% + 6px); bottom: auto; right: auto; left: 0; }
.req-menu button.danger-text { color: var(--critical); }

/* "How Dex checked" */
.req-how { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 10px 14px; }
.req-how > summary { cursor: pointer; font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.req-how-b { margin-top: 10px; }
.req-diag + .req-diag { margin-top: 12px; }
.req-done { gap: 8px; flex-wrap: wrap; margin-top: 6px; font-size: 13.5px; }
.req-sheet { margin-top: 12px; }
.req #hdPanel .hd-box { border-top: 0; margin-top: 4px; padding-top: 0; }
.req .hd-rail { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; }
.req .hd-rail > div { margin-top: 0 !important; }

/* While a fix waits for this person, Approve is the one gradient button: the reply box's and rail's own choices
   (Take it, Send) show as selected, not as the gradient. */
#detail[data-decision] .req :is(#hdPanel, #hdRail, .rail) button.primary { background: rgba(0,212,255,.12); border-color: rgba(0,212,255,.34); color: #fff; box-shadow: none; text-shadow: none; }

/* under 1200 px: the rail folds into a fact grid under the heading; the reply box follows the conversation */
@media (max-width: 1199.98px) {
  #detail > .req { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "rail" "main"; padding: 6px 20px 24px; }
  .req > .rail { position: static; }
  .req > .rail .rail-kv { grid-template-columns: repeat(2, minmax(0, 92px) minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .req > .rail .rail-kv { grid-template-columns: minmax(0, 92px) minmax(0, 1fr); }
  .req .req-title { font-size: 21px; }
}
