/* Letters and Glossary: reading layout, pull quotes, callouts, figures and the glossary pop-up.
   Loaded after site.css and chrome.css, only on /letters/ and /glossary/ pages. No colour-only cues: every state also has a shape, weight, underline or border. */
.letter-wrap{max-width:42rem}                     /* about 68 characters at the body size */
.letter-body{font-size:1.1875rem;line-height:1.75;hanging-punctuation:first}
.letter-body p,.letter-body li{max-width:68ch}
.letter .eyebrow a{color:inherit}
.letter-head{padding:2.5rem 0 1rem}
.letter-head h1{font-size:clamp(2rem,6vw,3rem);margin-bottom:.4em;text-wrap:balance}
.byline{font-family:var(--sans);font-size:.9rem;color:var(--muted);margin:0 0 1.2rem}
.letter .lede{font-size:1.3rem;line-height:1.55;max-width:none}
.letter-body h2{font-size:clamp(1.45rem,3.5vw,1.85rem);margin:2.4em 0 .6em;padding-top:.4em;border-top:1px solid var(--soft-line)}
.letter-body h3{font-size:1.25rem;margin:1.9em 0 .5em}
.letter-body ul,.letter-body ol{padding-left:1.4rem;margin:0 0 1.2em}
.letter-body li{margin-bottom:.45em}
.letter-body hr{border:0;border-top:2px solid var(--soft-line);margin:2.4em 0}
.letter-body blockquote{margin:1.6em 0;padding:.2em 0 .2em 1.1rem;border-left:4px solid var(--line)}
.letter-body blockquote p{margin:0}
.letter-body blockquote.pull{margin:2.2em -.5rem;padding:.9rem 1.1rem 1rem 3.2rem;border-left:0;border-top:3px double var(--text);border-bottom:3px double var(--text);position:relative;font-size:clamp(1.45rem,4vw,1.9rem);line-height:1.3;font-style:italic;max-width:none}
.letter-body blockquote.pull::before{content:"\201C";position:absolute;left:.7rem;top:.1rem;font-size:3.4rem;line-height:1;font-style:normal;font-family:var(--serif)}
.letter-body code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.92em;background:var(--surface);padding:.05em .3em;border-radius:3px}

/* callouts: a labelled box with a heavy border and a shape marker per kind (note, try, caution) */
.callout{margin:2em 0;padding:1rem 1.2rem 1.1rem;border:2px solid var(--text);border-radius:8px;background:var(--surface);font-size:1.05rem;line-height:1.65}
.callout>*:last-child{margin-bottom:0}
.callout-title{font-family:var(--sans);font-weight:700;font-size:.95rem;letter-spacing:.02em;margin:0 0 .5rem;display:flex;align-items:center;gap:.5rem}
.callout-mark{display:inline-block;width:1.1rem;height:1.1rem;flex:none;background:var(--text)}
.callout-note .callout-mark{border-radius:50%}
.callout-try .callout-mark{clip-path:polygon(15% 0,100% 50%,15% 100%)}
.callout-caution{border-style:dashed;border-width:3px}
.callout-caution .callout-mark{clip-path:polygon(50% 0,100% 100%,0 100%)}

/* figures: simple diagrams with alt text and a caption */
.letter-body figure{margin:2em 0;padding:0}
.letter-body figure img{width:100%;height:auto;border:1px solid var(--soft-line);border-radius:6px;background:#FAF6EE}
.letter-body figcaption{font-family:var(--sans);font-size:.9rem;line-height:1.5;color:var(--muted);margin-top:.6rem}

/* terms list, notes, navigation */
.letter-terms{margin:2.6em 0 1.5em;padding:1.1rem 1.2rem;border:1px solid var(--soft-line);border-radius:8px}
.letter-terms h2{font-size:1.2rem;margin:0 0 .6em}
.letter-terms dl,.glossary{margin:0}
.letter-terms dt,.glossary dt{font-weight:700;font-family:var(--sans);font-size:.98rem}
.letter-terms dd,.glossary dd{margin:0 0 .9em;font-size:1rem;line-height:1.6}
.glossary .gl-entry{padding:.2rem 0 .2rem;border-bottom:1px solid var(--soft-line)}
.letter-note{font-family:var(--sans);font-size:.9rem;line-height:1.55;color:var(--muted);margin:1.5em 0}
.letters-nav ul{display:flex;flex-wrap:wrap;gap:.2rem 1.2rem;list-style:none;margin:1rem 0;padding:0;font-family:var(--sans);font-size:.95rem}
.letters-nav a{display:inline-flex;align-items:center;min-height:44px;padding:0 .1rem}
.letters-nav a[aria-current]{font-weight:700;text-decoration-thickness:.2em}
.letter-alt{font-family:var(--sans);font-size:.9rem}
.letter-list{list-style:none;margin:1.5rem 0;padding:0}
.letter-card{padding:1.3rem 0;border-top:1px solid var(--soft-line)}
.letter-card h2{font-size:1.5rem;margin:.1em 0 .3em}
.letter-card .meta{font-family:var(--sans);font-size:.85rem;color:var(--muted);margin:0}
.letter-card p:last-child{margin-bottom:0}

/* glossary markers: a dotted underline plus a small circled question mark. Works as a plain link with no script. */
.gl{font:inherit;color:inherit;background:none;border:0;padding:0;margin:0;cursor:help;text-decoration:underline dotted;text-decoration-thickness:2px;text-underline-offset:.24em;text-align:inherit}
.gl{position:relative}
.gl::before{content:"";position:absolute;left:-.3rem;right:-.3rem;top:50%;height:2.75rem;transform:translateY(-50%)}   /* invisible 44px-tall hit area for taps; the word itself stays inline */
.gl::after{content:"?";content:"?"/"";display:inline-block;box-sizing:border-box;width:1.15em;height:1.15em;margin-left:.25em;font:700 .68em/1.05em var(--sans);text-align:center;border:1.5px solid currentColor;border-radius:50%;vertical-align:.55em;text-decoration:none;padding-top:.04em}
.gl:hover,.gl[aria-expanded="true"]{text-decoration-style:solid}
.gl[aria-expanded="true"]::after{background:var(--text);color:var(--bg)}
.gl-wrap{position:relative;display:inline}
.gl-pop{position:absolute;left:0;top:calc(100% + .45rem);z-index:40;box-sizing:border-box;width:min(21rem,calc(100vw - 2rem));padding:.8rem .95rem .85rem;background:var(--bg);color:var(--text);border:2px solid var(--text);border-radius:8px;box-shadow:0 6px 18px rgba(43,38,34,.22);font-family:var(--sans);font-size:.95rem;line-height:1.5;font-weight:400;font-style:normal;text-align:left;text-indent:0;letter-spacing:0}
.gl-pop[hidden]{display:none}
.gl-pop.gl-end{left:auto;right:0}
.gl-pop .gl-name{display:block;font-weight:700;margin-bottom:.25rem}
.gl-pop .gl-def{display:block}
.gl-pop .gl-learn{display:inline-block;margin-top:.45rem;font-weight:600;color:var(--link)}
.gl-pop .gl-close{position:absolute;top:.2rem;right:.2rem;display:none}
@media (max-width:40rem){
  .gl-pop{position:fixed;left:1rem;right:1rem;top:auto;bottom:1rem;width:auto;padding:1rem 1rem 1.05rem;font-size:1rem}
  .gl-pop .gl-name{padding-right:2.6rem}
  .gl-pop .gl-close{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;background:none;border:2px solid transparent;border-radius:6px;font:700 1.3rem/1 var(--sans);color:var(--text);cursor:pointer;top:.35rem;right:.35rem}
  .gl-pop .gl-close:focus-visible{border-color:var(--focus)}
}
@media (prefers-reduced-motion:no-preference){
  .gl-pop{animation:gl-in .12s ease-out}
  @keyframes gl-in{from{opacity:0}to{opacity:1}}
}
@media print{.gl::after{display:none}.gl{text-decoration:none}.gl-pop{display:none}.letters-nav{display:none}}
