/* =========================================================
   Legal pages (extends styles.css)
   ========================================================= */
html { scroll-behavior: smooth; }
.legal-page--hrxboard { --acc-50: var(--rose-50); --acc-100: var(--rose-100); --acc-200: var(--rose-200); --acc-300: var(--rose-300); --acc-500: var(--rose-500); --acc-600: var(--rose-600); }
.legal-page--ytslabs { --acc-50: var(--t-50); --acc-100: var(--t-100); --acc-200: var(--t-200); --acc-300: var(--t-300); --acc-500: var(--t-500); --acc-600: var(--t-700); }
.dotmark--still::after { display: none; }
.legal-page .footer__cols { flex-wrap: wrap; row-gap: 32px; }
.legal { padding-top: clamp(130px, 17vh, 180px); padding-bottom: clamp(60px, 8vw, 110px); }
.legal__head { max-width: 900px; }
.legal__title { font-size: clamp(46px, 7.4vw, 110px); line-height: .98; letter-spacing: -.03em; font-weight: 300; margin-top: 26px; }
.legal__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.legal__meta span { font-size: 13.5px; padding: 7px 14px; border-radius: 999px; background: var(--bg-soft); color: var(--ink-2); }

.ldocs { display: flex; gap: 8px; margin: clamp(36px, 5vw, 56px) 0 clamp(40px, 5vw, 64px); overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); }
.ldocs::-webkit-scrollbar { display: none; }
.ldocs a { flex: none; font-size: 14px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); white-space: nowrap; transition: background-color .4s var(--ease), color .4s, border-color .4s; }
.ldocs a:hover { border-color: var(--line-2); color: var(--ink); }
.ldocs a.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }

.legal__grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.toc { position: sticky; top: 104px; max-height: calc(100vh - 128px); overflow: auto; padding: 20px; border-radius: 28px; background: var(--bg-soft); scrollbar-width: thin; }
.toc__k { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 12px 8px; }
.toc ol { display: flex; flex-direction: column; gap: 2px; }
.toc a { display: grid; grid-template-columns: 26px 1fr; gap: 4px; font-size: 13.5px; line-height: 1.4; padding: 8px 10px; border-radius: 12px; color: var(--ink-2); transition: background-color .3s, color .3s; }
.toc a span { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.toc a:hover { background: rgba(255,255,255,.7); color: var(--ink); }
.toc a.is-on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.toc a.is-on span { color: var(--acc-500); }
.toc-m { display: none; }

.doc { max-width: 820px; font-size: 16.5px; line-height: 1.72; color: var(--ink-2); }
.doc > p { margin-bottom: 16px; }
.doc section { padding-top: 8px; margin-bottom: clamp(36px, 4vw, 52px); scroll-margin-top: 110px; }
.doc section + section { border-top: 1px solid var(--line); padding-top: clamp(30px, 3.4vw, 44px); }
.doc h2 { font-size: clamp(22px, 2vw, 28px); line-height: 1.25; letter-spacing: -.025em; font-weight: 400; color: var(--ink); margin-bottom: 18px; display: flex; gap: 12px; align-items: baseline; }
.doc h2 .n { font-size: .62em; color: var(--acc-500); min-width: 2.2em; font-variant-numeric: tabular-nums; flex: none; }
.doc strong { color: var(--ink); font-weight: 700; }
.doc em { font-style: italic; }
.doc a { color: var(--acc-600); text-decoration: underline; text-decoration-color: var(--acc-200); text-underline-offset: 3px; }
.doc .cl { display: grid; grid-template-columns: var(--nw, 56px) minmax(0, 1fr); gap: 4px 12px; margin: 0 0 12px calc((var(--l, 2) - 2) * 26px); }
.doc .cl[data-l="2"] { --l: 2; --nw: 46px; }
.doc .cl[data-l="3"] { --l: 3; --nw: 58px; }
.doc .cl[data-l="4"] { --l: 4; --nw: 70px; }
.doc .cl[data-l="5"] { --l: 5; --nw: 46px; }
.doc .cl[data-l="6"] { --l: 6; --nw: 40px; }
.doc .cl > .n { font-size: 14px; color: var(--ink-3); font-variant-numeric: tabular-nums; padding-top: 2px; white-space: nowrap; }
.doc .cl > .ct > p + p, .doc .cl > .ct > ul, .doc .cl > .ct > table { margin-top: 10px; }
.doc p + .cl, .doc ul + .cl, .doc table + .cl { margin-top: 12px; }
.doc section > p { margin-bottom: 14px; }
.doc ul { margin: 6px 0 16px; display: flex; flex-direction: column; gap: 8px; }
.doc ul li { position: relative; padding-left: 22px; }
.doc ul li::before { content: ""; position: absolute; left: 4px; top: .72em; width: 6px; height: 6px; border-radius: 50%; background: var(--acc-300); }
.doc ul.kv { padding: 18px 20px; border-radius: 20px; background: var(--bg-soft); gap: 6px; }
.doc ul.kv li { padding-left: 0; }
.doc ul.kv li::before { display: none; }
.doc mark { background: var(--acc-100); color: var(--acc-600); border-radius: 5px; padding: 1px 5px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.doc .tbl { margin: 14px 0 20px; border: 1px solid var(--line); border-radius: 20px; overflow: auto; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.55; min-width: 520px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 16px; border-top: 1px solid var(--line); }
.doc thead th { border-top: 0; background: var(--bg-soft); color: var(--ink); font-weight: 400; font-size: 13.5px; }
.doc td:first-child { color: var(--ink); }

.legal__end { margin-top: clamp(40px, 5vw, 64px); padding: clamp(22px, 3vw, 32px); border-radius: 28px; background: var(--bg-soft); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.legal__end p { font-size: 15px; color: var(--ink-2); max-width: 520px; }
.legal__end a.btn { height: 50px; font-size: 15px; }

@media (max-width: 1000px) {
  .legal__grid { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  .toc-m { display: block; margin-bottom: 28px; border-radius: 22px; background: var(--bg-soft); }
  .toc-m summary { list-style: none; cursor: pointer; padding: 16px 20px; font-size: 15px; display: flex; justify-content: space-between; align-items: center; }
  .toc-m summary::-webkit-details-marker { display: none; }
  .toc-m summary svg { width: 16px; height: 16px; transition: transform .4s var(--ease); }
  .toc-m[open] summary svg { transform: rotate(90deg); }
  .toc-m ol { padding: 0 10px 12px; display: flex; flex-direction: column; }
  .toc-m a { display: grid; grid-template-columns: 26px 1fr; padding: 9px 10px; font-size: 14px; border-radius: 12px; color: var(--ink-2); }
  .toc-m a span { color: var(--ink-3); }
}
@media (max-width: 600px) {
  .doc { font-size: 15.5px; line-height: 1.68; }
  .doc .cl { margin-left: calc((var(--l, 2) - 2) * 12px); gap: 2px 8px; }
  .doc .cl[data-l="2"] { --nw: 38px; }
  .doc .cl[data-l="3"] { --nw: 50px; }
  .doc .cl[data-l="4"] { --nw: 60px; }
  .doc .cl > .n { font-size: 13px; }
  .doc h2 { gap: 8px; }
}
