/* Right rail — mirrors left sidebar shell; list items stay unframed */
.v2-rail--right {
  position: fixed;
  z-index: 50;
  visibility: visible;
  opacity: 1;
  top: var(--v2-rail-inset);
  right: max(var(--v2-rail-inset), env(safe-area-inset-right, 0px));
  bottom: var(--v2-rail-inset);
  width: var(--v2-rail-w);
  max-width: calc(100vw - 2 * var(--v2-rail-inset) - 2 * var(--v2-rail-gap));
  margin: 0;
  padding: 0;
  border: 1px solid var(--v2-border);
  border-radius: var(--v2-shell-radius-right);
  background: var(--v2-rail-bg);
  box-shadow: var(--v2-frame-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
  box-sizing: border-box;
}

.v2-rail--right.hidden {
  display: none !important;
}

.v2-resources-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--v2-rail-body-top-gap) 1.15rem 0.75rem;
  scrollbar-width: thin;
  scrollbar-color: var(--v2-teal-dim) transparent;
}

.v2-resources-region {
  margin: 0.35rem 0 0.65rem;
}

.v2-resources-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.v2-resource-item {
  padding: 0.62rem 0;
  border-bottom: 1px solid rgba(46, 232, 214, 0.1);
  font-size: 0.74rem;
  line-height: 1.45;
  color: var(--v2-text-muted);
}

.v2-resource-item:last-child {
  border-bottom: none;
}

.v2-resource-name {
  display: block;
  margin-bottom: 0.2rem;
  font-family: var(--v2-font-hero);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--v2-text);
}

.v2-resource-desc,
.v2-resource-address,
.v2-resource-contact {
  margin: 0 0 0.35rem;
}

.v2-resource-notes {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--v2-text-muted);
}

.v2-resource-notes textarea {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  box-sizing: border-box;
  resize: vertical;
  min-height: 4.2rem;
  border: 1px solid rgba(46, 232, 214, 0.28);
  border-radius: 0.4rem;
  background: rgba(4, 12, 14, 0.45);
  color: var(--v2-text);
  font: inherit;
  letter-spacing: 0;
  text-transform: none;
  padding: 0.4rem 0.5rem;
}

.v2-resource-kind {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--v2-teal);
}

.v2-resource-next,
.v2-resource-offers {
  margin: 0 0 0.35rem;
}

.v2-resource-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.55rem;
}

.v2-resource-action {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid rgba(46, 232, 214, 0.35);
  border-radius: 999px;
  background: transparent;
  color: var(--v2-text);
  font: inherit;
  font-size: 0.72rem;
  padding: 0.28rem 0.65rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.v2-resource-action svg {
  width: 0.7rem;
  height: 0.7rem;
  transition: transform 0.2s ease;
}

.v2-resource-action.is-open svg {
  transform: rotate(90deg);
}

@media (hover: hover) {
  .v2-resource-action:hover {
    background: rgba(46, 232, 214, 0.12);
    border-color: var(--v2-teal);
    box-shadow: 0 0 12px rgba(46, 232, 214, 0.18);
  }
}

.v2-resource-action.is-open {
  background: rgba(245, 213, 71, 0.16);
  border-color: var(--v2-yellow);
  color: var(--v2-yellow);
  font-weight: 600;
  box-shadow: 0 0 14px rgba(245, 213, 71, 0.22);
}

.v2-resource-panel {
  margin-top: 0.45rem;
}

.v2-resource-notes-box,
.v2-resource-draft {
  width: 100%;
  box-sizing: border-box;
  max-height: 11rem;
  overflow: auto;
  white-space: pre-wrap;
  margin: 0;
  padding: 0.55rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(46, 232, 214, 0.22);
  background: rgba(4, 12, 14, 0.72);
  color: var(--v2-text);
  font: inherit;
  font-size: 0.78rem;
}

.v2-wave {
  display: flex;
  align-items: flex-end;
  gap: 0.28rem;
  min-height: 2.4rem;
  margin: 0;
  color: var(--v2-teal);
  font-size: 0.78rem;
}

.v2-wave span {
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 50%;
  background: currentColor;
  animation: v2-wave 0.9s ease-in-out infinite;
}

.v2-wave span:nth-child(2) { animation-delay: 0.15s; }
.v2-wave span:nth-child(3) { animation-delay: 0.3s; }

@keyframes v2-wave {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-5px); }
}

.v2-resource-copy {
  margin-top: 0.4rem;
  margin-right: 0.4rem;
  border: 1px solid rgba(46, 232, 214, 0.4);
  border-radius: 999px;
  background: transparent;
  color: var(--v2-teal);
  font: inherit;
  font-size: 0.72rem;
  padding: 0.25rem 0.7rem;
  cursor: pointer;
}

.v2-resource-draft {
  max-height: 9rem;
  overflow: auto;
  white-space: pre-wrap;
  margin: 0.45rem 0 0;
  padding: 0.5rem;
  border-radius: 0.4rem;
  background: rgba(4, 12, 14, 0.65);
  color: var(--v2-text);
}

.v2-resource-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  font-size: 0.72rem;
  line-height: 1.35;
}

.v2-resource-meta a {
  color: var(--v2-teal);
  font-family: var(--v2-font-hero);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}

.v2-resource-meta a:hover {
  text-decoration: underline;
}

.v2-resource-phone {
  color: var(--v2-text-muted);
}

@media (max-width: 900px) {
  .v2-rail--right {
    display: none !important;
  }
}

/* One path-level list where the desktop rail is hidden. Cards do not repeat it. */
.v2-resources-master {
  margin: 0.35rem 0 0.75rem;
}

@media (min-width: 901px) {
  .v2-resources-master {
    display: none;
  }
}

/* In-task resources accordion — every viewport. The desktop rail stays separate. */
.v2-resources-acc {
  margin-top: 0.55rem;
}

.v2-resources-acc__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 44px;
  padding: 0.35rem 0.7rem;
  appearance: none;
  cursor: pointer;
  font-family: var(--v2-font-hero);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--v2-teal);
  background: color-mix(in srgb, var(--v2-teal) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--v2-neon-teal) 55%, transparent);
  border-radius: var(--v2-btn-radius);
}

.v2-resources-acc__trigger:hover {
  color: var(--v2-yellow);
  border-color: var(--v2-neon-teal);
}

.v2-resources-acc__chevron {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  transition: transform 0.2s ease;
}

.v2-resources-acc__trigger[aria-expanded="true"] .v2-resources-acc__chevron {
  transform: rotate(180deg);
}

.v2-resources-acc__panel {
  margin-top: 0.35rem;
}

.v2-resources-acc__panel.is-collapsed {
  height: 0;
  margin-top: 0;
  overflow: hidden;
  visibility: hidden;
}

.v2-resources-acc__scroll {
  max-height: 14rem;
  padding: 0.15rem 0.15rem 0.35rem;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.v2-resources-acc .v2-resource-name,
.v2-resources-acc .v2-resource-desc {
  overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {
  .v2-resources-acc__chevron {
    transition: none;
  }
}
