@font-face { font-family: "Geist Mono"; src: url("/static/GeistMono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #ffffff; --fg: #111111; --dim: #6b6b6b; --line: #e6e6e6; --card: #fafafa;
  --code-bg: #f5f5f5; --accent: #111111; --accent-fg: #ffffff; --err: #d11a2a;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0a0a0a; --fg: #ededed; --dim: #8a8a8a; --line: #262626; --card: #111111;
    --code-bg: #141414; --accent: #ededed; --accent-fg: #0a0a0a; --err: #ff5c69; color-scheme: dark; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 14px/1.65 "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace; }
a { color: inherit; text-underline-offset: 3px; text-decoration-color: var(--dim); }
a:hover { text-decoration-color: var(--fg); }
h1, h2, h3 { font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 32px; margin: 0 0 12px; }
h2 { font-size: 16px; margin: 0 0 16px; }
h2::before { content: "## "; color: var(--dim); }
section { margin: 0 0 64px; }

.wrap { max-width: 1072px; margin: 0 auto; padding: 0 16px; }
/* One centered column per page. Long text lines are capped for readability. */
main p, main dl, main details { max-width: 72ch; }
main > article.prose, main > .doc-foot { max-width: 760px; margin-left: auto; margin-right: auto; }
main > section.center-card { max-width: 440px; }
.nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 24px; padding-bottom: 56px; flex-wrap: wrap; }
.nav .brand { font-weight: 700; text-decoration: none; }
.nav nav { display: flex; gap: 18px; flex-wrap: wrap; }
.nav nav a { text-decoration: none; color: var(--dim); }
.nav nav a:hover { color: var(--fg); }
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 24px; padding-bottom: 48px; color: var(--dim); font-size: 12px; }
.foot a { text-decoration: none; }

.hero h1 { font-size: 44px; letter-spacing: -0.03em; }
.lead { font-size: 16px; margin: 0 0 16px; }
.facts { color: var(--dim); font-size: 12.5px; margin: 0; }
.dim { color: var(--dim); }
.small { font-size: 12px; }
.err { color: var(--err); }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.center-card { max-width: 440px; margin: 24px auto 96px; text-align: center; }
.center-card .stack { text-align: left; margin-top: 24px; }
.center-card h1 { font-size: 28px; }
.checks { list-style: none; padding: 0; margin: 24px 0 0; text-align: left; }
.checks li { padding: 2px 0; }
.checks li::before { content: "✓ "; color: var(--fg); }

pre.code { background: var(--code-bg); border: 1px solid var(--line); padding: 16px; overflow-x: auto; margin: 0; font-size: 13px; line-height: 1.6; }
code { font-family: inherit; }
:not(pre) > code { background: var(--code-bg); border: 1px solid var(--line); padding: 1px 5px; font-size: 13px; }

.tabs { display: flex; gap: 0; border: 1px solid var(--line); border-bottom: 0; width: max-content; max-width: 100%; overflow-x: auto; }
.tabs button { border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--dim); padding: 6px 14px; }
.tabs button:last-child { border-right: 0; }
.tabs button.on { color: var(--fg); background: var(--code-bg); }

button, input, select, textarea { font: inherit; color: inherit; }
button { white-space: nowrap; background: var(--accent); color: var(--accent-fg); border: 1px solid var(--accent); padding: 9px 16px; cursor: pointer; }
button:disabled { opacity: .4; cursor: not-allowed; }
button.ghost { background: transparent; color: var(--fg); border-color: var(--line); }
button.small { padding: 3px 10px; font-size: 12px; }
input[type=email], select, textarea { background: var(--bg); border: 1px solid var(--line); padding: 9px 12px; width: 100%; }
input:not([type=radio]):focus, select:focus, textarea:focus, button:focus-visible { outline: 1px solid var(--fg); outline-offset: -1px; }
.pack input:focus { outline: none; }
.pack:has(input:focus-visible) { outline: 1px solid var(--fg); outline-offset: 2px; }
textarea { resize: vertical; font-size: 13px; line-height: 1.55; display: block; }
select { width: auto; }

.try { display: flex; flex-direction: column; gap: 10px; }
.try .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.try .row input[type=email] { flex: 1 1 220px; width: auto; }
.try.drag textarea { outline: 1px dashed var(--fg); }
.file { color: var(--dim); font-size: 12.5px; cursor: pointer; flex: 1 1 auto; }
.file input { font-size: 12px; max-width: 220px; }
.stack { display: flex; flex-direction: column; gap: 10px; }

.specs { display: grid; grid-template-columns: 130px 1fr; gap: 10px 20px; margin: 0; }
.specs dt { color: var(--dim); }
.specs dd { margin: 0; }
@media (max-width: 560px) { .specs { grid-template-columns: 1fr; gap: 2px; } .specs dd { margin-bottom: 12px; } .hero h1 { font-size: 34px; } }

.table { width: 100%; border-collapse: collapse; font-size: 13px; display: block; overflow-x: auto; }
.table th, .table td { text-align: left; padding: 8px 20px 8px 0; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.table th { color: var(--dim); font-weight: 400; }
.table form { margin: 0; }
#keys > form { margin-top: 14px; }

.callout { border: 1px solid var(--fg); padding: 16px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.callout pre { width: 100%; }
.callout p { margin: 0; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.dash-head h1 { font-size: 40px; margin-bottom: 4px; }

.prose { overflow-wrap: break-word; }
.prose h1 { margin-bottom: 16px; }
.prose h2 { margin-top: 48px; }
.prose h3 { font-size: 14px; margin-top: 32px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 13px; }
.prose td code { overflow-wrap: anywhere; }
.prose td:first-child code { white-space: nowrap; }
.prose th, .prose td { text-align: left; padding: 7px 16px 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--dim); font-weight: 400; }
.prose pre { background: var(--code-bg); border: 1px solid var(--line); padding: 16px; overflow-x: auto; font-size: 13px; }
.prose pre code { border: 0; padding: 0; background: none; }
.prose blockquote { margin: 0; padding-left: 16px; border-left: 2px solid var(--line); color: var(--dim); }

/* Converter: HTML → PDF, left to right */
.wrap-wide { max-width: 1040px; }
.converter { display: grid; grid-template-columns: 1fr 44px 1fr; gap: 0; align-items: stretch; }
.pane { border: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; min-height: 340px; min-width: 0; }
.pane-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.pane-head strong { font-weight: 600; }
.pane-body { flex: 1; display: flex; flex-direction: column; position: relative; min-height: 0; }
.arrow { display: flex; align-items: center; justify-content: center; font-size: 22px; color: var(--dim); }
.seg { display: flex; border: 1px solid var(--line); }
.seg button { background: transparent; color: var(--dim); border: 0; padding: 3px 10px; font-size: 12px; }
.seg button.on { background: var(--fg); color: var(--bg); }

.dropzone { flex: 1; margin: 14px; border: 1.5px dashed var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; cursor: pointer; padding: 24px; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--fg); background: var(--bg); }
.dropzone .big { font-size: 15px; color: var(--fg); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone.has-file { border-style: solid; border-color: var(--fg); }
.dropzone .icon { font-size: 28px; line-height: 1; }
[data-mode=paste] .dropzone, [data-mode=file] .paste { display: none; }
.paste { flex: 1; border: 0; background: transparent; padding: 14px; font-size: 12.5px; line-height: 1.55; resize: none; min-height: 280px; }
.paste:focus { outline: none; }

.out-empty, .out-loading, .out-done { flex: 1; display: none; flex-direction: column; }
[data-state=empty] .out-empty, [data-state=loading] .out-loading, [data-state=done] .out-done { display: flex; }
.out-empty, .out-loading { align-items: center; justify-content: center; text-align: center; gap: 8px; color: var(--dim); padding: 24px; }
.sheet { width: 92px; height: 120px; border: 1px solid var(--line); background: var(--bg); position: relative; margin-bottom: 8px; }
.sheet::before { content: ""; position: absolute; left: 14px; right: 14px; top: 18px; height: 60px; background: repeating-linear-gradient(var(--line) 0 2px, transparent 2px 10px); }
.out-loading .sheet { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.out-done iframe { flex: 1; width: 100%; border: 0; background: #fff; min-height: 280px; }
.out-done .bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 12.5px; flex-wrap: wrap; }
a.btn { display: inline-block; background: var(--accent); color: var(--accent-fg); padding: 7px 14px; text-decoration: none; white-space: nowrap; }

.go { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.go input[type=email] { flex: 1 1 260px; width: auto; }
.go select { flex: 0 0 auto; }
.go button { flex: 0 0 auto; }
.msg { font-size: 12.5px; color: var(--dim); margin: 10px 0 0; min-height: 1.6em; }
.msg.ok { color: var(--fg); }
.msg.err { color: var(--err); }
.msg-link { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.msg .reveal { display: grid; grid-template-rows: 0fr; opacity: 0; transform: translateY(-4px); transition: grid-template-rows .28s cubic-bezier(.2,.7,.2,1), opacity .28s, transform .28s; }
.msg .reveal > span { overflow: hidden; color: var(--dim); }
.msg .reveal.on { grid-template-rows: 1fr; opacity: 1; transform: none; }

@media (max-width: 760px) {
  .converter { grid-template-columns: 1fr; }
  .arrow { height: 40px; transform: rotate(90deg); }
  .pane { min-height: 260px; }
  .go button, .go select { flex: 1 1 auto; }
}

.bleed { width: 100%; }
.hero h1 { max-width: 880px; }
.grid-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.grid-list li { background: var(--bg); padding: 14px; display: flex; flex-direction: column; gap: 2px; }
details { border-bottom: 1px solid var(--line); padding: 12px 0; }
details summary { cursor: pointer; list-style: none; }
details summary::before { content: "+ "; color: var(--dim); }
details[open] summary::before { content: "− "; }
details p { margin: 8px 0 0; color: var(--dim); }
section > .tabs { margin-top: 20px; }


/* Dashboard: tabs on the left, credits card always visible on the right */
.dash { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.dash-main > section { margin-bottom: 48px; }
.dash-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.dash-tabs a { text-decoration: none; color: var(--dim); padding: 0 0 10px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.dash-tabs a.on { color: var(--fg); border-color: var(--fg); }
.dash-side { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 12px; }
.credits-card { border: 1px solid var(--fg); padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.credits-card .balance strong { font-size: 44px; line-height: 1.1; letter-spacing: -0.02em; }
.credits-card .balance span { color: var(--dim); }
.credits-card > p { margin: 0 0 8px; }
.packs { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 14px; }
.packs-title { margin: 0 0 4px; font-weight: 600; }
.packs-title .dim { font-weight: 400; font-size: 12px; }
.pack { display: grid; grid-template-columns: 16px 1fr auto; grid-template-areas: "r pages price" "r per save"; column-gap: 10px; padding: 6px 10px; border: 1px solid var(--line); cursor: pointer; }
.pack:hover { border-color: var(--dim); }
.pack:has(input:checked) { border-color: var(--fg); background: var(--card); }
.pack input { grid-area: r; margin: 3px 0 0; accent-color: var(--fg); }
.pack-pages { grid-area: pages; }
.pack-price { grid-area: price; text-align: right; font-weight: 600; }
.pack-per { grid-area: per; font-size: 12px; }
.pack-save { grid-area: save; text-align: right; font-size: 12px; font-weight: 600; }
.buy-btn { width: 100%; padding: 13px 16px; font-size: 15px; margin-top: 6px; }
.center { text-align: center; max-width: none !important; }
.logout { align-self: flex-end; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.tile { background: var(--bg); padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.tile strong { font-size: 24px; }
.seg-lg { width: max-content; max-width: 100%; overflow-x: auto; margin-bottom: 16px; }
.seg-lg button { padding: 6px 14px; font-size: 13px; }
.table.wide { display: table; }
.inline-form { margin: 14px 0 8px; }
.ok-callout { margin-bottom: 24px; }
@media (max-width: 860px) {
  .dash { grid-template-columns: 1fr; gap: 24px; }
  .dash-side { position: static; order: -1; }
  .tiles { grid-template-columns: 1fr; }
  .table.wide { display: block; overflow-x: auto; }
}
.dash-main pre.code code#p-agent { white-space: pre-wrap; word-break: break-word; }

/* Landing: centered hero, wide converter, centered reading column below */
.col { max-width: 860px; margin-left: auto; margin-right: auto; }
.hero-center { text-align: center; }
.hero-center h1, .hero-center p { margin-left: auto; margin-right: auto; }
.hero .facts, .hero .lead { max-width: 820px; }

/* Dashboard tables use the full main column (up to the credits card) */
.dash-main .table { display: table; width: 100%; }
.dash-main .table td:last-child, .dash-main .table th:last-child { text-align: right; padding-right: 0; }

/* Click-to-copy key */
.keybox { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); background: var(--code-bg); padding: 10px 10px 10px 14px; cursor: copy; width: 100%; transition: border-color .15s; }
.keybox:hover, .keybox:focus-visible { border-color: var(--fg); outline: none; }
.keybox code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 13px; user-select: all; }
.keybox.copied { border-color: var(--fg); }

/* Modal */
.modal { border: 1px solid var(--fg); background: var(--bg); color: var(--fg); padding: 24px; width: min(560px, calc(100vw - 32px)); }
.modal::backdrop { background: rgba(0,0,0,.45); }
.modal[open] { animation: pop .18s ease-out; }
.modal p { margin: 0 0 10px; }
.modal-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }

/* Email menu in the credits card */
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; display: inline-flex; gap: 6px; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover { color: var(--fg); }
.menu-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 5; background: var(--bg); border: 1px solid var(--line); min-width: 160px; display: flex; flex-direction: column; animation: pop .12s ease-out; }
.menu-pop a, .menu-pop .linklike { padding: 8px 12px; text-decoration: none; text-align: left; font-size: 13px; }
.menu-pop a:hover, .menu-pop .linklike:hover { background: var(--card); }
.menu-pop form { margin: 0; border-top: 1px solid var(--line); }
.linklike { background: none; border: 0; color: var(--fg); width: 100%; cursor: pointer; }

/* Life: new rows flash, balance bumps, panels fade in, busy buttons */
@keyframes flash { from { background: var(--code-bg); } to { background: transparent; } }
tr.flash td { animation: flash 2.4s ease-out; }
@keyframes bump { 30% { transform: translateY(-2px); } }
.bump { display: inline-block; animation: bump .5s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(3px); } }
.fade, .dash-main > section { animation: fade .2s ease-out; }
button.busy { cursor: progress; opacity: .85; }
button, a.btn, .pack, .dash-tabs a { transition: background-color .15s, border-color .15s, color .15s, opacity .15s; }
button:active:not(:disabled) { transform: translateY(1px); }
.go-spacer { flex: 1 1 auto; }
.go-credits { flex: 1 1 auto; align-self: center; font-size: 12.5px; }
.go-credits a { color: inherit; }
.est.short { color: var(--err); }
.est:not(:empty) { display: inline-block; margin-left: 1ch; }
.est.in { animation: est-in .22s cubic-bezier(.2,.7,.2,1); }
@keyframes est-in { from { opacity: 0; transform: translateX(-6px); filter: blur(2px); } }
.go-credits.bump [data-credits] { animation: bump .5s ease-out; }
@keyframes bump { 30% { color: var(--fg); } }
.invgen-go .msg:empty { display: none; }

/* Landing: every section shares one width */
.col { max-width: none; }
.col .table { display: table; width: 100%; }
.col dl.specs, .col details { max-width: none; }
details.menu { border: 0; padding: 0; max-width: none; }
details.menu summary::before { content: none; }
.keybox code { background: none; border: 0; padding: 0; }

/* Social proof */
.proof { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 24px; }
.proof div { background: var(--bg); padding: 18px 20px; display: flex; flex-direction: column; gap: 2px; }
.proof strong { font-size: 28px; letter-spacing: -0.02em; }
.proof span { color: var(--dim); font-size: 12.5px; }
.works-with { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; justify-content: center; color: var(--fg); font-size: 14px; }
.works-with span:not(.dim) { opacity: .75; }

.urlmode { display: none; flex: 1; flex-direction: column; gap: 8px; padding: 18px 14px; }
[data-mode=url] .urlmode { display: flex; }
[data-mode=url] .dropzone, [data-mode=url] .paste { display: none; }
.urlmode input { background: var(--bg); border: 1px solid var(--line); padding: 10px 12px; width: 100%; font: inherit; color: inherit; }

/* Logos (Simple Icons, CC0) inherit the text color */
svg.logo { width: 1em; height: 1em; display: inline-block; vertical-align: -0.12em; margin-right: .4em; flex: none; }
/* Wide wordmarks: viewBox cropped to the mark, so give them room */
svg.logo-woocommerce { width: 3.3em; }

/* Hero: rotating tool name */
.rotator { display: inline-grid; vertical-align: bottom; text-align: left; font-weight: 600; transition: width .35s ease; justify-items: start; }
.rotator .rot { grid-area: 1 / 1; display: inline-flex; align-items: center; white-space: nowrap; opacity: 0; transform: translateY(.45em); transition: opacity .35s ease, transform .35s ease; }
.rotator .rot.on { opacity: 1; transform: none; }
.rotator .rot.out { opacity: 0; transform: translateY(-.45em); }

/* Works with: clickable logos */
.works-with a { display: inline-flex; align-items: center; text-decoration: none; opacity: .75; transition: opacity .15s, transform .15s; }
.works-with a:hover { opacity: 1; transform: translateY(-1px); }
.mini-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 16px; }
.mini-cards a { background: var(--bg); padding: 16px; display: flex; gap: 12px; align-items: center; text-decoration: none; transition: background .15s; }
.mini-cards a:hover { background: var(--card); }
.mini-cards svg.logo { width: 26px; height: 26px; margin: 0; }
.mini-cards span span { display: block; }
.final-cta { text-align: center; border-top: 1px solid var(--line); padding-top: 48px; }
.final-cta p { margin-left: auto; margin-right: auto; }
.final-cta h2::before { content: none; }
a.btn.ghost-btn { background: transparent; color: var(--fg); border: 1px solid var(--line); margin-left: 8px; }
main h3 { font-size: 14px; margin: 32px 0 12px; }

/* Converter: the empty PDF "prints" itself on a loop */
.out-empty .sheet { overflow: hidden; }
.out-empty .sheet::before { animation: write 3.2s ease-in-out infinite; }
.out-empty .sheet::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: var(--fg); opacity: .5; top: 0; animation: scan 3.2s ease-in-out infinite; }
@keyframes write { 0% { clip-path: inset(0 0 100% 0); } 55%, 85% { clip-path: inset(0 0 0 0); } 100% { clip-path: inset(0 0 0 0); opacity: 0; } }
@keyframes scan { 0% { top: 12px; opacity: 0; } 8% { opacity: .5; } 55% { top: 82px; opacity: .5; } 62%, 100% { top: 82px; opacity: 0; } }
.out-done iframe { animation: fade .35s ease-out; }

/* Smoother menu + modal */
.modal::backdrop { animation: backdrop .2s ease-out; }
@keyframes backdrop { from { background: rgba(0,0,0,0); } }
.menu summary span[aria-hidden] { display: inline-block; transition: transform .15s; }
.menu[open] summary span[aria-hidden] { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .rotator .rot { opacity: 0; } .rotator .rot.on { opacity: 1; } }

.crumbs { margin-bottom: 8px; }
.crumbs a { text-decoration: none; }
main > .related { max-width: 760px; margin: 48px auto 24px; border-top: 1px solid var(--line); padding-top: 24px; }
.related ul { list-style: none; padding: 0; margin: 0 0 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 6px 24px; }
.related li a { text-decoration: none; }
.related li a::before { content: "→ "; color: var(--dim); }
.related li a:hover { text-decoration: underline; }

/* Auto top-up */
.autotopup { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.auto-form { display: flex; flex-direction: column; gap: 10px; }
.auto-form p { margin: 0; }
.auto-fields { display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; }
.auto-fields input[type=number] { width: 80px; background: var(--bg); border: 1px solid var(--line); padding: 4px 6px; font: inherit; color: inherit; }
.auto-fields select { padding: 4px 6px; font-size: 12.5px; }
.auto-form:not(:has(input[name=enabled]:checked)) .auto-fields { opacity: .55; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 32px; height: 18px; border: 1px solid var(--fg); position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; background: var(--fg); transition: transform .15s, background .15s; }
.switch input:checked + .track { background: var(--fg); }
.switch input:checked + .track::after { transform: translateX(14px); background: var(--bg); }
.switch input:focus-visible + .track { outline: 1px solid var(--fg); outline-offset: 2px; }
.fg { color: var(--fg); }
.foot-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; border-top: 1px solid var(--line); padding-top: 32px; padding-bottom: 24px; margin-top: 48px; font-size: 12.5px; }
.foot-links div { display: flex; flex-direction: column; gap: 6px; }
.foot-links strong { font-weight: 600; margin-bottom: 2px; }
.foot-links a { color: var(--dim); text-decoration: none; }
.foot-links a:hover { color: var(--fg); }

/* Templates */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.tpl-card { display: flex; flex-direction: column; gap: 4px; text-decoration: none; }
.tpl-thumb { aspect-ratio: 210 / 297; border: 1px solid var(--line); overflow: hidden; position: relative; background: #fff; transition: border-color .15s, transform .15s; }
.tpl-card:hover .tpl-thumb { border-color: var(--fg); transform: translateY(-2px); }
.tpl-thumb iframe { position: absolute; top: 0; left: 0; width: 794px; height: 1123px; border: 0; transform: scale(.28); transform-origin: 0 0; pointer-events: none; }
.tpl-preview { border: 1px solid var(--line); height: 560px; overflow: hidden; position: relative; background: #fff; }
.tpl-preview iframe { width: 100%; height: 100%; border: 0; }
.tpl-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.tpl-actions .btn.ghost-btn { margin-left: 0; }
.tpl-code { max-height: 420px; overflow: auto; }
.tpl-thumb.landscape iframe { width: 1123px; height: 794px; transform: scale(.2); top: 30%; }
.steps { padding-left: 20px; margin: 0; display: flex; flex-direction: column; gap: 8px; max-width: 72ch; }

/* Phones: wide tables scroll inside themselves instead of widening the page */
@media (max-width: 760px) {
  .col .table, .dash-main .table, .prose table { display: block; overflow-x: auto; max-width: 100%; }
  .table th, .table td { white-space: nowrap; }
  html, body { overflow-x: hidden; }
  .nav nav { gap: 14px; }
  .nav nav a[href="/llms.txt"] { display: none; }
  .hero h1 { font-size: 30px; }
}

/* ---------- Nav: hamburger on small screens ---------- */
.nav-toggle { display: none; background: transparent; border: 1px solid var(--line); width: 40px; height: 36px; padding: 0; position: relative; color: var(--fg); }
.nav-toggle span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--fg); transition: transform .2s ease, opacity .2s ease, top .2s ease; }
.nav-toggle span:nth-child(1) { top: 11px; } .nav-toggle span:nth-child(2) { top: 17px; } .nav-toggle span:nth-child(3) { top: 23px; }
.nav.open .nav-toggle span:nth-child(1) { top: 17px; transform: rotate(45deg); }
.nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle span:nth-child(3) { top: 17px; transform: rotate(-45deg); }
.nav nav a.nav-cta { color: var(--fg); }
@media (max-width: 760px) {
  .nav { flex-wrap: nowrap; padding-bottom: 32px; position: relative; }
  .nav-toggle { display: block; }
  .nav nav { display: none; position: absolute; top: 64px; left: 16px; right: 16px; z-index: 20; flex-direction: column; gap: 0; background: var(--bg); border: 1px solid var(--fg); padding: 6px 0; }
  .nav.open nav { display: flex; animation: pop .16s ease-out; }
  .nav nav a { padding: 12px 16px; font-size: 15px; color: var(--fg); }
  .nav nav a:hover { background: var(--card); }
  .nav nav a.nav-llms { display: block; }
  .nav nav a.nav-cta { margin: 6px 12px 6px; background: var(--fg); color: var(--bg); text-align: center; }
}

/* ---------- Copy buttons on code blocks ---------- */
.codewrap { position: relative; }
.codewrap pre { padding-right: 56px; }
.copy-btn { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; padding: 0; display: grid; place-items: center; background: var(--bg); color: var(--fg); border: 1px solid var(--line); opacity: .85; transition: opacity .15s, border-color .15s, background .15s; }
.copy-btn:hover { opacity: 1; border-color: var(--fg); }
.copy-btn svg { grid-area: 1 / 1; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s cubic-bezier(.2,.9,.3,1.3), opacity .2s; }
.copy-btn .i-check { opacity: 0; transform: scale(.4); stroke-dasharray: 22; stroke-dashoffset: 22; }
.copy-btn.done { background: var(--fg); color: var(--bg); border-color: var(--fg); opacity: 1; }
.copy-btn.done .i-copy { opacity: 0; transform: scale(.4) rotate(-20deg); }
.copy-btn.done .i-check { opacity: 1; transform: scale(1); animation: draw .35s .05s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.copy-tip { position: absolute; right: calc(100% + 8px); top: 50%; transform: translate(6px, -50%); background: var(--fg); color: var(--bg); font-size: 11px; padding: 3px 7px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s, transform .2s; }
.copy-btn.done .copy-tip { opacity: 1; transform: translate(0, -50%); }
.tabs + .codewrap pre, .tabs + .codewrap { margin-top: 0; }
.tabs button, .seg-lg button { display: inline-flex; align-items: center; gap: 2px; }
.tabs button svg.logo, .seg-lg button svg.logo { width: 13px; height: 13px; margin-right: 6px; opacity: .8; }
.tabs button.on svg.logo, .seg-lg button.on svg.logo { opacity: 1; }
.grid-list { grid-template-columns: repeat(4, 1fr); }
.grid-list.linked li { padding: 0; }
.grid-list.linked a { display: flex; flex-direction: column; gap: 2px; padding: 14px; height: 100%; text-decoration: none; transition: background .15s; }
.grid-list.linked a:hover { background: var(--card); }
.grid-list.linked a strong::after { content: " →"; color: var(--dim); opacity: 0; transition: opacity .15s, margin .15s; }
.grid-list.linked a:hover strong::after { opacity: 1; }
@media (max-width: 860px) { .grid-list { grid-template-columns: repeat(2, 1fr); } }


/* ---------- Credits card v2 ---------- */
.credits-card { gap: 4px; padding: 18px; }
details.menu { margin: -4px -6px 6px; }
.menu summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 6px; color: var(--dim); font-size: 12.5px; border: 1px solid transparent; transition: border-color .15s, color .15s; }
.menu summary:hover, .menu[open] summary { border-color: var(--line); color: var(--fg); }
.menu-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu .chev { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; flex: none; transition: transform .2s ease; }
.menu[open] .chev { transform: rotate(180deg); }
.menu-pop { left: 0; right: 0; min-width: 0; top: calc(100% + 4px); border-color: var(--fg); box-shadow: 0 8px 24px rgba(0,0,0,.08); transform-origin: top center; animation: menu-in .16s ease-out; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px) scaleY(.96); } }
.menu-pop a, .menu-pop .linklike { padding: 10px 12px; font-size: 13px; }
.menu-pop .linklike { color: var(--err); }
.packs-title { font-size: 14px; margin: 0; }
.packs-sub { margin: 0 0 6px; }
.pack { grid-template-columns: 16px 1fr auto; grid-template-areas: "r pages price" "r per per"; row-gap: 2px; padding: 8px 10px; }
.pack-pages { font-size: 13.5px; }
.pack-price { font-size: 15px; font-weight: 700; }
.pack-per { grid-area: per; font-size: 11.5px; color: var(--dim); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.save-tag { font-size: 10.5px; font-weight: 500; color: var(--fg); background: var(--code-bg); border: 1px solid var(--line); padding: 0 5px; line-height: 1.6; }
.pack:has(input:checked) .save-tag { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.pack-save { display: none; }
.trust { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; color: var(--dim); font-size: 11.5px; }
.trust-lock { display: inline-flex; align-items: center; gap: 5px; }
.trust-lock svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.trust-icons { display: inline-flex; gap: 8px; align-items: center; }
.trust-icons svg.logo { width: 22px; height: 22px; margin: 0; opacity: .7; }
.mobile-balance { display: none; }

/* ---------- Dashboard on phones ---------- */
@media (max-width: 860px) {
  .dash { display: flex; flex-direction: column; gap: 8px; }
  .dash-side { position: static; order: 2; width: 100%; }
  .dash-main { order: 1; width: 100%; }
  .mobile-balance { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--fg); padding: 12px 14px; margin-bottom: 20px; text-decoration: none; }
  .mobile-balance strong { font-size: 24px; }
  .mobile-balance .btn { padding: 8px 12px; font-size: 13px; }
  .dash-tabs { gap: 18px; overflow-x: auto; }
  .dash-tabs a { white-space: nowrap; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .tiles .tile:last-child { grid-column: span 2; }
  .seg-lg { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .seg-lg button { justify-content: center; padding: 9px 8px; }
  .keybox { flex-wrap: wrap; }
  .dash-main .table th:nth-child(5), .dash-main .table td:nth-child(5), .dash-main .table th:nth-child(6), .dash-main .table td:nth-child(6) { display: none; }
  .dash-main .table { display: table; }
  .dash-main .table th, .dash-main .table td { white-space: normal; padding-right: 10px; font-size: 12.5px; }
}
.mobile-balance .btn { background: var(--accent); color: var(--accent-fg); }

/* Article illustrations */
main > figure.hero-img { margin: 0 auto 28px; max-width: 760px; border: 1px solid var(--line); overflow: hidden; }
.hero-img img { display: block; width: 100%; height: auto; animation: fade .4s ease-out; }
.menu-pop .help-link { color: var(--fg); border-top: 1px solid var(--line); }
.help-list { margin: 8px 0 14px; padding-left: 18px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }

/* ---------- Cookie banner: small, bottom-left ---------- */
.consent { display: none; position: fixed; left: 16px; bottom: 16px; z-index: 50; max-width: 380px; background: var(--bg); border: 1px solid var(--fg); padding: 14px 16px; box-shadow: 0 10px 30px rgba(0,0,0,.12); font-size: 12.5px; }
.ask-consent .consent { display: block; animation: consent-in .3s cubic-bezier(.2,.8,.3,1); }
@keyframes consent-in { from { opacity: 0; transform: translateY(12px); } }
.consent p { margin: 0 0 10px; max-width: none; line-height: 1.5; }
.consent a { color: var(--dim); }
.consent-actions { display: flex; gap: 8px; justify-content: flex-end; }
.consent-actions button { padding: 6px 14px; }
.foot-btn { width: auto; padding: 0; font-size: 12px; color: var(--dim); text-decoration: none; }
.foot-btn:hover { color: var(--fg); }
@media (max-width: 560px) { .consent { left: 8px; right: 8px; bottom: 8px; max-width: none; } }

/* Templates gallery: 3 per row, thumbnails show the page with margins */
.tpl-grid { grid-template-columns: repeat(3, 1fr); gap: 28px; }
.tpl-thumb { background: #e9e9e7; }
.tpl-thumb iframe { width: 900px; height: 1273px; transform: scale(.36); }
.tpl-thumb.landscape iframe { width: 1240px; height: 900px; transform: scale(.27); top: 22%; }
.tpl-card strong { margin-top: 6px; }
@media (max-width: 860px) { .tpl-grid { grid-template-columns: repeat(2, 1fr); } .tpl-thumb iframe { transform: scale(.4); } }
@media (max-width: 520px) { .tpl-grid { grid-template-columns: 1fr; } .tpl-thumb iframe { transform: scale(.42); } }
.tpl-preview { height: 640px; background: #e9e9e7; }
.tpl-thumb.small iframe { transform: scale(.36); }
.tpl-thumb.small iframe { width: 600px; height: 849px; transform: scale(.54); }
@media (max-width: 860px) { .tpl-thumb.small iframe { transform: scale(.6); } }

/* Mobile refinements */
#agentprompt, #p-agent { white-space: pre-wrap; word-break: break-word; }
@media (max-width: 760px) {
  .tabs { width: auto; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
  .tabs button { flex: 1 1 auto; justify-content: center; border-bottom: 0; }
  .grid-list { grid-template-columns: repeat(2, 1fr); }
  .grid-list.linked a { padding: 12px; font-size: 13px; }
  .codewrap pre { padding-right: 48px; font-size: 12px; }
  .copy-btn { top: 6px; right: 6px; width: 30px; height: 30px; }
  .works-with { gap: 6px 16px; font-size: 13px; }
  .hero .lead { font-size: 15px; }
  h2 { font-size: 15px; }
}
@media (max-width: 340px) { .grid-list { grid-template-columns: 1fr; } }
.grid-list.linked a svg.logo { width: 18px; height: 18px; margin: 0 0 6px; opacity: .8; }
.grid-list.linked a svg.logo-woocommerce { width: 60px; }

/* Phones: article tables become stacked cards */
@media (max-width: 640px) {
  .prose table.stackable { display: block; overflow: visible; border: 0; }
  .prose table.stackable thead { display: none; }
  .prose table.stackable tbody, .prose table.stackable tr, .prose table.stackable td { display: block; width: 100%; }
  .prose table.stackable tr { border: 1px solid var(--line); padding: 10px 12px; margin-bottom: 10px; }
  .prose table.stackable td { border: 0; padding: 3px 0; white-space: normal; }
  .prose table.stackable td[data-label]::before { content: attr(data-label); display: block; font-size: 10.5px; color: var(--dim); text-transform: lowercase; }
  .prose table.stackable td:first-child { font-weight: 600; }
  .prose table.stackable td:first-child::before { display: none; }
  .prose table.stackable td:empty { display: none; }
}

/* Free invoice generator */
.invgen { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 28px; align-items: start; }
.invgen-form { display: flex; flex-direction: column; gap: 14px; }
.invgen-form fieldset { border: 1px solid var(--line); padding: 12px 14px 14px; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.invgen-form legend { padding: 0 6px; font-size: 12px; color: var(--dim); }
.invgen-form input, .invgen-form textarea, .invgen-form select { background: var(--bg); border: 1px solid var(--line); padding: 8px 10px; font: inherit; font-size: 13px; color: inherit; width: 100%; }
.invgen-form .row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.invgen-form .row3 legend { grid-column: 1 / -1; }
.invgen-form label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--dim); }
.inv-item { display: grid; grid-template-columns: 1fr 64px 96px 32px; gap: 6px; }
.inv-item button { padding: 0; }
.invgen-preview { position: sticky; top: 16px; border: 1px solid var(--line); background: var(--card); }
.invgen-preview iframe[data-preview] { width: 100%; height: 620px; border: 0; background: #e9e9e7; display: block; }
.invgen-go { padding: 12px 14px; border-top: 1px solid var(--line); }
.invgen-go .go { margin-top: 0; }
@media (max-width: 860px) { .invgen { grid-template-columns: 1fr; } .invgen-preview { position: static; } .invgen-preview iframe[data-preview] { height: 460px; } }
[hidden] { display: none !important; }

/* login: optional "How did you hear about us?" */
select.heard { width: 100%; }

/* converter: chosen file card with live preview, "check your inbox" state, email step */
.dropzone .filecard { display: none; }
.dropzone.has-file { border-style: solid; border-color: var(--fg); background: var(--card); align-items: stretch; justify-content: flex-start; text-align: left; padding: 12px; }
.dropzone.has-file .drop-empty { display: none; }
.dropzone.has-file .filecard { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; }
.drop-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.filecard-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.filecard-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.filecard-icon { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; background: var(--accent); color: var(--accent-fg); font-size: 13px; flex: 0 0 auto; }
.filecard-x { margin-left: auto; background: none; color: var(--dim); border: 1px solid var(--line); padding: 0 8px; line-height: 22px; cursor: pointer; }
.filecard-x:hover { color: var(--fg); border-color: var(--fg); }
.filecard-preview { flex: 1; width: 100%; min-height: 160px; border: 1px solid var(--line); background: #fff; pointer-events: none; }
.out-sent { flex: 1; display: none; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 24px; }
[data-state=sent] .out-sent { display: flex; }
.out-sent .icon { font-size: 30px; line-height: 1; }
.out-sent .small { color: var(--dim); max-width: 34ch; }
.go-label { display: block; margin-top: 14px; font-size: 13px; }
.go .go-label { flex: 1 0 100%; margin-top: 0; }
#convert .go-label + .go { margin-top: 6px; }
/* welcome page after the first email confirmation */
.welcome h1 { margin-bottom: 4px; }
.checklist { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 10px; }
.checklist li { display: flex; align-items: center; gap: 10px; color: var(--dim); transition: color .2s; }
.checklist li.done { color: var(--fg); }
.checklist .tick { width: 18px; height: 18px; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; flex: 0 0 auto; transition: background .2s, border-color .2s; }
.checklist li.done .tick { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.checklist li.done .tick::after { content: "✓"; }
/* Welcome download button: Download PDF → ✓ Downloaded (hover: Download again) */
a.btn.dl-btn { display: inline-grid; justify-items: center; transition: background .25s, color .25s, box-shadow .25s; }
.dl-btn .lbl { grid-area: 1 / 1; transition: opacity .22s, transform .22s; }
.dl-btn .lbl-done, .dl-btn .lbl-again { opacity: 0; transform: translateY(6px); }
.dl-btn.busy { opacity: .7; cursor: progress; }
a.btn.dl-btn.done { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); }
.dl-btn.done .lbl-get { opacity: 0; transform: translateY(-6px); }
.dl-btn.done .lbl-done { opacity: 1; transform: none; }
.dl-btn.done:hover .lbl-done, .dl-btn.done:focus-visible .lbl-done { opacity: 0; transform: translateY(-6px); }
.dl-btn.done:hover .lbl-again, .dl-btn.done:focus-visible .lbl-again { opacity: 1; transform: none; }
.welcome .btn { margin: 4px 0 8px; }
