/* Top AI Agencies, topaiagencies.com */

:root {
  --ink: #1c1f2b;
  --text: #1f2933;
  --slate: #5b6572;
  --paper: #ffffff;
  --tint: #f6f3ee;
  --rule: #e1dbd2;
  --accent: #b3541e;
  --sans: "Public Sans", "Helvetica Neue", Arial, sans-serif;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --page: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1.5rem; }
body { margin: 0; background: var(--paper); color: var(--text); font-family: var(--serif); font-size: 1.125rem; line-height: 1.62; font-optical-sizing: auto; }

a { color: var(--ink); text-decoration: underline; text-decoration-color: rgba(20,33,61,.35); text-decoration-thickness: 1px; text-underline-offset: .16em; }
a:hover { text-decoration-color: var(--ink); }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .5rem 1rem; }
.skip:focus { left: 1rem; z-index: 10; }

/* Masthead */
.site-header { border-bottom: 1px solid var(--ink); }
.site-header .inner { max-width: var(--page); margin: 0 auto; padding: 1.35rem 1.5rem 1.1rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.wordmark { font-family: var(--sans); font-weight: 700; font-size: 1.3rem; letter-spacing: -.02em; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: .6rem; }
.wordmark::before { content: ""; width: 1.1rem; height: 1.1rem; background:
  linear-gradient(var(--accent), var(--accent)) left bottom / 30% 100% no-repeat,
  linear-gradient(var(--ink), var(--ink)) center bottom / 30% 66% no-repeat,
  linear-gradient(var(--ink), var(--ink)) right bottom / 30% 40% no-repeat; }
.wordmark span { color: var(--ink); }
.site-nav { font-family: var(--sans); font-size: .95rem; font-weight: 500; }
.site-nav a { color: var(--ink); text-decoration: none; margin-left: 1.6rem; padding-bottom: .2rem; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--ink); }

main { max-width: var(--page); margin: 0 auto; padding: 0 1.5rem 4rem; }

/* Type */
h1, h2, h3, h4 { font-family: var(--sans); color: var(--ink); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.2vw, 3rem); margin: 0 0 1rem; }
h2 { font-size: 1.55rem; margin: 3rem 0 .9rem; }
h3 { font-size: 1.15rem; margin: 2rem 0 .5rem; letter-spacing: -.01em; }
h4 { font-size: 1rem; margin: 1.5rem 0 .4rem; }
p, ul, ol { margin: 0 0 1.1rem; }
ul, ol { padding-left: 1.3rem; }
li { margin-bottom: .35rem; }
strong { color: var(--ink); font-weight: 600; }
em { font-style: italic; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

/* Article opening */
.article-header { padding: 2.5rem 0 0; }
.crumbs { font-family: var(--sans); font-size: .85rem; color: var(--slate); margin: 0 0 1.4rem; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; gap: .55rem; flex-wrap: wrap; }
.crumbs a { color: var(--slate); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs li + li::before { content: "/"; margin-right: .55rem; color: var(--rule); }
.meta { font-family: var(--sans); font-size: .9rem; color: var(--slate); margin: 0; }
.meta a { color: var(--slate); }

.opening { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 3rem; align-items: start; margin: 2rem 0 3rem; padding-top: 2rem; border-top: 1px solid var(--ink); }
.answer { margin: 0; }
.answer .label { display: block; font-family: var(--sans); font-weight: 700; font-size: .95rem; color: var(--accent); margin-bottom: .6rem; }
.answer p { font-size: 1.22rem; line-height: 1.5; }
.answer p:first-of-type { font-size: 1.38rem; line-height: 1.4; color: var(--ink); }
.answer p:first-of-type strong { font-weight: 500; }

.facts { background: var(--tint); padding: 1.4rem 1.6rem 1rem; }
.facts h2 { font-size: 1rem; margin: 0 0 .9rem; }
.facts dl { margin: 0; font-size: .95rem; line-height: 1.45; }
.facts dt { font-family: var(--sans); font-weight: 600; color: var(--ink); font-size: .85rem; padding-top: .7rem; border-top: 1px solid var(--rule); }
.facts dd { margin: .15rem 0 .7rem; }

/* Body with sticky contents */
.article-body { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: 3rem; }
.contents { position: sticky; top: 1.5rem; font-family: var(--sans); font-size: .9rem; align-self: start; max-height: calc(100vh - 3rem); overflow: auto; }
.contents p { font-weight: 700; color: var(--ink); margin: 0 0 .6rem; }
.contents ol { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--ink); }
.contents li { margin: 0; border-bottom: 1px solid var(--rule); }
.contents a { display: block; padding: .5rem 0; color: var(--slate); text-decoration: none; line-height: 1.35; }
.contents a:hover { color: var(--ink); }
.prose { max-width: 68ch; }
.prose > h2:first-child { margin-top: 0; }

/* Tables: analyst-note style */
.table-wrap { overflow-x: auto; margin: 1.2rem 0 2rem; }
table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: .9rem; line-height: 1.4; }
thead th { text-align: left; vertical-align: bottom; padding: .55rem .6rem .55rem 0; color: var(--ink); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); font-weight: 700; }
td, tbody th { text-align: left; vertical-align: top; padding: .65rem .6rem .65rem 0; border-bottom: 1px solid var(--rule); }
tbody th { font-weight: 600; color: var(--ink); }
table.two-col tbody th { width: 42%; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 1px solid var(--ink); }

/* Article footer */
.article-footer { margin-top: 3rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); font-family: var(--sans); font-size: .9rem; color: var(--slate); max-width: 68ch; }
.related { margin-top: 3rem; max-width: 68ch; }
.related h2 { font-size: 1.1rem; margin: 0 0 .6rem; }
.related ul { list-style: none; padding: 0; border-top: 1px solid var(--ink); }
.related li { padding: .9rem 0; border-bottom: 1px solid var(--rule); }
.related li a { font-family: var(--sans); font-weight: 600; text-decoration: none; }
.related li a:hover { text-decoration: underline; }
.related li span { display: block; color: var(--slate); font-size: .95rem; }

/* Home and section pages */
.intro { padding: 3rem 0 2rem; max-width: 60rem; }
.intro h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: 1.2rem; }
.intro .lede { font-size: 1.3rem; line-height: 1.45; color: var(--ink); }
.firsts { list-style: none; padding: 0; margin: 1rem 0 0; border-top: 1px solid var(--ink); }
.firsts li { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: 3rem; padding: 1.8rem 0; border-bottom: 1px solid var(--rule); }
.firsts .q { font-family: var(--sans); font-size: .9rem; color: var(--slate); margin: .35rem 0 0; }
.firsts h2 { margin: 0 0 .5rem; font-size: 1.45rem; }
.firsts h2 a { text-decoration: none; }
.firsts h2 a:hover { text-decoration: underline; }
.firsts p { margin: 0; max-width: 62ch; }
.upcoming { margin-top: 2.5rem; font-family: var(--sans); color: var(--slate); font-size: .95rem; max-width: 60rem; }
.upcoming h2 { font-size: 1rem; margin: 0 0 .5rem; }
.upcoming ul { padding-left: 1.2rem; }
.upcoming li { margin-bottom: .2rem; }
section[aria-label="Articles"] > h2 { font-size: 1rem; margin: 0; color: var(--slate); }

/* About */
article.plain { max-width: 68ch; padding-top: 2.5rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--ink); margin-top: 3rem; }
.site-footer .inner { max-width: var(--page); margin: 0 auto; padding: 1.6rem 1.5rem 2.5rem; font-family: var(--sans); font-size: .85rem; color: var(--slate); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--slate); }

@media (max-width: 860px) {
  .opening, .article-body, .firsts li, .site-footer .inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .contents { position: static; max-height: none; }
  .contents ol { columns: 1; }
  body { font-size: 1.05rem; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .contents, .related { display: none; } .article-body { display: block; } }
