/* Terms of Service page. Loaded after site.css and legal.css. */

.doc .meta + .meta{margin-top:4px}
.doc .meta a{color:inherit}

/* the clause: number in the margin, text beside it */
.cl{display:grid;grid-template-columns:3.4rem 1fr;gap:0 14px;margin-top:14px;padding:2px 10px 2px 0;border-radius:2px}
.doc .cl p{margin:0}
.cl .num{font-family:'IBM Plex Mono',monospace;font-size:.78rem;letter-spacing:.06em;color:#6B665E;padding-top:.5em;text-decoration:none;line-height:1.7}
.doc .cl .num:hover{color:var(--gold-ink);text-decoration:underline}
.cl:target{background:#FBF3D0;box-shadow:-10px 0 0 #FBF3D0}

/* jump-to list */
.toc{margin-top:30px;padding:20px 26px 22px;border:1px solid var(--line-l);border-radius:2px;background:var(--white)}
.toc-h{margin:0!important;font-family:'IBM Plex Mono',monospace;font-size:.72rem;font-weight:600;letter-spacing:.2em;text-transform:uppercase;color:var(--gold-ink)!important}
.toc ol{margin:12px 0 0;padding:0;list-style:none;columns:2;column-gap:36px}
.toc li{margin:0;padding:0 0 0 2.3em;text-indent:-2.3em;break-inside:avoid;font-size:.95rem;line-height:1.5}
.toc li + li{margin-top:5px}
.toc ol{counter-reset:t}
.toc li{counter-increment:t}
.toc li::before{content:counter(t) ".";display:inline-block;width:2.3em;text-indent:0;font-family:'IBM Plex Mono',monospace;font-size:.76rem;color:#6B665E}
.doc .toc a{text-decoration:none;color:#3F3B35}
.doc .toc a:hover{color:var(--ink);text-decoration:underline;text-decoration-color:var(--gold-ink);text-underline-offset:3px}

/* the line that explains the (i) notes */
.notes-key{font-size:.95rem!important;color:#5A554E!important}
.notes-key .hint{white-space:nowrap}
.note-key,.note-btn{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border:1.5px solid var(--gold-ink);border-radius:50%;background:transparent;color:var(--gold-ink);font:700 .7rem/1 'IBM Plex Mono',monospace;vertical-align:-3px}
.note-key{margin:0 2px}

/* the (i) button and its note */
.note-wrap{position:relative;display:inline-block;white-space:nowrap}
.note-btn{margin-left:4px;padding:0;cursor:pointer;transition:background .15s ease,color .15s ease}
.note-btn:hover,.note-btn[aria-expanded="true"]{background:var(--ink);border-color:var(--ink);color:var(--gold)}
.note-btn:focus-visible{outline:3px solid var(--gold-ink);outline-offset:2px}
.note{display:none;white-space:normal;text-align:left;font-size:.9rem;line-height:1.55;font-weight:400;color:#fff;background:var(--ink);border-left:3px solid var(--gold);border-radius:2px;padding:12px 14px;box-shadow:0 10px 30px rgba(0,0,0,.28)}
.note::before{content:"Why we wrote this";display:block;margin-bottom:4px;font:600 .66rem/1.2 'IBM Plex Mono',monospace;letter-spacing:.16em;text-transform:uppercase;color:var(--gold)}
.note[hidden]{display:none}
.note:not([hidden]){display:block}

/* mouse and keyboard: a floating card above the button */
@media (hover:hover) and (pointer:fine) and (min-width:721px){
  .note{position:absolute;z-index:20;left:50%;bottom:calc(100% + 10px);width:300px;transform:translateX(calc(-50% + var(--dx,0px)))}
  .note::after{content:"";position:absolute;left:calc(50% - var(--dx,0px));bottom:-6px;width:12px;height:12px;background:var(--ink);transform:translateX(-50%) rotate(45deg)}
  .note.below{bottom:auto;top:calc(100% + 10px)}
  .note.below::after{bottom:auto;top:-6px}
}
/* touch and small screens: the button opens the note right under the paragraph */
@media (hover:none),(pointer:coarse),(max-width:720px){
  .note-wrap{display:inline}
  .note-btn{width:26px;height:26px;margin-left:6px;vertical-align:-6px;font-size:.8rem}
  .note{position:static;margin-top:10px;width:auto;max-width:none}
  .note:not([hidden]){display:block}
}
/* no script: show every note in the text instead of hiding it */
html:not(.js) .note-btn{display:none}
html:not(.js) .note[hidden]{display:block;margin-top:8px;font-size:.88rem}

/* glossary */
.gloss{margin:18px 0 0}
.gloss > div{display:grid;grid-template-columns:11rem 1fr;gap:4px 24px;padding:14px 0;border-top:1px solid var(--line-l)}
.gloss > div:last-child{border-bottom:1px solid var(--line-l)}
.gloss dt{font-weight:800;color:var(--ink);font-size:1rem;line-height:1.5}
.gloss dd{margin:0;color:#3F3B35;font-size:1rem;line-height:1.65}

@media (max-width:720px){
  .toc ol{columns:1}
  .gloss > div{grid-template-columns:1fr;gap:2px}
}
@media (max-width:560px){
  .cl{grid-template-columns:1fr;gap:2px 0;padding-right:0}
  .cl .num{padding-top:0}
  .notes-key .hint{white-space:normal}
}

/* a printed copy is the agreement only: no notes, no jump list, clause numbers inline */
@media print{
  .toc,.note-wrap,.notes-key,.note-btn,.note{display:none!important}
  .cl{display:block!important;padding:0!important;break-inside:avoid;margin-top:6pt!important}
  .cl .num{display:inline!important;font-family:Arial,sans-serif!important;font-size:10.5pt!important;font-weight:700;margin-right:6pt;color:#000!important}
  .cl p{display:inline!important}
  .cl:target{background:none!important;box-shadow:none!important}
  .gloss > div{display:block!important;border:0!important;padding:4pt 0!important;break-inside:avoid}
  .gloss dt{display:inline;font-size:10.5pt;color:#000!important}
  .gloss dt::after{content:": "}
  .gloss dd{display:inline;font-size:10.5pt;color:#000!important}
  .doc h2{break-after:avoid}
}
