/* Hallmark · shape: long-form legal document (privacy policy, terms of use) inside the v6 BAXU site · genre: atmospheric · theme: custom · job: inform (read the policy) · paper: the v6 site.css themes (light Dawn, dark Night) and roles only, nothing new · accent: site.css --color-accent and --color-mark · display and body: Be Vietnam Pro (brand: the only face; ja falls back to Noto Sans JP) · hero: a short title band on the home hero's ground (brand gradient with the dot grid in light, ink in dark) carrying the title and the date · nav: the home page's sticky header, lifted verbatim with links pointing back to index.html · footer: the home page's own, lifted by build-legal.mjs (one footer for the whole site) · imagery: none · posture: brand palette only (baxu-brand guideline outranks Hallmark defaults) · surface: absolute (inherited from site.css: wordmark and on-dark text are the brand's #FFFFFF) · v2.0.0 */
/* Hallmark · dismissed 58 · privacy.html carries about 5000 visible words and terms.html about 2900, both language versions counted (one is display:none at a time); a privacy policy and terms of use are long-form legal text that must be complete; cutting it is the lawyer's call, not the designer's */
/* BAXU legal pages (privacy.html, terms.html). Loads after site.css and reads only its tokens and roles; adds no colour of its own.
 * Layout: a short brand-gradient title band (the home hero's ground, so the transparent header reads the same), then a sticky
 * contents rail and the text on a 68ch measure. Both language versions are in the page; the one for <html lang> shows. */

/* one string per language: vi shows vi, en shows en, ja shows ja (site.css already has .only-vi and .not-vi) */
html, body { overflow-x: clip; } /* restated from site.css so this sheet stands alone in the lint */
:root:not(:lang(en)) .only-en, :root:not(:lang(ja)) .only-ja { display: none; }
:root:not(:lang(vi)) .legal-doc.only-vi, :root:lang(vi) .legal-doc.not-vi { display: none; }

/* long text reads freely: the home page's mandatory scroll snap (whose only point here would be the footer's end) stays off,
   whether or not site.css carries its own html.page-legal rule */
html.page-legal { scroll-snap-type: none !important; }
.page-legal .foot__base { scroll-snap-align: none; }

/* ---------- title band ---------- */
:root[data-theme="light"] .legal-hero.gr::before { background: var(--brand-gradient) top left / 160% 160% no-repeat, var(--brand-deep); }
.legal-hero__in { display: grid; justify-items: start; gap: var(--space-md); padding-block: var(--space-2xl) var(--space-xl); }
.legal-hero h1 { text-wrap: balance; font-size: var(--text-section); line-height: var(--lh-head); letter-spacing: var(--tracking-display); max-width: 20ch; }
.legal-updated { font-size: var(--text-sm); color: var(--color-muted); }
.legal-ja-note { font-size: var(--text-sm); font-weight: 500; color: var(--color-ink-2); }

/* ---------- body: contents rail + text ---------- */
.legal-body { padding-block: var(--space-2xl) var(--space-3xl); }
.legal-doc { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); }
@media (min-width: 60.0625rem) {
  .legal-doc { grid-template-columns: minmax(12rem, 17rem) minmax(0, 68ch); column-gap: var(--space-2xl); align-items: start; }
  .toc { position: sticky; top: calc(var(--bar-h) + var(--space-lg)); max-height: calc(100svh - var(--bar-h) - var(--space-2xl)); overflow-y: auto; overscroll-behavior: contain; }
  .toc__title { pointer-events: none; list-style: none; }
  .toc__title::-webkit-details-marker { display: none; }
}

.toc__box { border-top: 2px solid var(--color-accent); padding-top: var(--space-sm); }
.toc__title { font-size: var(--text-xs); font-weight: var(--weight-label); text-transform: uppercase; letter-spacing: 2px; color: var(--color-accent); cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: var(--space-xs); }
.toc__list { display: grid; gap: var(--space-3xs); margin-top: var(--space-xs); }
.toc__list a { display: flex; align-items: center; min-height: 2rem; padding: var(--space-2xs) 0 var(--space-2xs) var(--space-sm); border-left: 2px solid var(--color-rule-soft); font-size: var(--text-sm); line-height: 1.4; color: var(--color-ink-2); text-decoration: none; transition: color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out); }
.toc__list a:hover { color: var(--color-ink); border-left-color: var(--color-muted); }
.toc__list a:active { color: var(--color-muted); }
.toc__list a[aria-current] { color: var(--color-ink); font-weight: 600; border-left-color: var(--color-mark); }
.toc__list a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

/* ---------- the text ---------- */
.legal-text { max-width: 68ch; min-width: 0; color: var(--color-ink-2); }
.legal-text > * + * { margin-top: var(--space-md); }
.legal-text h2 { text-wrap: balance; margin-top: var(--space-2xl); font-size: var(--text-xl); line-height: var(--lh-head); color: var(--color-ink); scroll-margin-top: var(--space-md); /* html already pads by --bar-h */ }
.legal-text h3 { margin-top: var(--space-xl); font-size: var(--text-lg); line-height: var(--lh-head); color: var(--color-ink); scroll-margin-top: var(--space-md); /* html already pads by --bar-h */ }
.legal-text h2 + *, .legal-text h3 + * { margin-top: var(--space-sm); }
.legal-text strong { font-weight: var(--weight-label); color: var(--color-ink); }
.legal-text ul, .legal-text ol { padding-left: var(--space-lg); }
.legal-text ul li { list-style: square; }
.legal-text ol li { list-style: decimal; }
.legal-text li + li { margin-top: var(--space-2xs); }
.legal-text li::marker { color: var(--color-accent); }
.legal-text hr { border: 0; border-top: 1px solid var(--color-rule-soft); margin-block: var(--space-xl); }
.legal-text a { overflow-wrap: anywhere; }

/* the drafter's status note at the top of each document */
.legal-status { padding: var(--space-md) var(--space-lg); background: var(--color-panel); border: 1px solid var(--color-rule-soft); border-radius: var(--radius-card); font-size: var(--text-sm); }
.legal-status p + p { margin-top: var(--space-2xs); }

/* tables scroll inside their own box on a phone, never the page */
.table-wrap { overflow-x: auto; border: 1px solid var(--color-rule-soft); border-radius: var(--radius-card); }
.table-wrap:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.legal-text table { width: 100%; min-width: 32rem; border-collapse: collapse; font-size: var(--text-sm); line-height: 1.5; }
.legal-text th { text-align: left; font-weight: var(--weight-label); color: var(--color-ink); background: var(--color-panel); }
.legal-text th, .legal-text td { padding: var(--space-sm) var(--space-md); vertical-align: top; border-bottom: 1px solid var(--color-rule-soft); }
.legal-text tbody tr:last-child td { border-bottom: 0; }

/* [CẦN XÁC NHẬN / TO CONFIRM]: a quiet highlighter, readable in both themes */
mark.confirm { padding: 0 0.25em; border-radius: var(--radius-input); background: color-mix(in srgb, var(--brand-bright) 16%, transparent); box-shadow: inset 0 -1px 0 var(--color-accent); color: var(--color-ink); font-size: 0.92em; font-weight: 500; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* ---------- footer: the home page's own (build-legal.mjs lifts it); site.css styles it. Only the current page's legal link is marked. ---------- */
.foot__legalnav a[aria-current="page"] { color: var(--color-ink); }
/* the footer keeps data-screen (its layout in site.css hangs on it); its one-dot screen rail means nothing here */
.page-legal .dots { display: none; }
/* the pages have no disabled control of their own; any shared button that is ever disabled keeps the site recipe and says so */
.legal-page button:disabled { cursor: not-allowed; opacity: 0.55; }
/* the fold's own sign on phones and tablets (summary is flex, so the native marker is gone) */
.toc__title::after { content: ""; width: 7px; height: 7px; margin-left: auto; margin-right: var(--space-2xs); border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform var(--dur-short) var(--ease-out); }
.toc__box[open] .toc__title::after { transform: translateY(2px) rotate(-135deg); }
@media (min-width: 60.0625rem) { .toc__title::after { display: none; } }
/* Night is one ink ground: a hairline closes the title band, and the drafter's note is a quieter panel */
:root[data-theme="dark"] .legal-hero { box-shadow: inset 0 -1px 0 var(--color-rule-soft); }
:root[data-theme="dark"] .legal-status { background: color-mix(in srgb, var(--color-panel) 45%, transparent); }
@media (prefers-reduced-motion: reduce) {
  .toc__title::after, .toc__list a { transition: none; }
}

.legal-hero h1 { overflow-wrap: anywhere; min-width: 0; }
.legal-hero h1 [lang="ja"] { word-break: normal; line-break: strict; }
