/* Reading pages in the Aperture identity: terms, privacy, security, changelog
   and the 404. Loaded after aperture.css and pages.css.
   A reading card with a ~68ch measure, a sticky "On this page" card on
   desktop, space between sections (no rules), and no motion. The markup inside
   .doc-body is the legal text exactly as written; this sheet only dresses it. */
.pg-doc .wrap{width:min(1200px,calc(100% - 64px));margin-inline:auto}
.grid-bg{display:none}
.pg-doc .doc-hero{padding:72px 0 0}
.pg-doc .eyebrow{display:flex;align-items:center;gap:10px;margin-bottom:24px;font-size:.9375rem;font-weight:500;color:var(--muted)}
.pg-doc .eyebrow::before{content:"";width:14px;height:14px;flex:none;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8.1 1.2h7.8l6.9 6.9v7.8l-6.9 6.9H8.1l-6.9-6.9V8.1z' fill='%230f7a5a'/%3E%3Cpath d='M9.6 4.8h4.8l4.8 4.8v4.8l-4.8 4.8H9.6l-4.8-4.8V9.6z' fill='%230a2b21'/%3E%3Cpath d='M10.6 7.2h2.8l3.4 3.4v2.8l-3.4 3.4h-2.8l-3.4-3.4v-2.8z' fill='%239fe8c9'/%3E%3C/svg%3E") center/contain no-repeat}
.pg-doc .doc-hero h1{font-size:clamp(2.25rem,4.2vw,3.75rem);font-weight:600;letter-spacing:-.04em;line-height:1.04;max-width:20ch}
.pg-doc .doc-hero h1 em{font-style:normal;color:var(--mint)}
.pg-doc .doc-hero .lede{margin-top:22px;max-width:44rem;font-size:1.125rem;line-height:1.6;color:var(--muted)}
.pg-doc .doc-hero .lede a{color:var(--text);text-decoration:underline;text-underline-offset:4px;text-decoration-color:#4b5261}
.pg-doc .doc-hero .lede a:hover{text-decoration-color:var(--mint)}
.doc-meta{display:flex;flex-wrap:wrap;gap:8px;margin-top:26px}
.doc-meta span{display:inline-flex;align-items:center;gap:8px;height:30px;padding:0 10px;border-radius:6px;background:var(--panel-hi);border:1px solid var(--hair);font:500 .8125rem/1 var(--mono);color:var(--muted);font-variant-numeric:tabular-nums}
.doc-meta svg{width:13px;height:13px;color:var(--settled);flex:none}

.doc-layout{display:grid;grid-template-columns:220px minmax(0,760px);gap:64px;align-items:start;margin-top:96px;padding-bottom:120px}
.doc-toc{position:sticky;top:104px;display:grid;padding:18px 10px 12px;background:var(--panel);border:1px solid var(--hair);border-radius:12px;box-shadow:var(--panel-edge),var(--lift)}
.doc-toc-label{padding:0 10px 8px;font-size:.8125rem;font-weight:500;color:var(--faint)}
.doc-toc a,.doc-toc-mobile a{position:relative;display:block;padding:7px 10px 7px 24px;border-radius:6px;font-size:.875rem;font-weight:500;line-height:1.4;color:var(--muted);transition:color 160ms ease-out,background-color 160ms ease-out}
.doc-toc a::before,.doc-toc-mobile a::before{content:"";position:absolute;left:10px;top:13px;width:6px;height:6px;background:#4b5261;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath d='M2.34 0h3.32L8 2.34v3.32L5.66 8H2.34L0 5.66V2.34z'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath d='M2.34 0h3.32L8 2.34v3.32L5.66 8H2.34L0 5.66V2.34z'/%3E%3C/svg%3E") center/contain no-repeat}
.doc-toc a:hover,.doc-toc-mobile a:hover{color:var(--text);background:var(--hover)}
.doc-toc a.on,.doc-toc-mobile a.on{color:var(--text)}
.doc-toc a.on::before,.doc-toc-mobile a.on::before{background:var(--mint)}
.toc-date{display:block;font:500 .75rem/1.4 var(--mono);color:var(--faint);font-variant-numeric:tabular-nums}
.doc-toc-m{display:none}

/* the reading card */
.doc-body{min-width:0;padding:56px 64px 60px;background:var(--panel);border:1px solid var(--hair);border-radius:12px;box-shadow:var(--panel-edge),var(--lift)}
.doc-body section{min-width:0}
.doc-body section+section{margin-top:64px}
.doc-body h2{font-size:clamp(1.5rem,2.2vw,1.875rem);font-weight:600;letter-spacing:-.025em;line-height:1.2}
.doc-body h2 .num{font:500 .9375rem/1 var(--mono);color:var(--settled);margin-right:12px;vertical-align:.3em;font-variant-numeric:tabular-nums}
.doc-body h3{font-size:1.0625rem;margin-top:28px}
.doc-body .doc-sub{margin-top:40px}
.doc-body p,.doc-body li,.doc-body dd{overflow-wrap:break-word}
.doc-body p{margin-top:14px;max-width:68ch;font-size:1rem;line-height:1.75;color:#c9ced8}
.doc-body .doc-plain{position:relative;margin-top:16px;padding:14px 16px 14px 40px;border-radius:8px;background:var(--sunk);font-size:1.0313rem;line-height:1.65;font-weight:500;color:var(--text);max-width:none}
.doc-body .doc-plain::before{content:"";position:absolute;left:16px;top:22px;width:8px;height:8px;background:var(--mint);-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath d='M2.34 0h3.32L8 2.34v3.32L5.66 8H2.34L0 5.66V2.34z'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath d='M2.34 0h3.32L8 2.34v3.32L5.66 8H2.34L0 5.66V2.34z'/%3E%3C/svg%3E") center/contain no-repeat}
.doc-body ul,.doc-body ol{margin:14px 0 0;padding-left:22px;display:grid;gap:8px;max-width:68ch}
.doc-body li{font-size:.9688rem;line-height:1.7;color:#c9ced8}
.doc-body li::marker{color:var(--faint)}
.doc-body strong,.doc-body b{color:var(--text);font-weight:600}
.doc-body a{color:var(--text);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px;text-decoration-color:#4b5261;transition:text-decoration-color 160ms ease-out}
.doc-body a:hover{text-decoration-color:var(--mint)}
.doc-body code{font-family:var(--mono);font-size:.875em;padding:1px 6px;border-radius:6px;background:var(--sunk);color:var(--text);overflow-wrap:anywhere}
.doc-body svg{width:16px;height:16px;flex:none}
.doc-rows{margin:16px 0 0;display:grid;gap:6px}
.doc-row{display:grid;grid-template-columns:180px minmax(0,1fr);gap:18px;padding:12px 16px;border-radius:8px;background:var(--sunk)}
.doc-row dt{font:500 .8125rem/1.7 var(--mono);color:var(--text);overflow-wrap:anywhere}
.doc-row dd{margin:0;font-size:.9375rem;line-height:1.65;color:var(--muted)}
.doc-panel,.doc-contact{margin-top:20px;padding:18px 20px 20px;border-radius:10px;background:var(--sunk)}
.doc-panel p:first-child,.doc-contact h3:first-child{margin-top:0}
.doc-panel-title{display:flex;align-items:center;gap:8px;font-weight:600;color:var(--text)!important}
.doc-panel-title svg,.doc-proud svg{color:var(--settled)}
.doc-panel p{max-width:none}
.doc-proud{display:flex;align-items:center;gap:8px;color:var(--text)!important;font-weight:500}
.doc-chips{list-style:none;padding:0!important;display:flex!important;flex-wrap:wrap;gap:8px!important;max-width:none!important}
.doc-chips li{display:inline-flex;align-items:center;gap:8px;min-height:32px;padding:0 10px;border-radius:6px;background:var(--sunk);font-size:.875rem;color:var(--text)}
.doc-chips svg{color:var(--settled);width:14px;height:14px}
.doc-nope{list-style:none;padding:0!important}
.doc-nope li{display:flex;gap:12px;align-items:flex-start;padding:12px 16px;border-radius:8px;background:var(--sunk)}
.doc-nope svg{margin-top:4px;color:var(--faint)}
.doc-nope s{text-decoration-thickness:1px;text-decoration-color:var(--faint)}
.guards{margin-top:20px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.guard{padding:18px 18px 20px;border-radius:10px;background:var(--sunk)}
.guard-top{display:flex;align-items:center;gap:12px}
.guard-top h3{margin:0;font-size:1rem;line-height:1.35}
.guard p{margin-top:10px;font-size:.9375rem;line-height:1.65;color:var(--muted)}
.tile{flex:none;display:grid;place-items:center;width:34px;height:34px;color:var(--settled);background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cpolygon points='8.95,1.80 19.05,1.80 26.20,8.95 26.20,19.05 19.05,26.20 8.95,26.20 1.80,19.05 1.80,8.95' fill='none' stroke='%235d6675' stroke-width='1.3'/%3E%3C/svg%3E") center/contain no-repeat}
.tile svg{width:15px;height:15px}
.doc-mail{display:inline-flex;align-items:center;gap:8px;margin-top:16px;min-height:40px;padding:0 14px;border-radius:8px;border:1px solid var(--hair);background:var(--panel-hi);font:500 .875rem/1 var(--mono);color:var(--text)!important;text-decoration:none!important;box-shadow:0 1px 2px #00000020;transition:background-color 160ms ease-out}
.doc-mail:hover{background:var(--hover)}
.doc-mail svg{color:var(--settled)}
.doc-contact .fine{margin-top:12px;font-size:.8125rem;color:var(--faint)}
.doc-scroll{margin-top:16px}
.doc-scroll:focus-visible{outline:2px solid var(--focus);outline-offset:4px;border-radius:8px}
.doc-table{width:100%;border-collapse:separate;border-spacing:0 6px;font-size:.9375rem}
.doc-table th{text-align:left;font-weight:500;font-size:.75rem;color:var(--faint);padding:4px 14px 0}
.doc-table td{padding:12px 14px;background:var(--sunk);vertical-align:top;line-height:1.55;color:var(--muted)}
.doc-table td:first-child{border-radius:8px 0 0 8px}
.doc-table td:last-child{border-radius:0 8px 8px 0;white-space:nowrap}
.doc-next{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:64px}
.doc-next a{display:grid;gap:4px;padding:14px 16px 16px;border-radius:10px;background:var(--sunk);text-decoration:none!important;transition:background-color 160ms ease-out}
.doc-next a:hover{background:var(--hover)}
.doc-next .k{font-size:.75rem;font-weight:500;color:var(--faint)}
.doc-next .v{font-weight:600;color:var(--text)}

/* the changelog: dated entries */
.pg-log .doc-body section+section{margin-top:72px}
.entry-date{margin:0!important;font:500 .8125rem/1 var(--mono)!important;color:var(--faint)!important;font-variant-numeric:tabular-nums}
.entry h2{margin-top:12px}
.entry h2 a{text-decoration:none;color:var(--text)}
.entry h2 a:hover{text-decoration:underline;text-decoration-color:var(--mint)}
.doc-body .group{margin-top:26px;font-size:.8125rem;font-weight:600;letter-spacing:.01em;color:var(--muted)}
.doc-body .group+ul{margin-top:10px}
.doc-body .versions{margin-top:24px;padding:12px 14px;border-radius:8px;background:var(--sunk);font:400 .8125rem/1.7 var(--mono);color:var(--faint);max-width:none}
.doc-body .versions strong{color:var(--muted)}
.doc-body .versions code{padding:0;background:none;font-size:inherit;color:var(--muted)}
.doc-body .doc-link{margin-top:12px;font-size:.875rem;color:var(--faint)}
.folded-anchor{display:block}

/* the 404: an empty page, so the one place the closing gem floats in its
   vault rings above a centred card (static: nothing loops) */
.nf{display:grid;min-height:calc(100svh - 72px)}
.nf-stage{display:grid;align-content:center;padding:72px 0 96px}
.nf-stage .start-ap{margin-bottom:40px}
.nf-card{width:min(520px,100%);padding:34px 36px 36px;text-align:center}
.nf-code{font-size:.8125rem;color:var(--faint);margin:0 0 10px!important;letter-spacing:.04em}
.nf-card h1{font-size:clamp(2rem,4vw,2.75rem);font-weight:600;letter-spacing:-.035em;line-height:1.1}
.nf-card p:not(.nf-code){margin:14px auto 28px!important;max-width:34ch;color:var(--muted);font-size:1rem}
.nf-card .actions{justify-content:center}

@media (max-width:1100px){
  .doc-layout{grid-template-columns:minmax(0,1fr);gap:0;margin-top:40px}
  .doc-toc{display:none}
  .doc-toc-m{display:block;width:min(1200px,calc(100% - 64px));margin:40px auto 0;padding:0}
  .doc-toc-m summary{position:relative;list-style:none;cursor:pointer;padding:14px 48px 14px 18px;font-weight:600;font-size:.9375rem;border-radius:12px}
  .doc-toc-m summary::-webkit-details-marker{display:none}
  .doc-toc-m summary::after{content:"";position:absolute;right:18px;top:50%;width:16px;height:16px;margin-top:-8px;background:var(--muted);-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 6.5 8 10l3.5-3.5'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 6.5 8 10l3.5-3.5'/%3E%3C/svg%3E") center/contain no-repeat}
  .doc-toc-m[open] summary::after{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 9.5 8 6l3.5 3.5'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 9.5 8 6l3.5 3.5'/%3E%3C/svg%3E")}
  .doc-toc-m summary:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
  .doc-toc-mobile{display:grid;padding:0 8px 10px}
  .doc-body{max-width:860px}
  .pg-log .doc-layout{margin-top:24px}
}
@media (max-width:760px){
  .guards,.doc-next{grid-template-columns:1fr}
  .doc-row{grid-template-columns:1fr;gap:2px}
  .doc-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
  .doc-table,.doc-table tbody,.doc-table tr,.doc-table td{display:block}
  .doc-table{border-spacing:0}
  .doc-table tr{margin-bottom:6px;padding:12px 14px;border-radius:8px;background:var(--sunk)}
  .doc-table td{padding:0;background:none;border-radius:0!important;white-space:normal!important}
  .doc-table td+td{margin-top:4px}
  .doc-table td:last-child{font-size:.8125rem;color:var(--faint)}
}
@media (max-width:500px){
  .pg-doc .wrap,.doc-toc-m{width:calc(100% - 32px)}
  .pg-doc .doc-hero{padding-top:28px}
  .pg-doc .eyebrow{font-size:.8125rem;margin-bottom:14px}
  .pg-doc .doc-hero h1{font-size:clamp(2rem,8.6vw,2.25rem);line-height:1.06}
  .pg-doc .doc-hero .lede{font-size:.9688rem;margin-top:14px}
  .doc-meta{margin-top:18px}
  .doc-toc-m{margin-top:28px}
  .doc-layout{margin-top:16px;padding-bottom:72px}
  .doc-body{padding:26px 18px 30px}
  .doc-body section+section{margin-top:48px}
  .pg-log .doc-body section+section{margin-top:56px}
  .doc-body p{font-size:.9688rem;line-height:1.7}
  .doc-body .doc-plain{font-size:.9688rem;padding:12px 14px 12px 34px}
  .doc-body .doc-plain::before{left:14px;top:20px}
  .doc-row{padding:10px 12px}
  .nf{min-height:calc(100svh - 62px)}
  .nf-stage{padding:48px 0 64px}
  .nf-stage .start-ap{margin-bottom:28px}
  .nf-card{padding:26px 18px 28px}
  .nf-card .actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(148px,1fr));gap:10px}
  .nf-card .btn{width:100%}
}
