/* Directory page. Shared header, footer, buttons and tokens come from /kit/whoptools.css. */
main:focus { outline: none; }
main:focus-visible { outline: 2px solid var(--wt-focus); outline-offset: -2px; }
.tools { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.tool { display: flex; flex-direction: column; gap: .75rem; min-inline-size: 0; padding: 1.5rem; border: 1px solid var(--wt-border); border-radius: 12px; background: var(--wt-subtle); }
.tool h2 { font-size: 1.125rem; }
.platform { display: flex; min-block-size: 1.5rem; align-items: center; gap: .5rem; color: var(--wt-muted); font-size: .8125rem; font-weight: 500; }
.platform img { flex-shrink: 0; }
.platform .wt-badge { margin-inline-start: auto; }
.description { color: var(--wt-muted); font-size: .9375rem; line-height: 1.6; }
.tool .wt-snippet { inline-size: fit-content; max-inline-size: 100%; padding: .375rem .625rem; border-radius: 6px; background: var(--wt-background); font-size: .75rem; white-space: nowrap; overflow-x: auto; unicode-bidi: isolate; text-align: start; }
.availability { color: var(--wt-muted); font-size: .8125rem; }
.tool .wt-actions { margin-block-start: auto; padding-block-start: .5rem; gap: .5rem; }
.stars { display: inline-flex; align-items: center; gap: .25rem; margin-inline-start: .375rem; padding-inline-start: .5rem; border-inline-start: 1px solid var(--wt-border); color: var(--wt-muted); font-variant-numeric: tabular-nums; }
.stars[hidden] { display: none; }
.stars svg { inline-size: .875rem; block-size: .875rem; fill: currentColor; }
.languages { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-block-end: 1.5rem; font-size: .875rem; }
.languages [aria-current='page'] { color: var(--wt-text); font-weight: 600; text-decoration: none; }
/* Guides list on the directory page. */
.guides { margin-block-start: 3rem; }
.guides h2 { margin-block-end: 1rem; }
.guide-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.guide-list li { display: flex; flex-direction: column; overflow: hidden; padding: 0 0 1.25rem; border: 1px solid var(--wt-border); border-radius: 12px; background: var(--wt-subtle); }
.guide-list li > * { margin-inline: 1.25rem; }
.guide-list li > a { display: flex; flex-direction: column; gap: 1rem; margin-inline: 0; text-decoration: none; }
.guide-list picture { display: block; border-block-end: 1px solid var(--wt-border); }
.guide-cover { display: block; inline-size: 100%; block-size: auto; aspect-ratio: 2 / 1; }
.guide-title { margin-inline: 1.25rem; text-decoration: underline; text-underline-offset: .15em; }
.guide-list a:hover .guide-title { text-decoration-thickness: 2px; }
/* Live demo links carry an orange play mark. */
.wt-button .demo-icon { fill: var(--wt-primary); }
.guide-list a { font-weight: 600; }
.guide-list p { margin-block-start: .25rem; color: var(--wt-muted); font-size: .9375rem; line-height: 1.6; }

/* Guide and comparison pages. */
.wt-eyebrow a { color: var(--wt-muted); }
.checked { margin-block-start: .75rem; color: var(--wt-muted); font-size: .875rem; }
.wt-container:has(> .article-body) > :is(.wt-hero, .article-body) { max-inline-size: 48rem; margin-inline: auto; }
.article-body > h2:first-child { margin-block-start: 0; }
.article-body ul { margin-block-end: 0; padding-inline-start: 1.25rem; }
.article-body li + li { margin-block-start: .375rem; }
.article-body :not(pre) > code { color: var(--wt-text); }
.article-body pre { margin-block-end: 0; padding: .875rem 1rem; border: 1px solid var(--wt-border); border-radius: 8px; background: var(--wt-subtle); color: var(--wt-text); font-size: .8125rem; line-height: 1.6; overflow-x: auto; direction: ltr; text-align: left; }
.article-body pre code { font-size: 1em; white-space: pre; overflow-wrap: normal; }
.article-body .wt-actions { margin-block-start: 1rem; }
/* FTC-style disclosure for referral signup links: plain, small, next to the button. */
.article-body .referral-note { margin-block-start: .5rem; color: var(--wt-muted); font-size: .8125rem; }
.sources { font-size: .875rem; }
.article-body ol.sources { padding-inline-start: 1.5rem; }
.sources li { scroll-margin-block-start: 6rem; line-height: 1.6; }
.article-body .sources li + li { margin-block-start: .625rem; }
.sources li:target { border-radius: 6px; background: var(--wt-subtle); outline: 1px solid var(--wt-border); outline-offset: 4px; }
.sources-note { color: var(--wt-muted); font-size: .875rem; }
/* Numbered links to the page's sources. */
.cite { margin-inline-start: .125em; font-size: max(.7em, .6875rem); line-height: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cite a { position: relative; padding-inline: .125em; text-decoration: none; }
.cite a::after { content: ''; position: absolute; inset: -.625rem -.1875rem; }
.cite a + a { margin-inline-start: .25em; }
.cite a:hover { text-decoration: underline; }
.table-scroll { overflow-x: auto; border: 1px solid var(--wt-border); border-radius: 12px; }
.article-body table { inline-size: 100%; min-inline-size: 44rem; border-collapse: collapse; font-size: .875rem; line-height: 1.5; }
/* A wide table may use the whole container, past the text column. */
.wt-container:has(> .article-body) { container-type: inline-size; }
.article-body .table-scroll-wide { inline-size: 100cqi; margin-inline: calc((100% - 100cqi) / 2); }
.article-body table.table-wide { min-inline-size: 54rem; }
.article-body caption { padding: .75rem; color: var(--wt-muted); font-weight: 500; text-align: start; }
.article-body th, .article-body td { padding: .625rem .75rem; border-block-start: 1px solid var(--wt-border); text-align: start; vertical-align: top; }
.article-body thead th { background: var(--wt-subtle); color: var(--wt-text); font-weight: 600; }
.article-body tbody th { color: var(--wt-text); font-weight: 500; }
.article-body :is(tbody th, thead th:first-child) { position: sticky; inset-inline-start: 0; z-index: 1; background: var(--wt-background); box-shadow: inset -1px 0 var(--wt-border); }
.article-body thead th:first-child { background: var(--wt-subtle); }

/* Status marks: a filled dot (built in), a half dot (limited) and a ring (not offered).
   The shape repeats what the text says, so state never depends on color alone. */
.article-body :is(.yes, .partial, .no) { position: relative; padding-inline-start: 1.25rem; }
.article-body :is(.yes, .partial, .no)::before { content: ''; position: absolute; inset-inline-start: 0; inset-block-start: calc(.75em - .3125rem); inline-size: .625rem; block-size: .625rem; border: 2px solid; border-radius: 50%; }
.article-body .yes::before { border-color: var(--wt-success); background: var(--wt-success); }
.article-body .partial::before { border-color: var(--wt-warning); background: linear-gradient(90deg, var(--wt-warning) 50%, transparent 50%); }
.article-body .no::before { border-color: var(--wt-control); }
.article-body td:is(.yes, .partial, .no) { padding-inline-start: 2rem; }
.article-body td:is(.yes, .partial, .no)::before { inset-block-start: calc(.625rem + .75em - .3125rem); inset-inline-start: .75rem; }
.status-key { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; font-size: .8125rem; line-height: 1.5; }

/* Provider cards. */
.providers { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; padding: 0; list-style: none; }
.article-body .providers { padding: 0; }
.article-body .providers > li + li { margin-block-start: 0; }
.provider { display: flex; flex-direction: column; gap: .25rem; padding: 1.25rem 1.5rem; border: 1px solid var(--wt-border); border-radius: 12px; background: var(--wt-subtle); }
.provider h3 { color: var(--wt-text); }
.provider-rate { margin-block-start: .25rem; color: var(--wt-text); font-size: 1.75rem; font-weight: 600; line-height: 1.2; letter-spacing: -.02em; }
.provider-note { font-size: .8125rem; line-height: 1.5; }
.article-body .provider-facts { margin-block: .75rem 0; padding: .75rem 0 0; border-block-start: 1px solid var(--wt-border); list-style: none; font-size: .875rem; line-height: 1.5; }
.article-body .provider-facts li + li { margin-block-start: .5rem; }
.provider-best { margin-block-start: auto; padding-block-start: .75rem; font-size: .875rem; line-height: 1.5; }

/* Bar charts. Bars are SVG rects with percentage widths, so they need no inline styles. */
.bar-chart { margin: 1.5rem 0 0; padding: 1rem; border: 1px solid var(--wt-border); border-radius: 12px; }
.bar-chart figcaption { margin-block-end: 1rem; font-size: .875rem; line-height: 1.5; }
.article-body .bars { margin: 0; padding: 0; list-style: none; }
.article-body .bars li { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: .25rem .75rem; margin: 0; }
.article-body .bars li + li { margin-block-start: .625rem; }
.bar-label { color: var(--wt-text); font-size: .875rem; line-height: 1.4; }
.bar-whop .bar-label { font-weight: 600; }
.bar { display: block; inline-size: 100%; block-size: 1.25rem; overflow: visible; }
.bar rect { fill: var(--wt-control); }
.bar-whop .bar rect { fill: var(--wt-primary); }
.bar text { fill: var(--wt-text); font-size: .875rem; font-variant-numeric: tabular-nums; }
/* The SVG is hidden from assistive tech, so the value is also given as hidden text. */
.bar-value { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.article-body .bars li { position: relative; }

@media (min-width: 48rem) {
  .tools { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .guide-list, .providers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bar-chart { padding: 1.25rem 1.5rem; }
  .article-body .bars li { grid-template-columns: 15rem minmax(0, 1fr); }
}
@media (forced-colors: active) {
  .tool, .guide-list li, .table-scroll, .provider, .bar-chart { border-color: CanvasText; }
  .wt-button .demo-icon { fill: currentColor; }
  .bar rect, .bar-whop .bar rect { fill: CanvasText; }
  .article-body :is(.yes, .partial, .no)::before { forced-color-adjust: none; border-color: CanvasText; }
  .article-body .yes::before { background: CanvasText; }
  .article-body .partial::before { background: linear-gradient(90deg, CanvasText 50%, Canvas 50%); }
}
