/* Long documents such as the legal pages. Loads after
   site.css, which holds the shell (colours, header, footer, circles); this file
   adds the document head, the contents list and the text. */
/* Document head: title, then the version, effective date and scope lines */
.doc-head{position:relative;z-index:1;padding-block:clamp(3rem,6vw,5rem) clamp(2rem,4vw,3rem)}
.doc-head h1{font-size:clamp(2.5rem,5.2vw,4.25rem);letter-spacing:-0.04em;line-height:1}
.doc-head__meta{margin-top:1.5rem;max-width:46em;color:var(--sand-700);font-size:1rem;line-height:1.6}
.doc-head__meta strong{color:var(--ink);font-weight:600}
.doc-head__meta a{color:var(--chestnut);text-decoration:underline;text-decoration-thickness:1.5px;text-underline-offset:.22em;text-decoration-color:var(--leaf)}
.doc-head__meta a:hover{color:var(--leaf-700)}

/* Contents beside the text on wide screens, folded above it on narrow ones */
.doc{position:relative;z-index:1;display:grid;grid-template-columns:minmax(0,15rem) minmax(0,1fr);gap:4.5rem;align-items:start;padding-bottom:var(--gap)}
.toc{position:sticky;top:1.5rem;max-height:calc(100vh - 3rem);overflow:auto;padding:1.25rem 0;border-top:2px solid var(--chestnut);scrollbar-width:thin}
.toc summary{list-style:none;cursor:pointer;font-size:.95rem;font-weight:600;color:var(--chestnut)}
.toc summary::-webkit-details-marker{display:none}
.toc ol{display:grid;margin-top:.75rem;font-size:.875rem;line-height:1.35;color:var(--sand-700)}
.toc li a{display:block;padding:.4rem 0;border-bottom:1px solid transparent}
.toc li a:hover{color:var(--leaf-700)}
.toc li+li a{border-top:var(--rule)}
@media (max-width:64rem){
  .doc{grid-template-columns:1fr;gap:2rem}
  .toc{position:static;max-height:none;overflow:visible;padding:0;border-top:var(--rule);border-bottom:var(--rule)}
  .toc summary{display:flex;justify-content:space-between;align-items:center;padding:1rem 0}
  .toc summary::after{content:"+";font-size:1.4rem;font-weight:400;line-height:1;color:var(--leaf-600)}
  .toc[open] summary::after{content:"\2212"}
  .toc ol{margin:0 0 1rem}
}

/* The text */
.prose{min-width:0;line-height:1.65;overflow-wrap:break-word}
.prose>*{max-width:46rem}
.prose>.table{max-width:none}
.prose>*+*{margin-top:1.1rem}
.prose h2{margin-top:3.5rem;padding-top:2rem;border-top:var(--rule);font-size:clamp(1.6rem,2.6vw,2.125rem);letter-spacing:-0.025em;line-height:1.15;scroll-margin-top:1.5rem}
.prose>h2:first-child{margin-top:0}
.prose h3{margin-top:2.25rem;font-size:1.2rem;letter-spacing:-0.015em;line-height:1.3;scroll-margin-top:1.5rem}
.prose h2+*,.prose h3+*{margin-top:1rem}
.prose .n{color:var(--leaf-600)}
.prose strong{font-weight:600}
.prose a{color:var(--chestnut);text-decoration:underline;text-decoration-thickness:1.5px;text-underline-offset:.22em;text-decoration-color:var(--leaf);overflow-wrap:anywhere}
.prose a:hover{color:var(--leaf-700)}
.prose ul,.prose ol{display:grid;gap:.6rem}
.prose li{position:relative;padding-left:1.75rem}
.prose ul>li::before{content:"";position:absolute;left:0;top:.8em;width:1rem;height:2px;background:var(--leaf)}
.prose ol{counter-reset:item}
.prose ol>li{counter-increment:item}
.prose ol>li::before{content:counter(item) ".";position:absolute;left:0;font-weight:600;color:var(--leaf-600)}
.prose li>ul,.prose li>ol{margin-top:.6rem}
.prose li>p+p{margin-top:.6rem}
.prose code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.88em;background:var(--sand-100);padding:.05em .3em}

/* "In short" lines read as the section's summary */
.prose .in-short{padding:.15rem 0 .15rem 1.1rem;border-left:3px solid var(--leaf);font-size:1.125rem;line-height:1.55;color:var(--chestnut)}
.prose .in-short strong{font-weight:600}

/* Lettered clauses keep their (a), (b), (c) hanging in the margin */
.prose .clauses span{display:block;padding-left:2.25rem;text-indent:-2.25rem}
.prose .clauses span+span{margin-top:.45rem}

.prose blockquote{margin:2rem 0 0;padding:1.5rem clamp(1.1rem,3vw,2rem);background:var(--sand-100);border-left:3px solid var(--chestnut)}
.prose blockquote>*+*{margin-top:1rem}

.table{overflow-x:auto;scrollbar-width:thin;border-top:2px solid var(--chestnut)}
.prose table{width:100%;border-collapse:collapse;font-size:.9375rem;line-height:1.5}
.prose th,.prose td{padding:.8rem 1.25rem .8rem 0;text-align:left;vertical-align:top;border-bottom:var(--rule)}
.prose th:last-child,.prose td:last-child{padding-right:0}
.prose th{font-weight:600;color:var(--chestnut)}
.table--wide table{min-width:56rem}
.table--mid table{min-width:40rem}

/* Open questions stay visible until they are resolved */
.flag{font:inherit;font-size:.8em;font-weight:600;letter-spacing:.01em;padding:.1em .35em;white-space:nowrap;background:var(--chestnut-100);color:var(--chestnut);-webkit-box-decoration-break:clone;box-decoration-break:clone}
.flag--gate{background:var(--chestnut);color:var(--cream)}
.flag--legal{background:var(--cream);box-shadow:inset 0 0 0 1.5px var(--chestnut)}
