/* Terms of Use page. Builds on site.css tokens. */
.terms[data-lang="en"] [lang="ms"], .terms[data-lang="ms"] [lang="en"] { display: none !important; }

.lang-switch { display: inline-flex; margin-left: auto; padding: 3px; border-radius: 12px; background: var(--brand-soft); }
.lang-switch a { min-width: 44px; padding: 7px 12px; border-radius: 9px; color: var(--ink); text-align: center; text-decoration: none; font-weight: 800; font-size: 14px; line-height: 1.2; }
.lang-switch a[aria-current="true"] { background: var(--surface); color: var(--brand); box-shadow: 0 1px 4px rgba(16,35,63,.12); }
.lang-switch a:focus-visible, .back-home:focus-visible, .toc a:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.back-home { font-weight: 800; font-size: 15px; text-decoration: none; white-space: nowrap; }
@media (max-width: 520px) { .back-home span { display: none; } }

.t-hero { padding-block: 40px 28px; border-bottom: 1px solid var(--line); }
.t-hero h1 { font-size: clamp(36px, 6vw, 60px); font-weight: 700; }
.t-meta { margin: 12px 0 0; color: var(--muted); font-weight: 700; font-size: 15px; }

.t-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 48px; align-items: start; padding-block: 36px 72px; }
.toc { position: sticky; top: 88px; max-height: calc(100vh - 104px); overflow: auto; }
.toc h2 { margin-bottom: 10px; font: 800 12.5px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.toc a { display: grid; grid-template-columns: 26px minmax(0, 1fr); padding: 6px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 14.5px; line-height: 1.35; }
.toc a:hover { background: var(--brand-soft); }
.toc a b { color: var(--muted); font-variant-numeric: tabular-nums; }

.t-body { max-width: 760px; }
.t-sec { scroll-margin-top: 88px; }
.t-sec + .t-sec { margin-top: 44px; padding-top: 36px; border-top: 1px solid var(--line); }
.t-sec > h2 { display: flex; gap: 12px; align-items: baseline; margin-bottom: 18px; font-size: clamp(26px, 3.2vw, 32px); font-weight: 700; }
.t-sec > h2 .t-num { color: var(--brand); font-variant-numeric: tabular-nums; }
.cl { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 0 8px; scroll-margin-top: 88px; }
.cl + .cl { margin-top: 14px; }
.cl > .no { font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; line-height: 1.65; }
.cl p { margin: 0; line-height: 1.65; }
.cl p + p, .cl ul + p { margin-top: 8px; }
.cl ul { margin: 8px 0 0; padding-left: 20px; }
.cl li { line-height: 1.55; }
.cl li + li { margin-top: 4px; }
.cl strong { font-weight: 800; }
.cl:target { border-radius: 8px; background: var(--brand-soft); box-shadow: 0 0 0 8px var(--brand-soft); }

.defs { width: 100%; border-collapse: collapse; font-size: 15px; }
.defs th, .defs td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.defs thead th { font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--ink); }
.defs tbody th { width: 30%; font-weight: 800; }
@media (max-width: 560px) { .defs thead { display: none; } .defs tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); } .defs th, .defs td { display: block; width: auto !important; padding: 0; border: 0; } .defs tbody th { margin-bottom: 2px; } }

.addr { margin-top: 8px; padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.addr p { margin: 0; }
.addr p + p { margin-top: 4px; }

@media (max-width: 900px) {
  .t-layout { grid-template-columns: 1fr; gap: 28px; }
  .toc { position: static; max-height: none; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
  .toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) { .toc ol { grid-template-columns: 1fr; } .cl { grid-template-columns: 36px minmax(0, 1fr); } }

.terms + .foot { padding-block: 24px; }
.terms + .foot .copy { margin: 0; padding: 0; border: 0; }
