/* Shared legal card components used by privacy and terms */
.legal-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 40px;
}

.policy-card {
  position: relative;
  overflow: hidden;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 14px 16px;
  animation: card-enter .4s ease both;
  animation-delay: calc(var(--i, 0) * var(--stagger));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .02);
  transition: border-color var(--ease), background-color var(--ease), transform var(--ease), box-shadow var(--ease);
}

.policy-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--c-accent) 24%, transparent 100%);
  opacity: .38;
}

.policy-card:hover {
  background: var(--c-surface-alt);
  border-color: var(--c-border-alt);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .03),
    0 0 0 1px rgba(96, 165, 250, .06),
    0 10px 24px rgba(3, 10, 18, .14);
}

.policy-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.policy-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c-accent);
  box-shadow: 0 0 5px var(--c-accent);
  flex-shrink: 0;
  animation: policy-dot-pulse 3.2s ease-in-out infinite;
}

@keyframes policy-dot-pulse {
  0%, 100% {
    opacity: .8;
    box-shadow: 0 0 4px var(--c-accent);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 8px var(--c-accent);
  }
}

.policy-card-title {
  font-family: var(--ff-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--c-subtle);
}

.policy-card-body {
  font-size: var(--fs-xs);
  font-weight: 300;
  color: var(--c-body);
  line-height: 1.7;
  padding-left: 15px;
  border-left: 1px solid rgba(96, 165, 250, .14);
}

.policy-card-body p + p {
  margin-top: 8px;
}

.policy-card-body > .policy-list,
.policy-card-body > .policy-table-wrap,
.policy-card-body > p + .policy-list,
.policy-card-body > p + .policy-table-wrap,
.policy-card-body > .policy-list + p,
.policy-card-body > .policy-table-wrap + p {
  margin-top: 10px;
}

.policy-card-body a,
.policy-card-body a:visited {
  color: var(--c-heading);
}

.policy-card-body a:hover,
.policy-card-body a:active {
  color: var(--c-accent);
}

.policy-line {
  display: block;
}

.policy-list {
  list-style: none;
  display: grid;
  gap: 8px;
  padding-left: 0;
}

.policy-list li {
  position: relative;
  padding-left: 14px;
}

.policy-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .72em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c-accent);
  box-shadow: 0 0 5px rgba(96, 165, 250, .35);
}

.policy-table-wrap {
  position: relative;
  margin-left: -1px;
  border: 1px solid var(--c-border);
  border-radius: calc(var(--radius) - 1px);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .02), transparent 28%),
    linear-gradient(90deg, rgba(96, 165, 250, .035), transparent 18%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .025),
    0 0 0 1px rgba(96, 165, 250, .035);
}

.policy-table-wrap::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-accent), transparent);
  opacity: .45;
}

.policy-table-wrap::after {
  content: '';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 26px;
  height: 26px;
  border-top: 1px solid rgba(96, 165, 250, .18);
  border-right: 1px solid rgba(96, 165, 250, .18);
  opacity: .75;
  pointer-events: none;
}

.policy-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.policy-table th,
.policy-table td {
  padding: 10px 12px;
  vertical-align: top;
  text-align: left;
  border-top: 1px solid var(--c-border);
}

.policy-table thead th {
  border-top: 0;
  font-family: var(--ff-mono);
  font-size: var(--fs-2xs);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--c-subtle);
  background: linear-gradient(90deg, rgba(96, 165, 250, .08), rgba(96, 165, 250, .03));
}

.policy-table thead th:nth-child(1) {
  width: 17%;
}

.policy-table thead th:nth-child(2) {
  width: 21%;
}

.policy-table thead th:nth-child(3) {
  width: 62%;
}

.policy-table tbody th {
  font-family: var(--ff-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--c-heading);
  white-space: nowrap;
  background: linear-gradient(90deg, rgba(96, 165, 250, .05), transparent 85%);
}

.policy-table tbody td {
  font-size: var(--fs-xs);
  color: var(--c-body);
}

.policy-table tbody td:nth-child(2) {
  color: var(--c-heading);
}

.policy-table tbody td:last-child {
  color: var(--c-subtle);
}

.policy-table tbody tr:hover th,
.policy-table tbody tr:hover td {
  background: rgba(96, 165, 250, .045);
}

@media (prefers-reduced-motion: reduce) {
  .policy-card,
  .policy-dot {
    animation: none;
    transition: none;
  }

  .policy-card:hover {
    transform: none;
  }
}

@media (max-width: 540px) {
  .legal-stack {
    gap: 6px;
    margin-bottom: 28px;
  }

  .policy-table,
  .policy-table thead,
  .policy-table tbody,
  .policy-table tr,
  .policy-table th,
  .policy-table td {
    display: block;
  }

  .policy-table thead {
    display: none;
  }

  .policy-table tbody th,
  .policy-table tbody td {
    width: 100%;
    border-top: 0;
    padding: 8px 10px;
  }

  .policy-table tbody tr {
    padding: 6px 0;
    border-top: 1px solid var(--c-border);
  }

  .policy-table tbody tr:first-child {
    border-top: 0;
  }

  .policy-table tbody td {
    padding-top: 0;
  }

  .policy-table-wrap::after {
    width: 18px;
    height: 18px;
    top: 10px;
    right: 10px;
  }
}