:root {
    --pronto-bg: #ffffff;
    --pronto-text: #1f1f1f;
    --pronto-muted: #666666;
    --pronto-border: #dddddd;
    --pronto-accent: #ff5333;
    --pronto-content-width: 760px;
    --pronto-wide-width: 1280px;
    --pronto-gutter: clamp(1rem, 3vw, 2rem);
    --pronto-radius: 0.25rem;
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--pronto-bg);
    color: var(--pronto-text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1rem;
    line-height: 1.6;
}

img,
svg,
video,
canvas,
audio,
iframe {
    max-width: 100%;
}

img {
    height: auto;
}

a {
    color: currentColor;
    text-underline-offset: 0.16em;
}

a:hover {
    text-decoration-color: var(--pronto-accent);
    text-decoration-thickness: 0.12em;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
    cursor: pointer;
}

:focus-visible {
    outline: 3px solid var(--pronto-accent);
    outline-offset: 3px;
}

.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;
}

.screen-reader-text:focus {
    clip: auto !important;
    clip-path: none;
    display: block;
    height: auto;
    left: 1rem;
    padding: 0.75rem 1rem;
    top: 1rem;
    width: auto;
    z-index: 100000;
    background: var(--pronto-text);
    color: var(--pronto-bg);
    text-decoration: none;
}

/*
 * Dedicated, high-contrast skip link. Keep it outside the visible viewport
 * until keyboard focus, then expose it without relying on shared WordPress or
 * plugin screen-reader utility classes. Explicit !important foreground and
 * background colors prevent later link-state rules from reducing contrast.
 */
.pronto-skip-link,
.pronto-skip-link:link,
.pronto-skip-link:visited {
    position: absolute;
    top: 0;
    left: -10000px;
    z-index: 100000;
    display: block;
    width: auto;
    height: auto;
    padding: 0.75rem 1rem;
    overflow: visible;
    border: 2px solid #ffffff;
    background: #111111 !important;
    color: #ffffff !important;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
}

.pronto-skip-link:hover,
.pronto-skip-link:active,
.pronto-skip-link:focus,
.pronto-skip-link:focus-visible {
    top: 1rem;
    left: 1rem;
    background: #111111 !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.pronto-skip-link:focus,
.pronto-skip-link:focus-visible {
    outline: 3px solid #ff5333;
    outline-offset: 3px;
}

.site {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header,
.site-footer {
    width: 100%;
    background: var(--pronto-bg);
}

.site-header {
    border-bottom: 1px solid var(--pronto-border);
}

.site-footer {
    border-top: 1px solid var(--pronto-border);
    margin-top: auto;
}

.site-header__inner,
.site-footer__inner {
    width: min(100%, var(--pronto-wide-width));
    margin-inline: auto;
    padding: 1rem var(--pronto-gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
}

.site-title,
.site-info {
    margin: 0;
}

.site-title {
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    font-weight: 700;
    line-height: 1.2;
}

.site-title a,
.site-info a {
    text-decoration: none;
}

.custom-logo-link {
    display: inline-flex;
}

.custom-logo {
    display: block;
    max-height: 56px;
    width: auto;
}

.primary-navigation ul,
.footer-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.25rem;
}

.primary-navigation a,
.footer-navigation a {
    text-decoration: none;
}

.primary-navigation li {
    position: relative;
}

.primary-navigation .sub-menu {
    position: absolute;
    z-index: 50;
    top: 100%;
    left: 0;
    min-width: 12rem;
    padding: 0.75rem;
    background: var(--pronto-bg);
    border: 1px solid var(--pronto-border);
    box-shadow: 0 0.75rem 2rem rgb(0 0 0 / 0.08);
    display: none;
}

.primary-navigation li:hover > .sub-menu,
.primary-navigation li:focus-within > .sub-menu {
    display: grid;
}

.site-main {
    width: 100%;
    flex: 1 0 auto;
}

.pronto-content {
    width: min(100%, calc(var(--pronto-content-width) + (2 * var(--pronto-gutter))));
    margin-inline: auto;
    padding: clamp(2rem, 6vw, 5rem) var(--pronto-gutter);
}

.pronto-content--narrow {
    max-width: 700px;
}

article + article,
.search-result + .search-result {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--pronto-border);
}

.entry-header,
.archive-header,
.page-header {
    margin-bottom: 1.5rem;
}

.entry-title,
.archive-title,
.page-title {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.08;
    letter-spacing: -0.025em;
}

.entry-meta {
    margin-top: 0.65rem;
    color: var(--pronto-muted);
    font-size: 0.925rem;
}

.entry-footer {
    margin-top: 2rem;
    color: var(--pronto-muted);
    font-size: 0.925rem;
}

.tags-label {
    color: var(--pronto-text);
    font-weight: 600;
}

.entry-content > :first-child,
.entry-summary > :first-child {
    margin-top: 0;
}

.entry-content > :last-child,
.entry-summary > :last-child {
    margin-bottom: 0;
}

.post-thumbnail {
    margin-bottom: 2rem;
}

.post-thumbnail img {
    display: block;
    width: 100%;
}

.search-form {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
}

.search-form label {
    flex: 1 1 auto;
}

.search-field,
.search-submit,
.comment-form input,
.comment-form textarea {
    min-height: 44px;
    border: 1px solid var(--pronto-border);
    border-radius: var(--pronto-radius);
    background: var(--pronto-bg);
    color: var(--pronto-text);
    padding: 0.65rem 0.8rem;
}

.search-field {
    width: 100%;
}

.search-submit {
    background: var(--pronto-text);
    border-color: var(--pronto-text);
    color: var(--pronto-bg);
}

.navigation.pagination,
.post-navigation,
.comments-area {
    margin-top: 3rem;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.page-numbers {
    min-width: 2.5rem;
    min-height: 2.5rem;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--pronto-border);
    padding: 0.25rem 0.65rem;
    text-decoration: none;
}

.page-numbers.current {
    background: var(--pronto-text);
    color: var(--pronto-bg);
}

.comment-list {
    padding-left: 1.25rem;
}

.comment-body {
    margin-bottom: 2rem;
}


/*
 * Optional Pronto starter-home presentation. The content itself is staged by
 * WordPress starter content and remains ordinary editable page content. These
 * rules are intentionally disabled as soon as Box & Grid owns the page.
 */
body:not(.box-grid-enabled) .pronto-starter-surface {
    width: min(100%, calc(var(--pronto-wide-width) + (2 * var(--pronto-gutter))));
    margin-inline: auto;
    padding: clamp(3rem, 7vw, 6.5rem) var(--pronto-gutter) clamp(4rem, 8vw, 7rem);
}

body:not(.box-grid-enabled) .pronto-starter-surface article {
    margin: 0;
    padding: 0;
    border: 0;
}

body:not(.box-grid-enabled) .pronto-starter-home {
    margin: 0;
}

body:not(.box-grid-enabled) .pronto-starter-hero {
    max-width: 900px;
    margin: 0;
}

body:not(.box-grid-enabled) .pronto-starter-hero h1 {
    margin: 0;
    font-size: clamp(2.75rem, 7vw, 4.8rem);
    line-height: 1;
    letter-spacing: -0.035em;
}

body:not(.box-grid-enabled) .pronto-starter-hero > p {
    max-width: 760px;
    margin: 1.5rem 0 0;
    color: var(--pronto-muted);
    font-size: clamp(1.15rem, 2.8vw, 1.65rem);
    line-height: 1.45;
}

body:not(.box-grid-enabled) .pronto-starter-hero .wp-block-buttons {
    margin-top: 2rem;
}

body:not(.box-grid-enabled) .pronto-starter-hero .wp-block-button__link {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0;
    background: var(--pronto-text);
    color: var(--pronto-bg);
    text-decoration: none;
}

body:not(.box-grid-enabled) .pronto-starter-callouts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1rem, 2.5vw, 2.5rem);
    margin-top: clamp(4.5rem, 9vw, 8rem);
}

body:not(.box-grid-enabled) .pronto-starter-callouts > .wp-block-column {
    margin: 0;
}

body:not(.box-grid-enabled) .pronto-starter-card {
    min-height: 190px;
    height: 100%;
    margin: 0;
    padding: clamp(1.4rem, 3vw, 2rem);
    border: 1px solid var(--pronto-border);
    overflow-wrap: anywhere;
}

body:not(.box-grid-enabled) .pronto-starter-card::before {
    content: "";
    display: block;
    width: 42px;
    height: 42px;
    margin-bottom: 1.5rem;
    background: var(--pronto-accent);
}

body:not(.box-grid-enabled) .pronto-starter-card h3 {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.25;
}

body:not(.box-grid-enabled) .pronto-starter-card p {
    margin: 0.75rem 0 0;
    color: var(--pronto-muted);
    line-height: 1.45;
}

@media (max-width: 760px) {
    body:not(.box-grid-enabled) .pronto-starter-callouts {
        grid-template-columns: 1fr;
    }

    body:not(.box-grid-enabled) .pronto-starter-card {
        min-height: 0;
    }
}

body.box-grid-enabled .pronto-starter-surface {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

/*
 * Box & Grid Theme Content mode optimization.
 * v0.13.83 adds .box-grid-enabled and replaces the_content(). Pronto keeps its
 * header/footer shell but stops constraining or decorating the builder document,
 * allowing Page Wrappers to own page geometry just as they do in the editor.
 */
body.box-grid-enabled .site-main > .pronto-content {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

body.box-grid-enabled .site-main article {
    margin: 0;
    padding: 0;
    border: 0;
}

body.box-grid-enabled .site-main article > .entry-header,
body.box-grid-enabled .site-main article > .entry-footer,
body.box-grid-enabled .site-main article > .post-thumbnail {
    display: none;
}

body.box-grid-enabled .entry-content,
body.box-grid-enabled .entry-content > .bg-document {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

/* Box & Grid Full Canvas bypasses Pronto templates entirely. These rules are
 * defensive only and add no presentation that competes with the builder. */
body.box-grid-full-canvas .site,
body.box-grid-full-canvas .site-main,
body.box-grid-full-canvas .pronto-content {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

/* WooCommerce / future commerce shell. Commerce components retain ownership of
 * their internal styling; Pronto supplies only neutral document geometry. */
.pronto-commerce-content {
    width: min(100%, calc(var(--pronto-wide-width) + (2 * var(--pronto-gutter))));
}


/* Native WordPress content fallbacks. These selectors are excluded from
 * Box & Grid-authored documents where the builder owns layout geometry. */
body:not(.box-grid-enabled) .entry-content > .alignwide {
    width: min(var(--pronto-wide-width), calc(100vw - (2 * var(--pronto-gutter))));
    max-width: none;
    margin-left: 50%;
    transform: translateX(-50%);
}

body:not(.box-grid-enabled) .entry-content > .alignfull {
    width: 100vw;
    max-width: none;
    margin-left: 50%;
    transform: translateX(-50%);
}

.alignleft {
    float: left;
    margin: 0.35rem 1.5rem 1rem 0;
}

.alignright {
    float: right;
    margin: 0.35rem 0 1rem 1.5rem;
}

.aligncenter {
    clear: both;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption,
.gallery-caption {
    max-width: 100%;
}

.wp-caption-text,
.gallery-caption {
    margin-top: 0.5rem;
    color: var(--pronto-muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.sticky {
    border-inline-start: 3px solid var(--pronto-accent);
    padding-inline-start: 1rem;
}

.bypostauthor > .comment-body {
    border-inline-start: 3px solid var(--pronto-border);
    padding-inline-start: 1rem;
}

.entry-content,
.entry-summary,
.comment-content {
    overflow-wrap: anywhere;
}

pre {
    max-width: 100%;
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    border: 1px solid var(--pronto-border);
    padding: 0.6rem;
    text-align: start;
    vertical-align: top;
}

blockquote {
    margin-inline: 0;
    padding-inline-start: 1.25rem;
    border-inline-start: 3px solid var(--pronto-border);
}

.primary-navigation a:hover,
.primary-navigation a:focus-visible,
.footer-navigation a:hover,
.footer-navigation a:focus-visible {
    text-decoration: underline;
    text-decoration-color: var(--pronto-accent);
}

@media (max-width: 760px) {
    .site-header__inner,
    .site-footer__inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .primary-navigation,
    .footer-navigation {
        width: 100%;
    }

    .primary-navigation ul,
    .footer-navigation ul {
        gap: 0.5rem 1rem;
    }

    .primary-navigation .sub-menu {
        position: static;
        min-width: 0;
        margin-top: 0.5rem;
        box-shadow: none;
    }

    .search-form {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
