/* Compare pages: hub, one page per competitor, Xero consolidation, alternatives.
   Builds on /styles.css tokens. Idea: "show the working", like a consolidation worksheet:
   every price is shown as its sum, totals get an accountant's double underline. */

/* ---------- hero ---------- */
.cmp-hero { position: relative; overflow: clip; padding-block: clamp(1.5rem, 4vw, 2.5rem) clamp(3rem, 7vw, 5rem); }
.cmp-hero::before { content: ""; position: absolute; inset: auto -10% -45% 40%; height: 90%; background: radial-gradient(closest-side, rgb(94 224 168 / .14), transparent); pointer-events: none; }
.cmp-hero-grid { position: relative; display: grid; gap: clamp(2.25rem, 5vw, 3.5rem); align-items: center; }
@media (min-width: 1000px) { .cmp-hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.cmp-hero h1 { font-size: clamp(2.35rem, 1.25rem + 4vw, 4rem); margin-bottom: 1.25rem; }
.cmp-hero .lede { max-width: 38rem; }
.cmp-hero-copy > * { animation: rise .6s cubic-bezier(.2, .7, .2, 1) both; }
.cmp-hero-copy > :nth-child(2) { animation-delay: 60ms; }
.cmp-hero-copy > :nth-child(3) { animation-delay: 120ms; }
.cmp-hero-copy > :nth-child(4) { animation-delay: 180ms; }
.cmp-hero-copy > :nth-child(5) { animation-delay: 240ms; }

.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 0 .5rem; margin: 0 0 1rem; padding: 0; font-size: .875rem; color: var(--band-ink-3); }
.crumbs li + li::before { content: "/"; margin-right: .5rem; color: #6b6b65; }
.crumbs a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--band-ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }

.asof { display: inline-flex; align-items: center; gap: .5rem; margin: 0; padding: .4rem .85rem; border: 1px solid #3a3a37; border-radius: 999px; font-size: .8rem; font-weight: 600; color: var(--band-ink-2); }
.asof::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); }

/* TL;DR sheet, a sibling of the homepage hero card */
.tldr { margin: 0; padding: clamp(1.25rem, 3vw, 1.75rem); border-radius: var(--radius); background: var(--hc-bg); color: var(--hc-ink); box-shadow: 0 30px 60px -30px rgb(0 0 0 / .6); animation: card-in .8s .15s cubic-bezier(.2, .7, .2, 1) backwards; --focus: #0f7a4f; }
@media (min-width: 1000px) { .tldr { transform: rotate(-1.5deg); } }
@media (max-width: 999.98px) { .tldr { animation-name: rise; } }
.tldr-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.tldr-tag { display: inline-flex; padding: .35rem .75rem; border-radius: 10px; background: #111; color: var(--accent); font: 800 1rem/1 var(--font-display); letter-spacing: -0.01em; }
.tldr-head span:last-child { font-size: .78rem; font-weight: 600; color: var(--hc-ink-3); }
.tldr ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; counter-reset: t; }
.tldr li { counter-increment: t; display: grid; grid-template-columns: 2rem 1fr; gap: .5rem; padding: .85rem 1rem; border-radius: 14px; background: var(--hc-inner); font-size: .95rem; line-height: 1.5; }
.tldr li::before { content: "0" counter(t); font: 800 .85rem/1.6 var(--font-display); color: #0f7a4f; }
:root[data-theme="dark"] .tldr li::before { color: var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tldr li::before { color: var(--accent); } }

/* hub hero: quick links instead of a TL;DR */
.jump { margin: 0; padding: clamp(1.1rem, 3vw, 1.5rem); border-radius: var(--radius); background: var(--band-2); }
.jump p { margin: 0 0 .5rem; font-size: .8rem; font-weight: 700; color: var(--band-ink-3); }
.jump ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
@media (min-width: 520px) { .jump ul { grid-template-columns: 1fr 1fr; } }
.jump a { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 2.75rem; padding: .55rem .9rem; border-radius: 12px; background: #242422; color: var(--band-ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.jump a::after { content: "→"; color: var(--accent); transition: transform .2s; }
.jump a:hover::after { transform: translateX(3px); }

/* ---------- section rhythm ---------- */
.cmp-section { padding-top: clamp(3.5rem, 8vw, 6rem); }
.cmp-section .section-head { margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.cmp-section .section-head p:last-child { margin-bottom: 0; }
.h2 { font-size: clamp(1.9rem, 1.2rem + 2.4vw, 2.9rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1.02; text-wrap: balance; margin-bottom: .85rem; }
.prose { max-width: 44rem; color: var(--ink-2); }
.prose a, .inline-link { color: var(--accent-strong); font-weight: 600; text-underline-offset: 3px; }

/* ---------- choose X / choose Halfkit ---------- */
.choose { display: grid; gap: 1rem; }
@media (min-width: 860px) { .choose { grid-template-columns: 1fr 1fr; } }
.choose-card { padding: clamp(1.4rem, 3vw, 2rem); min-width: 0; }
.choose-card h3 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem); font-weight: 800; letter-spacing: -0.035em; margin-bottom: 1.1rem; }
.choose-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.choose-card li { position: relative; padding-left: 1.75rem; color: var(--ink-2); }
.choose-card li::before { content: ""; position: absolute; left: 0; top: .5em; width: .75rem; height: .75rem; border-radius: 4px; background: var(--line-strong); }
.choose-card li strong { color: var(--ink); }
.choose-hk { background: #111; color: #fff; --focus: var(--accent); }
.choose-hk h3 { color: #fff; }
.choose-hk li { color: var(--band-ink-2); }
.choose-hk li strong { color: #fff; }
.choose-hk li::before { background: var(--accent); }
:root[data-theme="dark"] .choose-hk { box-shadow: inset 0 0 0 1px #2f5c48; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .choose-hk { box-shadow: inset 0 0 0 1px #2f5c48; } }
.choose-label { display: inline-flex; margin: 0 0 .65rem; padding: .25rem .65rem; border-radius: 999px; background: var(--card-2); color: var(--ink-3); font-size: .75rem; font-weight: 700; }
.choose-hk .choose-label { background: #10291f; color: var(--accent); }

/* ---------- tables ---------- */
.legend { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin: 0 0 1rem; font-size: .85rem; color: var(--ink-3); }
.legend span { display: inline-flex; align-items: center; gap: .45rem; }
.tbl-card { border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.tbl-scroll:focus-visible { outline-offset: -3px; }
.scroll-hint { display: none; margin: 0; padding: .7rem 1rem 0; font-size: .8rem; font-weight: 600; color: var(--ink-3); }
.ctable { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9rem; line-height: 1.45; }
.ctable caption { padding: 0; }
.ctable th, .ctable td { padding: .9rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.ctable tbody tr:last-child > * { border-bottom: 0; }
.ctable thead th { font: 700 1rem/1.2 var(--font-display); letter-spacing: -0.02em; vertical-align: bottom; background: var(--card-2); }
.ctable tbody th { font-weight: 700; color: var(--ink); }
.ctable td { color: var(--ink-2); }
.ctable .hk { background: color-mix(in srgb, var(--accent-soft) 70%, var(--card)); }
.ctable thead .hk { background: var(--band); color: var(--accent); }
.ctable .grp > * { background: var(--card-2); }
.ctable .grp th { padding-block: .55rem; background: var(--card-2); font: 700 .75rem/1.2 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }

/* hub: tools across, rows down; first column sticks while the rest scrolls */
.hub-table { min-width: 1120px; }
.hub-table th:first-child { position: sticky; left: 0; z-index: 2; width: 10rem; background: var(--card); box-shadow: inset -1px 0 0 var(--line); }
.hub-table thead th:first-child, .hub-table .grp th { background: var(--card-2); }
.hub-table td { min-width: 8.5rem; }
@media (max-width: 1239.98px) { .scroll-hint { display: block; } }
@media (max-width: 559.98px) {
  .hub-table th:first-child { width: 7.25rem; min-width: 7.25rem; font-size: .82rem; }
  .ctable th, .ctable td { padding: .75rem .8rem; }
}

/* two-way table: stacks into cards on phones (roles keep it a table for screen readers) */
.vs-table th:first-child { width: 24%; }
.vs-table td { width: 38%; }
@media (max-width: 679.98px) {
  .vs-table, .vs-table tbody, .vs-table tr, .vs-table th, .vs-table td { display: block; width: auto; }
  .vs-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .vs-table tbody tr { padding: 1rem 1.1rem; border-bottom: 1px solid var(--line); }
  .vs-table tbody tr:last-child { border-bottom: 0; }
  .vs-table tbody th, .vs-table td { padding: 0; border: 0; }
  .vs-table tbody th { margin-bottom: .55rem; font: 700 1.05rem/1.25 var(--font-display); letter-spacing: -0.02em; }
  .vs-table tbody th:first-child { width: auto; }
  .vs-table td { position: relative; padding: .5rem .65rem .5rem 6.25rem; border-radius: 10px; }
  .vs-table td + td { margin-top: .3rem; }
  .vs-table td::before { content: attr(data-label); position: absolute; left: .65rem; top: .6rem; width: 5.25rem; font-size: .78rem; font-weight: 700; line-height: 1.4; color: var(--ink-3); }
  .vs-table td.hk::before { color: var(--accent-strong); }
  .vs-table tr.grp { padding: .6rem 1.1rem; background: var(--card-2); }
  .vs-table tr.grp th { margin: 0; font: 700 .75rem/1.2 var(--font-sans); }
}

/* marks: words carry the meaning, the shape only helps scanning */
.m { display: inline-flex; align-items: center; gap: .35rem; margin-right: .35rem; padding: .1rem .55rem .1rem .45rem; border-radius: 999px; font-size: .78rem; font-weight: 700; line-height: 1.5; white-space: nowrap; vertical-align: .05em; }
.m::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; flex: none; }
.m-y { background: var(--accent-soft); color: var(--accent-strong); }
.m-y::before { background: var(--accent-strong); }
.m-n { background: var(--card-2); color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line); }
.m-n::before { width: .55rem; height: 2px; border-radius: 1px; background: var(--ink-3); }
.m-p { background: var(--elim-soft); color: var(--elim); }
.m-p::before { background: linear-gradient(90deg, var(--elim) 50%, transparent 50%); box-shadow: inset 0 0 0 1.5px var(--elim); }
.m-np { background: transparent; color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line-strong); font-weight: 600; font-style: italic; }
.m-np::before { width: .45rem; height: .45rem; background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.ctable .hk .m-y { background: var(--card); }
.rep { display: inline-flex; margin-left: .35rem; padding: .05rem .45rem; border-radius: 6px; background: var(--elim-soft); color: var(--elim); font: 700 .7rem/1.5 var(--font-sans); letter-spacing: .02em; vertical-align: .1em; white-space: nowrap; }

/* ---------- pricing: worked sums ---------- */
.sums { display: grid; gap: 1rem; }
@media (min-width: 920px) { .sums { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sum { padding: clamp(1.25rem, 3vw, 1.6rem); display: flex; flex-direction: column; gap: .6rem; min-width: 0; }
.sum-head { display: flex; align-items: baseline; gap: .6rem; margin-bottom: .35rem; }
.sum-n { font: 800 3.2rem/1 var(--font-display); letter-spacing: -0.05em; color: var(--accent-strong); }
.sum-head h3 { font: 700 1.05rem/1.2 var(--font-sans); letter-spacing: 0; color: var(--ink-2); }
.sum-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: .2rem 1rem; padding: .9rem 1rem; border-radius: 14px; background: var(--card-2); }
.sum-line > span { font-weight: 700; }
.sum-line > b { font: 700 1.4rem/1.15 var(--font-display); letter-spacing: -0.03em; text-align: right; font-variant-numeric: tabular-nums; text-decoration: underline double; text-decoration-thickness: 1px; text-underline-offset: .28em; white-space: nowrap; }
.sum-line > b.np { font: 600 italic .9rem/1.3 var(--font-sans); letter-spacing: 0; color: var(--ink-3); text-decoration: none; white-space: normal; }
.sum-line > small { grid-column: 1 / -1; font-size: .82rem; line-height: 1.45; color: var(--ink-3); }
.sum-line.hk { background: #111; color: #fff; }
.sum-line.hk > b { color: var(--accent); }
.sum-line.hk > small { color: var(--band-ink-3); }
.sum-ref { margin-top: 1rem; }
.sum-ref .ctable { min-width: 0; }
.fine { margin: 1rem 0 0; max-width: 52rem; font-size: .85rem; color: var(--ink-3); }

/* ---------- switching ---------- */
.switch { list-style: none; margin: 0; padding: .5rem clamp(1.1rem, 3vw, 1.75rem); counter-reset: s; }
.switch li { counter-increment: s; display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); gap: .25rem 1rem; padding: 1.15rem 0; border-bottom: 1px solid var(--line); }
.switch li:last-child { border-bottom: 0; }
.switch li::before { content: counter(s, decimal-leading-zero); font: 800 1.5rem/1.1 var(--font-display); letter-spacing: -0.04em; color: var(--accent-strong); }
.switch h3 { font-size: 1.15rem; letter-spacing: -0.02em; margin: .1rem 0 .35rem; }
.switch p { margin: 0; color: var(--ink-2); }

/* ---------- hub: who each tool suits ---------- */
.suits { display: grid; gap: 1rem; }
@media (min-width: 680px) { .suits { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .suits { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.suit { padding: 1.5rem; display: flex; flex-direction: column; min-width: 0; }
.suit h3 { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.035em; margin-bottom: .5rem; }
.suit p { color: var(--ink-2); }
.suit .btn { margin-top: auto; align-self: flex-start; }
.suit-hk { background: #111; color: #fff; --focus: var(--accent); }
.suit-hk h3 { color: var(--accent); }
.suit-hk p { color: var(--band-ink-2); }
:root[data-theme="dark"] .suit-hk { box-shadow: inset 0 0 0 1px #2f5c48; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .suit-hk { box-shadow: inset 0 0 0 1px #2f5c48; } }
.btn-mint-outline { color: var(--accent); border-color: #2f5c48; }
.btn-mint-outline:hover { border-color: var(--accent); }

.guides { display: grid; gap: 1rem; }
@media (min-width: 760px) { .guides { grid-template-columns: 1fr 1fr; } }
.guide { display: block; padding: 1.6rem; text-decoration: none; transition: transform .3s cubic-bezier(.2, .7, .2, 1); }
.guide:hover { transform: translateY(-3px); }
.guide h3 { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.035em; margin-bottom: .5rem; }
.guide p { margin: 0; color: var(--ink-2); }
.guide .go { display: inline-block; margin-top: 1rem; font-weight: 700; color: var(--accent-strong); }

/* ---------- Xero page ---------- */
.idea { display: grid; gap: 1rem 2rem; padding: clamp(1.4rem, 3vw, 2rem); }
@media (min-width: 820px) { .idea { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: center; } }
.idea-title { margin: 0 0 .4rem; font: 700 clamp(1.3rem, 1.1rem + .8vw, 1.7rem)/1.2 var(--font-display); letter-spacing: -0.03em; }
.idea dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .5rem 1rem; padding: 1rem 1.1rem; border-radius: 16px; background: var(--card-2); font-size: .92rem; }
.idea dt { color: var(--ink-3); font-weight: 600; }
.idea dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.status { display: inline-flex; padding: .1rem .6rem; border-radius: 999px; background: var(--elim-soft); color: var(--elim); font-size: .85rem; }
.options { display: grid; gap: 1rem; }
@media (min-width: 900px) { .options { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.option { padding: 1.5rem; display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.option h3 { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: .35rem; }
.option p { color: var(--ink-2); margin-bottom: .75rem; }
.option dl { margin: auto 0 0; display: grid; gap: .5rem; }
.option dl div { padding: .7rem .85rem; border-radius: 12px; background: var(--card-2); font-size: .9rem; }
.option dt { font-size: .75rem; font-weight: 700; color: var(--ink-3); }
.option dd { margin: 0; color: var(--ink-2); }
.addon-links { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .75rem; padding: 0; list-style: none; }
.addon-links a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 .9rem; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); color: var(--ink); font-size: .88rem; font-weight: 600; text-decoration: none; }
.addon-links a:hover { border-color: var(--accent-strong); }
.callout + .callout { margin-top: 1rem; }
.callout ul { margin: 0; padding-left: 1.1rem; color: var(--ink-2); }
.callout li + li { margin-top: .35rem; }

/* ---------- alternatives: dated timeline ---------- */
.timeline { list-style: none; margin: 0; padding: .5rem clamp(1.1rem, 3vw, 1.75rem); }
.timeline li { display: grid; gap: .3rem 1.5rem; padding: 1.2rem 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
@media (min-width: 680px) { .timeline li { grid-template-columns: 9.5rem 8rem minmax(0, 1fr); align-items: baseline; } }
.timeline time { font: 700 1rem/1.3 var(--font-display); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; color: var(--accent-strong); }
.timeline .tool { font: 800 1.25rem/1.2 var(--font-display); letter-spacing: -0.03em; }
.timeline p { margin: 0; color: var(--ink-2); }
.tl-kind { display: inline-flex; margin-left: .4rem; padding: .05rem .5rem; border-radius: 999px; font: 700 .72rem/1.6 var(--font-sans); vertical-align: .15em; }
.tl-closed { background: var(--elim-soft); color: var(--elim); }
.tl-acq { background: var(--card-2); color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line); }

/* ---------- sources + more comparisons ---------- */
.sources { padding-block: clamp(3.5rem, 8vw, 6rem) clamp(3.5rem, 8vw, 5rem); }
.sources-card { padding: clamp(1.4rem, 3vw, 2rem); display: grid; gap: 1.5rem 3rem; }
@media (min-width: 900px) { .sources-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); } }
.sources-card h2 { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: .6rem; }
.sources-card p { color: var(--ink-2); font-size: .95rem; }
.sources-card p:last-child { margin-bottom: 0; }
.src-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; font-size: .92rem; }
.src-list a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--accent-strong); font-weight: 600; text-underline-offset: 3px; overflow-wrap: anywhere; }
.src-list span { color: var(--ink-3); }
.more { margin-top: 1.25rem; }
.more ul { list-style: none; margin: .6rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.more .btn { min-height: 2.75rem; font-size: .9rem; }
.more .btn[aria-current] { background: var(--ink); color: var(--card); }

/* final CTA tweaks */
.final .lede { margin-inline: auto; }

/* scroll reveal from script.js only targets shared selectors; these join via .section-head */
@media (prefers-reduced-motion: reduce) { .tldr, .cmp-hero-copy > * { animation: none; } }
.ctable .d { display: block; margin-top: .35rem; }
@media (min-width: 680px) { .suit-hk { grid-column: 1 / -1; } .suit-hk p { max-width: 48rem; } }
.idea .inline-link { display: inline-flex; align-items: center; min-height: 2.75rem; }
