/* Trang Điều khoản & Chính sách */

.legal-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.legal-hero__chips a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 14px 6px 6px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface-glass);
  font-size: var(--fs-sm);
  font-weight: 500;
  transition: border-color var(--dur) var(--ease-out);
}
.legal-hero__chips a:hover { border-color: var(--gold-primary); }
.legal-hero__chips span {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--gold-wash);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--gold-ink);
}

.legal { padding-top: clamp(40px, 5vw, 64px); }
.legal__layout { display: grid; gap: 32px; }
.legal__content { display: grid; gap: clamp(28px, 4vw, 40px); min-width: 0; }

/* Mục lục */
.toc {
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}
.toc__title {
  margin-bottom: 10px;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-ink);
}
.toc__list, .toc__sub { margin: 0; padding: 0; list-style: none; }
.toc__list { display: grid; gap: 2px; }
.toc .toc__link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 10px;
  white-space: normal;
  line-height: 1.35;
}
.toc .toc__link::after { display: none; }
.toc .toc__link.is-active { background: var(--gold-wash); color: var(--text-primary); }
.toc__num {
  flex: none;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--gold-ink);
}
.toc__sub { display: none; margin: 2px 0 8px 36px; border-left: 1px solid var(--border); }
.toc__sublink {
  display: flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 12px;
  font-size: var(--fs-xs);
  line-height: 1.4;
  color: var(--text-secondary);
  transition: color var(--dur-fast) linear;
}
.toc__sublink:hover { color: var(--gold-ink); }

/* Các mục điều khoản */
.legal-section {
  padding: clamp(22px, 4vw, 40px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.legal-section__head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.legal-section__icon {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  flex: none;
  border-radius: 14px;
  background: var(--gradient-gold);
  color: #111;
}
.legal-section__icon .icon { width: 24px; height: 24px; }
.legal-section__num {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-ink);
}
.legal-section__title { font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem); letter-spacing: -0.02em; }

.legal-lead { font-size: var(--fs-md); color: var(--text-secondary); line-height: 1.75; }
.legal-section p { color: var(--text-secondary); line-height: 1.75; }
.legal-section p + p { margin-top: 0.75em; }
.term { font-weight: 600; color: var(--text-primary); }
.legal-section strong { color: var(--text-primary); }

.legal-h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 28px 0 12px;
  font-size: var(--fs-h3);
  letter-spacing: -0.01em;
}
.legal-h3 .icon { color: var(--gold-ink); }
.legal-box .legal-h3 { margin-top: 0; font-size: var(--fs-md); }

.legal-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.legal-list li {
  position: relative;
  padding-left: 28px;
  color: var(--text-secondary);
  line-height: 1.7;
}
.legal-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.35em;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--gold-wash) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B8860B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat;
}

.legal-duo, .privacy-grid { display: grid; gap: 16px; margin-top: 24px; }
.legal-box {
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
}
.legal-box p + .legal-list { margin-top: 12px; }

/* Điều khoản từng dịch vụ */
.legal-item {
  padding: 24px 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.legal-item:first-of-type { border-top: 0; padding-top: 0; }
.legal-item:last-child { padding-bottom: 0; }
.legal-item__title { margin-bottom: 16px; font-size: var(--fs-h3); letter-spacing: -0.01em; }
.legal-rows { display: grid; gap: 12px; margin: 0; }
.legal-rows > div {
  display: grid;
  gap: 4px 20px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
}
.legal-rows dt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text-primary);
}
.legal-rows dd { margin: 0; color: var(--text-secondary); line-height: 1.7; }
.legal-rows .is-warn { background: rgba(245, 158, 11, 0.08); border-left: 3px solid #D97706; }
.legal-rows .is-warn dt .icon, .callout--warn .callout__title .icon, .refund-card--no .refund-card__title .icon { color: #FBBF24; }

.legal-steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; counter-reset: st; }
.legal-steps li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: var(--fs-sm);
  color: var(--text-primary);
  counter-increment: st;
}
.legal-steps li::before {
  content: counter(st);
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--gradient-gold);
  font-size: 0.75rem;
  font-weight: 700;
  color: #111;
}

/* Hộp lưu ý */
.callout {
  margin-top: 16px;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.callout--warn { background: rgba(245, 158, 11, 0.07); border-color: rgba(217, 119, 6, 0.35); }
.callout--info { background: var(--gold-wash); border-color: var(--border-strong); }
.callout--info p { display: flex; gap: 10px; align-items: flex-start; color: var(--text-primary); }
.callout--info .icon { margin-top: 3px; color: var(--gold-ink); flex: none; }
.callout__title { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-weight: 700; color: var(--text-primary) !important; }
.callout__list { display: grid; gap: 6px; margin: 10px 0 12px; padding-left: 20px; color: var(--text-secondary); line-height: 1.7; }

/* Thanh toán & hoàn tiền */
.pay-grid, .refund-grid { display: grid; gap: 14px; }
.pay-card {
  position: relative;
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  overflow: hidden;
}
.pay-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--gradient-gold); }
.pay-card__value {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.pay-card__label { font-weight: 700; color: var(--text-primary) !important; }
.refund-grid { margin-top: 16px; }
.refund-card { padding: 20px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-secondary); }
.refund-card--no { background: rgba(245, 158, 11, 0.07); border-color: rgba(217, 119, 6, 0.35); }
.refund-card__title { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-weight: 700; color: var(--text-primary) !important; }
.refund-card__title .icon { color: var(--gold-ink); }

.site-footer__terms { margin-left: 8px; text-decoration: underline; text-underline-offset: 3px; color: var(--text-secondary); }
.site-footer__terms:hover { color: var(--gold-primary); }

@media (min-width: 768px) {
  .legal-duo { grid-template-columns: 1fr 1fr; }
  .privacy-grid { grid-template-columns: 1fr 1fr; }
  .legal-box--wide { grid-column: 1 / -1; }
  .pay-grid { grid-template-columns: repeat(3, 1fr); }
  .legal-rows > div { grid-template-columns: 190px 1fr; align-items: start; }
  .legal-rows > div:has(.legal-steps) { grid-template-columns: 1fr; }
}
@media (min-width: 1024px) {
  .legal__layout { grid-template-columns: 290px minmax(0, 1fr); gap: 40px; align-items: start; }
  .legal__aside { position: sticky; top: calc(var(--header-h) + 24px); }
  .toc__sub { display: block; }
  .refund-grid { grid-template-columns: repeat(3, 1fr); }
}
@media print {
  .legal__aside, .legal-hero__chips { display: none; }
  .legal-section { box-shadow: none; break-inside: auto; }
}
