/*
 * Homepage accordions: native details/summary controls with the TaskTweaky
 * palette. The content remains server-rendered and works without JavaScript.
 */

.tt-home-accordion > summary,
.fp-faq-item > .fp-faq-question {
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}

.tt-home-accordion > summary::-webkit-details-marker,
.fp-faq-item > .fp-faq-question::-webkit-details-marker {
  display: none;
}

.tt-home-accordion > summary:focus-visible,
.fp-faq-item > .fp-faq-question:focus-visible {
  outline: 3px solid #2ec4b6;
  outline-offset: 3px;
  border-radius: 5px;
}

.tt-accordion-panel,
.fp-faq-answer {
  min-width: 0;
  overflow-wrap: anywhere;
}

.tt-accordion-indicator {
  align-items: center;
  color: currentColor;
  display: inline-flex;
  flex: 0 0 24px;
  font-size: 1.35rem;
  font-weight: 400;
  height: 24px;
  justify-content: center;
  line-height: 1;
  margin-left: auto;
}

.fp-svc-accordion {
  margin: 0 0 16px;
}

.fp-svc-accordion > .tt-accordion-trigger {
  align-items: center;
  border-radius: 6px;
  color: #3b5bdb;
  display: flex;
  font-size: .85rem;
  font-weight: 650;
  gap: 10px;
  min-height: 44px;
  padding: 6px 2px;
}

.fp-svc-accordion .tt-accordion-indicator::before {
  content: '+';
}

.fp-svc-accordion[open] > .tt-accordion-trigger .tt-accordion-indicator::before {
  content: '−';
}

.fp-svc-accordion .fp-svc-desc {
  color: #4b5563;
  font-size: .875rem;
  line-height: 1.6;
  margin: 0;
}

.fp-svc-accordion > .tt-accordion-panel {
  padding: 0 2px 12px;
}

.fp-step-accordion {
  display: block;
  padding: 0 0 14px;
  position: relative;
}

.fp-step-accordion:not(:last-child)::after {
  background: linear-gradient(to bottom, rgba(46, 196, 182, .4), rgba(46, 196, 182, .1));
  content: '';
  left: 21px;
  position: absolute;
  top: 44px;
  bottom: 0;
  width: 2px;
  z-index: 0;
}

.fp-step-accordion > .fp-step-summary {
  align-items: center;
  color: #fff;
  display: flex;
  gap: 16px;
  min-height: 52px;
  position: relative;
  z-index: 1;
}

.fp-step-summary > .fp-step-bubble {
  align-items: center;
  background: rgba(46, 196, 182, .15);
  border: 2px solid rgba(46, 196, 182, .35);
  border-radius: 50%;
  display: flex;
  flex: 0 0 44px;
  font-size: 1.1rem;
  height: 44px;
  justify-content: center;
  margin: 0;
  position: relative;
  width: 44px;
  z-index: 1;
}

.fp-step-summary > .fp-step-body {
  flex: 1;
  min-width: 0;
  padding: 0;
}

.fp-step-summary .fp-step-num {
  color: #2ec4b6;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  margin-bottom: 2px;
}

.fp-step-summary .fp-step-title {
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
  margin: 0;
}

.fp-step-summary > .tt-accordion-indicator::before {
  content: '+';
}

.fp-step-accordion[open] > .fp-step-summary > .tt-accordion-indicator::before {
  content: '−';
}

.fp-step-accordion > .fp-step-connector {
  display: none;
}

.fp-step-panel {
  margin: 0 30px 0 60px;
  padding: 8px 0 4px;
}

.fp-step-panel .fp-step-desc {
  color: rgba(255, 255, 255, .68);
  font-size: .82rem;
  line-height: 1.5;
  display: block;
}

.fp-faq-item {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow .2s ease;
}

.fp-faq-item[open],
.fp-faq-item:hover {
  box-shadow: 0 4px 20px rgba(91, 60, 245, .08);
}

.fp-faq-item > .fp-faq-question {
  align-items: center;
  color: #1a1a2e;
  display: flex;
  font-size: 1rem;
  font-weight: 600;
  gap: 16px;
  justify-content: space-between;
  line-height: 1.4;
  min-height: 56px;
  padding: 16px 24px;
  user-select: none;
}

.fp-faq-question::after {
  color: #5b3cf5;
  content: '+';
  flex: 0 0 24px;
  font-size: 1.4rem;
  font-weight: 400;
  text-align: center;
}

.fp-faq-item[open] > .fp-faq-question::after {
  content: '−';
}

.fp-faq-answer {
  color: #4b5563;
  font-size: .95rem;
  line-height: 1.7;
  padding: 0 24px 20px;
}

.fp-faq-answer p {
  margin: 0;
}

@keyframes tt-accordion-reveal {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}

.tt-home-accordion[open] > .tt-accordion-panel,
.fp-faq-item[open] > .fp-faq-answer {
  animation: tt-accordion-reveal .18s ease-out both;
}

@media (max-width: 640px) {
  .fp-faq-item > .fp-faq-question {
    font-size: .95rem;
    padding: 16px 18px;
  }

  .fp-faq-answer {
    padding: 0 18px 16px;
  }

  .fp-step-panel {
    margin-right: 12px;
    margin-left: 60px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tt-home-accordion[open] > .tt-accordion-panel,
  .fp-faq-item[open] > .fp-faq-answer {
    animation: none;
  }

  .fp-faq-item {
    transition: none;
  }
}
