/* Clear next actions while preserving the existing paper, moss, orange, and artwork. */
#results-panel, .results-panel, #star-profile, #receive, #apply {
  scroll-margin-top: 28px;
}
.flow-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  max-width: 100%;
  padding: 11px 20px;
  border: 1px solid var(--orange);
  border-radius: 28px;
  background: var(--orange);
  color: #202c1b;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.7;
  text-align: center;
  text-decoration: none;
}
.flow-primary:hover { background: #ff8b47; border-color: #ff8b47; }
.primary, .hero-link, .line-button, .flow-primary { min-width: 0; }
.primary:focus-visible, .flow-primary:focus-visible,
.line-request .line-button:focus-visible { outline-color: #283423; }

/* Supporting actions remain easy to find without competing with the next step. */
.result-actions {
  gap: 8px 18px;
  padding-top: 16px;
  border-top: 1px solid #c3cab4;
}
.result-actions .secondary,
.profile-footer .secondary {
  background: transparent;
  color: var(--moss);
  border-color: #a8b09a;
  font-weight: 400;
}
.result-actions .secondary:hover,
.profile-footer .secondary:hover { background: #e5e6d7; }
.result-actions .text-button,
.result-actions .result-social-link { color: #54604a; }
.profile-footer { gap: 12px 20px; }
.profile-footer > a { min-height: 44px; display: inline-flex; align-items: center; }
.profile-footer > a.flow-primary { font-size: 13px; text-decoration: none; }
#profile-back-results { text-underline-offset: 5px; }
.social-note {
  background: transparent;
  color: var(--cream);
  border-color: #a8b09a;
}
.social-note:hover { background: #56634c; }
.social-note .social-cta { border-color: rgba(244,238,223,.32); }

/* The overview is an optional reading aid, with a full-width disclosure target. */
.explain { padding-top: 36px; padding-bottom: 32px; }
.role-details {
  border-top: 1px solid rgba(244,238,223,.32);
  border-bottom: 1px solid rgba(244,238,223,.32);
}
.role-details > summary {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto 20px;
  gap: 16px;
  min-height: 76px;
  padding: 18px 0;
  color: var(--cream);
}
.role-details-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: .03em;
  line-height: 1.6;
}
.role-details-hint { font-size: 11px; color: var(--soft-cream); }
.role-details > summary::after {
  color: var(--cream);
  font-size: 20px;
  margin-left: 0;
  text-align: center;
}
.role-details[open] > summary { margin-bottom: 4px; }
.role-details > .section-lead { margin-top: 0; }
.role-details .role-grid { border-bottom: 0; }

/* Copy first. A successful copy makes the next step visible without faking a link. */
.line-request .line-button {
  max-width: 100%;
  justify-content: center;
  gap: 10px;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}
#line-copy[data-complete="true"] {
  color: var(--moss);
  background: transparent;
  border-color: #a8b09a;
  font-weight: 400;
}
#line-copy[data-complete="true"]:hover { background: #e5e6d7; }
.line-next-step {
  margin-top: 18px;
  padding-top: 20px;
  border-top: 1px solid #c3cab4;
}
.line-next-step.is-ready { border-top-color: #7a876a; }
.line-next-step.is-ready .line-button:not(:disabled):not([aria-disabled="true"]) {
  background: var(--orange);
  border-color: var(--orange);
  color: #202c1b;
}
#line-next-placeholder:disabled,
#line-next-placeholder:disabled:hover {
  opacity: 1;
  background: #e5e7da;
  border-color: #c3cab4;
  color: #606a56;
  font-weight: 400;
  cursor: not-allowed;
}
.line-pending-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.9;
  color: #59644f;
  overflow-wrap: anywhere;
}
.line-request[data-copy-complete="true"] .line-copy-status {
  padding: 10px 13px;
  border-left: 3px solid var(--moss);
  border-radius: 0 6px 6px 0;
  background: #e5e8d8;
  color: #35432c;
}

@media (max-width:600px) {
  .explain { padding-top: 26px; padding-bottom: 26px; }
  .role-details > summary {
    grid-template-columns: auto minmax(0,1fr) 20px;
    gap: 3px 11px;
    padding: 17px 0;
  }
  .role-details-title { font-size: 21px; letter-spacing: 0; }
  .role-details-hint { grid-column: 2; font-size: 12px; }
  .role-details > summary::after { grid-column: 3; grid-row: 1 / span 2; }
  .role-details > summary .section-no { align-self: start; }
  .role-details > .section-lead { margin-top: 8px; }
  .result-actions { flex-direction: row; gap: 4px 16px; }
  .result-actions .secondary { flex-basis: 100%; min-height: 46px; }
  .result-actions .text-button,
  .result-actions .result-social-link { font-size: 12px; min-height: 44px; }
  .profile-footer > a.flow-primary { width: 100%; min-height: 50px; font-size: 14px; }
  .profile-footer > a, .profile-footer .secondary { max-width: 100%; }
  .line-request .line-button { padding: 13px 14px; font-size: 14px; }
}
@media (max-width:360px) {
  .role-details-title { font-size: 19px; }
  .role-details > summary { column-gap: 9px; }
  .line-invite-button > .line-invite-tail { white-space: normal; }
  .result-actions { column-gap: 12px; }
}
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Compact home header after removing the two repeated display labels. */
.header.header-compact {
  height: auto;
  min-height: 0;
  grid-template-columns: minmax(0,1fr);
  grid-template-rows: auto auto;
  gap: 14px;
  padding: 20px 0 14px;
}
.header-compact .brand { gap: 0; }
.header-compact nav { grid-column: 1; grid-row: 2; }
@media (max-width:600px) {
  .header.header-compact { gap: 8px; padding: 16px 0 8px; }
}
