:root {
    --ub-theme-bg: var(--ub-color-neutral-sand-soft, #fbf7ef);
    --ub-theme-surface: var(--ub-color-neutral-sand-base, #ffffff);
    --ub-theme-ink: var(--ub-color-neutral-sand-ink, #172026);
    --ub-theme-muted: color-mix(in srgb, var(--ub-theme-ink) 68%, transparent);
    --ub-theme-accent: var(--ub-color-brand-core-base, #1969bc);
    --ub-theme-border: color-mix(in srgb, var(--ub-theme-ink) 14%, transparent);
    --ub-theme-radius: var(--ub-radius-card, 18px);
    --ub-theme-space-xs: var(--ub-space-inline-gap, 0.5rem);
    --ub-theme-space-sm: var(--ub-space-content-gap, 1rem);
    --ub-theme-space-md: var(--ub-space-card-gap, 1.5rem);
    --ub-theme-space-lg: var(--ub-space-section-gap, 3rem);
    --ub-theme-container: 1120px;
    --ub-theme-container-wide: 1360px;
    --ub-theme-container-narrow: 780px;
    --ub-theme-font-body: var(--ub-font-body, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
    --ub-theme-font-heading: var(--ub-font-heading, var(--ub-theme-font-body));
}

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

html {
    min-height: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100%;
    margin: 0;
    background: var(--ub-theme-bg);
    color: var(--ub-theme-ink);
    font-family: var(--ub-theme-font-body);
    font-size: clamp(1rem, 0.96rem + 0.18vw, 1.125rem);
    line-height: 1.65;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

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

a {
    color: var(--ub-theme-accent);
    text-underline-offset: 0.16em;
}

a:hover {
    text-decoration-thickness: 0.12em;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--ub-theme-font-heading);
    line-height: 1.15;
    margin: 0 0 0.65em;
}

h1 {
    font-size: clamp(2.25rem, 1.55rem + 3vw, 5rem);
}

h2 {
    font-size: clamp(1.75rem, 1.35rem + 1.7vw, 3.25rem);
}

h3 {
    font-size: clamp(1.35rem, 1.15rem + 0.8vw, 2rem);
}

p {
    margin: 0 0 1em;
}

.ub-skip-link {
    position: absolute;
    inset-block-start: 0.75rem;
    inset-inline-start: 0.75rem;
    z-index: 99999;
    transform: translateY(-150%);
    padding: 0.7rem 1rem;
    border-radius: 999px;
    background: var(--ub-theme-ink);
    color: var(--ub-theme-surface);
    text-decoration: none;
}

.ub-skip-link:focus {
    transform: translateY(0);
}

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

.ub-site-main {
    flex: 1 0 auto;
}

.ub-theme-container {
    width: min(100% - 2rem, var(--ub-theme-container));
    margin-inline: auto;
}

.ub-theme-container--wide {
    width: min(100% - 2rem, var(--ub-theme-container-wide));
}

.ub-theme-container--narrow {
    width: min(100% - 2rem, var(--ub-theme-container-narrow));
}

.ub-theme-container--full {
    width: 100%;
}

.ub-site-header {
    background: var(--ub-theme-surface);
    border-bottom: 1px solid var(--ub-theme-border);
}

.ub-site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ub-theme-space-md);
    padding-block: 1rem;
}

.ub-site-branding {
    min-width: 0;
}

.ub-site-title {
    display: inline-block;
    color: var(--ub-theme-ink);
    font-family: var(--ub-theme-font-heading);
    font-weight: 800;
    font-size: clamp(1.2rem, 1rem + 0.7vw, 1.8rem);
    line-height: 1;
    text-decoration: none;
}

.ub-site-description {
    margin: 0.35rem 0 0;
    color: var(--ub-theme-muted);
    font-size: 0.92rem;
}

.ub-site-nav__list,
.ub-footer-nav__list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    margin: 0;
    padding: 0;
}

.ub-site-nav a,
.ub-footer-nav a {
    color: var(--ub-theme-ink);
    text-decoration: none;
}

.ub-site-nav a:hover,
.ub-footer-nav a:hover,
.ub-site-nav .current-menu-item > a {
    color: var(--ub-theme-accent);
}

.ub-theme-section {
    padding-block: var(--ub-theme-space-lg);
}

.ub-page__header,
.ub-single__header,
.ub-archive-header {
    margin-bottom: var(--ub-theme-space-md);
}

.ub-page__title,
.ub-single__title,
.ub-archive-title {
    max-width: 12ch;
}

.ub-content-flow > * + * {
    margin-block-start: 1em;
}

.ub-content-flow > h2,
.ub-content-flow > h3,
.ub-content-flow > h4 {
    margin-block-start: 1.55em;
}

.ub-content-flow ul,
.ub-content-flow ol {
    padding-inline-start: 1.35em;
}

.ub-content-flow blockquote {
    margin-inline: 0;
    padding: 1rem 1.25rem;
    border-inline-start: 0.3rem solid var(--ub-theme-accent);
    background: color-mix(in srgb, var(--ub-theme-accent) 9%, transparent);
    border-radius: calc(var(--ub-theme-radius) * 0.65);
}

.ub-content-flow table {
    width: 100%;
    border-collapse: collapse;
    overflow-wrap: anywhere;
}

.ub-content-flow th,
.ub-content-flow td {
    border: 1px solid var(--ub-theme-border);
    padding: 0.6rem 0.75rem;
    text-align: start;
}

.ub-content-flow .wp-block-button__link,
.ub-content-flow button,
.ub-post-card__title a {
    transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.ub-post-list {
    display: grid;
    gap: var(--ub-theme-space-md);
}

.ub-post-card {
    padding: clamp(1rem, 0.75rem + 1vw, 1.75rem);
    background: var(--ub-theme-surface);
    border: 1px solid var(--ub-theme-border);
    border-radius: var(--ub-theme-radius);
}

.ub-post-card__title {
    margin-bottom: 0.25rem;
}

.ub-post-card__title a {
    color: var(--ub-theme-ink);
    text-decoration: none;
}

.ub-post-card__meta,
.ub-single__meta {
    color: var(--ub-theme-muted);
    font-size: 0.9rem;
}

.ub-site-footer {
    margin-top: auto;
    background: var(--ub-theme-surface);
    border-top: 1px solid var(--ub-theme-border);
}

.ub-site-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ub-theme-space-md);
    padding-block: 1.5rem;
}

.ub-site-footer__credit {
    margin: 0;
    color: var(--ub-theme-muted);
}

.ub-blank-main {
    min-height: 100vh;
}

/* Compatibility surface for Unbox plugin v2 classes. */
.ub-section {
    padding-block: var(--ub-section-padding, var(--ub-theme-space-lg));
}

.ub-container {
    width: min(100% - 2rem, var(--ub-container-max, var(--ub-theme-container)));
    margin-inline: auto;
}

.ub-container--wide {
    --ub-container-max: var(--ub-theme-container-wide);
}

.ub-container--narrow {
    --ub-container-max: var(--ub-theme-container-narrow);
}

.ub-grid {
    display: grid;
    gap: var(--ub-grid-gap, var(--ub-theme-space-md));
}

.ub-grid--auto {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--ub-grid-min, 18rem)), 1fr));
}

.ub-stack > * + * {
    margin-block-start: var(--ub-stack-gap, var(--ub-theme-space-sm));
}

.ub-cluster {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ub-cluster-gap, var(--ub-theme-space-sm));
    align-items: center;
}

.ub-card {
    background: var(--ub-card-surface, var(--ub-theme-surface));
    border: var(--ub-card-border, 1px solid var(--ub-theme-border));
    border-radius: var(--ub-card-radius, var(--ub-theme-radius));
    padding: var(--ub-card-padding, clamp(1rem, 0.75rem + 1vw, 1.75rem));
    box-shadow: var(--ub-card-shadow, none);
}

.ub-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.75rem;
    padding: var(--ub-button-padding, 0.75rem 1.1rem);
    border: 0;
    border-radius: var(--ub-button-radius, 999px);
    background: var(--ub-button-bg, var(--ub-theme-accent));
    color: var(--ub-button-color, #fff);
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

.ub-media {
    overflow: hidden;
    border-radius: var(--ub-media-radius, var(--ub-theme-radius));
    aspect-ratio: var(--ub-media-ratio, 16 / 10);
}

.ub-media > img,
.ub-media > picture,
.ub-media > video {
    width: 100%;
    height: 100%;
    object-fit: var(--ub-media-fit, cover);
}

.ub-form {
    display: grid;
    gap: var(--ub-form-gap, var(--ub-theme-space-sm));
}

.ub-form input,
.ub-form textarea,
.ub-form select {
    width: 100%;
    border: 1px solid var(--ub-form-field-border, var(--ub-theme-border));
    border-radius: var(--ub-form-field-radius, calc(var(--ub-theme-radius) * 0.65));
    padding: 0.75rem 0.9rem;
    background: var(--ub-form-field-bg, #fff);
    color: var(--ub-theme-ink);
}

.ub-scroll-safe {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

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

    .ub-site-nav__list,
    .ub-footer-nav__list {
        gap: 0.45rem 0.8rem;
    }

    .ub-theme-section {
        padding-block: clamp(2rem, 8vw, 3rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* v0.1.1 refinements: smaller, predictable header and stronger content-page rhythm. */
.ub-site-branding .custom-logo-link {
    display: inline-flex;
    align-items: center;
    max-inline-size: min(100%, clamp(14rem, 30vw, 26rem));
}

.ub-site-branding .custom-logo {
    width: auto;
    max-inline-size: 100%;
    max-block-size: clamp(4.5rem, 10vw, 7.25rem);
    object-fit: contain;
}

.ub-site-header__inner {
    min-height: clamp(5.25rem, 12vw, 8.5rem);
}

.ub-site-nav {
    margin-inline-start: auto;
    font-size: clamp(0.88rem, 0.84rem + 0.15vw, 1rem);
}

.ub-theme-section--page {
    padding-block: clamp(2.75rem, 5vw, 5rem);
}

.ub-page:not(.ub-page--fullwidth) .ub-page__content {
    max-inline-size: var(--ub-theme-container-narrow);
}

.ub-page__title {
    font-size: clamp(2.2rem, 1.7rem + 2.1vw, 4rem);
    max-width: 18ch;
}

.ub-page__header + .ub-page__content {
    margin-block-start: clamp(1.5rem, 3vw, 2.75rem);
}

.ub-content-flow {
    font-size: clamp(1rem, 0.96rem + 0.12vw, 1.09rem);
}

.ub-content-flow > figure,
.ub-content-flow > .wp-block-image {
    margin-block: clamp(1.5rem, 3vw, 2.75rem);
}

.ub-content-flow > .alignwide {
    max-width: var(--ub-theme-container);
    width: min(100vw - 2rem, var(--ub-theme-container));
    margin-inline: auto;
}

.ub-content-flow > .alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-inline: calc(50% - 50vw);
}

.ub-page--landing .ub-page__content,
.ub-page--no-title .ub-page__content {
    max-inline-size: none;
}

.ub-page--landing .ub-content-flow > *:first-child,
.ub-page--no-title .ub-content-flow > *:first-child {
    margin-block-start: 0;
}

@media (max-width: 760px) {
    .ub-site-header__inner {
        min-height: 0;
        padding-block: 0.85rem;
    }

    .ub-site-branding .custom-logo-link {
        max-inline-size: min(100%, 18rem);
    }

    .ub-site-branding .custom-logo {
        max-block-size: 5.25rem;
    }

    .ub-site-nav {
        width: 100%;
        margin-inline-start: 0;
    }
}

/* v0.1.2 refinements: automatic front-page landing mode and tighter header scale. */
.ub-site-header__inner {
    min-height: clamp(4.25rem, 8vw, 6.5rem);
    padding-block: clamp(0.65rem, 1.5vw, 1rem);
}

.ub-site-branding .custom-logo-link {
    max-inline-size: min(100%, clamp(11rem, 22vw, 20rem));
}

.ub-site-branding .custom-logo {
    max-block-size: clamp(3.1rem, 6vw, 5.4rem);
}

.ub-theme-section--front-page {
    padding-block-start: clamp(1.75rem, 3vw, 3rem);
}

.ub-page--front-page .ub-page__content {
    max-inline-size: none;
}

.ub-page--front-page .ub-content-flow > *:first-child {
    margin-block-start: 0;
}

/* Keep shortcode-heavy landing pages from inheriting ordinary article rhythm. */
.ub-page--front-page .ub-content-flow > .alignwide,
.ub-page--front-page .ub-content-flow > .alignfull,
.ub-page--landing .ub-content-flow > .alignwide,
.ub-page--landing .ub-content-flow > .alignfull {
    width: auto;
    max-width: none;
    margin-inline: 0;
}

@media (max-width: 760px) {
    .ub-site-header__inner {
        padding-block: 0.65rem;
    }

    .ub-site-branding .custom-logo-link {
        max-inline-size: min(100%, 14rem);
    }

    .ub-site-branding .custom-logo {
        max-block-size: 4rem;
    }
}


/* v0.1.3 refinements: front-page shortcode canvas and overflow hardening. */
html,
body,
.ub-site,
.ub-site-main {
    max-inline-size: 100%;
}

body {
    overflow-x: clip;
}

.ub-theme-section,
.ub-theme-container,
.ub-page,
.ub-page__content,
.ub-content-flow {
    min-inline-size: 0;
}

.ub-page--front-page .ub-page__content {
    max-inline-size: none;
    inline-size: 100%;
}

.ub-page--front-page .ub-content-flow {
    max-inline-size: none;
    inline-size: 100%;
}

.ub-page--front-page .ub-content-flow > * {
    max-inline-size: 100%;
}

.ub-page--front-page .ub-content-flow > *:first-child {
    margin-block-start: 0;
}

.ub-page--front-page :where(section, article, div, ul, ol, table, form, iframe) {
    max-inline-size: 100%;
}

.ub-page--front-page :where(.unboxing-course-grid, .unboxing-course-directory, .unboxing-course-catalog, .unboxing-home, .unboxing-start, .unboxing-need-guide) {
    inline-size: 100%;
    max-inline-size: 100%;
}

.ub-page--front-page :where(table, .unboxing-course-grid, .unboxing-course-directory, .unboxing-course-catalog) {
    min-inline-size: 0;
}

.ub-site-header__inner {
    flex-wrap: wrap;
}

.ub-site-branding {
    flex: 0 1 auto;
}

.ub-site-nav {
    flex: 1 1 22rem;
    min-inline-size: min(100%, 16rem);
}

.ub-site-nav__list {
    justify-content: flex-end;
}

@media (max-width: 980px) {
    .ub-site-header__inner {
        gap: 0.75rem 1rem;
    }

    .ub-site-branding .custom-logo-link {
        max-inline-size: min(100%, 13rem);
    }

    .ub-site-branding .custom-logo {
        max-block-size: 3.7rem;
    }

    .ub-site-nav__list {
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    body {
        overflow-x: hidden;
    }

    .ub-theme-container,
    .ub-container {
        width: min(100% - 1.25rem, var(--ub-theme-container));
    }

    .ub-theme-container--wide,
    .ub-container--wide {
        width: min(100% - 1.25rem, var(--ub-theme-container-wide));
    }
}


/* v0.1.4 refinements: front page uses a true landing canvas instead of clipping legacy shortcode layouts. */
body {
    overflow-x: auto;
}

.ub-theme-container--front {
    width: 100%;
    max-width: none;
    padding-inline: clamp(1rem, 4vw, 3rem);
}

.ub-theme-section--front-page {
    padding-block-start: clamp(1.25rem, 2.5vw, 2rem);
}

.ub-page--front-page,
.ub-page--front-page .ub-page__content,
.ub-page--front-page .ub-content-flow {
    inline-size: 100%;
    max-inline-size: none;
    overflow: visible;
}

/* Undo v0.1.3 descendant clamping. It hid the right side of older shortcode canvases. */
.ub-page--front-page .ub-content-flow > *,
.ub-page--front-page :where(section, article, div, ul, ol, table, form, iframe),
.ub-page--front-page :where(.unboxing-course-grid, .unboxing-course-directory, .unboxing-course-catalog, .unboxing-home, .unboxing-start, .unboxing-need-guide) {
    max-inline-size: revert;
}

/* Keep obviously fluid media safe without forcing every layout box to shrink. */
.ub-page--front-page :where(img, picture, video, canvas, svg, iframe) {
    max-inline-size: 100%;
}

.ub-page--front-page :where(.alignwide, .alignfull) {
    width: auto;
    max-width: none;
    margin-inline: 0;
}

@media (max-width: 900px) {
    .ub-theme-container--front {
        padding-inline: 1rem;
    }

    .ub-site-header__inner {
        justify-content: center;
    }

    .ub-site-branding,
    .ub-site-nav {
        flex-basis: 100%;
    }

    .ub-site-branding .custom-logo-link {
        margin-inline: auto;
    }

    .ub-site-nav__list {
        justify-content: center;
    }
}
