/* The glossary (/glossary and /glossary/<slug>, server/glossary-page.js). It builds on company.css (tables,
   questions) and app.css (the example panel, the closing); the drawings keep their own pages' styles
   (product-ui.css, visibility.css, guide.css, shopping.css). This file adds the glossary's cards, an entry's
   reading column and its parts, and the two drawings only the glossary has. */

/* The glossary: the acronyms, then the entries by what they are about. */
.gloss-hero { padding-bottom: clamp(26px, 3.6vw, 40px); }
.gloss-acronyms { display: grid; grid-template-columns: minmax(0, 330px) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); padding-block: clamp(30px, 4vw, 46px); border-top: 1px solid var(--line); }
.gloss-acronyms-head h2, .gloss-group h2 { font: 570 clamp(23px, 2.4vw, 29px)/1.28 var(--heading); letter-spacing: -.025em; }
.gloss-acronyms-head p { margin-top: 12px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.gloss-acronyms .company-table tbody th[scope="row"] { width: 14%; }
.gloss-acronyms .company-table a { color: var(--accent-dark); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.gloss-group { padding-block: clamp(30px, 4vw, 46px); border-top: 1px solid var(--line); }
.gloss-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 248px), 1fr)); gap: 14px; margin: 20px 0 0; padding: 0; list-style: none; }
.gloss-cards li { display: flex; min-width: 0; }
.gloss-card { display: flex; width: 100%; flex-direction: column; gap: 8px; padding: 20px 20px 18px; border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: var(--card); transition: box-shadow 200ms var(--ease-out), transform 200ms var(--ease-out); }
.gloss-card:hover { box-shadow: var(--pop); transform: translateY(-2px); }
.gloss-card:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 3px; }
.gloss-card strong { font: 560 18px/1.3 var(--heading); letter-spacing: -.01em; }
.gloss-card span:not(.arrow) { color: var(--muted); font-size: 14px; line-height: 1.6; }
.gloss-card .arrow { margin-top: auto; color: var(--accent-dark); }
.gloss-closing { margin-top: clamp(40px, 5vw, 64px); }

/* An entry: a reading column, with the example and the closing at the page's width. */
.gloss-entry > :not(.gloss-example) { max-width: 820px; }
.gloss-head .resource-kicker a { color: inherit; }
.gloss-head .resource-kicker a:hover { text-decoration: underline; text-underline-offset: 3px; }
.gloss-head h1 { margin-top: 12px; font: 580 clamp(34px, 4.6vw, 54px)/1.12 var(--heading); letter-spacing: -.04em; }
.gloss-byline { display: flex; align-items: center; gap: 10px; margin-top: 18px; color: var(--muted); font-size: 13px; }
.gloss-byline a { color: var(--ink); font-weight: 650; text-decoration: underline; text-decoration-color: #19191b40; text-underline-offset: 3px; }
.gloss-byline a:hover { text-decoration-color: currentColor; }
.gloss-avatar { display: grid; width: 32px; height: 32px; flex: none; place-items: center; border-radius: 10px; background: var(--ink); color: #fff; }
.gloss-avatar svg { width: 17px; height: 17px; color: #d9cffb; }

/* The definition, first. */
.gloss-definition { margin-top: 28px; padding: clamp(20px, 3vw, 28px); border-radius: 20px; background: var(--lavender-soft); box-shadow: inset 0 0 0 1px #e5deef; }
.gloss-label { color: var(--accent-dark); font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.gloss-definition p:not(.gloss-label) { margin-top: 10px; color: var(--ink); font-size: clamp(17px, 1.7vw, 19px); line-height: 1.65; }

/* On this page. */
.gloss-toc { margin-top: 24px; }
.gloss-toc p { color: var(--muted); font-size: 12px; font-weight: 650; }
.gloss-toc ol { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.gloss-toc a { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border-radius: 99px; background: var(--surface); color: var(--accent-dark); font-size: 13px; font-weight: 550; box-shadow: var(--lift); }
.gloss-toc a:hover { background: var(--lavender-soft); }

/* How it works, the comparison, the questions and related terms. */
.gloss-section { margin-top: clamp(40px, 5vw, 56px); scroll-margin-top: 24px; }
.gloss-section h2 { font: 570 clamp(24px, 2.6vw, 31px)/1.25 var(--heading); letter-spacing: -.025em; }
.gloss-lead { margin-top: 12px; color: #48454e; font-size: 16px; line-height: 1.75; }
.gloss-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 22px 0 0; padding: 0; list-style: none; }
.gloss-steps li { min-width: 0; padding: 20px; border-radius: 18px; background: var(--surface); box-shadow: var(--card); }
.gloss-step-number { display: inline-grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: var(--lavender-soft); color: var(--accent-dark); font-size: 12px; font-weight: 700; }
.gloss-steps h3 { margin-top: 14px; font: 600 16px/1.4 var(--body); }
.gloss-steps p { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.gloss-section .company-table { margin-top: 20px; }
.gloss-note { margin-top: 14px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.gloss-section .company-faq { margin-top: 18px; }
.gloss-section .company-faq p { padding-bottom: 18px; color: #48454e; font-size: 15px; line-height: 1.8; }
.gloss-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.gloss-pills a { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px; border-radius: 99px; background: var(--lavender-soft); color: var(--accent-dark); font-size: 14px; font-weight: 600; box-shadow: inset 0 0 0 1px #e5deef; }
.gloss-pills a:hover { background: #e9e2f8; }
.gloss-cited { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); }
.gloss-cited h2 { color: var(--muted); font: 650 12px/1.4 var(--body); letter-spacing: .06em; text-transform: uppercase; }
.gloss-cited ul { display: grid; gap: 6px; margin: 10px 0 0; padding-inline-start: 18px; }
.gloss-cited li { color: var(--muted); font-size: 13px; line-height: 1.6; }
.gloss-cited a { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }

/* The example: its text beside the drawing, on the Visibility page's panel. Wide screens go below it. */
.gloss-example { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: center; gap: clamp(24px, 4vw, 56px); margin-top: clamp(40px, 5vw, 56px); scroll-margin-top: 24px; }
.app-panel.gloss-example h2 { font: 580 clamp(26px, 3vw, 36px)/1.15 var(--heading); letter-spacing: -.03em; }
.gloss-callout { margin-top: 18px; padding-inline-start: 18px; border-inline-start: 3px solid var(--accent); }
.gloss-callout p { color: #48454e; font-size: 15px; line-height: 1.75; }
.gloss-callout p + p { margin-top: 12px; }
.app-panel--ink .gloss-callout { border-color: var(--lavender); }
.app-panel--ink .gloss-callout p { color: #ffffffc7; }
.gloss-stage { min-width: 0; }
.gloss-example--wide { grid-template-columns: minmax(0, 1fr); }
.gloss-example--wide .gloss-example-copy { max-width: 760px; }
.gloss-shot { direction: ltr; overflow: hidden; border-radius: 16px; background: #fff; box-shadow: 0 0 0 .5px #19191b1a, 0 18px 40px -24px #19191b59; }
.gloss-shot .kui { width: 100%; max-width: none; border-radius: 0; }
.gloss-figure--pair .guide-q { font-size: 13.5px; }
.gloss-figure--pair .guide-src ol { font-size: 13px; }

/* Two of the Overview's figures (share of voice). */
.kui--metrics { --w: 560; }
.kui--metrics .kui-in { padding: calc(14 * var(--u)); background: #f6f5f9; }
.kui--metrics .kui-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 0; }

/* Token efficiency: one report as separate records and as one table. */
.gloss-tokens { display: grid; gap: 12px; }
.gloss-code { overflow: hidden; border-radius: 16px; background: #fff; box-shadow: var(--card); }
.gloss-code-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.gloss-code-head b { font-weight: 650; }
.gloss-code-head span { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.gloss-code pre { margin: 0; padding: 12px 14px; color: #36333c; font: 400 11.5px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; }
.gloss-code--table { box-shadow: 0 0 0 1.5px var(--accent), var(--card); }
.gloss-saved { justify-self: end; padding: 6px 12px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 650; }

/* Query fan-out: one question, the searches the model ran, the answer. */
.gloss-fanout { display: grid; gap: 14px; }
.gloss-fanout .guide-q { max-width: 88%; font-size: 13.5px; }
.gloss-fan-step { position: relative; padding: 14px 16px; border-radius: 16px; background: #fff; box-shadow: var(--card); }
.gloss-fan-step::before { content: ''; position: absolute; top: -14px; inset-inline-start: 28px; height: 14px; border-inline-start: 2px dashed #c9bdf0; }
.gloss-fan-head { color: var(--accent-dark); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.gloss-fan-searches { display: grid; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.gloss-fan-searches li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: #f6f5f9; font-size: 13.5px; }
.gloss-fan-searches svg { width: 15px; height: 15px; flex: none; color: var(--muted); }
.gloss-fan-searches bdi { flex: 1; min-width: 0; }
.gloss-fan-searches span { padding: 2px 8px; border-radius: 6px; background: #efedf8; color: #503c90; font-size: 11px; font-weight: 600; }
.gloss-fan-answer { display: grid; gap: 4px; margin: 10px 0 0; padding-inline-start: 20px; font-size: 13.5px; }
.gloss-fan-answer .is-you { color: var(--accent-dark); font-weight: 650; }
.gloss-fan-cited { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.gloss-fan-cited b { color: var(--ink); font-weight: 600; }

@media (max-width: 900px) {
  .gloss-acronyms, .gloss-example { grid-template-columns: minmax(0, 1fr); }
  .gloss-acronyms { gap: 16px; }
}
@media (max-width: 720px) {
  .gloss-steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .gloss-definition p:not(.gloss-label) { font-size: 16px; }
  /* The wide tables keep a larger size and show their first columns, as on the Visibility page; the
     trend stays whole, since its point is the month. */
  .gloss-shot--sources .kui, .gloss-shot--briefs .kui { width: 170%; }
}
@media (prefers-reduced-motion: reduce) {
  .gloss-card { transition: none; }
  .gloss-card:hover { transform: none; }
}
