/* Privacy and Support pages. Builds on site.css tokens, type and nav. */

.legal-hero { position: relative; padding: clamp(40px, 7vw, 88px) 0 clamp(28px, 4vw, 44px); }
.legal-hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(24px, 5vw, 72px); align-items: end; }
.legal-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 13px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  color: var(--plum);
  margin-bottom: 18px;
}
.legal-eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--gilt); }
.legal-title {
  font-family: var(--serif); font-optical-sizing: auto;
  font-weight: 380; font-size: clamp(44px, 6.4vw, 84px);
  line-height: 1; letter-spacing: -.024em;
  text-wrap: balance;
}
.legal-sub { margin-top: 18px; font-size: clamp(17px, 1.4vw, 19px); color: var(--mist); max-width: 34em; text-wrap: pretty; }

/* Small arch with Mia's portrait, echoing the home page doorway. */
.legal-arch {
  width: clamp(120px, 15vw, 180px); aspect-ratio: 3 / 4;
  border-radius: 50% 50% 18px 18px / 40% 40% 18px 18px;
  background: linear-gradient(180deg, var(--dusk), var(--wall));
  box-shadow: 0 0 0 8px var(--plaster), 0 30px 60px -30px rgba(42,31,51,.5);
  display: grid; place-items: end center; overflow: hidden;
}
.legal-arch img { width: 92%; margin-bottom: -4%; }

.legal-body { padding: 0 0 clamp(64px, 9vw, 120px); }
.legal-grid { display: grid; grid-template-columns: 220px minmax(0, 720px); gap: clamp(32px, 6vw, 96px); align-items: start; }

/* Contents rail */
.toc { position: sticky; top: 96px; font-size: 14.5px; }
.toc p { font: 600 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--mist); margin-bottom: 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid rgba(116,104,117,.22); }
.toc a { display: block; padding: 6px 0 6px 16px; margin-left: -1px; border-left: 1px solid transparent; text-decoration: none; color: var(--mist); line-height: 1.35; transition: color .2s, border-color .2s; }
.toc a:hover { color: var(--ink); border-left-color: var(--gilt); }

/* Summary card */
.gist {
  background: var(--vellum);
  border-radius: 28px;
  padding: clamp(24px, 3.4vw, 36px);
  box-shadow: 0 1px 0 rgba(255,255,255,.8) inset, 0 24px 48px -32px rgba(42,31,51,.35);
  border: 1px solid rgba(210,174,98,.28);
  margin-bottom: clamp(40px, 5vw, 56px);
}
.gist h2 { font-size: clamp(24px, 2.4vw, 30px); margin-bottom: 16px; }
.gist ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.gist li { position: relative; padding-left: 26px; }
.gist li::before {
  content: ""; position: absolute; left: 2px; top: .55em;
  width: 9px; height: 9px; transform: rotate(45deg);
  background: var(--gilt); border-radius: 2px;
}

/* Prose */
.prose { font-size: 17px; line-height: 1.7; }
.prose section { scroll-margin-top: 96px; }
.prose section + section { margin-top: clamp(40px, 4.6vw, 56px); }
.prose h2 { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.12; margin-bottom: 16px; }
.prose h3 { margin: 24px 0 8px; }
.prose p + p, .prose p + ul, .prose ul + p, .prose p + .table, .prose .table + p { margin-top: 14px; }
.prose ul { margin: 0; padding-left: 1.2em; }
.prose li + li { margin-top: 8px; }
.prose li::marker { color: var(--gilt-deep); }
.prose a { color: var(--plum-deep); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose strong { font-weight: 600; }
.prose .path { font-weight: 600; color: var(--plum-deep); white-space: nowrap; }

.table { overflow-x: auto; border-radius: 18px; border: 1px solid rgba(116,104,117,.18); background: rgba(255,251,245,.7); }
.table table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.55; }
.table th, .table td { text-align: left; vertical-align: top; padding: 14px 18px; }
.table thead th { font: 600 12.5px/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--mist); background: rgba(231,217,240,.45); }
.table tbody tr + tr td { border-top: 1px solid rgba(116,104,117,.14); }
.table td:first-child { font-weight: 600; min-width: 9em; }

.note {
  margin-top: 18px; padding: 16px 20px;
  border-radius: 16px; background: rgba(247,230,191,.5);
  font-size: 15.5px;
}

/* Contact card (support) */
.contact {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center;
  background: var(--night); color: var(--on-night);
  border-radius: 28px; padding: clamp(22px, 3.4vw, 34px);
  margin-bottom: clamp(40px, 5vw, 56px);
  box-shadow: 0 30px 60px -36px rgba(42,31,51,.8);
}
.contact img { width: 64px; height: 64px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(243,220,205,.35); }
.contact h2 { font-size: clamp(22px, 2.2vw, 28px); margin-bottom: 6px; }
.contact p { color: var(--on-night-mist); font-size: 15.5px; }
.contact a.mail { color: var(--butter); font-weight: 600; text-underline-offset: 3px; overflow-wrap: anywhere; }

/* FAQ */
.faq { border-top: 1px solid rgba(116,104,117,.2); }
.faq details { border-bottom: 1px solid rgba(116,104,117,.2); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 20px 0;
  font-family: var(--serif); font-size: clamp(19px, 1.7vw, 22px); line-height: 1.3; font-weight: 450;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 12px; height: 12px;
  border-right: 1.5px solid var(--plum); border-bottom: 1.5px solid var(--plum);
  transform: rotate(45deg) translate(-3px, -3px); transition: transform .3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq .answer { padding: 0 0 22px; color: var(--ink); }
.faq .answer p + p, .faq .answer p + ul { margin-top: 10px; }

.legal-foot-links { display: flex; gap: 8px 20px; flex-wrap: wrap; font-size: 14px; }
.foot-mail { overflow-wrap: anywhere; }
.legal-foot-links a { color: var(--on-night-mist); text-underline-offset: 3px; }
.legal-foot-links a:hover { color: var(--on-night); }
.legal-foot { background: var(--night); color: var(--on-night); }

[data-lang][hidden] { display: none; }

@media (max-width: 900px) {
  .legal-grid { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 560px) {
  .legal-hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .legal-arch { display: none; }
  /* Stack the data table into one card per row. */
  .table thead { display: none; }
  .table tr { display: block; padding: 16px 18px; }
  .table tbody tr + tr { border-top: 1px solid rgba(116,104,117,.14); }
  .table tbody tr + tr td { border-top: 0; }
  .table td { display: block; padding: 0; }
  .table td:first-child { min-width: 0; font-family: var(--serif); font-size: 18px; font-weight: 500; margin-bottom: 4px; }
  .table td:nth-child(3) { margin-top: 8px; color: var(--mist); }
  .table td:nth-child(3)::before { font-weight: 600; color: var(--plum-deep); }
  :lang(en) .table td:nth-child(3)::before { content: "Why: "; }
  :lang(zh) .table td:nth-child(3)::before { content: "用途："; }
  :lang(ja) .table td:nth-child(3)::before { content: "目的："; }
  .contact { grid-template-columns: minmax(0, 1fr); }
  .contact img { width: 52px; height: 52px; }
}

:lang(zh) .legal-title, :lang(ja) .legal-title { letter-spacing: 0; font-weight: 500; line-height: 1.12; }
:lang(zh) .legal-eyebrow, :lang(ja) .legal-eyebrow { letter-spacing: .08em; }
:lang(zh) .prose, :lang(ja) .prose { line-height: 1.85; }
:lang(zh) .prose h2, :lang(ja) .prose h2, :lang(zh) .gist h2, :lang(ja) .gist h2, :lang(zh) .faq summary, :lang(ja) .faq summary { letter-spacing: 0; font-weight: 500; }
