/* AI recommendations pages (/ai-visibility/). Loaded after
   /assets/brand/tokens.css and uses only its tokens, so light/dark and any
   palette change follow the main site. Mobile first; no JavaScript. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ll-page); color: var(--ll-ink); font: 16px/1.6 var(--ll-font); }
a { color: var(--ll-brand-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ll-ink); }
code { font-size: .88em; background: var(--ll-chip); padding: 1px 5px; border-radius: 3px; }
q { quotes: "“" "”"; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; background: var(--ll-surface); padding: 8px 12px; z-index: 2; }

/* header */
.top { background: var(--ll-surface); border-bottom: 1px solid var(--ll-border); }
.top .bar { max-width: 1120px; margin: 0 auto; padding: 0 16px; min-height: 60px; display: flex; align-items: center; gap: 16px; }
.wordmark { font-family: var(--ll-font-display); font-size: 27px; font-weight: 500; letter-spacing: -.01em; color: var(--ll-ink); text-decoration: none; line-height: 1; display: inline-flex; align-items: baseline; }
.wordmark .mark { display: inline-block; width: .74em; height: .74em; color: var(--ll-brand-ink); transform: translateY(.1em); margin: 0 .02em; }
.wordmark svg { display: block; width: 100%; height: 100%; }
.top nav { margin-left: auto; display: flex; gap: 18px; font-size: 14.5px; }
.top nav a { color: var(--ll-ink-2); text-decoration: none; }
.top nav a:hover { color: var(--ll-ink); text-decoration: underline; }

/* layout & type */
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px 24px; }
h1, h2, h3 { font-family: var(--ll-font-display); font-weight: 400; letter-spacing: -.012em; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(31px, 7.4vw, 50px); margin: 10px 0 16px; }
h2 { font-size: clamp(24px, 5vw, 31px); margin: 0 0 14px; }
h3 { font-family: var(--ll-font); font-size: 16.5px; font-weight: 600; letter-spacing: 0; line-height: 1.35; margin: 22px 0 6px; }
p { margin: 0 0 12px; }
.crumbs { margin: 20px 0 0; font-size: 13.5px; color: var(--ll-muted); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 0; }
.crumbs li + li::before { content: "›"; margin: 0 7px; color: var(--ll-muted); }
.crumbs a { color: var(--ll-muted); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; color: var(--ll-ink); }
.eyebrow { margin: 18px 0 0; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ll-brand-ink); }
.hero { padding: 0 0 30px; }
.sub { font-size: 17.5px; color: var(--ll-ink-2); max-width: 700px; }
.updated { font-size: 14px; color: var(--ll-muted); }
.muted { color: var(--ll-muted); }
section { padding: 32px 0; border-top: 1px solid var(--ll-rule); }
.biz { font-weight: 600; }

/* stat strip */
.stats { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--ll-surface); border: 1px solid var(--ll-border); border-radius: var(--ll-radius-card); }
.stats li { padding: 14px 12px 13px; border-left: 1px solid var(--ll-border); }
.stats li:first-child { border-left: 0; }
.stats b { display: block; font-family: var(--ll-font-display); font-weight: 400; font-size: clamp(30px, 8vw, 42px); line-height: 1; }
.stats small { font-family: var(--ll-font); font-size: 13px; color: var(--ll-muted); margin-left: 2px; }
.stats span { display: block; margin-top: 7px; font-size: 13px; line-height: 1.3; color: var(--ll-ink-2); }

.insights ul, .playbook { margin: 0; padding-left: 20px; }
.insights li, .playbook li { margin: 0 0 10px; }
.insights li::marker, .playbook li::marker { color: var(--ll-brand-ink); }

/* results table */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
caption { caption-side: bottom; text-align: left; padding-top: 10px; font-size: 13.5px; color: var(--ll-muted); }
th, td { padding: 10px 6px; text-align: center; vertical-align: middle; border-bottom: 1px solid var(--ll-rule); }
thead th { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ll-muted); border-bottom: 1px solid var(--ll-border); white-space: nowrap; }
th.name, td.name { text-align: left; }
tbody th { font-weight: 400; }
.rank { display: inline-block; min-width: 1.5em; color: var(--ll-muted); font-variant-numeric: tabular-nums; }
td.zero { color: var(--ll-muted); }
td.total { white-space: nowrap; }
.meter { display: block; height: 3px; margin-top: 5px; background: var(--ll-chip); border-radius: 2px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--ll-brand); }
.eng-short { display: none; }
.also { margin-top: 14px; font-size: 14.5px; color: var(--ll-ink-2); }
.also .label { font-weight: 600; color: var(--ll-ink); }
.also .biz { font-weight: 400; color: var(--ll-ink); }

/* study: tables with a drawn column. One hue, because the job is magnitude;
   the number sits beside every mark, so nothing is carried by the bar alone. */
.bars .barcol { width: 44%; padding-left: 14px; text-align: left; }
.plot { display: block; height: 10px; border-radius: 0 4px 4px 0; }
.plot.track { background: var(--ll-chip); }
.plot i { display: block; height: 100%; min-width: 2px; background: var(--ll-brand); border-radius: 0 4px 4px 0; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tablewrap.two { display: grid; grid-template-columns: 1fr; gap: 18px 32px; }
.tablewrap + p { margin-top: 18px; }
.bysvc { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px 32px; margin: 10px 0 16px; }
details { border-bottom: 1px solid var(--ll-rule); }
details:first-of-type { border-top: 1px solid var(--ll-rule); }
summary { padding: 13px 0; font-weight: 600; cursor: pointer; }
details .tablewrap { padding-bottom: 14px; }
.cite { padding: 12px 14px; background: var(--ll-surface); border: 1px solid var(--ll-border); border-radius: var(--ll-radius-card); font-size: 14.5px; color: var(--ll-ink); overflow-wrap: anywhere; }
.studylink { margin: 18px 0 0; padding: 14px 16px; background: var(--ll-surface); border: 1px solid var(--ll-border); border-radius: var(--ll-radius-card); }

/* sources */
.sources { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.sources li { counter-increment: s; display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--ll-rule); }
.sources li::before { content: counter(s); color: var(--ll-muted); width: 1.5em; flex: none; font-variant-numeric: tabular-nums; }
.sources .dom { flex: 1; font-weight: 600; overflow-wrap: anywhere; }
.sources .tag { font-weight: 400; font-size: 12.5px; color: var(--ll-muted); white-space: nowrap; }
.sources .cnt { color: var(--ll-ink-2); font-size: 14px; white-space: nowrap; }

/* call to action */
.cta { margin: 8px 0 0; padding: 28px 22px 24px; border: 0; border-radius: var(--ll-radius-card); background: var(--ll-block-2); color: var(--ll-on-block-2); }
.cta h2 { color: var(--ll-on-block-2); }
.cta p { color: var(--ll-on-block-2-2); max-width: 640px; }
.cta b { color: var(--ll-on-block-2); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin: 18px 0 0; }
.btn { display: inline-block; padding: 12px 24px; border-radius: var(--ll-radius-pill); background: var(--ll-brand); color: var(--ll-on-brand); font-weight: 600; font-size: 15.5px; text-decoration: none; }
.btn:hover { color: var(--ll-on-brand); opacity: .9; }
.cta .btn { background: var(--ll-on-block-2); color: var(--ll-block-2); }
.cta .btn:hover { color: var(--ll-block-2); }
.cta .more { color: var(--ll-on-block-2); font-size: 14.5px; }

/* faq, method, notes */
.faq h3:first-of-type { margin-top: 4px; }
.faq p { color: var(--ll-ink-2); }
.method p { font-size: 15px; color: var(--ll-ink-2); }
.note { padding: 12px 14px; background: var(--ll-surface); border: 1px solid var(--ll-border); border-radius: var(--ll-radius-card); font-size: 14.5px; color: var(--ll-ink-2); }

/* related links & index groups */
.related { padding: 32px 0 8px; border-top: 1px solid var(--ll-rule); }
.relcols, .groups { display: grid; grid-template-columns: 1fr; gap: 6px 32px; }
.related ul, .groups ul, .foot ul { list-style: none; margin: 0 0 14px; padding: 0; }
.related li, .groups li { padding: 3px 0; }
.related ul.inline { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.groups h3 { font-family: var(--ll-font-display); font-size: 21px; font-weight: 400; margin: 6px 0 6px; }
.sub-h { margin-top: 26px; }
.citylist { list-style: none; margin: 0; padding: 0; }
.citylist li { padding: 6px 0; border-bottom: 1px solid var(--ll-rule); }
.fh { margin: 0 0 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ll-muted); }

/* footer */
.foot { margin-top: 40px; border-top: 1px solid var(--ll-border); font-size: 14.5px; }
.foot .cols, .foot .frow { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.foot .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 32px; padding-top: 32px; }
.foot li { padding: 3px 0; }
.foot a { color: var(--ll-ink-2); text-decoration: none; }
.foot a:hover { color: var(--ll-ink); text-decoration: underline; }
.foot .frow { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; padding-top: 16px; padding-bottom: 24px; border-top: 1px solid var(--ll-rule); color: var(--ll-muted); font-size: 13.5px; }
.foot .frow a { color: var(--ll-muted); }

/* narrow screens: shorter engine headers, tighter cells */
@media (max-width: 599px) {
  .top nav { gap: 14px; font-size: 14px; }
  .eng-full { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .eng-short { display: inline; }
  table { font-size: 14px; }
  th, td { padding: 9px 3px; }
  th.name, td.name { padding-left: 0; }
  thead th.name { white-space: normal; }
  thead th { letter-spacing: .04em; font-size: 11px; }
  td.wide, th.wide { display: none; }
  .bars .barcol { width: 30%; padding-left: 8px; }
  /* Four number columns do not leave room for a drawn one on a phone. */
  .bars.dense .barcol { display: none; }
  .stats li { padding: 12px 9px 11px; }
}
@media (min-width: 700px) {
  .wrap { padding: 0 24px 32px; }
  .top .bar, .foot .cols, .foot .frow { padding-left: 24px; padding-right: 24px; }
  .relcols, .groups { grid-template-columns: repeat(3, 1fr); }
  .tablewrap.two { grid-template-columns: 1fr 1fr; }
  .foot .cols { grid-template-columns: repeat(3, 1fr); }
  .cta { padding: 34px 34px 30px; }
}
