.pw-reference {
  margin: 18px 0 22px;
  padding: 18px;
  border: 1px solid #c9d8e3;
  border-left: 4px solid #155f8f;
  border-radius: 5px;
  background: #f6f9fb;
}

.pw-reference-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
  gap: 18px;
  align-items: end;
}

.pw-reference h3 { margin: 0; font-size: 19px; }
.pw-reference-head p { margin-bottom: 0; color: #5d6a78; }
.pw-reference ul { margin: 14px 0; padding-left: 22px; line-height: 1.75; }
.pw-reference-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pw-reference-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 5px;
  background: #155f8f;
  color: #fff;
  text-decoration: none;
}
.pw-reference-note { margin-top: 14px !important; color: #687681; font-size: 14px; }

.pw-step-intro { color: #526b7c; }
.pw-chapters button { display: inline-flex; gap: 8px; align-items: center; }
.pw-chapters button span {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #e8eef3;
  color: #345268;
  font-size: 13px;
}
.pw-chapters button.is-done span { background: #155f8f; color: #fff; }
.pw-chapters button.is-draft span { background: #dcecf6; color: #155f8f; font-weight: 700; }

.pw-flow-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #d7e0e7;
  border-radius: 7px;
  background: #f7f9fb;
}
.pw-flow-card.is-ready { border-color: #b8cfdf; background: #edf5fb; }
.pw-flow-card strong { font-size: 18px; }
.pw-flow-card p { margin: 3px 0 0; color: #5d6a78; }
.pw-flow-card .pw-actions { margin: 0; flex: 0 0 auto; }

.pw-issue-summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 0;
  padding: 14px 16px;
  border-radius: 5px;
  background: #fff1d9;
  color: #724d14;
}

.pw-output-steps { display: grid; gap: 10px; margin: 22px 0; }
.pw-output-steps > button {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #dce3e9;
  border-radius: 6px;
  width: 100%;
  color: #71808c;
  background: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.pw-output-steps > button:hover,
.pw-output-steps > button:focus-visible { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(15, 53, 82, .12); outline: 3px solid rgba(21, 95, 143, .18); }
.pw-output-steps > button div { flex: 1; }
.pw-output-steps > button small { display: block; margin-top: 7px; color: #166ba2; font-weight: 700; }
.pw-output-steps > button > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #edf1f4;
  font-weight: 700;
}
.pw-output-steps p { margin: 2px 0 0; }
.pw-output-steps .done { border-color: #b8cfdf; color: #155f8f; }
.pw-output-steps .done > span { background: #155f8f; color: #fff; }
.pw-output-steps .current { border: 2px solid #155f8f; color: #163c58; background: #f0f7fb; }
.pw-output-steps .current > span { background: #155f8f; color: #fff; }
.pw-final-action { padding: 20px; border-radius: 7px; background: #0f3552; color: #fff; text-align: center; }
.pw-final-action button { min-width: min(100%, 320px); }
.pw-final-action p { margin-bottom: 0; color: #d6e4ee; font-size: 14px; }
.pw-secondary-actions { justify-content: center; }

@media (max-width: 950px) {
  .pw-reference-head { grid-template-columns: 1fr; }
  .pw-flow-card, .pw-issue-summary { align-items: stretch; flex-direction: column; }
  .pw-flow-card .pw-actions { width: 100%; }
  .pw-flow-card .pw-actions button { flex: 1 1 180px; }
}
