/* UGC agency and platform directory (/ugc-agencies/). Layers on top of
   tools.css and public/creator-directory.css: same 1160px shell, same
   ink/line/primary tokens, same .dir-section rhythm, same .dir-table
   treatment. Only the parts that do not exist in creator-directory.css live
   here. Bump the ?v= in scripts/generate-agency-directory.mjs when this
   changes. */

.agency-page {
  --ag-radius: 14px;
  --ag-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ag-tint: rgba(56, 71, 254, 0.06);
  --ag-tint-line: rgba(56, 71, 254, 0.18);
  --ag-warm: #fff5df;
  --ag-warm-ink: #9a6500;
}

/* ---------- head ---------- */

.ag-head-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.ag-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink-60);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.ag-chip b {
  color: var(--ink);
  font-weight: 900;
}

.ag-chip-model {
  border-color: var(--ag-tint-line);
  background: var(--ag-tint);
  color: var(--ink);
}

.ag-chip-quote {
  border-color: rgba(154, 101, 0, 0.24);
  background: var(--ag-warm);
  color: var(--ag-warm-ink);
}

.ag-outbound {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ag-outbound svg {
  width: 14px;
  height: 14px;
  opacity: 0.6;
}

/* ---------- fact sheet ---------- */

.ag-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
}

.ag-fact {
  display: grid;
  gap: 6px;
  align-content: start;
  min-height: 84px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfbfc;
}

.ag-fact dt {
  color: var(--ink-45);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.ag-fact dd {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
  font-weight: 800;
}

.ag-fact dd a {
  color: var(--primary);
  text-decoration: none;
}

.ag-fact dd a:hover,
.ag-fact dd a:focus-visible {
  text-decoration: underline;
}

.ag-fact-null dd {
  color: var(--ink-45);
  font-weight: 700;
}

/* ---------- observation columns ---------- */

.ag-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.ag-column {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--ag-radius);
  background: rgba(255, 255, 255, 0.86);
}

.ag-column h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 900;
}

.ag-column p {
  margin: 0 0 12px;
  color: var(--ink-45);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 700;
}

.ag-column ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ag-column li {
  position: relative;
  padding-left: 22px;
  color: var(--ink-60);
  font-size: 15px;
  line-height: 1.5;
  font-weight: 600;
}

.ag-column li::before {
  position: absolute;
  top: 8px;
  left: 4px;
  width: 8px;
  height: 8px;
  border-radius: 3px;
  content: "";
}

.ag-column-strengths li::before {
  background: var(--primary);
}

.ag-column-tradeoffs li::before {
  background: #d9a216;
}

/* ---------- compare block ---------- */

.ag-compare {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid var(--ag-tint-line);
  border-radius: var(--ag-radius);
  background: var(--ag-tint);
}

.ag-compare p {
  max-width: 72ch;
  margin: 0 0 14px;
  color: var(--ink-60);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 600;
}

.ag-compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.ag-compare-table th,
.ag-compare-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
  line-height: 1.45;
}

.ag-compare-table thead th {
  color: var(--ink-45);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.ag-compare-table tbody th {
  width: 24%;
  color: var(--ink);
  font-weight: 900;
}

.ag-compare-table td {
  color: var(--ink-60);
  font-weight: 600;
}

.ag-compare-table tr:last-child th,
.ag-compare-table tr:last-child td {
  border-bottom: 0;
}

/* ---------- alternatives ---------- */

.ag-alt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: ag-alt;
}

.ag-alt-card {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--ag-radius);
  background: rgba(255, 255, 255, 0.86);
  transition: border-color 160ms ease, transform 160ms var(--ag-ease);
}

.ag-alt-card:hover {
  border-color: var(--ag-tint-line);
  transform: translateY(-1px);
}

.ag-alt-card a {
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  text-decoration: none;
}

.ag-alt-card a:hover,
.ag-alt-card a:focus-visible {
  color: var(--primary);
}

.ag-alt-card p {
  margin: 0;
  color: var(--ink-60);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 600;
}

.ag-alt-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ---------- questions (no FAQPage schema) ---------- */

.ag-qa {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.ag-qa > div {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--ag-radius);
  background: rgba(255, 255, 255, 0.86);
}

.ag-qa h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 900;
}

.ag-qa p {
  max-width: 72ch;
  margin: 0;
  color: var(--ink-60);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 600;
}

/* ---------- sources ---------- */

.ag-sources {
  margin-top: 20px;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: var(--ag-radius);
  background: #fbfbfc;
}

.ag-sources h3 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-45);
}

.ag-sources ul {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.ag-sources li {
  color: var(--ink-60);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.ag-sources a {
  color: var(--primary);
  text-decoration: none;
}

.ag-sources a:hover,
.ag-sources a:focus-visible {
  text-decoration: underline;
}

.ag-sources p {
  max-width: 80ch;
  margin: 0;
  color: var(--ink-45);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 700;
}

/* ---------- hub: keyword-backed page list ---------- */

.ag-keyword-note {
  max-width: 80ch;
  margin-top: 14px;
  color: var(--ink-45);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 700;
}

.ag-model-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.ag-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-height: 28px;
  padding: 3px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-60);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.ag-pill b {
  color: var(--ink);
  font-weight: 900;
}

.ag-pill:hover,
.ag-pill:focus-visible {
  border-color: var(--ag-tint-line);
  color: var(--ink);
}

.ag-table-name {
  display: grid;
  gap: 3px;
}

.ag-table-name a {
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.ag-table-name a:hover,
.ag-table-name a:focus-visible {
  color: var(--primary);
}

.ag-table-name span {
  color: var(--ink-45);
  font-size: 12px;
  font-weight: 700;
}

.ag-vendor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- editorial list pages ---------- */

.ag-entry {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--ag-radius);
  background: rgba(255, 255, 255, 0.86);
}

.ag-entry-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
}

.ag-entry-head h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 900;
}

.ag-entry-head h3 a {
  color: var(--ink);
  text-decoration: none;
}

.ag-entry-head h3 a:hover,
.ag-entry-head h3 a:focus-visible {
  color: var(--primary);
}

.ag-entry p {
  max-width: 76ch;
  margin: 0;
  color: var(--ink-60);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 600;
}

.ag-entry-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ag-entry-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--ag-tint);
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .ag-columns,
  .ag-alt-grid,
  .ag-vendor-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ag-compare-table tbody th {
    width: 34%;
  }
}

@media (max-width: 540px) {
  .ag-facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .ag-compare {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ag-alt-card {
    transition: none;
  }

  .ag-alt-card:hover {
    transform: none;
  }
}
