/* Legal page layout */
.legal-page-wrap {
  max-width: 860px;
  padding: 72px 0 96px;
}

.page-heading {
  margin-bottom: 40px;
}

/* Hero with icon (help.html, delivery.html) */
.legal-hero {
  display: flex;
  align-items: flex-end;
  gap: 1.5rem;
  margin-bottom: 40px;
}

.legal-hero-icon {
  flex-shrink: 0;
  width: 68px;
  height: 68px;
  border-radius: var(--r-md);
  background: var(--tint-cyan);
  border: 1px solid var(--tint-cyan-line);
  display: grid;
  place-items: center;
  color: var(--cyan);
}

.legal-hero-icon svg {
  width: 32px;
  height: 32px;
}

.legal-hero-text {
  flex: 1;
}

.legal-hero-text .eyebrow {
  margin-bottom: 10px;
}

.page-meta {
  color: var(--text-mid);
  font-size: 0.94rem;
  margin-top: 10px;
}

.page-meta a {
  color: var(--cyan);
  font-weight: 600;
}

/* Legal content card */
.legal-content {
  border: 1px solid var(--border-hi);
  border-radius: var(--r-lg);
  padding: 44px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  counter-reset: sec;
}

.legal-content > p:first-child {
  font-size: 1.02rem;
  color: var(--text-mid);
  line-height: 1.75;
  margin-bottom: 16px;
}

/* Numbered section headings via CSS counter */
.legal-content h2 {
  margin: 0;
  padding-top: 32px;
  margin-top: 32px;
  border-top: 1px solid var(--border);
  font-size: 1.2rem;
  letter-spacing: -0.025em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
  counter-increment: sec;
}

.legal-content h2::before {
  content: counter(sec);
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  background: var(--tint-cyan);
  border: 1px solid var(--tint-cyan-line);
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.legal-content h2:first-of-type {
  margin-top: 36px;
  padding-top: 0;
  border-top: none;
}

/* Body text */
.legal-content p {
  color: var(--text-mid);
  font-size: 0.94rem;
  line-height: 1.75;
  margin-bottom: 16px;
}

/* Lists */
.legal-content ul {
  margin: 0 0 18px;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal-content li {
  font-size: 0.93rem;
  color: var(--text-mid);
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.55;
}

.legal-content li::before {
  content: "";
  display: block;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--tint-cyan);
  border: 1px solid var(--tint-cyan-line);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Ccircle cx='6' cy='6' r='2.5' fill='%2338BDF8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.legal-content li > span > strong:first-child {
  display: block;
  color: var(--text);
  margin-bottom: 3px;
}

/* Links */
.legal-content a {
  color: var(--cyan);
  font-weight: 600;
}

.legal-content a:hover {
  opacity: 0.85;
}

/* Callout box -- used only by refund.html */
.legal-content .callout {
  margin: 16px 0;
  padding: 16px 18px;
  border-radius: var(--r-md);
  background: var(--tint-cyan);
  border: 1px solid var(--tint-cyan-line);
  color: var(--text);
  font-size: 0.93rem;
  line-height: 1.65;
}

.legal-content .callout strong {
  color: var(--cyan);
}

/* TOC -- used only by refund.html */
.toc {
  margin: 24px 0 8px;
  padding: 20px 22px;
  border: 1px solid var(--border-hi);
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.toc-title {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-mid);
  font-weight: 800;
  margin-bottom: 12px;
}

.toc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px 24px;
}

.toc-grid a {
  font-size: 0.86rem;
  color: var(--text-mid);
  font-weight: 600;
  padding: 3px 0;
}

.toc-grid a:hover {
  color: var(--cyan);
}

/* Light-mode overrides */
[data-theme="light"] .legal-content {
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

[data-theme="light"] .toc {
  background: var(--surface-2);
}

/* Responsive */
@media (max-width: 680px) {
  .legal-page-wrap {
    padding: 52px 0 72px;
  }

  .page-heading {
    margin-bottom: 28px;
  }

  .legal-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 28px;
  }

  .legal-content {
    border-radius: var(--r-md);
    padding: 26px 20px;
  }

  .legal-content h2 {
    margin-top: 24px;
    padding-top: 24px;
  }

  .legal-content h2:first-of-type {
    margin-top: 28px;
    padding-top: 0;
  }

  .toc-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Help & Support accordions ────────────────────────────── */
.help-group-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mid);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  margin: 2.5rem 0 1rem;
}
.help-group-label:first-of-type { margin-top: 0; }

.help-item {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.help-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  gap: 1rem;
}
.help-question::-webkit-details-marker { display: none; }
.help-question::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 300;
  flex-shrink: 0;
  color: var(--cyan);
  transition: transform 200ms;
}
.help-item[open] > .help-question::after {
  transform: rotate(45deg);
}

.help-answer {
  padding: 0 1.25rem 1.25rem;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-mid);
}
.help-answer p { margin-bottom: 0.75rem; }
.help-answer p:last-child { margin-bottom: 0; }
.help-answer ul,
.help-answer ol {
  margin: 0.5rem 0 0.75rem 1.25rem;
  padding-left: 0;
  list-style: none;
}

/* Override .legal-content li bullet styles inside help answers */
.help-answer li {
  display: list-item;
  list-style: disc;
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.7;
}
.help-answer li::before { display: none; }

.help-answer table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 0.75rem 0;
}
.help-answer th,
.help-answer td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
}
.help-answer th {
  font-weight: 600;
  color: var(--text-mid);
}
.help-answer a {
  color: var(--cyan);
  font-weight: 600;
}
.help-answer a:hover { opacity: 0.85; }

@media (max-width: 680px) {
  .help-answer table {
    display: block;
    overflow-x: auto;
  }
}

/* ── Contact page ──────────────────────────────────────── */
/* Two-column layout */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

/* Form card — matches .legal-content visual */
.contact-form-card {
  border: 1px solid var(--border-hi);
  border-radius: var(--r-lg);
  padding: 36px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.contact-form-card h2 {
  font-size: 1.15rem;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 1.5rem;
}

/* Form fields */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 1.25rem;
}
.field label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-mid);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.field label abbr {
  color: var(--cyan);
  text-decoration: none;
  margin-left: 2px;
}
.field input,
.field textarea {
  background: var(--surface-2);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-md);
  padding: 12px 14px;
  color: var(--text);
  font-size: 0.93rem;
  font-family: inherit;
  resize: vertical;
  transition: border-color 150ms;
  width: 100%;
  box-sizing: border-box;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--cyan);
}

/* Success / error states */
.form-success {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-mid);
  line-height: 1.7;
}
.form-success strong {
  display: block;
  color: var(--text);
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.form-error {
  margin-top: 12px;
  font-size: 0.88rem;
  color: #FF6B6B;
}

/* Info panel */
.contact-info-panel {
  display: flex;
  flex-direction: column;
}
.contact-detail-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.detail-card {
  border: 1px solid var(--border-hi);
  border-radius: var(--r-md);
  padding: 14px 16px;
  background: var(--surface);
}
.detail-label {
  display: block;
  margin-bottom: 4px;
  color: var(--text-mid);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.detail-card span,
.detail-card a {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 600;
}
.detail-card a {
  color: var(--cyan);
}
.contact-info-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}
.contact-info-panel h3 {
  font-size: 0.92rem;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 0 0 10px;
}
.contact-topics-list {
  margin: 0 0 16px;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.contact-topics-list li {
  font-size: 0.88rem;
  color: var(--text-mid);
  display: flex;
  gap: 8px;
  align-items: flex-start;
  line-height: 1.5;
}
.contact-topics-list li::before {
  content: "";
  display: block;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--tint-cyan);
  border: 1px solid var(--tint-cyan-line);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Ccircle cx='6' cy='6' r='2.5' fill='%2338BDF8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}
.contact-data-note {
  font-size: 0.88rem;
  color: var(--text-mid);
  line-height: 1.65;
  margin-bottom: 20px;
}
.contact-data-note a {
  color: var(--cyan);
  font-weight: 600;
}
.contact-help-link {
  font-size: 0.88rem;
  color: var(--text-mid);
  line-height: 1.65;
}
.contact-help-link a {
  color: var(--cyan);
  font-weight: 600;
}

/* Responsive */
@media (max-width: 860px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 680px) {
  .contact-form-card {
    padding: 24px 18px;
  }
}
