/* Tillpress Ledger: components. Tokens live in theme.json. */

:root {
	--tp-ink: var(--wp--preset--color--ink);
	--tp-paper: var(--wp--preset--color--paper);
	--tp-rule: var(--wp--preset--color--rule);
	--tp-muted: var(--wp--preset--color--muted);
	--tp-accent: var(--wp--preset--color--accent);
	--tp-mono: var(--wp--preset--font-family--mono);
	--tp-display: var(--wp--preset--font-family--display);
	--tp-hair: 1px solid var(--tp-ink);
	--tp-hair-soft: 1px solid var(--tp-rule);
	--tp-ease: cubic-bezier(.2, .6, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 88px; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--tp-ink); color: var(--tp-paper); }
:where(a, button, summary, input, select, textarea):focus-visible { outline: 2px solid var(--tp-accent); outline-offset: 3px; }
img { height: auto; }
.wp-site-blocks { overflow-x: clip; }

/* Thin rule grid on the page background, very faint. */
body { background-image: linear-gradient(to right, rgba(17,17,17,.035) 1px, transparent 1px); background-size: 8px 100%; background-size: calc((100vw - 16px) / 12) 100%; }
@media (min-width: 1232px) { body { background-size: 100px 100%; background-position: calc(50vw - 600px) 0; } }

/* ---------- Mono labels ---------- */
.tp-label, .tp-eyebrow, .tp-stamp, .tp-receipt__kind, .tp-cell-kind, .tp-per, .tp-tag, .tp-step__n, .tp-proofline, .tp-fig__cap {
	font-family: var(--tp-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; line-height: 1.5;
}
.tp-eyebrow { margin: 0 0 16px; color: var(--tp-muted); }
.tp-eyebrow::before { content: "№ "; }
.tp-stamp { display: inline-block; margin: 0; padding: 3px 8px; border: 1px solid currentColor; border-radius: 2px; color: var(--tp-ink); white-space: nowrap; }
.tp-tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border: 1px dashed var(--tp-muted); color: var(--tp-muted); font-size: 11px; }
.tp-lead { font-size: var(--wp--preset--font-size--lead); line-height: 1.45; max-width: 36ch; }
.tp-muted { color: var(--tp-muted); }

/* ---------- Buttons: the two paths ---------- */
.tp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 12px; margin: 0; }
.tp-btn {
	display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px;
	border: 1px solid var(--tp-accent); border-radius: 2px; font-weight: 600; font-size: 16px; line-height: 1.2; text-decoration: none;
	transition: background-color .2s var(--tp-ease), color .2s var(--tp-ease), border-color .2s var(--tp-ease);
}
.tp-btn--lite { background: transparent; color: var(--tp-accent); }
.tp-btn--lite:hover { background: var(--tp-accent); color: #fff; }
.tp-btn--pro { background: var(--tp-accent); color: #fff; }
.tp-btn--pro:hover { background: var(--tp-ink); border-color: var(--tp-ink); color: #fff; }
.tp-btn--quiet { border-color: var(--tp-ink); color: var(--tp-ink); background: transparent; }
.tp-btn--quiet:hover { background: var(--tp-ink); color: var(--tp-paper); }
.tp-textlink { font-weight: 600; color: var(--tp-accent); }
.tp-actions__price { flex-basis: 100%; margin: 4px 0 0; font-family: var(--tp-mono); font-size: 13px; letter-spacing: .04em; color: var(--tp-ink); }
.tp-actions__price > span:first-child { color: var(--tp-muted); text-transform: uppercase; }
.tp-actions--stack { flex-direction: column; align-items: stretch; }
.tp-actions--stack .tp-btn { width: 100%; }
@media (max-width: 480px) { .tp-hero .tp-actions .tp-btn, .tp-cta .tp-actions .tp-btn { flex: 1 1 0; padding-inline: 12px; } }

/* ---------- Header ---------- */
.tp-header { position: sticky; top: 0; z-index: 50; background: var(--tp-paper); border-bottom: var(--tp-hair); }
.admin-bar .tp-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .tp-header { top: 0; } }
.tp-header__row { min-height: 64px; }
.tp-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--tp-ink); }
.tp-brand img { width: 30px; height: 30px; }
.tp-brand span { font-family: var(--tp-display); font-size: 24px; font-weight: 500; letter-spacing: -.01em; }
.tp-header .wp-block-navigation { font-size: 15px; gap: 4px 22px; }
.tp-header .wp-block-navigation a { text-decoration: none; }
.tp-header .wp-block-navigation a:hover { text-decoration: underline; text-underline-offset: 4px; }
.tp-header .tp-nav-cta a { padding: 8px 14px; background: var(--tp-accent); color: #fff !important; border-radius: 2px; font-weight: 600; }
.tp-header .tp-nav-cta a:hover { background: var(--tp-ink); text-decoration: none !important; }
.tp-header .wp-block-navigation__responsive-container.is-menu-open { background: var(--tp-paper); padding: 24px; }
.tp-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 18px; font-size: 22px; font-family: var(--tp-display); }
.tp-header .wp-block-navigation-submenu .wp-block-navigation__submenu-container { border: var(--tp-hair) !important; background: var(--tp-paper) !important; border-radius: 0; padding: 8px 0; min-width: 240px !important; }
.tp-header .wp-block-navigation__submenu-container a { padding: 8px 16px !important; }
.tp-cart a, .tp-cart button { color: var(--tp-ink); }

/* ---------- Sections ---------- */
.tp-section { border-top: var(--tp-hair); }
.tp-ink { background: var(--tp-ink); color: var(--tp-paper); }
.tp-ink a:not(.tp-btn) { color: var(--wp--preset--color--accent-on-ink); }
.tp-ink .tp-eyebrow, .tp-ink .tp-muted { color: #B9B5A8; }
.tp-ink .tp-btn--pro { background: var(--wp--preset--color--accent-on-ink); border-color: var(--wp--preset--color--accent-on-ink); color: var(--tp-ink); }
.tp-ink .tp-btn--pro:hover { background: var(--tp-paper); border-color: var(--tp-paper); }
.tp-ink .tp-btn--lite { color: var(--tp-paper); border-color: var(--tp-paper); }
.tp-ink .tp-btn--lite:hover { background: var(--tp-paper); color: var(--tp-ink); }
.tp-ink .tp-actions__price { color: var(--tp-paper); }
.tp-ink .tp-actions__price > span:first-child { color: #B9B5A8; }

/* Perforated edge divider */
.tp-perf { height: 12px; margin: 0; border: 0; background: radial-gradient(circle at 6px 6px, var(--tp-paper) 3px, transparent 3.5px) 0 0 / 12px 12px repeat-x, var(--tp-ink); }
.tp-perf--top { transform: scaleY(-1); }

/* ---------- Hero ---------- */
.tp-hero h1 { margin: 0; max-width: 15ch; }
.tp-hero h1 em { font-style: italic; }
.tp-hero .tp-lead { margin: 20px 0 28px; }
.tp-hero__figure { margin: 0; }

/* Screenshot frame: hairline, no chrome */
.tp-frame { margin: 0; border: var(--tp-hair); background: #fff; }
.tp-frame img { display: block; width: 100%; }
.tp-frame--crop { overflow: hidden; }
.tp-frame--crop img { aspect-ratio: var(--tp-ratio, 16 / 10); object-fit: cover; object-position: top left; }
.tp-fig__cap { display: flex; justify-content: space-between; gap: 12px; margin: 8px 0 0; color: var(--tp-muted); }
.tp-ink .tp-frame { border-color: var(--tp-paper); }

/* Annotation markers */
.tp-annot { position: relative; }
.tp-pin { position: absolute; width: 28px; height: 28px; border-radius: 50%; background: var(--tp-accent); color: #fff; font: 600 13px/28px var(--tp-mono); text-align: center; box-shadow: 0 0 0 3px #fff; transform: translate(-50%, -50%); }
.tp-notes-list { list-style: none; margin: 16px 0 0; padding: 0; counter-reset: n; }
.tp-notes-list li { position: relative; padding: 10px 0 10px 40px; border-top: var(--tp-hair-soft); font-size: 15px; }
.tp-notes-list li::before { counter-increment: n; content: counter(n); position: absolute; left: 0; top: 9px; width: 26px; height: 26px; border-radius: 50%; background: var(--tp-accent); color: #fff; font: 600 12px/26px var(--tp-mono); text-align: center; }

/* ---------- Trust strip ---------- */
.tp-trust { border-block: var(--tp-hair); }
.tp-trust ul { display: grid; grid-template-columns: repeat(2, 1fr); margin: 0; padding: 0; list-style: none; }
.tp-trust li { padding: 16px 8px; font-family: var(--tp-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; text-align: center; border-right: var(--tp-hair-soft); border-bottom: var(--tp-hair-soft); }
.tp-trust li:nth-child(2n) { border-right: 0; }
.tp-trust li:nth-child(n+3) { border-bottom: 0; }
.tp-trust b { display: block; font-family: var(--tp-display); font-size: 22px; font-weight: 500; letter-spacing: 0; text-transform: none; }
@media (min-width: 782px) {
	.tp-trust ul { grid-template-columns: repeat(4, 1fr); }
	.tp-trust li { border-bottom: 0; border-right: var(--tp-hair-soft); }
	.tp-trust li:nth-child(2n) { border-right: var(--tp-hair-soft); }
	.tp-trust li:last-child { border-right: 0; }
}

/* ---------- Bento ---------- */
.tp-bento { display: grid; gap: 0; grid-template-columns: 1fr; border: var(--tp-hair); }
.tp-card { display: flex; flex-direction: column; gap: 14px; padding: 24px; border-bottom: var(--tp-hair); background: var(--tp-paper); }
.tp-card:last-child { border-bottom: 0; }
.tp-card h3 { margin: 0; font-size: 30px; }
.tp-card p { margin: 0; }
.tp-card__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.tp-card .tp-frame { margin-top: auto; }
.tp-card .tp-actions { margin-top: 4px; }
.tp-card--flag h3 { font-size: clamp(36px, 5vw, 52px); }
.tp-card--quiet { background: var(--wp--preset--color--paper-2); }
@media (min-width: 900px) {
	.tp-bento { grid-template-columns: repeat(6, 1fr); }
	.tp-card { border-bottom: 0; border-right: var(--tp-hair); }
	.tp-card--flag { grid-column: span 4; grid-row: span 2; border-bottom: 0; }
	.tp-card--b { grid-column: span 2; border-right: 0; border-bottom: var(--tp-hair); }
	.tp-card--c { grid-column: span 2; border-right: 0; }
	.tp-card--d { grid-column: span 6; border-top: var(--tp-hair); border-right: 0; flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
	.tp-card--d > div:first-child { max-width: 60ch; }
}

/* ---------- Steps ---------- */
.tp-steps { display: grid; gap: 0; grid-template-columns: 1fr; margin: 0; padding: 0; list-style: none; border-top: var(--tp-hair); }
.tp-step { padding: 24px 0; border-bottom: var(--tp-hair-soft); }
.tp-step__n { display: block; margin-bottom: 12px; color: var(--tp-muted); }
.tp-step h3 { margin: 0 0 8px; }
.tp-step p { margin: 0; }
@media (min-width: 782px) {
	.tp-steps { grid-template-columns: repeat(3, 1fr); }
	.tp-step { padding: 28px 28px 28px 0; border-bottom: 0; border-right: var(--tp-hair-soft); }
	.tp-step + .tp-step { padding-left: 28px; }
	.tp-step:last-child { border-right: 0; }
}

/* ---------- Proof rows ---------- */
.tp-proof { display: grid; gap: 24px 48px; grid-template-columns: 1fr; align-items: start; padding-block: 40px; border-top: var(--tp-hair-soft); }
.tp-proof:first-of-type { border-top: 0; }
.tp-proof h3 { margin: 0 0 12px; }
@media (min-width: 900px) {
	.tp-proof { grid-template-columns: 5fr 7fr; }
	.tp-proof--flip > :first-child { order: 2; }
}

/* ---------- Receipts ---------- */
.tp-receipts { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .tp-receipts { grid-template-columns: repeat(3, 1fr); } }
.tp-receipt { position: relative; display: flex; flex-direction: column; gap: 16px; padding: 28px 24px 24px; background: #FFFEFA; border: var(--tp-hair); color: var(--tp-ink); }
.tp-receipt::before, .tp-receipt::after { content: ""; position: absolute; left: -1px; right: -1px; height: 10px; background: radial-gradient(circle at 5px 0, var(--tp-paper) 4px, transparent 4.5px) 0 0 / 10px 10px repeat-x; }
.tp-receipt::before { top: -1px; }
.tp-receipt::after { bottom: -1px; transform: scaleY(-1); }
.tp-receipt__head { display: grid; gap: 6px; padding-bottom: 14px; border-bottom: 1px dashed var(--tp-ink); }
.tp-receipt__head h3 { margin: 0; font-size: 32px; }
.tp-receipt__head .tp-stamp { justify-self: start; }
.tp-receipt__kind { margin: 0; color: var(--tp-muted); }
.tp-lines { list-style: none; margin: 0; padding: 0; font-family: var(--tp-mono); font-size: 14px; }
.tp-line { display: flex; align-items: baseline; gap: 8px; padding: 5px 0; }
.tp-line__l, .tp-line__v { white-space: nowrap; }
.tp-line__dots { flex: 1; border-bottom: 2px dotted var(--tp-ink); opacity: .45; transform: translateY(-4px); min-width: 16px; }
.tp-line del, .tp-amt del { color: var(--tp-muted); margin-right: 4px; }
.tp-receipt__total { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding-top: 12px; border-top: 3px double var(--tp-ink); font-family: var(--tp-mono); font-weight: 600; font-size: 15px; text-transform: uppercase; letter-spacing: .04em; }
.tp-receipt__note { margin: 0; font-size: 13px; color: var(--tp-muted); }
.tp-receipt .tp-actions { margin-top: auto; }
.tp-suite-line { margin: 24px 0 0; font-size: 16px; }
.tp-fineprint { margin: 8px 0 0; font-size: 14px; color: var(--tp-muted); max-width: 70ch; }
.tp-fineprint strong { color: var(--tp-ink); }

/* ---------- Tables ---------- */
.tp-table-wrap { border: var(--tp-hair); background: #FFFEFA; }
.tp-pricing, .tp-compare table { width: 100%; border-collapse: collapse; font-size: 15px; }
.tp-pricing th, .tp-pricing td, .tp-compare th, .tp-compare td { padding: 16px; text-align: left; vertical-align: top; border-bottom: var(--tp-hair-soft); }
.tp-pricing thead th, .tp-compare thead th { font-family: var(--tp-mono); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; border-bottom: var(--tp-hair); background: var(--wp--preset--color--paper-2); }
.tp-pricing tbody th a { font-family: var(--tp-display); font-size: 24px; font-weight: 500; color: var(--tp-ink); text-decoration: none; }
.tp-pricing tbody th a:hover { text-decoration: underline; }
.tp-cell-kind { display: block; margin: 4px 0 8px; color: var(--tp-muted); }
.tp-amt { display: block; font-family: var(--tp-mono); font-size: 22px; font-weight: 600; }
.tp-per { display: block; color: var(--tp-muted); }
.tp-pricing td .tp-textlink { display: inline-block; margin-top: 8px; }
.tp-pricing td:last-child { width: 180px; }
.tp-row-suite { background: var(--wp--preset--color--paper-2); }
.tp-notes { list-style: none; margin: 24px 0 0; padding: 0; font-size: 15px; }
.tp-notes li { padding: 10px 0; border-top: var(--tp-hair-soft); }
@media (max-width: 781px) {
	.tp-pricing thead { display: none; }
	.tp-pricing, .tp-pricing tbody, .tp-pricing tr, .tp-pricing th, .tp-pricing td { display: block; width: auto !important; }
	.tp-pricing tr { padding: 8px 0 16px; border-bottom: var(--tp-hair); }
	.tp-pricing tr:last-child { border-bottom: 0; }
	.tp-pricing th, .tp-pricing td { border: 0; padding: 6px 16px; }
	.tp-pricing td[data-label]:not([data-label=""]) { display: grid; grid-template-columns: 76px 1fr; column-gap: 12px; align-items: baseline; border-top: 1px dotted var(--tp-rule); padding-block: 10px; }
	.tp-pricing td[data-label]:not([data-label=""])::before { content: attr(data-label); grid-row: span 4; font-family: var(--tp-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--tp-muted); }
	.tp-pricing td[data-label] > * { grid-column: 2; justify-self: start; }
	.tp-pricing td .tp-amt { font-size: 18px; }
	.tp-pricing td .tp-tag { margin: 4px 0 0; }
	.tp-pricing td[data-label=""] { padding-top: 12px; }
}

.tp-compare { border: var(--tp-hair); background: #FFFEFA; }
.tp-compare tbody th { font-family: var(--tp-mono); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; width: 24%; }
.tp-compare td:nth-child(2) { background: rgba(26, 102, 184, .06); }
@media (max-width: 781px) {
	.tp-compare table, .tp-compare thead, .tp-compare tbody, .tp-compare tr, .tp-compare th, .tp-compare td { display: block; width: auto !important; }
	.tp-compare thead { display: none; }
	.tp-compare tr { border-bottom: var(--tp-hair); padding: 12px 16px; }
	.tp-compare th, .tp-compare td { border: 0; padding: 4px 0; }
	.tp-compare td::before { display: block; font-family: var(--tp-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--tp-muted); }
	.tp-compare td:nth-child(2)::before { content: "Tillpress"; color: var(--tp-accent); }
	.tp-compare td:nth-child(3)::before { content: "Typical managed SaaS"; }
	.tp-compare td:nth-child(2) { background: none; }
}

/* ---------- FAQ ---------- */
.tp-faq .wp-block-details { margin: 0; }
.tp-faq .wp-block-details:last-child { border-bottom: 1px solid var(--tp-rule); }
.tp-faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; font-family: var(--tp-display); font-size: 22px; line-height: 1.3; }
.tp-faq summary::-webkit-details-marker { display: none; }
.tp-faq summary::after { content: "+"; font-family: var(--tp-mono); font-size: 20px; transition: transform .2s var(--tp-ease); }
.tp-faq details[open] summary::after { transform: rotate(45deg); }
.tp-faq details > :not(summary) { max-width: 68ch; color: var(--wp--preset--color--ink-2); }

/* ---------- Spec list (requirements, setup) ---------- */
.tp-spec { list-style: none; margin: 0; padding: 0; font-family: var(--tp-mono); font-size: 14px; border-top: var(--tp-hair); }
.tp-spec li { display: flex; align-items: baseline; gap: 8px; padding: 10px 0; border-bottom: var(--tp-hair-soft); }
.tp-spec li > span:first-child { text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.tp-spec li > span:last-child { text-align: right; }
.tp-spec li::after { content: none; }
.tp-spec .tp-line__dots { flex: 1; }
@media (max-width: 600px) {
	.tp-spec li { flex-wrap: wrap; }
	.tp-spec .tp-line__dots { display: none; }
	.tp-spec li > span:last-child { flex-basis: 100%; text-align: left; color: var(--wp--preset--color--ink-2); }
}

/* Lite vs Pro on a product page */
.tp-lvp { border: var(--tp-hair); background: #FFFEFA; }
.tp-lvp table { width: 100%; border-collapse: collapse; font-size: 15px; }
.tp-lvp th, .tp-lvp td { padding: 12px 16px; border-bottom: var(--tp-hair-soft); text-align: left; }
.tp-lvp thead th { font-family: var(--tp-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; background: var(--wp--preset--color--paper-2); border-bottom: var(--tp-hair); }
.tp-lvp td:nth-child(n+2), .tp-lvp th:nth-child(n+2) { text-align: center; width: 18%; font-family: var(--tp-mono); }

/* Outcomes */
.tp-outcomes { display: grid; gap: 0; grid-template-columns: 1fr; margin: 0; padding: 0; list-style: none; border-block: var(--tp-hair); }
.tp-outcomes li { padding: 20px 0; border-bottom: var(--tp-hair-soft); }
.tp-outcomes li:last-child { border-bottom: 0; }
.tp-outcomes b { display: block; font-family: var(--tp-display); font-size: 24px; font-weight: 500; line-height: 1.2; margin-bottom: 6px; }
@media (min-width: 782px) {
	.tp-outcomes { grid-template-columns: repeat(3, 1fr); }
	.tp-outcomes li { padding: 24px 24px 24px 0; border-bottom: 0; border-right: var(--tp-hair-soft); }
	.tp-outcomes li + li { padding-left: 24px; }
	.tp-outcomes li:last-child { border-right: 0; }
}

/* Compliance callout */
.tp-checks { list-style: none; margin: 0; padding: 0; }
.tp-checks li { position: relative; padding: 12px 0 12px 32px; border-bottom: var(--tp-hair-soft); }
.tp-checks li::before { content: "✓"; position: absolute; left: 0; top: 11px; font-family: var(--tp-mono); font-weight: 600; color: var(--tp-accent); }
.tp-ink .tp-checks li { border-color: #3a3934; }
.tp-ink .tp-checks li::before { color: var(--wp--preset--color--accent-on-ink); }

/* Proof line from WordPress.org */
.tp-proofline { display: inline-block; padding: 6px 10px; border: 1px dashed var(--tp-ink); color: var(--tp-ink) !important; text-decoration: none; }
.tp-proofline:hover { border-style: solid; }

/* Merchant quotes slot: stays hidden until a real quote is added and the group gets .has-quotes */
.tp-quotes:not(.has-quotes) { display: none !important; }

/* ---------- Footer ---------- */
.tp-footer.tp-ink a { color: var(--tp-paper); text-decoration: none; }
.tp-footer a:hover { text-decoration: underline; }
.tp-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.tp-footer h2 { font-family: var(--tp-mono); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 14px; color: #B9B5A8; }
.tp-footer .tp-operator { font-family: var(--tp-mono); font-size: 12px; letter-spacing: .04em; color: #B9B5A8; }

/* ---------- Motion ---------- */
.tp-js .reveal:not(.is-in) { opacity: 0; transform: translateY(12px); }
.tp-js .reveal { transition: opacity .35s var(--tp-ease), transform .35s var(--tp-ease); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Utility */
.screen-reader-text { border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important; }
.skip-link:focus { clip: auto; clip-path: none; height: auto; width: auto; z-index: 100; padding: 12px 16px; background: var(--tp-paper); color: var(--tp-ink); border: var(--tp-hair); }

@media (max-width: 781px) {
	.tp-lvp th, .tp-lvp td { padding: 10px 12px; }
	.tp-lvp td:nth-child(n+2), .tp-lvp th:nth-child(n+2) { width: 64px; font-size: 13px; }
}
.tp-nowrap { white-space: nowrap; }
.tp-pricing td .tp-textlink { display: block; width: max-content; }
@media (max-width: 781px) {
	.tp-pricing td[data-label=""] .tp-actions { flex-direction: row; }
	.tp-pricing td[data-label=""] .tp-btn { flex: 1 1 0; width: auto; }
}

/* =================== WooCommerce =================== */
/* Shared form controls (classic + blocks) */
.woocommerce form .input-text, .woocommerce form select, .woocommerce-page input[type=text], .woocommerce-page input[type=email], .woocommerce-page input[type=password], .woocommerce-page input[type=tel], .woocommerce-page textarea,
.wc-block-components-text-input input, .wc-block-components-textarea, .wc-blocks-components-select__select, .wc-block-components-combobox .components-combobox-control__input {
	border: 1px solid var(--tp-ink) !important; border-radius: 2px !important; background: #FFFEFA !important; color: var(--tp-ink) !important; font: inherit; box-shadow: none !important;
}
.wc-block-components-text-input input:focus, .woocommerce form .input-text:focus { outline: 2px solid var(--tp-accent) !important; outline-offset: 1px; }
.wc-block-components-text-input label, .wc-blocks-components-select__label { color: var(--tp-muted) !important; }
.woocommerce form .form-row label, .woocommerce-form label { font-family: var(--tp-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }

/* Buttons from WooCommerce */
.woocommerce .button, .woocommerce button.button, .woocommerce a.button, .wc-block-components-button:not(.is-link), .wp-block-woocommerce-proceed-to-checkout-block a, .wc-block-components-checkout-place-order-button, .woocommerce-Button {
	background: var(--tp-accent) !important; color: #fff !important; border: 1px solid var(--tp-accent) !important; border-radius: 2px !important; font-weight: 600 !important; min-height: 48px; padding: 12px 22px !important; box-shadow: none !important; text-decoration: none !important;
}
.woocommerce .button:hover, .wc-block-components-button:not(.is-link):hover, .wc-block-components-checkout-place-order-button:hover { background: var(--tp-ink) !important; border-color: var(--tp-ink) !important; }

/* Panels: hairline, no shadow, no radius */
.wc-block-components-totals-wrapper, .wc-block-cart__sidebar, .wp-block-woocommerce-checkout-order-summary-block, .wc-block-components-sidebar .wc-block-components-panel,
.woocommerce-MyAccount-navigation, .woocommerce-MyAccount-content, .woocommerce form.login, .woocommerce form.register, .woocommerce-order, .woocommerce table.shop_table {
	border-radius: 0 !important; box-shadow: none !important;
}
.wp-block-woocommerce-checkout-order-summary-block, .wc-block-cart__sidebar .wp-block-woocommerce-cart-order-summary-block { border: var(--tp-hair) !important; background: #FFFEFA; padding: 8px 16px !important; }
.wc-block-components-totals-item__label, .wc-block-components-order-summary-item__description, .wc-block-components-product-metadata { font-size: 15px; }
.wc-block-components-totals-item__value, .wc-block-components-product-price, .wc-block-components-formatted-money-amount, .woocommerce-Price-amount { font-family: var(--tp-mono); font-weight: 600; }
.wc-block-components-totals-footer-item { border-top: 3px double var(--tp-ink) !important; padding-top: 12px !important; text-transform: uppercase; }
.wc-block-components-title, .wc-block-components-checkout-step__title, .wc-block-cart__totals-title { font-family: var(--tp-mono) !important; font-size: 12px !important; letter-spacing: .08em !important; text-transform: uppercase !important; font-weight: 600 !important; }
.wc-block-components-checkout-step { border: 0 !important; }
.wc-block-components-checkout-step__container::after { display: none !important; }
.wc-block-cart-items, .wc-block-cart-items th, .wc-block-cart-items td { border-color: var(--tp-rule) !important; }
.wc-block-cart-items__header { font-family: var(--tp-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.wc-block-components-product-name { font-family: var(--tp-display); font-size: 22px !important; color: var(--tp-ink) !important; text-decoration: none !important; }
.wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox] { border-radius: 2px !important; border-color: var(--tp-ink) !important; }
.wc-block-components-radio-control__option, .wc-block-components-radio-control-accordion-option { border-radius: 0 !important; }
.wc-block-components-notice-banner { border-radius: 0 !important; border: var(--tp-hair) !important; }
.wp-block-woocommerce-empty-cart-block .wp-block-heading { font-family: var(--tp-display); }
.wc-block-mini-cart__drawer .components-modal__content { background: var(--tp-paper); }
.wc-block-mini-cart__badge { background: var(--tp-accent) !important; color: #fff !important; }

/* Single product */
.tp-product .woocommerce-product-gallery { margin: 0; }
.tp-product .woocommerce-product-gallery__image img { border: var(--tp-hair); background: #fff; }
.tp-product__buy { position: relative; }
.tp-product__buy .wp-block-post-title { margin-top: 0; }
.tp-product__price, .tp-product__price .woocommerce-Price-amount { font-family: var(--tp-mono); font-size: 32px !important; font-weight: 600; }
.tp-product__price del { color: var(--tp-muted); font-size: .6em; }
.tp-product__price ins { text-decoration: none; }
.tp-product__per { margin: 0; font-family: var(--tp-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--tp-muted); }
.tp-product__details .wc-tabs { border-bottom: var(--tp-hair) !important; padding: 0 !important; }
.tp-product__details .wc-tabs li { border: 0 !important; background: none !important; border-radius: 0 !important; }
.tp-product__details .wc-tabs li a { font-family: var(--tp-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--tp-ink) !important; }
.tp-product__details .wc-tabs li.active a { text-decoration: underline; text-underline-offset: 6px; }
.woocommerce-breadcrumb, .wc-block-breadcrumbs { font-family: var(--tp-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--tp-muted); }
.wc-block-components-product-sale-badge, .onsale { display: none !important; }

/* Shop grid */
.tp-shop .wc-block-product-template { gap: 0 !important; border-top: var(--tp-hair); border-left: var(--tp-hair); }
.tp-shop .wc-block-product { padding: 20px; border-right: var(--tp-hair); border-bottom: var(--tp-hair); background: #FFFEFA; }
.tp-shop .wc-block-components-product-image img { border: 1px solid var(--tp-rule); }
.tp-shop h3 a { color: var(--tp-ink); text-decoration: none; font-size: 24px; }

/* My account (classic shortcode) */
.woocommerce-account .woocommerce { display: grid; gap: 32px; }
@media (min-width: 900px) { .woocommerce-account.logged-in .woocommerce { grid-template-columns: 220px 1fr; } }
.woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 0; border-top: var(--tp-hair); }
.woocommerce-MyAccount-navigation li a { display: block; padding: 12px 0; border-bottom: var(--tp-hair-soft); font-family: var(--tp-mono); font-size: 13px; letter-spacing: .05em; text-transform: uppercase; text-decoration: none; color: var(--tp-ink); }
.woocommerce-MyAccount-navigation li.is-active a { color: var(--tp-accent); font-weight: 600; }
.woocommerce-MyAccount-navigation li.is-active a::before { content: "→ "; }
.woocommerce form.login, .woocommerce form.register { border: var(--tp-hair) !important; background: #FFFEFA; padding: 24px !important; margin: 0 !important; max-width: 520px; }
.woocommerce-MyAccount-content h2, .woocommerce-account main .woocommerce > h2 { font-size: var(--wp--preset--font-size--h-3); }
.woocommerce table.shop_table { border: var(--tp-hair) !important; border-collapse: collapse !important; background: #FFFEFA; }
.woocommerce table.shop_table th { font-family: var(--tp-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; background: var(--wp--preset--color--paper-2); }
.woocommerce table.shop_table td, .woocommerce table.shop_table th { border-color: var(--tp-rule) !important; padding: 12px 16px !important; }
.woocommerce-info, .woocommerce-message, .woocommerce-error { border: var(--tp-hair) !important; border-radius: 0 !important; background: #FFFEFA !important; color: var(--tp-ink) !important; }
.woocommerce-info::before, .woocommerce-message::before { color: var(--tp-accent) !important; }

/* Woo page fixes (phase 2 review) */
.tp-woo-page > .wp-block-post-title { max-width: 1200px !important; margin-left: auto !important; margin-right: auto !important; width: 100%; }
.woocommerce-account main .woocommerce { max-width: 1200px !important; width: 100%; margin-left: auto !important; margin-right: auto !important; align-items: start; }
.woocommerce-account main .woocommerce > * { max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; }
.woocommerce-account main .woocommerce > .woocommerce-notices-wrapper { grid-column: 1 / -1; }
.woocommerce-account main .woocommerce > .woocommerce-notices-wrapper:empty { display: none; }
@media (min-width: 900px) { .woocommerce-account:not(.logged-in) main .woocommerce { grid-template-columns: minmax(0, 480px); } }
.woocommerce-message .button, .woocommerce-info .button, .woocommerce-error .button { background: none !important; border: 0 !important; box-shadow: none !important; outline: 0; padding: 0 !important; color: var(--tp-accent) !important; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.woocommerce-order h2, .woocommerce-order .woocommerce-thankyou-order-received, .wc-block-order-confirmation-status h1, .wc-block-order-confirmation-status p:first-child { font-family: var(--tp-display); font-weight: 500; }
.woocommerce-account main .woocommerce::before, .woocommerce-account main .woocommerce::after { display: none !important; content: none !important; }
.woocommerce-account main .woocommerce-MyAccount-navigation, .woocommerce-account main .woocommerce-MyAccount-content { float: none !important; width: auto !important; }
.wc-block-order-confirmation-status + p, main h1 + p:has(+ .woocommerce-order-overview), .woocommerce-thankyou-order-received { font-family: var(--tp-display); font-size: var(--wp--preset--font-size--lead); }
.wc-block-components-notice-banner { border-radius: 0 !important; border: var(--tp-hair) !important; background: #FFFEFA !important; }
.wc-block-components-notice-banner .wc-forward, .wc-block-components-notice-banner .button, .wc-block-components-notice-banner a.button { background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; color: var(--tp-accent) !important; font-weight: 600; text-decoration: underline !important; text-underline-offset: 3px; opacity: 1 !important; }
.woocommerce table.shop_table tbody th { background: transparent; }
@media (max-width: 768px) { .woocommerce table.shop_table_responsive tbody th, .woocommerce-page table.shop_table_responsive tbody th { display: block; font-family: var(--tp-mono); padding: 12px; border-bottom: var(--tp-hair-soft); } }

/* ---------- Waitlist form (Checkout Sentinel); markup kept for the live waitlist script ---------- */
.tp-wl { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tp-wl input[type=email] { flex: 1 1 240px; min-height: 48px; padding: 12px 14px; border: 1px solid var(--wp--preset--color--paper); background: transparent; color: var(--wp--preset--color--paper); font: inherit; border-radius: 0; }
.tp-wl input[type=email]::placeholder { color: rgba(247,245,238,.6); }
.tp-wl .tp-btn { min-height: 48px; }
.tp-wl .tp-wl-msg { flex-basis: 100%; margin: 4px 0 0; font-size: 14px; }
.tp-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.tp-receipt--soon .tp-spec { margin: 0; }
@media (min-width: 900px) {
	.tp-card--flag .tp-frame { flex: 1 1 auto; min-height: 280px; display: flex; overflow: hidden; }
	.tp-card--flag .tp-frame img { width: 100%; height: 100%; object-fit: cover; object-position: right center; }
}

/* An old Code Snippet prints its own blog pager at the top of the page; the theme has its own. */
nav.tp-blog-pager { display: none !important; }
.wp-block-query-pagination { margin-top: 32px; gap: 12px; font-family: var(--tp-mono); font-size: 14px; }

/* Old-content tables: scroll inside their own box on phones, and keep
   screen-reader-only text inside the table so it cannot widen the page. */
.tp-legacy table{position:relative}
@media (max-width:800px){
  .tp-legacy table{display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
}

/* Old changelog markup: white month headings and orange labels written for the old dark theme. */
.tp-legacy article[style*="#ff8c00"] [style*="color: #ffffff"]{color:var(--wp--preset--color--ink,#111)!important}
.tp-legacy article[style*="#ff8c00"] [style*="color: #ff8c00"]{color:var(--wp--preset--color--muted,#4a4a4a)!important}
.tp-legacy article[style*="border-left: 3px solid #ff8c00"]{border-left-color:var(--wp--preset--color--ink,#111)!important}

/* Old content that brings its own H1: drop the stacked top spacing. */
.tp-legacy__title:not(:has(h1,h2)) + .entry-content{margin-block-start:0}
.tp-legacy .entry-content > .tp-wrap:first-child,.tp-legacy .entry-content > .tp:first-child > .tp-prose:first-child,.tp-legacy .entry-content > .tp:first-child > .tp-wrap:first-child{padding-top:24px}
.tp-legacy .entry-content h1:first-child{margin-top:0}
.tp-ink .tp-fig__cap { color: #B9B5A8; }

/* Old theme footer printed by a snippet: never show it under this theme. */
footer.tp-site-footer{display:none!important}

/* Phone menu: left-aligned list, plugin links as a plain indented group (no box). */
.tp-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.tp-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container,
.tp-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item{align-items:flex-start!important;text-align:left}
.tp-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container{border:0!important;border-left:var(--tp-hair)!important;padding:4px 0 4px 16px!important;min-width:0!important;margin-top:8px!important;gap:10px}
.tp-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container a{padding:2px 0!important;font-size:17px}
.tp-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container{gap:12px!important;font-size:20px!important}
.tp-header .wp-block-navigation__responsive-container.is-menu-open .tp-nav-cta a{padding:10px 18px!important;margin-top:8px}
/* The cookie-settings button sits above everything; hide it while the phone menu is open. */
html.has-modal-open #tp-consent-open{display:none!important}

/* WooCommerce auto-adds an account icon beside the cart; the menu already has "Account". */
.tp-header .wp-block-woocommerce-customer-account{display:none!important}

/* 0.1.5: shop grid on phones, product buy box, receipt card from old price snippet */
@media (max-width: 600px) {
	.tp-shop .wc-block-product-template, .tp-shop ul.wc-block-product-template { grid-template-columns: 1fr !important; }
	.tp-shop .wc-block-product-template > li { width: 100% !important; max-width: 100% !important; flex-basis: 100% !important; }
}
.tp-shop .wp-block-post-title { overflow-wrap: normal; word-break: normal; hyphens: manual; }
.tp-proof-strip { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 16px 0; }
.tp-proof-strip > span { display: inline-block; padding: 3px 8px; border: var(--tp-hair-soft); border-radius: 2px; font-family: var(--tp-mono); font-size: 12px; letter-spacing: .02em; line-height: 1.5; color: var(--tp-ink); background: #FFFEFA; }
.tp-product__buy:has(.tp-stripe-buy) .wp-block-post-excerpt,
.tp-product__buy:has(.tp-stripe-buy) .tp-btn--pro { display: none !important; }
.tp-receipt-card { max-width: 560px; padding: 20px 22px; border: var(--tp-hair); background: #FFFEFA; font-size: 15px; }
.tp-receipt-card .rlabel { margin: 0 0 12px; font-family: var(--tp-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--tp-muted); }
.tp-receipt-card .tp-rline, .tp-receipt-card .tp-rtotal { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 8px 0; border-bottom: 1px dashed var(--tp-rule); }
.tp-receipt-card .tp-rline .val, .tp-receipt-card .tp-rtotal .amt { font-family: var(--tp-mono); text-align: right; white-space: nowrap; }
.tp-receipt-card .tp-rline .val del, .tp-receipt-card .tp-rtotal del { color: var(--tp-muted); margin-right: 4px; }
.tp-receipt-card .tp-rline.note .val { color: var(--tp-muted); }
.tp-receipt-card .tp-rtotal { border-top: 3px double var(--tp-ink); border-bottom: 0; margin-top: 4px; padding-top: 12px; }
.tp-receipt-card .tp-rtotal .lbl { font-family: var(--tp-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.tp-receipt-card .tp-rtotal .amt { font-weight: 600; }
.tp-receipt-card .tp-rtotal small { display: block; font-weight: 400; font-size: 12px; color: var(--tp-muted); }
.tp-receipt-card .tp-rfineprint { margin: 12px 0 0; font-size: 13px; color: var(--tp-muted); line-height: 1.5; }
.tp-product .woocommerce-product-gallery { position: relative; }
.tp-product .flex-viewport { border: 0; }
.tp-product .flex-control-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0 !important; padding: 0 !important; list-style: none; }
.tp-product .flex-control-thumbs li { width: 72px !important; margin: 0 !important; float: none !important; }
.tp-product .flex-control-thumbs img { display: block; width: 72px !important; height: 72px !important; object-fit: cover; border: var(--tp-hair-soft); opacity: .6; cursor: pointer; }
.tp-product .flex-control-thumbs img.flex-active, .tp-product .flex-control-thumbs img:hover { opacity: 1; border-color: var(--tp-ink); }

/* 0.1.8: posts and pages without old markup still get a reading width */
.tp-legacy > .entry-content > :not(.tp):not(.alignfull):not(.alignwide):not(style):not(script) { max-width: 720px; margin-left: auto; margin-right: auto; padding-left: 16px; padding-right: 16px; }
.tp-legacy > .entry-content > :is(ul, ol) { padding-left: 40px; }
.tp-product__details .wc-tab > :is(p, ul, ol) { max-width: 760px; }
