/* ==========================================================================
   content-pages.css — Resources, glossary, and long-form guides.
   These pages use the homepage system (css/home.css, `main.hp`), the page hero
   from css/trust.css, and css/pages.css. This file adds only what those lack.
   ========================================================================== */

/* ----- Search field and filter chips (resources, glossary) ----- */

.hp .search { position: relative; display: block; max-width: 520px; margin: 0; }
.hp .search svg { position: absolute; left: 20px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: var(--ink-mute); pointer-events: none; }
.hp .search input { display: block; width: 100%; height: 56px; margin: 0; padding: 0 20px 0 50px; border: 0; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong), var(--shadow-card); font: 400 16px/1.2 var(--text); color: var(--ink); }
.hp .search input::placeholder { color: var(--ink-mute); }
.hp .search input:focus-visible { outline: 0; box-shadow: inset 0 0 0 2px var(--blue), var(--shadow-card); }
.hp .page-hero .search { margin-top: 36px; }
.hp .page-hero .count { min-height: 1.5em; margin-top: 14px; font-size: 14.5px; color: var(--ink-mute); }

.hp .finder { display: grid; gap: 20px; margin-bottom: clamp(32px, 4vw, 56px); padding-bottom: 28px; border-bottom: 1px solid var(--line-strong); }
.hp .finder-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.hp .finder-top .search { flex: 1 1 320px; }
.hp .finder-top p { font-size: 15px; color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.hp .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hp .chip { flex: none; min-height: 42px; padding: 9px 17px; border: 0; border-radius: 999px; background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); font: 500 14.5px/1.2 var(--text); color: var(--ink-soft); cursor: pointer; transition: color 150ms, background-color 150ms, box-shadow 150ms; }
.hp .chip:hover { color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.hp .chip.active { background: var(--blue); color: #fff; box-shadow: none; }

/* ----- Article list (resources). The card markup comes from publish-queue.py. ----- */

.hp .posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(36px, 4vw, 56px) 24px; }
.hp .post-card-link { display: flex; flex-direction: column; height: 100%; }
.hp .post-thumb { aspect-ratio: 3 / 2; border-radius: var(--radius-card); overflow: hidden; background: var(--blue-tint); box-shadow: 0 0 0 1px var(--line); }
.hp .post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease-out); }
.hp .post-card-link:hover .post-thumb img { transform: scale(1.04); }
.hp .card-thumb-fallback { height: 100%; background: radial-gradient(90% 80% at 85% 10%, rgba(141, 185, 255, 0.6), transparent 60%), radial-gradient(70% 70% at 10% 100%, rgba(183, 169, 255, 0.45), transparent 65%), var(--blue-tint); }
.hp .post-body { display: flex; flex: 1; flex-direction: column; padding-top: 20px; }
.hp .post-tag { font-size: 13.5px; font-weight: 600; color: var(--blue); }
.hp .post-title { margin-top: 8px; font: 600 21px/1.2 var(--display); letter-spacing: -0.02em; text-wrap: pretty; transition: color 150ms; }
.hp .post-card-link:hover .post-title { color: var(--blue); }
.hp .post-excerpt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; margin-top: 10px; font-size: 15.5px; color: var(--ink-soft); }
.hp .post-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 18px; font-size: 14px; color: var(--ink-mute); }
.hp .post-cta { flex: none; font-weight: 500; color: var(--blue); }

/* With no filter and no search, the newest article leads the list. */
.hp .posts.is-all > .post-card:first-child { grid-column: 1 / -1; padding-bottom: clamp(36px, 4vw, 56px); border-bottom: 1px solid var(--line-strong); }
.hp .posts.is-all > .post-card:first-child .post-card-link { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px clamp(24px, 4vw, 64px); align-items: center; }
.hp .posts.is-all > .post-card:first-child .post-thumb { border-radius: var(--radius-panel); box-shadow: var(--shadow-stage); }
.hp .posts.is-all > .post-card:first-child .post-body { padding-top: 0; }
.hp .posts.is-all > .post-card:first-child .post-title { font-size: clamp(28px, 3.2vw, 46px); line-height: 1.05; letter-spacing: -0.03em; }
.hp .posts.is-all > .post-card:first-child .post-excerpt { -webkit-line-clamp: 5; margin-top: 18px; font-size: 18px; }
.hp .posts.is-all > .post-card:first-child .post-meta { margin-top: 28px; }

.hp .empty { display: none; padding: 56px 0; }
.hp .empty h3 { font: 600 26px/1.15 var(--display); letter-spacing: -0.02em; }
.hp .empty p { margin-top: 8px; color: var(--ink-soft); }
.hp .more { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-top: clamp(40px, 5vw, 72px); font-size: 15px; color: var(--ink-mute); }
.hp .more .btn { border: 0; cursor: pointer; }

/* ----- Glossary ----- */

.hp .gloss { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 24px clamp(24px, 5vw, 80px); align-items: start; }
.hp .az-nav { position: sticky; top: 112px; display: grid; grid-template-columns: repeat(2, 36px); gap: 4px; }
.hp .az-link { display: grid; place-items: center; height: 30px; border-radius: 8px; font: 600 13.5px/1 var(--text); color: var(--ink); transition: background-color 150ms, color 150ms; }
.hp a.az-link:hover { background: var(--blue-tint); color: var(--blue-deep); }
.hp .az-link.active { background: var(--blue); color: #fff; }
.hp .az-link.disabled { font-weight: 400; color: rgba(15, 22, 56, 0.28); }

.hp .letter-group + .letter-group { margin-top: clamp(56px, 7vw, 96px); }
.hp .letter-heading { padding-bottom: 20px; border-bottom: 1px solid var(--line-strong); font-size: clamp(56px, 7vw, 104px); line-height: 0.9; color: var(--blue); }
.hp .gl-entry { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 16px 40px; padding-block: clamp(28px, 3vw, 40px); border-bottom: 1px solid var(--line-strong); }
.hp .gl-entry.search-hidden { display: none; }
.hp .entry-header { display: flex; flex-wrap: wrap; align-items: center; align-content: start; gap: 8px; }
.hp .entry-name { flex-basis: 100%; margin-bottom: 4px; font: 600 clamp(22px, 2.2vw, 28px)/1.12 var(--display); letter-spacing: -0.025em; text-wrap: balance; }
.hp .entry-name a:hover, .hp .gl-entry:target .entry-name a { color: var(--blue); }
.hp .entry-abbr, .hp .cloud-badge { padding: 4px 11px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.hp .entry-abbr { box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--ink-soft); }
.hp .cloud-badge { background: var(--blue-tint); color: var(--blue-deep); }
.hp .cloud-badge.all { background: rgba(15, 22, 56, 0.07); color: var(--ink-soft); }
.hp .entry-definition { max-width: 64ch; color: var(--ink-soft); }
.hp .entry-definition strong { font-weight: 600; color: var(--ink); }
.hp .entry-context { max-width: 64ch; margin-top: 16px; padding-left: 18px; border-left: 2px solid var(--blue); font-size: 15.5px; color: var(--ink-soft); }
.hp .entry-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; font-size: 14.5px; }
.hp .entry-link { margin-right: 14px; font-weight: 500; color: var(--blue); text-decoration: underline; text-decoration-color: rgba(61, 75, 202, 0.3); text-underline-offset: 4px; }
.hp .entry-link:hover { text-decoration-color: currentColor; }
.hp .entry-link svg { display: none; }
.hp .related-label { color: var(--ink-mute); }
.hp .related-tag { padding: 5px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--ink); transition: color 150ms, box-shadow 150ms; }
.hp .related-tag:hover { color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.hp .no-results { display: none; padding: 56px 0; }
.hp .no-results.visible { display: block; }
.hp .no-results h3 { font: 600 26px/1.15 var(--display); letter-spacing: -0.02em; }
.hp .no-results p { margin-top: 8px; color: var(--ink-soft); }

/* ----- Guides: contents on the left, article on the right ----- */

.hp .guide { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: 40px clamp(32px, 6vw, 96px); align-items: start; }
.hp .toc { position: sticky; top: 112px; max-height: calc(100vh - 136px); overflow-y: auto; }
.hp .toc-title { margin-bottom: 14px; font-size: 14px; font-weight: 600; color: var(--ink-mute); }
.hp .toc a { display: block; padding: 9px 0 9px 18px; border-left: 2px solid var(--line-strong); font-size: 15px; line-height: 1.35; color: var(--ink-soft); transition: color 150ms, border-color 150ms; }
.hp .toc a:hover { color: var(--ink); }
.hp .toc a.active { border-left-color: var(--blue); font-weight: 600; color: var(--blue-deep); }
.hp .toc a:focus-visible { outline-offset: -2px; }

.hp .article { max-width: 720px; margin-bottom: 0; font-size: 18px; line-height: 1.65; }
.hp .article > :first-child { margin-top: 0; }
.hp .article h2 { margin-top: 72px; }
.hp .article h3 { margin-top: 40px; font: 600 23px/1.2 var(--display); letter-spacing: -0.02em; }
.hp .article h3 + :is(p, ul, ol) { margin-top: 12px; }
.hp .article :is(p, li, td) a { color: var(--blue); text-decoration: underline; text-decoration-color: rgba(61, 75, 202, 0.35); text-underline-offset: 4px; }
.hp .article :is(p, li, td) a:hover { text-decoration-color: currentColor; }
.hp .article li::marker { color: var(--blue); font-weight: 600; }

.hp .callout { margin-top: 28px; padding: 22px 26px; border-radius: 18px; background: var(--blue-tint); }
.hp .callout p { margin: 0; color: var(--ink); }

/* A product note in the middle of the article. */
.hp .pitch { margin-top: 56px; padding: clamp(24px, 3vw, 40px); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow-card); }
.hp .article .pitch h3 { margin-top: 0; font-size: clamp(24px, 2.4vw, 30px); line-height: 1.12; }
.hp .pitch .btn { margin-top: 24px; }

.hp .table-scroll { margin-top: 28px; overflow-x: auto; }
.hp .article table { min-width: 600px; font-size: 15.5px; line-height: 1.45; }
.hp .article :is(th, td) { padding: 16px 16px 16px 0; }
.hp .article thead th { padding-top: 0; font-size: 14px; font-weight: 600; color: var(--ink); }
.hp .article td:first-child { width: 24%; color: var(--ink); }

.hp .article .faq { display: block; margin-top: 28px; }
.hp .article .faq .answer { padding-right: 0; }

.hp .sources { margin-top: 72px; padding-top: 32px; border-top: 1px solid var(--line-strong); font-size: 16px; }
.hp .article .sources h3 { margin-top: 0; font-size: 20px; }
.hp .sources p { margin-top: 8px; }

/* ----- Responsive ----- */

@media (max-width: 900px) {
  .hp .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hp .posts.is-all > .post-card:first-child .post-card-link { grid-template-columns: minmax(0, 1fr); }
  .hp .posts.is-all > .post-card:first-child .post-excerpt { font-size: 16.5px; }
  .hp .chips { flex-wrap: nowrap; margin-inline: calc(var(--gutter) * -1); padding: 2px var(--gutter); overflow-x: auto; scrollbar-width: none; }

  .hp .gloss, .hp .guide, .hp .gl-entry { grid-template-columns: minmax(0, 1fr); }
  /* The letters become one row that stays below the site nav. */
  .hp .az-nav { top: 72px; z-index: 2; display: flex; gap: 2px; margin-inline: calc(var(--gutter) * -1); padding: 8px var(--gutter); background: var(--paper); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
  .hp .az-link { flex: none; width: 34px; height: 34px; }
  .hp .az-link.disabled { display: none; }

  .hp .toc { position: static; max-height: none; padding: 20px 24px; border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow-card); }
  .hp .article { font-size: 17px; }
  .hp .article h2 { margin-top: 56px; }
}
@media (max-width: 560px) {
  .hp .posts { grid-template-columns: minmax(0, 1fr); }
}
