/* Page styles for technical guide pages: slugify-vs, wordpress, API docs, messy-links article, slug generator (design part 2, 2026-12-05). Loaded after guides.css.

   Every rule is scoped to a wrapper class that only one page carries, so nothing here can reach another page:
     .gt-messy    /shortener/blog/ai-url-shortening-works-with-messy-tracking-links
     .gt-whatis   /shortener/blog/what-is-ai-url-shortener
     .gt-slugify  /shortener/slugify-vs-url-shortener
     .gt-sluggen  /shortener/slug-generator
     .gt-boot     the two pages written with Bootstrap utility classes (Bootstrap is not loaded):
     .gt-wp       /shortener/wordpress-slug-optimization
     .gt-api      /shortener/slug-api-documentation

   Colours: text on tinted backgrounds uses the *-dark tokens (AA 4.5:1); white text only sits on
   #4338CA / #047857 / #B91C1C / #0F172A / #475569 grounds. */

/* =========================================================================================================
   1. Shared article pieces for the three blog-style pages
   ========================================================================================================= */

/* Post meta: on a phone the items wrapped mid-phrase ("Updated / December 5, 2026"). Each item stays whole. */
:is(.gt-whatis, .gt-slugify) .post-meta {
  flex-wrap: wrap;
  row-gap: var(--space-1);
}

:is(.gt-whatis, .gt-slugify) .post-meta > * {
  white-space: nowrap;
}

:is(.gt-whatis, .gt-slugify) .post-meta .separator {
  color: var(--text-subtle);
}

/* Plain lists inside the article column keep their bullets and indent. */
:is(.gt-whatis, .gt-slugify, .gt-messy) :is(.post-content, .blog-article) ul:not([class]),
:is(.gt-whatis, .gt-slugify, .gt-messy) :is(.post-content, .blog-article) ol:not([class]) {
  padding-left: 1.5rem;
  margin: 0 0 var(--space-6);
}

:is(.gt-whatis, .gt-slugify, .gt-messy) :is(.post-content, .blog-article) ul:not([class]) > li {
  list-style: disc;
}

:is(.gt-whatis, .gt-slugify, .gt-messy) :is(.post-content, .blog-article) ol:not([class]) > li {
  list-style: decimal;
}

:is(.gt-whatis, .gt-slugify, .gt-messy) :is(.post-content, .blog-article) li::marker {
  color: var(--brand-ink);
}

/* Inline code: one look across the article, readable on any light surface. */
:is(.gt-whatis, .gt-slugify, .gt-messy) :not(pre) > code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: #EEF2FF;
  color: #3730A3;
  padding: 0.1em 0.4em;
  border-radius: var(--radius-sm);
  overflow-wrap: anywhere;
}

/* Good / bad / manual cards: headings in the dark tokens, which pass on the tinted gradients. */
:is(.gt-whatis, .gt-messy) .comparison-card.good h4 {
  color: var(--success-dark);
}

:is(.gt-whatis, .gt-messy) .comparison-card.bad h4 {
  color: var(--error-dark);
}

.gt-whatis .comparison-card.manual {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(245, 158, 11, 0.02));
  border-color: rgba(180, 83, 9, 0.35);
}

.gt-whatis .comparison-card.manual h4 {
  color: rgb(var(--sec-amber-ink));
}

/* Numbered rows on a phone: the "#N" floats beside the heading and the body text below gets the full
   column, instead of a 3rem gutter running down the whole item. */
@media (max-width: 640px) {
  :is(.gt-whatis .benefit-item, .gt-messy .feature-detailed, .gt-slugify .workflow-step) {
    display: block;
  }

  :is(.gt-whatis .benefit-number, .gt-messy .feature-number, .gt-slugify .step-num) {
    float: left;
    min-width: 0;
    margin-right: var(--space-2);
  }

  :is(.gt-whatis .benefit-content, .gt-messy .feature-content, .gt-slugify .step-content) > :first-child {
    margin-top: 0;
  }
}

/* =========================================================================================================
   2. Messy tracking links article (.gt-messy)
   ========================================================================================================= */

.gt-messy {
  padding: var(--space-10) 0 var(--space-16);
}

/* Article column centred; the sidebar sits beside it only when there is room for both. */
.gt-messy > .container {
  display: grid;
  grid-template-columns: minmax(0, 820px);
  justify-content: center;
  gap: var(--space-12);
}

@media (min-width: 1200px) {
  .gt-messy > .container {
    grid-template-columns: minmax(0, 820px) 260px;
    align-items: start;
  }

  .gt-messy .blog-sidebar {
    position: sticky;
    top: 96px;
  }
}

.gt-messy .blog-article {
  min-width: 0;
  color: var(--text-primary);
  font-size: 1.0625rem;
  line-height: 1.75;
}

.gt-messy :is(h2, h3)[id] {
  scroll-margin-top: 96px;
}

/* Header */
.gt-messy .article-header {
  text-align: center;
  padding-bottom: var(--space-8);
  margin-bottom: var(--space-8);
  border-bottom: 1px solid var(--border);
}

.gt-messy .article-category {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-full);
  background: #EEF2FF;
  color: var(--brand-ink);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.gt-messy .article-title {
  font-size: clamp(1.875rem, 4.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 var(--space-4);
}

.gt-messy .article-title strong {
  color: var(--brand-ink);
  white-space: nowrap;
}

.gt-messy .article-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.gt-messy .article-meta > *,
.gt-messy .article-meta .post-updated {
  white-space: nowrap;
}

.gt-messy .reading-time {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Sections and headings */
.gt-messy .article-section {
  margin-bottom: var(--space-12);
}

.gt-messy .article-section h2 {
  font-size: clamp(1.5rem, 3.2vw, 1.875rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--border);
}

.gt-messy .article-section h3 {
  font-size: 1.375rem;
  font-weight: 700;
  margin: var(--space-8) 0 var(--space-5);
}

.gt-messy .article-section h4 {
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 var(--space-2);
}

.gt-messy .article-section p {
  color: var(--text-secondary);
  margin: 0 0 var(--space-4);
}

.gt-messy .article-section .lead {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--text-primary);
  font-weight: 500;
}

/* TL;DR callout */
.gt-messy .callout-info {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-left: 4px solid var(--link);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  color: var(--info-dark);
}

.gt-messy .callout-info > i {
  color: var(--link);
  font-size: 1.25rem;
  line-height: 1.6;
}

/* Code blocks: dark, monospace, scroll sideways instead of widening the page. */
.gt-messy pre {
  background: #0F172A;
  color: #E2E8F0;
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  margin: 0 0 var(--space-5);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  font-size: 0.875rem;
  line-height: 1.6;
}

.gt-messy pre code {
  font-family: var(--font-mono);
  background: none;
  color: inherit;
  padding: 0;
  white-space: pre;
}

/* Good / bad cards side by side (the wrapper is a div here, not a table). */
.gt-messy div.comparison-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
  margin: var(--space-6) 0 0;
  background: none;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
}

.gt-messy .comparison-card {
  margin: 0;
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
}

.gt-messy .comparison-card.good {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.02));
  border-color: rgba(4, 120, 87, 0.35);
}

.gt-messy .comparison-card.bad {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.02));
  border-color: rgba(185, 28, 28, 0.3);
}

.gt-messy .comparison-card h4 {
  font-size: 1.0625rem;
  margin-bottom: var(--space-3);
}

.gt-messy .comparison-card ul {
  margin: 0;
  padding-left: 1.25rem;
}

.gt-messy .comparison-card li {
  list-style: disc;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: var(--space-2);
}

.gt-messy .comparison-card li:last-child {
  margin-bottom: 0;
  font-weight: 600;
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .gt-messy div.comparison-table {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The six advantages: one card each, "#N" beside the heading. */
.gt-messy .feature-detailed {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin-bottom: var(--space-5);
  box-shadow: var(--shadow-xs);
}

.gt-messy .feature-number {
  line-height: 1.35;
  font-size: 1.1875rem;
}

.gt-messy .feature-content > *:last-child {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .gt-messy .feature-detailed {
    padding: var(--space-5) var(--space-4);
  }
}

/* Example #1: the story of one messy link, top to bottom. */
.gt-messy .example-box {
  margin-top: var(--space-5);
  background: var(--background-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.gt-messy .example-box > strong {
  display: block;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
}

.gt-messy .example-input,
.gt-messy .example-output {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
}

.gt-messy .example-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.gt-messy .example-box code.url-break {
  display: block;
  background: var(--error-light);
  color: var(--error-dark);
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  line-height: 1.6;
  word-break: break-all;
}

.gt-messy .context-input {
  font-size: 0.9375rem;
  color: var(--text-primary);
  line-height: 1.7;
}

.gt-messy .arrow-down {
  text-align: center;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--brand-ink);
  margin: var(--space-1) 0 var(--space-3);
}

.gt-messy .example-output {
  border-color: rgba(4, 120, 87, 0.35);
  background: #F0FDF4;
  margin-bottom: 0;
}

.gt-messy .suggestion-result {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-3);
  padding: var(--space-2) 0;
  border-top: 1px solid rgba(4, 120, 87, 0.15);
}

.gt-messy .example-label + .suggestion-result {
  border-top: none;
}

.gt-messy .suggestion-result .slug {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--success-dark);
  background: var(--surface);
  border: 1px solid rgba(4, 120, 87, 0.3);
  border-radius: var(--radius-full);
  padding: 0.15rem 0.75rem;
  font-size: 0.9375rem;
}

.gt-messy .suggestion-result .reason {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Example #2: three cases, one row each. */
.gt-messy .control-demo {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.gt-messy .control-option {
  border-left: 4px solid var(--brand-ink);
  background: #F5F7FF;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--space-3) var(--space-4);
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.gt-messy .control-option strong {
  display: block;
  color: var(--text-primary);
}

/* Example #3 */
.gt-messy .ai-quote {
  margin: var(--space-4) 0 0;
  padding: var(--space-4) var(--space-5);
  border-left: 4px solid var(--secondary-dark);
  background: #F5F3FF;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: #4C1D95;
  font-style: italic;
}

/* Example #4 */
.gt-messy .seo-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.gt-messy .seo-benefit {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  background: var(--background-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}

.gt-messy .seo-benefit > i {
  font-size: 1.25rem;
  color: var(--brand-ink);
  line-height: 1.4;
}

.gt-messy .seo-benefit strong {
  display: block;
  color: var(--text-primary);
}

.gt-messy .seo-benefit p {
  font-size: 0.875rem;
  line-height: 1.5;
  margin: var(--space-1) 0 0;
}

@media (max-width: 900px) {
  .gt-messy .seo-benefits {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Tables (#5 and the comparison) */
.gt-messy .comparison-detailed {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.gt-messy :is(.flexibility-table, .comparison-table-full) {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.gt-messy .flexibility-table {
  margin-top: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.gt-messy :is(.flexibility-table, .comparison-table-full) :is(th, td) {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.gt-messy :is(.flexibility-table, .comparison-table-full) th {
  background: var(--background-alt);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.875rem;
}

.gt-messy :is(.flexibility-table, .comparison-table-full) td {
  color: var(--text-secondary);
}

.gt-messy :is(.flexibility-table, .comparison-table-full) tr:last-child td {
  border-bottom: none;
}

.gt-messy .flexibility-table .highlight-row td {
  background: #EEF2FF;
  color: var(--text-primary);
}

.gt-messy .comparison-table-full {
  min-width: 640px;
}

.gt-messy .comparison-table-full td:first-child {
  font-weight: 600;
  color: var(--text-primary);
}

.gt-messy .comparison-table-full .highlight-col {
  background: #EEF2FF;
  color: var(--text-primary);
}

.gt-messy .comparison-table-full th.highlight-col {
  color: var(--brand-ink);
}

.gt-messy .comparison-detailed + *,
.gt-messy .comparison-detailed .section-note {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.gt-messy .comparison-detailed .section-note {
  margin: 0;
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border);
}

/* Example #6 */
.gt-messy .learning-example {
  margin-top: var(--space-4);
}

.gt-messy .suggestion-explained {
  display: flex;
  gap: var(--space-5);
  align-items: flex-start;
  background: var(--background-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.gt-messy .slug-large {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--brand-ink);
  background: var(--surface);
  border: 2px solid var(--brand-ink);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-4);
}

.gt-messy .explanation ul {
  margin: var(--space-2) 0 0;
  padding-left: 1.25rem;
}

.gt-messy .explanation li {
  list-style: disc;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

@media (max-width: 640px) {
  .gt-messy .suggestion-explained {
    flex-direction: column;
    gap: var(--space-3);
  }
}

/* Use cases */
.gt-messy .use-cases {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
}

.gt-messy .use-case {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
}

.gt-messy .use-case-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: #EEF2FF;
  color: var(--brand-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: var(--space-3);
}

.gt-messy .use-case p {
  font-size: 0.9375rem;
}

.gt-messy .use-case-example {
  margin-top: auto;
  background: var(--background-alt);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  font-size: 0.875rem;
  line-height: 1.8;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

.gt-messy .use-case-example strong {
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .gt-messy .use-cases {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* How to get started: numbered steps reading "#1". */
.gt-messy .steps-list {
  counter-reset: gt-step;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-3);
}

.gt-messy .steps-list > li {
  counter-increment: gt-step;
  display: block;
  margin: 0;
  position: relative;
  padding: var(--space-4) var(--space-5) var(--space-4) 4rem;
  background: var(--background-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.gt-messy .steps-list > li::before {
  content: "#" counter(gt-step);
  display: block;
  width: auto;
  height: auto;
  background: none;
  border-radius: 0;
  position: absolute;
  left: var(--space-5);
  top: var(--space-4);
  font-weight: 800;
  font-size: 1.1875rem;
  line-height: 1.5;
  color: var(--brand-ink);
}

.gt-messy .steps-list strong {
  display: block;
  color: var(--text-primary);
  font-size: 1.0625rem;
}

.gt-messy .steps-list p {
  margin: var(--space-1) 0 0;
  font-size: 0.9375rem;
}

/* FAQ */
.gt-messy .faq-list {
  display: grid;
  gap: var(--space-3);
}

.gt-messy .faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 0;
  margin: 0;
}

.gt-messy .faq-item summary {
  cursor: pointer;
  padding: var(--space-4) var(--space-5);
  font-weight: 700;
  color: var(--text-primary);
}

.gt-messy .faq-item[open] summary {
  border-bottom: 1px solid var(--border);
}

.gt-messy .faq-item p {
  padding: var(--space-4) var(--space-5);
  margin: 0;
}

/* Sidebar */
.gt-messy .blog-sidebar {
  display: grid;
  gap: var(--space-5);
  align-content: start;
}

.gt-messy .sidebar-card {
  background: var(--background-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.gt-messy .sidebar-card h3 {
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0 0 var(--space-3);
}

.gt-messy .sidebar-card ul {
  position: static;
  list-style: none;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
}

.gt-messy .sidebar-card li {
  margin: 0;
}

.gt-messy .sidebar-card li {
  border-top: 1px solid var(--border);
}

.gt-messy .sidebar-card li:first-child {
  border-top: none;
}

.gt-messy .sidebar-card a {
  display: block;
  padding: var(--space-2) 0;
  color: var(--link);
  font-size: 0.9375rem;
  line-height: 1.4;
  text-decoration: none;
}

.gt-messy .sidebar-card a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* Below the two-column width the sidebar comes after the article: the TOC is pointless there, the related
   links are not. */
@media (max-width: 1199px) {
  .gt-messy .blog-sidebar {
    grid-template-columns: minmax(0, 1fr);
  }

  .gt-messy .blog-sidebar .sidebar-card:has(.toc) {
    display: none;
  }
}

/* =========================================================================================================
   3. What is an AI URL shortener (.gt-whatis)
   ========================================================================================================= */

.gt-whatis .definition-box {
  background: #EEF2FF;
  border-left: 4px solid var(--brand-ink);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: var(--space-5) var(--space-6);
  margin: var(--space-6) 0;
}

.gt-whatis .definition-box h3 {
  margin-top: 0;
  font-size: 1.125rem;
  color: var(--brand-ink);
}

.gt-whatis .definition-box p {
  margin: 0;
  color: var(--text-primary);
}

.gt-whatis .problem-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-6);
  display: grid;
  gap: var(--space-2);
}

.gt-whatis .problem-list li {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin: 0;
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.5;
}

.gt-whatis .process-steps {
  display: grid;
  gap: var(--space-4);
  margin: var(--space-6) 0;
}

.gt-whatis .tech-note {
  background: var(--background-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin: var(--space-8) 0;
}

.gt-whatis .tech-note h3 {
  margin-top: 0;
}

.gt-whatis .tech-note ul,
.gt-whatis .consistency-example ul {
  padding-left: 1.5rem;
  margin: 0;
}

.gt-whatis .tech-note li,
.gt-whatis .consistency-example li {
  list-style: disc;
}

.gt-whatis .comparison-card .verdict {
  margin: var(--space-3) 0 var(--space-1);
  font-size: 0.9375rem;
  color: var(--text-primary);
}

/* Benefit #1: random vs readable, as a before/after strip. */
.gt-whatis .stat-box {
  display: grid;
  gap: var(--space-2);
  background: var(--background-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  margin-top: var(--space-4);
}

.gt-whatis .stat-box p {
  margin: 0;
  font-size: 1rem;
}

.gt-whatis .stat-box .increase {
  font-weight: 700;
  color: var(--success-dark);
}

.gt-whatis .stat-box .increase::before {
  content: "\2191\00a0";
}

/* Benefit #4: inconsistent vs consistent, two panels. */
.gt-whatis .consistency-example {
  background: var(--background-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  margin-top: var(--space-4);
}

.gt-whatis .consistency-example p {
  margin: 0 0 var(--space-2);
  color: var(--text-primary);
}

.gt-whatis .consistency-example ul + p {
  margin-top: var(--space-4);
}

/* Benefit #5: said out loud. */
.gt-whatis :is(.bad-example, .good-example) {
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin: 0 0 var(--space-3);
  font-style: italic;
}

.gt-whatis .bad-example {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: var(--error-dark);
}

.gt-whatis .good-example {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: var(--success-dark);
}

/* Use cases: cards. */
.gt-whatis .use-case {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-5) var(--space-6);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-xs);
}

.gt-whatis .use-case h3 {
  margin-top: 0;
  font-size: 1.25rem;
}

.gt-whatis .use-case p:last-child {
  margin-bottom: 0;
}

.gt-whatis .use-case .example {
  background: var(--background-alt);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: 1rem;
}

.gt-whatis .key-takeaways {
  background: #EEF2FF;
  border: 1px solid #C7D2FE;
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin: var(--space-8) 0;
}

.gt-whatis .key-takeaways h3 {
  margin-top: 0;
  color: var(--brand-ink);
}

.gt-whatis .key-takeaways ul {
  padding-left: 1.5rem;
  margin: 0;
}

.gt-whatis .key-takeaways li {
  list-style: disc;
  color: var(--text-primary);
}

.gt-whatis .key-takeaways p:last-child {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .gt-whatis :is(.tech-note, .key-takeaways, .use-case) {
    padding: var(--space-4);
  }
}

/* =========================================================================================================
   4. Slugify vs URL shortener (.gt-slugify)
   ========================================================================================================= */

.gt-slugify .tldr-box {
  background: #EEF2FF;
  border: 1px solid #C7D2FE;
  border-left: 4px solid var(--brand-ink);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  margin: var(--space-6) 0;
}

.gt-slugify .tldr-box h3 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-2);
  font-size: 1.125rem;
  color: var(--brand-ink);
}

.gt-slugify .tldr-box p {
  margin: 0;
  color: var(--text-primary);
}

/* Input -> output: the transformation drawn as two panels and an arrow. */
.gt-slugify .example-visual {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: var(--space-3);
  margin: var(--space-6) 0;
}

.gt-slugify :is(.visual-before, .visual-after) {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  border: 1px solid var(--border);
}

.gt-slugify .visual-before {
  background: var(--background-alt);
}

.gt-slugify .visual-after {
  background: #ECFDF5;
  border-color: #A7F3D0;
}

.gt-slugify :is(.visual-before, .visual-after) .label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.gt-slugify .visual-after .label {
  color: var(--success-dark);
}

.gt-slugify :is(.visual-before, .visual-after) code {
  background: var(--surface);
  font-size: 0.875rem;
  padding: var(--space-2) var(--space-3);
  word-break: break-all;
}

.gt-slugify .visual-after code {
  color: var(--success-dark);
  font-weight: 700;
}

.gt-slugify .visual-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--brand-ink);
}

@media (max-width: 640px) {
  .gt-slugify .example-visual {
    grid-template-columns: minmax(0, 1fr);
  }

  .gt-slugify .visual-arrow {
    transform: rotate(90deg);
  }
}

/* Tool links styled as buttons. */
.gt-slugify .tool-cta {
  margin: var(--space-6) 0 var(--space-2);
}

.gt-slugify .tool-cta a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: none;
}

.gt-slugify .tool-cta a.btn-secondary {
  background: var(--surface);
  color: var(--brand-ink);
  border: 2px solid var(--brand-ink);
}

.gt-slugify .tool-cta a.btn-secondary:hover {
  background: #EEF2FF;
  color: var(--brand-ink-hover);
}

/* When to use each: two columns of ticks. */
.gt-slugify .use-case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
  margin: var(--space-6) 0;
}

.gt-slugify .use-case-column {
  background: var(--background-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
}

.gt-slugify .use-case-column h3 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-3);
  font-size: 1.125rem;
}

.gt-slugify .use-case-column h3 i {
  color: var(--brand-ink);
}

.gt-slugify .use-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.gt-slugify .use-list li {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: var(--space-2);
}

.gt-slugify .use-list li i {
  color: var(--success-dark);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .gt-slugify .use-case-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Decision guide: a question with two branches. */
.gt-slugify .decision-flowchart {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin: var(--space-8) 0;
  text-align: center;
}

.gt-slugify .decision-flowchart h3 {
  margin: 0 0 var(--space-4);
}

.gt-slugify .flow-question {
  display: inline-block;
  background: #0F172A;
  color: #FFFFFF;
  font-weight: 700;
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-5);
  line-height: 1.5;
}

.gt-slugify .flow-branches {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-5);
}

.gt-slugify .flow-branch {
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  border: 2px solid;
}

.gt-slugify .flow-branch.yes {
  border-color: #A7F3D0;
  background: #ECFDF5;
}

.gt-slugify .flow-branch.no {
  border-color: #C7D2FE;
  background: #EEF2FF;
}

.gt-slugify .branch-label {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.gt-slugify .flow-branch.yes .branch-label {
  color: var(--success-dark);
}

.gt-slugify .flow-branch.no .branch-label {
  color: var(--brand-ink);
}

.gt-slugify .branch-answer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: 1.0625rem;
  color: var(--text-primary);
}

@media (max-width: 640px) {
  .gt-slugify .decision-flowchart {
    padding: var(--space-4);
  }

  .gt-slugify .flow-branches {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Combine both: numbered workflow. */
.gt-slugify .workflow-steps {
  display: grid;
  gap: var(--space-4);
  margin: var(--space-6) 0;
}

.gt-slugify .workflow-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  box-shadow: var(--shadow-xs);
}

.gt-slugify .step-num {
  line-height: 1.35;
}

.gt-slugify .workflow-step h4 {
  margin: 0 0 var(--space-2);
}

.gt-slugify .workflow-step p {
  margin-bottom: var(--space-3);
}

.gt-slugify .step-example {
  background: var(--background-alt);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: 0.9375rem;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.gt-slugify .benefit-highlight {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  border-radius: var(--radius-xl);
  padding: var(--space-5) var(--space-6);
  margin: var(--space-6) 0;
}

.gt-slugify .benefit-highlight h3 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-3);
  color: var(--success-dark);
}

.gt-slugify .benefit-highlight ul {
  padding-left: 1.5rem;
  margin: 0;
}

.gt-slugify .benefit-highlight li {
  list-style: disc;
  color: var(--text-primary);
}

/* Real-world examples */
.gt-slugify .scenario-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
  margin: var(--space-6) 0;
}

.gt-slugify .scenario-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.gt-slugify .scenario-card h4 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-3);
}

.gt-slugify .scenario-card h4 i {
  color: var(--brand-ink);
}

.gt-slugify .scenario-content p {
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0 0 var(--space-2);
}

.gt-slugify .scenario-content p:has(> strong:only-child) {
  margin-top: var(--space-4);
  color: var(--brand-ink);
}

.gt-slugify .scenario-content p:first-child {
  margin-top: 0;
}

@media (max-width: 768px) {
  .gt-slugify .scenario-cards {
    grid-template-columns: minmax(0, 1fr);
  }
}

.gt-slugify .faq-item h3 {
  font-size: 1.1875rem;
}

/* =========================================================================================================
   5. Slug generator (.gt-sluggen). The page's own <style> block stays (removing it means editing the
      InlineStyleRatchetTests grandfather list); these rules out-rank it.
   ========================================================================================================= */

/* Mistakes: "#1" beside the heading at every width (the block stacked them on phones). */
.gt-sluggen .mistake-item {
  flex-direction: row;
  align-items: flex-start;
  gap: var(--space-3);
}

.gt-sluggen .mistake-icon.bad {
  width: auto;
  height: auto;
  min-width: 2.5rem;
  border-radius: 0;
  background: none;
  color: var(--error-dark);
  font-size: 1.375rem;
  line-height: 1.3;
  justify-content: flex-start;
}

.gt-sluggen .mistake-icon::before {
  content: "#";
}

.gt-sluggen .mistake-content {
  flex: 1 1 auto;
  min-width: 0;
}

.gt-sluggen .mistake-content h3 {
  margin-top: 0;
  line-height: 1.4;
}

/* Use-case cards */
.gt-sluggen .use-cases-grid {
  display: grid;
  gap: var(--space-4);
}

.gt-sluggen .use-case-card {
  text-align: left;
}

/* SlugTools on this page: white text on #3B82F6 is 3.68:1; the tab and the empty state go darker. */
.gt-sluggen #slug-tab-text,
.gt-sluggen [role="tab"][aria-selected="true"] {
  background: var(--brand-ink);
  border-color: var(--brand-ink);
  color: #FFFFFF;
}

.gt-sluggen .slug-tools .st-output-slug.placeholder {
  color: var(--text-subtle);
}

/* =========================================================================================================
   6. Bootstrap-utility pages (.gt-boot = WordPress guide + API docs). Bootstrap is not loaded, so the few
      utilities these two pages use are defined here, scoped to them.
   ========================================================================================================= */

.gt-boot {
  max-width: 1180px;
  color: var(--text-primary);
  font-size: 1.0625rem;
  line-height: 1.7;
}

.gt-boot {
  padding-top: var(--space-10);
  padding-bottom: var(--space-12);
}

/* Breadcrumb */
.gt-boot .breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.gt-boot .breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  margin-right: var(--space-2);
  color: var(--text-subtle);
}

.gt-boot .breadcrumb a {
  color: var(--link);
}

/* Hero */
.gt-boot > header {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.gt-boot .display-4 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.gt-boot .lead {
  font-size: 1.1875rem;
  line-height: 1.6;
}

.gt-boot .lead.mx-auto {
  max-width: 700px;
}

/* Page layout: contents sidebar + article column, centred; stacked below 992px. */
.gt-boot > .row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-6);
  margin: 0;
}

.gt-boot > .row > :is(.col-lg-3, .col-lg-9) {
  width: auto;
  padding: 0;
  margin-bottom: 0;
  min-width: 0;
}

@media (min-width: 992px) {
  .gt-boot > .row {
    grid-template-columns: 240px minmax(0, 860px);
    justify-content: center;
    gap: var(--space-12);
    align-items: start;
  }

  .gt-boot .sticky-lg-top {
    position: sticky;
    top: 96px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
  }
}

.gt-boot section[id] {
  scroll-margin-top: 96px;
}

.gt-boot section[id] > .card[id],
.gt-boot .card[id] {
  scroll-margin-top: 96px;
}

/* Contents nav */
.gt-boot .nav.flex-column {
  display: flex;
  flex-direction: column;
  background: var(--background-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: none;
}

.gt-boot .nav.flex-column h6 {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0 0 var(--space-2);
}

.gt-boot .nav.flex-column .nav-link,
.gt-boot .toc-link {
  display: block;
  padding: 0.4rem 0.75rem;
  margin: 0;
  border-radius: var(--radius-md);
  color: var(--link);
  font-size: 0.9375rem;
  line-height: 1.35;
  text-decoration: none;
}

.gt-boot .nav.flex-column .nav-link:hover {
  background: #EEF2FF;
  color: var(--link-hover);
}

.gt-boot .nav.flex-column .nav-link.ps-4 {
  padding-left: 1.5rem !important;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.gt-boot .nav.flex-column .nav-link.ps-4:hover {
  color: var(--link-hover);
}

@media (max-width: 991px) {
  /* Stacked above the article: two columns of links so the list is not a screen tall. */
  /* content.css forces this nav to flex with !important; the API docs list (15 links) goes to a grid. */
  .gt-api .nav.flex-column {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--space-2);
  }

  .gt-boot .nav.flex-column h6 {
    grid-column: 1 / -1;
  }

  .gt-boot .nav.flex-column .nav-link.ps-4 {
    padding-left: 0.75rem !important;
  }
}

/* Article column type */
.gt-boot .col-lg-9 > section {
  margin-bottom: var(--space-12);
}

.gt-boot .col-lg-9 h2,
.gt-boot .col-lg-9 .h3 {
  font-size: clamp(1.5rem, 3.2vw, 1.875rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--border);
}

.gt-boot .col-lg-9 :is(h3, h4).h5,
.gt-boot .col-lg-9 h4 {
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.35;
  margin: var(--space-8) 0 var(--space-3);
  padding: 0;
  border: none;
}

.gt-boot .col-lg-9 :is(h5, h6) {
  font-size: 1.0625rem;
  font-weight: 700;
  margin: var(--space-4) 0 var(--space-2);
}

.gt-boot .col-lg-9 p {
  color: var(--text-secondary);
  margin: 0 0 var(--space-4);
}

.gt-boot .col-lg-9 :is(ul, ol):not(.list-unstyled) {
  padding-left: 1.5rem;
  margin: 0 0 var(--space-5);
  color: var(--text-secondary);
}

.gt-boot .col-lg-9 ul:not(.list-unstyled) > li {
  list-style: disc;
}

.gt-boot .col-lg-9 ol > li {
  list-style: decimal;
}

.gt-boot .col-lg-9 li {
  margin-bottom: var(--space-2);
}

.gt-boot .col-lg-9 li::marker {
  color: var(--brand-ink);
  font-weight: 700;
}

.gt-boot .col-lg-9 strong {
  color: var(--text-primary);
}

.gt-boot .col-lg-9 a:not(.btn):not(.nav-link) {
  color: var(--link);
}

/* Code */
.gt-boot :not(pre) > code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: #EEF2FF;
  color: #3730A3;
  padding: 0.1em 0.4em;
  border-radius: var(--radius-sm);
  overflow-wrap: anywhere;
}

.gt-boot pre,
.gt-boot pre.bg-light,
.gt-boot code.d-block.bg-dark {
  display: block;
  background: #0F172A;
  color: #E2E8F0;
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  margin: 0 0 var(--space-4);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  max-width: 100%;
}

.gt-boot pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: inherit;
  white-space: pre;
  overflow-wrap: normal;
}

.gt-boot pre.mb-0,
.gt-boot code.d-block.bg-dark {
  margin-bottom: 0;
}

/* Cards */
.gt-boot .card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: none;
  padding: 0;
  transform: none;
  transition: none;
  overflow: hidden;
}

.gt-boot .card:hover {
  transform: none;
  box-shadow: none;
}

.gt-boot .card.shadow-sm,
.gt-boot .shadow-sm {
  box-shadow: var(--shadow-sm);
}

.gt-boot .card.shadow-sm:hover {
  box-shadow: var(--shadow-sm);
}

.gt-boot .card.border-0 {
  border-color: transparent;
}

.gt-boot .card.border-0.shadow-sm {
  border-color: var(--border);
}

.gt-boot .card-body {
  padding: var(--space-5);
}

.gt-boot .card-body > :last-child {
  margin-bottom: 0;
}

.gt-boot .card-header {
  margin: 0;
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--border);
  font-weight: 700;
}

.gt-boot .card-header.bg-dark {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  border-bottom: none;
}

.gt-boot .card .card-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 var(--space-2);
  padding: 0;
  border: none;
}

.gt-boot .card-title.mb-0 {
  margin-bottom: 0;
}

.gt-boot .card-text {
  font-size: 0.9375rem;
}

.gt-boot .card .small,
.gt-boot .card ul.small {
  font-size: 0.875rem;
}

/* Grids inside the article */
.gt-boot .col-lg-9 .row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
  margin: 0 0 var(--space-4);
}

.gt-boot .col-lg-9 .row > [class*="col-"] {
  margin: 0;
  min-width: 0;
}

@media (min-width: 768px) {
  .gt-boot .col-lg-9 .row:has(> .col-md-6) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gt-boot .col-lg-9 .row:has(> .col-md-4) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.gt-boot .h-100 {
  height: 100%;
}

/* Badges */
.gt-boot .badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: #FFFFFF;
  vertical-align: middle;
}

/* Alerts */
.gt-boot .alert {
  display: block;
  border: 1px solid;
  border-left-width: 4px;
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  margin: 0 0 var(--space-5);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.gt-boot .alert > :last-child {
  margin-bottom: 0;
}

.gt-boot .alert-warning {
  background: #FFFBEB;
  border-color: #FCD34D;
  border-left-color: var(--warning-dark);
  color: #78350F;
}

.gt-boot .alert-danger {
  background: #FEF2F2;
  border-color: #FECACA;
  border-left-color: var(--error-dark);
  color: #7F1D1D;
}

.gt-boot .alert-info {
  background: #EFF6FF;
  border-color: #BFDBFE;
  border-left-color: var(--link);
  color: var(--info-dark);
}

.gt-boot .alert-secondary {
  background: var(--background-alt);
  border-color: var(--border);
  border-left-color: var(--text-subtle);
  color: var(--text-secondary);
}

.gt-boot .alert :is(p, strong) {
  color: inherit;
}

.gt-boot .alert a {
  color: inherit;
  text-decoration: underline;
}

/* Tables */
.gt-boot .table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin: 0 0 var(--space-5);
}

.gt-boot .table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.5;
  margin: 0 0 var(--space-5);
  background: var(--surface);
}

.gt-boot .table-responsive > .table {
  margin: 0;
}

.gt-boot .table :is(th, td) {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.gt-boot .table.table-sm :is(th, td) {
  padding: var(--space-2) var(--space-3);
}

.gt-boot .table-bordered :is(th, td) {
  border: 1px solid var(--border);
}

.gt-boot .table-responsive > .table-bordered {
  border-style: hidden;
}

.gt-boot .table th,
.gt-boot .table thead.table-light th {
  background: var(--background-alt);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.875rem;
}

.gt-boot .table thead.table-dark th {
  background: #0F172A;
  color: #FFFFFF;
}

.gt-boot .table td {
  color: var(--text-secondary);
}

.gt-boot .table.align-middle :is(th, td) {
  vertical-align: middle;
}

.gt-boot .table-hover tbody tr:hover td {
  background-color: rgba(15, 23, 42, 0.03);
}

/* Wide tables in the API docs scroll on a phone instead of crushing their columns. */
@media (max-width: 640px) {
  .gt-api .col-lg-9 .table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
}

/* Accordions: there is no Bootstrap script, so every item is shown open as a plain heading + answer. */
.gt-boot .accordion {
  display: grid;
  gap: var(--space-3);
}

.gt-boot .accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}

.gt-boot .accordion-header {
  margin: 0;
  padding: 0;
  border: none;
  font-size: 1.0625rem;
}

.gt-boot .accordion-button {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--background-alt);
  border: none;
  border-bottom: 1px solid var(--border);
  padding: var(--space-4) var(--space-5);
  font: inherit;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
  cursor: default;
}

.gt-boot .accordion-collapse {
  display: block;
}

.gt-boot .accordion-body {
  padding: var(--space-4) var(--space-5);
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.gt-boot .accordion-body > :last-child {
  margin-bottom: 0;
}

/* Buttons */
.gt-boot .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  border: 2px solid transparent;
  line-height: 1.3;
}

.gt-boot .btn-lg {
  padding: 0.8rem 1.5rem;
  font-size: 1.0625rem;
}

.gt-boot .btn-outline-primary,
.gt-boot .btn-outline-secondary {
  background: var(--surface);
}

.gt-boot .btn-outline-primary {
  border-color: var(--brand-ink);
  color: var(--brand-ink);
}

.gt-boot .btn-outline-secondary {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.gt-boot :is(.btn-outline-primary, .btn-outline-secondary):hover {
  background: #EEF2FF;
  color: var(--brand-ink-hover);
  border-color: var(--brand-ink-hover);
}

@media (max-width: 640px) {
  .gt-boot header .btn-lg {
    width: 100%;
    margin: 0 0 var(--space-2);
  }
}

/* --- Utilities (only those these two pages use) --- */
.gt-boot .d-flex { display: flex; }
.gt-boot .d-inline-flex { display: inline-flex; }
.gt-boot .d-block { display: block; }
.gt-boot .flex-wrap { flex-wrap: wrap; }
.gt-boot .flex-column { flex-direction: column; }
.gt-boot .align-items-center { align-items: center; }
.gt-boot .align-items-start { align-items: flex-start; }
.gt-boot .justify-content-center { justify-content: center; }
.gt-boot .gap-1 { gap: 0.25rem; }
.gt-boot .gap-2 { gap: 0.5rem; }
.gt-boot .gap-3 { gap: 1rem; }
.gt-boot .mx-auto { margin-left: auto; margin-right: auto; }
.gt-boot .text-center { text-align: center; }
.gt-boot .text-uppercase { text-transform: uppercase; }
.gt-boot .fw-bold { font-weight: 700; }
.gt-boot .fs-5 { font-size: 1.125rem; }
.gt-boot .fs-6 { font-size: 0.875rem; }
.gt-boot .small { font-size: 0.875rem; }
.gt-boot .rounded { border-radius: var(--radius-md); }
.gt-boot .rounded-circle { border-radius: 50%; }
.gt-boot .border { border: 1px solid var(--border); }
.gt-boot .border-0 { border: 0; }
.gt-boot .list-unstyled { list-style: none; padding-left: 0; }

.gt-boot .mb-0 { margin-bottom: 0; }
.gt-boot .mb-1 { margin-bottom: 0.25rem; }
.gt-boot .mb-2 { margin-bottom: 0.5rem; }
.gt-boot .mb-3 { margin-bottom: 1rem; }
.gt-boot .mb-4 { margin-bottom: 1.5rem; }
.gt-boot .mb-5 { margin-bottom: 3rem; }
.gt-boot .mt-1 { margin-top: 0.25rem; }
.gt-boot .mt-3 { margin-top: 1rem; }
.gt-boot .mt-4 { margin-top: 1.5rem; }
.gt-boot .me-2 { margin-right: 0.5rem; }
.gt-boot .me-3 { margin-right: 1rem; }
.gt-boot .ms-2 { margin-left: 0.5rem; }
.gt-boot .p-1 { padding: 0.25rem; }
.gt-boot .p-2 { padding: 0.5rem; }
.gt-boot .p-3 { padding: 1rem; }
.gt-boot .px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.gt-boot .px-3 { padding-left: 1rem; padding-right: 1rem; }
.gt-boot .py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.gt-boot .py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.gt-boot .py-3 { padding-top: 1rem; padding-bottom: 1rem; }

/* Colours: every text/background pair below is AA. components.css marks .text-success/.text-danger
   !important site-wide, so the two that must beat it here say so too. */
.gt-boot .text-muted { color: var(--text-secondary); }
.gt-boot .text-primary { color: var(--brand-ink); }
.gt-boot .text-danger { color: var(--error-dark) !important; }
.gt-boot .text-success { color: var(--success-dark) !important; }
.gt-boot .text-warning { color: var(--warning-dark); }
.gt-boot .text-info { color: #0E7490; }
.gt-boot .text-white,
.gt-boot .text-light { color: #FFFFFF; }
.gt-boot .text-dark { color: var(--text-primary); }

.gt-boot .bg-white { background-color: var(--surface); }
.gt-boot .bg-light { background-color: var(--background-alt); }
.gt-boot .bg-dark { background-color: #0F172A; }
.gt-boot .bg-primary { background-color: var(--brand-ink); }
.gt-boot .bg-secondary { background-color: var(--text-secondary); }
.gt-boot .bg-success { background-color: var(--success-dark); }
.gt-boot .bg-danger { background-color: var(--error-dark); }
.gt-boot .bg-warning { background-color: #F59E0B; }
.gt-boot .bg-info { background-color: #0E7490; }

.gt-boot .bg-primary.bg-opacity-10 { background-color: #EEF2FF; }
.gt-boot .bg-success.bg-opacity-10 { background-color: #ECFDF5; }
.gt-boot .bg-danger.bg-opacity-10 { background-color: #FEF2F2; }
.gt-boot .bg-warning.bg-opacity-10 { background-color: #FFFBEB; }
.gt-boot .bg-info.bg-opacity-10 { background-color: #ECFEFF; }
.gt-boot .bg-success.bg-opacity-25 { background-color: #D1FAE5; }
.gt-boot .bg-white.bg-opacity-25 { background-color: rgba(255, 255, 255, 0.25); }

.gt-boot .border-success { border-color: var(--success-dark); }
.gt-boot .border-2 { border-width: 2px; }

/* Inline code that carries a colour class keeps it (the generic code rule would otherwise win). */
.gt-boot code.text-danger { color: var(--error-dark) !important; background: #FEF2F2; }
.gt-boot code.text-success { color: var(--success-dark) !important; background: #ECFDF5; }
.gt-boot code.bg-light { background: var(--background-alt); }
.gt-boot code .text-danger { color: var(--error-dark) !important; }
.gt-boot code .text-primary { color: var(--brand-ink); }

/* Card headers: the coloured bar's text. */
.gt-boot .card-header.bg-success,
.gt-boot .card-header.bg-danger,
.gt-boot .card-header.bg-dark {
  color: #FFFFFF;
}

/* Primary card (WordPress "Recommended"): white text on brand ink. */
.gt-boot .card.bg-primary.text-white :is(p, li, strong, .card-title, ul) {
  color: #FFFFFF;
}

.gt-boot .card.bg-primary.text-white ul > li::marker {
  color: #FFFFFF;
}

/* =========================================================================================================
   7. WordPress guide specifics (.gt-wp)
   ========================================================================================================= */

/* Hero: ?p=123 -> /wordpress-seo-tips/ */
.gt-wp > header .d-flex.flex-wrap > div {
  font-size: 1rem;
}

.gt-wp > header .d-flex.flex-wrap svg {
  color: var(--brand-ink);
}

.gt-wp > header .d-flex.flex-wrap .border-success {
  border-width: 2px;
}

/* Do / Don't lists: icon chip beside the text. */
.gt-wp .list-unstyled li {
  font-size: 0.9375rem;
  color: var(--text-primary);
  line-height: 1.5;
}

.gt-wp .list-unstyled .rounded-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.gt-wp .list-unstyled .bg-success.bg-opacity-10 { color: var(--success-dark); }
.gt-wp .list-unstyled .bg-danger.bg-opacity-10 { color: var(--error-dark); }

.gt-wp .card-header .rounded-circle {
  display: inline-flex;
  color: #FFFFFF;
}

/* "Where slugs appear" icon chips */
.gt-wp .card-body > .d-flex > .rounded-circle {
  display: inline-flex;
  flex: 0 0 auto;
}

.gt-wp .card-body > code.small {
  display: inline-block;
  margin-top: var(--space-2);
}

/* Highlighted permalink rows */
.gt-wp .table tr.bg-danger.bg-opacity-10 td { background: #FEF2F2; }
.gt-wp .table tr.bg-success.bg-opacity-10 td { background: #ECFDF5; }
.gt-wp .table tr.bg-success.bg-opacity-25 td { background: #D1FAE5; color: var(--text-primary); }

.gt-wp .table code {
  white-space: nowrap;
}

/* =========================================================================================================
   8. API docs specifics (.gt-api)
   ========================================================================================================= */

.gt-api > header .mt-4 {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
}

.gt-api > header .btn.me-2 {
  margin-right: 0;
}

/* Endpoint cards: method badge + path on a dark bar, like a terminal tab. */
.gt-api .card-header.bg-dark {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.gt-api .card-header .badge.me-2 {
  margin-right: 0;
}

.gt-api .badge.bg-warning.text-dark {
  color: #0F172A;
}

.gt-api .card-body.bg-light {
  background: #0F172A;
  padding: 0;
}

.gt-api .card-body.bg-light > pre {
  border-radius: 0;
}

.gt-api .card > .card-body > h6 .badge {
  margin-left: var(--space-2);
}

.gt-api .table code {
  white-space: nowrap;
}

/* =========================================================================================================
   9. Late fixes
   ========================================================================================================= */

.gt-messy div.comparison-table > .comparison-card {
  margin: 0;
}

@media (max-width: 640px) {
  .gt-messy .example-box {
    padding: var(--space-3);
  }

  .gt-messy :is(.example-input, .example-output) {
    padding: var(--space-3);
  }

  .gt-messy .callout-info {
    padding: var(--space-4);
  }
}

/* Card headers: app.css spreads header children apart; here the label sits next to its badge/icon. */
.gt-boot .card-header {
  justify-content: flex-start;
  gap: var(--space-2);
}

.gt-boot .card-header.bg-dark {
  border-bottom: 1px solid #1E293B;
}

/* Badges keep the words as written (no forced capitals). */
.gt-boot .badge {
  text-transform: none;
}

/* Hero date stays centred under the centred title on phones (app.css left-aligns p.hero-intro there). */
@media (max-width: 640px) {
  .public-main .gt-boot > header p.hero-intro {
    text-align: center;
  }
}
