/* The reading pages (public/terms.html, docs.html, changelog.html): the app's colors, faces and cards on a plain page. style.css brings the
   light and dark tokens; this file sets the page itself. */
body.terms-page{display:block;min-height:100dvh;margin:0;padding:0 24px;background:var(--bg);color:var(--ink);font:400 1rem/1.65 var(--ui);letter-spacing:normal}
.terms-main,.terms-foot{width:100%;max-width:760px;margin-inline:auto}

/* The app's frame (public/shell.js): the island on top with Connect and the menu, the dock at the bottom. The island
   reuses the app's .isl classes; it is not sized by script here, so its open state grows to the menu. */
.rd-shell a{text-decoration:none}
.rd-shell .isl:not(.is-open) .isl-panel{display:none}
.rd-shell .isl.is-open{height:auto}
.rd-menu{width:min(300px,calc(100vw - 24px));padding-block-start:10px}
.rd-menu-head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:34px;margin-block-end:6px}
.rd-menu-close{width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:var(--p-mut);transition:background-color .15s var(--ease-out)}
@media(hover:hover) and (pointer:fine){.rd-menu-close:hover{background:var(--p-soft);color:var(--p-fg)}}
.rd-menu-pages{display:flex;flex-direction:column;gap:2px}
.rd-menu-pages a{display:flex;align-items:center;gap:12px;min-height:44px;padding-inline:10px;border-radius:14px;color:var(--p-fg);font:500 .875rem var(--ui);transition:background-color .15s var(--ease-out)}
.rd-menu-pages a .ms{font-size:1.25rem;color:var(--p-mut)}
.rd-menu-pages a[aria-current=page]{background:var(--p-soft);font-weight:600}
.rd-menu-pages a[aria-current=page] .ms{color:var(--p-fg)}
@media(hover:hover) and (pointer:fine){.rd-menu-pages a:hover{background:var(--p-soft)}}
.rd-menu-foot{display:flex;align-items:center;gap:16px;margin-block-start:10px;padding-block-start:12px;border-block-start:1px solid var(--p-line);font:500 .8125rem var(--ui)}
.rd-menu-foot a{color:var(--p-mut)}
.rd-menu-foot .rd-menu-open{display:inline-flex;align-items:center;gap:4px;margin-inline-end:auto;color:var(--p-fg);font-weight:600}
.rd-menu-foot .rd-menu-open .ms{font-size:1rem}
@media(hover:hover) and (pointer:fine){.rd-menu-foot a:hover{color:var(--p-fg)}}

/* The dock: the app's exported dock is styled inline, so its shape is drawn again here from the same tokens. */
.rd-dock{position:fixed;inset-inline-start:50%;inset-block-end:20px;z-index:40;display:flex;align-items:flex-end;gap:6px;height:68px;padding:0 8px 8px;box-sizing:border-box;border-radius:999px;background:var(--dockBg);-webkit-backdrop-filter:blur(24px) saturate(1.6);backdrop-filter:blur(24px) saturate(1.6);box-shadow:0 24px 50px -20px oklch(.196 .02 284.4 / .35),inset 0 0 0 1px var(--dockRing);color:var(--dockFg);transform:translateX(-50%)}
.rd-dock a{position:relative;flex:none;display:flex;align-items:center;justify-content:center;width:52px;height:52px;border-radius:50%;color:var(--dockFg);text-decoration:none;transition:background-color .35s,transform .4s var(--spring)}
.rd-dock a .ms{font-size:1.5rem}
.rd-dock a>span:last-child{position:absolute;inset-block-end:calc(100% + 12px);inset-inline-start:50%;transform:translate(-50%,4px);padding:7px 12px;border-radius:999px;background:linear-gradient(180deg,#2d2f37,#121317);color:#fff;font:600 .75rem var(--ui);white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .2s,transform .35s var(--spring)}
.rd-dock .rd-dock-connect{display:none}
@media(hover:hover) and (pointer:fine){
 .rd-dock a:hover{transform:translateY(-2px);background:var(--dockTab)}
 .rd-dock a:hover>span:last-child,.rd-dock a:focus-visible>span:last-child{opacity:1;transform:translate(-50%,0)}
}
.rd-dock a:active{transform:scale(.92)}
.rd-dock{--focus-ring:currentColor;--focus-offset:-3px}
@media(max-width:800px),(max-height:500px){
 .rd-dock{inset-block-end:var(--m-dock-gap,12px);width:calc(100vw - 24px - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px));max-width:520px;height:var(--m-dock,60px);padding:6px;gap:2px;align-items:center;border-radius:30px;overflow:clip;box-shadow:0 2px 12px -4px oklch(.196 .02 284.4 / .28),inset 0 0 0 1px var(--dockRing)}
 .rd-dock a{flex:1 1 0;min-width:0;width:auto;height:48px;border-radius:24px;flex-direction:column;gap:2px;transition:transform .25s var(--ease-sheet)}
 .rd-dock a .ms{font-size:1.375rem}
 .rd-dock a>span:last-child{position:static;transform:none;padding:0;background:none;color:inherit;font-size:.65625rem;opacity:.92;max-width:100%;overflow:clip;text-overflow:ellipsis;line-height:1.1;letter-spacing:.01em;transition:none}
 .rd-dock .rd-dock-connect{display:flex}
}
@media(max-width:800px) and (orientation:portrait){.rd-dock a>span:last-child{font-size:.71875rem}}

.terms-hero{display:flex;flex-direction:column;align-items:flex-start;gap:14px;padding-block:calc(env(safe-area-inset-top,0px) + 84px) 28px}
.terms-kicker{display:inline-flex;align-items:center;gap:6px;padding-block:6px;padding-inline:10px 12px;border-radius:99px;background:var(--card);color:var(--ink);font:600 .8125rem var(--ui)}
.terms-kicker .ms{font-size:1rem}
.terms-hero h1{margin:0;font:700 clamp(3rem,2.2rem + 4vw,4.5rem)/1 var(--disp);letter-spacing:-.04em}
.terms-meta{margin:0;color:var(--mut);font-size:.875rem;font-variant-numeric:tabular-nums}
.terms-lead{margin:4px 0 0;max-width:62ch;font-size:1.0625rem;text-wrap:pretty}

/* The short version: one card of facts, each with the app's soft color tiles. */
.terms-short{padding:18px 24px 16px;border-radius:28px;background:var(--card)}
.terms-short h2{margin:0;color:var(--mut);font:500 .875rem var(--ui)}
.terms-facts{list-style:none;margin:4px 0 0;padding:0}
.terms-facts li{display:flex;align-items:center;gap:14px;padding-block:12px;font-size:.9375rem;line-height:1.45;text-wrap:pretty}
.terms-facts li+li{border-block-start:1px solid var(--line)}
.terms-icon{flex:none;display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:12px;background:var(--soft2);color:var(--ink)}
.terms-icon.is-mint{background:var(--mint)}.terms-icon.is-cor{background:var(--cor)}.terms-icon.is-lil{background:var(--lil)}
.terms-note{margin:6px 0 0;color:var(--mut);font-size:.8125rem}

/* Section links stay at the top of the screen, in the chart time frame's track; the one being read is raised. */
.terms-nav{position:sticky;inset-block-start:0;z-index:5;margin-block:24px 4px;padding-block:10px;background:var(--bg)}
/* On desktop the track stops under the island: the nav's own top padding is the band the island floats over, and the
   negative margin keeps the track where it was, over the hero's empty bottom padding. */
@media(min-width:801px) and (min-height:501px){
 .terms-nav{margin-block-start:-28px;padding-block-start:62px}
 .terms-page .terms-section{scroll-margin-block-start:126px}
}
.terms-nav-track{display:flex;gap:2px;width:max-content;max-width:100%;padding:3px;border-radius:99px;background:var(--soft2);overflow-x:auto;scrollbar-width:none;box-sizing:border-box}
.terms-nav-track::-webkit-scrollbar{display:none}
.terms-nav a{flex:none;display:inline-flex;align-items:center;height:32px;padding-inline:14px;border-radius:99px;color:var(--mut);font:500 .8125rem var(--ui);text-decoration:none;white-space:nowrap;transition:color .2s var(--ease-out),background-color .2s var(--ease-out),box-shadow .2s var(--ease-out)}
.terms-page .terms-nav a{text-decoration:none}
.terms-nav a[aria-current=true]{background:var(--card);color:var(--ink);box-shadow:var(--t-raised)}
@media(hover:hover) and (pointer:fine){.terms-nav a:hover{color:var(--ink)}}

.terms-section{padding-block:28px 4px;scroll-margin-block-start:64px}
.terms-section h2{display:flex;align-items:center;gap:12px;margin:0 0 16px;font:700 clamp(1.75rem,1.45rem + 1.2vw,2.25rem)/1.1 var(--disp);letter-spacing:-.03em}
.terms-num{flex:none;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:12px;background:var(--card);box-shadow:var(--t-raised);font:600 1rem var(--ui);letter-spacing:0}
.terms-section h3{margin:28px 0 8px;font:600 1.0625rem/1.4 var(--ui)}
.terms-section p{margin:0 0 14px;max-width:68ch;text-wrap:pretty}
.terms-section ul{margin:0 0 16px;padding-inline-start:22px;max-width:68ch}
.terms-section li{margin-block:8px;padding-inline-start:4px;text-wrap:pretty}
.terms-section li::marker{color:var(--mut)}
.terms-page main a{color:inherit;text-decoration:underline;text-decoration-color:color-mix(in oklch,currentColor 40%,transparent);text-decoration-thickness:1px;text-underline-offset:3px}
@media(hover:hover) and (pointer:fine){.terms-page main a:hover{text-decoration-color:currentColor}}
.terms-alert{display:flex;align-items:flex-start;gap:12px;max-width:none!important;padding:14px 18px;border-radius:20px;background:var(--cor)}
.terms-alert .ms{flex:none;margin-block-start:2px}

/* Tables are cards; on phones each row stacks into its own block. */
.terms-table{margin:4px 0 18px;border-radius:24px;background:var(--card);overflow:hidden}
.terms-table>div{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.8fr) minmax(0,1.6fr);gap:16px;padding:14px 20px;font-size:.9375rem;line-height:1.45}
.terms-table>div+div{border-block-start:1px solid var(--line)}
.terms-table>.terms-table-head{padding-block:12px;color:var(--mut);font-size:.8125rem;font-weight:500}
.terms-company{margin:0;border-radius:24px;background:var(--card);overflow:hidden}
.terms-company>div{display:grid;grid-template-columns:180px minmax(0,1fr);gap:16px;padding:14px 20px}
.terms-company>div+div{border-block-start:1px solid var(--line)}
.terms-company dt{color:var(--mut)}
.terms-company dd{margin:0}
@media(max-width:640px){
 .terms-table>div,.terms-company>div{grid-template-columns:minmax(0,1fr);gap:2px}
 .terms-table>.terms-table-head{display:none}
 .terms-table>div>span:nth-child(2){color:var(--mut);font-size:.875rem}
}

/* Details the operator still has to fill in. */
.terms-page mark[data-fill]{padding-inline:3px;border-radius:5px;background:var(--amb);color:oklch(.187 .008 274.5);box-decoration-break:clone;-webkit-box-decoration-break:clone}

.terms-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 24px;margin-block-start:28px;padding-block:24px calc(max(28px,env(safe-area-inset-bottom,0px)) + 92px);border-block-start:1px solid var(--line);color:var(--mut);font-size:.875rem}
.terms-foot p{display:flex;flex-wrap:wrap;align-items:center;gap:0 20px;margin:0}
.terms-foot a{display:inline-flex;align-items:center;min-height:44px;color:inherit;text-underline-offset:3px}

@media(max-width:800px),(max-height:500px){
 body.terms-page{padding-inline:16px}
 .terms-hero{padding-block:calc(env(safe-area-inset-top,0px) + 44px) 20px}
 .terms-foot{padding-block-end:calc(var(--m-bottom,110px) + 8px)}
 .terms-short{padding:14px 18px 12px}
 .terms-table>div,.terms-company>div{padding-inline:16px}
}
@media print{
 body.terms-page{padding:0;background:#fff;color:#000;font:10.5pt/1.5 system-ui,sans-serif}
 .rd-shell,.rd-dock,.beta-mark,.terms-nav,.terms-foot,.skip-link{display:none}
 .terms-main{max-width:none}
 .terms-short,.terms-table,.terms-company,.terms-alert,.terms-icon,.terms-num{background:none;box-shadow:none}
 .terms-section h2,.terms-section h3{break-after:avoid}
 .terms-table>div,.terms-company>div{break-inside:avoid}
}

/* The guide (docs.html) and the changelog (changelog.html) read the same way; these are their own parts. */
.docs-steps{margin:0 0 16px;padding-inline-start:22px;max-width:68ch}
.docs-steps li{margin-block:10px;padding-inline-start:6px;text-wrap:pretty}
.docs-steps li::marker{color:var(--mut);font-weight:600}
.terms-page code{padding:1px 5px;border-radius:6px;background:var(--soft2);font:.875em/1 ui-monospace,SFMono-Regular,Menlo,monospace;overflow-wrap:anywhere}
.docs-words{margin:4px 0 0;border-radius:24px;background:var(--card);overflow:hidden}
.docs-words>div{display:grid;grid-template-columns:160px minmax(0,1fr);gap:16px;padding:14px 20px;font-size:.9375rem;line-height:1.45}
.docs-words>div+div{border-block-start:1px solid var(--line)}
.docs-words dt{font-weight:600}
.docs-words dd{margin:0;text-wrap:pretty}
/* The changelog: one column, card first. Each release is its card, then date, title, counts and its changes. */
.log-list{display:flex;flex-direction:column;gap:44px;padding-block:8px 4px}
.log-entry{container-type:inline-size;display:grid;gap:12px;scroll-margin-block-start:72px}
.log-entry:target .log-card{box-shadow:0 0 0 2px var(--ink)}
/* The release card: a fixed light artwork, the same as the posts carry, so its colors never follow the theme. The
   pill word, mascot and pill colour are picked by the date in changelog.js. */
.log-card{position:relative;aspect-ratio:16/9;margin-block-end:4px;border-radius:2cqw;background:#f5f3ee;color:#121317;overflow:hidden;isolation:isolate;box-shadow:0 1px 0 oklch(0 0 none / .05);--pill:oklch(.91 .07 160)}
.log-card.is-amb{--pill:oklch(.91 .08 85)}.log-card.is-lil{--pill:oklch(.91 .06 285)}.log-card.is-cor{--pill:oklch(.91 .06 40)}
.log-card-brand{position:absolute;inset-block-start:6cqw;inset-inline-start:6cqw;display:flex;align-items:center;gap:1cqw;font:600 2.1cqw/1 var(--ui);letter-spacing:-.01em}
.log-card-brand img{display:block;width:3.5cqw;height:3.5cqw;outline:0}
.log-card-date{position:absolute;inset-block-start:6.4cqw;inset-inline-end:6cqw;font:500 1.5cqw/1 var(--ui);color:#6c6e78}
.log-card-title{position:absolute;inset-inline-start:5.7cqw;inset-block-end:12.2cqw;width:62cqw;margin:0;font:600 9.2cqw/1.04 var(--disp);letter-spacing:-.045em;text-wrap:balance}
.log-card-title.is-l2{font-size:7.6cqw}.log-card-title.is-l3{font-size:6.4cqw}
.log-pill{display:inline-block;padding:0 .22em;border-radius:999px;background:var(--pill);color:#121317;white-space:nowrap}
.log-card-foot{position:absolute;inset-inline-start:6cqw;inset-block-end:5.4cqw;font:500 1.6cqw/1 var(--ui);color:#6c6e78}
.log-card-foot b{color:#121317;font-weight:600}
/* The mascot is a 16:9 picture that fills the card: cream, the mascot at the bottom right and its shadow baked in, because
   Chrome shades any picture's rectangle under the page's blended grain, and a picture the size of the card shades evenly. */
.log-card-mascot{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.log-card::after{content:"";position:absolute;inset:0;opacity:.07;mix-blend-mode:multiply;pointer-events:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E")}
.log-head{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px}
.log-date{color:var(--mut);font-size:.875rem;font-variant-numeric:tabular-nums;text-decoration:none!important}
.log-latest{display:inline-flex;align-items:center;height:22px;padding-inline:9px;border-radius:99px;background:var(--mint);color:var(--ink);font:600 .75rem var(--ui)}
.log-head h2{flex-basis:100%;margin:0;font:700 clamp(1.375rem,1.2rem + .8vw,1.75rem)/1.15 var(--disp);letter-spacing:-.03em}
.log-counts{display:flex;flex-wrap:wrap;gap:6px}
.log-counts span{display:inline-flex;align-items:center;gap:6px;height:24px;padding-inline:8px 10px;border-radius:99px;background:var(--card);color:var(--mut);font:500 .75rem var(--ui)}
.log-counts i{width:7px;height:7px;border-radius:50%;background:var(--soft2)}
.log-counts .is-new i,.log-group.is-new .log-dot{background:var(--heat)}
.log-counts .is-improved i,.log-group.is-improved .log-dot{background:oklch(.7 .12 285)}
.log-counts .is-fixed i,.log-group.is-fixed .log-dot{background:var(--amb)}
.log-counts .is-removed i,.log-group.is-removed .log-dot{background:var(--bad)}
.log-groups{max-width:62ch}
.log-group{padding-block:10px 8px}
.log-group+.log-group{border-block-start:1px solid var(--line)}
.log-group h3{display:flex;align-items:center;gap:8px;margin:0 0 2px;color:var(--mut);font:500 .75rem var(--ui);text-transform:uppercase;letter-spacing:.04em}
.log-dot{width:8px;height:8px;border-radius:50%;background:var(--soft2)}
.log-group ul{margin:0;padding-inline-start:18px}
.log-group li{margin-block:5px;padding-inline-start:2px;font-size:.9375rem;line-height:1.5;text-wrap:pretty}
.log-group li::marker{color:var(--mut3)}
/* A long release shows the first three changes of its first two groups; Show all opens the rest. */
.log-groups.is-folded .log-group li:nth-child(n+4),.log-groups.is-folded .log-group:nth-child(n+3){display:none}
.log-more{margin-block-start:8px;height:32px;padding-inline:14px;border:0;border-radius:99px;background:var(--card);color:var(--ink);font:500 .8125rem var(--ui);box-shadow:var(--t-raised);cursor:pointer}
.log-empty{margin:24px 0;color:var(--mut)}
@media(max-width:640px){.docs-words>div{grid-template-columns:minmax(0,1fr);gap:2px}}
@media(max-width:800px),(max-height:500px){.log-list{gap:36px}}
@media print{.log-card{box-shadow:none}.log-groups.is-folded .log-group li:nth-child(n+4),.log-groups.is-folded .log-group:nth-child(n+3){display:list-item}.log-more{display:none}}
