/* Ledgerline: art direction layer on the UPR foundation. CSS only. */
:root{
  --ldg-display: var(--wp--custom--font-display, system-ui, sans-serif);
  --ldg-editorial: var(--wp--custom--font-editorial, Georgia, serif);
  --ldg-ui: var(--wp--custom--font-ui, system-ui, sans-serif);
  --ldg-mono: var(--wp--custom--font-mono, ui-monospace, monospace);
  --ldg-stage: var(--wp--custom--stage, #EEF1F6);
  --ldg-r: var(--wp--custom--radius--base, 10px);
  --ldg-shadow: 0 1px 2px rgb(16 24 40 / .06), 0 40px 80px -40px rgb(16 24 40 / .45);
  --ldg-frame: 0 0 0 1px rgb(0 0 0 / .08), 0 24px 48px -24px rgb(16 24 40 / .35);
}
a { text-decoration-color: color-mix(in oklch, var(--upr-accent) 55%, transparent); text-underline-offset: .22em; transition: text-decoration-color .2s; }
a:hover { text-decoration-color: var(--upr-accent); }
h1, h2, h3 { line-height: 1.04; }
h1 { font-size: clamp(2.6rem, 1.8rem + 4vw, 5.4rem); }

/* Eyebrow, lede, chapter numbers */
.is-style-eyebrow { font-family: var(--ldg-mono); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--upr-ink-soft); }
.is-style-lede { font-size: var(--wp--preset--font-size--medium); color: var(--upr-ink-soft); max-width: 34rem; }
.is-style-chapter { font-family: var(--ldg-display); font-weight: 300; font-size: clamp(2.8rem, 1.8rem + 4vw, 5.2rem); line-height: 1; letter-spacing: -.04em; color: color-mix(in oklch, var(--upr-ink) 55%, var(--upr-surface)); margin-bottom: .4rem; }

/* Widths: Reading, Content, Wide, Stage, Full */
.wp-block-group.is-style-reading > * { max-width: var(--wp--custom--width--reading, 38rem); margin-inline: auto; }
.wp-block-group.is-style-stage { max-width: var(--wp--custom--width--stage, 92rem); margin-inline: auto; }

/* Presentation modes */
.wp-block-group.is-style-quiet { padding-block: var(--wp--preset--spacing--60); }
.wp-block-group.is-style-statement { padding-block: clamp(5rem, 14vw, 10rem); }
.wp-block-group.is-style-statement h2 { font-size: clamp(2.4rem, 1.6rem + 3.6vw, 4.6rem); }

/* Surfaces for screenshots on light or dark sites */
.wp-block-group.is-style-surface-light { background: #F6F7F9; --ldg-stage: #EEF1F6; color: #111318; border-radius: calc(var(--ldg-r) * 2); padding: var(--wp--preset--spacing--50); }
.wp-block-group.is-style-surface-neutral { background: var(--ldg-stage); border-radius: calc(var(--ldg-r) * 2); padding: var(--wp--preset--spacing--50); }
.wp-block-group.is-style-surface-dark { background: #121418; --ldg-stage: #1A1C21; color: #ECEDEF; border-radius: calc(var(--ldg-r) * 2); padding: var(--wp--preset--spacing--50); }

/* ---------- Screenshot system: all on the core image block ---------- */
.wp-block-image[class*="is-style-screen-"] { margin-block: var(--wp--preset--spacing--50); }
.wp-block-image[class*="is-style-screen-"] img { display: block; width: 100%; height: auto; }
.wp-block-image.is-style-screen-plain img { border: 1px solid var(--upr-line); border-radius: calc(var(--ldg-r) * .6); }
.wp-block-image.is-style-screen-app, .wp-block-image.is-style-screen-browser { border-radius: calc(var(--ldg-r) * 1.2); overflow: hidden; box-shadow: var(--ldg-frame); background: #EEF0F3; }
.wp-block-image.is-style-screen-app::before { content: ""; display: block; height: 26px; background: radial-gradient(circle at 14px 13px, #D0D4DA 4px, transparent 5px), radial-gradient(circle at 28px 13px, #D0D4DA 4px, transparent 5px), radial-gradient(circle at 42px 13px, #D0D4DA 4px, transparent 5px), #EEF0F3; border-bottom: 1px solid #E1E4E9; }
.wp-block-image.is-style-screen-browser::before { content: ""; display: block; height: 34px; background: linear-gradient(90deg, transparent 22%, #fff 22%, #fff 78%, transparent 78%) 0 9px / 100% 16px no-repeat, #EEF0F3; border-bottom: 1px solid #E1E4E9; }
.wp-block-image.is-style-screen-stage { background: var(--ldg-stage); padding: clamp(1.5rem, 6vw, 5rem); border-radius: calc(var(--ldg-r) * 2); }
.wp-block-image.is-style-screen-stage img { border-radius: var(--ldg-r); box-shadow: var(--ldg-shadow); }
.wp-block-image.is-style-screen-floating { perspective: 1600px; padding-block: 2rem; }
.wp-block-image.is-style-screen-floating img { transform: rotateX(8deg) rotateY(-10deg) rotateZ(1deg); border-radius: var(--ldg-r); box-shadow: -30px 50px 80px -40px rgb(16 24 40 / .45); }
.wp-block-image.is-style-screen-edge { overflow: hidden; padding: 3rem 0 0 3rem; background: var(--ldg-stage); border-radius: calc(var(--ldg-r) * 2); }
.wp-block-image.is-style-screen-edge img { width: 125%; max-width: none; border-top-left-radius: var(--ldg-r); box-shadow: -10px -10px 40px -20px rgb(16 24 40 / .3); }
.wp-block-image.is-style-screen-bleed { margin-inline: calc(50% - 50vw); width: 100vw; max-width: 100vw; }
.wp-block-image.is-style-screen-bleed img { border-radius: 0; }
.wp-block-image.is-style-figure img { border: 1px solid var(--upr-line); border-radius: 4px; }
.wp-block-image.is-style-figure figcaption { counter-increment: ldg-fig; font-size: var(--wp--preset--font-size--small); color: var(--upr-ink-soft); text-align: left; margin-top: .8rem; }
.wp-block-image.is-style-figure figcaption::before { content: "FIGURE " counter(ldg-fig); font-family: var(--ldg-mono); font-size: .72rem; letter-spacing: .06em; color: var(--upr-ink); margin-right: .6rem; }
.wp-block-post-content { counter-reset: ldg-fig; }
.wp-block-gallery.is-style-screens-layered { position: relative; display: block; padding: 1rem 12% 3rem 0; }
.wp-block-gallery.is-style-screens-layered .wp-block-image { width: 100% !important; margin: 0; }
.wp-block-gallery.is-style-screens-layered .wp-block-image img { border-radius: var(--ldg-r); box-shadow: var(--ldg-shadow); }
.wp-block-gallery.is-style-screens-layered .wp-block-image:nth-child(2) { position: absolute; width: 55% !important; right: 0; bottom: 0; }
.wp-block-gallery.is-style-screens-pair { gap: var(--wp--preset--spacing--40); }
.wp-block-gallery.is-style-screens-pair img { border-radius: var(--ldg-r); box-shadow: var(--ldg-frame); }
.wp-block-gallery.is-style-screens-stack { display: grid; }
.wp-block-gallery.is-style-screens-stack .wp-block-image { grid-area: 1 / 1; width: 100% !important; }
.wp-block-gallery.is-style-screens-stack .wp-block-image:nth-child(1) { transform: translate(-4%, -6%) scale(.92); opacity: .55; }
.wp-block-gallery.is-style-screens-stack .wp-block-image:nth-child(2) { transform: translate(-2%, -3%) scale(.96); opacity: .8; }
.wp-block-gallery.is-style-screens-stack img { border-radius: var(--ldg-r); box-shadow: var(--ldg-shadow); }
.wp-block-gallery.is-style-logo-cloud { align-items: center; gap: 1.2rem 3rem; padding-block: 2.5rem; border-block: 1px solid var(--upr-line); }
.wp-block-gallery.is-style-logo-cloud .wp-block-image { flex: 0 0 auto !important; width: auto !important; }
.wp-block-gallery.is-style-logo-cloud img { height: 28px !important; width: auto !important; object-fit: contain; filter: grayscale(1); opacity: .7; }

/* Motion: subtle and optional */
@media (prefers-reduced-motion: no-preference) {
	@supports (animation-timeline: view()) {
		.wp-block-image[class*="is-style-screen-"], .ldg-rise { animation: ldg-rise linear both; animation-timeline: view(); animation-range: entry 0% cover 25%; }
		@keyframes ldg-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
	}
}

/* ---------- Proof ---------- */
.wp-block-group.is-style-metric { border-top: 1px solid var(--upr-line); padding-block: clamp(3rem, 8vw, 6rem); }
.wp-block-group.is-style-metric > :first-child { font-family: var(--ldg-display); font-size: clamp(4rem, 12vw, 9rem); font-weight: var(--wp--custom--heading-weight, 600); letter-spacing: -.05em; line-height: .9; margin: 0; }
.wp-block-group.is-style-metric > :nth-child(2) { font-size: var(--wp--preset--font-size--medium); max-width: 22rem; }
.wp-block-quote.is-style-testimonial, .wp-block-quote.is-style-editorial { border: 0; padding: 0; font-family: var(--ldg-editorial); font-size: clamp(1.6rem, 1.3rem + 1.1vw, 2.3rem); line-height: 1.25; max-width: 40rem; }
.wp-block-quote.is-style-pull { border-left: 2px solid var(--upr-accent); padding-left: 1.4rem; font-family: var(--ldg-editorial); font-size: clamp(1.5rem, 1.2rem + 1vw, 2.1rem); line-height: 1.25; }
.wp-block-quote cite { display: block; margin-top: 1.2rem; font-family: var(--ldg-ui); font-style: normal; font-size: var(--wp--preset--font-size--small); color: var(--upr-ink-soft); }

/* Pricing, comparison, data */
.ldg-plans { border-top: 1px solid var(--upr-ink); }
.ldg-plans > .wp-block-column + .wp-block-column { border-left: 1px solid var(--upr-line); padding-left: var(--wp--preset--spacing--40); }
.ldg-price { font-family: var(--ldg-display); font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.6rem); letter-spacing: -.03em; line-height: 1; }
@media (max-width: 781px) { .ldg-plans > .wp-block-column + .wp-block-column { border-left: 0; padding-left: 0; border-top: 1px solid var(--upr-line); padding-top: var(--wp--preset--spacing--40); } }
.wp-block-table { font-size: var(--wp--preset--font-size--small); }
.wp-block-table table { border-collapse: collapse; }
.wp-block-table th, .wp-block-table td { border: 0; border-bottom: 1px solid var(--upr-line); padding: .8em 1em; text-align: left; }
.wp-block-table th { font-weight: 600; }
.wp-block-table.is-style-comparison td:nth-child(2), .wp-block-table.is-style-comparison th:nth-child(2) { background: color-mix(in oklch, var(--upr-accent) 7%, var(--upr-surface)); }
.wp-block-table.is-style-pricing thead th { font-family: var(--ldg-display); font-size: var(--wp--preset--font-size--medium); }
.wp-block-table.is-style-data td { font-family: var(--ldg-mono); font-variant-numeric: tabular-nums; }
.ldg-one { font-family: var(--ldg-editorial); font-size: clamp(1.6rem, 1.3rem + 1.1vw, 2.3rem); line-height: 1.3; max-width: 40rem; }

/* Lists, buttons, code, callouts */
.wp-block-list.is-style-checklist { list-style: none; padding: 0; }
.wp-block-list.is-style-checklist li { padding-left: 1.6em; position: relative; margin-bottom: .4em; }
.wp-block-list.is-style-checklist li::before { content: ""; position: absolute; left: 0; top: .45em; width: .9em; height: .5em; border-left: 2px solid var(--upr-accent); border-bottom: 2px solid var(--upr-accent); transform: rotate(-45deg); }
.wp-block-button.is-style-quiet .wp-block-button__link { background: transparent; color: var(--upr-ink); box-shadow: inset 0 0 0 1px var(--upr-line); }
.wp-block-button.is-style-text .wp-block-button__link { background: transparent; color: var(--upr-ink); padding-inline: 0; text-decoration: underline; text-decoration-color: var(--upr-accent); text-underline-offset: .25em; }
.wp-block-code.is-style-terminal { background: #0E1116; color: #E6EDF3; border-radius: var(--ldg-r); padding: 1.2rem 1.4rem; font-family: var(--ldg-mono); font-size: .88rem; border: 0; }
.wp-block-code.is-style-terminal::before { content: "$"; color: #7EE787; margin-right: .6rem; }
[class*="is-style-callout-"] { border-left: 3px solid; padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40); border-radius: 0 var(--ldg-r) var(--ldg-r) 0; font-size: var(--wp--preset--font-size--small); }
.is-style-callout-note { border-color: var(--upr-accent); background: color-mix(in oklch, var(--upr-accent) 7%, var(--upr-surface)); }
.is-style-callout-tip { border-color: #067647; background: color-mix(in oklch, #067647 8%, var(--upr-surface)); }
.is-style-callout-warning { border-color: #B54708; background: color-mix(in oklch, #B54708 9%, var(--upr-surface)); }
[class*="is-style-callout-"] > :first-child { font-weight: 600; margin-top: 0; }
.wp-block-group.is-style-concept { border-top: 2px solid var(--upr-ink); padding-top: var(--wp--preset--spacing--30); }
.wp-block-group.is-style-concept > :first-child { font-family: var(--ldg-mono); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--upr-ink-soft); }
.wp-block-group.is-style-product-context { border-top: 1px solid var(--upr-line); padding-top: var(--wp--preset--spacing--40); font-size: var(--wp--preset--font-size--small); color: var(--upr-ink-soft); }
.wp-block-separator.is-style-product { border: 0; border-top: 1px solid var(--upr-line); width: 100%; max-width: none; opacity: 1; }
.wp-block-separator.is-style-editorial { border: 0; width: 4rem; border-top: 2px solid var(--upr-ink); opacity: 1; margin-inline: 0; }

/* ---------- Journal: an independent publication ---------- */
.ldg-journal-header .wp-block-site-title::after { content: " Journal"; font-family: var(--ldg-editorial); font-style: italic; font-weight: 400; color: var(--upr-ink-soft); }
.ldg-journal .wp-block-post-content p, .ldg-journal .wp-block-post-content li { font-family: var(--ldg-editorial); font-size: clamp(1.12rem, 1.05rem + .3vw, 1.28rem); line-height: 1.65; hyphens: auto; }
.ldg-cover { background: color-mix(in oklch, var(--upr-accent) 8%, var(--upr-surface)); border-radius: calc(var(--ldg-r) * 1.5); padding: clamp(2rem, 7vw, 6rem) clamp(1.5rem, 6vw, 5rem) !important; min-height: 22rem; display: flex; flex-direction: column; justify-content: flex-end; }
.ldg-cover .wp-block-post-title { font-family: var(--ldg-editorial); font-weight: 400; font-size: clamp(2.4rem, 1.6rem + 4vw, 5rem); letter-spacing: -.02em; line-height: 1.02; max-width: 16ch; }
.ldg-journal-list .wp-block-post-title { font-family: var(--ldg-editorial); font-weight: 400; }
.ldg-journal-list .wp-block-post-title a, .ldg-cover .wp-block-post-title a { color: var(--upr-ink); text-decoration: none; }

/* ---------- Docs ---------- */
.ldg-docs-layout { gap: var(--wp--preset--spacing--60) !important; }
.ldg-docs-nav { font-size: var(--wp--preset--font-size--small); position: sticky; top: var(--wp--preset--spacing--40); align-self: start; }
.ldg-docs-nav .wp-block-post-title { font-family: var(--ldg-ui); font-size: var(--wp--preset--font-size--small); font-weight: 500; margin: 0; }
.ldg-docs-nav .wp-block-post-title a { color: var(--upr-ink-soft); text-decoration: none; display: block; padding: .35rem 0; }
.ldg-docs-nav .wp-block-post-title a:hover { color: var(--upr-accent-ink); }
@media (max-width: 781px) { .ldg-docs-nav { position: static; border-bottom: 1px solid var(--upr-line); padding-bottom: var(--wp--preset--spacing--30); } }

/* Changelog */
.ldg-release { border-top: 1px solid var(--upr-line); padding-block: var(--wp--preset--spacing--50); }
.ldg-release > :first-child { font-family: var(--ldg-mono); font-size: .8rem; color: var(--upr-ink-soft); }
.ldg-tag { display: inline-block; font-family: var(--ldg-mono); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; padding: .15em .6em; border-radius: 999px; background: color-mix(in oklch, var(--upr-accent) 12%, var(--upr-surface)); color: var(--upr-accent-ink); }

/* Chrome */
.ldg-header, .ldg-journal-header { border-bottom: 1px solid var(--upr-line); }
.ldg-footer { border-top: 1px solid var(--upr-line); font-size: var(--wp--preset--font-size--small); color: var(--upr-ink-soft); }
.ldg-footer a { color: inherit; }
.ldg-author-card { border-top: 1px solid var(--upr-line); }
@media print { .ldg-header, .ldg-journal-header, .ldg-footer, .ldg-docs-nav { display: none !important; } }
