/* Make AI Visible — hero, cards, lists, pager, resources. */

/* The marker: the one place a phrase is literally made visible. */
.mark {
  background: linear-gradient(transparent 62%, var(--marker) 62%, var(--marker) 96%, transparent 96%);
  padding: 0 0.06em;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s4) var(--s5);
  margin: var(--s5) 0 0;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.94rem;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: var(--r);
  padding: var(--s3) var(--s4);
}

.cta:hover,
.cta:focus-visible,
.cta:active { background: var(--marker); border-color: var(--ink); color: var(--ink); }

/* ---------- Section labels ---------- */

.section-label {
  display: block;
  margin: var(--s7) 0 var(--s4);
  padding-bottom: var(--s2);
  border-bottom: 1px solid var(--line);
}

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: var(--s4);
}

.card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: var(--s4);
}

.card:hover,
.card:active { border-color: var(--ink); background: #fff; }

.card-kicker {
  display: block;
  margin-bottom: var(--s3);
}

.card-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: var(--s2);
}

.card-meta {
  display: block;
  font-size: 0.96rem;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- Article index ---------- */

.post-group { margin-top: var(--s7); }

.post-group h2 {
  font-size: 1.15rem;
  margin: 0 0 var(--s1);
}

.group-intro {
  color: var(--muted);
  font-size: 0.98rem;
  margin: 0 0 var(--s3);
}

.group-reading-list {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.03em;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 var(--s3);
}

.group-reading-list a {
  color: var(--ink);
  text-decoration-color: var(--marker-edge);
  text-underline-offset: 0.18em;
}

/* ---------- Start here (glossary + resources) ---------- */

.start-here {
  margin: var(--s5) 0 var(--s6);
  max-width: var(--measure-wide, var(--measure));
}

.start-here-heading {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--s3);
}

.start-here-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.start-here-list > li {
  border-bottom: 1px solid var(--line);
}

.start-here-link {
  display: grid;
  grid-template-columns: minmax(6rem, 11rem) 1fr;
  gap: var(--s2) var(--s4);
  padding: var(--s3) 0;
  text-decoration: none;
  color: inherit;
}

.start-here-link:hover .start-here-label,
.start-here-link:focus-visible .start-here-label {
  text-decoration: underline;
  text-decoration-color: var(--marker-edge);
  text-underline-offset: 0.18em;
}

.start-here-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.start-here-blurb {
  font-size: 0.94rem;
  line-height: 1.5;
  color: var(--muted);
}

.resources .start-here-link {
  grid-template-columns: 1fr;
  gap: var(--s1);
}

.resources .start-here-label {
  font-size: 1rem;
  line-height: 1.35;
}

.glossary-jump.term-index {
  border-color: var(--ink);
}

.glossary-jump .term-index-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  gap: var(--s2) var(--s4);
}

.glossary-jump .term-index-group a {
  display: flex;
  align-items: baseline;
  gap: var(--s2);
  min-height: 2.75rem;
  padding: var(--s1) 0;
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.glossary-jump .term-index-group a:hover,
.glossary-jump .term-index-group a:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--marker-edge);
}

.resources-jump .jump-count,
.glossary-jump .jump-count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.glossary-compare {
  margin: var(--s6) 0 var(--s4);
}

.glossary-compare-note {
  font-size: 0.96rem;
  color: var(--muted);
  margin: 0 0 var(--s6);
}

.glossary-compare-note a {
  color: var(--ink);
  text-decoration-color: var(--marker-edge);
  text-underline-offset: 0.18em;
}

.articles-reading-map {
  margin: var(--s6) 0 var(--s7);
}

.article-terms {
  margin-top: var(--s7);
  padding-top: var(--s5);
  border-top: 1px solid var(--line);
}

.article-terms-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--s2);
}

.article-terms-links {
  font-size: 0.96rem;
  line-height: 1.55;
  margin: 0;
}

.article-terms-links a {
  text-decoration-color: var(--marker-edge);
  text-underline-offset: 0.18em;
}

.article-terms-more {
  color: var(--muted);
}

.article-terms-more a {
  color: var(--ink);
}

.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-list li { border-top: 1px solid var(--line); }

.post-list li:last-child { border-bottom: 1px solid var(--line); }

.post-list a {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: var(--s1) var(--s4);
  padding: var(--s4) 0;
  text-decoration: none;
  color: inherit;
}

.post-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding-top: 0.45em;
}

.post-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: var(--s1);
}

.post-meta {
  display: block;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.5;
}

.post-list a:hover .post-title {
  background: var(--marker);
  box-shadow: 0.2em 0 0 var(--marker), -0.2em 0 0 var(--marker);
}

/* ---------- Articles index (reading list) ---------- */

.articles-intro {
  margin-bottom: var(--s4);
}

.articles .articles-group {
  border-top: 2px solid var(--marker-edge);
  padding-top: var(--s3);
}

.articles .articles-group:first-of-type {
  margin-top: var(--s5);
}

.articles-group h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s2) var(--s3);
  font-size: clamp(1.15rem, 2.4vw, 1.35rem);
  letter-spacing: -0.02em;
}

.group-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--marker-edge);
}

.articles .post-list a {
  grid-template-columns: 2.6rem 1fr;
  align-items: start;
  padding: var(--s4) var(--s3);
  margin: 0 calc(-1 * var(--s3));
  border-radius: var(--r);
}

@media (prefers-reduced-motion: no-preference) {
  .articles .post-list a {
    transition: background 140ms ease, box-shadow 140ms ease;
  }
}

.articles .post-list li.post-start a {
  border-left: 3px solid var(--marker);
  padding-left: calc(var(--s3) + var(--s2));
  margin-left: calc(-1 * var(--s3));
}

.articles .post-list a:hover,
.articles .post-list a:focus-visible,
.articles .post-list a:active {
  background: var(--surface);
  box-shadow: var(--register);
}

.articles-jump.term-index {
  border-color: var(--ink);
}

.articles-jump .term-index-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: var(--s2) var(--s4);
}

.articles-jump .term-index-group a {
  display: flex;
  align-items: baseline;
  gap: var(--s2);
  min-height: 2.75rem;
  padding: var(--s1) 0;
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.articles-jump .term-index-group a:hover,
.articles-jump .term-index-group a:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--marker-edge);
}

.jump-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--muted);
  flex-shrink: 0;
}

/* ---------- Home ---------- */

.home-featured {
  margin-top: var(--s7);
}

.home-featured .section-label {
  margin-top: 0;
}

.home-featured-link {
  display: block;
  max-width: 38rem;
  padding: var(--s4);
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--register);
}

@media (prefers-reduced-motion: no-preference) {
  .home-featured-link {
    transition: background 140ms ease, box-shadow 140ms ease;
  }
}

.home-featured-link:hover,
.home-featured-link:focus-visible {
  background: var(--paper);
  box-shadow: 3px 3px 0 0 var(--marker);
}

.home-featured-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
  color: var(--ink);
}

.home-featured-meta {
  display: block;
  margin-top: var(--s2);
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--muted);
}

.home-tool {
  margin-top: var(--s7);
}

.home-tool .section-label {
  margin-top: 0;
}

.home-tool-link {
  display: block;
  max-width: 42rem;
  padding: var(--s4);
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--register);
}

@media (prefers-reduced-motion: no-preference) {
  .home-tool-link {
    transition: background 140ms ease, box-shadow 140ms ease;
  }
}

.home-tool-link:hover,
.home-tool-link:focus-visible {
  background: var(--paper);
  box-shadow: 3px 3px 0 0 var(--marker);
}

.home-tool-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
  color: var(--ink);
}

.home-tool-meta {
  display: block;
  margin-top: var(--s2);
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--muted);
}

.home-tool-link .access-check-figure {
  margin: var(--s4) 0 0;
}

.home-tool-cta {
  display: inline-block;
  margin-top: var(--s4);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: var(--r);
  padding: var(--s3) var(--s4);
}

.home-tool-link:hover .home-tool-cta,
.home-tool-link:focus-visible .home-tool-cta {
  background: var(--marker);
  border-color: var(--ink);
  color: var(--ink);
}

.access-check-figure {
  margin: 0;
  padding: 0;
}

.access-check-caption {
  margin: 0 0 var(--s3);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.tool-page .access-check-figure {
  margin: var(--s4) 0 var(--s5);
}

.access-check-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--s2);
  margin: 0;
}

.access-check-slot {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  padding: var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--paper);
}

.home-tool-link .access-check-slot {
  background: var(--surface);
}

.home-tool-link:hover .access-check-slot,
.home-tool-link:focus-visible .access-check-slot {
  background: var(--paper);
}

.access-check-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.access-check-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.access-check-detail {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: var(--muted);
}

@media (max-width: 48rem) {
  .access-check-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .access-check-slot:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 30rem) {
  .access-check-strip {
    grid-template-columns: 1fr;
  }

  .access-check-slot:last-child {
    grid-column: auto;
  }

  .home-tool-link .access-check-figure {
    display: none;
  }
}

.home-questions {
  margin-top: var(--s7);
}

.home-questions .section-label {
  margin-top: 0;
}

.home-questions-more {
  margin: var(--s4) 0 0;
  max-width: 38rem;
}

.home-questions .post-list {
  max-width: 38rem;
}

.home-questions .post-title {
  font-size: 1.02rem;
  font-weight: 600;
  margin-bottom: 0;
}

.home-questions .post-list a {
  padding: var(--s4) var(--s3);
  margin: 0 calc(-1 * var(--s3));
  border-radius: var(--r);
}

@media (prefers-reduced-motion: no-preference) {
  .home-questions .post-list a {
    transition: background 140ms ease;
  }
}

.home-questions .post-list a:hover,
.home-questions .post-list a:focus-visible,
.home-questions .post-list a:active {
  background: var(--surface);
}

.topic-map a {
  grid-template-columns: 2.6rem 1fr auto;
  align-items: start;
}

.topic-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 0.35em 0.45em;
  margin-top: 0.35em;
  background: var(--sunken);
  border: 1px solid var(--line);
  border-radius: var(--r);
  white-space: nowrap;
}

.topic-map-more {
  margin: var(--s4) 0 0;
}

.home-sources {
  margin-top: var(--s7);
  padding-top: var(--s5);
  border-top: 1px solid var(--line);
}

.home-sources .section-label {
  margin-top: 0;
}

.home-lookup-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 38rem;
  border-top: 1px solid var(--line);
}

.home-lookup-list > li {
  border-bottom: 1px solid var(--line);
}

.home-lookup-link {
  display: grid;
  grid-template-columns: minmax(6rem, 9rem) auto 1fr;
  gap: var(--s2) var(--s4);
  align-items: baseline;
  padding: var(--s4) var(--s3);
  margin: 0 calc(-1 * var(--s3));
  border-radius: var(--r);
  text-decoration: none;
  color: inherit;
}

@media (max-width: 48rem) {
  .home-lookup-link {
    grid-template-columns: 1fr;
    gap: var(--s1);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .home-lookup-link {
    transition: background 140ms ease, box-shadow 140ms ease;
  }
}

.home-lookup-link:hover,
.home-lookup-link:focus-visible,
.home-lookup-link:active {
  background: var(--surface);
  box-shadow: var(--register);
}

.home-lookup-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.home-lookup-link:hover .home-lookup-title,
.home-lookup-link:focus-visible .home-lookup-title {
  text-decoration: underline;
  text-decoration-color: var(--marker-edge);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

.home-lookup-count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
}

.home-lookup-blurb {
  font-size: 0.96rem;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- Pager ---------- */

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s4);
  margin-top: var(--s7);
  padding-top: var(--s5);
  border-top: 1px solid var(--line);
}

.pager a,
.pager .empty {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  text-decoration: none;
  color: inherit;
  padding: var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}

.pager a:hover,
.pager a:focus-visible {
  border-color: var(--ink);
  box-shadow: var(--register);
}

.pager-next { text-align: right; }

.pager-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
  overflow-wrap: break-word;
}

.pager .empty {
  border-style: dashed;
  background: transparent;
  color: var(--muted);
  pointer-events: none;
}

/* ---------- Resources ---------- */

.resources-intro {
  margin-bottom: var(--s4);
}

.resources-jump.term-index {
  border-color: var(--ink);
}

.resources-jump .term-index-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  gap: var(--s2) var(--s4);
}

.resources-jump .term-index-group a {
  display: flex;
  align-items: baseline;
  gap: var(--s2);
  min-height: 2.75rem;
  padding: var(--s1) 0;
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.resources-jump .term-index-group a:hover,
.resources-jump .term-index-group a:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--marker-edge);
}

.resources .resources-group {
  border-top: 2px solid var(--marker-edge);
  padding-top: var(--s2);
  margin-top: var(--s4);
}

.resources details.resources-group[open] {
  margin-top: var(--s6);
  padding-top: var(--s3);
}

.resources .resources-group:first-of-type {
  margin-top: var(--s5);
}

.resources-group h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s2) var(--s3);
  font-size: clamp(1.15rem, 2.4vw, 1.3rem);
}

.resource-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.resource-list > li {
  border-top: 1px solid var(--line);
  padding: var(--s2) 0;
}

.resource-list > li.resources-cluster {
  border-top: none;
  padding: var(--s4) 0 var(--s1);
}

.resource-list > li.resources-cluster + li {
  border-top: 1px solid var(--line);
}

.resource-list > li:not(.resources-cluster) + li.resources-cluster {
  border-top: 1px solid var(--line);
  margin-top: var(--s2);
  padding-top: var(--s4);
}

.resources-cluster-heading {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  color: var(--muted);
  line-height: 1.35;
}

.resource-list > li:last-child { border-bottom: 1px solid var(--line); }

.resource-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s3);
  align-items: start;
  text-decoration: none;
  color: inherit;
  padding: var(--s3);
  margin: 0 calc(-1 * var(--s3));
  border-radius: var(--r);
}

@media (prefers-reduced-motion: no-preference) {
  .resource-row {
    transition: background 140ms ease, box-shadow 140ms ease;
  }
}

.resource-row:hover,
.resource-row:focus-visible,
.resource-row:active {
  background: var(--surface);
  box-shadow: var(--register);
}

.resource-row:hover .resource-title,
.resource-row:focus-visible .resource-title {
  text-decoration: underline;
  text-decoration-color: var(--marker-edge);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

.resource-main {
  display: grid;
  gap: var(--s1);
  min-width: 0;
}

.resource-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--ink);
  overflow-wrap: break-word;
}

.resource-why {
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.55;
}

.resource-host {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: var(--s1);
}

.resource-go {
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1;
  color: var(--muted);
  padding-top: 0.15em;
}

.resource-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.resource-list > li.is-start .resource-row {
  background: var(--surface);
  box-shadow: var(--register);
}

.resource-list > li.is-filter-hidden,
.resources-group.is-filter-hidden,
.resource-list > li.resources-cluster.is-filter-hidden {
  display: none;
}

.articles-group.is-filter-hidden,
.articles .post-list > li.is-filter-hidden {
  display: none;
}

.articles-jump.is-filter-hidden {
  display: none;
}

.resource-in { font-style: normal; }

.resource-also {
  margin: var(--s2) 0 0;
  font-size: 0.9rem;
}

.resource-also a {
  color: var(--ink);
  text-decoration-color: var(--marker-edge);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

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

.glossary-find {
  margin: var(--s5) 0 var(--s4);
  max-width: var(--measure);
}

.glossary-find-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--s2);
}

.glossary-find-input {
  display: block;
  width: 100%;
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.4;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: var(--r);
  padding: var(--s3) var(--s4);
}

.glossary-find-input:focus {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

@media (max-width: 48rem) {
  .glossary-find {
    position: sticky;
    top: 0;
    z-index: 5;
    padding-top: calc(var(--s2) + env(safe-area-inset-top, 0px));
    padding-bottom: var(--s2);
    margin-top: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }

  main.glossary .term-list > li,
  main.articles .articles-group,
  main.resources .resources-group,
  main.glossary .glossary-group,
  main.articles h2[id],
  main.resources h2[id],
  main.glossary h2[id] {
    scroll-margin-top: 8.5rem;
  }
}

main.glossary.is-filtering .glossary-group:not(.is-filter-hidden) .group-intro,
main.glossary.is-filtering .glossary-group:not(.is-filter-hidden) .group-reading-list,
main.resources.is-filtering details.resources-group:not(.is-filter-hidden) .group-intro,
main.resources.is-filtering details.resources-group:not(.is-filter-hidden) .resource-topic-chips {
  display: none;
}

main.articles.is-filtering .articles-group:not(.is-filter-hidden) .group-intro {
  display: none;
}

.glossary-find-status {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: var(--s2) 0 0;
  min-height: 1.2em;
}

.glossary .post-group,
.glossary details.glossary-group {
  border-top: 2px solid var(--marker-edge);
  padding-top: var(--s2);
  margin-top: var(--s4);
}

.glossary details.glossary-group[open] {
  margin-top: var(--s6);
  padding-top: var(--s3);
}

.glossary .post-group:first-of-type,
.glossary details.glossary-group:first-of-type {
  margin-top: var(--s5);
}

.glossary-group > summary,
details.resources-group > summary {
  list-style: none;
  cursor: pointer;
  padding: var(--s3) 0 var(--s4);
}

.glossary-group > summary::-webkit-details-marker,
details.resources-group > summary::-webkit-details-marker {
  display: none;
}

.glossary-group > summary::before,
details.resources-group > summary::before {
  content: "+";
  display: inline-block;
  width: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
  vertical-align: top;
  margin-top: 0.35rem;
}

.glossary-group[open] > summary::before,
details.resources-group[open] > summary::before {
  content: "−";
}

.group-summary-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s2) var(--s3);
  margin-bottom: var(--s2);
}

.glossary-group .group-summary-head .group-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding-top: 0.2em;
}

.glossary-group summary h2,
details.resources-group summary h2 {
  display: inline;
  flex: 1;
  min-width: 0;
  font-size: clamp(1.15rem, 2.4vw, 1.3rem);
  margin: 0;
  line-height: 1.35;
}

.glossary-group .group-term-count,
details.resources-group .group-term-count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
}

.glossary-group summary .group-intro,
details.resources-group summary .group-intro {
  margin: 0 0 var(--s2);
  padding-left: 1.1rem;
  font-size: 0.96rem;
  line-height: 1.55;
  color: var(--muted);
}

.glossary-group-body .resource-topic-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s3);
  margin: 0 0 var(--s3);
}

.resource-topic-chip {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding: var(--s2) 0;
}

.resource-topic-chip:hover,
.resource-topic-chip:focus-visible,
.resource-topic-chip:active {
  color: var(--ink);
  border-bottom-color: var(--marker-edge);
}

.resource-topic-chip-count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.glossary-group-body {
  padding-bottom: var(--s4);
}

.glossary-group-body .group-reading-list {
  margin: 0 0 var(--s3);
}

.shelf-browse.is-filter-hidden {
  display: none;
}

.glossary-group.is-filter-hidden,
.term-list > li.is-filter-hidden {
  display: none;
}

.term-index-group.is-filter-hidden {
  display: none;
}

.term-index-terms a.is-filter-hidden {
  display: none;
}

.term-index {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: var(--s4);
  margin: var(--s4) 0 var(--s6);
}

.term-index-group {
  border-top: 1px solid var(--line);
  padding-top: var(--s2);
  margin-top: var(--s2);
}

.term-index-group:first-child {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

.term-index-group > summary {
  list-style: none;
  cursor: pointer;
}

.term-index-group > summary::-webkit-details-marker {
  display: none;
}

.term-index-group > summary::before {
  content: "+";
  display: inline-block;
  width: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
}

.term-index-group[open] > summary::before {
  content: "−";
}

.term-index-label {
  display: inline;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}

.term-index-label:hover,
.term-index-label:focus-visible {
  color: var(--ink);
}

.term-index-terms {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s3);
  align-items: baseline;
  padding: var(--s2) 0 var(--s1) 1.1rem;
}

.term-index-terms a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: var(--s1) 0;
  font-family: var(--font-display);
  font-size: 0.86rem;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.term-index-terms a:hover,
.term-index-terms a:focus-visible {
  border-bottom-color: var(--marker-edge);
}

.term-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.term-list > li {
  border-top: 1px solid var(--line);
  padding: var(--s4) 0;
  scroll-margin-top: var(--s6);
}

.term-list > li:last-child { border-bottom: 1px solid var(--line); }

.term-list > li.is-compact {
  padding: var(--s2) 0;
}

.term-list > li.is-compact h3 {
  display: inline;
  font-size: 0.98rem;
  margin: 0;
}

.term-list > li.is-compact h3::after {
  content: " — ";
  font-weight: 400;
  color: var(--muted);
}

.term-list > li.is-compact .term-compact-def {
  display: inline;
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.55;
}

.term-list > li.is-compact .term-compact-def p {
  display: inline;
  margin: 0;
}

.term-list > li.is-compact .term-see {
  display: block;
  margin-top: var(--s2);
}

.term-group-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--s1);
}

@keyframes glossary-target-fade {
  from { background: var(--marker); }
  to { background: transparent; }
}

.term-list > li:target {
  background: var(--marker);
  animation: glossary-target-fade 2.5s ease-out forwards;
}

@media (prefers-reduced-motion: reduce) {
  .term-list > li:target {
    animation: none;
    background: transparent;
    box-shadow: inset 3px 0 0 var(--ink);
  }
}

.term-list h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 var(--s2);
  letter-spacing: -0.02em;
}

.term-list p {
  margin: 0 0 var(--s2);
  font-size: 0.98rem;
  line-height: 1.55;
}

.term-list p:last-child { margin-bottom: 0; }

.term-see {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: var(--s2);
}

.term-see a {
  color: var(--ink);
  text-decoration-color: var(--marker-edge);
  text-underline-offset: 0.18em;
}

.term-table-wrap {
  overflow-x: auto;
  max-width: 100%;
  margin: var(--s3) 0;
  -webkit-overflow-scrolling: touch;
}

.term-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.term-table caption {
  caption-side: bottom;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding-top: var(--s2);
}

.term-table th,
.term-table td {
  border: 1px solid var(--line);
  padding: var(--s2) var(--s3);
  text-align: left;
  vertical-align: top;
}

.term-table th {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  background: var(--surface);
}

.term-note {
  font-size: 0.92rem;
  color: var(--muted);
  margin: var(--s2) 0 0;
}

@media (max-width: 48rem) {
  .pager { grid-template-columns: 1fr; }
  .pager-next { text-align: left; }
  .post-list a { grid-template-columns: 2.1rem 1fr; }
  .articles .post-list a { grid-template-columns: 2.1rem 1fr; }
  .topic-map a { grid-template-columns: 2.1rem 1fr; }
  .topic-count {
    grid-column: 2;
    padding-top: 0;
    margin-top: var(--s1);
  }
  .articles-jump .term-index-group {
    grid-template-columns: 1fr;
  }
  .resources-jump .term-index-group {
    grid-template-columns: 1fr;
  }
  .glossary-jump .term-index-group {
    grid-template-columns: 1fr;
  }
  .group-summary-head {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s1);
    padding-left: 1.1rem;
  }
  .glossary-group > summary::before,
  details.resources-group > summary::before {
    float: left;
    margin-top: 0.15rem;
  }
  .glossary-group summary .group-intro,
  details.resources-group summary .group-intro {
    padding-left: 1.1rem;
  }
  .start-here-link {
    grid-template-columns: 1fr;
    gap: var(--s1);
  }
}

/* ---------- About identity strip ---------- */

.about-identity {
  margin: var(--s6) 0 var(--s7);
  padding: var(--s5);
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: var(--r);
  box-shadow: var(--register);
}

.about-identity-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  margin: 0 0 var(--s2);
}

.about-identity-tagline {
  margin: 0 0 var(--s4);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.about-contact {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  margin: 0;
  padding-top: var(--s3);
  border-top: 1px solid var(--line);
}

.about-contact a {
  text-decoration-color: var(--marker-edge);
  text-underline-offset: 0.18em;
}

/* ---------- Fetch check tool ---------- */

.tool-scope {
  margin: var(--s5) 0;
  padding: var(--s4);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink);
  border-radius: var(--r);
  background: var(--sunken);
}

.tool-scope p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--muted);
}

.tool-scope a {
  color: var(--ink);
}

.tool-form {
  margin: var(--s5) 0 var(--s4);
}

.tool-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--s2);
}

.tool-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  align-items: stretch;
}

.tool-row .glossary-find-input {
  flex: 1 1 16rem;
}

.tool-row .cta {
  flex: 0 0 auto;
  border: none;
  cursor: pointer;
}

.tool-row .cta:disabled {
  opacity: 0.55;
  cursor: wait;
}

.tool-hint,
.tool-footnote,
.tool-note {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.tool-hint {
  margin: var(--s3) 0 0;
}

.tool-status {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  color: var(--muted);
  min-height: 1.3em;
  margin: 0 0 var(--s4);
}

.tool-results {
  margin-top: var(--s4);
}

.tool-error {
  color: var(--wrong);
  margin: 0 0 var(--s3);
}

.tool-bots th,
.tool-bots td {
  vertical-align: top;
}

.tool-state-allowed { color: var(--correct); font-weight: 600; }
.tool-state-disallowed { color: var(--wrong); font-weight: 600; }
.tool-state-unspecified { color: var(--muted); }

.tool-note { margin-left: 0.25rem; }

@media (max-width: 48rem) {
  .tool-row .cta { width: 100%; text-align: center; }
}

.tool-related {
  margin-top: var(--s7);
  padding-top: var(--s5);
  border-top: 1px solid var(--line);
}

.tool-related-lede {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
  margin: 0 0 var(--s4);
  max-width: 36rem;
}

.tool-related-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--s3);
}

.tool-related-list li {
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--muted);
  padding-left: var(--s4);
  border-left: 2px solid var(--line);
}

.tool-related-list a {
  color: var(--ink);
  text-decoration-color: var(--marker-edge);
  text-underline-offset: 0.18em;
}

.tool-explain {
  margin: var(--s4) 0 var(--s3);
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--ink);
  max-width: 40rem;
}

.tool-next {
  margin: 0 0 var(--s3);
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 40rem;
}

.tool-next a {
  color: var(--ink);
  text-decoration-color: var(--marker-edge);
  text-underline-offset: 0.18em;
}

.tool-related-list li.tool-related-priority {
  border-left-color: var(--ink);
  color: var(--ink);
}

