/* Legal documents (/privacy/, /terms/): one Vora OS document window. A 46px title strip with decorative lights, a rail of contents, a Paper body. The marketing tokens equal the OS website-standard semantic tokens, so no --vora-* variables here. */
.legal-window{--legal-strip:46px;--legal-rail:232px;--legal-radius:22px;--legal-light:rgba(23,28,27,.18);--legal-shadow:0 0 0 1px var(--glass-edge),0 30px 65px -28px rgba(41,57,54,.22),0 1px 4px rgba(37,50,43,.04)}
:root[data-theme=dark] .legal-window{--legal-light:rgba(255,255,255,.2);--legal-shadow:0 0 0 1px var(--glass-edge),0 30px 65px -25px rgba(0,0,0,.46)}
/* Frame: a rounded panel like the other page panels; clip (not hidden) keeps the rail sticky against the page scroll. */
#page-main>.legal-window{width:min(100% - 36px,1180px);margin:12px auto 56px}
.legal-window{display:grid;grid-template-columns:var(--legal-rail) minmax(0,1fr);grid-template-areas:"bar bar" "rail head" "rail body";border:1px solid var(--line);border-radius:var(--legal-radius);background:var(--paper);box-shadow:var(--legal-shadow);overflow:clip;color:var(--ink)}
@supports not (overflow:clip){.legal-window{overflow:visible}.legal-bar{border-radius:var(--legal-radius) var(--legal-radius) 0 0}}
/* Strip: lights, crumbs, document switch (the OS segmented control). */
.legal-bar{grid-area:bar;display:grid;grid-template-columns:max-content minmax(0,1fr) max-content;align-items:center;gap:16px;min-height:var(--legal-strip);padding:0 8px 0 12px;background:var(--surface-soft);border-bottom:1px solid var(--line)}
.legal-lights{display:flex}.legal-lights i{display:grid;place-items:center;width:24px;height:24px}.legal-lights i::before{content:"";width:12px;height:12px;border-radius:50%;background:var(--legal-light)}
.legal-crumbs{display:flex;gap:6px;min-width:0;overflow:hidden;color:var(--muted);font-size:13px;font-weight:500;line-height:18px;white-space:nowrap;text-overflow:ellipsis}.legal-crumbs>span:last-child{color:var(--ink)}
.legal-switch{display:inline-flex;gap:2px;padding:2px;background:var(--paper);border:1px solid var(--line);border-radius:12px}
.legal-switch a{display:grid;place-items:center;min-height:28px;padding:0 12px;border-radius:10px;color:var(--muted);font-size:12.5px;font-weight:500;white-space:nowrap}
.legal-switch a:hover{background:var(--chrome-field);color:var(--ink)}
.legal-switch a[aria-current=page]{background:var(--surface-raised);color:var(--ink);font-weight:600;box-shadow:0 0 0 1px var(--line)}
.legal-switch a:focus-visible{outline-offset:1px}
/* Rail: the OS sidebar list. Wraps instead of truncating long headings. */
.legal-rail{grid-area:rail;background:var(--surface-soft);border-right:1px solid var(--line)}
.legal-rail-in{position:sticky;top:84px;max-height:calc(100dvh - 96px);overflow:auto;scrollbar-width:thin;padding:20px 10px 16px}
.legal-rail-title{margin:0 0 8px;padding-inline:10px;color:var(--meta);font-size:12px;font-weight:600}
.legal-toc-list{display:grid;gap:2px;margin:0;padding:0;list-style:none}
.legal-toc-list a{position:relative;display:flex;gap:10px;min-height:32px;padding:6px 10px;border-radius:8px;color:var(--ink);font-size:14px;line-height:20px;letter-spacing:-.006em}
.legal-toc-list a:hover{background:var(--chrome-field)}
.legal-toc-list a:focus-visible{outline-offset:-2px}
.legal-toc-no{flex:none;min-width:1.4em;color:var(--meta);font-variant-numeric:tabular-nums}
/* Document head and body: the OS page header at a reading measure. */
.legal-head{grid-area:head;padding:36px clamp(24px,4vw,56px) 8px}
.legal-head h1{margin:0;font-size:28px;line-height:34px;font-weight:600;letter-spacing:-.022em}
.legal-meta{margin-top:8px;color:var(--meta);font-size:13px;line-height:18px;font-variant-numeric:tabular-nums}
.legal-intro{max-width:68ch;margin-top:20px}.legal-intro p{font-size:16px;line-height:1.7;color:var(--muted)}
.legal-intro ul{margin:12px 0 0;padding-left:1.25em}.legal-intro li{margin-block:6px;font-size:15px;line-height:1.6;color:var(--muted)}
.legal-intro a,.legal-section a:not(.button){display:inline;font-size:inherit;font-weight:inherit;line-height:inherit;text-decoration:underline;text-underline-offset:.18em;overflow-wrap:anywhere}
.legal-body{grid-area:body;min-width:0;padding:8px clamp(24px,4vw,56px) 48px}
.legal-section{max-width:68ch;padding-top:28px;scroll-margin-top:12px}
.legal-section+.legal-section{border-top:1px solid var(--line);margin-top:28px}
.legal-section h2{font-size:20px;line-height:1.3;letter-spacing:-.01em;margin:0 0 12px}
.legal-no{color:var(--meta);font-variant-numeric:tabular-nums}
.legal-section h3{font-size:16px;line-height:1.4;letter-spacing:-.005em;margin:22px 0 8px}
.legal-section :is(p,li){font-size:15px;line-height:1.7}
.legal-section p{margin:0 0 12px}.legal-section :is(ul,ol){margin:0 0 12px;padding-left:1.25em}.legal-section li{margin-block:6px}
.legal-section strong{font-weight:650}
.legal-section code{font-size:.9em;padding:1px 5px;border-radius:6px;background:var(--surface-soft);overflow-wrap:break-word}
.legal-section .table-scroll{margin:6px 0 16px}.legal-section caption{caption-side:top;text-align:left;padding:0 0 8px;color:var(--meta);font-size:13px}
.legal-section :is(th,td){vertical-align:top;font-size:14px;line-height:1.55;text-align:left}.legal-section thead th{font-weight:600;background:var(--surface-soft)}
.legal-end{margin-top:36px;font-size:13px}
.legal-toc-mobile{display:none}
/* Tablet: narrower rail. */
@media (min-width:761px) and (max-width:1100px){.legal-window{--legal-rail:200px}.legal-crumbs>span:not(:last-child){display:none}}
/* Phone (the site switches to the phone shell at 760): one column, contents collapse into details. Screen only, so an A4 print keeps real tables. */
@media screen and (max-width:760px){
 #page-main>.legal-window{width:calc(100% - 20px);margin:4px auto 32px}
 .legal-window{--legal-radius:18px}
 .legal-window{grid-template-columns:minmax(0,1fr);grid-template-areas:"bar" "head" "body"}
 .legal-rail{display:none}
 .legal-bar{grid-template-columns:max-content minmax(0,1fr);gap:8px;padding:0 8px}.legal-crumbs{display:none}.legal-switch{justify-self:end}
 .legal-switch a{min-height:36px}
 .legal-head{padding:24px 18px 4px}.legal-head h1{font-size:24px;line-height:30px}
 .legal-body{padding:4px 18px 32px}
 .legal-toc-mobile{display:block;margin:12px 0 4px;border:1px solid var(--line);border-radius:12px;background:var(--surface-soft)}
 .legal-toc-mobile summary{display:flex;align-items:center;justify-content:space-between;min-height:44px;padding:0 14px;cursor:pointer;list-style:none;font-size:14px;font-weight:600}
 .legal-toc-mobile summary::-webkit-details-marker{display:none}
 .legal-toc-mobile summary .icon{width:15px;transform:rotate(90deg);transition:transform .2s}.legal-toc-mobile[open] summary .icon{transform:rotate(-90deg)}
 .legal-toc-mobile .legal-toc-list{padding:0 6px 8px}.legal-toc-mobile .legal-toc-list a{min-height:40px}
 /* Tables become one card per row: the row heading on top, then each cell under its column heading. */
 .legal-section .table-scroll{overflow:visible}
 .legal-section :is(table,caption,tbody,tr,th,td){display:block}.legal-section table{width:auto;min-width:0}.legal-section thead{display:none}
 .legal-section tbody tr{margin:0 0 10px;border:1px solid var(--line);border-radius:12px;overflow:hidden}
 .legal-section tbody :is(th,td){border:0;padding:4px 14px}.legal-section tbody th{padding:10px 14px;background:var(--surface-soft);font-weight:600}.legal-section tbody td:last-child{padding-bottom:12px}
 .legal-section td[data-label]::before{content:attr(data-label);display:block;margin-top:6px;color:var(--meta);font-size:12px;font-weight:600}
}
/* Forced colours: the current document stays distinguishable without colour. */
@media (forced-colors:active){.legal-lights{display:none}.legal-switch a[aria-current=page]{outline:2px solid CanvasText}}
/* Print: the document only, with addresses shown for outside links. */
@media print{
 #page-main:has(>.legal-window){padding-top:0;background:none}
 #page-main>.legal-window{width:100%;margin:0}
 .legal-window{display:block;border:0;box-shadow:none;border-radius:0;background:#fff;color:#000;overflow:visible}
 .legal-bar,.legal-rail,.legal-toc-mobile,.legal-end{display:none!important}
 .legal-head,.legal-body{padding:0}.legal-section{max-width:none;break-inside:auto}.legal-section h2{break-after:avoid}
 .legal-section a[href^="http"]::after,.legal-section a[href^="mailto:"]::after{content:" (" attr(href) ")";font-size:.85em;word-break:break-all}
 .legal-meta,.legal-no,.legal-intro :is(p,li){color:#333}
}

/* Live site: every page already sits in the OS site window, which has its own bar and crumbs and scrolls #page-main. The document drops its own frame, lights and crumbs; the rail sticks to the top of the window. */
#page-main>.legal-window{width:auto;margin:0;border:0;border-radius:0;box-shadow:none;background:none}
.legal-bar{display:flex;padding:0 24px;border-radius:0}
.legal-lights,.legal-crumbs{display:none}
.legal-rail-in{top:0;max-height:calc(100dvh - 260px);max-height:100cqh}
@media screen and (min-width:761px){#page-main:has(>.legal-window){container-type:size}}
@media screen and (max-width:760px){#page-main>.legal-window{width:auto;margin:0}.legal-bar{padding:0 8px 0 18px}}
@media print{#page-main:has(>.legal-window)>.site-footer{display:none}}
