/* © Hoang LLC. All rights reserved. */
/* The legal pages (r17, track TL): privacy, terms, tokushoho, payment-services, support, delete-account, licenses in vi / en / ja.
   Loaded after site.css and built on its tokens (--paper, --ink, --line, --display ...). The pages are generated by
   tools/web/legal_pages.py; they hold no script, so the top bar shows the language switch directly instead of the menu drawer. */

body.legal { background: var(--paper); }

/* ------------------------------------------------------------------ top bar: brand left, three language pills right */
.legal-topbar { justify-content: space-between; }
.legal-topbar .brand-name { font-size: 18px; white-space: nowrap; }
.legal-langs { display: flex; gap: 4px; flex: none; }
.legal-langs a {
  display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 36px; padding: 4px 8px;
  border: 2px solid var(--ink); border-radius: 999px; background: var(--card); color: var(--ink);
  font: 700 13px/1 var(--body); text-decoration: none;
}
.legal-langs a[aria-current="page"] { background: var(--parcel); }
.legal-langs a:hover { background: var(--sky-l); }

/* ------------------------------------------------------------------ the document */
.legal-main { padding: 28px 0 56px; }
.legal-doc { max-width: 860px; font-size: 16px; line-height: 1.75; overflow-wrap: anywhere; }
.legal-doc h1 { font-size: clamp(28px, 7vw, 42px); margin: 6px 0 10px; }
.legal-doc h2 {
  font-size: clamp(20px, 5vw, 26px); margin: 36px 0 12px; padding-top: 14px; border-top: 2px dashed rgba(22, 35, 51, .18);
  scroll-margin-top: calc(var(--topbar) + 12px);
}
.legal-doc h3 { font-size: 18px; margin: 24px 0 8px; scroll-margin-top: calc(var(--topbar) + 12px); }
.legal-doc h4 { font: 700 16px/1.3 var(--body); margin: 0 0 4px; }
.legal-doc p { margin: 0 0 12px; }
.legal-doc ul, .legal-doc ol { margin: 0 0 14px; padding-left: 1.4em; }
.legal-doc li { margin: 0 0 6px; }
.legal-doc a { color: #0B5CAD; text-decoration: underline; text-underline-offset: 2px; }
.legal-doc a:hover { color: var(--coral); }
.legal-doc code { font: 600 .92em/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: rgba(22, 35, 51, .07); padding: 1px 5px; border-radius: 5px; }
.legal-updated { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.legal-prevails {
  font-size: 14px; color: var(--ink-2); background: var(--sky-l); border: 2px solid var(--ink); border-radius: 12px; padding: 10px 14px; margin: 0 0 20px;
}
.legal-note {
  background: var(--card); border: var(--line); border-radius: var(--radius); box-shadow: 0 3px 0 var(--ink); padding: 12px 16px; margin: 0 0 16px;
}
.legal-note p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------ tables: a card that scrolls sideways on a phone when it must */
.legal-table-wrap { overflow-x: auto; margin: 0 0 18px; border: var(--line); border-radius: 14px; background: var(--card); }
.legal-table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.6; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid rgba(22, 35, 51, .16); }
.legal-table tbody tr:last-child th, .legal-table tbody tr:last-child td { border-bottom: 0; }
.legal-table thead th { background: var(--parcel); font: 700 14px/1.3 var(--body); border-bottom: 2px solid var(--ink); white-space: nowrap; }
.legal-table tbody th { font-weight: 700; background: rgba(255, 212, 71, .16); min-width: 7.5em; }
.legal-cols-2 tbody th { width: 30%; }
/* three or four columns on a phone: each row becomes a block, each cell shows its column's name (data-label, written by
   tools/web/legal_pages.py); from 720 px they are ordinary tables */
@media (max-width: 719px) {
  .legal-cols-3 thead, .legal-cols-4 thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .legal-cols-3 tr, .legal-cols-4 tr { display: block; border-bottom: 2px solid var(--ink); }
  .legal-cols-3 tbody tr:last-child, .legal-cols-4 tbody tr:last-child { border-bottom: 0; }
  .legal-cols-3 th, .legal-cols-3 td, .legal-cols-4 th, .legal-cols-4 td { display: block; width: auto; border-bottom: 0; padding: 6px 12px; }
  .legal-cols-3 tbody th, .legal-cols-4 tbody th { padding-top: 10px; font-size: 15.5px; }
  .legal-cols-3 td:last-child, .legal-cols-4 td:last-child { padding-bottom: 12px; }
  .legal-cols-3 td::before, .legal-cols-4 td::before {
    content: attr(data-label); display: block; font: 700 12px/1.4 var(--body); color: var(--muted); letter-spacing: .02em;
  }
}
@media (min-width: 720px) {
  .legal-cols-3 tbody th { width: 24%; }
  .legal-cols-4 tbody th { width: 16%; }
  .legal-cols-4 td:last-child { width: 22%; }
}
.legal-packs td { white-space: nowrap; }
.legal-packs thead th { white-space: normal; }

/* ------------------------------------------------------------------ the web confirmation of a deletion (delete-account/confirm/) */
.dc [hidden], .dc-intro[hidden] { display: none !important; }
.dc { margin-top: 24px; }
.dc h2 { margin-top: 0; }
.dc-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 16px 0; }
.dc-facts dt { font-weight: 700; }
.dc-facts dd { margin: 0; overflow-wrap: anywhere; }
.dc-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.dc-actions .btn { background: #fff; }
.dc-actions .btn-yellow { background: var(--parcel); }
.dc-actions .btn-coral { background: var(--coral); color: #fff; }
.dc-signin { flex-direction: column; align-items: stretch; max-width: 360px; }
.dc-signin .btn { justify-content: center; }
.dc-actions .btn-brand { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.btn-brand::before { content: ""; width: 22px; height: 22px; flex: none; background: center / contain no-repeat; }
.btn-google::before { background-image: url(../img/signin/google.png); }
.btn-apple::before { background-image: url(../img/signin/apple.png); }
.btn-line::before { background-image: url(../img/signin/line.png); }
.dc-actions .btn-apple { background: #000; color: #fff; }
.dc-actions .btn-line { background: #06c755; color: #fff; }
.dc-note { padding: 12px 16px; border: var(--line); border-radius: 12px; }

/* ------------------------------------------------------------------ the account page (account/): its facts and its match history */
.ac-facts dd { font-variant-numeric: tabular-nums; }
.ac-history td, .ac-history tbody th { font-variant-numeric: tabular-nums; }
/* six columns: on a phone each match is a block and each cell shows its column's name (data-label, written by account.js) */
@media (max-width: 719px) {
  .ac-history thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ac-history tr { display: block; border-bottom: 2px solid var(--ink); }
  .ac-history tbody tr:last-child { border-bottom: 0; }
  .ac-history th, .ac-history td { display: block; width: auto; border-bottom: 0; padding: 6px 12px; }
  .ac-history tbody th { padding-top: 10px; font-size: 15.5px; }
  .ac-history td:last-child { padding-bottom: 12px; }
  .ac-history td::before {
    content: attr(data-label); display: block; font: 700 12px/1.4 var(--body); color: var(--muted); letter-spacing: .02em;
  }
}

/* ------------------------------------------------------------------ footer */
.legal-footer { padding-bottom: 40px; }
.legal-foot-nav { line-height: 2; }
.legal-foot-nav a[aria-current="page"] { color: var(--parcel); text-decoration: underline; }

@media (min-width: 720px) {
  .legal-topbar .brand-name { font-size: 24px; }
  .legal-main { padding: 44px 0 72px; }
  .legal-doc { font-size: 16.5px; }
  .legal-table { font-size: 15px; }
}

@media print {
  .legal-topbar, .legal-footer, .skip { display: none; }
  .legal-doc { max-width: none; font-size: 11pt; }
  .legal-table-wrap { overflow: visible; }
}
