/*
 * ArtisanPack UI — front-end + canvas stylesheet
 *
 * Printed after the global styles on the front end and concatenated into
 * `/api/v1/global-styles/css` for the editor canvas.
 *
 * The design lives in theme.json: tokens, presets, elements, per-block
 * styles, and the block style variations in `styles/*.json`. This file holds
 * only what the editor can't express natively. Each rule below is logged as
 * an editor shortcoming in the rebuild report before it lands here:
 *
 *   1. Document basics (border-box sizing, body margin, screen-reader
 *      text), as the design's base layer sets them, plus the design's
 *      `text-wrap` on headings, quotes and leads (theme.json has no text-wrap).
 *   2. Button hover lift and brightness (element `:hover` can't set
 *      transform or filter), plus the Hollow and White variations' hover
 *      fills (variations have no pseudo-states).
 *   3. The Eyebrow variation's gradient tick (a pseudo-element), and the
 *      Tile variation's shrink-to-fit (the Icon block has no width control).
 *   4. `.ap-gradient-text` for a gradient on one word inside rich text.
 *   5. Internals of the plugin's Terminal and Copy Command blocks.
 *   6. The Night variation's pinned dark palette (a variation can't
 *      redefine preset custom properties).
 *   7. Forms block fields (the block's daisyUI controls don't read
 *      theme.json), plus the Signup variation's hidden label.
 *   8. Pricing: the Checks list marker, the Pill tabs and the Compare
 *      table's featured column.
 *   9. The Scroll strip variation's scroll-snap (no block exposes
 *      `scroll-snap-*`).
 *  10. The FAQ variation's accordion toggle chip, click-target padding
 *      and open-panel border (the renderer draws these itself), and the
 *      FAQ Search block's field.
 *  14. Header and footer: the header's backdrop blur, the active
 *      navigation link, the skip link and the social tiles' hover.
 *  15. Code: the inline code chip (theme.json has no `code` element), plus
 *      the Code block's scrolling line (no control sets white-space).
 *  16. Screenshots: the Lightbox and Carousel variations. The renderer's
 *      lightbox opens one image at a time and there is no carousel block, so
 *      assets/js/screenshots.js builds the dialog (taking over any image that
 *      has "Enlarge on click") and the arrows, and the Carousel lays Tabs out in
 *      two columns (Tabs renders one flow, with no slot for the side heading).
 *
 * Font Awesome is enqueued from Theme.php. Editor-only overrides live in
 * editor.css.
 */

/* ─── 1. Document ────────────────────────────────────────────────────── */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

:where(h1, h2, h3).wp-block-heading,
.wp-block-quote > p {
    text-wrap: balance;
}

.is-style-lead {
    text-wrap: pretty;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.screen-reader-text:focus,
.screen-reader-text:focus-within {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    clip: auto;
    clip-path: none;
    white-space: normal;
}

/* ─── 2. Buttons ─────────────────────────────────────────────────────── */

.wp-block-button__link,
.wp-element-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    text-decoration: none;
    white-space: nowrap;
    transition:
        transform var(--wp--custom--motion--dur-fast) var(--wp--custom--motion--ease),
        box-shadow var(--wp--custom--motion--dur) var(--wp--custom--motion--ease),
        background-color var(--wp--custom--motion--dur) var(--wp--custom--motion--ease),
        filter var(--wp--custom--motion--dur) var(--wp--custom--motion--ease);
}

.wp-block-button__link:hover,
.wp-element-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.wp-block-button__link:active,
.wp-element-button:active {
    transform: translateY(0) scale(0.98);
}

/* Skipped when the button has its own text colour (e.g. the ink hollow
   button on HeroImage's light neon ground), where a dark fill would hide it. */
.wp-block-button.is-style-hollow .wp-block-button__link:not(.has-text-color):hover {
    filter: none;
    background-color: var(--wp--preset--color--surface-2);
    box-shadow: inset 0 0 0 1.5px var(--wp--preset--color--border-strong);
}

.wp-block-button.is-style-white .wp-block-button__link:hover {
    filter: none;
    background-color: var(--wp--preset--color--neutral-0);
}

/* ─── 3. Eyebrow tick ────────────────────────────────────────────────── */

.is-style-eyebrow {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.is-style-eyebrow::before {
    content: "";
    flex: none;
    width: 24px;
    height: 2px;
    border-radius: 2px;
    background: var(--wp--preset--gradient--brand);
}

.is-style-eyebrow.has-text-align-center {
    justify-content: center;
}

.is-style-eyebrow.has-text-align-center::before {
    display: none;
}

/* ─── 3b. Icon tile ──────────────────────────────────────────────────── */

.wp-block-artisanpack-icon.is-style-tile {
    display: flex;
    width: fit-content;
}

/* A linked tile: the link is a block-level line box (the body's line
 * height), which made the tile taller than wide. */
.wp-block-artisanpack-icon.is-style-tile > a {
    display: flex;
}

/* ─── 4. Gradient on one word ────────────────────────────────────────── */

.ap-gradient-text {
    background: var(--wp--preset--gradient--neon);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

/* ─── 5. Plugin blocks: Terminal and Copy Command ────────────────────── */

/* .ap-clipboard — mono chip with click-to-copy button (design
   CopyToClipboard: 14px Space Mono, 10/12/10/16 padding, 12px gap). */
.ap-clipboard {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 100%;
    padding: 0.625rem 0.75rem 0.625rem 1rem;
    font-family: var(--wp--preset--font-family--mono);
    font-size: 0.875rem;
    line-height: 1.4;
}
/* Box defaults sit at zero specificity so the Copy Command block's color,
   border and shadow picks win. On the front end the block class and
   `.ap-clipboard` are one element; in the editor canvas the block class is
   the editor's wrapper, so it takes the box and the preview inside it is
   reset. Hand-written `.ap-clipboard` markup gets the same defaults: the
   design's default "surface" chip; heroes pick `ink` per instance. */
:where(.wp-block-artisanpack-copy-command, .ap-clipboard) {
    border-radius: 5px;
    background: var(--wp--preset--color--surface);
    border: 1px solid var(--wp--preset--color--border);
    color: var(--wp--preset--color--text);
}
:where(.wp-block-artisanpack-copy-command) {
    width: fit-content;
    max-width: 100%;
}
/* Block-level on the block itself, so a constrained parent's auto side
   margins can centre it (inline boxes ignore them). `!important` because
   the constrained layout's content-size cap (three classes, printed after
   this file) would otherwise keep max-width at the content size, so on
   narrow screens the chip overflowed the page instead of ellipsizing. */
.wp-block-artisanpack-copy-command.ap-clipboard {
    display: flex;
    max-width: 100% !important;
}
.wp-block-artisanpack-copy-command > div {
    border-radius: inherit;
}
.wp-block-artisanpack-copy-command .ap-clipboard {
    background: transparent;
    border: 0;
    border-radius: inherit;
    box-shadow: none;
    color: inherit;
}
/* Two-class selectors so these beat the editor canvas baseline
   (`.editor-styles-wrapper code` / `pre`), which paints #f3f4f6. */
.ap-clipboard .ap-clipboard__value {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}
/* The prompt sits 12px from the command, like the design's flex gap; the
   space character after it already covers 1ch of that. */
.ap-clipboard .ap-clipboard__prompt {
    margin-right: calc(0.75rem - 1ch);
    color: var(--wp--preset--color--secondary);
}
.ap-clipboard .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.ap-clipboard__button {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-left: 0.25rem;
    padding: 0.375rem 0.625rem;
    border: 0;
    border-radius: 3px;
    background: var(--wp--preset--gradient--brand-button);
    color: var(--wp--preset--color--on-gradient);
    font-family: var(--wp--preset--font-family--sans);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 120ms ease;
}
.ap-clipboard__button:hover {
    box-shadow: var(--wp--preset--shadow--glow-primary);
    transform: translateY(-1px);
}
/* The design's button is text only. */
.ap-clipboard__button svg {
    display: none;
}
.ap-clipboard.is-copied .ap-clipboard__button {
    background: var(--wp--preset--color--success, #22C55E);
    color: var(--wp--preset--color--ink);
}

/* .ap-terminal — fake terminal panel for hero-terminal / hero-package.
   Box defaults sit at zero specificity so the Terminal block's color, border
   and shadow picks win; see the Copy Command note above for the canvas
   wrapper reset. No `overflow: hidden` here: it would clip a gradient
   border's ring, so the chrome rounds its own top corners instead. */
:where(.wp-block-artisanpack-terminal, .ap-terminal) {
    border-radius: 12px;
    border: 1px solid var(--wp--preset--color--border);
    background: var(--wp--preset--color--surface);
    box-shadow: var(--wp--preset--shadow--glow-gradient);
    color: var(--wp--preset--color--text);
}
.wp-block-artisanpack-terminal > div {
    border-radius: inherit;
}
.wp-block-artisanpack-terminal .ap-terminal {
    background: transparent;
    border: 0;
    border-radius: inherit;
    box-shadow: none;
    color: inherit;
}
.ap-terminal__chrome {
    border-start-start-radius: inherit;
    border-start-end-radius: inherit;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.875rem;
    height: 2.5rem;
    background: var(--wp--preset--color--surface-2);
    border-bottom: 1px solid var(--wp--preset--color--border);
}
.ap-terminal__dots {
    display: inline-flex;
    gap: 0.4375rem;
}
.ap-terminal__dots span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: currentColor;
    display: block;
}
.ap-terminal__dots span:nth-child(1) { color: #FF5F57; }
.ap-terminal__dots span:nth-child(2) { color: #FEBC2E; }
.ap-terminal__dots span:nth-child(3) { color: #28C840; }
.ap-terminal__label {
    margin-left: 0.5rem;
    font-family: var(--wp--preset--font-family--mono);
    font-size: 0.75rem;
    color: var(--wp--preset--color--text-muted);
}
/* Design terminal: Space Mono 13/1.85 with 22px padding. The block prints a
   newline after every line inside the <pre>, so inline lines get exactly
   one row each (and an empty row for a blank line) with no extra spacing. */
.ap-terminal .ap-terminal__body {
    margin: 0;
    padding: 1.375rem;
    font-family: var(--wp--preset--font-family--mono);
    font-size: 0.8125rem;
    line-height: 1.85;
    color: inherit;
    overflow: auto;
    background: transparent;
    border: 0;
    border-radius: 0;
}
.ap-terminal .ap-terminal__body code {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    background: transparent;
    border-radius: 0;
    padding: 0;
    color: inherit;
    display: block;
    white-space: pre;
}
.ap-terminal__line {
    display: inline;
}
.ap-terminal__prompt {
    color: var(--wp--preset--color--secondary);
    user-select: none;
}
/* Output, comments and successes sit two characters in, as in the design. */
.ap-terminal__line--comment,
.ap-terminal__line--output,
.ap-terminal__line--success {
    padding-left: 2ch;
}
/* The design paints these in text-subtle, but at 12-13px that is 3.0:1 on
   the terminal's surface (3.7:1 on the title bar); text-muted meets WCAG
   AA's 4.5:1 on both. */
.ap-terminal__line--comment,
.ap-terminal__line--output {
    color: var(--wp--preset--color--text-muted);
}
.ap-terminal__line--success,
.ap-terminal__tick {
    color: #22C55E;
}


/* ─── 6. Night bands ─────────────────────────────────────────────────── */

/* A Group with the Night style (styles/night.json) keeps the dark palette
   in every variation, so text on a starfield or ink ground stays legible in
   Light. A block style variation can set colours on nested blocks but can't
   redefine preset custom properties, and the lead, eyebrow, hollow ring and
   gradient buttons all read those. */
/* night:start (generated by tools/night-css.mjs) */
.is-style-night {
    --wp--preset--color--primary: #2962FF;
    --wp--preset--color--secondary: #00E5FF;
    --wp--preset--color--accent: #E040FB;
    --wp--preset--color--primary-tint: color-mix(in srgb, var(--wp--preset--color--primary) 18%, transparent);
    --wp--preset--color--primary-text: #7A9DFF;
    --wp--preset--color--secondary-tint: color-mix(in srgb, var(--wp--preset--color--secondary) 18%, transparent);
    --wp--preset--color--accent-tint: color-mix(in srgb, var(--wp--preset--color--accent) 20%, transparent);
    --wp--preset--color--on-secondary: #0B1120;
    --wp--preset--color--on-accent: #0B1120;
    --wp--preset--color--on-gradient: #000000;
    --wp--preset--color--on-media: rgba(255, 255, 255, 0.82);
    --wp--preset--color--on-neon: #0B1120;
    --wp--preset--color--base: #111827;
    --wp--preset--color--section: #1F2937;
    --wp--preset--color--surface: #1F2937;
    --wp--preset--color--surface-2: #111827;
    --wp--preset--color--glass: rgba(11, 17, 32, 0.84);
    --wp--preset--color--text: #FFFFFF;
    --wp--preset--color--text-muted: #9CA3AF;
    --wp--preset--color--text-subtle: #6B7280;
    --wp--preset--color--text-invert: #111827;
    --wp--preset--color--text-link: #00E5FF;
    --wp--preset--color--border: #374151;
    --wp--preset--color--border-subtle: #263143;
    --wp--preset--color--border-strong: #4B5563;
    --wp--preset--gradient--brand: linear-gradient(115deg, var(--wp--preset--color--primary) 0%, var(--wp--preset--color--accent) 100%);
    --wp--preset--gradient--brand-card: linear-gradient(115deg, color-mix(in srgb, var(--wp--preset--color--primary) 88%, #000000) 0%, color-mix(in srgb, var(--wp--preset--color--accent) 70%, #000000) 100%);
    --wp--preset--gradient--brand-button: linear-gradient(115deg, color-mix(in srgb, var(--wp--preset--color--primary) 94%, #FFFFFF) 0%, var(--wp--preset--color--accent) 100%);
    --wp--preset--gradient--neon: linear-gradient(115deg, var(--wp--preset--color--primary) 0%, var(--wp--preset--color--secondary) 55%, var(--wp--preset--color--accent) 100%);
    --wp--preset--gradient--primary-secondary: linear-gradient(115deg, var(--wp--preset--color--primary) 0%, var(--wp--preset--color--secondary) 100%);
    --wp--preset--gradient--primary-accent: linear-gradient(115deg, var(--wp--preset--color--primary) 0%, var(--wp--preset--color--accent) 100%);
    --wp--preset--gradient--secondary-primary: linear-gradient(115deg, var(--wp--preset--color--secondary) 0%, var(--wp--preset--color--primary) 100%);
    --wp--preset--gradient--secondary-accent: linear-gradient(115deg, var(--wp--preset--color--secondary) 0%, var(--wp--preset--color--accent) 100%);
    --wp--preset--gradient--accent-primary: linear-gradient(115deg, var(--wp--preset--color--accent) 0%, var(--wp--preset--color--primary) 100%);
    --wp--preset--gradient--accent-secondary: linear-gradient(115deg, var(--wp--preset--color--accent) 0%, var(--wp--preset--color--secondary) 100%);
    --wp--preset--gradient--starfield: radial-gradient(1.5px 1.5px at 20% 30%, rgba(255,255,255,0.55), transparent 60%), radial-gradient(1.5px 1.5px at 75% 15%, rgba(255,255,255,0.40), transparent 60%), radial-gradient(1px 1px at 40% 70%, rgba(255,255,255,0.45), transparent 60%), radial-gradient(1px 1px at 88% 55%, rgba(0,229,255,0.55), transparent 60%), radial-gradient(1.5px 1.5px at 60% 85%, rgba(255,255,255,0.35), transparent 60%), radial-gradient(1px 1px at 10% 80%, rgba(224,64,251,0.50), transparent 60%), radial-gradient(1px 1px at 50% 45%, rgba(255,255,255,0.30), transparent 60%), var(--wp--preset--color--ink);
    --wp--preset--gradient--aurora: radial-gradient(55% 48% at 86% -13%, color-mix(in srgb, var(--wp--preset--color--accent) 30%, transparent), transparent 100%), radial-gradient(62% 45% at 8% -20%, color-mix(in srgb, var(--wp--preset--color--primary) 32%, transparent), transparent 100%), radial-gradient(48% 37% at 56% 1%, color-mix(in srgb, var(--wp--preset--color--secondary) 21%, transparent), transparent 100%), var(--wp--preset--color--base);
    --wp--preset--gradient--media-placeholder: linear-gradient(135deg, color-mix(in srgb, var(--wp--preset--color--primary) 55%, transparent), color-mix(in srgb, var(--wp--preset--color--accent) 55%, transparent)), var(--wp--preset--color--surface-2);
    --wp--preset--gradient--scrim: linear-gradient(to top, color-mix(in srgb, var(--wp--preset--color--ink) 92%, transparent) 8%, color-mix(in srgb, var(--wp--preset--color--ink) 50%, transparent) 55%, transparent);
    --wp--preset--gradient--starfield-glow: radial-gradient(90% 70% at 50% -10%, color-mix(in srgb, var(--wp--preset--color--primary) 22%, transparent), transparent 60%), radial-gradient(70% 60% at 80% 110%, color-mix(in srgb, var(--wp--preset--color--accent) 18%, transparent), transparent 60%), radial-gradient(1.5px 1.5px at 20% 30%, rgba(255,255,255,0.55), transparent 60%), radial-gradient(1.5px 1.5px at 75% 15%, rgba(255,255,255,0.40), transparent 60%), radial-gradient(1px 1px at 40% 70%, rgba(255,255,255,0.45), transparent 60%), radial-gradient(1px 1px at 88% 55%, rgba(0,229,255,0.55), transparent 60%), radial-gradient(1.5px 1.5px at 60% 85%, rgba(255,255,255,0.35), transparent 60%), radial-gradient(1px 1px at 10% 80%, rgba(224,64,251,0.50), transparent 60%), radial-gradient(1px 1px at 50% 45%, rgba(255,255,255,0.30), transparent 60%), var(--wp--preset--color--ink);
    --wp--preset--gradient--wash-corners: radial-gradient(70% 60% at 100% 0%, color-mix(in srgb, var(--wp--preset--color--accent) 12%, transparent), transparent 55%), radial-gradient(70% 60% at 0% 100%, color-mix(in srgb, var(--wp--preset--color--primary) 12%, transparent), transparent 55%), var(--wp--preset--color--base);
    --wp--preset--gradient--wash-diagonal: radial-gradient(70% 70% at 0% 0%, color-mix(in srgb, var(--wp--preset--color--primary) 18%, transparent), transparent 55%), radial-gradient(70% 70% at 100% 100%, color-mix(in srgb, var(--wp--preset--color--accent) 16%, transparent), transparent 55%), var(--wp--preset--color--ink);
    --wp--preset--gradient--neon-glow: radial-gradient(80% 120% at 50% -10%, rgba(255,255,255,0.18), transparent 60%), var(--wp--preset--gradient--neon);
    --wp--preset--gradient--neon-gloss: radial-gradient(80% 120% at 50% -20%, rgba(255,255,255,0.22), transparent 60%), var(--wp--preset--gradient--neon);
    --wp--preset--gradient--starfield-wash: radial-gradient(80% 70% at 50% -10%, color-mix(in srgb, var(--wp--preset--color--primary) 20%, transparent), transparent 60%), radial-gradient(1.5px 1.5px at 20% 30%, rgba(255,255,255,0.55), transparent 60%), radial-gradient(1.5px 1.5px at 75% 15%, rgba(255,255,255,0.40), transparent 60%), radial-gradient(1px 1px at 40% 70%, rgba(255,255,255,0.45), transparent 60%), radial-gradient(1px 1px at 88% 55%, rgba(0,229,255,0.55), transparent 60%), radial-gradient(1.5px 1.5px at 60% 85%, rgba(255,255,255,0.35), transparent 60%), radial-gradient(1px 1px at 10% 80%, rgba(224,64,251,0.50), transparent 60%), radial-gradient(1px 1px at 50% 45%, rgba(255,255,255,0.30), transparent 60%), var(--wp--preset--color--ink);
    --wp--preset--shadow--glow-primary: 0 0 24px color-mix(in srgb, var(--wp--preset--color--primary) 50%, transparent);
    --wp--preset--shadow--glow-secondary: 0 0 24px color-mix(in srgb, var(--wp--preset--color--secondary) 55%, transparent);
    --wp--preset--shadow--glow-accent: 0 0 24px color-mix(in srgb, var(--wp--preset--color--accent) 55%, transparent);
    --wp--preset--shadow--glow-primary-lg: 0 0 48px color-mix(in srgb, var(--wp--preset--color--primary) 45%, transparent);
    --wp--preset--shadow--glow-secondary-lg: 0 0 48px color-mix(in srgb, var(--wp--preset--color--secondary) 45%, transparent);
    --wp--preset--shadow--glow-accent-lg: 0 0 48px color-mix(in srgb, var(--wp--preset--color--accent) 45%, transparent);
    --wp--preset--shadow--glow-gradient: 0 0 20px color-mix(in srgb, var(--wp--preset--color--primary) 45%, transparent), 0 0 34px color-mix(in srgb, var(--wp--preset--color--accent) 40%, transparent);
    --wp--preset--shadow--ring-primary: 0 0 0 2px var(--wp--preset--color--surface), 0 0 0 4px var(--wp--preset--color--primary);
}
/* night:end */

/* A Night Cover sits on ink, so a "Use featured image" card on a post with
   no image (Blog 8e) keeps its scrim, badge and title on a dark ground in
   Light. The Cover has no background-colour support of its own, and its
   image covers this ground whenever there is one. */
.wp-block-cover.is-style-night {
    background-color: var(--wp--preset--color--ink);
}

/* ─── 7. Forms block ─────────────────────────────────────────────────── */

/* The Forms block renders the forms package's daisyUI controls, which take
   no theme.json styles: give them the design's field (surface fill, 2px
   border, 5px radius, 13/16 padding). The submit button already carries
   `wp-element-button`, so it gets the theme's button element styles. */
.wp-block-artisanpack-form .fieldset {
    padding-block: 0;
}

.wp-block-artisanpack-form .fieldset-legend {
    color: inherit;
    font-size: var(--wp--preset--font-size--body-sm);
    font-weight: 600;
}

.wp-block-artisanpack-form :is(.input, .textarea, .select) {
    height: auto;
    padding: 0.8125rem 1rem;
    border: 2px solid var(--wp--preset--color--border);
    border-radius: 5px;
    background-color: var(--wp--preset--color--surface);
    color: var(--wp--preset--color--text);
    font-size: 1rem;
    box-shadow: none;
}

/* daisyUI's `.input` is a wrapper around the real <input>, while `.textarea`
   and `.select` sit on the control itself, so match both. */
.wp-block-artisanpack-form :is(.input, .textarea, .select) ::placeholder,
.wp-block-artisanpack-form :is(.input, .textarea, .select)::placeholder {
    color: var(--wp--preset--color--text-muted);
    opacity: 1;
}

.wp-block-artisanpack-form :is(.input, .textarea, .select):focus-within {
    outline: 2px solid var(--wp--preset--color--secondary);
    outline-offset: 2px;
}

/* Signup: the design's one-line email + button form has no visible label.
   Keep the label for screen readers and let the button match the field's
   height, as the design's flex row does. */
.wp-block-artisanpack-form.is-style-signup .fieldset-legend {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.wp-block-artisanpack-form.is-style-signup.is-layout-inline button[type="submit"] {
    align-self: stretch;
    height: auto;
}

/* ─── 8. Pricing ─────────────────────────────────────────────────────── */

/* Checks (styles/checks.json): the List block has no list-style control.
   The check is a native inline icon at the start of each item. */
.wp-block-list.is-style-checks {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Each item stays a block, so bold, links or emphasis flow as one line of
   text; the icon sits in the start padding, centred on the first line. */
.wp-block-list.is-style-checks > li {
    position: relative;
    padding-inline-start: calc(1em + 0.625rem);
}

.wp-block-list.is-style-checks > li > .ap-inline-icon:first-child {
    position: absolute;
    inset-inline-start: 0;
    /* The icon sets line-height: 1; take the item's so 1lh is its line. */
    line-height: inherit;
    top: calc(0.5lh - 0.5em);
}

/* Pill (styles/pill.json): Tabs builds its tab links at render, so no
   control reaches their background, radius or selected state. The
   active pill is the neon gradient with on-neon text (≥4.5:1 over the
   text in dark and Light). */
.ap-tabs.is-style-pill .ap-tabs__list {
    border: 0;
}

.ap-tabs.is-style-pill .ap-tabs__list ul {
    gap: 0.25rem;
    width: fit-content;
    padding: 0.25rem;
    border: 1px solid var(--wp--preset--color--border-subtle);
    border-radius: 999px;
    background: var(--wp--preset--color--surface);
}

.ap-tabs.is-style-pill.space-tabs-center .ap-tabs__list ul {
    margin-inline: auto;
}

.ap-tabs.is-style-pill.space-tabs-end .ap-tabs__list ul {
    margin-inline-start: auto;
}

.ap-tabs.is-style-pill .ap-tabs__list a {
    padding: 0.5625rem 1.125rem;
    border-radius: 999px;
    color: var(--wp--preset--color--text-muted);
    line-height: 1.5;
}

.ap-tabs.is-style-pill .ap-tabs__list a[aria-selected="true"] {
    border: 0;
    background: var(--wp--preset--gradient--neon);
    color: var(--wp--preset--color--on-neon);
}

.ap-tabs.is-style-pill .ap-tabs__list a:focus-visible {
    outline: 2px solid var(--wp--preset--color--secondary);
    outline-offset: 2px;
}

.ap-tabs.is-style-pill .ap-tab-section {
    padding: 0;
}

/* Compare (styles/compare.json): table cells take no class or colour, so
   the matrix layout, the featured third column's tint and the button look
   of the header links live here. Row 1 of the head is the plan names,
   row 2 the prices, row 3 the links. */
.wp-block-table.is-style-compare {
    overflow-x: auto;
    border: 1px solid var(--wp--preset--color--border-subtle);
    border-radius: 12px;
    background: var(--wp--preset--color--base);
}

.wp-block-table.is-style-compare table {
    min-width: 36rem;
    border-collapse: collapse;
    table-layout: fixed;
}

.wp-block-table.is-style-compare :is(th, td) {
    padding: 1rem 1.25rem;
    border: 0;
    text-align: center;
}

.wp-block-table.is-style-compare :is(th, td) + :is(th, td) {
    border-left: 1px solid var(--wp--preset--color--border-subtle);
}

.wp-block-table.is-style-compare :is(th, td):first-child {
    width: 34.78%;
    padding-inline: 1.5rem;
    text-align: left;
}

.wp-block-table.is-style-compare thead {
    border: 0;
}

.wp-block-table.is-style-compare thead tr:first-child th {
    padding-top: 1.5rem;
    padding-bottom: 0;
    color: var(--wp--preset--color--text-muted);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.wp-block-table.is-style-compare thead tr:first-child th:nth-child(3) {
    color: var(--wp--preset--color--primary-text);
}

.wp-block-table.is-style-compare thead tr:nth-child(2) td {
    padding-top: 0.25rem;
    padding-bottom: 0;
    color: var(--wp--preset--color--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

.wp-block-table.is-style-compare thead tr:nth-child(2) strong {
    color: var(--wp--preset--color--text);
    font-size: 2.125rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.wp-block-table.is-style-compare thead tr:nth-child(3) td {
    padding-top: 0.875rem;
    padding-bottom: 1.5rem;
}

.wp-block-table.is-style-compare thead a {
    display: block;
    padding: 0.625rem 0.875rem;
    border-radius: 5px;
    box-shadow: inset 0 0 0 1.5px var(--wp--preset--color--border-strong);
    color: var(--wp--preset--color--text);
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.wp-block-table.is-style-compare thead a:hover {
    background: var(--wp--preset--color--surface-2);
}

.wp-block-table.is-style-compare thead td:nth-child(3) a {
    background: var(--wp--preset--gradient--brand-button);
    box-shadow: var(--wp--preset--shadow--sm);
    color: var(--wp--preset--color--on-gradient);
}

.wp-block-table.is-style-compare tbody tr {
    border-top: 1px solid var(--wp--preset--color--border-subtle);
}

.wp-block-table.is-style-compare tbody th {
    color: var(--wp--preset--color--text-muted);
    font-weight: 400;
}

.wp-block-table.is-style-compare tbody strong {
    color: var(--wp--preset--color--text);
    font-weight: 600;
}

.wp-block-table.is-style-compare thead :is(th, td):nth-child(3) {
    background: color-mix(in srgb, var(--wp--preset--color--primary) 12%, transparent);
}

.wp-block-table.is-style-compare tbody :is(th, td):nth-child(3) {
    background: color-mix(in srgb, var(--wp--preset--color--primary) 8%, transparent);
}

/* Phones: fit all four columns, as the design does, instead of hiding the
   featured column behind a horizontal scroll (still the fallback). */
@media (max-width: 767px) {
    .wp-block-table.is-style-compare table {
        min-width: 19rem;
    }

    .wp-block-table.is-style-compare :is(th, td) {
        padding: 0.75rem 0.375rem;
        font-size: 0.8125rem;
    }

    .wp-block-table.is-style-compare :is(th, td):first-child {
        width: 31%;
        padding-inline: 0.75rem;
    }

    .wp-block-table.is-style-compare thead tr:first-child th {
        padding-top: 1rem;
        font-size: 0.6875rem;
        letter-spacing: 0.08em;
    }

    .wp-block-table.is-style-compare thead tr:nth-child(2) strong {
        font-size: 1.375rem;
    }

    .wp-block-table.is-style-compare thead tr:nth-child(2) td {
        font-size: 0.75rem;
    }

    .wp-block-table.is-style-compare thead tr:nth-child(3) td {
        padding-bottom: 1rem;
    }

    .wp-block-table.is-style-compare thead a {
        padding: 0.5rem 0.25rem;
        font-size: 0.75rem;
        line-height: 1.2;
        white-space: normal;
    }
}

/* ─── 9. Testimonials ───────────────────────────────────────────────── */

/* Scroll strip (styles/snap.json): the Row scrolls natively (Effects
   overflow-x: auto) and its cards keep a native flex basis, but nothing
   exposes scroll-snap. Each direct child snaps to the strip's start. */
.wp-block-group.is-style-snap {
    scroll-snap-type: x mandatory;
}

.wp-block-group.is-style-snap > * {
    scroll-snap-align: start;
}

/* ─── 10. FAQ ───────────────────────────────────────────────────────── */

/* FAQ (styles/faq.json) on Accordions. Each panel's box, title type and
   answer padding are native; the renderer draws the toggle icon and the
   click target itself, so only these are styled here. */

/* The title's own padding sits outside the click target, so the padding
   goes on the target and the icon is placed against it. */
.is-style-faq .ap-accordion__title {
    padding: 0;
}

.is-style-faq .ap-accordion__title-content {
    padding: 1.125rem 3.875rem 1.125rem 1.25rem;
}

.is-style-faq .ap-accordion__title-content:focus-visible {
    outline: 2px solid var(--wp--preset--color--primary-text);
    outline-offset: -2px;
    border-radius: 9px;
}

/* The design's "+" chip, which turns into "×" when open. */
.is-style-faq .ap-accordion__icon--plus-minus {
    right: 1.25rem;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--wp--preset--color--surface-2);
    color: var(--wp--preset--color--text-muted);
    transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.is-style-faq .ap-accordion__icon--plus-minus::before,
.is-style-faq .ap-accordion__icon--plus-minus::after {
    top: 50%;
    left: 50%;
    width: 10px;
    height: 1.5px;
    margin: -0.75px 0 0 -5px;
    border-radius: 1px;
}

.is-style-faq .ap-accordion__icon--plus-minus::before {
    width: 1.5px;
    height: 10px;
    margin: -5px 0 0 -0.75px;
}

.is-style-faq .ap-accordion__title-content[aria-expanded="true"] ~ .ap-accordion__icon--plus-minus {
    background: var(--wp--preset--gradient--brand);
    color: #fff;
    transform: translateY(-50%) rotate(45deg);
}

.is-style-faq .ap-accordion__title-content[aria-expanded="true"] ~ .ap-accordion__icon--plus-minus::before {
    transform: none;
}

/* A panel on the subtle border turns primary while open; panels given
   their own colour (FAQ Boxed) keep it. */
.is-style-faq .ap-accordion.has-border-subtle-border-color:has(> .ap-accordion__title [aria-expanded="true"]) {
    border-color: var(--wp--preset--color--primary) !important;
}

/* FAQ Search (the plugin's `artisanpack/faq-search`) renders its own field,
   which no support reaches: the design's search field, with the icon
   inside it and the same focus ring as the Forms block's fields (§7). */
.ap-faq-search__field {
    position: relative;
}

.ap-faq-search__icon {
    position: absolute;
    top: 50%;
    left: 1.125rem;
    transform: translateY(-50%);
    color: var(--wp--preset--color--text-muted);
    pointer-events: none;
}

.ap-faq-search__input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    border: 2px solid var(--wp--preset--color--border);
    border-radius: 5px;
    background-color: var(--wp--preset--color--surface);
    color: var(--wp--preset--color--text);
    font: inherit;
    font-size: 1rem;
}

.ap-faq-search__input::placeholder {
    color: var(--wp--preset--color--text-muted);
    opacity: 1;
}

.ap-faq-search__input:focus-visible {
    outline: 2px solid var(--wp--preset--color--secondary);
    outline-offset: 2px;
}

.ap-faq-search__empty {
    margin: 2rem 0 0;
    color: var(--wp--preset--color--text-muted);
    text-align: center;
}

/* ─── 11. Packages ──────────────────────────────────────────────────── */

/*
 * Linked card: the whole card follows its title link. A Group can't be a
 * link, so the post title's link is stretched over the card, and the card
 * shows the link's focus ring.
 */
.is-style-linked {
    position: relative;
}

/* The whole card is the link (and shows the focus ring), so a static
   heading's link drops the underline, as a post title's does. */
.is-style-linked .wp-block-heading a {
    text-decoration: none;
}

.is-style-linked .wp-block-post-title a::after,
.is-style-linked .wp-block-heading a::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

.is-style-linked .wp-block-post-title a:focus-visible,
.is-style-linked .wp-block-heading a:focus-visible {
    outline: none;
}

.is-style-linked:has(.wp-block-post-title a:focus-visible, .wp-block-heading a:focus-visible) {
    outline: 2px solid var(--wp--preset--color--secondary);
    outline-offset: 3px;
}

/*
 * Tags: each term as a Tag chip. Post Terms prints an unlinked term as bare
 * text, so the chips need each term in its own element; until then the
 * row reads as plain "Blade, TALL" (separators are only hidden once terms
 * are wrapped).
 */
.wp-block-post-terms.is-style-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.is-style-tags .wp-block-post-terms__term,
.is-style-tags > a {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 5px;
    background: var(--wp--preset--color--surface-2);
    color: var(--wp--preset--color--text);
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.is-style-tags:has(.wp-block-post-terms__term, > a) .wp-block-post-terms__separator {
    display: none;
}

/* ─── 12. Blog ──────────────────────────────────────────────────────── */

/* Featured images. A definite width stops a wrapping flex column (every
   `is-layout-flex` group wraps by default) from sizing the figure's height
   at its intrinsic width and leaving it shorter than its image. Overflow
   keeps the image's corners inside the figure's rounded border. */
.wp-block-post-featured-image {
    width: 100%;
    overflow: hidden;
}

/* A divider separates rows, so the last post in a list has none. The Post
   Template repeats one row, so the border is an inline style on every post,
   hence `!important`. Matching `border-bottom-width` leaves boxed cards alone. */
.wp-block-post-template-item:last-child > [style*="border-bottom-width"] {
    border-bottom-width: 0 !important;
}

/*
 * Term badges: each category as a Badge pill (primary tint, or the
 * brand-card gradient on overlay cards). Post Terms' colour supports reach
 * only its wrapper, so the per-term chip needs a style, as with `tags`.
 */
.wp-block-post-terms.is-style-term-badge,
.wp-block-post-terms.is-style-term-badge-gradient {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.is-style-term-badge .wp-block-post-terms__term,
.is-style-term-badge-gradient .wp-block-post-terms__term {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.01em;
    text-decoration: none;
    white-space: nowrap;
}

.is-style-term-badge .wp-block-post-terms__term {
    background: color-mix(in srgb, var(--wp--preset--color--primary) 12%, transparent);
    color: var(--wp--preset--color--primary-text);
}

.is-style-term-badge-gradient .wp-block-post-terms__term {
    background: var(--wp--preset--gradient--brand-card);
    color: var(--wp--preset--color--white);
}

.is-style-term-badge .wp-block-post-terms__separator,
.is-style-term-badge-gradient .wp-block-post-terms__separator {
    display: none;
}

/* Term links stay clickable above a linked card's stretched title link. */
.is-style-linked .wp-block-post-terms a {
    position: relative;
    z-index: 1;
}

/* ─── 13. Templates ─────────────────────────────────────────────────── */

/*
 * Filter rail (styles/filter-rail.json): the Search block's colour, border
 * and spacing supports reach its form, not the input inside it, so the
 * design's field (surface, 12px radius, magnifier inset) needs a style.
 */
.is-style-filter-rail .wp-block-search__label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--wp--preset--color--text-muted);
    font-size: 0.875rem;
    font-weight: 400;
    text-align: center;
}

.is-style-filter-rail .wp-block-search__inside-wrapper {
    position: relative;
}

.is-style-filter-rail .wp-block-search__inside-wrapper::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 1rem;
    width: 0.875rem;
    height: 0.875rem;
    transform: translateY(-50%);
    background: var(--wp--preset--color--text-muted);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M416 208c0 45.9-14.9 88.3-40 122.7l126.6 126.7a32 32 0 0 1-45.3 45.3L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0s208 93.1 208 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M416 208c0 45.9-14.9 88.3-40 122.7l126.6 126.7a32 32 0 0 1-45.3 45.3L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0s208 93.1 208 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z'/%3E%3C/svg%3E") center / contain no-repeat;
    pointer-events: none;
}

.is-style-filter-rail .wp-block-search__input {
    width: 100%;
    padding: 0.6875rem 0.875rem 0.6875rem 2.5rem;
    border: 1px solid var(--wp--preset--color--border-subtle);
    border-radius: 12px;
    background: var(--wp--preset--color--surface);
    color: var(--wp--preset--color--text);
    font: inherit;
    font-size: 0.875rem;
}

.is-style-filter-rail .wp-block-search__input::placeholder {
    color: var(--wp--preset--color--text-muted);
}

.is-style-filter-rail .wp-block-search__input:focus-visible {
    /* Transparent, not none: forced-colors mode drops the box-shadow ring
       and paints this outline instead. */
    outline: 2px solid transparent;
    outline-offset: 2px;
    border-color: var(--wp--preset--color--secondary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp--preset--color--secondary) 22%, transparent);
}

/*
 * Filter list (styles/filter-list.json) on Categories with the badge count
 * (visual-editor #960): each term is a full-width row with a count pill;
 * the current term sits on Surface with a gradient pill. List items and
 * the current state print no supports of their own.
 */
.wp-block-categories.is-style-filter-list {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.is-style-filter-list .cat-item > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6875rem 0.875rem;
    border: 1px solid transparent;
    border-radius: 11px;
    color: var(--wp--preset--color--text-muted);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
}

.is-style-filter-list .cat-item > a:hover {
    background: var(--wp--preset--color--surface);
    color: var(--wp--preset--color--text);
}

.is-style-filter-list .current-cat > a {
    border-color: var(--wp--preset--color--border-subtle);
    background: var(--wp--preset--color--surface);
    color: var(--wp--preset--color--text);
}

.is-style-filter-list .wp-block-categories__count {
    padding: 0.0625rem 0.4375rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--wp--preset--color--text) 10%, transparent);
    color: var(--wp--preset--color--text);
    font-family: var(--wp--preset--font-family--mono);
    font-size: 0.6875rem;
    line-height: 1.6;
}

.is-style-filter-list .current-cat .wp-block-categories__count {
    background: var(--wp--preset--gradient--brand-card);
    color: var(--wp--preset--color--white);
}

/*
 * Pager (styles/pager.json) on Query Pagination (Justification: center): square page buttons with
 * a gradient current page. The numbers and previous/next links take no
 * colour, border or size supports, so the boxes need a style. Previous
 * and Next keep their text for screen readers and show a chevron.
 */
/* Centred by the block's own Justification (flex layout); the gap is the
   design's 10px between every button. */
.wp-block-query-pagination.is-style-pager {
    gap: 0.625rem;
}

.is-style-pager .wp-block-query-pagination-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
}

.is-style-pager .page-numbers,
.is-style-pager .wp-block-query-pagination-previous,
.is-style-pager .wp-block-query-pagination-next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.625rem;
    height: 2.625rem;
    padding: 0 0.75rem;
    border: 1px solid var(--wp--preset--color--border-subtle);
    border-radius: 11px;
    background: var(--wp--preset--color--surface);
    color: var(--wp--preset--color--text-muted);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
}

.is-style-pager .page-numbers.current {
    border-color: transparent;
    background: var(--wp--preset--gradient--brand-card);
    color: var(--wp--preset--color--white);
}

.is-style-pager a.page-numbers:hover,
.is-style-pager .wp-block-query-pagination-previous:hover,
.is-style-pager .wp-block-query-pagination-next:hover {
    color: var(--wp--preset--color--text);
}

.is-style-pager .wp-block-query-pagination-previous,
.is-style-pager .wp-block-query-pagination-next {
    position: relative;
    width: 2.625rem;
    padding: 0;
    overflow: hidden;
    font-size: 0;
    white-space: nowrap;
}

.is-style-pager .wp-block-query-pagination-previous::after,
.is-style-pager .wp-block-query-pagination-next::after {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--wp--preset--color--text-muted);
    font-size: 1.125rem;
    line-height: 1;
}

.is-style-pager .wp-block-query-pagination-previous::after {
    content: "‹" / "";
}

.is-style-pager .wp-block-query-pagination-next::after {
    content: "›" / "";
}

/*
 * Chips (styles/chips.json) on Categories with the badge count: the
 * packages archive's centred row of pill filters. The current term takes
 * the brand gradient and its count a translucent white pill.
 */
.wp-block-categories.is-style-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.625rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.is-style-chips .cat-item > a {
    display: inline-flex;
    align-items: center;
    gap: 0.5625rem;
    padding: 0.5625rem 1rem;
    border: 1px solid var(--wp--preset--color--border-subtle);
    border-radius: 999px;
    background: var(--wp--preset--color--surface);
    color: var(--wp--preset--color--text-muted);
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
}

.is-style-chips .cat-item > a:hover {
    color: var(--wp--preset--color--text);
}

.is-style-chips .current-cat > a {
    border-color: transparent;
    background: var(--wp--preset--gradient--brand-card);
    color: var(--wp--preset--color--white);
}

.is-style-chips .wp-block-categories__count {
    padding: 0.0625rem 0.4375rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--wp--preset--color--text) 10%, transparent);
    color: var(--wp--preset--color--text);
    font-family: var(--wp--preset--font-family--mono);
    font-size: 0.6875rem;
    line-height: 1.6;
}

.is-style-chips .current-cat .wp-block-categories__count {
    background: rgb(11 17 32 / 35%);
    color: var(--wp--preset--color--white);
}

/*
 * Versions (styles/versions.json) on Table: the requirements table, with
 * a primary header and footer row and alternating Surface / Surface 2
 * rows. Table cells take no colour or class, and the native Stripes style
 * only tints rows.
 */
.wp-block-table.is-style-versions table {
    border: 1px solid var(--wp--preset--color--border);
    border-radius: 12px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    font-size: 0.90625rem;
}

.is-style-versions th,
.is-style-versions td {
    padding: 0.875rem 1.125rem;
    border: 0;
    text-align: left;
}

.is-style-versions .has-text-align-center {
    text-align: center;
}

.is-style-versions thead th,
.is-style-versions tfoot td {
    background: color-mix(in srgb, var(--wp--preset--color--primary) 90%, #000000);
    color: var(--wp--preset--color--white);
    font-size: 0.8125rem;
    font-weight: 600;
}

.is-style-versions tbody tr:nth-child(odd) td {
    background: var(--wp--preset--color--surface);
}

.is-style-versions tbody tr:nth-child(even) td {
    background: var(--wp--preset--color--surface-2);
}

/*
 * Full width (styles/full-width.json) on Copy Command: the get-started
 * command list's chips fill their column. The block has no width control,
 * and its default is the shrink-wrapped chip.
 */
.wp-block-artisanpack-copy-command.is-style-full-width {
    width: 100%;
}

/*
 * Tilt left / right (styles/tilt-*.json) on Group: the newsletter hero's
 * stacked cheat-sheet mockup. No block exposes a transform.
 */
.wp-block-group.is-style-tilt-left {
    transform: rotate(-6deg);
}

.wp-block-group.is-style-tilt-right {
    transform: rotate(4deg);
}

/*
 * Plain tables (no block style): the design's prose tables, with a small
 * uppercase header, row rules and no vertical borders. Table cells take no
 * theme.json styles, and the block's default draws a full grid.
 */
.wp-block-table:not([class*="is-style-"]) :is(th, td) {
    padding: 0.8125rem 0.875rem;
    border: 0;
    border-bottom: 1px solid var(--wp--preset--color--border-subtle);
    text-align: left;
    vertical-align: top;
}

.wp-block-table:not([class*="is-style-"]) thead th {
    border-bottom-color: var(--wp--preset--color--border);
    color: var(--wp--preset--color--text);
    font-size: 0.71875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.wp-block-table:not([class*="is-style-"]) td {
    font-size: 0.9375rem;
}

.wp-block-table:not([class*="is-style-"]) :is(thead, tfoot) {
    border: 0;
}

.wp-block-table:not([class*="is-style-"]) tbody tr:last-child td {
    border-bottom: 0;
}

.wp-block-table:not([class*="is-style-"]) table {
    border: 0;
    margin: 1.5rem 0 1.75rem;
}

/*
 * Square buttons (styles/share-squares.json) on Social Share Content: the
 * design's 38px bordered squares that fill with the brand gradient on
 * hover. The block's colour attributes style the chip but not its size,
 * border or a gradient hover.
 */
.is-style-share-squares .ap-social-share-content__chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.375rem;
    height: 2.375rem;
    border: 1px solid var(--wp--preset--color--border-subtle);
    border-radius: 10px;
    background: var(--wp--preset--color--surface);
    color: var(--wp--preset--color--text-muted);
}

.is-style-share-squares .ap-social-share-content__chip:hover,
.is-style-share-squares .ap-social-share-content__chip:focus-visible {
    border-color: transparent;
    background: var(--wp--preset--gradient--brand-card);
    color: var(--wp--preset--color--white);
}

/* ─── 14. Header and footer ─────────────────────────────────────────── */

/* The design's glass header: no block exposes `backdrop-filter`. The
 * colour, border, stickiness (on the template part) and z-index are all
 * native. The blur sits on a layer behind the content: on the header
 * itself, `backdrop-filter` would make it the containing block of the
 * fixed menu overlay and trap the overlay inside the 76px bar. */
.wp-block-template-part--header > .wp-block-group {
    position: relative;
}

.wp-block-template-part--header > .wp-block-group::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
}

/* The active link is secondary. The renderer marks it (`current-menu-item`,
 * visual-editor #975), but Navigation has no colour for a current item. */
.wp-block-navigation .current-menu-item > .wp-block-navigation-item__content {
    color: var(--wp--preset--color--secondary);
}

/* The skip link is a paragraph whose link takes focus, so §1's
 * `:focus-within` reveals it; here it floats over the header instead of
 * pushing the row down. */
.wp-block-template-part--header .screen-reader-text:focus-within {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 100;
    margin: 0;
    padding: 0.625rem 1rem;
    border-radius: 8px;
    background: var(--wp--preset--color--surface);
    box-shadow: var(--wp--preset--shadow--md);
}

/* The sticky header covers the top 77px, so an in-page jump (the skip
 * link, `#newsletter`) stops below it. Sticky sections clear it the same
 * way: their `top` offset is 6.3125rem, the header plus a 1.5rem gap. */
html {
    scroll-padding-top: 5rem;
}

/* Post meta rail (single-post). It comes before the post content in the
 * markup, so where the columns stack (the renderer's 767px cut-off) it sits
 * above the post, and keyboard and screen-reader order match what's on
 * screen. Where the columns sit side by side it moves to the right and
 * scrolls on its own once the table of contents makes it taller than the
 * viewport below the header. */
@media (min-width: 768px) {
    .wp-block-columns > .is-post-meta-rail {
        order: 1;
    }

    .is-post-meta-rail > aside {
        max-height: calc(100vh - 7.8125rem);
        overflow-y: auto;
    }
}

/* Table of contents in the post meta rail: the rail's link list, not the
 * block's default bulleted, underlined one. */
.is-post-meta-rail .ap-toc__list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.is-post-meta-rail .ap-toc__list .ap-toc__list {
    margin-top: 0.5rem;
    padding-inline-start: 0.75rem;
    border-left: 1px solid var(--wp--preset--color--border-subtle);
}

.is-post-meta-rail .ap-toc__item {
    font-size: 0.84375rem;
    line-height: 1.4;
}

.is-post-meta-rail .ap-toc__link {
    color: var(--wp--preset--color--text-muted);
    text-decoration: none;
}

.is-post-meta-rail .ap-toc__link:is(:hover, :focus-visible) {
    color: var(--wp--preset--color--text-link);
}

/* A post with no headings drops the whole "On this page" section rather
 * than showing the block's empty-state message. */
.is-post-meta-rail .wp-block-group:has(> .ap-toc .ap-toc__placeholder) {
    display: none;
}

/* The menu toggle buttons take the theme's focus ring instead of the
 * browser's default. */
.wp-block-navigation__responsive-container-open:focus-visible,
.wp-block-navigation__responsive-container-close:focus-visible {
    outline: 2px solid var(--wp--preset--color--secondary);
    outline-offset: 2px;
}

/* Social tiles turn secondary on hover, as drawn: Icon has no hover colour,
 * and its `iconColor` is an inline style on the glyph, hence `!important`. */
.wp-block-template-part--footer .wp-block-artisanpack-icon.is-style-tile a:is(:hover, :focus-visible) .wp-block-artisanpack-icon__ref {
    color: var(--wp--preset--color--secondary) !important;
}

/* ─── Reduced motion ─────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .wp-block-button__link,
    .wp-element-button,
    .ap-clipboard__button,
    .is-style-faq .ap-accordion__icon {
        transition: none;
    }

    .wp-block-button__link:hover,
    .wp-element-button:hover,
    .wp-block-button__link:active,
    .wp-element-button:active,
    .ap-clipboard__button:hover {
        transform: none;
    }
}

/*
 * Tablet: a grid that drops to two columns there (visual-editor's default
 * collapse of three or more columns, or an explicit Tablet count of two)
 * stretches an odd last item across both columns instead of leaving a gap
 * beside it. Only grids whose items all span one column, so a bento's wide
 * tile isn't miscounted.
 */
@media (min-width: 768px) and (max-width: 1023px) {
    .ap-grid:is(
        .ap-grid-has-2-tablet-columns,
        :not(.ap-grid-has-1-base-columns, .ap-grid-has-2-base-columns):not([class*="-sm-columns"], [class*="-md-columns"], [class*="-lg-columns"], [class*="-xl-columns"], [class*="-2xl-columns"], [class*="-tablet-columns"])
    ):not(:has(> .ap-grid-item:not(.ap-grid-item-span-1-base-columns), > .ap-grid-item[class*="-tablet-columns"]:not(.ap-grid-item-span-1-tablet-columns))) > .ap-grid-item:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}

/* ─── 15. Code ──────────────────────────────────────────────────────── */

/* Inline code. theme.json has no `code` element, so nothing native reaches
   it. The chip paints its own opaque ground, which keeps the text at AA on
   every band, card and gradient in dark and Light. The design's chip is
   surface-2, the same colour as the base ground; surface plus a hairline
   reads on both grounds.

   `:not([class])` leaves the plugin's `.ap-clipboard__value` alone, and the
   specificity beats the editor canvas baseline (`.editor-styles-wrapper
   code`, a hard-coded #f3f4f6 under the theme's white text). */
:root :not(pre) > code:not([class]) {
    padding: 0.125em 0.375em;
    border: 1px solid var(--wp--preset--color--border);
    border-radius: 4px;
    background: var(--wp--preset--color--surface);
    color: var(--wp--preset--color--text);
    font-family: var(--wp--preset--font-family--mono);
    font-size: 0.875em;
    overflow-wrap: anywhere;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

/* Inline code in a link stays a link. */
:root a > code:not([class]) {
    color: inherit;
}

/* The Code block's panel lives in theme.json (styles.blocks). Long lines
   scroll inside the panel, as in the design, instead of wrapping. */
.wp-block-code {
    max-width: 100%;
    overflow-x: auto;
}

.wp-block-code code {
    white-space: pre;
    overflow-wrap: normal;
}

/* ─── 16. Screenshots ───────────────────────────────────────────────── */

/* Shared round control: the lightbox and carousel arrows. */
.ap-round-button {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 1px solid var(--wp--preset--color--border);
    border-radius: 50%;
    background: var(--wp--preset--color--surface);
    color: var(--wp--preset--color--text);
    font-size: 1rem;
    cursor: pointer;
}

.ap-round-button:hover {
    border-color: var(--wp--preset--color--border-strong);
}

.ap-round-button:focus-visible,
.ap-lightbox-trigger:focus-visible,
.ap-tabs.is-style-carousel .ap-tabs__list a:focus-visible {
    outline: 2px solid var(--wp--preset--color--secondary);
    outline-offset: 2px;
}

/* Screenshots crop from the top, as in the design. The renderer drops the
   Image block's focal point (visual-editor #1054), so it can't do
   this on the front end. */
.is-style-shot img {
    object-position: top center;
}

/* Lightbox (styles/lightbox.json on a Grid). */
.ap-lightbox-trigger {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: none;
    cursor: zoom-in;
}

/* The frame clips, so the ring sits inside it. */
.ap-lightbox-trigger:focus-visible {
    outline-offset: -5px;
}

.ap-lightbox-open {
    overflow: hidden;
}

/* A long caption can outgrow a short screen, so the dialog scrolls. The
   padding keeps the image's glow inside the area that scrolling clips. */
.ap-lightbox {
    width: min(73.25rem, 100%);
    max-width: none;
    max-height: 100dvh;
    padding: 2.25rem min(2.25rem, 6vw);
    overflow: auto;
    border: 0;
    background: transparent;
    color: var(--wp--preset--color--text);
}

.ap-lightbox::backdrop {
    background: color-mix(in srgb, var(--wp--preset--color--base) 88%, transparent);
    backdrop-filter: blur(6px);
}

.ap-lightbox__panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ap-lightbox__image {
    display: block;
    width: 100%;
    max-height: calc(100dvh - 9rem);
    border: 3px solid var(--wp--preset--color--border);
    border-radius: 12px;
    box-shadow: var(--wp--preset--shadow--glow-gradient);
    object-fit: contain;
    background: var(--wp--preset--color--surface-2);
}

.ap-lightbox__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.ap-lightbox__caption {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
}

.ap-lightbox__count {
    margin-left: 0.625rem;
    color: var(--wp--preset--color--text-muted);
    font-family: var(--wp--preset--font-family--mono);
    font-size: 0.75rem;
    font-weight: 400;
}

.ap-lightbox__controls {
    display: flex;
    gap: 0.5rem;
}

/* Carousel (styles/carousel.json on Tabs, inside `.ap-shot-carousel`). The
   design's side heading, caption and controls share a column beside the
   shot, but Tabs renders the tab list and each panel as one flow, so the
   wrappers dissolve into a grid. Everything here waits for `is-ready`, set by
   screenshots.js: in the editor and without JS these stay ordinary tabs.
   Outside the wrapper the style still works, as one column. */
/* Without the layout, the caption clears the frame's glow and the tab links
   wrap on a phone. */
.ap-tabs.is-style-carousel .ap-tab-section > * + * {
    margin-top: 1.25rem;
}

.ap-tabs.is-style-carousel .ap-tabs__list ul {
    flex-wrap: wrap;
}

.ap-tabs.is-style-carousel.is-ready .ap-tabs__list {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0;
    border: 0;
}

.ap-shot-carousel:has(> .is-ready) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
}

.ap-shot-carousel > .is-ready,
.ap-shot-carousel > .is-ready > .ap-tabs__container,
.ap-shot-carousel > .is-ready .ap-tab-section:not([hidden]) {
    display: contents;
}

/* Room for a two-line caption, so the arrows stay put between slides. */
.ap-shot-carousel > .is-ready .ap-tab-section > :first-child {
    grid-row: 2;
    min-height: 7.25rem;
}

.ap-shot-carousel > .is-ready .ap-tabs__list {
    grid-row: 3;
}

.ap-shot-carousel > .is-ready .ap-tab-section > :last-child {
    grid-row: 4;
    margin: 0;
}

@media (min-width: 56.25rem) {
    .ap-shot-carousel:has(> .is-ready) {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr);
        grid-template-rows: 1fr auto auto auto 1fr;
        column-gap: 3.5rem;
    }

    .ap-shot-carousel:has(> .is-ready) > header {
        grid-row: 2;
        grid-column: 1;
    }

    .ap-shot-carousel > .is-ready .ap-tab-section > :first-child {
        grid-row: 3;
        grid-column: 1;
    }

    .ap-shot-carousel > .is-ready .ap-tabs__list {
        grid-row: 4;
        grid-column: 1;
    }

    .ap-shot-carousel > .is-ready .ap-tab-section > :last-child {
        grid-row: 1 / -1;
        grid-column: 2;
    }
}

@media (min-width: 75rem) {
    .ap-shot-carousel > .is-ready .ap-tab-section > :first-child {
        min-height: 0;
    }
}

/* The tabs are the dots. Each stays a 24px target around its 10px pill, and
   its name stays in the accessibility tree at font-size 0. */
.ap-tabs.is-style-carousel.is-ready .ap-tabs__list ul {
    display: flex;
    gap: 0.875rem;
    margin: 0 0 0 0.5rem;
    padding: 0;
    border: 0;
    list-style: none;
}

.ap-tabs.is-style-carousel.is-ready .ap-tabs__list a {
    display: block;
    position: relative;
    width: 0.625rem;
    height: 1.5rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: none;
    font-size: 0;
    transition: width var(--wp--custom--motion--dur) var(--wp--custom--motion--ease);
}

.ap-tabs.is-style-carousel.is-ready .ap-tabs__list a::before {
    content: "";
    position: absolute;
    inset: 0.4375rem 0;
    border-radius: 999px;
    background: var(--wp--preset--color--text-muted);
}

.ap-tabs.is-style-carousel.is-ready .ap-tabs__list a[aria-selected="true"] {
    width: 1.75rem;
}

.ap-tabs.is-style-carousel.is-ready .ap-tabs__list a[aria-selected="true"]::before {
    background: var(--wp--preset--gradient--neon);
}

.ap-tabs.is-style-carousel.is-ready .ap-tab-section {
    padding: 0;
}

@media (prefers-reduced-motion: reduce) {
    .ap-tabs.is-style-carousel.is-ready .ap-tabs__list a {
        transition: none;
    }
}

/* Forced colors drop backgrounds, and the dots have no visible text. */
@media (forced-colors: active) {
    .ap-tabs.is-style-carousel.is-ready .ap-tabs__list a::before {
        background: CanvasText;
    }

    .ap-tabs.is-style-carousel.is-ready .ap-tabs__list a[aria-selected="true"]::before {
        background: Highlight;
    }
}
